@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.
Files changed (43) hide show
  1. package/dist/es/compile/node.d.ts +32 -6
  2. package/dist/es/compile/node.d.ts.map +1 -1
  3. package/dist/es/compile/node.js +112 -28
  4. package/dist/es/compile/text-metrics.d.ts +2 -2
  5. package/dist/es/compile/text-metrics.d.ts.map +1 -1
  6. package/dist/es/index.d.ts +4 -4
  7. package/dist/es/index.d.ts.map +1 -1
  8. package/dist/es/index.js +2 -2
  9. package/dist/es/ir/node.d.ts +286 -6
  10. package/dist/es/ir/node.d.ts.map +1 -1
  11. package/dist/es/ir/node.js +71 -5
  12. package/dist/es/ir/scene.d.ts +376 -16
  13. package/dist/es/ir/scene.d.ts.map +1 -1
  14. package/dist/es/primitive/ellipse.d.ts +2 -0
  15. package/dist/es/primitive/ellipse.d.ts.map +1 -1
  16. package/dist/es/primitive/path.d.ts +4 -0
  17. package/dist/es/primitive/path.d.ts.map +1 -1
  18. package/dist/es/primitive/rect.d.ts +2 -0
  19. package/dist/es/primitive/rect.d.ts.map +1 -1
  20. package/dist/es/primitive/text.d.ts +43 -13
  21. package/dist/es/primitive/text.d.ts.map +1 -1
  22. package/dist/lib/compile/node.cjs +112 -28
  23. package/dist/lib/compile/node.d.ts +32 -6
  24. package/dist/lib/compile/node.d.ts.map +1 -1
  25. package/dist/lib/compile/text-metrics.d.ts +2 -2
  26. package/dist/lib/compile/text-metrics.d.ts.map +1 -1
  27. package/dist/lib/index.cjs +4 -0
  28. package/dist/lib/index.d.ts +4 -4
  29. package/dist/lib/index.d.ts.map +1 -1
  30. package/dist/lib/ir/node.cjs +74 -4
  31. package/dist/lib/ir/node.d.ts +286 -6
  32. package/dist/lib/ir/node.d.ts.map +1 -1
  33. package/dist/lib/ir/scene.d.ts +376 -16
  34. package/dist/lib/ir/scene.d.ts.map +1 -1
  35. package/dist/lib/primitive/ellipse.d.ts +2 -0
  36. package/dist/lib/primitive/ellipse.d.ts.map +1 -1
  37. package/dist/lib/primitive/path.d.ts +4 -0
  38. package/dist/lib/primitive/path.d.ts.map +1 -1
  39. package/dist/lib/primitive/rect.d.ts +2 -0
  40. package/dist/lib/primitive/rect.d.ts.map +1 -1
  41. package/dist/lib/primitive/text.d.ts +43 -13
  42. package/dist/lib/primitive/text.d.ts.map +1 -1
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/ir/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,mCAAmC;AACnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuEpB,CAAC;AAEJ,4CAA4C;AAC5C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/ir/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,mCAAmC;AACnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;EAwBpB,CAAC;AAEJ,oCAAoC;AACpC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEhD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsBxB,CAAC;AAEJ,4BAA4B;AAC5B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAIxB,CAAC;AAEJ,yCAAyC;AACzC,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,kBAAkB;AAClB,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyKpB,CAAC;AAEJ,4CAA4C;AAC5C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -23,19 +23,85 @@ var NODE_SHAPES = {
23
23
  ellipse: "ellipse",
24
24
  diamond: "diamond"
25
25
  };
26
+ /**
27
+ * 节点字体规格——family / size / weight / style 全部可选;
28
+ * 单字段透传到 SVG `<text>` 的 `font-*` 属性 / `font-size`。
29
+ *
30
+ * 取代 alpha.1 的标量 `fontSize` 字段(已删)。
31
+ */
32
+ var FontSchema = z.object({
33
+ family: z.string().optional().describe("CSS font-family string, e.g. \"serif\", \"monospace\", \"Inter, sans-serif\""),
34
+ size: z.number().positive().optional().describe("Font size in user units; falls back to the renderer default when omitted"),
35
+ weight: z.union([z.enum(["normal", "bold"]), z.number()]).optional().describe("CSS font-weight: keyword `normal` / `bold` or numeric 100..900"),
36
+ style: z.enum([
37
+ "normal",
38
+ "italic",
39
+ "oblique"
40
+ ]).optional().describe("CSS font-style")
41
+ }).describe("Font properties for the node text label; all fields optional, nested object form (replaces the alpha.1 `fontSize` scalar).");
42
+ /**
43
+ * 单行文本规格——纯字符串走块级默认样式;对象形式可对该行覆盖 fill / opacity / font。
44
+ *
45
+ * 行级覆盖只生效于本行的 `<tspan>`:
46
+ * - `fill`:仅这一行颜色
47
+ * - `opacity`:仅这一行 0~1 透明度
48
+ * - `font`:family / size / weight / style 任意子集;未填字段继承块级 font
49
+ *
50
+ * 块级 `align` / `lineHeight` 不可被行覆盖(多行块整体属性)。
51
+ */
52
+ var LineSpecSchema = z.union([z.string(), z.object({
53
+ text: z.string().describe("Line content"),
54
+ fill: z.string().optional().describe("Per-line text color; overrides block default"),
55
+ opacity: z.number().min(0).max(1).optional().describe("Per-line opacity 0..1"),
56
+ font: FontSchema.optional().describe("Per-line font overrides; missing fields inherit from block-level `font`")
57
+ })]).describe("Single line of text: bare string for default styling, or an object with per-line `fill` / `opacity` / `font` overrides.");
58
+ /**
59
+ * 节点文本——单行字符串或非空多行数组(每元素一个 LineSpec):
60
+ * - `'Hello'` 等价于 `[{ text: 'Hello' }]`,按一行渲染
61
+ * - `['Line 1', 'Line 2']` 两行无样式覆盖
62
+ * - `[{ text: 'Heading', fill: 'red', font: { weight: 'bold' } }, 'body']` 混排
63
+ *
64
+ * 选 `Array<LineSpec>` 而非 `'\n'` 字符串:JSON 友好(无 escape);行级覆盖天然落字段。
65
+ */
66
+ var NodeTextSchema = z.union([z.string(), z.array(LineSpecSchema).min(1)]).describe("Text label rendered inside the node: a single string for one line, or a non-empty array of line specs (string for default, object for per-line overrides).");
67
+ /** 节点文本对齐(多行内文本对齐)——TikZ `align=` 同义词 */
68
+ var NODE_TEXT_ALIGNS = {
69
+ left: "left",
70
+ center: "center",
71
+ right: "right"
72
+ };
26
73
  var NodeSchema = z.object({
27
74
  type: z.literal("node").describe("Discriminator marking this child as a node"),
28
75
  id: z.string().min(1).optional().describe("Optional unique id; required if any path needs to reference this node by string"),
29
76
  shape: z.nativeEnum(NODE_SHAPES).optional().describe("Node visual shape; defaults to `rectangle`. The boundary fully contains text + padding (circumscribed for circle / ellipse / diamond)."),
30
77
  position: z.union([PositionSchema, PolarPositionSchema]).describe("Center point of the node content box; Cartesian [x, y] or polar (resolved at compile time)"),
31
78
  rotate: z.number().optional().describe("Rotation in degrees around the node center; positive = clockwise (matches TikZ rotate=...)"),
32
- text: z.string().optional().describe("Text label rendered inside the node; omit for an empty node"),
79
+ text: NodeTextSchema.optional(),
80
+ align: z.nativeEnum(NODE_TEXT_ALIGNS).optional().describe("Multi-line text alignment within the text block; `left` / `center` / `right`. Defaults to `center` (matches TikZ)."),
81
+ lineHeight: z.number().positive().optional().describe("Line height in user units; falls back to `font.size × 1.2` when omitted."),
33
82
  fill: z.string().optional().describe("Background color of the node shape; any CSS color (e.g. \"lightblue\", \"#fafafa\", \"rgba(...)\")"),
83
+ fillOpacity: z.number().min(0).max(1).optional().describe("Fill opacity 0..1; affects only the shape fill, leaves stroke / text alone."),
34
84
  stroke: z.string().optional().describe("Border color of the node shape; any CSS color. Defaults to currentColor when omitted"),
85
+ drawOpacity: z.number().min(0).max(1).optional().describe("Stroke opacity 0..1 (TikZ `draw opacity`); affects only the border."),
35
86
  strokeWidth: z.number().optional().describe("Border width in user units; defaults to 1 when omitted"),
36
- padding: z.number().optional().describe("Inner padding in user units between the text content and the node border"),
37
- margin: z.number().nonnegative().optional().describe("Outer margin in user units: distance between the visual border and where paths attach. Lines stop this far from the border. Defaults to 0."),
38
- fontSize: z.number().optional().describe("Text font size in user units; defaults to a fixed size for now (TikZ font sizes will be supported later)")
87
+ dashed: z.boolean().optional().describe("Border style preset: dashed line (TikZ `dashed`); compiled to a default dash pattern. `dashArray` takes precedence."),
88
+ dotted: z.boolean().optional().describe("Border style preset: dotted line (TikZ `dotted`); compiled to a default dot pattern. `dashArray` and `dashed` take precedence."),
89
+ dashArray: z.string().optional().describe("Explicit SVG stroke-dasharray value (e.g. \"4 2\"); overrides `dashed` / `dotted`."),
90
+ roundedCorners: z.number().nonnegative().optional().describe("Corner radius in user units; only effective on `rectangle` shape (rx / ry on `<rect>`)."),
91
+ minimumWidth: z.number().nonnegative().optional().describe("Minimum visual border width in user units; floors the bounding box width."),
92
+ minimumHeight: z.number().nonnegative().optional().describe("Minimum visual border height in user units; floors the bounding box height."),
93
+ minimumSize: z.number().nonnegative().optional().describe("Symmetric alias for `minimumWidth` + `minimumHeight`; axis-specific fields take precedence."),
94
+ scale: z.number().positive().optional().describe("Uniform scale factor; multiplies all node dimensions (border, padding, text, fontSize) at layout time. Affects path attachment positions."),
95
+ xScale: z.number().positive().optional().describe("Horizontal scale factor; overrides `scale` for the X axis."),
96
+ yScale: z.number().positive().optional().describe("Vertical scale factor; overrides `scale` for the Y axis."),
97
+ textColor: z.string().optional().describe("Text label color; any CSS color. Defaults to `currentColor`."),
98
+ opacity: z.number().min(0).max(1).optional().describe("Whole-node opacity 0..1; applies uniformly to shape and text."),
99
+ innerXSep: z.number().nonnegative().optional().describe("Inner horizontal padding from text to border in user units. Falls back to `padding` then default."),
100
+ innerYSep: z.number().nonnegative().optional().describe("Inner vertical padding from text to border in user units. Falls back to `padding` then default."),
101
+ outerSep: z.number().nonnegative().optional().describe("Outer margin from border to path attachment point in user units; does NOT change the visible border. Falls back to `margin`."),
102
+ padding: z.number().nonnegative().optional().describe("Symmetric inner padding (alias for `innerXSep` + `innerYSep`); axis-specific fields take precedence."),
103
+ margin: z.number().nonnegative().optional().describe("Symmetric outer margin (alias for `outerSep`); axis-specific field takes precedence."),
104
+ font: FontSchema.optional().describe("Font spec for the inner text label (family / size / weight / style); all fields optional, all fall back to renderer defaults.")
39
105
  }).describe("Node primitive: a positioned, optionally textual shape (rectangle / circle / ellipse / diamond)");
40
106
  //#endregion
41
- export { NODE_SHAPES, NodeSchema };
107
+ export { FontSchema, LineSpecSchema, NODE_SHAPES, NODE_TEXT_ALIGNS, NodeSchema, NodeTextSchema };
@@ -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
- fontSize: z.ZodOptional<z.ZodNumber>;
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
- text?: string | undefined;
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
- text?: string | undefined;
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
- fontSize: z.ZodOptional<z.ZodNumber>;
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
- text?: string | undefined;
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
- text?: string | undefined;
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
- text?: string | undefined;
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
- text?: string | undefined;
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
@@ -22,6 +22,8 @@ export type EllipsePrim = {
22
22
  fillOpacity?: number;
23
23
  /** 描边色 */
24
24
  stroke?: string;
25
+ /** 描边透明度 0~1(SVG stroke-opacity) */
26
+ strokeOpacity?: number;
25
27
  /** 描边宽度 */
26
28
  strokeWidth?: number;
27
29
  /** SVG stroke-dasharray 模式 */
@@ -1 +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
+ {"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,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,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,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"}
@@ -16,6 +16,8 @@ export type RectPrim = {
16
16
  fillOpacity?: number;
17
17
  /** 描边色 */
18
18
  stroke?: string;
19
+ /** 描边透明度 0~1(SVG stroke-opacity) */
20
+ strokeOpacity?: number;
19
21
  /** 描边宽度 */
20
22
  strokeWidth?: number;
21
23
  /** SVG stroke-dasharray 模式 */
@@ -1 +1 @@
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,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"}