@retikz/core 0.3.0-alpha.5 → 0.3.0-beta.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/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 +15 -2
- 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 +46 -43
- 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 +30 -0
- package/dist/es/compile/constant.d.ts.map +1 -0
- package/dist/es/compile/constant.js +21 -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 +19 -8
- package/dist/es/compile/node.d.ts.map +1 -1
- package/dist/es/compile/node.js +56 -70
- 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 +97 -44
- package/dist/es/compile/path/label.d.ts.map +1 -1
- package/dist/es/compile/path/label.js +8 -4
- 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 +44 -16
- 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/compile/text-metrics.d.ts +1 -1
- package/dist/es/compile/text-metrics.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 +3 -3
- 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} +9 -5
- package/dist/es/geometry/contour.d.ts.map +1 -0
- package/dist/es/geometry/{roundedContour.js → contour.js} +27 -37
- package/dist/es/geometry/diamond.d.ts +10 -4
- package/dist/es/geometry/diamond.d.ts.map +1 -1
- package/dist/es/geometry/diamond.js +11 -3
- 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 +4 -2
- package/dist/es/geometry/index.d.ts +6 -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 +7 -0
- package/dist/es/geometry/segment.d.ts.map +1 -1
- package/dist/es/geometry/segment.js +48 -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 +13 -13
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +20 -16
- package/dist/es/ir/animation.d.ts +26 -125
- package/dist/es/ir/animation.d.ts.map +1 -1
- package/dist/es/ir/animation.js +6 -6
- package/dist/es/ir/boundary.d.ts +4 -10
- package/dist/es/ir/boundary.d.ts.map +1 -1
- package/dist/es/ir/clip.d.ts +6 -46
- package/dist/es/ir/clip.d.ts.map +1 -1
- package/dist/es/ir/composite.d.ts +2 -14
- package/dist/es/ir/composite.d.ts.map +1 -1
- package/dist/es/ir/coordinate.d.ts +14 -50
- package/dist/es/ir/coordinate.d.ts.map +1 -1
- package/dist/es/ir/coordinate.js +1 -1
- package/dist/es/ir/font.d.ts +10 -13
- package/dist/es/ir/font.d.ts.map +1 -1
- package/dist/es/ir/json.d.ts +1 -1
- package/dist/es/ir/json.d.ts.map +1 -1
- package/dist/es/ir/json.js +1 -1
- package/dist/es/ir/node.d.ts +175 -821
- 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 +23 -100
- 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 +19 -131
- 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 +519 -3065
- package/dist/es/ir/path/path.d.ts.map +1 -1
- package/dist/es/ir/path/path.js +3 -3
- package/dist/es/ir/path/step.d.ts +929 -3474
- package/dist/es/ir/path/step.d.ts.map +1 -1
- package/dist/es/ir/path/step.js +74 -23
- package/dist/es/ir/path/target.d.ts +40 -121
- package/dist/es/ir/path/target.d.ts.map +1 -1
- package/dist/es/ir/path/target.js +3 -3
- package/dist/es/ir/position/at-position.d.ts +20 -28
- 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/position/offset-position.d.ts +2 -8
- package/dist/es/ir/position/offset-position.d.ts.map +1 -1
- package/dist/es/ir/scene.d.ts +17 -181
- package/dist/es/ir/scene.d.ts.map +1 -1
- package/dist/es/ir/scope.d.ts +315 -7291
- package/dist/es/ir/scope.d.ts.map +1 -1
- package/dist/es/ir/scope.js +10 -7
- package/dist/es/ir/shape.d.ts +2 -8
- package/dist/es/ir/shape.d.ts.map +1 -1
- package/dist/es/ir/text.d.ts +24 -70
- package/dist/es/ir/text.d.ts.map +1 -1
- package/dist/es/ir/transform.d.ts +47 -144
- package/dist/es/ir/transform.d.ts.map +1 -1
- package/dist/es/ir/transform.js +12 -5
- 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} +2 -2
- package/dist/es/parsers/way.d.ts.map +1 -0
- package/dist/es/parsers/{parseWay.js → way.js} +10 -6
- 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 +7 -7
- package/dist/es/primitive/marker.d.ts.map +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.d.ts.map +1 -1
- package/dist/es/shapes/arc.js +24 -5
- 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 +6 -6
- 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} +7 -10
- package/dist/es/shapes/shared.d.ts.map +1 -0
- package/dist/es/shapes/{_shared.js → shared.js} +13 -15
- package/dist/es/shapes/star.d.ts.map +1 -1
- package/dist/es/shapes/star.js +6 -15
- package/dist/es/shapes/types.d.ts +10 -3
- package/dist/es/shapes/types.d.ts.map +1 -1
- package/dist/es/types.d.ts +1 -1
- 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 +15 -2
- 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 +44 -41
- 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 +22 -0
- package/dist/lib/compile/constant.d.ts +30 -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 +56 -69
- package/dist/lib/compile/node.d.ts +19 -8
- 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 +95 -42
- 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/label.cjs +8 -4
- package/dist/lib/compile/path/label.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 +44 -16
- 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/compile/text-metrics.cjs +2 -2
- package/dist/lib/compile/text-metrics.d.ts +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 +3 -3
- 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} +26 -35
- package/dist/lib/geometry/{roundedContour.d.ts → contour.d.ts} +9 -5
- package/dist/lib/geometry/contour.d.ts.map +1 -0
- package/dist/lib/geometry/diamond.cjs +16 -8
- package/dist/lib/geometry/diamond.d.ts +10 -4
- 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 +10 -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 +6 -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 +48 -46
- package/dist/lib/geometry/segment.d.ts +7 -0
- 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 +35 -22
- package/dist/lib/index.d.ts +13 -13
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ir/animation.cjs +6 -6
- package/dist/lib/ir/animation.d.ts +26 -125
- package/dist/lib/ir/animation.d.ts.map +1 -1
- package/dist/lib/ir/boundary.d.ts +4 -10
- package/dist/lib/ir/boundary.d.ts.map +1 -1
- package/dist/lib/ir/clip.d.ts +6 -46
- package/dist/lib/ir/clip.d.ts.map +1 -1
- package/dist/lib/ir/composite.d.ts +2 -14
- package/dist/lib/ir/composite.d.ts.map +1 -1
- package/dist/lib/ir/coordinate.cjs +1 -1
- package/dist/lib/ir/coordinate.d.ts +14 -50
- package/dist/lib/ir/coordinate.d.ts.map +1 -1
- package/dist/lib/ir/font.d.ts +10 -13
- package/dist/lib/ir/font.d.ts.map +1 -1
- package/dist/lib/ir/json.cjs +1 -1
- package/dist/lib/ir/json.d.ts +1 -1
- package/dist/lib/ir/json.d.ts.map +1 -1
- package/dist/lib/ir/node.cjs +23 -23
- package/dist/lib/ir/node.d.ts +175 -821
- 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 +23 -100
- 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 +19 -131
- package/dist/lib/ir/path/arrow.d.ts.map +1 -1
- package/dist/lib/ir/path/path.cjs +4 -2
- package/dist/lib/ir/path/path.d.ts +519 -3065
- package/dist/lib/ir/path/path.d.ts.map +1 -1
- package/dist/lib/ir/path/step.cjs +74 -22
- package/dist/lib/ir/path/step.d.ts +929 -3474
- package/dist/lib/ir/path/step.d.ts.map +1 -1
- package/dist/lib/ir/path/target.cjs +3 -3
- package/dist/lib/ir/path/target.d.ts +40 -121
- package/dist/lib/ir/path/target.d.ts.map +1 -1
- package/dist/lib/ir/position/at-position.cjs +11 -11
- package/dist/lib/ir/position/at-position.d.ts +20 -28
- package/dist/lib/ir/position/at-position.d.ts.map +1 -1
- package/dist/lib/ir/position/offset-position.d.ts +2 -8
- package/dist/lib/ir/position/offset-position.d.ts.map +1 -1
- package/dist/lib/ir/scene.d.ts +17 -181
- package/dist/lib/ir/scene.d.ts.map +1 -1
- package/dist/lib/ir/scope.cjs +10 -7
- package/dist/lib/ir/scope.d.ts +315 -7291
- package/dist/lib/ir/scope.d.ts.map +1 -1
- package/dist/lib/ir/shape.d.ts +2 -8
- package/dist/lib/ir/shape.d.ts.map +1 -1
- package/dist/lib/ir/text.d.ts +24 -70
- package/dist/lib/ir/text.d.ts.map +1 -1
- package/dist/lib/ir/transform.cjs +11 -4
- package/dist/lib/ir/transform.d.ts +47 -144
- 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} +13 -9
- package/dist/{es/parsers/parseWay.d.ts → lib/parsers/way.d.ts} +2 -2
- 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 +7 -7
- package/dist/lib/primitive/marker.d.ts.map +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 +26 -7
- package/dist/lib/shapes/arc.d.ts.map +1 -1
- 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 +12 -12
- 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} +12 -15
- package/dist/lib/shapes/{_shared.d.ts → shared.d.ts} +7 -10
- package/dist/lib/shapes/shared.d.ts.map +1 -0
- package/dist/lib/shapes/star.cjs +9 -18
- package/dist/lib/shapes/star.d.ts.map +1 -1
- package/dist/lib/shapes/types.d.ts +10 -3
- package/dist/lib/shapes/types.d.ts.map +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/package.json +3 -4
- 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":"path.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;GAGG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;mBAoBzB,CAAC;AAEJ,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;iBAQ3B,CAAC;AAEF,iBAAiB;AACjB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgKpB,CAAC;AAEJ,sCAAsC;AACtC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -41,10 +41,14 @@ var LineStepSchema = zod.z.object({
|
|
|
41
41
|
to: require_target.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 = zod.z.object({
|
|
45
49
|
type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
46
|
-
kind: zod.z.literal("
|
|
47
|
-
via: zod.z.enum(
|
|
50
|
+
kind: zod.z.literal("fold").describe("Folded right-angle segment from cursor to target through one intermediate point (TikZ `-|` / `|-`)"),
|
|
51
|
+
via: zod.z.enum(FoldStepVia).describe("Folding direction: `-|` first horizontal then vertical; `|-` first vertical then horizontal"),
|
|
48
52
|
to: require_target.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`");
|
|
@@ -77,29 +81,64 @@ var BendStepSchema = zod.z.object({
|
|
|
77
81
|
kind: zod.z.literal("bend").describe("Arc-like bend from cursor to target by direction + angle (TikZ `to[bend left=N]` / `to[bend right=N]`); compiles to a cubic Bezier approximation"),
|
|
78
82
|
to: require_target.TargetSchema.describe("Destination point of the bend"),
|
|
79
83
|
bendDirection: zod.z.enum(["left", "right"]).optional().describe("Bend side relative to from→to direction (visual left vs right of the chord). Optional: provide bendDirection/bendAngle for a symmetric bend, or outAngle/inAngle for an asymmetric curve / self-loop (out/in takes precedence when both are given)."),
|
|
80
|
-
bendAngle: zod.z.number().finite().optional().describe("Bend angle in degrees; default 30 (matches TikZ `bend left` without explicit angle)"),
|
|
84
|
+
bendAngle: zod.z.number().finite().gt(-180).lt(180).optional().describe("Bend angle in degrees; default 30 (matches TikZ `bend left` without explicit angle). Restricted to (-180, 180): at ±180 the chord-tangent term tan(angle/2) diverges and control points blow up."),
|
|
81
85
|
outAngle: zod.z.number().finite().optional().describe("Out angle in degrees at the start point (TikZ `out=`). Together with inAngle, compiles to a cubic Bezier whose start control point lies along this direction. When out/in angles are given they take precedence over bendDirection / bendAngle."),
|
|
82
86
|
inAngle: zod.z.number().finite().optional().describe("In angle in degrees at the end point (TikZ `in=`). Together with outAngle, compiles to a cubic Bezier whose end control point lies along this direction."),
|
|
83
87
|
looseness: zod.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: "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: "custom",
|
|
101
|
+
path: ["radius"],
|
|
102
|
+
message: "Arc step requires radius or both radiusX and radiusY"
|
|
103
|
+
});
|
|
104
|
+
if (hasRadiusX !== hasRadiusY) ctx.addIssue({
|
|
105
|
+
code: "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: "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: "custom",
|
|
120
|
+
path: ["closed"],
|
|
121
|
+
message: `${kind} closed:'closed' is only valid without angles`
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
var ArcStepBaseSchema = zod.z.object({
|
|
87
125
|
type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
88
126
|
kind: zod.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: zod.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: zod.z.number().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
|
|
91
|
-
radius: zod.z.number().positive().optional().describe("Circular arc radius in user units. Give
|
|
92
|
-
radiusX: zod.z.number().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
93
|
-
radiusY: zod.z.number().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
127
|
+
startAngle: zod.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: zod.z.number().finite().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
|
|
129
|
+
radius: zod.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: zod.z.number().finite().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
131
|
+
radiusY: zod.z.number().finite().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
94
132
|
center: require_target.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 = zod.z.object({
|
|
98
137
|
type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
99
138
|
kind: zod.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: zod.z.number().positive().describe("Circle radius in user units"),
|
|
101
|
-
startAngle: zod.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: zod.z.number().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
|
|
139
|
+
radius: zod.z.number().finite().positive().describe("Circle radius in user units"),
|
|
140
|
+
startAngle: zod.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: zod.z.number().finite().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
|
|
103
142
|
closed: zod.z.enum([
|
|
104
143
|
"closed",
|
|
105
144
|
"chord",
|
|
@@ -108,13 +147,14 @@ var CirclePathStepSchema = zod.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 = zod.z.object({
|
|
112
152
|
type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
113
153
|
kind: zod.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: zod.z.number().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
|
|
115
|
-
radiusY: zod.z.number().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
|
|
116
|
-
startAngle: zod.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: zod.z.number().optional().describe("Partial-ellipse end angle in degrees."),
|
|
154
|
+
radiusX: zod.z.number().finite().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
|
|
155
|
+
radiusY: zod.z.number().finite().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
|
|
156
|
+
startAngle: zod.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: zod.z.number().finite().optional().describe("Partial-ellipse end angle in degrees."),
|
|
118
158
|
closed: zod.z.enum([
|
|
119
159
|
"closed",
|
|
120
160
|
"chord",
|
|
@@ -123,6 +163,7 @@ var EllipsePathStepSchema = zod.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 = zod.z.object({
|
|
127
168
|
type: zod.z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
128
169
|
kind: zod.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,12 +187,22 @@ var StepSchema = zod.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
207
|
exports.ArcStepSchema = ArcStepSchema;
|
|
157
208
|
exports.BendStepSchema = BendStepSchema;
|
|
@@ -162,6 +213,7 @@ exports.CurveStepSchema = CurveStepSchema;
|
|
|
162
213
|
exports.CycleStepSchema = CycleStepSchema;
|
|
163
214
|
exports.EllipsePathStepSchema = EllipsePathStepSchema;
|
|
164
215
|
exports.FoldStepSchema = FoldStepSchema;
|
|
216
|
+
exports.FoldStepVia = FoldStepVia;
|
|
165
217
|
exports.GeneratorStepSchema = GeneratorStepSchema;
|
|
166
218
|
exports.LineStepSchema = LineStepSchema;
|
|
167
219
|
exports.MoveStepSchema = MoveStepSchema;
|