@aibloom/schemas 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +20 -0
  2. package/dist/config.d.ts +124 -0
  3. package/dist/config.d.ts.map +1 -0
  4. package/dist/config.js +27 -0
  5. package/dist/config.js.map +1 -0
  6. package/dist/design-reference.d.ts +860 -0
  7. package/dist/design-reference.d.ts.map +1 -0
  8. package/dist/design-reference.js +147 -0
  9. package/dist/design-reference.js.map +1 -0
  10. package/dist/design-system.d.ts +191 -0
  11. package/dist/design-system.d.ts.map +1 -0
  12. package/dist/design-system.js +47 -0
  13. package/dist/design-system.js.map +1 -0
  14. package/dist/design-tokens.d.ts +318 -0
  15. package/dist/design-tokens.d.ts.map +1 -0
  16. package/dist/design-tokens.js +78 -0
  17. package/dist/design-tokens.js.map +1 -0
  18. package/dist/framework.d.ts +90 -0
  19. package/dist/framework.d.ts.map +1 -0
  20. package/dist/framework.js +34 -0
  21. package/dist/framework.js.map +1 -0
  22. package/dist/host-task.d.ts +197 -0
  23. package/dist/host-task.d.ts.map +1 -0
  24. package/dist/host-task.js +38 -0
  25. package/dist/host-task.js.map +1 -0
  26. package/dist/implementation-plan.d.ts +69 -0
  27. package/dist/implementation-plan.d.ts.map +1 -0
  28. package/dist/implementation-plan.js +21 -0
  29. package/dist/implementation-plan.js.map +1 -0
  30. package/dist/index.d.ts +13 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +13 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/page-shape.d.ts +334 -0
  35. package/dist/page-shape.d.ts.map +1 -0
  36. package/dist/page-shape.js +62 -0
  37. package/dist/page-shape.js.map +1 -0
  38. package/dist/product.d.ts +153 -0
  39. package/dist/product.d.ts.map +1 -0
  40. package/dist/product.js +32 -0
  41. package/dist/product.js.map +1 -0
  42. package/dist/state.d.ts +505 -0
  43. package/dist/state.d.ts.map +1 -0
  44. package/dist/state.js +115 -0
  45. package/dist/state.js.map +1 -0
  46. package/dist/verification.d.ts +197 -0
  47. package/dist/verification.d.ts.map +1 -0
  48. package/dist/verification.js +50 -0
  49. package/dist/verification.js.map +1 -0
  50. package/dist/visual-input.d.ts +130 -0
  51. package/dist/visual-input.d.ts.map +1 -0
  52. package/dist/visual-input.js +34 -0
  53. package/dist/visual-input.js.map +1 -0
  54. package/package.json +23 -0
@@ -0,0 +1,334 @@
1
+ import { z } from "zod";
2
+ export declare const SectionSpecSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ purpose: z.ZodString;
5
+ priority: z.ZodEnum<["critical", "primary", "secondary", "optional"]>;
6
+ suggestedComponents: z.ZodArray<z.ZodString, "many">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ name: string;
9
+ purpose: string;
10
+ priority: "primary" | "secondary" | "critical" | "optional";
11
+ suggestedComponents: string[];
12
+ }, {
13
+ name: string;
14
+ purpose: string;
15
+ priority: "primary" | "secondary" | "critical" | "optional";
16
+ suggestedComponents: string[];
17
+ }>;
18
+ export declare const ComponentSpecSchema: z.ZodObject<{
19
+ name: z.ZodString;
20
+ type: z.ZodEnum<["layout", "section", "data-display", "form", "state", "motion"]>;
21
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
22
+ states: z.ZodArray<z.ZodString, "many">;
23
+ }, "strip", z.ZodTypeAny, {
24
+ name: string;
25
+ type: "section" | "motion" | "layout" | "data-display" | "form" | "state";
26
+ states: string[];
27
+ props?: Record<string, string> | undefined;
28
+ }, {
29
+ name: string;
30
+ type: "section" | "motion" | "layout" | "data-display" | "form" | "state";
31
+ states: string[];
32
+ props?: Record<string, string> | undefined;
33
+ }>;
34
+ export declare const StateMatrixSchema: z.ZodArray<z.ZodObject<{
35
+ component: z.ZodString;
36
+ default: z.ZodOptional<z.ZodString>;
37
+ loading: z.ZodOptional<z.ZodString>;
38
+ empty: z.ZodOptional<z.ZodString>;
39
+ error: z.ZodOptional<z.ZodString>;
40
+ disabled: z.ZodOptional<z.ZodString>;
41
+ hover: z.ZodOptional<z.ZodString>;
42
+ focus: z.ZodOptional<z.ZodString>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ component: string;
45
+ error?: string | undefined;
46
+ default?: string | undefined;
47
+ loading?: string | undefined;
48
+ empty?: string | undefined;
49
+ disabled?: string | undefined;
50
+ hover?: string | undefined;
51
+ focus?: string | undefined;
52
+ }, {
53
+ component: string;
54
+ error?: string | undefined;
55
+ default?: string | undefined;
56
+ loading?: string | undefined;
57
+ empty?: string | undefined;
58
+ disabled?: string | undefined;
59
+ hover?: string | undefined;
60
+ focus?: string | undefined;
61
+ }>, "many">;
62
+ export declare const BreakpointRuleSchema: z.ZodObject<{
63
+ breakpoint: z.ZodString;
64
+ width: z.ZodString;
65
+ layoutRule: z.ZodString;
66
+ }, "strip", z.ZodTypeAny, {
67
+ width: string;
68
+ breakpoint: string;
69
+ layoutRule: string;
70
+ }, {
71
+ width: string;
72
+ breakpoint: string;
73
+ layoutRule: string;
74
+ }>;
75
+ export declare const MotionBudgetSchema: z.ZodObject<{
76
+ allowedTypes: z.ZodArray<z.ZodEnum<["css", "motion", "gsap", "three"]>, "many">;
77
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
78
+ requireReducedMotion: z.ZodDefault<z.ZodBoolean>;
79
+ forbiddenPatterns: z.ZodArray<z.ZodString, "many">;
80
+ }, "strip", z.ZodTypeAny, {
81
+ forbiddenPatterns: string[];
82
+ allowedTypes: ("motion" | "css" | "gsap" | "three")[];
83
+ requireReducedMotion: boolean;
84
+ maxDurationMs?: number | undefined;
85
+ }, {
86
+ forbiddenPatterns: string[];
87
+ allowedTypes: ("motion" | "css" | "gsap" | "three")[];
88
+ maxDurationMs?: number | undefined;
89
+ requireReducedMotion?: boolean | undefined;
90
+ }>;
91
+ export declare const AccessibilityRequirementSchema: z.ZodObject<{
92
+ category: z.ZodString;
93
+ requirement: z.ZodString;
94
+ priority: z.ZodOptional<z.ZodEnum<["A", "AA", "AAA"]>>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ category: string;
97
+ requirement: string;
98
+ priority?: "A" | "AA" | "AAA" | undefined;
99
+ }, {
100
+ category: string;
101
+ requirement: string;
102
+ priority?: "A" | "AA" | "AAA" | undefined;
103
+ }>;
104
+ export declare const PageShapeSchema: z.ZodObject<{
105
+ schemaVersion: z.ZodLiteral<2>;
106
+ pageId: z.ZodString;
107
+ pageName: z.ZodString;
108
+ route: z.ZodString;
109
+ goal: z.ZodString;
110
+ userTasks: z.ZodArray<z.ZodString, "many">;
111
+ sections: z.ZodArray<z.ZodObject<{
112
+ name: z.ZodString;
113
+ purpose: z.ZodString;
114
+ priority: z.ZodEnum<["critical", "primary", "secondary", "optional"]>;
115
+ suggestedComponents: z.ZodArray<z.ZodString, "many">;
116
+ }, "strip", z.ZodTypeAny, {
117
+ name: string;
118
+ purpose: string;
119
+ priority: "primary" | "secondary" | "critical" | "optional";
120
+ suggestedComponents: string[];
121
+ }, {
122
+ name: string;
123
+ purpose: string;
124
+ priority: "primary" | "secondary" | "critical" | "optional";
125
+ suggestedComponents: string[];
126
+ }>, "many">;
127
+ layout: z.ZodObject<{
128
+ type: z.ZodEnum<["single-column", "two-column", "dashboard-grid", "hero-content", "sidebar-main"]>;
129
+ maxWidth: z.ZodOptional<z.ZodString>;
130
+ }, "strip", z.ZodTypeAny, {
131
+ type: "single-column" | "two-column" | "dashboard-grid" | "hero-content" | "sidebar-main";
132
+ maxWidth?: string | undefined;
133
+ }, {
134
+ type: "single-column" | "two-column" | "dashboard-grid" | "hero-content" | "sidebar-main";
135
+ maxWidth?: string | undefined;
136
+ }>;
137
+ visualHierarchy: z.ZodArray<z.ZodString, "many">;
138
+ components: z.ZodArray<z.ZodObject<{
139
+ name: z.ZodString;
140
+ type: z.ZodEnum<["layout", "section", "data-display", "form", "state", "motion"]>;
141
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
142
+ states: z.ZodArray<z.ZodString, "many">;
143
+ }, "strip", z.ZodTypeAny, {
144
+ name: string;
145
+ type: "section" | "motion" | "layout" | "data-display" | "form" | "state";
146
+ states: string[];
147
+ props?: Record<string, string> | undefined;
148
+ }, {
149
+ name: string;
150
+ type: "section" | "motion" | "layout" | "data-display" | "form" | "state";
151
+ states: string[];
152
+ props?: Record<string, string> | undefined;
153
+ }>, "many">;
154
+ states: z.ZodArray<z.ZodObject<{
155
+ component: z.ZodString;
156
+ default: z.ZodOptional<z.ZodString>;
157
+ loading: z.ZodOptional<z.ZodString>;
158
+ empty: z.ZodOptional<z.ZodString>;
159
+ error: z.ZodOptional<z.ZodString>;
160
+ disabled: z.ZodOptional<z.ZodString>;
161
+ hover: z.ZodOptional<z.ZodString>;
162
+ focus: z.ZodOptional<z.ZodString>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ component: string;
165
+ error?: string | undefined;
166
+ default?: string | undefined;
167
+ loading?: string | undefined;
168
+ empty?: string | undefined;
169
+ disabled?: string | undefined;
170
+ hover?: string | undefined;
171
+ focus?: string | undefined;
172
+ }, {
173
+ component: string;
174
+ error?: string | undefined;
175
+ default?: string | undefined;
176
+ loading?: string | undefined;
177
+ empty?: string | undefined;
178
+ disabled?: string | undefined;
179
+ hover?: string | undefined;
180
+ focus?: string | undefined;
181
+ }>, "many">;
182
+ responsive: z.ZodArray<z.ZodObject<{
183
+ breakpoint: z.ZodString;
184
+ width: z.ZodString;
185
+ layoutRule: z.ZodString;
186
+ }, "strip", z.ZodTypeAny, {
187
+ width: string;
188
+ breakpoint: string;
189
+ layoutRule: string;
190
+ }, {
191
+ width: string;
192
+ breakpoint: string;
193
+ layoutRule: string;
194
+ }>, "many">;
195
+ motionBudget: z.ZodObject<{
196
+ allowedTypes: z.ZodArray<z.ZodEnum<["css", "motion", "gsap", "three"]>, "many">;
197
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
198
+ requireReducedMotion: z.ZodDefault<z.ZodBoolean>;
199
+ forbiddenPatterns: z.ZodArray<z.ZodString, "many">;
200
+ }, "strip", z.ZodTypeAny, {
201
+ forbiddenPatterns: string[];
202
+ allowedTypes: ("motion" | "css" | "gsap" | "three")[];
203
+ requireReducedMotion: boolean;
204
+ maxDurationMs?: number | undefined;
205
+ }, {
206
+ forbiddenPatterns: string[];
207
+ allowedTypes: ("motion" | "css" | "gsap" | "three")[];
208
+ maxDurationMs?: number | undefined;
209
+ requireReducedMotion?: boolean | undefined;
210
+ }>;
211
+ accessibility: z.ZodArray<z.ZodObject<{
212
+ category: z.ZodString;
213
+ requirement: z.ZodString;
214
+ priority: z.ZodOptional<z.ZodEnum<["A", "AA", "AAA"]>>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ category: string;
217
+ requirement: string;
218
+ priority?: "A" | "AA" | "AAA" | undefined;
219
+ }, {
220
+ category: string;
221
+ requirement: string;
222
+ priority?: "A" | "AA" | "AAA" | undefined;
223
+ }>, "many">;
224
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
225
+ }, "strip", z.ZodTypeAny, {
226
+ route: string;
227
+ schemaVersion: 2;
228
+ pageId: string;
229
+ accessibility: {
230
+ category: string;
231
+ requirement: string;
232
+ priority?: "A" | "AA" | "AAA" | undefined;
233
+ }[];
234
+ sections: {
235
+ name: string;
236
+ purpose: string;
237
+ priority: "primary" | "secondary" | "critical" | "optional";
238
+ suggestedComponents: string[];
239
+ }[];
240
+ layout: {
241
+ type: "single-column" | "two-column" | "dashboard-grid" | "hero-content" | "sidebar-main";
242
+ maxWidth?: string | undefined;
243
+ };
244
+ components: {
245
+ name: string;
246
+ type: "section" | "motion" | "layout" | "data-display" | "form" | "state";
247
+ states: string[];
248
+ props?: Record<string, string> | undefined;
249
+ }[];
250
+ responsive: {
251
+ width: string;
252
+ breakpoint: string;
253
+ layoutRule: string;
254
+ }[];
255
+ goal: string;
256
+ userTasks: string[];
257
+ states: {
258
+ component: string;
259
+ error?: string | undefined;
260
+ default?: string | undefined;
261
+ loading?: string | undefined;
262
+ empty?: string | undefined;
263
+ disabled?: string | undefined;
264
+ hover?: string | undefined;
265
+ focus?: string | undefined;
266
+ }[];
267
+ pageName: string;
268
+ visualHierarchy: string[];
269
+ motionBudget: {
270
+ forbiddenPatterns: string[];
271
+ allowedTypes: ("motion" | "css" | "gsap" | "three")[];
272
+ requireReducedMotion: boolean;
273
+ maxDurationMs?: number | undefined;
274
+ };
275
+ acceptanceCriteria: string[];
276
+ }, {
277
+ route: string;
278
+ schemaVersion: 2;
279
+ pageId: string;
280
+ accessibility: {
281
+ category: string;
282
+ requirement: string;
283
+ priority?: "A" | "AA" | "AAA" | undefined;
284
+ }[];
285
+ sections: {
286
+ name: string;
287
+ purpose: string;
288
+ priority: "primary" | "secondary" | "critical" | "optional";
289
+ suggestedComponents: string[];
290
+ }[];
291
+ layout: {
292
+ type: "single-column" | "two-column" | "dashboard-grid" | "hero-content" | "sidebar-main";
293
+ maxWidth?: string | undefined;
294
+ };
295
+ components: {
296
+ name: string;
297
+ type: "section" | "motion" | "layout" | "data-display" | "form" | "state";
298
+ states: string[];
299
+ props?: Record<string, string> | undefined;
300
+ }[];
301
+ responsive: {
302
+ width: string;
303
+ breakpoint: string;
304
+ layoutRule: string;
305
+ }[];
306
+ goal: string;
307
+ userTasks: string[];
308
+ states: {
309
+ component: string;
310
+ error?: string | undefined;
311
+ default?: string | undefined;
312
+ loading?: string | undefined;
313
+ empty?: string | undefined;
314
+ disabled?: string | undefined;
315
+ hover?: string | undefined;
316
+ focus?: string | undefined;
317
+ }[];
318
+ pageName: string;
319
+ visualHierarchy: string[];
320
+ motionBudget: {
321
+ forbiddenPatterns: string[];
322
+ allowedTypes: ("motion" | "css" | "gsap" | "three")[];
323
+ maxDurationMs?: number | undefined;
324
+ requireReducedMotion?: boolean | undefined;
325
+ };
326
+ acceptanceCriteria: string[];
327
+ }>;
328
+ export type SectionSpec = z.infer<typeof SectionSpecSchema>;
329
+ export type ComponentSpec = z.infer<typeof ComponentSpecSchema>;
330
+ export type BreakpointRule = z.infer<typeof BreakpointRuleSchema>;
331
+ export type MotionBudget = z.infer<typeof MotionBudgetSchema>;
332
+ export type AccessibilityRequirement = z.infer<typeof AccessibilityRequirementSchema>;
333
+ export type PageShape = z.infer<typeof PageShapeSchema>;
334
+ //# sourceMappingURL=page-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-shape.d.ts","sourceRoot":"","sources":["../src/page-shape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;WAW7B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;EAIzC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB1B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,62 @@
1
+ import { z } from "zod";
2
+ import { SCHEMA_VERSION } from "./state.js";
3
+ // ── Page Shape (per-page planning artifact) ──
4
+ export const SectionSpecSchema = z.object({
5
+ name: z.string(),
6
+ purpose: z.string(),
7
+ priority: z.enum(["critical", "primary", "secondary", "optional"]),
8
+ suggestedComponents: z.array(z.string()),
9
+ });
10
+ export const ComponentSpecSchema = z.object({
11
+ name: z.string(),
12
+ type: z.enum(["layout", "section", "data-display", "form", "state", "motion"]),
13
+ props: z.record(z.string()).optional(),
14
+ states: z.array(z.string()),
15
+ });
16
+ export const StateMatrixSchema = z.array(z.object({
17
+ component: z.string(),
18
+ default: z.string().optional(),
19
+ loading: z.string().optional(),
20
+ empty: z.string().optional(),
21
+ error: z.string().optional(),
22
+ disabled: z.string().optional(),
23
+ hover: z.string().optional(),
24
+ focus: z.string().optional(),
25
+ }));
26
+ export const BreakpointRuleSchema = z.object({
27
+ breakpoint: z.string(),
28
+ width: z.string(),
29
+ layoutRule: z.string(),
30
+ });
31
+ export const MotionBudgetSchema = z.object({
32
+ allowedTypes: z.array(z.enum(["css", "motion", "gsap", "three"])),
33
+ maxDurationMs: z.number().optional(),
34
+ requireReducedMotion: z.boolean().default(true),
35
+ forbiddenPatterns: z.array(z.string()),
36
+ });
37
+ export const AccessibilityRequirementSchema = z.object({
38
+ category: z.string(),
39
+ requirement: z.string(),
40
+ priority: z.enum(["A", "AA", "AAA"]).optional(),
41
+ });
42
+ export const PageShapeSchema = z.object({
43
+ schemaVersion: z.literal(SCHEMA_VERSION),
44
+ pageId: z.string(),
45
+ pageName: z.string(),
46
+ route: z.string(),
47
+ goal: z.string(),
48
+ userTasks: z.array(z.string()),
49
+ sections: z.array(SectionSpecSchema),
50
+ layout: z.object({
51
+ type: z.enum(["single-column", "two-column", "dashboard-grid", "hero-content", "sidebar-main"]),
52
+ maxWidth: z.string().optional(),
53
+ }),
54
+ visualHierarchy: z.array(z.string()),
55
+ components: z.array(ComponentSpecSchema),
56
+ states: StateMatrixSchema,
57
+ responsive: z.array(BreakpointRuleSchema),
58
+ motionBudget: MotionBudgetSchema,
59
+ accessibility: z.array(AccessibilityRequirementSchema),
60
+ acceptanceCriteria: z.array(z.string()),
61
+ });
62
+ //# sourceMappingURL=page-shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-shape.js","sourceRoot":"","sources":["../src/page-shape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,gDAAgD;AAEhD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IAClE,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE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BAAoB,CAAC;IACzC,YAAY,EAAE,kBAAkB;IAChC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,8BAA8B,CAAC;IACtD,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAC"}
@@ -0,0 +1,153 @@
1
+ import { z } from "zod";
2
+ export declare const TechnicalConstraintsSchema: z.ZodObject<{
3
+ framework: z.ZodOptional<z.ZodString>;
4
+ uiLibrary: z.ZodOptional<z.ZodString>;
5
+ styling: z.ZodOptional<z.ZodString>;
6
+ responsive: z.ZodOptional<z.ZodBoolean>;
7
+ darkMode: z.ZodOptional<z.ZodBoolean>;
8
+ typescript: z.ZodOptional<z.ZodBoolean>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ framework?: string | undefined;
11
+ uiLibrary?: string | undefined;
12
+ styling?: string | undefined;
13
+ responsive?: boolean | undefined;
14
+ darkMode?: boolean | undefined;
15
+ typescript?: boolean | undefined;
16
+ }, {
17
+ framework?: string | undefined;
18
+ uiLibrary?: string | undefined;
19
+ styling?: string | undefined;
20
+ responsive?: boolean | undefined;
21
+ darkMode?: boolean | undefined;
22
+ typescript?: boolean | undefined;
23
+ }>;
24
+ export declare const PageRequestSchema: z.ZodObject<{
25
+ name: z.ZodString;
26
+ route: z.ZodOptional<z.ZodString>;
27
+ goal: z.ZodString;
28
+ requiredSections: z.ZodArray<z.ZodString, "many">;
29
+ interactions: z.ZodArray<z.ZodString, "many">;
30
+ dataNeeds: z.ZodArray<z.ZodString, "many">;
31
+ }, "strip", z.ZodTypeAny, {
32
+ name: string;
33
+ goal: string;
34
+ requiredSections: string[];
35
+ interactions: string[];
36
+ dataNeeds: string[];
37
+ route?: string | undefined;
38
+ }, {
39
+ name: string;
40
+ goal: string;
41
+ requiredSections: string[];
42
+ interactions: string[];
43
+ dataNeeds: string[];
44
+ route?: string | undefined;
45
+ }>;
46
+ export declare const ProductSpecSchema: z.ZodObject<{
47
+ schemaVersion: z.ZodLiteral<2>;
48
+ productName: z.ZodOptional<z.ZodString>;
49
+ productType: z.ZodString;
50
+ targetUsers: z.ZodArray<z.ZodString, "many">;
51
+ userTasks: z.ZodArray<z.ZodString, "many">;
52
+ pages: z.ZodArray<z.ZodObject<{
53
+ name: z.ZodString;
54
+ route: z.ZodOptional<z.ZodString>;
55
+ goal: z.ZodString;
56
+ requiredSections: z.ZodArray<z.ZodString, "many">;
57
+ interactions: z.ZodArray<z.ZodString, "many">;
58
+ dataNeeds: z.ZodArray<z.ZodString, "many">;
59
+ }, "strip", z.ZodTypeAny, {
60
+ name: string;
61
+ goal: string;
62
+ requiredSections: string[];
63
+ interactions: string[];
64
+ dataNeeds: string[];
65
+ route?: string | undefined;
66
+ }, {
67
+ name: string;
68
+ goal: string;
69
+ requiredSections: string[];
70
+ interactions: string[];
71
+ dataNeeds: string[];
72
+ route?: string | undefined;
73
+ }>, "many">;
74
+ visualKeywords: z.ZodArray<z.ZodString, "many">;
75
+ technicalConstraints: z.ZodObject<{
76
+ framework: z.ZodOptional<z.ZodString>;
77
+ uiLibrary: z.ZodOptional<z.ZodString>;
78
+ styling: z.ZodOptional<z.ZodString>;
79
+ responsive: z.ZodOptional<z.ZodBoolean>;
80
+ darkMode: z.ZodOptional<z.ZodBoolean>;
81
+ typescript: z.ZodOptional<z.ZodBoolean>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ framework?: string | undefined;
84
+ uiLibrary?: string | undefined;
85
+ styling?: string | undefined;
86
+ responsive?: boolean | undefined;
87
+ darkMode?: boolean | undefined;
88
+ typescript?: boolean | undefined;
89
+ }, {
90
+ framework?: string | undefined;
91
+ uiLibrary?: string | undefined;
92
+ styling?: string | undefined;
93
+ responsive?: boolean | undefined;
94
+ darkMode?: boolean | undefined;
95
+ typescript?: boolean | undefined;
96
+ }>;
97
+ forbiddenPatterns: z.ZodArray<z.ZodString, "many">;
98
+ assumptions: z.ZodArray<z.ZodString, "many">;
99
+ }, "strip", z.ZodTypeAny, {
100
+ schemaVersion: 2;
101
+ pages: {
102
+ name: string;
103
+ goal: string;
104
+ requiredSections: string[];
105
+ interactions: string[];
106
+ dataNeeds: string[];
107
+ route?: string | undefined;
108
+ }[];
109
+ productType: string;
110
+ targetUsers: string[];
111
+ userTasks: string[];
112
+ visualKeywords: string[];
113
+ technicalConstraints: {
114
+ framework?: string | undefined;
115
+ uiLibrary?: string | undefined;
116
+ styling?: string | undefined;
117
+ responsive?: boolean | undefined;
118
+ darkMode?: boolean | undefined;
119
+ typescript?: boolean | undefined;
120
+ };
121
+ forbiddenPatterns: string[];
122
+ assumptions: string[];
123
+ productName?: string | undefined;
124
+ }, {
125
+ schemaVersion: 2;
126
+ pages: {
127
+ name: string;
128
+ goal: string;
129
+ requiredSections: string[];
130
+ interactions: string[];
131
+ dataNeeds: string[];
132
+ route?: string | undefined;
133
+ }[];
134
+ productType: string;
135
+ targetUsers: string[];
136
+ userTasks: string[];
137
+ visualKeywords: string[];
138
+ technicalConstraints: {
139
+ framework?: string | undefined;
140
+ uiLibrary?: string | undefined;
141
+ styling?: string | undefined;
142
+ responsive?: boolean | undefined;
143
+ darkMode?: boolean | undefined;
144
+ typescript?: boolean | undefined;
145
+ };
146
+ forbiddenPatterns: string[];
147
+ assumptions: string[];
148
+ productName?: string | undefined;
149
+ }>;
150
+ export type TechnicalConstraints = z.infer<typeof TechnicalConstraintsSchema>;
151
+ export type PageRequest = z.infer<typeof PageRequestSchema>;
152
+ export type ProductSpec = z.infer<typeof ProductSpecSchema>;
153
+ //# sourceMappingURL=product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../src/product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;EAOrC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ import { SCHEMA_VERSION } from "./state.js";
3
+ // ── Product Spec (parsed user requirements) ──
4
+ export const TechnicalConstraintsSchema = z.object({
5
+ framework: z.string().optional(),
6
+ uiLibrary: z.string().optional(),
7
+ styling: z.string().optional(),
8
+ responsive: z.boolean().optional(),
9
+ darkMode: z.boolean().optional(),
10
+ typescript: z.boolean().optional(),
11
+ });
12
+ export const PageRequestSchema = z.object({
13
+ name: z.string(),
14
+ route: z.string().optional(),
15
+ goal: z.string(),
16
+ requiredSections: z.array(z.string()),
17
+ interactions: z.array(z.string()),
18
+ dataNeeds: z.array(z.string()),
19
+ });
20
+ export const ProductSpecSchema = z.object({
21
+ schemaVersion: z.literal(SCHEMA_VERSION),
22
+ productName: z.string().optional(),
23
+ productType: z.string(),
24
+ targetUsers: z.array(z.string()),
25
+ userTasks: z.array(z.string()),
26
+ pages: z.array(PageRequestSchema),
27
+ visualKeywords: z.array(z.string()),
28
+ technicalConstraints: TechnicalConstraintsSchema,
29
+ forbiddenPatterns: z.array(z.string()),
30
+ assumptions: z.array(z.string()),
31
+ });
32
+ //# sourceMappingURL=product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.js","sourceRoot":"","sources":["../src/product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CA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