@treasuryspatial/render-kit 0.1.13 → 0.1.15

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 (31) hide show
  1. package/dist/prompt-pack/env.d.ts +10 -0
  2. package/dist/prompt-pack/env.d.ts.map +1 -0
  3. package/dist/prompt-pack/env.js +47 -0
  4. package/dist/prompt-pack/index.d.ts +1 -0
  5. package/dist/prompt-pack/index.d.ts.map +1 -1
  6. package/dist/prompt-pack/index.js +1 -0
  7. package/dist/prompt-pack/packs/courtyard.design.d.ts +498 -0
  8. package/dist/prompt-pack/packs/courtyard.design.d.ts.map +1 -0
  9. package/dist/prompt-pack/packs/courtyard.design.js +1558 -0
  10. package/dist/prompt-pack/packs/courtyard.imagine.d.ts +493 -0
  11. package/dist/prompt-pack/packs/courtyard.imagine.d.ts.map +1 -0
  12. package/dist/prompt-pack/packs/courtyard.imagine.js +1579 -0
  13. package/dist/prompt-pack/packs/courtyard.map.d.ts +503 -0
  14. package/dist/prompt-pack/packs/courtyard.map.d.ts.map +1 -0
  15. package/dist/prompt-pack/packs/courtyard.map.js +1562 -0
  16. package/dist/prompt-pack/packs/courtyard.mode.design.d.ts +0 -9
  17. package/dist/prompt-pack/packs/courtyard.mode.design.d.ts.map +1 -1
  18. package/dist/prompt-pack/packs/courtyard.mode.design.js +2 -13
  19. package/dist/prompt-pack/packs/courtyard.mode.map.d.ts +0 -9
  20. package/dist/prompt-pack/packs/courtyard.mode.map.d.ts.map +1 -1
  21. package/dist/prompt-pack/packs/courtyard.mode.map.js +2 -13
  22. package/dist/prompt-pack/packs/index.d.ts +3 -0
  23. package/dist/prompt-pack/packs/index.d.ts.map +1 -1
  24. package/dist/prompt-pack/packs/index.js +3 -0
  25. package/dist/prompt-pack/registry.d.ts +8 -0
  26. package/dist/prompt-pack/registry.d.ts.map +1 -1
  27. package/dist/prompt-pack/registry.js +22 -7
  28. package/dist/render-prompt.d.ts.map +1 -1
  29. package/dist/render-prompt.js +1 -2
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import type { PromptPackRef } from "./registry";
2
+ export type PromptPackEnvSelectionByMode = Partial<Record<string, PromptPackRef>>;
3
+ export type PromptPackEnvSelectionOptions = {
4
+ baseSelection?: PromptPackEnvSelectionByMode;
5
+ includeLegacyFallback?: boolean;
6
+ };
7
+ export declare const getLegacyPromptPackEnvRef: () => PromptPackRef | undefined;
8
+ export declare const getPromptPackEnvRefForMode: (mode: string, options?: PromptPackEnvSelectionOptions) => PromptPackRef | undefined;
9
+ export declare const getPromptPackEnvSelectionByMode: (modes?: string[], options?: PromptPackEnvSelectionOptions) => PromptPackEnvSelectionByMode;
10
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/prompt-pack/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;AAElF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,aAAa,CAAC,EAAE,4BAA4B,CAAC;IAC7C,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAmDF,eAAO,MAAM,yBAAyB,QAAO,aAAa,GAAG,SAAuC,CAAC;AAErG,eAAO,MAAM,0BAA0B,GACrC,MAAM,MAAM,EACZ,UAAS,6BAAkC,KAC1C,aAAa,GAAG,SASlB,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,QAAO,MAAM,EAAO,EACpB,UAAS,6BAAkC,KAC1C,4BAOA,CAAC"}
@@ -0,0 +1,47 @@
1
+ const trimOptional = (value) => {
2
+ const trimmed = value?.trim();
3
+ return trimmed ? trimmed : undefined;
4
+ };
5
+ const normalizeRefFromValues = (id, version) => {
6
+ const normalizedId = trimOptional(id);
7
+ const normalizedVersion = trimOptional(version);
8
+ if (!normalizedId && !normalizedVersion)
9
+ return undefined;
10
+ return { id: normalizedId, version: normalizedVersion };
11
+ };
12
+ const mergeRef = (base, override) => {
13
+ const id = override?.id ?? base?.id;
14
+ const version = override?.version ?? base?.version;
15
+ if (!id && !version)
16
+ return undefined;
17
+ return { id, version };
18
+ };
19
+ const MODE_PROMPT_PACK_ENV_REFS = {
20
+ imagine: normalizeRefFromValues(process.env.NEXT_PUBLIC_PROMPT_PACK_ID_IMAGINE ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_ID_IMAGINE, process.env.NEXT_PUBLIC_PROMPT_PACK_VERSION_IMAGINE ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_VERSION_IMAGINE),
21
+ design: normalizeRefFromValues(process.env.NEXT_PUBLIC_PROMPT_PACK_ID_DESIGN ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_ID_DESIGN, process.env.NEXT_PUBLIC_PROMPT_PACK_VERSION_DESIGN ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_VERSION_DESIGN),
22
+ map: normalizeRefFromValues(process.env.NEXT_PUBLIC_PROMPT_PACK_ID_MAP ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_ID_MAP, process.env.NEXT_PUBLIC_PROMPT_PACK_VERSION_MAP ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_VERSION_MAP),
23
+ streetmix: normalizeRefFromValues(process.env.NEXT_PUBLIC_PROMPT_PACK_ID_STREETMIX ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_ID_STREETMIX, process.env.NEXT_PUBLIC_PROMPT_PACK_VERSION_STREETMIX ??
24
+ process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_VERSION_STREETMIX),
25
+ streetview: normalizeRefFromValues(process.env.NEXT_PUBLIC_PROMPT_PACK_ID_STREETVIEW ?? process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_ID_STREETVIEW, process.env.NEXT_PUBLIC_PROMPT_PACK_VERSION_STREETVIEW ??
26
+ process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_VERSION_STREETVIEW),
27
+ };
28
+ const LEGACY_PROMPT_PACK_ENV_REF = normalizeRefFromValues(process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_ID ?? process.env.NEXT_PUBLIC_PROMPT_PACK_ID, process.env.NEXT_PUBLIC_TYPEKIT_PROMPT_PACK_VERSION ?? process.env.NEXT_PUBLIC_PROMPT_PACK_VERSION);
29
+ export const getLegacyPromptPackEnvRef = () => LEGACY_PROMPT_PACK_ENV_REF;
30
+ export const getPromptPackEnvRefForMode = (mode, options = {}) => {
31
+ const normalizedMode = mode.trim();
32
+ if (!normalizedMode)
33
+ return undefined;
34
+ const baseRef = options.baseSelection?.[normalizedMode];
35
+ const envRef = MODE_PROMPT_PACK_ENV_REFS[normalizedMode];
36
+ const merged = mergeRef(baseRef, envRef);
37
+ if (merged)
38
+ return merged;
39
+ if (options.includeLegacyFallback === false)
40
+ return baseRef;
41
+ return mergeRef(baseRef, LEGACY_PROMPT_PACK_ENV_REF);
42
+ };
43
+ export const getPromptPackEnvSelectionByMode = (modes = [], options = {}) => Object.fromEntries(modes
44
+ .map((mode) => mode.trim())
45
+ .filter(Boolean)
46
+ .map((mode) => [mode, getPromptPackEnvRefForMode(mode, options)])
47
+ .filter(([, ref]) => Boolean(ref)));
@@ -3,4 +3,5 @@ export * from './builder';
3
3
  export * from './sources';
4
4
  export * from './packs';
5
5
  export * from './registry';
6
+ export * from './env';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompt-pack/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompt-pack/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC"}
@@ -3,3 +3,4 @@ export * from './builder';
3
3
  export * from './sources';
4
4
  export * from './packs';
5
5
  export * from './registry';
6
+ export * from './env';
@@ -0,0 +1,498 @@
1
+ export declare const courtyardDesign: {
2
+ id: string;
3
+ version: string;
4
+ label: string;
5
+ description: string;
6
+ blockOrder: string[];
7
+ assembly: {
8
+ strategy: string;
9
+ updateBlocks: string[];
10
+ includeUserPrompt: boolean;
11
+ };
12
+ task: {
13
+ variants: {
14
+ design: string[];
15
+ };
16
+ };
17
+ fields: {
18
+ "form.perimeter": {
19
+ id: string;
20
+ type: string;
21
+ label: string;
22
+ options: {
23
+ value: string;
24
+ label: string;
25
+ promptLines: string[];
26
+ }[];
27
+ };
28
+ "form.geometry": {
29
+ id: string;
30
+ type: string;
31
+ label: string;
32
+ options: ({
33
+ value: string;
34
+ label: string;
35
+ prompt: string;
36
+ promptExtra: string[];
37
+ tags?: undefined;
38
+ } | {
39
+ value: string;
40
+ label: string;
41
+ prompt: string;
42
+ tags: string[];
43
+ promptExtra?: undefined;
44
+ })[];
45
+ };
46
+ "form.diversity": {
47
+ id: string;
48
+ type: string;
49
+ label: string;
50
+ options: {
51
+ value: string;
52
+ label: string;
53
+ prompt: string;
54
+ tags: string[];
55
+ }[];
56
+ };
57
+ "form.height": {
58
+ id: string;
59
+ type: string;
60
+ label: string;
61
+ options: {
62
+ value: string;
63
+ label: string;
64
+ prompt: string;
65
+ }[];
66
+ };
67
+ "form.dimensions": {
68
+ id: string;
69
+ type: string;
70
+ label: string;
71
+ options: {
72
+ value: string;
73
+ label: string;
74
+ prompt: string;
75
+ }[];
76
+ };
77
+ "view.viewpoint": {
78
+ id: string;
79
+ type: string;
80
+ label: string;
81
+ options: {
82
+ value: string;
83
+ label: string;
84
+ prompt: string;
85
+ tags: string[];
86
+ meta: {
87
+ group: string;
88
+ };
89
+ }[];
90
+ };
91
+ "view.variation": {
92
+ id: string;
93
+ type: string;
94
+ label: string;
95
+ options: {
96
+ value: string;
97
+ label: string;
98
+ prompt: string;
99
+ }[];
100
+ };
101
+ "view.composition": {
102
+ id: string;
103
+ type: string;
104
+ label: string;
105
+ options: {
106
+ value: string;
107
+ label: string;
108
+ prompt: string;
109
+ }[];
110
+ };
111
+ "style.roofType": {
112
+ id: string;
113
+ type: string;
114
+ label: string;
115
+ options: {
116
+ value: string;
117
+ label: string;
118
+ prompt: string;
119
+ }[];
120
+ };
121
+ "style.roofscape": {
122
+ id: string;
123
+ type: string;
124
+ label: string;
125
+ options: {
126
+ value: string;
127
+ label: string;
128
+ prompt: string;
129
+ }[];
130
+ };
131
+ "style.roofMaterials": {
132
+ id: string;
133
+ type: string;
134
+ label: string;
135
+ options: {
136
+ value: string;
137
+ label: string;
138
+ prompt: string;
139
+ }[];
140
+ };
141
+ "style.facadePrimary": {
142
+ id: string;
143
+ type: string;
144
+ label: string;
145
+ options: {
146
+ value: string;
147
+ label: string;
148
+ prompt: string;
149
+ }[];
150
+ };
151
+ "style.facadeGround": {
152
+ id: string;
153
+ type: string;
154
+ label: string;
155
+ ui: string;
156
+ promptOn: string;
157
+ };
158
+ "style.facadeUpper": {
159
+ id: string;
160
+ type: string;
161
+ label: string;
162
+ ui: string;
163
+ promptOn: string;
164
+ };
165
+ "style.facadeVariation": {
166
+ id: string;
167
+ type: string;
168
+ label: string;
169
+ ui: string;
170
+ promptOn: string;
171
+ };
172
+ "style.facadeBays": {
173
+ id: string;
174
+ type: string;
175
+ label: string;
176
+ ui: string;
177
+ promptOn: string;
178
+ };
179
+ "program.building": {
180
+ id: string;
181
+ type: string;
182
+ label: string;
183
+ options: {
184
+ value: string;
185
+ label: string;
186
+ prompt: string;
187
+ promptExtra: string[];
188
+ }[];
189
+ };
190
+ "program.courtyard": {
191
+ id: string;
192
+ type: string;
193
+ label: string;
194
+ options: ({
195
+ value: string;
196
+ label: string;
197
+ prompt: string;
198
+ tags?: undefined;
199
+ } | {
200
+ value: string;
201
+ label: string;
202
+ prompt: string;
203
+ tags: string[];
204
+ })[];
205
+ };
206
+ "program.street": {
207
+ id: string;
208
+ type: string;
209
+ label: string;
210
+ options: ({
211
+ value: string;
212
+ label: string;
213
+ prompt: string;
214
+ tags: string[];
215
+ } | {
216
+ value: string;
217
+ label: string;
218
+ prompt: string;
219
+ tags?: undefined;
220
+ })[];
221
+ };
222
+ "toggle.landscaping": {
223
+ id: string;
224
+ type: string;
225
+ label: string;
226
+ ui: string;
227
+ promptOn: string;
228
+ };
229
+ "toggle.people": {
230
+ id: string;
231
+ type: string;
232
+ label: string;
233
+ ui: string;
234
+ promptOn: string;
235
+ };
236
+ "toggle.bicycles": {
237
+ id: string;
238
+ type: string;
239
+ label: string;
240
+ ui: string;
241
+ promptOn: string;
242
+ };
243
+ "toggle.cars": {
244
+ id: string;
245
+ type: string;
246
+ label: string;
247
+ ui: string;
248
+ promptOn: string;
249
+ };
250
+ "toggle.trams": {
251
+ id: string;
252
+ type: string;
253
+ label: string;
254
+ ui: string;
255
+ promptOn: string;
256
+ };
257
+ "toggle.tech": {
258
+ id: string;
259
+ type: string;
260
+ label: string;
261
+ ui: string;
262
+ promptOn: string;
263
+ };
264
+ "context.location": {
265
+ id: string;
266
+ type: string;
267
+ label: string;
268
+ optionSource: string;
269
+ promptTemplate: string;
270
+ ensureSentence: boolean;
271
+ };
272
+ "context.timeOfDay": {
273
+ id: string;
274
+ type: string;
275
+ label: string;
276
+ options: {
277
+ value: string;
278
+ label: string;
279
+ meta: {
280
+ detail: string;
281
+ };
282
+ }[];
283
+ promptTemplate: string;
284
+ };
285
+ "context.imageStyle": {
286
+ id: string;
287
+ type: string;
288
+ label: string;
289
+ neutralizeWhen: {
290
+ not: {
291
+ field: string;
292
+ equals: string;
293
+ };
294
+ };
295
+ options: {
296
+ value: string;
297
+ label: string;
298
+ prompt: string;
299
+ promptNeutral: string;
300
+ }[];
301
+ };
302
+ "context.styleReference": {
303
+ id: string;
304
+ type: string;
305
+ label: string;
306
+ promptTemplate: string;
307
+ ensureSentence: boolean;
308
+ };
309
+ };
310
+ blocks: {
311
+ task: {
312
+ id: string;
313
+ };
314
+ form: {
315
+ id: string;
316
+ fields: string[];
317
+ footerLines: ({
318
+ text: string;
319
+ when: {
320
+ any: {
321
+ field: string;
322
+ hasTag: string;
323
+ }[];
324
+ field?: undefined;
325
+ isTruthy?: undefined;
326
+ };
327
+ } | {
328
+ text: string;
329
+ when: {
330
+ field: string;
331
+ isTruthy: boolean;
332
+ any?: undefined;
333
+ };
334
+ })[];
335
+ };
336
+ view: {
337
+ id: string;
338
+ fields: never[];
339
+ lines: never[];
340
+ footerLines: ({
341
+ text: string;
342
+ when: {
343
+ field: string;
344
+ isTruthy: boolean;
345
+ any?: undefined;
346
+ all?: undefined;
347
+ };
348
+ ensureSentence?: undefined;
349
+ } | {
350
+ text: string;
351
+ when: {
352
+ any: {
353
+ field: string;
354
+ equals: string;
355
+ }[];
356
+ field?: undefined;
357
+ isTruthy?: undefined;
358
+ all?: undefined;
359
+ };
360
+ ensureSentence?: undefined;
361
+ } | {
362
+ text: string;
363
+ when: {
364
+ all: ({
365
+ any: {
366
+ field: string;
367
+ equals: string;
368
+ }[];
369
+ field?: undefined;
370
+ equals?: undefined;
371
+ } | {
372
+ field: string;
373
+ equals: string;
374
+ any?: undefined;
375
+ })[];
376
+ field?: undefined;
377
+ isTruthy?: undefined;
378
+ any?: undefined;
379
+ };
380
+ ensureSentence?: undefined;
381
+ } | {
382
+ text: string;
383
+ ensureSentence: boolean;
384
+ when?: undefined;
385
+ })[];
386
+ };
387
+ style: {
388
+ id: string;
389
+ fields: string[];
390
+ footerLines: ({
391
+ text: string;
392
+ when: {
393
+ any: {
394
+ field: string;
395
+ isTruthy: boolean;
396
+ }[];
397
+ field?: undefined;
398
+ isTruthy?: undefined;
399
+ };
400
+ } | {
401
+ text: string;
402
+ when: {
403
+ field: string;
404
+ isTruthy: boolean;
405
+ any?: undefined;
406
+ };
407
+ })[];
408
+ };
409
+ program: {
410
+ id: string;
411
+ fields: string[];
412
+ footerLines: ({
413
+ text: string;
414
+ when: {
415
+ all: ({
416
+ field: string;
417
+ equals: string;
418
+ any?: undefined;
419
+ } | {
420
+ any: {
421
+ field: string;
422
+ isTruthy: boolean;
423
+ }[];
424
+ field?: undefined;
425
+ equals?: undefined;
426
+ })[];
427
+ any?: undefined;
428
+ field?: undefined;
429
+ hasTag?: undefined;
430
+ };
431
+ } | {
432
+ text: string;
433
+ when: {
434
+ any: {
435
+ field: string;
436
+ isTruthy: boolean;
437
+ }[];
438
+ all?: undefined;
439
+ field?: undefined;
440
+ hasTag?: undefined;
441
+ };
442
+ } | {
443
+ text: string;
444
+ when: {
445
+ field: string;
446
+ hasTag: string;
447
+ all?: undefined;
448
+ any?: undefined;
449
+ };
450
+ })[];
451
+ };
452
+ context: {
453
+ id: string;
454
+ fields: string[];
455
+ footerLines: {
456
+ text: string;
457
+ when: {
458
+ field: string;
459
+ isTruthy: boolean;
460
+ };
461
+ }[];
462
+ };
463
+ };
464
+ warnings: {
465
+ id: string;
466
+ message: string;
467
+ when: {
468
+ all: ({
469
+ field: string;
470
+ equals: string;
471
+ hasTag?: undefined;
472
+ } | {
473
+ field: string;
474
+ hasTag: string;
475
+ equals?: undefined;
476
+ })[];
477
+ };
478
+ }[];
479
+ ui: {
480
+ panels: ({
481
+ id: string;
482
+ label: string;
483
+ blocks: string[];
484
+ fields: string[];
485
+ groups?: undefined;
486
+ } | {
487
+ id: string;
488
+ label: string;
489
+ blocks: string[];
490
+ fields: string[];
491
+ groups: {
492
+ label: string;
493
+ fields: string[];
494
+ }[];
495
+ })[];
496
+ };
497
+ };
498
+ //# sourceMappingURL=courtyard.design.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"courtyard.design.d.ts","sourceRoot":"","sources":["../../../src/prompt-pack/packs/courtyard.design.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqhD3B,CAAC"}