abstract-image 10.0.2 → 10.0.3
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/CHANGELOG.md +1 -1
- package/lib/__stories__/react-svg-export/example-1.stories.js +40 -4
- package/lib/__stories__/react-svg-export/example-1.stories.js.map +1 -1
- package/lib/__stories__/svg-export/example-1.stories.js +40 -4
- package/lib/__stories__/svg-export/example-1.stories.js.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image.test.js +22 -20
- package/lib/exporters/__tests__/dxf2d-export-image.test.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image.test.js +26 -24
- package/lib/exporters/__tests__/eps-export-image.test.js.map +1 -1
- package/lib/exporters/__tests__/png-export-image.test.js +8 -6
- package/lib/exporters/__tests__/png-export-image.test.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image.test.js +40 -38
- package/lib/exporters/__tests__/react-svg-export-image.test.js.map +1 -1
- package/lib/exporters/__tests__/svg-export-image.test.js +33 -31
- package/lib/exporters/__tests__/svg-export-image.test.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/_export-test-def.js +2 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/_export-test-def.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-ellipse.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-ellipse.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-group.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-group.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-line.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-line.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-polygon.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-polygon.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-polyline.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-polyline.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-rectangle.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-rectangle.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-text-growth-directions.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-text.js +38 -2
- package/lib/exporters/__tests__/tests-dxf2d-export-image/dxf2d-text.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/_export-test-def.js +2 -1
- package/lib/exporters/__tests__/tests-eps-export-image/_export-test-def.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-ellipse.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-ellipse.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-empty-text.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-group.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-group.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-line.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-line.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-polygon.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-polygon.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-polyline.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-polyline.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-rectangle.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-rectangle.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-text-growth-directions.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-text-iso-latin1-encoding.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-text-iso-latin1-encoding.js.map +1 -1
- package/lib/exporters/__tests__/tests-eps-export-image/eps-text.js +38 -2
- package/lib/exporters/__tests__/tests-eps-export-image/eps-text.js.map +1 -1
- package/lib/exporters/__tests__/tests-png-export-image/_export-test-def.js +2 -1
- package/lib/exporters/__tests__/tests-png-export-image/_export-test-def.js.map +1 -1
- package/lib/exporters/__tests__/tests-png-export-image/png-createPNG.js +38 -2
- package/lib/exporters/__tests__/tests-png-export-image/png-createPNG.js.map +1 -1
- package/lib/exporters/__tests__/tests-png-export-image/png-unsupported.test.js +5 -3
- package/lib/exporters/__tests__/tests-png-export-image/png-unsupported.test.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/_export-test-def.js +2 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/_export-test-def.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-binary-png.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-binary-png.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-binary-url.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-binary-url.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-binary.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-binary.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-callback.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-callback.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-dashed-line.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-dashed-line.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-direction-exception.test.js +5 -3
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-direction-exception.test.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-ellipse.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-ellipse.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-empty-text.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-group.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-group.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-line.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-line.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-polygon.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-polygon.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-polyline.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-polyline.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-rectangle.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-rectangle.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-subimage.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-subimage.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-bold.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-bold.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-growth-directions.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-italic.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-italic.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-sub.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text-sub.js.map +1 -1
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text.js +38 -2
- package/lib/exporters/__tests__/tests-react-svg-export-image/react-svg-text.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/_export-test-def.js +2 -1
- package/lib/exporters/__tests__/tests-svg-export-image/_export-test-def.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-binary.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-binary.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-dashed-line.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-dashed-line.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-direction-exception.test.js +5 -3
- package/lib/exporters/__tests__/tests-svg-export-image/svg-direction-exception.test.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-ellipse.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-ellipse.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-empty-text.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-group.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-group.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-line.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-line.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-polygon.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-polygon.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-polyline.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-polyline.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-rectangle.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-rectangle.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text-bold.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text-bold.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text-growth-directions.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text-italic.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text-italic.js.map +1 -1
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text.js +38 -2
- package/lib/exporters/__tests__/tests-svg-export-image/svg-text.js.map +1 -1
- package/lib/exporters/dxf2d-export-image.js +38 -2
- package/lib/exporters/dxf2d-export-image.js.map +1 -1
- package/lib/exporters/eps-export-image.js +4 -1
- package/lib/exporters/eps-export-image.js.map +1 -1
- package/lib/exporters/index.js +19 -3
- package/lib/exporters/index.js.map +1 -1
- package/lib/exporters/png-export-image.js +4 -1
- package/lib/exporters/png-export-image.js.map +1 -1
- package/lib/exporters/react-svg-export-image.js +40 -4
- package/lib/exporters/react-svg-export-image.js.map +1 -1
- package/lib/exporters/svg-export-image.js +38 -2
- package/lib/exporters/svg-export-image.js.map +1 -1
- package/lib/index.js +27 -11
- package/lib/index.js.map +1 -1
- package/lib/model/__tests__/color/export-test-def.js +2 -1
- package/lib/model/__tests__/color/export-test-def.js.map +1 -1
- package/lib/model/__tests__/color/export.test.js +11 -9
- package/lib/model/__tests__/color/export.test.js.map +1 -1
- package/lib/model/__tests__/color/test-defs/color-from-string.js +38 -2
- package/lib/model/__tests__/color/test-defs/color-from-string.js.map +1 -1
- package/lib/model/__tests__/color/test-defs/color-to-string.js +38 -2
- package/lib/model/__tests__/color/test-defs/color-to-string.js.map +1 -1
- package/lib/model/__tests__/color/test-defs/color-undefined-2.js +38 -2
- package/lib/model/__tests__/color/test-defs/color-undefined-2.js.map +1 -1
- package/lib/model/__tests__/color/test-defs/color-undefined.js +38 -2
- package/lib/model/__tests__/color/test-defs/color-undefined.js.map +1 -1
- package/lib/model/abstract-image.js +4 -1
- package/lib/model/abstract-image.js.map +1 -1
- package/lib/model/color.js +25 -19
- package/lib/model/color.js.map +1 -1
- package/lib/model/component.js +59 -13
- package/lib/model/component.js.map +1 -1
- package/lib/model/dash-style.js +6 -2
- package/lib/model/dash-style.js.map +1 -1
- package/lib/model/index.js +22 -6
- package/lib/model/index.js.map +1 -1
- package/lib/model/point.js +4 -1
- package/lib/model/point.js.map +1 -1
- package/lib/model/size.js +4 -1
- package/lib/model/size.js.map +1 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ReactSvgExportExample1 = ReactSvgExportExample1;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const AbstractImage = __importStar(require("../../index.js"));
|
|
39
|
+
function ReactSvgExportExample1() {
|
|
4
40
|
const components = [
|
|
5
41
|
AbstractImage.createLine(AbstractImage.createPoint(0, 200), AbstractImage.createPoint(400, 200), AbstractImage.black, 1),
|
|
6
42
|
AbstractImage.createLine(AbstractImage.createPoint(200, 0), AbstractImage.createPoint(200, 400), AbstractImage.black, 1),
|
|
@@ -13,7 +49,7 @@ export function ReactSvgExportExample1() {
|
|
|
13
49
|
React.createElement("pre", null, svg)));
|
|
14
50
|
}
|
|
15
51
|
// eslint-disable-next-line import/no-default-export
|
|
16
|
-
|
|
52
|
+
exports.default = {
|
|
17
53
|
component: ReactSvgExportExample1,
|
|
18
54
|
title: "ReactSvgExportExample1",
|
|
19
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-1.stories.js","sourceRoot":"","sources":["../../../src/__stories__/react-svg-export/example-1.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"example-1.stories.js","sourceRoot":"","sources":["../../../src/__stories__/react-svg-export/example-1.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wDA2CC;AA/CD,6CAA+B;AAE/B,8DAAgD;AAEhD,SAAgB,sBAAsB;IACpC,MAAM,UAAU,GAAG;QACjB,aAAa,CAAC,UAAU,CACtB,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,CAAC,EACjC,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,EACnC,aAAa,CAAC,KAAK,EACnB,CAAC,CACF;QACD,aAAa,CAAC,UAAU,CACtB,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,EACjC,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,EACnC,aAAa,CAAC,KAAK,EACnB,CAAC,CACF;QACD,aAAa,CAAC,UAAU,CACtB,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,EACnC,iBAAiB,EACjB,OAAO,EACP,EAAE,EACF,aAAa,CAAC,KAAK,EACnB,QAAQ,EACR,CAAC,EACD,QAAQ,EACR,SAAS,EACT,MAAM,EACN,CAAC,EACD,aAAa,CAAC,KAAK,EACnB,KAAK,CACN;KACF,CAAC;IACF,MAAM,KAAK,GAAG,aAAa,CAAC,mBAAmB,CAC7C,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAClC,aAAa,CAAC,KAAK,EACnB,UAAU,CACX,CAAC;IACF,MAAM,GAAG,GAAG,aAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CACL;QACE,4CAAkB;QAClB,iCAAM,GAAG,CAAO,CACZ,CACP,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,kBAAe;IACb,SAAS,EAAE,sBAAsB;IACjC,KAAK,EAAE,wBAAwB;CACxB,CAAC"}
|
|
@@ -1,6 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SvgExportExample1 = SvgExportExample1;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const AbstractImage = __importStar(require("../../index.js"));
|
|
39
|
+
function SvgExportExample1() {
|
|
4
40
|
const components = [
|
|
5
41
|
AbstractImage.createLine(AbstractImage.createPoint(25, 25), AbstractImage.createPoint(80, 60), AbstractImage.black, 2),
|
|
6
42
|
AbstractImage.createRectangle(AbstractImage.createPoint(10, 50), AbstractImage.createPoint(40, 80), AbstractImage.blue, 2, AbstractImage.red),
|
|
@@ -14,7 +50,7 @@ export function SvgExportExample1() {
|
|
|
14
50
|
React.createElement("img", { src: `data:image/svg+xml;base64,${base64}` })));
|
|
15
51
|
}
|
|
16
52
|
// eslint-disable-next-line import/no-default-export
|
|
17
|
-
|
|
53
|
+
exports.default = {
|
|
18
54
|
component: SvgExportExample1,
|
|
19
55
|
title: "SvgExportExample1",
|
|
20
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-1.stories.js","sourceRoot":"","sources":["../../../src/__stories__/svg-export/example-1.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"example-1.stories.js","sourceRoot":"","sources":["../../../src/__stories__/svg-export/example-1.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,8CA+BC;AAnCD,6CAA+B;AAE/B,8DAAgD;AAEhD,SAAgB,iBAAiB;IAC/B,MAAM,UAAU,GAAG;QACjB,aAAa,CAAC,UAAU,CACtB,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,EACjC,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,EACjC,aAAa,CAAC,KAAK,EACnB,CAAC,CACF;QACD,aAAa,CAAC,eAAe,CAC3B,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,EACjC,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,EACjC,aAAa,CAAC,IAAI,EAClB,CAAC,EACD,aAAa,CAAC,GAAG,CAClB;KACF,CAAC;IACF,MAAM,KAAK,GAAG,aAAa,CAAC,mBAAmB,CAC7C,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAClC,aAAa,CAAC,KAAK,EACnB,UAAU,CACX,CAAC;IACF,MAAM,GAAG,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,CACL;QACE,sCAAY;QACZ,iCAAM,GAAG,CAAO;QAChB,6BAAK,GAAG,EAAE,6BAA6B,MAAM,EAAE,GAAI,CAC/C,CACP,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,kBAAe;IACb,SAAS,EAAE,iBAAiB;IAC5B,KAAK,EAAE,mBAAmB;CACnB,CAAC"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const dxf2d_polyline_js_1 = require("./tests-dxf2d-export-image/dxf2d-polyline.js");
|
|
5
|
+
const dxf2d_rectangle_js_1 = require("./tests-dxf2d-export-image/dxf2d-rectangle.js");
|
|
6
|
+
const dxf2d_ellipse_js_1 = require("./tests-dxf2d-export-image/dxf2d-ellipse.js");
|
|
7
|
+
const dxf2d_group_js_1 = require("./tests-dxf2d-export-image/dxf2d-group.js");
|
|
8
|
+
const dxf2d_text_growth_directions_js_1 = require("./tests-dxf2d-export-image/dxf2d-text-growth-directions.js");
|
|
9
|
+
const dxf2d_line_js_1 = require("./tests-dxf2d-export-image/dxf2d-line.js");
|
|
10
|
+
const dxf2d_polygon_js_1 = require("./tests-dxf2d-export-image/dxf2d-polygon.js");
|
|
11
|
+
const dxf2d_text_js_1 = require("./tests-dxf2d-export-image/dxf2d-text.js");
|
|
12
|
+
(0, vitest_1.describe)("dxf2d-export-image", () => {
|
|
11
13
|
[
|
|
12
|
-
testDxf2dEllipse,
|
|
13
|
-
testDxf2dGroup,
|
|
14
|
-
testDxf2dLine,
|
|
15
|
-
testDxf2dPolygon,
|
|
16
|
-
testDxf2dPolyline,
|
|
17
|
-
testDxf2dRectangle,
|
|
18
|
-
testDxf2dTextGrowthDirections,
|
|
19
|
-
testDxf2dText,
|
|
14
|
+
dxf2d_ellipse_js_1.testDxf2dEllipse,
|
|
15
|
+
dxf2d_group_js_1.testDxf2dGroup,
|
|
16
|
+
dxf2d_line_js_1.testDxf2dLine,
|
|
17
|
+
dxf2d_polygon_js_1.testDxf2dPolygon,
|
|
18
|
+
dxf2d_polyline_js_1.testDxf2dPolyline,
|
|
19
|
+
dxf2d_rectangle_js_1.testDxf2dRectangle,
|
|
20
|
+
dxf2d_text_growth_directions_js_1.testDxf2dTextGrowthDirections,
|
|
21
|
+
dxf2d_text_js_1.testDxf2dText,
|
|
20
22
|
].forEach((item) => {
|
|
21
|
-
test(item.name, () => {
|
|
22
|
-
expect(item.abstractImage).toEqual(item.expectedImage);
|
|
23
|
+
(0, vitest_1.test)(item.name, () => {
|
|
24
|
+
(0, vitest_1.expect)(item.abstractImage).toEqual(item.expectedImage);
|
|
23
25
|
});
|
|
24
26
|
});
|
|
25
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dxf2d-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/dxf2d-export-image.test.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"dxf2d-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/dxf2d-export-image.test.tsx"],"names":[],"mappings":";;AAAA,mCAAgD;AAChD,oFAAiF;AACjF,sFAAmF;AACnF,kFAA+E;AAC/E,8EAA2E;AAC3E,gHAA2G;AAC3G,4EAAyE;AACzE,kFAA+E;AAC/E,4EAAyE;AAEzE,IAAA,iBAAQ,EAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC;QACE,mCAAgB;QAChB,+BAAc;QACd,6BAAa;QACb,mCAAgB;QAChB,qCAAiB;QACjB,uCAAkB;QAClB,+DAA6B;QAC7B,6BAAa;KACd,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACjB,IAAA,aAAI,EAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;YACnB,IAAA,eAAM,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const eps_ellipse_js_1 = require("./tests-eps-export-image/eps-ellipse.js");
|
|
5
|
+
const eps_empty_text_js_1 = require("./tests-eps-export-image/eps-empty-text.js");
|
|
6
|
+
const eps_group_js_1 = require("./tests-eps-export-image/eps-group.js");
|
|
7
|
+
const eps_text_iso_latin1_encoding_js_1 = require("./tests-eps-export-image/eps-text-iso-latin1-encoding.js");
|
|
8
|
+
const eps_text_growth_directions_js_1 = require("./tests-eps-export-image/eps-text-growth-directions.js");
|
|
9
|
+
const eps_text_js_1 = require("./tests-eps-export-image/eps-text.js");
|
|
10
|
+
const eps_line_js_1 = require("./tests-eps-export-image/eps-line.js");
|
|
11
|
+
const eps_polygon_js_1 = require("./tests-eps-export-image/eps-polygon.js");
|
|
12
|
+
const eps_rectangle_js_1 = require("./tests-eps-export-image/eps-rectangle.js");
|
|
13
|
+
const eps_polyline_js_1 = require("./tests-eps-export-image/eps-polyline.js");
|
|
14
|
+
(0, vitest_1.describe)("eps-export-image", () => {
|
|
13
15
|
[
|
|
14
|
-
testEpsEllipse,
|
|
15
|
-
testEpsEmptyText,
|
|
16
|
-
testEpsGroup,
|
|
17
|
-
testEpsLine,
|
|
18
|
-
testEpsPolygon,
|
|
19
|
-
testEpsPolyline,
|
|
20
|
-
testEpsRectangle,
|
|
21
|
-
testEpsTextGrowthDirections,
|
|
22
|
-
testEpsIsoLatin1Encoding,
|
|
23
|
-
testEpsText,
|
|
16
|
+
eps_ellipse_js_1.testEpsEllipse,
|
|
17
|
+
eps_empty_text_js_1.testEpsEmptyText,
|
|
18
|
+
eps_group_js_1.testEpsGroup,
|
|
19
|
+
eps_line_js_1.testEpsLine,
|
|
20
|
+
eps_polygon_js_1.testEpsPolygon,
|
|
21
|
+
eps_polyline_js_1.testEpsPolyline,
|
|
22
|
+
eps_rectangle_js_1.testEpsRectangle,
|
|
23
|
+
eps_text_growth_directions_js_1.testEpsTextGrowthDirections,
|
|
24
|
+
eps_text_iso_latin1_encoding_js_1.testEpsIsoLatin1Encoding,
|
|
25
|
+
eps_text_js_1.testEpsText,
|
|
24
26
|
].forEach((item) => {
|
|
25
|
-
test(item.name, () => {
|
|
26
|
-
expect(item.abstractImage).toEqual(item.expectedImage);
|
|
27
|
+
(0, vitest_1.test)(item.name, () => {
|
|
28
|
+
(0, vitest_1.expect)(item.abstractImage).toEqual(item.expectedImage);
|
|
27
29
|
});
|
|
28
30
|
});
|
|
29
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eps-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/eps-export-image.test.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"eps-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/eps-export-image.test.tsx"],"names":[],"mappings":";;AAAA,mCAAgD;AAChD,4EAAyE;AACzE,kFAA8E;AAC9E,wEAAqE;AACrE,8GAAoG;AACpG,0GAAqG;AACrG,sEAAmE;AACnE,sEAAmE;AACnE,4EAAyE;AACzE,gFAA6E;AAC7E,8EAA2E;AAE3E,IAAA,iBAAQ,EAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC;QACE,+BAAc;QACd,oCAAgB;QAChB,2BAAY;QACZ,yBAAW;QACX,+BAAc;QACd,iCAAe;QACf,mCAAgB;QAChB,2DAA2B;QAC3B,0DAAwB;QACxB,yBAAW;KACZ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACjB,IAAA,aAAI,EAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;YACnB,IAAA,eAAM,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const png_createPNG_js_1 = require("./tests-png-export-image/png-createPNG.js");
|
|
5
|
+
(0, vitest_1.describe)("png-export-image", () => {
|
|
6
|
+
[png_createPNG_js_1.testPngCreatePng].forEach((item) => {
|
|
7
|
+
(0, vitest_1.test)(item.name, () => {
|
|
8
|
+
(0, vitest_1.expect)(item.abstractImage).toEqual(item.expectedImage);
|
|
7
9
|
});
|
|
8
10
|
});
|
|
9
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"png-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/png-export-image.test.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"png-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/png-export-image.test.tsx"],"names":[],"mappings":";;AAAA,mCAAgD;AAChD,gFAA6E;AAE7E,IAAA,iBAAQ,EAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,CAAC,mCAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,IAAA,aAAI,EAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;YACnB,IAAA,eAAM,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,43 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const react_svg_binary_png_js_1 = require("./tests-react-svg-export-image/react-svg-binary-png.js");
|
|
5
|
+
const react_svg_binary_url_js_1 = require("./tests-react-svg-export-image/react-svg-binary-url.js");
|
|
6
|
+
const react_svg_binary_js_1 = require("./tests-react-svg-export-image/react-svg-binary.js");
|
|
7
|
+
const react_svg_callback_js_1 = require("./tests-react-svg-export-image/react-svg-callback.js");
|
|
8
|
+
const react_svg_text_bold_js_1 = require("./tests-react-svg-export-image/react-svg-text-bold.js");
|
|
9
|
+
const react_svg_dashed_line_js_1 = require("./tests-react-svg-export-image/react-svg-dashed-line.js");
|
|
10
|
+
const react_svg_ellipse_js_1 = require("./tests-react-svg-export-image/react-svg-ellipse.js");
|
|
11
|
+
const react_svg_empty_text_js_1 = require("./tests-react-svg-export-image/react-svg-empty-text.js");
|
|
12
|
+
const react_svg_group_js_1 = require("./tests-react-svg-export-image/react-svg-group.js");
|
|
13
|
+
const react_svg_line_js_1 = require("./tests-react-svg-export-image/react-svg-line.js");
|
|
14
|
+
const react_svg_polygon_js_1 = require("./tests-react-svg-export-image/react-svg-polygon.js");
|
|
15
|
+
const react_svg_polyline_js_1 = require("./tests-react-svg-export-image/react-svg-polyline.js");
|
|
16
|
+
const react_svg_subimage_js_1 = require("./tests-react-svg-export-image/react-svg-subimage.js");
|
|
17
|
+
const react_svg_text_growth_directions_js_1 = require("./tests-react-svg-export-image/react-svg-text-growth-directions.js");
|
|
18
|
+
const react_svg_text_italic_js_1 = require("./tests-react-svg-export-image/react-svg-text-italic.js");
|
|
19
|
+
const react_svg_text_sub_js_1 = require("./tests-react-svg-export-image/react-svg-text-sub.js");
|
|
20
|
+
const react_svg_text_js_1 = require("./tests-react-svg-export-image/react-svg-text.js");
|
|
21
|
+
(0, vitest_1.describe)("react-svg-export-image", () => {
|
|
20
22
|
[
|
|
21
|
-
testReactSvgBinaryPng,
|
|
22
|
-
testReactSvgBinaryUrl,
|
|
23
|
-
testReactSvgBinary,
|
|
24
|
-
testReactSvgCallback,
|
|
25
|
-
testReactSvgDashedLine,
|
|
26
|
-
testReactSvgEllipse,
|
|
27
|
-
testReactSvgEmptyText,
|
|
28
|
-
testReactSvgGroup,
|
|
29
|
-
testReactSvgLine,
|
|
30
|
-
testReactSvgPolygon,
|
|
31
|
-
testReactSvgPolyline,
|
|
32
|
-
testReactSvgSubImage,
|
|
33
|
-
testReactSvgBold,
|
|
34
|
-
testReactSvgTextGrowthDirections,
|
|
35
|
-
testReactSvgItalic,
|
|
36
|
-
testReactSvgSub,
|
|
37
|
-
testReactSvgText,
|
|
23
|
+
react_svg_binary_png_js_1.testReactSvgBinaryPng,
|
|
24
|
+
react_svg_binary_url_js_1.testReactSvgBinaryUrl,
|
|
25
|
+
react_svg_binary_js_1.testReactSvgBinary,
|
|
26
|
+
react_svg_callback_js_1.testReactSvgCallback,
|
|
27
|
+
react_svg_dashed_line_js_1.testReactSvgDashedLine,
|
|
28
|
+
react_svg_ellipse_js_1.testReactSvgEllipse,
|
|
29
|
+
react_svg_empty_text_js_1.testReactSvgEmptyText,
|
|
30
|
+
react_svg_group_js_1.testReactSvgGroup,
|
|
31
|
+
react_svg_line_js_1.testReactSvgLine,
|
|
32
|
+
react_svg_polygon_js_1.testReactSvgPolygon,
|
|
33
|
+
react_svg_polyline_js_1.testReactSvgPolyline,
|
|
34
|
+
react_svg_subimage_js_1.testReactSvgSubImage,
|
|
35
|
+
react_svg_text_bold_js_1.testReactSvgBold,
|
|
36
|
+
react_svg_text_growth_directions_js_1.testReactSvgTextGrowthDirections,
|
|
37
|
+
react_svg_text_italic_js_1.testReactSvgItalic,
|
|
38
|
+
react_svg_text_sub_js_1.testReactSvgSub,
|
|
39
|
+
react_svg_text_js_1.testReactSvgText,
|
|
38
40
|
].forEach((item) => {
|
|
39
|
-
test(item.name, () => {
|
|
40
|
-
expect(JSON.stringify(item.abstractImage)).toEqual(item.expectedSerializedJsx);
|
|
41
|
+
(0, vitest_1.test)(item.name, () => {
|
|
42
|
+
(0, vitest_1.expect)(JSON.stringify(item.abstractImage)).toEqual(item.expectedSerializedJsx);
|
|
41
43
|
});
|
|
42
44
|
});
|
|
43
45
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-svg-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/react-svg-export-image.test.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"react-svg-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/react-svg-export-image.test.tsx"],"names":[],"mappings":";;AAAA,mCAAgD;AAChD,oGAA+F;AAC/F,oGAA+F;AAC/F,4FAAwF;AACxF,gGAA4F;AAC5F,kGAAyF;AACzF,sGAAiG;AACjG,8FAA0F;AAC1F,oGAA+F;AAC/F,0FAAsF;AACtF,wFAAoF;AACpF,8FAA0F;AAC1F,gGAA4F;AAC5F,gGAA4F;AAC5F,4HAAsH;AACtH,sGAA6F;AAC7F,gGAAuF;AACvF,wFAAoF;AAEpF,IAAA,iBAAQ,EAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC;QACE,+CAAqB;QACrB,+CAAqB;QACrB,wCAAkB;QAClB,4CAAoB;QACpB,iDAAsB;QACtB,0CAAmB;QACnB,+CAAqB;QACrB,sCAAiB;QACjB,oCAAgB;QAChB,0CAAmB;QACnB,4CAAoB;QACpB,4CAAoB;QACpB,yCAAgB;QAChB,sEAAgC;QAChC,6CAAkB;QAClB,uCAAe;QACf,oCAAgB;KACjB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACjB,IAAA,aAAI,EAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;YACnB,IAAA,eAAM,EAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACjF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const svg_binary_js_1 = require("./tests-svg-export-image/svg-binary.js");
|
|
5
|
+
const svg_dashed_line_js_1 = require("./tests-svg-export-image/svg-dashed-line.js");
|
|
6
|
+
const svg_ellipse_js_1 = require("./tests-svg-export-image/svg-ellipse.js");
|
|
7
|
+
const svg_empty_text_js_1 = require("./tests-svg-export-image/svg-empty-text.js");
|
|
8
|
+
const svg_group_js_1 = require("./tests-svg-export-image/svg-group.js");
|
|
9
|
+
const svg_line_js_1 = require("./tests-svg-export-image/svg-line.js");
|
|
10
|
+
const svg_polygon_js_1 = require("./tests-svg-export-image/svg-polygon.js");
|
|
11
|
+
const svg_polyline_js_1 = require("./tests-svg-export-image/svg-polyline.js");
|
|
12
|
+
const svg_rectangle_js_1 = require("./tests-svg-export-image/svg-rectangle.js");
|
|
13
|
+
const svg_text_bold_js_1 = require("./tests-svg-export-image/svg-text-bold.js");
|
|
14
|
+
const svg_text_growth_directions_js_1 = require("./tests-svg-export-image/svg-text-growth-directions.js");
|
|
15
|
+
const svg_text_italic_js_1 = require("./tests-svg-export-image/svg-text-italic.js");
|
|
16
|
+
const svg_text_js_1 = require("./tests-svg-export-image/svg-text.js");
|
|
17
|
+
(0, vitest_1.describe)("svg-export-image", () => {
|
|
16
18
|
[
|
|
17
|
-
testSvgBinary,
|
|
18
|
-
testSvgDashedLine,
|
|
19
|
-
testSvgDashedLine,
|
|
20
|
-
testSvgEllpise,
|
|
21
|
-
testSvgEmptyText,
|
|
22
|
-
testSvgGroup,
|
|
23
|
-
testSvgLine,
|
|
24
|
-
testSvgPolygon,
|
|
25
|
-
testSvgPolyline,
|
|
26
|
-
testSvgRectangle,
|
|
27
|
-
testSvgTextBold,
|
|
28
|
-
testSvgTextGrowthDirections,
|
|
29
|
-
testSvgTextItalic,
|
|
30
|
-
testSvgText,
|
|
19
|
+
svg_binary_js_1.testSvgBinary,
|
|
20
|
+
svg_dashed_line_js_1.testSvgDashedLine,
|
|
21
|
+
svg_dashed_line_js_1.testSvgDashedLine,
|
|
22
|
+
svg_ellipse_js_1.testSvgEllpise,
|
|
23
|
+
svg_empty_text_js_1.testSvgEmptyText,
|
|
24
|
+
svg_group_js_1.testSvgGroup,
|
|
25
|
+
svg_line_js_1.testSvgLine,
|
|
26
|
+
svg_polygon_js_1.testSvgPolygon,
|
|
27
|
+
svg_polyline_js_1.testSvgPolyline,
|
|
28
|
+
svg_rectangle_js_1.testSvgRectangle,
|
|
29
|
+
svg_text_bold_js_1.testSvgTextBold,
|
|
30
|
+
svg_text_growth_directions_js_1.testSvgTextGrowthDirections,
|
|
31
|
+
svg_text_italic_js_1.testSvgTextItalic,
|
|
32
|
+
svg_text_js_1.testSvgText,
|
|
31
33
|
].forEach((item) => {
|
|
32
|
-
test(item.name, () => {
|
|
33
|
-
expect(item.abstractImage).toEqual(item.expectedImage);
|
|
34
|
+
(0, vitest_1.test)(item.name, () => {
|
|
35
|
+
(0, vitest_1.expect)(item.abstractImage).toEqual(item.expectedImage);
|
|
34
36
|
});
|
|
35
37
|
});
|
|
36
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/svg-export-image.test.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"svg-export-image.test.js","sourceRoot":"","sources":["../../../src/exporters/__tests__/svg-export-image.test.tsx"],"names":[],"mappings":";;AAAA,mCAAgD;AAChD,0EAAuE;AACvE,oFAAgF;AAChF,4EAAyE;AACzE,kFAA8E;AAC9E,wEAAqE;AACrE,sEAAmE;AACnE,4EAAyE;AACzE,8EAA2E;AAC3E,gFAA6E;AAC7E,gFAA4E;AAC5E,0GAAqG;AACrG,oFAAgF;AAChF,sEAAmE;AAEnE,IAAA,iBAAQ,EAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC;QACE,6BAAa;QACb,sCAAiB;QACjB,sCAAiB;QACjB,+BAAc;QACd,oCAAgB;QAChB,2BAAY;QACZ,yBAAW;QACX,+BAAc;QACd,iCAAe;QACf,mCAAgB;QAChB,kCAAe;QACf,2DAA2B;QAC3B,sCAAiB;QACjB,yBAAW;KACZ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACjB,IAAA,aAAI,EAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;YACnB,IAAA,eAAM,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_export-test-def.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/tests-dxf2d-export-image/_export-test-def.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
1
|
+
{"version":3,"file":"_export-test-def.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/tests-dxf2d-export-image/_export-test-def.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -1,10 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.testDxf2dEllipse = void 0;
|
|
37
|
+
const AbstractImage = __importStar(require("../../../index.js"));
|
|
2
38
|
const components = [
|
|
3
39
|
AbstractImage.createEllipse(AbstractImage.createPoint(80, 40), AbstractImage.createPoint(100, 60), AbstractImage.black, 1, AbstractImage.blue),
|
|
4
40
|
];
|
|
5
41
|
const image = AbstractImage.createAbstractImage(AbstractImage.createPoint(0, 0), AbstractImage.createSize(400, 400), AbstractImage.white, components);
|
|
6
42
|
const dxf = AbstractImage.dxf2dExportImage(image);
|
|
7
|
-
|
|
43
|
+
exports.testDxf2dEllipse = {
|
|
8
44
|
name: "dxf2d ellipse",
|
|
9
45
|
abstractImage: dxf,
|
|
10
46
|
expectedImage: `999
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dxf2d-ellipse.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/tests-dxf2d-export-image/dxf2d-ellipse.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"dxf2d-ellipse.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/tests-dxf2d-export-image/dxf2d-ellipse.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iEAAmD;AAEnD,MAAM,UAAU,GAAG;IACjB,aAAa,CAAC,aAAa,CACzB,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,EACjC,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,EAClC,aAAa,CAAC,KAAK,EACnB,CAAC,EACD,aAAa,CAAC,IAAI,CACnB;CACF,CAAC;AACF,MAAM,KAAK,GAAG,aAAa,CAAC,mBAAmB,CAC7C,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAClC,aAAa,CAAC,KAAK,EACnB,UAAU,CACX,CAAC;AAEF,MAAM,GAAG,GAAG,aAAa,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAErC,QAAA,gBAAgB,GAAkB;IAC7C,IAAI,EAAE,eAAe;IACrB,aAAa,EAAE,GAAG;IAClB,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2Xb;CACH,CAAC"}
|
|
@@ -1,4 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.testDxf2dGroup = void 0;
|
|
37
|
+
const AbstractImage = __importStar(require("../../../index.js"));
|
|
2
38
|
const components = [
|
|
3
39
|
AbstractImage.createGroup("group", [
|
|
4
40
|
AbstractImage.createText(AbstractImage.createPoint(200, 200), "Test", "Helvetica", 12, AbstractImage.black, "normal", 0, "center", "uniform", "uniform", 0, AbstractImage.black, false),
|
|
@@ -7,7 +43,7 @@ const components = [
|
|
|
7
43
|
];
|
|
8
44
|
const image = AbstractImage.createAbstractImage(AbstractImage.createPoint(0, 0), AbstractImage.createSize(400, 400), AbstractImage.white, components);
|
|
9
45
|
const dxf = AbstractImage.dxf2dExportImage(image);
|
|
10
|
-
|
|
46
|
+
exports.testDxf2dGroup = {
|
|
11
47
|
name: "dxf2d group",
|
|
12
48
|
abstractImage: dxf,
|
|
13
49
|
expectedImage: `999
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dxf2d-group.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/tests-dxf2d-export-image/dxf2d-group.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"dxf2d-group.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/tests-dxf2d-export-image/dxf2d-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iEAAmD;AAEnD,MAAM,UAAU,GAAG;IACjB,aAAa,CAAC,WAAW,CAAC,OAAO,EAAE;QACjC,aAAa,CAAC,UAAU,CACtB,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,EACnC,MAAM,EACN,WAAW,EACX,EAAE,EACF,aAAa,CAAC,KAAK,EACnB,QAAQ,EACR,CAAC,EACD,QAAQ,EACR,SAAS,EACT,SAAS,EACT,CAAC,EACD,aAAa,CAAC,KAAK,EACnB,KAAK,CACN;QACD,aAAa,CAAC,eAAe,CAC3B,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,EACjC,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,EACjC,aAAa,CAAC,IAAI,EAClB,CAAC,EACD,aAAa,CAAC,GAAG,CAClB;KACF,CAAC;CACH,CAAC;AACF,MAAM,KAAK,GAAG,aAAa,CAAC,mBAAmB,CAC7C,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAClC,aAAa,CAAC,KAAK,EACnB,UAAU,CACX,CAAC;AAEF,MAAM,GAAG,GAAG,aAAa,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAErC,QAAA,cAAc,GAAkB;IAC3C,IAAI,EAAE,aAAa;IACnB,aAAa,EAAE,GAAG;IAClB,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2Hb;CACH,CAAC"}
|