@retikz/core 0.1.0-alpha.1 → 0.1.0-alpha.2
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/es/compile/node.d.ts +32 -6
- package/dist/es/compile/node.d.ts.map +1 -1
- package/dist/es/compile/node.js +112 -28
- package/dist/es/compile/text-metrics.d.ts +2 -2
- package/dist/es/compile/text-metrics.d.ts.map +1 -1
- package/dist/es/index.d.ts +4 -4
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +2 -2
- package/dist/es/ir/node.d.ts +286 -6
- package/dist/es/ir/node.d.ts.map +1 -1
- package/dist/es/ir/node.js +71 -5
- package/dist/es/ir/scene.d.ts +376 -16
- package/dist/es/ir/scene.d.ts.map +1 -1
- package/dist/es/primitive/ellipse.d.ts +2 -0
- package/dist/es/primitive/ellipse.d.ts.map +1 -1
- package/dist/es/primitive/path.d.ts +4 -0
- package/dist/es/primitive/path.d.ts.map +1 -1
- package/dist/es/primitive/rect.d.ts +2 -0
- package/dist/es/primitive/rect.d.ts.map +1 -1
- package/dist/es/primitive/text.d.ts +43 -13
- package/dist/es/primitive/text.d.ts.map +1 -1
- package/dist/lib/compile/node.cjs +112 -28
- package/dist/lib/compile/node.d.ts +32 -6
- package/dist/lib/compile/node.d.ts.map +1 -1
- package/dist/lib/compile/text-metrics.d.ts +2 -2
- package/dist/lib/compile/text-metrics.d.ts.map +1 -1
- package/dist/lib/index.cjs +4 -0
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ir/node.cjs +74 -4
- package/dist/lib/ir/node.d.ts +286 -6
- package/dist/lib/ir/node.d.ts.map +1 -1
- package/dist/lib/ir/scene.d.ts +376 -16
- package/dist/lib/ir/scene.d.ts.map +1 -1
- package/dist/lib/primitive/ellipse.d.ts +2 -0
- package/dist/lib/primitive/ellipse.d.ts.map +1 -1
- package/dist/lib/primitive/path.d.ts +4 -0
- package/dist/lib/primitive/path.d.ts.map +1 -1
- package/dist/lib/primitive/rect.d.ts +2 -0
- package/dist/lib/primitive/rect.d.ts.map +1 -1
- package/dist/lib/primitive/text.d.ts +43 -13
- package/dist/lib/primitive/text.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/lib/ir/scene.d.ts
CHANGED
|
@@ -10,13 +10,91 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
10
10
|
}>>;
|
|
11
11
|
position: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('./position').PolarPosition, z.ZodTypeDef, import('./position').PolarPosition>]>;
|
|
12
12
|
rotate: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
text: z.ZodOptional<z.ZodString
|
|
13
|
+
text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
14
|
+
text: z.ZodString;
|
|
15
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
16
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
font: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
family: z.ZodOptional<z.ZodString>;
|
|
19
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
weight: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["normal", "bold"]>, z.ZodNumber]>>;
|
|
21
|
+
style: z.ZodOptional<z.ZodEnum<["normal", "italic", "oblique"]>>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
family?: string | undefined;
|
|
24
|
+
size?: number | undefined;
|
|
25
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
26
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
family?: string | undefined;
|
|
29
|
+
size?: number | undefined;
|
|
30
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
31
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
32
|
+
}>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
text: string;
|
|
35
|
+
fill?: string | undefined;
|
|
36
|
+
opacity?: number | undefined;
|
|
37
|
+
font?: {
|
|
38
|
+
family?: string | undefined;
|
|
39
|
+
size?: number | undefined;
|
|
40
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
41
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
text: string;
|
|
45
|
+
fill?: string | undefined;
|
|
46
|
+
opacity?: number | undefined;
|
|
47
|
+
font?: {
|
|
48
|
+
family?: string | undefined;
|
|
49
|
+
size?: number | undefined;
|
|
50
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
51
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
}>]>, "many">]>>;
|
|
54
|
+
align: z.ZodOptional<z.ZodNativeEnum<{
|
|
55
|
+
readonly left: "left";
|
|
56
|
+
readonly center: "center";
|
|
57
|
+
readonly right: "right";
|
|
58
|
+
}>>;
|
|
59
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
14
60
|
fill: z.ZodOptional<z.ZodString>;
|
|
61
|
+
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
15
62
|
stroke: z.ZodOptional<z.ZodString>;
|
|
63
|
+
drawOpacity: z.ZodOptional<z.ZodNumber>;
|
|
16
64
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
dotted: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
dashArray: z.ZodOptional<z.ZodString>;
|
|
68
|
+
roundedCorners: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
minimumWidth: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
minimumHeight: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
minimumSize: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
xScale: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
yScale: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
textColor: z.ZodOptional<z.ZodString>;
|
|
76
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
innerXSep: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
innerYSep: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
outerSep: z.ZodOptional<z.ZodNumber>;
|
|
17
80
|
padding: z.ZodOptional<z.ZodNumber>;
|
|
18
81
|
margin: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
|
|
82
|
+
font: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
family: z.ZodOptional<z.ZodString>;
|
|
84
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
weight: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["normal", "bold"]>, z.ZodNumber]>>;
|
|
86
|
+
style: z.ZodOptional<z.ZodEnum<["normal", "italic", "oblique"]>>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
family?: string | undefined;
|
|
89
|
+
size?: number | undefined;
|
|
90
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
91
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
family?: string | undefined;
|
|
94
|
+
size?: number | undefined;
|
|
95
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
96
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
97
|
+
}>>;
|
|
20
98
|
}, "strip", z.ZodTypeAny, {
|
|
21
99
|
type: "node";
|
|
22
100
|
position: [number, number] | import('./position').PolarPosition;
|
|
@@ -24,12 +102,46 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
24
102
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
25
103
|
stroke?: string | undefined;
|
|
26
104
|
strokeWidth?: number | undefined;
|
|
105
|
+
text?: string | (string | {
|
|
106
|
+
text: string;
|
|
107
|
+
fill?: string | undefined;
|
|
108
|
+
opacity?: number | undefined;
|
|
109
|
+
font?: {
|
|
110
|
+
family?: string | undefined;
|
|
111
|
+
size?: number | undefined;
|
|
112
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
113
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
114
|
+
} | undefined;
|
|
115
|
+
})[] | undefined;
|
|
116
|
+
opacity?: number | undefined;
|
|
117
|
+
font?: {
|
|
118
|
+
family?: string | undefined;
|
|
119
|
+
size?: number | undefined;
|
|
120
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
121
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
122
|
+
} | undefined;
|
|
27
123
|
id?: string | undefined;
|
|
28
124
|
rotate?: number | undefined;
|
|
29
|
-
|
|
125
|
+
align?: "left" | "center" | "right" | undefined;
|
|
126
|
+
lineHeight?: number | undefined;
|
|
127
|
+
fillOpacity?: number | undefined;
|
|
128
|
+
drawOpacity?: number | undefined;
|
|
129
|
+
dashed?: boolean | undefined;
|
|
130
|
+
dotted?: boolean | undefined;
|
|
131
|
+
dashArray?: string | undefined;
|
|
132
|
+
roundedCorners?: number | undefined;
|
|
133
|
+
minimumWidth?: number | undefined;
|
|
134
|
+
minimumHeight?: number | undefined;
|
|
135
|
+
minimumSize?: number | undefined;
|
|
136
|
+
scale?: number | undefined;
|
|
137
|
+
xScale?: number | undefined;
|
|
138
|
+
yScale?: number | undefined;
|
|
139
|
+
textColor?: string | undefined;
|
|
140
|
+
innerXSep?: number | undefined;
|
|
141
|
+
innerYSep?: number | undefined;
|
|
142
|
+
outerSep?: number | undefined;
|
|
30
143
|
padding?: number | undefined;
|
|
31
144
|
margin?: number | undefined;
|
|
32
|
-
fontSize?: number | undefined;
|
|
33
145
|
}, {
|
|
34
146
|
type: "node";
|
|
35
147
|
position: [number, number] | import('./position').PolarPosition;
|
|
@@ -37,12 +149,46 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
37
149
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
38
150
|
stroke?: string | undefined;
|
|
39
151
|
strokeWidth?: number | undefined;
|
|
152
|
+
text?: string | (string | {
|
|
153
|
+
text: string;
|
|
154
|
+
fill?: string | undefined;
|
|
155
|
+
opacity?: number | undefined;
|
|
156
|
+
font?: {
|
|
157
|
+
family?: string | undefined;
|
|
158
|
+
size?: number | undefined;
|
|
159
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
160
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
161
|
+
} | undefined;
|
|
162
|
+
})[] | undefined;
|
|
163
|
+
opacity?: number | undefined;
|
|
164
|
+
font?: {
|
|
165
|
+
family?: string | undefined;
|
|
166
|
+
size?: number | undefined;
|
|
167
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
168
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
169
|
+
} | undefined;
|
|
40
170
|
id?: string | undefined;
|
|
41
171
|
rotate?: number | undefined;
|
|
42
|
-
|
|
172
|
+
align?: "left" | "center" | "right" | undefined;
|
|
173
|
+
lineHeight?: number | undefined;
|
|
174
|
+
fillOpacity?: number | undefined;
|
|
175
|
+
drawOpacity?: number | undefined;
|
|
176
|
+
dashed?: boolean | undefined;
|
|
177
|
+
dotted?: boolean | undefined;
|
|
178
|
+
dashArray?: string | undefined;
|
|
179
|
+
roundedCorners?: number | undefined;
|
|
180
|
+
minimumWidth?: number | undefined;
|
|
181
|
+
minimumHeight?: number | undefined;
|
|
182
|
+
minimumSize?: number | undefined;
|
|
183
|
+
scale?: number | undefined;
|
|
184
|
+
xScale?: number | undefined;
|
|
185
|
+
yScale?: number | undefined;
|
|
186
|
+
textColor?: string | undefined;
|
|
187
|
+
innerXSep?: number | undefined;
|
|
188
|
+
innerYSep?: number | undefined;
|
|
189
|
+
outerSep?: number | undefined;
|
|
43
190
|
padding?: number | undefined;
|
|
44
191
|
margin?: number | undefined;
|
|
45
|
-
fontSize?: number | undefined;
|
|
46
192
|
}>, z.ZodObject<{
|
|
47
193
|
type: z.ZodLiteral<"path">;
|
|
48
194
|
stroke: z.ZodOptional<z.ZodString>;
|
|
@@ -178,13 +324,91 @@ export declare const SceneSchema: z.ZodObject<{
|
|
|
178
324
|
}>>;
|
|
179
325
|
position: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('./position').PolarPosition, z.ZodTypeDef, import('./position').PolarPosition>]>;
|
|
180
326
|
rotate: z.ZodOptional<z.ZodNumber>;
|
|
181
|
-
text: z.ZodOptional<z.ZodString
|
|
327
|
+
text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
328
|
+
text: z.ZodString;
|
|
329
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
330
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
font: z.ZodOptional<z.ZodObject<{
|
|
332
|
+
family: z.ZodOptional<z.ZodString>;
|
|
333
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
weight: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["normal", "bold"]>, z.ZodNumber]>>;
|
|
335
|
+
style: z.ZodOptional<z.ZodEnum<["normal", "italic", "oblique"]>>;
|
|
336
|
+
}, "strip", z.ZodTypeAny, {
|
|
337
|
+
family?: string | undefined;
|
|
338
|
+
size?: number | undefined;
|
|
339
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
340
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
family?: string | undefined;
|
|
343
|
+
size?: number | undefined;
|
|
344
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
345
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
346
|
+
}>>;
|
|
347
|
+
}, "strip", z.ZodTypeAny, {
|
|
348
|
+
text: string;
|
|
349
|
+
fill?: string | undefined;
|
|
350
|
+
opacity?: number | undefined;
|
|
351
|
+
font?: {
|
|
352
|
+
family?: string | undefined;
|
|
353
|
+
size?: number | undefined;
|
|
354
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
355
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
356
|
+
} | undefined;
|
|
357
|
+
}, {
|
|
358
|
+
text: string;
|
|
359
|
+
fill?: string | undefined;
|
|
360
|
+
opacity?: number | undefined;
|
|
361
|
+
font?: {
|
|
362
|
+
family?: string | undefined;
|
|
363
|
+
size?: number | undefined;
|
|
364
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
365
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
366
|
+
} | undefined;
|
|
367
|
+
}>]>, "many">]>>;
|
|
368
|
+
align: z.ZodOptional<z.ZodNativeEnum<{
|
|
369
|
+
readonly left: "left";
|
|
370
|
+
readonly center: "center";
|
|
371
|
+
readonly right: "right";
|
|
372
|
+
}>>;
|
|
373
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
182
374
|
fill: z.ZodOptional<z.ZodString>;
|
|
375
|
+
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
183
376
|
stroke: z.ZodOptional<z.ZodString>;
|
|
377
|
+
drawOpacity: z.ZodOptional<z.ZodNumber>;
|
|
184
378
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
379
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
380
|
+
dotted: z.ZodOptional<z.ZodBoolean>;
|
|
381
|
+
dashArray: z.ZodOptional<z.ZodString>;
|
|
382
|
+
roundedCorners: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
minimumWidth: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
minimumHeight: z.ZodOptional<z.ZodNumber>;
|
|
385
|
+
minimumSize: z.ZodOptional<z.ZodNumber>;
|
|
386
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
387
|
+
xScale: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
yScale: z.ZodOptional<z.ZodNumber>;
|
|
389
|
+
textColor: z.ZodOptional<z.ZodString>;
|
|
390
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
innerXSep: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
innerYSep: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
outerSep: z.ZodOptional<z.ZodNumber>;
|
|
185
394
|
padding: z.ZodOptional<z.ZodNumber>;
|
|
186
395
|
margin: z.ZodOptional<z.ZodNumber>;
|
|
187
|
-
|
|
396
|
+
font: z.ZodOptional<z.ZodObject<{
|
|
397
|
+
family: z.ZodOptional<z.ZodString>;
|
|
398
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
399
|
+
weight: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["normal", "bold"]>, z.ZodNumber]>>;
|
|
400
|
+
style: z.ZodOptional<z.ZodEnum<["normal", "italic", "oblique"]>>;
|
|
401
|
+
}, "strip", z.ZodTypeAny, {
|
|
402
|
+
family?: string | undefined;
|
|
403
|
+
size?: number | undefined;
|
|
404
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
405
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
406
|
+
}, {
|
|
407
|
+
family?: string | undefined;
|
|
408
|
+
size?: number | undefined;
|
|
409
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
410
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
411
|
+
}>>;
|
|
188
412
|
}, "strip", z.ZodTypeAny, {
|
|
189
413
|
type: "node";
|
|
190
414
|
position: [number, number] | import('./position').PolarPosition;
|
|
@@ -192,12 +416,46 @@ export declare const SceneSchema: z.ZodObject<{
|
|
|
192
416
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
193
417
|
stroke?: string | undefined;
|
|
194
418
|
strokeWidth?: number | undefined;
|
|
419
|
+
text?: string | (string | {
|
|
420
|
+
text: string;
|
|
421
|
+
fill?: string | undefined;
|
|
422
|
+
opacity?: number | undefined;
|
|
423
|
+
font?: {
|
|
424
|
+
family?: string | undefined;
|
|
425
|
+
size?: number | undefined;
|
|
426
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
427
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
428
|
+
} | undefined;
|
|
429
|
+
})[] | undefined;
|
|
430
|
+
opacity?: number | undefined;
|
|
431
|
+
font?: {
|
|
432
|
+
family?: string | undefined;
|
|
433
|
+
size?: number | undefined;
|
|
434
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
435
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
436
|
+
} | undefined;
|
|
195
437
|
id?: string | undefined;
|
|
196
438
|
rotate?: number | undefined;
|
|
197
|
-
|
|
439
|
+
align?: "left" | "center" | "right" | undefined;
|
|
440
|
+
lineHeight?: number | undefined;
|
|
441
|
+
fillOpacity?: number | undefined;
|
|
442
|
+
drawOpacity?: number | undefined;
|
|
443
|
+
dashed?: boolean | undefined;
|
|
444
|
+
dotted?: boolean | undefined;
|
|
445
|
+
dashArray?: string | undefined;
|
|
446
|
+
roundedCorners?: number | undefined;
|
|
447
|
+
minimumWidth?: number | undefined;
|
|
448
|
+
minimumHeight?: number | undefined;
|
|
449
|
+
minimumSize?: number | undefined;
|
|
450
|
+
scale?: number | undefined;
|
|
451
|
+
xScale?: number | undefined;
|
|
452
|
+
yScale?: number | undefined;
|
|
453
|
+
textColor?: string | undefined;
|
|
454
|
+
innerXSep?: number | undefined;
|
|
455
|
+
innerYSep?: number | undefined;
|
|
456
|
+
outerSep?: number | undefined;
|
|
198
457
|
padding?: number | undefined;
|
|
199
458
|
margin?: number | undefined;
|
|
200
|
-
fontSize?: number | undefined;
|
|
201
459
|
}, {
|
|
202
460
|
type: "node";
|
|
203
461
|
position: [number, number] | import('./position').PolarPosition;
|
|
@@ -205,12 +463,46 @@ export declare const SceneSchema: z.ZodObject<{
|
|
|
205
463
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
206
464
|
stroke?: string | undefined;
|
|
207
465
|
strokeWidth?: number | undefined;
|
|
466
|
+
text?: string | (string | {
|
|
467
|
+
text: string;
|
|
468
|
+
fill?: string | undefined;
|
|
469
|
+
opacity?: number | undefined;
|
|
470
|
+
font?: {
|
|
471
|
+
family?: string | undefined;
|
|
472
|
+
size?: number | undefined;
|
|
473
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
474
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
475
|
+
} | undefined;
|
|
476
|
+
})[] | undefined;
|
|
477
|
+
opacity?: number | undefined;
|
|
478
|
+
font?: {
|
|
479
|
+
family?: string | undefined;
|
|
480
|
+
size?: number | undefined;
|
|
481
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
482
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
483
|
+
} | undefined;
|
|
208
484
|
id?: string | undefined;
|
|
209
485
|
rotate?: number | undefined;
|
|
210
|
-
|
|
486
|
+
align?: "left" | "center" | "right" | undefined;
|
|
487
|
+
lineHeight?: number | undefined;
|
|
488
|
+
fillOpacity?: number | undefined;
|
|
489
|
+
drawOpacity?: number | undefined;
|
|
490
|
+
dashed?: boolean | undefined;
|
|
491
|
+
dotted?: boolean | undefined;
|
|
492
|
+
dashArray?: string | undefined;
|
|
493
|
+
roundedCorners?: number | undefined;
|
|
494
|
+
minimumWidth?: number | undefined;
|
|
495
|
+
minimumHeight?: number | undefined;
|
|
496
|
+
minimumSize?: number | undefined;
|
|
497
|
+
scale?: number | undefined;
|
|
498
|
+
xScale?: number | undefined;
|
|
499
|
+
yScale?: number | undefined;
|
|
500
|
+
textColor?: string | undefined;
|
|
501
|
+
innerXSep?: number | undefined;
|
|
502
|
+
innerYSep?: number | undefined;
|
|
503
|
+
outerSep?: number | undefined;
|
|
211
504
|
padding?: number | undefined;
|
|
212
505
|
margin?: number | undefined;
|
|
213
|
-
fontSize?: number | undefined;
|
|
214
506
|
}>, z.ZodObject<{
|
|
215
507
|
type: z.ZodLiteral<"path">;
|
|
216
508
|
stroke: z.ZodOptional<z.ZodString>;
|
|
@@ -365,12 +657,46 @@ export declare const SceneSchema: z.ZodObject<{
|
|
|
365
657
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
366
658
|
stroke?: string | undefined;
|
|
367
659
|
strokeWidth?: number | undefined;
|
|
660
|
+
text?: string | (string | {
|
|
661
|
+
text: string;
|
|
662
|
+
fill?: string | undefined;
|
|
663
|
+
opacity?: number | undefined;
|
|
664
|
+
font?: {
|
|
665
|
+
family?: string | undefined;
|
|
666
|
+
size?: number | undefined;
|
|
667
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
668
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
669
|
+
} | undefined;
|
|
670
|
+
})[] | undefined;
|
|
671
|
+
opacity?: number | undefined;
|
|
672
|
+
font?: {
|
|
673
|
+
family?: string | undefined;
|
|
674
|
+
size?: number | undefined;
|
|
675
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
676
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
677
|
+
} | undefined;
|
|
368
678
|
id?: string | undefined;
|
|
369
679
|
rotate?: number | undefined;
|
|
370
|
-
|
|
680
|
+
align?: "left" | "center" | "right" | undefined;
|
|
681
|
+
lineHeight?: number | undefined;
|
|
682
|
+
fillOpacity?: number | undefined;
|
|
683
|
+
drawOpacity?: number | undefined;
|
|
684
|
+
dashed?: boolean | undefined;
|
|
685
|
+
dotted?: boolean | undefined;
|
|
686
|
+
dashArray?: string | undefined;
|
|
687
|
+
roundedCorners?: number | undefined;
|
|
688
|
+
minimumWidth?: number | undefined;
|
|
689
|
+
minimumHeight?: number | undefined;
|
|
690
|
+
minimumSize?: number | undefined;
|
|
691
|
+
scale?: number | undefined;
|
|
692
|
+
xScale?: number | undefined;
|
|
693
|
+
yScale?: number | undefined;
|
|
694
|
+
textColor?: string | undefined;
|
|
695
|
+
innerXSep?: number | undefined;
|
|
696
|
+
innerYSep?: number | undefined;
|
|
697
|
+
outerSep?: number | undefined;
|
|
371
698
|
padding?: number | undefined;
|
|
372
699
|
margin?: number | undefined;
|
|
373
|
-
fontSize?: number | undefined;
|
|
374
700
|
})[];
|
|
375
701
|
version: 1;
|
|
376
702
|
}, {
|
|
@@ -408,12 +734,46 @@ export declare const SceneSchema: z.ZodObject<{
|
|
|
408
734
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
409
735
|
stroke?: string | undefined;
|
|
410
736
|
strokeWidth?: number | undefined;
|
|
737
|
+
text?: string | (string | {
|
|
738
|
+
text: string;
|
|
739
|
+
fill?: string | undefined;
|
|
740
|
+
opacity?: number | undefined;
|
|
741
|
+
font?: {
|
|
742
|
+
family?: string | undefined;
|
|
743
|
+
size?: number | undefined;
|
|
744
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
745
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
746
|
+
} | undefined;
|
|
747
|
+
})[] | undefined;
|
|
748
|
+
opacity?: number | undefined;
|
|
749
|
+
font?: {
|
|
750
|
+
family?: string | undefined;
|
|
751
|
+
size?: number | undefined;
|
|
752
|
+
weight?: number | "normal" | "bold" | undefined;
|
|
753
|
+
style?: "normal" | "italic" | "oblique" | undefined;
|
|
754
|
+
} | undefined;
|
|
411
755
|
id?: string | undefined;
|
|
412
756
|
rotate?: number | undefined;
|
|
413
|
-
|
|
757
|
+
align?: "left" | "center" | "right" | undefined;
|
|
758
|
+
lineHeight?: number | undefined;
|
|
759
|
+
fillOpacity?: number | undefined;
|
|
760
|
+
drawOpacity?: number | undefined;
|
|
761
|
+
dashed?: boolean | undefined;
|
|
762
|
+
dotted?: boolean | undefined;
|
|
763
|
+
dashArray?: string | undefined;
|
|
764
|
+
roundedCorners?: number | undefined;
|
|
765
|
+
minimumWidth?: number | undefined;
|
|
766
|
+
minimumHeight?: number | undefined;
|
|
767
|
+
minimumSize?: number | undefined;
|
|
768
|
+
scale?: number | undefined;
|
|
769
|
+
xScale?: number | undefined;
|
|
770
|
+
yScale?: number | undefined;
|
|
771
|
+
textColor?: string | undefined;
|
|
772
|
+
innerXSep?: number | undefined;
|
|
773
|
+
innerYSep?: number | undefined;
|
|
774
|
+
outerSep?: number | undefined;
|
|
414
775
|
padding?: number | undefined;
|
|
415
776
|
margin?: number | undefined;
|
|
416
|
-
fontSize?: number | undefined;
|
|
417
777
|
})[];
|
|
418
778
|
version: 1;
|
|
419
779
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../../../src/ir/scene.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../../../src/ir/scene.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIrB,CAAC;AAEJ,gCAAgC;AAChC,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAElD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,MAAM,CAAC;IAChB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ellipse.d.ts","sourceRoot":"","sources":["../../../src/primitive/ellipse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,YAAY;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,WAAW;IACX,EAAE,EAAE,MAAM,CAAC;IACX,WAAW;IACX,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -7,10 +7,14 @@ export type PathPrim = {
|
|
|
7
7
|
d: string;
|
|
8
8
|
/** 填充色;不填表示不填充 */
|
|
9
9
|
fill?: string;
|
|
10
|
+
/** 填充透明度 0~1 */
|
|
11
|
+
fillOpacity?: number;
|
|
10
12
|
/** SVG fill-rule:`nonzero`(默认)/ `evenodd`(环形 / 孔洞场景) */
|
|
11
13
|
fillRule?: 'nonzero' | 'evenodd';
|
|
12
14
|
/** 描边色 */
|
|
13
15
|
stroke?: string;
|
|
16
|
+
/** 描边透明度 0~1(SVG stroke-opacity) */
|
|
17
|
+
strokeOpacity?: number;
|
|
14
18
|
/** 描边宽度 */
|
|
15
19
|
strokeWidth?: number;
|
|
16
20
|
/** SVG stroke-dasharray 模式 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/primitive/path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,mDAAmD;AACnD,MAAM,MAAM,QAAQ,GAAG;IACrB,YAAY;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,UAAU;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW;IACX,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,WAAW;IACX,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAC7C,2BAA2B;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/primitive/path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,mDAAmD;AACnD,MAAM,MAAM,QAAQ,GAAG;IACrB,YAAY;IACZ,IAAI,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,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"rect.d.ts","sourceRoot":"","sources":["../../../src/primitive/rect.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,MAAM,MAAM,QAAQ,GAAG;IACrB,YAAY;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,aAAa;IACb,CAAC,EAAE,MAAM,CAAC;IACV,aAAa;IACb,CAAC,EAAE,MAAM,CAAC;IACV,WAAW;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW;IACX,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1,32 +1,62 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* 行级字段——`<tspan>` 上可独立指定的属性。
|
|
3
|
+
* 块级(TextPrim 顶层)属性是默认值;行级未填字段走块级默认。
|
|
4
|
+
*/
|
|
5
|
+
export type TextLine = {
|
|
6
|
+
/** 行内容(必填) */
|
|
7
|
+
text: string;
|
|
8
|
+
/** 行字号;未填走 TextPrim.fontSize */
|
|
9
|
+
fontSize?: number;
|
|
10
|
+
/** 行字体族;未填走 TextPrim.fontFamily */
|
|
11
|
+
fontFamily?: string;
|
|
12
|
+
/** 行字重;未填走 TextPrim.fontWeight */
|
|
13
|
+
fontWeight?: string | number;
|
|
14
|
+
/** 行字形;未填走 TextPrim.fontStyle */
|
|
15
|
+
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
16
|
+
/** 行颜色;未填走 TextPrim.fill */
|
|
17
|
+
fill?: string;
|
|
18
|
+
/** 行透明度 0~1;未填走 TextPrim.opacity */
|
|
19
|
+
opacity?: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 文本原语;measuredWidth / Height 由 Scene 编译阶段算好,下游直接信任。
|
|
23
|
+
*
|
|
24
|
+
* 多行:`lines` 至少 1 行;renderer 把每行画为 `<tspan>`,按 `lineHeight` 堆叠,
|
|
25
|
+
* 整块根据 `baseline` 在 (x, y) 锚点上下居中 / 顶 / 底对齐。
|
|
26
|
+
*
|
|
27
|
+
* 顶层 `fontSize` / `fontFamily` / `fontWeight` / `fontStyle` / `fill` / `opacity` 是默认值;
|
|
28
|
+
* 单行可在 `TextLine` 上覆盖(仅生效于该行 `<tspan>`)。
|
|
29
|
+
*/
|
|
2
30
|
export type TextPrim = {
|
|
3
31
|
/** 类型判别符 */
|
|
4
32
|
type: 'text';
|
|
5
|
-
/** 锚点横坐标(具体含义由 align
|
|
33
|
+
/** 锚点横坐标(具体含义由 align 决定);多行下作为每行 `<tspan>` 的 x */
|
|
6
34
|
x: number;
|
|
7
35
|
/** 锚点纵坐标(具体含义由 baseline 决定) */
|
|
8
36
|
y: number;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
37
|
+
/** 文本行(至少 1 行);单行节点也用 `[{ text: 'Hello' }]` 形式 */
|
|
38
|
+
lines: Array<TextLine>;
|
|
39
|
+
/** 块级默认字号 */
|
|
12
40
|
fontSize: number;
|
|
13
|
-
/**
|
|
41
|
+
/** 块级默认字体族 */
|
|
14
42
|
fontFamily?: string;
|
|
15
|
-
/**
|
|
43
|
+
/** 块级默认字重 */
|
|
16
44
|
fontWeight?: string | number;
|
|
17
|
-
/**
|
|
18
|
-
fontStyle?: 'normal' | 'italic';
|
|
45
|
+
/** 块级默认字形 */
|
|
46
|
+
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
19
47
|
/** 水平对齐:start / middle / end 锚点位置 */
|
|
20
48
|
align: 'start' | 'middle' | 'end';
|
|
21
49
|
/** 垂直基线对齐方式 */
|
|
22
50
|
baseline: 'top' | 'middle' | 'bottom' | 'alphabetic';
|
|
23
|
-
/**
|
|
51
|
+
/** 行高(user units);多行下相邻 `<tspan>` 的垂直距离 */
|
|
52
|
+
lineHeight: number;
|
|
53
|
+
/** 编译期算好的整块文字宽度(user units,= max line width) */
|
|
24
54
|
measuredWidth: number;
|
|
25
|
-
/**
|
|
55
|
+
/** 编译期算好的整块文字高度(user units,≈ lines × lineHeight) */
|
|
26
56
|
measuredHeight: number;
|
|
27
|
-
/**
|
|
57
|
+
/** 块级默认文字颜色 */
|
|
28
58
|
fill?: string;
|
|
29
|
-
/**
|
|
59
|
+
/** 块级默认透明度 0~1 */
|
|
30
60
|
opacity?: number;
|
|
31
61
|
};
|
|
32
62
|
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/primitive/text.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/primitive/text.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,cAAc;IACd,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,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