kaafil-react-uikit 0.1.0 → 0.2.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.
Files changed (47) hide show
  1. package/dist/admin/index.cjs +342 -342
  2. package/dist/admin/index.js +5 -5
  3. package/dist/{chunk-YHOQRKDJ.cjs → chunk-57SUK3GD.cjs} +7 -7
  4. package/dist/{chunk-YHOQRKDJ.cjs.map → chunk-57SUK3GD.cjs.map} +1 -1
  5. package/dist/{chunk-WS2DKREI.cjs → chunk-6WV5VYT2.cjs} +111 -95
  6. package/dist/chunk-6WV5VYT2.cjs.map +1 -0
  7. package/dist/{chunk-CURTZGHY.js → chunk-7ISKFGLW.js} +18 -7
  8. package/dist/chunk-7ISKFGLW.js.map +1 -0
  9. package/dist/{chunk-W5PG3IUJ.cjs → chunk-7UFX3Y2U.cjs} +4 -4
  10. package/dist/{chunk-W5PG3IUJ.cjs.map → chunk-7UFX3Y2U.cjs.map} +1 -1
  11. package/dist/{chunk-2SRBJ4H7.js → chunk-A4Z2YBEF.js} +19 -5
  12. package/dist/chunk-A4Z2YBEF.js.map +1 -0
  13. package/dist/{chunk-PYETPKTT.js → chunk-GJ2J3PYN.js} +3 -3
  14. package/dist/{chunk-PYETPKTT.js.map → chunk-GJ2J3PYN.js.map} +1 -1
  15. package/dist/{chunk-M2D6CZK2.cjs → chunk-HTIY33UH.cjs} +37 -37
  16. package/dist/{chunk-M2D6CZK2.cjs.map → chunk-HTIY33UH.cjs.map} +1 -1
  17. package/dist/{chunk-PDQVVJCS.js → chunk-KW5LH6KV.js} +3 -3
  18. package/dist/{chunk-PDQVVJCS.js.map → chunk-KW5LH6KV.js.map} +1 -1
  19. package/dist/{chunk-JMWXQTE3.js → chunk-L3QEMEFM.js} +3 -3
  20. package/dist/{chunk-JMWXQTE3.js.map → chunk-L3QEMEFM.js.map} +1 -1
  21. package/dist/{chunk-E42K6UMM.js → chunk-LJJMNZ7B.js} +5 -5
  22. package/dist/{chunk-E42K6UMM.js.map → chunk-LJJMNZ7B.js.map} +1 -1
  23. package/dist/{chunk-TF3GCIDK.cjs → chunk-OZJ74DVQ.cjs} +23 -12
  24. package/dist/chunk-OZJ74DVQ.cjs.map +1 -0
  25. package/dist/{chunk-2MWTLYVP.cjs → chunk-RG4YDSCN.cjs} +17 -17
  26. package/dist/{chunk-2MWTLYVP.cjs.map → chunk-RG4YDSCN.cjs.map} +1 -1
  27. package/dist/{chunk-7WXE5SUS.js → chunk-RSC2ZJUP.js} +35 -19
  28. package/dist/chunk-RSC2ZJUP.js.map +1 -0
  29. package/dist/{chunk-FFXGZZGJ.js → chunk-SIAPCJ7G.js} +5 -5
  30. package/dist/{chunk-FFXGZZGJ.js.map → chunk-SIAPCJ7G.js.map} +1 -1
  31. package/dist/{chunk-V36WWMTF.cjs → chunk-UALMCHNW.cjs} +19 -5
  32. package/dist/chunk-UALMCHNW.cjs.map +1 -0
  33. package/dist/{chunk-PCDEJHWL.cjs → chunk-YNHOPYBK.cjs} +12 -12
  34. package/dist/{chunk-PCDEJHWL.cjs.map → chunk-YNHOPYBK.cjs.map} +1 -1
  35. package/dist/core/index.cjs +113 -113
  36. package/dist/core/index.js +11 -11
  37. package/dist/manager/index.cjs +239 -239
  38. package/dist/manager/index.js +6 -6
  39. package/dist/traveller/index.cjs +35 -35
  40. package/dist/traveller/index.js +5 -5
  41. package/package.json +2 -2
  42. package/dist/chunk-2SRBJ4H7.js.map +0 -1
  43. package/dist/chunk-7WXE5SUS.js.map +0 -1
  44. package/dist/chunk-CURTZGHY.js.map +0 -1
  45. package/dist/chunk-TF3GCIDK.cjs.map +0 -1
  46. package/dist/chunk-V36WWMTF.cjs.map +0 -1
  47. package/dist/chunk-WS2DKREI.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { useKaafilChrome, useOutboxStatus, useCapabilities, usePersona, tokenStyle } from './chunk-2SRBJ4H7.js';
1
+ import { useKaafilChrome, useOutboxStatus, useCapabilities, usePersona, tokenStyle } from './chunk-A4Z2YBEF.js';
2
2
  import { useState, useRef, useId, useEffect } from 'react';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
 
@@ -283,5 +283,5 @@ function SessionExpiredScreen({
283
283
  }
284
284
 
285
285
  export { BootErrorScreen, LockedTripScreen, NotFoundScreen, OfflineFallbackScreen, PlanLockedScreen, SessionExpiredScreen };
286
- //# sourceMappingURL=chunk-PYETPKTT.js.map
287
- //# sourceMappingURL=chunk-PYETPKTT.js.map
286
+ //# sourceMappingURL=chunk-GJ2J3PYN.js.map
287
+ //# sourceMappingURL=chunk-GJ2J3PYN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shared/system-screens/BootErrorScreen.tsx","../src/shared/system-screens/internal/SystemScreenFrame.tsx","../src/shared/system-screens/LockedTripScreen.tsx","../src/shared/system-screens/NotFoundScreen.tsx","../src/shared/system-screens/OfflineFallbackScreen.tsx","../src/shared/system-screens/PlanLockedScreen.tsx","../src/shared/system-screens/SessionExpiredScreen.tsx"],"names":["jsx","jsxs","Fragment","useState"],"mappings":";;;;AAgEA,IAAM,IAAA,GAAkD;AAAA,EACtD,cAAA,EACE,yFAAA;AAAA,EACF,mBAAA,EACE,sFAAA;AAAA,EACF,kBAAA,EAAoB,+EAAA;AAAA,EACpB,YAAA,EAAc,2EAAA;AAAA,EACd,IAAA,EAAM,gGAAA;AAAA,EACN,OAAA,EAAS;AACX,CAAA;AAEA,IAAM,KAAA,GAAuB;AAAA,EAC3B,SAAA,EAAW,YAAA;AAAA,EACX,aAAA,EAAe,OAAA;AAAA,EACf,YAAA,EAAc,MAAA;AAAA,EACd,WAAA,EAAa,MAAA;AAAA,EACb,OAAA,EAAS,QAAA;AAAA,EACT,MAAA,EAAQ,mBAAA;AAAA,EACR,YAAA,EAAc,MAAA;AAAA,EACd,UAAA,EAAY,SAAA;AAAA,EACZ,KAAA,EAAO,SAAA;AAAA,EACP,UAAA,EAAY,wDAAA;AAAA,EACZ,QAAA,EAAU,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REEN THAT CANNOT ASSUME ANYTHING ───────────────────────────\n//\n// It renders when `<KaafilUIKitProvider>` itself never opened, mounted by\n// the integrator's own error boundary around it. That means:\n//\n// · NO `I18nShell` → no `t()`. The copy below is ENGLISH ONLY, and that\n// is the spec's own DELTA, not an oversight.\n// · NO `ThemeShell` → no resolved tokens.\n// · NO `usePersona` → the credential never opened, so there is no\n// resolved persona to fork a presentation on. This is\n// the ONE screen in the tier that ships a single\n// rendering for every mounting context, including the\n// share surface — `public`'s richer reading layout\n// depends on shells that did not run.\n// · NO hook of any kind. There is no context above it to read.\n//\n// ── WHY IT CARRIES INLINE STYLES, WHICH NOTHING ELSE HERE DOES ───────────\n//\n// The stylesheet is OPT-IN (`import \"kaafil-react-uikit/styles\"`), so this\n// screen may render with no CSS whatsoever — and it is the one screen whose\n// entire job is explaining a total failure. Unstyled black-on-white text is\n// a poor way to do that, and a token reference resolves to nothing when the\n// ladder never loaded.\n//\n// So every node carries BOTH: an inline style that works with zero CSS, and\n// a `.kf-boot-error-screen__*` class so a host that DID load the stylesheet\n// can restyle it. The literals below are deliberate and must not be\n// \"corrected\" into `var(--kf-*)` — doing so silently breaks the only case\n// this screen exists for. dx-05 governs `src/styles/components/**` and does\n// not reach here, which is consistent rather than a loophole: the rule\n// exists so a stylesheet cannot shadow a token, and this file is not one.\n\nimport type { CSSProperties, ReactNode } from 'react';\nimport { useState } from 'react';\n\n/** The same failure modes `<KaafilSessionProbe/>` distinguishes, plus the\n * honest sixth for anything unclassifiable. */\nexport type BootFailureMode =\n | 'endpoint-401'\n | 'wrong-environment'\n | 'test-key-on-live'\n | 'clock-skew'\n | 'cors'\n | 'unknown';\n\nexport interface BootErrorScreenProps {\n readonly failureMode?: BootFailureMode;\n /** The underlying error's message. Rendered behind a disclosure, never\n * inline in the primary copy — it is developer-facing. */\n readonly detail?: string;\n /** Remounts the entire provider tree; some boot failures (a `kf_test_`\n * key shipped to production) cannot be fixed by retrying at all, which\n * is why this is optional. */\n readonly onRetry?: () => void;\n readonly components?: { readonly BootErrorScreenUI?: () => ReactNode };\n}\n\n/** English-only by contract — see this file's header. Each line says what\n * an integrator can actually DO, because the audience for a boot failure is\n * whoever wired the provider, not an end user. */\nconst COPY: Readonly<Record<BootFailureMode, string>> = {\n 'endpoint-401':\n 'The API key or session token was rejected. Check the credential the provider was given.',\n 'wrong-environment':\n 'This credential belongs to a different environment than the endpoint it was sent to.',\n 'test-key-on-live': 'A test key was used against live. Retrying will not help — swap the key.',\n 'clock-skew': \"This device's clock is too far from the server's for a token to validate.\",\n cors: 'The browser blocked the request before it was sent. This origin is not allowlisted on the API.',\n unknown: 'Kaafil could not start. The detail below may say why.',\n};\n\nconst PANEL: CSSProperties = {\n boxSizing: 'border-box',\n maxInlineSize: '32rem',\n marginInline: 'auto',\n marginBlock: '3rem',\n padding: '1.5rem',\n border: '1px solid #e3ded7',\n borderRadius: '10px',\n background: '#ffffff',\n color: '#1c1917',\n fontFamily: 'system-ui, -apple-system, Segoe UI, Roboto, sans-serif',\n fontSize: '0.875rem',\n lineHeight: 1.5,\n};\n\nconst TITLE: CSSProperties = { margin: '0 0 0.5rem', fontSize: '1rem', fontWeight: 600 };\nconst BODY: CSSProperties = { margin: '0 0 1rem', color: '#57534e' };\nconst CODE: CSSProperties = {\n display: 'block',\n overflowX: 'auto',\n marginBlockStart: '0.5rem',\n padding: '0.75rem',\n borderRadius: '6px',\n background: '#f5f5f4',\n color: '#44403c',\n fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',\n fontSize: '0.75rem',\n whiteSpace: 'pre-wrap',\n};\nconst BUTTON: CSSProperties = {\n padding: '0.5rem 1rem',\n border: '0',\n borderRadius: '8px',\n background: '#1c1917',\n color: '#ffffff',\n fontSize: '0.8125rem',\n fontWeight: 500,\n cursor: 'pointer',\n};\nconst TOGGLE: CSSProperties = {\n marginBlockStart: '1rem',\n color: '#78716c',\n fontSize: '0.75rem',\n cursor: 'pointer',\n};\n\nexport function BootErrorScreen({\n failureMode = 'unknown',\n detail,\n onRetry,\n components,\n}: BootErrorScreenProps): ReactNode {\n const [showDetail, setShowDetail] = useState(false);\n const Override = components?.BootErrorScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <div className=\"kf-boot-error-screen\" style={PANEL} role=\"alert\">\n <h1 className=\"kf-boot-error-screen__title\" style={TITLE}>\n Kaafil could not start\n </h1>\n <p className=\"kf-boot-error-screen__body\" style={BODY}>\n {COPY[failureMode]}\n </p>\n\n {onRetry === undefined ? null : (\n <button\n type=\"button\"\n className=\"kf-boot-error-screen__retry\"\n style={BUTTON}\n onClick={onRetry}\n >\n Try again\n </button>\n )}\n\n {detail === undefined || detail === '' ? null : (\n <div className=\"kf-boot-error-screen__detail\">\n {/* A disclosure rather than always-on: the message is the\n * underlying error's, which can be long and is not the first\n * thing a reader needs. */}\n <button\n type=\"button\"\n className=\"kf-boot-error-screen__detail-toggle\"\n style={{ ...TOGGLE, background: 'none', border: 0, padding: 0 }}\n aria-expanded={showDetail}\n onClick={() => setShowDetail((open) => !open)}\n >\n {showDetail ? 'Hide technical detail' : 'Show technical detail'}\n </button>\n {showDetail ? (\n <code className=\"kf-boot-error-screen__detail-text\" style={CODE}>\n {detail}\n </code>\n ) : null}\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\n// The one frame the five context-reading system screens share.\n//\n// ── THE PRESENTATION FORK IS REAL, AND IT IS NOT A PROP ───────────────────\n//\n// `shared/01-system-screens.md` records a `Presentation notes by mounting\n// context` field on every screen: an `admin`-family mount is a CONTAINED\n// CARD inside the host's own CRM page, a `manager`-family mount is a\n// FULL-VIEWPORT takeover with its primary action reachable without\n// scrolling. The spec is explicit that this is a genuine layout-model fork\n// (`03-layer-contract.md §5` level 3), not a spacing difference — and\n// equally explicit that it is ONE component, never two named variants.\n//\n// It is derived from `usePersona()`, never from a prop. Hard rule #7: no\n// `persona` prop and no `mode` prop exists anywhere, and dx-07 fails the\n// build on either. The credential decides.\n//\n// ── WHY THIS IS A FRAME AND NOT AN ATOM ──────────────────────────────────\n//\n// The spec's `Composes` rows name `EmptyState`/`Button`/`Banner` atoms from\n// `atomic/*`. Those do not exist: the v2 rebuild ships no shared\n// `/primitives` layer, by decision — each family owns whatever atoms it\n// needs. So these five screens share a FRAME (the layout fork, the focus\n// move, the announcement) and own their own content, rather than depending\n// on a primitives package this package deliberately does not have.\n\nimport type { ReactNode } from 'react';\nimport { useEffect, useId, useRef } from 'react';\nimport { usePersona } from '../../../core/hooks/usePersona.js';\nimport type { KaafilTokenOverrides } from '../../../primitives/internal/tokenStyle.js';\nimport { tokenStyle } from '../../../primitives/internal/tokenStyle.js';\n\nexport interface SystemScreenFrameProps {\n /** BEM block name — each screen owns its own, so a host can target one\n * without catching the rest (`.kf-session-expired-screen__*`). */\n readonly block: string;\n readonly title: string;\n readonly body: ReactNode;\n /** Rendered below the body. On a field mount this is what the sticky\n * action region holds. */\n readonly actions?: ReactNode;\n /** An error/context line above the title. */\n readonly banner?: ReactNode;\n readonly icon?: ReactNode;\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function SystemScreenFrame({\n block,\n title,\n body,\n actions,\n banner,\n icon,\n style,\n}: SystemScreenFrameProps): ReactNode {\n const persona = usePersona();\n const headingRef = useRef<HTMLHeadingElement>(null);\n const headingId = useId();\n\n // A field mount owns the whole screen; a desk mount is embedded beside the\n // host's own nav and must not consume the viewport (briefing §27.7).\n // `traveller` takes the contained treatment too — only `OfflineFallback`\n // and `BootError` reach the public surface, and neither should black out\n // a document a host has embedded.\n const layout = persona === 'manager' ? 'takeover' : 'contained';\n\n // FOCUS MOVES TO THE HEADING on mount. This is a full state replacement,\n // not an overlay — there is no opener to return focus to, so the\n // overlay-focus contract (`12-accessibility.md §3`) does not apply and the\n // heading is the correct landing point. Without this a keyboard or screen\n // reader user gets no signal that the page became something else and Tab\n // keeps walking whatever is still behind it.\n useEffect(() => {\n headingRef.current?.focus();\n }, []);\n\n return (\n <div\n className=\"kf-system-screen\"\n data-block={block}\n data-layout={layout}\n style={tokenStyle(style)}\n // A significant, infrequent state change — announced politely rather\n // than assertively, since the focus move above already carries the\n // urgency and `assertive` would interrupt whatever is mid-sentence.\n role=\"status\"\n aria-live=\"polite\"\n aria-labelledby={headingId}\n >\n <div className={`kf-system-screen__panel ${block}`}>\n {icon === undefined ? null : (\n <span className=\"kf-system-screen__glyph\" aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {banner === undefined ? null : <div className=\"kf-system-screen__banner\">{banner}</div>}\n {/* `tabIndex={-1}` so the effect above can focus it — a heading is\n * not focusable by default and focusing the panel instead would\n * draw the accent ring around the entire card. */}\n <h1 ref={headingRef} id={headingId} tabIndex={-1} className=\"kf-system-screen__title\">\n {title}\n </h1>\n <div className=\"kf-system-screen__body\">{body}</div>\n {actions === undefined ? null : <div className=\"kf-system-screen__actions\">{actions}</div>}\n </div>\n </div>\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §LockedTripScreen`.\n//\n// The destination for a WRITE-ONLY deep link into a closed-out trip — a\n// \"record this collection\" push sent before the trip closed, a bookmarked\n// mutation route. Mounting the flow it points at would show a form whose\n// one action can only ever answer `423`.\n//\n// BACKED BY NOTHING, and that is the discipline rather than a gap. This\n// screen never calls `closeout.get`/`useCloseout` to learn the trip is\n// locked: the caller already knows (its own write would 423, or the link's\n// own metadata carried the LOCKED stage). Checking again here would be a\n// second gate — \"check the resolved state before render, never\n// render-then-catch\", applied to lock state instead of capability darkness.\n//\n// LINKS to Closing Day, never mounts it. No unlock control appears here or\n// anywhere else at any layer (hard rule #21): the desk locks, the CRM\n// reopens.\n\nimport type { ReactNode } from 'react';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface LockedTripScreenProps {\n /** For context and for building the link's destination — never used to\n * fetch anything. */\n readonly tripRef: string;\n /** What the dead-end link would have done (\"Record a collection\"), from\n * whatever metadata came with it. Absent means the generic sentence: this\n * screen invents no explanation of its own. */\n readonly intendedAction?: string;\n /** The host's own navigation to wherever it mounts Closing Day. A screen\n * never navigates itself. */\n readonly onGoToClosingDay: (tripRef: string) => void;\n readonly components?: { readonly LockedTripScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function LockedTripScreen({\n tripRef,\n intendedAction,\n onGoToClosingDay,\n components,\n style,\n}: LockedTripScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const Override = components?.LockedTripScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <SystemScreenFrame\n block=\"kf-locked-trip-screen\"\n title={t('chrome.systemScreens.lockedTrip.title')}\n banner={\n intendedAction === undefined\n ? t('chrome.systemScreens.lockedTrip.genericAction')\n : t('chrome.systemScreens.lockedTrip.namedAction').replace('{action}', intendedAction)\n }\n body={<p>{t('chrome.systemScreens.lockedTrip.body')}</p>}\n {...(style !== undefined ? { style } : {})}\n actions={\n <button\n type=\"button\"\n className=\"kf-system-screen__primary\"\n onClick={() => onGoToClosingDay(tripRef)}\n >\n {t('chrome.systemScreens.lockedTrip.action')}\n </button>\n }\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §NotFoundScreen`.\n//\n// A route-level 404 for a `manager`/`agencyAdmin` mount: a bookmarked\n// `tripRef` from another agency, a deep link to a deleted entity, a stale\n// notification pointing at a now-cross-tenant resource.\n//\n// NOT THE TRAVELLER'S 404, and this is load-bearing rather than an\n// oversight. A dead share token is `ShareEndedScreen`'s `not-found`\n// variant, which must stay 404-shaped — no heading, no divider, no\n// distinguishing DOM signal (hard rule #20, enforced by dx-15). Rendering\n// THIS screen on the share surface would leak that the token was once real.\n// It is therefore never re-exported from `/traveller`.\n//\n// BACKED BY NOTHING, by design. It renders on a 404 that some mounted\n// flow's own hook already surfaced; it performs no second fetch to\n// \"double-check\" what the flow already learned.\n\nimport type { ReactNode } from 'react';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface NotFoundScreenProps {\n /** The host's own \"back\" navigation. Optional — a host that reached this\n * with no history to return to simply gets no button, which is more\n * honest than one that goes nowhere. */\n readonly onGoBack?: () => void;\n readonly components?: { readonly NotFoundScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function NotFoundScreen({ onGoBack, components, style }: NotFoundScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const Override = components?.NotFoundScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <SystemScreenFrame\n block=\"kf-not-found-screen\"\n title={t('chrome.systemScreens.notFound.title')}\n // Deliberately does not speculate about WHY. \"Deleted, or belongs to\n // another agency, or you mistyped it\" are three different sentences\n // and this screen cannot tell which is true — naming one would be a\n // guess presented as a diagnosis.\n body={<p>{t('chrome.systemScreens.notFound.body')}</p>}\n {...(style !== undefined ? { style } : {})}\n {...(onGoBack !== undefined\n ? {\n actions: (\n <button type=\"button\" className=\"kf-system-screen__primary\" onClick={onGoBack}>\n {t('chrome.systemScreens.notFound.action')}\n </button>\n ),\n }\n : {})}\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §OfflineFallbackScreen`.\n//\n// The device has nothing cached AND no connectivity — a manager opening a\n// trip for the first time at a trailhead before ever syncing, a desk\n// session losing the network before its first pull, a share link opened\n// with zero signal before the first snapshot.\n//\n// THE ONLY ONE OF THE SIX THE TRAVELLER SURFACE SHARES besides\n// `BootErrorScreen`, and it is safe there precisely because it discloses\n// nothing: \"there is no connection\" is true of any URL and leaks nothing\n// about whether this token was ever real. That is what separates it from\n// `ShareEndedScreen`'s dead-token cases, which are about a token's\n// VALIDITY and must stay 404-shaped (hard rule #20).\n//\n// SESSION STATE OUTRANKS THIS. An offline device whose credential has also\n// expired shows `SessionExpiredScreen`, not this — re-authentication is the\n// blocking concern regardless of connectivity, and a caller composing both\n// should check session first.\n\nimport type { ReactNode } from 'react';\nimport { useOutboxStatus } from '../../core/hooks/useOutboxStatus.js';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface OfflineFallbackScreenProps {\n /** Present on a trip-scoped mount; absent on the share surface. Context\n * only — this screen fetches nothing. */\n readonly tripRef?: string;\n /** Present on a share mount instead of `tripRef`. */\n readonly token?: string;\n /** The host's own retry — typically remounting whatever failed. */\n readonly onRetry?: () => void;\n readonly components?: { readonly OfflineFallbackScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function OfflineFallbackScreen({\n onRetry,\n components,\n style,\n}: OfflineFallbackScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const { isOnline } = useOutboxStatus();\n const Override = components?.OfflineFallbackScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <SystemScreenFrame\n block=\"kf-offline-fallback-screen\"\n title={t('chrome.systemScreens.offlineFallback.title')}\n body={\n <>\n <p>{t('chrome.systemScreens.offlineFallback.body')}</p>\n {/* Connectivity came back while this was on screen. Said rather\n * than acted on: this screen does not refetch or navigate on its\n * own, because whatever failed is the caller's to retry — but\n * leaving a stale \"you are offline\" up while the bars are back is\n * the thing that makes an app feel broken. */}\n {isOnline ? (\n <p data-tone=\"ok\">{t('chrome.systemScreens.offlineFallback.backOnline')}</p>\n ) : null}\n </>\n }\n {...(style !== undefined ? { style } : {})}\n {...(onRetry !== undefined\n ? {\n actions: (\n <button type=\"button\" className=\"kf-system-screen__primary\" onClick={onRetry}>\n {t('chrome.systemScreens.offlineFallback.action')}\n </button>\n ),\n }\n : {})}\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §PlanLockedScreen`.\n//\n// The takeover a STANDALONE route (no surrounding tab bar) renders when its\n// destination module is flag-dark. Admin-only: entitlement is a desk\n// concern, a manager's flows are always mounted inside a tab set where a\n// flag-dark tab renders its own inline view, and the share surface has no\n// upsell copy at all (its flag-dark case is 404-shaped).\n//\n// ── A SPEC FIELD THAT HAS NO WIRE SOURCE ─────────────────────────────────\n//\n// The spec splits the CTA by `details.reason` into `'agency'` (the agency's\n// own plan) vs `'partner-ceiling'` (the partner's tier caps it), so the\n// right person is sent to the right queue. `CapabilityRow` carries no such\n// field — `06-capability-and-personas.md §6` point 2 fixes it as \"four\n// booleans, no `reason` string\", and `capability.types.ts` says so too.\n//\n// So the reason is an OPTIONAL PROP, supplied by whatever the caller saw\n// (a refusal's own `details`), and `onUpgradeRequest` is called with\n// `undefined` when nobody knows. Defaulting it to `'agency'` would have\n// been a guess routed to a real support queue — the host can decide what to\n// do with \"unknown\" far better than this screen can invent an answer.\n\nimport type { ReactNode } from 'react';\nimport { useCapabilities } from '../../core/hooks/useCapabilities.js';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport type PlanLockedReason = 'agency' | 'partner-ceiling';\n\nexport interface PlanLockedScreenProps {\n /** The capability this route was headed for. Read for its own triple\n * only — never exhaustively switched on (`§6` point 5's open-set rule). */\n readonly capabilityKey: string;\n /** The host's own upsell/support flow — Kaafil has no in-product upgrade\n * path to hand off to. `undefined` means the wire did not say which\n * queue this belongs in; see this file's header. */\n readonly onUpgradeRequest: (reason: PlanLockedReason | undefined) => void;\n /** Supplied by the caller when it saw a refusal that named one. */\n readonly reason?: PlanLockedReason;\n readonly components?: { readonly PlanLockedScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function PlanLockedScreen({\n capabilityKey,\n onUpgradeRequest,\n reason,\n components,\n style,\n}: PlanLockedScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const capabilities = useCapabilities([capabilityKey]);\n const Override = components?.PlanLockedScreenUI;\n if (Override !== undefined) return <Override />;\n\n // Read, never re-derived: `status` is resolved once in `/core` and this\n // screen reads it rather than recombining the booleans itself\n // (`06-capability-and-personas.md §6` point 2).\n const status = capabilities.get(capabilityKey)?.status;\n\n return (\n <SystemScreenFrame\n block=\"kf-plan-locked-screen\"\n title={t('chrome.systemScreens.planLocked.title')}\n body={\n <>\n <p>\n {t(\n reason === 'partner-ceiling'\n ? 'chrome.systemScreens.planLocked.bodyPartnerCeiling'\n : 'chrome.systemScreens.planLocked.body',\n )}\n </p>\n {/* A route that reached this screen for a capability that is NOT\n * flag-dark is a caller bug, and saying so beats rendering upsell\n * copy over a module that is merely data-dark or simply lit. */}\n {status === 'flag-dark' ? null : (\n <p data-tone=\"warn\">{t('chrome.systemScreens.planLocked.notFlagDark')}</p>\n )}\n </>\n }\n {...(style !== undefined ? { style } : {})}\n actions={\n <button\n type=\"button\"\n className=\"kf-system-screen__primary\"\n onClick={() => onUpgradeRequest(reason)}\n >\n {t('chrome.systemScreens.planLocked.action')}\n </button>\n }\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §SessionExpiredScreen`.\n//\n// Renders exactly when `useSession().status === 'expired'` — the open\n// credential's silent refresh has exhausted itself. Re-authentication is\n// routed through the HOST's own login; Kaafil has no login page to redirect\n// to, which is why `onReauthenticate` is required and has no default.\n//\n// DOES NOT retry any token call itself. A broken credential means the\n// host's own user is not authenticated and must re-authenticate through the\n// host's own flow — obtaining fresh tokens is `SessionShell`'s concern on\n// the NEXT successful mount, not this screen's on the current broken one.\n//\n// DOES NOT inspect which credential kind expired beyond the resolved\n// persona (`00-decisions.md` U-003 forecloses reading a JWT at any layer\n// above `SessionShell`).\n\nimport type { ReactNode } from 'react';\nimport { useState } from 'react';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface SessionExpiredScreenProps {\n /** The host's own re-auth entry point. Required: there is no default\n * action, because Kaafil has no login page of its own. */\n readonly onReauthenticate: (returnTo?: string) => void | Promise<void>;\n /** Threaded back to `onReauthenticate` UNEXAMINED. This screen never\n * interprets it, builds a URL from it, or hands it to a router — it\n * exists purely so the host's own flow can restore the right destination\n * afterwards. */\n readonly returnTo?: string;\n readonly components?: { readonly SessionExpiredScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function SessionExpiredScreen({\n onReauthenticate,\n returnTo,\n components,\n style,\n}: SessionExpiredScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const [pending, setPending] = useState(false);\n // The host's own auth failure reason is not something Kaafil can\n // classify, so the rejection's own message is shown verbatim.\n const [failure, setFailure] = useState<string | undefined>(undefined);\n\n const Override = components?.SessionExpiredScreenUI;\n if (Override !== undefined) return <Override />;\n\n async function reauthenticate(): Promise<void> {\n setPending(true);\n setFailure(undefined);\n try {\n await onReauthenticate(returnTo);\n } catch (error) {\n setFailure(error instanceof Error ? error.message : String(error));\n } finally {\n setPending(false);\n }\n }\n\n return (\n <SystemScreenFrame\n block=\"kf-session-expired-screen\"\n title={t('chrome.systemScreens.sessionExpired.title')}\n body={<p>{t('chrome.systemScreens.sessionExpired.body')}</p>}\n {...(failure !== undefined ? { banner: <span data-tone=\"warn\">{failure}</span> } : {})}\n {...(style !== undefined ? { style } : {})}\n actions={\n <button\n type=\"button\"\n className=\"kf-system-screen__primary\"\n disabled={pending}\n onClick={() => void reauthenticate()}\n >\n {t(\n pending\n ? 'chrome.systemScreens.sessionExpired.busy'\n : 'chrome.systemScreens.sessionExpired.action',\n )}\n </button>\n }\n />\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/shared/system-screens/BootErrorScreen.tsx","../src/shared/system-screens/internal/SystemScreenFrame.tsx","../src/shared/system-screens/LockedTripScreen.tsx","../src/shared/system-screens/NotFoundScreen.tsx","../src/shared/system-screens/OfflineFallbackScreen.tsx","../src/shared/system-screens/PlanLockedScreen.tsx","../src/shared/system-screens/SessionExpiredScreen.tsx"],"names":["jsx","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AAA,KAAY,MAAA,GAAY,EAAE,MAAA,kBAAQA,GAAAA,CAAC,MAAA,EAAA,EAAK,WAAA,EAAU,MAAA,EAAQ,QAAA,EAAA,OAAA,EAAQ,CAAA,KAAY,EAAC;AAAA,MACnF,GAAI,KAAA,KAAU,MAAA,GAAY,EAAE,KAAA,KAAU,EAAC;AAAA,MACxC,yBACEA,GAAAA;AAAA,QAAC,QAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAK,QAAA;AAAA,UACL,SAAA,EAAU,2BAAA;AAAA,UACV,QAAA,EAAU,OAAA;AAAA,UACV,OAAA,EAAS,MAAM,KAAK,cAAA,EAAe;AAAA,UAElC,QAAA,EAAA,CAAA;AAAA,YACC,UACI,0CAAA,GACA;AAAA;AACN;AAAA;AACF;AAAA,GAEJ;AAEJ","file":"chunk-GJ2J3PYN.js","sourcesContent":["'use client';\n\n// `shared/01-system-screens.md §BootErrorScreen`.\n//\n// ── THE ONE SCREEN THAT CANNOT ASSUME ANYTHING ───────────────────────────\n//\n// It renders when `<KaafilUIKitProvider>` itself never opened, mounted by\n// the integrator's own error boundary around it. That means:\n//\n// · NO `I18nShell` → no `t()`. The copy below is ENGLISH ONLY, and that\n// is the spec's own DELTA, not an oversight.\n// · NO `ThemeShell` → no resolved tokens.\n// · NO `usePersona` → the credential never opened, so there is no\n// resolved persona to fork a presentation on. This is\n// the ONE screen in the tier that ships a single\n// rendering for every mounting context, including the\n// share surface — `public`'s richer reading layout\n// depends on shells that did not run.\n// · NO hook of any kind. There is no context above it to read.\n//\n// ── WHY IT CARRIES INLINE STYLES, WHICH NOTHING ELSE HERE DOES ───────────\n//\n// The stylesheet is OPT-IN (`import \"kaafil-react-uikit/styles\"`), so this\n// screen may render with no CSS whatsoever — and it is the one screen whose\n// entire job is explaining a total failure. Unstyled black-on-white text is\n// a poor way to do that, and a token reference resolves to nothing when the\n// ladder never loaded.\n//\n// So every node carries BOTH: an inline style that works with zero CSS, and\n// a `.kf-boot-error-screen__*` class so a host that DID load the stylesheet\n// can restyle it. The literals below are deliberate and must not be\n// \"corrected\" into `var(--kf-*)` — doing so silently breaks the only case\n// this screen exists for. dx-05 governs `src/styles/components/**` and does\n// not reach here, which is consistent rather than a loophole: the rule\n// exists so a stylesheet cannot shadow a token, and this file is not one.\n\nimport type { CSSProperties, ReactNode } from 'react';\nimport { useState } from 'react';\n\n/** The same failure modes `<KaafilSessionProbe/>` distinguishes, plus the\n * honest sixth for anything unclassifiable. */\nexport type BootFailureMode =\n | 'endpoint-401'\n | 'wrong-environment'\n | 'test-key-on-live'\n | 'clock-skew'\n | 'cors'\n | 'unknown';\n\nexport interface BootErrorScreenProps {\n readonly failureMode?: BootFailureMode;\n /** The underlying error's message. Rendered behind a disclosure, never\n * inline in the primary copy — it is developer-facing. */\n readonly detail?: string;\n /** Remounts the entire provider tree; some boot failures (a `kf_test_`\n * key shipped to production) cannot be fixed by retrying at all, which\n * is why this is optional. */\n readonly onRetry?: () => void;\n readonly components?: { readonly BootErrorScreenUI?: () => ReactNode };\n}\n\n/** English-only by contract — see this file's header. Each line says what\n * an integrator can actually DO, because the audience for a boot failure is\n * whoever wired the provider, not an end user. */\nconst COPY: Readonly<Record<BootFailureMode, string>> = {\n 'endpoint-401':\n 'The API key or session token was rejected. Check the credential the provider was given.',\n 'wrong-environment':\n 'This credential belongs to a different environment than the endpoint it was sent to.',\n 'test-key-on-live': 'A test key was used against live. Retrying will not help — swap the key.',\n 'clock-skew': \"This device's clock is too far from the server's for a token to validate.\",\n cors: 'The browser blocked the request before it was sent. This origin is not allowlisted on the API.',\n unknown: 'Kaafil could not start. The detail below may say why.',\n};\n\nconst PANEL: CSSProperties = {\n boxSizing: 'border-box',\n maxInlineSize: '32rem',\n marginInline: 'auto',\n marginBlock: '3rem',\n padding: '1.5rem',\n border: '1px solid #e3ded7',\n borderRadius: '10px',\n background: '#ffffff',\n color: '#1c1917',\n fontFamily: 'system-ui, -apple-system, Segoe UI, Roboto, sans-serif',\n fontSize: '0.875rem',\n lineHeight: 1.5,\n};\n\nconst TITLE: CSSProperties = { margin: '0 0 0.5rem', fontSize: '1rem', fontWeight: 600 };\nconst BODY: CSSProperties = { margin: '0 0 1rem', color: '#57534e' };\nconst CODE: CSSProperties = {\n display: 'block',\n overflowX: 'auto',\n marginBlockStart: '0.5rem',\n padding: '0.75rem',\n borderRadius: '6px',\n background: '#f5f5f4',\n color: '#44403c',\n fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',\n fontSize: '0.75rem',\n whiteSpace: 'pre-wrap',\n};\nconst BUTTON: CSSProperties = {\n padding: '0.5rem 1rem',\n border: '0',\n borderRadius: '8px',\n background: '#1c1917',\n color: '#ffffff',\n fontSize: '0.8125rem',\n fontWeight: 500,\n cursor: 'pointer',\n};\nconst TOGGLE: CSSProperties = {\n marginBlockStart: '1rem',\n color: '#78716c',\n fontSize: '0.75rem',\n cursor: 'pointer',\n};\n\nexport function BootErrorScreen({\n failureMode = 'unknown',\n detail,\n onRetry,\n components,\n}: BootErrorScreenProps): ReactNode {\n const [showDetail, setShowDetail] = useState(false);\n const Override = components?.BootErrorScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <div className=\"kf-boot-error-screen\" style={PANEL} role=\"alert\">\n <h1 className=\"kf-boot-error-screen__title\" style={TITLE}>\n Kaafil could not start\n </h1>\n <p className=\"kf-boot-error-screen__body\" style={BODY}>\n {COPY[failureMode]}\n </p>\n\n {onRetry === undefined ? null : (\n <button\n type=\"button\"\n className=\"kf-boot-error-screen__retry\"\n style={BUTTON}\n onClick={onRetry}\n >\n Try again\n </button>\n )}\n\n {detail === undefined || detail === '' ? null : (\n <div className=\"kf-boot-error-screen__detail\">\n {/* A disclosure rather than always-on: the message is the\n * underlying error's, which can be long and is not the first\n * thing a reader needs. */}\n <button\n type=\"button\"\n className=\"kf-boot-error-screen__detail-toggle\"\n style={{ ...TOGGLE, background: 'none', border: 0, padding: 0 }}\n aria-expanded={showDetail}\n onClick={() => setShowDetail((open) => !open)}\n >\n {showDetail ? 'Hide technical detail' : 'Show technical detail'}\n </button>\n {showDetail ? (\n <code className=\"kf-boot-error-screen__detail-text\" style={CODE}>\n {detail}\n </code>\n ) : null}\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\n// The one frame the five context-reading system screens share.\n//\n// ── THE PRESENTATION FORK IS REAL, AND IT IS NOT A PROP ───────────────────\n//\n// `shared/01-system-screens.md` records a `Presentation notes by mounting\n// context` field on every screen: an `admin`-family mount is a CONTAINED\n// CARD inside the host's own CRM page, a `manager`-family mount is a\n// FULL-VIEWPORT takeover with its primary action reachable without\n// scrolling. The spec is explicit that this is a genuine layout-model fork\n// (`03-layer-contract.md §5` level 3), not a spacing difference — and\n// equally explicit that it is ONE component, never two named variants.\n//\n// It is derived from `usePersona()`, never from a prop. Hard rule #7: no\n// `persona` prop and no `mode` prop exists anywhere, and dx-07 fails the\n// build on either. The credential decides.\n//\n// ── WHY THIS IS A FRAME AND NOT AN ATOM ──────────────────────────────────\n//\n// The spec's `Composes` rows name `EmptyState`/`Button`/`Banner` atoms from\n// `atomic/*`. Those do not exist: the v2 rebuild ships no shared\n// `/primitives` layer, by decision — each family owns whatever atoms it\n// needs. So these five screens share a FRAME (the layout fork, the focus\n// move, the announcement) and own their own content, rather than depending\n// on a primitives package this package deliberately does not have.\n\nimport type { ReactNode } from 'react';\nimport { useEffect, useId, useRef } from 'react';\nimport { usePersona } from '../../../core/hooks/usePersona.js';\nimport type { KaafilTokenOverrides } from '../../../primitives/internal/tokenStyle.js';\nimport { tokenStyle } from '../../../primitives/internal/tokenStyle.js';\n\nexport interface SystemScreenFrameProps {\n /** BEM block name — each screen owns its own, so a host can target one\n * without catching the rest (`.kf-session-expired-screen__*`). */\n readonly block: string;\n readonly title: string;\n readonly body: ReactNode;\n /** Rendered below the body. On a field mount this is what the sticky\n * action region holds. */\n readonly actions?: ReactNode;\n /** An error/context line above the title. */\n readonly banner?: ReactNode;\n readonly icon?: ReactNode;\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function SystemScreenFrame({\n block,\n title,\n body,\n actions,\n banner,\n icon,\n style,\n}: SystemScreenFrameProps): ReactNode {\n const persona = usePersona();\n const headingRef = useRef<HTMLHeadingElement>(null);\n const headingId = useId();\n\n // A field mount owns the whole screen; a desk mount is embedded beside the\n // host's own nav and must not consume the viewport (briefing §27.7).\n // `traveller` takes the contained treatment too — only `OfflineFallback`\n // and `BootError` reach the public surface, and neither should black out\n // a document a host has embedded.\n const layout = persona === 'manager' ? 'takeover' : 'contained';\n\n // FOCUS MOVES TO THE HEADING on mount. This is a full state replacement,\n // not an overlay — there is no opener to return focus to, so the\n // overlay-focus contract (`12-accessibility.md §3`) does not apply and the\n // heading is the correct landing point. Without this a keyboard or screen\n // reader user gets no signal that the page became something else and Tab\n // keeps walking whatever is still behind it.\n useEffect(() => {\n headingRef.current?.focus();\n }, []);\n\n return (\n <div\n className=\"kf-system-screen\"\n data-block={block}\n data-layout={layout}\n style={tokenStyle(style)}\n // A significant, infrequent state change — announced politely rather\n // than assertively, since the focus move above already carries the\n // urgency and `assertive` would interrupt whatever is mid-sentence.\n role=\"status\"\n aria-live=\"polite\"\n aria-labelledby={headingId}\n >\n <div className={`kf-system-screen__panel ${block}`}>\n {icon === undefined ? null : (\n <span className=\"kf-system-screen__glyph\" aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {banner === undefined ? null : <div className=\"kf-system-screen__banner\">{banner}</div>}\n {/* `tabIndex={-1}` so the effect above can focus it — a heading is\n * not focusable by default and focusing the panel instead would\n * draw the accent ring around the entire card. */}\n <h1 ref={headingRef} id={headingId} tabIndex={-1} className=\"kf-system-screen__title\">\n {title}\n </h1>\n <div className=\"kf-system-screen__body\">{body}</div>\n {actions === undefined ? null : <div className=\"kf-system-screen__actions\">{actions}</div>}\n </div>\n </div>\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §LockedTripScreen`.\n//\n// The destination for a WRITE-ONLY deep link into a closed-out trip — a\n// \"record this collection\" push sent before the trip closed, a bookmarked\n// mutation route. Mounting the flow it points at would show a form whose\n// one action can only ever answer `423`.\n//\n// BACKED BY NOTHING, and that is the discipline rather than a gap. This\n// screen never calls `closeout.get`/`useCloseout` to learn the trip is\n// locked: the caller already knows (its own write would 423, or the link's\n// own metadata carried the LOCKED stage). Checking again here would be a\n// second gate — \"check the resolved state before render, never\n// render-then-catch\", applied to lock state instead of capability darkness.\n//\n// LINKS to Closing Day, never mounts it. No unlock control appears here or\n// anywhere else at any layer (hard rule #21): the desk locks, the CRM\n// reopens.\n\nimport type { ReactNode } from 'react';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface LockedTripScreenProps {\n /** For context and for building the link's destination — never used to\n * fetch anything. */\n readonly tripRef: string;\n /** What the dead-end link would have done (\"Record a collection\"), from\n * whatever metadata came with it. Absent means the generic sentence: this\n * screen invents no explanation of its own. */\n readonly intendedAction?: string;\n /** The host's own navigation to wherever it mounts Closing Day. A screen\n * never navigates itself. */\n readonly onGoToClosingDay: (tripRef: string) => void;\n readonly components?: { readonly LockedTripScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function LockedTripScreen({\n tripRef,\n intendedAction,\n onGoToClosingDay,\n components,\n style,\n}: LockedTripScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const Override = components?.LockedTripScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <SystemScreenFrame\n block=\"kf-locked-trip-screen\"\n title={t('chrome.systemScreens.lockedTrip.title')}\n banner={\n intendedAction === undefined\n ? t('chrome.systemScreens.lockedTrip.genericAction')\n : t('chrome.systemScreens.lockedTrip.namedAction').replace('{action}', intendedAction)\n }\n body={<p>{t('chrome.systemScreens.lockedTrip.body')}</p>}\n {...(style !== undefined ? { style } : {})}\n actions={\n <button\n type=\"button\"\n className=\"kf-system-screen__primary\"\n onClick={() => onGoToClosingDay(tripRef)}\n >\n {t('chrome.systemScreens.lockedTrip.action')}\n </button>\n }\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §NotFoundScreen`.\n//\n// A route-level 404 for a `manager`/`agencyAdmin` mount: a bookmarked\n// `tripRef` from another agency, a deep link to a deleted entity, a stale\n// notification pointing at a now-cross-tenant resource.\n//\n// NOT THE TRAVELLER'S 404, and this is load-bearing rather than an\n// oversight. A dead share token is `ShareEndedScreen`'s `not-found`\n// variant, which must stay 404-shaped — no heading, no divider, no\n// distinguishing DOM signal (hard rule #20, enforced by dx-15). Rendering\n// THIS screen on the share surface would leak that the token was once real.\n// It is therefore never re-exported from `/traveller`.\n//\n// BACKED BY NOTHING, by design. It renders on a 404 that some mounted\n// flow's own hook already surfaced; it performs no second fetch to\n// \"double-check\" what the flow already learned.\n\nimport type { ReactNode } from 'react';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface NotFoundScreenProps {\n /** The host's own \"back\" navigation. Optional — a host that reached this\n * with no history to return to simply gets no button, which is more\n * honest than one that goes nowhere. */\n readonly onGoBack?: () => void;\n readonly components?: { readonly NotFoundScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function NotFoundScreen({ onGoBack, components, style }: NotFoundScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const Override = components?.NotFoundScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <SystemScreenFrame\n block=\"kf-not-found-screen\"\n title={t('chrome.systemScreens.notFound.title')}\n // Deliberately does not speculate about WHY. \"Deleted, or belongs to\n // another agency, or you mistyped it\" are three different sentences\n // and this screen cannot tell which is true — naming one would be a\n // guess presented as a diagnosis.\n body={<p>{t('chrome.systemScreens.notFound.body')}</p>}\n {...(style !== undefined ? { style } : {})}\n {...(onGoBack !== undefined\n ? {\n actions: (\n <button type=\"button\" className=\"kf-system-screen__primary\" onClick={onGoBack}>\n {t('chrome.systemScreens.notFound.action')}\n </button>\n ),\n }\n : {})}\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §OfflineFallbackScreen`.\n//\n// The device has nothing cached AND no connectivity — a manager opening a\n// trip for the first time at a trailhead before ever syncing, a desk\n// session losing the network before its first pull, a share link opened\n// with zero signal before the first snapshot.\n//\n// THE ONLY ONE OF THE SIX THE TRAVELLER SURFACE SHARES besides\n// `BootErrorScreen`, and it is safe there precisely because it discloses\n// nothing: \"there is no connection\" is true of any URL and leaks nothing\n// about whether this token was ever real. That is what separates it from\n// `ShareEndedScreen`'s dead-token cases, which are about a token's\n// VALIDITY and must stay 404-shaped (hard rule #20).\n//\n// SESSION STATE OUTRANKS THIS. An offline device whose credential has also\n// expired shows `SessionExpiredScreen`, not this — re-authentication is the\n// blocking concern regardless of connectivity, and a caller composing both\n// should check session first.\n\nimport type { ReactNode } from 'react';\nimport { useOutboxStatus } from '../../core/hooks/useOutboxStatus.js';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface OfflineFallbackScreenProps {\n /** Present on a trip-scoped mount; absent on the share surface. Context\n * only — this screen fetches nothing. */\n readonly tripRef?: string;\n /** Present on a share mount instead of `tripRef`. */\n readonly token?: string;\n /** The host's own retry — typically remounting whatever failed. */\n readonly onRetry?: () => void;\n readonly components?: { readonly OfflineFallbackScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function OfflineFallbackScreen({\n onRetry,\n components,\n style,\n}: OfflineFallbackScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const { isOnline } = useOutboxStatus();\n const Override = components?.OfflineFallbackScreenUI;\n if (Override !== undefined) return <Override />;\n\n return (\n <SystemScreenFrame\n block=\"kf-offline-fallback-screen\"\n title={t('chrome.systemScreens.offlineFallback.title')}\n body={\n <>\n <p>{t('chrome.systemScreens.offlineFallback.body')}</p>\n {/* Connectivity came back while this was on screen. Said rather\n * than acted on: this screen does not refetch or navigate on its\n * own, because whatever failed is the caller's to retry — but\n * leaving a stale \"you are offline\" up while the bars are back is\n * the thing that makes an app feel broken. */}\n {isOnline ? (\n <p data-tone=\"ok\">{t('chrome.systemScreens.offlineFallback.backOnline')}</p>\n ) : null}\n </>\n }\n {...(style !== undefined ? { style } : {})}\n {...(onRetry !== undefined\n ? {\n actions: (\n <button type=\"button\" className=\"kf-system-screen__primary\" onClick={onRetry}>\n {t('chrome.systemScreens.offlineFallback.action')}\n </button>\n ),\n }\n : {})}\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §PlanLockedScreen`.\n//\n// The takeover a STANDALONE route (no surrounding tab bar) renders when its\n// destination module is flag-dark. Admin-only: entitlement is a desk\n// concern, a manager's flows are always mounted inside a tab set where a\n// flag-dark tab renders its own inline view, and the share surface has no\n// upsell copy at all (its flag-dark case is 404-shaped).\n//\n// ── A SPEC FIELD THAT HAS NO WIRE SOURCE ─────────────────────────────────\n//\n// The spec splits the CTA by `details.reason` into `'agency'` (the agency's\n// own plan) vs `'partner-ceiling'` (the partner's tier caps it), so the\n// right person is sent to the right queue. `CapabilityRow` carries no such\n// field — `06-capability-and-personas.md §6` point 2 fixes it as \"four\n// booleans, no `reason` string\", and `capability.types.ts` says so too.\n//\n// So the reason is an OPTIONAL PROP, supplied by whatever the caller saw\n// (a refusal's own `details`), and `onUpgradeRequest` is called with\n// `undefined` when nobody knows. Defaulting it to `'agency'` would have\n// been a guess routed to a real support queue — the host can decide what to\n// do with \"unknown\" far better than this screen can invent an answer.\n\nimport type { ReactNode } from 'react';\nimport { useCapabilities } from '../../core/hooks/useCapabilities.js';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport type PlanLockedReason = 'agency' | 'partner-ceiling';\n\nexport interface PlanLockedScreenProps {\n /** The capability this route was headed for. Read for its own triple\n * only — never exhaustively switched on (`§6` point 5's open-set rule). */\n readonly capabilityKey: string;\n /** The host's own upsell/support flow — Kaafil has no in-product upgrade\n * path to hand off to. `undefined` means the wire did not say which\n * queue this belongs in; see this file's header. */\n readonly onUpgradeRequest: (reason: PlanLockedReason | undefined) => void;\n /** Supplied by the caller when it saw a refusal that named one. */\n readonly reason?: PlanLockedReason;\n readonly components?: { readonly PlanLockedScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function PlanLockedScreen({\n capabilityKey,\n onUpgradeRequest,\n reason,\n components,\n style,\n}: PlanLockedScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const capabilities = useCapabilities([capabilityKey]);\n const Override = components?.PlanLockedScreenUI;\n if (Override !== undefined) return <Override />;\n\n // Read, never re-derived: `status` is resolved once in `/core` and this\n // screen reads it rather than recombining the booleans itself\n // (`06-capability-and-personas.md §6` point 2).\n const status = capabilities.get(capabilityKey)?.status;\n\n return (\n <SystemScreenFrame\n block=\"kf-plan-locked-screen\"\n title={t('chrome.systemScreens.planLocked.title')}\n body={\n <>\n <p>\n {t(\n reason === 'partner-ceiling'\n ? 'chrome.systemScreens.planLocked.bodyPartnerCeiling'\n : 'chrome.systemScreens.planLocked.body',\n )}\n </p>\n {/* A route that reached this screen for a capability that is NOT\n * flag-dark is a caller bug, and saying so beats rendering upsell\n * copy over a module that is merely data-dark or simply lit. */}\n {status === 'flag-dark' ? null : (\n <p data-tone=\"warn\">{t('chrome.systemScreens.planLocked.notFlagDark')}</p>\n )}\n </>\n }\n {...(style !== undefined ? { style } : {})}\n actions={\n <button\n type=\"button\"\n className=\"kf-system-screen__primary\"\n onClick={() => onUpgradeRequest(reason)}\n >\n {t('chrome.systemScreens.planLocked.action')}\n </button>\n }\n />\n );\n}\n","'use client';\n\n// `shared/01-system-screens.md §SessionExpiredScreen`.\n//\n// Renders exactly when `useSession().status === 'expired'` — the open\n// credential's silent refresh has exhausted itself. Re-authentication is\n// routed through the HOST's own login; Kaafil has no login page to redirect\n// to, which is why `onReauthenticate` is required and has no default.\n//\n// DOES NOT retry any token call itself. A broken credential means the\n// host's own user is not authenticated and must re-authenticate through the\n// host's own flow — obtaining fresh tokens is `SessionShell`'s concern on\n// the NEXT successful mount, not this screen's on the current broken one.\n//\n// DOES NOT inspect which credential kind expired beyond the resolved\n// persona (`00-decisions.md` U-003 forecloses reading a JWT at any layer\n// above `SessionShell`).\n\nimport type { ReactNode } from 'react';\nimport { useState } from 'react';\nimport { useKaafilChrome } from '../../core/shells/I18nShell.js';\nimport type { KaafilTokenOverrides } from '../../primitives/internal/tokenStyle.js';\nimport { SystemScreenFrame } from './internal/SystemScreenFrame';\n\nexport interface SessionExpiredScreenProps {\n /** The host's own re-auth entry point. Required: there is no default\n * action, because Kaafil has no login page of its own. */\n readonly onReauthenticate: (returnTo?: string) => void | Promise<void>;\n /** Threaded back to `onReauthenticate` UNEXAMINED. This screen never\n * interprets it, builds a URL from it, or hands it to a router — it\n * exists purely so the host's own flow can restore the right destination\n * afterwards. */\n readonly returnTo?: string;\n readonly components?: { readonly SessionExpiredScreenUI?: () => ReactNode };\n readonly style?: KaafilTokenOverrides;\n}\n\nexport function SessionExpiredScreen({\n onReauthenticate,\n returnTo,\n components,\n style,\n}: SessionExpiredScreenProps): ReactNode {\n const { t } = useKaafilChrome();\n const [pending, setPending] = useState(false);\n // The host's own auth failure reason is not something Kaafil can\n // classify, so the rejection's own message is shown verbatim.\n const [failure, setFailure] = useState<string | undefined>(undefined);\n\n const Override = components?.SessionExpiredScreenUI;\n if (Override !== undefined) return <Override />;\n\n async function reauthenticate(): Promise<void> {\n setPending(true);\n setFailure(undefined);\n try {\n await onReauthenticate(returnTo);\n } catch (error) {\n setFailure(error instanceof Error ? error.message : String(error));\n } finally {\n setPending(false);\n }\n }\n\n return (\n <SystemScreenFrame\n block=\"kf-session-expired-screen\"\n title={t('chrome.systemScreens.sessionExpired.title')}\n body={<p>{t('chrome.systemScreens.sessionExpired.body')}</p>}\n {...(failure !== undefined ? { banner: <span data-tone=\"warn\">{failure}</span> } : {})}\n {...(style !== undefined ? { style } : {})}\n actions={\n <button\n type=\"button\"\n className=\"kf-system-screen__primary\"\n disabled={pending}\n onClick={() => void reauthenticate()}\n >\n {t(\n pending\n ? 'chrome.systemScreens.sessionExpired.busy'\n : 'chrome.systemScreens.sessionExpired.action',\n )}\n </button>\n }\n />\n );\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkWS2DKREI_cjs = require('./chunk-WS2DKREI.cjs');
4
- var chunkW5PG3IUJ_cjs = require('./chunk-W5PG3IUJ.cjs');
5
- var chunkV36WWMTF_cjs = require('./chunk-V36WWMTF.cjs');
3
+ var chunk6WV5VYT2_cjs = require('./chunk-6WV5VYT2.cjs');
4
+ var chunk7UFX3Y2U_cjs = require('./chunk-7UFX3Y2U.cjs');
5
+ var chunkUALMCHNW_cjs = require('./chunk-UALMCHNW.cjs');
6
6
  var react = require('react');
7
7
  var client = require('kaafil-js/client');
8
8
 
9
9
  function useAgencyAdminMe() {
10
- const client = chunkV36WWMTF_cjs.useKaafilClient();
10
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
11
11
  const [result, setResult] = react.useState({ status: "loading" });
12
12
  react.useEffect(() => {
13
13
  let cancelled = false;
@@ -29,7 +29,7 @@ function useAgencyAdminMe() {
29
29
  return result;
30
30
  }
31
31
  function useAgencyChecklistTemplates() {
32
- const client = chunkV36WWMTF_cjs.useKaafilClient();
32
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
33
33
  const [templates, setTemplates] = react.useState([]);
34
34
  const [loaded, setLoaded] = react.useState(false);
35
35
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -89,7 +89,7 @@ function useAgencyChecklistTemplates() {
89
89
  };
90
90
  }
91
91
  function useAgencyForms() {
92
- const client = chunkV36WWMTF_cjs.useKaafilClient();
92
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
93
93
  const [forms, setForms] = react.useState([]);
94
94
  const [loaded, setLoaded] = react.useState(false);
95
95
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -245,7 +245,7 @@ function useAgencyForms() {
245
245
  };
246
246
  }
247
247
  function useAgencyJourneyTriggers() {
248
- const client = chunkV36WWMTF_cjs.useKaafilClient();
248
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
249
249
  const [triggers, setTriggers] = react.useState([]);
250
250
  const [loaded, setLoaded] = react.useState(false);
251
251
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -273,7 +273,7 @@ function useAgencyJourneyTriggers() {
273
273
  return { triggers, loaded, lastFetchFailed, refresh, patchTrigger };
274
274
  }
275
275
  function useAgencyManagerProfile(managerRef) {
276
- const client = chunkV36WWMTF_cjs.useKaafilClient();
276
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
277
277
  const [read, setRead] = react.useState(void 0);
278
278
  const [readFailed, setReadFailed] = react.useState(false);
279
279
  const refresh = react.useCallback(async () => {
@@ -291,7 +291,7 @@ function useAgencyManagerProfile(managerRef) {
291
291
  return { read, readFailed, refresh };
292
292
  }
293
293
  function useAgencySettings() {
294
- const client = chunkV36WWMTF_cjs.useKaafilClient();
294
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
295
295
  const [document, setDocument] = react.useState(void 0);
296
296
  const [loaded, setLoaded] = react.useState(false);
297
297
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -319,7 +319,7 @@ function useAgencySettings() {
319
319
  return { document, loaded, lastFetchFailed, refresh, patchSettings };
320
320
  }
321
321
  function useAgencyTrip(tripRef) {
322
- const client = chunkV36WWMTF_cjs.useKaafilClient();
322
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
323
323
  const [read, setRead] = react.useState(void 0);
324
324
  const [readFailed, setReadFailed] = react.useState(false);
325
325
  const refresh = react.useCallback(async () => {
@@ -339,7 +339,7 @@ function useAgencyTrip(tripRef) {
339
339
  var DEFAULT_PAGE_LIMIT = 20;
340
340
  var GROUPED_PAGE_LIMIT = 200;
341
341
  function useAgencyTripManifest(tripRef) {
342
- const client = chunkV36WWMTF_cjs.useKaafilClient();
342
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
343
343
  const [facets, setFacets] = react.useState(void 0);
344
344
  const mountedRef = react.useRef(true);
345
345
  react.useEffect(() => {
@@ -370,7 +370,7 @@ function useAgencyTripManifest(tripRef) {
370
370
  }
371
371
  var DEFAULT_PAGE_LIMIT2 = 20;
372
372
  function useAgencyTrips() {
373
- const client = chunkV36WWMTF_cjs.useKaafilClient();
373
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
374
374
  const [segmentCounts, setSegmentCounts] = react.useState(
375
375
  void 0
376
376
  );
@@ -400,18 +400,18 @@ function useAgencyTrips() {
400
400
  );
401
401
  return { makeTripsFetch, segmentCounts };
402
402
  }
403
- var useBookingsInternal = chunkWS2DKREI_cjs.createDomainHook("bookings", (tripRef) => {
403
+ var useBookingsInternal = chunk6WV5VYT2_cjs.createDomainHook("bookings", (tripRef) => {
404
404
  const {
405
405
  rows: bookings,
406
406
  syncedAt,
407
407
  refreshLive
408
- } = chunkWS2DKREI_cjs.useSnapshotList(tripRef, "bookings", {
408
+ } = chunk6WV5VYT2_cjs.useSnapshotList(tripRef, "bookings", {
409
409
  live: async (liveClient, ref) => {
410
410
  const response = await liveClient.bookings.list({ tripRef: ref });
411
411
  return { rows: [...response], syncedAt: response.meta.serverTime };
412
412
  }
413
413
  });
414
- const vouchersMutation = chunkV36WWMTF_cjs.useOfflineMutation({
414
+ const vouchersMutation = chunkUALMCHNW_cjs.useOfflineMutation({
415
415
  tripRef,
416
416
  enqueue: (engine, input) => engine.enqueue({
417
417
  tripRef,
@@ -448,10 +448,10 @@ function useBookings(tripRef) {
448
448
  return useBookingsInternal(tripRef);
449
449
  }
450
450
  function useCapabilityStatuses(tripRef) {
451
- const { rows, loaded } = chunkV36WWMTF_cjs.useCapabilityRows(tripRef);
451
+ const { rows, loaded } = chunkUALMCHNW_cjs.useCapabilityRows(tripRef);
452
452
  const statuses = react.useMemo(() => {
453
453
  const map = /* @__PURE__ */ new Map();
454
- for (const row of rows) map.set(row.capability, chunkV36WWMTF_cjs.deriveCapabilityTriple(row).status);
454
+ for (const row of rows) map.set(row.capability, chunkUALMCHNW_cjs.deriveCapabilityTriple(row).status);
455
455
  return map;
456
456
  }, [rows]);
457
457
  return { statuses, loaded };
@@ -469,8 +469,8 @@ var DirectoriesWriteError = class _DirectoriesWriteError extends Error {
469
469
  }
470
470
  };
471
471
  function useDirectories(agencyRef) {
472
- const client = chunkV36WWMTF_cjs.useKaafilClient();
473
- const serverTime = chunkW5PG3IUJ_cjs.useServerTime();
472
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
473
+ const serverTime = chunk7UFX3Y2U_cjs.useServerTime();
474
474
  const makeManagersFetch = react.useCallback(
475
475
  (filters) => async (cursor) => {
476
476
  const page = await client.agencies.managers.listPage({
@@ -517,7 +517,7 @@ function useDirectories(agencyRef) {
517
517
  isLead: input.isLead
518
518
  });
519
519
  } catch (error) {
520
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
520
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
521
521
  }
522
522
  },
523
523
  [client]
@@ -532,7 +532,7 @@ function useDirectories(agencyRef) {
532
532
  ...input.isLead === void 0 ? {} : { isLead: input.isLead }
533
533
  });
534
534
  } catch (error) {
535
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
535
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
536
536
  }
537
537
  },
538
538
  [client]
@@ -545,7 +545,7 @@ function useDirectories(agencyRef) {
545
545
  managerRef: input.managerRef
546
546
  });
547
547
  } catch (error) {
548
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
548
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
549
549
  }
550
550
  },
551
551
  [client]
@@ -581,7 +581,7 @@ function useDirectories(agencyRef) {
581
581
  if (error instanceof DirectoriesWriteError) {
582
582
  throw error;
583
583
  }
584
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
584
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
585
585
  }
586
586
  },
587
587
  [client, serverTime]
@@ -597,7 +597,7 @@ function useDirectories(agencyRef) {
597
597
  externalTravellerId: input.externalTravellerId
598
598
  });
599
599
  } catch (error) {
600
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
600
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
601
601
  }
602
602
  },
603
603
  [client]
@@ -610,7 +610,7 @@ function useDirectories(agencyRef) {
610
610
  travellerRef: input.travellerRef
611
611
  });
612
612
  } catch (error) {
613
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
613
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
614
614
  }
615
615
  },
616
616
  [client]
@@ -625,7 +625,7 @@ function useDirectories(agencyRef) {
625
625
  travellerRefs: [...input.travellerRefs]
626
626
  });
627
627
  } catch (error) {
628
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
628
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
629
629
  }
630
630
  },
631
631
  [client]
@@ -642,7 +642,7 @@ function useDirectories(agencyRef) {
642
642
  ...input.travellerRefs !== void 0 ? { travellerRefs: [...input.travellerRefs] } : {}
643
643
  });
644
644
  } catch (error) {
645
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
645
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
646
646
  }
647
647
  },
648
648
  [client]
@@ -652,7 +652,7 @@ function useDirectories(agencyRef) {
652
652
  try {
653
653
  await client.trips.parties.remove({ tripRef: input.tripRef, partyId: input.partyId });
654
654
  } catch (error) {
655
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
655
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
656
656
  }
657
657
  },
658
658
  [client]
@@ -666,7 +666,7 @@ function useDirectories(agencyRef) {
666
666
  body: input.body
667
667
  });
668
668
  } catch (error) {
669
- throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
669
+ throw new DirectoriesWriteError(chunk6WV5VYT2_cjs.classifyError(error));
670
670
  }
671
671
  },
672
672
  [client]
@@ -750,7 +750,7 @@ var ShareLinkWriteError = class extends Error {
750
750
  }
751
751
  };
752
752
  function useShareLinks(tripRef, travellerRef) {
753
- const client = chunkV36WWMTF_cjs.useKaafilClient();
753
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
754
754
  const [links, setLinks] = react.useState(void 0);
755
755
  const [readFailed, setReadFailed] = react.useState(false);
756
756
  const refresh = react.useCallback(async () => {
@@ -781,7 +781,7 @@ function useShareLinks(tripRef, travellerRef) {
781
781
  await refresh();
782
782
  return minted;
783
783
  } catch (error) {
784
- throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
784
+ throw new ShareLinkWriteError(chunk6WV5VYT2_cjs.classifyError(error));
785
785
  }
786
786
  },
787
787
  [client, tripRef, refresh]
@@ -792,7 +792,7 @@ function useShareLinks(tripRef, travellerRef) {
792
792
  await client.shareTokens.revoke({ id });
793
793
  await refresh();
794
794
  } catch (error) {
795
- throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
795
+ throw new ShareLinkWriteError(chunk6WV5VYT2_cjs.classifyError(error));
796
796
  }
797
797
  },
798
798
  [client, refresh]
@@ -808,7 +808,7 @@ function useShareLinks(tripRef, travellerRef) {
808
808
  });
809
809
  await refresh();
810
810
  } catch (error) {
811
- throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
811
+ throw new ShareLinkWriteError(chunk6WV5VYT2_cjs.classifyError(error));
812
812
  }
813
813
  },
814
814
  [client, refresh]
@@ -820,7 +820,7 @@ function useShareLinks(tripRef, travellerRef) {
820
820
  await refresh();
821
821
  return minted;
822
822
  } catch (error) {
823
- throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
823
+ throw new ShareLinkWriteError(chunk6WV5VYT2_cjs.classifyError(error));
824
824
  }
825
825
  },
826
826
  [client, refresh]
@@ -828,7 +828,7 @@ function useShareLinks(tripRef, travellerRef) {
828
828
  return { links, readFailed, refresh, mint, revoke, patch, regenerate };
829
829
  }
830
830
  function useTravellerFormResponses(tripRef, travellerRef) {
831
- const client = chunkV36WWMTF_cjs.useKaafilClient();
831
+ const client = chunkUALMCHNW_cjs.useKaafilClient();
832
832
  const [responses, setResponses] = react.useState(
833
833
  void 0
834
834
  );
@@ -954,5 +954,5 @@ exports.useDirectories = useDirectories;
954
954
  exports.usePaginatedList = usePaginatedList;
955
955
  exports.useShareLinks = useShareLinks;
956
956
  exports.useTravellerFormResponses = useTravellerFormResponses;
957
- //# sourceMappingURL=chunk-M2D6CZK2.cjs.map
958
- //# sourceMappingURL=chunk-M2D6CZK2.cjs.map
957
+ //# sourceMappingURL=chunk-HTIY33UH.cjs.map
958
+ //# sourceMappingURL=chunk-HTIY33UH.cjs.map