@tenerife.music/ui 4.0.0 → 5.0.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.
@@ -1,138 +0,0 @@
1
- import { b as IntentDslSurfaceKind, T as TypedButtonNodeProps, c as TypedCardNodeProps, d as TypedContainerNodeProps, e as TypedGridNodeProps, f as TypedHeadingNodeProps, g as TypedInlineNodeProps, h as TypedLinkNodeProps, i as TypedSectionNodeProps, j as TypedStackNodeProps, k as TypedTextNodeProps, l as TypedUIValidationCode, m as TypedUIValidationSeverity } from './ui-node-union-BdALN0FB.js';
2
-
3
- declare const UI_INTENT_FORBIDDEN_PROP_KEYS: readonly ["className", "style", "variant", "size", "color", "padding", "dom", "html", "jsx", "rawDom", "rawHtml", "rawJsx", "element", "elementType", "tag", "tagName", "render", "renderFn", "template", "dangerouslySetInnerHTML"];
4
- declare const DETERMINISTIC_LAYOUT_SURFACE_ALLOWLIST: readonly IntentDslSurfaceKind[];
5
- type DeterministicLayoutSurface = (typeof DETERMINISTIC_LAYOUT_SURFACE_ALLOWLIST)[number];
6
- declare const DETERMINISTIC_COMPONENT_SURFACE_ALLOWLIST: readonly IntentDslSurfaceKind[];
7
- type DeterministicComponentSurface = (typeof DETERMINISTIC_COMPONENT_SURFACE_ALLOWLIST)[number];
8
- type DeterministicCardSurface = Extract<DeterministicComponentSurface, "Card">;
9
- type DeterministicLeafComponentSurface = Exclude<DeterministicComponentSurface, DeterministicCardSurface>;
10
- declare const DETERMINISTIC_SURFACE_ALLOWLIST: readonly IntentDslSurfaceKind[];
11
- type DeterministicSurface = (typeof DETERMINISTIC_SURFACE_ALLOWLIST)[number];
12
- declare const DETERMINISTIC_PAGE_SURFACE_ALLOWLIST: readonly IntentDslSurfaceKind[];
13
- type DeterministicPageSurface = (typeof DETERMINISTIC_PAGE_SURFACE_ALLOWLIST)[number];
14
- type DeterministicSectionSurface = Extract<DeterministicLayoutSurface, "Section">;
15
-
16
- declare const UI_TEMPLATE_IDS: readonly ["page-shell", "section-stack", "card-layout", "grid-layout"];
17
- type UITemplateId = (typeof UI_TEMPLATE_IDS)[number];
18
- type UITemplateItem = {
19
- title: string;
20
- description?: string;
21
- href?: string;
22
- label?: string;
23
- };
24
- type UITemplateSlots = {
25
- title?: string;
26
- subtitle?: string;
27
- body?: string;
28
- ctaLabel?: string;
29
- ctaHref?: string;
30
- mediaAlt?: string;
31
- items?: UITemplateItem[];
32
- };
33
- type UITemplateSelection = {
34
- id: UITemplateId;
35
- slots?: UITemplateSlots;
36
- };
37
-
38
- declare const UI_INTENT_SCHEMA_VERSION: "1.0.0";
39
- declare const UI_INTENT_CATEGORIES: readonly ["page", "section", "layout", "component"];
40
- type UIIntentCategory = (typeof UI_INTENT_CATEGORIES)[number];
41
- type UIIntentVersion = typeof UI_INTENT_SCHEMA_VERSION;
42
- type UIIntentLayoutKind = DeterministicLayoutSurface;
43
- type UIIntentKind = DeterministicSurface;
44
- type UIIntentPageKind = DeterministicPageSurface;
45
- type UIIntentSectionKind = DeterministicSectionSurface;
46
- type UIIntentCardKind = DeterministicCardSurface;
47
- type UIIntentLeafComponentKind = DeterministicLeafComponentSurface;
48
- declare const UI_INTENT_RENDER_ROLES: readonly ["layout-container", "layout-grid", "surface-card", "interactive-button", "interactive-link", "text-heading", "text-content"];
49
- type UIIntentRenderRole = (typeof UI_INTENT_RENDER_ROLES)[number];
50
- type UIIntentForbiddenProps = {
51
- [K in (typeof UI_INTENT_FORBIDDEN_PROP_KEYS)[number]]?: unknown;
52
- };
53
- type UIIntentForbiddenEventProps = {
54
- [K in `on${string}`]?: unknown;
55
- };
56
- type UIIntentGuardedProps<TProps> = TProps & UIIntentForbiddenProps & UIIntentForbiddenEventProps;
57
- type UIIntentPropsByKind = {
58
- Button: TypedButtonNodeProps;
59
- Card: TypedCardNodeProps;
60
- Container: TypedContainerNodeProps;
61
- Grid: TypedGridNodeProps;
62
- Heading: TypedHeadingNodeProps;
63
- Inline: TypedInlineNodeProps;
64
- Link: TypedLinkNodeProps;
65
- Section: TypedSectionNodeProps;
66
- Stack: TypedStackNodeProps;
67
- Text: TypedTextNodeProps;
68
- };
69
- interface UIIntentNodeBase<TKind extends UIIntentKind, TCategory extends UIIntentCategory> {
70
- kind: TKind;
71
- category: TCategory;
72
- props: UIIntentGuardedProps<UIIntentPropsByKind[TKind]>;
73
- /** Optional semantic rendering hint carried through from UI-IR. */
74
- renderRole?: UIIntentRenderRole;
75
- }
76
- interface UIIntentLeafNode extends UIIntentNodeBase<UIIntentLeafComponentKind, "component"> {
77
- children?: never;
78
- }
79
- interface UIIntentCardNode extends UIIntentNodeBase<UIIntentCardKind, "component"> {
80
- children?: Array<UIIntentSectionNode | UIIntentLayoutNode | UIIntentLeafNode>;
81
- }
82
- type UIIntentComponentNode = UIIntentLeafNode | UIIntentCardNode;
83
- interface UIIntentSectionNode extends UIIntentNodeBase<UIIntentSectionKind, "section"> {
84
- children?: UIIntentChildNode[];
85
- }
86
- interface UIIntentLayoutNode extends UIIntentNodeBase<UIIntentLayoutKind, "layout"> {
87
- children?: UIIntentChildNode[];
88
- }
89
- type UIIntentChildNode = UIIntentSectionNode | UIIntentLayoutNode | UIIntentComponentNode;
90
- interface UIIntentPageNode extends UIIntentNodeBase<UIIntentPageKind, "page"> {
91
- children?: UIIntentChildNode[];
92
- }
93
- /**
94
- * Deterministic compile format for the AI UI engine.
95
- *
96
- * Derived from the canonical UI-IR (`UIIRNode` / `layoutTree`) by
97
- * `toDeterministicUIIntentSchema()`. This is NOT the canonical UI
98
- * representation — it exists solely as input to the deterministic compiler
99
- * (`compileIntentToJsx`). Semantic hints like `renderRole` may be carried
100
- * through for renderer-agnostic interpretation, but canonical ownership,
101
- * authority, and structural inspection remain on `UIIRNode` / `layoutTree`.
102
- *
103
- * @see src/engine/internal/ui-ir/types.ts — canonical UI-IR definition
104
- * @see docs/architecture/UI_IR.md — architecture specification
105
- */
106
- interface UIIntentSchema {
107
- version: UIIntentVersion;
108
- root?: UIIntentPageNode;
109
- template?: UITemplateSelection;
110
- }
111
- interface UIDeterministicRenderableNode {
112
- kind: UIIntentKind;
113
- props: Record<string, unknown>;
114
- children?: UIDeterministicRenderableNode[];
115
- }
116
- interface UIDeterministicRenderableSchema {
117
- kind: UIIntentPageKind;
118
- props: Record<string, unknown>;
119
- children?: UIDeterministicRenderableNode[];
120
- }
121
- type UIIntentValidationCode = TypedUIValidationCode | "EXTENSION_SURFACE" | "FORBIDDEN_SURFACE" | "invalid_category" | "invalid_hierarchy" | "invalid_shape" | "invalid_surface" | "invalid_version";
122
- interface UIIntentValidationIssue {
123
- code: UIIntentValidationCode;
124
- message: string;
125
- path: string;
126
- canonicalRef: string;
127
- severity?: TypedUIValidationSeverity;
128
- category?: "authority" | "children" | "native" | "props" | "shape" | "surface" | "version";
129
- }
130
- interface UIIntentValidationResult {
131
- valid: boolean;
132
- data?: UIIntentSchema;
133
- dslData?: UIDeterministicRenderableSchema;
134
- errors: UIIntentValidationIssue[];
135
- warnings: UIIntentValidationIssue[];
136
- }
137
-
138
- export type { UIIntentSchema as U, UIIntentValidationResult as a, UIIntentCategory as b, UIIntentValidationIssue as c };
@@ -1,12 +0,0 @@
1
- /**
2
- * Theme Override Types
3
- *
4
- * Defines types for theme overrides that can be applied to the token system.
5
- */
6
-
7
- /**
8
- * Theme name type
9
- */
10
- type ThemeName = "default" | "dark" | "brand";
11
-
12
- export type { ThemeName as T };
@@ -1,12 +0,0 @@
1
- /**
2
- * Theme Override Types
3
- *
4
- * Defines types for theme overrides that can be applied to the token system.
5
- */
6
-
7
- /**
8
- * Theme name type
9
- */
10
- type ThemeName = "default" | "dark" | "brand";
11
-
12
- export type { ThemeName as T };
@@ -1,80 +0,0 @@
1
- import { U as UIIntentSchema, a as UIIntentValidationResult, b as UIIntentCategory } from './types-BEG5B5HA.cjs';
2
- import { I as IntentDslValueType, a as IntentDslKeyword } from './ui-node-union-BNt_iPQO.cjs';
3
-
4
- type IntentDslErrorCode = "DSL_COMPILE_FAILED" | "DSL_INVALID_HIERARCHY" | "DSL_INVALID_INDENTATION" | "DSL_INVALID_PROP" | "DSL_INVALID_ROOT" | "DSL_MISSING_PROP" | "DSL_PARSE_FAILED" | "DSL_UNKNOWN_KEYWORD" | "DSL_UNSUPPORTED_CHILDREN" | "DSL_VALIDATION_FAILED";
5
- interface IntentDslSourceLocation {
6
- line: number;
7
- column: number;
8
- indent: number;
9
- }
10
- type IntentDslScalar = boolean | number | string;
11
- interface IntentDslAstNode {
12
- keyword: string;
13
- props: Record<string, IntentDslScalar>;
14
- children: IntentDslAstNode[];
15
- location: IntentDslSourceLocation;
16
- }
17
- interface IntentDslAstDocument {
18
- type: "IntentDslDocument";
19
- nodes: IntentDslAstNode[];
20
- }
21
- interface IntentDslErrorDetails {
22
- code: IntentDslErrorCode;
23
- message: string;
24
- line?: number;
25
- column?: number;
26
- path?: string;
27
- cause?: unknown;
28
- }
29
- declare class IntentDslError extends Error {
30
- readonly code: IntentDslErrorCode;
31
- readonly line?: number;
32
- readonly column?: number;
33
- readonly path?: string;
34
- readonly cause?: unknown;
35
- constructor(details: IntentDslErrorDetails);
36
- }
37
- interface CompileDslToIntentResult {
38
- ast: IntentDslAstDocument;
39
- intent: UIIntentSchema;
40
- validation: UIIntentValidationResult;
41
- }
42
-
43
- type UICapabilityPropMetadata = {
44
- readonly name: string;
45
- readonly type?: IntentDslValueType;
46
- readonly required?: boolean;
47
- readonly source: "dsl_grammar";
48
- };
49
- type UIDslKeywordCapability = {
50
- readonly keyword: IntentDslKeyword;
51
- readonly kind?: string;
52
- readonly category?: UIIntentCategory;
53
- readonly allowsChildren: boolean;
54
- readonly compiledRootKind?: string;
55
- readonly props: readonly UICapabilityPropMetadata[];
56
- };
57
- interface UICapabilityDiscoveryEntry {
58
- readonly kind: string;
59
- readonly role: "layout_primitive" | "component_primitive";
60
- readonly category: UIIntentCategory;
61
- readonly allowedParentCategories: readonly UIIntentCategory[];
62
- readonly allowedParentKinds: readonly string[];
63
- readonly allowedChildKinds: readonly string[];
64
- readonly supportedProps: readonly string[];
65
- readonly supportedPropDetails: readonly UICapabilityPropMetadata[];
66
- readonly supportedStates: readonly string[];
67
- readonly supportedActions: readonly string[];
68
- readonly dslKeywords: readonly IntentDslKeyword[];
69
- readonly isLeaf: boolean;
70
- readonly canonicalRef: string;
71
- }
72
- interface UICapabilityDiscoveryResult {
73
- readonly surfaces: readonly string[];
74
- readonly entries: Readonly<Record<string, UICapabilityDiscoveryEntry>>;
75
- readonly forbiddenPropKeys: readonly string[];
76
- readonly allowedChildCategoriesByCategory: Readonly<Record<UIIntentCategory, readonly UIIntentCategory[]>>;
77
- readonly dslKeywords: Readonly<Record<IntentDslKeyword, UIDslKeywordCapability>>;
78
- }
79
-
80
- export { type CompileDslToIntentResult as C, type IntentDslErrorCode as I, type UICapabilityDiscoveryEntry as U, type UICapabilityDiscoveryResult as a, IntentDslError as b, type IntentDslAstDocument as c, type UICapabilityPropMetadata as d, type UIDslKeywordCapability as e };
@@ -1,407 +0,0 @@
1
- import { U as UIIntentSchema, c as UIIntentValidationIssue } from './types-BEG5B5HA.cjs';
2
- import { R as Responsive, b as SpacingToken, f as ColorToken, T as TextSizeToken, g as TextWeightToken, h as TextLineHeightToken } from './index-4rLh47Jk.cjs';
3
-
4
- declare const __compiledJsxBrand: unique symbol;
5
- /** Opaque type for JSX that has been produced by the deterministic compiler.
6
- * Only `compileIntentToJsx` can produce this type, preventing arbitrary JSX
7
- * from being passed to the scoring API. */
8
- type CompiledJsxArtifact = string & {
9
- readonly [__compiledJsxBrand]: true;
10
- };
11
-
12
- declare const EXTENSION_SURFACE_BOUNDARY: {
13
- readonly HeroMedia: {
14
- readonly kind: "HeroMedia";
15
- readonly normalizedTo: "Card";
16
- readonly plannerOwned: true;
17
- readonly contractHintAllowed: true;
18
- readonly publicCapabilityVisibility: "hidden";
19
- readonly canonicalRef: "docs/architecture/EXTENSION_AUTHORITY.md";
20
- };
21
- readonly AppHeader: {
22
- readonly kind: "AppHeader";
23
- readonly normalizedTo: "Section";
24
- readonly plannerOwned: true;
25
- readonly contractHintAllowed: true;
26
- readonly publicCapabilityVisibility: "hidden";
27
- readonly canonicalRef: "docs/architecture/EXTENSION_AUTHORITY.md";
28
- };
29
- readonly ResponsiveVisibility: {
30
- readonly kind: "ResponsiveVisibility";
31
- readonly normalizedTo: "Section";
32
- readonly plannerOwned: true;
33
- readonly contractHintAllowed: true;
34
- readonly publicCapabilityVisibility: "hidden";
35
- readonly canonicalRef: "docs/architecture/EXTENSION_AUTHORITY.md";
36
- };
37
- readonly ContentShell: {
38
- readonly kind: "ContentShell";
39
- readonly normalizedTo: "Section";
40
- readonly plannerOwned: true;
41
- readonly contractHintAllowed: true;
42
- readonly publicCapabilityVisibility: "hidden";
43
- readonly canonicalRef: "docs/architecture/EXTENSION_AUTHORITY.md";
44
- };
45
- };
46
- type PlannerOwnedExtensionSurface = keyof typeof EXTENSION_SURFACE_BOUNDARY;
47
-
48
- type AuthorityReference = {
49
- owner: "layout_authority" | "extension_authority" | "closed_execution";
50
- ruleRef: string;
51
- rationale: string;
52
- };
53
- type UIIRTokenHints = {
54
- spacing?: Responsive<SpacingToken>;
55
- color?: Responsive<ColorToken>;
56
- typography?: Responsive<TextSizeToken | TextWeightToken | TextLineHeightToken>;
57
- [key: string]: Responsive<ColorToken> | Responsive<SpacingToken> | Responsive<TextLineHeightToken | TextSizeToken | TextWeightToken> | undefined;
58
- };
59
- type UIIRLayoutMeta = {
60
- /** RegionKind this node was derived from (heading, body, actions, etc.) */
61
- regionKind?: string;
62
- /** True if node was synthesized by a capability-graph fallback (Section wrapping) */
63
- graphFallback?: boolean;
64
- /** Responsive breakpoint strategy annotation */
65
- responsiveStrategy?: "stack_first" | "grid_split" | "responsive_branch";
66
- };
67
- declare const UI_IR_RENDER_ROLES: readonly ["layout-container", "layout-grid", "surface-card", "interactive-button", "interactive-link", "text-heading", "text-content"];
68
- type UIIRRenderRole = (typeof UI_IR_RENDER_ROLES)[number];
69
- /**
70
- * UIIRNode — the canonical UI Intermediate Representation node.
71
- *
72
- * This is the formal IR layer between raw planner output and the deterministic
73
- * intent schema. In the canonical planner-backed pipeline it is produced after
74
- * `normalizePlannerAliases(planLayout(...))` and then validated by
75
- * `assertUIIRConformance()` before conversion to `UIIntentSchema`.
76
- *
77
- * @see docs/architecture/UI_IR.md
78
- */
79
- type UIIRNode = {
80
- id: string;
81
- component: string;
82
- props: Record<string, unknown>;
83
- children: UIIRNode[];
84
- authority: AuthorityReference;
85
- validationTags: string[];
86
- /** Optional semantic rendering hint for renderer-agnostic interpretation. */
87
- renderRole?: UIIRRenderRole;
88
- /** Advisory design-token scale hints. Not consumed by the compiler. */
89
- tokens?: UIIRTokenHints;
90
- /** Planner decision metadata for diagnostics and replay tooling. */
91
- layoutMeta?: UIIRLayoutMeta;
92
- };
93
-
94
- type IntentType$1 = "hero_landing_section" | "events_grid_page" | "artist_detail_shell" | "responsive_header_shell" | "content_section" | "feature_block" | "form_section" | "details_shell";
95
- type RegionPriority$1 = "primary" | "secondary" | "tertiary";
96
- type RegionKind$1 = "heading" | "body" | "actions" | "media" | "filters" | "cards" | "details" | "navigation";
97
- type ResponsiveFlags$1 = {
98
- mobileStack?: boolean;
99
- desktopGrid?: boolean;
100
- showHideByBreakpoint?: boolean;
101
- };
102
- type LayoutConstraints$1 = {
103
- centered?: boolean;
104
- fullWidth?: boolean;
105
- sectioned?: boolean;
106
- hasListSemantics?: boolean;
107
- hasMedia?: boolean;
108
- hasFilters?: boolean;
109
- };
110
- type RegionSpec$1 = {
111
- name: string;
112
- kind: RegionKind$1;
113
- priority: RegionPriority$1;
114
- };
115
- type LayoutIntent$1 = {
116
- name: string;
117
- intentType: IntentType$1;
118
- regions: RegionSpec$1[];
119
- responsive?: ResponsiveFlags$1;
120
- constraints?: LayoutConstraints$1;
121
- componentHints?: string[];
122
- };
123
- type IntentContractVersion$1 = "1.0.0";
124
- type ExtensionCapability$1 = PlannerOwnedExtensionSurface;
125
- type ForbiddenPattern$1 = "no_classname_style" | "no_raw_dom_layout" | "no_deep_import_bypass" | "no_inline_style_channel";
126
- type OutputExpectation$1 = "deterministic_tree" | "deterministic_jsx" | "root_public_import" | "score_gate_pass" | "validation_pass";
127
- type IntentContractRegion$1 = {
128
- id: string;
129
- kind: RegionKind$1;
130
- priority: RegionPriority$1;
131
- required?: boolean;
132
- };
133
- type IntentContractSurface$1 = {
134
- type: IntentType$1;
135
- name?: string;
136
- constraints?: LayoutConstraints$1;
137
- };
138
- type IntentContractHierarchy$1 = {
139
- root: "Container" | "Stack" | "Grid" | "Flex";
140
- strategy: "stack_first" | "grid_split" | "responsive_branch";
141
- };
142
- type IntentContractCapabilities$1 = {
143
- allowed: ExtensionCapability$1[];
144
- };
145
- type IntentContractOutput$1 = {
146
- expectations: OutputExpectation$1[];
147
- };
148
- type IntentContract$1 = {
149
- contractVersion: IntentContractVersion$1;
150
- intentId: string;
151
- surface: IntentContractSurface$1;
152
- regions: IntentContractRegion$1[];
153
- output: IntentContractOutput$1;
154
- hierarchy?: IntentContractHierarchy$1;
155
- responsive?: ResponsiveFlags$1;
156
- capabilities?: IntentContractCapabilities$1;
157
- forbiddenPatterns?: ForbiddenPattern$1[];
158
- metadata?: Record<string, unknown>;
159
- };
160
- type ValidationSummary$1 = {
161
- valid: boolean;
162
- errors: string[];
163
- warnings: string[];
164
- };
165
- type ArtifactPublicationSummary = {
166
- generatedLayoutPublished: boolean;
167
- generatedLayoutPath: string;
168
- blockedReasons: string[];
169
- };
170
- type ScoreEvaluationSummary = {
171
- overallScore: number;
172
- gate: "pass" | "fail";
173
- gateReasons: string[];
174
- lintErrorCount: number;
175
- lintWarningCount: number;
176
- architectureRuleViolations: number;
177
- repairGuidance: RepairGuidanceStep[];
178
- repairProposals?: RepairProposal[];
179
- artifactPublication: ArtifactPublicationSummary;
180
- };
181
- type RepairGuidanceStep = {
182
- trigger: string;
183
- violationFamily: string;
184
- canonicalRef: string;
185
- action: string;
186
- recheckCommand: string;
187
- };
188
- type RepairProposalSource = "score_engine" | "ai_layout_generator";
189
- type RepairProposalTargetType = "file" | "component" | "rule_family" | "layout_node" | "intent_field";
190
- type RepairOperationKind = "replace_component" | "remove_forbidden_prop" | "swap_import_surface" | "adjust_intent_field" | "restructure_layout_owner" | "normalize_native_gate";
191
- type RepairConstraintKind = "no_deep_imports" | "no_classname_style" | "public_api_only" | "authority_compliant" | "no_foundation_mutation";
192
- type RepairOperation = {
193
- kind: RepairOperationKind;
194
- path: string;
195
- from?: string;
196
- to?: string;
197
- reason: string;
198
- };
199
- type RepairConstraint = {
200
- kind: RepairConstraintKind;
201
- };
202
- type RepairProposal = {
203
- id: string;
204
- source: RepairProposalSource;
205
- violationFamily: string;
206
- targetType: RepairProposalTargetType;
207
- targetRef: string;
208
- operations: RepairOperation[];
209
- constraints: RepairConstraint[];
210
- expectedOutcome: string[];
211
- canonicalRefs: string[];
212
- confidence: "high" | "medium" | "low";
213
- humanReviewRequired: true;
214
- applyCommand: null;
215
- recheckCommand: string;
216
- safetyGuards: string[];
217
- };
218
-
219
- type GenerateUIErrorCode = "INPUT_CONTRACT_FAILED" | "INTENT_PARSE_FAILED" | "INTENT_VALIDATION_FAILED" | "INTENT_COMPILE_FAILED" | "INTENT_SCORE_FAILED" | "GRAPH_TOO_LARGE" | "GRAPH_TOO_DEEP" | "GRAPH_CHILDREN_LIMIT" | "UI_IR_CONFORMANCE_FAILED";
220
- type GenerateUIError = {
221
- code: GenerateUIErrorCode;
222
- message: string;
223
- details?: unknown;
224
- };
225
- type GenerateUIOptions = {
226
- artifactsRoot?: string;
227
- exampleName?: string;
228
- artifactsMode?: "persistent" | "ephemeral";
229
- /**
230
- * When false, skips ESLint-based scoring. The returned `score` will be a
231
- * no-op stub. Use when only the compiled artifacts are needed and evaluation
232
- * cost is undesirable (e.g. determinism tests, dry-run paths).
233
- * Defaults to true.
234
- */
235
- evaluate?: boolean;
236
- };
237
- type GenerateUIIntentInput = {
238
- intent: IntentContract$1 | LayoutIntent$1;
239
- dsl?: never;
240
- intentSchema?: never;
241
- options?: GenerateUIOptions;
242
- };
243
- type GenerateUIDslInput = {
244
- dsl: string;
245
- intent?: never;
246
- intentSchema?: never;
247
- options?: GenerateUIOptions;
248
- };
249
- type GenerateUIIntentSchemaInput = {
250
- intentSchema: UIIntentSchema;
251
- intent?: never;
252
- dsl?: never;
253
- options?: GenerateUIOptions;
254
- };
255
- type GenerateUIInput = GenerateUIIntentInput | GenerateUIDslInput | GenerateUIIntentSchemaInput;
256
- type GenerateUIScore = ScoreEvaluationSummary;
257
- type RunMetadata = {
258
- /** SHA-256 of JSON.stringify(input) — stable identifier for identical inputs */
259
- promptHash: string;
260
- /** Wall-clock milliseconds from executeGenerateUI entry to result assembly */
261
- generationTimeMs: number;
262
- /** Total node count in the layout tree */
263
- nodeCount: number;
264
- /** Maximum tree depth of the layout tree */
265
- graphDepth: number;
266
- };
267
- type GenerateUIResult = {
268
- jsx: CompiledJsxArtifact;
269
- imports: string[];
270
- layoutTree: UIIRNode;
271
- intentSchema: UIIntentSchema;
272
- validationSummary: ValidationSummary$1;
273
- authorityRationales: string[];
274
- compilerHash: string;
275
- score: GenerateUIScore;
276
- runMetadata: RunMetadata;
277
- };
278
- declare class GenerateUIException extends Error {
279
- readonly code: GenerateUIErrorCode;
280
- readonly details?: unknown;
281
- constructor(error: GenerateUIError);
282
- }
283
- declare function generateUI(input: GenerateUIInput): GenerateUIResult;
284
-
285
- type IntentType = "hero_landing_section" | "events_grid_page" | "artist_detail_shell" | "responsive_header_shell" | "content_section" | "feature_block" | "form_section" | "details_shell";
286
- type RegionPriority = "primary" | "secondary" | "tertiary";
287
- type RegionKind = "heading" | "body" | "actions" | "media" | "filters" | "cards" | "details" | "navigation";
288
- type ResponsiveFlags = {
289
- mobileStack?: boolean;
290
- desktopGrid?: boolean;
291
- showHideByBreakpoint?: boolean;
292
- };
293
- type LayoutConstraints = {
294
- centered?: boolean;
295
- fullWidth?: boolean;
296
- sectioned?: boolean;
297
- hasListSemantics?: boolean;
298
- hasMedia?: boolean;
299
- hasFilters?: boolean;
300
- };
301
- type RegionSpec = {
302
- name: string;
303
- kind: RegionKind;
304
- priority: RegionPriority;
305
- };
306
- type LayoutIntent = {
307
- name: string;
308
- intentType: IntentType;
309
- regions: RegionSpec[];
310
- responsive?: ResponsiveFlags;
311
- constraints?: LayoutConstraints;
312
- componentHints?: string[];
313
- };
314
- type IntentContractVersion = "1.0.0";
315
- type ExtensionCapability = PlannerOwnedExtensionSurface;
316
- type ForbiddenPattern = "no_classname_style" | "no_raw_dom_layout" | "no_deep_import_bypass" | "no_inline_style_channel";
317
- type OutputExpectation = "deterministic_tree" | "deterministic_jsx" | "root_public_import" | "score_gate_pass" | "validation_pass";
318
- type IntentContractRegion = {
319
- id: string;
320
- kind: RegionKind;
321
- priority: RegionPriority;
322
- required?: boolean;
323
- };
324
- type IntentContractSurface = {
325
- type: IntentType;
326
- name?: string;
327
- constraints?: LayoutConstraints;
328
- };
329
- type IntentContractHierarchy = {
330
- root: "Container" | "Stack" | "Grid" | "Flex";
331
- strategy: "stack_first" | "grid_split" | "responsive_branch";
332
- };
333
- type IntentContractCapabilities = {
334
- allowed: ExtensionCapability[];
335
- };
336
- type IntentContractOutput = {
337
- expectations: OutputExpectation[];
338
- };
339
- type IntentContract = {
340
- contractVersion: IntentContractVersion;
341
- intentId: string;
342
- surface: IntentContractSurface;
343
- regions: IntentContractRegion[];
344
- output: IntentContractOutput;
345
- hierarchy?: IntentContractHierarchy;
346
- responsive?: ResponsiveFlags;
347
- capabilities?: IntentContractCapabilities;
348
- forbiddenPatterns?: ForbiddenPattern[];
349
- metadata?: Record<string, unknown>;
350
- };
351
-
352
- type ValidationSummary = {
353
- valid: boolean;
354
- errors: string[];
355
- warnings: string[];
356
- };
357
-
358
- type ReplayRecordVersion = "1.0.0";
359
- type ReplaySourceKind = "layout_intent" | "intent_contract" | "dsl" | "intent_schema";
360
- type ReplaySourceInput = LayoutIntent | IntentContract | UIIntentSchema | string;
361
- type ReplayResolvedInput = {
362
- kind: "layout_intent" | "intent_contract";
363
- layoutIntent: LayoutIntent;
364
- } | {
365
- kind: "dsl";
366
- intentSchema: UIIntentSchema;
367
- } | {
368
- kind: "intent_schema";
369
- intentSchema: UIIntentSchema;
370
- };
371
- type ReplayPlannerDecisions = {
372
- layoutTree: UIIRNode;
373
- authorityRationales: string[];
374
- graphMetrics?: {
375
- nodeCount: number;
376
- maxDepth: number;
377
- maxChildrenPerNode: number;
378
- };
379
- };
380
- type ReplayValidationSnapshot = {
381
- valid: boolean;
382
- errors: UIIntentValidationIssue[];
383
- warnings: UIIntentValidationIssue[];
384
- normalizedIntent: UIIntentSchema;
385
- };
386
- type ReplayCompilerSnapshot = {
387
- hash: string;
388
- imports: string[];
389
- };
390
- type ReplayRecord = {
391
- version: ReplayRecordVersion;
392
- recordedAt: string;
393
- source: {
394
- kind: ReplaySourceKind;
395
- input: ReplaySourceInput;
396
- };
397
- resolvedInput: ReplayResolvedInput;
398
- planner: ReplayPlannerDecisions;
399
- validation: ReplayValidationSnapshot;
400
- compiler: ReplayCompilerSnapshot;
401
- };
402
- type ReplayRunResult = {
403
- resultHash: string;
404
- matched: true;
405
- };
406
-
407
- export { type AuthorityReference as A, type GenerateUIOptions as G, type IntentContract as I, type LayoutIntent as L, type ReplayRecord as R, type UIIRNode as U, type ValidationSummary as V, type GenerateUIResult as a, type GenerateUIInput as b, type ReplayRunResult as c, type GenerateUIDslInput as d, type GenerateUIError as e, type GenerateUIErrorCode as f, type GenerateUIIntentInput as g, type GenerateUIIntentSchemaInput as h, type GenerateUIScore as i, generateUI as j, GenerateUIException as k, type IntentContractCapabilities as l, type IntentContractHierarchy as m, type IntentContractOutput as n, type IntentContractRegion as o, type IntentContractSurface as p, type IntentType as q, type LayoutConstraints as r, type RegionKind as s, type RegionPriority as t, type RegionSpec as u, type ResponsiveFlags as v, type UIIRLayoutMeta as w, type UIIRTokenHints as x };