abstract-image 3.1.3 → 3.2.0
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 +27 -21
- package/LICENSE +21 -21
- package/README.md +71 -71
- package/lib/__stories__/react-svg-export/example-1.stories.d.ts.map +1 -1
- package/lib/__stories__/react-svg-export/example-1.stories.js +1 -1
- package/lib/__stories__/react-svg-export/example-1.stories.js.map +1 -1
- package/lib/_tests_/exporters/svg-export-image.test.d.ts +2 -0
- package/lib/_tests_/exporters/svg-export-image.test.d.ts.map +1 -0
- package/lib/_tests_/exporters/svg-export-image.test.js +35 -0
- package/lib/_tests_/exporters/svg-export-image.test.js.map +1 -0
- package/lib/exporters/__tests__/dxf/export-test-def.d.ts +11 -0
- package/lib/exporters/__tests__/dxf/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/export-test-def.js +6 -0
- package/lib/exporters/__tests__/dxf/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/dxf/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/export.test.js +17 -0
- package/lib/exporters/__tests__/dxf/export.test.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.js +413 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.js +160 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.js +89 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.js +123 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.js +113 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.js +133 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.js +172 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.js +97 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.js.map +1 -0
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-ellipse.js +379 -379
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.js +124 -124
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.js.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-line.js +55 -55
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polygon.js +89 -89
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polyline.js +79 -79
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-rectangle.js +99 -99
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.js +139 -139
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.js +64 -64
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-ellipse.js +24 -24
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.js +27 -27
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-group.js +32 -32
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-group.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-line.js +20 -20
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-polygon.js +34 -34
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-polyline.js +26 -26
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-rectangle.js +20 -20
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.js +63 -63
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text.js +27 -27
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text.js.map +1 -1
- package/lib/exporters/__tests__/exception/react-svg-direction-exception.test.js +2 -2
- package/lib/exporters/__tests__/exception/react-svg-direction-exception.test.js.map +1 -1
- package/lib/exporters/__tests__/exception/svg-direction-exception.test.js +2 -2
- package/lib/exporters/__tests__/exception/svg-direction-exception.test.js.map +1 -1
- package/lib/exporters/__tests__/export-test-def.d.ts +8 -0
- package/lib/exporters/__tests__/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/export-test-def.js +3 -0
- package/lib/exporters/__tests__/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/export.test.js +18 -0
- package/lib/exporters/__tests__/export.test.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.d.ts +12 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.js +6 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/export.test.js +17 -0
- package/lib/exporters/__tests__/react-svg/export.test.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.js +33 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.js +33 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.js +38 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.js +37 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.js +40 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.js +42 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.js +33 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.js +37 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.js.map +1 -0
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.js +4 -4
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.js.map +1 -1
- package/lib/exporters/__tests__/svg/export-test-def.d.ts +11 -0
- package/lib/exporters/__tests__/svg/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/export-test-def.js +6 -0
- package/lib/exporters/__tests__/svg/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/svg/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/svg/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/export.test.js +17 -0
- package/lib/exporters/__tests__/svg/export.test.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.js +37 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.js +40 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.js +42 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.js +37 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.js.map +1 -0
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.js +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-group.js +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-group.js.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.js +4 -4
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text.js +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text.js.map +1 -1
- package/lib/exporters/__tests__/test-defs/png-export-image.d.ts +3 -0
- package/lib/exporters/__tests__/test-defs/png-export-image.d.ts.map +1 -0
- package/lib/exporters/__tests__/test-defs/png-export-image.js +9 -0
- package/lib/exporters/__tests__/test-defs/png-export-image.js.map +1 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.d.ts +3 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.d.ts.map +1 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.js +54 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.js.map +1 -0
- package/lib/exporters/react-svg-export-image.js +2 -2
- package/lib/exporters/react-svg-export-image.js.map +1 -1
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.d.ts +3 -0
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.d.ts.map +1 -0
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.js +66 -0
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.js.map +1 -0
- package/lib/model/component.d.ts +3 -2
- package/lib/model/component.d.ts.map +1 -1
- package/lib/model/component.js +12 -11
- package/lib/model/component.js.map +1 -1
- package/package.json +2 -2
- package/src/__stories__/react-svg-export/example-1.stories.tsx +54 -53
- package/src/__stories__/svg-export/example-1.stories.tsx +42 -42
- package/src/exporters/__tests__/dxf2d-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/dxf2d-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-ellipse.ts +405 -405
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.ts +166 -165
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-line.ts +80 -80
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polygon.ts +114 -114
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polyline.ts +103 -103
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-rectangle.ts +125 -125
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.ts +214 -210
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.ts +97 -96
- package/src/exporters/__tests__/eps-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/eps-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-ellipse.ts +50 -50
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.ts +60 -59
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-group.ts +74 -73
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-line.ts +45 -45
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-polygon.ts +65 -65
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-polyline.ts +58 -58
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-rectangle.ts +46 -46
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.ts +138 -134
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-text.ts +60 -59
- package/src/exporters/__tests__/exception/png-unsupported.test.tsx +25 -25
- package/src/exporters/__tests__/exception/react-svg-direction-exception.test.tsx +65 -63
- package/src/exporters/__tests__/exception/svg-direction-exception.test.tsx +65 -63
- package/src/exporters/__tests__/png-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/png-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/png-export-image/test-defs/png-createPNG.tsx +26 -26
- package/src/exporters/__tests__/react-svg-export-image/export-test-def.tsx +13 -13
- package/src/exporters/__tests__/react-svg-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-binary-png.tsx +27 -27
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-binary.tsx +26 -26
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.tsx +60 -59
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-ellipse.tsx +28 -28
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.tsx +35 -34
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.tsx +44 -43
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-line.tsx +26 -26
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-polygon.tsx +32 -32
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-polyline.tsx +33 -33
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-rectangle.tsx +27 -27
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.tsx +36 -35
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.tsx +80 -76
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.tsx +35 -34
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.tsx +35 -34
- package/src/exporters/__tests__/svg-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/svg-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-binary.tsx +26 -26
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-ellipse.ts +27 -27
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.ts +34 -33
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-group.ts +44 -43
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-line.ts +26 -26
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-polygon.ts +32 -32
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-polyline.ts +33 -33
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-rectangle.ts +27 -27
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.ts +80 -76
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-text.ts +35 -34
- package/src/exporters/dxf2d-export-image.ts +218 -218
- package/src/exporters/eps-export-image.ts +154 -154
- package/src/exporters/index.ts +3 -3
- package/src/exporters/png-export-image.ts +12 -12
- package/src/exporters/react-svg-export-image.tsx +298 -298
- package/src/exporters/svg-export-image.ts +334 -334
- package/src/index.ts +11 -11
- package/src/model/__tests__/color/export-test-def.ts +13 -13
- package/src/model/__tests__/color/export.test.tsx +14 -14
- package/src/model/__tests__/color/test-defs/color-from-string.ts +46 -46
- package/src/model/__tests__/color/test-defs/color-to-string.ts +35 -35
- package/src/model/__tests__/color/test-defs/color-undefined-2.ts +8 -8
- package/src/model/__tests__/color/test-defs/color-undefined.ts +8 -8
- package/src/model/abstract-image.ts +25 -25
- package/src/model/color.ts +52 -52
- package/src/model/component.ts +266 -279
- package/src/model/index.ts +5 -5
- package/src/model/point.ts +11 -11
- package/src/model/size.ts +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
|
-
|
|
5
|
-
## [Unreleased](https://github.com/dividab/abstract-visuals/compare/abstract-image@3.0.1...master)
|
|
6
|
-
|
|
7
|
-
### Added
|
|
8
|
-
|
|
9
|
-
### Changed
|
|
10
|
-
|
|
11
|
-
### Removed
|
|
12
|
-
|
|
13
|
-
## [v3.
|
|
14
|
-
|
|
15
|
-
### Added
|
|
16
|
-
|
|
17
|
-
- Added
|
|
18
|
-
|
|
19
|
-
## v3.0.0 - 2021-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
|
+
|
|
5
|
+
## [Unreleased](https://github.com/dividab/abstract-visuals/compare/abstract-image@3.0.1...master)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
### Removed
|
|
12
|
+
|
|
13
|
+
## [v3.1.4](https://github.com/dividab/abstract-visuals/compare/abstract-image@3.1.3...abstract-image@3.1.4) - 2022-01-05
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added italic and mediumBold as options for texts
|
|
18
|
+
|
|
19
|
+
## [v3.0.1](https://github.com/dividab/abstract-visuals/compare/abstract-image@3.0.0...abstract-image@3.0.1) - 2021-01-01
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Added typing on GrowthDirection for textAnchor on the svg export.
|
|
24
|
+
|
|
25
|
+
## v3.0.0 - 2021-03-24
|
|
26
|
+
|
|
27
|
+
- Start of changelog.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 Divid AB
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Divid AB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
# abstract-image
|
|
2
|
-
|
|
3
|
-
[![npm version][version-image]][version-url]
|
|
4
|
-
[![code style: prettier][prettier-image]][prettier-url]
|
|
5
|
-
[![MIT license][license-image]][license-url]
|
|
6
|
-
|
|
7
|
-
Dynamically create images using code or JSX and render to any format
|
|
8
|
-
|
|
9
|
-
## Introduction
|
|
10
|
-
|
|
11
|
-
Sometimes you need to create an image dynamically, for example when dynamically generating schematics etc. This library makes that easy by providing tools to create an abstract representation of an image which can then be turned into a concrete format such as .png, .svg etc.
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
`npm install --save abstract-document`
|
|
16
|
-
|
|
17
|
-
The library is compiled to ES5 and no polyfills are required.
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
```js
|
|
22
|
-
import * as React from "react";
|
|
23
|
-
import * as AbstractImage from "abstract-image";
|
|
24
|
-
|
|
25
|
-
export function AbstractImageExample() {
|
|
26
|
-
const components = [
|
|
27
|
-
AbstractImage.createLine(
|
|
28
|
-
AbstractImage.createPoint(25, 25),
|
|
29
|
-
AbstractImage.createPoint(80, 60),
|
|
30
|
-
AbstractImage.black,
|
|
31
|
-
2
|
|
32
|
-
),
|
|
33
|
-
AbstractImage.createRectangle(
|
|
34
|
-
AbstractImage.createPoint(10, 50),
|
|
35
|
-
AbstractImage.createPoint(40, 80),
|
|
36
|
-
AbstractImage.blue,
|
|
37
|
-
2,
|
|
38
|
-
AbstractImage.fromArgb(100, 0, 0, 0)
|
|
39
|
-
),
|
|
40
|
-
AbstractImage.createRectangle(
|
|
41
|
-
AbstractImage.createPoint(60, 50),
|
|
42
|
-
AbstractImage.createPoint(90, 80),
|
|
43
|
-
AbstractImage.blue,
|
|
44
|
-
2,
|
|
45
|
-
AbstractImage.transparent
|
|
46
|
-
)
|
|
47
|
-
];
|
|
48
|
-
const image = AbstractImage.createAbstractImage(
|
|
49
|
-
AbstractImage.createPoint(0, 0),
|
|
50
|
-
AbstractImage.createSize(400, 400),
|
|
51
|
-
AbstractImage.white,
|
|
52
|
-
components
|
|
53
|
-
);
|
|
54
|
-
const svg = AbstractImage.createSVG(image);
|
|
55
|
-
return (
|
|
56
|
-
<div>
|
|
57
|
-
<h1>Svg</h1>
|
|
58
|
-
<p>Test</p>
|
|
59
|
-
<pre>{svg}</pre>
|
|
60
|
-
<img width="400" height="400" src={`data:image/svg+xml;,${svg}`} />
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
[version-image]: https://img.shields.io/npm/v/abstract-image.svg?style=flat
|
|
67
|
-
[version-url]: https://www.npmjs.com/package/abstract-image
|
|
68
|
-
[license-image]: https://img.shields.io/github/license/dividab/abstract-visuals.svg?style=flat
|
|
69
|
-
[license-url]: https://opensource.org/licenses/MIT
|
|
70
|
-
[prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat
|
|
71
|
-
[prettier-url]: https://github.com/prettier/prettier
|
|
1
|
+
# abstract-image
|
|
2
|
+
|
|
3
|
+
[![npm version][version-image]][version-url]
|
|
4
|
+
[![code style: prettier][prettier-image]][prettier-url]
|
|
5
|
+
[![MIT license][license-image]][license-url]
|
|
6
|
+
|
|
7
|
+
Dynamically create images using code or JSX and render to any format
|
|
8
|
+
|
|
9
|
+
## Introduction
|
|
10
|
+
|
|
11
|
+
Sometimes you need to create an image dynamically, for example when dynamically generating schematics etc. This library makes that easy by providing tools to create an abstract representation of an image which can then be turned into a concrete format such as .png, .svg etc.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
`npm install --save abstract-document`
|
|
16
|
+
|
|
17
|
+
The library is compiled to ES5 and no polyfills are required.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import * as React from "react";
|
|
23
|
+
import * as AbstractImage from "abstract-image";
|
|
24
|
+
|
|
25
|
+
export function AbstractImageExample() {
|
|
26
|
+
const components = [
|
|
27
|
+
AbstractImage.createLine(
|
|
28
|
+
AbstractImage.createPoint(25, 25),
|
|
29
|
+
AbstractImage.createPoint(80, 60),
|
|
30
|
+
AbstractImage.black,
|
|
31
|
+
2
|
|
32
|
+
),
|
|
33
|
+
AbstractImage.createRectangle(
|
|
34
|
+
AbstractImage.createPoint(10, 50),
|
|
35
|
+
AbstractImage.createPoint(40, 80),
|
|
36
|
+
AbstractImage.blue,
|
|
37
|
+
2,
|
|
38
|
+
AbstractImage.fromArgb(100, 0, 0, 0)
|
|
39
|
+
),
|
|
40
|
+
AbstractImage.createRectangle(
|
|
41
|
+
AbstractImage.createPoint(60, 50),
|
|
42
|
+
AbstractImage.createPoint(90, 80),
|
|
43
|
+
AbstractImage.blue,
|
|
44
|
+
2,
|
|
45
|
+
AbstractImage.transparent
|
|
46
|
+
)
|
|
47
|
+
];
|
|
48
|
+
const image = AbstractImage.createAbstractImage(
|
|
49
|
+
AbstractImage.createPoint(0, 0),
|
|
50
|
+
AbstractImage.createSize(400, 400),
|
|
51
|
+
AbstractImage.white,
|
|
52
|
+
components
|
|
53
|
+
);
|
|
54
|
+
const svg = AbstractImage.createSVG(image);
|
|
55
|
+
return (
|
|
56
|
+
<div>
|
|
57
|
+
<h1>Svg</h1>
|
|
58
|
+
<p>Test</p>
|
|
59
|
+
<pre>{svg}</pre>
|
|
60
|
+
<img width="400" height="400" src={`data:image/svg+xml;,${svg}`} />
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
[version-image]: https://img.shields.io/npm/v/abstract-image.svg?style=flat
|
|
67
|
+
[version-url]: https://www.npmjs.com/package/abstract-image
|
|
68
|
+
[license-image]: https://img.shields.io/github/license/dividab/abstract-visuals.svg?style=flat
|
|
69
|
+
[license-url]: https://opensource.org/licenses/MIT
|
|
70
|
+
[prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat
|
|
71
|
+
[prettier-url]: https://github.com/prettier/prettier
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-1.stories.d.ts","sourceRoot":"","sources":["../../../src/__stories__/react-svg-export/example-1.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,wBAAgB,sBAAsB,IAAI,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"example-1.stories.d.ts","sourceRoot":"","sources":["../../../src/__stories__/react-svg-export/example-1.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,wBAAgB,sBAAsB,IAAI,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CA2C/D;;AAGD,wBAGU"}
|
|
@@ -26,7 +26,7 @@ function ReactSvgExportExample1() {
|
|
|
26
26
|
const components = [
|
|
27
27
|
AbstractImage.createLine(AbstractImage.createPoint(0, 200), AbstractImage.createPoint(400, 200), AbstractImage.black, 1),
|
|
28
28
|
AbstractImage.createLine(AbstractImage.createPoint(200, 0), AbstractImage.createPoint(200, 400), AbstractImage.black, 1),
|
|
29
|
-
AbstractImage.createText(AbstractImage.createPoint(200, 200), "Testing texting", "Arial", 20, AbstractImage.black, "normal", 0, "center", "uniform", "down", 0, AbstractImage.black),
|
|
29
|
+
AbstractImage.createText(AbstractImage.createPoint(200, 200), "Testing texting", "Arial", 20, AbstractImage.black, "normal", 0, "center", "uniform", "down", 0, AbstractImage.black, false),
|
|
30
30
|
];
|
|
31
31
|
const image = AbstractImage.createAbstractImage(AbstractImage.createPoint(0, 0), AbstractImage.createSize(400, 400), AbstractImage.white, components);
|
|
32
32
|
const svg = AbstractImage.createReactSvg(image);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-1.stories.js","sourceRoot":"","sources":["../../../src/__stories__/react-svg-export/example-1.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,qDAAuC;AAEvC,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,
|
|
1
|
+
{"version":3,"file":"example-1.stories.js","sourceRoot":"","sources":["../../../src/__stories__/react-svg-export/example-1.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,qDAAuC;AAEvC,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;AA3CD,wDA2CC;AAED,oDAAoD;AACpD,kBAAe;IACb,SAAS,EAAE,sBAAsB;IACjC,KAAK,EAAE,wBAAwB;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-export-image.test.d.ts","sourceRoot":"","sources":["../../../src/_tests_/exporters/svg-export-image.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
const AbstractImage = __importStar(require("../../../src/index"));
|
|
23
|
+
describe("svg export", () => {
|
|
24
|
+
it("doesnt throw exception and produces output", () => {
|
|
25
|
+
const components = [
|
|
26
|
+
AbstractImage.createLine(AbstractImage.createPoint(25, 25), AbstractImage.createPoint(80, 60), AbstractImage.black, 2),
|
|
27
|
+
AbstractImage.createRectangle(AbstractImage.createPoint(10, 50), AbstractImage.createPoint(50, 60), AbstractImage.blue, 2, AbstractImage.red),
|
|
28
|
+
];
|
|
29
|
+
const image = AbstractImage.createAbstractImage(AbstractImage.createPoint(0, 0), AbstractImage.createSize(400, 400), AbstractImage.white, components);
|
|
30
|
+
const svg = AbstractImage.createSVG(image);
|
|
31
|
+
// console.log(svg);
|
|
32
|
+
expect(svg !== "").toEqual(true);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=svg-export-image.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-export-image.test.js","sourceRoot":"","sources":["../../../src/_tests_/exporters/svg-export-image.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AAEpD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,UAAU,GAAG;YACjB,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;YACD,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;SACF,CAAC;QACF,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;QACF,MAAM,GAAG,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC3C,oBAAoB;QACpB,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines a data-type that represents a single test for the Docx render function
|
|
3
|
+
*/
|
|
4
|
+
export declare type ExportTestDef = {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly only?: boolean;
|
|
7
|
+
readonly skip?: boolean;
|
|
8
|
+
readonly abstractImage: string;
|
|
9
|
+
readonly expectedImage: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=export-test-def.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-test-def.d.ts","sourceRoot":"","sources":["../../../../src/exporters/__tests__/dxf/export-test-def.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAY,aAAa,GAAG;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-test-def.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/dxf/export-test-def.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.test.d.ts","sourceRoot":"","sources":["../../../../src/exporters/__tests__/dxf/export.test.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,KAAK,0BAA+D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.tests = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const test_utils_1 = require("@abstract-visuals/test-utils");
|
|
9
|
+
exports.tests = (0, test_utils_1.loadTests)(path_1.default.join(__dirname, "test-defs/"));
|
|
10
|
+
describe("dxf", () => {
|
|
11
|
+
(0, test_utils_1.onlySkip)(exports.tests).forEach((item) => {
|
|
12
|
+
test(item.name, async () => {
|
|
13
|
+
expect(item.abstractImage).toEqual(item.expectedImage);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=export.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.test.js","sourceRoot":"","sources":["../../../../src/exporters/__tests__/dxf/export.test.tsx"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,6DAAmE;AAGtD,QAAA,KAAK,GAAG,IAAA,sBAAS,EAAgB,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;AAElF,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACnB,IAAA,qBAAQ,EAAC,aAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;YACzB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dxf2d-ellipse.d.ts","sourceRoot":"","sources":["../../../../../src/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAqBnD,eAAO,MAAM,IAAI,EAAE,aA+XlB,CAAC"}
|