@ankhorage/studio 8.0.0 → 8.0.2

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 (65) hide show
  1. package/README.md +1 -1
  2. package/apm/update.json +1 -1
  3. package/dist/features/project-updates/domain/applyGeneratedPackagePolicy.d.ts.map +1 -1
  4. package/dist/features/project-updates/domain/applyGeneratedPackagePolicy.js +2 -2
  5. package/dist/features/project-updates/domain/applyGeneratedPackagePolicy.js.map +1 -1
  6. package/dist/host/layout/layoutGenerator.d.ts +1 -1
  7. package/dist/host/layout/layoutGenerator.d.ts.map +1 -1
  8. package/dist/host/layout/layoutGenerator.js +61 -123
  9. package/dist/host/layout/layoutGenerator.js.map +1 -1
  10. package/dist/host/layout/navigator/createNavigatorGenerationBindings.js +38 -3
  11. package/dist/host/layout/navigator/createNavigatorGenerationBindings.js.map +1 -1
  12. package/dist/host/layout/templates/auth/adapter.d.ts.map +1 -1
  13. package/dist/host/layout/templates/auth/adapter.js +1 -2
  14. package/dist/host/layout/templates/auth/adapter.js.map +1 -1
  15. package/dist/host/layout/templates/auth/screenController.d.ts.map +1 -1
  16. package/dist/host/layout/templates/auth/screenController.js +4 -1
  17. package/dist/host/layout/templates/auth/screenController.js.map +1 -1
  18. package/dist/host/layout/templates/auth/session.js +1 -1
  19. package/dist/host/layout/templates/index.d.ts +4 -0
  20. package/dist/host/layout/templates/index.d.ts.map +1 -1
  21. package/dist/host/layout/templates/index.js +4 -0
  22. package/dist/host/layout/templates/index.js.map +1 -1
  23. package/dist/host/layout/templates/rootLayout.d.ts +1 -4
  24. package/dist/host/layout/templates/rootLayout.d.ts.map +1 -1
  25. package/dist/host/layout/templates/rootLayout.js +82 -436
  26. package/dist/host/layout/templates/rootLayout.js.map +1 -1
  27. package/dist/host/layout/templates/rootShell.d.ts +6 -0
  28. package/dist/host/layout/templates/rootShell.d.ts.map +1 -0
  29. package/dist/host/layout/templates/rootShell.js +109 -0
  30. package/dist/host/layout/templates/rootShell.js.map +1 -0
  31. package/dist/host/layout/templates/runtimeShell.d.ts +12 -0
  32. package/dist/host/layout/templates/runtimeShell.d.ts.map +1 -0
  33. package/dist/host/layout/templates/runtimeShell.js +184 -0
  34. package/dist/host/layout/templates/runtimeShell.js.map +1 -0
  35. package/dist/host/layout/templates/studioAppHeader.d.ts +6 -0
  36. package/dist/host/layout/templates/studioAppHeader.d.ts.map +1 -0
  37. package/dist/host/layout/templates/studioAppHeader.js +101 -0
  38. package/dist/host/layout/templates/studioAppHeader.js.map +1 -0
  39. package/dist/host/layout/templates/studioShell.d.ts +13 -0
  40. package/dist/host/layout/templates/studioShell.d.ts.map +1 -0
  41. package/dist/host/layout/templates/studioShell.js +317 -0
  42. package/dist/host/layout/templates/studioShell.js.map +1 -0
  43. package/dist/host/orchestrator/GeneratedRouteFileOwnership.d.ts.map +1 -1
  44. package/dist/host/orchestrator/GeneratedRouteFileOwnership.js +8 -1
  45. package/dist/host/orchestrator/GeneratedRouteFileOwnership.js.map +1 -1
  46. package/dist/host/orchestrator/generatedAppFiles.d.ts +2 -0
  47. package/dist/host/orchestrator/generatedAppFiles.d.ts.map +1 -1
  48. package/dist/host/orchestrator/generatedAppFiles.js +5 -3
  49. package/dist/host/orchestrator/generatedAppFiles.js.map +1 -1
  50. package/dist/host/orchestrator/projectManager.d.ts.map +1 -1
  51. package/dist/host/orchestrator/projectManager.js +8 -0
  52. package/dist/host/orchestrator/projectManager.js.map +1 -1
  53. package/dist/host/orchestrator/scaffolder.d.ts +3 -0
  54. package/dist/host/orchestrator/scaffolder.d.ts.map +1 -1
  55. package/dist/host/orchestrator/scaffolder.js +20 -10
  56. package/dist/host/orchestrator/scaffolder.js.map +1 -1
  57. package/dist/host/orchestrator/templateSources.d.ts +5 -1
  58. package/dist/host/orchestrator/templateSources.d.ts.map +1 -1
  59. package/dist/host/orchestrator/templateSources.js +98 -8
  60. package/dist/host/orchestrator/templateSources.js.map +1 -1
  61. package/dist/host/orchestrator/templates.d.ts +3 -2
  62. package/dist/host/orchestrator/templates.d.ts.map +1 -1
  63. package/dist/host/orchestrator/templates.js +1 -1
  64. package/dist/host/orchestrator/templates.js.map +1 -1
  65. package/package.json +8 -7
@@ -1 +1 @@
1
- {"version":3,"file":"rootLayout.js","sourceRoot":"","sources":["../../../../src/host/layout/templates/rootLayout.ts"],"names":[],"mappings":"AAoCA;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAC7C,aAAsB;IAEtB,OAAO;QACL;YACE,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;SACrF;QACD;YACE,MAAM,EAAE,cAAc;YACtB,YAAY,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;SAC5D;QACD;YACE,MAAM,EAAE,uCAAuC;YAC/C,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,gCAAgC,EAAE,CAAC;SAC/D;QACD;YACE,MAAM,EAAE,2BAA2B;YACnC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;SAChD;QACD;YACE,MAAM,EAAE,oCAAoC;YAC5C,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,0BAA0B,EAAE,CAAC;SACzD;QACD;YACE,MAAM,EAAE,oBAAoB;YAC5B,eAAe,EAAE,cAAc;SAChC;QACD;YACE,MAAM,EAAE,kCAAkC;YAC1C,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,sBAAsB,EAAE,CAAC;SACrD;QACD,GAAG,CAAC,aAAa;YACf,CAAC,CAAC;gBACE;oBACE,MAAM,EAAE,sCAAsC;oBAC9C,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,8BAA8B,EAAE,CAAC;iBAC7D;aACF;YACH,CAAC,CAAC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AiB;;;MAGnB,wBAAwB;EAC5B,CAAC;IACD,OAAO;QACL,UAAU;QACV,2CAA2C;QAC3C,uBAAuB;QACvB;;uBAEmB,wBAAwB,IAAI,QAAQ,CAAC,SAAS,CAAC,gBAAgB,IAAI,OAAO;GAC9F;QACC,kBAAkB;QAClB,gBAAgB;QAChB;EACF,qBAAqB;;EAErB,0CAA0C,wBAAwB,gBAAgB;IAEhF,aAAa;YACX,CAAC,CAAC,uBAAuB,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe;;;;MAInE,WAAW,CAAC,CAAC,CAAC,oEAAoE,CAAC,CAAC,CAAC,MAAM;GAC9F;YACG,CAAC,CAAC,EACN,UACE,aAAa;YACX,CAAC,CAAC,oOAAoO;YACtO,CAAC,CAAC,gFACN;;;wBAGsB,qBAAqB,MAAM,qBAAqB;EACtE,cAAc,GAAG,2BAA2B,KAAK,kBAAkB;EACnE;KACC;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,MAAM,CAAC;SACZ,MAAM,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { GeneratedImportRequirement } from '../generatedImportComposer';
2
+ /*** Describe the imports owned by the generated application root shell. */
3
+ export declare function getRootShellImportRequirements(zoraEntrypoint: '@ankhorage/zora' | '@ankhorage/zora/reader-free'): GeneratedImportRequirement[];
4
+ /*** Generate the application-wide React Native root, theme provider and status-bar shell. */
5
+ export declare function getRootShellTsx(imports: string): string;
6
+ //# sourceMappingURL=rootShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rootShell.d.ts","sourceRoot":"","sources":["../../../../src/host/layout/templates/rootShell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,2EAA2E;AAC3E,wBAAgB,8BAA8B,CAC5C,cAAc,EAAE,iBAAiB,GAAG,6BAA6B,GAChE,0BAA0B,EAAE,CA4B9B;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4EvD"}
@@ -0,0 +1,109 @@
1
+ /*** Describe the imports owned by the generated application root shell. */
2
+ export function getRootShellImportRequirements(zoraEntrypoint) {
3
+ return [
4
+ { source: '@ankhorage/contracts', namedImports: [{ imported: 'AppManifest', typeOnly: true }] },
5
+ {
6
+ source: 'react',
7
+ namedImports: [
8
+ { imported: 'ReactNode', typeOnly: true },
9
+ { imported: 'useEffect' },
10
+ { imported: 'useMemo' },
11
+ { imported: 'useState' },
12
+ ],
13
+ },
14
+ { source: '@ankhorage/utility/object', namedImports: [{ imported: 'readOwnProperty' }] },
15
+ {
16
+ source: '@ankhorage/expo-runtime/icon-fonts',
17
+ namedImports: [{ imported: 'ExpoZoraIconFontProvider' }],
18
+ },
19
+ {
20
+ source: zoraEntrypoint,
21
+ namedImports: [{ imported: 'ZoraProvider' }, { imported: 'useZoraTheme' }],
22
+ },
23
+ { source: 'expo-status-bar', namedImports: [{ imported: 'StatusBar' }] },
24
+ {
25
+ source: 'react-native-gesture-handler',
26
+ namedImports: [{ imported: 'GestureHandlerRootView' }],
27
+ },
28
+ { source: 'react-native-safe-area-context', namedImports: [{ imported: 'SafeAreaProvider' }] },
29
+ ];
30
+ }
31
+ /*** Generate the application-wide React Native root, theme provider and status-bar shell. */
32
+ export function getRootShellTsx(imports) {
33
+ return `${imports}
34
+
35
+ const rootViewStyle = { flex: 1 } as const;
36
+
37
+ export function GeneratedRootShell({ children }: { readonly children: ReactNode }) {
38
+ const [interactive, setInteractive] = useState(false);
39
+ useEffect(() => {
40
+ const frame = requestAnimationFrame(() => {
41
+ setInteractive(true);
42
+ });
43
+ return () => cancelAnimationFrame(frame);
44
+ }, []);
45
+ return (
46
+ <ExpoZoraIconFontProvider>
47
+ <GestureHandlerRootView
48
+ style={rootViewStyle}
49
+ testID={interactive ? 'ankh-app-interactive' : 'ankh-app-loading'}
50
+ >
51
+ {children}
52
+ </GestureHandlerRootView>
53
+ </ExpoZoraIconFontProvider>
54
+ );
55
+ }
56
+
57
+ export function GeneratedThemeShell({
58
+ children,
59
+ initialMode,
60
+ theme,
61
+ }: {
62
+ readonly children: ReactNode;
63
+ readonly initialMode: NonNullable<AppManifest['activeThemeMode']>;
64
+ readonly theme: AppManifest['themes'][string];
65
+ }) {
66
+ const themeConfig = useMemo(() => resolveZoraSurfaceThemeConfig(theme), [theme]);
67
+ return (
68
+ <ZoraProvider themeConfig={themeConfig} initialMode={initialMode}>
69
+ <SafeAreaProvider>{children}</SafeAreaProvider>
70
+ </ZoraProvider>
71
+ );
72
+ }
73
+
74
+ export function GeneratedStatusBar() {
75
+ const { mode } = useZoraTheme();
76
+ return <StatusBar style={mode === 'dark' ? 'light' : 'dark'} />;
77
+ }
78
+
79
+ export function resolveManifestActiveTheme(manifest: AppManifest): AppManifest['themes'][string] {
80
+ const theme = readOwnProperty<AppManifest['themes'][string]>(
81
+ manifest.themes,
82
+ manifest.activeThemeId,
83
+ );
84
+ if (!theme) throw new Error("Manifest active theme '" + manifest.activeThemeId + "' is missing.");
85
+ return theme;
86
+ }
87
+
88
+ export function resolveThemeMode(
89
+ mode: AppManifest['activeThemeMode'],
90
+ fallback: NonNullable<AppManifest['activeThemeMode']>,
91
+ ): NonNullable<AppManifest['activeThemeMode']> {
92
+ return mode === 'dark' || mode === 'light' ? mode : fallback;
93
+ }
94
+
95
+ function resolveZoraSurfaceThemeConfig(
96
+ theme: AppManifest['themes'][string],
97
+ ): AppManifest['themes'][string] {
98
+ return {
99
+ id: theme.id,
100
+ name: theme.name,
101
+ light: { ...theme.light },
102
+ dark: { ...theme.dark },
103
+ ...(theme.tokens === undefined ? {} : { tokens: theme.tokens }),
104
+ ...(theme.recipes === undefined ? {} : { recipes: theme.recipes }),
105
+ };
106
+ }
107
+ `;
108
+ }
109
+ //# sourceMappingURL=rootShell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rootShell.js","sourceR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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ElB,CAAC;AACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { GeneratedImportRequirement } from '../generatedImportComposer';
2
+ /*** Describe imports owned by the generated Runtime composition shell. */
3
+ export declare function getRuntimeShellImportRequirements(includeStudio: boolean, zoraEntrypoint: '@ankhorage/zora' | '@ankhorage/zora/reader-free', useStoredAuthSessionCredentialResolver: boolean): GeneratedImportRequirement[];
4
+ /*** Generate Runtime capability, API, registry, media, and renderer composition for one app configuration. */
5
+ export declare function getRuntimeShellTsx(args: {
6
+ readonly imports: string;
7
+ readonly includeStudio: boolean;
8
+ readonly runtimeModuleDeclarations?: string;
9
+ readonly useStoredAuthSessionCredentialResolver: boolean;
10
+ readonly zoraEntrypoint: '@ankhorage/zora' | '@ankhorage/zora/reader-free';
11
+ }): string;
12
+ //# sourceMappingURL=runtimeShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeShell.d.ts","sourceRoot":"","sources":["../../../../src/host/layout/templates/runtimeShell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,0EAA0E;AAC1E,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,iBAAiB,GAAG,6BAA6B,EACjE,sCAAsC,EAAE,OAAO,GAC9C,0BAA0B,EAAE,CAiE9B;AAED,8GAA8G;AAC9G,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAC5C,QAAQ,CAAC,sCAAsC,EAAE,OAAO,CAAC;IACzD,QAAQ,CAAC,cAAc,EAAE,iBAAiB,GAAG,6BAA6B,CAAC;CAC5E,GAAG,MAAM,CA2HT"}
@@ -0,0 +1,184 @@
1
+ /*** Describe imports owned by the generated Runtime composition shell. */
2
+ export function getRuntimeShellImportRequirements(includeStudio, zoraEntrypoint, useStoredAuthSessionCredentialResolver) {
3
+ return [
4
+ { source: '@ankhorage/contracts', namedImports: [{ imported: 'AppManifest', typeOnly: true }] },
5
+ {
6
+ source: 'react',
7
+ namedImports: [{ imported: 'ReactNode', typeOnly: true }, { imported: 'useMemo' }],
8
+ },
9
+ {
10
+ source: '@ankhorage/runtime',
11
+ namedImports: [
12
+ { imported: 'composeRuntimeCapabilityExecutor' },
13
+ { imported: 'createComponentRegistry' },
14
+ { imported: 'createRuntimeApiCapabilityExecutor' },
15
+ { imported: 'RuntimeRendererConfigProvider' },
16
+ ],
17
+ },
18
+ { source: zoraEntrypoint, namedImports: [{ imported: 'useZoraTheme' }] },
19
+ {
20
+ source: '@ankhorage/expo-runtime/bundled-media',
21
+ namedImports: [{ imported: 'createExpoBundledMediaResolver' }],
22
+ },
23
+ {
24
+ source: '@/generated/bundledMediaRegistry',
25
+ namedImports: [{ imported: 'bundledMediaRegistry' }],
26
+ },
27
+ {
28
+ source: '@/generated/appExtensionRegistry',
29
+ namedImports: [
30
+ {
31
+ imported: 'APP_EXTENSION_COMPONENT_REGISTRY',
32
+ local: 'GENERATED_APP_EXTENSION_COMPONENT_REGISTRY',
33
+ },
34
+ ],
35
+ },
36
+ ...(useStoredAuthSessionCredentialResolver
37
+ ? [
38
+ {
39
+ source: '@/auth/session',
40
+ namedImports: [{ imported: 'getStoredAuthSession' }],
41
+ },
42
+ ]
43
+ : []),
44
+ ...(includeStudio
45
+ ? [
46
+ {
47
+ source: '@ankhorage/studio/runtime',
48
+ namedImports: [{ imported: 'useStudioRuntimeCapabilityExecutor' }],
49
+ },
50
+ ]
51
+ : [
52
+ {
53
+ source: '@/generated/runtimeCapabilityExecutor',
54
+ namedImports: [{ imported: 'createGeneratedRuntimeCapabilityExecutor' }],
55
+ },
56
+ {
57
+ source: '@ankhorage/expo-runtime/capability-bridge',
58
+ namedImports: [{ imported: 'resolveExpoRuntimeRoutePath' }],
59
+ },
60
+ {
61
+ source: 'expo-router',
62
+ namedImports: [{ imported: 'Href', typeOnly: true }, { imported: 'useRouter' }],
63
+ },
64
+ { source: 'react-native', namedImports: [{ imported: 'Alert' }] },
65
+ ]),
66
+ ];
67
+ }
68
+ /*** Generate Runtime capability, API, registry, media, and renderer composition for one app configuration. */
69
+ export function getRuntimeShellTsx(args) {
70
+ const { imports, includeStudio, runtimeModuleDeclarations, useStoredAuthSessionCredentialResolver, zoraEntrypoint, } = args;
71
+ const runtimeCredentialResolver = useStoredAuthSessionCredentialResolver
72
+ ? '\n credentialResolver: resolveRuntimeOperationCredential,'
73
+ : '';
74
+ const capabilityExecutor = includeStudio
75
+ ? `useStudioRuntimeCapabilityExecutor({
76
+ setThemeMode: setMode,
77
+ })`
78
+ : 'useGeneratedRuntimeCapabilityExecutor()';
79
+ const standaloneExecutor = includeStudio
80
+ ? ''
81
+ : `
82
+ function useGeneratedRuntimeCapabilityExecutor() {
83
+ const router = useRouter();
84
+ const { setMode } = useZoraTheme();
85
+ const executeCapability = useMemo(
86
+ () =>
87
+ createGeneratedRuntimeCapabilityExecutor({
88
+ alert: (message) => Alert.alert(message),
89
+ navigate: (input) => {
90
+ const { params, route } = input as { route: string; params?: Record<string, string> };
91
+ const { resolvedPath, unusedParams } = resolveExpoRuntimeRoutePath(route, params);
92
+ router.navigate({ params: unusedParams, pathname: resolvedPath } as Href);
93
+ },
94
+ setThemeMode: (input) => setMode((input as { mode: 'dark' | 'light' }).mode),
95
+ }),
96
+ [router, setMode],
97
+ );
98
+
99
+ return { executeCapability };
100
+ }
101
+ `;
102
+ const credentialResolver = useStoredAuthSessionCredentialResolver
103
+ ? `
104
+ function resolveRuntimeOperationCredential(credential: { readonly kind?: string } | undefined) {
105
+ if (credential?.kind !== 'bearer' && credential?.kind !== 'oauth2') return undefined;
106
+
107
+ const session = getStoredAuthSession();
108
+ if (!session?.accessToken) return undefined;
109
+
110
+ return {
111
+ headers: {
112
+ Authorization: \`Bearer \${session.accessToken}\`,
113
+ },
114
+ };
115
+ }
116
+ `
117
+ : '';
118
+ return (`${imports}
119
+
120
+ ${runtimeModuleDeclarations?.trim() ?? ''}
121
+
122
+ ${includeStudio ? 'export { bundledMediaRegistry };\n' : ''}const bundledMediaResolver = createExpoBundledMediaResolver(bundledMediaRegistry);
123
+ ${includeStudio ? 'export ' : ''}const runtimeComponentRegistry = APP_COMPONENT_REGISTRY;
124
+
125
+ export function GeneratedRuntimeShell({
126
+ children,
127
+ runtimeManifest,
128
+ }: {
129
+ readonly children: ReactNode;
130
+ readonly runtimeManifest: AppManifest;
131
+ }) {${includeStudio ? '\n const { setMode } = useZoraTheme();' : ''}
132
+ const runtimeCapabilityExecutor = ${capabilityExecutor};
133
+ const executeApplicationCapability = runtimeCapabilityExecutor.executeCapability;
134
+ const executeCapability = useMemo(
135
+ () =>
136
+ composeRuntimeCapabilityExecutor({
137
+ apiCapabilityExecutor: createRuntimeApiCapabilityExecutor({
138
+ apis: runtimeManifest.infra.apis ?? {},
139
+ fetch: runtimeApiFetch,${runtimeCredentialResolver}
140
+ }),
141
+ capabilityExecutor: executeApplicationCapability,
142
+ }),
143
+ [executeApplicationCapability, runtimeManifest.infra.apis],
144
+ );
145
+ const generatedRuntimeConfig = useMemo(
146
+ () => ({
147
+ executeCapability,
148
+ registry: runtimeComponentRegistry,
149
+ mediaAssets: runtimeManifest.media?.assets,
150
+ resolveMediaAsset: bundledMediaResolver,
151
+ }),
152
+ [executeCapability, runtimeManifest.media?.assets],
153
+ );
154
+
155
+ return (
156
+ <RuntimeRendererConfigProvider value={generatedRuntimeConfig}>
157
+ {children}
158
+ </RuntimeRendererConfigProvider>
159
+ );
160
+ }
161
+
162
+ async function runtimeApiFetch(
163
+ url: string,
164
+ init: {
165
+ readonly method: string;
166
+ readonly headers: Readonly<Record<string, string>>;
167
+ readonly body?: string;
168
+ },
169
+ ) {
170
+ const response = await fetch(url, {
171
+ method: init.method,
172
+ headers: init.headers,
173
+ body: init.body,
174
+ });
175
+
176
+ return {
177
+ status: response.status,
178
+ headers: Object.fromEntries(response.headers.entries()),
179
+ text: () => response.text(),
180
+ };
181
+ }
182
+ ${credentialResolver}${standaloneExecutor}`.trimEnd() + '\n');
183
+ }
184
+ //# sourceMappingURL=runtimeShell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeShell.js","sourceRoot":"","sources":["../../../../src/host/layout/templates/runtimeShell.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,MAAM,UAAU,iCAAiC,CAC/C,aAAsB,EACtB,cAAiE,EACjE,sCAA+C;IAE/C,OAAO;QACL,EAAE,MAAM,EAAE,sBAAsB,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;QAC/F;YACE,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;SACnF;QACD;YACE,MAAM,EAAE,oBAAoB;YAC5B,YAAY,EAAE;gBACZ,EAAE,QAAQ,EAAE,kCAAkC,EAAE;gBAChD,EAAE,QAAQ,EAAE,yBAAyB,EAAE;gBACvC,EAAE,QAAQ,EAAE,oCAAoC,EAAE;gBAClD,EAAE,QAAQ,EAAE,+BAA+B,EAAE;aAC9C;SACF;QACD,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,EAAE;QACxE;YACE,MAAM,EAAE,uCAAuC;YAC/C,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,gCAAgC,EAAE,CAAC;SAC/D;QACD;YACE,MAAM,EAAE,kCAAkC;YAC1C,YAAY,EAAE,CAAC,EAAE,QAAQ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E,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,kBAAkB,GAAG,aAAa;QACtC,CAAC,CAAC;;KAED;QACD,CAAC,CAAC,yCAAyC,CAAC;IAC9C,MAAM,kBAAkB,GAAG,aAAa;QACtC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;CAoBL,CAAC;IACA,MAAM,kBAAkB,GAAG,sCAAsC;QAC/D,CAAC,CAAC;;;;;;;;;;;;;CAaL;QACG,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,CACL,GAAG,OAAO;;EAEZ,yBAAyB,EAAE,IAAI,EAAE,IAAI,EAAE;;EAEvC,aAAa,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAC,EAAE;EACzD,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;;;;;;;;MAQ1B,aAAa,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,EAAE;sCAC9B,kBAAkB;;;;;;;mCAOrB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2C1D,kBAAkB,GAAG,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CACzD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { GeneratedImportRequirement } from '../generatedImportComposer';
2
+ /*** Describe the imports owned by the generated Studio app-header module. */
3
+ export declare function getStudioAppHeaderImportRequirements(zoraEntrypoint: '@ankhorage/zora' | '@ankhorage/zora/reader-free'): GeneratedImportRequirement[];
4
+ /*** Generate the Studio app-header composition and manifest title resolution. */
5
+ export declare function getStudioAppHeaderTsx(imports: string): string;
6
+ //# sourceMappingURL=studioAppHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studioAppHeader.d.ts","sourceRoot":"","sources":["../../../../src/host/layout/templates/studioAppHeader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,6EAA6E;AAC7E,wBAAgB,oCAAoC,CAClD,cAAc,EAAE,iBAAiB,GAAG,6BAA6B,GAChE,0BAA0B,EAAE,CAwB9B;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAwE7D"}
@@ -0,0 +1,101 @@
1
+ /*** Describe the imports owned by the generated Studio app-header module. */
2
+ export function getStudioAppHeaderImportRequirements(zoraEntrypoint) {
3
+ return [
4
+ {
5
+ source: '@ankhorage/contracts',
6
+ namedImports: [
7
+ { imported: 'AppManifest', typeOnly: true },
8
+ { imported: 'NavigatorNode', typeOnly: true },
9
+ { imported: 'RouteDefinition', typeOnly: true },
10
+ ],
11
+ },
12
+ {
13
+ source: '@ankhorage/studio/ui/useStudioAppBarAugmentation',
14
+ namedImports: [{ imported: 'useStudioAppBarAugmentation' }],
15
+ },
16
+ {
17
+ source: '@ankhorage/studio/routeUtils',
18
+ namedImports: [{ imported: 'resolveScreenIdForPathname' }],
19
+ },
20
+ { source: zoraEntrypoint, namedImports: [{ imported: 'AppBar' }] },
21
+ {
22
+ source: '@ankhorage/utility/object',
23
+ namedImports: [{ imported: 'readOwnProperty' }],
24
+ },
25
+ ];
26
+ }
27
+ /*** Generate the Studio app-header composition and manifest title resolution. */
28
+ export function getStudioAppHeaderTsx(imports) {
29
+ return `${imports}
30
+
31
+ export function StudioAppHeader({ appHeaderTitle }: { readonly appHeaderTitle: string }) {
32
+ const studioAppBar = useStudioAppBarAugmentation();
33
+ return (
34
+ <>
35
+ <AppBar title={appHeaderTitle} actions={studioAppBar.actions} />
36
+ {studioAppBar.overlays}
37
+ </>
38
+ );
39
+ }
40
+
41
+ export function resolveStudioAppHeaderTitle(args: {
42
+ readonly activeScreenId: string | null;
43
+ readonly pathname: string;
44
+ readonly previewMode: boolean;
45
+ readonly runtimeManifest: AppManifest;
46
+ readonly studioManifest: AppManifest | null;
47
+ }): string {
48
+ return resolveStudioPreviewHeaderTitle(args) ?? resolveRuntimeAppHeaderTitle(args);
49
+ }
50
+
51
+ function resolveStudioPreviewHeaderTitle({
52
+ activeScreenId,
53
+ previewMode,
54
+ runtimeManifest,
55
+ studioManifest,
56
+ }: Omit<Parameters<typeof resolveStudioAppHeaderTitle>[0], 'pathname'>): string | null {
57
+ if (!previewMode || !activeScreenId) return null;
58
+ const manifest = studioManifest ?? runtimeManifest;
59
+ const screen = readOwnProperty<AppManifest['screens'][string]>(manifest.screens, activeScreenId);
60
+ if (!screen) return null;
61
+ return (
62
+ findRouteByScreenId(manifest.navigator, activeScreenId)?.label ?? screen.title ?? screen.name
63
+ );
64
+ }
65
+
66
+ function resolveRuntimeAppHeaderTitle({
67
+ runtimeManifest,
68
+ pathname,
69
+ }: {
70
+ readonly pathname: string;
71
+ readonly runtimeManifest: AppManifest;
72
+ }): string {
73
+ const screenId = resolveScreenIdForPathname(
74
+ runtimeManifest.navigator,
75
+ pathname,
76
+ runtimeManifest.screens,
77
+ );
78
+ const screen = resolveManifestScreen(runtimeManifest, screenId);
79
+ const route = screenId ? findRouteByScreenId(runtimeManifest.navigator, screenId) : null;
80
+ return route?.label ?? screen?.title ?? screen?.name ?? route?.name ?? 'App';
81
+ }
82
+
83
+ function findRouteByScreenId(navigator: NavigatorNode, screenId: string): RouteDefinition | null {
84
+ for (const route of navigator.routes) {
85
+ if (route.screenId === screenId) return route;
86
+ if (route.navigator) {
87
+ const nestedRoute = findRouteByScreenId(route.navigator, screenId);
88
+ if (nestedRoute) return nestedRoute;
89
+ }
90
+ }
91
+ return null;
92
+ }
93
+
94
+ function resolveManifestScreen(manifest: AppManifest, screenId: string | null | undefined) {
95
+ return screenId
96
+ ? readOwnProperty<AppManifest['screens'][string]>(manifest.screens, screenId)
97
+ : undefined;
98
+ }
99
+ `;
100
+ }
101
+ //# sourceMappingURL=studioAppHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studioAppHeader.js","sourceRoot":"","sources":["../../../../src/host/layout/templates/studioAppHeader.ts"],"names":[],"mappings":"AAIA,6EAA6E;AAC7E,MAAM,UAAU,oCAAoC,CAClD,cAAiE;IAEjE,OAAO;QACL;YACE,MAAM,EAAE,sBAAsB;YAC9B,YAAY,EAAE;gBACZ,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC3C,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC7C,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;aAChD;SACF;QACD;YACE,MAAM,EAAE,kDAAkD;YAC1D,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,6BAA6B,EAAE,CAAC;SAC5D;QACD;YACE,MAAM,EAAE,8BAA8B;YACtC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,4BAA4B,EAAE,CAAC;SAC3D;QACD,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE;QAClE;YACE,MAAM,EAAE,2BAA2B;YACnC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;SAChD;KACF,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,OAAO,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsElB,CAAC;AACF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { GeneratedImportRequirement } from '../generatedImportComposer';
2
+ /***
3
+ * Describe the imports owned by the generated Studio authoring shell.
4
+ */
5
+ export declare function getStudioShellImportRequirements(zoraEntrypoint: '@ankhorage/zora' | '@ankhorage/zora/reader-free', zoraComponentRegistry: 'ZORA_COMPONENT_REGISTRY' | 'ZORA_BASE_COMPONENT_REGISTRY'): GeneratedImportRequirement[];
6
+ /***
7
+ * Generate the Studio-only authoring shell that owns editor interaction policy, preview wrapping and Studio app chrome.
8
+ */
9
+ export declare function getStudioShellTsx(args: {
10
+ readonly imports: string;
11
+ readonly zoraComponentRegistry: 'ZORA_COMPONENT_REGISTRY' | 'ZORA_BASE_COMPONENT_REGISTRY';
12
+ }): string;
13
+ //# sourceMappingURL=studioShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studioShell.d.ts","sourceRoot":"","sources":["../../../../src/host/layout/templates/studioShell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE7E;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,iBAAiB,GAAG,6BAA6B,EACjE,qBAAqB,EAAE,yBAAyB,GAAG,8BAA8B,GAChF,0BAA0B,EAAE,CA6E9B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,qBAAqB,EAAE,yBAAyB,GAAG,8BAA8B,CAAC;CAC5F,GAAG,MAAM,CAuOT"}