kaafil-react-uikit 0.8.0 → 0.10.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 (61) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/admin/index.cjs +476 -362
  3. package/dist/admin/index.cjs.map +1 -1
  4. package/dist/admin/index.d.cts +112 -14
  5. package/dist/admin/index.d.ts +112 -14
  6. package/dist/admin/index.js +136 -22
  7. package/dist/admin/index.js.map +1 -1
  8. package/dist/{chunk-Q4B25EZO.js → chunk-2HGOHUFU.js} +3 -3
  9. package/dist/{chunk-Q4B25EZO.js.map → chunk-2HGOHUFU.js.map} +1 -1
  10. package/dist/{chunk-TDFM563X.cjs → chunk-AJEZMD64.cjs} +12 -12
  11. package/dist/{chunk-TDFM563X.cjs.map → chunk-AJEZMD64.cjs.map} +1 -1
  12. package/dist/{chunk-PQJGV3RE.cjs → chunk-APE4R2GB.cjs} +86 -86
  13. package/dist/chunk-APE4R2GB.cjs.map +1 -0
  14. package/dist/{chunk-7COMKJTM.cjs → chunk-BKDKXM3L.cjs} +11 -11
  15. package/dist/{chunk-7COMKJTM.cjs.map → chunk-BKDKXM3L.cjs.map} +1 -1
  16. package/dist/{chunk-7O3TPYK4.cjs → chunk-E6SI2S3L.cjs} +17 -17
  17. package/dist/{chunk-7O3TPYK4.cjs.map → chunk-E6SI2S3L.cjs.map} +1 -1
  18. package/dist/{chunk-YHGAFRN6.js → chunk-IDKRXLMY.js} +3 -3
  19. package/dist/{chunk-YHGAFRN6.js.map → chunk-IDKRXLMY.js.map} +1 -1
  20. package/dist/{chunk-4R7QBTNL.cjs → chunk-LYCN2BOH.cjs} +4 -4
  21. package/dist/{chunk-4R7QBTNL.cjs.map → chunk-LYCN2BOH.cjs.map} +1 -1
  22. package/dist/{chunk-57DYMIWS.js → chunk-OXCVTVBY.js} +5 -5
  23. package/dist/{chunk-57DYMIWS.js.map → chunk-OXCVTVBY.js.map} +1 -1
  24. package/dist/{chunk-ASFUY3IE.cjs → chunk-P5HF55MO.cjs} +12 -8
  25. package/dist/chunk-P5HF55MO.cjs.map +1 -0
  26. package/dist/chunk-PHVQIIOI.cjs +12 -0
  27. package/dist/{chunk-LBTAK5JA.cjs.map → chunk-PHVQIIOI.cjs.map} +1 -1
  28. package/dist/{chunk-VU5BCK2P.js → chunk-U2443I5Q.js} +6 -6
  29. package/dist/chunk-U2443I5Q.js.map +1 -0
  30. package/dist/{chunk-DYOAKTGJ.js → chunk-UMLJEBQV.js} +5 -5
  31. package/dist/{chunk-DYOAKTGJ.js.map → chunk-UMLJEBQV.js.map} +1 -1
  32. package/dist/{chunk-GKR52SVU.js → chunk-VAUGZOY6.js} +3 -3
  33. package/dist/{chunk-GKR52SVU.js.map → chunk-VAUGZOY6.js.map} +1 -1
  34. package/dist/{chunk-ZURCZQQ7.js → chunk-WMBFBZ7Q.js} +12 -8
  35. package/dist/chunk-WMBFBZ7Q.js.map +1 -0
  36. package/dist/{chunk-MP4IMAPF.cjs → chunk-X5EFVCYF.cjs} +55 -55
  37. package/dist/{chunk-MP4IMAPF.cjs.map → chunk-X5EFVCYF.cjs.map} +1 -1
  38. package/dist/{chunk-E3KOQYY2.js → chunk-ZVADVALQ.js} +5 -5
  39. package/dist/{chunk-E3KOQYY2.js.map → chunk-ZVADVALQ.js.map} +1 -1
  40. package/dist/core/index.cjs +107 -107
  41. package/dist/core/index.js +10 -10
  42. package/dist/manager/index.cjs +376 -264
  43. package/dist/manager/index.cjs.map +1 -1
  44. package/dist/manager/index.d.cts +152 -20
  45. package/dist/manager/index.d.ts +152 -20
  46. package/dist/manager/index.js +143 -31
  47. package/dist/manager/index.js.map +1 -1
  48. package/dist/offline/index.cjs +123 -0
  49. package/dist/offline/index.cjs.map +1 -0
  50. package/dist/offline/index.d.cts +177 -0
  51. package/dist/offline/index.d.ts +177 -0
  52. package/dist/offline/index.js +119 -0
  53. package/dist/offline/index.js.map +1 -0
  54. package/dist/traveller/index.cjs +35 -35
  55. package/dist/traveller/index.js +5 -5
  56. package/package.json +6 -1
  57. package/dist/chunk-ASFUY3IE.cjs.map +0 -1
  58. package/dist/chunk-LBTAK5JA.cjs +0 -12
  59. package/dist/chunk-PQJGV3RE.cjs.map +0 -1
  60. package/dist/chunk-VU5BCK2P.js.map +0 -1
  61. package/dist/chunk-ZURCZQQ7.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/offline/credentialCache.ts","../../src/offline/serviceWorker.ts"],"names":[],"mappings":"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","file":"index.js","sourcesContent":["// An OPT-IN cache around the host's own credential resolver.\n//\n// The kit never persists a credential — where a token lives, how long it is\n// kept and what clears it are host security decisions, not a design system's\n// (`SessionShell.tsx`'s own header states this, and it is why\n// `credentialResolver` is a one-shot supplier whose result is handed straight\n// to `client.*.open()` and never stored).\n//\n// That rule is about WHERE the token lives, not about who sequences the\n// fallback. Every integrator hits the same two subtleties on the way to\n// milestone 10, and both are easy to get quietly wrong:\n//\n// 1. Falling back on ANY failure. A 401 or a 500 from a reachable server is\n// a real failure and must still surface — silently serving a cached\n// credential past a revocation is the failure mode that matters.\n// 2. Treating the cache as an authority on freshness. It is not, and this\n// module deliberately cannot be: see `isUnreachable` below.\n//\n// So this helper owns the SEQUENCE and leaves the STORAGE to the host, which\n// keeps the security decision exactly where it was.\n\n/** The shape `KaafilUIKitProvider`'s `credentialResolver` resolves to —\n * structurally identical to `SessionShell.tsx`'s own union, restated here\n * rather than imported because nothing outside `src/core` may reach into the\n * SDK-facing shells (hard rule #1) and this module must stay SDK-free. */\nexport type StoredCredential =\n | { readonly accessToken: string; readonly refreshToken: string; readonly agencyRef: string }\n | { readonly shareToken: string };\n\nexport type CredentialResolver = () => Promise<StoredCredential>;\n\n/**\n * The host's own storage. Sync or async — a `localStorage` implementation and\n * an IndexedDB one both satisfy this.\n *\n * Nothing here is written to `window` (hard rule #22); a storage API is the\n * host's to choose, a global token stash is not.\n */\nexport interface CredentialStore {\n read(): Promise<StoredCredential | null> | StoredCredential | null;\n write(credential: StoredCredential): Promise<void> | void;\n clear(): Promise<void> | void;\n}\n\nexport interface CachedCredentialOptions {\n readonly store: CredentialStore;\n /**\n * Whether a thrown value means **the request never completed** — the only\n * case in which the cached credential may be used.\n *\n * The default recognises exactly one thing: the `TypeError` that `fetch`\n * throws when it cannot reach the network at all. That is deliberately\n * narrow. A host using axios, ky or their own wrapper throws something else\n * for the same condition and MUST supply this — a predicate that returns\n * `true` too eagerly turns a 401 into a silent session extension, which is\n * the exact bug this helper exists to prevent.\n */\n readonly isUnreachable?: (error: unknown) => boolean;\n}\n\n/** `fetch` rejects with a `TypeError` when the request never reached a server.\n * A response with a status — 401, 423, 500 — resolves, and is therefore not\n * this case. */\nfunction isFetchNetworkError(error: unknown): boolean {\n return error instanceof TypeError;\n}\n\n/**\n * Wrap a credential resolver so a reload with no network still opens the\n * surface, instead of stranding the outbox behind a session that cannot mint.\n *\n * ```ts\n * const resolver = withCachedCredential(\n * () => fetch('/api/admin-session', { method: 'POST' }).then((r) => r.json()),\n * { store: localStorageCredentialStore('sharma:desk') },\n * );\n * ```\n *\n * ── WHAT THIS DOES NOT DO, ON PURPOSE ───────────────────────────────────────\n *\n * It stores and restores. It NEVER judges freshness, and it has no opinion on\n * expiry. A cached access token still expires, and offline it cannot be\n * refreshed — a manager who has been offline longer than the token's life will\n * not get in, and that is a real limit to design around, not a bug here. The\n * kit surfaces the outcome through `onSessionExpired` on the provider, which\n * is where a host reacts.\n *\n * That is not only a design preference: \"now\" in this package is\n * `meta.serverTime`, never a local wall clock, and a device that has been\n * offline for hours has no trustworthy `serverTime` to compare against. A\n * helper that checked expiry here would have to read the device clock to do\n * it — the precise thing the architecture forbids, for the precise reason it\n * would be wrong.\n */\nexport function withCachedCredential(\n resolve: CredentialResolver,\n options: CachedCredentialOptions,\n): CredentialResolver {\n const { store } = options;\n const isUnreachable = options.isUnreachable ?? isFetchNetworkError;\n\n return async function resolveWithCache(): Promise<StoredCredential> {\n try {\n const fresh = await resolve();\n await store.write(fresh);\n return fresh;\n } catch (error: unknown) {\n // A server that ANSWERED — 401, 403, 500 — is a real failure and must\n // surface. Only a request that never completed may fall back.\n if (!isUnreachable(error)) throw error;\n\n const cached = await store.read();\n if (cached === null) throw error;\n\n return cached;\n }\n };\n}\n\n/**\n * A `CredentialStore` over `localStorage`, for hosts that have decided that is\n * the right place for their token. Deliberately NOT the default — the kit does\n * not choose where a credential lives.\n *\n * `scope` is an IDENTIFIER (a staff id, a persona name), never the\n * credential's own secret: it becomes a storage key, and a key is readable by\n * anything that can read the store.\n *\n * Every access is wrapped: a private window, cleared site data, or a browser\n * configured to block site storage makes these APIs throw on access rather\n * than return empty, and a credential cache that takes the app down when\n * storage is unavailable is worse than no cache at all.\n */\nexport function localStorageCredentialStore(scope: string): CredentialStore {\n const key = `kaafil:credential:${scope}`;\n\n return {\n read(): StoredCredential | null {\n try {\n const raw = localStorage.getItem(key);\n if (raw === null) return null;\n return JSON.parse(raw) as StoredCredential;\n } catch {\n return null;\n }\n },\n write(credential: StoredCredential): void {\n try {\n localStorage.setItem(key, JSON.stringify(credential));\n } catch {\n // Storage unavailable or full — the surface still opens online, and\n // the offline reload is what degrades. Never fail the mint for this.\n }\n },\n clear(): void {\n try {\n localStorage.removeItem(key);\n } catch {\n // Same reasoning as `write`.\n }\n },\n };\n}\n","// The Kaafil-specific half of a host's service worker.\n//\n// ── WHY THIS IS NOT A DROP-IN SERVICE WORKER ────────────────────────────────\n//\n// Kaafil makes your DATA survive a reload — the write goes to a durable outbox\n// and the read comes back from the snapshot store, both in IndexedDB, both\n// outliving a reload. It does nothing about your APPLICATION: the HTML\n// document, your JS, your CSS. Those come off the network like any other page,\n// so with no service worker a reload while offline gets the browser's offline\n// error page, and the queued writes sit intact behind a document that will not\n// open. The data was never lost; you just cannot reach it.\n//\n// Closing that gap is a service worker, and the CACHING half of it belongs to\n// the host: only your bundler knows your build's hashed filenames, your deploy\n// cadence and your revalidation strategy. Shipping an opinionated one here\n// would fight `vite-plugin-pwa`, `next-pwa` or whatever Workbox config you\n// already have.\n//\n// What this module ships instead is the part the kit genuinely knows: the\n// rules that are true of ANY Kaafil integration regardless of build tool. You\n// supply the precache manifest; this supplies the fetch policy.\n//\n// ── ON CACHING THE UIKIT'S OWN CSS AND JS ───────────────────────────────────\n//\n// There is nothing separate to do. This package is bundled INTO your build, so\n// its CSS and JS are already part of the output your precache manifest covers.\n// There is no Kaafil-specific asset step to add, and no Kaafil CDN URL to\n// allow — if your app shell is cached, so is the UIKit.\n\n/** The subset of the service-worker globals this module touches, declared\n * locally so the package does not have to add `lib: [\"WebWorker\"]` to its\n * tsconfig for one file. */\ninterface ServiceWorkerFetchEvent extends Event {\n readonly request: Request;\n respondWith(response: Promise<Response> | Response): void;\n}\n\ninterface ServiceWorkerLifecycleEvent extends Event {\n waitUntil(promise: Promise<unknown>): void;\n}\n\ninterface ServiceWorkerScope {\n addEventListener(type: 'install', listener: (event: ServiceWorkerLifecycleEvent) => void): void;\n addEventListener(type: 'activate', listener: (event: ServiceWorkerLifecycleEvent) => void): void;\n addEventListener(type: 'fetch', listener: (event: ServiceWorkerFetchEvent) => void): void;\n skipWaiting(): Promise<void>;\n readonly clients: { claim(): Promise<void> };\n}\n\nexport interface KaafilOfflineShellOptions {\n /**\n * The cache this worker owns. Change it to invalidate — `activate` deletes\n * every cache whose name differs, so your version string stays the only\n * revalidation knob and this module never invents a second one.\n */\n readonly cacheName: string;\n /**\n * The document served for a navigation that cannot reach the network. Must\n * be one of `precache`.\n */\n readonly appShellUrl: string;\n /**\n * Your build output, from your own bundler. `vite-plugin-pwa` and Workbox\n * both inject a manifest; map it to URLs and pass it here.\n */\n readonly precache: readonly string[];\n /**\n * Whether a URL is a Kaafil API call, which must NEVER be served from cache.\n * Defaults to any `kaafil.in` host. Override if you proxy the API through\n * your own origin — and if you do, this is the one option you cannot afford\n * to get wrong; see the note on `handleFetch`.\n */\n readonly isApiRequest?: (url: URL) => boolean;\n /**\n * Whether a URL is YOURS to serve. Anything answering `false` is declined\n * outright, so your own `fetch` listener — or the browser — handles it.\n *\n * Defaults to same-origin. That default is the point: before it existed this\n * handler claimed every non-API GET including cross-origin ones, so a\n * third-party font, an analytics beacon or a map tile went through a cache\n * lookup that could never hit. Widen it only if you genuinely want this\n * worker answering for another origin.\n */\n readonly isHostOwned?: (url: URL) => boolean;\n /**\n * Whether to cache a successful response fetched on a miss, so the next\n * offline load can serve it. Defaults to `false`.\n *\n * Off by default because `cacheName` is meant to stay the only revalidation\n * knob, and a cache that grows by itself is harder to reason about than one\n * whose contents you listed. Turn it on when precaching your build is\n * impractical — a bundler with content-hashed chunks you cannot enumerate at\n * worker-build time is the usual case.\n *\n * Only same-origin, `ok` responses are stored: an opaque cross-origin\n * response cannot be read back usefully, and caching a 404 pins it until the\n * next version bump.\n */\n readonly runtimeCache?: boolean;\n}\n\nfunction isKaafilApiHost(url: URL): boolean {\n return url.hostname === 'kaafil.in' || url.hostname.endsWith('.kaafil.in');\n}\n\nfunction isSameOrigin(url: URL): boolean {\n return url.origin === (self as unknown as { location: Location }).location.origin;\n}\n\n/**\n * Register the Kaafil offline-shell rules on a service worker you own.\n *\n * ```js title=\"src/sw.ts\"\n * import { installKaafilOfflineShell } from 'kaafil-react-uikit/offline';\n *\n * installKaafilOfflineShell({\n * cacheName: 'sharma-shell-v4',\n * appShellUrl: '/index.html',\n * precache: self.__WB_MANIFEST.map((e) => e.url),\n * });\n * ```\n *\n * Call it from your worker's top level. It adds `install`, `activate` and\n * `fetch` listeners and returns nothing.\n *\n * ── WHAT IT CLAIMS, PRECISELY ──────────────────────────────────────────────\n *\n * This used to say it \"calls `respondWith` only for requests it actually\n * owns\", which read as though it took a few and left the rest. It takes most\n * of them. It DECLINES exactly three kinds of request:\n *\n * - anything that is not a `GET`\n * - anything `isApiRequest` answers true for\n * - anything `isHostOwned` answers false for (default: cross-origin)\n *\n * Every other GET is answered here. That matters for composition: the first\n * `respondWith` wins, so a `fetch` listener you register alongside this one\n * only ever sees the three cases above. If you need a rule of your own for a\n * route this handler claims, exclude it with `isHostOwned` rather than adding\n * a second listener and wondering why it never runs.\n *\n * ── WHAT IS AVAILABLE OFFLINE ──────────────────────────────────────────────\n *\n * By default, exactly what you put in `precache` — nothing else. A miss falls\n * through to the network and, unless `runtimeCache` is on, the response is\n * returned without being stored, so the next offline load misses again.\n * `precache` is therefore not a warm-up optimisation; it is the whole offline\n * surface. Set `runtimeCache: true` if enumerating your build is impractical.\n */\nexport function installKaafilOfflineShell(options: KaafilOfflineShellOptions): void {\n const scope = self as unknown as ServiceWorkerScope;\n const { cacheName, appShellUrl, precache } = options;\n const isApiRequest = options.isApiRequest ?? isKaafilApiHost;\n const isHostOwned = options.isHostOwned ?? isSameOrigin;\n const runtimeCache = options.runtimeCache === true;\n\n scope.addEventListener('install', (event) => {\n event.waitUntil(\n (async () => {\n const cache = await caches.open(cacheName);\n await cache.addAll([...precache]);\n await scope.skipWaiting();\n })(),\n );\n });\n\n scope.addEventListener('activate', (event) => {\n event.waitUntil(\n (async () => {\n const names = await caches.keys();\n await Promise.all(\n names.filter((name) => name !== cacheName).map((name) => caches.delete(name)),\n );\n await scope.clients.claim();\n })(),\n );\n });\n\n scope.addEventListener('fetch', (event) => {\n const { request } = event;\n\n // NEVER touch a write. The outbox owns retries and their idempotency (no\n // hook mints its own key, and none accepts one); a service worker that\n // replays a POST is a second retry engine racing the first, and the\n // visible symptom is a duplicate expense nobody can explain.\n if (request.method !== 'GET') return;\n\n const url = new URL(request.url);\n\n // NEVER cache a Kaafil API response. Two different failures, both real: a\n // cached trip read shows a manager stale data they will act on, and a\n // cached SHARE response keeps serving a traveller's itinerary after the\n // token was revoked — a disclosure, not a staleness bug. Reads that should\n // survive offline already do, from the SDK's own snapshot store.\n if (isApiRequest(url)) return;\n\n // Declined, not claimed. A cross-origin font, beacon or map tile has\n // nothing to gain from a cache this worker fills, and claiming it only\n // makes the host's own listener unreachable — the first `respondWith`\n // wins.\n if (!isHostOwned(url)) return;\n\n // A navigation that cannot reach the network falls back to the cached app\n // shell. This single rule is what turns \"reload while offline\" from the\n // browser's error page into a working surface with the outbox intact.\n if (request.mode === 'navigate') {\n event.respondWith(\n (async () => {\n try {\n return await fetch(request);\n } catch {\n const cache = await caches.open(cacheName);\n const shell = await cache.match(appShellUrl);\n if (shell !== undefined) return shell;\n throw new Error(`kaafil offline shell: ${appShellUrl} is not in ${cacheName}`);\n }\n })(),\n );\n return;\n }\n\n // Everything else is cache-first. A miss goes to the network — and, unless\n // `runtimeCache` is on, the answer is returned WITHOUT being stored, so the\n // next offline load misses again. That is why `precache` is the offline\n // surface rather than a warm-up: this path never grows it.\n event.respondWith(\n (async () => {\n const cache = await caches.open(cacheName);\n const hit = await cache.match(request);\n if (hit !== undefined) return hit;\n\n const response = await fetch(request);\n if (runtimeCache && response.ok && response.type === 'basic') {\n // `ok` so a 404 is not pinned until the next version bump, and\n // `basic` so an opaque cross-origin response — which cannot be read\n // back usefully — is never stored. `clone()` because a Response body\n // may only be consumed once.\n void cache.put(request, response.clone());\n }\n return response;\n })(),\n );\n });\n}\n"]}
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunk7O3TPYK4_cjs = require('../chunk-7O3TPYK4.cjs');
4
- require('../chunk-LBTAK5JA.cjs');
5
- require('../chunk-4R7QBTNL.cjs');
6
- var chunkTDFM563X_cjs = require('../chunk-TDFM563X.cjs');
7
- var chunkASFUY3IE_cjs = require('../chunk-ASFUY3IE.cjs');
3
+ var chunkE6SI2S3L_cjs = require('../chunk-E6SI2S3L.cjs');
4
+ require('../chunk-PHVQIIOI.cjs');
5
+ require('../chunk-LYCN2BOH.cjs');
6
+ var chunkAJEZMD64_cjs = require('../chunk-AJEZMD64.cjs');
7
+ var chunkP5HF55MO_cjs = require('../chunk-P5HF55MO.cjs');
8
8
  var react = require('react');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
 
@@ -102,7 +102,7 @@ function HouseholdSheet({
102
102
  label,
103
103
  travellers
104
104
  }) {
105
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
105
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
106
106
  react.useEffect(() => {
107
107
  if (!open) {
108
108
  return;
@@ -179,11 +179,11 @@ var COPY_KEY = {
179
179
  "not-found": "chrome.shareView.ended.notFound"
180
180
  };
181
181
  function ShareEndedScreen({ reason }) {
182
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
182
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
183
183
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-share-view__ended", role: "alert", "aria-live": "assertive", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-share-view__ended-message", children: t(COPY_KEY[reason]) }) });
184
184
  }
185
185
  function ShareSkeleton() {
186
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
186
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
187
187
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-share-view__skeleton", role: "status", "aria-live": "polite", "aria-busy": "true", children: [
188
188
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-visually-hidden", children: t("chrome.shareView.loading") }),
189
189
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-share-view__skeleton-line kf-share-view__skeleton-line--eyebrow kf-shimmer" }),
@@ -297,7 +297,7 @@ function initialsOf(name) {
297
297
  return `${first}${last}`.toUpperCase();
298
298
  }
299
299
  function ContactActions({ row }) {
300
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
300
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
301
301
  if (row.phoneHref === null && row.whatsappHref === null) {
302
302
  return null;
303
303
  }
@@ -347,7 +347,7 @@ function ContactCard({
347
347
  ] });
348
348
  }
349
349
  function AgencyContactSection({ data }) {
350
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
350
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
351
351
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.shareView.agency.eyebrow"), children: [
352
352
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-share-view__eyebrow-row", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-eyebrow", children: t("chrome.shareView.agency.eyebrow") }) }),
353
353
  /* @__PURE__ */ jsxRuntime.jsx(ContactCard, { row: data, roleLabel: t("chrome.shareView.agency.roleLabel") })
@@ -364,7 +364,7 @@ function BrandHeaderSection({
364
364
  agencyContact,
365
365
  partyKind
366
366
  }) {
367
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
367
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
368
368
  const initial = agencyContact.name.trim().slice(0, 1).toUpperCase();
369
369
  const kindLabel = partyKind !== null ? t(PARTY_KIND_KEY[partyKind]) : null;
370
370
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-share-view__brand-header", children: [
@@ -418,7 +418,7 @@ function formatSize(sizeBytes) {
418
418
  return `${(kb / 1024).toFixed(1)} MB`;
419
419
  }
420
420
  function DocumentsSection({ data, timezone }) {
421
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
421
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
422
422
  const files = data.files ?? [];
423
423
  if (data.vouchers.length === 0 && files.length === 0) {
424
424
  return null;
@@ -471,7 +471,7 @@ function SelectFieldEditor({
471
471
  required,
472
472
  onChange
473
473
  }) {
474
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
474
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
475
475
  const [open, setOpen] = react.useState(false);
476
476
  const rootRef = react.useRef(null);
477
477
  const selected = options.find((option) => option.value === value);
@@ -548,7 +548,7 @@ var fallback = {
548
548
  editor: ({ field, t }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-share-view__form-unsupported", children: t("chrome.shareView.form.unsupported").replace("{label}", field.label) }),
549
549
  preview: PlainPreview
550
550
  };
551
- var fieldRegistry = chunkASFUY3IE_cjs.createRegistry({ fallback });
551
+ var fieldRegistry = chunkP5HF55MO_cjs.createRegistry({ fallback });
552
552
  fieldRegistry.register("HEADING", {
553
553
  editor: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-share-view__form-heading", children: field.label }),
554
554
  preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-share-view__form-heading", children: field.label })
@@ -974,7 +974,7 @@ function FormFillScreen({
974
974
  writeStatus,
975
975
  travellerRef
976
976
  }) {
977
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
977
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
978
978
  const [clientToken] = react.useState(() => crypto.randomUUID());
979
979
  const [answers, setAnswers] = react.useState(() => initialAnswers(form.fields));
980
980
  const readOnly = form.responseStatus === "SUBMITTED";
@@ -1073,15 +1073,15 @@ function isPendingRequired(form) {
1073
1073
  return form.required && form.fillState === "ok" && form.responseStatus === null;
1074
1074
  }
1075
1075
  function FormsSection({ token, travellerRef }) {
1076
- const engine = react.useContext(chunkASFUY3IE_cjs.OfflineEngineContext);
1076
+ const engine = react.useContext(chunkP5HF55MO_cjs.OfflineEngineContext);
1077
1077
  if (engine === null) {
1078
1078
  return null;
1079
1079
  }
1080
1080
  return /* @__PURE__ */ jsxRuntime.jsx(ReadyFormsSection, { token, travellerRef });
1081
1081
  }
1082
1082
  function ReadyFormsSection({ token, travellerRef }) {
1083
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1084
- const { status, forms, renderForm, save, submit, writeStatus, refresh } = chunk7O3TPYK4_cjs.useShareForms(token);
1083
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1084
+ const { status, forms, renderForm, save, submit, writeStatus, refresh } = chunkE6SI2S3L_cjs.useShareForms(token);
1085
1085
  const [openFormId, setOpenFormId] = react.useState(null);
1086
1086
  const [openForm, setOpenForm] = react.useState(null);
1087
1087
  const autoOpenedRef = react.useRef(false);
@@ -1197,7 +1197,7 @@ function HeroSection({
1197
1197
  travellers,
1198
1198
  onOpenHousehold
1199
1199
  }) {
1200
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1200
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1201
1201
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-share-view__hero", "aria-label": t("chrome.shareView.trip.ariaLabel"), children: [
1202
1202
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-share-view__hero-code kf-eyebrow", children: tripName }),
1203
1203
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1253,7 +1253,7 @@ function HeroSection({
1253
1253
  ] });
1254
1254
  }
1255
1255
  function HouseholdBanner({ label, names }) {
1256
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1256
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1257
1257
  if (names.length === 0 && label === null) {
1258
1258
  return null;
1259
1259
  }
@@ -1280,7 +1280,7 @@ function ItineraryDayStrip({
1280
1280
  selectedIndex,
1281
1281
  onSelectIndex
1282
1282
  }) {
1283
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1283
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1284
1284
  const todayIndex = itinerary.days.findIndex((day) => day.isToday);
1285
1285
  const selectedDay = itinerary.days[selectedIndex] ?? itinerary.days[0];
1286
1286
  if (itinerary.days.length === 0 || selectedDay === void 0) {
@@ -1342,7 +1342,7 @@ function ItineraryDayStrip({
1342
1342
  ] });
1343
1343
  }
1344
1344
  function ManagerContactSection({ data }) {
1345
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1345
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1346
1346
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.shareView.manager.eyebrow"), children: [
1347
1347
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-share-view__eyebrow-row", children: [
1348
1348
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-eyebrow", children: t("chrome.shareView.manager.eyebrow") }),
@@ -1372,7 +1372,7 @@ function formatMinor(minor, currency) {
1372
1372
  return new Intl.NumberFormat(void 0, { style: "currency", currency }).format(minor / 100);
1373
1373
  }
1374
1374
  function MoneySection({ data }) {
1375
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1375
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1376
1376
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.shareView.money.eyebrow"), children: [
1377
1377
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-share-view__eyebrow-row", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-eyebrow", children: t("chrome.shareView.money.eyebrow") }) }),
1378
1378
  /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "kf-share-view__card kf-share-view__money", children: [
@@ -1391,7 +1391,7 @@ function MoneySection({ data }) {
1391
1391
  ] })
1392
1392
  ] });
1393
1393
  }
1394
- var ITEM_TYPE_ICON = chunkASFUY3IE_cjs.createRegistry({
1394
+ var ITEM_TYPE_ICON = chunkP5HF55MO_cjs.createRegistry({
1395
1395
  fallback: () => /* @__PURE__ */ jsxRuntime.jsx(CompassIcon, {})
1396
1396
  });
1397
1397
  ITEM_TYPE_ICON.register("FLIGHT", () => /* @__PURE__ */ jsxRuntime.jsx(PlaneIcon, {}));
@@ -1430,7 +1430,7 @@ function pickNextItem(itinerary) {
1430
1430
  return void 0;
1431
1431
  }
1432
1432
  function NextUpBanner({ itinerary, timezone }) {
1433
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1433
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1434
1434
  const item = pickNextItem(itinerary);
1435
1435
  if (item === void 0) {
1436
1436
  return null;
@@ -1466,7 +1466,7 @@ var STATE_LABEL_KEY = {
1466
1466
  function dayLabel(t, n) {
1467
1467
  return t("chrome.shareView.dayLabel").replace("{n}", String(n));
1468
1468
  }
1469
- var ROW_ICON = chunkASFUY3IE_cjs.createRegistry({ fallback: () => /* @__PURE__ */ jsxRuntime.jsx(CompassIcon, {}) });
1469
+ var ROW_ICON = chunkP5HF55MO_cjs.createRegistry({ fallback: () => /* @__PURE__ */ jsxRuntime.jsx(CompassIcon, {}) });
1470
1470
  ROW_ICON.register("transport", () => /* @__PURE__ */ jsxRuntime.jsx(CarIcon, {}));
1471
1471
  ROW_ICON.register("stay", () => /* @__PURE__ */ jsxRuntime.jsx(HouseIcon, {}));
1472
1472
  ROW_ICON.register("activity", () => /* @__PURE__ */ jsxRuntime.jsx(CompassIcon, {}));
@@ -1553,7 +1553,7 @@ function StayAndTransportSection({
1553
1553
  selectedDayIndex,
1554
1554
  serverTime
1555
1555
  }) {
1556
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1556
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1557
1557
  const allDayRows = [
1558
1558
  ...mergeDayBookings(
1559
1559
  transport,
@@ -1642,7 +1642,7 @@ function StayAndTransportSection({
1642
1642
  ] });
1643
1643
  }
1644
1644
  function TodayPlanSection({ itinerary, timezone }) {
1645
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1645
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1646
1646
  const today = itinerary.days.find((day) => day.isToday);
1647
1647
  if (today === void 0 || today.items.length === 0) {
1648
1648
  return null;
@@ -1669,7 +1669,7 @@ function isVisible(key, overrides) {
1669
1669
  return overrides?.[key] !== false;
1670
1670
  }
1671
1671
  function KaafilShareView(props) {
1672
- const session = chunkASFUY3IE_cjs.useSession();
1672
+ const session = chunkP5HF55MO_cjs.useSession();
1673
1673
  if (session.status !== "authenticated") {
1674
1674
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-share-view", "data-kf-family": "traveller", children: /* @__PURE__ */ jsxRuntime.jsx(ShareSkeleton, {}) });
1675
1675
  }
@@ -1684,8 +1684,8 @@ function ReadyKaafilShareView({
1684
1684
  renderSection,
1685
1685
  style
1686
1686
  }) {
1687
- const { t } = chunkASFUY3IE_cjs.useKaafilChrome();
1688
- const snapshot = chunk7O3TPYK4_cjs.useShareSnapshot(token, { travellerRef });
1687
+ const { t } = chunkP5HF55MO_cjs.useKaafilChrome();
1688
+ const snapshot = chunkE6SI2S3L_cjs.useShareSnapshot(token, { travellerRef });
1689
1689
  const [householdSheetOpen, setHouseholdSheetOpen] = react.useState(false);
1690
1690
  const [chosenDayIndex, setChosenDayIndex] = react.useState(-1);
1691
1691
  const itinerary = snapshot.sections.get("itinerary");
@@ -1705,7 +1705,7 @@ function ReadyKaafilShareView({
1705
1705
  () => snapshot.trip !== void 0 ? deriveTripStatus(snapshot.trip, itinerary, snapshot.serverTime, t) : void 0,
1706
1706
  [snapshot.trip, itinerary, snapshot.serverTime, t]
1707
1707
  );
1708
- const rootStyle = chunkASFUY3IE_cjs.tokenStyle(style);
1708
+ const rootStyle = chunkP5HF55MO_cjs.tokenStyle(style);
1709
1709
  if (snapshot.status === "loading") {
1710
1710
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-share-view", "data-kf-family": "traveller", style: rootStyle, children: /* @__PURE__ */ jsxRuntime.jsx(ShareSkeleton, {}) });
1711
1711
  }
@@ -1726,7 +1726,7 @@ function ReadyKaafilShareView({
1726
1726
  const selectedDayIndex = chosenDayIndex !== -1 ? chosenDayIndex : todayDayIndex !== -1 ? todayDayIndex : 0;
1727
1727
  const showStayAndTransport = accommodation !== void 0 || transport !== void 0 || activities !== void 0 || rooming !== void 0 || seating !== void 0 || pickup !== void 0;
1728
1728
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-share-view", "data-kf-family": "traveller", style: rootStyle, children: [
1729
- /* @__PURE__ */ jsxRuntime.jsxs(chunkASFUY3IE_cjs.BrandShell, { headStrategy, appName: tripName, children: [
1729
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkP5HF55MO_cjs.BrandShell, { headStrategy, appName: tripName, children: [
1730
1730
  agencyContact !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
1731
1731
  BrandHeaderSection,
1732
1732
  {
@@ -1794,11 +1794,11 @@ function ReadyKaafilShareView({
1794
1794
 
1795
1795
  Object.defineProperty(exports, "BootErrorScreen", {
1796
1796
  enumerable: true,
1797
- get: function () { return chunkTDFM563X_cjs.BootErrorScreen; }
1797
+ get: function () { return chunkAJEZMD64_cjs.BootErrorScreen; }
1798
1798
  });
1799
1799
  Object.defineProperty(exports, "OfflineFallbackScreen", {
1800
1800
  enumerable: true,
1801
- get: function () { return chunkTDFM563X_cjs.OfflineFallbackScreen; }
1801
+ get: function () { return chunkAJEZMD64_cjs.OfflineFallbackScreen; }
1802
1802
  });
1803
1803
  exports.KaafilShareView = KaafilShareView;
1804
1804
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
- import { useShareSnapshot, useShareForms } from '../chunk-DYOAKTGJ.js';
2
- import '../chunk-Q4B25EZO.js';
3
- import '../chunk-GKR52SVU.js';
4
- export { BootErrorScreen, OfflineFallbackScreen } from '../chunk-YHGAFRN6.js';
5
- import { createRegistry, useKaafilChrome, useSession, tokenStyle, BrandShell, OfflineEngineContext } from '../chunk-ZURCZQQ7.js';
1
+ import { useShareSnapshot, useShareForms } from '../chunk-UMLJEBQV.js';
2
+ import '../chunk-2HGOHUFU.js';
3
+ import '../chunk-VAUGZOY6.js';
4
+ export { BootErrorScreen, OfflineFallbackScreen } from '../chunk-IDKRXLMY.js';
5
+ import { createRegistry, useKaafilChrome, useSession, tokenStyle, BrandShell, OfflineEngineContext } from '../chunk-WMBFBZ7Q.js';
6
6
  import { useState, useRef, useEffect, useMemo, useContext } from 'react';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaafil-react-uikit",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "tag": "latest",
@@ -53,6 +53,11 @@
53
53
  "types": "./dist/testing/index.d.ts",
54
54
  "import": "./dist/testing/index.js",
55
55
  "require": "./dist/testing/index.cjs"
56
+ },
57
+ "./offline": {
58
+ "types": "./dist/offline/index.d.ts",
59
+ "import": "./dist/offline/index.js",
60
+ "require": "./dist/offline/index.cjs"
56
61
  }
57
62
  },
58
63
  "peerDependencies": {