pantograph2d 0.7.0 → 0.8.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/LICENSE +4 -658
- package/dist/QuadraticBezier-BAVasVfu.cjs +9 -0
- package/dist/QuadraticBezier-BAVasVfu.cjs.map +1 -0
- package/dist/QuadraticBezier-BzVqiExF.js +4736 -0
- package/dist/QuadraticBezier-BzVqiExF.js.map +1 -0
- package/dist/draw-DqsKIWJD.js +337 -0
- package/dist/draw-DqsKIWJD.js.map +1 -0
- package/dist/draw-NcYfDZjT.cjs +2 -0
- package/dist/draw-NcYfDZjT.cjs.map +1 -0
- package/dist/models-Dxwusy3i.cjs +4 -0
- package/dist/models-Dxwusy3i.cjs.map +1 -0
- package/dist/models-WQ-B7GSL.js +1749 -0
- package/dist/models-WQ-B7GSL.js.map +1 -0
- package/dist/pantograph/drawShape.cjs +1 -1
- package/dist/pantograph/drawShape.cjs.map +1 -1
- package/dist/pantograph/drawShape.js +12 -13
- package/dist/pantograph/drawShape.js.map +1 -1
- package/dist/pantograph/models.cjs +1 -1
- package/dist/pantograph/models.js +15 -12
- package/dist/pantograph/models.js.map +1 -1
- package/dist/pantograph/svg.cjs +2 -0
- package/dist/pantograph/svg.cjs.map +1 -0
- package/dist/pantograph/svg.js +10 -0
- package/dist/pantograph/svg.js.map +1 -0
- package/dist/pantograph.cjs +2 -8
- package/dist/pantograph.cjs.map +1 -1
- package/dist/pantograph.js +406 -452
- package/dist/pantograph.js.map +1 -1
- package/dist/svg-BylQQgsL.js +62 -0
- package/dist/svg-BylQQgsL.js.map +1 -0
- package/dist/svg-D0nYyMk7.cjs +8 -0
- package/dist/svg-D0nYyMk7.cjs.map +1 -0
- package/dist/types/examples/importSVG.d.ts +4 -0
- package/dist/types/{algorithms → src/algorithms}/boolean/figureBooleans.d.ts +1 -1
- package/dist/types/{algorithms → src/algorithms}/boolean/loopBooleans.d.ts +1 -1
- package/dist/types/{algorithms → src/algorithms}/boolean/strandBoolean.d.ts +4 -4
- package/dist/types/{algorithms → src/algorithms}/boolean/strandsBetweenIntersections.d.ts +3 -3
- package/dist/types/{algorithms → src/algorithms}/distances/arcArcDistance.d.ts +1 -1
- package/dist/types/{algorithms → src/algorithms}/distances/genericDistance.d.ts +1 -1
- package/dist/types/{algorithms → src/algorithms}/distances/index.d.ts +1 -1
- package/dist/types/src/algorithms/distances/lineArcDistance.d.ts +3 -0
- package/dist/types/{algorithms → src/algorithms}/distances/lineLineDistance.d.ts +1 -1
- package/dist/types/{algorithms → src/algorithms}/filletSegments.d.ts +1 -1
- package/dist/types/{algorithms → src/algorithms}/intersections/arcArcIntersection.d.ts +2 -2
- package/dist/types/src/algorithms/intersections/arcEllipseArcIntersection.d.ts +3 -0
- package/dist/types/src/algorithms/intersections/arcsCubicBezierIntersection.d.ts +5 -0
- package/dist/types/src/algorithms/intersections/arcsQuadraticBezierIntersection.d.ts +5 -0
- package/dist/types/{algorithms → src/algorithms}/intersections/bezierClip.d.ts +3 -3
- package/dist/types/{algorithms → src/algorithms}/intersections/cubicBezierCubicBezierIntersection.d.ts +2 -2
- package/dist/types/{algorithms → src/algorithms}/intersections/ellipseArcEllipseArcIntersection.d.ts +2 -2
- package/dist/types/src/algorithms/intersections/ellipseEllipseIntersection.d.ts +4 -0
- package/dist/types/{algorithms → src/algorithms}/intersections/index.d.ts +2 -2
- package/dist/types/src/algorithms/intersections/lineArcIntersection.d.ts +4 -0
- package/dist/types/src/algorithms/intersections/lineBezierIntersection.d.ts +5 -0
- package/dist/types/src/algorithms/intersections/lineEllipseArcIntersection.d.ts +4 -0
- package/dist/types/{algorithms → src/algorithms}/intersections/lineLineIntersection.d.ts +4 -4
- package/dist/types/{algorithms → src/algorithms}/intersections/quadraticBezierQuadraticBezierIntersection.d.ts +2 -2
- package/dist/types/src/algorithms/intersections/rayIntersections.d.ts +3 -0
- package/dist/types/{algorithms → src/algorithms}/offsets/offsetFigure.d.ts +2 -2
- package/dist/types/{algorithms → src/algorithms}/offsets/offsetSegment.d.ts +4 -4
- package/dist/types/{algorithms → src/algorithms}/offsets/offsetStroke.d.ts +5 -5
- package/dist/types/{algorithms → src/algorithms}/organiseLoops.d.ts +2 -2
- package/dist/types/src/algorithms/simplify.d.ts +3 -0
- package/dist/types/src/algorithms/solvers/findZeroViaNewton.d.ts +1 -0
- package/dist/types/src/algorithms/solvers/zeroViaNewton.d.ts +1 -0
- package/dist/types/{algorithms → src/algorithms}/stitchSegments.d.ts +1 -1
- package/dist/types/src/api/drawShape.d.ts +2 -0
- package/dist/types/src/api/models.d.ts +1 -0
- package/dist/types/src/api/svg.d.ts +1 -0
- package/dist/types/{booleanOperations.d.ts → src/booleanOperations.d.ts} +5 -5
- package/dist/types/{draw.d.ts → src/draw.d.ts} +4 -4
- package/dist/types/{drawShape → src/drawShape}/drawCircle.d.ts +1 -1
- package/dist/types/src/drawShape/drawEllipse.d.ts +2 -0
- package/dist/types/{drawShape → src/drawShape}/drawRect.d.ts +1 -1
- package/dist/types/src/drawShape/drawSVGPath.d.ts +2 -0
- package/dist/types/src/drawShape/index.d.ts +4 -0
- package/dist/types/{export → src/export}/json/exportJSON.d.ts +94 -94
- package/dist/types/{export → src/export}/json/jsonDiagram.d.ts +31 -31
- package/dist/types/{export → src/export}/json/jsonFigure.d.ts +31 -31
- package/dist/types/{export → src/export}/json/jsonLoop.d.ts +16 -16
- package/dist/types/{export → src/export}/json/jsonSegment.d.ts +16 -16
- package/dist/types/src/export/svg/api.d.ts +6 -0
- package/dist/types/{export → src/export}/svg/exportSVG.d.ts +6 -6
- package/dist/types/{export → src/export}/svg/svgDiagram.d.ts +1 -1
- package/dist/types/{export → src/export}/svg/svgFigure.d.ts +1 -1
- package/dist/types/{export → src/export}/svg/svgLoop.d.ts +1 -1
- package/dist/types/{export → src/export}/svg/svgSegment.d.ts +1 -1
- package/dist/types/{export → src/export}/svg/svgStrand.d.ts +1 -1
- package/dist/types/{export → src/export}/svg/wrapSVG.d.ts +2 -2
- package/dist/types/src/import/json/importJSON.d.ts +9 -0
- package/dist/types/{main.d.ts → src/main.d.ts} +7 -7
- package/dist/types/{models → src/models}/BoundingBox.d.ts +1 -1
- package/dist/types/{models → src/models}/Diagram.d.ts +7 -7
- package/dist/types/{models → src/models}/Figure.d.ts +7 -7
- package/dist/types/{models → src/models}/Loop.d.ts +4 -4
- package/dist/types/{models → src/models}/Strand.d.ts +2 -2
- package/dist/types/{models → src/models}/Stroke.d.ts +5 -5
- package/dist/types/{models → src/models}/TransformationMatrix.d.ts +1 -1
- package/dist/types/src/models/exports.d.ts +15 -0
- package/dist/types/src/models/segments/AbstractSegment.d.ts +25 -0
- package/dist/types/{models → src/models}/segments/Arc.d.ts +4 -4
- package/dist/types/{models → src/models}/segments/CubicBezier.d.ts +4 -4
- package/dist/types/{models → src/models}/segments/EllipseArc.d.ts +5 -5
- package/dist/types/{models → src/models}/segments/Line.d.ts +4 -4
- package/dist/types/{models → src/models}/segments/QuadraticBezier.d.ts +4 -4
- package/dist/types/{models → src/models}/segments/Segment.d.ts +4 -4
- package/dist/types/{models → src/models}/segments/utils/deCasteljau.d.ts +1 -1
- package/dist/types/src/models/segments/utils/isSegment.d.ts +8 -0
- package/dist/types/{models → src/models}/utils/Transformable.d.ts +2 -2
- package/dist/types/{offsetOperations.d.ts → src/offsetOperations.d.ts} +4 -4
- package/dist/types/src/operations.d.ts +2 -0
- package/dist/types/src/utils/applyMixins.d.ts +1 -0
- package/dist/types/src/utils/listOfFigures.d.ts +4 -0
- package/dist/types/src/utils/projectPointOnLine.d.ts +3 -0
- package/dist/types/{utils → src/utils}/removeDuplicatePoints.d.ts +1 -1
- package/dist/types/{vectorOperations.d.ts → src/vectorOperations.d.ts} +1 -1
- package/package.json +33 -25
- package/dist/Diagram-8c3c5e1b.js +0 -5301
- package/dist/Diagram-8c3c5e1b.js.map +0 -1
- package/dist/Diagram-d8288579.cjs +0 -11
- package/dist/Diagram-d8288579.cjs.map +0 -1
- package/dist/draw-3ee546c3.cjs +0 -2
- package/dist/draw-3ee546c3.cjs.map +0 -1
- package/dist/draw-825692f1.js +0 -336
- package/dist/draw-825692f1.js.map +0 -1
- package/dist/types/algorithms/distances/lineArcDistance.d.ts +0 -3
- package/dist/types/algorithms/intersections/arcEllipseArcIntersection.d.ts +0 -3
- package/dist/types/algorithms/intersections/arcsCubicBezierIntersection.d.ts +0 -5
- package/dist/types/algorithms/intersections/arcsQuadraticBezierIntersection.d.ts +0 -5
- package/dist/types/algorithms/intersections/ellipseEllipseIntersection.d.ts +0 -4
- package/dist/types/algorithms/intersections/lineArcIntersection.d.ts +0 -4
- package/dist/types/algorithms/intersections/lineBezierIntersection.d.ts +0 -5
- package/dist/types/algorithms/intersections/lineEllipseArcIntersection.d.ts +0 -4
- package/dist/types/algorithms/intersections/rayIntersections.d.ts +0 -3
- package/dist/types/algorithms/simplify.d.ts +0 -3
- package/dist/types/api/drawShape.d.ts +0 -2
- package/dist/types/api/models.d.ts +0 -1
- package/dist/types/import/json/importJSON.d.ts +0 -9
- package/dist/types/models/exports.d.ts +0 -13
- package/dist/types/models/segments/utils/isSegment.d.ts +0 -8
- package/dist/types/operations.d.ts +0 -2
- package/dist/types/utils/listOfFigures.d.ts +0 -4
- package/dist/types/utils/projectPointOnLine.d.ts +0 -3
- /package/dist/types/{algorithms → src/algorithms}/optimisation/Brent.d.ts +0 -0
- /package/dist/types/{algorithms → src/algorithms}/optimisation/DiRect.d.ts +0 -0
- /package/dist/types/{algorithms → src/algorithms}/solvers/solvePolynomials.d.ts +0 -0
- /package/dist/types/{definitions.d.ts → src/definitions.d.ts} +0 -0
- /package/dist/types/{utils → src/utils}/allCombinations.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/allPairs.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/angularDistance.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/range.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/removeDuplicateValues.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/unitAngle.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/zip.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Diagram } from
|
|
1
|
+
import { Diagram } from '../../models/Diagram.js';
|
|
2
2
|
export declare function jsonDiagram(diagram: Diagram): {
|
|
3
3
|
type: string;
|
|
4
4
|
figures: {
|
|
@@ -7,8 +7,8 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
7
7
|
type: string;
|
|
8
8
|
segments: ({
|
|
9
9
|
type: string;
|
|
10
|
-
firstPoint: import(
|
|
11
|
-
lastPoint: import(
|
|
10
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
11
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
12
12
|
center?: undefined;
|
|
13
13
|
clockwise?: undefined;
|
|
14
14
|
majorRadius?: undefined;
|
|
@@ -19,9 +19,9 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
19
19
|
lastControlPoint?: undefined;
|
|
20
20
|
} | {
|
|
21
21
|
type: string;
|
|
22
|
-
firstPoint: import(
|
|
23
|
-
lastPoint: import(
|
|
24
|
-
center: import(
|
|
22
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
23
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
24
|
+
center: import('../../definitions.js').Vector;
|
|
25
25
|
clockwise: boolean;
|
|
26
26
|
majorRadius?: undefined;
|
|
27
27
|
minorRadius?: undefined;
|
|
@@ -31,9 +31,9 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
31
31
|
lastControlPoint?: undefined;
|
|
32
32
|
} | {
|
|
33
33
|
type: string;
|
|
34
|
-
firstPoint: import(
|
|
35
|
-
lastPoint: import(
|
|
36
|
-
center: import(
|
|
34
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
35
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
36
|
+
center: import('../../definitions.js').Vector;
|
|
37
37
|
clockwise: boolean;
|
|
38
38
|
majorRadius: number;
|
|
39
39
|
minorRadius: number;
|
|
@@ -43,9 +43,9 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
43
43
|
lastControlPoint?: undefined;
|
|
44
44
|
} | {
|
|
45
45
|
type: string;
|
|
46
|
-
firstPoint: import(
|
|
47
|
-
lastPoint: import(
|
|
48
|
-
controlPoint: import(
|
|
46
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
47
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
48
|
+
controlPoint: import('../../definitions.js').Vector;
|
|
49
49
|
center?: undefined;
|
|
50
50
|
clockwise?: undefined;
|
|
51
51
|
majorRadius?: undefined;
|
|
@@ -55,10 +55,10 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
55
55
|
lastControlPoint?: undefined;
|
|
56
56
|
} | {
|
|
57
57
|
type: string;
|
|
58
|
-
firstPoint: import(
|
|
59
|
-
lastPoint: import(
|
|
60
|
-
firstControlPoint: import(
|
|
61
|
-
lastControlPoint: import(
|
|
58
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
59
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
60
|
+
firstControlPoint: import('../../definitions.js').Vector;
|
|
61
|
+
lastControlPoint: import('../../definitions.js').Vector;
|
|
62
62
|
center?: undefined;
|
|
63
63
|
clockwise?: undefined;
|
|
64
64
|
majorRadius?: undefined;
|
|
@@ -71,8 +71,8 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
71
71
|
type: string;
|
|
72
72
|
segments: ({
|
|
73
73
|
type: string;
|
|
74
|
-
firstPoint: import(
|
|
75
|
-
lastPoint: import(
|
|
74
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
75
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
76
76
|
center?: undefined;
|
|
77
77
|
clockwise?: undefined;
|
|
78
78
|
majorRadius?: undefined;
|
|
@@ -83,9 +83,9 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
83
83
|
lastControlPoint?: undefined;
|
|
84
84
|
} | {
|
|
85
85
|
type: string;
|
|
86
|
-
firstPoint: import(
|
|
87
|
-
lastPoint: import(
|
|
88
|
-
center: import(
|
|
86
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
87
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
88
|
+
center: import('../../definitions.js').Vector;
|
|
89
89
|
clockwise: boolean;
|
|
90
90
|
majorRadius?: undefined;
|
|
91
91
|
minorRadius?: undefined;
|
|
@@ -95,9 +95,9 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
95
95
|
lastControlPoint?: undefined;
|
|
96
96
|
} | {
|
|
97
97
|
type: string;
|
|
98
|
-
firstPoint: import(
|
|
99
|
-
lastPoint: import(
|
|
100
|
-
center: import(
|
|
98
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
99
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
100
|
+
center: import('../../definitions.js').Vector;
|
|
101
101
|
clockwise: boolean;
|
|
102
102
|
majorRadius: number;
|
|
103
103
|
minorRadius: number;
|
|
@@ -107,9 +107,9 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
107
107
|
lastControlPoint?: undefined;
|
|
108
108
|
} | {
|
|
109
109
|
type: string;
|
|
110
|
-
firstPoint: import(
|
|
111
|
-
lastPoint: import(
|
|
112
|
-
controlPoint: import(
|
|
110
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
111
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
112
|
+
controlPoint: import('../../definitions.js').Vector;
|
|
113
113
|
center?: undefined;
|
|
114
114
|
clockwise?: undefined;
|
|
115
115
|
majorRadius?: undefined;
|
|
@@ -119,10 +119,10 @@ export declare function jsonDiagram(diagram: Diagram): {
|
|
|
119
119
|
lastControlPoint?: undefined;
|
|
120
120
|
} | {
|
|
121
121
|
type: string;
|
|
122
|
-
firstPoint: import(
|
|
123
|
-
lastPoint: import(
|
|
124
|
-
firstControlPoint: import(
|
|
125
|
-
lastControlPoint: import(
|
|
122
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
123
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
124
|
+
firstControlPoint: import('../../definitions.js').Vector;
|
|
125
|
+
lastControlPoint: import('../../definitions.js').Vector;
|
|
126
126
|
center?: undefined;
|
|
127
127
|
clockwise?: undefined;
|
|
128
128
|
majorRadius?: undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Figure } from '../../models/Figure.js';
|
|
2
2
|
export declare function jsonFigure(figure: Figure): {
|
|
3
3
|
type: string;
|
|
4
4
|
contour: {
|
|
5
5
|
type: string;
|
|
6
6
|
segments: ({
|
|
7
7
|
type: string;
|
|
8
|
-
firstPoint: import(
|
|
9
|
-
lastPoint: import(
|
|
8
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
9
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
10
10
|
center?: undefined;
|
|
11
11
|
clockwise?: undefined;
|
|
12
12
|
majorRadius?: undefined;
|
|
@@ -17,9 +17,9 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
17
17
|
lastControlPoint?: undefined;
|
|
18
18
|
} | {
|
|
19
19
|
type: string;
|
|
20
|
-
firstPoint: import(
|
|
21
|
-
lastPoint: import(
|
|
22
|
-
center: import(
|
|
20
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
21
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
22
|
+
center: import('../../definitions.js').Vector;
|
|
23
23
|
clockwise: boolean;
|
|
24
24
|
majorRadius?: undefined;
|
|
25
25
|
minorRadius?: undefined;
|
|
@@ -29,9 +29,9 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
29
29
|
lastControlPoint?: undefined;
|
|
30
30
|
} | {
|
|
31
31
|
type: string;
|
|
32
|
-
firstPoint: import(
|
|
33
|
-
lastPoint: import(
|
|
34
|
-
center: import(
|
|
32
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
33
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
34
|
+
center: import('../../definitions.js').Vector;
|
|
35
35
|
clockwise: boolean;
|
|
36
36
|
majorRadius: number;
|
|
37
37
|
minorRadius: number;
|
|
@@ -41,9 +41,9 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
41
41
|
lastControlPoint?: undefined;
|
|
42
42
|
} | {
|
|
43
43
|
type: string;
|
|
44
|
-
firstPoint: import(
|
|
45
|
-
lastPoint: import(
|
|
46
|
-
controlPoint: import(
|
|
44
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
45
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
46
|
+
controlPoint: import('../../definitions.js').Vector;
|
|
47
47
|
center?: undefined;
|
|
48
48
|
clockwise?: undefined;
|
|
49
49
|
majorRadius?: undefined;
|
|
@@ -53,10 +53,10 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
53
53
|
lastControlPoint?: undefined;
|
|
54
54
|
} | {
|
|
55
55
|
type: string;
|
|
56
|
-
firstPoint: import(
|
|
57
|
-
lastPoint: import(
|
|
58
|
-
firstControlPoint: import(
|
|
59
|
-
lastControlPoint: import(
|
|
56
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
57
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
58
|
+
firstControlPoint: import('../../definitions.js').Vector;
|
|
59
|
+
lastControlPoint: import('../../definitions.js').Vector;
|
|
60
60
|
center?: undefined;
|
|
61
61
|
clockwise?: undefined;
|
|
62
62
|
majorRadius?: undefined;
|
|
@@ -69,8 +69,8 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
69
69
|
type: string;
|
|
70
70
|
segments: ({
|
|
71
71
|
type: string;
|
|
72
|
-
firstPoint: import(
|
|
73
|
-
lastPoint: import(
|
|
72
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
73
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
74
74
|
center?: undefined;
|
|
75
75
|
clockwise?: undefined;
|
|
76
76
|
majorRadius?: undefined;
|
|
@@ -81,9 +81,9 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
81
81
|
lastControlPoint?: undefined;
|
|
82
82
|
} | {
|
|
83
83
|
type: string;
|
|
84
|
-
firstPoint: import(
|
|
85
|
-
lastPoint: import(
|
|
86
|
-
center: import(
|
|
84
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
85
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
86
|
+
center: import('../../definitions.js').Vector;
|
|
87
87
|
clockwise: boolean;
|
|
88
88
|
majorRadius?: undefined;
|
|
89
89
|
minorRadius?: undefined;
|
|
@@ -93,9 +93,9 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
93
93
|
lastControlPoint?: undefined;
|
|
94
94
|
} | {
|
|
95
95
|
type: string;
|
|
96
|
-
firstPoint: import(
|
|
97
|
-
lastPoint: import(
|
|
98
|
-
center: import(
|
|
96
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
97
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
98
|
+
center: import('../../definitions.js').Vector;
|
|
99
99
|
clockwise: boolean;
|
|
100
100
|
majorRadius: number;
|
|
101
101
|
minorRadius: number;
|
|
@@ -105,9 +105,9 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
105
105
|
lastControlPoint?: undefined;
|
|
106
106
|
} | {
|
|
107
107
|
type: string;
|
|
108
|
-
firstPoint: import(
|
|
109
|
-
lastPoint: import(
|
|
110
|
-
controlPoint: import(
|
|
108
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
109
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
110
|
+
controlPoint: import('../../definitions.js').Vector;
|
|
111
111
|
center?: undefined;
|
|
112
112
|
clockwise?: undefined;
|
|
113
113
|
majorRadius?: undefined;
|
|
@@ -117,10 +117,10 @@ export declare function jsonFigure(figure: Figure): {
|
|
|
117
117
|
lastControlPoint?: undefined;
|
|
118
118
|
} | {
|
|
119
119
|
type: string;
|
|
120
|
-
firstPoint: import(
|
|
121
|
-
lastPoint: import(
|
|
122
|
-
firstControlPoint: import(
|
|
123
|
-
lastControlPoint: import(
|
|
120
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
121
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
122
|
+
firstControlPoint: import('../../definitions.js').Vector;
|
|
123
|
+
lastControlPoint: import('../../definitions.js').Vector;
|
|
124
124
|
center?: undefined;
|
|
125
125
|
clockwise?: undefined;
|
|
126
126
|
majorRadius?: undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Loop } from '../../models/Loop.js';
|
|
2
2
|
export declare function jsonLoop(loop: Loop): {
|
|
3
3
|
type: string;
|
|
4
4
|
segments: ({
|
|
5
5
|
type: string;
|
|
6
|
-
firstPoint: import(
|
|
7
|
-
lastPoint: import(
|
|
6
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
7
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
8
8
|
center?: undefined;
|
|
9
9
|
clockwise?: undefined;
|
|
10
10
|
majorRadius?: undefined;
|
|
@@ -15,9 +15,9 @@ export declare function jsonLoop(loop: Loop): {
|
|
|
15
15
|
lastControlPoint?: undefined;
|
|
16
16
|
} | {
|
|
17
17
|
type: string;
|
|
18
|
-
firstPoint: import(
|
|
19
|
-
lastPoint: import(
|
|
20
|
-
center: import(
|
|
18
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
19
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
20
|
+
center: import('../../definitions.js').Vector;
|
|
21
21
|
clockwise: boolean;
|
|
22
22
|
majorRadius?: undefined;
|
|
23
23
|
minorRadius?: undefined;
|
|
@@ -27,9 +27,9 @@ export declare function jsonLoop(loop: Loop): {
|
|
|
27
27
|
lastControlPoint?: undefined;
|
|
28
28
|
} | {
|
|
29
29
|
type: string;
|
|
30
|
-
firstPoint: import(
|
|
31
|
-
lastPoint: import(
|
|
32
|
-
center: import(
|
|
30
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
31
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
32
|
+
center: import('../../definitions.js').Vector;
|
|
33
33
|
clockwise: boolean;
|
|
34
34
|
majorRadius: number;
|
|
35
35
|
minorRadius: number;
|
|
@@ -39,9 +39,9 @@ export declare function jsonLoop(loop: Loop): {
|
|
|
39
39
|
lastControlPoint?: undefined;
|
|
40
40
|
} | {
|
|
41
41
|
type: string;
|
|
42
|
-
firstPoint: import(
|
|
43
|
-
lastPoint: import(
|
|
44
|
-
controlPoint: import(
|
|
42
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
43
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
44
|
+
controlPoint: import('../../definitions.js').Vector;
|
|
45
45
|
center?: undefined;
|
|
46
46
|
clockwise?: undefined;
|
|
47
47
|
majorRadius?: undefined;
|
|
@@ -51,10 +51,10 @@ export declare function jsonLoop(loop: Loop): {
|
|
|
51
51
|
lastControlPoint?: undefined;
|
|
52
52
|
} | {
|
|
53
53
|
type: string;
|
|
54
|
-
firstPoint: import(
|
|
55
|
-
lastPoint: import(
|
|
56
|
-
firstControlPoint: import(
|
|
57
|
-
lastControlPoint: import(
|
|
54
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
55
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
56
|
+
firstControlPoint: import('../../definitions.js').Vector;
|
|
57
|
+
lastControlPoint: import('../../definitions.js').Vector;
|
|
58
58
|
center?: undefined;
|
|
59
59
|
clockwise?: undefined;
|
|
60
60
|
majorRadius?: undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Segment } from
|
|
1
|
+
import { Segment } from '../../models/segments/Segment.js';
|
|
2
2
|
export declare function jsonSegment(segment: Segment): {
|
|
3
3
|
type: string;
|
|
4
|
-
firstPoint: import(
|
|
5
|
-
lastPoint: import(
|
|
4
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
5
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
6
6
|
center?: undefined;
|
|
7
7
|
clockwise?: undefined;
|
|
8
8
|
majorRadius?: undefined;
|
|
@@ -13,9 +13,9 @@ export declare function jsonSegment(segment: Segment): {
|
|
|
13
13
|
lastControlPoint?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
type: string;
|
|
16
|
-
firstPoint: import(
|
|
17
|
-
lastPoint: import(
|
|
18
|
-
center: import(
|
|
16
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
17
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
18
|
+
center: import('../../definitions.js').Vector;
|
|
19
19
|
clockwise: boolean;
|
|
20
20
|
majorRadius?: undefined;
|
|
21
21
|
minorRadius?: undefined;
|
|
@@ -25,9 +25,9 @@ export declare function jsonSegment(segment: Segment): {
|
|
|
25
25
|
lastControlPoint?: undefined;
|
|
26
26
|
} | {
|
|
27
27
|
type: string;
|
|
28
|
-
firstPoint: import(
|
|
29
|
-
lastPoint: import(
|
|
30
|
-
center: import(
|
|
28
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
29
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
30
|
+
center: import('../../definitions.js').Vector;
|
|
31
31
|
clockwise: boolean;
|
|
32
32
|
majorRadius: number;
|
|
33
33
|
minorRadius: number;
|
|
@@ -37,9 +37,9 @@ export declare function jsonSegment(segment: Segment): {
|
|
|
37
37
|
lastControlPoint?: undefined;
|
|
38
38
|
} | {
|
|
39
39
|
type: string;
|
|
40
|
-
firstPoint: import(
|
|
41
|
-
lastPoint: import(
|
|
42
|
-
controlPoint: import(
|
|
40
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
41
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
42
|
+
controlPoint: import('../../definitions.js').Vector;
|
|
43
43
|
center?: undefined;
|
|
44
44
|
clockwise?: undefined;
|
|
45
45
|
majorRadius?: undefined;
|
|
@@ -49,10 +49,10 @@ export declare function jsonSegment(segment: Segment): {
|
|
|
49
49
|
lastControlPoint?: undefined;
|
|
50
50
|
} | {
|
|
51
51
|
type: string;
|
|
52
|
-
firstPoint: import(
|
|
53
|
-
lastPoint: import(
|
|
54
|
-
firstControlPoint: import(
|
|
55
|
-
lastControlPoint: import(
|
|
52
|
+
firstPoint: import('../../definitions.js').Vector;
|
|
53
|
+
lastPoint: import('../../definitions.js').Vector;
|
|
54
|
+
firstControlPoint: import('../../definitions.js').Vector;
|
|
55
|
+
lastControlPoint: import('../../definitions.js').Vector;
|
|
56
56
|
center?: undefined;
|
|
57
57
|
clockwise?: undefined;
|
|
58
58
|
majorRadius?: undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { svgDiagram } from './svgDiagram.js';
|
|
2
|
+
export { svgFigure } from './svgFigure.js';
|
|
3
|
+
export { svgLoop } from './svgLoop.js';
|
|
4
|
+
export { svgSegmentToPath } from './svgSegment.js';
|
|
5
|
+
export { svgStrand } from './svgStrand.js';
|
|
6
|
+
export { svgViewbox } from './wrapSVG.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Diagram } from
|
|
2
|
-
import { Figure } from
|
|
3
|
-
import { BoundingBox } from
|
|
4
|
-
import { SVGUnit } from
|
|
5
|
-
import
|
|
6
|
-
import { Segment } from
|
|
1
|
+
import { Diagram } from '../../models/Diagram.js';
|
|
2
|
+
import { Figure } from '../../models/Figure.js';
|
|
3
|
+
import { BoundingBox } from '../../models/BoundingBox.js';
|
|
4
|
+
import { SVGUnit } from './wrapSVG.js';
|
|
5
|
+
import { Stroke } from '../../models/Stroke.js';
|
|
6
|
+
import { Segment } from '../../main.js';
|
|
7
7
|
type Shape = Figure | Diagram | Stroke | Segment;
|
|
8
8
|
export declare function svgBody(shape: Shape): string;
|
|
9
9
|
type ConfiguredShape = Shape | {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Diagram } from
|
|
1
|
+
import { Diagram } from '../../models/Diagram.js';
|
|
2
2
|
export declare function svgDiagram(diagram: Diagram): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Figure } from '../../models/Figure.js';
|
|
2
2
|
export declare function svgFigure(figure: Figure): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Loop } from '../../models/Loop.js';
|
|
2
2
|
export declare function svgLoop(loop: Loop): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Segment } from
|
|
1
|
+
import { Segment } from '../../models/segments/Segment.js';
|
|
2
2
|
export declare function svgSegmentToPath(segment: Segment): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Strand } from '../../models/Strand.js';
|
|
2
2
|
export declare function svgStrand(strand: Strand): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoundingBox } from
|
|
2
|
-
export declare function
|
|
1
|
+
import { BoundingBox } from '../../models/BoundingBox.js';
|
|
2
|
+
export declare function svgViewbox(bbox: BoundingBox, margin?: number): string;
|
|
3
3
|
export type SVGUnit = "mm" | "cm" | "in" | "pc" | "px" | "pt";
|
|
4
4
|
export declare function wrapSVG(body: string, boundingBox: BoundingBox, margin: number | undefined, unit: null | SVGUnit): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Line } from '../../models/segments/Line.js';
|
|
2
|
+
import { Arc } from '../../models/segments/Arc.js';
|
|
3
|
+
import { Loop } from '../../models/Loop.js';
|
|
4
|
+
import { Figure } from '../../models/Figure.js';
|
|
5
|
+
import { Diagram } from '../../models/Diagram.js';
|
|
6
|
+
import { EllipseArc } from '../../models/segments/EllipseArc.js';
|
|
7
|
+
import { CubicBezier } from '../../models/segments/CubicBezier.js';
|
|
8
|
+
import { QuadraticBezier } from '../../models/segments/QuadraticBezier.js';
|
|
9
|
+
export declare function importJSON(json: any): Line | Arc | EllipseArc | CubicBezier | QuadraticBezier | Loop | Figure | Diagram;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Vector } from './definitions.js';
|
|
2
2
|
export { Vector };
|
|
3
3
|
export declare const DEG2RAD: number;
|
|
4
4
|
export declare const RAD2DEG: number;
|
|
5
5
|
export declare function polarToCartesian(r: number, theta: number): Vector;
|
|
6
6
|
export declare function cartesianToPolar([x, y]: Vector): [number, number];
|
|
7
|
-
export type { Diagram, Figure, Loop, Strand, Stroke, TransformationMatrix, BoundingBox, Segment, Line, Arc, EllipseArc, CubicBezier, } from
|
|
8
|
-
export { draw } from
|
|
9
|
-
export { fuseAll, fuse, cut, intersect, eraseStrand, confineStrand, offset, outlineStroke, } from
|
|
10
|
-
export { exportSVG, svgBody } from
|
|
11
|
-
export { exportJSON } from
|
|
12
|
-
export { importJSON } from
|
|
7
|
+
export type { Diagram, Figure, Loop, Strand, Stroke, TransformationMatrix, BoundingBox, Segment, Line, Arc, EllipseArc, CubicBezier, } from './models/exports.js';
|
|
8
|
+
export { draw } from './draw.js';
|
|
9
|
+
export { fuseAll, fuse, cut, intersect, eraseStrand, confineStrand, offset, outlineStroke, } from './operations.js';
|
|
10
|
+
export { exportSVG, svgBody } from './export/svg/exportSVG.js';
|
|
11
|
+
export { exportJSON } from './export/json/exportJSON.js';
|
|
12
|
+
export { importJSON } from './import/json/importJSON.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BoundingBox } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Transformable } from
|
|
6
|
-
import { Strand } from
|
|
7
|
-
import
|
|
1
|
+
import { Vector } from '../definitions.js';
|
|
2
|
+
import { BoundingBox } from './BoundingBox.js';
|
|
3
|
+
import { Figure } from './Figure.js';
|
|
4
|
+
import { TransformationMatrix } from './TransformationMatrix.js';
|
|
5
|
+
import { Transformable } from './utils/Transformable.js';
|
|
6
|
+
import { Strand } from './Strand.js';
|
|
7
|
+
import { Stroke } from './Stroke.js';
|
|
8
8
|
export declare class Diagram extends Transformable<Diagram> {
|
|
9
9
|
figures: Figure[];
|
|
10
10
|
constructor(figures?: Figure[], { ignoreChecks }?: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Vector } from
|
|
2
|
-
import { TransformationMatrix } from
|
|
3
|
-
import
|
|
4
|
-
import { Loop } from
|
|
5
|
-
import { Strand } from
|
|
6
|
-
import
|
|
7
|
-
import { Transformable } from
|
|
1
|
+
import { Vector } from '../definitions.js';
|
|
2
|
+
import { TransformationMatrix } from './TransformationMatrix.js';
|
|
3
|
+
import { BoundingBox } from './BoundingBox.js';
|
|
4
|
+
import { Loop } from './Loop.js';
|
|
5
|
+
import { Strand } from './Strand.js';
|
|
6
|
+
import { Stroke } from './Stroke.js';
|
|
7
|
+
import { Transformable } from './utils/Transformable.js';
|
|
8
8
|
export declare class Figure extends Transformable<Figure> {
|
|
9
9
|
readonly contour: Loop;
|
|
10
10
|
readonly holes: Loop[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AbstractStroke } from
|
|
3
|
-
import
|
|
4
|
-
import { Segment } from
|
|
1
|
+
import { Vector } from '../definitions.js';
|
|
2
|
+
import { AbstractStroke } from './Stroke.js';
|
|
3
|
+
import { TransformationMatrix } from './TransformationMatrix.js';
|
|
4
|
+
import { Segment } from './segments/Segment.js';
|
|
5
5
|
export declare class Loop extends AbstractStroke<Loop> {
|
|
6
6
|
strokeType: string;
|
|
7
7
|
constructor(segments: Segment[], { ignoreChecks }?: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractStroke } from
|
|
2
|
-
import { TransformationMatrix } from
|
|
1
|
+
import { AbstractStroke } from './Stroke.js';
|
|
2
|
+
import { TransformationMatrix } from './TransformationMatrix.js';
|
|
3
3
|
export declare class Strand extends AbstractStroke<Strand> {
|
|
4
4
|
strokeType: string;
|
|
5
5
|
reverse(): Strand;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BoundingBox } from
|
|
2
|
-
import { Vector } from
|
|
3
|
-
import { Segment } from
|
|
4
|
-
import { TransformationMatrix } from
|
|
5
|
-
import { Transformable } from
|
|
1
|
+
import { BoundingBox } from './BoundingBox.js';
|
|
2
|
+
import { Vector } from '../definitions.js';
|
|
3
|
+
import { Segment } from './segments/Segment.js';
|
|
4
|
+
import { TransformationMatrix } from './TransformationMatrix.js';
|
|
5
|
+
import { Transformable } from './utils/Transformable.js';
|
|
6
6
|
export type Stroke = AbstractStroke<any>;
|
|
7
7
|
export declare abstract class AbstractStroke<T extends AbstractStroke<T>> extends Transformable<T> {
|
|
8
8
|
readonly segments: Segment[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { Diagram } from './Diagram.js';
|
|
2
|
+
export { Figure } from './Figure.js';
|
|
3
|
+
export { Loop } from './Loop.js';
|
|
4
|
+
export { Strand } from './Strand.js';
|
|
5
|
+
export type { Stroke } from './Stroke.js';
|
|
6
|
+
export { BoundingBox } from './BoundingBox.js';
|
|
7
|
+
export { TransformationMatrix } from './TransformationMatrix.js';
|
|
8
|
+
export { Line } from './segments/Line.js';
|
|
9
|
+
export { Arc } from './segments/Arc.js';
|
|
10
|
+
export { EllipseArc } from './segments/EllipseArc.js';
|
|
11
|
+
export { CubicBezier } from './segments/CubicBezier.js';
|
|
12
|
+
export { QuadraticBezier } from './segments/QuadraticBezier.js';
|
|
13
|
+
export type { Segment } from './segments/Segment.js';
|
|
14
|
+
export { isSegment } from './segments/utils/isSegment.js';
|
|
15
|
+
export { Transformable } from './utils/Transformable.js';
|