@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,197 @@
1
+ import { z } from "zod";
2
+ export declare const CheckResultSchema: z.ZodObject<{
3
+ checkType: z.ZodEnum<["lint", "typecheck", "unit_test", "build", "storybook", "playwright", "lighthouse", "screenshot", "visual_diff", "accessibility", "manual_review_required"]>;
4
+ status: z.ZodEnum<["pass", "fail", "skip", "error"]>;
5
+ message: z.ZodString;
6
+ duration: z.ZodOptional<z.ZodString>;
7
+ details: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ status: "error" | "pass" | "fail" | "skip";
10
+ message: string;
11
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
12
+ duration?: string | undefined;
13
+ details?: string | undefined;
14
+ }, {
15
+ status: "error" | "pass" | "fail" | "skip";
16
+ message: string;
17
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
18
+ duration?: string | undefined;
19
+ details?: string | undefined;
20
+ }>;
21
+ export declare const VerificationReportSchema: z.ZodObject<{
22
+ schemaVersion: z.ZodLiteral<2>;
23
+ runId: z.ZodString;
24
+ status: z.ZodEnum<["pass", "fail"]>;
25
+ pageName: z.ZodOptional<z.ZodString>;
26
+ timestamp: z.ZodString;
27
+ summary: z.ZodString;
28
+ checks: z.ZodArray<z.ZodObject<{
29
+ checkType: z.ZodEnum<["lint", "typecheck", "unit_test", "build", "storybook", "playwright", "lighthouse", "screenshot", "visual_diff", "accessibility", "manual_review_required"]>;
30
+ status: z.ZodEnum<["pass", "fail", "skip", "error"]>;
31
+ message: z.ZodString;
32
+ duration: z.ZodOptional<z.ZodString>;
33
+ details: z.ZodOptional<z.ZodString>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ status: "error" | "pass" | "fail" | "skip";
36
+ message: string;
37
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
38
+ duration?: string | undefined;
39
+ details?: string | undefined;
40
+ }, {
41
+ status: "error" | "pass" | "fail" | "skip";
42
+ message: string;
43
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
44
+ duration?: string | undefined;
45
+ details?: string | undefined;
46
+ }>, "many">;
47
+ browserChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ viewport: z.ZodString;
49
+ result: z.ZodString;
50
+ screenshotPath: z.ZodOptional<z.ZodString>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ viewport: string;
53
+ result: string;
54
+ screenshotPath?: string | undefined;
55
+ }, {
56
+ viewport: string;
57
+ result: string;
58
+ screenshotPath?: string | undefined;
59
+ }>, "many">>;
60
+ accessibilityIssues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
61
+ performanceScore: z.ZodOptional<z.ZodNumber>;
62
+ issues: z.ZodArray<z.ZodString, "many">;
63
+ repairPlan: z.ZodOptional<z.ZodString>;
64
+ requiredChecksPassed: z.ZodDefault<z.ZodBoolean>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ status: "pass" | "fail";
67
+ issues: string[];
68
+ schemaVersion: 2;
69
+ summary: string;
70
+ timestamp: string;
71
+ runId: string;
72
+ checks: {
73
+ status: "error" | "pass" | "fail" | "skip";
74
+ message: string;
75
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
76
+ duration?: string | undefined;
77
+ details?: string | undefined;
78
+ }[];
79
+ requiredChecksPassed: boolean;
80
+ pageName?: string | undefined;
81
+ browserChecks?: {
82
+ viewport: string;
83
+ result: string;
84
+ screenshotPath?: string | undefined;
85
+ }[] | undefined;
86
+ accessibilityIssues?: string[] | undefined;
87
+ performanceScore?: number | undefined;
88
+ repairPlan?: string | undefined;
89
+ }, {
90
+ status: "pass" | "fail";
91
+ issues: string[];
92
+ schemaVersion: 2;
93
+ summary: string;
94
+ timestamp: string;
95
+ runId: string;
96
+ checks: {
97
+ status: "error" | "pass" | "fail" | "skip";
98
+ message: string;
99
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
100
+ duration?: string | undefined;
101
+ details?: string | undefined;
102
+ }[];
103
+ pageName?: string | undefined;
104
+ browserChecks?: {
105
+ viewport: string;
106
+ result: string;
107
+ screenshotPath?: string | undefined;
108
+ }[] | undefined;
109
+ accessibilityIssues?: string[] | undefined;
110
+ performanceScore?: number | undefined;
111
+ repairPlan?: string | undefined;
112
+ requiredChecksPassed?: boolean | undefined;
113
+ }>;
114
+ export type CheckResult = z.infer<typeof CheckResultSchema>;
115
+ export type VerificationReport = z.infer<typeof VerificationReportSchema>;
116
+ export declare const RepairPlanSchema: z.ZodObject<{
117
+ schemaVersion: z.ZodLiteral<2>;
118
+ taskId: z.ZodString;
119
+ failures: z.ZodArray<z.ZodObject<{
120
+ checkType: z.ZodEnum<["lint", "typecheck", "unit_test", "build", "storybook", "playwright", "lighthouse", "screenshot", "visual_diff", "accessibility", "manual_review_required"]>;
121
+ status: z.ZodEnum<["pass", "fail", "skip", "error"]>;
122
+ message: z.ZodString;
123
+ duration: z.ZodOptional<z.ZodString>;
124
+ details: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ status: "error" | "pass" | "fail" | "skip";
127
+ message: string;
128
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
129
+ duration?: string | undefined;
130
+ details?: string | undefined;
131
+ }, {
132
+ status: "error" | "pass" | "fail" | "skip";
133
+ message: string;
134
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
135
+ duration?: string | undefined;
136
+ details?: string | undefined;
137
+ }>, "many">;
138
+ patches: z.ZodArray<z.ZodObject<{
139
+ targetFile: z.ZodString;
140
+ description: z.ZodString;
141
+ patchType: z.ZodEnum<["file-create", "file-edit", "file-delete", "command"]>;
142
+ content: z.ZodString;
143
+ }, "strip", z.ZodTypeAny, {
144
+ description: string;
145
+ content: string;
146
+ targetFile: string;
147
+ patchType: "command" | "file-create" | "file-edit" | "file-delete";
148
+ }, {
149
+ description: string;
150
+ content: string;
151
+ targetFile: string;
152
+ patchType: "command" | "file-create" | "file-edit" | "file-delete";
153
+ }>, "many">;
154
+ status: z.ZodEnum<["pending", "applied", "failed", "retrying"]>;
155
+ retryCount: z.ZodDefault<z.ZodNumber>;
156
+ maxRetries: z.ZodDefault<z.ZodNumber>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ status: "failed" | "applied" | "pending" | "retrying";
159
+ schemaVersion: 2;
160
+ taskId: string;
161
+ failures: {
162
+ status: "error" | "pass" | "fail" | "skip";
163
+ message: string;
164
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
165
+ duration?: string | undefined;
166
+ details?: string | undefined;
167
+ }[];
168
+ patches: {
169
+ description: string;
170
+ content: string;
171
+ targetFile: string;
172
+ patchType: "command" | "file-create" | "file-edit" | "file-delete";
173
+ }[];
174
+ retryCount: number;
175
+ maxRetries: number;
176
+ }, {
177
+ status: "failed" | "applied" | "pending" | "retrying";
178
+ schemaVersion: 2;
179
+ taskId: string;
180
+ failures: {
181
+ status: "error" | "pass" | "fail" | "skip";
182
+ message: string;
183
+ checkType: "lint" | "typecheck" | "build" | "playwright" | "accessibility" | "unit_test" | "screenshot" | "storybook" | "lighthouse" | "visual_diff" | "manual_review_required";
184
+ duration?: string | undefined;
185
+ details?: string | undefined;
186
+ }[];
187
+ patches: {
188
+ description: string;
189
+ content: string;
190
+ targetFile: string;
191
+ patchType: "command" | "file-create" | "file-edit" | "file-delete";
192
+ }[];
193
+ retryCount?: number | undefined;
194
+ maxRetries?: number | undefined;
195
+ }>;
196
+ export type RepairPlan = z.infer<typeof RepairPlanSchema>;
197
+ //# sourceMappingURL=verification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../src/verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBnC,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAI1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ import { SCHEMA_VERSION } from "./state.js";
3
+ // ── Verification Report ──
4
+ export const CheckResultSchema = z.object({
5
+ checkType: z.enum([
6
+ "lint", "typecheck", "unit_test", "build",
7
+ "storybook", "playwright", "lighthouse",
8
+ "screenshot", "visual_diff", "accessibility",
9
+ "manual_review_required",
10
+ ]),
11
+ status: z.enum(["pass", "fail", "skip", "error"]),
12
+ message: z.string(),
13
+ duration: z.string().optional(),
14
+ details: z.string().optional(),
15
+ });
16
+ export const VerificationReportSchema = z.object({
17
+ schemaVersion: z.literal(SCHEMA_VERSION),
18
+ runId: z.string(),
19
+ status: z.enum(["pass", "fail"]),
20
+ pageName: z.string().optional(),
21
+ timestamp: z.string(),
22
+ summary: z.string(),
23
+ checks: z.array(CheckResultSchema),
24
+ browserChecks: z.array(z.object({
25
+ viewport: z.string(),
26
+ result: z.string(),
27
+ screenshotPath: z.string().optional(),
28
+ })).optional(),
29
+ accessibilityIssues: z.array(z.string()).optional(),
30
+ performanceScore: z.number().optional(),
31
+ issues: z.array(z.string()),
32
+ repairPlan: z.string().optional(),
33
+ requiredChecksPassed: z.boolean().default(false),
34
+ });
35
+ // ── Repair Plan ──
36
+ export const RepairPlanSchema = z.object({
37
+ schemaVersion: z.literal(SCHEMA_VERSION),
38
+ taskId: z.string(),
39
+ failures: z.array(CheckResultSchema),
40
+ patches: z.array(z.object({
41
+ targetFile: z.string(),
42
+ description: z.string(),
43
+ patchType: z.enum(["file-create", "file-edit", "file-delete", "command"]),
44
+ content: z.string(),
45
+ })),
46
+ status: z.enum(["pending", "applied", "failed", "retrying"]),
47
+ retryCount: z.number().default(0),
48
+ maxRetries: z.number().default(3),
49
+ });
50
+ //# sourceMappingURL=verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification.js","sourceRoot":"","sources":["../src/verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,4BAA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";
2
+ export declare const VisualIntentSpecSchema: z.ZodObject<{
3
+ imageId: z.ZodString;
4
+ imageType: z.ZodEnum<["screenshot", "mockup", "wireframe", "reference"]>;
5
+ description: z.ZodString;
6
+ layout: z.ZodObject<{
7
+ regions: z.ZodArray<z.ZodString, "many">;
8
+ gridEstimate: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ regions: string[];
11
+ gridEstimate?: string | undefined;
12
+ }, {
13
+ regions: string[];
14
+ gridEstimate?: string | undefined;
15
+ }>;
16
+ colors: z.ZodArray<z.ZodObject<{
17
+ hex: z.ZodString;
18
+ role: z.ZodEnum<["background", "primary", "secondary", "accent", "text", "border"]>;
19
+ coverage: z.ZodEnum<["low", "medium", "high"]>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ role: "primary" | "secondary" | "text" | "accent" | "border" | "background";
22
+ hex: string;
23
+ coverage: "low" | "medium" | "high";
24
+ }, {
25
+ role: "primary" | "secondary" | "text" | "accent" | "border" | "background";
26
+ hex: string;
27
+ coverage: "low" | "medium" | "high";
28
+ }>, "many">;
29
+ typography: z.ZodArray<z.ZodObject<{
30
+ role: z.ZodEnum<["heading", "body", "label", "accent"]>;
31
+ estimatedFamily: z.ZodOptional<z.ZodString>;
32
+ estimatedSize: z.ZodOptional<z.ZodString>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ role: "accent" | "body" | "heading" | "label";
35
+ estimatedFamily?: string | undefined;
36
+ estimatedSize?: string | undefined;
37
+ }, {
38
+ role: "accent" | "body" | "heading" | "label";
39
+ estimatedFamily?: string | undefined;
40
+ estimatedSize?: string | undefined;
41
+ }>, "many">;
42
+ components: z.ZodArray<z.ZodObject<{
43
+ type: z.ZodString;
44
+ count: z.ZodOptional<z.ZodNumber>;
45
+ confidence: z.ZodEnum<["low", "medium", "high"]>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ type: string;
48
+ confidence: "low" | "medium" | "high";
49
+ count?: number | undefined;
50
+ }, {
51
+ type: string;
52
+ confidence: "low" | "medium" | "high";
53
+ count?: number | undefined;
54
+ }>, "many">;
55
+ spacing: z.ZodObject<{
56
+ density: z.ZodEnum<["low", "medium", "high"]>;
57
+ notes: z.ZodOptional<z.ZodString>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ density: "low" | "medium" | "high";
60
+ notes?: string | undefined;
61
+ }, {
62
+ density: "low" | "medium" | "high";
63
+ notes?: string | undefined;
64
+ }>;
65
+ visualDensity: z.ZodEnum<["low", "medium", "high"]>;
66
+ mood: z.ZodArray<z.ZodString, "many">;
67
+ uncertainties: z.ZodArray<z.ZodString, "many">;
68
+ }, "strip", z.ZodTypeAny, {
69
+ description: string;
70
+ typography: {
71
+ role: "accent" | "body" | "heading" | "label";
72
+ estimatedFamily?: string | undefined;
73
+ estimatedSize?: string | undefined;
74
+ }[];
75
+ spacing: {
76
+ density: "low" | "medium" | "high";
77
+ notes?: string | undefined;
78
+ };
79
+ layout: {
80
+ regions: string[];
81
+ gridEstimate?: string | undefined;
82
+ };
83
+ components: {
84
+ type: string;
85
+ confidence: "low" | "medium" | "high";
86
+ count?: number | undefined;
87
+ }[];
88
+ colors: {
89
+ role: "primary" | "secondary" | "text" | "accent" | "border" | "background";
90
+ hex: string;
91
+ coverage: "low" | "medium" | "high";
92
+ }[];
93
+ imageId: string;
94
+ imageType: "screenshot" | "mockup" | "wireframe" | "reference";
95
+ visualDensity: "low" | "medium" | "high";
96
+ mood: string[];
97
+ uncertainties: string[];
98
+ }, {
99
+ description: string;
100
+ typography: {
101
+ role: "accent" | "body" | "heading" | "label";
102
+ estimatedFamily?: string | undefined;
103
+ estimatedSize?: string | undefined;
104
+ }[];
105
+ spacing: {
106
+ density: "low" | "medium" | "high";
107
+ notes?: string | undefined;
108
+ };
109
+ layout: {
110
+ regions: string[];
111
+ gridEstimate?: string | undefined;
112
+ };
113
+ components: {
114
+ type: string;
115
+ confidence: "low" | "medium" | "high";
116
+ count?: number | undefined;
117
+ }[];
118
+ colors: {
119
+ role: "primary" | "secondary" | "text" | "accent" | "border" | "background";
120
+ hex: string;
121
+ coverage: "low" | "medium" | "high";
122
+ }[];
123
+ imageId: string;
124
+ imageType: "screenshot" | "mockup" | "wireframe" | "reference";
125
+ visualDensity: "low" | "medium" | "high";
126
+ mood: string[];
127
+ uncertainties: string[];
128
+ }>;
129
+ export type VisualIntentSpec = z.infer<typeof VisualIntentSpecSchema>;
130
+ //# sourceMappingURL=visual-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visual-input.d.ts","sourceRoot":"","sources":["../src/visual-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { z } from "zod";
2
+ // ── Image / Visual Input Spec ──
3
+ export const VisualIntentSpecSchema = z.object({
4
+ imageId: z.string(),
5
+ imageType: z.enum(["screenshot", "mockup", "wireframe", "reference"]),
6
+ description: z.string(),
7
+ layout: z.object({
8
+ regions: z.array(z.string()),
9
+ gridEstimate: z.string().optional(),
10
+ }),
11
+ colors: z.array(z.object({
12
+ hex: z.string(),
13
+ role: z.enum(["background", "primary", "secondary", "accent", "text", "border"]),
14
+ coverage: z.enum(["low", "medium", "high"]),
15
+ })),
16
+ typography: z.array(z.object({
17
+ role: z.enum(["heading", "body", "label", "accent"]),
18
+ estimatedFamily: z.string().optional(),
19
+ estimatedSize: z.string().optional(),
20
+ })),
21
+ components: z.array(z.object({
22
+ type: z.string(),
23
+ count: z.number().optional(),
24
+ confidence: z.enum(["low", "medium", "high"]),
25
+ })),
26
+ spacing: z.object({
27
+ density: z.enum(["low", "medium", "high"]),
28
+ notes: z.string().optional(),
29
+ }),
30
+ visualDensity: z.enum(["low", "medium", "high"]),
31
+ mood: z.array(z.string()),
32
+ uncertainties: z.array(z.string()),
33
+ });
34
+ //# sourceMappingURL=visual-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visual-input.js","sourceRoot":"","sources":["../src/visual-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,kCAAkC;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACrE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACpC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChF,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;KAC5C,CAAC,CACH;IACD,UAAU,EAAE,CAAC,CAAC,KAAK,CACjB,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QACpD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC,CACH;IACD,UAAU,EAAE,CAAC,CAAC,KAAK,CACjB,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;KAC9C,CAAC,CACH;IACD,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC7B,CAAC;IACF,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAChD,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@aibloom/schemas",
3
+ "version": "0.2.0",
4
+ "description": "Shared Zod schemas for design tokens, references, state, verification, and product specs",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": ["dist", "README.md"],
16
+ "scripts": {
17
+ "build": "tsc -p tsconfig.json",
18
+ "typecheck": "tsc -p tsconfig.json --noEmit"
19
+ },
20
+ "dependencies": {
21
+ "zod": "^3.23.0"
22
+ }
23
+ }