@ankhorage/templates 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +69 -13
- package/dist/generators/create-category-app.d.ts +1 -1
- package/dist/generators/create-category-app.d.ts.map +1 -1
- package/dist/generators/create-category-app.js +1 -1
- package/dist/generators/create-category-app.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/templates/shared/auth.d.ts +4 -0
- package/dist/templates/shared/auth.d.ts.map +1 -0
- package/dist/templates/shared/auth.js +4 -0
- package/dist/templates/shared/auth.js.map +1 -0
- package/dist/templates/shared/create-manifest-shell.d.ts +13 -0
- package/dist/templates/shared/create-manifest-shell.d.ts.map +1 -0
- package/dist/templates/shared/create-manifest-shell.js +18 -0
- package/dist/templates/shared/create-manifest-shell.js.map +1 -0
- package/dist/templates/shared/create-theme.d.ts +10 -0
- package/dist/templates/shared/create-theme.d.ts.map +1 -0
- package/dist/templates/shared/create-theme.js +19 -0
- package/dist/templates/shared/create-theme.js.map +1 -0
- package/dist/templates/shared/index.d.ts +7 -0
- package/dist/templates/shared/index.d.ts.map +1 -0
- package/dist/templates/shared/index.js +7 -0
- package/dist/templates/shared/index.js.map +1 -0
- package/dist/templates/shared/route.d.ts +10 -0
- package/dist/templates/shared/route.d.ts.map +1 -0
- package/dist/templates/shared/route.js +9 -0
- package/dist/templates/shared/route.js.map +1 -0
- package/dist/templates/shared/screen.d.ts +9 -0
- package/dist/templates/shared/screen.d.ts.map +1 -0
- package/dist/templates/shared/screen.js +10 -0
- package/dist/templates/shared/screen.js.map +1 -0
- package/dist/templates/shared/zora-node-helpers.d.ts +13 -0
- package/dist/templates/shared/zora-node-helpers.d.ts.map +1 -0
- package/dist/templates/shared/zora-node-helpers.js +28 -0
- package/dist/templates/shared/zora-node-helpers.js.map +1 -0
- package/dist/templates/starter/categories/fallback/default.template.d.ts +4 -0
- package/dist/templates/starter/categories/fallback/default.template.d.ts.map +1 -0
- package/dist/templates/starter/categories/fallback/default.template.js +17 -0
- package/dist/templates/starter/categories/fallback/default.template.js.map +1 -0
- package/dist/templates/starter/categories/fallback/index.d.ts +9 -0
- package/dist/templates/starter/categories/fallback/index.d.ts.map +1 -0
- package/dist/templates/starter/categories/fallback/index.js +11 -0
- package/dist/templates/starter/categories/fallback/index.js.map +1 -0
- package/dist/templates/starter/categories/fallback/routes.d.ts +10 -0
- package/dist/templates/starter/categories/fallback/routes.d.ts.map +1 -0
- package/dist/templates/starter/categories/fallback/routes.js +22 -0
- package/dist/templates/starter/categories/fallback/routes.js.map +1 -0
- package/dist/templates/starter/categories/fallback/screens.d.ts +5 -0
- package/dist/templates/starter/categories/fallback/screens.d.ts.map +1 -0
- package/dist/templates/starter/categories/fallback/screens.js +172 -0
- package/dist/templates/starter/categories/fallback/screens.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/content.d.ts +80 -0
- package/dist/templates/starter/categories/food-drink/content.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/content.js +100 -0
- package/dist/templates/starter/categories/food-drink/content.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/default.template.d.ts +4 -0
- package/dist/templates/starter/categories/food-drink/default.template.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/default.template.js +17 -0
- package/dist/templates/starter/categories/food-drink/default.template.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/index.d.ts +9 -0
- package/dist/templates/starter/categories/food-drink/index.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/index.js +11 -0
- package/dist/templates/starter/categories/food-drink/index.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/routes.d.ts +11 -0
- package/dist/templates/starter/categories/food-drink/routes.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/routes.js +49 -0
- package/dist/templates/starter/categories/food-drink/routes.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/screens.d.ts +5 -0
- package/dist/templates/starter/categories/food-drink/screens.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/screens.js +92 -0
- package/dist/templates/starter/categories/food-drink/screens.js.map +1 -0
- package/dist/templates/starter/categories/health-fitness/content.d.ts +80 -0
- package/dist/templates/starter/categories/health-fitness/content.d.ts.map +1 -0
- package/dist/templates/starter/categories/health-fitness/content.js +100 -0
- package/dist/templates/starter/categories/health-fitness/content.js.map +1 -0
- package/dist/templates/starter/categories/health-fitness/default.template.d.ts +4 -0
- package/dist/templates/starter/categories/health-fitness/default.template.d.ts.map +1 -0
- package/dist/templates/starter/categories/health-fitness/default.template.js +17 -0
- package/dist/templates/starter/categories/health-fitness/default.template.js.map +1 -0
- package/dist/templates/starter/categories/health-fitness/index.d.ts +9 -0
- package/dist/templates/starter/categories/health-fitness/index.d.ts.map +1 -0
- package/dist/templates/starter/categories/health-fitness/index.js +11 -0
- package/dist/templates/starter/categories/health-fitness/index.js.map +1 -0
- package/dist/templates/starter/categories/health-fitness/routes.d.ts +11 -0
- package/dist/templates/starter/categories/health-fitness/routes.d.ts.map +1 -0
- package/dist/templates/starter/categories/health-fitness/routes.js +49 -0
- package/dist/templates/starter/categories/health-fitness/routes.js.map +1 -0
- package/dist/templates/starter/categories/health-fitness/screens.d.ts +5 -0
- package/dist/templates/starter/categories/health-fitness/screens.d.ts.map +1 -0
- package/dist/templates/starter/categories/health-fitness/screens.js +88 -0
- package/dist/templates/starter/categories/health-fitness/screens.js.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/content.d.ts +80 -0
- package/dist/templates/starter/categories/shopping-commerce/content.d.ts.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/content.js +100 -0
- package/dist/templates/starter/categories/shopping-commerce/content.js.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/default.template.d.ts +4 -0
- package/dist/templates/starter/categories/shopping-commerce/default.template.d.ts.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/default.template.js +17 -0
- package/dist/templates/starter/categories/shopping-commerce/default.template.js.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/index.d.ts +9 -0
- package/dist/templates/starter/categories/shopping-commerce/index.d.ts.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/index.js +11 -0
- package/dist/templates/starter/categories/shopping-commerce/index.js.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/routes.d.ts +11 -0
- package/dist/templates/starter/categories/shopping-commerce/routes.d.ts.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/routes.js +49 -0
- package/dist/templates/starter/categories/shopping-commerce/routes.js.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/screens.d.ts +5 -0
- package/dist/templates/starter/categories/shopping-commerce/screens.d.ts.map +1 -0
- package/dist/templates/starter/categories/shopping-commerce/screens.js +88 -0
- package/dist/templates/starter/categories/shopping-commerce/screens.js.map +1 -0
- package/dist/templates/starter/categories/social-community/community.template.d.ts +4 -0
- package/dist/templates/starter/categories/social-community/community.template.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/community.template.js +17 -0
- package/dist/templates/starter/categories/social-community/community.template.js.map +1 -0
- package/dist/templates/starter/categories/social-community/content.d.ts +183 -0
- package/dist/templates/starter/categories/social-community/content.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/content.js +231 -0
- package/dist/templates/starter/categories/social-community/content.js.map +1 -0
- package/dist/templates/starter/categories/social-community/creator.template.d.ts +4 -0
- package/dist/templates/starter/categories/social-community/creator.template.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/creator.template.js +17 -0
- package/dist/templates/starter/categories/social-community/creator.template.js.map +1 -0
- package/dist/templates/starter/categories/social-community/index.d.ts +10 -0
- package/dist/templates/starter/categories/social-community/index.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/index.js +25 -0
- package/dist/templates/starter/categories/social-community/index.js.map +1 -0
- package/dist/templates/starter/categories/social-community/routes.community.d.ts +11 -0
- package/dist/templates/starter/categories/social-community/routes.community.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/routes.community.js +49 -0
- package/dist/templates/starter/categories/social-community/routes.community.js.map +1 -0
- package/dist/templates/starter/categories/social-community/routes.creator.d.ts +11 -0
- package/dist/templates/starter/categories/social-community/routes.creator.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/routes.creator.js +49 -0
- package/dist/templates/starter/categories/social-community/routes.creator.js.map +1 -0
- package/dist/templates/starter/categories/social-community/screens.community.d.ts +5 -0
- package/dist/templates/starter/categories/social-community/screens.community.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/screens.community.js +95 -0
- package/dist/templates/starter/categories/social-community/screens.community.js.map +1 -0
- package/dist/templates/starter/categories/social-community/screens.creator.d.ts +5 -0
- package/dist/templates/starter/categories/social-community/screens.creator.d.ts.map +1 -0
- package/dist/templates/starter/categories/social-community/screens.creator.js +95 -0
- package/dist/templates/starter/categories/social-community/screens.creator.js.map +1 -0
- package/dist/templates/starter/index.d.ts +2 -0
- package/dist/templates/starter/index.d.ts.map +1 -0
- package/dist/templates/starter/index.js +2 -0
- package/dist/templates/starter/index.js.map +1 -0
- package/dist/templates/starter/starter.registry.d.ts +5 -0
- package/dist/templates/starter/starter.registry.d.ts.map +1 -0
- package/dist/templates/starter/starter.registry.js +34 -0
- package/dist/templates/starter/starter.registry.js.map +1 -0
- package/dist/templates/starter/starter.template.d.ts +6 -0
- package/dist/templates/starter/starter.template.d.ts.map +1 -0
- package/dist/templates/starter/starter.template.js +8 -0
- package/dist/templates/starter/starter.template.js.map +1 -0
- package/dist/templates/starter/starter.types.d.ts +33 -0
- package/dist/templates/starter/starter.types.d.ts.map +1 -0
- package/dist/templates/starter/starter.types.js +2 -0
- package/dist/templates/starter/starter.types.js.map +1 -0
- package/dist/templates/starter.template.d.ts +1 -18
- package/dist/templates/starter.template.d.ts.map +1 -1
- package/dist/templates/starter.template.js +1 -214
- package/dist/templates/starter.template.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,22 +1,78 @@
|
|
|
1
|
-
# templates
|
|
1
|
+
# @ankhorage/templates
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Reusable Ankhorage app templates, presets, and manifest generators.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- Clean starting point
|
|
7
|
+
```ts
|
|
8
|
+
import { createCategoryAppManifest, createStarterTemplate } from '@ankhorage/templates';
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
const manifest = createCategoryAppManifest('social_community');
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const creatorManifest = createStarterTemplate(seed, {
|
|
13
|
+
templateId: 'creator',
|
|
14
|
+
});
|
|
15
|
+
```
|
|
15
16
|
|
|
16
|
-
##
|
|
17
|
+
## Category Starter Templates
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
Starter templates are category-aware. A category can expose one or more template variants.
|
|
20
|
+
For example, `social_community` provides a default community starter and a `creator`
|
|
21
|
+
starter.
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
Default resolution is deterministic:
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
- no `templateId` selects `default`
|
|
26
|
+
- an unknown template id falls back to that category's `default`
|
|
27
|
+
- an unregistered category falls back to `fallback/default`
|
|
28
|
+
|
|
29
|
+
The generated manifest includes category-specific routes, screens, copy, and route icons.
|
|
30
|
+
Icons use the existing route `icon: IconSpec` property from `@ankhorage/contracts`:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
{
|
|
34
|
+
name: 'groups',
|
|
35
|
+
screenId: 'social_community-community-starter-groups',
|
|
36
|
+
label: 'Groups',
|
|
37
|
+
icon: { provider: 'material-community', name: 'account-group-outline' },
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Auth behavior is not modeled as a visible navigation route in category templates. It remains
|
|
42
|
+
controlled by the manifest `infra` and `settings.authFlow` configuration. The original generic
|
|
43
|
+
starter remains available as the fallback template and preserves its existing sign-in screen.
|
|
44
|
+
|
|
45
|
+
## Current Templates
|
|
46
|
+
|
|
47
|
+
- `fallback/default`: Home, Details, Settings, Sign in
|
|
48
|
+
- `food_drink/default`: Discover, Menu, Reservations, Orders, Profile
|
|
49
|
+
- `health_fitness/default`: Today, Plans, Progress, Coach, Profile
|
|
50
|
+
- `shopping_commerce/default`: Browse, Search, Sell, Orders, Profile
|
|
51
|
+
- `social_community/default`: Feed, Groups, Messages, Profile, Settings
|
|
52
|
+
- `social_community/community`: Feed, Groups, Messages, Profile, Settings
|
|
53
|
+
- `social_community/creator`: Studio, Posts, Audience, Insights, Settings
|
|
54
|
+
|
|
55
|
+
Only categories that exist in `AppCategory` are registered. New category literals should be added
|
|
56
|
+
in `@ankhorage/contracts` before this package registers templates for them.
|
|
57
|
+
|
|
58
|
+
## Adding A Category Template
|
|
59
|
+
|
|
60
|
+
Add category-owned files under `src/templates/starter/categories/<category>/`:
|
|
61
|
+
|
|
62
|
+
- `content.ts` for category-specific copy and placeholder data
|
|
63
|
+
- `routes.ts` or `routes.<variant>.ts` for route names, labels, screen ids, and icons
|
|
64
|
+
- `screens.ts` or `screens.<variant>.ts` for ZORA node trees
|
|
65
|
+
- `<variant>.template.ts` for manifest assembly
|
|
66
|
+
- `index.ts` for `CategoryStarterTemplateDefinition` metadata
|
|
67
|
+
|
|
68
|
+
Register the category in `src/templates/starter/starter.registry.ts`. Keep shared behavior in
|
|
69
|
+
`src/templates/shared/*`; category wording and navigation should stay inside the category folder.
|
|
70
|
+
|
|
71
|
+
## Verification
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
bun run typecheck
|
|
75
|
+
bun run build
|
|
76
|
+
bun run lint
|
|
77
|
+
bun run test
|
|
78
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppCategory, AppManifest } from '@ankhorage/contracts';
|
|
2
2
|
import type { AppManifestOverrides } from '../internal/overrides';
|
|
3
|
-
import { type TemplateKind } from '../templates/starter
|
|
3
|
+
import { type TemplateKind } from '../templates/starter';
|
|
4
4
|
export declare function createCategoryAppManifest(category: AppCategory, template?: TemplateKind, overrides?: AppManifestOverrides): AppManifest;
|
|
5
5
|
//# sourceMappingURL=create-category-app.d.ts.map
|
|
@@ -1 +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
|
|
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,sBAAsB,CAAC;AAkEhF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,WAAW,EACrB,QAAQ,GAAE,YAAwB,EAClC,SAAS,CAAC,EAAE,oBAAoB,GAC/B,WAAW,CAGb"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mergeAppManifest } from '../internal/merge';
|
|
2
2
|
import { CATEGORY_PRESETS } from '../presets/category-presets';
|
|
3
|
-
import { createStarterTemplate } from '../templates/starter
|
|
3
|
+
import { createStarterTemplate } from '../templates/starter';
|
|
4
4
|
function resolveThemeModeValue(overrides, selector, fallback) {
|
|
5
5
|
const [firstTheme] = overrides?.themes ?? [];
|
|
6
6
|
return firstTheme ? selector(firstTheme) : fallback;
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"file":"create-category-app.js","sourceRoot":"","sources":["../../src/generators/create-category-app.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createCategoryAppManifest } from './generators/create-category-app';
|
|
2
2
|
export { CATEGORY_PRESETS, type CategoryPreset } from './presets/category-presets';
|
|
3
|
-
export { createStarterTemplate, TEMPLATE_KINDS, type TemplateKind, type TemplateSeed, } from './templates/starter
|
|
3
|
+
export { type CategoryStarterTemplateDefinition, createStarterTemplate, type StarterTemplateFactory, type StarterTemplateId, type StarterTemplateOptions, type StarterTemplateSelection, TEMPLATE_KINDS, type TemplateKind, type TemplateSeed, } from './templates/starter';
|
|
4
4
|
export { APP_CATEGORIES, type AppCategory } from '@ankhorage/contracts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +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,
|
|
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,KAAK,iCAAiC,EACtC,qBAAqB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createCategoryAppManifest } from './generators/create-category-app';
|
|
2
2
|
export { CATEGORY_PRESETS } from './presets/category-presets';
|
|
3
|
-
export { createStarterTemplate, TEMPLATE_KINDS, } from './templates/starter
|
|
3
|
+
export { createStarterTemplate, TEMPLATE_KINDS, } from './templates/starter';
|
|
4
4
|
export { APP_CATEGORIES } from '@ankhorage/contracts';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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,
|
|
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,EAEL,qBAAqB,EAKrB,cAAc,GAGf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAoB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/auth.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,YAAY,CAAC;AACpD,eAAO,MAAM,0BAA0B,YAAY,CAAC;AACpD,eAAO,MAAM,2BAA2B,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/templates/shared/auth.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG,SAAS,CAAC;AACpD,MAAM,CAAC,MAAM,0BAA0B,GAAG,SAAS,CAAC;AACpD,MAAM,CAAC,MAAM,2BAA2B,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AppManifest, ThemeConfig } from '@ankhorage/contracts';
|
|
2
|
+
export interface ManifestShellSeed {
|
|
3
|
+
appName: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createManifestShell(args: {
|
|
7
|
+
seed: ManifestShellSeed;
|
|
8
|
+
theme: ThemeConfig;
|
|
9
|
+
version: string;
|
|
10
|
+
navigator: AppManifest['navigator'];
|
|
11
|
+
screens: AppManifest['screens'];
|
|
12
|
+
}): AppManifest;
|
|
13
|
+
//# sourceMappingURL=create-manifest-shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-manifest-shell.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/create-manifest-shell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIrE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACpC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CACjC,GAAG,WAAW,CAed"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BASE_INFRA, BASE_SETTINGS } from '../../internal/defaults';
|
|
2
|
+
export function createManifestShell(args) {
|
|
3
|
+
return {
|
|
4
|
+
metadata: {
|
|
5
|
+
name: args.seed.appName,
|
|
6
|
+
slug: args.seed.slug,
|
|
7
|
+
version: args.version,
|
|
8
|
+
themeId: args.theme.id,
|
|
9
|
+
},
|
|
10
|
+
themes: [args.theme],
|
|
11
|
+
activeThemeId: args.theme.id,
|
|
12
|
+
infra: structuredClone(BASE_INFRA),
|
|
13
|
+
settings: structuredClone(BASE_SETTINGS),
|
|
14
|
+
navigator: args.navigator,
|
|
15
|
+
screens: args.screens,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=create-manifest-shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-manifest-shell.js","sourceRoot":"","sources":["../../../src/templates/shared/create-manifest-shell.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOpE,MAAM,UAAU,mBAAmB,CAAC,IAMnC;IACC,OAAO;QACL,QAAQ,EAAE;YACR,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;YACpB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;SACvB;QACD,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;QACpB,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;QAC5B,KAAK,EAAE,eAAe,CAAC,UAAU,CAAC;QAClC,QAAQ,EAAE,eAAe,CAAC,aAAa,CAAC;QACxC,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ThemeConfig } from '@ankhorage/contracts';
|
|
2
|
+
export interface CreateThemeSeed {
|
|
3
|
+
primaryColor: string;
|
|
4
|
+
harmony: ThemeConfig['light']['harmony'];
|
|
5
|
+
systemTone: ThemeConfig['light']['systemTone'];
|
|
6
|
+
themeId?: string;
|
|
7
|
+
themeName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function createTheme(seed: CreateThemeSeed): ThemeConfig;
|
|
10
|
+
//# sourceMappingURL=create-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-theme.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/create-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,eAAe;IAC9B,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,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAiB9D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DEFAULT_THEME_ID, DEFAULT_THEME_NAME } from '../../internal/defaults';
|
|
2
|
+
export function createTheme(seed) {
|
|
3
|
+
const themeId = seed.themeId ?? DEFAULT_THEME_ID;
|
|
4
|
+
return {
|
|
5
|
+
id: themeId,
|
|
6
|
+
name: seed.themeName ?? DEFAULT_THEME_NAME,
|
|
7
|
+
light: {
|
|
8
|
+
primaryColor: seed.primaryColor,
|
|
9
|
+
harmony: seed.harmony,
|
|
10
|
+
systemTone: seed.systemTone,
|
|
11
|
+
},
|
|
12
|
+
dark: {
|
|
13
|
+
primaryColor: seed.primaryColor,
|
|
14
|
+
harmony: seed.harmony,
|
|
15
|
+
systemTone: seed.systemTone,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=create-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-theme.js","sourceRoot":"","sources":["../../../src/templates/shared/create-theme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAU/E,MAAM,UAAU,WAAW,CAAC,IAAqB;IAC/C,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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DEFAULT_SIGN_IN_ROUTE_NAME, DEFAULT_SIGN_OUT_ROUTE_NAME, DEFAULT_SIGN_UP_ROUTE_NAME, } from './auth';
|
|
2
|
+
export { createManifestShell, type ManifestShellSeed } from './create-manifest-shell';
|
|
3
|
+
export { createTheme, type CreateThemeSeed } from './create-theme';
|
|
4
|
+
export { createRoute, type ManifestNavigator, type ManifestRoute } from './route';
|
|
5
|
+
export { createScreen } from './screen';
|
|
6
|
+
export { createHeader, createPage, createSection, createSettingsSection, createZoraNode, type ZoraNode, type ZoraNodeType, } from './zora-node-helpers';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DEFAULT_SIGN_IN_ROUTE_NAME, DEFAULT_SIGN_OUT_ROUTE_NAME, DEFAULT_SIGN_UP_ROUTE_NAME, } from './auth';
|
|
2
|
+
export { createManifestShell } from './create-manifest-shell';
|
|
3
|
+
export { createTheme } from './create-theme';
|
|
4
|
+
export { createRoute } from './route';
|
|
5
|
+
export { createScreen } from './screen';
|
|
6
|
+
export { createHeader, createPage, createSection, createSettingsSection, createZoraNode, } from './zora-node-helpers';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,mBAAmB,EAA0B,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,WAAW,EAAwB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,WAAW,EAA8C,MAAM,SAAS,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,cAAc,GAGf,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AppManifest, IconSpec, RouteDefinition } from '@ankhorage/contracts';
|
|
2
|
+
export type ManifestNavigator = AppManifest['navigator'];
|
|
3
|
+
export type ManifestRoute = RouteDefinition;
|
|
4
|
+
export declare function createRoute(args: {
|
|
5
|
+
name: string;
|
|
6
|
+
screenId: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: IconSpec;
|
|
9
|
+
}): ManifestRoute;
|
|
10
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;AACzD,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC;AAE5C,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,GAAG,aAAa,CAOhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,WAAW,CAAC,IAK3B;IACC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/screen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE/D,wBAAgB,YAAY,CAAC,IAAI,EAAE;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,UAAU,CAQb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.js","sourceRoot":"","sources":["../../../src/templates/shared/screen.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY,CAAC,IAM5B;IACC,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createZoraNode, type ZoraNode, type ZoraNodePropsByType } from '../../internal/zora-nodes';
|
|
2
|
+
export { createZoraNode };
|
|
3
|
+
export type { ZoraNode, ZoraNodeType } from '../../internal/zora-nodes';
|
|
4
|
+
export declare function createPage(id: string, props: ZoraNodePropsByType['Page'], children: ZoraNode[]): ZoraNode<'Page'>;
|
|
5
|
+
export declare function createHeader(id: string, props: ZoraNodePropsByType['PageHeader']): ZoraNode<'PageHeader'>;
|
|
6
|
+
export declare function createSection(id: string, props: ZoraNodePropsByType['PageSection'], children: ZoraNode[]): ZoraNode<'PageSection'>;
|
|
7
|
+
export declare function createSettingsSection(idPrefix: string, title: string, description: string, rows: readonly {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
meta?: string;
|
|
12
|
+
}[]): ZoraNode<'PageSection'>;
|
|
13
|
+
//# sourceMappingURL=zora-node-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zora-node-helpers.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/zora-node-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEpG,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAExE,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAClC,QAAQ,EAAE,QAAQ,EAAE,GACnB,QAAQ,CAAC,MAAM,CAAC,CAElB;AAED,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,mBAAmB,CAAC,YAAY,CAAC,GACvC,QAAQ,CAAC,YAAY,CAAC,CAExB;AAED,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,mBAAmB,CAAC,aAAa,CAAC,EACzC,QAAQ,EAAE,QAAQ,EAAE,GACnB,QAAQ,CAAC,aAAa,CAAC,CAEzB;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,SAAS;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,EAAE,GACF,QAAQ,CAAC,aAAa,CAAC,CAqBzB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createZoraNode } from '../../internal/zora-nodes';
|
|
2
|
+
export { createZoraNode };
|
|
3
|
+
export function createPage(id, props, children) {
|
|
4
|
+
return createZoraNode(id, 'Page', props, children);
|
|
5
|
+
}
|
|
6
|
+
export function createHeader(id, props) {
|
|
7
|
+
return createZoraNode(id, 'PageHeader', props);
|
|
8
|
+
}
|
|
9
|
+
export function createSection(id, props, children) {
|
|
10
|
+
return createZoraNode(id, 'PageSection', props, children);
|
|
11
|
+
}
|
|
12
|
+
export function createSettingsSection(idPrefix, title, description, rows) {
|
|
13
|
+
return createSection(`${idPrefix}-settings-section`, {
|
|
14
|
+
title,
|
|
15
|
+
description,
|
|
16
|
+
}, [
|
|
17
|
+
createZoraNode(`${idPrefix}-settings-header-row`, 'SectionHeader', {
|
|
18
|
+
title,
|
|
19
|
+
description,
|
|
20
|
+
}),
|
|
21
|
+
...rows.map((row) => createZoraNode(`${idPrefix}-${row.id}`, 'SettingsRow', {
|
|
22
|
+
title: row.title,
|
|
23
|
+
description: row.description,
|
|
24
|
+
...(row.meta ? { meta: row.meta } : {}),
|
|
25
|
+
})),
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=zora-node-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zora-node-helpers.js","sourceRoot":"","sources":["../../../src/templates/shared/zora-node-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA2C,MAAM,2BAA2B,CAAC;AAEpG,OAAO,EAAE,cAAc,EAAE,CAAC;AAG1B,MAAM,UAAU,UAAU,CACxB,EAAU,EACV,KAAkC,EAClC,QAAoB;IAEpB,OAAO,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,EAAU,EACV,KAAwC;IAExC,OAAO,cAAc,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,EAAU,EACV,KAAyC,EACzC,QAAoB;IAEpB,OAAO,cAAc,CAAC,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,QAAgB,EAChB,KAAa,EACb,WAAmB,EACnB,IAKG;IAEH,OAAO,aAAa,CAClB,GAAG,QAAQ,mBAAmB,EAC9B;QACE,KAAK;QACL,WAAW;KACZ,EACD;QACE,cAAc,CAAC,GAAG,QAAQ,sBAAsB,EAAE,eAAe,EAAE;YACjE,KAAK;YACL,WAAW;SACZ,CAAC;QACF,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAClB,cAAc,CAAC,GAAG,QAAQ,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE;YACrD,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxC,CAAC,CACH;KACF,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.template.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/fallback/default.template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,CAY7E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DEFAULT_TEMPLATE_VERSION } from '../../../../internal/defaults';
|
|
2
|
+
import { createManifestShell, createTheme } from '../../../shared';
|
|
3
|
+
import { createFallbackNavigator, createFallbackScreenIds } from './routes';
|
|
4
|
+
import { createFallbackScreens } from './screens';
|
|
5
|
+
export function createFallbackStarterTemplate(seed) {
|
|
6
|
+
const idPrefix = `${seed.category}-starter`;
|
|
7
|
+
const theme = createTheme(seed);
|
|
8
|
+
const screenIds = createFallbackScreenIds(idPrefix);
|
|
9
|
+
return createManifestShell({
|
|
10
|
+
seed,
|
|
11
|
+
theme,
|
|
12
|
+
version: seed.version ?? DEFAULT_TEMPLATE_VERSION,
|
|
13
|
+
navigator: createFallbackNavigator(screenIds),
|
|
14
|
+
screens: createFallbackScreens(seed, idPrefix, screenIds),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=default.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.template.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/fallback/default.template.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,UAAU,6BAA6B,CAAC,IAAkB;IAC9D,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,QAAQ,UAAU,CAAC;IAC5C,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAEpD,OAAO,mBAAmB,CAAC;QACzB,IAAI;QACJ,KAAK;QACL,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,wBAAwB;QACjD,SAAS,EAAE,uBAAuB,CAAC,SAAS,CAAC;QAC7C,OAAO,EAAE,qBAAqB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC;KAC1D,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createFallbackStarterTemplate } from './default.template';
|
|
2
|
+
export { createFallbackStarterTemplate } from './default.template';
|
|
3
|
+
export declare const fallbackStarterTemplates: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
create: typeof createFallbackStarterTemplate;
|
|
8
|
+
}[];
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/fallback/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE,eAAO,MAAM,wBAAwB;;;;;GAOmB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createFallbackStarterTemplate } from './default.template';
|
|
2
|
+
export { createFallbackStarterTemplate } from './default.template';
|
|
3
|
+
export const fallbackStarterTemplates = [
|
|
4
|
+
{
|
|
5
|
+
id: 'default',
|
|
6
|
+
label: 'Generic starter',
|
|
7
|
+
description: 'The original Home, Details, Settings, and Sign in starter manifest.',
|
|
8
|
+
create: createFallbackStarterTemplate,
|
|
9
|
+
},
|
|
10
|
+
];
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/fallback/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,qEAAqE;QAClF,MAAM,EAAE,6BAA6B;KACtC;CACqD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
export interface FallbackScreenIds {
|
|
3
|
+
home: string;
|
|
4
|
+
details: string;
|
|
5
|
+
settings: string;
|
|
6
|
+
signIn: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function createFallbackScreenIds(idPrefix: string): FallbackScreenIds;
|
|
9
|
+
export declare function createFallbackNavigator(screenIds: FallbackScreenIds): AppManifest['navigator'];
|
|
10
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/fallback/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAO3E;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,iBAAiB,GAAG,WAAW,CAAC,WAAW,CAAC,CAW9F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRoute } from '../../../shared';
|
|
2
|
+
export function createFallbackScreenIds(idPrefix) {
|
|
3
|
+
return {
|
|
4
|
+
home: `${idPrefix}-home`,
|
|
5
|
+
details: `${idPrefix}-details`,
|
|
6
|
+
settings: `${idPrefix}-settings`,
|
|
7
|
+
signIn: `${idPrefix}-sign-in`,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function createFallbackNavigator(screenIds) {
|
|
11
|
+
return {
|
|
12
|
+
type: 'stack',
|
|
13
|
+
initialRouteName: 'index',
|
|
14
|
+
routes: [
|
|
15
|
+
createRoute({ name: 'index', screenId: screenIds.home, label: 'Home' }),
|
|
16
|
+
createRoute({ name: 'details', screenId: screenIds.details, label: 'Details' }),
|
|
17
|
+
createRoute({ name: 'settings', screenId: screenIds.settings, label: 'Settings' }),
|
|
18
|
+
createRoute({ name: 'sign-in', screenId: screenIds.signIn, label: 'Sign in' }),
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/fallback/routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAS9C,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,OAAO;QACL,IAAI,EAAE,GAAG,QAAQ,OAAO;QACxB,OAAO,EAAE,GAAG,QAAQ,UAAU;QAC9B,QAAQ,EAAE,GAAG,QAAQ,WAAW;QAChC,MAAM,EAAE,GAAG,QAAQ,UAAU;KAC9B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAA4B;IAClE,OAAO;QACL,IAAI,EAAE,OAAO;QACb,gBAAgB,EAAE,OAAO;QACzB,MAAM,EAAE;YACN,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;YACvE,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;YAC/E,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;YAClF,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;SAC/E;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
import type { TemplateSeed } from '../../starter.types';
|
|
3
|
+
import type { FallbackScreenIds } from './routes';
|
|
4
|
+
export declare function createFallbackScreens(seed: TemplateSeed, idPrefix: string, screenIds: FallbackScreenIds): AppManifest['screens'];
|
|
5
|
+
//# sourceMappingURL=screens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/fallback/screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAQlD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,iBAAiB,GAC3B,WAAW,CAAC,SAAS,CAAC,CAuNxB"}
|