@ankhorage/contracts 11.0.0 → 11.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ankhorage/contracts
2
2
 
3
+ ## 11.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8a62b08: Expose the portable Navigator planning, generation, and custom-registration contracts through the navigator subpath. Group related declarations by topic so Navigator and Studio can consume canonical shared types without depending on another capability's type exports.
8
+
3
9
  ## 11.0.0
4
10
 
5
11
  ### Major Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # CONTRACTS
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v10.1.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v11.1.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
9
9
 
@@ -0,0 +1,23 @@
1
+ import type { CustomNavigatorNode } from '../navigator';
2
+ import type { NavigatorApiStability, NavigatorRuntimePlatform } from './planning';
3
+ export interface CustomNavigatorConfigIssue {
4
+ code: string;
5
+ message: string;
6
+ path?: string;
7
+ }
8
+ export interface CustomNavigatorRegistration {
9
+ readonly id: string;
10
+ readonly platforms: readonly NavigatorRuntimePlatform[];
11
+ readonly stability: NavigatorApiStability;
12
+ readonly integration: 'expo-router-standard';
13
+ readonly router: 'stack' | 'tab';
14
+ readonly module: string;
15
+ readonly exportName: string;
16
+ readonly validateConfig: (config: CustomNavigatorNode['config']) => readonly CustomNavigatorConfigIssue[];
17
+ }
18
+ export type CustomNavigatorRegistry = Readonly<Record<string, CustomNavigatorRegistration>> & {
19
+ readonly [CUSTOM_NAVIGATOR_REGISTRY]: true;
20
+ };
21
+ declare const CUSTOM_NAVIGATOR_REGISTRY: unique symbol;
22
+ export {};
23
+ //# sourceMappingURL=extensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/navigator/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAClF,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACxD,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,EAAE,CACvB,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,KAClC,SAAS,0BAA0B,EAAE,CAAC;CAC5C;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC,GAAG;IAC5F,QAAQ,CAAC,CAAC,yBAAyB,CAAC,EAAE,IAAI,CAAC;CAC5C,CAAC;AAEF,OAAO,CAAC,MAAM,yBAAyB,EAAE,OAAO,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../src/navigator/extensions.ts"],"names":[],"mappings":"","sourcesContent":["import type { CustomNavigatorNode } from '../navigator';\nimport type { NavigatorApiStability, NavigatorRuntimePlatform } from './planning';\nexport interface CustomNavigatorConfigIssue {\n code: string;\n message: string;\n path?: string;\n}\n\nexport interface CustomNavigatorRegistration {\n readonly id: string;\n readonly platforms: readonly NavigatorRuntimePlatform[];\n readonly stability: NavigatorApiStability;\n readonly integration: 'expo-router-standard';\n readonly router: 'stack' | 'tab';\n readonly module: string;\n readonly exportName: string;\n readonly validateConfig: (\n config: CustomNavigatorNode['config'],\n ) => readonly CustomNavigatorConfigIssue[];\n}\n\nexport type CustomNavigatorRegistry = Readonly<Record<string, CustomNavigatorRegistration>> & {\n readonly [CUSTOM_NAVIGATOR_REGISTRY]: true;\n};\n\ndeclare const CUSTOM_NAVIGATOR_REGISTRY: unique symbol;\n"]}
@@ -0,0 +1,26 @@
1
+ export interface NavigatorGeneratedFile {
2
+ path: string;
3
+ contents: string;
4
+ }
5
+ export interface NavigatorGenerationBindings {
6
+ screens: Readonly<Record<string, NavigatorScreenModule>>;
7
+ guards: Readonly<Record<string, NavigatorScreenModule>>;
8
+ iconSourceResolver?: NavigatorScreenModule;
9
+ flows?: {
10
+ onboardingRoute?: string;
11
+ authenticationRoute?: string;
12
+ };
13
+ tabPresentations?: Readonly<Record<string, NavigatorScreenModule>>;
14
+ }
15
+ /** Options for placing Navigator-owned files inside a consumer-owned Expo Router app shell. */
16
+ export interface NavigatorGenerationOptions {
17
+ /** Directory that receives the root navigator layout. Must be `src/app` or one of its safe descendants. */
18
+ rootDirectory?: string;
19
+ /** Emit routed screen re-export modules in addition to layouts. Defaults to true. */
20
+ includeScreenFiles?: boolean;
21
+ }
22
+ export interface NavigatorScreenModule {
23
+ module: string;
24
+ exportName: string;
25
+ }
26
+ //# sourceMappingURL=generation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation.d.ts","sourceRoot":"","sources":["../../src/navigator/generation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACzD,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxD,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;IAC3C,KAAK,CAAC,EAAE;QACN,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;CACpE;AAED,+FAA+F;AAC/F,MAAM,WAAW,0BAA0B;IACzC,2GAA2G;IAC3G,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=generation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation.js","sourceRoot":"","sources":["../../src/navigator/generation.ts"],"names":[],"mappings":"","sourcesContent":["export interface NavigatorGeneratedFile {\n path: string;\n contents: string;\n}\n\nexport interface NavigatorGenerationBindings {\n screens: Readonly<Record<string, NavigatorScreenModule>>;\n guards: Readonly<Record<string, NavigatorScreenModule>>;\n iconSourceResolver?: NavigatorScreenModule;\n flows?: {\n onboardingRoute?: string;\n authenticationRoute?: string;\n };\n tabPresentations?: Readonly<Record<string, NavigatorScreenModule>>;\n}\n\n/** Options for placing Navigator-owned files inside a consumer-owned Expo Router app shell. */\nexport interface NavigatorGenerationOptions {\n /** Directory that receives the root navigator layout. Must be `src/app` or one of its safe descendants. */\n rootDirectory?: string;\n /** Emit routed screen re-export modules in addition to layouts. Defaults to true. */\n includeScreenFiles?: boolean;\n}\n\nexport interface NavigatorScreenModule {\n module: string;\n exportName: string;\n}\n"]}
@@ -0,0 +1,105 @@
1
+ import type { CustomNavigatorNode, DrawerNavigatorOptions, NavigatorType, RouteDefinition, StackImplementation, StackScreenOptions } from '../navigator';
2
+ import type { CustomNavigatorRegistry } from './extensions';
3
+ export interface ResolvedCustomTabsPresentation {
4
+ presentation: ResolvedTabsPresentation;
5
+ customPresentationId?: string;
6
+ }
7
+ export type ResolvedTabsImplementation = 'custom' | 'javascript' | 'native';
8
+ export type ResolvedTabsPresentation = 'bottom' | 'top' | 'rail' | 'sidebar' | 'custom';
9
+ /**
10
+ * Disposable adapter plan for a `tabs` topology.
11
+ *
12
+ * The implementation selects the Router runtime. Presentation only selects its visual chrome and
13
+ * never creates another route topology.
14
+ */
15
+ export interface TabsNavigatorPlan {
16
+ implementation: ResolvedTabsImplementation;
17
+ module: ExpoRouterNavigatorModule;
18
+ exportName: string;
19
+ stability: NavigatorApiStability;
20
+ presentation?: ResolvedTabsPresentation;
21
+ presentations?: Readonly<Record<NavigatorResponsiveSize, ResolvedTabsPresentation>>;
22
+ customPresentationId?: string;
23
+ minimizeBehavior?: 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';
24
+ bottomAccessoryScreenId?: string;
25
+ }
26
+ export interface CreateNavigatorPlanOptions {
27
+ platform: NavigatorRuntimePlatform;
28
+ expoRouterVersion: string;
29
+ responsiveSize?: NavigatorResponsiveSize;
30
+ customNavigators?: CustomNavigatorRegistry;
31
+ }
32
+ export type ExpoRouterNavigatorModule = 'expo-router' | 'expo-router/drawer' | 'expo-router/js-stack' | 'expo-router/js-tabs' | 'expo-router/js-top-tabs' | 'expo-router/ui' | 'expo-router/unstable-split-view' | 'expo-router/unstable-native-tabs';
33
+ export type NavigatorAdapterId = 'slot' | 'stack.native' | 'stack.javascript' | 'stack.experimental' | 'drawer' | 'tabs.native' | 'tabs.javascript' | 'tabs.custom' | 'split-view' | 'custom';
34
+ export interface NavigatorAdapterPlan {
35
+ id: NavigatorAdapterId;
36
+ /** Built-in Expo Router entry point or an explicitly registered custom module. */
37
+ module?: string;
38
+ exportName?: string;
39
+ support: NavigatorSupportStatus;
40
+ stability: NavigatorApiStability;
41
+ limitations: readonly string[];
42
+ }
43
+ export type NavigatorApiStability = 'stable' | 'alpha';
44
+ export interface NavigatorDiagnostic {
45
+ code: string;
46
+ severity: 'error' | 'warning';
47
+ path: string;
48
+ message: string;
49
+ }
50
+ export interface NavigatorNodePlan {
51
+ type: NavigatorType;
52
+ pointer: string;
53
+ adapter: NavigatorAdapterPlan;
54
+ initialRouteName?: string;
55
+ routes: readonly NavigatorRoutePlan[];
56
+ stack?: {
57
+ implementation: StackImplementation;
58
+ options?: StackScreenOptions;
59
+ };
60
+ drawer?: {
61
+ options?: DrawerNavigatorOptions;
62
+ };
63
+ tabs?: TabsNavigatorPlan;
64
+ splitView?: {
65
+ columns: {
66
+ primary: string;
67
+ supplementary?: string;
68
+ };
69
+ inspector?: string;
70
+ topColumnForCollapsing?: 'primary' | 'secondary' | 'supplementary';
71
+ };
72
+ custom?: {
73
+ navigatorId: string;
74
+ config?: CustomNavigatorNode['config'];
75
+ };
76
+ }
77
+ export interface NavigatorPlan {
78
+ context: NavigatorValidationContext;
79
+ root: NavigatorNodePlan;
80
+ diagnostics: readonly NavigatorDiagnostic[];
81
+ supported: boolean;
82
+ flows: {
83
+ onboarding: boolean;
84
+ authentication: boolean;
85
+ };
86
+ }
87
+ export type NavigatorResponsiveSize = 'compact' | 'medium' | 'expanded';
88
+ export interface NavigatorRoutePlan {
89
+ name: string;
90
+ path?: string;
91
+ label?: string;
92
+ icon?: RouteDefinition['icon'];
93
+ showInPrimaryNavigation?: boolean;
94
+ guards: readonly string[];
95
+ screenId?: string;
96
+ stackOptions?: StackScreenOptions;
97
+ navigator?: NavigatorNodePlan;
98
+ }
99
+ export type NavigatorRuntimePlatform = 'android' | 'ios' | 'web';
100
+ export type NavigatorSupportStatus = 'supported' | 'unavailable';
101
+ export interface NavigatorValidationContext {
102
+ platform: NavigatorRuntimePlatform;
103
+ expoRouterVersion: string;
104
+ }
105
+ //# sourceMappingURL=planning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../src/navigator/planning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,WAAW,8BAA8B;IAC7C,YAAY,EAAE,wBAAwB,CAAC;IACvC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE5E,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExF;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,0BAA0B,CAAC;IAC3C,MAAM,EAAE,yBAAyB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,E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d,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAEjE,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,aAAa,CAAC;AAEjE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,wBAAwB,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=planning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planning.js","sourceRoot":"","sources":["../../src/navigator/planning.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n CustomNavigatorNode,\n DrawerNavigatorOptions,\n NavigatorType,\n RouteDefinition,\n StackImplementation,\n StackScreenOptions,\n} from '../navigator';\nimport type { CustomNavigatorRegistry } from './extensions';\n\nexport interface ResolvedCustomTabsPresentation {\n presentation: ResolvedTabsPresentation;\n customPresentationId?: string;\n}\n\nexport type ResolvedTabsImplementation = 'custom' | 'javascript' | 'native';\n\nexport type ResolvedTabsPresentation = 'bottom' | 'top' | 'rail' | 'sidebar' | 'custom';\n\n/**\n * Disposable adapter plan for a `tabs` topology.\n *\n * The implementation selects the Router runtime. Presentation only selects its visual chrome and\n * never creates another route topology.\n */\nexport interface TabsNavigatorPlan {\n implementation: ResolvedTabsImplementation;\n module: ExpoRouterNavigatorModule;\n exportName: string;\n stability: NavigatorApiStability;\n presentation?: ResolvedTabsPresentation;\n presentations?: Readonly<Record<NavigatorResponsiveSize, ResolvedTabsPresentation>>;\n customPresentationId?: string;\n minimizeBehavior?: 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';\n bottomAccessoryScreenId?: string;\n}\n\nexport interface CreateNavigatorPlanOptions {\n platform: NavigatorRuntimePlatform;\n expoRouterVersion: string;\n responsiveSize?: NavigatorResponsiveSize;\n customNavigators?: CustomNavigatorRegistry;\n}\n\nexport type ExpoRouterNavigatorModule =\n | 'expo-router'\n | 'expo-router/drawer'\n | 'expo-router/js-stack'\n | 'expo-router/js-tabs'\n | 'expo-router/js-top-tabs'\n | 'expo-router/ui'\n | 'expo-router/unstable-split-view'\n | 'expo-router/unstable-native-tabs';\n\nexport type NavigatorAdapterId =\n | 'slot'\n | 'stack.native'\n | 'stack.javascript'\n | 'stack.experimental'\n | 'drawer'\n | 'tabs.native'\n | 'tabs.javascript'\n | 'tabs.custom'\n | 'split-view'\n | 'custom';\n\nexport interface NavigatorAdapterPlan {\n id: NavigatorAdapterId;\n /** Built-in Expo Router entry point or an explicitly registered custom module. */\n module?: string;\n exportName?: string;\n support: NavigatorSupportStatus;\n stability: NavigatorApiStability;\n limitations: readonly string[];\n}\n\nexport type NavigatorApiStability = 'stable' | 'alpha';\n\nexport interface NavigatorDiagnostic {\n code: string;\n severity: 'error' | 'warning';\n path: string;\n message: string;\n}\n\nexport interface NavigatorNodePlan {\n type: NavigatorType;\n pointer: string;\n adapter: NavigatorAdapterPlan;\n initialRouteName?: string;\n routes: readonly NavigatorRoutePlan[];\n stack?: {\n implementation: StackImplementation;\n options?: StackScreenOptions;\n };\n drawer?: {\n options?: DrawerNavigatorOptions;\n };\n tabs?: TabsNavigatorPlan;\n splitView?: {\n columns: {\n primary: string;\n supplementary?: string;\n };\n inspector?: string;\n topColumnForCollapsing?: 'primary' | 'secondary' | 'supplementary';\n };\n custom?: {\n navigatorId: string;\n config?: CustomNavigatorNode['config'];\n };\n}\n\nexport interface NavigatorPlan {\n context: NavigatorValidationContext;\n root: NavigatorNodePlan;\n diagnostics: readonly NavigatorDiagnostic[];\n supported: boolean;\n flows: {\n onboarding: boolean;\n authentication: boolean;\n };\n}\n\nexport type NavigatorResponsiveSize = 'compact' | 'medium' | 'expanded';\n\nexport interface NavigatorRoutePlan {\n name: string;\n path?: string;\n label?: string;\n icon?: RouteDefinition['icon'];\n showInPrimaryNavigation?: boolean;\n guards: readonly string[];\n screenId?: string;\n stackOptions?: StackScreenOptions;\n navigator?: NavigatorNodePlan;\n}\n\nexport type NavigatorRuntimePlatform = 'android' | 'ios' | 'web';\n\nexport type NavigatorSupportStatus = 'supported' | 'unavailable';\n\nexport interface NavigatorValidationContext {\n platform: NavigatorRuntimePlatform;\n expoRouterVersion: string;\n}\n"]}
@@ -179,5 +179,7 @@ export type AppNavigatorManifest = NavigatorNode & {
179
179
  defaults?: NavigatorDefaults;
180
180
  platforms?: NavigatorPlatforms;
181
181
  };
182
- export {};
182
+ export type { CustomNavigatorConfigIssue, CustomNavigatorRegistration, CustomNavigatorRegistry, } from './navigator/extensions';
183
+ export type { NavigatorGeneratedFile, NavigatorGenerationBindings, NavigatorGenerationOptions, NavigatorScreenModule, } from './navigator/generation';
184
+ export type { CreateNavigatorPlanOptions, ExpoRouterNavigatorModule, NavigatorAdapterId, NavigatorAdapterPlan, NavigatorApiStability, NavigatorDiagnostic, NavigatorNodePlan, NavigatorPlan, NavigatorResponsiveSize, NavigatorRoutePlan, NavigatorRuntimePlatform, NavigatorSupportStatus, NavigatorValidationContext, ResolvedCustomTabsPresentation, ResolvedTabsImplementation, ResolvedTabsPresentation, TabsNavigatorPlan, } from './navigator/planning';
183
185
  //# sourceMappingURL=navigator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigator.d.ts","sourceRoot":"","sources":["../src/navigator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,eAAe,sEAAuE,CAAC;AACpG,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,e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,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAG7F,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,GAAG,+BAA+B;IAClC,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 { IconSpec, ManifestValue } from './types';\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 'drawer',\n 'drawer-stack',\n 'drawer-tabs',\n 'drawer-tabs-stack',\n 'root-stack-tabs',\n 'root-stack-tabs-stack',\n 'root-stack-drawer',\n 'root-stack-drawer-stack',\n 'root-stack-drawer-tabs',\n 'root-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_CUSTOM_TABS_PRESENTATIONS = ['bottom', 'top', 'rail', 'sidebar'] as const;\nexport type FixedCustomTabsPresentation = (typeof FIXED_CUSTOM_TABS_PRESENTATIONS)[number];\n\nexport const CUSTOM_TABS_PRESENTATIONS = [\n ...FIXED_CUSTOM_TABS_PRESENTATIONS,\n 'responsive',\n 'custom',\n] as const;\nexport type CustomTabsPresentation = (typeof CUSTOM_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: FixedCustomTabsPresentation;\n medium?: FixedCustomTabsPresentation;\n expanded: FixedCustomTabsPresentation;\n}\n\nexport type CustomTabsPresentationConfig =\n | {\n presentation: FixedCustomTabsPresentation;\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 CustomTabsConfig = {\n implementation: 'custom';\n} & CustomTabsPresentationConfig;\n\nexport type CustomTabsWebConfig = CustomTabsPresentationConfig;\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 custom tabs. */\n web?: CustomTabsWebConfig;\n}\n\nexport type TabsImplementationConfig =\n AdaptiveTabsConfig | CustomTabsConfig | 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 NavigatorFlows {\n onboarding?: boolean;\n authentication?: boolean;\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 flows?: NavigatorFlows;\n defaults?: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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 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 'drawer',\n 'drawer-stack',\n 'drawer-tabs',\n 'drawer-tabs-stack',\n 'root-stack-tabs',\n 'root-stack-tabs-stack',\n 'root-stack-drawer',\n 'root-stack-drawer-stack',\n 'root-stack-drawer-tabs',\n 'root-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_CUSTOM_TABS_PRESENTATIONS = ['bottom', 'top', 'rail', 'sidebar'] as const;\nexport type FixedCustomTabsPresentation = (typeof FIXED_CUSTOM_TABS_PRESENTATIONS)[number];\n\nexport const CUSTOM_TABS_PRESENTATIONS = [\n ...FIXED_CUSTOM_TABS_PRESENTATIONS,\n 'responsive',\n 'custom',\n] as const;\nexport type CustomTabsPresentation = (typeof CUSTOM_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: FixedCustomTabsPresentation;\n medium?: FixedCustomTabsPresentation;\n expanded: FixedCustomTabsPresentation;\n}\n\nexport type CustomTabsPresentationConfig =\n | {\n presentation: FixedCustomTabsPresentation;\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 CustomTabsConfig = {\n implementation: 'custom';\n} & CustomTabsPresentationConfig;\n\nexport type CustomTabsWebConfig = CustomTabsPresentationConfig;\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 custom tabs. */\n web?: CustomTabsWebConfig;\n}\n\nexport type TabsImplementationConfig =\n AdaptiveTabsConfig | CustomTabsConfig | 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 NavigatorFlows {\n onboarding?: boolean;\n authentication?: boolean;\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 flows?: NavigatorFlows;\n defaults?: NavigatorDefaults;\n platforms?: NavigatorPlatforms;\n};\n\nexport type {\n CustomNavigatorConfigIssue,\n CustomNavigatorRegistration,\n CustomNavigatorRegistry,\n} from './navigator/extensions';\nexport type {\n NavigatorGeneratedFile,\n NavigatorGenerationBindings,\n NavigatorGenerationOptions,\n NavigatorScreenModule,\n} from './navigator/generation';\nexport type {\n CreateNavigatorPlanOptions,\n ExpoRouterNavigatorModule,\n NavigatorAdapterId,\n NavigatorAdapterPlan,\n NavigatorApiStability,\n NavigatorDiagnostic,\n NavigatorNodePlan,\n NavigatorPlan,\n NavigatorResponsiveSize,\n NavigatorRoutePlan,\n NavigatorRuntimePlatform,\n NavigatorSupportStatus,\n NavigatorValidationContext,\n ResolvedCustomTabsPresentation,\n ResolvedTabsImplementation,\n ResolvedTabsPresentation,\n TabsNavigatorPlan,\n} from './navigator/planning';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/contracts",
3
- "version": "11.0.0",
3
+ "version": "11.1.0",
4
4
  "main": "./dist/index.js",
5
5
  "ankh": {
6
6
  "category": "contracts",
@@ -13,9 +13,9 @@
13
13
  "@ankhorage/color-theory": "^0.3.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@ankhorage/devtools": "^1.10.9",
16
+ "@ankhorage/devtools": "^1.11.11",
17
17
  "@ankhorage/paradox": "^0.1.24",
18
- "@types/bun": "^1.4.0",
18
+ "@types/bun": "^1.4.1",
19
19
  "@types/node": "^25.2.3",
20
20
  "typescript": "^5.9.3"
21
21
  },
@@ -104,7 +104,7 @@
104
104
  "CHANGELOG.md",
105
105
  "LICENSE"
106
106
  ],
107
- "packageManager": "bun@1.4.0",
107
+ "packageManager": "bun@1.4.2",
108
108
  "repository": {
109
109
  "type": "git",
110
110
  "url": "git+https://github.com/ankhorage/contracts.git"
@@ -0,0 +1,26 @@
1
+ import type { CustomNavigatorNode } from '../navigator';
2
+ import type { NavigatorApiStability, NavigatorRuntimePlatform } from './planning';
3
+ export interface CustomNavigatorConfigIssue {
4
+ code: string;
5
+ message: string;
6
+ path?: string;
7
+ }
8
+
9
+ export interface CustomNavigatorRegistration {
10
+ readonly id: string;
11
+ readonly platforms: readonly NavigatorRuntimePlatform[];
12
+ readonly stability: NavigatorApiStability;
13
+ readonly integration: 'expo-router-standard';
14
+ readonly router: 'stack' | 'tab';
15
+ readonly module: string;
16
+ readonly exportName: string;
17
+ readonly validateConfig: (
18
+ config: CustomNavigatorNode['config'],
19
+ ) => readonly CustomNavigatorConfigIssue[];
20
+ }
21
+
22
+ export type CustomNavigatorRegistry = Readonly<Record<string, CustomNavigatorRegistration>> & {
23
+ readonly [CUSTOM_NAVIGATOR_REGISTRY]: true;
24
+ };
25
+
26
+ declare const CUSTOM_NAVIGATOR_REGISTRY: unique symbol;
@@ -0,0 +1,28 @@
1
+ export interface NavigatorGeneratedFile {
2
+ path: string;
3
+ contents: string;
4
+ }
5
+
6
+ export interface NavigatorGenerationBindings {
7
+ screens: Readonly<Record<string, NavigatorScreenModule>>;
8
+ guards: Readonly<Record<string, NavigatorScreenModule>>;
9
+ iconSourceResolver?: NavigatorScreenModule;
10
+ flows?: {
11
+ onboardingRoute?: string;
12
+ authenticationRoute?: string;
13
+ };
14
+ tabPresentations?: Readonly<Record<string, NavigatorScreenModule>>;
15
+ }
16
+
17
+ /** Options for placing Navigator-owned files inside a consumer-owned Expo Router app shell. */
18
+ export interface NavigatorGenerationOptions {
19
+ /** Directory that receives the root navigator layout. Must be `src/app` or one of its safe descendants. */
20
+ rootDirectory?: string;
21
+ /** Emit routed screen re-export modules in addition to layouts. Defaults to true. */
22
+ includeScreenFiles?: boolean;
23
+ }
24
+
25
+ export interface NavigatorScreenModule {
26
+ module: string;
27
+ exportName: string;
28
+ }
@@ -0,0 +1,146 @@
1
+ import type {
2
+ CustomNavigatorNode,
3
+ DrawerNavigatorOptions,
4
+ NavigatorType,
5
+ RouteDefinition,
6
+ StackImplementation,
7
+ StackScreenOptions,
8
+ } from '../navigator';
9
+ import type { CustomNavigatorRegistry } from './extensions';
10
+
11
+ export interface ResolvedCustomTabsPresentation {
12
+ presentation: ResolvedTabsPresentation;
13
+ customPresentationId?: string;
14
+ }
15
+
16
+ export type ResolvedTabsImplementation = 'custom' | 'javascript' | 'native';
17
+
18
+ export type ResolvedTabsPresentation = 'bottom' | 'top' | 'rail' | 'sidebar' | 'custom';
19
+
20
+ /**
21
+ * Disposable adapter plan for a `tabs` topology.
22
+ *
23
+ * The implementation selects the Router runtime. Presentation only selects its visual chrome and
24
+ * never creates another route topology.
25
+ */
26
+ export interface TabsNavigatorPlan {
27
+ implementation: ResolvedTabsImplementation;
28
+ module: ExpoRouterNavigatorModule;
29
+ exportName: string;
30
+ stability: NavigatorApiStability;
31
+ presentation?: ResolvedTabsPresentation;
32
+ presentations?: Readonly<Record<NavigatorResponsiveSize, ResolvedTabsPresentation>>;
33
+ customPresentationId?: string;
34
+ minimizeBehavior?: 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';
35
+ bottomAccessoryScreenId?: string;
36
+ }
37
+
38
+ export interface CreateNavigatorPlanOptions {
39
+ platform: NavigatorRuntimePlatform;
40
+ expoRouterVersion: string;
41
+ responsiveSize?: NavigatorResponsiveSize;
42
+ customNavigators?: CustomNavigatorRegistry;
43
+ }
44
+
45
+ export type ExpoRouterNavigatorModule =
46
+ | 'expo-router'
47
+ | 'expo-router/drawer'
48
+ | 'expo-router/js-stack'
49
+ | 'expo-router/js-tabs'
50
+ | 'expo-router/js-top-tabs'
51
+ | 'expo-router/ui'
52
+ | 'expo-router/unstable-split-view'
53
+ | 'expo-router/unstable-native-tabs';
54
+
55
+ export type NavigatorAdapterId =
56
+ | 'slot'
57
+ | 'stack.native'
58
+ | 'stack.javascript'
59
+ | 'stack.experimental'
60
+ | 'drawer'
61
+ | 'tabs.native'
62
+ | 'tabs.javascript'
63
+ | 'tabs.custom'
64
+ | 'split-view'
65
+ | 'custom';
66
+
67
+ export interface NavigatorAdapterPlan {
68
+ id: NavigatorAdapterId;
69
+ /** Built-in Expo Router entry point or an explicitly registered custom module. */
70
+ module?: string;
71
+ exportName?: string;
72
+ support: NavigatorSupportStatus;
73
+ stability: NavigatorApiStability;
74
+ limitations: readonly string[];
75
+ }
76
+
77
+ export type NavigatorApiStability = 'stable' | 'alpha';
78
+
79
+ export interface NavigatorDiagnostic {
80
+ code: string;
81
+ severity: 'error' | 'warning';
82
+ path: string;
83
+ message: string;
84
+ }
85
+
86
+ export interface NavigatorNodePlan {
87
+ type: NavigatorType;
88
+ pointer: string;
89
+ adapter: NavigatorAdapterPlan;
90
+ initialRouteName?: string;
91
+ routes: readonly NavigatorRoutePlan[];
92
+ stack?: {
93
+ implementation: StackImplementation;
94
+ options?: StackScreenOptions;
95
+ };
96
+ drawer?: {
97
+ options?: DrawerNavigatorOptions;
98
+ };
99
+ tabs?: TabsNavigatorPlan;
100
+ splitView?: {
101
+ columns: {
102
+ primary: string;
103
+ supplementary?: string;
104
+ };
105
+ inspector?: string;
106
+ topColumnForCollapsing?: 'primary' | 'secondary' | 'supplementary';
107
+ };
108
+ custom?: {
109
+ navigatorId: string;
110
+ config?: CustomNavigatorNode['config'];
111
+ };
112
+ }
113
+
114
+ export interface NavigatorPlan {
115
+ context: NavigatorValidationContext;
116
+ root: NavigatorNodePlan;
117
+ diagnostics: readonly NavigatorDiagnostic[];
118
+ supported: boolean;
119
+ flows: {
120
+ onboarding: boolean;
121
+ authentication: boolean;
122
+ };
123
+ }
124
+
125
+ export type NavigatorResponsiveSize = 'compact' | 'medium' | 'expanded';
126
+
127
+ export interface NavigatorRoutePlan {
128
+ name: string;
129
+ path?: string;
130
+ label?: string;
131
+ icon?: RouteDefinition['icon'];
132
+ showInPrimaryNavigation?: boolean;
133
+ guards: readonly string[];
134
+ screenId?: string;
135
+ stackOptions?: StackScreenOptions;
136
+ navigator?: NavigatorNodePlan;
137
+ }
138
+
139
+ export type NavigatorRuntimePlatform = 'android' | 'ios' | 'web';
140
+
141
+ export type NavigatorSupportStatus = 'supported' | 'unavailable';
142
+
143
+ export interface NavigatorValidationContext {
144
+ platform: NavigatorRuntimePlatform;
145
+ expoRouterVersion: string;
146
+ }
@@ -0,0 +1,53 @@
1
+ import { expect, test } from 'bun:test';
2
+
3
+ import type {
4
+ CustomNavigatorRegistration,
5
+ NavigatorGeneratedFile,
6
+ NavigatorGenerationBindings,
7
+ NavigatorPlan,
8
+ } from './navigator';
9
+
10
+ test('keeps generation bindings and plan output portable across package boundaries', () => {
11
+ const bindings: NavigatorGenerationBindings = {
12
+ screens: { home: { module: '@/screens/Home', exportName: 'Home' } },
13
+ guards: {},
14
+ };
15
+ const file: NavigatorGeneratedFile = {
16
+ path: 'src/app/index.tsx',
17
+ contents: 'export default Home;',
18
+ };
19
+ const plan: NavigatorPlan = {
20
+ context: { platform: 'web', expoRouterVersion: '57.0.18' },
21
+ root: {
22
+ type: 'slot',
23
+ pointer: '',
24
+ adapter: {
25
+ id: 'slot',
26
+ module: 'expo-router',
27
+ exportName: 'Slot',
28
+ support: 'supported',
29
+ stability: 'stable',
30
+ limitations: [],
31
+ },
32
+ routes: [],
33
+ },
34
+ diagnostics: [],
35
+ supported: true,
36
+ flows: { onboarding: false, authentication: false },
37
+ };
38
+ expect(JSON.parse(JSON.stringify({ bindings, file, plan }))).toEqual({ bindings, file, plan });
39
+ });
40
+
41
+ test('describes a custom extension without importing Navigator or a UI runtime', () => {
42
+ const registration: CustomNavigatorRegistration = {
43
+ id: 'example',
44
+ platforms: ['web'],
45
+ stability: 'stable',
46
+ integration: 'expo-router-standard',
47
+ router: 'stack',
48
+ module: '@example/navigation',
49
+ exportName: 'ExampleNavigator',
50
+ validateConfig: () => [],
51
+ };
52
+ expect(registration.validateConfig({ mode: 'compact' })).toEqual([]);
53
+ });
package/src/navigator.ts CHANGED
@@ -270,3 +270,34 @@ export type AppNavigatorManifest = NavigatorNode & {
270
270
  defaults?: NavigatorDefaults;
271
271
  platforms?: NavigatorPlatforms;
272
272
  };
273
+
274
+ export type {
275
+ CustomNavigatorConfigIssue,
276
+ CustomNavigatorRegistration,
277
+ CustomNavigatorRegistry,
278
+ } from './navigator/extensions';
279
+ export type {
280
+ NavigatorGeneratedFile,
281
+ NavigatorGenerationBindings,
282
+ NavigatorGenerationOptions,
283
+ NavigatorScreenModule,
284
+ } from './navigator/generation';
285
+ export type {
286
+ CreateNavigatorPlanOptions,
287
+ ExpoRouterNavigatorModule,
288
+ NavigatorAdapterId,
289
+ NavigatorAdapterPlan,
290
+ NavigatorApiStability,
291
+ NavigatorDiagnostic,
292
+ NavigatorNodePlan,
293
+ NavigatorPlan,
294
+ NavigatorResponsiveSize,
295
+ NavigatorRoutePlan,
296
+ NavigatorRuntimePlatform,
297
+ NavigatorSupportStatus,
298
+ NavigatorValidationContext,
299
+ ResolvedCustomTabsPresentation,
300
+ ResolvedTabsImplementation,
301
+ ResolvedTabsPresentation,
302
+ TabsNavigatorPlan,
303
+ } from './navigator/planning';