@ultrst-armada/floks 1.0.0 → 1.1.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/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +8 -1
- package/packages/canvas-ui/dist/{chunk-UEIMM6PV.js → chunk-OOTTFWXA.js} +1 -1
- package/packages/canvas-ui/dist/{chunk-2GLR35UM.js → chunk-U2SC3RMJ.js} +1 -1
- package/packages/canvas-ui/dist/{chunk-QWQ4PCXQ.js → chunk-XVAHT5WE.js} +1 -1
- package/packages/canvas-ui/dist/graph-2d/index.js +2 -2
- package/packages/canvas-ui/dist/index.d.ts +1 -1
- package/packages/canvas-ui/dist/index.js +3 -3
- package/packages/canvas-ui/dist/predictive/index.d.ts +4 -3
- package/packages/canvas-ui/dist/predictive/index.js +2 -2
- package/packages/canvas-ui/package.json +1 -1
- package/packages/contracts/dist/index.d.ts +394 -0
- package/packages/contracts/dist/index.js +324 -0
- package/packages/contracts/package.json +30 -0
- package/packages/ui/dist/{chunk-OHISLM3Z.js → chunk-KYFSUQVT.js} +69 -3
- package/packages/ui/dist/components/base/index.js +3 -3
- package/packages/ui/dist/components/composite/index.js +5 -5
- package/packages/ui/dist/components/settings/index.js +2 -2
- package/packages/ui/dist/hierarchy/index.d.ts +66 -1
- package/packages/ui/dist/hierarchy/index.js +39 -1
- package/packages/ui/dist/index.d.ts +1 -1
- package/packages/ui/dist/index.js +79 -41
- package/packages/ui/dist/{chunk-QWXEW7WH.js → chunk-ATQPZLJX.js} +3 -3
- package/packages/ui/dist/{chunk-DABYTYOU.js → chunk-VEWPTZGO.js} +3 -3
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultrst-armada/floks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
"types": "./packages/canvas-ui/dist/index.d.ts",
|
|
38
38
|
"import": "./packages/canvas-ui/dist/index.js",
|
|
39
39
|
"default": "./packages/canvas-ui/dist/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./contracts": {
|
|
42
|
+
"types": "./packages/contracts/dist/index.d.ts",
|
|
43
|
+
"import": "./packages/contracts/dist/index.js",
|
|
44
|
+
"default": "./packages/contracts/dist/index.js"
|
|
40
45
|
}
|
|
41
46
|
},
|
|
42
47
|
"scripts": {
|
|
@@ -50,6 +55,7 @@
|
|
|
50
55
|
"zod": "^3.24.1"
|
|
51
56
|
},
|
|
52
57
|
"peerDependencies": {
|
|
58
|
+
"@ultrst-armada/kloks": "^1.0.2",
|
|
53
59
|
"lucide-react": ">=0.300.0",
|
|
54
60
|
"react": "^18.0.0 || ^19.0.0",
|
|
55
61
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -58,6 +64,7 @@
|
|
|
58
64
|
"@types/node": "^22.0.0",
|
|
59
65
|
"@types/react": "^19.0.0",
|
|
60
66
|
"@types/react-dom": "^19.0.0",
|
|
67
|
+
"@ultrst-armada/kloks": "^1.0.2",
|
|
61
68
|
"lucide-react": "^1.55.0",
|
|
62
69
|
"react": "^19.0.1",
|
|
63
70
|
"react-dom": "^19.0.1",
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
Wire2D,
|
|
14
14
|
useCanvas2DCoordinates,
|
|
15
15
|
useCanvas2DMagnetic
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-XVAHT5WE.js";
|
|
17
17
|
import {
|
|
18
18
|
NODE_CARD_WIDTH,
|
|
19
19
|
Node2DBase,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
getSocketLocalOffset,
|
|
24
24
|
getSocketScreenPosition,
|
|
25
25
|
renderSpriteIcon
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-U2SC3RMJ.js";
|
|
27
27
|
export {
|
|
28
28
|
BIOME_CONFIGS,
|
|
29
29
|
COORD_SCALE,
|
|
@@ -7,7 +7,7 @@ import React__default from 'react';
|
|
|
7
7
|
import { NodeDefinition, GraphSettings, BaseNode, SolidConnection, Trace, ViewLink, BaseViewWindow, Socket, GraphNode } from '@ultrst-armada/kloks/state-graph';
|
|
8
8
|
export { B as BIOME_CONFIGS, C as COORD_SCALE, a as CameraState, b as Canvas2DViewerProps, c as ConnectingWireState } from './types-D3RRfQUo.js';
|
|
9
9
|
export { CanvasBackground2D, CanvasErrorBoundary, ContainerNode2D, EffectNode2D, MagneticTraces2D, ModuleNode2D, NODE_CARD_WIDTH, Node2DBase, Node2DBaseProps, NodeRenderer2D, NodeRenderer2DProps, RecorderWaveformDisplay, RecorderWaveformDisplayProps, RotaryKnob, RotaryKnobProps, SOCKET_ROW_HEIGHT, Socket2D, Socket2DProps, SocketScreenPosition, TriggerNode2D, Wire2D, Wire2DProps, getSocketLocalOffset, getSocketScreenPosition, renderSpriteIcon, useCanvas2DCoordinates, useCanvas2DMagnetic } from './graph-2d/index.js';
|
|
10
|
-
export { PredictiveGhostNodeCard, PredictiveGhostNodeCardProps, PredictiveHudToolbar, PredictiveLayer2D, usePredictiveGraph2D } from './predictive/index.js';
|
|
10
|
+
export { PredictiveGhostNodeCard, PredictiveGhostNodeCardProps, PredictiveHudToolbar, PredictiveLayer2D, PredictiveLayer2DProps, UsePredictiveGraph2DProps, UseViewer2DPredictiveProps, usePredictiveGraph2D } from './predictive/index.js';
|
|
11
11
|
|
|
12
12
|
interface MidpointWidgetsProps {
|
|
13
13
|
x: number;
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
Wire2D,
|
|
30
30
|
useCanvas2DCoordinates,
|
|
31
31
|
useCanvas2DMagnetic
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XVAHT5WE.js";
|
|
33
33
|
import {
|
|
34
34
|
PredictiveGhostNodeCard,
|
|
35
35
|
PredictiveHudToolbar,
|
|
36
36
|
PredictiveLayer2D,
|
|
37
37
|
usePredictiveGraph2D
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OOTTFWXA.js";
|
|
39
39
|
import {
|
|
40
40
|
NODE_CARD_WIDTH,
|
|
41
41
|
Node2DBase,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
getSocketLocalOffset,
|
|
46
46
|
getSocketScreenPosition,
|
|
47
47
|
renderSpriteIcon
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-U2SC3RMJ.js";
|
|
49
49
|
import {
|
|
50
50
|
Tile,
|
|
51
51
|
TileCreateButton,
|
|
@@ -48,14 +48,15 @@ interface PredictiveLayer2DProps {
|
|
|
48
48
|
}
|
|
49
49
|
declare const PredictiveLayer2D: React__default.FC<PredictiveLayer2DProps>;
|
|
50
50
|
|
|
51
|
-
interface
|
|
51
|
+
interface UsePredictiveGraph2DProps {
|
|
52
52
|
nodes: SpaceNode[];
|
|
53
53
|
connections: NodeConnection[];
|
|
54
54
|
selectedNodeId: string | null;
|
|
55
55
|
selectedNodeIds?: string[];
|
|
56
56
|
onSolidifyPredictiveNodes?: (ghosts: PredictiveGhostNode[]) => void;
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
type UseViewer2DPredictiveProps = UsePredictiveGraph2DProps;
|
|
59
|
+
declare function usePredictiveGraph2D({ nodes, connections, selectedNodeId, selectedNodeIds, onSolidifyPredictiveNodes, }: UsePredictiveGraph2DProps): {
|
|
59
60
|
isActive: boolean;
|
|
60
61
|
scenarioIndex: number;
|
|
61
62
|
targetNodes: SpaceNode[];
|
|
@@ -71,4 +72,4 @@ declare function usePredictiveGraph2D({ nodes, connections, selectedNodeId, sele
|
|
|
71
72
|
close: () => void;
|
|
72
73
|
};
|
|
73
74
|
|
|
74
|
-
export { PredictiveGhostNodeCard, type PredictiveGhostNodeCardProps, PredictiveHudToolbar, PredictiveLayer2D, usePredictiveGraph2D };
|
|
75
|
+
export { PredictiveGhostNodeCard, type PredictiveGhostNodeCardProps, PredictiveHudToolbar, PredictiveLayer2D, type PredictiveLayer2DProps, type UsePredictiveGraph2DProps, type UseViewer2DPredictiveProps, usePredictiveGraph2D };
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
PredictiveHudToolbar,
|
|
4
4
|
PredictiveLayer2D,
|
|
5
5
|
usePredictiveGraph2D
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-OOTTFWXA.js";
|
|
7
|
+
import "../chunk-U2SC3RMJ.js";
|
|
8
8
|
export {
|
|
9
9
|
PredictiveGhostNodeCard,
|
|
10
10
|
PredictiveHudToolbar,
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file schemas.ts
|
|
5
|
+
* @description Zod Schemas for Floks Component Theme Contracts & ThemePacks.
|
|
6
|
+
* Enforces docs/04_THETA_COMPONENT_CONTRACTS.md:
|
|
7
|
+
* - ComponentThemeContract
|
|
8
|
+
* - VisualSlot
|
|
9
|
+
* - VisualState
|
|
10
|
+
* - VisualParameter
|
|
11
|
+
* - ThemeTarget
|
|
12
|
+
* - ThemePack
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
declare const VisualSlotSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
acceptedElementTypes: z.ZodArray<z.ZodString, "many">;
|
|
18
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
id?: string;
|
|
22
|
+
acceptedElementTypes?: string[];
|
|
23
|
+
required?: boolean;
|
|
24
|
+
constraints?: Record<string, unknown>;
|
|
25
|
+
}, {
|
|
26
|
+
id?: string;
|
|
27
|
+
acceptedElementTypes?: string[];
|
|
28
|
+
required?: boolean;
|
|
29
|
+
constraints?: Record<string, unknown>;
|
|
30
|
+
}>;
|
|
31
|
+
type VisualSlot = z.infer<typeof VisualSlotSchema>;
|
|
32
|
+
declare const VisualParameterSchema: z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
type: z.ZodEnum<["color", "dimension", "number", "string", "boolean", "gradient", "shadow"]>;
|
|
35
|
+
default: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
36
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
id?: string;
|
|
39
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
40
|
+
constraints?: Record<string, unknown>;
|
|
41
|
+
default?: string | number | boolean;
|
|
42
|
+
}, {
|
|
43
|
+
id?: string;
|
|
44
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
45
|
+
constraints?: Record<string, unknown>;
|
|
46
|
+
default?: string | number | boolean;
|
|
47
|
+
}>;
|
|
48
|
+
type VisualParameter = z.infer<typeof VisualParameterSchema>;
|
|
49
|
+
declare const VisualStateSchema: z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
parameters: z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
type: z.ZodEnum<["color", "dimension", "number", "string", "boolean", "gradient", "shadow"]>;
|
|
54
|
+
default: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
55
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
id?: string;
|
|
58
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
59
|
+
constraints?: Record<string, unknown>;
|
|
60
|
+
default?: string | number | boolean;
|
|
61
|
+
}, {
|
|
62
|
+
id?: string;
|
|
63
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
64
|
+
constraints?: Record<string, unknown>;
|
|
65
|
+
default?: string | number | boolean;
|
|
66
|
+
}>, "many">;
|
|
67
|
+
transitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
id?: string;
|
|
70
|
+
parameters?: {
|
|
71
|
+
id?: string;
|
|
72
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
73
|
+
constraints?: Record<string, unknown>;
|
|
74
|
+
default?: string | number | boolean;
|
|
75
|
+
}[];
|
|
76
|
+
transitions?: Record<string, string>;
|
|
77
|
+
}, {
|
|
78
|
+
id?: string;
|
|
79
|
+
parameters?: {
|
|
80
|
+
id?: string;
|
|
81
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
82
|
+
constraints?: Record<string, unknown>;
|
|
83
|
+
default?: string | number | boolean;
|
|
84
|
+
}[];
|
|
85
|
+
transitions?: Record<string, string>;
|
|
86
|
+
}>;
|
|
87
|
+
type VisualState = z.infer<typeof VisualStateSchema>;
|
|
88
|
+
declare const ThemeTargetSchema: z.ZodObject<{
|
|
89
|
+
library: z.ZodLiteral<"@ultrst-armada/floks">;
|
|
90
|
+
componentId: z.ZodString;
|
|
91
|
+
componentVersion: z.ZodString;
|
|
92
|
+
contractVersion: z.ZodDefault<z.ZodString>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
library?: "@ultrst-armada/floks";
|
|
95
|
+
componentId?: string;
|
|
96
|
+
componentVersion?: string;
|
|
97
|
+
contractVersion?: string;
|
|
98
|
+
}, {
|
|
99
|
+
library?: "@ultrst-armada/floks";
|
|
100
|
+
componentId?: string;
|
|
101
|
+
componentVersion?: string;
|
|
102
|
+
contractVersion?: string;
|
|
103
|
+
}>;
|
|
104
|
+
type ThemeTarget = z.infer<typeof ThemeTargetSchema>;
|
|
105
|
+
declare const ComponentThemeContractSchema: z.ZodObject<{
|
|
106
|
+
componentId: z.ZodString;
|
|
107
|
+
componentVersion: z.ZodString;
|
|
108
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
109
|
+
slots: z.ZodArray<z.ZodObject<{
|
|
110
|
+
id: z.ZodString;
|
|
111
|
+
acceptedElementTypes: z.ZodArray<z.ZodString, "many">;
|
|
112
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
113
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
id?: string;
|
|
116
|
+
acceptedElementTypes?: string[];
|
|
117
|
+
required?: boolean;
|
|
118
|
+
constraints?: Record<string, unknown>;
|
|
119
|
+
}, {
|
|
120
|
+
id?: string;
|
|
121
|
+
acceptedElementTypes?: string[];
|
|
122
|
+
required?: boolean;
|
|
123
|
+
constraints?: Record<string, unknown>;
|
|
124
|
+
}>, "many">;
|
|
125
|
+
states: z.ZodArray<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
parameters: z.ZodArray<z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
type: z.ZodEnum<["color", "dimension", "number", "string", "boolean", "gradient", "shadow"]>;
|
|
130
|
+
default: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
131
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
id?: string;
|
|
134
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
135
|
+
constraints?: Record<string, unknown>;
|
|
136
|
+
default?: string | number | boolean;
|
|
137
|
+
}, {
|
|
138
|
+
id?: string;
|
|
139
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
140
|
+
constraints?: Record<string, unknown>;
|
|
141
|
+
default?: string | number | boolean;
|
|
142
|
+
}>, "many">;
|
|
143
|
+
transitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
id?: string;
|
|
146
|
+
parameters?: {
|
|
147
|
+
id?: string;
|
|
148
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
149
|
+
constraints?: Record<string, unknown>;
|
|
150
|
+
default?: string | number | boolean;
|
|
151
|
+
}[];
|
|
152
|
+
transitions?: Record<string, string>;
|
|
153
|
+
}, {
|
|
154
|
+
id?: string;
|
|
155
|
+
parameters?: {
|
|
156
|
+
id?: string;
|
|
157
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
158
|
+
constraints?: Record<string, unknown>;
|
|
159
|
+
default?: string | number | boolean;
|
|
160
|
+
}[];
|
|
161
|
+
transitions?: Record<string, string>;
|
|
162
|
+
}>, "many">;
|
|
163
|
+
parameters: z.ZodArray<z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
type: z.ZodEnum<["color", "dimension", "number", "string", "boolean", "gradient", "shadow"]>;
|
|
166
|
+
default: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
167
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
id?: string;
|
|
170
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
171
|
+
constraints?: Record<string, unknown>;
|
|
172
|
+
default?: string | number | boolean;
|
|
173
|
+
}, {
|
|
174
|
+
id?: string;
|
|
175
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
176
|
+
constraints?: Record<string, unknown>;
|
|
177
|
+
default?: string | number | boolean;
|
|
178
|
+
}>, "many">;
|
|
179
|
+
assets: z.ZodArray<z.ZodString, "many">;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
parameters?: {
|
|
182
|
+
id?: string;
|
|
183
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
184
|
+
constraints?: Record<string, unknown>;
|
|
185
|
+
default?: string | number | boolean;
|
|
186
|
+
}[];
|
|
187
|
+
componentId?: string;
|
|
188
|
+
componentVersion?: string;
|
|
189
|
+
displayName?: string;
|
|
190
|
+
slots?: {
|
|
191
|
+
id?: string;
|
|
192
|
+
acceptedElementTypes?: string[];
|
|
193
|
+
required?: boolean;
|
|
194
|
+
constraints?: Record<string, unknown>;
|
|
195
|
+
}[];
|
|
196
|
+
states?: {
|
|
197
|
+
id?: string;
|
|
198
|
+
parameters?: {
|
|
199
|
+
id?: string;
|
|
200
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
201
|
+
constraints?: Record<string, unknown>;
|
|
202
|
+
default?: string | number | boolean;
|
|
203
|
+
}[];
|
|
204
|
+
transitions?: Record<string, string>;
|
|
205
|
+
}[];
|
|
206
|
+
assets?: string[];
|
|
207
|
+
}, {
|
|
208
|
+
parameters?: {
|
|
209
|
+
id?: string;
|
|
210
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
211
|
+
constraints?: Record<string, unknown>;
|
|
212
|
+
default?: string | number | boolean;
|
|
213
|
+
}[];
|
|
214
|
+
componentId?: string;
|
|
215
|
+
componentVersion?: string;
|
|
216
|
+
displayName?: string;
|
|
217
|
+
slots?: {
|
|
218
|
+
id?: string;
|
|
219
|
+
acceptedElementTypes?: string[];
|
|
220
|
+
required?: boolean;
|
|
221
|
+
constraints?: Record<string, unknown>;
|
|
222
|
+
}[];
|
|
223
|
+
states?: {
|
|
224
|
+
id?: string;
|
|
225
|
+
parameters?: {
|
|
226
|
+
id?: string;
|
|
227
|
+
type?: "string" | "number" | "boolean" | "color" | "dimension" | "gradient" | "shadow";
|
|
228
|
+
constraints?: Record<string, unknown>;
|
|
229
|
+
default?: string | number | boolean;
|
|
230
|
+
}[];
|
|
231
|
+
transitions?: Record<string, string>;
|
|
232
|
+
}[];
|
|
233
|
+
assets?: string[];
|
|
234
|
+
}>;
|
|
235
|
+
type ComponentThemeContract = z.infer<typeof ComponentThemeContractSchema>;
|
|
236
|
+
declare const ThemePackSlotBindingSchema: z.ZodObject<{
|
|
237
|
+
slotId: z.ZodString;
|
|
238
|
+
elementType: z.ZodString;
|
|
239
|
+
assetRef: z.ZodOptional<z.ZodString>;
|
|
240
|
+
styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
241
|
+
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
slotId?: string;
|
|
243
|
+
elementType?: string;
|
|
244
|
+
assetRef?: string;
|
|
245
|
+
styles?: Record<string, string>;
|
|
246
|
+
}, {
|
|
247
|
+
slotId?: string;
|
|
248
|
+
elementType?: string;
|
|
249
|
+
assetRef?: string;
|
|
250
|
+
styles?: Record<string, string>;
|
|
251
|
+
}>;
|
|
252
|
+
type ThemePackSlotBinding = z.infer<typeof ThemePackSlotBindingSchema>;
|
|
253
|
+
declare const ThemePackStateMappingSchema: z.ZodObject<{
|
|
254
|
+
stateId: z.ZodString;
|
|
255
|
+
parameterOverrides: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
stateId?: string;
|
|
258
|
+
parameterOverrides?: Record<string, string | number | boolean>;
|
|
259
|
+
}, {
|
|
260
|
+
stateId?: string;
|
|
261
|
+
parameterOverrides?: Record<string, string | number | boolean>;
|
|
262
|
+
}>;
|
|
263
|
+
type ThemePackStateMapping = z.infer<typeof ThemePackStateMappingSchema>;
|
|
264
|
+
declare const ThemePackSchema: z.ZodObject<{
|
|
265
|
+
themeId: z.ZodString;
|
|
266
|
+
name: z.ZodString;
|
|
267
|
+
version: z.ZodString;
|
|
268
|
+
target: z.ZodObject<{
|
|
269
|
+
library: z.ZodLiteral<"@ultrst-armada/floks">;
|
|
270
|
+
componentId: z.ZodString;
|
|
271
|
+
componentVersion: z.ZodString;
|
|
272
|
+
contractVersion: z.ZodDefault<z.ZodString>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
library?: "@ultrst-armada/floks";
|
|
275
|
+
componentId?: string;
|
|
276
|
+
componentVersion?: string;
|
|
277
|
+
contractVersion?: string;
|
|
278
|
+
}, {
|
|
279
|
+
library?: "@ultrst-armada/floks";
|
|
280
|
+
componentId?: string;
|
|
281
|
+
componentVersion?: string;
|
|
282
|
+
contractVersion?: string;
|
|
283
|
+
}>;
|
|
284
|
+
slots: z.ZodArray<z.ZodObject<{
|
|
285
|
+
slotId: z.ZodString;
|
|
286
|
+
elementType: z.ZodString;
|
|
287
|
+
assetRef: z.ZodOptional<z.ZodString>;
|
|
288
|
+
styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
289
|
+
}, "strip", z.ZodTypeAny, {
|
|
290
|
+
slotId?: string;
|
|
291
|
+
elementType?: string;
|
|
292
|
+
assetRef?: string;
|
|
293
|
+
styles?: Record<string, string>;
|
|
294
|
+
}, {
|
|
295
|
+
slotId?: string;
|
|
296
|
+
elementType?: string;
|
|
297
|
+
assetRef?: string;
|
|
298
|
+
styles?: Record<string, string>;
|
|
299
|
+
}>, "many">;
|
|
300
|
+
states: z.ZodArray<z.ZodObject<{
|
|
301
|
+
stateId: z.ZodString;
|
|
302
|
+
parameterOverrides: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
303
|
+
}, "strip", z.ZodTypeAny, {
|
|
304
|
+
stateId?: string;
|
|
305
|
+
parameterOverrides?: Record<string, string | number | boolean>;
|
|
306
|
+
}, {
|
|
307
|
+
stateId?: string;
|
|
308
|
+
parameterOverrides?: Record<string, string | number | boolean>;
|
|
309
|
+
}>, "many">;
|
|
310
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
311
|
+
assetTypes: z.ZodArray<z.ZodString, "many">;
|
|
312
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
313
|
+
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
parameters?: Record<string, string | number | boolean>;
|
|
315
|
+
slots?: {
|
|
316
|
+
slotId?: string;
|
|
317
|
+
elementType?: string;
|
|
318
|
+
assetRef?: string;
|
|
319
|
+
styles?: Record<string, string>;
|
|
320
|
+
}[];
|
|
321
|
+
states?: {
|
|
322
|
+
stateId?: string;
|
|
323
|
+
parameterOverrides?: Record<string, string | number | boolean>;
|
|
324
|
+
}[];
|
|
325
|
+
themeId?: string;
|
|
326
|
+
name?: string;
|
|
327
|
+
version?: string;
|
|
328
|
+
target?: {
|
|
329
|
+
library?: "@ultrst-armada/floks";
|
|
330
|
+
componentId?: string;
|
|
331
|
+
componentVersion?: string;
|
|
332
|
+
contractVersion?: string;
|
|
333
|
+
};
|
|
334
|
+
assetTypes?: string[];
|
|
335
|
+
metadata?: Record<string, unknown>;
|
|
336
|
+
}, {
|
|
337
|
+
parameters?: Record<string, string | number | boolean>;
|
|
338
|
+
slots?: {
|
|
339
|
+
slotId?: string;
|
|
340
|
+
elementType?: string;
|
|
341
|
+
assetRef?: string;
|
|
342
|
+
styles?: Record<string, string>;
|
|
343
|
+
}[];
|
|
344
|
+
states?: {
|
|
345
|
+
stateId?: string;
|
|
346
|
+
parameterOverrides?: Record<string, string | number | boolean>;
|
|
347
|
+
}[];
|
|
348
|
+
themeId?: string;
|
|
349
|
+
name?: string;
|
|
350
|
+
version?: string;
|
|
351
|
+
target?: {
|
|
352
|
+
library?: "@ultrst-armada/floks";
|
|
353
|
+
componentId?: string;
|
|
354
|
+
componentVersion?: string;
|
|
355
|
+
contractVersion?: string;
|
|
356
|
+
};
|
|
357
|
+
assetTypes?: string[];
|
|
358
|
+
metadata?: Record<string, unknown>;
|
|
359
|
+
}>;
|
|
360
|
+
type ThemePack = z.infer<typeof ThemePackSchema>;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @file registry.ts
|
|
364
|
+
* @description Canonical Floks Component Theme Contract Registry.
|
|
365
|
+
* Supplies explicit visual contracts for Button, Panel, SliderInput, Badge, Socket2D, Wire2D, Node2DBase.
|
|
366
|
+
*/
|
|
367
|
+
|
|
368
|
+
declare const FLOKS_COMPONENT_REGISTRY: Record<string, ComponentThemeContract>;
|
|
369
|
+
declare function getComponentContract(componentId: string): ComponentThemeContract | undefined;
|
|
370
|
+
declare function listComponentContracts(): ComponentThemeContract[];
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* @file validator.ts
|
|
374
|
+
* @description Deterministic ThemePack compatibility validator.
|
|
375
|
+
* Enforces docs/04_THETA_COMPONENT_CONTRACTS.md:
|
|
376
|
+
* Validate(theme, component)
|
|
377
|
+
* <=>
|
|
378
|
+
* Target(theme) = component
|
|
379
|
+
* ^ theme.slots ⊆ component.slots
|
|
380
|
+
* ^ theme.states ⊆ component.states
|
|
381
|
+
* ^ theme.parameters ⊆ component.parameters
|
|
382
|
+
* ^ theme.assetTypes ⊆ component.acceptedAssetTypes
|
|
383
|
+
*/
|
|
384
|
+
|
|
385
|
+
interface ThemeValidationResult {
|
|
386
|
+
valid: boolean;
|
|
387
|
+
errors: string[];
|
|
388
|
+
warnings: string[];
|
|
389
|
+
targetComponentId: string;
|
|
390
|
+
}
|
|
391
|
+
declare function validateThemePackAgainstContract(themePack: ThemePack, contract?: ComponentThemeContract): ThemeValidationResult;
|
|
392
|
+
declare function loadThemePack(raw: unknown): ThemePack;
|
|
393
|
+
|
|
394
|
+
export { type ComponentThemeContract, ComponentThemeContractSchema, FLOKS_COMPONENT_REGISTRY, type ThemePack, ThemePackSchema, type ThemePackSlotBinding, ThemePackSlotBindingSchema, type ThemePackStateMapping, ThemePackStateMappingSchema, type ThemeTarget, ThemeTargetSchema, type ThemeValidationResult, type VisualParameter, VisualParameterSchema, type VisualSlot, VisualSlotSchema, type VisualState, VisualStateSchema, getComponentContract, listComponentContracts, loadThemePack, validateThemePackAgainstContract };
|