@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
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # @aibloom/schemas
2
+
3
+ Shared Zod schemas for the Aibloom design-to-code pipeline.
4
+
5
+ ## Schema Categories
6
+
7
+ - **Design Tokens** — Colors, typography, spacing, shapes
8
+ - **Design Reference** — Style fingerprints, conflicts, fusion options
9
+ - **Design System** — Synthesized project design system
10
+ - **Product** — Product goals, pages, users
11
+ - **Page Shape** — IA, layout, state matrix, responsive rules
12
+ - **Verification** — Reports, checks, compliance
13
+ - **State** — Project state, stages, runs
14
+ - **Host Protocol** — Task contracts for host-agent orchestration
15
+
16
+ ## Usage
17
+
18
+ ```ts
19
+ import { DesignReferenceDocumentSchema } from "@aibloom/schemas";
20
+ ```
@@ -0,0 +1,124 @@
1
+ import { z } from "zod";
2
+ export declare const ViewportSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ width: z.ZodNumber;
5
+ height: z.ZodNumber;
6
+ }, "strip", z.ZodTypeAny, {
7
+ name: string;
8
+ width: number;
9
+ height: number;
10
+ }, {
11
+ name: string;
12
+ width: number;
13
+ height: number;
14
+ }>;
15
+ export declare const VibeUIConfigSchema: z.ZodObject<{
16
+ schemaVersion: z.ZodLiteral<2>;
17
+ framework: z.ZodNullable<z.ZodEnum<["next", "vite-react"]>>;
18
+ packageManager: z.ZodEnum<["pnpm", "npm", "yarn", "bun"]>;
19
+ verification: z.ZodObject<{
20
+ lint: z.ZodBoolean;
21
+ typecheck: z.ZodBoolean;
22
+ unitTest: z.ZodBoolean;
23
+ build: z.ZodBoolean;
24
+ playwright: z.ZodBoolean;
25
+ accessibility: z.ZodBoolean;
26
+ viewports: z.ZodArray<z.ZodObject<{
27
+ name: z.ZodString;
28
+ width: z.ZodNumber;
29
+ height: z.ZodNumber;
30
+ }, "strip", z.ZodTypeAny, {
31
+ name: string;
32
+ width: number;
33
+ height: number;
34
+ }, {
35
+ name: string;
36
+ width: number;
37
+ height: number;
38
+ }>, "many">;
39
+ }, "strip", z.ZodTypeAny, {
40
+ lint: boolean;
41
+ typecheck: boolean;
42
+ unitTest: boolean;
43
+ build: boolean;
44
+ playwright: boolean;
45
+ accessibility: boolean;
46
+ viewports: {
47
+ name: string;
48
+ width: number;
49
+ height: number;
50
+ }[];
51
+ }, {
52
+ lint: boolean;
53
+ typecheck: boolean;
54
+ unitTest: boolean;
55
+ build: boolean;
56
+ playwright: boolean;
57
+ accessibility: boolean;
58
+ viewports: {
59
+ name: string;
60
+ width: number;
61
+ height: number;
62
+ }[];
63
+ }>;
64
+ safety: z.ZodObject<{
65
+ allowedWriteRoots: z.ZodArray<z.ZodString, "many">;
66
+ confirmDependencyInstall: z.ZodBoolean;
67
+ maxRepairAttempts: z.ZodNumber;
68
+ }, "strip", z.ZodTypeAny, {
69
+ allowedWriteRoots: string[];
70
+ confirmDependencyInstall: boolean;
71
+ maxRepairAttempts: number;
72
+ }, {
73
+ allowedWriteRoots: string[];
74
+ confirmDependencyInstall: boolean;
75
+ maxRepairAttempts: number;
76
+ }>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ framework: "next" | "vite-react" | null;
79
+ schemaVersion: 2;
80
+ packageManager: "pnpm" | "npm" | "yarn" | "bun";
81
+ verification: {
82
+ lint: boolean;
83
+ typecheck: boolean;
84
+ unitTest: boolean;
85
+ build: boolean;
86
+ playwright: boolean;
87
+ accessibility: boolean;
88
+ viewports: {
89
+ name: string;
90
+ width: number;
91
+ height: number;
92
+ }[];
93
+ };
94
+ safety: {
95
+ allowedWriteRoots: string[];
96
+ confirmDependencyInstall: boolean;
97
+ maxRepairAttempts: number;
98
+ };
99
+ }, {
100
+ framework: "next" | "vite-react" | null;
101
+ schemaVersion: 2;
102
+ packageManager: "pnpm" | "npm" | "yarn" | "bun";
103
+ verification: {
104
+ lint: boolean;
105
+ typecheck: boolean;
106
+ unitTest: boolean;
107
+ build: boolean;
108
+ playwright: boolean;
109
+ accessibility: boolean;
110
+ viewports: {
111
+ name: string;
112
+ width: number;
113
+ height: number;
114
+ }[];
115
+ };
116
+ safety: {
117
+ allowedWriteRoots: string[];
118
+ confirmDependencyInstall: boolean;
119
+ maxRepairAttempts: number;
120
+ };
121
+ }>;
122
+ export type VibeUIConfig = z.infer<typeof VibeUIConfigSchema>;
123
+ export type Viewport = z.infer<typeof ViewportSchema>;
124
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc;;;;;;;;;;;;EAIzB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
package/dist/config.js ADDED
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+ import { FrameworkIdSchema, SCHEMA_VERSION } from "./state.js";
3
+ export const ViewportSchema = z.object({
4
+ name: z.string(),
5
+ width: z.number().int().positive(),
6
+ height: z.number().int().positive(),
7
+ });
8
+ export const VibeUIConfigSchema = z.object({
9
+ schemaVersion: z.literal(SCHEMA_VERSION),
10
+ framework: FrameworkIdSchema.nullable(),
11
+ packageManager: z.enum(["pnpm", "npm", "yarn", "bun"]),
12
+ verification: z.object({
13
+ lint: z.boolean(),
14
+ typecheck: z.boolean(),
15
+ unitTest: z.boolean(),
16
+ build: z.boolean(),
17
+ playwright: z.boolean(),
18
+ accessibility: z.boolean(),
19
+ viewports: z.array(ViewportSchema),
20
+ }),
21
+ safety: z.object({
22
+ allowedWriteRoots: z.array(z.string()),
23
+ confirmDependencyInstall: z.boolean(),
24
+ maxRepairAttempts: z.number().int().min(0).max(3),
25
+ }),
26
+ });
27
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACxC,SAAS,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACvC,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;QACjB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;QACtB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;QACrB,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;QAClB,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;QACvB,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;QAC1B,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;KACnC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QACtC,wBAAwB,EAAE,CAAC,CAAC,OAAO,EAAE;QACrC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KAClD,CAAC;CACH,CAAC,CAAC"}