@atelic-action/ui 8.1.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -34
- package/dist/monitoring/server.d.ts +58 -1
- package/dist/monitoring/server.js +129 -1
- package/package.json +1 -1
- package/src/chrome/BrandLockup.tsx +12 -3
- package/src/chrome/ContactDock.tsx +16 -2
- package/src/chrome/Footer.tsx +50 -12
- package/src/chrome/NavMegaPanel.tsx +6 -12
- package/src/chrome/SiteHeader.tsx +39 -17
- package/src/chrome/SiteMenu.tsx +211 -76
- package/src/chrome/SiteShell.tsx +9 -2
- package/src/chrome/StickyCTABar.tsx +48 -20
- package/src/chrome/index.ts +3 -0
- package/src/components/DataTable.tsx +1 -1
- package/src/components/ReportCard.tsx +3 -3
- package/src/lib/hours.ts +9 -2
- package/src/lib/phoneText.tsx +9 -0
- package/src/monitoring/ErrorCatcherScript.tsx +17 -6
- package/src/monitoring/index.ts +1 -1
- package/src/monitoring/server.ts +158 -1
- package/src/primitives/Button.tsx +2 -2
- package/src/routing/index.ts +10 -32
- package/src/routing/miss.ts +14 -3
- package/src/routing/routerErrors.tsx +57 -0
- package/src/routing/staticNotFound.tsx +77 -0
- package/src/scripts/check-sentry.ts +22 -1
- package/src/sections/CalloutPanel.tsx +4 -1
- package/src/sections/ContactInfoCard.tsx +9 -2
- package/src/sections/FeatureGrid.tsx +31 -7
- package/src/sections/Hero.tsx +2 -2
- package/src/sections/HoursTable.tsx +5 -3
- package/src/sections/LocationSection.tsx +2 -2
- package/src/sections/LogoMarquee.tsx +1 -1
- package/src/sections/PricingBand.tsx +1 -1
- package/src/sections/ProcessSteps.tsx +1 -1
- package/src/sections/ReviewWall.tsx +2 -2
- package/src/sections/index.ts +1 -0
- package/src/sections/siteConfig.ts +57 -0
- package/src/styles/base.css +34 -17
- package/src/styles/chrome.css +358 -42
- package/src/styles/components.css +0 -22
- package/src/styles/defaults.css +90 -3
- package/src/styles/primitives.css +9 -3
- package/src/styles/sections.css +46 -26
- package/src/types.ts +38 -1
package/README.md
CHANGED
|
@@ -11,14 +11,14 @@ Every export, grouped by the entry it is imported from. The Storybook column lin
|
|
|
11
11
|
| Export | Entry | What it is | Storybook |
|
|
12
12
|
|---|---|---|---|
|
|
13
13
|
| `SiteHeader` | `@atelic-action/ui/chrome` | The fixed bar: the lockup, the nav or a page's own stops, the call to action, the burger; transparent, solid, or dark. A nav entry with `columns` is a group that opens a mega menu panel of link columns (nested links, badges), a picture, icon rows, and cards beside a ticked feature card, and `phones` puts up to two tel links in the bar (8.0.0) | [Chrome/SiteHeader](https://ui.atelic.me/?path=/docs/chrome-siteheader--docs) |
|
|
14
|
-
| `SiteMenu` | `@atelic-action/ui/chrome` | The phone's full screen menu, on a native modal dialog; a group is an accordion that opens one at a time, every group closed when the menu opens (8.0.0) | [Chrome/SiteMenu](https://ui.atelic.me/?path=/docs/chrome-sitemenu--docs) |
|
|
14
|
+
| `SiteMenu` | `@atelic-action/ui/chrome` | The phone's full screen menu, on a native modal dialog; a group is an accordion that opens one at a time, every group closed when the menu opens (8.0.0); a dark sheet or a light one (`surface`, with `brand` for its top row), the current page underlined on both (8.2.0) | [Chrome/SiteMenu](https://ui.atelic.me/?path=/docs/chrome-sitemenu--docs) |
|
|
15
15
|
| `ContactDock` | `@atelic-action/ui/chrome` | The floating Get in Touch launcher and its panel of ways to reach the business, inset alike from the right and the bottom, lifting over the phone's sticky bar and riding above the footer; `SiteShell` mounts it from `site.contactDock` (8.0.0) | [Chrome/ContactDock](https://ui.atelic.me/?path=/docs/chrome-contactdock--docs) |
|
|
16
16
|
| `Footer` | `@atelic-action/ui/chrome` | The default footer: the brand column (the header's lockup, the Google rating linked to the profile, linked address, phone, email), the hours, the link columns, and the closing bar | [Chrome/Footer](https://ui.atelic.me/?path=/docs/chrome-footer--docs) |
|
|
17
17
|
| `ClosingBar`, `Copyright`, `Credit` | `@atelic-action/ui/chrome` | The line that closes every page, in two sides that each take anything: by default `Copyright` with the business's name on the left and `Credit`, the practice's made with line, on the right | [Chrome/ClosingBar](https://ui.atelic.me/?path=/docs/chrome-closingbar--docs) |
|
|
18
18
|
| `StickyCTABar` | `@atelic-action/ui/chrome` | The phone's bottom bar: the call to action and a call shortcut, there from the top on an interior page (`fromTop`) and sliding in after a scroll on a hero page | [Chrome/StickyCTABar](https://ui.atelic.me/?path=/docs/chrome-stickyctabar--docs) |
|
|
19
|
-
| `BrandLockup` | `@atelic-action/ui/chrome` | The header's identity as one link, with the recipient's mark on a sent document; the brand's own mark per surface (`onLight`, `onDark`), never recolored, at `--brand-mark-height` (8.0.0) | [Chrome/BrandLockup](https://ui.atelic.me/?path=/docs/chrome-brandlockup--docs) |
|
|
19
|
+
| `BrandLockup` | `@atelic-action/ui/chrome` | The header's identity as one link, with the recipient's mark on a sent document; the brand's own mark per surface (`onLight`, `onDark`), never recolored, at `--brand-mark-height` (8.0.0); `surface` draws one ground's mark alone, and `onClick` hears the link followed (8.2.0) | [Chrome/BrandLockup](https://ui.atelic.me/?path=/docs/chrome-brandlockup--docs) |
|
|
20
20
|
| `SkipLink` | `@atelic-action/ui/chrome` | The keyboard user's jump past the chrome | [Chrome/SkipLink](https://ui.atelic.me/?path=/docs/chrome-skiplink--docs) |
|
|
21
|
-
| `Brand`, `BrandLogo`, `CallToAction`, `HoursRow`, `MenuContact`, `NavLink`, `NavPanelSection`, `NavGroupColumn`, `NavGroupLink`, `NavGroupChildLink`, `NavPictureSection`, `NavIconRowsSection`, `NavIconRow`, `NavIcon`, `NavCardsSection`, `NavCard`, `NavFeature`, `HeaderPhone`, `ContactDockConfig`, `ContactDockItem`, `ContactDockIcon`, `Phone`, `PostalAddress`, `SiteLink`, `SocialLink`, `PageStop`, `FooterColumn`, `FooterColumnLink`, `FooterIcon` | `@atelic-action/ui/chrome` | The shapes the chrome renders from (types) | none |
|
|
21
|
+
| `Brand`, `BrandLogo`, `CallToAction`, `HoursRow`, `MenuContact`, `NavLink`, `NavPanelSection`, `NavGroupColumn`, `NavGroupLink`, `NavGroupChildLink`, `NavPictureSection`, `NavIconRowsSection`, `NavIconRow`, `NavIcon`, `NavCardsSection`, `NavCard`, `NavFeature`, `HeaderPhone`, `SiteMenuSurface`, `MenuBurgerStyle`, `FooterHoursPlacement`, `ContactDockConfig`, `ContactDockItem`, `ContactDockIcon`, `Phone`, `PostalAddress`, `SiteLink`, `SocialLink`, `PageStop`, `FooterColumn`, `FooterColumnLink`, `FooterIcon` | `@atelic-action/ui/chrome` | The shapes the chrome renders from (types) | none |
|
|
22
22
|
| `NotFound` | `@atelic-action/ui/components` | The body of the page an unknown path renders | [Components/NotFound](https://ui.atelic.me/?path=/docs/components-notfound--docs) |
|
|
23
23
|
| `Checklist` | `@atelic-action/ui/components` | A short list of checks, each passed or failed | [Components/Checklist](https://ui.atelic.me/?path=/docs/components-checklist--docs) |
|
|
24
24
|
| `IconList` | `@atelic-action/ui/components` | A list whose bullets are icons, one for the list or one per item, each in a tone | [Components/IconList](https://ui.atelic.me/?path=/docs/components-iconlist--docs) |
|
|
@@ -56,7 +56,7 @@ Every export, grouped by the entry it is imported from. The Storybook column lin
|
|
|
56
56
|
| `renderEmail`, `renderFailureEmail` | `@atelic-action/ui/email/render` | The whole email document, and the failure page's | [Email/WeeklyReport](https://ui.atelic.me/?path=/docs/email-weeklyreport--docs) |
|
|
57
57
|
| `atelicPalette`, `atelicFonts`, `toThemeCSS`, `themeTokenMap`, `Palette`, `Fonts` | `@atelic-action/ui/tokens` | The palette and font stacks, with no React | none |
|
|
58
58
|
| `useScrollSpy` | `@atelic-action/ui/hooks` | Which section is in the reading band; the header's stops use it | [Chrome/SiteHeader](https://ui.atelic.me/?path=/docs/chrome-siteheader--docs) (the dark bar's stops) |
|
|
59
|
-
| `staticNotFoundRouting` | `@atelic-action/ui/routing` | The router options that keep a prerendered not found page alive | none |
|
|
59
|
+
| `staticNotFoundRouting`, `StaticNotFoundOptions` | `@atelic-action/ui/routing` | The router options that keep a prerendered not found page alive; given the router's `useMatches`, its pending view draws the page on a miss alone (8.2.0) | none |
|
|
60
60
|
| `signToken`, `verifyToken`, `safeNext`, `needsSession` | `@atelic-action/ui/gate` | The access gate's tokens, the safe post sign in path, and the wall's test | none |
|
|
61
61
|
| `POST`, `createRequestLink` | `@atelic-action/ui/gate/request-link` | The function that emails a sign in link | none |
|
|
62
62
|
| `GET` | `@atelic-action/ui/gate/verify` | The function that turns a link into a session | none |
|
|
@@ -105,8 +105,9 @@ Every export, grouped by the entry it is imported from. The Storybook column lin
|
|
|
105
105
|
| `marketingConfig` | `@atelic-action/ui/vite` | A marketing site's whole Vite configuration as one call; with the three Sentry variables it uploads hidden source maps under the commit (8.1.0) | none |
|
|
106
106
|
| `buildRelease`, `sentryUpload`, `SentryUpload`, `environmentPlugin` | `@atelic-action/ui/vite` | The commit a build is filed under, the source map upload's settings (on only with its three variables), and the plugin that names the build's environment for the browser (8.1.0) | none |
|
|
107
107
|
| `isMiss`, `MissMatch`, `CATCH_ALL_ROUTE_ID` | `@atelic-action/ui/routing` | Whether a router's matches are a miss (the catch all route, or a route whose params name no page), router free, for a site's root route (8.1.0) | none |
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
108
|
+
| `routerErrorOptions`, `RouteErrorFallback`, `RouteErrorProps`, `reportRouteError` | `@atelic-action/ui/routing` | The router options that report a route's render crash and draw the package's error page in its place, router free (8.2.0; see [Error Reporting](#error-reporting)) | [Routing/RouteErrorFallback](https://ui.atelic.me/?path=/docs/routing-routeerrorfallback--docs) |
|
|
109
|
+
| `startErrorReporting`, `ErrorCatcherScript` (`enabled`, 8.2.0), `ErrorCatcherScriptProps`, `errorCatcherScript`, `reportError`, `installCatcher`, `readCatcher`, `afterFirstPaint`, `throwLaunchCheck`, `LAUNCH_CHECK_MESSAGE` | `@atelic-action/ui/monitoring` | Error reporting in the browser: the inline early catcher, and the start function that loads the Sentry SDK after first paint, errors only (8.1.0; see [Error Reporting](#error-reporting)) | none |
|
|
110
|
+
| `reportServerError`, `reportServerErrorLater`, `WaitUntilContext`, `refusalError`, `reportRefusedResponse`, `withErrorReporting`, `parseDSN`, `parseStack`, `buildEnvelope` | `@atelic-action/ui/monitoring/server` | Error reporting from a function or the middleware, dependency free and built, for what Vercel runs uncompiled (8.1.0); the later one sends without holding the answer, on the platform's `waitUntil` (8.2.0) | none |
|
|
110
111
|
| `sections.css` | `@atelic-action/ui/styles/sections.css` | Styles for everything under `sections`, imported after `primitives.css` | none |
|
|
111
112
|
| `AppProvider`, `AppConfigProvider`, `useAppConfig`, `useNav`, `useUser`, `configureApp`, `getAppConfig`, `AppConfig`, `NavItem`, `AppUser`, `Register` | `@atelic-action/ui/app` | The app shell's seam: the app hands in its config and nav, registers its user type, and reads them back | [App/AppProvider](https://ui.atelic.me/?path=/docs/app-appprovider--docs) |
|
|
112
113
|
| `AppLayout`, `AppPage`, `AppPageToolbar`, `Breadcrumbs`, `SectionCards`, `DesktopRail`, `MobileTabBar`, `MobileMenu`, `UserMenu`, `PageSkeleton`, `PageError`, `ActionButton`, `FormActionButtons`, `activeSection` | `@atelic-action/ui/app` | The app frame: the rails, the tab bar, the page scaffold with its toolbar and right rail | [App/AppLayout](https://ui.atelic.me/?path=/docs/app-applayout--docs) |
|
|
@@ -234,7 +235,7 @@ The menu is a native `<dialog>` opened with `showModal()`, so Escape, focus cont
|
|
|
234
235
|
On a statically prerendered TanStack Start site the markup is the easy part. The host serves the `/404` prerender for every miss, and the page survives hydration only with three pieces in the site:
|
|
235
236
|
|
|
236
237
|
1. **A catch all route**, `src/routes/$.tsx`, rendering the site's page (noindexed). Never a dedicated `/404` route: an unknown path then matches only the root, TanStack's hydrate throws, and the page goes blank.
|
|
237
|
-
2. **The router options:** `createRouter({ routeTree, ...staticNotFoundRouting(NotFoundPage) })
|
|
238
|
+
2. **The router options:** `createRouter({ routeTree, ...staticNotFoundRouting(NotFoundPage, { useMatches }) })`, with `useMatches` imported from `@tanstack/react-router` and handed in, so the package imports no router. A miss hydrates through its pending state first, so pending has to render the same page or React reports a mismatch (a pending view of plain `null` is React error 418 and a blank body on every miss). Given `useMatches` (8.2.0), the pending view draws the page on a miss alone (`isMiss`) and nothing on any other route's pending state, so a slow client navigation never shows a bare 404 body with no header; without it, the pending view is the page itself, as before. `catchAllId` names a catch all route other than `/$`. The pending view counts as a miss the catch all route's match, a route whose `staticData.missing(params)` says its params name no page, and a match the router already reports as not found (8.3.0). **A route with params that can claim a path with no page behind it (a blog slug nobody wrote) sets `staticData.missing`**: the host serves that path the 404 prerender, which hydrates through the pending state before the route's loader runs, so a loader's `notFound()` arrives too late for that first render and the page would hydrate blank.
|
|
238
239
|
3. **The build:** a `{ path: "/404", prerender: { enabled: true }, sitemap: { exclude: true } }` entry in the Vite `pages` list, and a copy of `dist/client/404/index.html` to `dist/client/404.html`.
|
|
239
240
|
|
|
240
241
|
```tsx
|
|
@@ -392,15 +393,15 @@ The two pieces a reader sees are ordinary components, in `@atelic-action/ui/comp
|
|
|
392
393
|
|
|
393
394
|
Every site reports its errors to Sentry, errors only and never performance tracing, through three pieces the package owns (8.1.0). A site cannot launch without it: `atelic-check-sentry` stops a production build with no DSN.
|
|
394
395
|
|
|
395
|
-
1. **The early catcher.** `ErrorCatcherScript`, first
|
|
396
|
-
2. **The start function.** `startErrorReporting({ dsn, release, environment })` from `@atelic-action/ui/monitoring` (with `environment` defaulting to the build's `import.meta.env.VITE_ENVIRONMENT`) makes sure the catcher is listening (installing it when the page has none), then after first paint (falling back to the load event where the browser cannot report paints, and to ten seconds whatever happens) loads the Sentry browser SDK, replays what the catcher held, each tagged `early`, and takes the catcher's listeners off so nothing is reported twice. With no `dsn` it does nothing and loads nothing. The SDK chunk is the client set up by hand with six integrations (event filters, function to string, the global handlers, linked errors, dedupe, the page's URL and user agent): no tracing, no replay, no breadcrumbs. Measured alone with esbuild, the chunk weighs 69.9 KB raw, 24.6 KB gzipped, and 22.3 KB in brotli, where the old `@sentry/react` chunk with browser tracing, measured the same way, weighed 136.2 KB, 47.0 KB, and 41.5 KB; a site's own build bundles them with what it shares, so its figures differ (a real site's new chunk measured 81 KB raw and 28 KB gzipped, replacing one of 425 KB raw and 141 KB gzipped). `AppErrorBoundary` hands a render crash to the same buffer (`reportError`), since React keeps a caught crash from the window's handlers; on a page where reporting never started and no inline catcher runs, the crash is let go quietly rather than held by a catcher nobody reads. The package carries `@sentry/browser`, so a site needs no Sentry dependency of its own.
|
|
397
|
-
3. **The server reporter.** `@atelic-action/ui/monitoring/server`, built like the gate so a Vercel function imports it uncompiled: `reportServerError(error, { dsn?, request?, tags?, release?, environment? })` posts a Sentry envelope to the ingest the DSN names (`SENTRY_DSN`, then `VITE_SENTRY_DSN`), with the stack's frames, the runtime as a tag, and the release from `VERCEL_GIT_COMMIT_SHA`. It waits two seconds at most, never throws, and resolves whether or not the send worked. `withErrorReporting(handler)` reports a handler's throw and throws it again. The gate's middleware reports anything it throws, and passes and blocks exactly as before.
|
|
396
|
+
1. **The early catcher.** `ErrorCatcherScript`, placed first among the root route's `<head>` scripts, is a 443 byte inline script (281 gzipped, ES5, no dependencies) that listens for `error` and `unhandledrejection` from the first moment and holds up to twenty (`CATCHER_CAP`) in a buffer on `window.__atelicErrors` (`CATCHER_GLOBAL`), counting the rest as dropped; the count rides on each replayed error as `earlyDropped`. It is the page's first script and runs before any other script on the page; it is not the first element in `<head>`, since React 19 hoists the title, the meta tags, the preloads, and the stylesheets ahead of it, and nothing it does depends on that. An error thrown before the app's own JavaScript runs is held, not lost.
|
|
397
|
+
2. **The start function.** `startErrorReporting({ dsn, release, environment })` from `@atelic-action/ui/monitoring` (with `environment` defaulting to the build's `import.meta.env.VITE_ENVIRONMENT`) makes sure the catcher is listening (installing it when the page has none), then after first paint (falling back to the load event where the browser cannot report paints, and to ten seconds whatever happens) loads the Sentry browser SDK, replays what the catcher held, each tagged `early`, and takes the catcher's listeners off so nothing is reported twice. With no `dsn` it does nothing and loads nothing. The SDK chunk is the client set up by hand with six integrations (event filters, function to string, the global handlers, linked errors, dedupe, the page's URL and user agent): no tracing, no replay, no breadcrumbs. Measured alone with esbuild, the chunk weighs 69.9 KB raw, 24.6 KB gzipped, and 22.3 KB in brotli, where the old `@sentry/react` chunk with browser tracing, measured the same way, weighed 136.2 KB, 47.0 KB, and 41.5 KB; a site's own build bundles them with what it shares, so its figures differ (a real site's new chunk measured 81 KB raw and 28 KB gzipped, replacing one of 425 KB raw and 141 KB gzipped). `AppErrorBoundary` hands a render crash to the same buffer (`reportError`), since React keeps a caught crash from the window's handlers; on a page where reporting never started and no inline catcher runs, the crash is let go quietly rather than held by a catcher nobody reads. A route's render crash reaches that boundary too on TanStack Router 1.170, where a route has a catch boundary of its own only when an `errorComponent` applies to it, so on a site that sets none the crash rises to `AppErrorBoundary` and is reported once. A route or a site that sets its own `errorComponent` with no `onCatch` puts a boundary in the way that catches the crash and reports it to nobody. `routerErrorOptions()` (8.2.0, below) closes that: spread into `createRouter`, it gives every route the boundary, its `defaultOnCatch` hands what any of them catches to `reportError` once, and its `defaultErrorComponent` draws the same `ErrorFallback` page, so the report no longer depends on which boundary is nearest. The package carries `@sentry/browser`, so a site needs no Sentry dependency of its own.
|
|
398
|
+
3. **The server reporter.** `@atelic-action/ui/monitoring/server`, built like the gate so a Vercel function imports it uncompiled: `reportServerError(error, { dsn?, request?, tags?, release?, environment? })` posts a Sentry envelope to the ingest the DSN names (`SENTRY_DSN`, then `VITE_SENTRY_DSN`), with the stack's frames, the runtime as a tag, and the release from `VERCEL_GIT_COMMIT_SHA`. It waits two seconds at most, never throws, and resolves whether or not the send worked. `withErrorReporting(handler)` reports a handler's throw and throws it again. `reportServerErrorLater(error, { context?, ...options })` (8.2.0) starts the same send and returns at once: it hands the send to the platform's `waitUntil`, the `context` a handler was given (an edge middleware's or a function's second argument) or else the request context Vercel keeps for a function, so the function stays alive until the send finishes after the answer has gone; with neither, the send runs without blocking the answer and may be cut short when the runtime freezes. Await `reportServerError` where the report must land before the handler goes on (before a throw, or in a handler that waits anyway); call `reportServerErrorLater` where the person is waiting on the answer (a refused send the form should say at once). The gate's middleware reports anything it throws, and passes and blocks exactly as before. `refusalError(response, service?)` (8.2.0) turns a refused upstream answer (a send the mail service would not take) into an error a report may carry: the service's name, the status, and the error body's `name` and `message` alone, each with anything shaped like an email address replaced by `[address]` (a sentence's closing period kept outside it) and anything shaped like a phone number (grouped as one is written, or a plus sign and its digits run together) by `[number]` (8.3.0), then cut to 300 characters, nothing else of the body read. The fields are still the upstream's free text: a name or a street quoted in words passes through, so report the refusals of a service whose errors are about the request, never one that echoes what a person wrote; `reportRefusedResponse(response, { service, request, tags, context })` builds it and sends it with `reportServerErrorLater`, resolving once the body is read and never waiting on the send.
|
|
398
399
|
|
|
399
400
|
**The launch check.** Once reporting has started, `window.__atelicErrors.test()` in the browser's console throws an error from the package's own code on the next turn, uncaught, named "Atelic error reporting launch check: thrown on purpose from @atelic-action/ui" (`LAUNCH_CHECK_MESSAGE`). Run it on a site's first production deploy: the error should reach Sentry under the deploy's release and environment with a readable, source mapped stack. A stack of minified names means the upload did not run.
|
|
400
401
|
|
|
401
402
|
Two noises are left out, the list kept short: an error whose top frame is a browser extension's (`chrome-extension://`, `moz-extension://`, `safari-extension://`, `safari-web-extension://`), and the in app webview bridges failing ("Java object is gone", "Error invoking postMessage").
|
|
402
403
|
|
|
403
|
-
**What is captured:** uncaught errors and unhandled rejections in the browser, from before first paint on; render crashes
|
|
404
|
+
**What is captured:** uncaught errors and unhandled rejections in the browser, from before first paint on; render crashes `AppErrorBoundary` catches, and with `routerErrorOptions()` any a route's own boundary catches; a function's or the middleware's throw, and whatever a function reports by hand. **What is not:** performance, sessions, replays, breadcrumbs, console output, and the expected misses (a contact form's validation answer, a malformed or expired gate cookie). **Privacy:** a server report carries the request's method, its path with no query string, and its user agent, and nothing else from the request: never a body, never another header. A browser report is cut the same way before it leaves the page: the page's URL and each stack frame's file lose their query string and fragment, the referrer goes, and the user agent is the one header kept. A contact form's request holds a person's name, address, and message.
|
|
404
405
|
|
|
405
406
|
| Variable | Where | What it does |
|
|
406
407
|
|---|---|---|
|
|
@@ -408,7 +409,7 @@ Two noises are left out, the list kept short: an error whose top frame is a brow
|
|
|
408
409
|
| `SENTRY_DSN` | the Vercel project, optional | The server's DSN when it should differ from the browser's |
|
|
409
410
|
| `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, `SENTRY_PROJECT` | the Vercel project, production | With all three, `marketingConfig` adds the Sentry Vite plugin: it creates a release named by the commit, uploads hidden source maps (`build.sourcemap: "hidden"`, only then), and deletes every map from `dist/` once uploaded. With any missing, the build is unchanged |
|
|
410
411
|
|
|
411
|
-
`marketingConfig` hands the browser the commit (`VERCEL_GIT_COMMIT_SHA`, else `GITHUB_SHA`) as `import.meta.env.VITE_RELEASE`, the same name the upload's release takes, so a stack trace meets its source maps, and the environment as `import.meta.env.VITE_ENVIRONMENT`: `VERCEL_ENV` (production, preview, development) on Vercel, else the build's mode, since a production build's mode is production on every deploy, a preview's included. `atelic-check-sentry` also fails any build whose DSN is set but is not one.
|
|
412
|
+
`marketingConfig` hands the browser the commit (`VERCEL_GIT_COMMIT_SHA`, else `GITHUB_SHA`) as `import.meta.env.VITE_RELEASE`, the same name the upload's release takes, so a stack trace meets its source maps, and the environment as `import.meta.env.VITE_ENVIRONMENT`: `VERCEL_ENV` (production, preview, development) on Vercel, else the build's mode, since a production build's mode is production on every deploy, a preview's included. `atelic-check-sentry` also fails any build whose DSN is set but is not one, and any whose DSN carries a space or a line break around it, since the build ships the value as it is set (8.2.0).
|
|
412
413
|
|
|
413
414
|
What a site changes. `src/router.tsx` drops its own Sentry import and its `afterFirstPaint`, and starts reporting where the lazy init was:
|
|
414
415
|
|
|
@@ -424,14 +425,22 @@ if (typeof window !== "undefined") {
|
|
|
424
425
|
}
|
|
425
426
|
```
|
|
426
427
|
|
|
427
|
-
|
|
428
|
+
The same file hands the router's boundaries to error reporting, two lines (8.2.0). Without them a route crash is still reported by `AppErrorBoundary` unless a route or the site sets its own `errorComponent` with no `onCatch`; with them every route's crash is reported once by its own boundary, whatever error page a route sets:
|
|
429
|
+
|
|
430
|
+
```ts
|
|
431
|
+
import { routerErrorOptions } from "@atelic-action/ui/routing";
|
|
432
|
+
|
|
433
|
+
const router = createRouter({ routeTree, ...routerErrorOptions() });
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
`src/routes/__root.tsx` puts the catcher first among the scripts in `<head>`, and imports the boundary from the package in place of its own copy, so a render crash outside a route is reported too (the site deletes its `src/shared/components/AppErrorBoundary.tsx` and `ErrorFallback.tsx`, whose package twins are the same page with a long message that wraps). The catcher renders only when the build has a DSN (`enabled`, 8.2.0, default true), so a build with none ships no catcher holding errors nobody reads:
|
|
428
437
|
|
|
429
438
|
```tsx
|
|
430
439
|
import { AppErrorBoundary } from "@atelic-action/ui/artifact";
|
|
431
440
|
import { ErrorCatcherScript } from "@atelic-action/ui/monitoring";
|
|
432
441
|
|
|
433
442
|
<head>
|
|
434
|
-
<ErrorCatcherScript />
|
|
443
|
+
<ErrorCatcherScript enabled={Boolean(env.VITE_SENTRY_DSN)} />
|
|
435
444
|
<HeadContent />
|
|
436
445
|
</head>
|
|
437
446
|
```
|
|
@@ -439,13 +448,13 @@ import { ErrorCatcherScript } from "@atelic-action/ui/monitoring";
|
|
|
439
448
|
`api/contact.ts` wraps its handler, and reports a refused send by hand, since that path answers rather than throws:
|
|
440
449
|
|
|
441
450
|
```ts
|
|
442
|
-
import {
|
|
451
|
+
import { reportRefusedResponse, withErrorReporting } from "@atelic-action/ui/monitoring/server";
|
|
443
452
|
|
|
444
453
|
export const POST = withErrorReporting(
|
|
445
454
|
async (request: Request): Promise<Response> => {
|
|
446
455
|
// ...the handler as it was, and where Resend refuses:
|
|
447
456
|
if (!response.ok) {
|
|
448
|
-
await
|
|
457
|
+
await reportRefusedResponse(response, { service: "Resend", request, tags: { route: "contact" } });
|
|
449
458
|
return json(502, { ok: false, error: "Sending failed. Please try again in a moment." });
|
|
450
459
|
}
|
|
451
460
|
},
|
|
@@ -603,9 +612,9 @@ export function SiteShell(props: Omit<SiteShellProps, "currentPath" | "basePath"
|
|
|
603
612
|
Every site's footer has one shape, and `Footer` draws it (7.0.0):
|
|
604
613
|
|
|
605
614
|
- **The brand column:** the header's lockup (the mark with the wordmark beside it, or the mark alone when `logo.wordmark` is false), then the Google rating beside five stars, the whole line one link to the business's Google profile when it has one, then the one address, the headquarters, linked to the same profile, then the phone and the email, each a link.
|
|
606
|
-
- **The hours,** when the site gives them: a column of their own headed Hours (`hoursHeading`), each row's days beside or over its range, as the column's width allows (8.1.0).
|
|
615
|
+
- **The hours,** when the site gives them: a column of their own headed Hours (`hoursHeading`), each row's days beside or over its range, as the column's width allows (8.1.0). On a phone, where the footer is two across, the cells under the brand column pair up with none left alone (8.3.0): beside an even count of link columns the hours take the row's whole width with their rows two across and the link columns pair up under them, and beside an odd count the hours stay a column of their own, rows stacked, paired with the first link column, as in 8.1.0. `Footer` counts the link columns it draws (a column with no links is left out first). `footer.hoursPlacement: "brand"` (`Footer`'s `hoursPlacement`, 8.3.0) sets them inside the brand column instead, under the address, the phone, and the email, as a compact list (days, then ranges) under a small Hours label, so the four link columns keep the row's room. In that placement each link column is at least 10em wide and never narrower than its longest label, and the brand column at least 17em, an ordinary email address on one line; while the row holds every floor, the brand column and the link columns share it, and when it cannot, the brand column takes a row of its own with the link columns under it, all across while their floors fit and two by two below that (8.3.0). The floors are measured for the link columns `Footer` draws, so two or three columns keep the brand column beside them as long as theirs fit. One measure, the floors against the row's own width, drives both steps, so no breakpoint disagrees with it, and a font a few percent wider than a site was drawn in still holds a three word label on one line.
|
|
607
616
|
- **Four link columns:** Company, Resources, Social, and Legal, in that order. From 760px the columns share one row at their shares but never narrower than their longest word, wrapping a column to a second row before a label breaks inside itself (8.1.0). A Social link carries its icon in front of its words. A column with no links is left out, and the grid sizes itself to the columns shown.
|
|
608
|
-
- **The closing bar:** `ClosingBar` under it all, `Copyright` with the business's name on the left and `Credit` on the right.
|
|
617
|
+
- **The closing bar:** `ClosingBar` under it all, `Copyright` with the business's name on the left and `Credit` on the right while the two share a line; when they do not (a phone, a long attribution), the credit wraps under the copyright and both start at the same edge, and a copyright longer than the line wraps inside itself (8.3.0).
|
|
609
618
|
|
|
610
619
|
The rating's stars are hidden from assistive technology, so the line, linked or not, is named by its words ("4.8 on Google"); `ratingLabel` gives the link a fuller name when a site wants one ("4.8 on Google, opens the Google profile"). Linked, it opens in a new tab as the address does. With the hours the footer holds six columns, so from 760px to 1100px the brand column keeps a row of its own above the other five, and from 1100px all six share one row with the brand column a little wider; a phone sets the brand column over two across, as without them. The rating's five stars read `--star-fill`, the same token `StarRating`'s filled star reads, and fall back to `--review-gold` (`#f5b301`) when a theme sets none, so one line in `theme.css` recolors every star on a site (8.0.0). The logo is the header's lockup drawn on the dark band (8.1.0): the mark the dark surface resolves to, by the header's own order (see the table under [Rendering From Props](#rendering-from-props)), with the wordmark beside it, composed by the same parts the header's `BrandLockup` draws. Its picture is silent there, since the words name it. `logo.wordmark: false` draws the mark alone, named by `logo.alt`; a glyph tile keeps the name beside it, and a logo with no picture is the words alone. The column headings are level 2 by default (`headingLevel` takes 2 to 6): the footer is a landmark beside the page's main content, so its sections sit one level under the page's `h1` whatever the page's own outline ends on, which satisfies axe's `heading-order` on every page and keeps the columns in a screen reader's heading list. Each is a `div` with `role="heading"` and `aria-level`, wearing `.footer-heading`, rather than an `h2`: a site's own bare `h2` rule is unlayered, so it beats every rule in the package's layer whatever its weight, and it is written for a page's section titles, not these small labels. A heading by role keeps the outline and matches no element rule, with no `!important` and no specificity raised.
|
|
611
620
|
|
|
@@ -618,7 +627,7 @@ The header carries the services and the service areas, so the footer does not re
|
|
|
618
627
|
| The rating | `footer.rating`, as printed (`"4.8 on Google"`) |
|
|
619
628
|
| The rating's link | `footer.ratingHref`, else `mapLinkURL`, the Google profile, whenever a rating is set; `footer.ratingLabel` names it |
|
|
620
629
|
| The address and its link | `address` and `mapLinkURL`; `footer.showAddress: false` drops the address |
|
|
621
|
-
| The hours | `hours`, each row's `labelShort` and its range on `clock
|
|
630
|
+
| The hours | `hours`, each row's `labelShort` and its range on `clock` and `meridiem`, short ("8a to 5p") unless `footer.hoursShort` is false ("8:00a to 5:00p", or "8:00 am to 5:00 pm" with `meridiem: "word"`); `footer.hoursPlacement` sets them as a column (the default) or inside the brand column; `footer.showHours: false` keeps them out of the footer and in the structured data |
|
|
622
631
|
| The phone and the email | `phone`, `email` |
|
|
623
632
|
| Company | `nav` |
|
|
624
633
|
| Resources | `footerLinks` |
|
|
@@ -647,7 +656,13 @@ A row's `icon` is one of `calculator`, `calendar`, `card`, `chat`, `document`, `
|
|
|
647
656
|
|
|
648
657
|
Every link in a panel that leads to the page being read carries `aria-current="page"`, the picture, the cards, a column heading, and the group's own link included, and a flat bar link on the current page is marked as a group holding it is. On the solid bar the current entry reads `--primary-ink`; over a hero the transparent bar keeps it in `--on-dark` with its siblings and marks it with an underline, so it reads on a dark photograph whatever the theme's primary (8.1.0). The sections share one row and wrap to a second when their least widths outrun it (a picture, icon rows, and cards beside the feature card at a narrow desktop, or two link columns, icon rows, and cards on a wide wrap), so none is squeezed past reading or pushed out of the card. A section's least width is the larger of its floor (a link column's list 120px, the icon rows 320px, the cards 240px, the picture 220px) and its longest word, and words in a panel break only as a last resort, so no label breaks inside a word to make a row fit (8.1.0).
|
|
649
658
|
|
|
650
|
-
On a phone and a tablet the menu opens each group as an accordion, one at a time, and every group starts closed whenever the menu opens, the one holding the current page included. It draws the same data: each section's heading, a link's children indented under it with the same elbow, the badges kept, icon rows and cards as plain links of their labels and titles, and a picture as a plain link of its caption. A plain entry wears a number, and the numbers count plain entries alone, so a group between them leaves no gap.
|
|
659
|
+
On a phone and a tablet the menu opens each group as an accordion, one at a time, and every group starts closed whenever the menu opens, the one holding the current page included. It draws the same data: each section's heading, a link's children indented under it with the same elbow, the badges kept, icon rows and cards as plain links of their labels and titles, and a picture as a plain link of its caption. A plain entry wears a number, and the numbers count plain entries alone, so a group between them leaves no gap. The link to the page being read carries `aria-current="page"` and, for the eye, the 2px underline the bar marks its current entry with, under its words alone (8.2.0).
|
|
660
|
+
|
|
661
|
+
The menu has two sheets, chosen by `menu.surface` in the config (`SiteHeader`'s `menuSurface`, `SiteMenu`'s `surface`), with one behavior: the native modal dialog traps focus, Escape closes it, focus returns to the burger, and the page behind holds still. `dark`, the default, is the sheet every site had: the dark surface, large light entries with their numbers, the call to action mid sheet, and the contact block at the foot. `light` (8.2.0) sets the page's ground and ink: a top row with the header's lockup, drawn for the light ground and linking home, and a round outlined close button, where focus starts; the entries as rows under hairlines, a group's label bold in ink at a moderate size with a chevron at the right, turning the primary's words while it is open, its sections' headings small quiet caps labels, a link's children, badges, and `quiet` honored; and a foot on `--surface-alt` under a hairline, pushed to the bottom of the screen while the list is short, holding the call to action across its width (with the arrow when `cta.arrow` is set) and a card per header number, an outlined card with the number's words in small caps over the number, the whole card a `tel:` link (the contact block's one phone when the header has none). The light sheet sets no numbers on its entries, and it shows no email and no address: the dark sheet's contact block has them, the light sheet's design does not, so a site that needs them on a phone keeps the dark sheet or puts them on a page. Its top row is the bar's height and is inset as the bar's content is (`--header-max`, `--header-gutter`), so opening the sheet moves neither the lockup nor the button under the reader's thumb, and its row dividers read `--menu-rule` (default `--hairline`). On either sheet the contact dock's launcher steps aside while the menu is open.
|
|
662
|
+
|
|
663
|
+
The burger takes `menu.burger` (`SiteHeader`'s `burger`): `labelAfter` sets the three lines before the words `menuLabel` puts beside it, and `outlined` draws it in an outlined pill; both are off by default (8.2.0). While the menu is open only the lines fold to an X. The phone's round call button beside the burger is named by its number's `label` and the number, or "Call" and the number when it has no label (8.2.0).
|
|
664
|
+
|
|
665
|
+
The menu's words come from the config: the call to action reads `cta.menuLabel` when set, else `cta.label` ("Order ahead for Saturday" in the menu where the bar says "Order ahead"), and each header number reads its `menuLabel`, else its `label`, else "Call" (8.2.0). A number's `label` keeps its place in the desktop bar's phone pill.
|
|
651
666
|
|
|
652
667
|
```ts
|
|
653
668
|
// src/site.config.ts
|
|
@@ -695,7 +710,9 @@ nav: [
|
|
|
695
710
|
},
|
|
696
711
|
{ label: "About", to: "/about" },
|
|
697
712
|
],
|
|
698
|
-
header: { phones: [{ e164: "+15555550100", display: "(555) 555-0100", label: "The shop" }] },
|
|
713
|
+
header: { phones: [{ e164: "+15555550100", display: "(555) 555-0100", label: "The shop", menuLabel: "Call the shop" }] },
|
|
714
|
+
menu: { surface: "light" },
|
|
715
|
+
cta: { label: "Order ahead", href: "/order", menuLabel: "Order ahead for Saturday", arrow: true },
|
|
699
716
|
```
|
|
700
717
|
|
|
701
718
|
`SiteShell` puts the base path on every link and picture a section holds. The footer's Company column lists the entries themselves and never a group's links. A bar holding a group or a number keeps the burger up to 1180px instead of 900px, since it needs the room; the second of two numbers shows from 1360px, and the menu lists both. `header.phones` takes up to two, each a tel link; the first is also the round call button beside the burger on a phone.
|
|
@@ -714,6 +731,53 @@ The space a section leaves above and below itself is one token, `--section-space
|
|
|
714
731
|
|
|
715
732
|
`.section` pads with it, and the steps derived from it keep their old proportion to it: `.section-md` 0.7, `.section-sm` 0.6, `tight-top` and `tight-bottom` a third, the `PricingBand` 0.84, `PageHero` and the not found opener 0.72 on top and 0.5 below, and the `FeatureDetail` rows 0.6, whose first and last rows now sit flush with the section around them. `--block-gap` is the space between a section's heading and the grid under it (`FeatureGrid`, `ProfileCards`, `LinkColumns`, `CalloutPanel`, and `Gallery` at 0.77 of it), and `--card-min` the least a `FeatureGrid` card stands. A site that wants its own value sets the property on `.atelic-ui` in its own sheet, outside the layer. `ArtifactShell` pins `comfortable`, so a document reads as it did; the app shell reads none of these.
|
|
716
733
|
|
|
734
|
+
### Moving to 8.3.0
|
|
735
|
+
|
|
736
|
+
No API breaks: every prop, config key, token, class, and export a site uses still works, and every addition is optional (a minor release for that reason). Three things change on screen all the same.
|
|
737
|
+
|
|
738
|
+
**Changes on a site that changes nothing:**
|
|
739
|
+
|
|
740
|
+
1. **The closing bar on a phone stacks.** Where its two sides do not share a line, the credit wraps under the copyright at the same left edge, where it sat at the right of its own line.
|
|
741
|
+
2. **The footer's hours on a phone, beside an even count of link columns** (the default four, or two), span the row with their rows two across and the link columns pair under them; beside an odd count nothing changes from 8.1.0.
|
|
742
|
+
3. **`ContactInfoCard`'s single phone row reads "Call"** where it read "Call / Text", which told a reader the business answers texts. `phoneLabel="Call / Text"` restores it. 8.2.0 made the same change in the phone menu, where `phones[].menuLabel` restores it, so **a site whose business does answer texts sets both.**
|
|
743
|
+
|
|
744
|
+
The rest of what an unchanged site sees, in detail:
|
|
745
|
+
|
|
746
|
+
- **The closing bar on a phone.** Where its two sides do not share a line, the credit (or a site's note) wraps under the copyright and both start at the same edge, where the credit sat at the right of its own line and the two lines zigzagged. On one line they stay as before. No breakpoint decides it, so a long attribution on a tablet stacks the same way, and a copyright longer than the line wraps inside itself.
|
|
747
|
+
- **The footer's hours on a phone, beside an even count of link columns** (the default footer's four, or two). Two across, the hours take the row's whole width under the brand column, their rows two across, and the link columns pair up under them, where the hours sat beside the first link column and left a hole under themselves when that column ran longer. **Beside an odd count** (three, say) nothing changes from 8.1.0: the hours stay a column of their own beside the first link column, so the cells pair and none hangs alone. From 760px nothing moves.
|
|
748
|
+
- **`ContactInfoCard`'s single phone row** reads "Call" where it read "Call / Text", which told a reader the business answers texts; `phoneLabel` gives it other words.
|
|
749
|
+
- **An `h4` under a theme that sets `--subheading-tracking: normal`** is flat, where it took its parent's tracking. At the default nothing moves.
|
|
750
|
+
- **The sticky bar's `onSpaceChange`.** A listener swapped in is told the current height at once and the one it replaced gets 0, without waiting for a resize, and no listener hears one value twice. A listener made anew on every render (an inline function, which looped in 8.2.0) hears the height once a function until the caller's state settles; one that stores an object is cut off after three such arrivals with nothing measured between, so it cannot loop. Store a plain number, or memoize the listener.
|
|
751
|
+
- **`isMiss`** also counts a match the router reports as not found, and the not found pending view (given `useMatches`) asks `isMiss` alone, so the root's 404 head and the pending view agree. A route with params that can claim a path with no page sets `staticData.missing` (see [The Not Found Page](#the-not-found-page)).
|
|
752
|
+
- **`refusalError` and `reportRefusedResponse`** also replace a phone number, grouped as one is written, with `[number]`, catch an address on an internationalized domain or with an underscore in a label, and keep a sentence's closing period outside a scrubbed address; a date, a bare id, and a count beside a year stay.
|
|
753
|
+
- **`SiteMenu`** takes an empty `phones` list as none, so the contact block's one phone stands in on either sheet.
|
|
754
|
+
- **One visually hidden class**, `.visually-hidden`, in `defaults.css`, worn by `ReportCard`'s spoken words, `DataTable`'s empty label, `ReviewWall`'s control labels, and `FeatureGrid`'s new tab note, in place of four copies of the rule. The old class names stay on their elements beside it as aliases (`.rc-sr`, `.data-table-empty-label`, `.rw-select-label`), so a site rule written against one still reaches it; they go in the next major, and a site moves its rules to `.visually-hidden` before then.
|
|
755
|
+
- **The rule above the closing bar** is drawn in its top border's place rather than as the border; at the default it looks and measures as before.
|
|
756
|
+
|
|
757
|
+
New, each at today's look unless set (the table under [Tokens](#tokens)):
|
|
758
|
+
|
|
759
|
+
- **The hero:** `--hero-gap-kicker`, `--hero-gap-lead`, and `--hero-gap-actions`, each one gap of the stack, falling back to `--hero-stack-gap` and then to the gap's own value; `--hero-lead-leading` (`1.55`); `--hero-split-pad-block` (`--section-space`); `--hero-kicker-display` and `--hero-kicker-leading` (`inline-block`, inherited), which as `block` and a leading lay the kicker out at its drawn height; `--hero-actions-gap` (`14px`).
|
|
760
|
+
- **The footer:** `footer.hoursPlacement` (`"column"`, or `"brand"` for the hours inside the brand column, the brand column taking its own row when the link columns' floors outrun the row; an unknown value is a column); `--footer-link-size` (`1em`); `--footer-brand-width` (unset, the brand column's 1.4 share, or 2 beside the hours); `--closing-rule-inset` (`0px`).
|
|
761
|
+
- **Hours:** `meridiem` (`"letter"`, or `"word"` for "8 am") and `footer.hoursShort` (`true`), so "8:00 am to 5:00 pm" in the footer is `meridiem: "word"` with `hoursShort: false`, no site code; `HoursTable` takes `meridiem`.
|
|
762
|
+
- **Sections:** `FeatureGrid`'s `external` on a linked card, opening it in a new tab and saying so (`newTabLabel`, "opens in a new tab"); `ContactInfoCard`'s `phoneLabel` (`"Call"`).
|
|
763
|
+
- `RouteErrorFallback` has its stories, and the story widths gain `smallPhone` 320, `smallTablet` 768, `laptop` 1024, and `wideTablet` 1099.
|
|
764
|
+
|
|
765
|
+
### Moving to 8.2.0
|
|
766
|
+
|
|
767
|
+
Nothing breaks: every addition is an optional prop, config key, token, or export. On a site that changes nothing, these change, all in or beside the phone menu: a header number with no label, or the contact block's one phone, reads "CALL" in the menu where it read "CALL / TEXT", which told a reader the business answers texts; the phone's round call button for a number with no label is named "Call" and the number where it was named by the number alone; the link to the page being read is underlined in the menu, as the bar marks its current entry; the contact dock's launcher is hidden while the menu is open, where the sheet already covered it; and a labeled burger, while the menu is open, folds only its lines to an X, where its words and its column of lines were caught by the X's rules too, a fault the open sheet covered. The group's own link in an open group now carries `aria-current` when it is the page being read, as the desktop panel's does. The light sheet, which no site has yet, shows no email and no address.
|
|
768
|
+
|
|
769
|
+
- **A light phone menu.** `menu: { surface: "light" }` in the site config (`SiteHeader`'s `menuSurface`, `SiteMenu`'s `surface` and `brand`) draws the menu on the page's ground: the lockup and a round close button across the top, the entries as rows, and the call to action and a card per number in a foot on the alternate ground (see [The Mega Menu](#the-mega-menu)). `dark` stays the default and draws as before. One component and one behavior: focus is trapped, Escape closes it, focus returns to the burger, the page holds still. `BrandLockup` takes `surface`, to draw one ground's mark alone, and `onClick`.
|
|
770
|
+
- **The menu's own words.** `cta.menuLabel` gives the menu's call to action its words where the bar keeps `label`. A header number's new `menuLabel` names it in the menu, falling back to `label`, then to "Call"; `label` keeps its place in the desktop bar's pill.
|
|
771
|
+
- **The light sheet** shows no email and no address, which the dark sheet's contact block does; its top row sits exactly where the bar's lockup and burger sit, and `--menu-rule` sets its dividers.
|
|
772
|
+
- **The burger** takes `menu.burger: { labelAfter, outlined }` (both off): the lines before the words, in an outlined pill.
|
|
773
|
+
- **The sticky bar on a hero page under a solid bar.** `cta.stickyFromTop` says whether the phone's sticky bar shows from the first paint; unset it does on a page without `heroNav`, as before, and a page with a hero under a solid bar sets it false so the bar slides in once the hero scrolls away.
|
|
774
|
+
- **The not found page's pending view.** `staticNotFoundRouting(NotFoundPage, { useMatches })` draws the page on a miss alone, so a slow client navigation shows no bare 404 body; a site drops its own pending component (see [The Not Found Page](#the-not-found-page)).
|
|
775
|
+
- **A refused send as a report.** `reportRefusedResponse(response, { service, request, tags })` from `@atelic-action/ui/monitoring/server` reports an upstream refusal with the status and the body's `name` and `message` alone, every address in them replaced by `[address]`; `refusalError` builds the error alone.
|
|
776
|
+
- **Every route's render crash reaches Sentry, whichever boundary catches it.** On TanStack Router 1.170 a route with no `errorComponent` already rises to `AppErrorBoundary` and is reported once; a route or a site that sets its own `errorComponent` with no `onCatch` caught the crash and reported it to nobody. A site adds the two lines under [Error Reporting](#error-reporting), `createRouter({ routeTree, ...routerErrorOptions() })` from `@atelic-action/ui/routing`, and every route's crash is reported once by its own boundary. The package's error page's Try Again reloads the page, since a loader's error stays on the router's match. `ErrorCatcherScript` takes `enabled` (default true), so the root route renders it only with a DSN. `reportServerErrorLater` from `@atelic-action/ui/monitoring/server` sends without holding the answer, on the platform's `waitUntil`. `atelic-check-sentry` now fails a DSN with a space or a line break around it, which the build would ship as set.
|
|
777
|
+
- **New tokens, each at today's look** (the table under [Tokens](#tokens)): `--hero-kicker-weight`, `--hero-kicker-tracking`, `--hero-kicker-size`, `--hero-lead-size`, `--hero-lead-measure`, `--hero-stack-gap`, `--menu-card-bg`, `--menu-card-ink`, `--menu-rule`, `--callout-sub-transform`, `--callout-sub-tracking`, `--subheading-tracking`, `--footer-link`, `--footer-link-hover`, `--footer-link-hover-decoration`, `--closing-link`, and `--closing-link-hover`. The 8.1.0 tokens whose default is a literal or a keyword default in `defaults.css` now; every default that names another token stays at its read, so a band that restates the named token still reaches it, exactly as in 8.1.0.
|
|
778
|
+
- **A dark ground says so with `data-ground`.** The sections the package draws on a dark or filled ground (the heroes, the credentials band, the callout panel, the price band, the process band, the contact card) wear `data-ground="dark"` or `"primary"`, and `--heading-color` steps aside on `[data-ground="dark"]`, `[data-ground="primary"]`, `.on-primary`, and `.on-dark`, beside the old list of those sections' classes, kept so markup carrying a class without the attribute behaves as before. A new dark section, the package's or a site's, needs only the attribute.
|
|
779
|
+
- **Fixes:** `atelic-check-sentry` fails a `VITE_SENTRY_DSN` of whitespace alone as malformed on every build, since a site's `Boolean(dsn)` treats it as set; `reportServerErrorLater` falls through to the platform's `waitUntil` when the context it is given has none it can call; the dark sheet's call to action is the `Button` primitive (the same markup, now with the base path and the number held whole); the contact dock measures again only on the header's own transition, never one inside it; a `tel:` link of an icon and its words holds its number whole, and the header's phone pill marks its number; `StickyCTABar` tells a swapped in `onSpaceChange` the height at once, where it waited for a resize; the contact dock measures its ceiling again when the header changes size or ends a transition; the header's call to action is the `Button` primitive (the same markup); `Footer` no longer sets `--footer-columns`, which nothing read.
|
|
780
|
+
|
|
717
781
|
### Moving to 8.1.0
|
|
718
782
|
|
|
719
783
|
Nothing breaks: every addition is an optional prop, config key, token, or entry. On a site that changes nothing, these change: the footer's hours, linked rating, and lockup; the fixes below; the current nav entry's underline on the solid bar; the credit link's underline; the footer's row wrapping a column before it squeezes a word; an email address breaking only at its @ or a dot; the contact dock never rising into the header; and the eyebrow's rule following its last line. Error reporting arrives for a site to wire.
|
|
@@ -778,7 +842,7 @@ Nothing breaks: every addition is an optional prop, config key, token, or entry.
|
|
|
778
842
|
| `SplitSection` | The two column band: copy beside copy, or media beside copy. `ratio` is `even`, `narrow-first`, or `media`, a fixed 420px shot column and the gap a card row uses, so a photo beside copy lines up with a case study entry above it; `even` and `narrow-first` stack below 920px, `media` below 761px |
|
|
779
843
|
| `PricingBand` | A brand colored band with the price in a card beside it, informational by design |
|
|
780
844
|
| `CTASection` | The standard closer: the site's own primary action and an optional ghost second |
|
|
781
|
-
| `FeatureGrid` | Numbered cards with a hover lift; a card is a link or holds one, never both |
|
|
845
|
+
| `FeatureGrid` | Numbered cards with a hover lift; a card is a link or holds one, never both; a linked card with `external` opens in a new tab and says so to a screen reader (`newTabLabel`, 8.3.0) |
|
|
782
846
|
| `FeatureDetail` | Alternating copy and media rows with tags and a tick list |
|
|
783
847
|
| `ProcessSteps` | A dark band of numbered steps beside a frame |
|
|
784
848
|
| `PricingCard` | A standalone price card with a tick list and its booking action |
|
|
@@ -795,7 +859,7 @@ Nothing breaks: every addition is an optional prop, config key, token, or entry.
|
|
|
795
859
|
| `MapEmbed` | The map: a screenshot linking to directions, or a click to load facade over the live embed |
|
|
796
860
|
| `HoursTable` | Day rows with dashed rules and mono times |
|
|
797
861
|
| `ContactForm` | Validated form with a honeypot that posts to `endpoint` (or hands off to mail); `onLead` replaces the default GA4 `generate_lead` event |
|
|
798
|
-
| `ContactInfoCard` | A dark card of direct contact rows: call, email, visit, portal |
|
|
862
|
+
| `ContactInfoCard` | A dark card of direct contact rows: call, email, visit, portal; the single phone row reads `phoneLabel`, default "Call" (8.3.0) |
|
|
799
863
|
| `FAQBrowser` | The help page: live search, a sticky `JumpRail` of categories with scroll spy, expand all, deep links; `contactHref` sets where the no match line points |
|
|
800
864
|
| `JumpRail` | Sticky in page pill tabs with scroll spy, used by `FAQBrowser` and on its own |
|
|
801
865
|
| `BlogIndex` | The post listing as a readable stack |
|
|
@@ -806,7 +870,7 @@ The primitives that came with them, in `@atelic-action/ui/primitives`: `ImageFra
|
|
|
806
870
|
|
|
807
871
|
The entry also exports the helpers the sections use, for a site's own code: `formatClock`, `formatHoursRange`, and `isClosed` for hours, `isHoneypotFilled`, and `trackEvent`.
|
|
808
872
|
|
|
809
|
-
Hours print on the 12 hour clock unless the site's config sets `clock: "24h"`, which turns "9a to 5p" into "09:00 to 17:00" everywhere hours appear: `LocationSection` and `HoursTable` (which takes `clock` as a prop when used on its own). `formatClock` and `formatHoursRange` take the same `clock`
|
|
873
|
+
Hours print on the 12 hour clock unless the site's config sets `clock: "24h"`, which turns "9a to 5p" into "09:00 to 17:00" everywhere hours appear: `LocationSection` and `HoursTable` (which takes `clock` as a prop when used on its own). `meridiem: "word"` (8.3.0) marks the 12 hour clock with a word, "9 am to 5 pm", wherever hours print (`HoursTable`'s `meridiem` when used on its own). The footer prints the short form, a whole hour's minutes dropped ("8a to 5p"), unless `footer.hoursShort` is false, so "8:00 am to 5:00 pm" in the footer is `meridiem: "word"` with `footer: { hoursShort: false }`, no site code. `formatClock` and `formatHoursRange` take the same `clock`, `meridiem`, and `short` options for a site's own code.
|
|
810
874
|
|
|
811
875
|
### The Marketing Vite Config and Commands
|
|
812
876
|
|
|
@@ -987,7 +1051,7 @@ The plain text alternative part ports as plain functions with no React anywhere
|
|
|
987
1051
|
|
|
988
1052
|
### Tokens
|
|
989
1053
|
|
|
990
|
-
The sheets read a set of tokens beyond the theme's palette, type, radii, and layout. Each has a default, declared once in `styles/defaults.css` on `:where(.atelic-ui)`, which weighs nothing, so a theme's own `.atelic-ui` rule wins and sets one only to change it; every default is the value the sheets used before it was a token, so a site that sets none looks as it did (8.0.0). Every layered sheet imports `defaults.css` first, so a sheet loaded alone still finds its defaults. No layered sheet paints a raw color anywhere else: `tst/no-raw-colors.test.ts` sweeps every sheet in `src/styles/` but the ones it excludes by name with a reason (`app.css`, Tailwind source outside the layer), and fails on a hex, a color function, or a named color outside a token's declaration in the defaults sheet, with its few exceptions listed in the test, each with its reason.
|
|
1054
|
+
The sheets read a set of tokens beyond the theme's palette, type, radii, and layout. Each has a default, declared once in `styles/defaults.css` on `:where(.atelic-ui)`, which weighs nothing, so a theme's own `.atelic-ui` rule wins and sets one only to change it; every default is the value the sheets used before it was a token, so a site that sets none looks as it did (8.0.0). Every layered sheet imports `defaults.css` first, so a sheet loaded alone still finds its defaults. Only a default that is a literal value or a system keyword is declared there; an inherited color is `currentColor`, which is the same thing. Every other default stays at the read, marked "read in place" below: a default that names another token (`--menu-cta-bg` falls back to `--primary-fill`, then `--primary`), since declared on the root it would resolve once there and a band that restates the named token below it would no longer reach it, as `--primary-fill` and `--primary-ink` never have; a chain read more than once is written once as a private property on the component's own root (`--_menu-cta-bg` on the menu's sheet, `--_header-gutter` on the bar), where it resolves below any band. Also read in place: one computed on the element itself (`--hero-split-pad`), an inherited one other than a color (`--callout-sub-font`, the plain address's `--footer-nap-weight`), since a custom property cannot hold `inherit`, and `--hero-stack-gap`, whose gaps each keep their own value unset. `defaults.css` lists them in one comment, and `Foundations/ThemeTokens`' `BandRestatingPrimary` and `Chrome/SiteMenu`'s `CTAInABandRestatingPrimary` prove a band reaches them (8.2.0). No layered sheet paints a raw color anywhere else: `tst/no-raw-colors.test.ts` sweeps every sheet in `src/styles/` but the ones it excludes by name with a reason (`app.css`, Tailwind source outside the layer), and fails on a hex, a color function, or a named color outside a token's declaration in the defaults sheet, with its few exceptions listed in the test, each with its reason.
|
|
991
1055
|
|
|
992
1056
|
**The primary does three jobs, and each has its own token.** `--primary` is the brand color as a mark: lines, rules, focus rings, icons, stars, dots, and accents that carry no words. `--primary-fill` is the primary as a field that carries words: the primary button, the dock's launcher and panel head, the split hero and the callout panel bands, the price band, the menu's badges and highlighted row, the reveal slider's after label, the map's directions chip, a step bubble's badge; the words on it read `--on-primary`, and its hover and press darken it, so they stay distinct even where a theme's fill is its old hover shade. `--primary-ink` is the primary as words on `--surface` and `--surface-alt`: the eyebrow, a serif accent in a heading, the current nav entry and panel link, inline accent links, a feature number, the info tone. Both new tokens fall back to `--primary` where they are read, so a site that sets neither looks as it did, and a band that restates `--primary` carries both with it. A bright brand color that cannot pass text contrast keeps `--primary` and sets the other two deeper; the Storybook theme (`.storybook/theme.css`) sets `--primary` `#fc4a1a`, `--primary-fill` `#d63a10` (white on it 4.70 to 1), and `--primary-ink` `#b8300b` (5.38 to 1 on `--surface`, 4.97 on `--surface-alt`, 4.80 under the bar's hover tint).
|
|
993
1057
|
|
|
@@ -1012,16 +1076,35 @@ The sheets read a set of tokens beyond the theme's palette, type, radii, and lay
|
|
|
1012
1076
|
| `--weight-light`, `--weight-regular`, `--weight-medium`, `--weight-semibold`, `--weight-strong`, `--weight-bold`, `--weight-heavy` | 300, 400, 500, 600, 650, 700, 800 | Every font weight in every layered sheet. A font kit with only 400 and 700 maps each name to one of those (medium to 400, semibold, strong, and heavy to 700), so the browser synthesizes no weight |
|
|
1013
1077
|
| `--brand-mark-height` | `30px` (20px inside `ArtifactShell`) | The header mark's height, and a sent document's recipient mark; the width follows the image's own ratio |
|
|
1014
1078
|
| `--sticky-cta-space` | `0px`, read in place | The room the phone's sticky bar takes while it shows, which the closing bar pads its foot by; `SiteShell` sets it on its root from `StickyCTABar`'s measurement, and a theme never does |
|
|
1015
|
-
| `--header-max`, `--header-gutter` | `--max-width`, `--gutter`, read in place | The bar's and the mega panel's width and side gutter, for a design that runs the bar wider than the content (8.1.0) |
|
|
1016
|
-
| `--nav-open-bg`, `--nav-open-ink` | `--hover-tint
|
|
1079
|
+
| `--header-max`, `--header-gutter` | `--max-width`, `--gutter`, read in place (on the bar, and on the light menu's top row, which sits where the bar's content does) | The bar's and the mega panel's width and side gutter, for a design that runs the bar wider than the content (8.1.0) |
|
|
1080
|
+
| `--nav-open-bg`, `--nav-open-ink` | `--hover-tint` read in place, `currentColor` (the bar's words) | The open group's pill (8.1.0) |
|
|
1017
1081
|
| `--nav-phone-pad`, `--nav-phone-size` | `6px 16px 6px 12px`, `0.95rem` | The header phone pill's padding and its number's size (8.1.0) |
|
|
1018
|
-
| `--heading-transform`, `--heading-weight`, `--heading-tracking`, `--heading-color` | `none`, `--weight-heavy`, `-0.02em`, inherited | Every `h1` and `h2` the package sets (section headings, the heroes', the page hero's). The color never reaches a heading on a
|
|
1019
|
-
| `--
|
|
1020
|
-
| `--
|
|
1021
|
-
| `--
|
|
1022
|
-
| `--hero-
|
|
1023
|
-
| `--
|
|
1024
|
-
| `--
|
|
1082
|
+
| `--heading-transform`, `--heading-weight`, `--heading-tracking`, `--heading-color` | `none`, `--weight-heavy`, `-0.02em`, `currentColor` (inherited) | Every `h1` and `h2` the package sets (section headings, the heroes', the page hero's). The color never reaches a heading on a ground that says it is dark or the primary fill, by `data-ground` (8.2.0: every such section the package draws wears it, the hero, the process band, the callout panel, the price band, the credentials band, the contact card, and a site's own dark band may) or by `.on-primary` or `.on-dark`, nor one a component colors itself (8.1.0) |
|
|
1083
|
+
| `--subheading-tracking` | `-0.015em` | Every `h3`'s tracking, and two thirds of it every `h4`'s (`-0.01em` at the default), as `--heading-tracking` reaches `h1` and `h2`; a brand setting headings flat sets it to `0` (8.2.0). Set a length; a theme that sets `normal` gets `normal` on `h3` and a flat `h4` (8.3.0: the `h4` took its parent's tracking) |
|
|
1084
|
+
| `--hero-kicker-weight`, `--hero-kicker-tracking`, `--hero-kicker-size` | the eyebrow primitive's own (`--weight-medium`, `0.18em`, `0.74rem`), read in place from its private properties | The hero's eyebrow line, both layouts (8.2.0) |
|
|
1085
|
+
| `--hero-lead-measure` | `52ch` | The hero's lead paragraph's measure, both layouts (8.2.0) |
|
|
1086
|
+
| `--hero-stack-gap` | none; unset, each gap keeps its own (18, 22, and 32px on the full hero, 12, 22, and 26px on the split hero), read in place | One gap between the hero's kicker and headline, headline and lead, and lead and actions, both layouts (8.2.0) |
|
|
1087
|
+
| `--hero-gap-kicker`, `--hero-gap-lead`, `--hero-gap-actions` | `--hero-stack-gap` when set, else the gap's own (kicker to headline 18px, 12px on the split hero; headline to lead 22px; lead to actions 32px, 26px on the split hero), read in place | Each of the hero's three gaps on its own, both layouts (8.3.0) |
|
|
1088
|
+
| `--hero-lead-leading` | `1.55` | The hero's lead paragraph's line height, both layouts (8.3.0) |
|
|
1089
|
+
| `--hero-kicker-display`, `--hero-kicker-leading` | `inline-block`, inherited, read in place | The hero's kicker as the inline block it has been, in a line box of the copy's leading that stands it taller than its type; `block` with a leading of its own lays it out as a block whose height is that leading, so a design's kicker takes its drawn height (8.3.0) |
|
|
1090
|
+
| `--hero-actions-gap` | `14px` | The gap between the hero's actions, side by side or stacked (8.3.0) |
|
|
1091
|
+
| `--hero-split-pad-block` | `--section-space`, read in place | The split hero's copy column's top and bottom padding; over a transparent bar from 900px the bar's height is added above it, as before (8.3.0) |
|
|
1092
|
+
| `--hero-lead-size` | `clamp(1.05rem, 2.2vw, 1.35rem)` | The hero's lead paragraph (`subtitle`), both layouts; a split hero whose lead wraps too long sets it smaller (8.2.0) |
|
|
1093
|
+
| `--card-title-color` | `currentColor` (inherited) | A `FeatureGrid` card's title (8.1.0) |
|
|
1094
|
+
| `--callout-transform`, `--callout-sub-font` | `none`, inherited (read in place, since no custom property can hold `inherit`) | A `CalloutPanel` title's case and its line's face (8.1.0) |
|
|
1095
|
+
| `--callout-sub-transform`, `--callout-sub-tracking` | `none`, `normal` | A `CalloutPanel` subtitle's case and tracking (8.2.0) |
|
|
1096
|
+
| `--proof-star-fill` | `--primary`, read in place | A star row in a `ProofStrip` value (8.1.0) |
|
|
1097
|
+
| `--hero-split-pad` | the wrap's edge, computed on the copy (read in place) | The split hero's copy sides (8.1.0) |
|
|
1098
|
+
| `--footer-mark-height`, `--footer-nap-weight` | `38px`, `--weight-semibold` (the plain address: the column's own, read in place, since no custom property can hold `inherit`) | The footer lockup's mark and the address, phone, and email lines (8.1.0) |
|
|
1099
|
+
| `--footer-link`, `--footer-link-hover` | `--neutral-200`, `--on-dark`, read in place | The footer's column links and every footer link's hover, apart from the neutrals that also draw outlines (8.2.0) |
|
|
1100
|
+
| `--footer-link-hover-decoration` | `none` | The line a footer column link and a contact line take on hover (`underline`), for a theme whose links are already the hover's color, where a hover by color alone shows nothing (8.2.0) |
|
|
1101
|
+
| `--footer-link-size` | `1em` (the footer's own size, as the links always inherited) | The footer's column links' size, to a design's proportion (8.3.0) |
|
|
1102
|
+
| `--footer-brand-width` | none; unset, the brand column's share is 1.4, or 2 beside the hours from 1100px, read in place | The brand column's share of the footer's row from 760px, a link column's being 1 (8.3.0) |
|
|
1103
|
+
| `--closing-rule-inset` | `0px` | How far in from each side the rule above the closing bar starts; `max(var(--gutter), calc((100% - var(--max-width)) / 2 + var(--gutter)))` sets it inside the content's width (8.3.0) |
|
|
1104
|
+
| `--closing-link`, `--closing-link-hover` | `--neutral-300`, `--surface` mixed 96% with `--on-dark`, read in place | The closing bar's links, the credit's among them, and their hover. Their own pair, since the closing bar's links have always read a step quieter than the footer's (8.2.0) |
|
|
1105
|
+
| `--menu-card-bg`, `--menu-card-ink` | `--primary-deep`, `--on-primary`, read in place | The mega panel's feature card: its ground, and its eyebrow, headline, line, and ticked points. The card is the primary field (`.on-primary`), so its button stays light; a theme that sets a light ground here checks the button against it (8.2.0) |
|
|
1106
|
+
| `--menu-rule` | `--hairline`, read in place | The light phone menu's row dividers (8.2.0) |
|
|
1107
|
+
| `--menu-badge-bg`, `--menu-badge-ink`, `--menu-cta-bg`, `--menu-cta-ink` | `--primary-fill`, `--on-primary` (as 8.0.0 drew them), read in place | The phone menu's badge and call to action. A theme whose sheet's ground equals its primary sets them to `--on-primary` and `--primary-ink`, or they vanish into the sheet (8.1.0) |
|
|
1025
1108
|
| `--link-columns-min` | `170px` | The least a `LinkColumns` column narrows to (8.1.0) |
|
|
1026
1109
|
| `--section-space`, `--block-gap`, `--card-min` | `clamp(56px, 9vw, 120px)`, `44px`, `240px` | The section rhythm where no `base.css` sets it (an app importing `components.css` alone); with `base.css` the settings under [Density](#density) win |
|
|
1027
1110
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* shipped, so this file imports nothing and touches only what a function and
|
|
6
6
|
* the middleware runtime both have (fetch, `AbortController`, `crypto`).
|
|
7
7
|
*
|
|
8
|
-
* import { reportServerError, withErrorReporting } from "@atelic-action/ui/monitoring/server";
|
|
8
|
+
* import { reportServerError, reportServerErrorLater, withErrorReporting } from "@atelic-action/ui/monitoring/server";
|
|
9
9
|
*
|
|
10
10
|
* Privacy: a report carries the request's method and path, and its user
|
|
11
11
|
* agent, never its body, its query string, or any other header. A contact
|
|
@@ -64,6 +64,63 @@ export declare function buildEnvelope(error: unknown, dsn: string, options?: Omi
|
|
|
64
64
|
* failure. With no DSN it sends nothing.
|
|
65
65
|
*/
|
|
66
66
|
export declare function reportServerError(error: unknown, options?: ServerReportOptions): Promise<boolean>;
|
|
67
|
+
/**
|
|
68
|
+
* What a handler's context offers to keep work running after the answer has
|
|
69
|
+
* gone: the second argument of an edge middleware or a Vercel function
|
|
70
|
+
* (`context.waitUntil`), or any object holding a `waitUntil` like it.
|
|
71
|
+
*/
|
|
72
|
+
export interface WaitUntilContext {
|
|
73
|
+
waitUntil(promise: Promise<unknown>): void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Reports an error without making the caller wait for it. The send starts
|
|
77
|
+
* at once and is handed to the platform's `waitUntil` (the `context` given,
|
|
78
|
+
* else Vercel's request context), which keeps the function alive until it
|
|
79
|
+
* finishes after the answer has gone. With neither, the send still runs,
|
|
80
|
+
* never blocking the answer, and may be cut short if the runtime freezes
|
|
81
|
+
* once the answer is out. Never throws, and returns nothing to wait on.
|
|
82
|
+
*
|
|
83
|
+
* Use `reportServerError`, awaited, where the report must land before the
|
|
84
|
+
* handler goes on (before a throw, in a handler that already waits); use
|
|
85
|
+
* this one where the answer should leave at once (a refusal the person is
|
|
86
|
+
* waiting to read).
|
|
87
|
+
*/
|
|
88
|
+
export declare function reportServerErrorLater(error: unknown, options?: ServerReportOptions & {
|
|
89
|
+
context?: WaitUntilContext;
|
|
90
|
+
}): void;
|
|
91
|
+
/**
|
|
92
|
+
* A refused upstream answer as an error a report may carry: the service's
|
|
93
|
+
* name, the status, and the error body's `name` and `message` fields alone,
|
|
94
|
+
* each with anything shaped like an email address replaced by `[address]`
|
|
95
|
+
* and anything shaped like a phone number (grouped as one is written) by
|
|
96
|
+
* `[number]`, then cut to 300
|
|
97
|
+
* characters. Nothing else of the body is read, and a body that is not JSON
|
|
98
|
+
* leaves the status alone. Never throws.
|
|
99
|
+
*
|
|
100
|
+
* The scrub takes out the shapes it knows and nothing more: the fields are
|
|
101
|
+
* still the upstream's free text, and a name, a street, or a message quoted
|
|
102
|
+
* in it in words passes through. Report a refusal from a service whose
|
|
103
|
+
* errors are about the request, never one that echoes what a person wrote.
|
|
104
|
+
*
|
|
105
|
+
* await refusalError(response, "Resend") // Error("Resend answered 422: validation_error: ...")
|
|
106
|
+
*/
|
|
107
|
+
export declare function refusalError(response: Response, service?: string): Promise<Error>;
|
|
108
|
+
/**
|
|
109
|
+
* Reports a refused upstream answer (a send the mail service would not
|
|
110
|
+
* take) without holding the caller's own answer: the error is built by
|
|
111
|
+
* `refusalError`, so no address in the refusal survives, and sent by
|
|
112
|
+
* `reportServerErrorLater`. Resolves once the refusal's body is read, never
|
|
113
|
+
* waiting on the send, and never throws.
|
|
114
|
+
*
|
|
115
|
+
* if (!response.ok) {
|
|
116
|
+
* await reportRefusedResponse(response, { service: "Resend", request, tags: { route: "contact" } });
|
|
117
|
+
* return json(502, { ok: false, error: "Sending failed. Please try again in a moment." });
|
|
118
|
+
* }
|
|
119
|
+
*/
|
|
120
|
+
export declare function reportRefusedResponse(response: Response, options?: ServerReportOptions & {
|
|
121
|
+
service?: string;
|
|
122
|
+
context?: WaitUntilContext;
|
|
123
|
+
}): Promise<void>;
|
|
67
124
|
/**
|
|
68
125
|
* Wraps a function's handler so a throw is reported, then thrown again: the
|
|
69
126
|
* platform still answers the request as it would have, and Sentry hears of
|