@ankhorage/templates 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +94 -0
  4. package/dist/generators/create-category-app.d.ts +5 -0
  5. package/dist/generators/create-category-app.d.ts.map +1 -0
  6. package/dist/generators/create-category-app.js +46 -0
  7. package/dist/generators/create-category-app.js.map +1 -0
  8. package/dist/index.d.ts +5 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +5 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/internal/defaults.d.ts +7 -0
  13. package/dist/internal/defaults.d.ts.map +1 -0
  14. package/dist/internal/defaults.js +48 -0
  15. package/dist/internal/defaults.js.map +1 -0
  16. package/dist/internal/merge.d.ts +4 -0
  17. package/dist/internal/merge.d.ts.map +1 -0
  18. package/dist/internal/merge.js +24 -0
  19. package/dist/internal/merge.js.map +1 -0
  20. package/dist/internal/overrides.d.ts +6 -0
  21. package/dist/internal/overrides.d.ts.map +1 -0
  22. package/dist/internal/overrides.js +2 -0
  23. package/dist/internal/overrides.js.map +1 -0
  24. package/dist/internal/zora-nodes.d.ts +86 -0
  25. package/dist/internal/zora-nodes.d.ts.map +1 -0
  26. package/dist/internal/zora-nodes.js +9 -0
  27. package/dist/internal/zora-nodes.js.map +1 -0
  28. package/dist/presets/category-presets.d.ts +14 -0
  29. package/dist/presets/category-presets.d.ts.map +1 -0
  30. package/dist/presets/category-presets.js +237 -0
  31. package/dist/presets/category-presets.js.map +1 -0
  32. package/dist/templates/starter.template.d.ts +19 -0
  33. package/dist/templates/starter.template.d.ts.map +1 -0
  34. package/dist/templates/starter.template.js +215 -0
  35. package/dist/templates/starter.template.js.map +1 -0
  36. package/package.json +44 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # @ankhorage/templates
2
+
3
+ ## 0.1.0
4
+
5
+ ### Initial release
6
+
7
+ - bootstrap the standalone `@ankhorage/templates` package
8
+ - add ZORA-based starter template generation
9
+ - separate category presets from template structure
10
+ - expose manifest generation through a root-only public API
11
+ - consume shared `AppCategory` and `APP_CATEGORIES` from `@ankhorage/contracts`
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ankhorage
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # @ankhorage/templates
2
+
3
+ Reusable app templates, presets, and manifest generators for Ankhorage.
4
+
5
+ This package is the single source of truth for application template structure and category branding defaults. It is designed to be consumed by the CLI, Studio, and future tooling without coupling template definitions to any one runtime.
6
+
7
+ ## Architecture
8
+
9
+ ```text
10
+ templates
11
+
12
+ zora
13
+
14
+ surface
15
+ ```
16
+
17
+ Consumers:
18
+
19
+ ```text
20
+ cli → templates
21
+ studio → templates
22
+ studio → zora
23
+ ```
24
+
25
+ ## What it provides
26
+
27
+ - template skeletons built on ZORA-oriented node definitions
28
+ - category presets separated from template structure
29
+ - manifest generators that compose templates and presets
30
+ - a root-only public API with no subpath exports
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ bun add @ankhorage/templates @ankhorage/contracts @ankhorage/zora
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```ts
41
+ import {
42
+ APP_CATEGORIES,
43
+ CATEGORY_PRESETS,
44
+ createCategoryAppManifest,
45
+ createStarterTemplate,
46
+ } from '@ankhorage/templates';
47
+
48
+ const manifest = createCategoryAppManifest('developer_tools', 'starter', {
49
+ metadata: {
50
+ name: 'Ops Console',
51
+ slug: 'ops-console',
52
+ },
53
+ });
54
+
55
+ const preset = CATEGORY_PRESETS.developer_tools;
56
+ const categories = APP_CATEGORIES;
57
+ ```
58
+
59
+ ## Public API
60
+
61
+ ```ts
62
+ export { APP_CATEGORIES, type AppCategory } from '@ankhorage/contracts';
63
+ export { CATEGORY_PRESETS, type CategoryPreset } from './presets/category-presets';
64
+ export {
65
+ createStarterTemplate,
66
+ TEMPLATE_KINDS,
67
+ type TemplateKind,
68
+ } from './templates/starter.template';
69
+ export { createCategoryAppManifest } from './generators/create-category-app';
70
+ ```
71
+
72
+ ## Package layout
73
+
74
+ ```text
75
+ src/
76
+ templates/
77
+ presets/
78
+ generators/
79
+ internal/
80
+ index.ts
81
+ ```
82
+
83
+ ## Development
84
+
85
+ ```bash
86
+ bun run typecheck
87
+ bun run build
88
+ bun run lint
89
+ bun test
90
+ ```
91
+
92
+ ## License
93
+
94
+ MIT
@@ -0,0 +1,5 @@
1
+ import type { AppCategory, AppManifest } from '@ankhorage/contracts';
2
+ import type { AppManifestOverrides } from '../internal/overrides';
3
+ import { type TemplateKind } from '../templates/starter.template';
4
+ export declare function createCategoryAppManifest(category: AppCategory, template?: TemplateKind, overrides?: AppManifestOverrides): AppManifest;
5
+ //# sourceMappingURL=create-category-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-category-app.d.ts","sourceRoot":"","sources":["../../src/generators/create-category-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAe,MAAM,sBAAsB,CAAC;AAGlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAkEzF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,WAAW,EACrB,QAAQ,GAAE,YAAwB,EAClC,SAAS,CAAC,EAAE,oBAAoB,GAC/B,WAAW,CAGb"}
@@ -0,0 +1,46 @@
1
+ import { mergeAppManifest } from '../internal/merge';
2
+ import { CATEGORY_PRESETS } from '../presets/category-presets';
3
+ import { createStarterTemplate } from '../templates/starter.template';
4
+ function resolveThemeModeValue(overrides, selector, fallback) {
5
+ const [firstTheme] = overrides?.themes ?? [];
6
+ return firstTheme ? selector(firstTheme) : fallback;
7
+ }
8
+ function resolveSeedName(category, overrides) {
9
+ return overrides?.metadata?.name ?? CATEGORY_PRESETS[category].defaultName;
10
+ }
11
+ function resolveSeedSlug(category, overrides) {
12
+ return overrides?.metadata?.slug ?? CATEGORY_PRESETS[category].defaultSlug;
13
+ }
14
+ function resolveSeedThemeId(overrides) {
15
+ return overrides?.activeThemeId ?? overrides?.metadata?.themeId;
16
+ }
17
+ const TEMPLATE_FACTORIES = {
18
+ starter: (category, overrides) => {
19
+ const preset = CATEGORY_PRESETS[category];
20
+ const version = overrides?.metadata?.version;
21
+ const themeId = resolveSeedThemeId(overrides);
22
+ const themeName = overrides?.themes?.[0]?.name;
23
+ return createStarterTemplate({
24
+ category,
25
+ categoryLabel: preset.label,
26
+ appName: resolveSeedName(category, overrides),
27
+ slug: resolveSeedSlug(category, overrides),
28
+ summary: preset.summary,
29
+ focusAreas: preset.focusAreas,
30
+ primaryColor: resolveThemeModeValue(overrides, (theme) => theme.light.primaryColor, preset.primaryColor),
31
+ harmony: resolveThemeModeValue(overrides, (theme) => theme.light.harmony, preset.harmony),
32
+ systemTone: resolveThemeModeValue(overrides, (theme) => theme.light.systemTone, preset.systemTone),
33
+ ...(version ? { version } : {}),
34
+ ...(themeId ? { themeId } : {}),
35
+ ...(themeName ? { themeName } : {}),
36
+ });
37
+ },
38
+ };
39
+ function createManifestFromTemplate(category, template, overrides) {
40
+ return TEMPLATE_FACTORIES[template](category, overrides);
41
+ }
42
+ export function createCategoryAppManifest(category, template = 'starter', overrides) {
43
+ const manifest = createManifestFromTemplate(category, template, overrides);
44
+ return mergeAppManifest(manifest, overrides);
45
+ }
46
+ //# sourceMappingURL=create-category-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-category-app.js","sourceRoot":"","sources":["../../src/generators/create-category-app.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAqB,MAAM,+BAA+B,CAAC;AAEzF,SAAS,qBAAqB,CAC5B,SAA2C,EAC3C,QAAwC,EACxC,QAAgB;IAEhB,MAAM,CAAC,UAAU,CAAC,GAAG,SAAS,EAAE,MAAM,IAAI,EAAE,CAAC;IAC7C,OAAO,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AACtD,CAAC;AAED,SAAS,eAAe,CAAC,QAAqB,EAAE,SAAgC;IAC9E,OAAO,SAAS,EAAE,QAAQ,EAAE,IAAI,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC;AAC7E,CAAC;AAED,SAAS,eAAe,CAAC,QAAqB,EAAE,SAAgC;IAC9E,OAAO,SAAS,EAAE,QAAQ,EAAE,IAAI,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC;AAC7E,CAAC;AAED,SAAS,kBAAkB,CA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AC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/B,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,SAAS,0BAA0B,CACjC,QAAqB,EACrB,QAAsB,EACtB,SAAgC;IAEhC,OAAO,kBAAkB,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,QAAqB,EACrB,WAAyB,SAAS,EAClC,SAAgC;IAEhC,MAAM,QAAQ,GAAG,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC3E,OAAO,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { createCategoryAppManifest } from './generators/create-category-app';
2
+ export { CATEGORY_PRESETS, type CategoryPreset } from './presets/category-presets';
3
+ export { createStarterTemplate, TEMPLATE_KINDS, type TemplateKind, type TemplateSeed, } from './templates/starter.template';
4
+ export { APP_CATEGORIES, type AppCategory } from '@ankhorage/contracts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export { createCategoryAppManifest } from './generators/create-category-app';
2
+ export { CATEGORY_PRESETS } from './presets/category-presets';
3
+ export { createStarterTemplate, TEMPLATE_KINDS, } from './templates/starter.template';
4
+ export { APP_CATEGORIES } from '@ankhorage/contracts';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAuB,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACL,qBAAqB,EACrB,cAAc,GAGf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAoB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AppManifest, InfraManifest } from '@ankhorage/contracts';
2
+ export declare const DEFAULT_TEMPLATE_VERSION = "1.0.0";
3
+ export declare const DEFAULT_THEME_ID = "default";
4
+ export declare const DEFAULT_THEME_NAME = "Default";
5
+ export declare const BASE_INFRA: InfraManifest;
6
+ export declare const BASE_SETTINGS: AppManifest['settings'];
7
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/internal/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEvE,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAChD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,eAAO,MAAM,UAAU,EAAE,aAgCxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,UAAU,CAUjD,CAAC"}
@@ -0,0 +1,48 @@
1
+ export const DEFAULT_TEMPLATE_VERSION = '1.0.0';
2
+ export const DEFAULT_THEME_ID = 'default';
3
+ export const DEFAULT_THEME_NAME = 'Default';
4
+ export const BASE_INFRA = {
5
+ database: {
6
+ provider: 'supabase',
7
+ tier: 'dev',
8
+ },
9
+ deployment: {
10
+ target: 'minikube',
11
+ monitoring: false,
12
+ },
13
+ auth: {
14
+ provider: 'supabase',
15
+ scope: 'global',
16
+ authorization: {
17
+ kind: 'ABAC',
18
+ engine: 'cerbos',
19
+ },
20
+ login: {
21
+ identifiers: ['email'],
22
+ },
23
+ registration: {
24
+ requiredFields: ['email', 'password'],
25
+ optionalFields: ['firstName', 'lastName'],
26
+ signupPolicy: 'autoSignIn',
27
+ },
28
+ profile: {
29
+ fields: ['email', 'firstName', 'lastName'],
30
+ },
31
+ },
32
+ networking: {
33
+ cdn: false,
34
+ },
35
+ plugins: [],
36
+ };
37
+ export const BASE_SETTINGS = {
38
+ authFlow: {
39
+ unauthorizedRoute: 'login',
40
+ loginRoute: 'login',
41
+ postLoginRoute: 'index',
42
+ },
43
+ localization: {
44
+ defaultLocale: 'en',
45
+ locales: ['en'],
46
+ },
47
+ };
48
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/internal/defaults.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAChD,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,QAAQ,EAAE;QACR,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,KAAK;KACZ;IACD,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,UAAU,EAAE,KAAK;KAClB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,QAAQ;QACf,aAAa,EAAE;YACb,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,QAAQ;SACjB;QACD,KAAK,EAAE;YACL,WAAW,EAAE,CAAC,OAAO,CAAC;SACvB;QACD,YAAY,EAAE;YACZ,cAAc,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;YACrC,cAAc,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;YACzC,YAAY,EAAE,YAAY;SAC3B;QACD,OAAO,EAAE;YACP,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC;SAC3C;KACF;IACD,UAAU,EAAE;QACV,GAAG,EAAE,KAAK;KACX;IACD,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA4B;IACpD,QAAQ,EAAE;QACR,iBAAiB,EAAE,OAAO;QAC1B,UAAU,EAAE,OAAO;QACnB,cAAc,EAAE,OAAO;KACxB;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,CAAC,IAAI,CAAC;KAChB;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AppManifest } from '@ankhorage/contracts';
2
+ import type { AppManifestOverrides } from './overrides';
3
+ export declare function mergeAppManifest(base: AppManifest, overrides?: AppManifestOverrides): AppManifest;
4
+ //# sourceMappingURL=merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/internal/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAmCxD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,oBAAoB,GAAG,WAAW,CAEjG"}
@@ -0,0 +1,24 @@
1
+ function isPlainObject(value) {
2
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
3
+ }
4
+ function mergeValue(base, override) {
5
+ if (override === undefined) {
6
+ return base;
7
+ }
8
+ if (Array.isArray(override)) {
9
+ return structuredClone(override);
10
+ }
11
+ if (!isPlainObject(base) || !isPlainObject(override)) {
12
+ return structuredClone(override);
13
+ }
14
+ const result = { ...base };
15
+ for (const [key, value] of Object.entries(override)) {
16
+ const current = result[key];
17
+ result[key] = mergeValue(current, value);
18
+ }
19
+ return result;
20
+ }
21
+ export function mergeAppManifest(base, overrides) {
22
+ return mergeValue(base, overrides);
23
+ }
24
+ //# sourceMappingURL=merge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/internal/merge.ts"],"names":[],"mappings":"AAIA,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,UAAU,CACjB,IAAO,EACP,QAAoE;IAEpE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,eAAe,CAAC,QAAQ,CAAM,CAAC;IACxC,CAAC;IAED,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrD,OAAO,eAAe,CAAC,QAAQ,CAAM,CAAC;IACxC,CAAC;IAED,MAAM,MAAM,GAA4B,EAAE,GAAG,IAAI,EAAE,CAAC;IAEpD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CACtB,OAAO,EACP,KAAmE,CACpE,CAAC;IACJ,CAAC;IAED,OAAO,MAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAiB,EAAE,SAAgC;IAClF,OAAO,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { AppManifest } from '@ankhorage/contracts';
2
+ export type OverrideShape<T> = T extends readonly unknown[] ? T : T extends object ? {
3
+ [K in keyof T]?: OverrideShape<T[K]>;
4
+ } : T;
5
+ export type AppManifestOverrides = OverrideShape<AppManifest>;
6
+ //# sourceMappingURL=overrides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../src/internal/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,OAAO,EAAE,GACvD,CAAC,GACD,CAAC,SAAS,MAAM,GACd;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACrC,GACD,CAAC,CAAC;AAER,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=overrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../src/internal/overrides.ts"],"names":[],"mappings":""}
@@ -0,0 +1,86 @@
1
+ import type { UiNode } from '@ankhorage/contracts';
2
+ import type { ButtonProps, CardProps, InputProps } from '@ankhorage/zora';
3
+ import type { AuthLayoutProps, PageHeaderProps, PageProps, PageSectionProps } from '@ankhorage/zora';
4
+ import type { EmptyStateProps, FormFieldProps, NoticeProps, PanelProps } from '@ankhorage/zora';
5
+ import type { SectionHeaderProps, SettingsRowProps } from '@ankhorage/zora';
6
+ type SerializablePageProps = Omit<PageProps, 'children' | 'footer' | 'header'>;
7
+ type SerializablePageHeaderProps = Omit<PageHeaderProps, 'actions' | 'meta' | 'title' | 'description' | 'eyebrow'> & {
8
+ title: string;
9
+ description?: string;
10
+ eyebrow?: string;
11
+ };
12
+ type SerializablePageSectionProps = Omit<PageSectionProps, 'actions' | 'children' | 'title' | 'description'> & {
13
+ title?: string;
14
+ description?: string;
15
+ };
16
+ type SerializablePanelProps = Omit<PanelProps, 'actions' | 'children' | 'description' | 'eyebrow' | 'footer' | 'title'> & {
17
+ title?: string;
18
+ description?: string;
19
+ eyebrow?: string;
20
+ footer?: string;
21
+ };
22
+ type SerializableCardProps = Omit<CardProps, 'actions' | 'children' | 'description' | 'eyebrow' | 'footer' | 'title'> & {
23
+ title?: string;
24
+ description?: string;
25
+ eyebrow?: string;
26
+ footer?: string;
27
+ };
28
+ type SerializableAuthLayoutProps = Omit<AuthLayoutProps, 'children' | 'description' | 'eyebrow' | 'footer' | 'title'> & {
29
+ title?: string;
30
+ description?: string;
31
+ eyebrow?: string;
32
+ footer?: string;
33
+ };
34
+ type SerializableSectionHeaderProps = Omit<SectionHeaderProps, 'actions' | 'description' | 'eyebrow' | 'title'> & {
35
+ title: string;
36
+ description?: string;
37
+ eyebrow?: string;
38
+ };
39
+ type SerializableFormFieldProps = Omit<FormFieldProps, 'children' | 'description' | 'helperText' | 'label'> & {
40
+ label: string;
41
+ description?: string;
42
+ helperText?: string;
43
+ };
44
+ type SerializableInputProps = Omit<InputProps, 'leadingIcon' | 'trailingIcon'>;
45
+ type SerializableButtonProps = Omit<ButtonProps, 'children'> & {
46
+ children?: string;
47
+ };
48
+ type SerializableNoticeProps = Omit<NoticeProps, 'actions' | 'children' | 'description' | 'title'> & {
49
+ title: string;
50
+ description?: string;
51
+ };
52
+ type SerializableSettingsRowProps = Omit<SettingsRowProps, 'control' | 'description' | 'meta' | 'onPress' | 'title'> & {
53
+ title: string;
54
+ description?: string;
55
+ meta?: string;
56
+ };
57
+ type SerializableEmptyStateProps = Omit<EmptyStateProps, 'description' | 'eyebrow' | 'footer' | 'primaryAction' | 'secondaryAction' | 'title'> & {
58
+ title: string;
59
+ description?: string;
60
+ eyebrow?: string;
61
+ footer?: string;
62
+ };
63
+ export interface ZoraNodePropsByType {
64
+ AuthLayout: SerializableAuthLayoutProps;
65
+ Button: SerializableButtonProps;
66
+ Card: SerializableCardProps;
67
+ EmptyState: SerializableEmptyStateProps;
68
+ FormField: SerializableFormFieldProps;
69
+ Input: SerializableInputProps;
70
+ Notice: SerializableNoticeProps;
71
+ Page: SerializablePageProps;
72
+ PageHeader: SerializablePageHeaderProps;
73
+ PageSection: SerializablePageSectionProps;
74
+ Panel: SerializablePanelProps;
75
+ SectionHeader: SerializableSectionHeaderProps;
76
+ SettingsRow: SerializableSettingsRowProps;
77
+ }
78
+ export type ZoraNodeType = keyof ZoraNodePropsByType;
79
+ export type ZoraNode<TType extends ZoraNodeType = ZoraNodeType> = Omit<UiNode, 'children' | 'props' | 'type'> & {
80
+ type: TType;
81
+ props?: ZoraNodePropsByType[TType];
82
+ children?: ZoraNode[];
83
+ };
84
+ export declare function createZoraNode<TType extends ZoraNodeType>(id: string, type: TType, props?: ZoraNodePropsByType[TType], children?: ZoraNode[]): ZoraNode<TType>;
85
+ export {};
86
+ //# sourceMappingURL=zora-nodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zora-nodes.d.ts","sourceRoot":"","sources":["../../src/internal/zora-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChG,OA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GACpB,QAAQ,CAAC,KAAK,CAAC,CAOjB"}
@@ -0,0 +1,9 @@
1
+ export function createZoraNode(id, type, props, children) {
2
+ return {
3
+ id,
4
+ type,
5
+ ...(props ? { props } : {}),
6
+ ...(children && children.length > 0 ? { children } : {}),
7
+ };
8
+ }
9
+ //# sourceMappingURL=zora-nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zora-nodes.js","sourceRoot":"","sources":["../../src/internal/zora-nodes.ts"],"names":[],"mappings":"AA8HA,MAAM,UAAU,cAAc,CAC5B,EAAU,EACV,IAAW,EACX,KAAkC,EAClC,QAAqB;IAErB,OAAO;QACL,EAAE;QACF,IAAI;QACJ,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3B,GAAG,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACzD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { AppCategory, ColorHarmony, SystemTone } from '@ankhorage/contracts';
2
+ export { APP_CATEGORIES } from '@ankhorage/contracts';
3
+ export interface CategoryPreset {
4
+ label: string;
5
+ defaultName: string;
6
+ defaultSlug: string;
7
+ primaryColor: string;
8
+ harmony: ColorHarmony;
9
+ systemTone: SystemTone;
10
+ summary: string;
11
+ focusAreas: readonly [string, string, string];
12
+ }
13
+ export declare const CATEGORY_PRESETS: Record<AppCategory, CategoryPreset>;
14
+ //# sourceMappingURL=category-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category-presets.d.ts","sourceRoot":"","sources":["../../src/presets/category-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAMD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,cAAc,CAuOhE,CAAC"}
@@ -0,0 +1,237 @@
1
+ export { APP_CATEGORIES } from '@ankhorage/contracts';
2
+ function createPreset(config) {
3
+ return config;
4
+ }
5
+ export const CATEGORY_PRESETS = {
6
+ books_reading: createPreset({
7
+ label: 'Books & Reading',
8
+ defaultName: 'Books & Reading',
9
+ defaultSlug: 'books-reading-app',
10
+ primaryColor: '#8B4513',
11
+ harmony: 'analogous',
12
+ systemTone: 'earth',
13
+ summary: 'reading lists, reviews, recommendations, and subscriptions',
14
+ focusAreas: ['Reading queue', 'Featured picks', 'Community notes'],
15
+ }),
16
+ business_productivity: createPreset({
17
+ label: 'Business & Productivity',
18
+ defaultName: 'Business & Productivity',
19
+ defaultSlug: 'business-productivity-app',
20
+ primaryColor: '#1D4ED8',
21
+ harmony: 'analogous',
22
+ systemTone: 'neutral',
23
+ summary: 'team coordination, goals, and execution tracking',
24
+ focusAreas: ['Active projects', 'Weekly priorities', 'Team updates'],
25
+ }),
26
+ developer_tools: createPreset({
27
+ label: 'Developer Tools',
28
+ defaultName: 'Developer Tools',
29
+ defaultSlug: 'developer-tools-app',
30
+ primaryColor: '#7C3AED',
31
+ harmony: 'triadic',
32
+ systemTone: 'jewel',
33
+ summary: 'release workflows, observability, and engineering operations',
34
+ focusAreas: ['Build status', 'Incident queue', 'Developer settings'],
35
+ }),
36
+ education_learning: createPreset({
37
+ label: 'Education & Learning',
38
+ defaultName: 'Education & Learning',
39
+ defaultSlug: 'education-learning-app',
40
+ primaryColor: '#4338CA',
41
+ harmony: 'analogous',
42
+ systemTone: 'pastel',
43
+ summary: 'courses, practice loops, and learner progress',
44
+ focusAreas: ['Current lessons', 'Practice plan', 'Milestone tracking'],
45
+ }),
46
+ entertainment_media: createPreset({
47
+ label: 'Entertainment & Media',
48
+ defaultName: 'Entertainment & Media',
49
+ defaultSlug: 'entertainment-media-app',
50
+ primaryColor: '#F97316',
51
+ harmony: 'complementary',
52
+ systemTone: 'jewel',
53
+ summary: 'content discovery, watchlists, and editorial highlights',
54
+ focusAreas: ['Featured releases', 'Continue watching', 'Trending topics'],
55
+ }),
56
+ finance_money: createPreset({
57
+ label: 'Finance & Money',
58
+ defaultName: 'Finance & Money',
59
+ defaultSlug: 'finance-money-app',
60
+ primaryColor: '#15803D',
61
+ harmony: 'analogous',
62
+ systemTone: 'neutral',
63
+ summary: 'balances, budgeting, and financial operations',
64
+ focusAreas: ['Cash overview', 'Budget health', 'Upcoming activity'],
65
+ }),
66
+ food_drink: createPreset({
67
+ label: 'Food & Drink',
68
+ defaultName: 'Food & Drink',
69
+ defaultSlug: 'food-drink-app',
70
+ primaryColor: '#EA580C',
71
+ harmony: 'analogous',
72
+ systemTone: 'earth',
73
+ summary: 'menus, ordering, and loyalty experiences',
74
+ focusAreas: ['Popular items', 'Order flow', 'Rewards status'],
75
+ }),
76
+ games: createPreset({
77
+ label: 'Games',
78
+ defaultName: 'Games',
79
+ defaultSlug: 'games-app',
80
+ primaryColor: '#7C3AED',
81
+ harmony: 'splitComplementary',
82
+ systemTone: 'fluorescent',
83
+ summary: 'quests, progression, and player engagement loops',
84
+ focusAreas: ['Daily quests', 'Progression', 'Social challenges'],
85
+ }),
86
+ graphics_design: createPreset({
87
+ label: 'Graphics & Design',
88
+ defaultName: 'Graphics & Design',
89
+ defaultSlug: 'graphics-design-app',
90
+ primaryColor: '#9333EA',
91
+ harmony: 'triadic',
92
+ systemTone: 'jewel',
93
+ summary: 'creative assets, reviews, and delivery workflows',
94
+ focusAreas: ['Current briefs', 'Asset review', 'Brand tokens'],
95
+ }),
96
+ health_fitness: createPreset({
97
+ label: 'Health & Fitness',
98
+ defaultName: 'Health & Fitness',
99
+ defaultSlug: 'health-fitness-app',
100
+ primaryColor: '#059669',
101
+ harmony: 'analogous',
102
+ systemTone: 'pastel',
103
+ summary: 'habits, activity tracking, and coaching plans',
104
+ focusAreas: ['Today plan', 'Progress rings', 'Recovery status'],
105
+ }),
106
+ kids_family: createPreset({
107
+ label: 'Kids & Family',
108
+ defaultName: 'Kids & Family',
109
+ defaultSlug: 'kids-family-app',
110
+ primaryColor: '#F97316',
111
+ harmony: 'splitComplementary',
112
+ systemTone: 'pastel',
113
+ summary: 'safe discovery, routines, and shared family coordination',
114
+ focusAreas: ['Daily routines', 'Favorites', 'Parent controls'],
115
+ }),
116
+ lifestyle: createPreset({
117
+ label: 'Lifestyle',
118
+ defaultName: 'Lifestyle',
119
+ defaultSlug: 'lifestyle-app',
120
+ primaryColor: '#DB2777',
121
+ harmony: 'analogous',
122
+ systemTone: 'jewel',
123
+ summary: 'memberships, routines, and curated recommendations',
124
+ focusAreas: ['Personal dashboard', 'Saved lists', 'Upcoming plans'],
125
+ }),
126
+ medical: createPreset({
127
+ label: 'Medical',
128
+ defaultName: 'Medical',
129
+ defaultSlug: 'medical-app',
130
+ primaryColor: '#0369A1',
131
+ harmony: 'analogous',
132
+ systemTone: 'neutral',
133
+ summary: 'care coordination, intake, and patient communication',
134
+ focusAreas: ['Appointments', 'Care team', 'Health records'],
135
+ }),
136
+ music_audio: createPreset({
137
+ label: 'Music & Audio',
138
+ defaultName: 'Music & Audio',
139
+ defaultSlug: 'music-audio-app',
140
+ primaryColor: '#7C3AED',
141
+ harmony: 'triadic',
142
+ systemTone: 'jewel',
143
+ summary: 'catalog browsing, playback, and creator discovery',
144
+ focusAreas: ['Featured mixes', 'Recent listening', 'Creator spotlight'],
145
+ }),
146
+ navigation_travel: createPreset({
147
+ label: 'Navigation & Travel',
148
+ defaultName: 'Navigation & Travel',
149
+ defaultSlug: 'navigation-travel-app',
150
+ primaryColor: '#0284C7',
151
+ harmony: 'analogous',
152
+ systemTone: 'neutral',
153
+ summary: 'planning, routing, and trip operations',
154
+ focusAreas: ['Trip planner', 'Saved places', 'Travel alerts'],
155
+ }),
156
+ news_magazines: createPreset({
157
+ label: 'News & Magazines',
158
+ defaultName: 'News & Magazines',
159
+ defaultSlug: 'news-magazines-app',
160
+ primaryColor: '#374151',
161
+ harmony: 'monochromatic',
162
+ systemTone: 'neutral',
163
+ summary: 'headlines, editorial curation, and subscriptions',
164
+ focusAreas: ['Top stories', 'Topics', 'Saved articles'],
165
+ }),
166
+ photo_video: createPreset({
167
+ label: 'Photo & Video',
168
+ defaultName: 'Photo & Video',
169
+ defaultSlug: 'photo-video-app',
170
+ primaryColor: '#6D28D9',
171
+ harmony: 'complementary',
172
+ systemTone: 'jewel',
173
+ summary: 'capture flows, asset libraries, and publishing',
174
+ focusAreas: ['Recent captures', 'Collections', 'Publishing queue'],
175
+ }),
176
+ reference: createPreset({
177
+ label: 'Reference',
178
+ defaultName: 'Reference',
179
+ defaultSlug: 'reference-app',
180
+ primaryColor: '#1D4ED8',
181
+ harmony: 'monochromatic',
182
+ systemTone: 'neutral',
183
+ summary: 'search, lookup, and structured knowledge discovery',
184
+ focusAreas: ['Quick lookup', 'Saved resources', 'Reference sets'],
185
+ }),
186
+ shopping_commerce: createPreset({
187
+ label: 'Shopping & Commerce',
188
+ defaultName: 'Shopping & Commerce',
189
+ defaultSlug: 'shopping-commerce-app',
190
+ primaryColor: '#EA580C',
191
+ harmony: 'analogous',
192
+ systemTone: 'earth',
193
+ summary: 'catalogs, carts, and fulfillment journeys',
194
+ focusAreas: ['Featured products', 'Cart state', 'Order tracking'],
195
+ }),
196
+ social_community: createPreset({
197
+ label: 'Social & Community',
198
+ defaultName: 'Social & Community',
199
+ defaultSlug: 'social-community-app',
200
+ primaryColor: '#2563EB',
201
+ harmony: 'complementary',
202
+ systemTone: 'jewel',
203
+ summary: 'feeds, groups, and community participation',
204
+ focusAreas: ['Community feed', 'Group highlights', 'Creator actions'],
205
+ }),
206
+ sports: createPreset({
207
+ label: 'Sports',
208
+ defaultName: 'Sports',
209
+ defaultSlug: 'sports-app',
210
+ primaryColor: '#DC2626',
211
+ harmony: 'splitComplementary',
212
+ systemTone: 'jewel',
213
+ summary: 'fixtures, scores, and fan engagement',
214
+ focusAreas: ['Live schedule', 'Standings', 'Team updates'],
215
+ }),
216
+ utilities_tools: createPreset({
217
+ label: 'Utilities & Tools',
218
+ defaultName: 'Utilities & Tools',
219
+ defaultSlug: 'utilities-tools-app',
220
+ primaryColor: '#374151',
221
+ harmony: 'monochromatic',
222
+ systemTone: 'neutral',
223
+ summary: 'task-driven workflows, controls, and quick actions',
224
+ focusAreas: ['Primary utilities', 'Saved shortcuts', 'Automation settings'],
225
+ }),
226
+ weather: createPreset({
227
+ label: 'Weather',
228
+ defaultName: 'Weather',
229
+ defaultSlug: 'weather-app',
230
+ primaryColor: '#0284C7',
231
+ harmony: 'analogous',
232
+ systemTone: 'pastel',
233
+ summary: 'conditions, alerts, and forecast planning',
234
+ focusAreas: ['Current conditions', 'Hourly forecast', 'Alerts'],
235
+ }),
236
+ };
237
+ //# sourceMappingURL=category-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category-presets.js","sourceRoot":"","sources":["../../src/presets/category-presets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAatD,SAAS,YAAY,CAAC,MAAsB;IAC1C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAwC;IACnE,aAAa,EAAE,YAAY,CAAC;QAC1B,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,SAAS;QAC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;QACpB,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,aAAa;QAC1B,YAAY,EAAE,SAAS;QACvB,OAAO,EAAE,WAAW;QACpB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,2CAA2C;QACpD,UAAU,EAAE,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,QAAQ,CAAC;KAChE,CAAC;CACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { AppCategory, AppManifest, ThemeConfig } from '@ankhorage/contracts';
2
+ export declare const TEMPLATE_KINDS: readonly ["starter"];
3
+ export type TemplateKind = (typeof TEMPLATE_KINDS)[number];
4
+ export interface TemplateSeed {
5
+ category: AppCategory;
6
+ categoryLabel: string;
7
+ appName: string;
8
+ slug: string;
9
+ summary: string;
10
+ focusAreas: readonly [string, string, string];
11
+ primaryColor: string;
12
+ harmony: ThemeConfig['light']['harmony'];
13
+ systemTone: ThemeConfig['light']['systemTone'];
14
+ version?: string;
15
+ themeId?: string;
16
+ themeName?: string;
17
+ }
18
+ export declare function createStarterTemplate(seed: TemplateSeed): AppManifest;
19
+ //# sourceMappingURL=starter.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"starter.template.d.ts","sourceRoot":"","sources":["../../src/templates/starter.template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAWlF,eAAO,MAAM,cAAc,sBAAuB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,WAAW,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;IACzC,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqBD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,CAuPrE"}
@@ -0,0 +1,215 @@
1
+ import { BASE_INFRA, BASE_SETTINGS, DEFAULT_TEMPLATE_VERSION, DEFAULT_THEME_ID, DEFAULT_THEME_NAME, } from '../internal/defaults';
2
+ import { createZoraNode } from '../internal/zora-nodes';
3
+ export const TEMPLATE_KINDS = ['starter'];
4
+ function createTheme(seed) {
5
+ const themeId = seed.themeId ?? DEFAULT_THEME_ID;
6
+ return {
7
+ id: themeId,
8
+ name: seed.themeName ?? DEFAULT_THEME_NAME,
9
+ light: {
10
+ primaryColor: seed.primaryColor,
11
+ harmony: seed.harmony,
12
+ systemTone: seed.systemTone,
13
+ },
14
+ dark: {
15
+ primaryColor: seed.primaryColor,
16
+ harmony: seed.harmony,
17
+ systemTone: seed.systemTone,
18
+ },
19
+ };
20
+ }
21
+ export function createStarterTemplate(seed) {
22
+ const idPrefix = `${seed.category}-starter`;
23
+ const theme = createTheme(seed);
24
+ const themeId = theme.id;
25
+ const version = seed.version ?? DEFAULT_TEMPLATE_VERSION;
26
+ const homeScreenId = `${idPrefix}-home`;
27
+ const detailsScreenId = `${idPrefix}-details`;
28
+ const settingsScreenId = `${idPrefix}-settings`;
29
+ const loginScreenId = `${idPrefix}-login`;
30
+ return {
31
+ metadata: {
32
+ name: seed.appName,
33
+ slug: seed.slug,
34
+ version,
35
+ themeId,
36
+ },
37
+ themes: [theme],
38
+ activeThemeId: themeId,
39
+ infra: structuredClone(BASE_INFRA),
40
+ settings: structuredClone(BASE_SETTINGS),
41
+ navigator: {
42
+ type: 'stack',
43
+ initialRouteName: 'index',
44
+ routes: [
45
+ { name: 'index', screenId: homeScreenId, label: 'Home' },
46
+ { name: 'details', screenId: detailsScreenId, label: 'Details' },
47
+ { name: 'settings', screenId: settingsScreenId, label: 'Settings' },
48
+ { name: 'login', screenId: loginScreenId, label: 'Login' },
49
+ ],
50
+ },
51
+ screens: {
52
+ [homeScreenId]: {
53
+ id: homeScreenId,
54
+ name: 'Home',
55
+ title: seed.appName,
56
+ description: `Starter experience for ${seed.categoryLabel}.`,
57
+ root: createZoraNode(`${idPrefix}-home-page`, 'Page', { width: 'wide', testID: `${idPrefix}-home-page` }, [
58
+ createZoraNode(`${idPrefix}-home-header`, 'PageHeader', {
59
+ eyebrow: seed.categoryLabel,
60
+ title: seed.appName,
61
+ description: `Starter experience for ${seed.summary}.`,
62
+ }),
63
+ createZoraNode(`${idPrefix}-home-section`, 'PageSection', {
64
+ title: 'Launch surface',
65
+ description: 'Use this starter as the base for navigation, content modules, and onboarding.',
66
+ }, [
67
+ createZoraNode(`${idPrefix}-overview-panel`, 'Panel', {
68
+ title: 'Preset-driven structure',
69
+ description: 'Templates define layout and flows. Presets inject category branding and defaults.',
70
+ tone: 'subtle',
71
+ }, [
72
+ createZoraNode(`${idPrefix}-overview-notice`, 'Notice', {
73
+ title: 'ZORA-first authoring',
74
+ description: 'This screen uses ZORA layout and pattern nodes instead of legacy Surface-only trees.',
75
+ tone: 'primary',
76
+ }),
77
+ createZoraNode(`${idPrefix}-focus-card-1`, 'Card', {
78
+ eyebrow: 'Focus area',
79
+ title: seed.focusAreas[0],
80
+ description: `Use this panel to shape the primary ${seed.categoryLabel.toLowerCase()} flow.`,
81
+ tone: 'outline',
82
+ }),
83
+ createZoraNode(`${idPrefix}-focus-card-2`, 'Card', {
84
+ eyebrow: 'Focus area',
85
+ title: seed.focusAreas[1],
86
+ description: 'Add the supporting content, filters, and state to match your product.',
87
+ tone: 'outline',
88
+ }),
89
+ createZoraNode(`${idPrefix}-focus-card-3`, 'Card', {
90
+ eyebrow: 'Focus area',
91
+ title: seed.focusAreas[2],
92
+ description: 'Keep the third block flexible for analytics, recommendations, or community features.',
93
+ tone: 'outline',
94
+ }),
95
+ createZoraNode(`${idPrefix}-overview-button`, 'Button', {
96
+ children: 'Customize this starter',
97
+ tone: 'primary',
98
+ emphasis: 'solid',
99
+ size: 'm',
100
+ fullWidth: true,
101
+ }),
102
+ ]),
103
+ ]),
104
+ ]),
105
+ },
106
+ [detailsScreenId]: {
107
+ id: detailsScreenId,
108
+ name: 'Details',
109
+ title: 'Details',
110
+ description: 'Secondary informational screen for the starter template.',
111
+ root: createZoraNode(`${idPrefix}-details-page`, 'Page', { width: 'default' }, [
112
+ createZoraNode(`${idPrefix}-details-header`, 'PageHeader', {
113
+ eyebrow: 'Starter module',
114
+ title: 'Detail screen',
115
+ description: 'Use this route for previews, drill-downs, or richer storytelling.',
116
+ }),
117
+ createZoraNode(`${idPrefix}-details-section`, 'PageSection', {
118
+ title: 'Placeholder state',
119
+ description: 'Replace the placeholder with ZORA cards, panels, or task-specific layouts.',
120
+ }, [
121
+ createZoraNode(`${idPrefix}-details-empty`, 'EmptyState', {
122
+ eyebrow: seed.categoryLabel,
123
+ title: 'Ready for detail content',
124
+ description: 'The starter keeps a secondary route available so navigation can evolve without structural rewrites.',
125
+ }),
126
+ ]),
127
+ ]),
128
+ },
129
+ [settingsScreenId]: {
130
+ id: settingsScreenId,
131
+ name: 'Settings',
132
+ title: 'Settings',
133
+ description: 'Configuration screen for starter defaults.',
134
+ root: createZoraNode(`${idPrefix}-settings-page`, 'Page', { width: 'default' }, [
135
+ createZoraNode(`${idPrefix}-settings-header`, 'PageHeader', {
136
+ eyebrow: 'Operations',
137
+ title: 'Settings',
138
+ description: 'Starter defaults for localization, auth flow, and deployment assumptions.',
139
+ }),
140
+ createZoraNode(`${idPrefix}-settings-section`, 'PageSection', {
141
+ title: 'Manifest defaults',
142
+ description: 'These rows mirror the baseline config shipped with the template package.',
143
+ }, [
144
+ createZoraNode(`${idPrefix}-settings-header-row`, 'SectionHeader', {
145
+ title: 'Initial configuration',
146
+ description: 'Tune these values or override them at generation time.',
147
+ }),
148
+ createZoraNode(`${idPrefix}-settings-row-locale`, 'SettingsRow', {
149
+ title: 'Default locale',
150
+ description: 'Localization starts with a single default locale.',
151
+ meta: 'en',
152
+ }),
153
+ createZoraNode(`${idPrefix}-settings-row-auth`, 'SettingsRow', {
154
+ title: 'Auth scope',
155
+ description: 'Global auth is enabled in the base infra profile.',
156
+ meta: 'global',
157
+ }),
158
+ createZoraNode(`${idPrefix}-settings-row-deploy`, 'SettingsRow', {
159
+ title: 'Deployment target',
160
+ description: 'The starter ships with a local minikube deployment target.',
161
+ meta: 'minikube',
162
+ }),
163
+ ]),
164
+ ]),
165
+ },
166
+ [loginScreenId]: {
167
+ id: loginScreenId,
168
+ name: 'Login',
169
+ title: 'Login',
170
+ description: 'Authentication entrypoint for the starter template.',
171
+ root: createZoraNode(`${idPrefix}-auth-layout`, 'AuthLayout', {
172
+ eyebrow: seed.categoryLabel,
173
+ title: `Sign in to ${seed.appName}`,
174
+ description: 'This starter includes a ZORA-based auth shell that matches the default global auth flow.',
175
+ footer: 'Swap provider-specific wiring in CLI or Studio while preserving the manifest structure.',
176
+ }, [
177
+ createZoraNode(`${idPrefix}-auth-notice`, 'Notice', {
178
+ title: 'Authentication placeholder',
179
+ description: 'Replace inputs and actions with your runtime binding once auth is connected.',
180
+ tone: 'neutral',
181
+ }),
182
+ createZoraNode(`${idPrefix}-auth-email-field`, 'FormField', {
183
+ label: 'Email',
184
+ description: 'Primary identifier',
185
+ required: true,
186
+ }, [
187
+ createZoraNode(`${idPrefix}-auth-email-input`, 'Input', {
188
+ placeholder: 'you@example.com',
189
+ autoCapitalize: 'none',
190
+ keyboardType: 'email-address',
191
+ }),
192
+ ]),
193
+ createZoraNode(`${idPrefix}-auth-password-field`, 'FormField', {
194
+ label: 'Password',
195
+ helperText: 'Use a secure password manager in production.',
196
+ required: true,
197
+ }, [
198
+ createZoraNode(`${idPrefix}-auth-password-input`, 'Input', {
199
+ placeholder: 'Password',
200
+ secureTextEntry: true,
201
+ }),
202
+ ]),
203
+ createZoraNode(`${idPrefix}-auth-submit`, 'Button', {
204
+ children: 'Continue',
205
+ tone: 'primary',
206
+ emphasis: 'solid',
207
+ size: 'm',
208
+ fullWidth: true,
209
+ }),
210
+ ]),
211
+ },
212
+ },
213
+ };
214
+ }
215
+ //# sourceMappingURL=starter.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"starter.template.js","sourceRoot":"","sources":["../../src/templates/starter.template.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,aAAa,EACb,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,CAAU,CAAC;AAmBnD,SAAS,WAAW,CAAC,IAAkB;IACrC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,gBAAgB,CAAC;IAEjD,OAAO;QACL,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,IAAI,CAAC,SAAS,IAAI,kBAAkB;QAC1C,KAAK,EAAE;YACL,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B;QACD,IAAI,EAAE;YACJ,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAkB;IACtD,MAAM,QAAQ,GAAG,GAAG,IAAI,C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ankhorage/templates",
3
+ "version": "0.1.0",
4
+ "description": "Reusable Ankhorage app templates, presets, and manifest generators.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "sideEffects": false,
11
+ "files": [
12
+ "dist",
13
+ "CHANGELOG.md"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
19
+ }
20
+ },
21
+ "main": "./dist/index.js",
22
+ "module": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "scripts": {
25
+ "build": "bun x tsc -p tsconfig.json",
26
+ "lint": "eslint . --max-warnings=0",
27
+ "format": "prettier --write .",
28
+ "format:check": "prettier --check .",
29
+ "typecheck": "bun x tsc -p tsconfig.json --noEmit && bun x tsc -p tsconfig.test.json --noEmit",
30
+ "test": "bun test",
31
+ "prepublishOnly": "bun run typecheck && bun run build && bun test"
32
+ },
33
+ "dependencies": {
34
+ "@ankhorage/contracts": "^0.0.3",
35
+ "@ankhorage/zora": "^0.0.2"
36
+ },
37
+ "devDependencies": {
38
+ "@ankhorage/devtools": "^1.0.0",
39
+ "@types/bun": "^1.3.12",
40
+ "@types/react": "^19.2.14",
41
+ "typescript": "^5.9.3"
42
+ },
43
+ "packageManager": "bun@1.3.11"
44
+ }