@ankhorage/contracts 22.0.4 → 22.1.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 (84) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/auth.d.ts +2 -1
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js.map +1 -1
  5. package/dist/bindings.d.ts +6 -5
  6. package/dist/bindings.d.ts.map +1 -1
  7. package/dist/bindings.js.map +1 -1
  8. package/dist/collections.d.ts +4 -0
  9. package/dist/collections.d.ts.map +1 -1
  10. package/dist/collections.js.map +1 -1
  11. package/dist/data/apis.d.ts +2 -1
  12. package/dist/data/apis.d.ts.map +1 -1
  13. package/dist/data/apis.js.map +1 -1
  14. package/dist/data/endpoints.d.ts +5 -4
  15. package/dist/data/endpoints.d.ts.map +1 -1
  16. package/dist/data/endpoints.js.map +1 -1
  17. package/dist/data/operations.d.ts +2 -1
  18. package/dist/data/operations.d.ts.map +1 -1
  19. package/dist/data/operations.js.map +1 -1
  20. package/dist/data/schemas.d.ts +3 -2
  21. package/dist/data/schemas.d.ts.map +1 -1
  22. package/dist/data/schemas.js.map +1 -1
  23. package/dist/data/sources.d.ts +2 -1
  24. package/dist/data/sources.d.ts.map +1 -1
  25. package/dist/data/sources.js.map +1 -1
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +1 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/media.d.ts +2 -1
  31. package/dist/media.d.ts.map +1 -1
  32. package/dist/media.js.map +1 -1
  33. package/dist/navigator.d.ts +2 -1
  34. package/dist/navigator.d.ts.map +1 -1
  35. package/dist/navigator.js.map +1 -1
  36. package/dist/structure/index.d.ts +4 -0
  37. package/dist/structure/index.d.ts.map +1 -0
  38. package/dist/structure/index.js +3 -0
  39. package/dist/structure/index.js.map +1 -0
  40. package/dist/structure/isStructureDescriptor.d.ts +4 -0
  41. package/dist/structure/isStructureDescriptor.d.ts.map +1 -0
  42. package/dist/structure/isStructureDescriptor.js +132 -0
  43. package/dist/structure/isStructureDescriptor.js.map +1 -0
  44. package/dist/structure/isStructureDescriptorDocument.d.ts +4 -0
  45. package/dist/structure/isStructureDescriptorDocument.d.ts.map +1 -0
  46. package/dist/structure/isStructureDescriptorDocument.js +114 -0
  47. package/dist/structure/isStructureDescriptorDocument.js.map +1 -0
  48. package/dist/structure/types.d.ts +63 -0
  49. package/dist/structure/types.d.ts.map +1 -0
  50. package/dist/structure/types.js +2 -0
  51. package/dist/structure/types.js.map +1 -0
  52. package/dist/theme.d.ts +7 -6
  53. package/dist/theme.d.ts.map +1 -1
  54. package/dist/theme.js.map +1 -1
  55. package/dist/types/infraManifest.d.ts +3 -3
  56. package/dist/types/infraManifest.d.ts.map +1 -1
  57. package/dist/types/infraManifest.js.map +1 -1
  58. package/dist/types/infraWorkload.d.ts +6 -6
  59. package/dist/types/infraWorkload.d.ts.map +1 -1
  60. package/dist/types/infraWorkload.js.map +1 -1
  61. package/dist/types.d.ts +3 -2
  62. package/dist/types.d.ts.map +1 -1
  63. package/dist/types.js.map +1 -1
  64. package/package.json +5 -1
  65. package/src/auth.ts +2 -1
  66. package/src/bindings.ts +9 -6
  67. package/src/collections.ts +10 -0
  68. package/src/data/apis.ts +2 -1
  69. package/src/data/endpoints.ts +5 -4
  70. package/src/data/operations.ts +2 -1
  71. package/src/data/schemas.ts +3 -2
  72. package/src/data/sources.ts +2 -1
  73. package/src/index.ts +1 -0
  74. package/src/media.ts +3 -1
  75. package/src/navigator.ts +2 -1
  76. package/src/structure/index.ts +21 -0
  77. package/src/structure/isStructureDescriptor.ts +163 -0
  78. package/src/structure/isStructureDescriptorDocument.ts +164 -0
  79. package/src/structure/types.ts +92 -0
  80. package/src/structure.test.ts +255 -0
  81. package/src/theme.ts +8 -6
  82. package/src/types/infraManifest.ts +3 -3
  83. package/src/types/infraWorkload.ts +6 -6
  84. package/src/types.ts +3 -2
@@ -1 +1 @@
1
-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EAAE,KAAK,CAAU,CAAC;AAGxE,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC","sourcesContent":["import type { IconSpec, ManifestValue } from './types';\n\nexport { isAppNavigatorManifest } from './appManifest/navigator';\n\nexport const NAVIGATOR_TYPES = ['slot', 'stack', 'tabs', 'drawer', 'split-view', 'custom'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const NAVIGATOR_PRESETS = [\n 'slot',\n 'stack',\n 'tabs',\n 'tabs-stack',\n 'stack-tabs',\n 'stack-tabs-stack',\n 'drawer',\n 'drawer-stack',\n 'stack-drawer',\n 'stack-drawer-stack',\n 'drawer-tabs',\n 'drawer-tabs-stack',\n 'stack-drawer-tabs',\n 'stack-drawer-tabs-stack',\n 'split-view',\n 'custom',\n] as const;\nexport type NavigatorPreset = (typeof NAVIGATOR_PRESETS)[number];\n\nexport const STACK_IMPLEMENTATIONS = ['native', 'javascript', 'experimental'] as const;\nexport type StackImplementation = (typeof STACK_IMPLEMENTATIONS)[number];\n\nexport const STACK_PRESENTATIONS = [\n 'card',\n 'modal',\n 'transparentModal',\n 'containedModal',\n 'containedTransparentModal',\n 'fullScreenModal',\n 'formSheet',\n] as const;\nexport type StackPresentation = (typeof STACK_PRESENTATIONS)[number];\n\nexport const JAVASCRIPT_STACK_PRESENTATIONS = ['card', 'modal', 'transparentModal'] as const;\nexport type JavaScriptStackPresentation = (typeof JAVASCRIPT_STACK_PRESENTATIONS)[number];\n\nexport interface StackHeaderOptions {\n title?: string;\n headerShown?: boolean;\n headerTransparent?: boolean;\n headerBackVisible?: boolean;\n}\n\nexport type StackScreenOptions = StackHeaderOptions &\n (\n | {\n presentation?: Exclude<StackPresentation, 'formSheet'>;\n sheetAllowedDetents?: never;\n sheetGrabberVisible?: never;\n }\n | {\n presentation: 'formSheet';\n sheetAllowedDetents?: 'fitToContents' | number[];\n sheetGrabberVisible?: boolean;\n }\n );\n\nexport type JavaScriptStackScreenOptions = StackHeaderOptions & {\n presentation?: JavaScriptStackPresentation;\n};\n\nexport type StackImplementationConfig =\n | {\n /** Omission selects the stable native stack implementation. */\n implementation?: 'native';\n options?: StackScreenOptions;\n }\n | {\n implementation: 'javascript';\n options?: JavaScriptStackScreenOptions;\n }\n | {\n /** Expo Router Experimental Stack is alpha, native-only, and available from SDK 56. */\n implementation: 'experimental';\n options?: StackHeaderOptions;\n };\n\nexport const DRAWER_POSITIONS = ['left', 'right'] as const;\nexport type DrawerPosition = (typeof DRAWER_POSITIONS)[number];\n\nexport const DRAWER_TYPES = ['front', 'back', 'slide', 'permanent'] as const;\nexport type DrawerType = (typeof DRAWER_TYPES)[number];\n\nexport interface DrawerNavigatorOptions {\n drawerPosition?: DrawerPosition;\n drawerType?: DrawerType;\n swipeEnabled?: boolean;\n headerShown?: boolean;\n}\n\nexport const FIXED_HEADLESS_TABS_PRESENTATIONS = ['bottom', 'top', 'rail', 'sidebar'] as const;\nexport type FixedHeadlessTabsPresentation = (typeof FIXED_HEADLESS_TABS_PRESENTATIONS)[number];\n\nexport const HEADLESS_TABS_PRESENTATIONS = [\n ...FIXED_HEADLESS_TABS_PRESENTATIONS,\n 'responsive',\n 'custom',\n] as const;\nexport type HeadlessTabsPresentation = (typeof HEADLESS_TABS_PRESENTATIONS)[number];\n\nexport const JAVASCRIPT_TABS_PRESENTATIONS = ['bottom', 'top'] as const;\nexport type JavaScriptTabsPresentation = (typeof JAVASCRIPT_TABS_PRESENTATIONS)[number];\n\nexport const NATIVE_TABS_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\nexport type NativeTabsMinimizeBehavior = (typeof NATIVE_TABS_MINIMIZE_BEHAVIORS)[number];\n\nexport interface ResponsiveTabsPresentation {\n compact: FixedHeadlessTabsPresentation;\n medium?: FixedHeadlessTabsPresentation;\n expanded: FixedHeadlessTabsPresentation;\n}\n\nexport type HeadlessTabsPresentationConfig =\n | {\n presentation: FixedHeadlessTabsPresentation;\n responsive?: never;\n customPresentationId?: never;\n }\n | {\n presentation: 'responsive';\n responsive: ResponsiveTabsPresentation;\n customPresentationId?: never;\n }\n | {\n presentation: 'custom';\n responsive?: never;\n /** Serializable registered presentation id. */\n customPresentationId: string;\n };\n\nexport type HeadlessTabsConfig = {\n implementation: 'headless';\n} & HeadlessTabsPresentationConfig;\n\nexport type HeadlessTabsWebConfig = HeadlessTabsPresentationConfig;\n\nexport interface NavigatorScreenReference {\n screenId: string;\n}\n\nexport interface NativeTabsConfig {\n implementation: 'native';\n /** Expo Router Native Tabs is alpha; minimizing is available on iOS 26+ from SDK 55. */\n minimizeBehavior?: NativeTabsMinimizeBehavior;\n /** Registered screen rendered through NativeTabs.BottomAccessory, available from SDK 55. */\n bottomAccessory?: NavigatorScreenReference;\n}\n\nexport interface JavaScriptTabsConfig {\n implementation: 'javascript';\n presentation?: JavaScriptTabsPresentation;\n}\n\nexport interface AdaptiveTabsConfig {\n /** Omission selects the canonical adaptive default. */\n implementation?: 'adaptive';\n /** Android/iOS branch. Expo Router may expose this implementation as unstable. */\n native?: NativeTabsConfig;\n /** Web branch rendered through headless tabs. */\n web?: HeadlessTabsWebConfig;\n}\n\nexport type TabsImplementationConfig =\n AdaptiveTabsConfig | HeadlessTabsConfig | JavaScriptTabsConfig | NativeTabsConfig;\n\ninterface NavigatorNodeBase {\n initialRouteName?: string;\n routes: RouteDefinition[];\n}\n\nexport interface SlotNavigatorNode extends NavigatorNodeBase {\n type: 'slot';\n}\n\nexport type StackNavigatorNode = NavigatorNodeBase & {\n type: 'stack';\n} & StackImplementationConfig;\n\nexport interface DrawerNavigatorNode extends NavigatorNodeBase {\n type: 'drawer';\n options?: DrawerNavigatorOptions;\n}\n\nexport type TabsNavigatorConfig = {\n type: 'tabs';\n} & TabsImplementationConfig;\n\nexport type TabsNavigatorNode = NavigatorNodeBase & TabsNavigatorConfig;\n\nexport interface SplitViewNavigatorNode extends NavigatorNodeBase {\n type: 'split-view';\n columns: {\n primary: NavigatorScreenReference;\n supplementary?: NavigatorScreenReference;\n };\n inspector?: NavigatorScreenReference;\n /** Split View is alpha and iOS-only; other platforms fall back to Slot. */\n topColumnForCollapsing?: 'primary' | 'supplementary' | 'secondary';\n}\n\nexport interface CustomNavigatorNode extends NavigatorNodeBase {\n type: 'custom';\n navigatorId: string;\n config?: Readonly<Record<string, ManifestValue>>;\n}\n\nexport type NavigatorNode =\n | CustomNavigatorNode\n | DrawerNavigatorNode\n | SlotNavigatorNode\n | SplitViewNavigatorNode\n | StackNavigatorNode\n | TabsNavigatorNode;\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n /** Hide this route from primary Tabs/Drawer presentation without making it unnavigable. */\n showInPrimaryNavigation?: boolean;\n guards?: string[];\n screenId?: string;\n /** Presentation applied by the resolved parent stack implementation. */\n stackOptions?: StackScreenOptions;\n navigator?: NavigatorNode;\n}\n\nexport interface NavigatorDefaults {\n tabs?: TabsImplementationConfig;\n stack?: StackImplementationConfig;\n}\n\nexport interface NavigatorPlatformConfig {\n tabs?: TabsImplementationConfig;\n stack?: StackImplementationConfig;\n}\n\nexport interface NavigatorPlatforms {\n android?: NavigatorPlatformConfig;\n ios?: NavigatorPlatformConfig;\n web?: NavigatorPlatformConfig;\n}\n\n/**\n * Serializable desired state for `AppManifest.navigator`.\n *\n * The manifest slice is the root navigator tree itself; optional authoring metadata does not add\n * a redundant `root` wrapper. The standalone Navigator capability consumes this slice directly.\n */\nexport type AppNavigatorManifest = NavigatorNode & {\n preset?: NavigatorPreset;\n defaults?: NavigatorDefaults;\n platforms?: NavigatorPlatforms;\n};\n\nexport type {\n NavigatorCapabilityDescriptor,\n NavigatorCapabilityRequirement,\n NavigatorCapabilityTarget,\n NavigatorCapabilityVerification,\n NavigatorCatalog,\n NavigatorImplementation,\n NavigatorPresentation,\n NavigatorPresetDescriptor,\n NavigatorVerificationKind,\n NavigatorVerificationStatus,\n} from './navigator/catalog';\nexport type {\n CustomNavigatorConfigIssue,\n CustomNavigatorRegistration,\n CustomNavigatorRegistry,\n} from './navigator/extensions';\nexport type {\n NavigatorDependencyRequirement,\n NavigatorGeneratedFile,\n NavigatorGenerationBindings,\n NavigatorGenerationOptions,\n NavigatorGenerationResult,\n NavigatorScreenModule,\n} from './navigator/generation';\nexport type {\n CreateNavigatorPlanOptions,\n ExpoRouterNavigatorModule,\n NavigatorAdapterId,\n NavigatorAdapterPlan,\n NavigatorApiStability,\n NavigatorCapabilityId,\n NavigatorDiagnostic,\n NavigatorNodePlan,\n NavigatorPlan,\n NavigatorResponsiveSize,\n NavigatorRoutePlan,\n NavigatorRuntimePlatform,\n NavigatorSupportStatus,\n NavigatorValidationContext,\n ResolvedHeadlessTabsPresentation,\n ResolvedTabsImplementation,\n ResolvedTabsPresentation,\n TabsNavigatorPlan,\n} from './navigator/planning';\n"]}
1
+ {"version":3,"file":"navigator.js","sourceRoot":"","sources":["../src/navigator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAU,CAAC;AAGpG,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,cAAc;IACd,oBAAoB;IACpB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,yBAAyB;IACzB,YAAY;IACZ,QAAQ;CACA,CAAC;AAGX,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,cAAc,CAAU,CAAC;AAGvF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM;IACN,OAAO;IACP,kBAAkB;IAClB,gBAAgB;IAChB,2BAA2B;IAC3B,iBAAiB;IACjB,WAAW;CACH,CAAC;AAGX,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,kBAAkB,CAAU,CAAC;AA4C7F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AAG3D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAU,CAAC;AAU7E,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAG/F,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,iCAAiC;IACpC,YAAY;IACZ,QAAQ;CACA,CAAC;AAGX,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAU,CAAC;AAGxE,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC","sourcesContent":["import type { ValueMap } from './collections';\nimport type { IconSpec, ManifestValue } from './types';\n\nexport { isAppNavigatorManifest } from './appManifest/navigator';\n\nexport const NAVIGATOR_TYPES = ['slot', 'stack', 'tabs', 'drawer', 'split-view', 'custom'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const NAVIGATOR_PRESETS = [\n 'slot',\n 'stack',\n 'tabs',\n 'tabs-stack',\n 'stack-tabs',\n 'stack-tabs-stack',\n 'drawer',\n 'drawer-stack',\n 'stack-drawer',\n 'stack-drawer-stack',\n 'drawer-tabs',\n 'drawer-tabs-stack',\n 'stack-drawer-tabs',\n 'stack-drawer-tabs-stack',\n 'split-view',\n 'custom',\n] as const;\nexport type NavigatorPreset = (typeof NAVIGATOR_PRESETS)[number];\n\nexport const STACK_IMPLEMENTATIONS = ['native', 'javascript', 'experimental'] as const;\nexport type StackImplementation = (typeof STACK_IMPLEMENTATIONS)[number];\n\nexport const STACK_PRESENTATIONS = [\n 'card',\n 'modal',\n 'transparentModal',\n 'containedModal',\n 'containedTransparentModal',\n 'fullScreenModal',\n 'formSheet',\n] as const;\nexport type StackPresentation = (typeof STACK_PRESENTATIONS)[number];\n\nexport const JAVASCRIPT_STACK_PRESENTATIONS = ['card', 'modal', 'transparentModal'] as const;\nexport type JavaScriptStackPresentation = (typeof JAVASCRIPT_STACK_PRESENTATIONS)[number];\n\nexport interface StackHeaderOptions {\n title?: string;\n headerShown?: boolean;\n headerTransparent?: boolean;\n headerBackVisible?: boolean;\n}\n\nexport type StackScreenOptions = StackHeaderOptions &\n (\n | {\n presentation?: Exclude<StackPresentation, 'formSheet'>;\n sheetAllowedDetents?: never;\n sheetGrabberVisible?: never;\n }\n | {\n presentation: 'formSheet';\n sheetAllowedDetents?: 'fitToContents' | number[];\n sheetGrabberVisible?: boolean;\n }\n );\n\nexport type JavaScriptStackScreenOptions = StackHeaderOptions & {\n presentation?: JavaScriptStackPresentation;\n};\n\nexport type StackImplementationConfig =\n | {\n /** Omission selects the stable native stack implementation. */\n implementation?: 'native';\n options?: StackScreenOptions;\n }\n | {\n implementation: 'javascript';\n options?: JavaScriptStackScreenOptions;\n }\n | {\n /** Expo Router Experimental Stack is alpha, native-only, and available from SDK 56. */\n implementation: 'experimental';\n options?: StackHeaderOptions;\n };\n\nexport const DRAWER_POSITIONS = ['left', 'right'] as const;\nexport type DrawerPosition = (typeof DRAWER_POSITIONS)[number];\n\nexport const DRAWER_TYPES = ['front', 'back', 'slide', 'permanent'] as const;\nexport type DrawerType = (typeof DRAWER_TYPES)[number];\n\nexport interface DrawerNavigatorOptions {\n drawerPosition?: DrawerPosition;\n drawerType?: DrawerType;\n swipeEnabled?: boolean;\n headerShown?: boolean;\n}\n\nexport const FIXED_HEADLESS_TABS_PRESENTATIONS = ['bottom', 'top', 'rail', 'sidebar'] as const;\nexport type FixedHeadlessTabsPresentation = (typeof FIXED_HEADLESS_TABS_PRESENTATIONS)[number];\n\nexport const HEADLESS_TABS_PRESENTATIONS = [\n ...FIXED_HEADLESS_TABS_PRESENTATIONS,\n 'responsive',\n 'custom',\n] as const;\nexport type HeadlessTabsPresentation = (typeof HEADLESS_TABS_PRESENTATIONS)[number];\n\nexport const JAVASCRIPT_TABS_PRESENTATIONS = ['bottom', 'top'] as const;\nexport type JavaScriptTabsPresentation = (typeof JAVASCRIPT_TABS_PRESENTATIONS)[number];\n\nexport const NATIVE_TABS_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\nexport type NativeTabsMinimizeBehavior = (typeof NATIVE_TABS_MINIMIZE_BEHAVIORS)[number];\n\nexport interface ResponsiveTabsPresentation {\n compact: FixedHeadlessTabsPresentation;\n medium?: FixedHeadlessTabsPresentation;\n expanded: FixedHeadlessTabsPresentation;\n}\n\nexport type HeadlessTabsPresentationConfig =\n | {\n presentation: FixedHeadlessTabsPresentation;\n responsive?: never;\n customPresentationId?: never;\n }\n | {\n presentation: 'responsive';\n responsive: ResponsiveTabsPresentation;\n customPresentationId?: never;\n }\n | {\n presentation: 'custom';\n responsive?: never;\n /** Serializable registered presentation id. */\n customPresentationId: string;\n };\n\nexport type HeadlessTabsConfig = {\n implementation: 'headless';\n} & HeadlessTabsPresentationConfig;\n\nexport type HeadlessTabsWebConfig = HeadlessTabsPresentationConfig;\n\nexport interface NavigatorScreenReference {\n screenId: string;\n}\n\nexport interface NativeTabsConfig {\n implementation: 'native';\n /** Expo Router Native Tabs is alpha; minimizing is available on iOS 26+ from SDK 55. */\n minimizeBehavior?: NativeTabsMinimizeBehavior;\n /** Registered screen rendered through NativeTabs.BottomAccessory, available from SDK 55. */\n bottomAccessory?: NavigatorScreenReference;\n}\n\nexport interface JavaScriptTabsConfig {\n implementation: 'javascript';\n presentation?: JavaScriptTabsPresentation;\n}\n\nexport interface AdaptiveTabsConfig {\n /** Omission selects the canonical adaptive default. */\n implementation?: 'adaptive';\n /** Android/iOS branch. Expo Router may expose this implementation as unstable. */\n native?: NativeTabsConfig;\n /** Web branch rendered through headless tabs. */\n web?: HeadlessTabsWebConfig;\n}\n\nexport type TabsImplementationConfig =\n AdaptiveTabsConfig | HeadlessTabsConfig | JavaScriptTabsConfig | NativeTabsConfig;\n\ninterface NavigatorNodeBase {\n initialRouteName?: string;\n routes: RouteDefinition[];\n}\n\nexport interface SlotNavigatorNode extends NavigatorNodeBase {\n type: 'slot';\n}\n\nexport type StackNavigatorNode = NavigatorNodeBase & {\n type: 'stack';\n} & StackImplementationConfig;\n\nexport interface DrawerNavigatorNode extends NavigatorNodeBase {\n type: 'drawer';\n options?: DrawerNavigatorOptions;\n}\n\nexport type TabsNavigatorConfig = {\n type: 'tabs';\n} & TabsImplementationConfig;\n\nexport type TabsNavigatorNode = NavigatorNodeBase & TabsNavigatorConfig;\n\nexport interface SplitViewNavigatorNode extends NavigatorNodeBase {\n type: 'split-view';\n columns: {\n primary: NavigatorScreenReference;\n supplementary?: NavigatorScreenReference;\n };\n inspector?: NavigatorScreenReference;\n /** Split View is alpha and iOS-only; other platforms fall back to Slot. */\n topColumnForCollapsing?: 'primary' | 'supplementary' | 'secondary';\n}\n\nexport interface CustomNavigatorNode extends NavigatorNodeBase {\n type: 'custom';\n navigatorId: string;\n config?: ValueMap<string, ManifestValue>;\n}\n\nexport type NavigatorNode =\n | CustomNavigatorNode\n | DrawerNavigatorNode\n | SlotNavigatorNode\n | SplitViewNavigatorNode\n | StackNavigatorNode\n | TabsNavigatorNode;\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n /** Hide this route from primary Tabs/Drawer presentation without making it unnavigable. */\n showInPrimaryNavigation?: boolean;\n guards?: string[];\n screenId?: string;\n /** Presentation applied by the resolved parent stack implementation. */\n stackOptions?: StackScreenOptions;\n navigator?: NavigatorNode;\n}\n\nexport interface NavigatorDefaults {\n tabs?: TabsImplementationConfig;\n stack?: StackImplementationConfig;\n}\n\nexport interface NavigatorPlatformConfig {\n tabs?: TabsImplementationConfig;\n stack?: StackImplementationConfig;\n}\n\nexport interface NavigatorPlatforms {\n android?: NavigatorPlatformConfig;\n ios?: NavigatorPlatformConfig;\n web?: NavigatorPlatformConfig;\n}\n\n/**\n * Serializable desired state for `AppManifest.navigator`.\n *\n * The manifest slice is the root navigator tree itself; optional authoring metadata does not add\n * a redundant `root` wrapper. The standalone Navigator capability consumes this slice directly.\n */\nexport type AppNavigatorManifest = NavigatorNode & {\n preset?: NavigatorPreset;\n defaults?: NavigatorDefaults;\n platforms?: NavigatorPlatforms;\n};\n\nexport type {\n NavigatorCapabilityDescriptor,\n NavigatorCapabilityRequirement,\n NavigatorCapabilityTarget,\n NavigatorCapabilityVerification,\n NavigatorCatalog,\n NavigatorImplementation,\n NavigatorPresentation,\n NavigatorPresetDescriptor,\n NavigatorVerificationKind,\n NavigatorVerificationStatus,\n} from './navigator/catalog';\nexport type {\n CustomNavigatorConfigIssue,\n CustomNavigatorRegistration,\n CustomNavigatorRegistry,\n} from './navigator/extensions';\nexport type {\n NavigatorDependencyRequirement,\n NavigatorGeneratedFile,\n NavigatorGenerationBindings,\n NavigatorGenerationOptions,\n NavigatorGenerationResult,\n NavigatorScreenModule,\n} from './navigator/generation';\nexport type {\n CreateNavigatorPlanOptions,\n ExpoRouterNavigatorModule,\n NavigatorAdapterId,\n NavigatorAdapterPlan,\n NavigatorApiStability,\n NavigatorCapabilityId,\n NavigatorDiagnostic,\n NavigatorNodePlan,\n NavigatorPlan,\n NavigatorResponsiveSize,\n NavigatorRoutePlan,\n NavigatorRuntimePlatform,\n NavigatorSupportStatus,\n NavigatorValidationContext,\n ResolvedHeadlessTabsPresentation,\n ResolvedTabsImplementation,\n ResolvedTabsPresentation,\n TabsNavigatorPlan,\n} from './navigator/planning';\n"]}
@@ -0,0 +1,4 @@
1
+ export { isStructureDescriptor } from './isStructureDescriptor';
2
+ export { isStructureDescriptorDocument } from './isStructureDescriptorDocument';
3
+ export type { StructureDescriptor, StructureDescriptorDefinition, StructureDescriptorDocument, StructureDescriptorId, StructureDescriptorRegistry, StructureEntityRegistryDescriptor, StructureEnumDescriptor, StructureLiteralValue, StructureObjectDescriptor, StructureObjectField, StructureOrderedListDescriptor, StructureReferenceDescriptor, StructureScalarDescriptor, StructureScalarType, StructureSetDescriptor, StructureUnionDescriptor, StructureValueMapDescriptor, } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/structure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,YAAY,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B,EAC3B,iCAAiC,EACjC,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,8BAA8B,EAC9B,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { isStructureDescriptor } from './isStructureDescriptor';
2
+ export { isStructureDescriptorDocument } from './isStructureDescriptorDocument';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/structure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export { isStructureDescriptor } from './isStructureDescriptor';\nexport { isStructureDescriptorDocument } from './isStructureDescriptorDocument';\nexport type {\n StructureDescriptor,\n StructureDescriptorDefinition,\n StructureDescriptorDocument,\n StructureDescriptorId,\n StructureDescriptorRegistry,\n StructureEntityRegistryDescriptor,\n StructureEnumDescriptor,\n StructureLiteralValue,\n StructureObjectDescriptor,\n StructureObjectField,\n StructureOrderedListDescriptor,\n StructureReferenceDescriptor,\n StructureScalarDescriptor,\n StructureScalarType,\n StructureSetDescriptor,\n StructureUnionDescriptor,\n StructureValueMapDescriptor,\n} from './types';\n"]}
@@ -0,0 +1,4 @@
1
+ import type { StructureDescriptor } from './types';
2
+ /*** Validate one standalone structural descriptor without resolving external/local references. */
3
+ export declare function isStructureDescriptor(value: unknown): value is StructureDescriptor;
4
+ //# sourceMappingURL=isStructureDescriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isStructureDescriptor.d.ts","sourceRoot":"","sources":["../../src/structure/isStructureDescriptor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAA8C,MAAM,SAAS,CAAC;AAE/F,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF"}
@@ -0,0 +1,132 @@
1
+ import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';
2
+ import { isNonEmptyString } from '@ankhorage/utility/string';
3
+ /*** Validate one standalone structural descriptor without resolving external/local references. */
4
+ export function isStructureDescriptor(value) {
5
+ return isDescriptor(value, new Set());
6
+ }
7
+ /*** Validate one descriptor recursively while rejecting cyclic inline object graphs. */
8
+ function isDescriptor(value, ancestors) {
9
+ if (!isRecord(value) || typeof value.kind !== 'string' || ancestors.has(value))
10
+ return false;
11
+ ancestors.add(value);
12
+ const valid = validateDescriptorKind(value, ancestors);
13
+ ancestors.delete(value);
14
+ return valid;
15
+ }
16
+ /*** Dispatch descriptor validation by its explicit structural kind. */
17
+ function validateDescriptorKind(value, ancestors) {
18
+ switch (value.kind) {
19
+ case 'scalar':
20
+ return isScalarDescriptor(value);
21
+ case 'enum':
22
+ return isEnumDescriptor(value);
23
+ case 'object':
24
+ return isObjectDescriptor(value, ancestors);
25
+ case 'entity-registry':
26
+ return isEntityRegistryDescriptor(value, ancestors);
27
+ case 'value-map':
28
+ return isValueMapDescriptor(value, ancestors);
29
+ case 'set':
30
+ return isSetDescriptor(value, ancestors);
31
+ case 'ordered-list':
32
+ return isOrderedListDescriptor(value, ancestors);
33
+ case 'union':
34
+ return isUnionDescriptor(value, ancestors);
35
+ case 'ref':
36
+ return isReferenceDescriptor(value);
37
+ default:
38
+ return false;
39
+ }
40
+ }
41
+ /*** Validate a scalar descriptor and its closed primitive vocabulary. */
42
+ function isScalarDescriptor(value) {
43
+ return (hasOnlyKeys(value, ['kind', 'type']) &&
44
+ typeof value.type === 'string' &&
45
+ SCALAR_TYPES.has(value.type));
46
+ }
47
+ /*** Validate a non-empty finite scalar literal set without duplicate members. */
48
+ function isEnumDescriptor(value) {
49
+ if (!hasOnlyKeys(value, ['kind', 'values']) || !Array.isArray(value.values))
50
+ return false;
51
+ if (value.values.length === 0 || !value.values.every(isStructureLiteralValue))
52
+ return false;
53
+ const identities = value.values.map(structureLiteralIdentity);
54
+ return new Set(identities).size === identities.length;
55
+ }
56
+ /*** Validate a fixed-field object descriptor. */
57
+ function isObjectDescriptor(value, ancestors) {
58
+ return (hasOnlyKeys(value, ['kind', 'fields']) &&
59
+ isRecord(value.fields) &&
60
+ Object.values(value.fields).every((field) => isObjectField(field, ancestors)));
61
+ }
62
+ /*** Validate one object field and its optionality marker. */
63
+ function isObjectField(value, ancestors) {
64
+ return (isRecord(value) &&
65
+ hasOnlyKeys(value, ['value', 'optional']) &&
66
+ (value.optional === undefined || typeof value.optional === 'boolean') &&
67
+ isDescriptor(value.value, ancestors));
68
+ }
69
+ /*** Validate a stable keyed entity collection descriptor. */
70
+ function isEntityRegistryDescriptor(value, ancestors) {
71
+ return (hasOnlyKeys(value, ['kind', 'key', 'value', 'identityField']) &&
72
+ isStringKeyDescriptor(value.key, ancestors) &&
73
+ isDescriptor(value.value, ancestors) &&
74
+ (value.identityField === undefined || isNonEmptyString(value.identityField)));
75
+ }
76
+ /*** Validate a keyed property/configuration map descriptor. */
77
+ function isValueMapDescriptor(value, ancestors) {
78
+ return (hasOnlyKeys(value, ['kind', 'key', 'value']) &&
79
+ isStringKeyDescriptor(value.key, ancestors) &&
80
+ isDescriptor(value.value, ancestors));
81
+ }
82
+ /*** Validate an unordered string-membership descriptor. */
83
+ function isSetDescriptor(value, ancestors) {
84
+ return hasOnlyKeys(value, ['kind', 'member']) && isStringKeyDescriptor(value.member, ancestors);
85
+ }
86
+ /*** Validate a semantically ordered list descriptor. */
87
+ function isOrderedListDescriptor(value, ancestors) {
88
+ return hasOnlyKeys(value, ['kind', 'item']) && isDescriptor(value.item, ancestors);
89
+ }
90
+ /*** Validate a union descriptor with at least two valid variants. */
91
+ function isUnionDescriptor(value, ancestors) {
92
+ return (hasOnlyKeys(value, ['kind', 'variants', 'discriminator']) &&
93
+ Array.isArray(value.variants) &&
94
+ value.variants.length >= 2 &&
95
+ value.variants.every((variant) => isDescriptor(variant, ancestors)) &&
96
+ (value.discriminator === undefined || isNonEmptyString(value.discriminator)));
97
+ }
98
+ /*** Validate a local or package-qualified descriptor reference. */
99
+ function isReferenceDescriptor(value) {
100
+ return (hasOnlyKeys(value, ['kind', 'id', 'packageName']) &&
101
+ isNonEmptyString(value.id) &&
102
+ (value.packageName === undefined || isNonEmptyString(value.packageName)));
103
+ }
104
+ /*** Validate a descriptor that can represent a JSON object key or set member string. */
105
+ function isStringKeyDescriptor(value, ancestors) {
106
+ if (!isDescriptor(value, ancestors))
107
+ return false;
108
+ if (value.kind === 'ref')
109
+ return true;
110
+ if (value.kind === 'scalar')
111
+ return value.type === 'string';
112
+ return value.kind === 'enum' && value.values.every((member) => typeof member === 'string');
113
+ }
114
+ /*** Validate one serializable scalar literal used by finite enum descriptors. */
115
+ function isStructureLiteralValue(value) {
116
+ return (value === null ||
117
+ typeof value === 'boolean' ||
118
+ (typeof value === 'number' && Number.isFinite(value)) ||
119
+ typeof value === 'string');
120
+ }
121
+ /*** Produce an unambiguous identity for one scalar enum member. */
122
+ function structureLiteralIdentity(value) {
123
+ return value === null ? 'null' : `${typeof value}:${String(value)}`;
124
+ }
125
+ const SCALAR_TYPES = new Set([
126
+ 'boolean',
127
+ 'integer',
128
+ 'null',
129
+ 'number',
130
+ 'string',
131
+ ]);
132
+ //# sourceMappingURL=isStructureDescriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isStructureDescriptor.js","sourceRoot":"","sources":["../../src/structure/isStructureDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAI7D,kGAAkG;AAClG,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACxC,CAAC;AAED,wFAAwF;AACxF,SAAS,YAAY,CAAC,KAAc,EAAE,SAAsB;IAC1D,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7F,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACvD,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,uEAAuE;AACvE,SAAS,sBAAsB,CAAC,KAA8B,EAAE,SAAsB;IACpF,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,MAAM;YACT,OAAO,gBAAgB,C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QAAQ;IACR,QAAQ;CACT,CAAC,CAAC","sourcesContent":["import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';\nimport { isNonEmptyString } from '@ankhorage/utility/string';\n\nimport type { StructureDescriptor, StructureLiteralValue, StructureScalarType } from './types';\n\n/*** Validate one standalone structural descriptor without resolving external/local references. */\nexport function isStructureDescriptor(value: unknown): value is StructureDescriptor {\n return isDescriptor(value, new Set());\n}\n\n/*** Validate one descriptor recursively while rejecting cyclic inline object graphs. */\nfunction isDescriptor(value: unknown, ancestors: Set<object>): value is StructureDescriptor {\n if (!isRecord(value) || typeof value.kind !== 'string' || ancestors.has(value)) return false;\n ancestors.add(value);\n const valid = validateDescriptorKind(value, ancestors);\n ancestors.delete(value);\n return valid;\n}\n\n/*** Dispatch descriptor validation by its explicit structural kind. */\nfunction validateDescriptorKind(value: Record<string, unknown>, ancestors: Set<object>): boolean {\n switch (value.kind) {\n case 'scalar':\n return isScalarDescriptor(value);\n case 'enum':\n return isEnumDescriptor(value);\n case 'object':\n return isObjectDescriptor(value, ancestors);\n case 'entity-registry':\n return isEntityRegistryDescriptor(value, ancestors);\n case 'value-map':\n return isValueMapDescriptor(value, ancestors);\n case 'set':\n return isSetDescriptor(value, ancestors);\n case 'ordered-list':\n return isOrderedListDescriptor(value, ancestors);\n case 'union':\n return isUnionDescriptor(value, ancestors);\n case 'ref':\n return isReferenceDescriptor(value);\n default:\n return false;\n }\n}\n\n/*** Validate a scalar descriptor and its closed primitive vocabulary. */\nfunction isScalarDescriptor(value: Record<string, unknown>): boolean {\n return (\n hasOnlyKeys(value, ['kind', 'type']) &&\n typeof value.type === 'string' &&\n SCALAR_TYPES.has(value.type as StructureScalarType)\n );\n}\n\n/*** Validate a non-empty finite scalar literal set without duplicate members. */\nfunction isEnumDescriptor(value: Record<string, unknown>): boolean {\n if (!hasOnlyKeys(value, ['kind', 'values']) || !Array.isArray(value.values)) return false;\n if (value.values.length === 0 || !value.values.every(isStructureLiteralValue)) return false;\n const identities = value.values.map(structureLiteralIdentity);\n return new Set(identities).size === identities.length;\n}\n\n/*** Validate a fixed-field object descriptor. */\nfunction isObjectDescriptor(value: Record<string, unknown>, ancestors: Set<object>): boolean {\n return (\n hasOnlyKeys(value, ['kind', 'fields']) &&\n isRecord(value.fields) &&\n Object.values(value.fields).every((field) => isObjectField(field, ancestors))\n );\n}\n\n/*** Validate one object field and its optionality marker. */\nfunction isObjectField(value: unknown, ancestors: Set<object>): boolean {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, ['value', 'optional']) &&\n (value.optional === undefined || typeof value.optional === 'boolean') &&\n isDescriptor(value.value, ancestors)\n );\n}\n\n/*** Validate a stable keyed entity collection descriptor. */\nfunction isEntityRegistryDescriptor(\n value: Record<string, unknown>,\n ancestors: Set<object>,\n): boolean {\n return (\n hasOnlyKeys(value, ['kind', 'key', 'value', 'identityField']) &&\n isStringKeyDescriptor(value.key, ancestors) &&\n isDescriptor(value.value, ancestors) &&\n (value.identityField === undefined || isNonEmptyString(value.identityField))\n );\n}\n\n/*** Validate a keyed property/configuration map descriptor. */\nfunction isValueMapDescriptor(value: Record<string, unknown>, ancestors: Set<object>): boolean {\n return (\n hasOnlyKeys(value, ['kind', 'key', 'value']) &&\n isStringKeyDescriptor(value.key, ancestors) &&\n isDescriptor(value.value, ancestors)\n );\n}\n\n/*** Validate an unordered string-membership descriptor. */\nfunction isSetDescriptor(value: Record<string, unknown>, ancestors: Set<object>): boolean {\n return hasOnlyKeys(value, ['kind', 'member']) && isStringKeyDescriptor(value.member, ancestors);\n}\n\n/*** Validate a semantically ordered list descriptor. */\nfunction isOrderedListDescriptor(value: Record<string, unknown>, ancestors: Set<object>): boolean {\n return hasOnlyKeys(value, ['kind', 'item']) && isDescriptor(value.item, ancestors);\n}\n\n/*** Validate a union descriptor with at least two valid variants. */\nfunction isUnionDescriptor(value: Record<string, unknown>, ancestors: Set<object>): boolean {\n return (\n hasOnlyKeys(value, ['kind', 'variants', 'discriminator']) &&\n Array.isArray(value.variants) &&\n value.variants.length >= 2 &&\n value.variants.every((variant) => isDescriptor(variant, ancestors)) &&\n (value.discriminator === undefined || isNonEmptyString(value.discriminator))\n );\n}\n\n/*** Validate a local or package-qualified descriptor reference. */\nfunction isReferenceDescriptor(value: Record<string, unknown>): boolean {\n return (\n hasOnlyKeys(value, ['kind', 'id', 'packageName']) &&\n isNonEmptyString(value.id) &&\n (value.packageName === undefined || isNonEmptyString(value.packageName))\n );\n}\n\n/*** Validate a descriptor that can represent a JSON object key or set member string. */\nfunction isStringKeyDescriptor(value: unknown, ancestors: Set<object>): boolean {\n if (!isDescriptor(value, ancestors)) return false;\n if (value.kind === 'ref') return true;\n if (value.kind === 'scalar') return value.type === 'string';\n return value.kind === 'enum' && value.values.every((member) => typeof member === 'string');\n}\n\n/*** Validate one serializable scalar literal used by finite enum descriptors. */\nfunction isStructureLiteralValue(value: unknown): value is StructureLiteralValue {\n return (\n value === null ||\n typeof value === 'boolean' ||\n (typeof value === 'number' && Number.isFinite(value)) ||\n typeof value === 'string'\n );\n}\n\n/*** Produce an unambiguous identity for one scalar enum member. */\nfunction structureLiteralIdentity(value: StructureLiteralValue): string {\n return value === null ? 'null' : `${typeof value}:${String(value)}`;\n}\n\nconst SCALAR_TYPES = new Set<StructureScalarType>([\n 'boolean',\n 'integer',\n 'null',\n 'number',\n 'string',\n]);\n"]}
@@ -0,0 +1,4 @@
1
+ import type { StructureDescriptorDocument } from './types';
2
+ /*** Validate a complete package structural-descriptor document and all resolvable references. */
3
+ export declare function isStructureDescriptorDocument(value: unknown): value is StructureDescriptorDocument;
4
+ //# sourceMappingURL=isStructureDescriptorDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isStructureDescriptorDocument.d.ts","sourceRoot":"","sources":["../../src/structure/isStructureDescriptorDocument.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAGV,2BAA2B,EAG5B,MAAM,SAAS,CAAC;AAEjB,iGAAiG;AACjG,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,2BAA2B,CA2BtC"}
@@ -0,0 +1,114 @@
1
+ import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';
2
+ import { isNonEmptyString } from '@ankhorage/utility/string';
3
+ import { isStructureDescriptor } from './isStructureDescriptor';
4
+ /*** Validate a complete package structural-descriptor document and all resolvable references. */
5
+ export function isStructureDescriptorDocument(value) {
6
+ if (!isRecord(value) ||
7
+ !hasOnlyKeys(value, [
8
+ 'protocolVersion',
9
+ 'packageName',
10
+ 'packageVersion',
11
+ 'roots',
12
+ 'descriptors',
13
+ ]) ||
14
+ value.protocolVersion !== 1 ||
15
+ !isNonEmptyString(value.packageName) ||
16
+ !isNonEmptyString(value.packageVersion) ||
17
+ !isRootMap(value.roots) ||
18
+ !isDescriptorRegistry(value.descriptors)) {
19
+ return false;
20
+ }
21
+ const document = {
22
+ protocolVersion: 1,
23
+ packageName: value.packageName,
24
+ packageVersion: value.packageVersion,
25
+ roots: value.roots,
26
+ descriptors: value.descriptors,
27
+ };
28
+ return hasResolvableRoots(document) && isDescriptorGraphValid(document);
29
+ }
30
+ /*** Validate the root-name to local-descriptor-ID map. */
31
+ function isRootMap(value) {
32
+ return (isRecord(value) &&
33
+ Object.keys(value).length > 0 &&
34
+ Object.entries(value).every(([name, descriptorId]) => isNonEmptyString(name) && isNonEmptyString(descriptorId)));
35
+ }
36
+ /*** Validate descriptor definitions and enforce record-key to definition-ID identity. */
37
+ function isDescriptorRegistry(value) {
38
+ return (isRecord(value) &&
39
+ Object.keys(value).length > 0 &&
40
+ Object.entries(value).every(([descriptorId, definition]) => isDefinition(definition, descriptorId)));
41
+ }
42
+ /*** Validate one descriptor definition against its stable registry key. */
43
+ function isDefinition(value, descriptorId) {
44
+ return (isRecord(value) &&
45
+ hasOnlyKeys(value, ['id', 'descriptor']) &&
46
+ value.id === descriptorId &&
47
+ isNonEmptyString(value.id) &&
48
+ isStructureDescriptor(value.descriptor));
49
+ }
50
+ /*** Require every document root to resolve to one local descriptor definition. */
51
+ function hasResolvableRoots(document) {
52
+ const descriptors = new Map(Object.entries(document.descriptors));
53
+ return Object.values(document.roots).every((descriptorId) => descriptors.has(descriptorId));
54
+ }
55
+ /*** Validate local references, recursive graphs, and string-only collection key/member descriptors. */
56
+ function isDescriptorGraphValid(document) {
57
+ const definitions = new Map(Object.entries(document.descriptors));
58
+ return Array.from(definitions.values()).every((definition) => validateGraphNode(definition.descriptor, document, new Set()));
59
+ }
60
+ /*** Validate one graph node while treating revisited local refs as a valid recursive cycle. */
61
+ function validateGraphNode(descriptor, document, visitedRefs) {
62
+ switch (descriptor.kind) {
63
+ case 'object':
64
+ return Object.values(descriptor.fields).every((field) => validateGraphNode(field.value, document, new Set(visitedRefs)));
65
+ case 'entity-registry':
66
+ case 'value-map':
67
+ return (isStringCompatible(descriptor.key, document, new Set()) &&
68
+ validateGraphNode(descriptor.value, document, new Set(visitedRefs)));
69
+ case 'set':
70
+ return isStringCompatible(descriptor.member, document, new Set());
71
+ case 'ordered-list':
72
+ return validateGraphNode(descriptor.item, document, new Set(visitedRefs));
73
+ case 'union':
74
+ return descriptor.variants.every((variant) => validateGraphNode(variant, document, new Set(visitedRefs)));
75
+ case 'ref':
76
+ return validateReference(descriptor, document, visitedRefs);
77
+ default:
78
+ return true;
79
+ }
80
+ }
81
+ /*** Resolve and validate one local reference while deferring package-qualified refs to composition. */
82
+ function validateReference(descriptor, document, visitedRefs) {
83
+ if (descriptor.packageName && descriptor.packageName !== document.packageName)
84
+ return true;
85
+ if (visitedRefs.has(descriptor.id))
86
+ return true;
87
+ const definition = new Map(Object.entries(document.descriptors)).get(descriptor.id);
88
+ if (!definition)
89
+ return false;
90
+ const nextRefs = new Set(visitedRefs);
91
+ nextRefs.add(descriptor.id);
92
+ return validateGraphNode(definition.descriptor, document, nextRefs);
93
+ }
94
+ /*** Prove that a collection key/member descriptor is string-valued when locally resolvable. */
95
+ function isStringCompatible(descriptor, document, visitedRefs) {
96
+ if (descriptor.kind === 'scalar')
97
+ return descriptor.type === 'string';
98
+ if (descriptor.kind === 'enum') {
99
+ return descriptor.values.every((value) => typeof value === 'string');
100
+ }
101
+ if (descriptor.kind !== 'ref')
102
+ return false;
103
+ if (descriptor.packageName && descriptor.packageName !== document.packageName)
104
+ return true;
105
+ if (visitedRefs.has(descriptor.id))
106
+ return false;
107
+ const definition = new Map(Object.entries(document.descriptors)).get(descriptor.id);
108
+ if (!definition)
109
+ return false;
110
+ const nextRefs = new Set(visitedRefs);
111
+ nextRefs.add(descriptor.id);
112
+ return isStringCompatible(definition.descriptor, document, nextRefs);
113
+ }
114
+ //# sourceMappingURL=isStructureDescriptorDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isStructureDescriptorDocument.js","sourceRoot":"","sources":["../../src/structure/isStructureDescriptorDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAShE,iGAAiG;AACjG,MAAM,UAAU,6BAA6B,CAC3C,KAAc;IAEd,IACE,CAAC,QAAQ,CAAC,KAAK,CAAC;QAChB,CAAC,WAAW,CAAC,KAAK,EAAE;YAClB,iBAAiB;YACjB,aAAa;YACb,gBAAgB;YAChB,OAAO;YACP,aAAa;SACd,CAAC;QACF,KAAK,CAAC,eAAe,KAAK,CAAC;QAC3B,CAAC,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC;QACpC,CAAC,gBAAgB,CAAC,KAAK,CAAC,cAAc,CAAC;QACvC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;QACvB,CAAC,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,EACxC,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,QAAQ,GAAgC;QAC5C,eAAe,EAAE,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,iBAAiB,CAAC,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtE,CAAC;AAED,+FAA+F;AAC/F,SAAS,kBAAkB,CACzB,UAA+B,EAC/B,QAAqC,EACrC,WAAwB;IAExB,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,CAAC;IACtE,IAAI,UAAU,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC/B,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;IACvE,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,WAAW,KAAK,QAAQ,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAC3F,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAAE,OAAO,KAAK,CAAC;IAEjD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACpF,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAE9B,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;IACtC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC5B,OAAO,kBAAkB,CAAC,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';\nimport { isNonEmptyString } from '@ankhorage/utility/string';\n\nimport { isStructureDescriptor } from './isStructureDescriptor';\nimport type {\n StructureDescriptor,\n StructureDescriptorDefinition,\n StructureDescriptorDocument,\n StructureDescriptorId,\n StructureDescriptorRegistry,\n} from './types';\n\n/*** Validate a complete package structural-descriptor document and all resolvable references. */\nexport function isStructureDescriptorDocument(\n value: unknown,\n): value is StructureDescriptorDocument {\n if (\n !isRecord(value) ||\n !hasOnlyKeys(value, [\n 'protocolVersion',\n 'packageName',\n 'packageVersion',\n 'roots',\n 'descriptors',\n ]) ||\n value.protocolVersion !== 1 ||\n !isNonEmptyString(value.packageName) ||\n !isNonEmptyString(value.packageVersion) ||\n !isRootMap(value.roots) ||\n !isDescriptorRegistry(value.descriptors)\n ) {\n return false;\n }\n\n const document: StructureDescriptorDocument = {\n protocolVersion: 1,\n packageName: value.packageName,\n packageVersion: value.packageVersion,\n roots: value.roots,\n descriptors: value.descriptors,\n };\n return hasResolvableRoots(document) && isDescriptorGraphValid(document);\n}\n\n/*** Validate the root-name to local-descriptor-ID map. */\nfunction isRootMap(value: unknown): value is Readonly<Record<string, StructureDescriptorId>> {\n return (\n isRecord(value) &&\n Object.keys(value).length > 0 &&\n Object.entries(value).every(\n ([name, descriptorId]) => isNonEmptyString(name) && isNonEmptyString(descriptorId),\n )\n );\n}\n\n/*** Validate descriptor definitions and enforce record-key to definition-ID identity. */\nfunction isDescriptorRegistry(value: unknown): value is StructureDescriptorRegistry {\n return (\n isRecord(value) &&\n Object.keys(value).length > 0 &&\n Object.entries(value).every(([descriptorId, definition]) =>\n isDefinition(definition, descriptorId),\n )\n );\n}\n\n/*** Validate one descriptor definition against its stable registry key. */\nfunction isDefinition(\n value: unknown,\n descriptorId: string,\n): value is StructureDescriptorDefinition {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, ['id', 'descriptor']) &&\n value.id === descriptorId &&\n isNonEmptyString(value.id) &&\n isStructureDescriptor(value.descriptor)\n );\n}\n\n/*** Require every document root to resolve to one local descriptor definition. */\nfunction hasResolvableRoots(document: StructureDescriptorDocument): boolean {\n const descriptors = new Map(Object.entries(document.descriptors));\n return Object.values(document.roots).every((descriptorId) => descriptors.has(descriptorId));\n}\n\n/*** Validate local references, recursive graphs, and string-only collection key/member descriptors. */\nfunction isDescriptorGraphValid(document: StructureDescriptorDocument): boolean {\n const definitions = new Map(Object.entries(document.descriptors));\n return Array.from(definitions.values()).every((definition) =>\n validateGraphNode(definition.descriptor, document, new Set()),\n );\n}\n\n/*** Validate one graph node while treating revisited local refs as a valid recursive cycle. */\nfunction validateGraphNode(\n descriptor: StructureDescriptor,\n document: StructureDescriptorDocument,\n visitedRefs: Set<string>,\n): boolean {\n switch (descriptor.kind) {\n case 'object':\n return Object.values(descriptor.fields).every((field) =>\n validateGraphNode(field.value, document, new Set(visitedRefs)),\n );\n case 'entity-registry':\n case 'value-map':\n return (\n isStringCompatible(descriptor.key, document, new Set()) &&\n validateGraphNode(descriptor.value, document, new Set(visitedRefs))\n );\n case 'set':\n return isStringCompatible(descriptor.member, document, new Set());\n case 'ordered-list':\n return validateGraphNode(descriptor.item, document, new Set(visitedRefs));\n case 'union':\n return descriptor.variants.every((variant) =>\n validateGraphNode(variant, document, new Set(visitedRefs)),\n );\n case 'ref':\n return validateReference(descriptor, document, visitedRefs);\n default:\n return true;\n }\n}\n\n/*** Resolve and validate one local reference while deferring package-qualified refs to composition. */\nfunction validateReference(\n descriptor: Extract<StructureDescriptor, { readonly kind: 'ref' }>,\n document: StructureDescriptorDocument,\n visitedRefs: Set<string>,\n): boolean {\n if (descriptor.packageName && descriptor.packageName !== document.packageName) return true;\n if (visitedRefs.has(descriptor.id)) return true;\n\n const definition = new Map(Object.entries(document.descriptors)).get(descriptor.id);\n if (!definition) return false;\n\n const nextRefs = new Set(visitedRefs);\n nextRefs.add(descriptor.id);\n return validateGraphNode(definition.descriptor, document, nextRefs);\n}\n\n/*** Prove that a collection key/member descriptor is string-valued when locally resolvable. */\nfunction isStringCompatible(\n descriptor: StructureDescriptor,\n document: StructureDescriptorDocument,\n visitedRefs: Set<string>,\n): boolean {\n if (descriptor.kind === 'scalar') return descriptor.type === 'string';\n if (descriptor.kind === 'enum') {\n return descriptor.values.every((value) => typeof value === 'string');\n }\n if (descriptor.kind !== 'ref') return false;\n if (descriptor.packageName && descriptor.packageName !== document.packageName) return true;\n if (visitedRefs.has(descriptor.id)) return false;\n\n const definition = new Map(Object.entries(document.descriptors)).get(descriptor.id);\n if (!definition) return false;\n\n const nextRefs = new Set(visitedRefs);\n nextRefs.add(descriptor.id);\n return isStringCompatible(definition.descriptor, document, nextRefs);\n}\n"]}
@@ -0,0 +1,63 @@
1
+ import type { EntityRegistry, ValueMap } from '../collections';
2
+ export type StructureDescriptorId = string;
3
+ export type StructureScalarType = 'boolean' | 'integer' | 'null' | 'number' | 'string';
4
+ export type StructureLiteralValue = boolean | number | string | null;
5
+ export interface StructureScalarDescriptor {
6
+ readonly kind: 'scalar';
7
+ readonly type: StructureScalarType;
8
+ }
9
+ export interface StructureEnumDescriptor {
10
+ readonly kind: 'enum';
11
+ readonly values: readonly StructureLiteralValue[];
12
+ }
13
+ export interface StructureObjectField {
14
+ readonly value: StructureDescriptor;
15
+ readonly optional?: boolean;
16
+ }
17
+ export interface StructureObjectDescriptor {
18
+ readonly kind: 'object';
19
+ readonly fields: ValueMap<string, StructureObjectField>;
20
+ }
21
+ export interface StructureEntityRegistryDescriptor {
22
+ readonly kind: 'entity-registry';
23
+ readonly key: StructureDescriptor;
24
+ readonly value: StructureDescriptor;
25
+ readonly identityField?: string;
26
+ }
27
+ export interface StructureValueMapDescriptor {
28
+ readonly kind: 'value-map';
29
+ readonly key: StructureDescriptor;
30
+ readonly value: StructureDescriptor;
31
+ }
32
+ export interface StructureSetDescriptor {
33
+ readonly kind: 'set';
34
+ readonly member: StructureDescriptor;
35
+ }
36
+ export interface StructureOrderedListDescriptor {
37
+ readonly kind: 'ordered-list';
38
+ readonly item: StructureDescriptor;
39
+ }
40
+ export interface StructureUnionDescriptor {
41
+ readonly kind: 'union';
42
+ readonly variants: readonly StructureDescriptor[];
43
+ readonly discriminator?: string;
44
+ }
45
+ export interface StructureReferenceDescriptor {
46
+ readonly kind: 'ref';
47
+ readonly id: StructureDescriptorId;
48
+ readonly packageName?: string;
49
+ }
50
+ export type StructureDescriptor = StructureEntityRegistryDescriptor | StructureEnumDescriptor | StructureObjectDescriptor | StructureOrderedListDescriptor | StructureReferenceDescriptor | StructureScalarDescriptor | StructureSetDescriptor | StructureUnionDescriptor | StructureValueMapDescriptor;
51
+ export interface StructureDescriptorDefinition {
52
+ readonly id: StructureDescriptorId;
53
+ readonly descriptor: StructureDescriptor;
54
+ }
55
+ export type StructureDescriptorRegistry = EntityRegistry<StructureDescriptorId, StructureDescriptorDefinition, 'id'>;
56
+ export interface StructureDescriptorDocument {
57
+ readonly protocolVersion: 1;
58
+ readonly packageName: string;
59
+ readonly packageVersion: string;
60
+ readonly roots: ValueMap<string, StructureDescriptorId>;
61
+ readonly descriptors: StructureDescriptorRegistry;
62
+ }
63
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/structure/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvF,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAErE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;CACpC;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAC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AC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,mBAAmB,GAC3B,iCAAiC,GACjC,uBAAuB,GACvB,yBAAyB,GACzB,8BAA8B,GAC9B,4BAA4B,GAC5B,yBAAyB,GACzB,sBAAsB,GACtB,wBAAwB,GACxB,2BAA2B,CAAC;AAEhC,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,EAAE,qBAAqB,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED,MAAM,MAAM,2BAA2B,GAAG,cAAc,CACtD,qBAAqB,EACrB,6BAA6B,EAC7B,IAAI,CACL,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACxD,QAAQ,CAAC,WAAW,EAAE,2BAA2B,CAAC;CACnD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/structure/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { EntityRegistry, ValueMap } from '../collections';\n\nexport type StructureDescriptorId = string;\n\nexport type StructureScalarType = 'boolean' | 'integer' | 'null' | 'number' | 'string';\n\nexport type StructureLiteralValue = boolean | number | string | null;\n\nexport interface StructureScalarDescriptor {\n readonly kind: 'scalar';\n readonly type: StructureScalarType;\n}\n\nexport interface StructureEnumDescriptor {\n readonly kind: 'enum';\n readonly values: readonly StructureLiteralValue[];\n}\n\nexport interface StructureObjectField {\n readonly value: StructureDescriptor;\n readonly optional?: boolean;\n}\n\nexport interface StructureObjectDescriptor {\n readonly kind: 'object';\n readonly fields: ValueMap<string, StructureObjectField>;\n}\n\nexport interface StructureEntityRegistryDescriptor {\n readonly kind: 'entity-registry';\n readonly key: StructureDescriptor;\n readonly value: StructureDescriptor;\n readonly identityField?: string;\n}\n\nexport interface StructureValueMapDescriptor {\n readonly kind: 'value-map';\n readonly key: StructureDescriptor;\n readonly value: StructureDescriptor;\n}\n\nexport interface StructureSetDescriptor {\n readonly kind: 'set';\n readonly member: StructureDescriptor;\n}\n\nexport interface StructureOrderedListDescriptor {\n readonly kind: 'ordered-list';\n readonly item: StructureDescriptor;\n}\n\nexport interface StructureUnionDescriptor {\n readonly kind: 'union';\n readonly variants: readonly StructureDescriptor[];\n readonly discriminator?: string;\n}\n\nexport interface StructureReferenceDescriptor {\n readonly kind: 'ref';\n readonly id: StructureDescriptorId;\n readonly packageName?: string;\n}\n\nexport type StructureDescriptor =\n | StructureEntityRegistryDescriptor\n | StructureEnumDescriptor\n | StructureObjectDescriptor\n | StructureOrderedListDescriptor\n | StructureReferenceDescriptor\n | StructureScalarDescriptor\n | StructureSetDescriptor\n | StructureUnionDescriptor\n | StructureValueMapDescriptor;\n\nexport interface StructureDescriptorDefinition {\n readonly id: StructureDescriptorId;\n readonly descriptor: StructureDescriptor;\n}\n\nexport type StructureDescriptorRegistry = EntityRegistry<\n StructureDescriptorId,\n StructureDescriptorDefinition,\n 'id'\n>;\n\nexport interface StructureDescriptorDocument {\n readonly protocolVersion: 1;\n readonly packageName: string;\n readonly packageVersion: string;\n readonly roots: ValueMap<string, StructureDescriptorId>;\n readonly descriptors: StructureDescriptorRegistry;\n}\n"]}
package/dist/theme.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import type { ValueMap } from './collections';
1
2
  /** Numeric token values authored at theme level. */
2
- export type ThemeNumericTokenOverrides = Readonly<Record<string, number>>;
3
+ export type ThemeNumericTokenOverrides = ValueMap<string, number>;
3
4
  /** String token values authored at theme level. */
4
- export type ThemeStringTokenOverrides = Readonly<Record<string, string>>;
5
+ export type ThemeStringTokenOverrides = ValueMap<string, string>;
5
6
  /** Partial authored override for one semantic heading recipe. */
6
7
  export interface ThemeTypographyHeadingOverrides {
7
8
  readonly size?: number;
@@ -10,7 +11,7 @@ export interface ThemeTypographyHeadingOverrides {
10
11
  }
11
12
  /** Theme-global typography source overrides. Font installation remains module-owned. */
12
13
  export interface ThemeTypographyTokenOverrides {
13
- readonly headings?: Readonly<Record<string, ThemeTypographyHeadingOverrides>>;
14
+ readonly headings?: ValueMap<string, ThemeTypographyHeadingOverrides>;
14
15
  readonly sizes?: ThemeNumericTokenOverrides;
15
16
  readonly weights?: ThemeStringTokenOverrides;
16
17
  }
@@ -30,7 +31,7 @@ export interface ThemeGlobalTokenOverrides {
30
31
  /** Serializable value supported by the current theme-recipe metadata field kinds. */
31
32
  export type ThemeRecipeOverrideValue = boolean | string;
32
33
  /** Persisted values for one component or pattern recipe. */
33
- export type ThemeRecipeFieldOverrides = Readonly<Record<string, ThemeRecipeOverrideValue>>;
34
+ export type ThemeRecipeFieldOverrides = ValueMap<string, ThemeRecipeOverrideValue>;
34
35
  /**
35
36
  * Generic persisted recipe values.
36
37
  *
@@ -38,7 +39,7 @@ export type ThemeRecipeFieldOverrides = Readonly<Record<string, ThemeRecipeOverr
38
39
  * relationships. Contracts stores selected values only and does not duplicate that metadata.
39
40
  */
40
41
  export interface ThemeRecipeOverrides {
41
- readonly components?: Readonly<Record<string, ThemeRecipeFieldOverrides>>;
42
- readonly patterns?: Readonly<Record<string, ThemeRecipeFieldOverrides>>;
42
+ readonly components?: ValueMap<string, ThemeRecipeFieldOverrides>;
43
+ readonly patterns?: ValueMap<string, ThemeRecipeFieldOverrides>;
43
44
  }
44
45
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CA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MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;CACjE"}
package/dist/theme.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"","sourcesContent":["/** Numeric token values authored at theme level. */\nexport type ThemeNumericTokenOverrides = Readonly<Record<string, number>>;\n\n/** String token values authored at theme level. */\nexport type ThemeStringTokenOverrides = Readonly<Record<string, string>>;\n\n/** Partial authored override for one semantic heading recipe. */\nexport interface ThemeTypographyHeadingOverrides {\n readonly size?: number;\n readonly lineHeight?: number;\n readonly weight?: string;\n}\n\n/** Theme-global typography source overrides. Font installation remains module-owned. */\nexport interface ThemeTypographyTokenOverrides {\n readonly headings?: Readonly<Record<string, ThemeTypographyHeadingOverrides>>;\n readonly sizes?: ThemeNumericTokenOverrides;\n readonly weights?: ThemeStringTokenOverrides;\n}\n\n/**\n * Theme-global authored token overrides.\n *\n * Color source remains mode-specific on ThemeModeConfig. These values are shared by\n * light and dark mode and are resolved by the render-theme owner rather than copied\n * into every mode branch.\n */\nexport interface ThemeGlobalTokenOverrides {\n readonly spacing?: ThemeNumericTokenOverrides;\n readonly radii?: ThemeNumericTokenOverrides;\n readonly typography?: ThemeTypographyTokenOverrides;\n readonly shadows?: ThemeNumericTokenOverrides;\n}\n\n/** Serializable value supported by the current theme-recipe metadata field kinds. */\nexport type ThemeRecipeOverrideValue = boolean | string;\n\n/** Persisted values for one component or pattern recipe. */\nexport type ThemeRecipeFieldOverrides = Readonly<Record<string, ThemeRecipeOverrideValue>>;\n\n/**\n * Generic persisted recipe values.\n *\n * The owning UI package defines available recipes, field schemas, defaults and token\n * relationships. Contracts stores selected values only and does not duplicate that metadata.\n */\nexport interface ThemeRecipeOverrides {\n readonly components?: Readonly<Record<string, ThemeRecipeFieldOverrides>>;\n readonly patterns?: Readonly<Record<string, ThemeRecipeFieldOverrides>>;\n}\n"]}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"","sourcesContent":["import type { ValueMap } from './collections';\n\n/** Numeric token values authored at theme level. */\nexport type ThemeNumericTokenOverrides = ValueMap<string, number>;\n\n/** String token values authored at theme level. */\nexport type ThemeStringTokenOverrides = ValueMap<string, string>;\n\n/** Partial authored override for one semantic heading recipe. */\nexport interface ThemeTypographyHeadingOverrides {\n readonly size?: number;\n readonly lineHeight?: number;\n readonly weight?: string;\n}\n\n/** Theme-global typography source overrides. Font installation remains module-owned. */\nexport interface ThemeTypographyTokenOverrides {\n readonly headings?: ValueMap<string, ThemeTypographyHeadingOverrides>;\n readonly sizes?: ThemeNumericTokenOverrides;\n readonly weights?: ThemeStringTokenOverrides;\n}\n\n/**\n * Theme-global authored token overrides.\n *\n * Color source remains mode-specific on ThemeModeConfig. These values are shared by\n * light and dark mode and are resolved by the render-theme owner rather than copied\n * into every mode branch.\n */\nexport interface ThemeGlobalTokenOverrides {\n readonly spacing?: ThemeNumericTokenOverrides;\n readonly radii?: ThemeNumericTokenOverrides;\n readonly typography?: ThemeTypographyTokenOverrides;\n readonly shadows?: ThemeNumericTokenOverrides;\n}\n\n/** Serializable value supported by the current theme-recipe metadata field kinds. */\nexport type ThemeRecipeOverrideValue = boolean | string;\n\n/** Persisted values for one component or pattern recipe. */\nexport type ThemeRecipeFieldOverrides = ValueMap<string, ThemeRecipeOverrideValue>;\n\n/**\n * Generic persisted recipe values.\n *\n * The owning UI package defines available recipes, field schemas, defaults and token\n * relationships. Contracts stores selected values only and does not duplicate that metadata.\n */\nexport interface ThemeRecipeOverrides {\n readonly components?: ValueMap<string, ThemeRecipeFieldOverrides>;\n readonly patterns?: ValueMap<string, ThemeRecipeFieldOverrides>;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { AuthFlowConfig, AuthOAuthConfig } from '../auth';
2
- import type { SerializableSet } from '../collections';
2
+ import type { EntityRegistry, SerializableSet, ValueMap } from '../collections';
3
3
  import type { ApiDefinitionRegistry, DataContractValue } from '../data';
4
4
  import type { AppEnvironmentId } from '../environments';
5
5
  import type { INFRA_ADAPTER_CATALOG, INFRA_RUNTIME_COMPATIBILITY } from '../infra/constants';
@@ -109,7 +109,7 @@ export interface InfraAuthConfigMap {
109
109
  export interface InfraAuthzConfigMap {
110
110
  readonly cerbos: {
111
111
  readonly kind: 'RBAC' | 'ABAC';
112
- readonly policies?: Readonly<Record<string, string>>;
112
+ readonly policies?: ValueMap<string, string>;
113
113
  };
114
114
  }
115
115
  export interface InfraSecretStoreConfigMap {
@@ -170,7 +170,7 @@ export type InfraModuleId = string;
170
170
  export interface InfraModuleSpec {
171
171
  readonly config?: DataContractValue;
172
172
  }
173
- export type InfraModuleRegistry = Readonly<Record<InfraModuleId, InfraModuleSpec>>;
173
+ export type InfraModuleRegistry = EntityRegistry<InfraModuleId, InfraModuleSpec>;
174
174
  export interface InfraManifest {
175
175
  readonly environments: Readonly<Record<'local', InfraEnvironmentSpec> & Partial<Record<Exclude<AppEnvironmentId, 'local'>, InfraEnvironmentSpec>>>;
176
176
  readonly apis?: ApiDefinitionRegistry;
@@ -1 +1 @@
1
- {"version":3,"file":"infraManifest.d.ts","sourceRoot":"","sources":["../../src/types/infraManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAC7F,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