@pixerate/schemas 1.3.0 → 1.5.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.
- package/dist/index.cjs +482 -9
- package/dist/index.d.cts +2751 -62
- package/dist/index.d.ts +2751 -62
- package/dist/index.js +461 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
ActivityActionSchema: () => ActivityActionSchema,
|
|
24
|
+
ActivityLogSchema: () => ActivityLogSchema,
|
|
25
|
+
AestheticSchema: () => AestheticSchema,
|
|
23
26
|
AgentConfigSchema: () => AgentConfigSchema,
|
|
24
27
|
AgentDocumentAttachmentSchema: () => AgentDocumentAttachmentSchema,
|
|
25
28
|
AgentEnvironmentSchema: () => AgentEnvironmentSchema,
|
|
@@ -32,8 +35,14 @@ __export(index_exports, {
|
|
|
32
35
|
AgentToolTypeSchema: () => AgentToolTypeSchema,
|
|
33
36
|
AspectRatioSchema: () => AspectRatioSchema,
|
|
34
37
|
CodeGenerationSchema: () => CodeGenerationSchema,
|
|
38
|
+
ComponentDocsSchema: () => ComponentDocsSchema,
|
|
39
|
+
ComponentPackageSchema: () => ComponentPackageSchema,
|
|
35
40
|
ComponentPropDefinitionSchema: () => ComponentPropDefinitionSchema,
|
|
41
|
+
ComponentPropDocSchema: () => ComponentPropDocSchema,
|
|
36
42
|
ComponentSynthesisSchema: () => ComponentSynthesisSchema,
|
|
43
|
+
ComponentTransformationResultSchema: () => ComponentTransformationResultSchema,
|
|
44
|
+
ComponentVariantSchema: () => ComponentVariantSchema,
|
|
45
|
+
ComponentVersionSchema: () => ComponentVersionSchema,
|
|
37
46
|
ConditionOperatorSchema: () => ConditionOperatorSchema,
|
|
38
47
|
ConditionSchema: () => ConditionSchema,
|
|
39
48
|
ControlValidationSchema: () => ControlValidationSchema,
|
|
@@ -41,6 +50,7 @@ __export(index_exports, {
|
|
|
41
50
|
DecisionGateSchema: () => DecisionGateSchema,
|
|
42
51
|
DimensionScoreSchema: () => DimensionScoreSchema,
|
|
43
52
|
DropShadowSchema: () => DropShadowSchema,
|
|
53
|
+
FORM_SCHEMA_JSON_SCHEMA: () => FORM_SCHEMA_JSON_SCHEMA,
|
|
44
54
|
FidelitySchema: () => FidelitySchema,
|
|
45
55
|
FormControlSchema: () => FormControlSchema,
|
|
46
56
|
FormControlTypeSchema: () => FormControlTypeSchema,
|
|
@@ -51,12 +61,16 @@ __export(index_exports, {
|
|
|
51
61
|
FormStageSchema: () => FormStageSchema,
|
|
52
62
|
FormSubmissionPayloadSchema: () => FormSubmissionPayloadSchema,
|
|
53
63
|
FormValidatorSchema: () => FormValidatorSchema,
|
|
64
|
+
GenerateHarnessOptionsSchema: () => GenerateHarnessOptionsSchema,
|
|
54
65
|
ImageCompositingSchema: () => ImageCompositingSchema,
|
|
55
66
|
ImageGenerationSchema: () => ImageGenerationSchema,
|
|
56
67
|
ImageTextOverlaySchema: () => ImageTextOverlaySchema,
|
|
57
68
|
ImageTransformationSchema: () => ImageTransformationSchema,
|
|
58
69
|
ImageWatermarkSchema: () => ImageWatermarkSchema,
|
|
70
|
+
IngestionInputSchema: () => IngestionInputSchema,
|
|
59
71
|
JsonGenerationSchema: () => JsonGenerationSchema,
|
|
72
|
+
PlatformLanguageSchema: () => PlatformLanguageSchema,
|
|
73
|
+
PreviewHarnessSchema: () => PreviewHarnessSchema,
|
|
60
74
|
QueueJobSchema: () => QueueJobSchema,
|
|
61
75
|
QueueJobStatusSchema: () => QueueJobStatusSchema,
|
|
62
76
|
QueueJobTypeSchema: () => QueueJobTypeSchema,
|
|
@@ -74,6 +88,13 @@ __export(index_exports, {
|
|
|
74
88
|
TechnicalFormSchema: () => TechnicalFormSchema,
|
|
75
89
|
TextAlignmentSchema: () => TextAlignmentSchema,
|
|
76
90
|
TextOverlayPositionSchema: () => TextOverlayPositionSchema,
|
|
91
|
+
ThemeColorsSchema: () => ThemeColorsSchema,
|
|
92
|
+
ThemeIngestionInputSchema: () => ThemeIngestionInputSchema,
|
|
93
|
+
ThemeSchema: () => ThemeSchema,
|
|
94
|
+
ThemeSupportSchema: () => ThemeSupportSchema,
|
|
95
|
+
ThemeTokensSchema: () => ThemeTokensSchema,
|
|
96
|
+
ThemeTypographyTokensSchema: () => ThemeTypographyTokensSchema,
|
|
97
|
+
UIComponentTypeSchema: () => UIComponentTypeSchema,
|
|
77
98
|
VideoAnalysisCategorySchema: () => VideoAnalysisCategorySchema,
|
|
78
99
|
VideoAnalysisSchema: () => VideoAnalysisSchema,
|
|
79
100
|
VideoAspectRatioSchema: () => VideoAspectRatioSchema,
|
|
@@ -265,20 +286,193 @@ var CodeGenerationSchema = import_zod.z.object({
|
|
|
265
286
|
prompt: import_zod.z.string(),
|
|
266
287
|
language: import_zod.z.string()
|
|
267
288
|
});
|
|
268
|
-
var
|
|
289
|
+
var PlatformLanguageSchema = import_zod.z.enum(["svelte", "react", "webcomponent"]);
|
|
290
|
+
var ThemeSupportSchema = import_zod.z.enum(["default", "light-and-dark"]);
|
|
291
|
+
var ComponentPropDocSchema = import_zod.z.object({
|
|
269
292
|
name: import_zod.z.string(),
|
|
270
293
|
type: import_zod.z.string(),
|
|
271
294
|
default: import_zod.z.string().optional(),
|
|
272
|
-
description: import_zod.z.string()
|
|
295
|
+
description: import_zod.z.string()
|
|
296
|
+
});
|
|
297
|
+
var ComponentPropDefinitionSchema = ComponentPropDocSchema;
|
|
298
|
+
var ComponentDocsSchema = import_zod.z.object({
|
|
299
|
+
usage: import_zod.z.string().describe("Usage instructions and import examples"),
|
|
300
|
+
props: import_zod.z.array(ComponentPropDocSchema).describe("List of prop definitions and types"),
|
|
301
|
+
notes: import_zod.z.string().optional().describe("Additional usage or architectural notes")
|
|
302
|
+
});
|
|
303
|
+
var PreviewHarnessSchema = import_zod.z.object({
|
|
304
|
+
driverCode: import_zod.z.string().describe(
|
|
305
|
+
"Complete, runnable preview driver code harness demonstrating usage of the component with snippets/children or mock props"
|
|
306
|
+
),
|
|
307
|
+
mockProps: import_zod.z.record(import_zod.z.any()).describe("JSON map of realistic mock prop values passed to the component"),
|
|
308
|
+
wrapperClass: import_zod.z.string().optional().describe("Tailwind CSS class string for wrapping the preview container")
|
|
309
|
+
});
|
|
310
|
+
var GenerateHarnessOptionsSchema = import_zod.z.object({
|
|
311
|
+
code: import_zod.z.string(),
|
|
312
|
+
language: PlatformLanguageSchema,
|
|
313
|
+
componentName: import_zod.z.string(),
|
|
314
|
+
docsProps: import_zod.z.array(ComponentPropDocSchema).optional()
|
|
273
315
|
});
|
|
274
316
|
var ComponentSynthesisSchema = import_zod.z.object({
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
317
|
+
title: import_zod.z.string().describe("Title of the synthesized component"),
|
|
318
|
+
description: import_zod.z.string().describe("Detailed description of the component"),
|
|
319
|
+
tags: import_zod.z.array(import_zod.z.string()).describe("Keywords and categorization tags"),
|
|
320
|
+
platforms: import_zod.z.object({
|
|
321
|
+
svelte: import_zod.z.string().describe("Self-contained Svelte 5 component with runes ($props, $state, onclick, snippets, etc.)"),
|
|
322
|
+
react: import_zod.z.string().describe("Self-contained React 19 TSX component with all subcomponents defined and exported"),
|
|
323
|
+
webcomponent: import_zod.z.string().describe("Self-contained WebComponent custom element extending HTMLElement")
|
|
324
|
+
}),
|
|
325
|
+
harnesses: import_zod.z.object({
|
|
326
|
+
svelte: PreviewHarnessSchema,
|
|
327
|
+
react: PreviewHarnessSchema,
|
|
328
|
+
webcomponent: PreviewHarnessSchema
|
|
329
|
+
}).optional(),
|
|
330
|
+
docs: ComponentDocsSchema
|
|
331
|
+
});
|
|
332
|
+
var ComponentTransformationResultSchema = import_zod.z.object({
|
|
333
|
+
title: import_zod.z.string(),
|
|
334
|
+
description: import_zod.z.string(),
|
|
335
|
+
tags: import_zod.z.array(import_zod.z.string()),
|
|
336
|
+
platforms: import_zod.z.record(PlatformLanguageSchema, import_zod.z.string()),
|
|
337
|
+
harnesses: import_zod.z.record(PlatformLanguageSchema, PreviewHarnessSchema),
|
|
338
|
+
docs: ComponentDocsSchema,
|
|
339
|
+
detectedLanguage: PlatformLanguageSchema,
|
|
340
|
+
themeSupport: ThemeSupportSchema
|
|
341
|
+
});
|
|
342
|
+
var ComponentPackageSchema = import_zod.z.object({
|
|
343
|
+
language: PlatformLanguageSchema,
|
|
344
|
+
code: import_zod.z.string().describe("Formatted code bundle with trimmed leading whitespace"),
|
|
345
|
+
docs: ComponentDocsSchema,
|
|
346
|
+
screenshot: import_zod.z.string().describe("Data URI or URL of actual rendered component"),
|
|
347
|
+
themeSupport: ThemeSupportSchema,
|
|
348
|
+
tags: import_zod.z.array(import_zod.z.string()),
|
|
349
|
+
previewHarness: PreviewHarnessSchema.optional()
|
|
350
|
+
});
|
|
351
|
+
var UIComponentTypeSchema = import_zod.z.object({
|
|
352
|
+
id: import_zod.z.string().describe("Slug, e.g., 'button'"),
|
|
353
|
+
name: import_zod.z.string().describe("e.g. 'Button'"),
|
|
354
|
+
description: import_zod.z.string().describe("Official description e.g. from Shadcn documentation"),
|
|
355
|
+
tags: import_zod.z.array(import_zod.z.string()).describe("Freeform tags e.g. ['form', 'action']"),
|
|
356
|
+
createdAt: import_zod.z.string().describe("ISO timestamp"),
|
|
357
|
+
updatedAt: import_zod.z.string().describe("ISO timestamp")
|
|
358
|
+
});
|
|
359
|
+
var ComponentVariantSchema = import_zod.z.object({
|
|
360
|
+
id: import_zod.z.string().describe("Slug, e.g., 'glass-card' or 'glassmorphism'"),
|
|
361
|
+
componentTypeId: import_zod.z.string().describe("References UIComponentType.id"),
|
|
362
|
+
name: import_zod.z.string().describe("e.g. 'Glass Action Button'"),
|
|
363
|
+
aestheticId: import_zod.z.string().describe("Style aesthetic, e.g. 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn'"),
|
|
364
|
+
recommendedThemeId: import_zod.z.string().optional().describe("Optional recommended theme ID (e.g., 'shadcn-zinc', 'tokyo-night')"),
|
|
365
|
+
description: import_zod.z.string().optional().describe("Style & business logic description"),
|
|
366
|
+
imageUrl: import_zod.z.string().optional().describe("Optional image URL"),
|
|
367
|
+
image: import_zod.z.string().optional(),
|
|
368
|
+
screenshot: import_zod.z.string().optional(),
|
|
369
|
+
createdAt: import_zod.z.string().describe("ISO timestamp"),
|
|
370
|
+
updatedAt: import_zod.z.string().describe("ISO timestamp")
|
|
371
|
+
});
|
|
372
|
+
var AestheticSchema = ComponentVariantSchema;
|
|
373
|
+
var ComponentVersionSchema = import_zod.z.object({
|
|
374
|
+
id: import_zod.z.string().describe("Unique version ID e.g. 'button-glass-action-button-v1.0.0'"),
|
|
375
|
+
componentTypeId: import_zod.z.string().describe("References UIComponentType.id"),
|
|
376
|
+
variantId: import_zod.z.string().describe("References ComponentVariant.id"),
|
|
377
|
+
aestheticId: import_zod.z.string().describe("References Aesthetic style e.g. 'glassmorphism'"),
|
|
378
|
+
version: import_zod.z.string().describe("Semver e.g. '1.0.0'"),
|
|
379
|
+
changelogNote: import_zod.z.string(),
|
|
380
|
+
createdBy: import_zod.z.string(),
|
|
381
|
+
createdAt: import_zod.z.string().describe("ISO timestamp"),
|
|
382
|
+
packages: import_zod.z.record(PlatformLanguageSchema, ComponentPackageSchema)
|
|
383
|
+
});
|
|
384
|
+
var ActivityActionSchema = import_zod.z.enum([
|
|
385
|
+
"CREATED",
|
|
386
|
+
"UPDATED",
|
|
387
|
+
"REVERTED",
|
|
388
|
+
"PACKAGE_GENERATED",
|
|
389
|
+
"DELETED"
|
|
390
|
+
]);
|
|
391
|
+
var ActivityLogSchema = import_zod.z.object({
|
|
392
|
+
id: import_zod.z.string(),
|
|
393
|
+
componentTypeId: import_zod.z.string(),
|
|
394
|
+
componentTypeName: import_zod.z.string(),
|
|
395
|
+
variantId: import_zod.z.string().optional(),
|
|
396
|
+
aestheticId: import_zod.z.string(),
|
|
397
|
+
action: ActivityActionSchema,
|
|
398
|
+
version: import_zod.z.string(),
|
|
399
|
+
details: import_zod.z.string(),
|
|
400
|
+
timestamp: import_zod.z.string()
|
|
401
|
+
});
|
|
402
|
+
var IngestionInputSchema = import_zod.z.object({
|
|
403
|
+
codeBundle: import_zod.z.string().describe("Raw code bundle provided"),
|
|
404
|
+
css: import_zod.z.string().optional().describe("Optional raw CSS or CSS bundle to extract and inline"),
|
|
405
|
+
componentTypeId: import_zod.z.string().describe("Slug or Name of UI Component Type (e.g., 'button')"),
|
|
406
|
+
variantName: import_zod.z.string().describe("Mandatory Variant Name text input (e.g., 'Glass Action Button')"),
|
|
407
|
+
variantId: import_zod.z.string().optional().describe("Optional custom slug or ID for variant"),
|
|
408
|
+
aestheticId: import_zod.z.string().optional().describe("Dropdown value for aesthetic style (e.g., 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn')"),
|
|
409
|
+
recommendedThemeId: import_zod.z.string().optional().describe("Optional recommended theme ID"),
|
|
410
|
+
componentTypeName: import_zod.z.string().optional().describe("Optional display name if creating new component type"),
|
|
411
|
+
componentTypeDescription: import_zod.z.string().optional().describe("Optional description if creating new component type"),
|
|
412
|
+
variantDescription: import_zod.z.string().optional().describe("Optional description if creating new variant"),
|
|
413
|
+
aestheticName: import_zod.z.string().optional().describe("Optional display name for aesthetic"),
|
|
414
|
+
aestheticDescription: import_zod.z.string().optional().describe("Optional description if creating new aesthetic"),
|
|
415
|
+
sourcePlatform: PlatformLanguageSchema.optional().describe("Optional source platform - detected automatically if omitted"),
|
|
416
|
+
changelogNote: import_zod.z.string().optional(),
|
|
417
|
+
tags: import_zod.z.array(import_zod.z.string()).optional()
|
|
418
|
+
});
|
|
419
|
+
var ThemeColorsSchema = import_zod.z.object({
|
|
420
|
+
primary: import_zod.z.string(),
|
|
421
|
+
primaryForeground: import_zod.z.string().optional(),
|
|
422
|
+
secondary: import_zod.z.string().optional(),
|
|
423
|
+
secondaryForeground: import_zod.z.string().optional(),
|
|
424
|
+
accent: import_zod.z.string().optional(),
|
|
425
|
+
accentForeground: import_zod.z.string().optional(),
|
|
426
|
+
background: import_zod.z.string(),
|
|
427
|
+
foreground: import_zod.z.string(),
|
|
428
|
+
surface: import_zod.z.string().optional(),
|
|
429
|
+
surfaceForeground: import_zod.z.string().optional(),
|
|
430
|
+
muted: import_zod.z.string().optional(),
|
|
431
|
+
mutedForeground: import_zod.z.string().optional(),
|
|
432
|
+
destructive: import_zod.z.string().optional(),
|
|
433
|
+
destructiveForeground: import_zod.z.string().optional(),
|
|
434
|
+
border: import_zod.z.string().optional(),
|
|
435
|
+
ring: import_zod.z.string().optional(),
|
|
436
|
+
customProperties: import_zod.z.record(import_zod.z.string()).optional()
|
|
437
|
+
});
|
|
438
|
+
var ThemeTypographyTokensSchema = import_zod.z.object({
|
|
439
|
+
fontSans: import_zod.z.string().optional(),
|
|
440
|
+
fontMono: import_zod.z.string().optional(),
|
|
441
|
+
fontHeading: import_zod.z.string().optional(),
|
|
442
|
+
fontImports: import_zod.z.array(import_zod.z.string()).optional(),
|
|
443
|
+
fontCss: import_zod.z.string().optional(),
|
|
444
|
+
fontSize: import_zod.z.record(import_zod.z.string()).optional(),
|
|
445
|
+
fontWeight: import_zod.z.record(import_zod.z.string()).optional()
|
|
446
|
+
});
|
|
447
|
+
var ThemeTokensSchema = import_zod.z.object({
|
|
448
|
+
colors: import_zod.z.object({
|
|
449
|
+
light: ThemeColorsSchema,
|
|
450
|
+
dark: ThemeColorsSchema.partial().optional()
|
|
451
|
+
}),
|
|
452
|
+
typography: ThemeTypographyTokensSchema.optional(),
|
|
453
|
+
radii: import_zod.z.record(import_zod.z.string().optional()).optional(),
|
|
454
|
+
spacing: import_zod.z.record(import_zod.z.string()).optional(),
|
|
455
|
+
paddings: import_zod.z.record(import_zod.z.string()).optional(),
|
|
456
|
+
shadows: import_zod.z.record(import_zod.z.string()).optional()
|
|
457
|
+
});
|
|
458
|
+
var ThemeSchema = import_zod.z.object({
|
|
459
|
+
id: import_zod.z.string().describe("e.g. 'shadcn-zinc', 'tokyo-night', 'glassmorphism-cyber'"),
|
|
460
|
+
name: import_zod.z.string().describe("e.g. 'Shadcn Zinc Modern'"),
|
|
461
|
+
description: import_zod.z.string().optional(),
|
|
462
|
+
tokens: ThemeTokensSchema,
|
|
463
|
+
supportsDarkMode: import_zod.z.boolean().optional(),
|
|
464
|
+
isSystem: import_zod.z.boolean().optional(),
|
|
465
|
+
createdAt: import_zod.z.string().describe("ISO timestamp"),
|
|
466
|
+
updatedAt: import_zod.z.string().describe("ISO timestamp")
|
|
467
|
+
});
|
|
468
|
+
var ThemeIngestionInputSchema = import_zod.z.object({
|
|
469
|
+
id: import_zod.z.string().optional(),
|
|
470
|
+
name: import_zod.z.string(),
|
|
471
|
+
description: import_zod.z.string().optional(),
|
|
472
|
+
tokens: ThemeTokensSchema.optional(),
|
|
473
|
+
rawCss: import_zod.z.string().optional(),
|
|
474
|
+
supportsDarkMode: import_zod.z.boolean().optional(),
|
|
475
|
+
isSystem: import_zod.z.boolean().optional()
|
|
282
476
|
});
|
|
283
477
|
var JsonGenerationSchema = import_zod.z.object({
|
|
284
478
|
prompt: import_zod.z.string(),
|
|
@@ -564,8 +758,269 @@ var FormSubmissionPayloadSchema = import_zod.z.object({
|
|
|
564
758
|
submittedAt: import_zod.z.string().optional(),
|
|
565
759
|
score: SubmissionScoreSchema.optional()
|
|
566
760
|
});
|
|
761
|
+
var formJsonCondition = {
|
|
762
|
+
type: "object",
|
|
763
|
+
properties: {
|
|
764
|
+
field: { type: "string" },
|
|
765
|
+
fieldId: { type: "string" },
|
|
766
|
+
operator: {
|
|
767
|
+
enum: [
|
|
768
|
+
"equals",
|
|
769
|
+
"notEquals",
|
|
770
|
+
"not_equals",
|
|
771
|
+
"includes",
|
|
772
|
+
"contains",
|
|
773
|
+
"greaterThan",
|
|
774
|
+
"greater_than",
|
|
775
|
+
"lessThan",
|
|
776
|
+
"less_than",
|
|
777
|
+
"exists"
|
|
778
|
+
]
|
|
779
|
+
},
|
|
780
|
+
value: { type: ["string", "number", "boolean"] }
|
|
781
|
+
},
|
|
782
|
+
required: ["operator"]
|
|
783
|
+
};
|
|
784
|
+
var formJsonControl = {
|
|
785
|
+
type: "object",
|
|
786
|
+
properties: {
|
|
787
|
+
id: { type: "string" },
|
|
788
|
+
type: {
|
|
789
|
+
enum: [
|
|
790
|
+
"text",
|
|
791
|
+
"textarea",
|
|
792
|
+
"number",
|
|
793
|
+
"select",
|
|
794
|
+
"multiselect",
|
|
795
|
+
"radio",
|
|
796
|
+
"checkbox",
|
|
797
|
+
"date",
|
|
798
|
+
"file",
|
|
799
|
+
"company",
|
|
800
|
+
"user",
|
|
801
|
+
"slider",
|
|
802
|
+
"computed",
|
|
803
|
+
"repeater"
|
|
804
|
+
]
|
|
805
|
+
},
|
|
806
|
+
label: { type: "string" },
|
|
807
|
+
description: { type: "string" },
|
|
808
|
+
helperText: { type: "string" },
|
|
809
|
+
placeholder: { type: "string" },
|
|
810
|
+
required: { type: "boolean" },
|
|
811
|
+
defaultValue: {},
|
|
812
|
+
options: {
|
|
813
|
+
type: "array",
|
|
814
|
+
items: {
|
|
815
|
+
type: "object",
|
|
816
|
+
properties: { label: { type: "string" }, value: { type: "string" } },
|
|
817
|
+
required: ["label", "value"]
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
dataSource: { enum: ["companies", "users"] },
|
|
821
|
+
validation: {
|
|
822
|
+
type: "object",
|
|
823
|
+
properties: {
|
|
824
|
+
min: { type: "number" },
|
|
825
|
+
max: { type: "number" },
|
|
826
|
+
minLength: { type: "number" },
|
|
827
|
+
maxLength: { type: "number" },
|
|
828
|
+
pattern: { type: "string" },
|
|
829
|
+
message: { type: "string" },
|
|
830
|
+
unit: { type: "string" }
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
pattern: { type: "string" },
|
|
834
|
+
min: { type: "number" },
|
|
835
|
+
max: { type: "number" },
|
|
836
|
+
step: { type: "number" },
|
|
837
|
+
minItems: { type: "number" },
|
|
838
|
+
maxItems: { type: "number" },
|
|
839
|
+
formula: { type: "string" },
|
|
840
|
+
computed: { type: "object", properties: { formula: { type: "string" } } },
|
|
841
|
+
visibleWhen: formJsonCondition,
|
|
842
|
+
condition: formJsonCondition,
|
|
843
|
+
itemControls: { type: "array", items: { $ref: "#/$defs/control" } },
|
|
844
|
+
controls: { type: "array", items: { $ref: "#/$defs/control" } }
|
|
845
|
+
},
|
|
846
|
+
required: ["id", "type", "label"]
|
|
847
|
+
};
|
|
848
|
+
var FORM_SCHEMA_JSON_SCHEMA = {
|
|
849
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
850
|
+
$id: "https://workspace.local/schemas/generative-forms/form-schema-v1.json",
|
|
851
|
+
type: "object",
|
|
852
|
+
$defs: { control: formJsonControl },
|
|
853
|
+
properties: {
|
|
854
|
+
id: { type: "string" },
|
|
855
|
+
title: { type: "string" },
|
|
856
|
+
description: { type: "string" },
|
|
857
|
+
version: { type: ["string", "number"] },
|
|
858
|
+
stages: {
|
|
859
|
+
type: "array",
|
|
860
|
+
items: {
|
|
861
|
+
type: "object",
|
|
862
|
+
properties: {
|
|
863
|
+
id: { type: "string" },
|
|
864
|
+
title: { type: "string" },
|
|
865
|
+
description: { type: "string" },
|
|
866
|
+
gate: { type: "string" },
|
|
867
|
+
sections: {
|
|
868
|
+
type: "array",
|
|
869
|
+
items: {
|
|
870
|
+
type: "object",
|
|
871
|
+
properties: {
|
|
872
|
+
id: { type: "string" },
|
|
873
|
+
title: { type: "string" },
|
|
874
|
+
description: { type: "string" },
|
|
875
|
+
controls: { type: "array", items: { $ref: "#/$defs/control" } },
|
|
876
|
+
visibleWhen: formJsonCondition,
|
|
877
|
+
condition: formJsonCondition
|
|
878
|
+
},
|
|
879
|
+
required: ["id", "title", "controls"]
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
required: ["id", "title", "sections"]
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
decisionGates: {
|
|
887
|
+
type: "array",
|
|
888
|
+
items: {
|
|
889
|
+
type: "object",
|
|
890
|
+
properties: {
|
|
891
|
+
id: { type: "string" },
|
|
892
|
+
title: { type: "string" },
|
|
893
|
+
description: { type: "string" },
|
|
894
|
+
stageId: { type: "string" },
|
|
895
|
+
kind: { enum: ["approval", "review", "decision"] },
|
|
896
|
+
trigger: { type: "string" },
|
|
897
|
+
requiredAction: { type: "string" },
|
|
898
|
+
consequence: { type: "string" },
|
|
899
|
+
condition: { anyOf: [formJsonCondition, { type: "string" }] },
|
|
900
|
+
blocking: { type: "boolean" },
|
|
901
|
+
reviewerRole: { type: "string" }
|
|
902
|
+
},
|
|
903
|
+
required: ["id", "title", "stageId", "blocking"]
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
validators: {
|
|
907
|
+
type: "array",
|
|
908
|
+
items: {
|
|
909
|
+
type: "object",
|
|
910
|
+
properties: {
|
|
911
|
+
id: { type: "string" },
|
|
912
|
+
description: { type: "string" },
|
|
913
|
+
fields: { type: "array", items: { type: "string" } },
|
|
914
|
+
severity: { type: "string" },
|
|
915
|
+
type: { type: "string" },
|
|
916
|
+
config: {}
|
|
917
|
+
},
|
|
918
|
+
required: ["id"]
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
handoffActions: {
|
|
922
|
+
type: "array",
|
|
923
|
+
items: {
|
|
924
|
+
type: "object",
|
|
925
|
+
properties: {
|
|
926
|
+
id: { type: "string" },
|
|
927
|
+
label: { type: "string" },
|
|
928
|
+
destination: { type: "string" },
|
|
929
|
+
condition: { anyOf: [formJsonCondition, { type: "string" }] },
|
|
930
|
+
payloadFields: { type: "array", items: { type: "string" } },
|
|
931
|
+
type: { type: "string" },
|
|
932
|
+
config: {}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
review: {
|
|
937
|
+
type: "object",
|
|
938
|
+
properties: {
|
|
939
|
+
humanReviewRequired: { type: "boolean" },
|
|
940
|
+
reviewAreas: { type: "array", items: { type: "string" } }
|
|
941
|
+
},
|
|
942
|
+
required: ["humanReviewRequired", "reviewAreas"]
|
|
943
|
+
},
|
|
944
|
+
reviewMetadata: {
|
|
945
|
+
type: "object",
|
|
946
|
+
properties: {
|
|
947
|
+
approvers: { type: "array", items: { type: "string" } },
|
|
948
|
+
requirements: { type: "array", items: { type: "string" } }
|
|
949
|
+
},
|
|
950
|
+
required: ["approvers", "requirements"]
|
|
951
|
+
},
|
|
952
|
+
scoring: {
|
|
953
|
+
type: "object",
|
|
954
|
+
properties: {
|
|
955
|
+
description: { type: "string" },
|
|
956
|
+
dimensions: {
|
|
957
|
+
type: "array",
|
|
958
|
+
minItems: 1,
|
|
959
|
+
items: {
|
|
960
|
+
type: "object",
|
|
961
|
+
properties: {
|
|
962
|
+
id: { type: "string" },
|
|
963
|
+
label: { type: "string" },
|
|
964
|
+
description: { type: "string" },
|
|
965
|
+
weight: { type: "number" },
|
|
966
|
+
rules: {
|
|
967
|
+
type: "array",
|
|
968
|
+
minItems: 1,
|
|
969
|
+
items: {
|
|
970
|
+
type: "object",
|
|
971
|
+
properties: {
|
|
972
|
+
field: { type: "string" },
|
|
973
|
+
optionPoints: {
|
|
974
|
+
type: "object",
|
|
975
|
+
additionalProperties: { type: "number" }
|
|
976
|
+
},
|
|
977
|
+
ranges: {
|
|
978
|
+
type: "array",
|
|
979
|
+
items: {
|
|
980
|
+
type: "object",
|
|
981
|
+
properties: {
|
|
982
|
+
min: { type: "number" },
|
|
983
|
+
max: { type: "number" },
|
|
984
|
+
points: { type: "number" }
|
|
985
|
+
},
|
|
986
|
+
required: ["points"]
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
multiplier: { type: "number" },
|
|
990
|
+
truePoints: { type: "number" },
|
|
991
|
+
falsePoints: { type: "number" }
|
|
992
|
+
},
|
|
993
|
+
required: ["field"]
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
required: ["id", "label", "rules"]
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
bands: {
|
|
1001
|
+
type: "array",
|
|
1002
|
+
items: {
|
|
1003
|
+
type: "object",
|
|
1004
|
+
properties: {
|
|
1005
|
+
id: { type: "string" },
|
|
1006
|
+
label: { type: "string" },
|
|
1007
|
+
min: { type: "number" },
|
|
1008
|
+
max: { type: "number" }
|
|
1009
|
+
},
|
|
1010
|
+
required: ["id", "label", "min"]
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
required: ["dimensions"]
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
required: ["version", "stages"]
|
|
1018
|
+
};
|
|
567
1019
|
// Annotate the CommonJS export names for ESM import in node:
|
|
568
1020
|
0 && (module.exports = {
|
|
1021
|
+
ActivityActionSchema,
|
|
1022
|
+
ActivityLogSchema,
|
|
1023
|
+
AestheticSchema,
|
|
569
1024
|
AgentConfigSchema,
|
|
570
1025
|
AgentDocumentAttachmentSchema,
|
|
571
1026
|
AgentEnvironmentSchema,
|
|
@@ -578,8 +1033,14 @@ var FormSubmissionPayloadSchema = import_zod.z.object({
|
|
|
578
1033
|
AgentToolTypeSchema,
|
|
579
1034
|
AspectRatioSchema,
|
|
580
1035
|
CodeGenerationSchema,
|
|
1036
|
+
ComponentDocsSchema,
|
|
1037
|
+
ComponentPackageSchema,
|
|
581
1038
|
ComponentPropDefinitionSchema,
|
|
1039
|
+
ComponentPropDocSchema,
|
|
582
1040
|
ComponentSynthesisSchema,
|
|
1041
|
+
ComponentTransformationResultSchema,
|
|
1042
|
+
ComponentVariantSchema,
|
|
1043
|
+
ComponentVersionSchema,
|
|
583
1044
|
ConditionOperatorSchema,
|
|
584
1045
|
ConditionSchema,
|
|
585
1046
|
ControlValidationSchema,
|
|
@@ -587,6 +1048,7 @@ var FormSubmissionPayloadSchema = import_zod.z.object({
|
|
|
587
1048
|
DecisionGateSchema,
|
|
588
1049
|
DimensionScoreSchema,
|
|
589
1050
|
DropShadowSchema,
|
|
1051
|
+
FORM_SCHEMA_JSON_SCHEMA,
|
|
590
1052
|
FidelitySchema,
|
|
591
1053
|
FormControlSchema,
|
|
592
1054
|
FormControlTypeSchema,
|
|
@@ -597,12 +1059,16 @@ var FormSubmissionPayloadSchema = import_zod.z.object({
|
|
|
597
1059
|
FormStageSchema,
|
|
598
1060
|
FormSubmissionPayloadSchema,
|
|
599
1061
|
FormValidatorSchema,
|
|
1062
|
+
GenerateHarnessOptionsSchema,
|
|
600
1063
|
ImageCompositingSchema,
|
|
601
1064
|
ImageGenerationSchema,
|
|
602
1065
|
ImageTextOverlaySchema,
|
|
603
1066
|
ImageTransformationSchema,
|
|
604
1067
|
ImageWatermarkSchema,
|
|
1068
|
+
IngestionInputSchema,
|
|
605
1069
|
JsonGenerationSchema,
|
|
1070
|
+
PlatformLanguageSchema,
|
|
1071
|
+
PreviewHarnessSchema,
|
|
606
1072
|
QueueJobSchema,
|
|
607
1073
|
QueueJobStatusSchema,
|
|
608
1074
|
QueueJobTypeSchema,
|
|
@@ -620,6 +1086,13 @@ var FormSubmissionPayloadSchema = import_zod.z.object({
|
|
|
620
1086
|
TechnicalFormSchema,
|
|
621
1087
|
TextAlignmentSchema,
|
|
622
1088
|
TextOverlayPositionSchema,
|
|
1089
|
+
ThemeColorsSchema,
|
|
1090
|
+
ThemeIngestionInputSchema,
|
|
1091
|
+
ThemeSchema,
|
|
1092
|
+
ThemeSupportSchema,
|
|
1093
|
+
ThemeTokensSchema,
|
|
1094
|
+
ThemeTypographyTokensSchema,
|
|
1095
|
+
UIComponentTypeSchema,
|
|
623
1096
|
VideoAnalysisCategorySchema,
|
|
624
1097
|
VideoAnalysisSchema,
|
|
625
1098
|
VideoAspectRatioSchema,
|