diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 8eae496..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -# GitHub Sponsor config -ko_fi: lyc8503 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..8c6c68e --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,32 @@ +name: Check + +on: + pull_request: + push: + branches: ['main'] + +permissions: + contents: read + +env: + WRANGLER_SEND_METRICS: 'false' + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22.x + cache: 'npm' + - run: npm ci + - run: cd worker && npm ci + - name: Lint and types + run: | + npx next lint + npx tsc --noEmit -p . + - name: Build the worker + run: cd worker && npx wrangler deploy src/index.ts --outdir dist --dry-run + - name: Build the page for Cloudflare Pages + run: npx @cloudflare/next-on-pages diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b001122..970744d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,8 +5,14 @@ on: branches: ['main'] workflow_dispatch: +# Cottage: deploys only once the repository variable CLOUDFLARE_DEPLOY is "true" (set at launch, +# with the CLOUDFLARE_API_TOKEN secret). Until then a push to main does nothing. +env: + WRANGLER_SEND_METRICS: 'false' + jobs: build-and-deploy: + if: vars.CLOUDFLARE_DEPLOY == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/issue_translate.yml b/.github/workflows/issue_translate.yml deleted file mode 100644 index 83c127b..0000000 --- a/.github/workflows/issue_translate.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: 'issue-translator' -on: - issue_comment: - types: [created] - issues: - types: [opened] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: usthe/issues-translate-action@v2.7 - with: - IS_MODIFY_TITLE: false - # not require, default false, . Decide whether to modify the issue title - # if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot. - CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿 - # not require. Customize the translation robot prefix message. diff --git a/README.md b/README.md index 4676d0e..92d2023 100644 --- a/README.md +++ b/README.md @@ -1,90 +1,51 @@ -
- English - 简体中文 -
+# Cottage status -# ✔[UptimeFlare](https://github.com/lyc8503/UptimeFlare) +The public status page for [Cottage](https://cottage.host), at **status.cottage.host**: whether the website, the dashboard and app hosting in each region are up, 90 days of history, and the incident updates and planned maintenance we post. -A more advanced, serverless, and free uptime monitoring & status page solution, powered by Cloudflare Workers, complete with a user-friendly interface. +It's a fork of [UptimeFlare](https://github.com/lyc8503/UptimeFlare) (Apache-2.0) by lyc8503. It runs entirely on Cloudflare's free plan, with no server of ours: -📢 **[[SECURITY ADVISORY](https://github.com/lyc8503/UptimeFlare/security/advisories/GHSA-36q9-v7p3-vj6v) 2026/03/04]** A vulnerability (CVE-2026-29779) that could expose monitor configuration and credentials in `uptime.config.ts` to clients was fixed. Versions between 2025-09-21 (from commit `41257c6`) and 2026-03-04 are affected. **Affected users are strongly advised to upgrade to the latest version.** +- **The checks** (`worker/`, unchanged from upstream): a Cloudflare Worker runs every minute, checks each service, and stores the results in a D1 database. +- **The page** (`pages/`, `components/`, `styles/`): rewritten in Cottage's brand. The tokens, fonts and component CSS in `styles/brand/` and `public/fonts/` are copied from Hearth (`internal/web/static`), and the logo, pod row, status pill and banner are ports of the brand handbook's components. Light by default, dark when the OS asks. -🎉 **[UPDATE 2026/01/03]** I have just migrated UptimeFlare from KV to D1 Database. I also updated the Terraform Cloudflare provider to v5 and improved the deployment process. The data structure has been optimized to resolve long-standing performance issues. +Internal monitoring (servers, backups, alerts) is separate: Grafana Cloud, set up in hearth `infra/monitoring`. -New users can deploy directly, while existing users can have a simple auto migration process (upgrade docs below)! Feel free to open an issue if you run into any trouble deploying. +## Change what's checked, or post a notice -## ⭐Features +Everything lives in [`uptime.config.ts`](uptime.config.ts): -- Open-source, easy to deploy (in under 10 minutes, no local tools required), and free -- Monitoring capabilities - - Up to 50 checks at 1-minute intervals - - Geo-specific checks from over [310 cities](https://www.cloudflare.com/network/) worldwide - - Support for HTTP/HTTPS/TCP port monitoring - - Up to 90-day uptime history and uptime percentage tracking - - Customizable request methods, headers, and body for HTTP(s) - - Custom status code & keyword checks for HTTP(s) - - Downtime notification supporting [100+ notification channels](https://github.com/caronc/apprise/wiki) - - Customizable Webhook - - Multi-language support (English/Chinese) -- Status page - - Interactive ping (response time) chart for all types of monitors - - Scheduled maintenances alerts & Incident history page - - Responsive UI that adapts to your system theme - - Customizable status page - - Use your own domain with CNAME - - Optional password authentication (private status page) - - JSON API for fetching realtime status data +- `workerConfig.monitors`: the services we check. Keep an `id` the same and its history stays. +- `pageConfig.group`: the sections on the page. +- `maintenances`: incident updates and planned maintenance. Colour sets what the page says about the services it lists: `red` outage, `yellow` degraded, `blue` maintenance, `green` resolved. Write them in Cottage's voice (brand handbook, Voice and copy): what happened, who it affects, what to expect next. -## 👀Demo +A push to `main` deploys (about three minutes), once deploys are switched on. -My status page (Online demo): https://uptimeflare.pages.dev/ +## Preview locally -Some screenshots: +```sh +npm ci +npm run dev # http://localhost:3000, with sample data +``` -![Desktop, Light theme](docs/desktop.png) +Without a D1 database, `npm run dev` shows sample data (`dev/sample.ts`). Add `?sample=outage`, `?sample=maintenance` or `?sample=empty` to see the other states. Production never uses the samples. -## ⚡Quickstart / 📄Documentation +## Deploying (at launch) -Please refer to [Wiki](https://github.com/lyc8503/UptimeFlare/wiki) +Not deployed yet: the checks need cottage.host, app.cottage.host and a canary app to exist. At launch: -## 🚀Upgrade existing deployments +1. Put the canary app's address in the `apps-us-east` monitor. +2. Create a Cloudflare API token for the account: Workers Scripts, D1 and Cloudflare Pages edit, plus Zone DNS edit on cottage.host. Save it as the Actions secret `CLOUDFLARE_API_TOKEN` (and `CLOUDFLARE_ACCOUNT_ID`). +3. Set the repository variable `CLOUDFLARE_DEPLOY` to `true` and run the "Deploy to Cloudflare" workflow. +4. In Cloudflare Pages, add the custom domain `status.cottage.host` to the `uptimeflare` project. +5. Link the footer status ("All systems normal") on cottage.host to it; `/api/data` returns the current state as JSON for that. -Get the latest features right away with [simple upgrade process](https://github.com/lyc8503/UptimeFlare/wiki/Synchronize-updates-from-upstream) +## Keeping up with upstream -## ⚙️Docs for developer +```sh +git fetch upstream && git merge upstream/main +``` -To contribute new features or customize your deployment furthermore, see [here](https://github.com/lyc8503/UptimeFlare/wiki/How-to-develop). +The worker, `types/`, `deploy/` and `deploy.tf` are upstream's, so merges there should be clean. The page itself is ours; upstream UI changes don't apply. Upstream's original README is in [UPSTREAM-README.md](UPSTREAM-README.md). -## New features (TODOs) +## Licence -- [x] Specify region for monitors -- [x] TCP `opened` promise -- [x] Use apprise to support various notification channels -- [x] ~~Telegram example~~ -- [x] ~~[Bark](https://bark.day.app) example~~ -- [x] ~~Email notification via Cloudflare Email Workers~~ -- [x] Improve docs by providing simple examples -- [x] Notification grace period -- [ ] SSL certificate checks -- [x] ~~Self-host Dockerfile~~ -- [x] Incident history -- [x] Improve `checkLocationWorkerRoute` and fix possible `proxy failed` -- [x] Groups -- [x] Remove old incidents -- [x] ~~Known issue~~: `fetch` doesn't support non-standard port (resolved after CF update) -- [x] Compatibility date update -- [x] Scheduled Maintenance -- [x] Add docs for dev -- [x] Migration to Terraform Cloudflare provider version 5.x -- [x] Cloudflare D1 database -- [x] Scheduled maintenances (via IIFE) -- [x] Simpler config example -- [x] Upcoming maintenances -- [x] Universal Webhook upgrade -- [x] i18n...? (maybe) -- [ ] ICMP via proxy? -- [x] Add default UA -- [x] Customizable footer -- [x] New header logo -- [x] Improve CPU time usage -- [x] Local deployment (docs WIP) +Apache-2.0, as upstream ([LICENSE](LICENSE)). The Cottage name, logo and brand assets belong to Cottage Services LLC and aren't covered by that licence. The fonts (Fraunces, Hanken Grotesk, JetBrains Mono) are under the SIL Open Font License; see `public/fonts/OFL-*.txt`. diff --git a/README_zh-CN.md b/README_zh-CN.md deleted file mode 100644 index b7db9b4..0000000 --- a/README_zh-CN.md +++ /dev/null @@ -1,41 +0,0 @@ -
- English - 简体中文 -
- -# ✔[UptimeFlare](https://github.com/lyc8503/UptimeFlare) - -一个由 Cloudflare Workers 驱动的功能丰富、Serverless 且免费的 Uptime 监控及状态页面。 - -## ⭐功能 - -- 开源,易于部署(全程无需本地工具,耗时不到 10 分钟),且完全免费 -- 监控功能 - - 最多支持 50 个 1 分钟精度的检查 - - 支持指定全球 [310+ 个城市](https://www.cloudflare.com/network/) 的监控节点 - - 支持 HTTP/HTTPS/TCP 端口监控 - - 最多 90 天的 uptime 历史记录和 uptime 百分比跟踪 - - 可自定义的 HTTP(s) 请求方法、头和主体 - - 可自定义的 HTTP(s) 状态码和关键字检查 - - 支持 [100 多个通知渠道](https://github.com/caronc/apprise/wiki) 的宕机消息通知 - - 可自定义的 Webhook - - 多语言支持 (中文/英文) -- 状态页面 - - 所有类型监控的交互式 ping(响应时间)图表 - - 响应式 UI,自适应PC/手机屏幕,及亮色/暗色系统主题 - - 配置选项丰富的状态页面 - - 可使用您自己的域名与 CNAME - - 可选的密码认证(私人状态页面) - - 用于获取实时状态数据的 JSON API - -## 👀演示 - -我自己的状态页面(在线演示):https://uptimeflare.pages.dev/ - -一些截图: - -![桌面,浅色主题](docs/desktop.png) - -## ⚡快速入门 / 📄文档 - -请参阅 [Wiki](https://github.com/lyc8503/UptimeFlare/wiki) diff --git a/UPSTREAM-README.md b/UPSTREAM-README.md new file mode 100644 index 0000000..4676d0e --- /dev/null +++ b/UPSTREAM-README.md @@ -0,0 +1,90 @@ +
+ English + 简体中文 +
+ +# ✔[UptimeFlare](https://github.com/lyc8503/UptimeFlare) + +A more advanced, serverless, and free uptime monitoring & status page solution, powered by Cloudflare Workers, complete with a user-friendly interface. + +📢 **[[SECURITY ADVISORY](https://github.com/lyc8503/UptimeFlare/security/advisories/GHSA-36q9-v7p3-vj6v) 2026/03/04]** A vulnerability (CVE-2026-29779) that could expose monitor configuration and credentials in `uptime.config.ts` to clients was fixed. Versions between 2025-09-21 (from commit `41257c6`) and 2026-03-04 are affected. **Affected users are strongly advised to upgrade to the latest version.** + +🎉 **[UPDATE 2026/01/03]** I have just migrated UptimeFlare from KV to D1 Database. I also updated the Terraform Cloudflare provider to v5 and improved the deployment process. The data structure has been optimized to resolve long-standing performance issues. + +New users can deploy directly, while existing users can have a simple auto migration process (upgrade docs below)! Feel free to open an issue if you run into any trouble deploying. + +## ⭐Features + +- Open-source, easy to deploy (in under 10 minutes, no local tools required), and free +- Monitoring capabilities + - Up to 50 checks at 1-minute intervals + - Geo-specific checks from over [310 cities](https://www.cloudflare.com/network/) worldwide + - Support for HTTP/HTTPS/TCP port monitoring + - Up to 90-day uptime history and uptime percentage tracking + - Customizable request methods, headers, and body for HTTP(s) + - Custom status code & keyword checks for HTTP(s) + - Downtime notification supporting [100+ notification channels](https://github.com/caronc/apprise/wiki) + - Customizable Webhook + - Multi-language support (English/Chinese) +- Status page + - Interactive ping (response time) chart for all types of monitors + - Scheduled maintenances alerts & Incident history page + - Responsive UI that adapts to your system theme + - Customizable status page + - Use your own domain with CNAME + - Optional password authentication (private status page) + - JSON API for fetching realtime status data + +## 👀Demo + +My status page (Online demo): https://uptimeflare.pages.dev/ + +Some screenshots: + +![Desktop, Light theme](docs/desktop.png) + +## ⚡Quickstart / 📄Documentation + +Please refer to [Wiki](https://github.com/lyc8503/UptimeFlare/wiki) + +## 🚀Upgrade existing deployments + +Get the latest features right away with [simple upgrade process](https://github.com/lyc8503/UptimeFlare/wiki/Synchronize-updates-from-upstream) + +## ⚙️Docs for developer + +To contribute new features or customize your deployment furthermore, see [here](https://github.com/lyc8503/UptimeFlare/wiki/How-to-develop). + +## New features (TODOs) + +- [x] Specify region for monitors +- [x] TCP `opened` promise +- [x] Use apprise to support various notification channels +- [x] ~~Telegram example~~ +- [x] ~~[Bark](https://bark.day.app) example~~ +- [x] ~~Email notification via Cloudflare Email Workers~~ +- [x] Improve docs by providing simple examples +- [x] Notification grace period +- [ ] SSL certificate checks +- [x] ~~Self-host Dockerfile~~ +- [x] Incident history +- [x] Improve `checkLocationWorkerRoute` and fix possible `proxy failed` +- [x] Groups +- [x] Remove old incidents +- [x] ~~Known issue~~: `fetch` doesn't support non-standard port (resolved after CF update) +- [x] Compatibility date update +- [x] Scheduled Maintenance +- [x] Add docs for dev +- [x] Migration to Terraform Cloudflare provider version 5.x +- [x] Cloudflare D1 database +- [x] Scheduled maintenances (via IIFE) +- [x] Simpler config example +- [x] Upcoming maintenances +- [x] Universal Webhook upgrade +- [x] i18n...? (maybe) +- [ ] ICMP via proxy? +- [x] Add default UA +- [x] Customizable footer +- [x] New header logo +- [x] Improve CPU time usage +- [x] Local deployment (docs WIP) diff --git a/components/DetailBar.tsx b/components/DetailBar.tsx deleted file mode 100644 index f8bb98c..0000000 --- a/components/DetailBar.tsx +++ /dev/null @@ -1,160 +0,0 @@ -import { MonitorState, MonitorTarget } from '@/types/config' -import { getColor } from '@/util/color' -import { Box, Tooltip, Modal } from '@mantine/core' -import { useResizeObserver } from '@mantine/hooks' -import { useState } from 'react' -import { useTranslation } from 'react-i18next' -const moment = require('moment') -require('moment-precise-range-plugin') - -export default function DetailBar({ - monitor, - state, -}: { - monitor: MonitorTarget - state: MonitorState -}) { - const { t } = useTranslation('common') - const [barRef, barRect] = useResizeObserver() - const [modalOpened, setModalOpened] = useState(false) - const [modalTitle, setModalTitle] = useState('') - const [modelContent, setModelContent] = useState(
) - - const overlapLen = (x1: number, x2: number, y1: number, y2: number) => { - return Math.max(0, Math.min(x2, y2) - Math.max(x1, y1)) - } - - const uptimePercentBars = [] - - const currentTime = Math.round(Date.now() / 1000) - const montiorStartTime = state.incident[monitor.id][0].start[0] - - const todayStart = new Date() - todayStart.setHours(0, 0, 0, 0) - - for (let i = 89; i >= 0; i--) { - const dayStart = Math.round(todayStart.getTime() / 1000) - i * 86400 - const dayEnd = dayStart + 86400 - - const dayMonitorTime = overlapLen(dayStart, dayEnd, montiorStartTime, currentTime) - let dayDownTime = 0 - - let incidentReasons: string[] = [] - - for (let incident of state.incident[monitor.id]) { - const incidentStart = incident.start[0] - const incidentEnd = incident.end ?? currentTime - - const overlap = overlapLen(dayStart, dayEnd, incidentStart, incidentEnd) - dayDownTime += overlap - - // Incident history for the day - if (overlap > 0) { - for (let i = 0; i < incident.error.length; i++) { - let partStart = incident.start[i] - let partEnd = - i === incident.error.length - 1 ? incident.end ?? currentTime : incident.start[i + 1] - partStart = Math.max(partStart, dayStart) - partEnd = Math.min(partEnd, dayEnd) - - if (overlapLen(dayStart, dayEnd, partStart, partEnd) > 0) { - const startStr = new Date(partStart * 1000).toLocaleTimeString([], { - hour: '2-digit', - minute: '2-digit', - }) - const endStr = new Date(partEnd * 1000).toLocaleTimeString([], { - hour: '2-digit', - minute: '2-digit', - }) - incidentReasons.push(`[${startStr}-${endStr}] ${incident.error[i]}`) - } - } - } - } - - const dayPercent = (((dayMonitorTime - dayDownTime) / dayMonitorTime) * 100).toPrecision(4) - - uptimePercentBars.push( - -
- {t('percent at date', { - percent: dayPercent, - date: new Date(dayStart * 1000).toLocaleDateString(), - })} -
- {dayDownTime > 0 && ( -
- {t('Down for', { - duration: moment.preciseDiff(moment(0), moment(dayDownTime * 1000)), - })} -
- )} - - ) - } - > -
{ - if (dayDownTime > 0) { - setModalTitle( - t('incidents at', { - name: monitor.name, - date: new Date(dayStart * 1000).toLocaleDateString(), - }) - ) - setModelContent( - <> - {incidentReasons.map((reason, index) => ( -
{reason}
- ))} - - ) - setModalOpened(true) - } - }} - /> - - ) - } - - return ( - <> - setModalOpened(false)} - title={modalTitle} - size={'40em'} - > - {modelContent} - - - {uptimePercentBars.slice(Math.floor(Math.max(9 * 90 - barRect.width, 0) / 9), 90)} - - - ) -} diff --git a/components/DetailChart.tsx b/components/DetailChart.tsx deleted file mode 100644 index 9d174a8..0000000 --- a/components/DetailChart.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import { Line } from 'react-chartjs-2' -import { - Chart as ChartJS, - CategoryScale, - LinearScale, - PointElement, - LineElement, - Title, - Tooltip as ChartTooltip, - Legend, - TimeScale, -} from 'chart.js' -import 'chartjs-adapter-moment' -import { MonitorState, MonitorTarget } from '@/types/config' -import { codeToCountry } from '@/util/iata' -import { useTranslation } from 'react-i18next' - -ChartJS.register( - CategoryScale, - LinearScale, - PointElement, - LineElement, - Title, - ChartTooltip, - Legend, - TimeScale -) - -export default function DetailChart({ - monitor, - state, -}: { - monitor: MonitorTarget - state: MonitorState -}) { - const { t } = useTranslation('common') - const latencyData = state.latency[monitor.id].map((point) => ({ - x: point.time * 1000, - y: point.ping, - loc: point.loc, - })) - - let data = { - datasets: [ - { - data: latencyData, - borderColor: 'rgb(112, 119, 140)', - borderWidth: 2, - radius: 0, - cubicInterpolationMode: 'monotone' as const, - tension: 0.4, - }, - ], - } - - let options = { - responsive: true, - maintainAspectRatio: false, - interaction: { - mode: 'index' as const, - intersect: false, - }, - animation: { - duration: 0, - }, - plugins: { - tooltip: { - callbacks: { - label: (item: any) => { - if (item.parsed.y) { - return `${item.parsed.y}ms (${codeToCountry(item.raw.loc)})` - } - }, - }, - }, - legend: { - display: false, - }, - title: { - display: true, - text: t('Response times'), - align: 'start' as const, - }, - }, - scales: { - x: { - type: 'time' as const, - ticks: { - source: 'auto' as const, - maxRotation: 0, - autoSkip: true, - }, - }, - }, - } - - return ( -
- -
- ) -} diff --git a/components/Footer.tsx b/components/Footer.tsx index 657a260..7ba84c6 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,14 +1,32 @@ -import { Divider } from '@mantine/core' -import { pageConfig } from '@/uptime.config' +import { Logo } from './brand' +// The site footer from the brand handbook, trimmed for a single-purpose page. export default function Footer() { - const defaultFooter = - '

Open-source monitoring and status page powered by UptimeFlare, made with ❤ by lyc8503.

' - return ( - <> - -
- +
+
+
+ + + +

+ Cottage runs open-source apps for you, kept warm. This page checks our services every + minute from Cloudflare’s network. +

+
+
+ © {new Date().getFullYear()} Cottage Services LLC + cottage.host + {/* an API route, not a page */} + {/* eslint-disable-next-line @next/next/no-html-link-for-pages */} + Status API + + Built on{' '} + UptimeFlare, open source ( + our copy) + +
+
+
) } diff --git a/components/Header.tsx b/components/Header.tsx index bfccf32..f8819f3 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -1,53 +1,40 @@ -import { Container, Group, Image } from '@mantine/core' -import classes from '@/styles/Header.module.css' +import Link from 'next/link' import { pageConfig } from '@/uptime.config' -import { PageConfigLink } from '@/types/config' -import { useTranslation } from 'react-i18next' - -export default function Header({ style }: { style?: React.CSSProperties }) { - const { t } = useTranslation('common') - const linkToElement = (link: PageConfigLink, i: number) => { - return ( - - {link.label} - - ) - } - - const links = [{ label: t('Incidents'), link: '/incidents' }, ...(pageConfig.links || [])] +import { Logo } from './brand' +// The site header from the brand handbook (SiteHeader): lockup left, nav, actions right. +export default function Header({ current }: { current: 'status' | 'incidents' }) { + const nav = [ + { key: 'status', label: 'Current status', href: '/' }, + { key: 'incidents', label: 'Incident history', href: '/incidents' }, + ] return ( -
- -
- - logo - +
+
+ + + Status + + +
+ {(pageConfig.links || []).map((l) => ( + + {l.label} + + ))}
- - - {links?.map(linkToElement)} - - - - {links?.filter((link) => link.highlight || link.link.startsWith('/')).map(linkToElement)} - - +
) } diff --git a/components/LatencyChart.tsx b/components/LatencyChart.tsx new file mode 100644 index 0000000..549d1fc --- /dev/null +++ b/components/LatencyChart.tsx @@ -0,0 +1,100 @@ +import { useEffect, useState } from 'react' +import { Line } from 'react-chartjs-2' +import { + Chart as ChartJS, + LinearScale, + PointElement, + LineElement, + Tooltip, + Filler, +} from 'chart.js' +import { MonitorState, MonitorTarget } from '@/types/config' +import { codeToCountry } from '@/util/iata' +import { formatTime } from '@/util/status' + +ChartJS.register(LinearScale, PointElement, LineElement, Tooltip, Filler) + +// Chart.js draws on a canvas, so read the brand tokens from CSS (and again if the theme changes). +function useTokens() { + const read = () => { + const s = getComputedStyle(document.documentElement) + const v = (n: string) => s.getPropertyValue(n).trim() + return { moss: v('--moss'), mossSoft: v('--moss-soft'), line: v('--line'), muted: v('--ink-muted'), ink: v('--ink'), raised: v('--paper-raised'), strong: v('--line-strong') } + } + const [t, setT] = useState(read) + useEffect(() => { + const obs = new MutationObserver(() => setT(read())) + obs.observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] }) + return () => obs.disconnect() + }, []) + return t +} + +export default function LatencyChart({ monitor, state }: { monitor: MonitorTarget; state: MonitorState }) { + const t = useTokens() + const points = (state.latency[monitor.id] || []).map((p) => ({ x: p.time, y: p.ping, loc: p.loc })) + const font = { family: getComputedStyle(document.body).fontFamily, size: 12 } + + return ( +
+ formatTime(items[0].parsed.x as number), + label: (item) => `${item.parsed.y} ms from ${codeToCountry((item.raw as any).loc)}`, + }, + }, + }, + scales: { + x: { + type: 'linear', + min: points[0]?.x, + max: points[points.length - 1]?.x, + border: { display: false }, + grid: { display: false }, + ticks: { color: t.muted, font, maxTicksLimit: 7, callback: (v) => formatTime(Number(v)) }, + }, + y: { + beginAtZero: true, + border: { display: false }, + grid: { color: t.line }, + ticks: { color: t.muted, font, maxTicksLimit: 4, callback: (v) => `${v} ms` }, + }, + }, + }} + /> +
+ ) +} diff --git a/components/MaintenanceAlert.tsx b/components/MaintenanceAlert.tsx deleted file mode 100644 index 746d80e..0000000 --- a/components/MaintenanceAlert.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { Alert, List, Text, useMantineTheme } from '@mantine/core' -import { useMediaQuery } from '@mantine/hooks' -import { IconAlertTriangle } from '@tabler/icons-react' -import { MaintenanceConfig, MonitorTarget } from '@/types/config' -import { pageConfig } from '@/uptime.config' -import { useTranslation } from 'react-i18next' - -export default function MaintenanceAlert({ - maintenance, - style, - upcoming = false, -}: { - maintenance: Omit & { monitors?: (MonitorTarget | undefined)[] } - style?: React.CSSProperties - upcoming?: boolean -}) { - const { t } = useTranslation('common') - const theme = useMantineTheme() - const isDesktop = useMediaQuery(`(min-width: ${theme.breakpoints.sm})`) - - return ( - } - title={ - - {(upcoming ? t('Upcoming') : '') + (maintenance.title || t('Scheduled Maintenance'))} - - } - color={ - upcoming ? pageConfig.maintenances?.upcomingColor ?? 'gray' : maintenance.color || 'yellow' - } - withCloseButton={false} - style={{ margin: '16px auto 0 auto', ...style }} - > - {/* Date range in top right (desktop) or inline (mobile) */} -
-
-
- {upcoming ? t('Scheduled for') : t('From')} -
-
{new Date(maintenance.start).toLocaleString()}
-
- {upcoming ? t('Expected end') : t('To')} -
-
- {maintenance.end - ? new Date(maintenance.end).toLocaleString() - : t('Until further notice')} -
-
-
- - {maintenance.body} - {maintenance.monitors && maintenance.monitors.length > 0 && ( - <> - - {t('Affected components')} - - - {maintenance.monitors.map((comp, compIdx) => ( - {comp?.name ?? t('MONITOR ID NOT FOUND')} - ))} - - - )} -
- ) -} diff --git a/components/MonitorDetail.tsx b/components/MonitorDetail.tsx deleted file mode 100644 index 0ff35bf..0000000 --- a/components/MonitorDetail.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import { Text, Tooltip } from '@mantine/core' -import { MonitorState, MonitorTarget } from '@/types/config' -import { IconAlertCircle, IconAlertTriangle, IconCircleCheck } from '@tabler/icons-react' -import DetailChart from './DetailChart' -import DetailBar from './DetailBar' -import { getColor } from '@/util/color' -import { maintenances } from '@/uptime.config' -import { useTranslation } from 'react-i18next' - -export default function MonitorDetail({ - monitor, - state, -}: { - monitor: MonitorTarget - state: MonitorState -}) { - const { t } = useTranslation('common') - - if (!state.latency[monitor.id]) - return ( - <> - - {monitor.name} - - - {t('No data available')} - - - ) - - let statusIcon = - state.incident[monitor.id].slice(-1)[0].end === null ? ( - - ) : ( - - ) - - // Hide real status icon if monitor is in maintenance - const now = new Date() - const hasMaintenance = maintenances - .filter((m) => now >= new Date(m.start) && (!m.end || now <= new Date(m.end))) - .find((maintenance) => maintenance.monitors?.includes(monitor.id)) - if (hasMaintenance) - statusIcon = ( - - ) - - let totalTime = Date.now() / 1000 - state.incident[monitor.id][0].start[0] - let downTime = 0 - for (let incident of state.incident[monitor.id]) { - downTime += (incident.end ?? Date.now() / 1000) - incident.start[0] - } - - const uptimePercent = (((totalTime - downTime) / totalTime) * 100).toPrecision(4) - - // Conditionally render monitor name with or without hyperlink based on monitor.url presence - const monitorNameElement = ( - - {monitor.statusPageLink ? ( - - {statusIcon} {monitor.name} - - ) : ( - <> - {statusIcon} {monitor.name} - - )} - - ) - - return ( - <> -
- {monitor.tooltip ? ( - {monitorNameElement} - ) : ( - monitorNameElement - )} - - - {t('Overall', { percent: uptimePercent })} - -
- - - {!monitor.hideLatencyChart && } - - ) -} diff --git a/components/MonitorList.tsx b/components/MonitorList.tsx index ab14eb2..0a3a433 100644 --- a/components/MonitorList.tsx +++ b/components/MonitorList.tsx @@ -1,133 +1,114 @@ -import { MonitorState, MonitorTarget } from '@/types/config' -import { Accordion, Card, Center, Text } from '@mantine/core' -import MonitorDetail from './MonitorDetail' +import { useState } from 'react' +import { MaintenanceConfig, MonitorState, MonitorTarget } from '@/types/config' import { pageConfig } from '@/uptime.config' -import { useEffect, useState } from 'react' -import { useTranslation } from 'react-i18next' +import { formatPercent, monitorStatus, uptimePercent } from '@/util/status' +import { StatusPill } from './brand' +import UptimeBars from './UptimeBars' +import LatencyChart from './LatencyChart' -function countDownCount(state: MonitorState, ids: string[]) { - let downCount = 0 - for (let id of ids) { - if (state.incident[id] === undefined || state.incident[id].length === 0) { - continue - } +function MonitorRow({ + monitor, + state, + maintenances, +}: { + monitor: MonitorTarget + state: MonitorState + maintenances: MaintenanceConfig[] +}) { + const [open, setOpen] = useState(false) + const status = monitorStatus(state, maintenances, monitor.id) + const uptime = uptimePercent(state, monitor.id) + const hasLatency = !monitor.hideLatencyChart && (state.latency[monitor.id]?.length ?? 0) > 0 + const chartId = `chart-${monitor.id}` - if (state.incident[id].slice(-1)[0].end === null) { - downCount++ - } - } - return downCount -} - -function getStatusTextColor(state: MonitorState, ids: string[]) { - let downCount = countDownCount(state, ids) - if (downCount === 0) { - return '#059669' - } else if (downCount === ids.length) { - return '#df484a' - } else { - return '#f29030' - } + return ( +
  • +
    +
    +

    + {monitor.statusPageLink ? {monitor.name} : monitor.name} +

    + {monitor.tooltip &&

    {monitor.tooltip}

    } +
    +
    + {uptime !== null && ( + + {formatPercent(uptime)} uptime + + )} + +
    +
    + {state.incident[monitor.id] ? ( + + ) : ( +

    No checks have run for this service yet.

    + )} + {hasLatency && ( + <> + + {open && ( +
    + +
    + )} + + )} +
  • + ) } export default function MonitorList({ monitors, state, + maintenances, }: { monitors: MonitorTarget[] state: MonitorState + maintenances: MaintenanceConfig[] }) { - const { t } = useTranslation('common') const group = pageConfig.group - const groupedMonitor = group && Object.keys(group).length > 0 - let content - - // Load expanded groups from localStorage - const savedExpandedGroups = localStorage.getItem('expandedGroups') - const expandedInitial = savedExpandedGroups - ? JSON.parse(savedExpandedGroups) - : Object.keys(group || {}) - const [expandedGroups, setExpandedGroups] = useState(expandedInitial) - useEffect(() => { - localStorage.setItem('expandedGroups', JSON.stringify(expandedGroups)) - }, [expandedGroups]) - - if (groupedMonitor) { - // Grouped monitors - content = ( - setExpandedGroups(values)} - > - {Object.keys(group).map((groupName) => ( - - -
    -
    {groupName}
    - - {group[groupName].length - countDownCount(state, group[groupName])}/ - {group[groupName].length} {t('Operational')} - -
    -
    - - {monitors - .filter((monitor) => group[groupName].includes(monitor.id)) - .sort((a, b) => group[groupName].indexOf(a.id) - group[groupName].indexOf(b.id)) - .map((monitor) => ( -
    - - - -
    - ))} -
    -
    - ))} -
    - ) - } else { - // Ungrouped monitors - content = monitors.map((monitor) => ( -
    - - - -
    - )) - } + const groups: [string, MonitorTarget[]][] = + group && Object.keys(group).length > 0 + ? Object.entries(group).map(([name, ids]) => [ + name, + ids.map((id) => monitors.find((m) => m.id === id)).filter(Boolean) as MonitorTarget[], + ]) + : [['Services', monitors]] return ( -
    - - {content} - -
    +
    + {groups.map(([name, list]) => { + const ok = list.filter((m) => monitorStatus(state, maintenances, m.id) === 'operational').length + return ( +
    +
    +

    + {name} +

    + + {ok} of {list.length} operational + +
    +
      + {list.map((m) => ( + + ))} +
    +
    + ) + })} +
    ) } diff --git a/components/NoIncidents.tsx b/components/NoIncidents.tsx deleted file mode 100644 index 865281b..0000000 --- a/components/NoIncidents.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Alert, Text } from '@mantine/core' -import { IconInfoCircle } from '@tabler/icons-react' -import { useTranslation } from 'react-i18next' - -export default function NoIncidentsAlert({ style }: { style?: React.CSSProperties }) { - const { t } = useTranslation('common') - return ( - } - title={ - - {t('No incidents in this month')} - - } - color="gray" - withCloseButton={false} - style={{ - position: 'relative', - margin: '16px auto 0 auto', - ...style, - }} - > - {t('There are no incidents for this month')} - - ) -} diff --git a/components/Notice.tsx b/components/Notice.tsx new file mode 100644 index 0000000..7db9a43 --- /dev/null +++ b/components/Notice.tsx @@ -0,0 +1,35 @@ +import { MaintenanceConfig, MonitorTarget } from '@/types/config' +import { formatDateTime, noticeTone } from '@/util/status' +import { Banner } from './brand' + +function when(n: MaintenanceConfig) { + const now = new Date() + const start = formatDateTime(n.start) + const end = n.end ? formatDateTime(n.end) : null + if (new Date(n.start) > now) return end ? `Planned for ${start} to ${end}` : `Planned for ${start}` + if (!n.end || new Date(n.end) > now) return end ? `Since ${start}, expected to end ${end}` : `Since ${start}` + return `${start} to ${end}` +} + +// A posted notice (incident update or maintenance) from `maintenances` in uptime.config.ts. +export default function Notice({ + notice, + monitors, + upcoming = false, +}: { + notice: MaintenanceConfig + monitors: MonitorTarget[] + upcoming?: boolean +}) { + const affected = (notice.monitors || []).map( + (id) => monitors.find((m) => m.id === id)?.name ?? id + ) + const tone = upcoming ? 'info' : noticeTone(notice.color) + return ( + +

    {when(notice)}

    +

    {notice.body}

    + {affected.length > 0 &&

    Affects: {affected.join(', ')}

    } +
    + ) +} diff --git a/components/OverallStatus.tsx b/components/OverallStatus.tsx index 40f57c7..11fe330 100644 --- a/components/OverallStatus.tsx +++ b/components/OverallStatus.tsx @@ -1,137 +1,101 @@ -import { MaintenanceConfig, MonitorTarget } from '@/types/config' -import { Center, Container, Title, Collapse, Button, Box } from '@mantine/core' -import { IconCircleCheck, IconAlertCircle, IconPlus, IconMinus } from '@tabler/icons-react' import { useEffect, useState } from 'react' -import MaintenanceAlert from './MaintenanceAlert' -import { pageConfig } from '@/uptime.config' -import { useTranslation } from 'react-i18next' +import { MaintenanceConfig, MonitorState, MonitorTarget } from '@/types/config' +import { activeNotices, overallSummary, upcomingNotices } from '@/util/status' +import { PodRow, StatusIcon } from './brand' +import Notice from './Notice' -function useWindowVisibility() { - const [isVisible, setIsVisible] = useState(true) +function useNow() { + const [now, setNow] = useState(() => Math.round(Date.now() / 1000)) useEffect(() => { - const handleVisibilityChange = () => setIsVisible(document.visibilityState === 'visible') - document.addEventListener('visibilitychange', handleVisibilityChange) - return () => document.removeEventListener('visibilitychange', handleVisibilityChange) + const t = setInterval(() => { + if (document.visibilityState === 'visible') setNow(Math.round(Date.now() / 1000)) + }, 1000) + return () => clearInterval(t) }, []) - return isVisible + return now +} + +function ago(seconds: number) { + if (seconds < 5) return 'just now' + if (seconds < 90) return `${seconds} seconds ago` + return `${Math.round(seconds / 60)} minutes ago` } export default function OverallStatus({ state, - maintenances, monitors, + maintenances, }: { - state: { overallUp: number; overallDown: number; lastUpdate: number } - maintenances: MaintenanceConfig[] + state: MonitorState monitors: MonitorTarget[] + maintenances: MaintenanceConfig[] }) { - const { t } = useTranslation('common') - let group = pageConfig.group - let groupedMonitor = (group && Object.keys(group).length > 0) || false - - let statusString = '' - let icon = - if (state.overallUp === 0 && state.overallDown === 0) { - statusString = t('No data yet') - } else if (state.overallUp === 0) { - statusString = t('All systems not operational') - } else if (state.overallDown === 0) { - statusString = t('All systems operational') - icon = - } else { - statusString = t('Some systems not operational', { - down: state.overallDown, - total: state.overallUp + state.overallDown, - }) - } - - const [openTime] = useState(Math.round(Date.now() / 1000)) - const [currentTime, setCurrentTime] = useState(Math.round(Date.now() / 1000)) - const isWindowVisible = useWindowVisibility() - const [expandUpcoming, setExpandUpcoming] = useState(false) + const now = useNow() + const [openedAt] = useState(now) + const [showUpcoming, setShowUpcoming] = useState(false) + // Reload when the data is more than five minutes old (the worker writes every minute). useEffect(() => { - const interval = setInterval(() => { - if (!isWindowVisible) return - if (currentTime - state.lastUpdate > 300 && currentTime - openTime > 30) { - window.location.reload() - } - setCurrentTime(Math.round(Date.now() / 1000)) - }, 1000) - return () => clearInterval(interval) - }) + if (state.lastUpdate > 0 && now - state.lastUpdate > 300 && now - openedAt > 30) { + window.location.reload() + } + }, [now, state.lastUpdate, openedAt]) - const now = new Date() - - const activeMaintenances: (Omit & { - monitors?: MonitorTarget[] - })[] = maintenances - .filter((m) => now >= new Date(m.start) && (!m.end || now <= new Date(m.end))) - .map((maintenance) => ({ - ...maintenance, - monitors: maintenance.monitors?.map( - (monitorId) => monitors.find((mon) => monitorId === mon.id)! - ), - })) - - const upcomingMaintenances: (Omit & { - monitors?: (MonitorTarget | undefined)[] - })[] = maintenances - .filter((m) => now < new Date(m.start)) - .map((maintenance) => ({ - ...maintenance, - monitors: maintenance.monitors?.map( - (monitorId) => monitors.find((mon) => monitorId === mon.id)! - ), - })) + const summary = overallSummary(state, monitors, maintenances) + const active = activeNotices(maintenances) + const upcoming = upcomingNotices(maintenances) + const shape = summary.tone === 'success' ? 'dot' : summary.tone === 'neutral' ? 'ring' : summary.title.startsWith('Maintenance') ? 'spin' : 'tri' return ( - -
    {icon}
    - - {statusString} - - - {t('Last updated on', { - date: new Date(state.lastUpdate * 1000).toLocaleString(), - seconds: currentTime - state.lastUpdate, - })} - - - {/* Upcoming Maintenance */} - {upcomingMaintenances.length > 0 && ( - <> - - {t('upcoming maintenance', { count: upcomingMaintenances.length })}{' '} - <span - style={{ textDecoration: 'underline', cursor: 'pointer' }} - onClick={() => setExpandUpcoming(!expandUpcoming)} - > - {expandUpcoming ? t('Hide') : t('Show')} + <section className="st-hero" aria-labelledby="st-summary"> + <PodRow count={5} size={28} /> + <h1 id="st-summary" className="ct-h1 st-hero__title"> + <span className={`st-hero__icon st-tone--${summary.tone}`}> + <StatusIcon shape={shape} /> + </span> + {summary.title} + </h1> + <p className="st-hero__lede"> + {state.lastUpdate > 0 ? ( + <> + Last checked {ago(now - state.lastUpdate)} + <span className="st-hero__sep" aria-hidden> + · </span> - + checks run every minute + + ) : ( + 'The first checks run within a minute of deploying.' + )} +

    - - {upcomingMaintenances.map((maintenance, idx) => ( - - ))} - - + {active.length > 0 && ( +
    + {active.map((n, i) => ( + + ))} +
    )} - {/* Active Maintenance */} - {activeMaintenances.map((maintenance, idx) => ( - - ))} -
    + {upcoming.length > 0 && ( +
    + + {showUpcoming && ( +
    + {upcoming.map((n, i) => ( + + ))} +
    + )} +
    + )} + ) } diff --git a/components/UptimeBars.tsx b/components/UptimeBars.tsx new file mode 100644 index 0000000..9fac052 --- /dev/null +++ b/components/UptimeBars.tsx @@ -0,0 +1,105 @@ +import { useRef, useState } from 'react' +import { MonitorState, MonitorTarget } from '@/types/config' +import { Day, DAYS, dailyHistory, dayTone, formatDate, formatDuration, formatPercent, formatTime } from '@/util/status' + +// 90 daily bars. Each bar is a button: hover or focus shows the day, and arrow keys move +// between days, so the history isn't colour-only or mouse-only. +export default function UptimeBars({ monitor, state }: { monitor: MonitorTarget; state: MonitorState }) { + const days = dailyHistory(state, monitor.id) + const [active, setActive] = useState<{ i: number; side: React.CSSProperties } | null>(null) + const refs = useRef<(HTMLButtonElement | null)[]>([]) + const badDays = days.filter((d) => d.downSeconds > 0).length + + // anchor the card to the bar, opening away from the nearer edge + const show = (i: number, el: HTMLElement) => { + const row = el.parentElement!.getBoundingClientRect() + const bar = el.getBoundingClientRect() + const x = bar.left - row.left + setActive({ i, side: x < row.width / 2 ? { left: x } : { right: row.right - bar.right } }) + } + + const move = (i: number) => { + const j = Math.max(0, Math.min(DAYS - 1, i)) + const el = refs.current[j] + // on phones the oldest 60 bars are hidden: don't move focus onto them + if (el && el.offsetParent !== null) el.focus() + } + + return ( +
    +
    setActive(null)} + > + {days.map((d, i) => ( +
    +
    + {DAYS} days ago + 30 days ago + Today +
    +
    + ) +} + +function dayLabel(d: Day) { + const date = formatDate(d.start, true) + if (d.percent === null) return `${date}: not monitored yet` + if (d.downSeconds === 0) return `${date}: no downtime` + return `${date}: down for ${formatDuration(d.downSeconds)}, ${formatPercent(d.percent)} up` +} + +function DayCard({ day, side }: { day: Day; side: React.CSSProperties }) { + return ( +
    +

    {formatDate(day.start, true)}

    + {day.percent === null ? ( +

    Not monitored yet

    + ) : day.downSeconds === 0 ? ( +

    No downtime

    + ) : ( + <> +

    + Down for {formatDuration(day.downSeconds)} · {formatPercent(day.percent)} up +

    +
      + {day.events.slice(0, 4).map((ev, i) => ( +
    • + + {formatTime(ev.from)}–{formatTime(ev.to)} + {' '} + {ev.error} +
    • + ))} + {day.events.length > 4 &&
    • and {day.events.length - 4} more
    • } +
    + + )} +
    + ) +} diff --git a/components/brand.tsx b/components/brand.tsx new file mode 100644 index 0000000..6366579 --- /dev/null +++ b/components/brand.tsx @@ -0,0 +1,203 @@ +// Cottage brand components, ported from the brand handbook's components/bundle.js so they match +// the app exactly. Styles: styles/brand/bundle.css (copied verbatim from Hearth). +import type { ReactNode } from 'react' + +const cx = (...c: (string | false | null | undefined)[]) => c.filter(Boolean).join(' ') + +function Mark({ size, mono }: { size: number; mono?: boolean }) { + const cls = cx('ct-logo__mark', mono && 'ct-logo__mark--mono') + if (size <= 24) { + return ( + + + + + + + ) + } + return ( + + + + + + + + ) +} + +export function Logo({ + variant = 'lockup', + size = 32, + label = 'Cottage', +}: { + variant?: 'lockup' | 'mark' | 'mono' + size?: number + label?: string +}) { + if (variant !== 'lockup') { + return ( + + + + ) + } + return ( + + + + cottage + + + ) +} + +export function PodRow({ + count = 5, + lit, + size = 32, + roof = false, + empty = false, +}: { + count?: number + lit?: number + size?: number + roof?: boolean + empty?: boolean +}) { + const litIdx = lit == null ? Math.floor(count / 2) : lit + const W = count * 20 - 6 + const pad = 4 + const rise = roof ? Math.min(0.75 * (W / 2 - 3), 18) : 0 + const podTop = roof ? 9 + rise + 8 : pad + const vbW = W + pad * 2 + const vbH = podTop + 17 + pad + const eave = podTop - 9 + return ( + + {roof && ( + + )} + {Array.from({ length: count }, (_, i) => { + const state = i === litIdx ? 'lit' : empty ? 'empty' : 'full' + const e = state === 'empty' + return ( + + ) + })} + + ) +} + +export type Shape = 'dot' | 'ring' | 'spin' | 'pause' | 'tri' + +export function StatusIcon({ shape }: { shape: Shape }) { + if (shape === 'dot') + return ( + + + + ) + if (shape === 'ring') + return ( + + + + ) + if (shape === 'spin') + return ( + + + + ) + if (shape === 'pause') + return ( + + + + + ) + return ( + + + + + + ) +} + +const STATUS = { + operational: { label: 'Operational', tone: 'success', shape: 'dot' }, + degraded: { label: 'Degraded', tone: 'warning', shape: 'tri' }, + maintenance: { label: 'Maintenance', tone: 'warning', shape: 'spin' }, + outage: { label: 'Outage', tone: 'danger', shape: 'tri' }, + unknown: { label: 'No data', tone: 'neutral', shape: 'ring' }, +} as const + +export function StatusPill({ status }: { status: keyof typeof STATUS }) { + const s = STATUS[status] + return ( + + + {s.label} + + ) +} + +const BANNER_ICON = { + info: 'M10 2.5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Zm0 6.5v5M10 6.5v.5', + success: 'M10 2.5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15ZM6.8 10.2l2.2 2.2 4.2-4.6', + warning: 'M10 3 18 16.5H2ZM10 8.2v3.6M10 14v.3', + danger: 'M10 2.5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15ZM7.3 7.3l5.4 5.4M12.7 7.3l-5.4 5.4', +} + +export function Banner({ + tone = 'info', + title, + children, + aside, +}: { + tone?: keyof typeof BANNER_ICON + title?: ReactNode + children?: ReactNode + aside?: ReactNode +}) { + return ( +
    + + + +
    + {title &&

    {title}

    } + {children &&
    {children}
    } +
    + {aside &&
    {aside}
    } +
    + ) +} + +export function EmptyState({ title, children }: { title: string; children?: ReactNode }) { + return ( +
    + +

    {title}

    + {children &&

    {children}

    } +
    + ) +} diff --git a/dev/sample.ts b/dev/sample.ts new file mode 100644 index 0000000..bec5e75 --- /dev/null +++ b/dev/sample.ts @@ -0,0 +1,118 @@ +// Sample data for `npm run dev`, which has no D1 database. Never used in production. +// / normal: 120 days of history with a few past incidents +// /?sample=outage one service down now, plus an incident notice +// /?sample=maintenance maintenance in progress and one planned +// /?sample=empty before the first check +import type { MaintenanceConfig, MonitorStateCompacted, MonitorTarget } from '@/types/config' + +const hex = (arr: Uint16Array | Uint32Array) => + Array.from(new Uint8Array(arr.buffer), (b) => b.toString(16).padStart(2, '0')).join('') + +// Deterministic noise so the preview looks the same on every reload. +function rng(seed: number) { + return () => { + seed = (seed * 1664525 + 1013904223) % 4294967296 + return seed / 4294967296 + } +} + +export function sampleState(monitors: MonitorTarget[], scenario = ''): string | null { + if (scenario === 'empty') return null + const now = Math.round(Date.now() / 1000) + const day = 86400 + const data: MonitorStateCompacted = { lastUpdate: now - 23, overallUp: 0, overallDown: 0, incident: {}, latency: {} } + + // past incidents: [monitor index, days ago, minutes, error] + const past: [number, number, number, string][] = [ + [0, 63, 4, 'HTTP 522 from Cloudflare'], + [1, 40, 7, 'Timed out after 10 seconds'], + [1, 12, 18, 'HTTP 503: Service Unavailable'], + [2, 12, 18, 'HTTP 503: Service Unavailable'], + [2, 3, 2, 'Timed out after 10 seconds'], + ] + + monitors.forEach((m, idx) => { + const start: number[][] = [[now - 120 * day]] + const end: (number | null)[] = [now - 120 * day] + const error: string[][] = [['dummy']] + for (const [i, ago, mins, err] of past) { + if (i !== idx) continue + const s = now - ago * day + 3600 * 14 + start.push([s]) + end.push(s + mins * 60) + error.push([err]) + } + const down = scenario === 'outage' && idx === monitors.length - 1 + if (down) { + start.push([now - 11 * 60, now - 4 * 60]) + end.push(null) + error.push(['HTTP 502: Bad Gateway', 'Timed out after 10 seconds']) + } + down ? data.overallDown++ : data.overallUp++ + data.incident[m.id] = { start, end, error } + + // latency every 5 minutes for 12 hours + const r = rng(idx + 7) + const times: number[] = [] + const pings: number[] = [] + for (let t = now - 12 * 3600; t <= now; t += 300) { + times.push(t) + pings.push(Math.round(90 + idx * 35 + r() * 40 + (r() > 0.96 ? 180 : 0))) + } + data.latency[m.id] = { + time: hex(new Uint32Array(times)), + ping: hex(new Uint16Array(pings)), + loc: { v: ['IAD'], c: [times.length] }, + } + }) + return JSON.stringify(data) +} + +export function sampleNotices(scenario = ''): MaintenanceConfig[] { + const at = (days: number, hour = 14) => { + const d = new Date() + d.setDate(d.getDate() + days) + d.setHours(hour, 0, 0, 0) + return d.toISOString() + } + const notices: MaintenanceConfig[] = [ + { + title: 'Apps in US East were slow for 18 minutes', + body: 'A storage update on one server made some apps slow to respond. We rolled it back and every app recovered without data loss.', + monitors: ['dashboard', 'apps-us-east'], + start: at(-12), + end: at(-12, 15), + color: 'green', + }, + ] + if (scenario === 'outage') { + notices.push({ + title: 'Some apps in US East aren’t loading', + body: 'We’re looking into it now. Your data is safe. Next update within 30 minutes.', + monitors: ['apps-us-east'], + start: new Date(Date.now() - 6 * 60 * 1000).toISOString(), + color: 'red', + }) + } + if (scenario === 'maintenance') { + notices.push( + { + title: 'Dashboard maintenance', + body: 'We’re moving the dashboard to a new database server. Your apps keep running; you can’t sign in for about 20 minutes.', + monitors: ['dashboard'], + start: new Date(Date.now() - 5 * 60 * 1000).toISOString(), + end: new Date(Date.now() + 15 * 60 * 1000).toISOString(), + color: 'blue', + }, + { + title: 'Server updates in US East', + body: 'Each app restarts once, for under a minute, during this window.', + monitors: ['apps-us-east'], + start: at(4, 6), + end: at(4, 7), + color: 'blue', + } + ) + } + return notices +} diff --git a/docs/desktop.png b/docs/desktop.png deleted file mode 100644 index e50865c..0000000 Binary files a/docs/desktop.png and /dev/null differ diff --git a/locales/de-DE/common.json b/locales/de-DE/common.json deleted file mode 100644 index 9686989..0000000 --- a/locales/de-DE/common.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Incidents": "Vorfälle", - "No data yet": "Noch keine Daten", - "All systems not operational": "Nicht alle Systeme funktionsfähig", - "All systems operational": "Alle Systeme funktionsfähig", - "Some systems not operational": "Manche Systeme sind nicht funktionsfähig ({{down}} von {{total}})", - "Last updated on": "Letzte Aktualisierung: {{date}} (vor {{seconds}} Sekunden)", - "upcoming maintenance": "{{count}} anstehende Wartung", - "upcoming maintenance_plural": "{{count}} anstehende Wartungen", - "Hide": "[verstecken]", - "Show": "[zeigen]", - "Operational": "Funktionsfähig", - "No data available": "Keine Daten verfügbar, stelle sicher dass der Worker mit der letzten Config-Version deployed wurde und prüfe den Worker-Status!", - "Overall": "Gesamt: {{percent}}%", - "No Data": "Keine Daten", - "percent at date": "{{percent}}% am {{date}}", - "Down for": "Ausfall für {{duration}} (Klick für Details)", - "incidents at": "🚨 {{name}} Vorfall am {{date}}", - "Response times": "Antwortzeiten (ms)", - "Upcoming": "[Geplant] ", - "Scheduled Maintenance": "Geplante Wartung", - "Scheduled for": "Geplant für:", - "From": "Von:", - "Expected end": "Voraussichtliches Ende:", - "To": "Bis:", - "Until further notice": "Bis auf Weiteres", - "Affected components": "Betroffene Komponenten:", - "MONITOR ID NOT FOUND": "[ERR: MONITOR ID NICHT GEFUNDEN]", - "No incidents in this month": "Keine Vorfälle diesen Monat", - "There are no incidents for this month": "Es gibt keine Vorfälle diesen Monat.", - "Monitor not found": "Monitor mit ID {{id}} nicht gefunden!", - "Monitor State not defined": "Monitor-Status ist nicht definiert. Prüfe den Worker-Status und das Binding!", - "All": "Alle", - "Select monitor": "Auswählen", - "Backwards": "← Zurück", - "Forward": "Vorwärts →" -} diff --git a/locales/en/common.json b/locales/en/common.json deleted file mode 100644 index 6484ce0..0000000 --- a/locales/en/common.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Incidents": "Incidents", - "No data yet": "No data yet", - "All systems not operational": "All systems not operational", - "All systems operational": "All systems operational", - "Some systems not operational": "Some systems not operational ({{down}} out of {{total}})", - "Last updated on": "Last updated on: {{date}} ({{seconds}} sec ago)", - "upcoming maintenance": "{{count}} upcoming maintenance", - "upcoming maintenance_plural": "{{count}} upcoming maintenances", - "Hide": "[Hide]", - "Show": "[Show]", - "Operational": "Operational", - "No data available": "No data available, please make sure you have deployed your workers with latest config and check your worker status!", - "Overall": "Overall: {{percent}}%", - "No Data": "No Data", - "percent at date": "{{percent}}% at {{date}}", - "Down for": "Down for {{duration}} (click for detail)", - "incidents at": "🚨 {{name}} incidents at {{date}}", - "Response times": "Response times(ms)", - "Upcoming": "[Upcoming] ", - "Scheduled Maintenance": "Scheduled Maintenance", - "Scheduled for": "Scheduled for:", - "From": "From:", - "Expected end": "Expected end:", - "To": "To:", - "Until further notice": "Until further notice", - "Affected components": "Affected components:", - "MONITOR ID NOT FOUND": "[ERR: MONITOR ID NOT FOUND]", - "No incidents in this month": "No incidents in this month", - "There are no incidents for this month": "There are no incidents for this month.", - "Monitor not found": "Monitor with id {{id}} not found!", - "Monitor State not defined": "Monitor State is not defined now, please check your worker's status and binding!", - "All": "All", - "Select monitor": "Select monitor", - "Backwards": "← Backwards", - "Forward": "Forward →" -} diff --git a/locales/fr-FR/common.json b/locales/fr-FR/common.json deleted file mode 100644 index e28074b..0000000 --- a/locales/fr-FR/common.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Incidents": "Incidents", - "No data yet": "Aucune donnée pour le moment", - "All systems not operational": "Aucun système n'est opérationnel", - "All systems operational": "Tous les systèmes sont opérationnels", - "Some systems not operational": "Certains systèmes ne fonctionnent pas ({{down}} sur {{total}})", - "Last updated on": "Dernière actualisation : {{date}} (il y a {{seconds}} secondes)", - "upcoming maintenance": "{{count}} maintenance à venir", - "upcoming maintenance_plural": "{{count}} maintenances à venir", - "Hide": "[Masquer]", - "Show": "[Afficher]", - "Operational": "Opérationnel", - "No data available": "Aucune donnée disponible. Veuillez vous assurer d'avoir déployé vos workers avec la dernière configuration et vérifiez leur statut !", - "Overall": "Moyenne : {{percent}}%", - "No Data": "Aucune donnée", - "percent at date": "{{percent}}% le {{date}}", - "Down for": "Interruption de {{duration}} (cliquez pour plus de détails)", - "incidents at": "🚨 Incidents sur {{name}} le {{date}}", - "Response times": "Temps de réponse (ms)", - "Upcoming": "[À venir] ", - "Scheduled Maintenance": "Maintenance planifiée", - "Scheduled for": "Planifiée pour :", - "From": "De :", - "Expected end": "Fin prévue :", - "To": "À :", - "Until further notice": "Jusqu'à nouvel ordre", - "Affected components": "Composants affectés :", - "MONITOR ID NOT FOUND": "[ERR : ID DU MONITEUR INTROUVABLE]", - "No incidents in this month": "Aucun incident ce mois-ci", - "There are no incidents for this month": "Il n'y a aucun incident pour ce mois-ci.", - "Monitor not found": "Le moniteur avec l'ID {{id}} est introuvable !", - "Monitor State not defined": "L'état du moniteur n'est pas défini actuellement, veuillez vérifier le statut de votre worker et sa liaison !", - "All": "Tous", - "Select monitor": "Sélectionner un moniteur", - "Backwards": "← Précédent", - "Forward": "Suivant →" -} \ No newline at end of file diff --git a/locales/zh-CN/common.json b/locales/zh-CN/common.json deleted file mode 100644 index 52866f5..0000000 --- a/locales/zh-CN/common.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Incidents": "历史故障", - "No data yet": "暂无数据", - "All systems not operational": "系统均离线", - "All systems operational": "系统一切正常", - "Some systems not operational": "部分系统离线 ({{down}} / {{total}})", - "Last updated on": "最后更新于: {{date}} ({{seconds}} 秒前)", - "upcoming maintenance": "{{count}} 个即将进行的维护", - "upcoming maintenance_plural": "{{count}} 个即将进行的维护", - "Hide": "[隐藏]", - "Show": "[显示]", - "Operational": "在线", - "No data available": "暂无数据,请确保您已使用最新配置部署了 Worker 并检查 Worker 状态!", - "Overall": "总可用率: {{percent}}%", - "No Data": "暂无数据", - "percent at date": "{{percent}}% 于 {{date}}", - "Down for": "故障持续 {{duration}} (点击查看详情)", - "incidents at": "🚨 {{name}} 于 {{date}} 不可用", - "Response times": "响应时间(ms)", - "Upcoming": "[即将开始] ", - "Scheduled Maintenance": "计划维护", - "Scheduled for": "计划开始:", - "From": "开始:", - "Expected end": "预计结束:", - "To": "结束:", - "Until further notice": "直到另行通知", - "Affected components": "受影响组件:", - "MONITOR ID NOT FOUND": "[错误: 未找到监控 ID]", - "No incidents in this month": "本月无故障", - "There are no incidents for this month": "本月没有发生任何故障。", - "Monitor not found": "未找到 ID 为 {{id}} 的监控!", - "Monitor State not defined": "监控状态未定义,请检查您的 Worker 状态和绑定!", - "All": "全部", - "Select monitor": "选择监控", - "Backwards": "← 上一月", - "Forward": "下一月 →" -} diff --git a/locales/zh-TW/common.json b/locales/zh-TW/common.json deleted file mode 100644 index e787bf4..0000000 --- a/locales/zh-TW/common.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Incidents": "歷來事件", - "No data yet": "沒有資料", - "All systems not operational": "所有服務都已停止運作", - "All systems operational": "所有服務皆正常運作", - "Some systems not operational": "部分服務停止運作 ({{down}} / {{total}})", - "Last updated on": "最後更新於:{{date}}({{seconds}} 秒前)", - "upcoming maintenance": "{{count}} 個即將要進行的維護", - "upcoming maintenance_plural": "{{count}} 個即將要進行的維護", - "Hide": "[隱藏]", - "Show": "[顯示]", - "Operational": "運行中", - "No data available": "沒有資料,請確保已部署最新設定的 Worker 並檢查 Worker 狀態!", - "Overall": "總運行率:{{percent}}%", - "No Data": "沒有資料", - "percent at date": "{{percent}}% 於 {{date}}", - "Down for": "事件持續 {{duration}}(點擊查看詳情)", - "incidents at": "🚨 {{name}} 於 {{date}} 停運", - "Response times": "回應時間(毫秒)", - "Upcoming": "[即將開始] ", - "Scheduled Maintenance": "預定維護", - "Scheduled for": "預定開始:", - "From": "開始:", - "Expected end": "預計結束:", - "To": "結束:", - "Until further notice": "即日起持續生效", - "Affected components": "受影響的部份:", - "MONITOR ID NOT FOUND": "[錯誤:找不到站點 ID]", - "No incidents in this month": "本月無事件", - "There are no incidents for this month": "本月沒有任何事件發生。", - "Monitor not found": "找不到 ID 為 {{id}} 的站點!", - "Monitor State not defined": "站點狀態未定義,請檢查您的 Worker 狀態與 KV 綁定!", - "All": "全部", - "Select monitor": "選取站點", - "Backwards": "← 上個月", - "Forward": "下個月 →" -} diff --git a/package-lock.json b/package-lock.json index 155c6c5..6a88d43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,30 +1,19 @@ { - "name": "uptimeflare", + "name": "cottage-status", "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "uptimeflare", + "name": "cottage-status", "version": "0.1.0", "dependencies": { "@cloudflare/workers-types": "^4.20250410.0", - "@mantine/core": "^7.1.3", - "@mantine/ds": "^7.1.3", - "@mantine/hooks": "^7.1.3", - "@tabler/icons-react": "^2.39.0", - "@types/moment-precise-range-plugin": "^0.2.2", "chart.js": "^4.4.0", - "chartjs-adapter-moment": "^1.0.1", - "i18next": "^25.7.3", - "i18next-browser-languagedetector": "^8.2.0", - "moment": "^2.29.4", - "moment-precise-range-plugin": "^1.3.0", "next": "^14.2.28", "react": "^18.3.1", "react-chartjs-2": "^5.2.0", - "react-dom": "^18.3.1", - "react-i18next": "^16.5.0" + "react-dom": "^18.3.1" }, "devDependencies": { "@cloudflare/next-on-pages": "^1.13.12", @@ -33,9 +22,6 @@ "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "^14.2.28", - "postcss": "^8.4.31", - "postcss-preset-mantine": "^1.8.0", - "postcss-simple-vars": "^7.0.1", "prettier": "3.0.3", "typescript": "^5", "wrangler": "^4.54.0" @@ -54,6 +40,7 @@ "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -869,54 +856,6 @@ "node": ">=14" } }, - "node_modules/@floating-ui/core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", - "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==", - "dependencies": { - "@floating-ui/utils": "^0.1.3" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", - "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", - "dependencies": { - "@floating-ui/core": "^1.4.2", - "@floating-ui/utils": "^0.1.3" - } - }, - "node_modules/@floating-ui/react": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.24.8.tgz", - "integrity": "sha512-AuYeDoaR8jtUlUXtZ1IJ/6jtBkGnSpJXbGNzokBL87VDJ8opMq1Bgrc0szhK482ReQY6KZsMoZCVSb4xwalkBA==", - "dependencies": { - "@floating-ui/react-dom": "^2.0.1", - "aria-hidden": "^1.2.3", - "tabbable": "^6.0.1" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/react-dom": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.2.tgz", - "integrity": "sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==", - "dependencies": { - "@floating-ui/dom": "^1.5.1" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", - "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" - }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -1454,75 +1393,6 @@ "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" }, - "node_modules/@mantine/code-highlight": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/code-highlight/-/code-highlight-7.1.3.tgz", - "integrity": "sha512-Z+E++yrOcqoKpgf34dw13y6M9K/qtqEnLftKiwwE2RL6C8+0gI8iVYU7Y7yuvFPgntZ1DOnSs+d2OEsxuECoiw==", - "peer": true, - "dependencies": { - "clsx": "2.0.0", - "highlight.js": "^11.7.0" - }, - "peerDependencies": { - "@mantine/core": "7.1.3", - "@mantine/hooks": "7.1.3", - "react": "^18.2.0", - "react-dom": "^18.2.0" - } - }, - "node_modules/@mantine/core": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.1.3.tgz", - "integrity": "sha512-5vLwrMFVlGkd56HDoz5woE7I48XuycoyKaasJj49LTn2MuccHvNJ7c0VPlRlbzK8YQuwV7g1KsBAM8zzJlwqig==", - "dependencies": { - "@floating-ui/react": "^0.24.8", - "clsx": "2.0.0", - "react-number-format": "^5.2.2", - "react-remove-scroll": "^2.5.6", - "react-textarea-autosize": "8.5.3", - "type-fest": "^3.13.1" - }, - "peerDependencies": { - "@mantine/hooks": "7.1.3", - "react": "^18.2.0", - "react-dom": "^18.2.0" - } - }, - "node_modules/@mantine/core/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@mantine/ds": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/ds/-/ds-7.1.3.tgz", - "integrity": "sha512-GTdS4J9XsNG6us56haksC2EcNb0EPkJsGoiBu2MO7zdmmIqQsPtF/DVGzr9XxkTxFmRkgd9qkVvsA9eOqRQEKg==", - "dependencies": { - "clsx": "2.0.0" - }, - "peerDependencies": { - "@mantine/code-highlight": "7.1.3", - "@mantine/core": "7.1.3", - "@mantine/hooks": "7.1.3", - "@tabler/icons-react": "^2.29.0", - "react": "^18.2.0", - "react-dom": "^18.2.0" - } - }, - "node_modules/@mantine/hooks": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.1.3.tgz", - "integrity": "sha512-jCOedyl229vzNEoya9L/PIeT+Btwuoqh09vRbFRNoTdRZgVMTWi4BT08BRWK5iqSa9PlvWtIaSGcCtjqqXKZcA==", - "peerDependencies": { - "react": "^18.2.0" - } - }, "node_modules/@mapbox/node-pre-gyp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-2.0.0.tgz", @@ -2032,31 +1902,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@tabler/icons": { - "version": "2.39.0", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-2.39.0.tgz", - "integrity": "sha512-iK3j2jIEGIUaJcbYYg5iwyG1Y/m4lzUxAUbxRpvgeXCWP29jvZaH5hajZmU3KaSealddHuJg7PSQislPHpCsoQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/codecalm" - } - }, - "node_modules/@tabler/icons-react": { - "version": "2.39.0", - "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-2.39.0.tgz", - "integrity": "sha512-MyUK1jqtmHPZBnDXqIc1Y5OnfoqG+tGaSB1/gcl0mlY462fJ5f3QB0ZIZzAHMAGYb6K2iJSdFIFavhcgpDDZ7Q==", - "dependencies": { - "@tabler/icons": "2.39.0", - "prop-types": "^15.7.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/codecalm" - }, - "peerDependencies": { - "react": "^16.5.1 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -2136,14 +1981,6 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, - "node_modules/@types/moment-precise-range-plugin": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@types/moment-precise-range-plugin/-/moment-precise-range-plugin-0.2.2.tgz", - "integrity": "sha512-Iof7Z9Ej/LbeE2++cap0SaSpDzMen9hT/ced3BwPhyUl5PWAgxR7sDxx4i0hYTOYshaMqH8hjXD0+CVBBYhEpw==", - "dependencies": { - "moment": ">=2.14.0" - } - }, "node_modules/@types/node": { "version": "20.8.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz", @@ -2157,13 +1994,13 @@ "version": "15.7.8", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.8.tgz", "integrity": "sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==", - "devOptional": true + "dev": true }, "node_modules/@types/react": { "version": "18.2.28", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.28.tgz", "integrity": "sha512-ad4aa/RaaJS3hyGz0BGegdnSRXQBkd1CCYDCdNjBPg90UUpLgo+WlJqb9fMYUxtehmzF3PJaTWqRZjko6BRzBg==", - "devOptional": true, + "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -2183,7 +2020,7 @@ "version": "0.16.4", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz", "integrity": "sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==", - "devOptional": true + "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.29.1", @@ -3791,17 +3628,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/aria-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", - "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/aria-query": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", @@ -4126,15 +3952,6 @@ "node": ">=6" } }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001713", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz", @@ -4182,15 +3999,6 @@ "pnpm": ">=7" } }, - "node_modules/chartjs-adapter-moment": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chartjs-adapter-moment/-/chartjs-adapter-moment-1.0.1.tgz", - "integrity": "sha512-Uz+nTX/GxocuqXpGylxK19YG4R3OSVf8326D+HwSTsNw1LgzyIGRo+Qujwro1wy6X+soNSnfj5t2vZ+r6EaDmA==", - "peerDependencies": { - "chart.js": ">=3.0.0", - "moment": "^2.10.2" - } - }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -4254,14 +4062,6 @@ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, - "node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/code-block-writer": { "version": "10.1.1", "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-10.1.1.tgz", @@ -4393,23 +4193,11 @@ "node": ">= 8" } }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/csstype": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", - "devOptional": true + "dev": true }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -4508,11 +4296,6 @@ "node": ">=8" } }, - "node_modules/detect-node-es": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", - "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" - }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -5867,14 +5650,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-nonce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", - "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/get-source": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", @@ -6084,24 +5859,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/highlight.js": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", - "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", - "peer": true, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/html-parse-stringify": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", - "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", - "license": "MIT", - "dependencies": { - "void-elements": "3.1.0" - } - }, "node_modules/http-errors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.4.0.tgz", @@ -6140,46 +5897,6 @@ "node": ">= 14" } }, - "node_modules/i18next": { - "version": "25.7.3", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-25.7.3.tgz", - "integrity": "sha512-2XaT+HpYGuc2uTExq9TVRhLsso+Dxym6PWaKpn36wfBmTI779OQ7iP/XaZHzrnGyzU4SHpFrTYLKfVyBfAhVNA==", - "funding": [ - { - "type": "individual", - "url": "https://locize.com" - }, - { - "type": "individual", - "url": "https://locize.com/i18next.html" - }, - { - "type": "individual", - "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" - } - ], - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.28.4" - }, - "peerDependencies": { - "typescript": "^5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/i18next-browser-languagedetector": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.2.0.tgz", - "integrity": "sha512-P+3zEKLnOF0qmiesW383vsLdtQVyKtCNA9cjSoKCppTKPQVfKd2W8hbVo5ZhNJKDqeM7BOcvNoKJOjpHh4Js9g==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.2" - } - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -6260,14 +5977,6 @@ "node": ">= 0.4" } }, - "node_modules/invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -7011,22 +6720,6 @@ "node": ">=10" } }, - "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", - "engines": { - "node": "*" - } - }, - "node_modules/moment-precise-range-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/moment-precise-range-plugin/-/moment-precise-range-plugin-1.3.0.tgz", - "integrity": "sha1-YKwHX9/RRon20QKvdR0XGoC0q2A=", - "peerDependencies": { - "moment": ">=2.9.0" - } - }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -7193,6 +6886,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -7595,108 +7289,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "node_modules/postcss-mixins": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/postcss-mixins/-/postcss-mixins-9.0.4.tgz", - "integrity": "sha512-XVq5jwQJDRu5M1XGkdpgASqLk37OqkH4JCFDXl/Dn7janOJjCTEKL+36cnRVy7bMtoBzALfO7bV7nTIsFnUWLA==", - "dev": true, - "dependencies": { - "fast-glob": "^3.2.11", - "postcss-js": "^4.0.0", - "postcss-simple-vars": "^7.0.0", - "sugarss": "^4.0.1" - }, - "engines": { - "node": ">=14.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.11" - }, - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-preset-mantine": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/postcss-preset-mantine/-/postcss-preset-mantine-1.8.0.tgz", - "integrity": "sha512-aLc+EoDXsvnXM2lWWF1MI+lgGqbd5xatVJ3KyTmsheNoXBYN0OFAkRFqyy3tfdveH64Fno2SLNEr4w/njPSInw==", - "dev": true, - "dependencies": { - "postcss-mixins": "^9.0.4", - "postcss-nested": "^6.0.1" - }, - "peerDependencies": { - "postcss": ">=8.0.0" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-simple-vars": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-simple-vars/-/postcss-simple-vars-7.0.1.tgz", - "integrity": "sha512-5GLLXaS8qmzHMOjVxqkk1TZPf1jMqesiI7qLhnlyERalG0sMbHIbJqrcnrpmZdKCLglHnRHoEBB61RtGTsj++A==", - "dev": true, - "engines": { - "node": ">=14.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.1" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -7757,6 +7349,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -7861,132 +7454,11 @@ "react": "^18.3.1" } }, - "node_modules/react-i18next": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-16.5.0.tgz", - "integrity": "sha512-IMpPTyCTKxEj8klCrLKUTIUa8uYTd851+jcu2fJuUB9Agkk9Qq8asw4omyeHVnOXHrLgQJGTm5zTvn8HpaPiqw==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.27.6", - "html-parse-stringify": "^3.0.1", - "use-sync-external-store": "^1.6.0" - }, - "peerDependencies": { - "i18next": ">= 25.6.2", - "react": ">= 16.8.0", - "typescript": "^5" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/react-number-format": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/react-number-format/-/react-number-format-5.3.1.tgz", - "integrity": "sha512-qpYcQLauIeEhCZUZY9jXZnnroOtdy3jYaS1zQ3M1Sr6r/KMOBEIGNIb7eKT19g2N1wbYgFgvDzs19hw5TrB8XQ==", - "dependencies": { - "prop-types": "^15.7.2" - }, - "peerDependencies": { - "react": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/react-remove-scroll": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", - "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", - "dependencies": { - "react-remove-scroll-bar": "^2.3.4", - "react-style-singleton": "^2.2.1", - "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/react-remove-scroll-bar": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz", - "integrity": "sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==", - "dependencies": { - "react-style-singleton": "^2.2.1", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/react-style-singleton": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", - "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", - "dependencies": { - "get-nonce": "^1.0.0", - "invariant": "^2.2.4", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/react-textarea-autosize": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.3.tgz", - "integrity": "sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==", - "dependencies": { - "@babel/runtime": "^7.20.13", - "use-composed-ref": "^1.3.0", - "use-latest": "^1.2.1" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "node_modules/readdirp": { "version": "3.6.0", @@ -8596,22 +8068,6 @@ } } }, - "node_modules/sugarss": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz", - "integrity": "sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==", - "dev": true, - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.3.3" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8636,11 +8092,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tabbable": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", - "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -8887,7 +8338,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "devOptional": true, + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8979,99 +8430,6 @@ "punycode": "^2.1.0" } }, - "node_modules/use-callback-ref": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz", - "integrity": "sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/use-composed-ref": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.3.0.tgz", - "integrity": "sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/use-isomorphic-layout-effect": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", - "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/use-latest": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/use-latest/-/use-latest-1.2.1.tgz", - "integrity": "sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==", - "dependencies": { - "use-isomorphic-layout-effect": "^1.1.1" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/use-sidecar": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", - "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", - "dependencies": { - "detect-node-es": "^1.1.0", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/use-sync-external-store": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", - "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", - "license": "MIT", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "node_modules/uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -9154,15 +8512,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/void-elements": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", - "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/web-vitals": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-0.2.4.tgz", @@ -9811,7 +9160,8 @@ "@babel/runtime": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==" + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "dev": true }, "@cloudflare/kv-asset-handler": { "version": "0.4.1", @@ -10217,46 +9567,6 @@ "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", "dev": true }, - "@floating-ui/core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", - "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==", - "requires": { - "@floating-ui/utils": "^0.1.3" - } - }, - "@floating-ui/dom": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", - "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", - "requires": { - "@floating-ui/core": "^1.4.2", - "@floating-ui/utils": "^0.1.3" - } - }, - "@floating-ui/react": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.24.8.tgz", - "integrity": "sha512-AuYeDoaR8jtUlUXtZ1IJ/6jtBkGnSpJXbGNzokBL87VDJ8opMq1Bgrc0szhK482ReQY6KZsMoZCVSb4xwalkBA==", - "requires": { - "@floating-ui/react-dom": "^2.0.1", - "aria-hidden": "^1.2.3", - "tabbable": "^6.0.1" - } - }, - "@floating-ui/react-dom": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.2.tgz", - "integrity": "sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==", - "requires": { - "@floating-ui/dom": "^1.5.1" - } - }, - "@floating-ui/utils": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", - "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" - }, "@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -10528,50 +9838,6 @@ "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" }, - "@mantine/code-highlight": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/code-highlight/-/code-highlight-7.1.3.tgz", - "integrity": "sha512-Z+E++yrOcqoKpgf34dw13y6M9K/qtqEnLftKiwwE2RL6C8+0gI8iVYU7Y7yuvFPgntZ1DOnSs+d2OEsxuECoiw==", - "peer": true, - "requires": { - "clsx": "2.0.0", - "highlight.js": "^11.7.0" - } - }, - "@mantine/core": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.1.3.tgz", - "integrity": "sha512-5vLwrMFVlGkd56HDoz5woE7I48XuycoyKaasJj49LTn2MuccHvNJ7c0VPlRlbzK8YQuwV7g1KsBAM8zzJlwqig==", - "requires": { - "@floating-ui/react": "^0.24.8", - "clsx": "2.0.0", - "react-number-format": "^5.2.2", - "react-remove-scroll": "^2.5.6", - "react-textarea-autosize": "8.5.3", - "type-fest": "^3.13.1" - }, - "dependencies": { - "type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==" - } - } - }, - "@mantine/ds": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/ds/-/ds-7.1.3.tgz", - "integrity": "sha512-GTdS4J9XsNG6us56haksC2EcNb0EPkJsGoiBu2MO7zdmmIqQsPtF/DVGzr9XxkTxFmRkgd9qkVvsA9eOqRQEKg==", - "requires": { - "clsx": "2.0.0" - } - }, - "@mantine/hooks": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.1.3.tgz", - "integrity": "sha512-jCOedyl229vzNEoya9L/PIeT+Btwuoqh09vRbFRNoTdRZgVMTWi4BT08BRWK5iqSa9PlvWtIaSGcCtjqqXKZcA==", - "requires": {} - }, "@mapbox/node-pre-gyp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-2.0.0.tgz", @@ -10884,20 +10150,6 @@ "tslib": "^2.4.0" } }, - "@tabler/icons": { - "version": "2.39.0", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-2.39.0.tgz", - "integrity": "sha512-iK3j2jIEGIUaJcbYYg5iwyG1Y/m4lzUxAUbxRpvgeXCWP29jvZaH5hajZmU3KaSealddHuJg7PSQislPHpCsoQ==" - }, - "@tabler/icons-react": { - "version": "2.39.0", - "resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-2.39.0.tgz", - "integrity": "sha512-MyUK1jqtmHPZBnDXqIc1Y5OnfoqG+tGaSB1/gcl0mlY462fJ5f3QB0ZIZzAHMAGYb6K2iJSdFIFavhcgpDDZ7Q==", - "requires": { - "@tabler/icons": "2.39.0", - "prop-types": "^15.7.2" - } - }, "@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -10966,14 +10218,6 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, - "@types/moment-precise-range-plugin": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@types/moment-precise-range-plugin/-/moment-precise-range-plugin-0.2.2.tgz", - "integrity": "sha512-Iof7Z9Ej/LbeE2++cap0SaSpDzMen9hT/ced3BwPhyUl5PWAgxR7sDxx4i0hYTOYshaMqH8hjXD0+CVBBYhEpw==", - "requires": { - "moment": ">=2.14.0" - } - }, "@types/node": { "version": "20.8.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz", @@ -10987,13 +10231,13 @@ "version": "15.7.8", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.8.tgz", "integrity": "sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==", - "devOptional": true + "dev": true }, "@types/react": { "version": "18.2.28", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.28.tgz", "integrity": "sha512-ad4aa/RaaJS3hyGz0BGegdnSRXQBkd1CCYDCdNjBPg90UUpLgo+WlJqb9fMYUxtehmzF3PJaTWqRZjko6BRzBg==", - "devOptional": true, + "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -11013,7 +10257,7 @@ "version": "0.16.4", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz", "integrity": "sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==", - "devOptional": true + "dev": true }, "@typescript-eslint/eslint-plugin": { "version": "8.29.1", @@ -11973,14 +11217,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "aria-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", - "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", - "requires": { - "tslib": "^2.0.0" - } - }, "aria-query": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", @@ -12231,12 +11467,6 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true - }, "caniuse-lite": { "version": "1.0.30001713", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz", @@ -12260,12 +11490,6 @@ "@kurkle/color": "^0.3.0" } }, - "chartjs-adapter-moment": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chartjs-adapter-moment/-/chartjs-adapter-moment-1.0.1.tgz", - "integrity": "sha512-Uz+nTX/GxocuqXpGylxK19YG4R3OSVf8326D+HwSTsNw1LgzyIGRo+Qujwro1wy6X+soNSnfj5t2vZ+r6EaDmA==", - "requires": {} - }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -12312,11 +11536,6 @@ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, - "clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==" - }, "code-block-writer": { "version": "10.1.1", "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-10.1.1.tgz", @@ -12416,17 +11635,11 @@ "which": "^2.0.1" } }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true - }, "csstype": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", - "devOptional": true + "dev": true }, "damerau-levenshtein": { "version": "1.0.8", @@ -12496,11 +11709,6 @@ "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", "dev": true }, - "detect-node-es": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", - "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -13443,11 +12651,6 @@ "has-symbols": "^1.0.3" } }, - "get-nonce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", - "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==" - }, "get-source": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", @@ -13592,20 +12795,6 @@ "has-symbols": "^1.0.2" } }, - "highlight.js": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", - "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", - "peer": true - }, - "html-parse-stringify": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", - "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", - "requires": { - "void-elements": "3.1.0" - } - }, "http-errors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.4.0.tgz", @@ -13637,22 +12826,6 @@ "debug": "4" } }, - "i18next": { - "version": "25.7.3", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-25.7.3.tgz", - "integrity": "sha512-2XaT+HpYGuc2uTExq9TVRhLsso+Dxym6PWaKpn36wfBmTI779OQ7iP/XaZHzrnGyzU4SHpFrTYLKfVyBfAhVNA==", - "requires": { - "@babel/runtime": "^7.28.4" - } - }, - "i18next-browser-languagedetector": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.2.0.tgz", - "integrity": "sha512-P+3zEKLnOF0qmiesW383vsLdtQVyKtCNA9cjSoKCppTKPQVfKd2W8hbVo5ZhNJKDqeM7BOcvNoKJOjpHh4Js9g==", - "requires": { - "@babel/runtime": "^7.23.2" - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -13712,14 +12885,6 @@ "side-channel": "^1.0.4" } }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "requires": { - "loose-envify": "^1.0.0" - } - }, "is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -14249,17 +13414,6 @@ "dev": true, "peer": true }, - "moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" - }, - "moment-precise-range-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/moment-precise-range-plugin/-/moment-precise-range-plugin-1.3.0.tgz", - "integrity": "sha1-YKwHX9/RRon20QKvdR0XGoC0q2A=", - "requires": {} - }, "mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -14349,7 +13503,8 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true }, "object-inspect": { "version": "1.12.3", @@ -14643,63 +13798,6 @@ "source-map-js": "^1.0.2" } }, - "postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, - "requires": { - "camelcase-css": "^2.0.1" - } - }, - "postcss-mixins": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/postcss-mixins/-/postcss-mixins-9.0.4.tgz", - "integrity": "sha512-XVq5jwQJDRu5M1XGkdpgASqLk37OqkH4JCFDXl/Dn7janOJjCTEKL+36cnRVy7bMtoBzALfO7bV7nTIsFnUWLA==", - "dev": true, - "requires": { - "fast-glob": "^3.2.11", - "postcss-js": "^4.0.0", - "postcss-simple-vars": "^7.0.0", - "sugarss": "^4.0.1" - } - }, - "postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dev": true, - "requires": { - "postcss-selector-parser": "^6.0.11" - } - }, - "postcss-preset-mantine": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/postcss-preset-mantine/-/postcss-preset-mantine-1.8.0.tgz", - "integrity": "sha512-aLc+EoDXsvnXM2lWWF1MI+lgGqbd5xatVJ3KyTmsheNoXBYN0OFAkRFqyy3tfdveH64Fno2SLNEr4w/njPSInw==", - "dev": true, - "requires": { - "postcss-mixins": "^9.0.4", - "postcss-nested": "^6.0.1" - } - }, - "postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - } - }, - "postcss-simple-vars": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-simple-vars/-/postcss-simple-vars-7.0.1.tgz", - "integrity": "sha512-5GLLXaS8qmzHMOjVxqkk1TZPf1jMqesiI7qLhnlyERalG0sMbHIbJqrcnrpmZdKCLglHnRHoEBB61RtGTsj++A==", - "dev": true, - "requires": {} - }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -14739,6 +13837,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -14809,69 +13908,11 @@ "scheduler": "^0.23.2" } }, - "react-i18next": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-16.5.0.tgz", - "integrity": "sha512-IMpPTyCTKxEj8klCrLKUTIUa8uYTd851+jcu2fJuUB9Agkk9Qq8asw4omyeHVnOXHrLgQJGTm5zTvn8HpaPiqw==", - "requires": { - "@babel/runtime": "^7.27.6", - "html-parse-stringify": "^3.0.1", - "use-sync-external-store": "^1.6.0" - } - }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "react-number-format": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/react-number-format/-/react-number-format-5.3.1.tgz", - "integrity": "sha512-qpYcQLauIeEhCZUZY9jXZnnroOtdy3jYaS1zQ3M1Sr6r/KMOBEIGNIb7eKT19g2N1wbYgFgvDzs19hw5TrB8XQ==", - "requires": { - "prop-types": "^15.7.2" - } - }, - "react-remove-scroll": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", - "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", - "requires": { - "react-remove-scroll-bar": "^2.3.4", - "react-style-singleton": "^2.2.1", - "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" - } - }, - "react-remove-scroll-bar": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz", - "integrity": "sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==", - "requires": { - "react-style-singleton": "^2.2.1", - "tslib": "^2.0.0" - } - }, - "react-style-singleton": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", - "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", - "requires": { - "get-nonce": "^1.0.0", - "invariant": "^2.2.4", - "tslib": "^2.0.0" - } - }, - "react-textarea-autosize": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.3.tgz", - "integrity": "sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==", - "requires": { - "@babel/runtime": "^7.20.13", - "use-composed-ref": "^1.3.0", - "use-latest": "^1.2.1" - } + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "readdirp": { "version": "3.6.0", @@ -15303,13 +14344,6 @@ "client-only": "0.0.1" } }, - "sugarss": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz", - "integrity": "sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==", - "dev": true, - "requires": {} - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -15325,11 +14359,6 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, - "tabbable": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", - "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" - }, "tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -15512,7 +14541,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "devOptional": true + "dev": true }, "uid-promise": { "version": "1.0.0", @@ -15580,55 +14609,6 @@ "punycode": "^2.1.0" } }, - "use-callback-ref": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz", - "integrity": "sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==", - "requires": { - "tslib": "^2.0.0" - } - }, - "use-composed-ref": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.3.0.tgz", - "integrity": "sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==", - "requires": {} - }, - "use-isomorphic-layout-effect": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", - "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", - "requires": {} - }, - "use-latest": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/use-latest/-/use-latest-1.2.1.tgz", - "integrity": "sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==", - "requires": { - "use-isomorphic-layout-effect": "^1.1.1" - } - }, - "use-sidecar": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", - "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", - "requires": { - "detect-node-es": "^1.1.0", - "tslib": "^2.0.0" - } - }, - "use-sync-external-store": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", - "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", - "requires": {} - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -15684,11 +14664,6 @@ } } }, - "void-elements": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", - "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==" - }, "web-vitals": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-0.2.4.tgz", diff --git a/package.json b/package.json index dc9551a..de88a30 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "uptimeflare", + "name": "cottage-status", "version": "0.1.0", "private": true, "scripts": { @@ -11,22 +11,11 @@ }, "dependencies": { "@cloudflare/workers-types": "^4.20250410.0", - "@mantine/core": "^7.1.3", - "@mantine/ds": "^7.1.3", - "@mantine/hooks": "^7.1.3", - "@tabler/icons-react": "^2.39.0", - "@types/moment-precise-range-plugin": "^0.2.2", "chart.js": "^4.4.0", - "chartjs-adapter-moment": "^1.0.1", - "i18next": "^25.7.3", - "i18next-browser-languagedetector": "^8.2.0", - "moment": "^2.29.4", - "moment-precise-range-plugin": "^1.3.0", "next": "^14.2.28", "react": "^18.3.1", "react-chartjs-2": "^5.2.0", - "react-dom": "^18.3.1", - "react-i18next": "^16.5.0" + "react-dom": "^18.3.1" }, "devDependencies": { "@cloudflare/next-on-pages": "^1.13.12", @@ -35,9 +24,6 @@ "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "^14.2.28", - "postcss": "^8.4.31", - "postcss-preset-mantine": "^1.8.0", - "postcss-simple-vars": "^7.0.1", "prettier": "3.0.3", "typescript": "^5", "wrangler": "^4.54.0" diff --git a/pages/_app.tsx b/pages/_app.tsx index 1521da4..c0e9ad6 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,15 +1,14 @@ -import '@mantine/core/styles.css' import type { AppProps } from 'next/app' -import { MantineProvider } from '@mantine/core' import NoSsr from '@/components/NoSsr' -import '@/util/i18n' +import '@/styles/brand/fonts.css' +import '@/styles/brand/tokens.css' +import '@/styles/brand/bundle.css' +import '@/styles/status.css' export default function App({ Component, pageProps }: AppProps) { return ( - - - + ) } diff --git a/pages/_document.tsx b/pages/_document.tsx index 83374be..9d42859 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,11 +1,18 @@ import { Html, Head, Main, NextScript } from 'next/document' -import { ColorSchemeScript } from '@mantine/core' + +// Cottage is light-first; dark ("evening") follows the OS setting. The tokens switch on +// data-theme, set here before first paint so there's no flash. +const themeScript = `(function(){var m=window.matchMedia('(prefers-color-scheme: dark)');function s(){document.documentElement.setAttribute('data-theme',m.matches?'dark':'light')}s();m.addEventListener('change',s)})()` export default function Document() { return ( - + - +