@ankhorage/templates 8.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/assets/templates/capability-proof/checker.svg +1 -0
- package/assets/templates/lifestyle/plant-journal/evidence/concepts/000-garden-plan-a2d8d3cd507c.png +0 -0
- package/assets/templates/lifestyle/plant-journal/evidence/concepts/001-plant-detail-985c72c412d0.png +0 -0
- package/assets/templates/lifestyle/plant-journal/evidence/concepts/002-care-log-a35946ee0127.png +0 -0
- package/assets/templates/lifestyle/plant-journal/runtime/mara-detail-28e8095ae2e5.png +0 -0
- package/assets/templates/lifestyle/plant-journal/runtime/mara-hero-f4bc5dae1e42.png +0 -0
- package/dist/catalog.d.ts +4 -3
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +1 -1
- package/dist/catalog.js.map +1 -1
- package/dist/commands.d.ts +4 -6
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +16 -14
- package/dist/commands.js.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/projectSeed.d.ts +4 -0
- package/dist/projectSeed.d.ts.map +1 -1
- package/dist/projectSeed.js +75 -5
- package/dist/projectSeed.js.map +1 -1
- package/dist/templates/starter/categories/lifestyle/index.d.ts +16 -2
- package/dist/templates/starter/categories/lifestyle/index.d.ts.map +1 -1
- package/dist/templates/starter/categories/lifestyle/index.js +9 -0
- package/dist/templates/starter/categories/lifestyle/index.js.map +1 -1
- package/dist/templates/starter/categories/lifestyle/plant-journal/assets.d.ts +8 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/assets.d.ts.map +1 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/assets.js +17 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/assets.js.map +1 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/index.d.ts +2 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/index.d.ts.map +1 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/index.js +2 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/index.js.map +1 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/manifest.d.ts +399 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/manifest.d.ts.map +1 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/manifest.js +381 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/manifest.js.map +1 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/template.d.ts +5 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/template.d.ts.map +1 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/template.js +21 -0
- package/dist/templates/starter/categories/lifestyle/plant-journal/template.js.map +1 -0
- package/dist/templates/starter/index.d.ts +2 -1
- package/dist/templates/starter/index.d.ts.map +1 -1
- package/dist/templates/starter/index.js +1 -0
- package/dist/templates/starter/index.js.map +1 -1
- package/dist/templates/starter/starter.assets.d.ts +22 -0
- package/dist/templates/starter/starter.assets.d.ts.map +1 -0
- package/dist/templates/starter/starter.assets.js +124 -0
- package/dist/templates/starter/starter.assets.js.map +1 -0
- package/dist/templates/starter/starter.template.d.ts +3 -4
- package/dist/templates/starter/starter.template.d.ts.map +1 -1
- package/dist/templates/starter/starter.template.js +4 -2
- package/dist/templates/starter/starter.template.js.map +1 -1
- package/dist/templates/starter/starter.types.d.ts +3 -0
- package/dist/templates/starter/starter.types.d.ts.map +1 -1
- package/dist/templates/starter/starter.types.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
export const AUTHORED_PLANT_JOURNAL_MANIFEST = {
|
|
2
|
+
metadata: {
|
|
3
|
+
name: 'Plant Journal',
|
|
4
|
+
slug: 'plant-journal',
|
|
5
|
+
version: '1.0.0',
|
|
6
|
+
category: 'lifestyle',
|
|
7
|
+
themeId: 'plant-journal',
|
|
8
|
+
},
|
|
9
|
+
themes: [
|
|
10
|
+
{
|
|
11
|
+
id: 'plant-journal',
|
|
12
|
+
name: 'Plant Journal',
|
|
13
|
+
light: {
|
|
14
|
+
primaryColor: '#9A4E36',
|
|
15
|
+
harmony: 'analogous',
|
|
16
|
+
},
|
|
17
|
+
dark: {
|
|
18
|
+
primaryColor: '#9A4E36',
|
|
19
|
+
harmony: 'analogous',
|
|
20
|
+
},
|
|
21
|
+
tokens: {
|
|
22
|
+
spacing: {
|
|
23
|
+
none: 0,
|
|
24
|
+
xs: 5,
|
|
25
|
+
s: 10,
|
|
26
|
+
m: 20,
|
|
27
|
+
l: 30,
|
|
28
|
+
xl: 40,
|
|
29
|
+
xxl: 60,
|
|
30
|
+
},
|
|
31
|
+
radii: {
|
|
32
|
+
none: 0,
|
|
33
|
+
s: 8,
|
|
34
|
+
m: 12,
|
|
35
|
+
l: 24,
|
|
36
|
+
full: 9999,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
activeThemeId: 'plant-journal',
|
|
42
|
+
splashScreen: {
|
|
43
|
+
backgroundColor: '#9A4E36',
|
|
44
|
+
image: './assets/splash/icon.png',
|
|
45
|
+
imageWidth: 160,
|
|
46
|
+
resizeMode: 'contain',
|
|
47
|
+
dark: {
|
|
48
|
+
backgroundColor: '#9A4E36',
|
|
49
|
+
image: './assets/splash/icon-dark.png',
|
|
50
|
+
imageWidth: 160,
|
|
51
|
+
resizeMode: 'contain',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
infra: {
|
|
55
|
+
database: {
|
|
56
|
+
provider: 'supabase',
|
|
57
|
+
tier: 'dev',
|
|
58
|
+
},
|
|
59
|
+
storage: {
|
|
60
|
+
provider: 'auto',
|
|
61
|
+
buckets: ['media'],
|
|
62
|
+
},
|
|
63
|
+
secretStore: {
|
|
64
|
+
provider: 'supabase-vault',
|
|
65
|
+
},
|
|
66
|
+
deployment: {
|
|
67
|
+
target: 'minikube',
|
|
68
|
+
monitoring: false,
|
|
69
|
+
},
|
|
70
|
+
auth: {
|
|
71
|
+
provider: 'supabase',
|
|
72
|
+
scope: 'global',
|
|
73
|
+
flow: {
|
|
74
|
+
signInRoute: 'sign-in',
|
|
75
|
+
signUpRoute: 'sign-up',
|
|
76
|
+
signOutRoute: 'sign-out',
|
|
77
|
+
forgotPasswordRoute: 'forgot-password',
|
|
78
|
+
postSignInRoute: '/',
|
|
79
|
+
unauthorizedRoute: 'sign-in',
|
|
80
|
+
},
|
|
81
|
+
signIn: {
|
|
82
|
+
identifiers: ['email'],
|
|
83
|
+
},
|
|
84
|
+
signUp: {
|
|
85
|
+
requiredFields: ['email', 'password'],
|
|
86
|
+
optionalFields: ['firstName', 'lastName'],
|
|
87
|
+
signUpPolicy: 'autoSignIn',
|
|
88
|
+
},
|
|
89
|
+
profile: {
|
|
90
|
+
fields: ['email', 'firstName', 'lastName'],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
networking: {
|
|
94
|
+
cdn: false,
|
|
95
|
+
},
|
|
96
|
+
modules: [],
|
|
97
|
+
},
|
|
98
|
+
settings: {
|
|
99
|
+
localization: {
|
|
100
|
+
defaultLocale: 'en',
|
|
101
|
+
locales: ['en'],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
navigator: {
|
|
105
|
+
type: 'tabs',
|
|
106
|
+
initialRouteName: 'garden',
|
|
107
|
+
routes: [
|
|
108
|
+
{
|
|
109
|
+
name: 'garden',
|
|
110
|
+
screenId: 'plant-journal-garden',
|
|
111
|
+
label: 'Garden',
|
|
112
|
+
icon: {
|
|
113
|
+
provider: 'material-community',
|
|
114
|
+
name: 'sprout',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'plants',
|
|
119
|
+
screenId: 'plant-journal-detail',
|
|
120
|
+
label: 'Plants',
|
|
121
|
+
icon: {
|
|
122
|
+
provider: 'material-community',
|
|
123
|
+
name: 'leaf',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'care-log',
|
|
128
|
+
screenId: 'plant-journal-care-log',
|
|
129
|
+
label: 'Care log',
|
|
130
|
+
icon: {
|
|
131
|
+
provider: 'material-community',
|
|
132
|
+
name: 'clipboard-check-outline',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
screens: {
|
|
138
|
+
'plant-journal-garden': {
|
|
139
|
+
id: 'plant-journal-garden',
|
|
140
|
+
name: 'Garden',
|
|
141
|
+
title: 'Your indoor garden',
|
|
142
|
+
description: 'A calm care plan for the plants that need you today.',
|
|
143
|
+
root: {
|
|
144
|
+
id: 'plant-journal-garden-screen',
|
|
145
|
+
type: 'Screen',
|
|
146
|
+
props: {
|
|
147
|
+
width: 'wide',
|
|
148
|
+
},
|
|
149
|
+
children: [
|
|
150
|
+
{
|
|
151
|
+
id: 'plant-journal-garden-header',
|
|
152
|
+
type: 'SectionHeader',
|
|
153
|
+
props: {
|
|
154
|
+
eyebrow: 'Plant Journal',
|
|
155
|
+
title: 'Your indoor garden',
|
|
156
|
+
description: 'A calm care plan for the plants that need you today.',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'plant-journal-garden-next-care',
|
|
161
|
+
type: 'ScreenSection',
|
|
162
|
+
props: {
|
|
163
|
+
title: 'Next care',
|
|
164
|
+
description: 'One small task keeps your garden in rhythm.',
|
|
165
|
+
},
|
|
166
|
+
children: [
|
|
167
|
+
{
|
|
168
|
+
id: 'plant-journal-garden-next-care-card',
|
|
169
|
+
type: 'Card',
|
|
170
|
+
props: {
|
|
171
|
+
eyebrow: 'Today',
|
|
172
|
+
title: 'Water Mara',
|
|
173
|
+
description: 'Check the top inch of soil before you water.',
|
|
174
|
+
tone: 'outline',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: 'plant-journal-garden-complete-care',
|
|
179
|
+
type: 'Button',
|
|
180
|
+
props: {
|
|
181
|
+
children: 'Mark as cared for',
|
|
182
|
+
color: 'primary',
|
|
183
|
+
variant: 'solid',
|
|
184
|
+
size: 'm',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: 'plant-journal-garden-plant-rail',
|
|
191
|
+
type: 'ContentRail',
|
|
192
|
+
props: {
|
|
193
|
+
itemSize: 'regular',
|
|
194
|
+
gap: 'm',
|
|
195
|
+
padding: 'm',
|
|
196
|
+
peek: 28,
|
|
197
|
+
showControls: true,
|
|
198
|
+
direction: 'auto',
|
|
199
|
+
motion: 'system',
|
|
200
|
+
accessibilityLabel: 'Plant collection',
|
|
201
|
+
previousLabel: 'Previous plant',
|
|
202
|
+
nextLabel: 'Next plant',
|
|
203
|
+
},
|
|
204
|
+
children: [
|
|
205
|
+
{
|
|
206
|
+
id: 'plant-journal-garden-mara-image',
|
|
207
|
+
type: 'Image',
|
|
208
|
+
props: {
|
|
209
|
+
source: {
|
|
210
|
+
mediaId: 'mara-hero',
|
|
211
|
+
},
|
|
212
|
+
alt: 'Mara, a healthy monstera in a terracotta pot by a window.',
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
'plant-journal-detail': {
|
|
221
|
+
id: 'plant-journal-detail',
|
|
222
|
+
name: 'Plant detail',
|
|
223
|
+
title: 'Mara, the monstera',
|
|
224
|
+
description: 'A focused view of light, watering, and growth notes.',
|
|
225
|
+
root: {
|
|
226
|
+
id: 'plant-journal-detail-screen',
|
|
227
|
+
type: 'Screen',
|
|
228
|
+
props: {
|
|
229
|
+
width: 'default',
|
|
230
|
+
},
|
|
231
|
+
children: [
|
|
232
|
+
{
|
|
233
|
+
id: 'plant-journal-detail-header',
|
|
234
|
+
type: 'SectionHeader',
|
|
235
|
+
props: {
|
|
236
|
+
eyebrow: 'Plant profile',
|
|
237
|
+
title: 'Mara, the monstera',
|
|
238
|
+
description: 'A focused view of light, watering, and growth notes.',
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: 'plant-journal-detail-image-rail',
|
|
243
|
+
type: 'ContentRail',
|
|
244
|
+
props: {
|
|
245
|
+
itemSize: 'wide',
|
|
246
|
+
gap: 'm',
|
|
247
|
+
padding: 'm',
|
|
248
|
+
peek: 24,
|
|
249
|
+
showControls: true,
|
|
250
|
+
direction: 'auto',
|
|
251
|
+
motion: 'system',
|
|
252
|
+
accessibilityLabel: 'Mara photo',
|
|
253
|
+
previousLabel: 'Previous photo',
|
|
254
|
+
nextLabel: 'Next photo',
|
|
255
|
+
},
|
|
256
|
+
children: [
|
|
257
|
+
{
|
|
258
|
+
id: 'plant-journal-detail-mara-image',
|
|
259
|
+
type: 'Image',
|
|
260
|
+
props: {
|
|
261
|
+
source: {
|
|
262
|
+
mediaId: 'mara-detail',
|
|
263
|
+
},
|
|
264
|
+
alt: "Close-up of Mara's healthy monstera leaf and an unfurling new leaf.",
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: 'plant-journal-detail-care-section',
|
|
271
|
+
type: 'ScreenSection',
|
|
272
|
+
props: {
|
|
273
|
+
title: 'Care rhythm',
|
|
274
|
+
description: 'A small record keeps the next decision clear.',
|
|
275
|
+
},
|
|
276
|
+
children: [
|
|
277
|
+
{
|
|
278
|
+
id: 'plant-journal-detail-care-card',
|
|
279
|
+
type: 'Card',
|
|
280
|
+
props: {
|
|
281
|
+
eyebrow: 'Light',
|
|
282
|
+
title: 'Bright, indirect light',
|
|
283
|
+
description: 'Rotate a quarter turn when new leaves lean toward the window.',
|
|
284
|
+
tone: 'subtle',
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
'plant-journal-care-log': {
|
|
293
|
+
id: 'plant-journal-care-log',
|
|
294
|
+
name: 'Care log',
|
|
295
|
+
title: 'Care that adds up',
|
|
296
|
+
description: 'A reassuring history of the small actions already complete.',
|
|
297
|
+
root: {
|
|
298
|
+
id: 'plant-journal-care-log-screen',
|
|
299
|
+
type: 'Screen',
|
|
300
|
+
props: {
|
|
301
|
+
width: 'default',
|
|
302
|
+
},
|
|
303
|
+
children: [
|
|
304
|
+
{
|
|
305
|
+
id: 'plant-journal-care-log-header',
|
|
306
|
+
type: 'SectionHeader',
|
|
307
|
+
props: {
|
|
308
|
+
eyebrow: 'Care log',
|
|
309
|
+
title: 'Care that adds up',
|
|
310
|
+
description: 'A reassuring history of the small actions already complete.',
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: 'plant-journal-care-log-section',
|
|
315
|
+
type: 'ScreenSection',
|
|
316
|
+
props: {
|
|
317
|
+
title: 'This week',
|
|
318
|
+
description: 'Completed actions stay visible without demanding attention.',
|
|
319
|
+
},
|
|
320
|
+
children: [
|
|
321
|
+
{
|
|
322
|
+
id: 'plant-journal-care-log-card',
|
|
323
|
+
type: 'Card',
|
|
324
|
+
props: {
|
|
325
|
+
eyebrow: 'Complete',
|
|
326
|
+
title: 'Leaf check recorded',
|
|
327
|
+
description: 'Mara has a new unfurling leaf and no dry edges.',
|
|
328
|
+
tone: 'outline',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: 'plant-journal-care-log-reminder',
|
|
333
|
+
type: 'Notice',
|
|
334
|
+
props: {
|
|
335
|
+
title: 'Next reminder',
|
|
336
|
+
description: 'Check soil moisture again in four days.',
|
|
337
|
+
color: 'success',
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
media: {
|
|
347
|
+
assets: {
|
|
348
|
+
'mara-detail': {
|
|
349
|
+
id: 'mara-detail',
|
|
350
|
+
name: 'Mara unfurling leaf',
|
|
351
|
+
kind: 'image',
|
|
352
|
+
source: {
|
|
353
|
+
kind: 'bundled',
|
|
354
|
+
path: 'assets/media/plant-journal/mara-detail-28e8095ae2e5.png',
|
|
355
|
+
},
|
|
356
|
+
contentType: 'image/png',
|
|
357
|
+
metadata: {
|
|
358
|
+
sizeBytes: 2073467,
|
|
359
|
+
width: 1024,
|
|
360
|
+
height: 1536,
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
'mara-hero': {
|
|
364
|
+
id: 'mara-hero',
|
|
365
|
+
name: 'Mara by the window',
|
|
366
|
+
kind: 'image',
|
|
367
|
+
source: {
|
|
368
|
+
kind: 'bundled',
|
|
369
|
+
path: 'assets/media/plant-journal/mara-hero-f4bc5dae1e42.png',
|
|
370
|
+
},
|
|
371
|
+
contentType: 'image/png',
|
|
372
|
+
metadata: {
|
|
373
|
+
sizeBytes: 2400112,
|
|
374
|
+
width: 1024,
|
|
375
|
+
height: 1536,
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/lifestyle/plant-journal/manifest.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,WAAW;QACrB,OAAO,EAAE,eAAe;KACzB;IACD,MAAM,EAAE;QACN;YACE,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE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;gCACrC,IAAI,EAAE,QAAQ;gCACd,KAAK,EAAE;oCACL,KAAK,EAAE,eAAe;oCACtB,WAAW,EAAE,yCAAyC;oCACtD,KAAK,EAAE,SAAS;iCACjB;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,EAAE,EAAE,aAAa;gBACjB,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,yDAAyD;iBAChE;gBACD,WAAW,EAAE,WAAW;gBACxB,QAAQ,EAAE;oBACR,SAAS,EAAE,OAAO;oBAClB,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,IAAI;iBACb;aACF;YACD,WAAW,EAAE;gBACX,EAAE,EAAE,WAAW;gBACf,IAAI,EAAE,oBAAoB;gBAC1B,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,uDAAuD;iBAC9D;gBACD,WAAW,EAAE,WAAW;gBACxB,QAAQ,EAAE;oBACR,SAAS,EAAE,OAAO;oBAClB,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,IAAI;iBACb;aACF;SACF;KACF;CACoB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
import type { TemplateSeed } from '../../../starter.types';
|
|
3
|
+
/*** Create the authored starter while applying the caller's canonical app identity and theme. */
|
|
4
|
+
export declare function createPlantJournalStarterTemplate(seed: TemplateSeed): AppManifest;
|
|
5
|
+
//# sourceMappingURL=template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/lifestyle/plant-journal/template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D,iGAAiG;AACjG,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,CAiBjF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AUTHORED_PLANT_JOURNAL_MANIFEST } from './manifest';
|
|
2
|
+
/*** Create the authored starter while applying the caller's canonical app identity and theme. */
|
|
3
|
+
export function createPlantJournalStarterTemplate(seed) {
|
|
4
|
+
const theme = seed.theme ?? AUTHORED_PLANT_JOURNAL_MANIFEST.themes[0];
|
|
5
|
+
if (theme === undefined) {
|
|
6
|
+
throw new Error('The authored template requires one resolved theme.');
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
...AUTHORED_PLANT_JOURNAL_MANIFEST,
|
|
10
|
+
metadata: {
|
|
11
|
+
...AUTHORED_PLANT_JOURNAL_MANIFEST.metadata,
|
|
12
|
+
name: seed.appName,
|
|
13
|
+
slug: seed.slug,
|
|
14
|
+
version: seed.version ?? AUTHORED_PLANT_JOURNAL_MANIFEST.metadata.version,
|
|
15
|
+
themeId: theme.id,
|
|
16
|
+
},
|
|
17
|
+
themes: [theme],
|
|
18
|
+
activeThemeId: theme.id,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/lifestyle/plant-journal/template.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAE7D,iGAAiG;AACjG,MAAM,UAAU,iCAAiC,CAAC,IAAkB;IAClE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACtE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IACD,OAAO;QACL,GAAG,+BAA+B;QAClC,QAAQ,EAAE;YACR,GAAG,+BAA+B,CAAC,QAAQ;YAC3C,IAAI,EAAE,IAAI,CAAC,OAAO;YAClB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,+BAA+B,CAAC,QAAQ,CAAC,OAAO;YACzE,OAAO,EAAE,KAAK,CAAC,EAAE;SAClB;QACD,MAAM,EAAE,CAAC,KAAK,CAAC;QACf,aAAa,EAAE,KAAK,CAAC,EAAE;KACxB,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createStarterTemplateArtifact, type StarterTemplateArtifact, type StarterTemplateAsset, type StarterTemplateAssetSummary, summarizeStarterTemplateAssets, TEMPLATE_IMAGE_CONTENT_TYPES, type TemplateImageContentType, validateStarterTemplateAssets, } from './starter.assets';
|
|
2
|
+
export { createStarterTemplate, listStarterTemplateSummaries, listStarterTemplates, listStarterTemplatesByCategory, resolveStarterTemplate, TEMPLATE_KINDS, type CategoryStarterTemplateDefinition, type StarterTemplateFactory, type StarterTemplateId, type StarterTemplateOptions, type StarterTemplateSelection, type StarterTemplateSummary, type StarterTemplateResult, type TemplateKind, type TemplateSeed, } from './starter.template';
|
|
2
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/starter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACtB,cAAc,EACd,KAAK,iCAAiC,EACtC,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/starter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,8BAA8B,EAC9B,4BAA4B,EAC5B,KAAK,wBAAwB,EAC7B,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACtB,cAAc,EACd,KAAK,iCAAiC,EACtC,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
export { createStarterTemplateArtifact, summarizeStarterTemplateAssets, TEMPLATE_IMAGE_CONTENT_TYPES, validateStarterTemplateAssets, } from './starter.assets';
|
|
1
2
|
export { createStarterTemplate, listStarterTemplateSummaries, listStarterTemplates, listStarterTemplatesByCategory, resolveStarterTemplate, TEMPLATE_KINDS, } from './starter.template';
|
|
2
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/starter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACtB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/starter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAI7B,8BAA8B,EAC9B,4BAA4B,EAE5B,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACtB,cAAc,GAUf,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
export declare const TEMPLATE_IMAGE_CONTENT_TYPES: readonly ["image/avif", "image/gif", "image/jpeg", "image/png", "image/svg+xml", "image/webp"];
|
|
3
|
+
export type TemplateImageContentType = (typeof TEMPLATE_IMAGE_CONTENT_TYPES)[number];
|
|
4
|
+
export interface StarterTemplateAsset {
|
|
5
|
+
readonly sourcePath: string;
|
|
6
|
+
readonly targetPath: string;
|
|
7
|
+
readonly contentType: TemplateImageContentType;
|
|
8
|
+
readonly sizeBytes: number;
|
|
9
|
+
readonly sha256: string;
|
|
10
|
+
}
|
|
11
|
+
export type StarterTemplateAssetSummary = Omit<StarterTemplateAsset, 'sourcePath'>;
|
|
12
|
+
export interface StarterTemplateArtifact {
|
|
13
|
+
readonly manifest: AppManifest;
|
|
14
|
+
readonly assets: readonly StarterTemplateAsset[];
|
|
15
|
+
}
|
|
16
|
+
/*** Compose one canonical starter artifact from a manifest and its distributable image files. */
|
|
17
|
+
export declare function createStarterTemplateArtifact(manifest: AppManifest, assets?: readonly StarterTemplateAsset[]): StarterTemplateArtifact;
|
|
18
|
+
/*** Validate and deterministically order the bundled image files owned by one starter manifest. */
|
|
19
|
+
export declare function validateStarterTemplateAssets(manifest: AppManifest, assets: readonly StarterTemplateAsset[]): readonly StarterTemplateAsset[];
|
|
20
|
+
/*** Describe distributable image assets without exposing their package-internal source paths. */
|
|
21
|
+
export declare function summarizeStarterTemplateAssets(assets: readonly StarterTemplateAsset[]): readonly StarterTemplateAssetSummary[];
|
|
22
|
+
//# sourceMappingURL=starter.assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter.assets.d.ts","sourceRoot":"","sources":["../../../src/templates/starter/starter.assets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,sBAAsB,CAAC;AAEpE,eAAO,MAAM,4BAA4B,gGAO/B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AAErF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,wBAAwB,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;AAEnF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAClD;AAWD,iGAAiG;AACjG,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,WAAW,EACrB,MAAM,GAAE,SAAS,oBAAoB,EAAO,GAC3C,uBAAuB,CAKzB;AAED,mGAAmG;AACnG,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,SAAS,oBAAoB,EAAE,GACtC,SAAS,oBAAoB,EAAE,CA+BjC;AAED,iGAAiG;AACjG,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,SAAS,oBAAoB,EAAE,GACtC,SAAS,2BAA2B,EAAE,CAOxC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { posix } from 'node:path';
|
|
2
|
+
export const TEMPLATE_IMAGE_CONTENT_TYPES = [
|
|
3
|
+
'image/avif',
|
|
4
|
+
'image/gif',
|
|
5
|
+
'image/jpeg',
|
|
6
|
+
'image/png',
|
|
7
|
+
'image/svg+xml',
|
|
8
|
+
'image/webp',
|
|
9
|
+
];
|
|
10
|
+
const CONTENT_TYPE_EXTENSIONS = {
|
|
11
|
+
'image/avif': ['.avif'],
|
|
12
|
+
'image/gif': ['.gif'],
|
|
13
|
+
'image/jpeg': ['.jpeg', '.jpg'],
|
|
14
|
+
'image/png': ['.png'],
|
|
15
|
+
'image/svg+xml': ['.svg'],
|
|
16
|
+
'image/webp': ['.webp'],
|
|
17
|
+
};
|
|
18
|
+
/*** Compose one canonical starter artifact from a manifest and its distributable image files. */
|
|
19
|
+
export function createStarterTemplateArtifact(manifest, assets = []) {
|
|
20
|
+
return {
|
|
21
|
+
manifest,
|
|
22
|
+
assets: validateStarterTemplateAssets(manifest, assets),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/*** Validate and deterministically order the bundled image files owned by one starter manifest. */
|
|
26
|
+
export function validateStarterTemplateAssets(manifest, assets) {
|
|
27
|
+
const bundledMedia = collectBundledImageMedia(manifest);
|
|
28
|
+
const assetsByTarget = new Map();
|
|
29
|
+
const sourcePaths = new Set();
|
|
30
|
+
for (const asset of assets) {
|
|
31
|
+
validateAssetDescriptor(asset);
|
|
32
|
+
if (assetsByTarget.has(asset.targetPath)) {
|
|
33
|
+
throw new Error(`Starter template asset target is duplicated: ${asset.targetPath}`);
|
|
34
|
+
}
|
|
35
|
+
if (sourcePaths.has(asset.sourcePath)) {
|
|
36
|
+
throw new Error(`Starter template asset source is duplicated: ${asset.sourcePath}`);
|
|
37
|
+
}
|
|
38
|
+
assetsByTarget.set(asset.targetPath, asset);
|
|
39
|
+
sourcePaths.add(asset.sourcePath);
|
|
40
|
+
}
|
|
41
|
+
for (const [targetPath, mediaAsset] of bundledMedia) {
|
|
42
|
+
const asset = assetsByTarget.get(targetPath);
|
|
43
|
+
if (asset === undefined) {
|
|
44
|
+
throw new Error(`Bundled manifest image is missing its template asset: ${targetPath}`);
|
|
45
|
+
}
|
|
46
|
+
validateMediaMatchesAsset(mediaAsset, asset);
|
|
47
|
+
}
|
|
48
|
+
for (const targetPath of assetsByTarget.keys()) {
|
|
49
|
+
if (!bundledMedia.has(targetPath)) {
|
|
50
|
+
throw new Error(`Template asset is not referenced by bundled manifest media: ${targetPath}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return [...assets].sort((left, right) => left.targetPath.localeCompare(right.targetPath));
|
|
54
|
+
}
|
|
55
|
+
/*** Describe distributable image assets without exposing their package-internal source paths. */
|
|
56
|
+
export function summarizeStarterTemplateAssets(assets) {
|
|
57
|
+
return assets.map((asset) => ({
|
|
58
|
+
targetPath: asset.targetPath,
|
|
59
|
+
contentType: asset.contentType,
|
|
60
|
+
sizeBytes: asset.sizeBytes,
|
|
61
|
+
sha256: asset.sha256,
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
/*** Collect unique bundled image media by app-relative target path. */
|
|
65
|
+
function collectBundledImageMedia(manifest) {
|
|
66
|
+
const bundledMedia = new Map();
|
|
67
|
+
for (const mediaAsset of Object.values(manifest.media?.assets ?? {})) {
|
|
68
|
+
if (mediaAsset.source.kind !== 'bundled')
|
|
69
|
+
continue;
|
|
70
|
+
if (mediaAsset.kind !== 'image') {
|
|
71
|
+
throw new Error(`Starter template bundled media must be an image: ${mediaAsset.id}`);
|
|
72
|
+
}
|
|
73
|
+
validateRelativePath(mediaAsset.source.path, 'assets/', 'Bundled manifest image path');
|
|
74
|
+
if (bundledMedia.has(mediaAsset.source.path)) {
|
|
75
|
+
throw new Error(`Bundled manifest image path is duplicated: ${mediaAsset.source.path}`);
|
|
76
|
+
}
|
|
77
|
+
bundledMedia.set(mediaAsset.source.path, mediaAsset);
|
|
78
|
+
}
|
|
79
|
+
return bundledMedia;
|
|
80
|
+
}
|
|
81
|
+
/*** Validate one immutable packaged-source to generated-target image descriptor. */
|
|
82
|
+
function validateAssetDescriptor(asset) {
|
|
83
|
+
validateRelativePath(asset.sourcePath, 'assets/templates/', 'Template asset source path');
|
|
84
|
+
validateRelativePath(asset.targetPath, 'assets/', 'Template asset target path');
|
|
85
|
+
if (!isTemplateImageContentType(asset.contentType)) {
|
|
86
|
+
throw new Error(`Unsupported template image content type: ${String(asset.contentType)}`);
|
|
87
|
+
}
|
|
88
|
+
const extension = posix.extname(asset.targetPath).toLowerCase();
|
|
89
|
+
if (!CONTENT_TYPE_EXTENSIONS[asset.contentType].includes(extension)) {
|
|
90
|
+
throw new Error(`Template asset extension ${extension || '(missing)'} does not match ${asset.contentType}.`);
|
|
91
|
+
}
|
|
92
|
+
if (!Number.isSafeInteger(asset.sizeBytes) || asset.sizeBytes <= 0) {
|
|
93
|
+
throw new Error(`Template asset size must be a positive safe integer: ${asset.targetPath}`);
|
|
94
|
+
}
|
|
95
|
+
if (!/^[0-9a-f]{64}$/u.test(asset.sha256)) {
|
|
96
|
+
throw new Error(`Template asset sha256 must be 64 lowercase hex characters: ${asset.targetPath}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/*** Require manifest image metadata to describe the same immutable file as its bundle entry. */
|
|
100
|
+
function validateMediaMatchesAsset(mediaAsset, asset) {
|
|
101
|
+
if (mediaAsset.contentType !== asset.contentType) {
|
|
102
|
+
throw new Error(`Bundled manifest image content type differs from its asset: ${asset.targetPath}`);
|
|
103
|
+
}
|
|
104
|
+
if (mediaAsset.metadata?.sizeBytes !== asset.sizeBytes) {
|
|
105
|
+
throw new Error(`Bundled manifest image size differs from its asset: ${asset.targetPath}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/*** Require a normalized portable relative path below its canonical owned prefix. */
|
|
109
|
+
function validateRelativePath(value, prefix, label) {
|
|
110
|
+
const segments = value.split('/');
|
|
111
|
+
if (value === '' ||
|
|
112
|
+
value.startsWith('/') ||
|
|
113
|
+
value.includes('\\') ||
|
|
114
|
+
posix.normalize(value) !== value ||
|
|
115
|
+
!value.startsWith(prefix) ||
|
|
116
|
+
segments.some((segment) => segment === '' || segment === '.' || segment === '..')) {
|
|
117
|
+
throw new Error(`${label} must be a normalized relative path below ${prefix}: ${value}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/*** Narrow an unknown content type to the canonical template-image inventory. */
|
|
121
|
+
function isTemplateImageContentType(value) {
|
|
122
|
+
return TEMPLATE_IMAGE_CONTENT_TYPES.some((contentType) => contentType === value);
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=starter.assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter.assets.js","sourceRoot":"","sources":["../../../src/templates/starter/starter.assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlC,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;IACX,eAAe;IACf,YAAY;CACJ,CAAC;AAmBX,MAAM,uBAAuB,GAAkE;IAC7F,YAAY,EAAE,CAAC,OAAO,CAAC;IACvB,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IAC/B,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,eAAe,EAAE,CAAC,MAAM,CAAC;IACzB,YAAY,EAAE,CAAC,OAAO,CAAC;CACxB,CAAC;AAEF,iGAAiG;AACjG,MAAM,UAAU,6BAA6B,CAC3C,QAAqB,EACrB,SAA0C,EAAE;IAE5C,OAAO;QACL,QAAQ;QACR,MAAM,EAAE,6BAA6B,CAAC,QAAQ,EAAE,MAAM,CAAC;KACxD,CAAC;AACJ,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,6BAA6B,CAC3C,QAAqB,EACrB,MAAuC;IAEvC,MAAM,YAAY,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,cAAc,GAAG,IAAI,GAAG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AAK,CAAC,UAAU,EAAE,CAClF,CAAC;IACJ,CAAC;IACD,IAAI,UAAU,CAAC,QAAQ,EAAE,SAAS,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,uDAAuD,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;IAC7F,CAAC;AACH,CAAC;AAED,qFAAqF;AACrF,SAAS,oBAAoB,CAAC,KAAa,EAAE,MAAc,EAAE,KAAa;IACxE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IACE,KAAK,KAAK,EAAE;QACZ,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;QACrB,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;QACpB,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,KAAK;QAChC,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,IAAI,OAAO,KAAK,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,EACjF,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,6CAA6C,MAAM,KAAK,KAAK,EAAE,CAAC,CAAC;IAC3F,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,SAAS,0BAA0B,CAAC,KAAc;IAChD,OAAO,4BAA4B,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
1
|
import { listStarterTemplateSummaries, listStarterTemplates, listStarterTemplatesByCategory, resolveStarterTemplate } from './starter.registry';
|
|
3
|
-
import { TEMPLATE_KINDS, type StarterTemplateOptions, type TemplateSeed } from './starter.types';
|
|
2
|
+
import { TEMPLATE_KINDS, type StarterTemplateOptions, type StarterTemplateResult, type TemplateSeed } from './starter.types';
|
|
4
3
|
export { TEMPLATE_KINDS };
|
|
5
4
|
export { listStarterTemplateSummaries, listStarterTemplates, listStarterTemplatesByCategory, resolveStarterTemplate, };
|
|
6
|
-
export type { CategoryStarterTemplateDefinition, StarterTemplateFactory, StarterTemplateId, StarterTemplateOptions, StarterTemplateSelection, StarterTemplateSummary, TemplateKind, TemplateSeed, } from './starter.types';
|
|
7
|
-
export declare function createStarterTemplate(seed: TemplateSeed, options?: StarterTemplateOptions):
|
|
5
|
+
export type { CategoryStarterTemplateDefinition, StarterTemplateFactory, StarterTemplateId, StarterTemplateOptions, StarterTemplateSelection, StarterTemplateSummary, StarterTemplateResult, TemplateKind, TemplateSeed, } from './starter.types';
|
|
6
|
+
export declare function createStarterTemplate(seed: TemplateSeed, options?: StarterTemplateOptions): StarterTemplateResult;
|
|
8
7
|
//# sourceMappingURL=starter.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"starter.template.d.ts","sourceRoot":"","sources":["../../../src/templates/starter/starter.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"starter.template.d.ts","sourceRoot":"","sources":["../../../src/templates/starter/starter.template.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,GACvB,CAAC;AACF,YAAY,EACV,iCAAiC,EACjC,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,EACZ,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,YAAY,EAClB,OAAO,GAAE,sBAA2B,GACnC,qBAAqB,CAMvB"}
|