@ankhorage/navigator 3.0.0 → 3.2.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 +12 -0
- package/README.md +36 -5
- package/dist/cli/commands/examples/generate.d.ts +4 -0
- package/dist/cli/commands/examples/generate.d.ts.map +1 -0
- package/dist/cli/commands/examples/generate.js +36 -0
- package/dist/cli/commands/examples/generate.js.map +1 -0
- package/dist/cli/commands/examples/verify.d.ts +4 -0
- package/dist/cli/commands/examples/verify.d.ts.map +1 -0
- package/dist/cli/commands/examples/verify.js +48 -0
- package/dist/cli/commands/examples/verify.js.map +1 -0
- package/dist/cli/createCliProvider.d.ts +14 -6
- package/dist/cli/createCliProvider.d.ts.map +1 -1
- package/dist/cli/createCliProvider.js +28 -25
- package/dist/cli/createCliProvider.js.map +1 -1
- package/dist/features/catalog/adapters/inbound/getNavigatorExampleCatalog.d.ts +4 -0
- package/dist/features/catalog/adapters/inbound/getNavigatorExampleCatalog.d.ts.map +1 -0
- package/dist/features/catalog/adapters/inbound/getNavigatorExampleCatalog.js +40 -0
- package/dist/features/catalog/adapters/inbound/getNavigatorExampleCatalog.js.map +1 -0
- package/dist/features/catalog/domain/createCoreNavigatorExamples.d.ts +4 -0
- package/dist/features/catalog/domain/createCoreNavigatorExamples.d.ts.map +1 -0
- package/dist/features/catalog/domain/createCoreNavigatorExamples.js +52 -0
- package/dist/features/catalog/domain/createCoreNavigatorExamples.js.map +1 -0
- package/dist/features/catalog/domain/createCustomNavigatorExamples.d.ts +4 -0
- package/dist/features/catalog/domain/createCustomNavigatorExamples.d.ts.map +1 -0
- package/dist/features/catalog/domain/createCustomNavigatorExamples.js +46 -0
- package/dist/features/catalog/domain/createCustomNavigatorExamples.js.map +1 -0
- package/dist/features/catalog/domain/createDrawerNavigatorExamples.d.ts +4 -0
- package/dist/features/catalog/domain/createDrawerNavigatorExamples.d.ts.map +1 -0
- package/dist/features/catalog/domain/createDrawerNavigatorExamples.js +102 -0
- package/dist/features/catalog/domain/createDrawerNavigatorExamples.js.map +1 -0
- package/dist/features/catalog/domain/createExampleScreenRoute.d.ts +11 -0
- package/dist/features/catalog/domain/createExampleScreenRoute.d.ts.map +1 -0
- package/dist/features/catalog/domain/createExampleScreenRoute.js +15 -0
- package/dist/features/catalog/domain/createExampleScreenRoute.js.map +1 -0
- package/dist/features/catalog/domain/createNavigatorCatalog.d.ts.map +1 -1
- package/dist/features/catalog/domain/createNavigatorCatalog.js +7 -68
- package/dist/features/catalog/domain/createNavigatorCatalog.js.map +1 -1
- package/dist/features/catalog/domain/createNavigatorExampleDefinitions.d.ts +4 -0
- package/dist/features/catalog/domain/createNavigatorExampleDefinitions.d.ts.map +1 -0
- package/dist/features/catalog/domain/createNavigatorExampleDefinitions.js +16 -0
- package/dist/features/catalog/domain/createNavigatorExampleDefinitions.js.map +1 -0
- package/dist/features/catalog/domain/createNavigatorPresetCatalog.d.ts +4 -0
- package/dist/features/catalog/domain/createNavigatorPresetCatalog.d.ts.map +1 -0
- package/dist/features/catalog/domain/createNavigatorPresetCatalog.js +68 -0
- package/dist/features/catalog/domain/createNavigatorPresetCatalog.js.map +1 -0
- package/dist/features/catalog/domain/createSplitViewNavigatorExamples.d.ts +4 -0
- package/dist/features/catalog/domain/createSplitViewNavigatorExamples.d.ts.map +1 -0
- package/dist/features/catalog/domain/createSplitViewNavigatorExamples.js +61 -0
- package/dist/features/catalog/domain/createSplitViewNavigatorExamples.js.map +1 -0
- package/dist/features/catalog/domain/createTabsNavigatorExamples.d.ts +4 -0
- package/dist/features/catalog/domain/createTabsNavigatorExamples.d.ts.map +1 -0
- package/dist/features/catalog/domain/createTabsNavigatorExamples.js +102 -0
- package/dist/features/catalog/domain/createTabsNavigatorExamples.js.map +1 -0
- package/dist/features/split-view/adapters/outbound/generateSplitViewLayoutFile.js +2 -1
- package/dist/features/split-view/adapters/outbound/generateSplitViewLayoutFile.js.map +1 -1
- package/dist/features/stack/domain/resolveNavigatorHeaderOwnership.d.ts +26 -0
- package/dist/features/stack/domain/resolveNavigatorHeaderOwnership.d.ts.map +1 -0
- package/dist/features/stack/domain/resolveNavigatorHeaderOwnership.js +56 -0
- package/dist/features/stack/domain/resolveNavigatorHeaderOwnership.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/HeadlessTabsLayout.d.ts.map +1 -1
- package/dist/features/tabs/adapters/inbound/HeadlessTabsLayout.js +17 -4
- package/dist/features/tabs/adapters/inbound/HeadlessTabsLayout.js.map +1 -1
- package/dist/features/tabs/adapters/outbound/generateTabsLayoutFile.js +6 -2
- package/dist/features/tabs/adapters/outbound/generateTabsLayoutFile.js.map +1 -1
- package/dist/navigator.d.ts +5 -0
- package/dist/navigator.d.ts.map +1 -1
- package/dist/navigator.js +4 -0
- package/dist/navigator.js.map +1 -1
- package/dist/types/navigatorExamples.d.ts +40 -0
- package/dist/types/navigatorExamples.d.ts.map +1 -0
- package/dist/types/navigatorExamples.js +2 -0
- package/dist/types/navigatorExamples.js.map +1 -0
- package/dist/utils/createNavigatorExamplePlan.d.ts +5 -0
- package/dist/utils/createNavigatorExamplePlan.d.ts.map +1 -0
- package/dist/utils/createNavigatorExamplePlan.js +15 -0
- package/dist/utils/createNavigatorExamplePlan.js.map +1 -0
- package/dist/utils/createNavigatorExampleScaffold.d.ts +5 -0
- package/dist/utils/createNavigatorExampleScaffold.d.ts.map +1 -0
- package/dist/utils/createNavigatorExampleScaffold.js +170 -0
- package/dist/utils/createNavigatorExampleScaffold.js.map +1 -0
- package/dist/utils/createNavigatorExampleScreenFiles.d.ts +5 -0
- package/dist/utils/createNavigatorExampleScreenFiles.d.ts.map +1 -0
- package/dist/utils/createNavigatorExampleScreenFiles.js +256 -0
- package/dist/utils/createNavigatorExampleScreenFiles.js.map +1 -0
- package/dist/utils/generateNavigator.js +10 -0
- package/dist/utils/generateNavigator.js.map +1 -1
- package/dist/utils/generateNavigatorExamples.d.ts +4 -0
- package/dist/utils/generateNavigatorExamples.d.ts.map +1 -0
- package/dist/utils/generateNavigatorExamples.js +75 -0
- package/dist/utils/generateNavigatorExamples.js.map +1 -0
- package/dist/utils/isNavigatorExampleId.d.ts +4 -0
- package/dist/utils/isNavigatorExampleId.d.ts.map +1 -0
- package/dist/utils/isNavigatorExampleId.js +6 -0
- package/dist/utils/isNavigatorExampleId.js.map +1 -0
- package/dist/utils/renderNavigatorExampleReadme.d.ts +4 -0
- package/dist/utils/renderNavigatorExampleReadme.d.ts.map +1 -0
- package/dist/utils/renderNavigatorExampleReadme.js +42 -0
- package/dist/utils/renderNavigatorExampleReadme.js.map +1 -0
- package/dist/utils/renderNavigatorExamplesIndex.d.ts +4 -0
- package/dist/utils/renderNavigatorExamplesIndex.d.ts.map +1 -0
- package/dist/utils/renderNavigatorExamplesIndex.js +30 -0
- package/dist/utils/renderNavigatorExamplesIndex.js.map +1 -0
- package/dist/utils/resolveNavigatorDependencies.js +51 -28
- package/dist/utils/resolveNavigatorDependencies.js.map +1 -1
- package/dist/utils/verifyNavigatorExamplesAsync.d.ts +4 -0
- package/dist/utils/verifyNavigatorExamplesAsync.d.ts.map +1 -0
- package/dist/utils/verifyNavigatorExamplesAsync.js +64 -0
- package/dist/utils/verifyNavigatorExamplesAsync.js.map +1 -0
- package/package.json +28 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/navigator
|
|
2
2
|
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1c5e0ce: Render themed Headless Tabs surfaces, contain tab-screen overflow, hide unnamed group headers, and expose resolved Navigator header ownership.
|
|
8
|
+
|
|
9
|
+
## 3.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 04eaaa6: Add a public standalone example catalog, CLI generation and verification commands, 22 isolated root Expo apps, and catalog-derived cross-platform acceptance.
|
|
14
|
+
|
|
3
15
|
## 3.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# NAVIGATOR
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Standalone manifest-driven Navigator capability for cataloging, validating, planning, generating, and verifying Expo Router navigation.
|
|
9
9
|
|
|
@@ -49,13 +49,42 @@ requires an explicit target. Custom navigator registries are executable consumer
|
|
|
49
49
|
with `--custom-navigators`; screen, guard, icon-resolver, and custom Tabs-presentation bindings
|
|
50
50
|
remain narrow JSON module/symbol records.
|
|
51
51
|
|
|
52
|
+
Navigator also publishes a deterministic catalog of 22 standalone applications under the
|
|
53
|
+
repository-root `examples/<stable-example-id>/` directories:
|
|
54
|
+
|
|
55
|
+
`drawer`, `drawer-split-view`, `drawer-stack`, `drawer-tabs`, `drawer-tabs-stack`,
|
|
56
|
+
`drawer-tabs-top`, `registered-custom`, `slot`, `split-view-three-column`,
|
|
57
|
+
`split-view-two-column`, `stack`, `stack-drawer`, `stack-drawer-stack`, `stack-drawer-tabs`,
|
|
58
|
+
`stack-drawer-tabs-stack`, `stack-tabs`, `stack-tabs-stack`, `stack-tabs-top`, `tabs`,
|
|
59
|
+
`tabs-bottom-tabs-top`, `tabs-split-view`, and `tabs-stack`.
|
|
60
|
+
|
|
61
|
+
Generate or compare one app with `--id`, or omit it for the complete catalog:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
ankh navigator examples generate --target .
|
|
65
|
+
ankh navigator examples verify --target .
|
|
66
|
+
ankh navigator examples generate --id drawer --target .
|
|
67
|
+
ankh navigator examples verify --id drawer --target . --json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Each example owns its manifest, narrow bindings, package metadata, and lockfile and uses only
|
|
71
|
+
registry dependencies. Repository acceptance extends deterministic CLI verification with fresh
|
|
72
|
+
frozen installs, strict typechecks, the Devtools-managed examples lint configuration, every
|
|
73
|
+
supported or testing-only Expo export target, and browser runtime checks:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
bun run examples:acceptance
|
|
77
|
+
```
|
|
78
|
+
|
|
52
79
|
Capability metadata separates `support`, `stability`, and each verification layer. Experimental
|
|
53
80
|
Stack and iOS Split View are testing-only. A non-iOS Slot fallback is explicitly not Split View.
|
|
54
|
-
|
|
55
|
-
|
|
81
|
+
The checked-in catalog does not turn the existence of a plan into runtime evidence: CI executes
|
|
82
|
+
install, export, and browser acceptance independently. Simulator and physical-device claims stay
|
|
83
|
+
unverified until those native environments record evidence.
|
|
56
84
|
|
|
57
|
-
Studio and future composers read `getNavigatorCatalog()
|
|
58
|
-
this same lifecycle. They do not own a second capability
|
|
85
|
+
Studio and future composers read `getNavigatorCatalog()` and `getNavigatorExampleCatalog()`,
|
|
86
|
+
author `manifest.navigator`, and invoke this same lifecycle. They do not own a second capability
|
|
87
|
+
or examples table.
|
|
59
88
|
|
|
60
89
|
Source: `docs/readme-usage.ts`
|
|
61
90
|
|
|
@@ -70,6 +99,7 @@ import {
|
|
|
70
99
|
createNavigatorPlan,
|
|
71
100
|
generateNavigator,
|
|
72
101
|
getNavigatorCatalog,
|
|
102
|
+
getNavigatorExampleCatalog,
|
|
73
103
|
validateNavigator,
|
|
74
104
|
verifyNavigator,
|
|
75
105
|
} from '@ankhorage/navigator';
|
|
@@ -103,6 +133,7 @@ const verification = verifyNavigator(plan, bindings);
|
|
|
103
133
|
|
|
104
134
|
console.log({
|
|
105
135
|
catalog: getNavigatorCatalog(),
|
|
136
|
+
examples: getNavigatorExampleCatalog(),
|
|
106
137
|
diagnostics,
|
|
107
138
|
plan,
|
|
108
139
|
generation,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NavigatorCliExecution, NavigatorCliRunResult } from '../../../types/navigatorCli';
|
|
2
|
+
/*** Generate one or every standalone example below a root examples directory. */
|
|
3
|
+
export declare function generate(input: NavigatorCliExecution): Promise<NavigatorCliRunResult>;
|
|
4
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/examples/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAShG,iFAAiF;AACjF,wBAAsB,QAAQ,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyB3F"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { assertNavigatorCliOptions } from '../../../utils/assertNavigatorCliOptions';
|
|
2
|
+
import { generateNavigatorExamples } from '../../../utils/generateNavigatorExamples';
|
|
3
|
+
import { isNavigatorExampleId } from '../../../utils/isNavigatorExampleId';
|
|
4
|
+
import { parseNavigatorCliOptions } from '../../../utils/parseNavigatorCliOptions';
|
|
5
|
+
import { reportNavigatorCliResult } from '../../../utils/reportNavigatorCliResult';
|
|
6
|
+
import { writeNavigatorGeneratedFilesAsync } from '../../../utils/writeNavigatorGeneratedFilesAsync';
|
|
7
|
+
/*** Generate one or every standalone example below a root examples directory. */
|
|
8
|
+
export async function generate(input) {
|
|
9
|
+
try {
|
|
10
|
+
const options = parseNavigatorCliOptions(input.argv);
|
|
11
|
+
assertNavigatorCliOptions(options, ['targetDirectory'], ['id', 'targetDirectory']);
|
|
12
|
+
if (options.id !== undefined && !isNavigatorExampleId(options.id)) {
|
|
13
|
+
throw new Error(`Unknown Navigator example ${JSON.stringify(options.id)}.`);
|
|
14
|
+
}
|
|
15
|
+
if (options.targetDirectory === undefined)
|
|
16
|
+
throw new Error('Target directory is required.');
|
|
17
|
+
const result = generateNavigatorExamples(options.id);
|
|
18
|
+
const written = await writeNavigatorGeneratedFilesAsync(options.targetDirectory, input.cwd, result.files);
|
|
19
|
+
return reportNavigatorCliResult(input, options.format, 'navigator.examples.generate', { ...result, written }, [], [`Examples: ${result.examples.length}`, `Written files: ${written.length}`]);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
return reportFailure(input, error);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/*** Report deterministic example-generation input or write failures. */
|
|
26
|
+
function reportFailure(input, error) {
|
|
27
|
+
return reportNavigatorCliResult(input, input.argv.includes('--json') ? 'json' : 'human', 'navigator.examples.generate', null, [
|
|
28
|
+
{
|
|
29
|
+
code: 'invalid-example-input',
|
|
30
|
+
severity: 'error',
|
|
31
|
+
path: '',
|
|
32
|
+
message: error instanceof Error ? error.message : 'Invalid example generation input.',
|
|
33
|
+
},
|
|
34
|
+
], [], true);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/cli/commands/examples/generate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AAErG,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,KAA4B;IACzD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrD,yBAAyB,CAAC,OAAO,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC;QACnF,IAAI,OAAO,CAAC,EAAE,KAAK,SAAS,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;YAClE,MAAM,IA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|
1
|
+
import type { NavigatorCliExecution, NavigatorCliRunResult } from '../../../types/navigatorCli';
|
|
2
|
+
/*** Verify one or every root example against deterministic generation and lockfile ownership. */
|
|
3
|
+
export declare function verify(input: NavigatorCliExecution): Promise<NavigatorCliRunResult>;
|
|
4
|
+
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/examples/verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAQhG,iGAAiG;AACjG,wBAAsB,MAAM,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAsCzF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { assertNavigatorCliOptions } from '../../../utils/assertNavigatorCliOptions';
|
|
2
|
+
import { isNavigatorExampleId } from '../../../utils/isNavigatorExampleId';
|
|
3
|
+
import { parseNavigatorCliOptions } from '../../../utils/parseNavigatorCliOptions';
|
|
4
|
+
import { reportNavigatorCliResult } from '../../../utils/reportNavigatorCliResult';
|
|
5
|
+
import { verifyNavigatorExamplesAsync } from '../../../utils/verifyNavigatorExamplesAsync';
|
|
6
|
+
/*** Verify one or every root example against deterministic generation and lockfile ownership. */
|
|
7
|
+
export async function verify(input) {
|
|
8
|
+
try {
|
|
9
|
+
const options = parseNavigatorCliOptions(input.argv);
|
|
10
|
+
assertNavigatorCliOptions(options, ['targetDirectory'], ['id', 'targetDirectory']);
|
|
11
|
+
if (options.id !== undefined && !isNavigatorExampleId(options.id)) {
|
|
12
|
+
throw new Error(`Unknown Navigator example ${JSON.stringify(options.id)}.`);
|
|
13
|
+
}
|
|
14
|
+
if (options.targetDirectory === undefined)
|
|
15
|
+
throw new Error('Target directory is required.');
|
|
16
|
+
const result = await verifyNavigatorExamplesAsync(options.targetDirectory, input.cwd, options.id);
|
|
17
|
+
const stale = result.examples.filter(({ current }) => !current);
|
|
18
|
+
return reportNavigatorCliResult(input, options.format, 'navigator.examples.verify', result, stale.length === 0
|
|
19
|
+
? []
|
|
20
|
+
: [
|
|
21
|
+
{
|
|
22
|
+
code: 'stale-examples',
|
|
23
|
+
severity: 'error',
|
|
24
|
+
path: '/examples',
|
|
25
|
+
message: `${stale.length} Navigator example(s) are missing or stale.`,
|
|
26
|
+
},
|
|
27
|
+
], [
|
|
28
|
+
`Examples: ${result.examples.length}`,
|
|
29
|
+
`Current: ${result.examples.length - stale.length}`,
|
|
30
|
+
`Stale: ${stale.length}`,
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
return reportFailure(input, error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/*** Report deterministic example-verification input or filesystem failures. */
|
|
38
|
+
function reportFailure(input, error) {
|
|
39
|
+
return reportNavigatorCliResult(input, input.argv.includes('--json') ? 'json' : 'human', 'navigator.examples.verify', null, [
|
|
40
|
+
{
|
|
41
|
+
code: 'invalid-example-input',
|
|
42
|
+
severity: 'error',
|
|
43
|
+
path: '',
|
|
44
|
+
message: error instanceof Error ? error.message : 'Invalid example verification input.',
|
|
45
|
+
},
|
|
46
|
+
], [], true);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/cli/commands/examples/verify.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAE3F,iGAAiG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AAE;YACnD,UAAU,KAAK,CAAC,MAAM,EAAE;SACzB,CACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC;AACH,CAAC;AAED,+EAA+E;AAC/E,SAAS,aAAa,CAAC,KAA4B,EAAE,KAAc;IACjE,OAAO,wBAAwB,CAC7B,KAAK,EACL,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAChD,2BAA2B,EAC3B,IAAI,EACJ;QACE;YACE,IAAI,EAAE,uBAAuB;YAC7B,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,qCAAqC;SACxF;KACF,EACD,EAAE,EACF,IAAI,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
category: string;
|
|
4
|
+
version: string;
|
|
5
|
+
capabilities: ("navigator.catalog" | "navigator.validate" | "navigator.plan" | "navigator.generate" | "navigator.verify" | "navigator.examples.generate" | "navigator.examples.verify")[];
|
|
6
|
+
commands: {
|
|
7
|
+
path: readonly string[];
|
|
8
|
+
capability: `${string}.${string}`;
|
|
9
|
+
summary: string;
|
|
10
|
+
examples: string[];
|
|
11
|
+
}[];
|
|
12
|
+
handlers: {
|
|
6
13
|
readonly path: readonly string[];
|
|
7
14
|
readonly handler: (request: NavigatorCliRequest) => Promise<{
|
|
8
15
|
readonly exitCode: number;
|
|
9
16
|
}>;
|
|
10
17
|
}[];
|
|
11
|
-
}
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
12
20
|
interface NavigatorCliRequest {
|
|
13
21
|
readonly argv: readonly string[];
|
|
14
22
|
readonly context: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCliProvider.d.ts","sourceRoot":"","sources":["../../src/cli/createCliProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createCliProvider.d.ts","sourceRoot":"","sources":["../../src/cli/createCliProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;uBA2EmB,SAAS,MAAM,EAAE;0BACd,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC;YAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;;;AAhE9F,wBA2DiC;AASjC,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAChC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC,CAAC;CACH"}
|
|
@@ -1,54 +1,57 @@
|
|
|
1
1
|
import packageJson from '../../package.json';
|
|
2
2
|
import { catalog } from './commands/catalog';
|
|
3
|
+
import { generate as generateExamples } from './commands/examples/generate';
|
|
4
|
+
import { verify as verifyExamples } from './commands/examples/verify';
|
|
3
5
|
import { generate } from './commands/generate';
|
|
4
6
|
import { plan } from './commands/plan';
|
|
5
7
|
import { validate } from './commands/validate';
|
|
6
8
|
import { verify } from './commands/verify';
|
|
7
|
-
export default
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export default {
|
|
10
|
+
id: packageJson.name,
|
|
11
|
+
category: 'navigator',
|
|
12
|
+
version: packageJson.version,
|
|
13
|
+
capabilities: [
|
|
11
14
|
'navigator.catalog',
|
|
12
15
|
'navigator.validate',
|
|
13
16
|
'navigator.plan',
|
|
14
17
|
'navigator.generate',
|
|
15
18
|
'navigator.verify',
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
'navigator.examples.generate',
|
|
20
|
+
'navigator.examples.verify',
|
|
21
|
+
],
|
|
22
|
+
commands: [
|
|
18
23
|
descriptor('catalog', 'navigator.catalog', 'List or inspect Navigator capabilities and presets'),
|
|
19
24
|
descriptor('validate', 'navigator.validate', 'Validate a manifest and narrow bindings without writes'),
|
|
20
25
|
descriptor('plan', 'navigator.plan', 'Resolve a deterministic plan and dependency requirements'),
|
|
21
26
|
descriptor('generate', 'navigator.generate', 'Generate Navigator files into an explicit target'),
|
|
22
27
|
descriptor('verify', 'navigator.verify', 'Verify structural and deterministic generation evidence'),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
],
|
|
37
|
-
};
|
|
38
|
-
}
|
|
28
|
+
descriptor(['examples', 'generate'], 'navigator.examples.generate', 'Generate one or every standalone Navigator example'),
|
|
29
|
+
descriptor(['examples', 'verify'], 'navigator.examples.verify', 'Verify generated examples and app-owned lockfiles'),
|
|
30
|
+
],
|
|
31
|
+
handlers: [
|
|
32
|
+
binding('catalog', catalog),
|
|
33
|
+
binding('validate', validate),
|
|
34
|
+
binding('plan', plan),
|
|
35
|
+
binding('generate', generate),
|
|
36
|
+
binding('verify', verify),
|
|
37
|
+
binding(['examples', 'generate'], generateExamples),
|
|
38
|
+
binding(['examples', 'verify'], verifyExamples),
|
|
39
|
+
],
|
|
40
|
+
};
|
|
39
41
|
/*** Define one public command descriptor from its package-owned capability. */
|
|
40
42
|
function descriptor(path, capability, summary) {
|
|
43
|
+
const segments = typeof path === 'string' ? [path] : path;
|
|
41
44
|
return {
|
|
42
|
-
path:
|
|
45
|
+
path: segments,
|
|
43
46
|
capability,
|
|
44
47
|
summary,
|
|
45
|
-
examples: [`ankh navigator ${
|
|
48
|
+
examples: [`ankh navigator ${segments.join(' ')} --help`],
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
51
|
/*** Adapt the Ankh execution request to Navigator's narrow command input. */
|
|
49
52
|
function binding(path, handler) {
|
|
50
53
|
return {
|
|
51
|
-
path: [path],
|
|
54
|
+
path: typeof path === 'string' ? [path] : path,
|
|
52
55
|
handler: (request) => Promise.resolve(handler({
|
|
53
56
|
argv: request.argv,
|
|
54
57
|
cwd: request.context.cwd,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCliProvider.js","sourceRoot":"","sources":["../../src/cli/createCliProvider.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,eAAe,
|
|
1
|
+
{"version":3,"file":"createCliProvider.js","sourceRoot":"","sources":["../../src/cli/createCliProvider.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,O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,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1D,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,UAAU;QACV,OAAO;QACP,QAAQ,EAAE,CAAC,kBAAkB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;KAC1D,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,SAAS,OAAO,CACd,IAAgC,EAChC,OAE2E;IAE3E,OAAO;QACL,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;QAC9C,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CACnB,OAAO,CAAC,OAAO,CACb,OAAO,CAAC;YACN,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG;YACxB,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;YACxD,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;SACzD,CAAC,CACH;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NavigatorExampleDescriptor } from '../../../../types/navigatorExamples';
|
|
2
|
+
/*** Return the standalone composition catalog with target truth derived from Navigator policy. */
|
|
3
|
+
export declare function getNavigatorExampleCatalog(): readonly NavigatorExampleDescriptor[];
|
|
4
|
+
//# sourceMappingURL=getNavigatorExampleCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNavigatorExampleCatalog.d.ts","sourceRoot":"","sources":["../../../../../src/features/catalog/adapters/inbound/getNavigatorExampleCatalog.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,qCAAqC,CAAC;AAM7C,kGAAkG;AAClG,wBAAgB,0BAA0B,IAAI,SAAS,0BAA0B,EAAE,CAOlF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createNavigatorExamplePlan } from '../../../../utils/createNavigatorExamplePlan';
|
|
2
|
+
import { verifyNavigator } from '../../../../utils/verifyNavigator';
|
|
3
|
+
import { createNavigatorExampleDefinitions } from '../../domain/createNavigatorExampleDefinitions';
|
|
4
|
+
import { getNavigatorCatalog } from './getNavigatorCatalog';
|
|
5
|
+
/*** Return the standalone composition catalog with target truth derived from Navigator policy. */
|
|
6
|
+
export function getNavigatorExampleCatalog() {
|
|
7
|
+
return createNavigatorExampleDefinitions().map((definition) => ({
|
|
8
|
+
id: definition.id,
|
|
9
|
+
title: definition.title,
|
|
10
|
+
description: definition.description,
|
|
11
|
+
targets: PLATFORMS.map((platform) => createTarget(definition, platform)),
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
const PLATFORMS = ['android', 'ios', 'web'];
|
|
15
|
+
/*** Resolve one target entry through planning and the package-owned verification vocabulary. */
|
|
16
|
+
function createTarget(definition, platform) {
|
|
17
|
+
const plan = createNavigatorExamplePlan(definition, platform);
|
|
18
|
+
const verification = verifyNavigator(plan, definition.bindings);
|
|
19
|
+
return {
|
|
20
|
+
platform,
|
|
21
|
+
support: plan.support,
|
|
22
|
+
capabilityIds: plan.capabilityIds,
|
|
23
|
+
diagnostics: plan.diagnostics,
|
|
24
|
+
verification: mergeDeclaredVerification(plan.capabilityIds, platform, verification.checks),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/*** Preserve declared layers while applying the verifier's current structural evidence. */
|
|
28
|
+
function mergeDeclaredVerification(capabilityIds, platform, checks) {
|
|
29
|
+
const catalog = getNavigatorCatalog();
|
|
30
|
+
const declaredKinds = capabilityIds.flatMap((capabilityId) => {
|
|
31
|
+
const capability = catalog.capabilities.find(({ id }) => id === capabilityId);
|
|
32
|
+
return capability?.targets.find((target) => target.platform === platform)?.verification ?? [];
|
|
33
|
+
});
|
|
34
|
+
const statuses = new Map(checks.map((check) => [check.kind, check.status]));
|
|
35
|
+
return [...new Set(declaredKinds.map(({ kind }) => kind))].map((kind) => ({
|
|
36
|
+
kind,
|
|
37
|
+
status: statuses.get(kind) ?? 'unverified',
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=getNavigatorExampleCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNavigatorExampleCatalog.js","sourceRoot":"","sources":["../../../../../src/features/catalog/adapters/inbound/getNavigatorExampleCatalog.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,kGAAkG;AAClG,MAAM,UAAU,0BAA0B;IACxC,OAAO,iCAAiC,EAAE,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC9D,EAAE,EAAE,UAAU,CAAC,EAAE;QACjB,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;KACzE,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAErD,gGAAgG;AAChG,SAAS,YAAY,CACnB,UAAwE,EACxE,QAAkC;IAElC,MAAM,IAAI,GAAG,0BAA0B,CAAC,UAAU,EAAE,QA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QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,YAAY;KAC3C,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NavigatorExampleDefinition } from '../../../types/navigatorExamples';
|
|
2
|
+
/*** Define the standalone Slot and Stack examples. */
|
|
3
|
+
export declare function createCoreNavigatorExamples(): readonly NavigatorExampleDefinition[];
|
|
4
|
+
//# sourceMappingURL=createCoreNavigatorExamples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCoreNavigatorExamples.d.ts","sourceRoot":"","sources":["../../../../src/features/catalog/domain/createCoreNavigatorExamples.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAGnF,sDAAsD;AACtD,wBAAgB,2BAA2B,IAAI,SAAS,0BAA0B,EAAE,CAkCnF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createExampleScreenRoute } from './createExampleScreenRoute';
|
|
2
|
+
/*** Define the standalone Slot and Stack examples. */
|
|
3
|
+
export function createCoreNavigatorExamples() {
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
id: 'slot',
|
|
7
|
+
title: 'Slot',
|
|
8
|
+
description: 'Direct file-based routing without navigator-owned state.',
|
|
9
|
+
manifest: {
|
|
10
|
+
type: 'slot',
|
|
11
|
+
preset: 'slot',
|
|
12
|
+
routes: [
|
|
13
|
+
createExampleScreenRoute('index', 'Overview'),
|
|
14
|
+
createExampleScreenRoute('details', 'Details'),
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
bindings: sharedBindings(),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'stack',
|
|
21
|
+
title: 'Stack',
|
|
22
|
+
description: 'Native Stack routes with a protected destination and modal presentation.',
|
|
23
|
+
manifest: {
|
|
24
|
+
type: 'stack',
|
|
25
|
+
preset: 'stack',
|
|
26
|
+
implementation: 'native',
|
|
27
|
+
initialRouteName: 'index',
|
|
28
|
+
routes: [
|
|
29
|
+
createExampleScreenRoute('index', 'Overview'),
|
|
30
|
+
createExampleScreenRoute('details', 'Details', { guarded: true }),
|
|
31
|
+
createExampleScreenRoute('modal', 'Modal', { presentation: 'modal' }),
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
bindings: sharedBindings(true),
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
/*** Create narrow bindings shared by ordinary example screens and optional guards. */
|
|
39
|
+
function sharedBindings(guarded = false) {
|
|
40
|
+
return {
|
|
41
|
+
screens: { example: { module: '@/screens/example-screen', exportName: 'ExampleScreen' } },
|
|
42
|
+
guards: guarded
|
|
43
|
+
? {
|
|
44
|
+
'example-enabled': {
|
|
45
|
+
module: '@/guards/is-example-enabled',
|
|
46
|
+
exportName: 'isExampleEnabled',
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
: {},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=createCoreNavigatorExamples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCoreNavigatorExamples.js","sourceRoot":"","sources":["../../../../src/features/catalog/domain/createCoreNavigatorExamples.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,sDAAsD;AACtD,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL;YACE,EAAE,EAAE,MAAM;YACV,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE;gBACR,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE;oBACN,wBAAwB,CAAC,OAAO,EAAE,UAAU,CAAC;oBAC7C,wBAAwB,CAAC,SAAS,EAAE,SAAS,CAAC;iBAC/C;aACF;YACD,QAAQ,EAAE,cAAc,EAAE;SAC3B;QACD;YACE,EAAE,EAAE,OAAO;YACX,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,0EAA0E;YACvF,QAAQ,EAAE;gBACR,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,OAAO;gBACf,cAAc,EAAE,QAAQ;gBACxB,gBAAgB,EAAE,OAAO;gBACzB,MAAM,EAAE;oBACN,wBAAwB,CAAC,OAAO,EAAE,UAAU,CAAC;oBAC7C,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oBACjE,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;iBACtE;aACF;YACD,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC;SAC/B;KACF,CAAC;AACJ,CAAC;AAED,sFAAsF;AACtF,SAAS,cAAc,CAAC,OAAO,GAAG,KAAK;IACrC,OAAO;QACL,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE;QACzF,MAAM,EAAE,OAAO;YACb,CAAC,CAAC;gBACE,iBAAiB,EAAE;oBACjB,MAAM,EAAE,6BAA6B;oBACrC,UAAU,EAAE,kBAAkB;iBAC/B;aACF;YACH,CAAC,CAAC,EAAE;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NavigatorExampleDefinition } from '../../../types/navigatorExamples';
|
|
2
|
+
/*** Define the registered custom navigator example and its narrow integration record. */
|
|
3
|
+
export declare function createCustomNavigatorExamples(): readonly NavigatorExampleDefinition[];
|
|
4
|
+
//# sourceMappingURL=createCustomNavigatorExamples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomNavigatorExamples.d.ts","sourceRoot":"","sources":["../../../../src/features/catalog/domain/createCustomNavigatorExamples.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAGnF,yFAAyF;AACzF,wBAAgB,6BAA6B,IAAI,SAAS,0BAA0B,EAAE,CAsBrF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createExampleScreenRoute } from './createExampleScreenRoute';
|
|
2
|
+
/*** Define the registered custom navigator example and its narrow integration record. */
|
|
3
|
+
export function createCustomNavigatorExamples() {
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
id: 'registered-custom',
|
|
7
|
+
title: 'Registered custom navigator',
|
|
8
|
+
description: 'Registered Expo Router standard tab integration with validated JSON config.',
|
|
9
|
+
manifest: {
|
|
10
|
+
type: 'custom',
|
|
11
|
+
navigatorId: 'example-tabs',
|
|
12
|
+
config: { backBehavior: 'history' },
|
|
13
|
+
routes: [
|
|
14
|
+
createExampleScreenRoute('index', 'Overview'),
|
|
15
|
+
createExampleScreenRoute('settings', 'Settings'),
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
bindings: {
|
|
19
|
+
screens: { example: { module: '@/screens/example-screen', exportName: 'ExampleScreen' } },
|
|
20
|
+
guards: {},
|
|
21
|
+
},
|
|
22
|
+
customNavigatorRegistrations: [EXAMPLE_TABS],
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
const EXAMPLE_TABS = {
|
|
27
|
+
id: 'example-tabs',
|
|
28
|
+
platforms: ['android', 'ios', 'web'],
|
|
29
|
+
stability: 'alpha',
|
|
30
|
+
integration: 'expo-router-standard',
|
|
31
|
+
router: 'tab',
|
|
32
|
+
module: '@/navigators/registered-custom-navigator',
|
|
33
|
+
exportName: 'RegisteredCustomNavigator',
|
|
34
|
+
validateConfig(config) {
|
|
35
|
+
return config?.backBehavior === 'history'
|
|
36
|
+
? []
|
|
37
|
+
: [
|
|
38
|
+
{
|
|
39
|
+
code: 'invalid-back-behavior',
|
|
40
|
+
path: '/backBehavior',
|
|
41
|
+
message: 'The example requires router-owned history behavior.',
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=createCustomNavigatorExamples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomNavigatorExamples.js","sourceRoot":"","sources":["../../../../src/features/catalog/domain/createCustomNavigatorExamples.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,yFAAyF;AACzF,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL;YACE,EAAE,EAAE,mBAAmB;YACvB,KAAK,EAAE,6BAA6B;YACpC,WAAW,EAAE,6EAA6E;YAC1F,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,cAAc;gBAC3B,MAAM,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE;gBACnC,MAAM,EAAE;oBACN,wBAAwB,CAAC,OAAO,EAAE,UAAU,CAAC;oBAC7C,wBAAwB,CAAC,UAAU,EAAE,UAAU,CAAC;iBACjD;aACF;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE;gBACzF,MAAM,EAAE,EAAE;aACX;YACD,4BAA4B,EAAE,CAAC,YAAY,CAAC;SAC7C;KACF,CAAC;AACJ,CAAC;AAED,MAAM,YAAY,GAAgC;IAChD,EAAE,EAAE,cAAc;IAClB,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC;IACpC,SAAS,EAAE,OAAO;IAClB,WAAW,EAAE,sBAAsB;IACnC,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,0CAA0C;IAClD,UAAU,EAAE,2BAA2B;IACvC,cAAc,CAAC,MAAM;QACnB,OAAO,MAAM,EAAE,YAAY,KAAK,SAAS;YACvC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,uBAAuB;oBAC7B,IAAI,EAAE,eAAe;oBACrB,OAAO,EAAE,qDAAqD;iBAC/D;aACF,CAAC;IACR,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NavigatorExampleDefinition } from '../../../types/navigatorExamples';
|
|
2
|
+
/*** Define standalone Drawer compositions without introducing product-flow semantics. */
|
|
3
|
+
export declare function createDrawerNavigatorExamples(): readonly NavigatorExampleDefinition[];
|
|
4
|
+
//# sourceMappingURL=createDrawerNavigatorExamples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDrawerNavigatorExamples.d.ts","sourceRoot":"","sources":["../../../../src/features/catalog/domain/createDrawerNavigatorExamples.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAGnF,yFAAyF;AACzF,wBAAgB,6BAA6B,IAAI,SAAS,0BAA0B,EAAE,CAErF"}
|