kaafil-react-uikit 0.4.2 → 0.6.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 (49) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/admin/index.cjs +394 -355
  3. package/dist/admin/index.cjs.map +1 -1
  4. package/dist/admin/index.js +55 -16
  5. package/dist/admin/index.js.map +1 -1
  6. package/dist/{chunk-762SWUEG.js → chunk-4BPCKBLP.js} +3 -3
  7. package/dist/{chunk-762SWUEG.js.map → chunk-4BPCKBLP.js.map} +1 -1
  8. package/dist/{chunk-CK3L6Y43.cjs → chunk-4QMYUKW4.cjs} +10 -2
  9. package/dist/chunk-4QMYUKW4.cjs.map +1 -0
  10. package/dist/{chunk-LO3GQFQ6.cjs → chunk-53ITV6GF.cjs} +4 -4
  11. package/dist/{chunk-LO3GQFQ6.cjs.map → chunk-53ITV6GF.cjs.map} +1 -1
  12. package/dist/{chunk-V6UQ6GIM.cjs → chunk-77RKNRNH.cjs} +57 -58
  13. package/dist/chunk-77RKNRNH.cjs.map +1 -0
  14. package/dist/{chunk-DI77H7ED.cjs → chunk-AWOKWGTB.cjs} +83 -83
  15. package/dist/{chunk-DI77H7ED.cjs.map → chunk-AWOKWGTB.cjs.map} +1 -1
  16. package/dist/{chunk-EDLIJSMR.js → chunk-CJMUPBZ7.js} +5 -5
  17. package/dist/{chunk-EDLIJSMR.js.map → chunk-CJMUPBZ7.js.map} +1 -1
  18. package/dist/{chunk-ITGVRN2S.js → chunk-F6B4CDUL.js} +3 -3
  19. package/dist/{chunk-ITGVRN2S.js.map → chunk-F6B4CDUL.js.map} +1 -1
  20. package/dist/{chunk-XU7GP53M.js → chunk-F6YBM6EE.js} +3 -3
  21. package/dist/{chunk-XU7GP53M.js.map → chunk-F6YBM6EE.js.map} +1 -1
  22. package/dist/{chunk-QMUIZHJO.js → chunk-HNENKHHJ.js} +8 -9
  23. package/dist/chunk-HNENKHHJ.js.map +1 -0
  24. package/dist/{chunk-RW6TJMRK.js → chunk-JHLPO6LZ.js} +3 -3
  25. package/dist/{chunk-RW6TJMRK.js.map → chunk-JHLPO6LZ.js.map} +1 -1
  26. package/dist/{chunk-3RZDHDEY.cjs → chunk-OOHU3ECL.cjs} +17 -17
  27. package/dist/{chunk-3RZDHDEY.cjs.map → chunk-OOHU3ECL.cjs.map} +1 -1
  28. package/dist/{chunk-3E2FN5JJ.js → chunk-PWZNUXKT.js} +3 -3
  29. package/dist/{chunk-3E2FN5JJ.js.map → chunk-PWZNUXKT.js.map} +1 -1
  30. package/dist/{chunk-6FUVFVYY.js → chunk-SEPFCHBJ.js} +10 -2
  31. package/dist/chunk-SEPFCHBJ.js.map +1 -0
  32. package/dist/chunk-V45VFRBI.cjs +12 -0
  33. package/dist/{chunk-62HCQWZL.cjs.map → chunk-V45VFRBI.cjs.map} +1 -1
  34. package/dist/{chunk-QD4Z5DRT.cjs → chunk-XPCCR7OH.cjs} +12 -12
  35. package/dist/{chunk-QD4Z5DRT.cjs.map → chunk-XPCCR7OH.cjs.map} +1 -1
  36. package/dist/{chunk-XYIOM75D.cjs → chunk-XPF737RG.cjs} +9 -9
  37. package/dist/{chunk-XYIOM75D.cjs.map → chunk-XPF737RG.cjs.map} +1 -1
  38. package/dist/core/index.cjs +107 -107
  39. package/dist/core/index.js +10 -10
  40. package/dist/manager/index.cjs +239 -239
  41. package/dist/manager/index.js +6 -6
  42. package/dist/traveller/index.cjs +35 -35
  43. package/dist/traveller/index.js +5 -5
  44. package/package.json +2 -2
  45. package/dist/chunk-62HCQWZL.cjs +0 -12
  46. package/dist/chunk-6FUVFVYY.js.map +0 -1
  47. package/dist/chunk-CK3L6Y43.cjs.map +0 -1
  48. package/dist/chunk-QMUIZHJO.js.map +0 -1
  49. package/dist/chunk-V6UQ6GIM.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkCK3L6Y43_cjs = require('./chunk-CK3L6Y43.cjs');
3
+ var chunk4QMYUKW4_cjs = require('./chunk-4QMYUKW4.cjs');
4
4
  var react = require('react');
5
5
 
6
6
  var TICK_INTERVAL_MS = 1e3;
7
7
  function useServerTime() {
8
- const engine = react.useContext(chunkCK3L6Y43_cjs.OfflineEngineContext);
8
+ const engine = react.useContext(chunk4QMYUKW4_cjs.OfflineEngineContext);
9
9
  const [lastServerTime, setLastServerTime] = react.useState(void 0);
10
10
  const observedAtPerfRef = react.useRef(void 0);
11
11
  const [, forceTick] = react.useState(0);
@@ -39,5 +39,5 @@ function useServerTime() {
39
39
  }
40
40
 
41
41
  exports.useServerTime = useServerTime;
42
- //# sourceMappingURL=chunk-LO3GQFQ6.cjs.map
43
- //# sourceMappingURL=chunk-LO3GQFQ6.cjs.map
42
+ //# sourceMappingURL=chunk-53ITV6GF.cjs.map
43
+ //# sourceMappingURL=chunk-53ITV6GF.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/hooks/useServerTime.ts"],"names":["useContext","OfflineEngineContext","useState","useRef","useEffect"],"mappings":";;;;;AA8BA,IAAM,gBAAA,GAAmB,GAAA;AAElB,SAAS,aAAA,GAA+B;AAC7C,EAAA,MAAM,MAAA,GAASA,iBAAWC,sCAAoB,CAAA;AAC9C,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAIC,eAA6B,MAAS,CAAA;AAClF,EAAA,MAAM,iBAAA,GAAoBC,aAA2B,MAAS,CAAA;AAC9D,EAAA,MAAM,GAAG,SAAS,CAAA,GAAID,eAAS,CAAC,CAAA;AAEhC,EAAAE,eAAA,CAAU,MAAM;AACd,IAAA,IAAI,WAAW,IAAA,EAAM;AACnB,MAAA;AAAA,IACF;AAKA,IAAA,MAAM,cAAc,MAAA,CAAO,MAAA,CAAO,EAAA,CAAG,kBAAA,EAAoB,CAAC,KAAA,KAAU;AASlE,MAAA,IAAI,KAAA,CAAM,eAAe,MAAA,EAAW;AAClC,QAAA;AAAA,MACF;AACA,MAAA,iBAAA,CAAkB,OAAA,GAAU,YAAY,GAAA,EAAI;AAC5C,MAAA,iBAAA,CAAkB,MAAM,UAAU,CAAA;AAAA,IACpC,CAAC,CAAA;AACD,IAAA,OAAO,WAAA;AAAA,EACT,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAEX,EAAAA,eAAA,CAAU,MAAM;AACd,IAAA,MAAM,EAAA,GAAK,YAAY,MAAM,SAAA,CAAU,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA,EAAG,gBAAgB,CAAA;AAC5E,IAAA,OAAO,MAAM,cAAc,EAAE,CAAA;AAAA,EAC/B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,SAAS,GAAA,GAAc;AACrB,IAAA,IAAI,cAAA,KAAmB,MAAA,IAAa,iBAAA,CAAkB,OAAA,KAAY,MAAA,EAAW;AAY3E,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,MAAM,SAAA,GAAY,WAAA,CAAY,GAAA,EAAI,GAAI,iBAAA,CAAkB,OAAA;AACxD,IAAA,OAAO,IAAI,KAAK,IAAA,CAAK,KAAA,CAAM,cAAc,CAAA,GAAI,SAAS,EAAE,WAAA,EAAY;AAAA,EACtE;AAEA,EAAA,OAAO,EAAE,GAAA,EAAK,aAAA,EAAe,cAAA,EAAe;AAC9C","file":"chunk-LO3GQFQ6.cjs","sourcesContent":["'use client';\n\n// `08-core-hooks.md §1.6`. The single place that turns the stream of\n// `meta.serverTime` stamps into a usable clock, so no composite reads\n// `meta.serverTime` off an individual response by hand.\n//\n// Hard rule #6 (\"Zero `Date.now()`/`new Date()` local getters in\n// `src/core`\") bans exactly the two calls that fabricate \"now\" from the\n// local wall clock: `Date.now()` and no-argument `new Date()`. This file\n// never calls either. Advancing a SERVER-supplied timestamp by an elapsed\n// delta necessarily needs SOME measure of \"how much local time passed\" —\n// this file measures that with `performance.now()`, a monotonic clock with\n// no relationship to wall-clock \"now\" (it cannot be read as a date, only as\n// a duration), and applies the delta with `new Date(<epoch-ms>)` /\n// `Date.parse(<iso-string>)` — both single-argument forms that operate on a\n// value already anchored to `meta.serverTime`, never on the local clock.\n\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport { OfflineEngineContext } from '../internal/contexts';\n\nexport interface ServerTimeApi {\n now: () => string;\n sinceLastSync: string | undefined;\n}\n\n/** Re-renders any hook consumer often enough for a mounted countdown to look\n * live, without pretending the underlying value moved forward on its own\n * merits (`08-core-hooks.md §1.6`'s sandbox time-travel caveat: this timer\n * forces a re-render, it never advances the stamp past what the last real\n * response justified). */\nconst TICK_INTERVAL_MS = 1000;\n\nexport function useServerTime(): ServerTimeApi {\n const engine = useContext(OfflineEngineContext);\n const [lastServerTime, setLastServerTime] = useState<string | undefined>(undefined);\n const observedAtPerfRef = useRef<number | undefined>(undefined);\n const [, forceTick] = useState(0);\n\n useEffect(() => {\n if (engine === null) {\n return;\n }\n // `snapshot.updated` is the one event in `OfflineEventMap` that carries\n // `serverTime` (`kaafil-js/src/offline/events.ts`, verified this\n // session) — the engine's other five events do not, so this is the only\n // subscription this hook can build without inventing a stamp.\n const unsubscribe = engine.events.on('snapshot.updated', (event) => {\n // `serverTime` is ABSENT on a change that never involved the server —\n // an optimistic create painted while offline, or an op the host\n // discarded (`kaafil-js/src/offline/events.ts`). Those are real snapshot\n // changes and a list must repaint for them, but they carry no reading,\n // and taking `undefined` here would erase the last real one this\n // session had: `now()` would start throwing again mid-session, on a\n // device that HAS heard from the server, because the manager ticked\n // something off out of signal.\n if (event.serverTime === undefined) {\n return;\n }\n observedAtPerfRef.current = performance.now();\n setLastServerTime(event.serverTime);\n });\n return unsubscribe;\n }, [engine]);\n\n useEffect(() => {\n const id = setInterval(() => forceTick((tick) => tick + 1), TICK_INTERVAL_MS);\n return () => clearInterval(id);\n }, []);\n\n function now(): string {\n if (lastServerTime === undefined || observedAtPerfRef.current === undefined) {\n // No response has ever landed in this session yet. Fabricating a\n // value from the local wall clock is exactly what hard rule #6\n // forbids — this is the one case this hook cannot silently satisfy\n // its own non-optional return type, so it says so loudly instead.\n // CALLERS: this is a real, expected window — React runs an effect\n // (which is how this hook's own subscription above starts) strictly\n // AFTER the render that needs `now()`'s result has already committed,\n // so a component's very FIRST render can hit this throw even when\n // wired up correctly. Guard the call site, matching\n // `useStaleness.ts`'s own precedent, rather than reaching for a\n // device-clock fallback here (hard rule #6 forbids exactly that).\n throw new Error(\n 'useServerTime().now() was called before any response carrying meta.serverTime ' +\n 'had been observed — there is no server timestamp yet to advance from.',\n );\n }\n const elapsedMs = performance.now() - observedAtPerfRef.current;\n return new Date(Date.parse(lastServerTime) + elapsedMs).toISOString();\n }\n\n return { now, sinceLastSync: lastServerTime };\n}\n"]}
1
+ {"version":3,"sources":["../src/core/hooks/useServerTime.ts"],"names":["useContext","OfflineEngineContext","useState","useRef","useEffect"],"mappings":";;;;;AA8BA,IAAM,gBAAA,GAAmB,GAAA;AAElB,SAAS,aAAA,GAA+B;AAC7C,EAAA,MAAM,MAAA,GAASA,iBAAWC,sCAAoB,CAAA;AAC9C,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAIC,eAA6B,MAAS,CAAA;AAClF,EAAA,MAAM,iBAAA,GAAoBC,aAA2B,MAAS,CAAA;AAC9D,EAAA,MAAM,GAAG,SAAS,CAAA,GAAID,eAAS,CAAC,CAAA;AAEhC,EAAAE,eAAA,CAAU,MAAM;AACd,IAAA,IAAI,WAAW,IAAA,EAAM;AACnB,MAAA;AAAA,IACF;AAKA,IAAA,MAAM,cAAc,MAAA,CAAO,MAAA,CAAO,EAAA,CAAG,kBAAA,EAAoB,CAAC,KAAA,KAAU;AASlE,MAAA,IAAI,KAAA,CAAM,eAAe,MAAA,EAAW;AAClC,QAAA;AAAA,MACF;AACA,MAAA,iBAAA,CAAkB,OAAA,GAAU,YAAY,GAAA,EAAI;AAC5C,MAAA,iBAAA,CAAkB,MAAM,UAAU,CAAA;AAAA,IACpC,CAAC,CAAA;AACD,IAAA,OAAO,WAAA;AAAA,EACT,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAEX,EAAAA,eAAA,CAAU,MAAM;AACd,IAAA,MAAM,EAAA,GAAK,YAAY,MAAM,SAAA,CAAU,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA,EAAG,gBAAgB,CAAA;AAC5E,IAAA,OAAO,MAAM,cAAc,EAAE,CAAA;AAAA,EAC/B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,SAAS,GAAA,GAAc;AACrB,IAAA,IAAI,cAAA,KAAmB,MAAA,IAAa,iBAAA,CAAkB,OAAA,KAAY,MAAA,EAAW;AAY3E,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,MAAM,SAAA,GAAY,WAAA,CAAY,GAAA,EAAI,GAAI,iBAAA,CAAkB,OAAA;AACxD,IAAA,OAAO,IAAI,KAAK,IAAA,CAAK,KAAA,CAAM,cAAc,CAAA,GAAI,SAAS,EAAE,WAAA,EAAY;AAAA,EACtE;AAEA,EAAA,OAAO,EAAE,GAAA,EAAK,aAAA,EAAe,cAAA,EAAe;AAC9C","file":"chunk-53ITV6GF.cjs","sourcesContent":["'use client';\n\n// `08-core-hooks.md §1.6`. The single place that turns the stream of\n// `meta.serverTime` stamps into a usable clock, so no composite reads\n// `meta.serverTime` off an individual response by hand.\n//\n// Hard rule #6 (\"Zero `Date.now()`/`new Date()` local getters in\n// `src/core`\") bans exactly the two calls that fabricate \"now\" from the\n// local wall clock: `Date.now()` and no-argument `new Date()`. This file\n// never calls either. Advancing a SERVER-supplied timestamp by an elapsed\n// delta necessarily needs SOME measure of \"how much local time passed\" —\n// this file measures that with `performance.now()`, a monotonic clock with\n// no relationship to wall-clock \"now\" (it cannot be read as a date, only as\n// a duration), and applies the delta with `new Date(<epoch-ms>)` /\n// `Date.parse(<iso-string>)` — both single-argument forms that operate on a\n// value already anchored to `meta.serverTime`, never on the local clock.\n\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport { OfflineEngineContext } from '../internal/contexts';\n\nexport interface ServerTimeApi {\n now: () => string;\n sinceLastSync: string | undefined;\n}\n\n/** Re-renders any hook consumer often enough for a mounted countdown to look\n * live, without pretending the underlying value moved forward on its own\n * merits (`08-core-hooks.md §1.6`'s sandbox time-travel caveat: this timer\n * forces a re-render, it never advances the stamp past what the last real\n * response justified). */\nconst TICK_INTERVAL_MS = 1000;\n\nexport function useServerTime(): ServerTimeApi {\n const engine = useContext(OfflineEngineContext);\n const [lastServerTime, setLastServerTime] = useState<string | undefined>(undefined);\n const observedAtPerfRef = useRef<number | undefined>(undefined);\n const [, forceTick] = useState(0);\n\n useEffect(() => {\n if (engine === null) {\n return;\n }\n // `snapshot.updated` is the one event in `OfflineEventMap` that carries\n // `serverTime` (`kaafil-js/src/offline/events.ts`, verified this\n // session) — the engine's other five events do not, so this is the only\n // subscription this hook can build without inventing a stamp.\n const unsubscribe = engine.events.on('snapshot.updated', (event) => {\n // `serverTime` is ABSENT on a change that never involved the server —\n // an optimistic create painted while offline, or an op the host\n // discarded (`kaafil-js/src/offline/events.ts`). Those are real snapshot\n // changes and a list must repaint for them, but they carry no reading,\n // and taking `undefined` here would erase the last real one this\n // session had: `now()` would start throwing again mid-session, on a\n // device that HAS heard from the server, because the manager ticked\n // something off out of signal.\n if (event.serverTime === undefined) {\n return;\n }\n observedAtPerfRef.current = performance.now();\n setLastServerTime(event.serverTime);\n });\n return unsubscribe;\n }, [engine]);\n\n useEffect(() => {\n const id = setInterval(() => forceTick((tick) => tick + 1), TICK_INTERVAL_MS);\n return () => clearInterval(id);\n }, []);\n\n function now(): string {\n if (lastServerTime === undefined || observedAtPerfRef.current === undefined) {\n // No response has ever landed in this session yet. Fabricating a\n // value from the local wall clock is exactly what hard rule #6\n // forbids — this is the one case this hook cannot silently satisfy\n // its own non-optional return type, so it says so loudly instead.\n // CALLERS: this is a real, expected window — React runs an effect\n // (which is how this hook's own subscription above starts) strictly\n // AFTER the render that needs `now()`'s result has already committed,\n // so a component's very FIRST render can hit this throw even when\n // wired up correctly. Guard the call site, matching\n // `useStaleness.ts`'s own precedent, rather than reaching for a\n // device-clock fallback here (hard rule #6 forbids exactly that).\n throw new Error(\n 'useServerTime().now() was called before any response carrying meta.serverTime ' +\n 'had been observed — there is no server timestamp yet to advance from.',\n );\n }\n const elapsedMs = performance.now() - observedAtPerfRef.current;\n return new Date(Date.parse(lastServerTime) + elapsedMs).toISOString();\n }\n\n return { now, sinceLastSync: lastServerTime };\n}\n"]}
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkDI77H7ED_cjs = require('./chunk-DI77H7ED.cjs');
4
- var chunkLO3GQFQ6_cjs = require('./chunk-LO3GQFQ6.cjs');
5
- var chunkCK3L6Y43_cjs = require('./chunk-CK3L6Y43.cjs');
3
+ var chunkAWOKWGTB_cjs = require('./chunk-AWOKWGTB.cjs');
4
+ var chunk53ITV6GF_cjs = require('./chunk-53ITV6GF.cjs');
5
+ var chunk4QMYUKW4_cjs = require('./chunk-4QMYUKW4.cjs');
6
6
  var react = require('react');
7
7
  var client = require('kaafil-js/client');
8
8
  var reactDom = require('react-dom');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
 
11
11
  function useAgencyAdminMe() {
12
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
12
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
13
13
  const [result, setResult] = react.useState({ status: "loading" });
14
14
  react.useEffect(() => {
15
15
  let cancelled = false;
@@ -31,7 +31,7 @@ function useAgencyAdminMe() {
31
31
  return result;
32
32
  }
33
33
  function useAgencyChecklistTemplates() {
34
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
34
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
35
35
  const [templates, setTemplates] = react.useState([]);
36
36
  const [loaded, setLoaded] = react.useState(false);
37
37
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -91,7 +91,7 @@ function useAgencyChecklistTemplates() {
91
91
  };
92
92
  }
93
93
  function useAgencyForms() {
94
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
94
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
95
95
  const [forms, setForms] = react.useState([]);
96
96
  const [loaded, setLoaded] = react.useState(false);
97
97
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -247,7 +247,7 @@ function useAgencyForms() {
247
247
  };
248
248
  }
249
249
  function useAgencyJourneyTriggers() {
250
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
250
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
251
251
  const [triggers, setTriggers] = react.useState([]);
252
252
  const [loaded, setLoaded] = react.useState(false);
253
253
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -275,7 +275,7 @@ function useAgencyJourneyTriggers() {
275
275
  return { triggers, loaded, lastFetchFailed, refresh, patchTrigger };
276
276
  }
277
277
  function useAgencyManagerProfile(managerRef) {
278
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
278
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
279
279
  const [read, setRead] = react.useState(void 0);
280
280
  const [readFailed, setReadFailed] = react.useState(false);
281
281
  const refresh = react.useCallback(async () => {
@@ -293,7 +293,7 @@ function useAgencyManagerProfile(managerRef) {
293
293
  return { read, readFailed, refresh };
294
294
  }
295
295
  function useAgencySettings() {
296
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
296
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
297
297
  const [document2, setDocument] = react.useState(void 0);
298
298
  const [loaded, setLoaded] = react.useState(false);
299
299
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -321,7 +321,7 @@ function useAgencySettings() {
321
321
  return { document: document2, loaded, lastFetchFailed, refresh, patchSettings };
322
322
  }
323
323
  function useAgencyTrip(tripRef) {
324
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
324
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
325
325
  const [read, setRead] = react.useState(void 0);
326
326
  const [readFailed, setReadFailed] = react.useState(false);
327
327
  const refresh = react.useCallback(async () => {
@@ -341,7 +341,7 @@ function useAgencyTrip(tripRef) {
341
341
  var DEFAULT_PAGE_LIMIT = 20;
342
342
  var GROUPED_PAGE_LIMIT = 100;
343
343
  function useAgencyTripManifest(tripRef) {
344
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
344
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
345
345
  const [facets, setFacets] = react.useState(void 0);
346
346
  const mountedRef = react.useRef(true);
347
347
  react.useEffect(() => {
@@ -372,7 +372,7 @@ function useAgencyTripManifest(tripRef) {
372
372
  }
373
373
  var DEFAULT_PAGE_LIMIT2 = 20;
374
374
  function useAgencyTrips() {
375
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
375
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
376
376
  const [segmentCounts, setSegmentCounts] = react.useState(
377
377
  void 0
378
378
  );
@@ -402,18 +402,18 @@ function useAgencyTrips() {
402
402
  );
403
403
  return { makeTripsFetch, segmentCounts };
404
404
  }
405
- var useBookingsInternal = chunkDI77H7ED_cjs.createDomainHook("bookings", (tripRef) => {
405
+ var useBookingsInternal = chunkAWOKWGTB_cjs.createDomainHook("bookings", (tripRef) => {
406
406
  const {
407
407
  rows: bookings,
408
408
  syncedAt,
409
409
  refreshLive
410
- } = chunkDI77H7ED_cjs.useSnapshotList(tripRef, "bookings", {
410
+ } = chunkAWOKWGTB_cjs.useSnapshotList(tripRef, "bookings", {
411
411
  live: async (liveClient, ref) => {
412
412
  const response = await liveClient.bookings.list({ tripRef: ref });
413
413
  return { rows: [...response], syncedAt: response.meta.serverTime };
414
414
  }
415
415
  });
416
- const vouchersMutation = chunkCK3L6Y43_cjs.useOfflineMutation({
416
+ const vouchersMutation = chunk4QMYUKW4_cjs.useOfflineMutation({
417
417
  tripRef,
418
418
  enqueue: (engine, input) => engine.enqueue({
419
419
  tripRef,
@@ -450,10 +450,10 @@ function useBookings(tripRef) {
450
450
  return useBookingsInternal(tripRef);
451
451
  }
452
452
  function useCapabilityStatuses(tripRef) {
453
- const { rows, loaded } = chunkCK3L6Y43_cjs.useCapabilityRows(tripRef);
453
+ const { rows, loaded } = chunk4QMYUKW4_cjs.useCapabilityRows(tripRef);
454
454
  const statuses = react.useMemo(() => {
455
455
  const map = /* @__PURE__ */ new Map();
456
- for (const row of rows) map.set(row.capability, chunkCK3L6Y43_cjs.deriveCapabilityTriple(row).status);
456
+ for (const row of rows) map.set(row.capability, chunk4QMYUKW4_cjs.deriveCapabilityTriple(row).status);
457
457
  return map;
458
458
  }, [rows]);
459
459
  return { statuses, loaded };
@@ -471,8 +471,8 @@ var DirectoriesWriteError = class _DirectoriesWriteError extends Error {
471
471
  }
472
472
  };
473
473
  function useDirectories(agencyRef) {
474
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
475
- const serverTime = chunkLO3GQFQ6_cjs.useServerTime();
474
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
475
+ chunk53ITV6GF_cjs.useServerTime();
476
476
  const makeManagersFetch = react.useCallback(
477
477
  (filters) => async (cursor) => {
478
478
  const page = await client.agencies.managers.listPage({
@@ -519,7 +519,7 @@ function useDirectories(agencyRef) {
519
519
  isLead: input.isLead
520
520
  });
521
521
  } catch (error) {
522
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
522
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
523
523
  }
524
524
  },
525
525
  [client]
@@ -534,7 +534,7 @@ function useDirectories(agencyRef) {
534
534
  ...input.isLead === void 0 ? {} : { isLead: input.isLead }
535
535
  });
536
536
  } catch (error) {
537
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
537
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
538
538
  }
539
539
  },
540
540
  [client]
@@ -547,7 +547,7 @@ function useDirectories(agencyRef) {
547
547
  managerRef: input.managerRef
548
548
  });
549
549
  } catch (error) {
550
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
550
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
551
551
  }
552
552
  },
553
553
  [client]
@@ -561,8 +561,7 @@ function useDirectories(agencyRef) {
561
561
  {
562
562
  externalTravellerId: input.externalTravellerId,
563
563
  fullName: input.fullName,
564
- phone: input.phone,
565
- sourceUpdatedAt: serverTime.now()
564
+ phone: input.phone
566
565
  }
567
566
  ]
568
567
  });
@@ -583,10 +582,10 @@ function useDirectories(agencyRef) {
583
582
  if (error instanceof DirectoriesWriteError) {
584
583
  throw error;
585
584
  }
586
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
585
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
587
586
  }
588
587
  },
589
- [client, serverTime]
588
+ [client]
590
589
  );
591
590
  const createAgencyTraveller = react.useCallback(
592
591
  async (input) => {
@@ -599,7 +598,7 @@ function useDirectories(agencyRef) {
599
598
  externalTravellerId: input.externalTravellerId
600
599
  });
601
600
  } catch (error) {
602
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
601
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
603
602
  }
604
603
  },
605
604
  [client]
@@ -612,7 +611,7 @@ function useDirectories(agencyRef) {
612
611
  travellerRef: input.travellerRef
613
612
  });
614
613
  } catch (error) {
615
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
614
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
616
615
  }
617
616
  },
618
617
  [client]
@@ -627,7 +626,7 @@ function useDirectories(agencyRef) {
627
626
  travellerRefs: [...input.travellerRefs]
628
627
  });
629
628
  } catch (error) {
630
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
629
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
631
630
  }
632
631
  },
633
632
  [client]
@@ -644,7 +643,7 @@ function useDirectories(agencyRef) {
644
643
  ...input.travellerRefs !== void 0 ? { travellerRefs: [...input.travellerRefs] } : {}
645
644
  });
646
645
  } catch (error) {
647
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
646
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
648
647
  }
649
648
  },
650
649
  [client]
@@ -654,7 +653,7 @@ function useDirectories(agencyRef) {
654
653
  try {
655
654
  await client.trips.parties.remove({ tripRef: input.tripRef, partyId: input.partyId });
656
655
  } catch (error) {
657
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
656
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
658
657
  }
659
658
  },
660
659
  [client]
@@ -668,7 +667,7 @@ function useDirectories(agencyRef) {
668
667
  body: input.body
669
668
  });
670
669
  } catch (error) {
671
- throw new DirectoriesWriteError(chunkDI77H7ED_cjs.classifyError(error));
670
+ throw new DirectoriesWriteError(chunkAWOKWGTB_cjs.classifyError(error));
672
671
  }
673
672
  },
674
673
  [client]
@@ -715,7 +714,7 @@ function usePaginatedList(fetch, options) {
715
714
  setPageIndex(index);
716
715
  setError(void 0);
717
716
  } catch (caught) {
718
- setError(chunkDI77H7ED_cjs.classifyError(caught));
717
+ setError(chunkAWOKWGTB_cjs.classifyError(caught));
719
718
  setHasNext(false);
720
719
  } finally {
721
720
  setSettled(true);
@@ -774,7 +773,7 @@ var ShareLinkWriteError = class extends Error {
774
773
  }
775
774
  };
776
775
  function useShareLinks(tripRef, travellerRef) {
777
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
776
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
778
777
  const [links, setLinks] = react.useState(void 0);
779
778
  const [readFailed, setReadFailed] = react.useState(false);
780
779
  const refresh = react.useCallback(async () => {
@@ -805,7 +804,7 @@ function useShareLinks(tripRef, travellerRef) {
805
804
  await refresh();
806
805
  return minted;
807
806
  } catch (error) {
808
- throw new ShareLinkWriteError(chunkDI77H7ED_cjs.classifyError(error));
807
+ throw new ShareLinkWriteError(chunkAWOKWGTB_cjs.classifyError(error));
809
808
  }
810
809
  },
811
810
  [client, tripRef, refresh]
@@ -816,7 +815,7 @@ function useShareLinks(tripRef, travellerRef) {
816
815
  await client.shareTokens.revoke({ id });
817
816
  await refresh();
818
817
  } catch (error) {
819
- throw new ShareLinkWriteError(chunkDI77H7ED_cjs.classifyError(error));
818
+ throw new ShareLinkWriteError(chunkAWOKWGTB_cjs.classifyError(error));
820
819
  }
821
820
  },
822
821
  [client, refresh]
@@ -832,7 +831,7 @@ function useShareLinks(tripRef, travellerRef) {
832
831
  });
833
832
  await refresh();
834
833
  } catch (error) {
835
- throw new ShareLinkWriteError(chunkDI77H7ED_cjs.classifyError(error));
834
+ throw new ShareLinkWriteError(chunkAWOKWGTB_cjs.classifyError(error));
836
835
  }
837
836
  },
838
837
  [client, refresh]
@@ -844,7 +843,7 @@ function useShareLinks(tripRef, travellerRef) {
844
843
  await refresh();
845
844
  return minted;
846
845
  } catch (error) {
847
- throw new ShareLinkWriteError(chunkDI77H7ED_cjs.classifyError(error));
846
+ throw new ShareLinkWriteError(chunkAWOKWGTB_cjs.classifyError(error));
848
847
  }
849
848
  },
850
849
  [client, refresh]
@@ -855,7 +854,7 @@ function useShareLinks(tripRef, travellerRef) {
855
854
  const response = await client.shareTokens.reveal({ id });
856
855
  return response.token;
857
856
  } catch (error) {
858
- throw new ShareLinkWriteError(chunkDI77H7ED_cjs.classifyError(error));
857
+ throw new ShareLinkWriteError(chunkAWOKWGTB_cjs.classifyError(error));
859
858
  }
860
859
  },
861
860
  [client]
@@ -863,7 +862,7 @@ function useShareLinks(tripRef, travellerRef) {
863
862
  return { links, readFailed, refresh, mint, revoke, patch, regenerate, reveal };
864
863
  }
865
864
  function useTravellerFormResponses(tripRef, travellerRef) {
866
- const client = chunkCK3L6Y43_cjs.useKaafilClient();
865
+ const client = chunk4QMYUKW4_cjs.useKaafilClient();
867
866
  const [responses, setResponses] = react.useState(
868
867
  void 0
869
868
  );
@@ -918,7 +917,7 @@ function ShadowIsolationBoundary({
918
917
  }
919
918
  function useDeskMinimumWidthWarning(rootRef, frame) {
920
919
  react.useEffect(() => {
921
- if (frame !== "desk" || !chunkCK3L6Y43_cjs.isDevelopment() || typeof ResizeObserver === "undefined") {
920
+ if (frame !== "desk" || !chunk4QMYUKW4_cjs.isDevelopment() || typeof ResizeObserver === "undefined") {
922
921
  return;
923
922
  }
924
923
  const node = rootRef.current;
@@ -944,7 +943,7 @@ function useDeskMinimumWidthWarning(rootRef, frame) {
944
943
  }
945
944
  function useUnfilledConnectivitySlotWarning(frame, connectivitySlot) {
946
945
  react.useEffect(() => {
947
- if (frame === "field" && connectivitySlot === void 0 && chunkCK3L6Y43_cjs.isDevelopment()) {
946
+ if (frame === "field" && connectivitySlot === void 0 && chunk4QMYUKW4_cjs.isDevelopment()) {
948
947
  console.warn(
949
948
  `kaafil-react-uikit: AppShell's "field" frame has no connectivitySlot filled \u2014 the permanently-visible connectivity/sync region this frame reserves is empty (01-app-shell.md, briefing \xA727.2).`
950
949
  );
@@ -993,7 +992,7 @@ function AppShell({
993
992
  className: "kf-root",
994
993
  "data-kf-isolation": "shadow",
995
994
  ...dataAttributes,
996
- style: chunkCK3L6Y43_cjs.tokenStyle(style),
995
+ style: chunk4QMYUKW4_cjs.tokenStyle(style),
997
996
  children: /* @__PURE__ */ jsxRuntime.jsx(ShadowIsolationBoundary, { className: "kf-app-shell__shadow-host", children: content })
998
997
  }
999
998
  );
@@ -1005,7 +1004,7 @@ function AppShell({
1005
1004
  className: "kf-root",
1006
1005
  "data-kf-isolation": "scoped",
1007
1006
  ...dataAttributes,
1008
- style: chunkCK3L6Y43_cjs.tokenStyle(style),
1007
+ style: chunk4QMYUKW4_cjs.tokenStyle(style),
1009
1008
  children: content
1010
1009
  }
1011
1010
  );
@@ -1024,10 +1023,10 @@ function ConfigShell({ seedConfig = {}, children }) {
1024
1023
  }),
1025
1024
  [seedConfig.agency, seedConfig.tenant]
1026
1025
  );
1027
- return /* @__PURE__ */ jsxRuntime.jsx(chunkCK3L6Y43_cjs.ConfigContext.Provider, { value, children });
1026
+ return /* @__PURE__ */ jsxRuntime.jsx(chunk4QMYUKW4_cjs.ConfigContext.Provider, { value, children });
1028
1027
  }
1029
1028
  function classifyForFallback(error) {
1030
- const classification = chunkDI77H7ED_cjs.classifyError(error);
1029
+ const classification = chunkAWOKWGTB_cjs.classifyError(error);
1031
1030
  if (classification.code === "RESOURCE_NOT_FOUND") {
1032
1031
  return { classification: "isolation", code: classification.code };
1033
1032
  }
@@ -1084,9 +1083,9 @@ function OfflineShell({
1084
1083
  scope,
1085
1084
  children
1086
1085
  }) {
1087
- const client = react.useContext(chunkCK3L6Y43_cjs.KaafilClientContext);
1088
- const persona = chunkCK3L6Y43_cjs.usePersona();
1089
- const session = chunkCK3L6Y43_cjs.useSession();
1086
+ const client = react.useContext(chunk4QMYUKW4_cjs.KaafilClientContext);
1087
+ const persona = chunk4QMYUKW4_cjs.usePersona();
1088
+ const session = chunk4QMYUKW4_cjs.useSession();
1090
1089
  const reportExpired = react.useContext(SessionExpiryBridgeContext);
1091
1090
  const [engine, setEngine] = react.useState(null);
1092
1091
  const engineRef = react.useRef(null);
@@ -1136,7 +1135,7 @@ function OfflineShell({
1136
1135
  }
1137
1136
  };
1138
1137
  }, [client, derivedScope, session.status, persona, reportExpired]);
1139
- return /* @__PURE__ */ jsxRuntime.jsx(chunkCK3L6Y43_cjs.OfflineEngineContext.Provider, { value: engine, children });
1138
+ return /* @__PURE__ */ jsxRuntime.jsx(chunk4QMYUKW4_cjs.OfflineEngineContext.Provider, { value: engine, children });
1140
1139
  }
1141
1140
 
1142
1141
  // src/core/shells/internal/jwtKind.ts
@@ -1256,14 +1255,14 @@ function SessionShell(props) {
1256
1255
  }, [environment, accessTokenDep, refreshTokenDep, agencyRefDep, shareTokenDep]);
1257
1256
  if (state === null) {
1258
1257
  return /* @__PURE__ */ jsxRuntime.jsx(SessionExpiryBridgeContext.Provider, { value: reportExpired, children: /* @__PURE__ */ jsxRuntime.jsx(
1259
- chunkCK3L6Y43_cjs.SessionContext.Provider,
1258
+ chunk4QMYUKW4_cjs.SessionContext.Provider,
1260
1259
  {
1261
1260
  value: { status: "opening", persona: "manager", agencyRef: void 0, environment },
1262
1261
  children
1263
1262
  }
1264
1263
  ) });
1265
1264
  }
1266
- return /* @__PURE__ */ jsxRuntime.jsx(SessionExpiryBridgeContext.Provider, { value: reportExpired, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCK3L6Y43_cjs.KaafilClientContext.Provider, { value: state.client, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCK3L6Y43_cjs.SessionContext.Provider, { value: state.session, children }) }) });
1265
+ return /* @__PURE__ */ jsxRuntime.jsx(SessionExpiryBridgeContext.Provider, { value: reportExpired, children: /* @__PURE__ */ jsxRuntime.jsx(chunk4QMYUKW4_cjs.KaafilClientContext.Provider, { value: state.client, children: /* @__PURE__ */ jsxRuntime.jsx(chunk4QMYUKW4_cjs.SessionContext.Provider, { value: state.session, children }) }) });
1267
1266
  }
1268
1267
  function emit(onEvent, event) {
1269
1268
  if (onEvent === void 0) {
@@ -1275,8 +1274,8 @@ function emit(onEvent, event) {
1275
1274
  }
1276
1275
  }
1277
1276
  function TelemetryShell({ onEvent, children }) {
1278
- const session = chunkCK3L6Y43_cjs.useSession();
1279
- const serverTime = chunkLO3GQFQ6_cjs.useServerTime();
1277
+ const session = chunk4QMYUKW4_cjs.useSession();
1278
+ const serverTime = chunk53ITV6GF_cjs.useServerTime();
1280
1279
  const previousStatusRef = react.useRef(void 0);
1281
1280
  react.useEffect(() => {
1282
1281
  const previousStatus = previousStatusRef.current;
@@ -1355,7 +1354,7 @@ function KaafilUIKitProvider(props) {
1355
1354
  ...credential
1356
1355
  } = props;
1357
1356
  const inner = /* @__PURE__ */ jsxRuntime.jsx(BuildShareUrlContext.Provider, { value: buildShareUrl ?? null, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultCapabilityViewsContext.Provider, { value: defaultCapabilityViews ?? {}, children: /* @__PURE__ */ jsxRuntime.jsx(ConfigShell, { seedConfig, children: /* @__PURE__ */ jsxRuntime.jsx(
1358
- chunkCK3L6Y43_cjs.BrandShell,
1357
+ chunk4QMYUKW4_cjs.BrandShell,
1359
1358
  {
1360
1359
  appName: brand?.appName,
1361
1360
  logo: brand?.logo,
@@ -1365,7 +1364,7 @@ function KaafilUIKitProvider(props) {
1365
1364
  children: /* @__PURE__ */ jsxRuntime.jsx(TelemetryShell, { onEvent, children })
1366
1365
  }
1367
1366
  ) }) }) });
1368
- return /* @__PURE__ */ jsxRuntime.jsx(ErrorShell, { children: /* @__PURE__ */ jsxRuntime.jsx(ThemeShell, { theme, density, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCK3L6Y43_cjs.I18nShell, { locale, children: /* @__PURE__ */ jsxRuntime.jsx(AppShell, { isolation, children: /* @__PURE__ */ jsxRuntime.jsx(
1367
+ return /* @__PURE__ */ jsxRuntime.jsx(ErrorShell, { children: /* @__PURE__ */ jsxRuntime.jsx(ThemeShell, { theme, density, children: /* @__PURE__ */ jsxRuntime.jsx(chunk4QMYUKW4_cjs.I18nShell, { locale, children: /* @__PURE__ */ jsxRuntime.jsx(AppShell, { isolation, children: /* @__PURE__ */ jsxRuntime.jsx(
1369
1368
  SessionShell,
1370
1369
  {
1371
1370
  ...credential,
@@ -1497,5 +1496,5 @@ exports.useDirectories = useDirectories;
1497
1496
  exports.usePaginatedList = usePaginatedList;
1498
1497
  exports.useShareLinks = useShareLinks;
1499
1498
  exports.useTravellerFormResponses = useTravellerFormResponses;
1500
- //# sourceMappingURL=chunk-V6UQ6GIM.cjs.map
1501
- //# sourceMappingURL=chunk-V6UQ6GIM.cjs.map
1499
+ //# sourceMappingURL=chunk-77RKNRNH.cjs.map
1500
+ //# sourceMappingURL=chunk-77RKNRNH.cjs.map