@retikz/core 0.1.0 → 0.2.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/anchor-cache.d.ts +12 -0
- package/dist/es/compile/anchor-cache.d.ts.map +1 -0
- package/dist/es/compile/anchor-cache.js +41 -0
- package/dist/es/compile/compile.d.ts +2 -2
- package/dist/es/compile/compile.d.ts.map +1 -1
- package/dist/es/compile/compile.js +150 -40
- package/dist/es/compile/index.d.ts +1 -0
- package/dist/es/compile/index.d.ts.map +1 -1
- package/dist/es/compile/name-stack.d.ts +81 -0
- package/dist/es/compile/name-stack.d.ts.map +1 -0
- package/dist/es/compile/name-stack.js +104 -0
- package/dist/es/compile/node.d.ts +9 -5
- package/dist/es/compile/node.d.ts.map +1 -1
- package/dist/es/compile/node.js +19 -11
- package/dist/es/compile/path/anchor.d.ts +11 -5
- package/dist/es/compile/path/anchor.d.ts.map +1 -1
- package/dist/es/compile/path/anchor.js +24 -13
- package/dist/es/compile/path/index.d.ts +9 -3
- package/dist/es/compile/path/index.d.ts.map +1 -1
- package/dist/es/compile/path/index.js +18 -17
- package/dist/es/compile/path/label.d.ts +1 -1
- package/dist/es/compile/path/label.d.ts.map +1 -1
- package/dist/es/compile/path/label.js +17 -4
- package/dist/es/compile/path/relative.d.ts +10 -4
- package/dist/es/compile/path/relative.d.ts.map +1 -1
- package/dist/es/compile/path/relative.js +16 -8
- package/dist/es/compile/position.d.ts +19 -3
- package/dist/es/compile/position.d.ts.map +1 -1
- package/dist/es/compile/position.js +28 -8
- package/dist/es/compile/scope.d.ts +66 -0
- package/dist/es/compile/scope.d.ts.map +1 -0
- package/dist/es/compile/scope.js +256 -0
- package/dist/es/compile/style.d.ts +46 -0
- package/dist/es/compile/style.d.ts.map +1 -0
- package/dist/es/compile/style.js +259 -0
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +3 -1
- package/dist/es/ir/index.d.ts +2 -0
- package/dist/es/ir/index.d.ts.map +1 -1
- package/dist/es/ir/node.d.ts +5 -2
- package/dist/es/ir/node.d.ts.map +1 -1
- package/dist/es/ir/node.js +1 -0
- package/dist/es/ir/path/path.d.ts +531 -0
- package/dist/es/ir/path/path.d.ts.map +1 -1
- package/dist/es/ir/path/path.js +1 -0
- package/dist/es/ir/path/step.d.ts +834 -0
- package/dist/es/ir/path/step.d.ts.map +1 -1
- package/dist/es/ir/path/step.js +5 -1
- package/dist/es/ir/scene.d.ts +18 -3542
- package/dist/es/ir/scene.d.ts.map +1 -1
- package/dist/es/ir/scene.js +11 -3
- package/dist/es/ir/scope.d.ts +3690 -0
- package/dist/es/ir/scope.d.ts.map +1 -0
- package/dist/es/ir/scope.js +89 -0
- package/dist/es/ir/transform.d.ts +204 -0
- package/dist/es/ir/transform.d.ts.map +1 -0
- package/dist/es/ir/transform.js +56 -0
- package/dist/lib/compile/anchor-cache.cjs +41 -0
- package/dist/lib/compile/anchor-cache.d.ts +12 -0
- package/dist/lib/compile/anchor-cache.d.ts.map +1 -0
- package/dist/lib/compile/compile.cjs +150 -40
- package/dist/lib/compile/compile.d.ts +2 -2
- package/dist/lib/compile/compile.d.ts.map +1 -1
- package/dist/lib/compile/index.d.ts +1 -0
- package/dist/lib/compile/index.d.ts.map +1 -1
- package/dist/lib/compile/name-stack.cjs +104 -0
- package/dist/lib/compile/name-stack.d.ts +81 -0
- package/dist/lib/compile/name-stack.d.ts.map +1 -0
- package/dist/lib/compile/node.cjs +19 -11
- package/dist/lib/compile/node.d.ts +9 -5
- package/dist/lib/compile/node.d.ts.map +1 -1
- package/dist/lib/compile/path/anchor.cjs +23 -12
- package/dist/lib/compile/path/anchor.d.ts +11 -5
- package/dist/lib/compile/path/anchor.d.ts.map +1 -1
- package/dist/lib/compile/path/index.cjs +18 -17
- package/dist/lib/compile/path/index.d.ts +9 -3
- package/dist/lib/compile/path/index.d.ts.map +1 -1
- package/dist/lib/compile/path/label.cjs +17 -4
- package/dist/lib/compile/path/label.d.ts +1 -1
- package/dist/lib/compile/path/label.d.ts.map +1 -1
- package/dist/lib/compile/path/relative.cjs +16 -8
- package/dist/lib/compile/path/relative.d.ts +10 -4
- package/dist/lib/compile/path/relative.d.ts.map +1 -1
- package/dist/lib/compile/position.cjs +28 -8
- package/dist/lib/compile/position.d.ts +19 -3
- package/dist/lib/compile/position.d.ts.map +1 -1
- package/dist/lib/compile/scope.cjs +261 -0
- package/dist/lib/compile/scope.d.ts +66 -0
- package/dist/lib/compile/scope.d.ts.map +1 -0
- package/dist/lib/compile/style.cjs +262 -0
- package/dist/lib/compile/style.d.ts +46 -0
- package/dist/lib/compile/style.d.ts.map +1 -0
- package/dist/lib/index.cjs +8 -0
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ir/index.d.ts +2 -0
- package/dist/lib/ir/index.d.ts.map +1 -1
- package/dist/lib/ir/node.cjs +1 -0
- package/dist/lib/ir/node.d.ts +5 -2
- package/dist/lib/ir/node.d.ts.map +1 -1
- package/dist/lib/ir/path/path.cjs +1 -0
- package/dist/lib/ir/path/path.d.ts +531 -0
- package/dist/lib/ir/path/path.d.ts.map +1 -1
- package/dist/lib/ir/path/step.cjs +5 -1
- package/dist/lib/ir/path/step.d.ts +834 -0
- package/dist/lib/ir/path/step.d.ts.map +1 -1
- package/dist/lib/ir/scene.cjs +11 -3
- package/dist/lib/ir/scene.d.ts +18 -3542
- package/dist/lib/ir/scene.d.ts.map +1 -1
- package/dist/lib/ir/scope.cjs +94 -0
- package/dist/lib/ir/scope.d.ts +3690 -0
- package/dist/lib/ir/scope.d.ts.map +1 -0
- package/dist/lib/ir/transform.cjs +56 -0
- package/dist/lib/ir/transform.d.ts +204 -0
- package/dist/lib/ir/transform.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/lib/index.cjs
CHANGED
|
@@ -11,6 +11,8 @@ const require_step = require("./ir/path/step.cjs");
|
|
|
11
11
|
const require_path = require("./ir/path/path.cjs");
|
|
12
12
|
const require_node = require("./ir/node.cjs");
|
|
13
13
|
const require_coordinate = require("./ir/coordinate.cjs");
|
|
14
|
+
const require_transform = require("./ir/transform.cjs");
|
|
15
|
+
const require_scope = require("./ir/scope.cjs");
|
|
14
16
|
const require_scene = require("./ir/scene.cjs");
|
|
15
17
|
const require_rect = require("./geometry/rect.cjs");
|
|
16
18
|
const require_circle = require("./geometry/circle.cjs");
|
|
@@ -28,6 +30,7 @@ exports.ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH = require_arrow.ARROW_MARKER_HOLL
|
|
|
28
30
|
exports.ARROW_SHAPES = require_arrow.ARROW_SHAPES;
|
|
29
31
|
exports.AT_DIRECTIONS = require_at_position.AT_DIRECTIONS;
|
|
30
32
|
exports.ArcStepSchema = require_step.ArcStepSchema;
|
|
33
|
+
exports.ArrowDefaultSchema = require_scope.ArrowDefaultSchema;
|
|
31
34
|
exports.ArrowDetailSchema = require_arrow.ArrowDetailSchema;
|
|
32
35
|
exports.ArrowEndDetailSchema = require_arrow.ArrowEndDetailSchema;
|
|
33
36
|
exports.AtPositionSchema = require_at_position.AtPositionSchema;
|
|
@@ -46,14 +49,17 @@ exports.EllipsePathStepSchema = require_step.EllipsePathStepSchema;
|
|
|
46
49
|
exports.FoldStepSchema = require_step.FoldStepSchema;
|
|
47
50
|
exports.FontSchema = require_font.FontSchema;
|
|
48
51
|
exports.HOLLOW_ARROW_SHAPES = require_arrow.HOLLOW_ARROW_SHAPES;
|
|
52
|
+
exports.LabelDefaultSchema = require_scope.LabelDefaultSchema;
|
|
49
53
|
exports.LineSpecSchema = require_text.LineSpecSchema;
|
|
50
54
|
exports.LineStepSchema = require_step.LineStepSchema;
|
|
51
55
|
exports.MoveStepSchema = require_step.MoveStepSchema;
|
|
52
56
|
exports.NODE_SHAPES = require_node.NODE_SHAPES;
|
|
53
57
|
exports.NODE_TEXT_ALIGNS = require_node.NODE_TEXT_ALIGNS;
|
|
58
|
+
exports.NodeDefaultSchema = require_scope.NodeDefaultSchema;
|
|
54
59
|
exports.NodeLabelSchema = require_node.NodeLabelSchema;
|
|
55
60
|
exports.NodeSchema = require_node.NodeSchema;
|
|
56
61
|
exports.OffsetPositionSchema = require_offset_position.OffsetPositionSchema;
|
|
62
|
+
exports.PathDefaultSchema = require_scope.PathDefaultSchema;
|
|
57
63
|
exports.PathSchema = require_path.PathSchema;
|
|
58
64
|
exports.PolarPositionSchema = require_polar_position.PolarPositionSchema;
|
|
59
65
|
exports.PositionSchema = require_position.PositionSchema;
|
|
@@ -61,10 +67,12 @@ exports.RECT_ANCHORS = require_rect.RECT_ANCHORS;
|
|
|
61
67
|
exports.RelativeAccumulateTargetSchema = require_target.RelativeAccumulateTargetSchema;
|
|
62
68
|
exports.RelativeTargetSchema = require_target.RelativeTargetSchema;
|
|
63
69
|
exports.SceneSchema = require_scene.SceneSchema;
|
|
70
|
+
exports.ScopeSchema = require_scope.ScopeSchema;
|
|
64
71
|
exports.StepLabelSchema = require_step.StepLabelSchema;
|
|
65
72
|
exports.StepSchema = require_step.StepSchema;
|
|
66
73
|
exports.TargetSchema = require_target.TargetSchema;
|
|
67
74
|
exports.TextBlockSchema = require_text.TextBlockSchema;
|
|
75
|
+
exports.TransformSchema = require_transform.TransformSchema;
|
|
68
76
|
exports.circle = require_circle.circle;
|
|
69
77
|
exports.compileToScene = require_compile.compileToScene;
|
|
70
78
|
exports.computeLayout = require_layout.computeLayout;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @retikz/core 公开 API
|
|
3
3
|
* @description 任何 framework adapter(@retikz/react、@retikz/vue、@retikz/canvas、@retikz/ssr)只能 import 本文件导出内容,不准走子路径。本包零 React/零 DOM 依赖
|
|
4
4
|
*/
|
|
5
|
-
export { PositionSchema, PolarPositionSchema, AtPositionSchema, OffsetPositionSchema, AT_DIRECTIONS, TargetSchema, RelativeTargetSchema, RelativeAccumulateTargetSchema, MoveStepSchema, LineStepSchema, FoldStepSchema, CycleStepSchema, CurveStepSchema, CubicStepSchema, BendStepSchema, ArcStepSchema, CirclePathStepSchema, EllipsePathStepSchema, ControlPointSchema, StepLabelSchema, StepSchema, NodeSchema, NodeLabelSchema, CoordinateSchema, FontSchema, TextBlockSchema, LineSpecSchema, PathSchema, ArrowDetailSchema, ArrowEndDetailSchema, ChildSchema, SceneSchema, CURRENT_IR_VERSION, } from './ir';
|
|
6
|
-
export type { IRPosition, IRAtPosition, IROffsetPosition, AtDirection, IRTarget, IRRelativeTarget, IRRelativeAccumulateTarget, IRMoveStep, IRLineStep, IRFoldStep, IRCycleStep, IRCurveStep, IRCubicStep, IRBendStep, IRArcStep, IRCirclePathStep, IREllipsePathStep, IRControlPoint, IRStepLabel, IRStep, IRNode, IRNodeLabel, IRCoordinate, IRFont, IRLineSpec, IRTextBlock, IRPath, IRChild, IR, ArrowShape, IRArrowDetail, IRArrowEndDetail, NodeShape, NodeTextAlign, } from './ir';
|
|
5
|
+
export { PositionSchema, PolarPositionSchema, AtPositionSchema, OffsetPositionSchema, AT_DIRECTIONS, TargetSchema, RelativeTargetSchema, RelativeAccumulateTargetSchema, MoveStepSchema, LineStepSchema, FoldStepSchema, CycleStepSchema, CurveStepSchema, CubicStepSchema, BendStepSchema, ArcStepSchema, CirclePathStepSchema, EllipsePathStepSchema, ControlPointSchema, StepLabelSchema, StepSchema, NodeSchema, NodeLabelSchema, CoordinateSchema, FontSchema, TextBlockSchema, LineSpecSchema, PathSchema, ArrowDetailSchema, ArrowEndDetailSchema, ScopeSchema, NodeDefaultSchema, PathDefaultSchema, LabelDefaultSchema, ArrowDefaultSchema, TransformSchema, ChildSchema, SceneSchema, CURRENT_IR_VERSION, } from './ir';
|
|
6
|
+
export type { IRPosition, IRAtPosition, IROffsetPosition, AtDirection, IRTarget, IRRelativeTarget, IRRelativeAccumulateTarget, IRMoveStep, IRLineStep, IRFoldStep, IRCycleStep, IRCurveStep, IRCubicStep, IRBendStep, IRArcStep, IRCirclePathStep, IREllipsePathStep, IRControlPoint, IRStepLabel, IRStep, IRNode, IRNodeLabel, IRCoordinate, IRFont, IRLineSpec, IRTextBlock, IRPath, IRScope, IRNodeDefault, IRPathDefault, IRLabelDefault, IRArrowDefault, StyleChannel, IRTransform, IRTranslateTransform, IRPolarTranslateTransform, IRAtTranslateTransform, IROffsetTranslateTransform, IRRotateTransform, IRScaleTransform, IRChild, IR, ArrowShape, IRArrowDetail, IRArrowEndDetail, NodeShape, NodeTextAlign, } from './ir';
|
|
7
7
|
export { ARROW_SHAPES, DEFAULT_ARROW_SHAPE, HOLLOW_ARROW_SHAPES, ARROW_MARKER_DEFAULT_SIZE, ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH, NODE_SHAPES, NODE_TEXT_ALIGNS, } from './ir';
|
|
8
8
|
export type { ScenePrimitive, RectPrim, EllipsePrim, TextPrim, TextLine, PathPrim, PathCommand,
|
|
9
9
|
/** 7 个 named PathCommand 分支(便于 wrapper / Pick<>) */
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,kBAAkB,GACnB,MAAM,MAAM,CAAC;AACd,YAAY,EACV,UAAU,EACV,YAAY,EACZ,g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I,EACJ,UAAU,EACV,MAAM,EACN,OAAO,EACP,OAAO,EACP,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxF,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,WAAW,EACX,kBAAkB,GACnB,MAAM,MAAM,CAAC;AACd,YAAY,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,0BAA0B,EAC1B,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,MAAM,EACN,MAAM,EACN,WAAW,EACX,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb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,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxF,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/lib/ir/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/dist/lib/ir/node.cjs
CHANGED
|
@@ -48,6 +48,7 @@ var NodeSchema = zod.z.object({
|
|
|
48
48
|
text: require_text.TextBlockSchema.optional(),
|
|
49
49
|
align: zod.z.nativeEnum(NODE_TEXT_ALIGNS).optional().describe("Multi-line text alignment within the text block; `left` / `center` / `right`. Defaults to `center` (matches TikZ)."),
|
|
50
50
|
lineHeight: zod.z.number().positive().optional().describe("Line height in user units; falls back to `font.size × 1.2` when omitted."),
|
|
51
|
+
color: zod.z.string().optional().describe("Master color (TikZ `color=`). When set, stroke / fill / text default to it unless individually overridden, and it cascades to the inner text and edge labels. Individual fields (stroke / fill / textColor) always win over this within the same node."),
|
|
51
52
|
fill: zod.z.string().optional().describe("Background color of the node shape; any CSS color (e.g. \"lightblue\", \"#fafafa\", \"rgba(...)\")"),
|
|
52
53
|
fillOpacity: zod.z.number().min(0).max(1).optional().describe("Fill opacity 0..1; affects only the shape fill, leaves stroke / text alone."),
|
|
53
54
|
stroke: zod.z.string().optional().describe("Border color of the node shape; any CSS color. Defaults to currentColor when omitted"),
|
package/dist/lib/ir/node.d.ts
CHANGED
|
@@ -169,6 +169,7 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
169
169
|
readonly right: "right";
|
|
170
170
|
}>>;
|
|
171
171
|
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
color: z.ZodOptional<z.ZodString>;
|
|
172
173
|
fill: z.ZodOptional<z.ZodString>;
|
|
173
174
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
174
175
|
stroke: z.ZodOptional<z.ZodString>;
|
|
@@ -349,6 +350,8 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
349
350
|
} | undefined;
|
|
350
351
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
351
352
|
scale?: number | undefined;
|
|
353
|
+
color?: string | undefined;
|
|
354
|
+
textColor?: string | undefined;
|
|
352
355
|
label?: {
|
|
353
356
|
text: string;
|
|
354
357
|
distance?: number | undefined;
|
|
@@ -378,7 +381,6 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
378
381
|
strokeWidth?: number | undefined;
|
|
379
382
|
fillOpacity?: number | undefined;
|
|
380
383
|
drawOpacity?: number | undefined;
|
|
381
|
-
textColor?: string | undefined;
|
|
382
384
|
id?: string | undefined;
|
|
383
385
|
rotate?: number | undefined;
|
|
384
386
|
align?: "left" | "right" | "center" | undefined;
|
|
@@ -428,6 +430,8 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
428
430
|
} | undefined;
|
|
429
431
|
shape?: "diamond" | "circle" | "rectangle" | "ellipse" | undefined;
|
|
430
432
|
scale?: number | undefined;
|
|
433
|
+
color?: string | undefined;
|
|
434
|
+
textColor?: string | undefined;
|
|
431
435
|
label?: {
|
|
432
436
|
text: string;
|
|
433
437
|
distance?: number | undefined;
|
|
@@ -457,7 +461,6 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
457
461
|
strokeWidth?: number | undefined;
|
|
458
462
|
fillOpacity?: number | undefined;
|
|
459
463
|
drawOpacity?: number | undefined;
|
|
460
|
-
textColor?: string | undefined;
|
|
461
464
|
id?: string | undefined;
|
|
462
465
|
rotate?: number | undefined;
|
|
463
466
|
align?: "left" | "right" | "center" | undefined;
|
|
@@ -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;AAKxC;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,gBAAgB;AAChB,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAEpD,+BAA+B;AAC/B,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCzB,CAAC;AAEJ,uBAAuB;AACvB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU
|
|
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;AAKxC;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,gBAAgB;AAChB,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAEpD,+BAA+B;AAC/B,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCzB,CAAC;AAEJ,uBAAuB;AACvB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsLpB,CAAC;AAEJ,sCAAsC;AACtC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ let zod = require("zod");
|
|
|
4
4
|
//#region src/ir/path/path.ts
|
|
5
5
|
var PathSchema = zod.z.object({
|
|
6
6
|
type: zod.z.literal("path").describe("Discriminator marking this child as a path"),
|
|
7
|
+
color: zod.z.string().optional().describe("Master color (TikZ `color=`). When set, the stroke, arrow tips, and step labels default to it unless individually overridden. Following the master color (not the stroke) is how a colored line shares its color with its labels and arrows — `stroke=` alone only paints the line."),
|
|
7
8
|
stroke: zod.z.string().optional().describe("Stroke color of the path; any CSS color. Defaults to currentColor when omitted"),
|
|
8
9
|
strokeWidth: zod.z.number().optional().describe("Stroke width in user units; defaults to 1 when omitted"),
|
|
9
10
|
dashPattern: zod.z.array(zod.z.number().finite().nonnegative()).min(1).optional().describe("Stroke dash pattern lengths in user units (e.g. [4, 2]); omitted means solid line"),
|