@pixerate/schemas 1.6.0 → 1.7.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 +36 -0
- package/dist/index.d.cts +83 -3
- package/dist/index.d.ts +83 -3
- package/dist/index.js +32 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -99,6 +99,10 @@ __export(index_exports, {
|
|
|
99
99
|
ThemeTokensSchema: () => ThemeTokensSchema,
|
|
100
100
|
ThemeTypographyTokensSchema: () => ThemeTypographyTokensSchema,
|
|
101
101
|
UIComponentTypeSchema: () => UIComponentTypeSchema,
|
|
102
|
+
UIExtractionResultSchema: () => UIExtractionResultSchema,
|
|
103
|
+
UIGenerationOptionsSchema: () => UIGenerationOptionsSchema,
|
|
104
|
+
UIGenerationResultSchema: () => UIGenerationResultSchema,
|
|
105
|
+
UIValidationResultSchema: () => UIValidationResultSchema,
|
|
102
106
|
VideoAnalysisCategorySchema: () => VideoAnalysisCategorySchema,
|
|
103
107
|
VideoAnalysisSchema: () => VideoAnalysisSchema,
|
|
104
108
|
VideoAspectRatioSchema: () => VideoAspectRatioSchema,
|
|
@@ -539,6 +543,34 @@ var ThemeIngestionInputSchema = import_zod.z.object({
|
|
|
539
543
|
supportsDarkMode: import_zod.z.boolean().optional(),
|
|
540
544
|
isSystem: import_zod.z.boolean().optional()
|
|
541
545
|
});
|
|
546
|
+
var UIGenerationOptionsSchema = import_zod.z.object({
|
|
547
|
+
prompt: import_zod.z.string().describe("User prompt or instruction for component generation/modification"),
|
|
548
|
+
currentCode: import_zod.z.string().optional().describe("Existing component code for iterative modification"),
|
|
549
|
+
platform: PlatformLanguageSchema.optional().default("svelte").describe("Target component platform language"),
|
|
550
|
+
theme: import_zod.z.string().optional().describe("Theme identifier or token reference"),
|
|
551
|
+
systemPrompt: import_zod.z.string().optional().describe("Custom or override system prompt"),
|
|
552
|
+
maxRetries: import_zod.z.number().int().nonnegative().optional().default(3).describe("Maximum retry attempts for iterative auto-repair validation"),
|
|
553
|
+
temperature: import_zod.z.number().optional().describe("Model temperature")
|
|
554
|
+
});
|
|
555
|
+
var UIExtractionResultSchema = import_zod.z.object({
|
|
556
|
+
code: import_zod.z.string().describe("Clean extracted component code without markdown fences"),
|
|
557
|
+
postamble: import_zod.z.string().optional().describe("Conversational explanation or summary after the code block"),
|
|
558
|
+
rawText: import_zod.z.string().optional().describe("Complete raw output from the model")
|
|
559
|
+
});
|
|
560
|
+
var UIValidationResultSchema = import_zod.z.object({
|
|
561
|
+
valid: import_zod.z.boolean().describe("Whether the component passed syntax and linter validation"),
|
|
562
|
+
error: import_zod.z.string().optional().describe("Error output from validation if failed"),
|
|
563
|
+
errors: import_zod.z.array(import_zod.z.string()).optional().describe("List of parsed validation errors"),
|
|
564
|
+
formattedCode: import_zod.z.string().optional().describe("Prettier-formatted component code if available")
|
|
565
|
+
});
|
|
566
|
+
var UIGenerationResultSchema = import_zod.z.object({
|
|
567
|
+
code: import_zod.z.string().describe("Final validated component code"),
|
|
568
|
+
postamble: import_zod.z.string().optional().describe("Conversational explanation or summary"),
|
|
569
|
+
rawText: import_zod.z.string().optional().describe("Complete raw model output"),
|
|
570
|
+
isValid: import_zod.z.boolean().optional().describe("Whether the final code passed validation"),
|
|
571
|
+
validationAttempts: import_zod.z.number().int().optional().describe("Total number of generation/repair attempts"),
|
|
572
|
+
validationError: import_zod.z.string().optional().describe("Validation error if still failing after max retries")
|
|
573
|
+
});
|
|
542
574
|
var JsonGenerationSchema = import_zod.z.object({
|
|
543
575
|
prompt: import_zod.z.string(),
|
|
544
576
|
schema: import_zod.z.record(import_zod.z.any()).optional()
|
|
@@ -1162,6 +1194,10 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
1162
1194
|
ThemeTokensSchema,
|
|
1163
1195
|
ThemeTypographyTokensSchema,
|
|
1164
1196
|
UIComponentTypeSchema,
|
|
1197
|
+
UIExtractionResultSchema,
|
|
1198
|
+
UIGenerationOptionsSchema,
|
|
1199
|
+
UIGenerationResultSchema,
|
|
1200
|
+
UIValidationResultSchema,
|
|
1165
1201
|
VideoAnalysisCategorySchema,
|
|
1166
1202
|
VideoAnalysisSchema,
|
|
1167
1203
|
VideoAspectRatioSchema,
|
package/dist/index.d.cts
CHANGED
|
@@ -5791,6 +5791,86 @@ declare const ThemeIngestionInputSchema: z.ZodObject<{
|
|
|
5791
5791
|
rawCss?: string | undefined;
|
|
5792
5792
|
}>;
|
|
5793
5793
|
type ThemeIngestionInput = z.infer<typeof ThemeIngestionInputSchema>;
|
|
5794
|
+
declare const UIGenerationOptionsSchema: z.ZodObject<{
|
|
5795
|
+
prompt: z.ZodString;
|
|
5796
|
+
currentCode: z.ZodOptional<z.ZodString>;
|
|
5797
|
+
platform: z.ZodDefault<z.ZodOptional<z.ZodEnum<["svelte", "react", "webcomponent"]>>>;
|
|
5798
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
5799
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
5800
|
+
maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
5801
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
5802
|
+
}, "strip", z.ZodTypeAny, {
|
|
5803
|
+
prompt: string;
|
|
5804
|
+
platform: "svelte" | "react" | "webcomponent";
|
|
5805
|
+
maxRetries: number;
|
|
5806
|
+
currentCode?: string | undefined;
|
|
5807
|
+
theme?: string | undefined;
|
|
5808
|
+
systemPrompt?: string | undefined;
|
|
5809
|
+
temperature?: number | undefined;
|
|
5810
|
+
}, {
|
|
5811
|
+
prompt: string;
|
|
5812
|
+
currentCode?: string | undefined;
|
|
5813
|
+
platform?: "svelte" | "react" | "webcomponent" | undefined;
|
|
5814
|
+
theme?: string | undefined;
|
|
5815
|
+
systemPrompt?: string | undefined;
|
|
5816
|
+
maxRetries?: number | undefined;
|
|
5817
|
+
temperature?: number | undefined;
|
|
5818
|
+
}>;
|
|
5819
|
+
type UIGenerationOptionsPayload = z.infer<typeof UIGenerationOptionsSchema>;
|
|
5820
|
+
declare const UIExtractionResultSchema: z.ZodObject<{
|
|
5821
|
+
code: z.ZodString;
|
|
5822
|
+
postamble: z.ZodOptional<z.ZodString>;
|
|
5823
|
+
rawText: z.ZodOptional<z.ZodString>;
|
|
5824
|
+
}, "strip", z.ZodTypeAny, {
|
|
5825
|
+
code: string;
|
|
5826
|
+
postamble?: string | undefined;
|
|
5827
|
+
rawText?: string | undefined;
|
|
5828
|
+
}, {
|
|
5829
|
+
code: string;
|
|
5830
|
+
postamble?: string | undefined;
|
|
5831
|
+
rawText?: string | undefined;
|
|
5832
|
+
}>;
|
|
5833
|
+
type UIExtractionResult = z.infer<typeof UIExtractionResultSchema>;
|
|
5834
|
+
declare const UIValidationResultSchema: z.ZodObject<{
|
|
5835
|
+
valid: z.ZodBoolean;
|
|
5836
|
+
error: z.ZodOptional<z.ZodString>;
|
|
5837
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5838
|
+
formattedCode: z.ZodOptional<z.ZodString>;
|
|
5839
|
+
}, "strip", z.ZodTypeAny, {
|
|
5840
|
+
valid: boolean;
|
|
5841
|
+
error?: string | undefined;
|
|
5842
|
+
errors?: string[] | undefined;
|
|
5843
|
+
formattedCode?: string | undefined;
|
|
5844
|
+
}, {
|
|
5845
|
+
valid: boolean;
|
|
5846
|
+
error?: string | undefined;
|
|
5847
|
+
errors?: string[] | undefined;
|
|
5848
|
+
formattedCode?: string | undefined;
|
|
5849
|
+
}>;
|
|
5850
|
+
type UIValidationResult = z.infer<typeof UIValidationResultSchema>;
|
|
5851
|
+
declare const UIGenerationResultSchema: z.ZodObject<{
|
|
5852
|
+
code: z.ZodString;
|
|
5853
|
+
postamble: z.ZodOptional<z.ZodString>;
|
|
5854
|
+
rawText: z.ZodOptional<z.ZodString>;
|
|
5855
|
+
isValid: z.ZodOptional<z.ZodBoolean>;
|
|
5856
|
+
validationAttempts: z.ZodOptional<z.ZodNumber>;
|
|
5857
|
+
validationError: z.ZodOptional<z.ZodString>;
|
|
5858
|
+
}, "strip", z.ZodTypeAny, {
|
|
5859
|
+
code: string;
|
|
5860
|
+
postamble?: string | undefined;
|
|
5861
|
+
rawText?: string | undefined;
|
|
5862
|
+
isValid?: boolean | undefined;
|
|
5863
|
+
validationAttempts?: number | undefined;
|
|
5864
|
+
validationError?: string | undefined;
|
|
5865
|
+
}, {
|
|
5866
|
+
code: string;
|
|
5867
|
+
postamble?: string | undefined;
|
|
5868
|
+
rawText?: string | undefined;
|
|
5869
|
+
isValid?: boolean | undefined;
|
|
5870
|
+
validationAttempts?: number | undefined;
|
|
5871
|
+
validationError?: string | undefined;
|
|
5872
|
+
}>;
|
|
5873
|
+
type UIGenerationResult = z.infer<typeof UIGenerationResultSchema>;
|
|
5794
5874
|
declare const JsonGenerationSchema: z.ZodObject<{
|
|
5795
5875
|
prompt: z.ZodString;
|
|
5796
5876
|
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -6153,8 +6233,8 @@ declare const AgentInteractionResultSchema: z.ZodObject<{
|
|
|
6153
6233
|
agent: string;
|
|
6154
6234
|
createdAt?: string | undefined;
|
|
6155
6235
|
updatedAt?: string | undefined;
|
|
6156
|
-
outputText?: string | undefined;
|
|
6157
6236
|
error?: string | undefined;
|
|
6237
|
+
outputText?: string | undefined;
|
|
6158
6238
|
latencyMs?: number | undefined;
|
|
6159
6239
|
metadata?: Record<string, any> | undefined;
|
|
6160
6240
|
}, {
|
|
@@ -6163,8 +6243,8 @@ declare const AgentInteractionResultSchema: z.ZodObject<{
|
|
|
6163
6243
|
agent: string;
|
|
6164
6244
|
createdAt?: string | undefined;
|
|
6165
6245
|
updatedAt?: string | undefined;
|
|
6166
|
-
outputText?: string | undefined;
|
|
6167
6246
|
error?: string | undefined;
|
|
6247
|
+
outputText?: string | undefined;
|
|
6168
6248
|
latencyMs?: number | undefined;
|
|
6169
6249
|
metadata?: Record<string, any> | undefined;
|
|
6170
6250
|
}>;
|
|
@@ -8376,4 +8456,4 @@ declare const FORM_SCHEMA_JSON_SCHEMA: {
|
|
|
8376
8456
|
readonly required: readonly ["version", "stages"];
|
|
8377
8457
|
};
|
|
8378
8458
|
|
|
8379
|
-
export { type ActivityAction, ActivityActionSchema, type ActivityLog, ActivityLogSchema, type Aesthetic, AestheticSchema, type AgentConfig, AgentConfigSchema, type AgentDocumentAttachment, AgentDocumentAttachmentSchema, type AgentEnvironment, AgentEnvironmentSchema, type AgentInteractionRequest, AgentInteractionRequestSchema, type AgentInteractionResult, AgentInteractionResultSchema, type AgentInteractionStatus, AgentInteractionStatusSchema, type AgentNetworkAllowlistRule, AgentNetworkAllowlistRuleSchema, type AgentNetworkTransformRule, AgentNetworkTransformRuleSchema, type AgentTool, AgentToolSchema, type AgentToolType, AgentToolTypeSchema, type AspectRatio, AspectRatioSchema, type AudioMixOptions, AudioMixOptionsSchema, type AudioMixTrack, AudioMixTrackSchema, type CodeGenerationPayload, CodeGenerationSchema, type ComponentDocs, ComponentDocsSchema, type ComponentPackage, ComponentPackageSchema, type ComponentPropDefinition, ComponentPropDefinitionSchema, type ComponentPropDoc, ComponentPropDocSchema, type ComponentSynthesisPayload, ComponentSynthesisSchema, type ComponentTransformationResult, ComponentTransformationResultSchema, type ComponentVariant, ComponentVariantSchema, type ComponentVersion, ComponentVersionSchema, type Condition, type ConditionOperator, ConditionOperatorSchema, ConditionSchema, type ControlValidation, ControlValidationSchema, type DecisionGate, type DecisionGateKind, DecisionGateKindSchema, DecisionGateSchema, type DimensionScore, DimensionScoreSchema, type DropShadow, DropShadowSchema, FORM_SCHEMA_JSON_SCHEMA, type Fidelity, FidelitySchema, type FormControl, FormControlSchema, type FormControlType, FormControlTypeSchema, type FormHandoffAction, FormHandoffActionSchema, type FormOption, FormOptionSchema, type FormReviewMeta, FormReviewMetaSchema, type FormSection, FormSectionSchema, type FormStage, FormStageSchema, type FormSubmissionPayload, FormSubmissionPayloadSchema, type FormValidator, FormValidatorSchema, type GenerateHarnessOptions, GenerateHarnessOptionsSchema, type ImageCompositingPayload, ImageCompositingSchema, type ImageGenerationPayload, ImageGenerationSchema, type ImageTextOverlay, ImageTextOverlaySchema, type ImageTransformationPayload, ImageTransformationSchema, type ImageWatermark, ImageWatermarkSchema, type IngestionInput, IngestionInputSchema, type JsonGenerationPayload, JsonGenerationSchema, type PlatformLanguage, PlatformLanguageSchema, type PreviewHarness, PreviewHarnessSchema, type QueueJob, QueueJobSchema, type QueueJobStatus, QueueJobStatusSchema, type QueueJobType, QueueJobTypeSchema, type ReferenceDataSource, ReferenceDataSourceSchema, type ScoreBand, ScoreBandSchema, type ScoringConfig, ScoringConfigSchema, type ScoringDimension, ScoringDimensionSchema, type ScoringRule, ScoringRuleSchema, type SemanticReviewIssue, SemanticReviewIssueSchema, type SemanticReviewResult, SemanticReviewResultSchema, type SemanticReviewStatus, SemanticReviewStatusSchema, type ServiceClient, ServiceClientSchema, type SocialVideoGenerationPayload, SocialVideoGenerationSchema, type SubmissionScore, SubmissionScoreSchema, TechnicalFormSchema, type TechnicalSchema, type TextAlignment, TextAlignmentSchema, type TextOverlay, type TextOverlayPosition, TextOverlayPositionSchema, TextOverlaySchema, type TextOverlayStyle, TextOverlayStyleSchema, type Theme, type ThemeColors, ThemeColorsSchema, type ThemeIngestionInput, ThemeIngestionInputSchema, ThemeSchema, type ThemeSupport, ThemeSupportSchema, type ThemeTokens, ThemeTokensSchema, type ThemeTypographyTokens, ThemeTypographyTokensSchema, type UIComponentType, UIComponentTypeSchema, type VideoAnalysisCategory, VideoAnalysisCategorySchema, type VideoAnalysisPayload, VideoAnalysisSchema, type VideoAspectRatio, VideoAspectRatioSchema, type VideoCompositingPayload, VideoCompositingSchema, type VideoCompressionPayload, VideoCompressionSchema, type VideoFrameImage, VideoFrameImageSchema, type VideoGenerationPayload, VideoGenerationSchema, type VideoOverlayOptions, VideoOverlayOptionsSchema, type VideoOverlayStyle, VideoOverlayStyleSchema, type VideoPipeline, VideoPipelineSchema, type VideoResolution, VideoResolutionSchema, type VideoScaleAndPad, VideoScaleAndPadSchema, type VideoTextOverlay, VideoTextOverlaySchema, type VideoTranscodePayload, VideoTranscodeSchema, type VideoUpscalePayload, VideoUpscaleSchema, type VideoWatermark, VideoWatermarkSchema, type Watermark, type WatermarkPosition, WatermarkPositionSchema, WatermarkSchema };
|
|
8459
|
+
export { type ActivityAction, ActivityActionSchema, type ActivityLog, ActivityLogSchema, type Aesthetic, AestheticSchema, type AgentConfig, AgentConfigSchema, type AgentDocumentAttachment, AgentDocumentAttachmentSchema, type AgentEnvironment, AgentEnvironmentSchema, type AgentInteractionRequest, AgentInteractionRequestSchema, type AgentInteractionResult, AgentInteractionResultSchema, type AgentInteractionStatus, AgentInteractionStatusSchema, type AgentNetworkAllowlistRule, AgentNetworkAllowlistRuleSchema, type AgentNetworkTransformRule, AgentNetworkTransformRuleSchema, type AgentTool, AgentToolSchema, type AgentToolType, AgentToolTypeSchema, type AspectRatio, AspectRatioSchema, type AudioMixOptions, AudioMixOptionsSchema, type AudioMixTrack, AudioMixTrackSchema, type CodeGenerationPayload, CodeGenerationSchema, type ComponentDocs, ComponentDocsSchema, type ComponentPackage, ComponentPackageSchema, type ComponentPropDefinition, ComponentPropDefinitionSchema, type ComponentPropDoc, ComponentPropDocSchema, type ComponentSynthesisPayload, ComponentSynthesisSchema, type ComponentTransformationResult, ComponentTransformationResultSchema, type ComponentVariant, ComponentVariantSchema, type ComponentVersion, ComponentVersionSchema, type Condition, type ConditionOperator, ConditionOperatorSchema, ConditionSchema, type ControlValidation, ControlValidationSchema, type DecisionGate, type DecisionGateKind, DecisionGateKindSchema, DecisionGateSchema, type DimensionScore, DimensionScoreSchema, type DropShadow, DropShadowSchema, FORM_SCHEMA_JSON_SCHEMA, type Fidelity, FidelitySchema, type FormControl, FormControlSchema, type FormControlType, FormControlTypeSchema, type FormHandoffAction, FormHandoffActionSchema, type FormOption, FormOptionSchema, type FormReviewMeta, FormReviewMetaSchema, type FormSection, FormSectionSchema, type FormStage, FormStageSchema, type FormSubmissionPayload, FormSubmissionPayloadSchema, type FormValidator, FormValidatorSchema, type GenerateHarnessOptions, GenerateHarnessOptionsSchema, type ImageCompositingPayload, ImageCompositingSchema, type ImageGenerationPayload, ImageGenerationSchema, type ImageTextOverlay, ImageTextOverlaySchema, type ImageTransformationPayload, ImageTransformationSchema, type ImageWatermark, ImageWatermarkSchema, type IngestionInput, IngestionInputSchema, type JsonGenerationPayload, JsonGenerationSchema, type PlatformLanguage, PlatformLanguageSchema, type PreviewHarness, PreviewHarnessSchema, type QueueJob, QueueJobSchema, type QueueJobStatus, QueueJobStatusSchema, type QueueJobType, QueueJobTypeSchema, type ReferenceDataSource, ReferenceDataSourceSchema, type ScoreBand, ScoreBandSchema, type ScoringConfig, ScoringConfigSchema, type ScoringDimension, ScoringDimensionSchema, type ScoringRule, ScoringRuleSchema, type SemanticReviewIssue, SemanticReviewIssueSchema, type SemanticReviewResult, SemanticReviewResultSchema, type SemanticReviewStatus, SemanticReviewStatusSchema, type ServiceClient, ServiceClientSchema, type SocialVideoGenerationPayload, SocialVideoGenerationSchema, type SubmissionScore, SubmissionScoreSchema, TechnicalFormSchema, type TechnicalSchema, type TextAlignment, TextAlignmentSchema, type TextOverlay, type TextOverlayPosition, TextOverlayPositionSchema, TextOverlaySchema, type TextOverlayStyle, TextOverlayStyleSchema, type Theme, type ThemeColors, ThemeColorsSchema, type ThemeIngestionInput, ThemeIngestionInputSchema, ThemeSchema, type ThemeSupport, ThemeSupportSchema, type ThemeTokens, ThemeTokensSchema, type ThemeTypographyTokens, ThemeTypographyTokensSchema, type UIComponentType, UIComponentTypeSchema, type UIExtractionResult, UIExtractionResultSchema, type UIGenerationOptionsPayload, UIGenerationOptionsSchema, type UIGenerationResult, UIGenerationResultSchema, type UIValidationResult, UIValidationResultSchema, type VideoAnalysisCategory, VideoAnalysisCategorySchema, type VideoAnalysisPayload, VideoAnalysisSchema, type VideoAspectRatio, VideoAspectRatioSchema, type VideoCompositingPayload, VideoCompositingSchema, type VideoCompressionPayload, VideoCompressionSchema, type VideoFrameImage, VideoFrameImageSchema, type VideoGenerationPayload, VideoGenerationSchema, type VideoOverlayOptions, VideoOverlayOptionsSchema, type VideoOverlayStyle, VideoOverlayStyleSchema, type VideoPipeline, VideoPipelineSchema, type VideoResolution, VideoResolutionSchema, type VideoScaleAndPad, VideoScaleAndPadSchema, type VideoTextOverlay, VideoTextOverlaySchema, type VideoTranscodePayload, VideoTranscodeSchema, type VideoUpscalePayload, VideoUpscaleSchema, type VideoWatermark, VideoWatermarkSchema, type Watermark, type WatermarkPosition, WatermarkPositionSchema, WatermarkSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -5791,6 +5791,86 @@ declare const ThemeIngestionInputSchema: z.ZodObject<{
|
|
|
5791
5791
|
rawCss?: string | undefined;
|
|
5792
5792
|
}>;
|
|
5793
5793
|
type ThemeIngestionInput = z.infer<typeof ThemeIngestionInputSchema>;
|
|
5794
|
+
declare const UIGenerationOptionsSchema: z.ZodObject<{
|
|
5795
|
+
prompt: z.ZodString;
|
|
5796
|
+
currentCode: z.ZodOptional<z.ZodString>;
|
|
5797
|
+
platform: z.ZodDefault<z.ZodOptional<z.ZodEnum<["svelte", "react", "webcomponent"]>>>;
|
|
5798
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
5799
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
5800
|
+
maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
5801
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
5802
|
+
}, "strip", z.ZodTypeAny, {
|
|
5803
|
+
prompt: string;
|
|
5804
|
+
platform: "svelte" | "react" | "webcomponent";
|
|
5805
|
+
maxRetries: number;
|
|
5806
|
+
currentCode?: string | undefined;
|
|
5807
|
+
theme?: string | undefined;
|
|
5808
|
+
systemPrompt?: string | undefined;
|
|
5809
|
+
temperature?: number | undefined;
|
|
5810
|
+
}, {
|
|
5811
|
+
prompt: string;
|
|
5812
|
+
currentCode?: string | undefined;
|
|
5813
|
+
platform?: "svelte" | "react" | "webcomponent" | undefined;
|
|
5814
|
+
theme?: string | undefined;
|
|
5815
|
+
systemPrompt?: string | undefined;
|
|
5816
|
+
maxRetries?: number | undefined;
|
|
5817
|
+
temperature?: number | undefined;
|
|
5818
|
+
}>;
|
|
5819
|
+
type UIGenerationOptionsPayload = z.infer<typeof UIGenerationOptionsSchema>;
|
|
5820
|
+
declare const UIExtractionResultSchema: z.ZodObject<{
|
|
5821
|
+
code: z.ZodString;
|
|
5822
|
+
postamble: z.ZodOptional<z.ZodString>;
|
|
5823
|
+
rawText: z.ZodOptional<z.ZodString>;
|
|
5824
|
+
}, "strip", z.ZodTypeAny, {
|
|
5825
|
+
code: string;
|
|
5826
|
+
postamble?: string | undefined;
|
|
5827
|
+
rawText?: string | undefined;
|
|
5828
|
+
}, {
|
|
5829
|
+
code: string;
|
|
5830
|
+
postamble?: string | undefined;
|
|
5831
|
+
rawText?: string | undefined;
|
|
5832
|
+
}>;
|
|
5833
|
+
type UIExtractionResult = z.infer<typeof UIExtractionResultSchema>;
|
|
5834
|
+
declare const UIValidationResultSchema: z.ZodObject<{
|
|
5835
|
+
valid: z.ZodBoolean;
|
|
5836
|
+
error: z.ZodOptional<z.ZodString>;
|
|
5837
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5838
|
+
formattedCode: z.ZodOptional<z.ZodString>;
|
|
5839
|
+
}, "strip", z.ZodTypeAny, {
|
|
5840
|
+
valid: boolean;
|
|
5841
|
+
error?: string | undefined;
|
|
5842
|
+
errors?: string[] | undefined;
|
|
5843
|
+
formattedCode?: string | undefined;
|
|
5844
|
+
}, {
|
|
5845
|
+
valid: boolean;
|
|
5846
|
+
error?: string | undefined;
|
|
5847
|
+
errors?: string[] | undefined;
|
|
5848
|
+
formattedCode?: string | undefined;
|
|
5849
|
+
}>;
|
|
5850
|
+
type UIValidationResult = z.infer<typeof UIValidationResultSchema>;
|
|
5851
|
+
declare const UIGenerationResultSchema: z.ZodObject<{
|
|
5852
|
+
code: z.ZodString;
|
|
5853
|
+
postamble: z.ZodOptional<z.ZodString>;
|
|
5854
|
+
rawText: z.ZodOptional<z.ZodString>;
|
|
5855
|
+
isValid: z.ZodOptional<z.ZodBoolean>;
|
|
5856
|
+
validationAttempts: z.ZodOptional<z.ZodNumber>;
|
|
5857
|
+
validationError: z.ZodOptional<z.ZodString>;
|
|
5858
|
+
}, "strip", z.ZodTypeAny, {
|
|
5859
|
+
code: string;
|
|
5860
|
+
postamble?: string | undefined;
|
|
5861
|
+
rawText?: string | undefined;
|
|
5862
|
+
isValid?: boolean | undefined;
|
|
5863
|
+
validationAttempts?: number | undefined;
|
|
5864
|
+
validationError?: string | undefined;
|
|
5865
|
+
}, {
|
|
5866
|
+
code: string;
|
|
5867
|
+
postamble?: string | undefined;
|
|
5868
|
+
rawText?: string | undefined;
|
|
5869
|
+
isValid?: boolean | undefined;
|
|
5870
|
+
validationAttempts?: number | undefined;
|
|
5871
|
+
validationError?: string | undefined;
|
|
5872
|
+
}>;
|
|
5873
|
+
type UIGenerationResult = z.infer<typeof UIGenerationResultSchema>;
|
|
5794
5874
|
declare const JsonGenerationSchema: z.ZodObject<{
|
|
5795
5875
|
prompt: z.ZodString;
|
|
5796
5876
|
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -6153,8 +6233,8 @@ declare const AgentInteractionResultSchema: z.ZodObject<{
|
|
|
6153
6233
|
agent: string;
|
|
6154
6234
|
createdAt?: string | undefined;
|
|
6155
6235
|
updatedAt?: string | undefined;
|
|
6156
|
-
outputText?: string | undefined;
|
|
6157
6236
|
error?: string | undefined;
|
|
6237
|
+
outputText?: string | undefined;
|
|
6158
6238
|
latencyMs?: number | undefined;
|
|
6159
6239
|
metadata?: Record<string, any> | undefined;
|
|
6160
6240
|
}, {
|
|
@@ -6163,8 +6243,8 @@ declare const AgentInteractionResultSchema: z.ZodObject<{
|
|
|
6163
6243
|
agent: string;
|
|
6164
6244
|
createdAt?: string | undefined;
|
|
6165
6245
|
updatedAt?: string | undefined;
|
|
6166
|
-
outputText?: string | undefined;
|
|
6167
6246
|
error?: string | undefined;
|
|
6247
|
+
outputText?: string | undefined;
|
|
6168
6248
|
latencyMs?: number | undefined;
|
|
6169
6249
|
metadata?: Record<string, any> | undefined;
|
|
6170
6250
|
}>;
|
|
@@ -8376,4 +8456,4 @@ declare const FORM_SCHEMA_JSON_SCHEMA: {
|
|
|
8376
8456
|
readonly required: readonly ["version", "stages"];
|
|
8377
8457
|
};
|
|
8378
8458
|
|
|
8379
|
-
export { type ActivityAction, ActivityActionSchema, type ActivityLog, ActivityLogSchema, type Aesthetic, AestheticSchema, type AgentConfig, AgentConfigSchema, type AgentDocumentAttachment, AgentDocumentAttachmentSchema, type AgentEnvironment, AgentEnvironmentSchema, type AgentInteractionRequest, AgentInteractionRequestSchema, type AgentInteractionResult, AgentInteractionResultSchema, type AgentInteractionStatus, AgentInteractionStatusSchema, type AgentNetworkAllowlistRule, AgentNetworkAllowlistRuleSchema, type AgentNetworkTransformRule, AgentNetworkTransformRuleSchema, type AgentTool, AgentToolSchema, type AgentToolType, AgentToolTypeSchema, type AspectRatio, AspectRatioSchema, type AudioMixOptions, AudioMixOptionsSchema, type AudioMixTrack, AudioMixTrackSchema, type CodeGenerationPayload, CodeGenerationSchema, type ComponentDocs, ComponentDocsSchema, type ComponentPackage, ComponentPackageSchema, type ComponentPropDefinition, ComponentPropDefinitionSchema, type ComponentPropDoc, ComponentPropDocSchema, type ComponentSynthesisPayload, ComponentSynthesisSchema, type ComponentTransformationResult, ComponentTransformationResultSchema, type ComponentVariant, ComponentVariantSchema, type ComponentVersion, ComponentVersionSchema, type Condition, type ConditionOperator, ConditionOperatorSchema, ConditionSchema, type ControlValidation, ControlValidationSchema, type DecisionGate, type DecisionGateKind, DecisionGateKindSchema, DecisionGateSchema, type DimensionScore, DimensionScoreSchema, type DropShadow, DropShadowSchema, FORM_SCHEMA_JSON_SCHEMA, type Fidelity, FidelitySchema, type FormControl, FormControlSchema, type FormControlType, FormControlTypeSchema, type FormHandoffAction, FormHandoffActionSchema, type FormOption, FormOptionSchema, type FormReviewMeta, FormReviewMetaSchema, type FormSection, FormSectionSchema, type FormStage, FormStageSchema, type FormSubmissionPayload, FormSubmissionPayloadSchema, type FormValidator, FormValidatorSchema, type GenerateHarnessOptions, GenerateHarnessOptionsSchema, type ImageCompositingPayload, ImageCompositingSchema, type ImageGenerationPayload, ImageGenerationSchema, type ImageTextOverlay, ImageTextOverlaySchema, type ImageTransformationPayload, ImageTransformationSchema, type ImageWatermark, ImageWatermarkSchema, type IngestionInput, IngestionInputSchema, type JsonGenerationPayload, JsonGenerationSchema, type PlatformLanguage, PlatformLanguageSchema, type PreviewHarness, PreviewHarnessSchema, type QueueJob, QueueJobSchema, type QueueJobStatus, QueueJobStatusSchema, type QueueJobType, QueueJobTypeSchema, type ReferenceDataSource, ReferenceDataSourceSchema, type ScoreBand, ScoreBandSchema, type ScoringConfig, ScoringConfigSchema, type ScoringDimension, ScoringDimensionSchema, type ScoringRule, ScoringRuleSchema, type SemanticReviewIssue, SemanticReviewIssueSchema, type SemanticReviewResult, SemanticReviewResultSchema, type SemanticReviewStatus, SemanticReviewStatusSchema, type ServiceClient, ServiceClientSchema, type SocialVideoGenerationPayload, SocialVideoGenerationSchema, type SubmissionScore, SubmissionScoreSchema, TechnicalFormSchema, type TechnicalSchema, type TextAlignment, TextAlignmentSchema, type TextOverlay, type TextOverlayPosition, TextOverlayPositionSchema, TextOverlaySchema, type TextOverlayStyle, TextOverlayStyleSchema, type Theme, type ThemeColors, ThemeColorsSchema, type ThemeIngestionInput, ThemeIngestionInputSchema, ThemeSchema, type ThemeSupport, ThemeSupportSchema, type ThemeTokens, ThemeTokensSchema, type ThemeTypographyTokens, ThemeTypographyTokensSchema, type UIComponentType, UIComponentTypeSchema, type VideoAnalysisCategory, VideoAnalysisCategorySchema, type VideoAnalysisPayload, VideoAnalysisSchema, type VideoAspectRatio, VideoAspectRatioSchema, type VideoCompositingPayload, VideoCompositingSchema, type VideoCompressionPayload, VideoCompressionSchema, type VideoFrameImage, VideoFrameImageSchema, type VideoGenerationPayload, VideoGenerationSchema, type VideoOverlayOptions, VideoOverlayOptionsSchema, type VideoOverlayStyle, VideoOverlayStyleSchema, type VideoPipeline, VideoPipelineSchema, type VideoResolution, VideoResolutionSchema, type VideoScaleAndPad, VideoScaleAndPadSchema, type VideoTextOverlay, VideoTextOverlaySchema, type VideoTranscodePayload, VideoTranscodeSchema, type VideoUpscalePayload, VideoUpscaleSchema, type VideoWatermark, VideoWatermarkSchema, type Watermark, type WatermarkPosition, WatermarkPositionSchema, WatermarkSchema };
|
|
8459
|
+
export { type ActivityAction, ActivityActionSchema, type ActivityLog, ActivityLogSchema, type Aesthetic, AestheticSchema, type AgentConfig, AgentConfigSchema, type AgentDocumentAttachment, AgentDocumentAttachmentSchema, type AgentEnvironment, AgentEnvironmentSchema, type AgentInteractionRequest, AgentInteractionRequestSchema, type AgentInteractionResult, AgentInteractionResultSchema, type AgentInteractionStatus, AgentInteractionStatusSchema, type AgentNetworkAllowlistRule, AgentNetworkAllowlistRuleSchema, type AgentNetworkTransformRule, AgentNetworkTransformRuleSchema, type AgentTool, AgentToolSchema, type AgentToolType, AgentToolTypeSchema, type AspectRatio, AspectRatioSchema, type AudioMixOptions, AudioMixOptionsSchema, type AudioMixTrack, AudioMixTrackSchema, type CodeGenerationPayload, CodeGenerationSchema, type ComponentDocs, ComponentDocsSchema, type ComponentPackage, ComponentPackageSchema, type ComponentPropDefinition, ComponentPropDefinitionSchema, type ComponentPropDoc, ComponentPropDocSchema, type ComponentSynthesisPayload, ComponentSynthesisSchema, type ComponentTransformationResult, ComponentTransformationResultSchema, type ComponentVariant, ComponentVariantSchema, type ComponentVersion, ComponentVersionSchema, type Condition, type ConditionOperator, ConditionOperatorSchema, ConditionSchema, type ControlValidation, ControlValidationSchema, type DecisionGate, type DecisionGateKind, DecisionGateKindSchema, DecisionGateSchema, type DimensionScore, DimensionScoreSchema, type DropShadow, DropShadowSchema, FORM_SCHEMA_JSON_SCHEMA, type Fidelity, FidelitySchema, type FormControl, FormControlSchema, type FormControlType, FormControlTypeSchema, type FormHandoffAction, FormHandoffActionSchema, type FormOption, FormOptionSchema, type FormReviewMeta, FormReviewMetaSchema, type FormSection, FormSectionSchema, type FormStage, FormStageSchema, type FormSubmissionPayload, FormSubmissionPayloadSchema, type FormValidator, FormValidatorSchema, type GenerateHarnessOptions, GenerateHarnessOptionsSchema, type ImageCompositingPayload, ImageCompositingSchema, type ImageGenerationPayload, ImageGenerationSchema, type ImageTextOverlay, ImageTextOverlaySchema, type ImageTransformationPayload, ImageTransformationSchema, type ImageWatermark, ImageWatermarkSchema, type IngestionInput, IngestionInputSchema, type JsonGenerationPayload, JsonGenerationSchema, type PlatformLanguage, PlatformLanguageSchema, type PreviewHarness, PreviewHarnessSchema, type QueueJob, QueueJobSchema, type QueueJobStatus, QueueJobStatusSchema, type QueueJobType, QueueJobTypeSchema, type ReferenceDataSource, ReferenceDataSourceSchema, type ScoreBand, ScoreBandSchema, type ScoringConfig, ScoringConfigSchema, type ScoringDimension, ScoringDimensionSchema, type ScoringRule, ScoringRuleSchema, type SemanticReviewIssue, SemanticReviewIssueSchema, type SemanticReviewResult, SemanticReviewResultSchema, type SemanticReviewStatus, SemanticReviewStatusSchema, type ServiceClient, ServiceClientSchema, type SocialVideoGenerationPayload, SocialVideoGenerationSchema, type SubmissionScore, SubmissionScoreSchema, TechnicalFormSchema, type TechnicalSchema, type TextAlignment, TextAlignmentSchema, type TextOverlay, type TextOverlayPosition, TextOverlayPositionSchema, TextOverlaySchema, type TextOverlayStyle, TextOverlayStyleSchema, type Theme, type ThemeColors, ThemeColorsSchema, type ThemeIngestionInput, ThemeIngestionInputSchema, ThemeSchema, type ThemeSupport, ThemeSupportSchema, type ThemeTokens, ThemeTokensSchema, type ThemeTypographyTokens, ThemeTypographyTokensSchema, type UIComponentType, UIComponentTypeSchema, type UIExtractionResult, UIExtractionResultSchema, type UIGenerationOptionsPayload, UIGenerationOptionsSchema, type UIGenerationResult, UIGenerationResultSchema, type UIValidationResult, UIValidationResultSchema, type VideoAnalysisCategory, VideoAnalysisCategorySchema, type VideoAnalysisPayload, VideoAnalysisSchema, type VideoAspectRatio, VideoAspectRatioSchema, type VideoCompositingPayload, VideoCompositingSchema, type VideoCompressionPayload, VideoCompressionSchema, type VideoFrameImage, VideoFrameImageSchema, type VideoGenerationPayload, VideoGenerationSchema, type VideoOverlayOptions, VideoOverlayOptionsSchema, type VideoOverlayStyle, VideoOverlayStyleSchema, type VideoPipeline, VideoPipelineSchema, type VideoResolution, VideoResolutionSchema, type VideoScaleAndPad, VideoScaleAndPadSchema, type VideoTextOverlay, VideoTextOverlaySchema, type VideoTranscodePayload, VideoTranscodeSchema, type VideoUpscalePayload, VideoUpscaleSchema, type VideoWatermark, VideoWatermarkSchema, type Watermark, type WatermarkPosition, WatermarkPositionSchema, WatermarkSchema };
|
package/dist/index.js
CHANGED
|
@@ -419,6 +419,34 @@ var ThemeIngestionInputSchema = z.object({
|
|
|
419
419
|
supportsDarkMode: z.boolean().optional(),
|
|
420
420
|
isSystem: z.boolean().optional()
|
|
421
421
|
});
|
|
422
|
+
var UIGenerationOptionsSchema = z.object({
|
|
423
|
+
prompt: z.string().describe("User prompt or instruction for component generation/modification"),
|
|
424
|
+
currentCode: z.string().optional().describe("Existing component code for iterative modification"),
|
|
425
|
+
platform: PlatformLanguageSchema.optional().default("svelte").describe("Target component platform language"),
|
|
426
|
+
theme: z.string().optional().describe("Theme identifier or token reference"),
|
|
427
|
+
systemPrompt: z.string().optional().describe("Custom or override system prompt"),
|
|
428
|
+
maxRetries: z.number().int().nonnegative().optional().default(3).describe("Maximum retry attempts for iterative auto-repair validation"),
|
|
429
|
+
temperature: z.number().optional().describe("Model temperature")
|
|
430
|
+
});
|
|
431
|
+
var UIExtractionResultSchema = z.object({
|
|
432
|
+
code: z.string().describe("Clean extracted component code without markdown fences"),
|
|
433
|
+
postamble: z.string().optional().describe("Conversational explanation or summary after the code block"),
|
|
434
|
+
rawText: z.string().optional().describe("Complete raw output from the model")
|
|
435
|
+
});
|
|
436
|
+
var UIValidationResultSchema = z.object({
|
|
437
|
+
valid: z.boolean().describe("Whether the component passed syntax and linter validation"),
|
|
438
|
+
error: z.string().optional().describe("Error output from validation if failed"),
|
|
439
|
+
errors: z.array(z.string()).optional().describe("List of parsed validation errors"),
|
|
440
|
+
formattedCode: z.string().optional().describe("Prettier-formatted component code if available")
|
|
441
|
+
});
|
|
442
|
+
var UIGenerationResultSchema = z.object({
|
|
443
|
+
code: z.string().describe("Final validated component code"),
|
|
444
|
+
postamble: z.string().optional().describe("Conversational explanation or summary"),
|
|
445
|
+
rawText: z.string().optional().describe("Complete raw model output"),
|
|
446
|
+
isValid: z.boolean().optional().describe("Whether the final code passed validation"),
|
|
447
|
+
validationAttempts: z.number().int().optional().describe("Total number of generation/repair attempts"),
|
|
448
|
+
validationError: z.string().optional().describe("Validation error if still failing after max retries")
|
|
449
|
+
});
|
|
422
450
|
var JsonGenerationSchema = z.object({
|
|
423
451
|
prompt: z.string(),
|
|
424
452
|
schema: z.record(z.any()).optional()
|
|
@@ -1041,6 +1069,10 @@ export {
|
|
|
1041
1069
|
ThemeTokensSchema,
|
|
1042
1070
|
ThemeTypographyTokensSchema,
|
|
1043
1071
|
UIComponentTypeSchema,
|
|
1072
|
+
UIExtractionResultSchema,
|
|
1073
|
+
UIGenerationOptionsSchema,
|
|
1074
|
+
UIGenerationResultSchema,
|
|
1075
|
+
UIValidationResultSchema,
|
|
1044
1076
|
VideoAnalysisCategorySchema,
|
|
1045
1077
|
VideoAnalysisSchema,
|
|
1046
1078
|
VideoAspectRatioSchema,
|