kaafil-react-uikit 0.4.1 → 0.5.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 (57) hide show
  1. package/CHANGELOG.md +44 -5
  2. package/dist/admin/index.cjs +355 -353
  3. package/dist/admin/index.cjs.map +1 -1
  4. package/dist/admin/index.js +16 -14
  5. package/dist/admin/index.js.map +1 -1
  6. package/dist/{chunk-EP4VCID7.js → chunk-3E2FN5JJ.js} +3 -3
  7. package/dist/{chunk-EP4VCID7.js.map → chunk-3E2FN5JJ.js.map} +1 -1
  8. package/dist/{chunk-TPBKRXEB.cjs → chunk-3RZDHDEY.cjs} +17 -17
  9. package/dist/{chunk-TPBKRXEB.cjs.map → chunk-3RZDHDEY.cjs.map} +1 -1
  10. package/dist/chunk-62HCQWZL.cjs +12 -0
  11. package/dist/chunk-62HCQWZL.cjs.map +1 -0
  12. package/dist/{chunk-ABWNV4N4.js → chunk-6FUVFVYY.js} +97 -4
  13. package/dist/chunk-6FUVFVYY.js.map +1 -0
  14. package/dist/{chunk-BUE2GJDN.js → chunk-762SWUEG.js} +3 -3
  15. package/dist/{chunk-BUE2GJDN.js.map → chunk-762SWUEG.js.map} +1 -1
  16. package/dist/{chunk-CCJ5XNWY.cjs → chunk-CK3L6Y43.cjs} +98 -2
  17. package/dist/chunk-CK3L6Y43.cjs.map +1 -0
  18. package/dist/{chunk-XBYLSJOS.cjs → chunk-DI77H7ED.cjs} +83 -83
  19. package/dist/{chunk-XBYLSJOS.cjs.map → chunk-DI77H7ED.cjs.map} +1 -1
  20. package/dist/{chunk-5DVTAEQC.js → chunk-EDLIJSMR.js} +5 -5
  21. package/dist/{chunk-5DVTAEQC.js.map → chunk-EDLIJSMR.js.map} +1 -1
  22. package/dist/{chunk-VAJ4D7EF.js → chunk-FEJL6GKJ.js} +513 -20
  23. package/dist/chunk-FEJL6GKJ.js.map +1 -0
  24. package/dist/{chunk-2D4Y4LOT.cjs → chunk-IBVCH6GC.cjs} +553 -51
  25. package/dist/chunk-IBVCH6GC.cjs.map +1 -0
  26. package/dist/{chunk-DABF4PUI.js → chunk-ITGVRN2S.js} +3 -3
  27. package/dist/{chunk-DABF4PUI.js.map → chunk-ITGVRN2S.js.map} +1 -1
  28. package/dist/{chunk-DUZG6A22.cjs → chunk-LO3GQFQ6.cjs} +4 -4
  29. package/dist/{chunk-DUZG6A22.cjs.map → chunk-LO3GQFQ6.cjs.map} +1 -1
  30. package/dist/{chunk-4LZXDRAD.cjs → chunk-QD4Z5DRT.cjs} +12 -12
  31. package/dist/{chunk-4LZXDRAD.cjs.map → chunk-QD4Z5DRT.cjs.map} +1 -1
  32. package/dist/{chunk-TV5QTT44.js → chunk-RW6TJMRK.js} +3 -3
  33. package/dist/{chunk-TV5QTT44.js.map → chunk-RW6TJMRK.js.map} +1 -1
  34. package/dist/chunk-XU7GP53M.js +10 -0
  35. package/dist/chunk-XU7GP53M.js.map +1 -0
  36. package/dist/{chunk-DDSNXKFN.cjs → chunk-XYIOM75D.cjs} +9 -9
  37. package/dist/{chunk-DDSNXKFN.cjs.map → chunk-XYIOM75D.cjs.map} +1 -1
  38. package/dist/core/index.cjs +153 -613
  39. package/dist/core/index.cjs.map +1 -1
  40. package/dist/core/index.d.cts +36 -1
  41. package/dist/core/index.d.ts +36 -1
  42. package/dist/core/index.js +21 -511
  43. package/dist/core/index.js.map +1 -1
  44. package/dist/index.css +1 -1
  45. package/dist/manager/index.cjs +239 -239
  46. package/dist/manager/index.js +6 -6
  47. package/dist/traveller/index.cjs +35 -35
  48. package/dist/traveller/index.js +5 -5
  49. package/package.json +2 -2
  50. package/dist/chunk-2D4Y4LOT.cjs.map +0 -1
  51. package/dist/chunk-2JABR4FF.js +0 -105
  52. package/dist/chunk-2JABR4FF.js.map +0 -1
  53. package/dist/chunk-ABWNV4N4.js.map +0 -1
  54. package/dist/chunk-CCJ5XNWY.cjs.map +0 -1
  55. package/dist/chunk-KDGBJPPZ.cjs +0 -110
  56. package/dist/chunk-KDGBJPPZ.cjs.map +0 -1
  57. package/dist/chunk-VAJ4D7EF.js.map +0 -1
@@ -879,6 +879,28 @@ interface DefaultCapabilityViews {
879
879
  * required context (a missing default simply means every composite falls
880
880
  * back to its own built-in dark treatment). */
881
881
  declare function useDefaultCapabilityViews(): DefaultCapabilityViews;
882
+ /**
883
+ * Turns a share token into the link a host would actually send a family.
884
+ *
885
+ * A FUNCTION, not a base-URL string, because concatenation only covers one
886
+ * of the shapes a real host needs. `https://crm.example/trip/<token>` is the
887
+ * easy case; `?share=<token>`, a token in the middle of a path, a per-locale
888
+ * prefix, or an encoded value are all just as ordinary, and a string forces
889
+ * every one of them into the kit's guess about where the token goes. The
890
+ * host already owns its URLs everywhere else in this package — hard rule #9,
891
+ * "the UIKit ships no router; navigation is `on*` callbacks" — and this is
892
+ * the same rule applied to the one URL the kit displays.
893
+ */
894
+ type BuildShareUrl = (token: string) => string;
895
+ /**
896
+ * The host's share-link builder, or `null` when it did not supply one.
897
+ *
898
+ * `null` is a real answer, not a missing provider: the share dialog falls
899
+ * back to showing the bare token, which is still the credential an operator
900
+ * can paste behind their own URL. Guessing a host's URL shape would be worse
901
+ * than showing the value.
902
+ */
903
+ declare function useBuildShareUrl(): BuildShareUrl | null;
882
904
  interface KaafilUIKitProviderProps {
883
905
  readonly environment?: Environment;
884
906
  readonly onSessionExpired?: (credentialKind: Persona) => void;
@@ -903,6 +925,19 @@ interface KaafilUIKitProviderProps {
903
925
  readonly agency?: ConfigDocument;
904
926
  };
905
927
  readonly defaultCapabilityViews?: DefaultCapabilityViews;
928
+ /**
929
+ * Turns a share token into the link you send a family, e.g.
930
+ * ``(token) => `https://sharmatravels.example/trip/${token}` ``.
931
+ *
932
+ * SET THIS IF YOU USE SHARE LINKS. Kaafil returns a token, never a URL —
933
+ * the traveller page is on YOUR domain and the engine has no idea what it
934
+ * is. Without this the desk's share dialog can only show the raw token, a
935
+ * UUID an operator cannot meaningfully send to anyone. It is optional
936
+ * rather than required because a host that never mints a share link should
937
+ * not have to supply one, and because guessing your URL shape would be
938
+ * worse than showing the value you can paste behind it yourself.
939
+ */
940
+ readonly buildShareUrl?: BuildShareUrl;
906
941
  readonly children?: ReactNode;
907
942
  }
908
943
  type KaafilUIKitProviderCredentialProps = KaafilUIKitProviderCredential & KaafilUIKitProviderProps;
@@ -1273,4 +1308,4 @@ interface ThemeShellProps {
1273
1308
  */
1274
1309
  declare function ThemeShell({ theme, density, children }: ThemeShellProps): ReactNode;
1275
1310
 
1276
- export { type AddTravellerNoteInput, type AgencyAdminMeReady, type AgencyAdminMeResult, type AgencyManagerProfileResult, type AgencyScopedParams, AppShell, type AppShellFamily, type AppShellFrame, type AppShellProps, type BlobStatusResult, type BlockerDeepLink, type BookingsReady, BrandShell, type BrandShellProps, CLOSEOUT_ACTION_TAB, type CapabilityStatusesResult, CapabilityTriple, type CloseoutActionKey, type CloseoutBlockerKey, type ConfigDocument, ConfigShell, type ConfigShellProps, ConflictRecord, type ConflictsResult, type CreateRegistryOptions, type DeepLinkParams, type DefaultCapabilityViews, DomainHookResult, ErrorClassification, ErrorShell, type ErrorShellClassification, type ErrorShellFallbackContext, type ErrorShellProps, type FeedbackNpsReady, type FeedbackNpsScope, HostCssCompatibilityProbe, type HostCssHazard, I18nShell, type I18nShellProps, type JourneyResult, type KaafilBrandAssets, KaafilSessionProbe, type KaafilSessionProbeProps, type KaafilTripTabKey, KaafilUIKitProvider, type KaafilUIKitProviderCredential, type KaafilUIKitProviderCredentialProps, type KaafilUIKitProviderProps, type ManagerAgencyProfileRead, type ManagersResult, NotImplementedError, type OfflineMutationConfig, type OfflineMutationResult, type OfflineMutationStatus, OfflineShell, type OfflineShellProps, type OutboxStatusOptions, type OutboxStatusResult, type Persona, type Registry, type ResolveBlockerInput, type ServerTimeApi, SessionShell, type SessionShellCredential, type SessionShellProps, type SessionState, type ShareFormAnswer, type ShareFormListItem, type ShareFormWriteInput, type ShareFormsListStatus, type ShareFormsResult, type ShareFormsWriteStatus, type ShareLinkRow, type ShareLinksResult, type ShareMeta, type ShareParams, type ShareSectionKey, type ShareSections, type ShareSnapshotOptions, type ShareSnapshotResult, type ShareSnapshotTrip, type SnapshotEntityResult, type SnapshotListResult, StalenessState, type TelemetryEvent, TelemetryShell, type TelemetryShellProps, ThemeShell, type ThemeShellProps, type TravellerFormResponseRow, type TravellerProfileRead, type TravellerProfileResult, type TreksReady, type TripManagerRow, type TripScopedParams, createRegistry, fromSearchParams, isTripTabKey, resolveBlockerDeepLink, toSearchParams, useAgencyAdminMe, useAgencyManagerProfile, useBlobStatus, useBookings, useCapabilities, useCapability, useCapabilityStatuses, useConflicts, useDefaultCapabilityViews, useFeedbackNps, useJourney, useKaafilBrand, useKaafilChrome, useKaafilShareMeta, useManagers, useOfflineEngine, useOfflineEvent, useOfflineMutation, useOutboxStatus, usePersona, useResolvedSetting, useServerTime, useSession, useShareForms, useShareLinks, useShareSnapshot, useSnapshotEntity, useSnapshotList, useStaleness, useTravellerFormResponses, useTravellerProfile, useTreks };
1311
+ export { type AddTravellerNoteInput, type AgencyAdminMeReady, type AgencyAdminMeResult, type AgencyManagerProfileResult, type AgencyScopedParams, AppShell, type AppShellFamily, type AppShellFrame, type AppShellProps, type BlobStatusResult, type BlockerDeepLink, type BookingsReady, BrandShell, type BrandShellProps, type BuildShareUrl, CLOSEOUT_ACTION_TAB, type CapabilityStatusesResult, CapabilityTriple, type CloseoutActionKey, type CloseoutBlockerKey, type ConfigDocument, ConfigShell, type ConfigShellProps, ConflictRecord, type ConflictsResult, type CreateRegistryOptions, type DeepLinkParams, type DefaultCapabilityViews, DomainHookResult, ErrorClassification, ErrorShell, type ErrorShellClassification, type ErrorShellFallbackContext, type ErrorShellProps, type FeedbackNpsReady, type FeedbackNpsScope, HostCssCompatibilityProbe, type HostCssHazard, I18nShell, type I18nShellProps, type JourneyResult, type KaafilBrandAssets, KaafilSessionProbe, type KaafilSessionProbeProps, type KaafilTripTabKey, KaafilUIKitProvider, type KaafilUIKitProviderCredential, type KaafilUIKitProviderCredentialProps, type KaafilUIKitProviderProps, type ManagerAgencyProfileRead, type ManagersResult, NotImplementedError, type OfflineMutationConfig, type OfflineMutationResult, type OfflineMutationStatus, OfflineShell, type OfflineShellProps, type OutboxStatusOptions, type OutboxStatusResult, type Persona, type Registry, type ResolveBlockerInput, type ServerTimeApi, SessionShell, type SessionShellCredential, type SessionShellProps, type SessionState, type ShareFormAnswer, type ShareFormListItem, type ShareFormWriteInput, type ShareFormsListStatus, type ShareFormsResult, type ShareFormsWriteStatus, type ShareLinkRow, type ShareLinksResult, type ShareMeta, type ShareParams, type ShareSectionKey, type ShareSections, type ShareSnapshotOptions, type ShareSnapshotResult, type ShareSnapshotTrip, type SnapshotEntityResult, type SnapshotListResult, StalenessState, type TelemetryEvent, TelemetryShell, type TelemetryShellProps, ThemeShell, type ThemeShellProps, type TravellerFormResponseRow, type TravellerProfileRead, type TravellerProfileResult, type TreksReady, type TripManagerRow, type TripScopedParams, createRegistry, fromSearchParams, isTripTabKey, resolveBlockerDeepLink, toSearchParams, useAgencyAdminMe, useAgencyManagerProfile, useBlobStatus, useBookings, useBuildShareUrl, useCapabilities, useCapability, useCapabilityStatuses, useConflicts, useDefaultCapabilityViews, useFeedbackNps, useJourney, useKaafilBrand, useKaafilChrome, useKaafilShareMeta, useManagers, useOfflineEngine, useOfflineEvent, useOfflineMutation, useOutboxStatus, usePersona, useResolvedSetting, useServerTime, useSession, useShareForms, useShareLinks, useShareSnapshot, useSnapshotEntity, useSnapshotList, useStaleness, useTravellerFormResponses, useTravellerProfile, useTreks };
@@ -879,6 +879,28 @@ interface DefaultCapabilityViews {
879
879
  * required context (a missing default simply means every composite falls
880
880
  * back to its own built-in dark treatment). */
881
881
  declare function useDefaultCapabilityViews(): DefaultCapabilityViews;
882
+ /**
883
+ * Turns a share token into the link a host would actually send a family.
884
+ *
885
+ * A FUNCTION, not a base-URL string, because concatenation only covers one
886
+ * of the shapes a real host needs. `https://crm.example/trip/<token>` is the
887
+ * easy case; `?share=<token>`, a token in the middle of a path, a per-locale
888
+ * prefix, or an encoded value are all just as ordinary, and a string forces
889
+ * every one of them into the kit's guess about where the token goes. The
890
+ * host already owns its URLs everywhere else in this package — hard rule #9,
891
+ * "the UIKit ships no router; navigation is `on*` callbacks" — and this is
892
+ * the same rule applied to the one URL the kit displays.
893
+ */
894
+ type BuildShareUrl = (token: string) => string;
895
+ /**
896
+ * The host's share-link builder, or `null` when it did not supply one.
897
+ *
898
+ * `null` is a real answer, not a missing provider: the share dialog falls
899
+ * back to showing the bare token, which is still the credential an operator
900
+ * can paste behind their own URL. Guessing a host's URL shape would be worse
901
+ * than showing the value.
902
+ */
903
+ declare function useBuildShareUrl(): BuildShareUrl | null;
882
904
  interface KaafilUIKitProviderProps {
883
905
  readonly environment?: Environment;
884
906
  readonly onSessionExpired?: (credentialKind: Persona) => void;
@@ -903,6 +925,19 @@ interface KaafilUIKitProviderProps {
903
925
  readonly agency?: ConfigDocument;
904
926
  };
905
927
  readonly defaultCapabilityViews?: DefaultCapabilityViews;
928
+ /**
929
+ * Turns a share token into the link you send a family, e.g.
930
+ * ``(token) => `https://sharmatravels.example/trip/${token}` ``.
931
+ *
932
+ * SET THIS IF YOU USE SHARE LINKS. Kaafil returns a token, never a URL —
933
+ * the traveller page is on YOUR domain and the engine has no idea what it
934
+ * is. Without this the desk's share dialog can only show the raw token, a
935
+ * UUID an operator cannot meaningfully send to anyone. It is optional
936
+ * rather than required because a host that never mints a share link should
937
+ * not have to supply one, and because guessing your URL shape would be
938
+ * worse than showing the value you can paste behind it yourself.
939
+ */
940
+ readonly buildShareUrl?: BuildShareUrl;
906
941
  readonly children?: ReactNode;
907
942
  }
908
943
  type KaafilUIKitProviderCredentialProps = KaafilUIKitProviderCredential & KaafilUIKitProviderProps;
@@ -1273,4 +1308,4 @@ interface ThemeShellProps {
1273
1308
  */
1274
1309
  declare function ThemeShell({ theme, density, children }: ThemeShellProps): ReactNode;
1275
1310
 
1276
- export { type AddTravellerNoteInput, type AgencyAdminMeReady, type AgencyAdminMeResult, type AgencyManagerProfileResult, type AgencyScopedParams, AppShell, type AppShellFamily, type AppShellFrame, type AppShellProps, type BlobStatusResult, type BlockerDeepLink, type BookingsReady, BrandShell, type BrandShellProps, CLOSEOUT_ACTION_TAB, type CapabilityStatusesResult, CapabilityTriple, type CloseoutActionKey, type CloseoutBlockerKey, type ConfigDocument, ConfigShell, type ConfigShellProps, ConflictRecord, type ConflictsResult, type CreateRegistryOptions, type DeepLinkParams, type DefaultCapabilityViews, DomainHookResult, ErrorClassification, ErrorShell, type ErrorShellClassification, type ErrorShellFallbackContext, type ErrorShellProps, type FeedbackNpsReady, type FeedbackNpsScope, HostCssCompatibilityProbe, type HostCssHazard, I18nShell, type I18nShellProps, type JourneyResult, type KaafilBrandAssets, KaafilSessionProbe, type KaafilSessionProbeProps, type KaafilTripTabKey, KaafilUIKitProvider, type KaafilUIKitProviderCredential, type KaafilUIKitProviderCredentialProps, type KaafilUIKitProviderProps, type ManagerAgencyProfileRead, type ManagersResult, NotImplementedError, type OfflineMutationConfig, type OfflineMutationResult, type OfflineMutationStatus, OfflineShell, type OfflineShellProps, type OutboxStatusOptions, type OutboxStatusResult, type Persona, type Registry, type ResolveBlockerInput, type ServerTimeApi, SessionShell, type SessionShellCredential, type SessionShellProps, type SessionState, type ShareFormAnswer, type ShareFormListItem, type ShareFormWriteInput, type ShareFormsListStatus, type ShareFormsResult, type ShareFormsWriteStatus, type ShareLinkRow, type ShareLinksResult, type ShareMeta, type ShareParams, type ShareSectionKey, type ShareSections, type ShareSnapshotOptions, type ShareSnapshotResult, type ShareSnapshotTrip, type SnapshotEntityResult, type SnapshotListResult, StalenessState, type TelemetryEvent, TelemetryShell, type TelemetryShellProps, ThemeShell, type ThemeShellProps, type TravellerFormResponseRow, type TravellerProfileRead, type TravellerProfileResult, type TreksReady, type TripManagerRow, type TripScopedParams, createRegistry, fromSearchParams, isTripTabKey, resolveBlockerDeepLink, toSearchParams, useAgencyAdminMe, useAgencyManagerProfile, useBlobStatus, useBookings, useCapabilities, useCapability, useCapabilityStatuses, useConflicts, useDefaultCapabilityViews, useFeedbackNps, useJourney, useKaafilBrand, useKaafilChrome, useKaafilShareMeta, useManagers, useOfflineEngine, useOfflineEvent, useOfflineMutation, useOutboxStatus, usePersona, useResolvedSetting, useServerTime, useSession, useShareForms, useShareLinks, useShareSnapshot, useSnapshotEntity, useSnapshotList, useStaleness, useTravellerFormResponses, useTravellerProfile, useTreks };
1311
+ export { type AddTravellerNoteInput, type AgencyAdminMeReady, type AgencyAdminMeResult, type AgencyManagerProfileResult, type AgencyScopedParams, AppShell, type AppShellFamily, type AppShellFrame, type AppShellProps, type BlobStatusResult, type BlockerDeepLink, type BookingsReady, BrandShell, type BrandShellProps, type BuildShareUrl, CLOSEOUT_ACTION_TAB, type CapabilityStatusesResult, CapabilityTriple, type CloseoutActionKey, type CloseoutBlockerKey, type ConfigDocument, ConfigShell, type ConfigShellProps, ConflictRecord, type ConflictsResult, type CreateRegistryOptions, type DeepLinkParams, type DefaultCapabilityViews, DomainHookResult, ErrorClassification, ErrorShell, type ErrorShellClassification, type ErrorShellFallbackContext, type ErrorShellProps, type FeedbackNpsReady, type FeedbackNpsScope, HostCssCompatibilityProbe, type HostCssHazard, I18nShell, type I18nShellProps, type JourneyResult, type KaafilBrandAssets, KaafilSessionProbe, type KaafilSessionProbeProps, type KaafilTripTabKey, KaafilUIKitProvider, type KaafilUIKitProviderCredential, type KaafilUIKitProviderCredentialProps, type KaafilUIKitProviderProps, type ManagerAgencyProfileRead, type ManagersResult, NotImplementedError, type OfflineMutationConfig, type OfflineMutationResult, type OfflineMutationStatus, OfflineShell, type OfflineShellProps, type OutboxStatusOptions, type OutboxStatusResult, type Persona, type Registry, type ResolveBlockerInput, type ServerTimeApi, SessionShell, type SessionShellCredential, type SessionShellProps, type SessionState, type ShareFormAnswer, type ShareFormListItem, type ShareFormWriteInput, type ShareFormsListStatus, type ShareFormsResult, type ShareFormsWriteStatus, type ShareLinkRow, type ShareLinksResult, type ShareMeta, type ShareParams, type ShareSectionKey, type ShareSections, type ShareSnapshotOptions, type ShareSnapshotResult, type ShareSnapshotTrip, type SnapshotEntityResult, type SnapshotListResult, StalenessState, type TelemetryEvent, TelemetryShell, type TelemetryShellProps, ThemeShell, type ThemeShellProps, type TravellerFormResponseRow, type TravellerProfileRead, type TravellerProfileResult, type TreksReady, type TripManagerRow, type TripScopedParams, createRegistry, fromSearchParams, isTripTabKey, resolveBlockerDeepLink, toSearchParams, useAgencyAdminMe, useAgencyManagerProfile, useBlobStatus, useBookings, useBuildShareUrl, useCapabilities, useCapability, useCapabilityStatuses, useConflicts, useDefaultCapabilityViews, useFeedbackNps, useJourney, useKaafilBrand, useKaafilChrome, useKaafilShareMeta, useManagers, useOfflineEngine, useOfflineEvent, useOfflineMutation, useOutboxStatus, usePersona, useResolvedSetting, useServerTime, useSession, useShareForms, useShareLinks, useShareSnapshot, useSnapshotEntity, useSnapshotList, useStaleness, useTravellerFormResponses, useTravellerProfile, useTreks };