@retikz/core 0.2.0-alpha.8 → 0.2.0-beta.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.
- package/dist/es/arrows/index.d.ts +1 -1
- package/dist/es/arrows/index.js +1 -1
- package/dist/es/compile/clip.d.ts +17 -0
- package/dist/es/compile/clip.d.ts.map +1 -0
- package/dist/es/compile/clip.js +84 -0
- package/dist/es/compile/compile.d.ts.map +1 -1
- package/dist/es/compile/compile.js +31 -5
- package/dist/es/compile/node.d.ts +2 -1
- package/dist/es/compile/node.d.ts.map +1 -1
- package/dist/es/compile/node.js +3 -3
- package/dist/es/compile/path/anchor.d.ts.map +1 -1
- package/dist/es/compile/path/anchor.js +12 -0
- package/dist/es/compile/path/index.d.ts.map +1 -1
- package/dist/es/compile/path/index.js +11 -3
- package/dist/es/compile/position.d.ts +8 -2
- package/dist/es/compile/position.d.ts.map +1 -1
- package/dist/es/compile/position.js +7 -1
- package/dist/es/compile/precision.d.ts +6 -1
- package/dist/es/compile/precision.d.ts.map +1 -1
- package/dist/es/compile/precision.js +10 -2
- package/dist/es/index.d.ts +5 -3
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +7 -5
- package/dist/es/ir/clip.d.ts +72 -0
- package/dist/es/ir/clip.d.ts.map +1 -0
- package/dist/es/ir/clip.js +37 -0
- package/dist/es/ir/coordinate.d.ts +3 -3
- package/dist/es/ir/coordinate.d.ts.map +1 -1
- package/dist/es/ir/coordinate.js +4 -2
- package/dist/es/ir/index.d.ts +1 -0
- package/dist/es/ir/index.d.ts.map +1 -1
- package/dist/es/ir/node.d.ts +5 -5
- package/dist/es/ir/node.d.ts.map +1 -1
- package/dist/es/ir/node.js +4 -2
- package/dist/es/ir/path/arrow.d.ts +12 -12
- package/dist/es/ir/path/path.d.ts +128 -128
- package/dist/es/ir/path/step.d.ts +134 -134
- package/dist/es/ir/path/step.js +1 -1
- package/dist/es/ir/path/target.d.ts +1 -1
- package/dist/es/ir/path/target.d.ts.map +1 -1
- package/dist/es/ir/path/target.js +4 -2
- package/dist/es/ir/position/between-position.d.ts +26 -0
- package/dist/es/ir/position/between-position.d.ts.map +1 -0
- package/dist/es/ir/position/between-position.js +21 -0
- package/dist/es/ir/position/index.d.ts +1 -0
- package/dist/es/ir/position/index.d.ts.map +1 -1
- package/dist/es/ir/scene.d.ts +51 -0
- package/dist/es/ir/scene.d.ts.map +1 -1
- package/dist/es/ir/scene.js +14 -2
- package/dist/es/ir/scope.d.ts +303 -198
- package/dist/es/ir/scope.d.ts.map +1 -1
- package/dist/es/ir/scope.js +2 -0
- package/dist/es/patterns/index.d.ts +1 -1
- package/dist/es/patterns/index.js +1 -1
- package/dist/es/primitive/clip.d.ts +18 -0
- package/dist/es/primitive/clip.d.ts.map +1 -0
- package/dist/es/primitive/group.d.ts +6 -0
- package/dist/es/primitive/group.d.ts.map +1 -1
- package/dist/es/primitive/index.d.ts +1 -0
- package/dist/es/primitive/index.d.ts.map +1 -1
- package/dist/es/primitive/paint.d.ts +11 -5
- package/dist/es/primitive/paint.d.ts.map +1 -1
- package/dist/es/primitive/scene.d.ts +2 -1
- package/dist/es/primitive/scene.d.ts.map +1 -1
- package/dist/lib/arrows/index.cjs +1 -1
- package/dist/lib/arrows/index.d.ts +1 -1
- package/dist/lib/compile/clip.cjs +84 -0
- package/dist/lib/compile/clip.d.ts +17 -0
- package/dist/lib/compile/clip.d.ts.map +1 -0
- package/dist/lib/compile/compile.cjs +31 -5
- package/dist/lib/compile/compile.d.ts.map +1 -1
- package/dist/lib/compile/node.cjs +3 -3
- package/dist/lib/compile/node.d.ts +2 -1
- package/dist/lib/compile/node.d.ts.map +1 -1
- package/dist/lib/compile/path/anchor.cjs +12 -0
- package/dist/lib/compile/path/anchor.d.ts.map +1 -1
- package/dist/lib/compile/path/index.cjs +11 -3
- package/dist/lib/compile/path/index.d.ts.map +1 -1
- package/dist/lib/compile/position.cjs +7 -1
- package/dist/lib/compile/position.d.ts +8 -2
- package/dist/lib/compile/position.d.ts.map +1 -1
- package/dist/lib/compile/precision.cjs +10 -2
- package/dist/lib/compile/precision.d.ts +6 -1
- package/dist/lib/compile/precision.d.ts.map +1 -1
- package/dist/lib/index.cjs +9 -3
- package/dist/lib/index.d.ts +5 -3
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ir/clip.cjs +37 -0
- package/dist/lib/ir/clip.d.ts +72 -0
- package/dist/lib/ir/clip.d.ts.map +1 -0
- package/dist/lib/ir/coordinate.cjs +4 -2
- package/dist/lib/ir/coordinate.d.ts +3 -3
- package/dist/lib/ir/coordinate.d.ts.map +1 -1
- package/dist/lib/ir/index.d.ts +1 -0
- package/dist/lib/ir/index.d.ts.map +1 -1
- package/dist/lib/ir/node.cjs +4 -2
- package/dist/lib/ir/node.d.ts +5 -5
- package/dist/lib/ir/node.d.ts.map +1 -1
- package/dist/lib/ir/path/arrow.d.ts +12 -12
- package/dist/lib/ir/path/path.d.ts +128 -128
- package/dist/lib/ir/path/step.cjs +1 -1
- package/dist/lib/ir/path/step.d.ts +134 -134
- package/dist/lib/ir/path/target.cjs +4 -2
- package/dist/lib/ir/path/target.d.ts +1 -1
- package/dist/lib/ir/path/target.d.ts.map +1 -1
- package/dist/lib/ir/position/between-position.cjs +22 -0
- package/dist/lib/ir/position/between-position.d.ts +26 -0
- package/dist/lib/ir/position/between-position.d.ts.map +1 -0
- package/dist/lib/ir/position/index.d.ts +1 -0
- package/dist/lib/ir/position/index.d.ts.map +1 -1
- package/dist/lib/ir/scene.cjs +14 -1
- package/dist/lib/ir/scene.d.ts +51 -0
- package/dist/lib/ir/scene.d.ts.map +1 -1
- package/dist/lib/ir/scope.cjs +2 -0
- package/dist/lib/ir/scope.d.ts +303 -198
- package/dist/lib/ir/scope.d.ts.map +1 -1
- package/dist/lib/patterns/index.cjs +1 -1
- package/dist/lib/patterns/index.d.ts +1 -1
- package/dist/lib/primitive/clip.d.ts +18 -0
- package/dist/lib/primitive/clip.d.ts.map +1 -0
- package/dist/lib/primitive/group.d.ts +6 -0
- package/dist/lib/primitive/group.d.ts.map +1 -1
- package/dist/lib/primitive/index.d.ts +1 -0
- package/dist/lib/primitive/index.d.ts.map +1 -1
- package/dist/lib/primitive/paint.d.ts +11 -5
- package/dist/lib/primitive/paint.d.ts.map +1 -1
- package/dist/lib/primitive/scene.d.ts +2 -1
- package/dist/lib/primitive/scene.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/compile/position.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/compile/position.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACvH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,KACjC,UAAU,GAAG,IAAI,CAAC;AAoBvB;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,GAC1B,KAAK,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,MAAM,EAC9F,WAAW,SAAS,EACpB,eAAc,MAA8B,EAC5C,aAAY,aAAa,CAAC,SAAS,CAAM,EACzC,uBAAuB,oBAAoB,KAC1C,UAAU,GAAG,IAiDf,CAAC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
//#region src/compile/precision.ts
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* 按指定小数位精度四舍五入;precision = 0 表示取整
|
|
4
|
+
* @description 末端把 `-0` 归一为 `+0`——`Math.round` 对负的亚精度值(如 `-0.001`)产 `-0`,
|
|
5
|
+
* 而 `JSON.stringify(-0) === '0'` 会让 Scene round-trip 在 `Object.is` 层失真(`-0 !== 0` 于 Object.is)。
|
|
6
|
+
* 归一让序列化往返稳定;数值上 `-0 === 0`,渲染 / 计算无影响。
|
|
7
|
+
*/
|
|
3
8
|
var makeRound = (precision) => {
|
|
4
9
|
const factor = 10 ** precision;
|
|
5
|
-
return (n) =>
|
|
10
|
+
return (n) => {
|
|
11
|
+
const r = Math.round(n * factor) / factor;
|
|
12
|
+
return r === 0 ? 0 : r;
|
|
13
|
+
};
|
|
6
14
|
};
|
|
7
15
|
//#endregion
|
|
8
16
|
exports.makeRound = makeRound;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** 默认输出精度:保留 2 位小数 */
|
|
2
2
|
export declare const DEFAULT_PRECISION = 2;
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* 按指定小数位精度四舍五入;precision = 0 表示取整
|
|
5
|
+
* @description 末端把 `-0` 归一为 `+0`——`Math.round` 对负的亚精度值(如 `-0.001`)产 `-0`,
|
|
6
|
+
* 而 `JSON.stringify(-0) === '0'` 会让 Scene round-trip 在 `Object.is` 层失真(`-0 !== 0` 于 Object.is)。
|
|
7
|
+
* 归一让序列化往返稳定;数值上 `-0 === 0`,渲染 / 计算无影响。
|
|
8
|
+
*/
|
|
4
9
|
export declare const makeRound: (precision: number) => (n: number) => number;
|
|
5
10
|
//# sourceMappingURL=precision.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"precision.d.ts","sourceRoot":"","sources":["../../../src/compile/precision.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC
|
|
1
|
+
{"version":3,"file":"precision.d.ts","sourceRoot":"","sources":["../../../src/compile/precision.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,WAAW,MAAM,MAEjC,GAAG,MAAM,WAIlB,CAAC"}
|
package/dist/lib/index.cjs
CHANGED
|
@@ -3,14 +3,16 @@ const require_position = require("./ir/position/position.cjs");
|
|
|
3
3
|
const require_polar_position = require("./ir/position/polar-position.cjs");
|
|
4
4
|
const require_at_position = require("./ir/position/at-position.cjs");
|
|
5
5
|
const require_offset_position = require("./ir/position/offset-position.cjs");
|
|
6
|
+
const require__transform = require("./geometry/_transform.cjs");
|
|
7
|
+
const require_rect = require("./geometry/rect.cjs");
|
|
8
|
+
const require_target = require("./ir/path/target.cjs");
|
|
9
|
+
const require_between_position = require("./ir/position/between-position.cjs");
|
|
6
10
|
const require_font = require("./ir/font.cjs");
|
|
7
11
|
const require_json = require("./ir/json.cjs");
|
|
8
12
|
const require_paint = require("./ir/paint.cjs");
|
|
13
|
+
const require_clip = require("./ir/clip.cjs");
|
|
9
14
|
const require_text = require("./ir/text.cjs");
|
|
10
15
|
const require_arrow = require("./ir/path/arrow.cjs");
|
|
11
|
-
const require__transform = require("./geometry/_transform.cjs");
|
|
12
|
-
const require_rect = require("./geometry/rect.cjs");
|
|
13
|
-
const require_target = require("./ir/path/target.cjs");
|
|
14
16
|
const require_step = require("./ir/path/step.cjs");
|
|
15
17
|
const require_path = require("./ir/path/path.cjs");
|
|
16
18
|
const require_node = require("./ir/node.cjs");
|
|
@@ -37,6 +39,7 @@ exports.ARROW_MARKER_DEFAULT_SIZE = require_arrow.ARROW_MARKER_DEFAULT_SIZE;
|
|
|
37
39
|
exports.ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH = require_arrow.ARROW_MARKER_HOLLOW_DEFAULT_LINE_WIDTH;
|
|
38
40
|
exports.ARROW_SHAPES = require_arrow.ARROW_SHAPES;
|
|
39
41
|
exports.AT_DIRECTIONS = require_at_position.AT_DIRECTIONS;
|
|
42
|
+
exports.AbsoluteTargetSchema = require_between_position.AbsoluteTargetSchema;
|
|
40
43
|
exports.AnchorRefSchema = require_target.AnchorRefSchema;
|
|
41
44
|
exports.ArcStepSchema = require_step.ArcStepSchema;
|
|
42
45
|
exports.ArrowDefaultSchema = require_scope.ArrowDefaultSchema;
|
|
@@ -47,9 +50,11 @@ exports.BUILTIN_ARROWS = require_index$1.BUILTIN_ARROWS;
|
|
|
47
50
|
exports.BUILTIN_PATTERNS = require_index$2.BUILTIN_PATTERNS;
|
|
48
51
|
exports.BUILTIN_SHAPES = require_index.BUILTIN_SHAPES;
|
|
49
52
|
exports.BendStepSchema = require_step.BendStepSchema;
|
|
53
|
+
exports.BetweenPositionSchema = require_between_position.BetweenPositionSchema;
|
|
50
54
|
exports.CURRENT_IR_VERSION = require_scene.CURRENT_IR_VERSION;
|
|
51
55
|
exports.ChildSchema = require_scene.ChildSchema;
|
|
52
56
|
exports.CirclePathStepSchema = require_step.CirclePathStepSchema;
|
|
57
|
+
exports.ClipSpecSchema = require_clip.ClipSpecSchema;
|
|
53
58
|
exports.ControlPointSchema = require_step.ControlPointSchema;
|
|
54
59
|
exports.CoordinateSchema = require_coordinate.CoordinateSchema;
|
|
55
60
|
exports.CubicStepSchema = require_step.CubicStepSchema;
|
|
@@ -93,6 +98,7 @@ exports.StepSchema = require_step.StepSchema;
|
|
|
93
98
|
exports.TargetSchema = require_target.TargetSchema;
|
|
94
99
|
exports.TextBlockSchema = require_text.TextBlockSchema;
|
|
95
100
|
exports.TransformSchema = require_transform.TransformSchema;
|
|
101
|
+
exports.ViewBoxSchema = require_scene.ViewBoxSchema;
|
|
96
102
|
exports.circle = require_circle.circle;
|
|
97
103
|
exports.compileToScene = require_compile.compileToScene;
|
|
98
104
|
exports.computeLayout = require_layout.computeLayout;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
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, AnchorRefSchema, NodeTargetSchema, RelativeTargetSchema, RelativeAccumulateTargetSchema, MoveStepSchema, LineStepSchema, FoldStepSchema, CycleStepSchema, CurveStepSchema, CubicStepSchema, BendStepSchema, ArcStepSchema, CirclePathStepSchema, EllipsePathStepSchema, RectangleStepSchema, GeneratorStepSchema, ControlPointSchema, StepLabelSchema, StepSchema, NodeSchema, NodeLabelSchema, CoordinateSchema, FontSchema, TextBlockSchema, LineSpecSchema, PathSchema, ArrowDetailSchema, ArrowEndDetailSchema, ScopeSchema, NodeDefaultSchema, PathDefaultSchema, LabelDefaultSchema, ArrowDefaultSchema, TransformSchema, ChildSchema, SceneSchema, CURRENT_IR_VERSION, PaintSpecSchema, GradientStopSchema, JsonValueSchema, JsonObjectSchema, } from './ir';
|
|
6
|
-
export type { IRPosition, IRAtPosition, IROffsetPosition, AtDirection, IRTarget, IRAnchorRef, IRNodeTarget, IRRelativeTarget, IRRelativeAccumulateTarget, IRMoveStep, IRLineStep, IRFoldStep, IRCycleStep, IRCurveStep, IRCubicStep, IRBendStep, IRArcStep, IRCirclePathStep, IREllipsePathStep, IRRectangleStep, IRGeneratorStep, 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, BuiltinArrowName, ArrowShapeName, IRArrowDetail, IRArrowEndDetail, NodeShape, BuiltinShapeName, NodeTextAlign, PatternShapeName, BuiltinPatternName, IRPaintSpec, IRGradientStop, JsonValue, IRJsonObject, } from './ir';
|
|
5
|
+
export { PositionSchema, PolarPositionSchema, AtPositionSchema, OffsetPositionSchema, AT_DIRECTIONS, TargetSchema, AnchorRefSchema, NodeTargetSchema, RelativeTargetSchema, RelativeAccumulateTargetSchema, AbsoluteTargetSchema, BetweenPositionSchema, MoveStepSchema, LineStepSchema, FoldStepSchema, CycleStepSchema, CurveStepSchema, CubicStepSchema, BendStepSchema, ArcStepSchema, CirclePathStepSchema, EllipsePathStepSchema, RectangleStepSchema, GeneratorStepSchema, ControlPointSchema, StepLabelSchema, StepSchema, NodeSchema, NodeLabelSchema, CoordinateSchema, FontSchema, TextBlockSchema, LineSpecSchema, PathSchema, ArrowDetailSchema, ArrowEndDetailSchema, ScopeSchema, NodeDefaultSchema, PathDefaultSchema, LabelDefaultSchema, ArrowDefaultSchema, TransformSchema, ChildSchema, SceneSchema, CURRENT_IR_VERSION, PaintSpecSchema, GradientStopSchema, JsonValueSchema, JsonObjectSchema, ClipSpecSchema, ViewBoxSchema, } from './ir';
|
|
6
|
+
export type { IRPosition, IRAtPosition, IROffsetPosition, AtDirection, IRTarget, IRAnchorRef, IRNodeTarget, IRRelativeTarget, IRRelativeAccumulateTarget, IRAbsoluteTarget, IRBetweenPosition, IRMoveStep, IRLineStep, IRFoldStep, IRCycleStep, IRCurveStep, IRCubicStep, IRBendStep, IRArcStep, IRCirclePathStep, IREllipsePathStep, IRRectangleStep, IRGeneratorStep, 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, BuiltinArrowName, ArrowShapeName, IRArrowDetail, IRArrowEndDetail, NodeShape, BuiltinShapeName, NodeTextAlign, PatternShapeName, BuiltinPatternName, IRPaintSpec, IRGradientStop, JsonValue, IRJsonObject, IRClipSpec, IRViewBox, } 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, PATTERN_SHAPES, } from './ir';
|
|
8
8
|
export type { ScenePrimitive, RectPrim, EllipsePrim, TextPrim, TextLine, PathPrim, PathCommand,
|
|
9
9
|
/** 7 个 named PathCommand 分支(便于 wrapper / Pick<>) */
|
|
10
10
|
MovePathCommand, LinePathCommand, QuadPathCommand, CubicPathCommand, ArcPathCommand, EllipseArcPathCommand, ClosePathCommand, ArrowEndSpec, GroupPrim, Transform,
|
|
11
11
|
/** 3 个 named Transform 分支 */
|
|
12
|
-
TranslateTransform, RotateTransform, ScaleTransform, Layout, Scene, PaintValue, SceneResource,
|
|
12
|
+
TranslateTransform, RotateTransform, ScaleTransform, Layout, Scene, PaintValue, SceneResource, PaintResource,
|
|
13
|
+
/** 裁剪资源(renderer-agnostic,adapter 物化 `<clipPath>`) */
|
|
14
|
+
ClipResource, ClipShape,
|
|
13
15
|
/** 已解析 pattern tile(emit-in-compile 产物,进 Scene 资源,纯数据无函数) */
|
|
14
16
|
ResolvedPatternTile,
|
|
15
17
|
/** marker 窄子集(ArrowDefinition.emit 产物,renderer-agnostic) */
|
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,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,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,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB,
|
|
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,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,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,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB,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YAAY,CAAC;AAG9C,YAAY,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
let zod = require("zod");
|
|
2
|
+
//#region src/ir/clip.ts
|
|
3
|
+
/**
|
|
4
|
+
* 裁剪区规格(4 种结构化形状之一)
|
|
5
|
+
* @description renderer-agnostic 的纯数值裁剪区:`rect` 取景窗 / `circle` 圆形遮罩 / `ellipse` 椭圆遮罩 /
|
|
6
|
+
* `polygon` 任意直边区域。坐标为所在 scope 的局部坐标系(与 scope children 同帧)。
|
|
7
|
+
* 尺寸字段 `.positive().finite()`、坐标 `.finite()` 守 Scene JSON 可序列化(NaN/Infinity round-trip 失真)。
|
|
8
|
+
* 不含 SVG path 迷你语言(任意贝塞尔裁剪推迟)。
|
|
9
|
+
*/
|
|
10
|
+
var ClipSpecSchema = zod.z.discriminatedUnion("kind", [
|
|
11
|
+
zod.z.object({
|
|
12
|
+
kind: zod.z.literal("rect"),
|
|
13
|
+
x: zod.z.number().finite().describe("Rect left-top x in scope-local coords"),
|
|
14
|
+
y: zod.z.number().finite().describe("Rect left-top y in scope-local coords"),
|
|
15
|
+
width: zod.z.number().finite().positive().describe("Rect width (> 0)"),
|
|
16
|
+
height: zod.z.number().finite().positive().describe("Rect height (> 0)")
|
|
17
|
+
}).describe("Rectangular clip region"),
|
|
18
|
+
zod.z.object({
|
|
19
|
+
kind: zod.z.literal("circle"),
|
|
20
|
+
cx: zod.z.number().finite().describe("Circle center x"),
|
|
21
|
+
cy: zod.z.number().finite().describe("Circle center y"),
|
|
22
|
+
r: zod.z.number().finite().positive().describe("Circle radius (> 0)")
|
|
23
|
+
}).describe("Circular clip region"),
|
|
24
|
+
zod.z.object({
|
|
25
|
+
kind: zod.z.literal("ellipse"),
|
|
26
|
+
cx: zod.z.number().finite().describe("Ellipse center x"),
|
|
27
|
+
cy: zod.z.number().finite().describe("Ellipse center y"),
|
|
28
|
+
rx: zod.z.number().finite().positive().describe("Ellipse x radius (> 0)"),
|
|
29
|
+
ry: zod.z.number().finite().positive().describe("Ellipse y radius (> 0)")
|
|
30
|
+
}).describe("Elliptical clip region"),
|
|
31
|
+
zod.z.object({
|
|
32
|
+
kind: zod.z.literal("polygon"),
|
|
33
|
+
points: zod.z.array(zod.z.tuple([zod.z.number().finite(), zod.z.number().finite()])).min(3).describe("Polygon vertices [x, y][]; at least 3 points, each finite")
|
|
34
|
+
}).describe("Polygon clip region (arbitrary straight-edge area)")
|
|
35
|
+
]).describe("Clip region: one of rect / circle / ellipse / polygon, in scope-local coordinates. Used by `Scope.clip`; compiled into a renderer-agnostic ClipResource and referenced via the group `clipRef`.");
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.ClipSpecSchema = ClipSpecSchema;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* 裁剪区规格(4 种结构化形状之一)
|
|
4
|
+
* @description renderer-agnostic 的纯数值裁剪区:`rect` 取景窗 / `circle` 圆形遮罩 / `ellipse` 椭圆遮罩 /
|
|
5
|
+
* `polygon` 任意直边区域。坐标为所在 scope 的局部坐标系(与 scope children 同帧)。
|
|
6
|
+
* 尺寸字段 `.positive().finite()`、坐标 `.finite()` 守 Scene JSON 可序列化(NaN/Infinity round-trip 失真)。
|
|
7
|
+
* 不含 SVG path 迷你语言(任意贝塞尔裁剪推迟)。
|
|
8
|
+
*/
|
|
9
|
+
export declare const ClipSpecSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"rect">;
|
|
11
|
+
x: z.ZodNumber;
|
|
12
|
+
y: z.ZodNumber;
|
|
13
|
+
width: z.ZodNumber;
|
|
14
|
+
height: z.ZodNumber;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
kind: "rect";
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}, {
|
|
22
|
+
kind: "rect";
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}>, z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"circle">;
|
|
29
|
+
cx: z.ZodNumber;
|
|
30
|
+
cy: z.ZodNumber;
|
|
31
|
+
r: z.ZodNumber;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
kind: "circle";
|
|
34
|
+
cx: number;
|
|
35
|
+
cy: number;
|
|
36
|
+
r: number;
|
|
37
|
+
}, {
|
|
38
|
+
kind: "circle";
|
|
39
|
+
cx: number;
|
|
40
|
+
cy: number;
|
|
41
|
+
r: number;
|
|
42
|
+
}>, z.ZodObject<{
|
|
43
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
44
|
+
cx: z.ZodNumber;
|
|
45
|
+
cy: z.ZodNumber;
|
|
46
|
+
rx: z.ZodNumber;
|
|
47
|
+
ry: z.ZodNumber;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
kind: "ellipse";
|
|
50
|
+
cx: number;
|
|
51
|
+
cy: number;
|
|
52
|
+
rx: number;
|
|
53
|
+
ry: number;
|
|
54
|
+
}, {
|
|
55
|
+
kind: "ellipse";
|
|
56
|
+
cx: number;
|
|
57
|
+
cy: number;
|
|
58
|
+
rx: number;
|
|
59
|
+
ry: number;
|
|
60
|
+
}>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"polygon">;
|
|
62
|
+
points: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
kind: "polygon";
|
|
65
|
+
points: [number, number][];
|
|
66
|
+
}, {
|
|
67
|
+
kind: "polygon";
|
|
68
|
+
points: [number, number][];
|
|
69
|
+
}>]>;
|
|
70
|
+
/** 裁剪区 IR 类型(4 形状判别 union) */
|
|
71
|
+
export type IRClipSpec = z.infer<typeof ClipSpecSchema>;
|
|
72
|
+
//# sourceMappingURL=clip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clip.d.ts","sourceRoot":"","sources":["../../../src/ir/clip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwCxB,CAAC;AAEJ,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@ const require_position = require("./position/position.cjs");
|
|
|
2
2
|
const require_polar_position = require("./position/polar-position.cjs");
|
|
3
3
|
const require_at_position = require("./position/at-position.cjs");
|
|
4
4
|
const require_offset_position = require("./position/offset-position.cjs");
|
|
5
|
+
const require_between_position = require("./position/between-position.cjs");
|
|
5
6
|
let zod = require("zod");
|
|
6
7
|
//#region src/ir/coordinate.ts
|
|
7
8
|
/**
|
|
@@ -15,8 +16,9 @@ var CoordinateSchema = zod.z.object({
|
|
|
15
16
|
require_position.PositionSchema,
|
|
16
17
|
require_polar_position.PolarPositionSchema,
|
|
17
18
|
require_at_position.AtPositionSchema,
|
|
18
|
-
require_offset_position.OffsetPositionSchema
|
|
19
|
-
|
|
19
|
+
require_offset_position.OffsetPositionSchema,
|
|
20
|
+
require_between_position.BetweenPositionSchema
|
|
21
|
+
]).describe("Coordinate position; Cartesian [x, y], polar, relative-to-another-node (`at`-style), offset from a base point (`{ of, offset }` form), or between two endpoints (`{ between: [A, B], t }`). Resolved at compile time.")
|
|
20
22
|
}).describe("Coordinate placeholder: a named point with no visual; usable as a target for paths and as an anchor for relative positioning. Mirrors TikZ `\\coordinate (id) at (...);`");
|
|
21
23
|
//#endregion
|
|
22
24
|
exports.CoordinateSchema = CoordinateSchema;
|
|
@@ -36,7 +36,7 @@ export declare const CoordinateSchema: z.ZodObject<{
|
|
|
36
36
|
}, {
|
|
37
37
|
of: string | [number, number] | import('./position').PolarPosition;
|
|
38
38
|
offset: [number, number];
|
|
39
|
-
}>]>;
|
|
39
|
+
}>, z.ZodType<import('./position').IRBetweenPosition, z.ZodTypeDef, import('./position').IRBetweenPosition>]>;
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
41
|
type: "coordinate";
|
|
42
42
|
id: string;
|
|
@@ -47,7 +47,7 @@ export declare const CoordinateSchema: z.ZodObject<{
|
|
|
47
47
|
} | {
|
|
48
48
|
of: string | [number, number] | import('./position').PolarPosition;
|
|
49
49
|
offset: [number, number];
|
|
50
|
-
};
|
|
50
|
+
} | import('./position').IRBetweenPosition;
|
|
51
51
|
}, {
|
|
52
52
|
type: "coordinate";
|
|
53
53
|
id: string;
|
|
@@ -58,7 +58,7 @@ export declare const CoordinateSchema: z.ZodObject<{
|
|
|
58
58
|
} | {
|
|
59
59
|
of: string | [number, number] | import('./position').PolarPosition;
|
|
60
60
|
offset: [number, number];
|
|
61
|
-
};
|
|
61
|
+
} | import('./position').IRBetweenPosition;
|
|
62
62
|
}>;
|
|
63
63
|
/** Coordinate IR 类型 `{ type:'coordinate', id, position }` */
|
|
64
64
|
export type IRCoordinate = z.infer<typeof CoordinateSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../../../src/ir/coordinate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../../../src/ir/coordinate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyB1B,CAAC;AAEJ,6DAA6D;AAC7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,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,SAAS,CAAC;AACxB,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"}
|
|
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,SAAS,CAAC;AACxB,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
|
@@ -2,6 +2,7 @@ const require_position = require("./position/position.cjs");
|
|
|
2
2
|
const require_polar_position = require("./position/polar-position.cjs");
|
|
3
3
|
const require_at_position = require("./position/at-position.cjs");
|
|
4
4
|
const require_offset_position = require("./position/offset-position.cjs");
|
|
5
|
+
const require_between_position = require("./position/between-position.cjs");
|
|
5
6
|
const require_font = require("./font.cjs");
|
|
6
7
|
const require_paint = require("./paint.cjs");
|
|
7
8
|
const require_text = require("./text.cjs");
|
|
@@ -54,8 +55,9 @@ var NodeSchema = zod.z.object({
|
|
|
54
55
|
require_position.PositionSchema,
|
|
55
56
|
require_polar_position.PolarPositionSchema,
|
|
56
57
|
require_at_position.AtPositionSchema,
|
|
57
|
-
require_offset_position.OffsetPositionSchema
|
|
58
|
-
|
|
58
|
+
require_offset_position.OffsetPositionSchema,
|
|
59
|
+
require_between_position.BetweenPositionSchema
|
|
60
|
+
]).describe("Center point of the node content box; Cartesian [x, y], polar, relative-to-another-node (`at`-style with `direction` / `of` / `distance?`), offset from a base point (`{ of, offset }` form mirroring TikZ `calc`), or between two endpoints (`{ between: [A, B], t }` proportional point). All non-Cartesian forms resolve at compile time."),
|
|
59
61
|
rotate: zod.z.number().optional().describe("Rotation in degrees around the node center; positive = clockwise (matches TikZ rotate=...)"),
|
|
60
62
|
text: require_text.TextBlockSchema.optional(),
|
|
61
63
|
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)."),
|
package/dist/lib/ir/node.d.ts
CHANGED
|
@@ -153,7 +153,7 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
153
153
|
}, {
|
|
154
154
|
of: string | [number, number] | import('./position').PolarPosition;
|
|
155
155
|
offset: [number, number];
|
|
156
|
-
}>]>;
|
|
156
|
+
}>, z.ZodType<import('./position').IRBetweenPosition, z.ZodTypeDef, import('./position').IRBetweenPosition>]>;
|
|
157
157
|
rotate: z.ZodOptional<z.ZodNumber>;
|
|
158
158
|
text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
159
159
|
text: z.ZodString;
|
|
@@ -524,7 +524,7 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
524
524
|
} | {
|
|
525
525
|
of: string | [number, number] | import('./position').PolarPosition;
|
|
526
526
|
offset: [number, number];
|
|
527
|
-
};
|
|
527
|
+
} | import('./position').IRBetweenPosition;
|
|
528
528
|
fill?: string | {
|
|
529
529
|
type: "linearGradient";
|
|
530
530
|
stops: {
|
|
@@ -555,6 +555,7 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
555
555
|
href: string;
|
|
556
556
|
fit?: "fill" | "contain" | "cover" | undefined;
|
|
557
557
|
} | undefined;
|
|
558
|
+
id?: string | undefined;
|
|
558
559
|
color?: string | undefined;
|
|
559
560
|
opacity?: number | undefined;
|
|
560
561
|
shape?: string | undefined;
|
|
@@ -576,7 +577,6 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
576
577
|
style?: "normal" | "italic" | "oblique" | undefined;
|
|
577
578
|
} | undefined;
|
|
578
579
|
scale?: number | undefined;
|
|
579
|
-
id?: string | undefined;
|
|
580
580
|
textColor?: string | undefined;
|
|
581
581
|
label?: {
|
|
582
582
|
text: string;
|
|
@@ -649,7 +649,7 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
649
649
|
} | {
|
|
650
650
|
of: string | [number, number] | import('./position').PolarPosition;
|
|
651
651
|
offset: [number, number];
|
|
652
|
-
};
|
|
652
|
+
} | import('./position').IRBetweenPosition;
|
|
653
653
|
fill?: string | {
|
|
654
654
|
type: "linearGradient";
|
|
655
655
|
stops: {
|
|
@@ -680,6 +680,7 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
680
680
|
href: string;
|
|
681
681
|
fit?: "fill" | "contain" | "cover" | undefined;
|
|
682
682
|
} | undefined;
|
|
683
|
+
id?: string | undefined;
|
|
683
684
|
color?: string | undefined;
|
|
684
685
|
opacity?: number | undefined;
|
|
685
686
|
shape?: string | undefined;
|
|
@@ -701,7 +702,6 @@ export declare const NodeSchema: z.ZodObject<{
|
|
|
701
702
|
style?: "normal" | "italic" | "oblique" | undefined;
|
|
702
703
|
} | undefined;
|
|
703
704
|
scale?: number | undefined;
|
|
704
|
-
id?: string | undefined;
|
|
705
705
|
textColor?: string | undefined;
|
|
706
706
|
label?: {
|
|
707
707
|
text: string;
|
|
@@ -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;AAMxC;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEzD,+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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DzB,CAAC;AAEJ,uBAAuB;AACvB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6MpB,CAAC;AAEJ,sCAAsC;AACtC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -58,8 +58,8 @@ export declare const ArrowEndDetailSchema: z.ZodObject<{
|
|
|
58
58
|
opacity?: number | undefined;
|
|
59
59
|
shape?: string | undefined;
|
|
60
60
|
lineWidth?: number | undefined;
|
|
61
|
-
scale?: number | undefined;
|
|
62
61
|
width?: number | undefined;
|
|
62
|
+
scale?: number | undefined;
|
|
63
63
|
}, {
|
|
64
64
|
length?: number | undefined;
|
|
65
65
|
fill?: string | undefined;
|
|
@@ -67,8 +67,8 @@ export declare const ArrowEndDetailSchema: z.ZodObject<{
|
|
|
67
67
|
opacity?: number | undefined;
|
|
68
68
|
shape?: string | undefined;
|
|
69
69
|
lineWidth?: number | undefined;
|
|
70
|
-
scale?: number | undefined;
|
|
71
70
|
width?: number | undefined;
|
|
71
|
+
scale?: number | undefined;
|
|
72
72
|
}>;
|
|
73
73
|
/**
|
|
74
74
|
* Path 级箭头详细配置 schema
|
|
@@ -100,8 +100,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
100
100
|
opacity?: number | undefined;
|
|
101
101
|
shape?: string | undefined;
|
|
102
102
|
lineWidth?: number | undefined;
|
|
103
|
-
scale?: number | undefined;
|
|
104
103
|
width?: number | undefined;
|
|
104
|
+
scale?: number | undefined;
|
|
105
105
|
}, {
|
|
106
106
|
length?: number | undefined;
|
|
107
107
|
fill?: string | undefined;
|
|
@@ -109,8 +109,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
109
109
|
opacity?: number | undefined;
|
|
110
110
|
shape?: string | undefined;
|
|
111
111
|
lineWidth?: number | undefined;
|
|
112
|
-
scale?: number | undefined;
|
|
113
112
|
width?: number | undefined;
|
|
113
|
+
scale?: number | undefined;
|
|
114
114
|
}>>;
|
|
115
115
|
end: z.ZodOptional<z.ZodObject<{
|
|
116
116
|
shape: z.ZodOptional<z.ZodString>;
|
|
@@ -128,8 +128,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
128
128
|
opacity?: number | undefined;
|
|
129
129
|
shape?: string | undefined;
|
|
130
130
|
lineWidth?: number | undefined;
|
|
131
|
-
scale?: number | undefined;
|
|
132
131
|
width?: number | undefined;
|
|
132
|
+
scale?: number | undefined;
|
|
133
133
|
}, {
|
|
134
134
|
length?: number | undefined;
|
|
135
135
|
fill?: string | undefined;
|
|
@@ -137,8 +137,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
137
137
|
opacity?: number | undefined;
|
|
138
138
|
shape?: string | undefined;
|
|
139
139
|
lineWidth?: number | undefined;
|
|
140
|
-
scale?: number | undefined;
|
|
141
140
|
width?: number | undefined;
|
|
141
|
+
scale?: number | undefined;
|
|
142
142
|
}>>;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
144
|
length?: number | undefined;
|
|
@@ -147,8 +147,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
147
147
|
opacity?: number | undefined;
|
|
148
148
|
shape?: string | undefined;
|
|
149
149
|
lineWidth?: number | undefined;
|
|
150
|
-
scale?: number | undefined;
|
|
151
150
|
width?: number | undefined;
|
|
151
|
+
scale?: number | undefined;
|
|
152
152
|
start?: {
|
|
153
153
|
length?: number | undefined;
|
|
154
154
|
fill?: string | undefined;
|
|
@@ -156,8 +156,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
156
156
|
opacity?: number | undefined;
|
|
157
157
|
shape?: string | undefined;
|
|
158
158
|
lineWidth?: number | undefined;
|
|
159
|
-
scale?: number | undefined;
|
|
160
159
|
width?: number | undefined;
|
|
160
|
+
scale?: number | undefined;
|
|
161
161
|
} | undefined;
|
|
162
162
|
end?: {
|
|
163
163
|
length?: number | undefined;
|
|
@@ -166,8 +166,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
166
166
|
opacity?: number | undefined;
|
|
167
167
|
shape?: string | undefined;
|
|
168
168
|
lineWidth?: number | undefined;
|
|
169
|
-
scale?: number | undefined;
|
|
170
169
|
width?: number | undefined;
|
|
170
|
+
scale?: number | undefined;
|
|
171
171
|
} | undefined;
|
|
172
172
|
}, {
|
|
173
173
|
length?: number | undefined;
|
|
@@ -176,8 +176,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
176
176
|
opacity?: number | undefined;
|
|
177
177
|
shape?: string | undefined;
|
|
178
178
|
lineWidth?: number | undefined;
|
|
179
|
-
scale?: number | undefined;
|
|
180
179
|
width?: number | undefined;
|
|
180
|
+
scale?: number | undefined;
|
|
181
181
|
start?: {
|
|
182
182
|
length?: number | undefined;
|
|
183
183
|
fill?: string | undefined;
|
|
@@ -185,8 +185,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
185
185
|
opacity?: number | undefined;
|
|
186
186
|
shape?: string | undefined;
|
|
187
187
|
lineWidth?: number | undefined;
|
|
188
|
-
scale?: number | undefined;
|
|
189
188
|
width?: number | undefined;
|
|
189
|
+
scale?: number | undefined;
|
|
190
190
|
} | undefined;
|
|
191
191
|
end?: {
|
|
192
192
|
length?: number | undefined;
|
|
@@ -195,8 +195,8 @@ export declare const ArrowDetailSchema: z.ZodObject<{
|
|
|
195
195
|
opacity?: number | undefined;
|
|
196
196
|
shape?: string | undefined;
|
|
197
197
|
lineWidth?: number | undefined;
|
|
198
|
-
scale?: number | undefined;
|
|
199
198
|
width?: number | undefined;
|
|
199
|
+
scale?: number | undefined;
|
|
200
200
|
} | undefined;
|
|
201
201
|
}>;
|
|
202
202
|
/** 端点级箭头视觉规格 */
|