@visual-platform/define 0.1.0 → 0.3.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.d.ts +27 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +88 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/schema.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a field is about (ADR-046): "content" = what the block shows (texts, images, links, icons) —
|
|
3
|
+
* edited in Settings → Content, exposable as component props, translated; "layout" = how it looks or
|
|
4
|
+
* behaves (sizes, alignment, variants, columns, data wiring) — edited only in Edit layout.
|
|
5
|
+
* Default: text/textarea/image/link/icon → content, everything else → layout.
|
|
6
|
+
*/
|
|
7
|
+
export type FieldRole = "content" | "layout";
|
|
8
|
+
/** Design-system token families a field can pick from (ADR-026, ADR-047). Free CSS values are allowed too. */
|
|
9
|
+
export type TokenType = "spacing" | "color" | "radius" | "font.size" | "font.family" | "shadow" | "line.height";
|
|
10
|
+
/** CSS properties a token field may set directly on the block (instead of a custom property), ADR-047. */
|
|
11
|
+
export declare const CSS_PROPERTIES: readonly ["font-family", "box-shadow", "line-height"];
|
|
12
|
+
export type CssProperty = (typeof CSS_PROPERTIES)[number];
|
|
13
|
+
type Common = {
|
|
14
|
+
label?: string;
|
|
15
|
+
role?: FieldRole;
|
|
16
|
+
};
|
|
1
17
|
/** Field kinds understood by the editor (blueprint 23, 32) and the runtime (style bindings). */
|
|
2
|
-
export type FieldDef = {
|
|
18
|
+
export type FieldDef = Common & ({
|
|
3
19
|
type: "text" | "textarea";
|
|
4
20
|
label?: string;
|
|
5
21
|
required?: boolean;
|
|
@@ -28,9 +44,10 @@ export type FieldDef = {
|
|
|
28
44
|
} | {
|
|
29
45
|
type: "token";
|
|
30
46
|
label?: string;
|
|
31
|
-
tokenType:
|
|
47
|
+
tokenType: TokenType;
|
|
32
48
|
responsive?: boolean;
|
|
33
49
|
styleBinding?: string;
|
|
50
|
+
cssProperty?: CssProperty;
|
|
34
51
|
} | {
|
|
35
52
|
type: "link";
|
|
36
53
|
label?: string;
|
|
@@ -47,7 +64,12 @@ export type FieldDef = {
|
|
|
47
64
|
type: "slot";
|
|
48
65
|
label?: string;
|
|
49
66
|
allow?: readonly string[];
|
|
50
|
-
};
|
|
67
|
+
});
|
|
68
|
+
/** Role of a field: explicit `role`, else content for text/textarea/image/link/icon, layout otherwise. */
|
|
69
|
+
export declare function fieldRole(f: {
|
|
70
|
+
type: string;
|
|
71
|
+
role?: FieldRole | undefined;
|
|
72
|
+
}): FieldRole;
|
|
51
73
|
export type ComponentDefinition<F extends Record<string, FieldDef> = Record<string, FieldDef>> = {
|
|
52
74
|
/** Stable PascalCase type stored in PageDocument nodes. */
|
|
53
75
|
type: string;
|
|
@@ -75,9 +97,11 @@ export type ComponentDefinition<F extends Record<string, FieldDef> = Record<stri
|
|
|
75
97
|
}>>;
|
|
76
98
|
};
|
|
77
99
|
export declare function defineComponent<const F extends Record<string, FieldDef>>(def: ComponentDefinition<F>): ComponentDefinition<F>;
|
|
100
|
+
/** cssVar: custom property read by the component; property: a real CSS property set on the block (ADR-047). */
|
|
78
101
|
export type StyleBinding = {
|
|
79
102
|
cssVar: string;
|
|
80
103
|
values?: Record<string, string>;
|
|
104
|
+
property?: CssProperty;
|
|
81
105
|
};
|
|
82
106
|
/** Fields that may carry `$responsive` values and map to CSS custom properties at runtime. */
|
|
83
107
|
export declare function styleBindings(def: ComponentDefinition<Record<string, FieldDef>>): Record<string, StyleBinding>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,MAAM,QAAQ,
|
|
1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AAM,EAAE,MAAM,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAEvG,8FAA8F;AAC9F,wBAAgB,aAAa,CAAC,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAU9G;AACD,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/** CSS properties a token field may set directly on the block (instead of a custom property), ADR-047. */
|
|
2
|
+
export const CSS_PROPERTIES = ["font-family", "box-shadow", "line-height"];
|
|
3
|
+
const CONTENT_TYPES = new Set(["text", "textarea", "image", "link", "icon"]);
|
|
4
|
+
/** Role of a field: explicit `role`, else content for text/textarea/image/link/icon, layout otherwise. */
|
|
5
|
+
export function fieldRole(f) {
|
|
6
|
+
if (f.type === "slot")
|
|
7
|
+
return "layout";
|
|
8
|
+
return f.role ?? (CONTENT_TYPES.has(f.type) ? "content" : "layout");
|
|
9
|
+
}
|
|
1
10
|
export function defineComponent(def) {
|
|
2
11
|
if (!/^[A-Z][A-Za-z0-9]*$/.test(def.type))
|
|
3
12
|
throw new Error(`component type must be PascalCase: ${def.type}`);
|
|
@@ -10,6 +19,9 @@ export function styleBindings(def) {
|
|
|
10
19
|
if ("styleBinding" in f && f.styleBinding) {
|
|
11
20
|
out[name] = { cssVar: f.styleBinding, ...("cssValues" in f && f.cssValues ? { values: f.cssValues } : {}) };
|
|
12
21
|
}
|
|
22
|
+
else if ("cssProperty" in f && f.cssProperty && CSS_PROPERTIES.includes(f.cssProperty)) {
|
|
23
|
+
out[name] = { cssVar: `--vp-${f.cssProperty}`, property: f.cssProperty };
|
|
24
|
+
}
|
|
13
25
|
}
|
|
14
26
|
return out;
|
|
15
27
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"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S,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QAC9G,CAAC;aAAM,IAAI,aAAa,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,IAAK,cAAoC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;YAChH,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC3E,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,cAAc,aAAa,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { z } from "zod";
|
|
|
2
2
|
/** Runtime schema for FieldDef — the server validates every pushed definition (blueprint 23 §4). */
|
|
3
3
|
export declare const FieldDefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
4
|
label: z.ZodOptional<z.ZodString>;
|
|
5
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
content: "content";
|
|
7
|
+
layout: "layout";
|
|
8
|
+
}>>;
|
|
5
9
|
type: z.ZodEnum<{
|
|
6
10
|
text: "text";
|
|
7
11
|
textarea: "textarea";
|
|
@@ -12,6 +16,10 @@ export declare const FieldDefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
12
16
|
inline: z.ZodOptional<z.ZodBoolean>;
|
|
13
17
|
}, z.core.$strict>, z.ZodObject<{
|
|
14
18
|
label: z.ZodOptional<z.ZodString>;
|
|
19
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
content: "content";
|
|
21
|
+
layout: "layout";
|
|
22
|
+
}>>;
|
|
15
23
|
type: z.ZodLiteral<"number">;
|
|
16
24
|
min: z.ZodOptional<z.ZodNumber>;
|
|
17
25
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -19,11 +27,19 @@ export declare const FieldDefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
19
27
|
styleBinding: z.ZodOptional<z.ZodString>;
|
|
20
28
|
}, z.core.$strict>, z.ZodObject<{
|
|
21
29
|
label: z.ZodOptional<z.ZodString>;
|
|
30
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
content: "content";
|
|
32
|
+
layout: "layout";
|
|
33
|
+
}>>;
|
|
22
34
|
type: z.ZodLiteral<"boolean">;
|
|
23
35
|
responsive: z.ZodOptional<z.ZodBoolean>;
|
|
24
36
|
styleBinding: z.ZodOptional<z.ZodString>;
|
|
25
37
|
}, z.core.$strict>, z.ZodObject<{
|
|
26
38
|
label: z.ZodOptional<z.ZodString>;
|
|
39
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
content: "content";
|
|
41
|
+
layout: "layout";
|
|
42
|
+
}>>;
|
|
27
43
|
type: z.ZodLiteral<"select">;
|
|
28
44
|
options: z.ZodArray<z.ZodString>;
|
|
29
45
|
responsive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -31,29 +47,57 @@ export declare const FieldDefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
31
47
|
cssValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
32
48
|
}, z.core.$strict>, z.ZodObject<{
|
|
33
49
|
label: z.ZodOptional<z.ZodString>;
|
|
50
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
content: "content";
|
|
52
|
+
layout: "layout";
|
|
53
|
+
}>>;
|
|
34
54
|
type: z.ZodLiteral<"token">;
|
|
35
55
|
tokenType: z.ZodEnum<{
|
|
36
56
|
color: "color";
|
|
57
|
+
"font.family": "font.family";
|
|
37
58
|
"font.size": "font.size";
|
|
59
|
+
"line.height": "line.height";
|
|
38
60
|
radius: "radius";
|
|
61
|
+
shadow: "shadow";
|
|
39
62
|
spacing: "spacing";
|
|
40
63
|
}>;
|
|
41
64
|
responsive: z.ZodOptional<z.ZodBoolean>;
|
|
42
65
|
styleBinding: z.ZodOptional<z.ZodString>;
|
|
66
|
+
cssProperty: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
"box-shadow": "box-shadow";
|
|
68
|
+
"font-family": "font-family";
|
|
69
|
+
"line-height": "line-height";
|
|
70
|
+
}>>;
|
|
43
71
|
}, z.core.$strict>, z.ZodObject<{
|
|
44
72
|
label: z.ZodOptional<z.ZodString>;
|
|
73
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
content: "content";
|
|
75
|
+
layout: "layout";
|
|
76
|
+
}>>;
|
|
45
77
|
type: z.ZodLiteral<"link">;
|
|
46
78
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
47
79
|
}, z.core.$strict>, z.ZodObject<{
|
|
48
80
|
label: z.ZodOptional<z.ZodString>;
|
|
81
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
content: "content";
|
|
83
|
+
layout: "layout";
|
|
84
|
+
}>>;
|
|
49
85
|
type: z.ZodLiteral<"image">;
|
|
50
86
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
51
87
|
}, z.core.$strict>, z.ZodObject<{
|
|
52
88
|
label: z.ZodOptional<z.ZodString>;
|
|
89
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
content: "content";
|
|
91
|
+
layout: "layout";
|
|
92
|
+
}>>;
|
|
53
93
|
type: z.ZodLiteral<"icon">;
|
|
54
94
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
55
95
|
}, z.core.$strict>, z.ZodObject<{
|
|
56
96
|
label: z.ZodOptional<z.ZodString>;
|
|
97
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
98
|
+
content: "content";
|
|
99
|
+
layout: "layout";
|
|
100
|
+
}>>;
|
|
57
101
|
type: z.ZodLiteral<"slot">;
|
|
58
102
|
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
103
|
}, z.core.$strict>], "type">;
|
|
@@ -65,6 +109,10 @@ export declare const ComponentDefinitionSchema: z.ZodObject<{
|
|
|
65
109
|
definitionVersion: z.ZodNumber;
|
|
66
110
|
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
111
|
label: z.ZodOptional<z.ZodString>;
|
|
112
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
content: "content";
|
|
114
|
+
layout: "layout";
|
|
115
|
+
}>>;
|
|
68
116
|
type: z.ZodEnum<{
|
|
69
117
|
text: "text";
|
|
70
118
|
textarea: "textarea";
|
|
@@ -75,6 +123,10 @@ export declare const ComponentDefinitionSchema: z.ZodObject<{
|
|
|
75
123
|
inline: z.ZodOptional<z.ZodBoolean>;
|
|
76
124
|
}, z.core.$strict>, z.ZodObject<{
|
|
77
125
|
label: z.ZodOptional<z.ZodString>;
|
|
126
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
127
|
+
content: "content";
|
|
128
|
+
layout: "layout";
|
|
129
|
+
}>>;
|
|
78
130
|
type: z.ZodLiteral<"number">;
|
|
79
131
|
min: z.ZodOptional<z.ZodNumber>;
|
|
80
132
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -82,11 +134,19 @@ export declare const ComponentDefinitionSchema: z.ZodObject<{
|
|
|
82
134
|
styleBinding: z.ZodOptional<z.ZodString>;
|
|
83
135
|
}, z.core.$strict>, z.ZodObject<{
|
|
84
136
|
label: z.ZodOptional<z.ZodString>;
|
|
137
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
138
|
+
content: "content";
|
|
139
|
+
layout: "layout";
|
|
140
|
+
}>>;
|
|
85
141
|
type: z.ZodLiteral<"boolean">;
|
|
86
142
|
responsive: z.ZodOptional<z.ZodBoolean>;
|
|
87
143
|
styleBinding: z.ZodOptional<z.ZodString>;
|
|
88
144
|
}, z.core.$strict>, z.ZodObject<{
|
|
89
145
|
label: z.ZodOptional<z.ZodString>;
|
|
146
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
147
|
+
content: "content";
|
|
148
|
+
layout: "layout";
|
|
149
|
+
}>>;
|
|
90
150
|
type: z.ZodLiteral<"select">;
|
|
91
151
|
options: z.ZodArray<z.ZodString>;
|
|
92
152
|
responsive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -94,29 +154,57 @@ export declare const ComponentDefinitionSchema: z.ZodObject<{
|
|
|
94
154
|
cssValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
95
155
|
}, z.core.$strict>, z.ZodObject<{
|
|
96
156
|
label: z.ZodOptional<z.ZodString>;
|
|
157
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
158
|
+
content: "content";
|
|
159
|
+
layout: "layout";
|
|
160
|
+
}>>;
|
|
97
161
|
type: z.ZodLiteral<"token">;
|
|
98
162
|
tokenType: z.ZodEnum<{
|
|
99
163
|
color: "color";
|
|
164
|
+
"font.family": "font.family";
|
|
100
165
|
"font.size": "font.size";
|
|
166
|
+
"line.height": "line.height";
|
|
101
167
|
radius: "radius";
|
|
168
|
+
shadow: "shadow";
|
|
102
169
|
spacing: "spacing";
|
|
103
170
|
}>;
|
|
104
171
|
responsive: z.ZodOptional<z.ZodBoolean>;
|
|
105
172
|
styleBinding: z.ZodOptional<z.ZodString>;
|
|
173
|
+
cssProperty: z.ZodOptional<z.ZodEnum<{
|
|
174
|
+
"box-shadow": "box-shadow";
|
|
175
|
+
"font-family": "font-family";
|
|
176
|
+
"line-height": "line-height";
|
|
177
|
+
}>>;
|
|
106
178
|
}, z.core.$strict>, z.ZodObject<{
|
|
107
179
|
label: z.ZodOptional<z.ZodString>;
|
|
180
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
181
|
+
content: "content";
|
|
182
|
+
layout: "layout";
|
|
183
|
+
}>>;
|
|
108
184
|
type: z.ZodLiteral<"link">;
|
|
109
185
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
110
186
|
}, z.core.$strict>, z.ZodObject<{
|
|
111
187
|
label: z.ZodOptional<z.ZodString>;
|
|
188
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
content: "content";
|
|
190
|
+
layout: "layout";
|
|
191
|
+
}>>;
|
|
112
192
|
type: z.ZodLiteral<"image">;
|
|
113
193
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
114
194
|
}, z.core.$strict>, z.ZodObject<{
|
|
115
195
|
label: z.ZodOptional<z.ZodString>;
|
|
196
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
197
|
+
content: "content";
|
|
198
|
+
layout: "layout";
|
|
199
|
+
}>>;
|
|
116
200
|
type: z.ZodLiteral<"icon">;
|
|
117
201
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
118
202
|
}, z.core.$strict>, z.ZodObject<{
|
|
119
203
|
label: z.ZodOptional<z.ZodString>;
|
|
204
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
content: "content";
|
|
206
|
+
layout: "layout";
|
|
207
|
+
}>>;
|
|
120
208
|
type: z.ZodLiteral<"slot">;
|
|
121
209
|
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
122
210
|
}, z.core.$strict>], "type">>;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,oGAAoG;AACpG,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,oGAAoG;AACpG,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAUzB,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwBlC,CAAC;AAEL,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEjF,+FAA+F;AAC/F,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,aAAa,GAAE,SAAS,MAAM,EAAO;;;eACjE,MAAM,GAAG,SAAS;cAAQ,MAAM;iBAAW,MAAM;;EAazE"}
|
package/dist/schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
const base = { label: z.string().max(60).optional() };
|
|
2
|
+
const base = { label: z.string().max(60).optional(), role: z.enum(["content", "layout"]).optional() };
|
|
3
3
|
const cssVar = z.string().regex(/^--[a-z0-9-]+$/, "styleBinding must be a CSS custom property like --card-gap");
|
|
4
4
|
/** Runtime schema for FieldDef — the server validates every pushed definition (blueprint 23 §4). */
|
|
5
5
|
export const FieldDefSchema = z.discriminatedUnion("type", [
|
|
@@ -7,7 +7,7 @@ export const FieldDefSchema = z.discriminatedUnion("type", [
|
|
|
7
7
|
z.object({ type: z.literal("number"), ...base, min: z.number().optional(), max: z.number().optional(), responsive: z.boolean().optional(), styleBinding: cssVar.optional() }).strict(),
|
|
8
8
|
z.object({ type: z.literal("boolean"), ...base, responsive: z.boolean().optional(), styleBinding: cssVar.optional() }).strict(),
|
|
9
9
|
z.object({ type: z.literal("select"), ...base, options: z.array(z.string().min(1)).min(1).max(50), responsive: z.boolean().optional(), styleBinding: cssVar.optional(), cssValues: z.record(z.string(), z.string().regex(/^[#a-zA-Z0-9.%()\s,-]+$/)).optional() }).strict(),
|
|
10
|
-
z.object({ type: z.literal("token"), ...base, tokenType: z.enum(["spacing", "color", "radius", "font.size"]), responsive: z.boolean().optional(), styleBinding: cssVar.optional() }).strict(),
|
|
10
|
+
z.object({ type: z.literal("token"), ...base, tokenType: z.enum(["spacing", "color", "radius", "font.size", "font.family", "shadow", "line.height"]), responsive: z.boolean().optional(), styleBinding: cssVar.optional(), cssProperty: z.enum(["font-family", "box-shadow", "line-height"]).optional() }).strict(),
|
|
11
11
|
z.object({ type: z.literal("link"), ...base, required: z.boolean().optional() }).strict(),
|
|
12
12
|
z.object({ type: z.literal("image"), ...base, required: z.boolean().optional() }).strict(),
|
|
13
13
|
z.object({ type: z.literal("icon"), ...base, required: z.boolean().optional() }).strict(),
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;AACtG,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,4DAA4D,CAAC,CAAC;AAEhH,oGAAoG;AACpG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAA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AG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;AAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visual-platform/define",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Visual Page Platform — define your own components (fields, slots, events) for the editor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@visual-platform/contracts": "^0.
|
|
21
|
+
"@visual-platform/contracts": "^0.3.0",
|
|
22
22
|
"zod": "^4.6.7"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|