@retikz/core 0.3.0-alpha.5 → 0.3.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/define.d.ts +9 -0
- package/dist/es/arrows/define.d.ts.map +1 -0
- package/dist/es/arrows/define.js +10 -0
- package/dist/es/arrows/index.d.ts +3 -1
- package/dist/es/arrows/index.d.ts.map +1 -1
- package/dist/es/arrows/index.js +14 -1
- package/dist/es/arrows/types.d.ts +4 -2
- package/dist/es/arrows/types.d.ts.map +1 -1
- package/dist/es/compile/anchor-cache.d.ts +3 -3
- package/dist/es/compile/anchor-cache.d.ts.map +1 -1
- package/dist/es/compile/anchor-cache.js +18 -5
- package/dist/es/compile/compile.d.ts +5 -14
- package/dist/es/compile/compile.d.ts.map +1 -1
- package/dist/es/compile/compile.js +39 -39
- package/dist/es/compile/{lowerComposites.d.ts → composite.d.ts} +9 -2
- package/dist/es/compile/composite.d.ts.map +1 -0
- package/dist/es/compile/{lowerComposites.js → composite.js} +9 -1
- package/dist/es/compile/constant.d.ts +32 -0
- package/dist/es/compile/constant.d.ts.map +1 -0
- package/dist/es/compile/constant.js +23 -0
- package/dist/es/compile/direction.d.ts +27 -0
- package/dist/es/compile/direction.d.ts.map +1 -0
- package/dist/es/compile/direction.js +30 -0
- package/dist/es/compile/index.d.ts +3 -1
- package/dist/es/compile/index.d.ts.map +1 -1
- package/dist/es/compile/name-stack.d.ts +3 -1
- package/dist/es/compile/name-stack.d.ts.map +1 -1
- package/dist/es/compile/name-stack.js +5 -1
- package/dist/es/compile/node.d.ts +18 -7
- package/dist/es/compile/node.d.ts.map +1 -1
- package/dist/es/compile/node.js +39 -63
- package/dist/es/compile/paint.js +1 -1
- package/dist/es/compile/path/anchor.d.ts +4 -3
- package/dist/es/compile/path/anchor.d.ts.map +1 -1
- package/dist/es/compile/path/anchor.js +9 -12
- package/dist/es/compile/path/index.d.ts +6 -8
- package/dist/es/compile/path/index.d.ts.map +1 -1
- package/dist/es/compile/path/index.js +57 -34
- package/dist/es/compile/path/relative.d.ts +1 -1
- package/dist/es/compile/path/relative.js +1 -1
- package/dist/es/compile/path/shrink.d.ts +3 -1
- package/dist/es/compile/path/shrink.d.ts.map +1 -1
- package/dist/es/compile/path/shrink.js +16 -11
- package/dist/es/compile/position.d.ts +2 -2
- package/dist/es/compile/position.d.ts.map +1 -1
- package/dist/es/compile/position.js +6 -19
- package/dist/es/compile/precision.d.ts +1 -1
- package/dist/es/compile/precision.d.ts.map +1 -1
- package/dist/es/compile/precision.js +2 -2
- package/dist/es/compile/scope.d.ts +7 -5
- package/dist/es/compile/scope.d.ts.map +1 -1
- package/dist/es/compile/scope.js +29 -13
- package/dist/es/compile/style.d.ts +2 -2
- package/dist/es/compile/style.d.ts.map +1 -1
- package/dist/es/compile/style.js +2 -2
- package/dist/es/composites/define.d.ts +8 -0
- package/dist/es/composites/define.d.ts.map +1 -0
- package/dist/es/composites/{types.js → define.js} +2 -2
- package/dist/es/composites/index.d.ts +1 -1
- package/dist/es/composites/index.d.ts.map +1 -1
- package/dist/es/composites/types.d.ts +0 -6
- package/dist/es/composites/types.d.ts.map +1 -1
- package/dist/es/geometry/anchor.d.ts +33 -0
- package/dist/es/geometry/anchor.d.ts.map +1 -0
- package/dist/es/geometry/anchor.js +45 -0
- package/dist/es/geometry/bend.d.ts +1 -1
- package/dist/es/geometry/bend.js +2 -2
- package/dist/es/geometry/circle.d.ts +4 -4
- package/dist/es/geometry/circle.d.ts.map +1 -1
- package/dist/es/geometry/circle.js +3 -3
- package/dist/es/geometry/{roundedContour.d.ts → contour.d.ts} +4 -5
- package/dist/es/geometry/contour.d.ts.map +1 -0
- package/dist/es/geometry/{roundedContour.js → contour.js} +22 -34
- package/dist/es/geometry/diamond.d.ts +3 -3
- package/dist/es/geometry/diamond.d.ts.map +1 -1
- package/dist/es/geometry/diamond.js +2 -2
- package/dist/{lib/geometry/_edge.d.ts → es/geometry/edge.d.ts} +1 -1
- package/dist/es/geometry/edge.d.ts.map +1 -0
- package/dist/es/geometry/{_edge.js → edge.js} +1 -1
- package/dist/es/geometry/ellipse.d.ts +3 -3
- package/dist/es/geometry/ellipse.d.ts.map +1 -1
- package/dist/es/geometry/ellipse.js +2 -2
- package/dist/es/geometry/index.d.ts +2 -1
- package/dist/es/geometry/index.d.ts.map +1 -1
- package/dist/es/geometry/point.d.ts +6 -0
- package/dist/es/geometry/point.d.ts.map +1 -1
- package/dist/es/geometry/point.js +17 -0
- package/dist/es/geometry/rect.d.ts +4 -17
- package/dist/es/geometry/rect.d.ts.map +1 -1
- package/dist/es/geometry/rect.js +4 -16
- package/dist/es/geometry/segment.d.ts.map +1 -1
- package/dist/es/geometry/segment.js +25 -47
- package/dist/{lib/geometry/_transform.d.ts → es/geometry/transform.d.ts} +1 -1
- package/dist/es/geometry/transform.d.ts.map +1 -0
- package/dist/es/geometry/{_transform.js → transform.js} +1 -1
- package/dist/es/index.d.ts +11 -11
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +17 -14
- package/dist/es/ir/animation.d.ts +6 -5
- package/dist/es/ir/animation.d.ts.map +1 -1
- package/dist/es/ir/boundary.d.ts +1 -1
- package/dist/es/ir/boundary.d.ts.map +1 -1
- package/dist/es/ir/coordinate.d.ts +8 -8
- package/dist/es/ir/node.d.ts +73 -72
- package/dist/es/ir/node.d.ts.map +1 -1
- package/dist/es/ir/node.js +23 -23
- package/dist/es/ir/paint.d.ts +19 -18
- package/dist/es/ir/paint.d.ts.map +1 -1
- package/dist/es/ir/paint.js +10 -10
- package/dist/es/ir/path/arrow.d.ts +15 -14
- package/dist/es/ir/path/arrow.d.ts.map +1 -1
- package/dist/es/ir/path/arrow.js +18 -16
- package/dist/es/ir/path/path.d.ts +893 -152
- package/dist/es/ir/path/path.d.ts.map +1 -1
- package/dist/es/ir/path/path.js +1 -1
- package/dist/es/ir/path/step.d.ts +932 -20
- package/dist/es/ir/path/step.d.ts.map +1 -1
- package/dist/es/ir/path/step.js +73 -22
- package/dist/es/ir/path/target.js +3 -3
- package/dist/es/ir/position/at-position.d.ts +18 -18
- package/dist/es/ir/position/at-position.d.ts.map +1 -1
- package/dist/es/ir/position/at-position.js +11 -11
- package/dist/es/ir/scope.d.ts +2559 -1057
- package/dist/es/ir/scope.d.ts.map +1 -1
- package/dist/es/ir/scope.js +5 -5
- package/dist/es/ir/transform.d.ts +44 -17
- package/dist/es/ir/transform.d.ts.map +1 -1
- package/dist/es/ir/transform.js +10 -3
- package/dist/es/parsers/index.d.ts +3 -3
- package/dist/es/parsers/index.d.ts.map +1 -1
- package/dist/es/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
- package/dist/es/parsers/node-target.d.ts.map +1 -0
- package/dist/es/parsers/{parseNodeTarget.js → node-target.js} +10 -8
- package/dist/{lib/parsers/parseTargetSugar.d.ts → es/parsers/target-sugar.d.ts} +1 -1
- package/dist/es/parsers/target-sugar.d.ts.map +1 -0
- package/dist/es/parsers/{parseTargetSugar.js → target-sugar.js} +9 -4
- package/dist/{lib/parsers/parseWay.d.ts → es/parsers/way.d.ts} +1 -1
- package/dist/es/parsers/way.d.ts.map +1 -0
- package/dist/es/parsers/{parseWay.js → way.js} +9 -5
- package/dist/es/path-generators/define.d.ts.map +1 -0
- package/dist/es/{pathGenerators → path-generators}/define.js +1 -1
- package/dist/es/path-generators/index.d.ts.map +1 -0
- package/dist/es/path-generators/types.d.ts.map +1 -0
- package/dist/es/patterns/define.d.ts +9 -0
- package/dist/es/patterns/define.d.ts.map +1 -0
- package/dist/es/patterns/define.js +10 -0
- package/dist/es/patterns/index.d.ts +1 -0
- package/dist/es/patterns/index.d.ts.map +1 -1
- package/dist/es/patterns/index.js +42 -35
- package/dist/es/presets/animation.js +2 -2
- package/dist/es/primitive/marker.d.ts +1 -1
- package/dist/es/primitive/paint.d.ts +1 -1
- package/dist/es/primitive/path.d.ts +1 -1
- package/dist/es/shapes/arc.js +2 -2
- package/dist/{lib/shapes/_contour.d.ts → es/shapes/contour.d.ts} +6 -3
- package/dist/es/shapes/contour.d.ts.map +1 -0
- package/dist/es/shapes/{_contour.js → contour.js} +14 -2
- package/dist/es/shapes/ellipse.js +2 -2
- package/dist/es/shapes/index.d.ts +1 -1
- package/dist/es/shapes/index.d.ts.map +1 -1
- package/dist/es/shapes/index.js +1 -1
- package/dist/es/shapes/polygon.d.ts +1 -1
- package/dist/es/shapes/polygon.d.ts.map +1 -1
- package/dist/es/shapes/polygon.js +26 -21
- package/dist/es/shapes/rectangle.js +5 -5
- package/dist/es/shapes/sector.d.ts.map +1 -1
- package/dist/es/shapes/sector.js +30 -22
- package/dist/es/shapes/{_shared.d.ts → shared.d.ts} +4 -8
- package/dist/es/shapes/shared.d.ts.map +1 -0
- package/dist/es/shapes/{_shared.js → shared.js} +8 -12
- package/dist/es/shapes/star.d.ts.map +1 -1
- package/dist/es/shapes/star.js +4 -14
- package/dist/lib/arrows/define.cjs +10 -0
- package/dist/lib/arrows/define.d.ts +9 -0
- package/dist/lib/arrows/define.d.ts.map +1 -0
- package/dist/lib/arrows/index.cjs +14 -1
- package/dist/lib/arrows/index.d.ts +3 -1
- package/dist/lib/arrows/index.d.ts.map +1 -1
- package/dist/lib/arrows/types.d.ts +4 -2
- package/dist/lib/arrows/types.d.ts.map +1 -1
- package/dist/lib/compile/anchor-cache.cjs +17 -4
- package/dist/lib/compile/anchor-cache.d.ts +3 -3
- package/dist/lib/compile/anchor-cache.d.ts.map +1 -1
- package/dist/lib/compile/compile.cjs +37 -37
- package/dist/lib/compile/compile.d.ts +5 -14
- package/dist/lib/compile/compile.d.ts.map +1 -1
- package/dist/lib/compile/{lowerComposites.cjs → composite.cjs} +9 -1
- package/dist/lib/compile/{lowerComposites.d.ts → composite.d.ts} +9 -2
- package/dist/lib/compile/composite.d.ts.map +1 -0
- package/dist/lib/compile/constant.cjs +24 -0
- package/dist/lib/compile/constant.d.ts +32 -0
- package/dist/lib/compile/constant.d.ts.map +1 -0
- package/dist/lib/compile/direction.cjs +31 -0
- package/dist/lib/compile/direction.d.ts +27 -0
- package/dist/lib/compile/direction.d.ts.map +1 -0
- package/dist/lib/compile/index.d.ts +3 -1
- package/dist/lib/compile/index.d.ts.map +1 -1
- package/dist/lib/compile/name-stack.cjs +5 -1
- package/dist/lib/compile/name-stack.d.ts +3 -1
- package/dist/lib/compile/name-stack.d.ts.map +1 -1
- package/dist/lib/compile/node.cjs +39 -62
- package/dist/lib/compile/node.d.ts +18 -7
- package/dist/lib/compile/node.d.ts.map +1 -1
- package/dist/lib/compile/paint.cjs +1 -1
- package/dist/lib/compile/path/anchor.cjs +10 -12
- package/dist/lib/compile/path/anchor.d.ts +4 -3
- package/dist/lib/compile/path/anchor.d.ts.map +1 -1
- package/dist/lib/compile/path/index.cjs +56 -33
- package/dist/lib/compile/path/index.d.ts +6 -8
- package/dist/lib/compile/path/index.d.ts.map +1 -1
- package/dist/lib/compile/path/relative.cjs +1 -1
- package/dist/lib/compile/path/relative.d.ts +1 -1
- package/dist/lib/compile/path/shrink.cjs +16 -11
- package/dist/lib/compile/path/shrink.d.ts +3 -1
- package/dist/lib/compile/path/shrink.d.ts.map +1 -1
- package/dist/lib/compile/position.cjs +6 -19
- package/dist/lib/compile/position.d.ts +2 -2
- package/dist/lib/compile/position.d.ts.map +1 -1
- package/dist/lib/compile/precision.cjs +2 -2
- package/dist/lib/compile/precision.d.ts +1 -1
- package/dist/lib/compile/precision.d.ts.map +1 -1
- package/dist/lib/compile/scope.cjs +29 -13
- package/dist/lib/compile/scope.d.ts +7 -5
- package/dist/lib/compile/scope.d.ts.map +1 -1
- package/dist/lib/compile/style.cjs +2 -2
- package/dist/lib/compile/style.d.ts +2 -2
- package/dist/lib/compile/style.d.ts.map +1 -1
- package/dist/lib/composites/{types.cjs → define.cjs} +2 -2
- package/dist/lib/composites/define.d.ts +8 -0
- package/dist/lib/composites/define.d.ts.map +1 -0
- package/dist/lib/composites/index.d.ts +1 -1
- package/dist/lib/composites/index.d.ts.map +1 -1
- package/dist/lib/composites/types.d.ts +0 -6
- package/dist/lib/composites/types.d.ts.map +1 -1
- package/dist/lib/geometry/anchor.cjs +47 -0
- package/dist/lib/geometry/anchor.d.ts +33 -0
- package/dist/lib/geometry/anchor.d.ts.map +1 -0
- package/dist/lib/geometry/bend.cjs +2 -2
- package/dist/lib/geometry/bend.d.ts +1 -1
- package/dist/lib/geometry/circle.cjs +9 -9
- package/dist/lib/geometry/circle.d.ts +4 -4
- package/dist/lib/geometry/circle.d.ts.map +1 -1
- package/dist/lib/geometry/{roundedContour.cjs → contour.cjs} +21 -32
- package/dist/lib/geometry/{roundedContour.d.ts → contour.d.ts} +4 -5
- package/dist/lib/geometry/contour.d.ts.map +1 -0
- package/dist/lib/geometry/diamond.cjs +7 -7
- package/dist/lib/geometry/diamond.d.ts +3 -3
- package/dist/lib/geometry/diamond.d.ts.map +1 -1
- package/dist/lib/geometry/{_edge.cjs → edge.cjs} +1 -1
- package/dist/{es/geometry/_edge.d.ts → lib/geometry/edge.d.ts} +1 -1
- package/dist/lib/geometry/edge.d.ts.map +1 -0
- package/dist/lib/geometry/ellipse.cjs +8 -8
- package/dist/lib/geometry/ellipse.d.ts +3 -3
- package/dist/lib/geometry/ellipse.d.ts.map +1 -1
- package/dist/lib/geometry/index.d.ts +2 -1
- package/dist/lib/geometry/index.d.ts.map +1 -1
- package/dist/lib/geometry/point.cjs +17 -0
- package/dist/lib/geometry/point.d.ts +6 -0
- package/dist/lib/geometry/point.d.ts.map +1 -1
- package/dist/lib/geometry/rect.cjs +9 -22
- package/dist/lib/geometry/rect.d.ts +4 -17
- package/dist/lib/geometry/rect.d.ts.map +1 -1
- package/dist/lib/geometry/segment.cjs +25 -47
- package/dist/lib/geometry/segment.d.ts.map +1 -1
- package/dist/lib/geometry/{_transform.cjs → transform.cjs} +1 -1
- package/dist/{es/geometry/_transform.d.ts → lib/geometry/transform.d.ts} +1 -1
- package/dist/lib/geometry/transform.d.ts.map +1 -0
- package/dist/lib/index.cjs +29 -22
- package/dist/lib/index.d.ts +11 -11
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ir/animation.d.ts +6 -5
- package/dist/lib/ir/animation.d.ts.map +1 -1
- package/dist/lib/ir/boundary.d.ts +1 -1
- package/dist/lib/ir/boundary.d.ts.map +1 -1
- package/dist/lib/ir/coordinate.d.ts +8 -8
- package/dist/lib/ir/node.cjs +23 -23
- package/dist/lib/ir/node.d.ts +73 -72
- package/dist/lib/ir/node.d.ts.map +1 -1
- package/dist/lib/ir/paint.cjs +10 -10
- package/dist/lib/ir/paint.d.ts +19 -18
- package/dist/lib/ir/paint.d.ts.map +1 -1
- package/dist/lib/ir/path/arrow.cjs +18 -16
- package/dist/lib/ir/path/arrow.d.ts +15 -14
- package/dist/lib/ir/path/arrow.d.ts.map +1 -1
- package/dist/lib/ir/path/path.cjs +1 -1
- package/dist/lib/ir/path/path.d.ts +893 -152
- package/dist/lib/ir/path/path.d.ts.map +1 -1
- package/dist/lib/ir/path/step.cjs +73 -21
- package/dist/lib/ir/path/step.d.ts +932 -20
- package/dist/lib/ir/path/step.d.ts.map +1 -1
- package/dist/lib/ir/path/target.cjs +3 -3
- package/dist/lib/ir/position/at-position.cjs +11 -11
- package/dist/lib/ir/position/at-position.d.ts +18 -18
- package/dist/lib/ir/position/at-position.d.ts.map +1 -1
- package/dist/lib/ir/scope.cjs +5 -5
- package/dist/lib/ir/scope.d.ts +2559 -1057
- package/dist/lib/ir/scope.d.ts.map +1 -1
- package/dist/lib/ir/transform.cjs +9 -2
- package/dist/lib/ir/transform.d.ts +44 -17
- package/dist/lib/ir/transform.d.ts.map +1 -1
- package/dist/lib/parsers/index.d.ts +3 -3
- package/dist/lib/parsers/index.d.ts.map +1 -1
- package/dist/lib/parsers/{parseNodeTarget.cjs → node-target.cjs} +10 -8
- package/dist/lib/parsers/{parseNodeTarget.d.ts → node-target.d.ts} +1 -1
- package/dist/lib/parsers/node-target.d.ts.map +1 -0
- package/dist/lib/parsers/{parseTargetSugar.cjs → target-sugar.cjs} +9 -4
- package/dist/{es/parsers/parseTargetSugar.d.ts → lib/parsers/target-sugar.d.ts} +1 -1
- package/dist/lib/parsers/target-sugar.d.ts.map +1 -0
- package/dist/lib/parsers/{parseWay.cjs → way.cjs} +12 -8
- package/dist/{es/parsers/parseWay.d.ts → lib/parsers/way.d.ts} +1 -1
- package/dist/lib/parsers/way.d.ts.map +1 -0
- package/dist/lib/{pathGenerators → path-generators}/define.cjs +1 -1
- package/dist/lib/path-generators/define.d.ts.map +1 -0
- package/dist/lib/path-generators/index.d.ts.map +1 -0
- package/dist/lib/path-generators/types.d.ts.map +1 -0
- package/dist/lib/patterns/define.cjs +10 -0
- package/dist/lib/patterns/define.d.ts +9 -0
- package/dist/lib/patterns/define.d.ts.map +1 -0
- package/dist/lib/patterns/index.cjs +42 -35
- package/dist/lib/patterns/index.d.ts +1 -0
- package/dist/lib/patterns/index.d.ts.map +1 -1
- package/dist/lib/presets/animation.cjs +2 -2
- package/dist/lib/primitive/marker.d.ts +1 -1
- package/dist/lib/primitive/paint.d.ts +1 -1
- package/dist/lib/primitive/path.d.ts +1 -1
- package/dist/lib/shapes/arc.cjs +4 -4
- package/dist/lib/shapes/{_contour.cjs → contour.cjs} +14 -1
- package/dist/{es/shapes/_contour.d.ts → lib/shapes/contour.d.ts} +6 -3
- package/dist/lib/shapes/contour.d.ts.map +1 -0
- package/dist/lib/shapes/ellipse.cjs +2 -2
- package/dist/lib/shapes/index.cjs +1 -1
- package/dist/lib/shapes/index.d.ts +1 -1
- package/dist/lib/shapes/index.d.ts.map +1 -1
- package/dist/lib/shapes/polygon.cjs +29 -24
- package/dist/lib/shapes/polygon.d.ts +1 -1
- package/dist/lib/shapes/polygon.d.ts.map +1 -1
- package/dist/lib/shapes/rectangle.cjs +11 -11
- package/dist/lib/shapes/sector.cjs +41 -33
- package/dist/lib/shapes/sector.d.ts.map +1 -1
- package/dist/lib/shapes/{_shared.cjs → shared.cjs} +7 -12
- package/dist/lib/shapes/{_shared.d.ts → shared.d.ts} +4 -8
- package/dist/lib/shapes/shared.d.ts.map +1 -0
- package/dist/lib/shapes/star.cjs +7 -17
- package/dist/lib/shapes/star.d.ts.map +1 -1
- package/package.json +2 -3
- package/dist/es/compile/lowerComposites.d.ts.map +0 -1
- package/dist/es/geometry/_edge.d.ts.map +0 -1
- package/dist/es/geometry/_transform.d.ts.map +0 -1
- package/dist/es/geometry/roundedContour.d.ts.map +0 -1
- package/dist/es/parsers/parseNodeTarget.d.ts.map +0 -1
- package/dist/es/parsers/parseTargetSugar.d.ts.map +0 -1
- package/dist/es/parsers/parseWay.d.ts.map +0 -1
- package/dist/es/pathGenerators/define.d.ts.map +0 -1
- package/dist/es/pathGenerators/index.d.ts.map +0 -1
- package/dist/es/pathGenerators/types.d.ts.map +0 -1
- package/dist/es/shapes/_contour.d.ts.map +0 -1
- package/dist/es/shapes/_shared.d.ts.map +0 -1
- package/dist/lib/compile/lowerComposites.d.ts.map +0 -1
- package/dist/lib/geometry/_edge.d.ts.map +0 -1
- package/dist/lib/geometry/_transform.d.ts.map +0 -1
- package/dist/lib/geometry/roundedContour.d.ts.map +0 -1
- package/dist/lib/parsers/parseNodeTarget.d.ts.map +0 -1
- package/dist/lib/parsers/parseTargetSugar.d.ts.map +0 -1
- package/dist/lib/parsers/parseWay.d.ts.map +0 -1
- package/dist/lib/pathGenerators/define.d.ts.map +0 -1
- package/dist/lib/pathGenerators/index.d.ts.map +0 -1
- package/dist/lib/pathGenerators/types.d.ts.map +0 -1
- package/dist/lib/shapes/_contour.d.ts.map +0 -1
- package/dist/lib/shapes/_shared.d.ts.map +0 -1
- /package/dist/es/{pathGenerators → path-generators}/define.d.ts +0 -0
- /package/dist/es/{pathGenerators → path-generators}/index.d.ts +0 -0
- /package/dist/es/{pathGenerators → path-generators}/types.d.ts +0 -0
- /package/dist/lib/{pathGenerators → path-generators}/define.d.ts +0 -0
- /package/dist/lib/{pathGenerators → path-generators}/index.d.ts +0 -0
- /package/dist/lib/{pathGenerators → path-generators}/types.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDzB,CAAC;AAEJ,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQyC,CAAC;AAErE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS4C,CAAC;AAExE,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,4BAA4B;AAC5B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,oCAAoC;AACpC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,gCAAgC;AAChC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,kCAAkC;AAClC,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,sCAAsC;AACtC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,6EAA6E;AAC7E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/es/ir/path/step.js
CHANGED
|
@@ -41,10 +41,14 @@ var LineStepSchema = z.object({
|
|
|
41
41
|
to: TargetSchema.describe("Destination point of the line segment"),
|
|
42
42
|
label: StepLabelSchema.optional().describe("Edge label attached to this line segment")
|
|
43
43
|
}).describe("Line action: straight-line segment from cursor to target");
|
|
44
|
+
var FoldStepVia = {
|
|
45
|
+
HorizontalThenVertical: "-|",
|
|
46
|
+
VerticalThenHorizontal: "|-"
|
|
47
|
+
};
|
|
44
48
|
var FoldStepSchema = z.object({
|
|
45
49
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
46
|
-
kind: z.literal("
|
|
47
|
-
via: z.
|
|
50
|
+
kind: z.literal("fold").describe("Folded right-angle segment from cursor to target through one intermediate point (TikZ `-|` / `|-`)"),
|
|
51
|
+
via: z.nativeEnum(FoldStepVia).describe("Folding direction: `-|` first horizontal then vertical; `|-` first vertical then horizontal"),
|
|
48
52
|
to: TargetSchema.describe("Destination point of the folded segment"),
|
|
49
53
|
label: StepLabelSchema.optional().describe("Edge label attached to this folded segment; positioned along the corresponding leg by `position`.")
|
|
50
54
|
}).describe("Fold action: TikZ-style right-angle fold with a single intermediate point chosen by `via`");
|
|
@@ -83,23 +87,58 @@ var BendStepSchema = z.object({
|
|
|
83
87
|
looseness: z.number().finite().positive().optional().describe("Curve looseness factor controlling control-point distance from the endpoints (TikZ `looseness=`); default ~1. Larger values push the control points further out for a slacker curve. Also scales the default self-loop size when from equals to."),
|
|
84
88
|
label: StepLabelSchema.optional().describe("Edge label attached to this bend segment")
|
|
85
89
|
}).describe("Bend action: shorthand for an arc-like cubic; control points computed at compile time");
|
|
86
|
-
var
|
|
90
|
+
var refineArcStep = (step, ctx) => {
|
|
91
|
+
const hasRadius = step.radius !== void 0;
|
|
92
|
+
const hasRadiusX = step.radiusX !== void 0;
|
|
93
|
+
const hasRadiusY = step.radiusY !== void 0;
|
|
94
|
+
if (hasRadius && (hasRadiusX || hasRadiusY)) ctx.addIssue({
|
|
95
|
+
code: z.ZodIssueCode.custom,
|
|
96
|
+
path: ["radius"],
|
|
97
|
+
message: "Arc step must use either radius or radiusX/radiusY, not both"
|
|
98
|
+
});
|
|
99
|
+
if (!hasRadius && !(hasRadiusX && hasRadiusY)) ctx.addIssue({
|
|
100
|
+
code: z.ZodIssueCode.custom,
|
|
101
|
+
path: ["radius"],
|
|
102
|
+
message: "Arc step requires radius or both radiusX and radiusY"
|
|
103
|
+
});
|
|
104
|
+
if (hasRadiusX !== hasRadiusY) ctx.addIssue({
|
|
105
|
+
code: z.ZodIssueCode.custom,
|
|
106
|
+
path: hasRadiusX ? ["radiusY"] : ["radiusX"],
|
|
107
|
+
message: "Arc step requires radiusX and radiusY together"
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
var refinePartialAngles = (step, ctx, kind) => {
|
|
111
|
+
const hasStart = step.startAngle !== void 0;
|
|
112
|
+
const hasEnd = step.endAngle !== void 0;
|
|
113
|
+
if (hasStart !== hasEnd) ctx.addIssue({
|
|
114
|
+
code: z.ZodIssueCode.custom,
|
|
115
|
+
path: hasStart ? ["endAngle"] : ["startAngle"],
|
|
116
|
+
message: `${kind} requires startAngle and endAngle together`
|
|
117
|
+
});
|
|
118
|
+
if (step.closed === "closed" && (hasStart || hasEnd)) ctx.addIssue({
|
|
119
|
+
code: z.ZodIssueCode.custom,
|
|
120
|
+
path: ["closed"],
|
|
121
|
+
message: `${kind} closed:'closed' is only valid without angles`
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
var ArcStepBaseSchema = z.object({
|
|
87
125
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
88
126
|
kind: z.literal("arc").describe("Arc segment sweeping startAngle → endAngle around a center. Circular (radius) or elliptical (radiusX/radiusY). Center defaults to the cursor but can be set explicitly. Pen ends at the arc endpoint, not the center (TikZ `arc[start angle=…, end angle=…, radius=…]`)."),
|
|
89
|
-
startAngle: z.number().describe("Arc start angle in degrees, measured from +x axis. 0° = +x, 90° = +y = screen-down (visual clockwise under screen y-down); matches polar / Node label angle convention."),
|
|
90
|
-
endAngle: z.number().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
|
|
91
|
-
radius: z.number().positive().optional().describe("Circular arc radius in user units. Give
|
|
92
|
-
radiusX: z.number().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
93
|
-
radiusY: z.number().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
127
|
+
startAngle: z.number().finite().describe("Arc start angle in degrees, measured from +x axis. 0° = +x, 90° = +y = screen-down (visual clockwise under screen y-down); matches polar / Node label angle convention."),
|
|
128
|
+
endAngle: z.number().finite().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
|
|
129
|
+
radius: z.number().finite().positive().optional().describe("Circular arc radius in user units. Give either radius (circular) or both radiusX and radiusY (elliptical), never both."),
|
|
130
|
+
radiusX: z.number().finite().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
131
|
+
radiusY: z.number().finite().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
94
132
|
center: TargetSchema.optional().describe("Explicit arc center. Defaults to the cursor (previous step anchor) for backward compatibility; set it to anchor the arc independently of the cursor (used by <Sector> to draw a correct wedge)."),
|
|
95
133
|
label: StepLabelSchema.optional().describe("Edge label attached to this arc")
|
|
96
134
|
}).describe("Arc action: circular (radius) or elliptical (radiusX/radiusY) arc around a center (cursor by default, or explicit). Pen is left at the arc endpoint.");
|
|
97
|
-
var
|
|
135
|
+
var ArcStepSchema = ArcStepBaseSchema.superRefine(refineArcStep);
|
|
136
|
+
var CirclePathStepBaseSchema = z.object({
|
|
98
137
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
99
138
|
kind: z.literal("circlePath").describe("Circle centered at the cursor. Without angles: a full circle (TikZ `circle[radius=…]`), pen returns to center. With startAngle + endAngle: a partial arc closed per `closed` (half circle / segment)."),
|
|
100
|
-
radius: z.number().positive().describe("Circle radius in user units"),
|
|
101
|
-
startAngle: z.number().optional().describe("Partial-circle start angle in degrees (same convention as arc: 0°=+x, 90°=+y screen-down). Give both startAngle and endAngle for a partial circle, or neither for a full circle
|
|
102
|
-
endAngle: z.number().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
|
|
139
|
+
radius: z.number().finite().positive().describe("Circle radius in user units"),
|
|
140
|
+
startAngle: z.number().finite().optional().describe("Partial-circle start angle in degrees (same convention as arc: 0°=+x, 90°=+y screen-down). Give both startAngle and endAngle for a partial circle, or neither for a full circle."),
|
|
141
|
+
endAngle: z.number().finite().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
|
|
103
142
|
closed: z.enum([
|
|
104
143
|
"closed",
|
|
105
144
|
"chord",
|
|
@@ -108,13 +147,14 @@ var CirclePathStepSchema = z.object({
|
|
|
108
147
|
]).optional().describe("Closing mode. 'closed' = full circle (only valid with no angles; the default then). With angles: 'chord' (straight chord between the two arc ends; default), 'sector' (connect both arc ends to the center, then close), or 'open' (pure unclosed arc)."),
|
|
109
148
|
label: StepLabelSchema.optional().describe("Edge label attached to this circle")
|
|
110
149
|
}).describe("CirclePath action: full circle (no angles, pen returns to center) or partial arc (with angles, closed per chord/open).");
|
|
111
|
-
var
|
|
150
|
+
var CirclePathStepSchema = CirclePathStepBaseSchema.superRefine((step, ctx) => refinePartialAngles(step, ctx, "circlePath"));
|
|
151
|
+
var EllipsePathStepBaseSchema = z.object({
|
|
112
152
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
113
153
|
kind: z.literal("ellipsePath").describe("Ellipse centered at the cursor. Without angles: a full ellipse (TikZ `ellipse[x radius=…, y radius=…]`), pen returns to center. With startAngle + endAngle: a partial elliptical arc closed per `closed`."),
|
|
114
|
-
radiusX: z.number().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
|
|
115
|
-
radiusY: z.number().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
|
|
116
|
-
startAngle: z.number().optional().describe("Partial-ellipse start angle in degrees (parametric, same convention as arc). Give both startAngle and endAngle for a partial ellipse, or neither for a full ellipse."),
|
|
117
|
-
endAngle: z.number().optional().describe("Partial-ellipse end angle in degrees."),
|
|
154
|
+
radiusX: z.number().finite().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
|
|
155
|
+
radiusY: z.number().finite().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
|
|
156
|
+
startAngle: z.number().finite().optional().describe("Partial-ellipse start angle in degrees (parametric, same convention as arc). Give both startAngle and endAngle for a partial ellipse, or neither for a full ellipse."),
|
|
157
|
+
endAngle: z.number().finite().optional().describe("Partial-ellipse end angle in degrees."),
|
|
118
158
|
closed: z.enum([
|
|
119
159
|
"closed",
|
|
120
160
|
"chord",
|
|
@@ -123,6 +163,7 @@ var EllipsePathStepSchema = z.object({
|
|
|
123
163
|
]).optional().describe("Closing mode. 'closed' = full ellipse (only valid with no angles; default then). With angles: 'chord' (chord between arc ends; default), 'sector' (connect both arc ends to the center, then close), or 'open' (pure unclosed arc)."),
|
|
124
164
|
label: StepLabelSchema.optional().describe("Edge label attached to this ellipse")
|
|
125
165
|
}).describe("EllipsePath action: full ellipse (no angles, pen returns to center) or partial elliptical arc (with angles, closed per chord/open).");
|
|
166
|
+
var EllipsePathStepSchema = EllipsePathStepBaseSchema.superRefine((step, ctx) => refinePartialAngles(step, ctx, "ellipsePath"));
|
|
126
167
|
var RectangleStepSchema = z.object({
|
|
127
168
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
128
169
|
kind: z.literal("rectangle").describe("Axis-aligned rectangle between two opposite corners (TikZ `(a) rectangle (b)`); compiled to path commands (4 lines + close, or rounded corners via quarter arcs). Self-contained: corners come from from/to, not the cursor."),
|
|
@@ -146,11 +187,21 @@ var StepSchema = z.discriminatedUnion("kind", [
|
|
|
146
187
|
CurveStepSchema,
|
|
147
188
|
CubicStepSchema,
|
|
148
189
|
BendStepSchema,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
190
|
+
ArcStepBaseSchema,
|
|
191
|
+
CirclePathStepBaseSchema,
|
|
192
|
+
EllipsePathStepBaseSchema,
|
|
152
193
|
RectangleStepSchema,
|
|
153
194
|
GeneratorStepSchema
|
|
154
|
-
]).
|
|
195
|
+
]).superRefine((step, ctx) => {
|
|
196
|
+
if (step.kind === "arc") {
|
|
197
|
+
refineArcStep(step, ctx);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (step.kind === "circlePath") {
|
|
201
|
+
refinePartialAngles(step, ctx, "circlePath");
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (step.kind === "ellipsePath") refinePartialAngles(step, ctx, "ellipsePath");
|
|
205
|
+
}).describe("A single path action; the discriminator field is `kind`");
|
|
155
206
|
//#endregion
|
|
156
|
-
export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, GeneratorStepSchema, LineStepSchema, MoveStepSchema, RectangleStepSchema, StepLabelSchema, StepSchema };
|
|
207
|
+
export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, FoldStepVia, GeneratorStepSchema, LineStepSchema, MoveStepSchema, RectangleStepSchema, StepLabelSchema, StepSchema };
|
|
@@ -6,7 +6,7 @@ import { BetweenPositionSchema } from "../position/between-position.js";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/ir/path/target.ts
|
|
8
8
|
var AnchorRefSchema = z.union([
|
|
9
|
-
z.string().min(1).describe("Named anchor: one of the 9
|
|
9
|
+
z.string().min(1).describe("Named anchor: one of the 9 standard compass anchors (center / north / ... / south-west), a Web alias (top / top-left / ...), or any anchor name interpreted by the referenced shape (e.g. sector apex / outer-arc-mid). Unrecognized names throw at compile time."),
|
|
10
10
|
z.number().finite().describe("Angle anchor in degrees (boundary point in that direction)"),
|
|
11
11
|
z.object({
|
|
12
12
|
side: z.enum([
|
|
@@ -24,8 +24,8 @@ var NodeTargetSchema = z.object({
|
|
|
24
24
|
offset: z.tuple([z.number().finite(), z.number().finite()]).optional().describe("Optional world-space 2D offset added after the anchor/edge point is resolved"),
|
|
25
25
|
boundary: BoundarySchema.optional().describe("Per-edge override of the target node connection surface for THIS endpoint only; omitted = the node's `boundary` (default \"shape\"). Effective only where a connection surface is meaningful: path-endpoint auto-clip (no explicit anchor) and this endpoint's compass / angle anchor. In toward-less reference contexts (between endpoints, offset `of`, node center) it is a no-op.")
|
|
26
26
|
}).describe("Reference to a Node/Coordinate by id, with optional anchor and world-space offset");
|
|
27
|
-
var RelativeTargetSchema = z.object({ relative: z.tuple([z.number(), z.number()]).describe("Relative offset (dx, dy)") }).describe("Relative offset from the previous step end point (does NOT update the cursor position; matches TikZ `(+x, +y)` syntax)");
|
|
28
|
-
var RelativeAccumulateTargetSchema = z.object({ relativeAccumulate: z.tuple([z.number(), z.number()]).describe("Accumulated relative offset (dx, dy)") }).describe("Accumulated relative offset from the previous step end point (DOES update the cursor; matches TikZ `(++x, ++y)` syntax)");
|
|
27
|
+
var RelativeTargetSchema = z.object({ relative: z.tuple([z.number().finite(), z.number().finite()]).describe("Relative offset (dx, dy)") }).describe("Relative offset from the previous step end point (does NOT update the cursor position; matches TikZ `(+x, +y)` syntax)");
|
|
28
|
+
var RelativeAccumulateTargetSchema = z.object({ relativeAccumulate: z.tuple([z.number().finite(), z.number().finite()]).describe("Accumulated relative offset (dx, dy)") }).describe("Accumulated relative offset from the previous step end point (DOES update the cursor; matches TikZ `(++x, ++y)` syntax)");
|
|
29
29
|
var TargetSchema = z.union([
|
|
30
30
|
PositionSchema,
|
|
31
31
|
PolarPositionSchema,
|
|
@@ -4,28 +4,28 @@ import { ValueOf } from '../../types';
|
|
|
4
4
|
* 节点相对方向 8 方向常量(视觉语义)
|
|
5
5
|
* @description above/below=y 减/增(视觉上/下);left/right=x 减/增;4 对角分量 1/√2 让对角距离与 distance 等长。与 TikZ positioning 的 `above of` 等对齐(TikZ y 向上 retikz y 向下,但视觉语义一致)
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
7
|
+
export declare const AtDirection: {
|
|
8
|
+
readonly Above: "above";
|
|
9
|
+
readonly Below: "below";
|
|
10
|
+
readonly Left: "left";
|
|
11
|
+
readonly Right: "right";
|
|
12
|
+
readonly AboveLeft: "above-left";
|
|
13
|
+
readonly AboveRight: "above-right";
|
|
14
|
+
readonly BelowLeft: "below-left";
|
|
15
|
+
readonly BelowRight: "below-right";
|
|
16
16
|
};
|
|
17
17
|
/** at 方向字面量类型 */
|
|
18
|
-
export type
|
|
18
|
+
export type AtDirectionValue = ValueOf<typeof AtDirection>;
|
|
19
19
|
export declare const AtPositionSchema: z.ZodObject<{
|
|
20
20
|
direction: z.ZodNativeEnum<{
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
21
|
+
readonly Above: "above";
|
|
22
|
+
readonly Below: "below";
|
|
23
|
+
readonly Left: "left";
|
|
24
|
+
readonly Right: "right";
|
|
25
|
+
readonly AboveLeft: "above-left";
|
|
26
|
+
readonly AboveRight: "above-right";
|
|
27
|
+
readonly BelowLeft: "below-left";
|
|
28
|
+
readonly BelowRight: "below-right";
|
|
29
29
|
}>;
|
|
30
30
|
of: z.ZodString;
|
|
31
31
|
distance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"at-position.d.ts","sourceRoot":"","sources":["../../../../src/ir/position/at-position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"at-position.d.ts","sourceRoot":"","sources":["../../../../src/ir/position/at-position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;CASd,CAAC;AAEX,iBAAiB;AACjB,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAuB1B,CAAC;AAEJ,oFAAoF;AACpF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -4,20 +4,20 @@ import { z } from "zod";
|
|
|
4
4
|
* 节点相对方向 8 方向常量(视觉语义)
|
|
5
5
|
* @description above/below=y 减/增(视觉上/下);left/right=x 减/增;4 对角分量 1/√2 让对角距离与 distance 等长。与 TikZ positioning 的 `above of` 等对齐(TikZ y 向上 retikz y 向下,但视觉语义一致)
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
var AtDirection = {
|
|
8
|
+
Above: "above",
|
|
9
|
+
Below: "below",
|
|
10
|
+
Left: "left",
|
|
11
|
+
Right: "right",
|
|
12
|
+
AboveLeft: "above-left",
|
|
13
|
+
AboveRight: "above-right",
|
|
14
|
+
BelowLeft: "below-left",
|
|
15
|
+
BelowRight: "below-right"
|
|
16
16
|
};
|
|
17
17
|
var AtPositionSchema = z.object({
|
|
18
|
-
direction: z.nativeEnum(
|
|
18
|
+
direction: z.nativeEnum(AtDirection).describe("Direction from the referenced node toward this node, in visual convention (above = visually upward, screen y-)."),
|
|
19
19
|
of: z.string().min(1).describe("Id of the referenced node or coordinate; must be defined earlier in the IR (forward references rejected, mirroring polar `origin` and string targets)."),
|
|
20
20
|
distance: z.number().positive().optional().describe("Distance from the referenced node center to this node center in user units. Falls back to the TikZ `nodeDistance` compile-time context, then to 1.")
|
|
21
21
|
}).describe("Relative position: place this node at `direction` direction from `of`, `distance` away. Mirrors TikZ `[<direction>=<distance> of <id>]` from the positioning library.");
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { AtDirection, AtPositionSchema };
|