@retikz/core 0.1.0-alpha.0 → 0.1.0-alpha.1

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.
Files changed (109) hide show
  1. package/dist/es/compile/index.d.ts +1 -0
  2. package/dist/es/compile/index.d.ts.map +1 -1
  3. package/dist/es/compile/node.d.ts +41 -16
  4. package/dist/es/compile/node.d.ts.map +1 -1
  5. package/dist/es/compile/node.js +168 -28
  6. package/dist/es/compile/parseTarget.d.ts +25 -0
  7. package/dist/es/compile/parseTarget.d.ts.map +1 -0
  8. package/dist/es/compile/parseTarget.js +48 -0
  9. package/dist/es/compile/path.d.ts +17 -7
  10. package/dist/es/compile/path.d.ts.map +1 -1
  11. package/dist/es/compile/path.js +276 -33
  12. package/dist/es/geometry/circle.d.ts +32 -0
  13. package/dist/es/geometry/circle.d.ts.map +1 -0
  14. package/dist/es/geometry/circle.js +79 -0
  15. package/dist/es/geometry/diamond.d.ts +44 -0
  16. package/dist/es/geometry/diamond.d.ts.map +1 -0
  17. package/dist/es/geometry/diamond.js +87 -0
  18. package/dist/es/geometry/ellipse.d.ts +38 -0
  19. package/dist/es/geometry/ellipse.d.ts.map +1 -0
  20. package/dist/es/geometry/ellipse.js +86 -0
  21. package/dist/es/geometry/index.d.ts +3 -0
  22. package/dist/es/geometry/index.d.ts.map +1 -1
  23. package/dist/es/index.d.ts +9 -7
  24. package/dist/es/index.d.ts.map +1 -1
  25. package/dist/es/index.js +8 -4
  26. package/dist/es/ir/node.d.ts +33 -1
  27. package/dist/es/ir/node.d.ts.map +1 -1
  28. package/dist/es/ir/node.js +26 -4
  29. package/dist/es/ir/path/arrow.d.ts +26 -0
  30. package/dist/es/ir/path/arrow.d.ts.map +1 -0
  31. package/dist/es/ir/path/arrow.js +25 -0
  32. package/dist/es/ir/path/index.d.ts +1 -0
  33. package/dist/es/ir/path/index.d.ts.map +1 -1
  34. package/dist/es/ir/path/path.d.ts +60 -0
  35. package/dist/es/ir/path/path.d.ts.map +1 -1
  36. package/dist/es/ir/path/path.js +10 -0
  37. package/dist/es/ir/path/step.d.ts +56 -2
  38. package/dist/es/ir/path/step.d.ts.map +1 -1
  39. package/dist/es/ir/path/step.js +17 -2
  40. package/dist/es/ir/scene.d.ts +162 -0
  41. package/dist/es/ir/scene.d.ts.map +1 -1
  42. package/dist/es/parsers/parseWay.d.ts +56 -10
  43. package/dist/es/parsers/parseWay.d.ts.map +1 -1
  44. package/dist/es/parsers/parseWay.js +68 -6
  45. package/dist/es/primitive/ellipse.d.ts +32 -0
  46. package/dist/es/primitive/ellipse.d.ts.map +1 -0
  47. package/dist/es/primitive/index.d.ts +1 -0
  48. package/dist/es/primitive/index.d.ts.map +1 -1
  49. package/dist/es/primitive/path.d.ts +7 -0
  50. package/dist/es/primitive/path.d.ts.map +1 -1
  51. package/dist/es/primitive/scene.d.ts +2 -1
  52. package/dist/es/primitive/scene.d.ts.map +1 -1
  53. package/dist/es/types.d.ts +3 -0
  54. package/dist/es/types.d.ts.map +1 -0
  55. package/dist/lib/compile/index.d.ts +1 -0
  56. package/dist/lib/compile/index.d.ts.map +1 -1
  57. package/dist/lib/compile/node.cjs +170 -28
  58. package/dist/lib/compile/node.d.ts +41 -16
  59. package/dist/lib/compile/node.d.ts.map +1 -1
  60. package/dist/lib/compile/parseTarget.cjs +48 -0
  61. package/dist/lib/compile/parseTarget.d.ts +25 -0
  62. package/dist/lib/compile/parseTarget.d.ts.map +1 -0
  63. package/dist/lib/compile/path.cjs +275 -32
  64. package/dist/lib/compile/path.d.ts +17 -7
  65. package/dist/lib/compile/path.d.ts.map +1 -1
  66. package/dist/lib/geometry/circle.cjs +79 -0
  67. package/dist/lib/geometry/circle.d.ts +32 -0
  68. package/dist/lib/geometry/circle.d.ts.map +1 -0
  69. package/dist/lib/geometry/diamond.cjs +87 -0
  70. package/dist/lib/geometry/diamond.d.ts +44 -0
  71. package/dist/lib/geometry/diamond.d.ts.map +1 -0
  72. package/dist/lib/geometry/ellipse.cjs +86 -0
  73. package/dist/lib/geometry/ellipse.d.ts +38 -0
  74. package/dist/lib/geometry/ellipse.d.ts.map +1 -0
  75. package/dist/lib/geometry/index.d.ts +3 -0
  76. package/dist/lib/geometry/index.d.ts.map +1 -1
  77. package/dist/lib/index.cjs +12 -0
  78. package/dist/lib/index.d.ts +9 -7
  79. package/dist/lib/index.d.ts.map +1 -1
  80. package/dist/lib/ir/node.cjs +26 -3
  81. package/dist/lib/ir/node.d.ts +33 -1
  82. package/dist/lib/ir/node.d.ts.map +1 -1
  83. package/dist/lib/ir/path/arrow.cjs +25 -0
  84. package/dist/lib/ir/path/arrow.d.ts +26 -0
  85. package/dist/lib/ir/path/arrow.d.ts.map +1 -0
  86. package/dist/lib/ir/path/index.d.ts +1 -0
  87. package/dist/lib/ir/path/index.d.ts.map +1 -1
  88. package/dist/lib/ir/path/path.cjs +10 -0
  89. package/dist/lib/ir/path/path.d.ts +60 -0
  90. package/dist/lib/ir/path/path.d.ts.map +1 -1
  91. package/dist/lib/ir/path/step.cjs +18 -1
  92. package/dist/lib/ir/path/step.d.ts +56 -2
  93. package/dist/lib/ir/path/step.d.ts.map +1 -1
  94. package/dist/lib/ir/scene.d.ts +162 -0
  95. package/dist/lib/ir/scene.d.ts.map +1 -1
  96. package/dist/lib/parsers/parseWay.cjs +68 -5
  97. package/dist/lib/parsers/parseWay.d.ts +56 -10
  98. package/dist/lib/parsers/parseWay.d.ts.map +1 -1
  99. package/dist/lib/primitive/ellipse.d.ts +32 -0
  100. package/dist/lib/primitive/ellipse.d.ts.map +1 -0
  101. package/dist/lib/primitive/index.d.ts +1 -0
  102. package/dist/lib/primitive/index.d.ts.map +1 -1
  103. package/dist/lib/primitive/path.d.ts +7 -0
  104. package/dist/lib/primitive/path.d.ts.map +1 -1
  105. package/dist/lib/primitive/scene.d.ts +2 -1
  106. package/dist/lib/primitive/scene.d.ts.map +1 -1
  107. package/dist/lib/types.d.ts +3 -0
  108. package/dist/lib/types.d.ts.map +1 -0
  109. package/package.json +1 -1
@@ -2,6 +2,12 @@ import { z } from 'zod';
2
2
  export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3
3
  type: z.ZodLiteral<"node">;
4
4
  id: z.ZodOptional<z.ZodString>;
5
+ shape: z.ZodOptional<z.ZodNativeEnum<{
6
+ readonly rectangle: "rectangle";
7
+ readonly circle: "circle";
8
+ readonly ellipse: "ellipse";
9
+ readonly diamond: "diamond";
10
+ }>>;
5
11
  position: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('./position').PolarPosition, z.ZodTypeDef, import('./position').PolarPosition>]>;
6
12
  rotate: z.ZodOptional<z.ZodNumber>;
7
13
  text: z.ZodOptional<z.ZodString>;
@@ -15,6 +21,7 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
15
21
  type: "node";
16
22
  position: [number, number] | import('./position').PolarPosition;
17
23
  fill?: string | undefined;
24
+ shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
18
25
  stroke?: string | undefined;
19
26
  strokeWidth?: number | undefined;
20
27
  id?: string | undefined;
@@ -27,6 +34,7 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
27
34
  type: "node";
28
35
  position: [number, number] | import('./position').PolarPosition;
29
36
  fill?: string | undefined;
37
+ shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
30
38
  stroke?: string | undefined;
31
39
  strokeWidth?: number | undefined;
32
40
  id?: string | undefined;
@@ -40,6 +48,18 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
40
48
  stroke: z.ZodOptional<z.ZodString>;
41
49
  strokeWidth: z.ZodOptional<z.ZodNumber>;
42
50
  strokeDasharray: z.ZodOptional<z.ZodString>;
51
+ arrow: z.ZodOptional<z.ZodEnum<["none", "->", "<-", "<->"]>>;
52
+ arrowShape: z.ZodOptional<z.ZodNativeEnum<{
53
+ readonly normal: "normal";
54
+ readonly open: "open";
55
+ readonly stealth: "stealth";
56
+ readonly diamond: "diamond";
57
+ readonly openDiamond: "openDiamond";
58
+ readonly circle: "circle";
59
+ readonly openCircle: "openCircle";
60
+ }>>;
61
+ fill: z.ZodOptional<z.ZodString>;
62
+ fillRule: z.ZodOptional<z.ZodEnum<["nonzero", "evenodd"]>>;
43
63
  children: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
44
64
  type: z.ZodLiteral<"step">;
45
65
  kind: z.ZodLiteral<"move">;
@@ -64,6 +84,30 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
64
84
  type: "step";
65
85
  kind: "line";
66
86
  to: string | [number, number] | import('./position').PolarPosition;
87
+ }>, z.ZodObject<{
88
+ type: z.ZodLiteral<"step">;
89
+ kind: z.ZodLiteral<"step">;
90
+ via: z.ZodEnum<["-|", "|-"]>;
91
+ to: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('./position').PolarPosition, z.ZodTypeDef, import('./position').PolarPosition>, z.ZodString]>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ type: "step";
94
+ kind: "step";
95
+ to: string | [number, number] | import('./position').PolarPosition;
96
+ via: "-|" | "|-";
97
+ }, {
98
+ type: "step";
99
+ kind: "step";
100
+ to: string | [number, number] | import('./position').PolarPosition;
101
+ via: "-|" | "|-";
102
+ }>, z.ZodObject<{
103
+ type: z.ZodLiteral<"step">;
104
+ kind: z.ZodLiteral<"cycle">;
105
+ }, "strip", z.ZodTypeAny, {
106
+ type: "step";
107
+ kind: "cycle";
108
+ }, {
109
+ type: "step";
110
+ kind: "cycle";
67
111
  }>]>, "many">;
68
112
  }, "strip", z.ZodTypeAny, {
69
113
  type: "path";
@@ -75,10 +119,22 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
75
119
  type: "step";
76
120
  kind: "line";
77
121
  to: string | [number, number] | import('./position').PolarPosition;
122
+ } | {
123
+ type: "step";
124
+ kind: "step";
125
+ to: string | [number, number] | import('./position').PolarPosition;
126
+ via: "-|" | "|-";
127
+ } | {
128
+ type: "step";
129
+ kind: "cycle";
78
130
  })[];
131
+ fill?: string | undefined;
79
132
  stroke?: string | undefined;
80
133
  strokeWidth?: number | undefined;
81
134
  strokeDasharray?: string | undefined;
135
+ arrow?: "none" | "->" | "<-" | "<->" | undefined;
136
+ arrowShape?: "normal" | "open" | "stealth" | "diamond" | "openDiamond" | "circle" | "openCircle" | undefined;
137
+ fillRule?: "nonzero" | "evenodd" | undefined;
82
138
  }, {
83
139
  type: "path";
84
140
  children: ({
@@ -89,10 +145,22 @@ export declare const ChildSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
89
145
  type: "step";
90
146
  kind: "line";
91
147
  to: string | [number, number] | import('./position').PolarPosition;
148
+ } | {
149
+ type: "step";
150
+ kind: "step";
151
+ to: string | [number, number] | import('./position').PolarPosition;
152
+ via: "-|" | "|-";
153
+ } | {
154
+ type: "step";
155
+ kind: "cycle";
92
156
  })[];
157
+ fill?: string | undefined;
93
158
  stroke?: string | undefined;
94
159
  strokeWidth?: number | undefined;
95
160
  strokeDasharray?: string | undefined;
161
+ arrow?: "none" | "->" | "<-" | "<->" | undefined;
162
+ arrowShape?: "normal" | "open" | "stealth" | "diamond" | "openDiamond" | "circle" | "openCircle" | undefined;
163
+ fillRule?: "nonzero" | "evenodd" | undefined;
96
164
  }>]>;
97
165
  /** 顶层 Scene 的子节点:node 或 path */
98
166
  export type IRChild = z.infer<typeof ChildSchema>;
@@ -102,6 +170,12 @@ export declare const SceneSchema: z.ZodObject<{
102
170
  children: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
103
171
  type: z.ZodLiteral<"node">;
104
172
  id: z.ZodOptional<z.ZodString>;
173
+ shape: z.ZodOptional<z.ZodNativeEnum<{
174
+ readonly rectangle: "rectangle";
175
+ readonly circle: "circle";
176
+ readonly ellipse: "ellipse";
177
+ readonly diamond: "diamond";
178
+ }>>;
105
179
  position: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('./position').PolarPosition, z.ZodTypeDef, import('./position').PolarPosition>]>;
106
180
  rotate: z.ZodOptional<z.ZodNumber>;
107
181
  text: z.ZodOptional<z.ZodString>;
@@ -115,6 +189,7 @@ export declare const SceneSchema: z.ZodObject<{
115
189
  type: "node";
116
190
  position: [number, number] | import('./position').PolarPosition;
117
191
  fill?: string | undefined;
192
+ shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
118
193
  stroke?: string | undefined;
119
194
  strokeWidth?: number | undefined;
120
195
  id?: string | undefined;
@@ -127,6 +202,7 @@ export declare const SceneSchema: z.ZodObject<{
127
202
  type: "node";
128
203
  position: [number, number] | import('./position').PolarPosition;
129
204
  fill?: string | undefined;
205
+ shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
130
206
  stroke?: string | undefined;
131
207
  strokeWidth?: number | undefined;
132
208
  id?: string | undefined;
@@ -140,6 +216,18 @@ export declare const SceneSchema: z.ZodObject<{
140
216
  stroke: z.ZodOptional<z.ZodString>;
141
217
  strokeWidth: z.ZodOptional<z.ZodNumber>;
142
218
  strokeDasharray: z.ZodOptional<z.ZodString>;
219
+ arrow: z.ZodOptional<z.ZodEnum<["none", "->", "<-", "<->"]>>;
220
+ arrowShape: z.ZodOptional<z.ZodNativeEnum<{
221
+ readonly normal: "normal";
222
+ readonly open: "open";
223
+ readonly stealth: "stealth";
224
+ readonly diamond: "diamond";
225
+ readonly openDiamond: "openDiamond";
226
+ readonly circle: "circle";
227
+ readonly openCircle: "openCircle";
228
+ }>>;
229
+ fill: z.ZodOptional<z.ZodString>;
230
+ fillRule: z.ZodOptional<z.ZodEnum<["nonzero", "evenodd"]>>;
143
231
  children: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
144
232
  type: z.ZodLiteral<"step">;
145
233
  kind: z.ZodLiteral<"move">;
@@ -164,6 +252,30 @@ export declare const SceneSchema: z.ZodObject<{
164
252
  type: "step";
165
253
  kind: "line";
166
254
  to: string | [number, number] | import('./position').PolarPosition;
255
+ }>, z.ZodObject<{
256
+ type: z.ZodLiteral<"step">;
257
+ kind: z.ZodLiteral<"step">;
258
+ via: z.ZodEnum<["-|", "|-"]>;
259
+ to: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('./position').PolarPosition, z.ZodTypeDef, import('./position').PolarPosition>, z.ZodString]>;
260
+ }, "strip", z.ZodTypeAny, {
261
+ type: "step";
262
+ kind: "step";
263
+ to: string | [number, number] | import('./position').PolarPosition;
264
+ via: "-|" | "|-";
265
+ }, {
266
+ type: "step";
267
+ kind: "step";
268
+ to: string | [number, number] | import('./position').PolarPosition;
269
+ via: "-|" | "|-";
270
+ }>, z.ZodObject<{
271
+ type: z.ZodLiteral<"step">;
272
+ kind: z.ZodLiteral<"cycle">;
273
+ }, "strip", z.ZodTypeAny, {
274
+ type: "step";
275
+ kind: "cycle";
276
+ }, {
277
+ type: "step";
278
+ kind: "cycle";
167
279
  }>]>, "many">;
168
280
  }, "strip", z.ZodTypeAny, {
169
281
  type: "path";
@@ -175,10 +287,22 @@ export declare const SceneSchema: z.ZodObject<{
175
287
  type: "step";
176
288
  kind: "line";
177
289
  to: string | [number, number] | import('./position').PolarPosition;
290
+ } | {
291
+ type: "step";
292
+ kind: "step";
293
+ to: string | [number, number] | import('./position').PolarPosition;
294
+ via: "-|" | "|-";
295
+ } | {
296
+ type: "step";
297
+ kind: "cycle";
178
298
  })[];
299
+ fill?: string | undefined;
179
300
  stroke?: string | undefined;
180
301
  strokeWidth?: number | undefined;
181
302
  strokeDasharray?: string | undefined;
303
+ arrow?: "none" | "->" | "<-" | "<->" | undefined;
304
+ arrowShape?: "normal" | "open" | "stealth" | "diamond" | "openDiamond" | "circle" | "openCircle" | undefined;
305
+ fillRule?: "nonzero" | "evenodd" | undefined;
182
306
  }, {
183
307
  type: "path";
184
308
  children: ({
@@ -189,10 +313,22 @@ export declare const SceneSchema: z.ZodObject<{
189
313
  type: "step";
190
314
  kind: "line";
191
315
  to: string | [number, number] | import('./position').PolarPosition;
316
+ } | {
317
+ type: "step";
318
+ kind: "step";
319
+ to: string | [number, number] | import('./position').PolarPosition;
320
+ via: "-|" | "|-";
321
+ } | {
322
+ type: "step";
323
+ kind: "cycle";
192
324
  })[];
325
+ fill?: string | undefined;
193
326
  stroke?: string | undefined;
194
327
  strokeWidth?: number | undefined;
195
328
  strokeDasharray?: string | undefined;
329
+ arrow?: "none" | "->" | "<-" | "<->" | undefined;
330
+ arrowShape?: "normal" | "open" | "stealth" | "diamond" | "openDiamond" | "circle" | "openCircle" | undefined;
331
+ fillRule?: "nonzero" | "evenodd" | undefined;
196
332
  }>]>, "many">;
197
333
  }, "strip", z.ZodTypeAny, {
198
334
  type: "scene";
@@ -206,14 +342,27 @@ export declare const SceneSchema: z.ZodObject<{
206
342
  type: "step";
207
343
  kind: "line";
208
344
  to: string | [number, number] | import('./position').PolarPosition;
345
+ } | {
346
+ type: "step";
347
+ kind: "step";
348
+ to: string | [number, number] | import('./position').PolarPosition;
349
+ via: "-|" | "|-";
350
+ } | {
351
+ type: "step";
352
+ kind: "cycle";
209
353
  })[];
354
+ fill?: string | undefined;
210
355
  stroke?: string | undefined;
211
356
  strokeWidth?: number | undefined;
212
357
  strokeDasharray?: string | undefined;
358
+ arrow?: "none" | "->" | "<-" | "<->" | undefined;
359
+ arrowShape?: "normal" | "open" | "stealth" | "diamond" | "openDiamond" | "circle" | "openCircle" | undefined;
360
+ fillRule?: "nonzero" | "evenodd" | undefined;
213
361
  } | {
214
362
  type: "node";
215
363
  position: [number, number] | import('./position').PolarPosition;
216
364
  fill?: string | undefined;
365
+ shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
217
366
  stroke?: string | undefined;
218
367
  strokeWidth?: number | undefined;
219
368
  id?: string | undefined;
@@ -236,14 +385,27 @@ export declare const SceneSchema: z.ZodObject<{
236
385
  type: "step";
237
386
  kind: "line";
238
387
  to: string | [number, number] | import('./position').PolarPosition;
388
+ } | {
389
+ type: "step";
390
+ kind: "step";
391
+ to: string | [number, number] | import('./position').PolarPosition;
392
+ via: "-|" | "|-";
393
+ } | {
394
+ type: "step";
395
+ kind: "cycle";
239
396
  })[];
397
+ fill?: string | undefined;
240
398
  stroke?: string | undefined;
241
399
  strokeWidth?: number | undefined;
242
400
  strokeDasharray?: string | undefined;
401
+ arrow?: "none" | "->" | "<-" | "<->" | undefined;
402
+ arrowShape?: "normal" | "open" | "stealth" | "diamond" | "openDiamond" | "circle" | "openCircle" | undefined;
403
+ fillRule?: "nonzero" | "evenodd" | undefined;
243
404
  } | {
244
405
  type: "node";
245
406
  position: [number, number] | import('./position').PolarPosition;
246
407
  fill?: string | undefined;
408
+ shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
247
409
  stroke?: string | undefined;
248
410
  strokeWidth?: number | undefined;
249
411
  id?: string | undefined;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIrB,CAAC;AAEJ,gCAAgC;AAChC,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAElD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBrB,CAAC;AAEJ,4CAA4C;AAC5C,MAAM,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAE7C,qCAAqC;AACrC,eAAO,MAAM,kBAAkB,EAAG,CAAU,CAAC"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBrB,CAAC;AAEJ,4CAA4C;AAC5C,MAAM,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAE7C,qCAAqC;AACrC,eAAO,MAAM,kBAAkB,EAAG,CAAU,CAAC"}
@@ -1,25 +1,71 @@
1
1
  import { IRStep, IRTarget } from '../ir';
2
+ /**
3
+ * Sugar 层 way 数组的"关键字常量"。
4
+ *
5
+ * - `DrawWay.cycle`:闭合到 way 起点(way 元素位置)。**底层字符串故意取得很丑**
6
+ * (`'retikz-keyword_cycle'`),保证不会与任何合理的节点 id 冲突;用户应当
7
+ * 只通过 `DrawWay.cycle` 引用,不要直接写裸字面量。
8
+ * - `DrawWay.hv`:折角算子,先水平后垂直(裸字面量 `'-|'`)。
9
+ * - `DrawWay.vh`:折角算子,先垂直后水平(裸字面量 `'|-'`)。
10
+ *
11
+ * 折角值(`-|` / `|-`)含特殊字符,与节点 id 不会冲突,因此**保留字面量与
12
+ * 常量两种写法都合法**。way 数组里直接放 `'-|'` 或 `'|-'`(infix 算子)
13
+ * 即把"上一项 → 下一项"那一段改成折角。
14
+ *
15
+ * 这里**故意不用 TS enum**——enum 在数值场景下生成 reverse-mapping 表、
16
+ * 在 string 场景下与字面量类型不互通,而 const + `as const` 的字面量联合
17
+ * 既可枚举也可与字面量字符串无缝混用。
18
+ */
19
+ export declare const DrawWay: {
20
+ /**
21
+ * 闭合 way 到起点,等价于 `<Step kind="cycle" />`(TikZ 同名保留字 / SVG `Z`)。
22
+ * 底层字符串值刻意写丑以避开节点 id 冲突;不要硬编码这个字符串。
23
+ */
24
+ readonly cycle: "retikz-keyword_cycle";
25
+ /** 折角:先水平后垂直(TikZ `-|`) */
26
+ readonly hv: "-|";
27
+ /** 折角:先垂直后水平(TikZ `|-`) */
28
+ readonly vh: "|-";
29
+ };
30
+ /**
31
+ * way 折角算子的字面量类型。`DrawWay.hv` / `DrawWay.vh` 与裸字面量等价。
32
+ */
33
+ export type WayVia = typeof DrawWay.hv | typeof DrawWay.vh;
34
+ /**
35
+ * way 闭合关键字的字面量类型,由 `DrawWay.cycle` 派生。
36
+ */
37
+ export type WayCycle = typeof DrawWay.cycle;
2
38
  /**
3
39
  * Sugar 层的 way 数组 DSL 元素。
4
40
  *
5
- * v0.1.0-alpha 接受三种形态(与 `IRTarget` 等价):
6
- * - 节点 id 字符串:`'A'`
7
- * - 直接笛卡尔坐标:`[x, y]`
8
- * - 极坐标:`{ origin?, angle, radius }`
41
+ * v0.1.0-alpha.1 接受五种形态:
42
+ * - 节点 id 字符串:`'A'` → line(首项时为 move)
43
+ * - 笛卡尔坐标:`[x, y]` → line
44
+ * - 极坐标:`{ origin?, angle, radius }` → line
45
+ * - 折角算子:`'-|'` / `'|-'`(或 `DrawWay.hv` / `DrawWay.vh`)→ 当前项 +
46
+ * **下一项**合并成一个折角 step(与 TikZ 的 `(A) -| (B)` infix 写法对齐)
47
+ * - 闭合关键字:`DrawWay.cycle` → cycle(闭合到起点)
9
48
  *
10
- * 后续会加:折角对象(`{ via: '-|' }`)、相对位移(`{ rel: [x, y] }`)、
11
- * curve / cubic / 'close' 等——届时 WayItem 与 IRTarget 才会出现真正分歧。
49
+ * 后续会加:相对位移(`{ rel: [x, y] }`)、curve / cubic 等。
50
+ *
51
+ * 注意:闭合刻意只走 `DrawWay.cycle`(底层字符串是 `'retikz-keyword_cycle'`),
52
+ * 这样裸字符串 `'cycle'` 仍可作为正常节点 id 使用。
12
53
  */
13
- export type WayItem = IRTarget;
54
+ export type WayItem = IRTarget | WayVia | WayCycle;
14
55
  /** way DSL 数组:sugar `<Draw way={...}>` 接受的输入形态 */
15
56
  export type WayDSL = Array<WayItem>;
16
57
  /**
17
58
  * 把 way 数组翻译为 IRStep 序列。
18
- * 第一个元素永远是 move;之后的默认是 line。
19
59
  *
20
- * 这是纯函数,住在 core,被各框架 adapter Sugar 组件复用。
60
+ * - 第一个元素始终是 move:取 way[0] 的目标点;若 way[0] 是 cycle / via 算子等
61
+ * 非 target 项,则降级到原点 `[0, 0]`(容错)。
62
+ * - 后续元素:
63
+ * - 普通 target → line
64
+ * - `DrawWay.cycle` → cycle 步
65
+ * - `'-|'` / `'|-'` → 与**下一项**合并成 fold 步;操作符在 way 末尾或后
66
+ * 接非 target 项时抛错
21
67
  *
22
- * 类型校验由 TS 编译期完成;本函数不做运行时类型守卫。
68
+ * 这是纯函数,住在 core,被各框架 adapter 的 Sugar 组件复用。
23
69
  */
24
70
  export declare const parseWay: (way: WayDSL) => Array<IRStep>;
25
71
  //# sourceMappingURL=parseWay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseWay.d.ts","sourceRoot":"","sources":["../../../src/parsers/parseWay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA0B,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC;AAE/B,kDAAkD;AAClD,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,KAAK,CAAC,MAAM,CAYlD,CAAA"}
1
+ {"version":3,"file":"parseWay.d.ts","sourceRoot":"","sources":["../../../src/parsers/parseWay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;IAClB;;;OAGG;;IAEH,2BAA2B;;IAE3B,2BAA2B;;CAEnB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,OAAO,CAAC,EAAE,GAAG,OAAO,OAAO,CAAC,EAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,OAAO,CAAC,KAAK,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnD,kDAAkD;AAClD,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAapC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,KAAK,CAAC,MAAM,CAoClD,CAAC"}
@@ -1,11 +1,51 @@
1
1
  //#region src/parsers/parseWay.ts
2
2
  /**
3
+ * Sugar 层 way 数组的"关键字常量"。
4
+ *
5
+ * - `DrawWay.cycle`:闭合到 way 起点(way 元素位置)。**底层字符串故意取得很丑**
6
+ * (`'retikz-keyword_cycle'`),保证不会与任何合理的节点 id 冲突;用户应当
7
+ * 只通过 `DrawWay.cycle` 引用,不要直接写裸字面量。
8
+ * - `DrawWay.hv`:折角算子,先水平后垂直(裸字面量 `'-|'`)。
9
+ * - `DrawWay.vh`:折角算子,先垂直后水平(裸字面量 `'|-'`)。
10
+ *
11
+ * 折角值(`-|` / `|-`)含特殊字符,与节点 id 不会冲突,因此**保留字面量与
12
+ * 常量两种写法都合法**。way 数组里直接放 `'-|'` 或 `'|-'`(infix 算子)
13
+ * 即把"上一项 → 下一项"那一段改成折角。
14
+ *
15
+ * 这里**故意不用 TS enum**——enum 在数值场景下生成 reverse-mapping 表、
16
+ * 在 string 场景下与字面量类型不互通,而 const + `as const` 的字面量联合
17
+ * 既可枚举也可与字面量字符串无缝混用。
18
+ */
19
+ var DrawWay = {
20
+ /**
21
+ * 闭合 way 到起点,等价于 `<Step kind="cycle" />`(TikZ 同名保留字 / SVG `Z`)。
22
+ * 底层字符串值刻意写丑以避开节点 id 冲突;不要硬编码这个字符串。
23
+ */
24
+ cycle: "retikz-keyword_cycle",
25
+ /** 折角:先水平后垂直(TikZ `-|`) */
26
+ hv: "-|",
27
+ /** 折角:先垂直后水平(TikZ `|-`) */
28
+ vh: "|-"
29
+ };
30
+ var isWayCycle = (item) => item === DrawWay.cycle;
31
+ var isWayVia = (item) => item === DrawWay.hv || item === DrawWay.vh;
32
+ /** 把 WayItem 归约为它的"目标点"——target 直接返回;算子/关键字返回 null */
33
+ var targetOf = (item) => {
34
+ if (isWayCycle(item) || isWayVia(item)) return null;
35
+ return item;
36
+ };
37
+ /**
3
38
  * 把 way 数组翻译为 IRStep 序列。
4
- * 第一个元素永远是 move;之后的默认是 line。
5
39
  *
6
- * 这是纯函数,住在 core,被各框架 adapter Sugar 组件复用。
40
+ * - 第一个元素始终是 move:取 way[0] 的目标点;若 way[0] 是 cycle / via 算子等
41
+ * 非 target 项,则降级到原点 `[0, 0]`(容错)。
42
+ * - 后续元素:
43
+ * - 普通 target → line
44
+ * - `DrawWay.cycle` → cycle 步
45
+ * - `'-|'` / `'|-'` → 与**下一项**合并成 fold 步;操作符在 way 末尾或后
46
+ * 接非 target 项时抛错
7
47
  *
8
- * 类型校验由 TS 编译期完成;本函数不做运行时类型守卫。
48
+ * 这是纯函数,住在 core,被各框架 adapter 的 Sugar 组件复用。
9
49
  */
10
50
  var parseWay = (way) => {
11
51
  if (way.length < 2) throw new Error("parseWay: way must contain at least 2 items");
@@ -13,18 +53,40 @@ var parseWay = (way) => {
13
53
  const moveStep = {
14
54
  type: "step",
15
55
  kind: "move",
16
- to: way[0]
56
+ to: targetOf(way[0]) ?? [0, 0]
17
57
  };
18
58
  out.push(moveStep);
19
59
  for (let i = 1; i < way.length; i++) {
60
+ const item = way[i];
61
+ if (isWayCycle(item)) {
62
+ out.push({
63
+ type: "step",
64
+ kind: "cycle"
65
+ });
66
+ continue;
67
+ }
68
+ if (isWayVia(item)) {
69
+ if (i + 1 >= way.length) throw new Error(`parseWay: via operator '${item}' at end of way must be followed by a target`);
70
+ const next = way[i + 1];
71
+ if (isWayCycle(next) || isWayVia(next)) throw new Error(`parseWay: via operator '${item}' must be followed by a target, got '${String(next)}'`);
72
+ const fold = {
73
+ type: "step",
74
+ kind: "step",
75
+ via: item,
76
+ to: next
77
+ };
78
+ out.push(fold);
79
+ i++;
80
+ continue;
81
+ }
20
82
  const lineStep = {
21
83
  type: "step",
22
84
  kind: "line",
23
- to: way[i]
85
+ to: item
24
86
  };
25
87
  out.push(lineStep);
26
88
  }
27
89
  return out;
28
90
  };
29
91
  //#endregion
30
- export { parseWay };
92
+ export { DrawWay, parseWay };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 椭圆原语:SVG `<ellipse>` 直对应。
3
+ * 圆形(半长轴 = 半短轴)用同一个 EllipsePrim 表示,让 renderer 单一 case 处理。
4
+ * 旋转走 `rotate` 字段(度数,绕中心);非零时 renderer 用 SVG transform 包裹。
5
+ */
6
+ export type EllipsePrim = {
7
+ /** 类型判别符 */
8
+ type: 'ellipse';
9
+ /** 中心横坐标 */
10
+ cx: number;
11
+ /** 中心纵坐标 */
12
+ cy: number;
13
+ /** 水平半轴 */
14
+ rx: number;
15
+ /** 垂直半轴 */
16
+ ry: number;
17
+ /** 绕中心的旋转角(度数,与 RectPrim 风格一致);省略或 0 不旋转 */
18
+ rotate?: number;
19
+ /** 填充色 */
20
+ fill?: string;
21
+ /** 填充透明度 0~1 */
22
+ fillOpacity?: number;
23
+ /** 描边色 */
24
+ stroke?: string;
25
+ /** 描边宽度 */
26
+ strokeWidth?: number;
27
+ /** SVG stroke-dasharray 模式 */
28
+ strokeDasharray?: string;
29
+ /** 整体透明度 0~1 */
30
+ opacity?: number;
31
+ };
32
+ //# sourceMappingURL=ellipse.d.ts.map
@@ -0,0 +1 @@
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,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,4 +1,5 @@
1
1
  export * from './rect';
2
+ export * from './ellipse';
2
3
  export * from './text';
3
4
  export * from './path';
4
5
  export * from './group';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitive/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitive/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { ArrowShape } from '../ir/path/arrow';
1
2
  /** 路径原语:SVG path d 字符串;Canvas/PDF renderer 自行解析 */
2
3
  export type PathPrim = {
3
4
  /** 类型判别符 */
@@ -6,6 +7,8 @@ export type PathPrim = {
6
7
  d: string;
7
8
  /** 填充色;不填表示不填充 */
8
9
  fill?: string;
10
+ /** SVG fill-rule:`nonzero`(默认)/ `evenodd`(环形 / 孔洞场景) */
11
+ fillRule?: 'nonzero' | 'evenodd';
9
12
  /** 描边色 */
10
13
  stroke?: string;
11
14
  /** 描边宽度 */
@@ -16,6 +19,10 @@ export type PathPrim = {
16
19
  strokeLinecap?: 'butt' | 'round' | 'square';
17
20
  /** 拐点形状 */
18
21
  strokeLinejoin?: 'miter' | 'round' | 'bevel';
22
+ /** 起点箭头形状;undefined = 无 */
23
+ arrowStart?: ArrowShape;
24
+ /** 终点箭头形状;undefined = 无 */
25
+ arrowEnd?: ArrowShape;
19
26
  /** 整体透明度 0~1 */
20
27
  opacity?: number;
21
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/primitive/path.ts"],"names":[],"mappings":"AAAA,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,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,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,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,3 +1,4 @@
1
+ import { EllipsePrim } from './ellipse';
1
2
  import { GroupPrim } from './group';
2
3
  import { PathPrim } from './path';
3
4
  import { RectPrim } from './rect';
@@ -9,7 +10,7 @@ import { ViewBox } from './view-box';
9
10
  *
10
11
  * 不允许出现 SVG-only 或 Canvas-only 特性(filter、marker、imageData 等)。
11
12
  */
12
- export type ScenePrimitive = RectPrim | TextPrim | PathPrim | GroupPrim;
13
+ export type ScenePrimitive = RectPrim | EllipsePrim | TextPrim | PathPrim | GroupPrim;
13
14
  /** 场景:渲染目标无关的"已布局好的图元集合 + viewBox" */
14
15
  export type Scene = {
15
16
  /** 已布局好的图元数组,按渲染顺序排列 */
@@ -1 +1 @@
1
- {"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../../../src/primitive/scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExE,sCAAsC;AACtC,MAAM,MAAM,KAAK,GAAG;IAClB,wBAAwB;IACxB,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAClC,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../../../src/primitive/scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtF,sCAAsC;AACtC,MAAM,MAAM,KAAK,GAAG;IAClB,wBAAwB;IACxB,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAClC,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** 获取对象所有值的联合类型,等价于 (typeof T)[keyof typeof T] */
2
+ export type ValueOf<T extends object> = T[keyof T];
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './compile';
2
2
  export * from './node';
3
+ export * from './parseTarget';
3
4
  export * from './path';
4
5
  export * from './position';
5
6
  export * from './precision';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compile/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compile/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}