@linkiez/dxf-renew 7.0.0 → 7.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/.eslintrc.json +1 -16
- package/.github/instructions/code-patterns.instructions.md +1 -1
- package/.github/instructions/exdxf.instruction.md +161 -0
- package/.github/instructions/tdd.instructions.md +271 -0
- package/.yarn/install-state.gz +0 -0
- package/ARCHITECTURE.md +163 -0
- package/CHANGELOG.md +39 -0
- package/CONTRIBUTING.md +16 -14
- package/README.md +113 -16
- package/{PLAN.md → ROADMAP.md} +244 -102
- package/dist/dxf.js +2212 -454
- package/docs/EZDXF_REFERENCE_SITEMAP.md +55 -0
- package/docs/FIXTURE_VALIDATION_EZDXF.md +62 -0
- package/lib/Helper.cjs +6 -2
- package/lib/Helper.cjs.map +3 -3
- package/lib/Helper.js +6 -2
- package/lib/Helper.js.map +2 -2
- package/lib/denormalise.cjs +131 -91
- package/lib/denormalise.cjs.map +2 -2
- package/lib/denormalise.js +131 -91
- package/lib/denormalise.js.map +2 -2
- package/lib/dimensionToSVG.cjs +318 -53
- package/lib/dimensionToSVG.cjs.map +3 -3
- package/lib/dimensionToSVG.js +316 -52
- package/lib/dimensionToSVG.js.map +2 -2
- package/lib/entityToPolyline.cjs +95 -0
- package/lib/entityToPolyline.cjs.map +3 -3
- package/lib/entityToPolyline.js +95 -0
- package/lib/entityToPolyline.js.map +2 -2
- package/lib/handlers/entities.cjs +111 -27
- package/lib/handlers/entities.cjs.map +3 -3
- package/lib/handlers/entities.js +111 -27
- package/lib/handlers/entities.js.map +3 -3
- package/lib/handlers/entity/dgnUnderlay.cjs +106 -0
- package/lib/handlers/entity/dgnUnderlay.cjs.map +7 -0
- package/lib/handlers/entity/dgnUnderlay.js +71 -0
- package/lib/handlers/entity/dgnUnderlay.js.map +7 -0
- package/lib/handlers/entity/dimension.cjs +24 -0
- package/lib/handlers/entity/dimension.cjs.map +2 -2
- package/lib/handlers/entity/dimension.js +24 -0
- package/lib/handlers/entity/dimension.js.map +2 -2
- package/lib/handlers/entity/dwfUnderlay.cjs +106 -0
- package/lib/handlers/entity/dwfUnderlay.cjs.map +7 -0
- package/lib/handlers/entity/dwfUnderlay.js +71 -0
- package/lib/handlers/entity/dwfUnderlay.js.map +7 -0
- package/lib/handlers/entity/image.cjs +123 -0
- package/lib/handlers/entity/image.cjs.map +7 -0
- package/lib/handlers/entity/image.js +88 -0
- package/lib/handlers/entity/image.js.map +7 -0
- package/lib/handlers/entity/leader.cjs +148 -0
- package/lib/handlers/entity/leader.cjs.map +7 -0
- package/lib/handlers/entity/leader.js +113 -0
- package/lib/handlers/entity/leader.js.map +7 -0
- package/lib/handlers/entity/mleader.cjs +69 -0
- package/lib/handlers/entity/mleader.cjs.map +7 -0
- package/lib/handlers/entity/mleader.js +34 -0
- package/lib/handlers/entity/mleader.js.map +7 -0
- package/lib/handlers/entity/mline.cjs +91 -0
- package/lib/handlers/entity/mline.cjs.map +7 -0
- package/lib/handlers/entity/mline.js +56 -0
- package/lib/handlers/entity/mline.js.map +7 -0
- package/lib/handlers/entity/oleframe.cjs +98 -0
- package/lib/handlers/entity/oleframe.cjs.map +7 -0
- package/lib/handlers/entity/oleframe.js +63 -0
- package/lib/handlers/entity/oleframe.js.map +7 -0
- package/lib/handlers/entity/pdfUnderlay.cjs +106 -0
- package/lib/handlers/entity/pdfUnderlay.cjs.map +7 -0
- package/lib/handlers/entity/pdfUnderlay.js +71 -0
- package/lib/handlers/entity/pdfUnderlay.js.map +7 -0
- package/lib/handlers/entity/ray.cjs +81 -0
- package/lib/handlers/entity/ray.cjs.map +7 -0
- package/lib/handlers/entity/ray.js +46 -0
- package/lib/handlers/entity/ray.js.map +7 -0
- package/lib/handlers/entity/region.cjs +67 -0
- package/lib/handlers/entity/region.cjs.map +7 -0
- package/lib/handlers/entity/region.js +32 -0
- package/lib/handlers/entity/region.js.map +7 -0
- package/lib/handlers/entity/shape.cjs +95 -0
- package/lib/handlers/entity/shape.cjs.map +7 -0
- package/lib/handlers/entity/shape.js +60 -0
- package/lib/handlers/entity/shape.js.map +7 -0
- package/lib/handlers/entity/table.cjs +71 -0
- package/lib/handlers/entity/table.cjs.map +7 -0
- package/lib/handlers/entity/table.js +36 -0
- package/lib/handlers/entity/table.js.map +7 -0
- package/lib/handlers/entity/tolerance.cjs +90 -0
- package/lib/handlers/entity/tolerance.cjs.map +7 -0
- package/lib/handlers/entity/tolerance.js +55 -0
- package/lib/handlers/entity/tolerance.js.map +7 -0
- package/lib/handlers/entity/trace.cjs +101 -0
- package/lib/handlers/entity/trace.cjs.map +7 -0
- package/lib/handlers/entity/trace.js +66 -0
- package/lib/handlers/entity/trace.js.map +7 -0
- package/lib/handlers/entity/wipeout.cjs +122 -0
- package/lib/handlers/entity/wipeout.cjs.map +7 -0
- package/lib/handlers/entity/wipeout.js +87 -0
- package/lib/handlers/entity/wipeout.js.map +7 -0
- package/lib/handlers/entity/xline.cjs +81 -0
- package/lib/handlers/entity/xline.cjs.map +7 -0
- package/lib/handlers/entity/xline.js +46 -0
- package/lib/handlers/entity/xline.js.map +7 -0
- package/lib/handlers/objects.cjs +299 -136
- package/lib/handlers/objects.cjs.map +2 -2
- package/lib/handlers/objects.js +299 -136
- package/lib/handlers/objects.js.map +2 -2
- package/lib/handlers/tables.cjs +96 -17
- package/lib/handlers/tables.cjs.map +2 -2
- package/lib/handlers/tables.js +96 -17
- package/lib/handlers/tables.js.map +2 -2
- package/lib/index.cjs +5 -2
- package/lib/index.cjs.map +3 -3
- package/lib/index.js +18 -16
- package/lib/index.js.map +3 -3
- package/lib/toJson.cjs +29 -0
- package/lib/toJson.cjs.map +7 -0
- package/lib/toJson.js +9 -0
- package/lib/toJson.js.map +7 -0
- package/lib/toSVG.cjs +105 -11
- package/lib/toSVG.cjs.map +3 -3
- package/lib/toSVG.js +106 -12
- package/lib/toSVG.js.map +2 -2
- package/lib/types/dimension-entity.cjs.map +1 -1
- package/lib/types/entity.cjs.map +1 -1
- package/lib/types/helper.cjs.map +1 -1
- package/lib/types/image-entity.cjs +17 -0
- package/lib/types/image-entity.cjs.map +7 -0
- package/lib/types/image-entity.js +1 -0
- package/lib/types/image-entity.js.map +7 -0
- package/lib/types/index.cjs +28 -0
- package/lib/types/index.cjs.map +2 -2
- package/lib/types/index.js +14 -0
- package/lib/types/index.js.map +2 -2
- package/lib/types/leader-entity.cjs +17 -0
- package/lib/types/leader-entity.cjs.map +7 -0
- package/lib/types/leader-entity.js +1 -0
- package/lib/types/leader-entity.js.map +7 -0
- package/lib/types/mleader-entity.cjs +17 -0
- package/lib/types/mleader-entity.cjs.map +7 -0
- package/lib/types/mleader-entity.js +1 -0
- package/lib/types/mleader-entity.js.map +7 -0
- package/lib/types/mline-entity.cjs +17 -0
- package/lib/types/mline-entity.cjs.map +7 -0
- package/lib/types/mline-entity.js +1 -0
- package/lib/types/mline-entity.js.map +7 -0
- package/lib/types/oleframe-entity.cjs +17 -0
- package/lib/types/oleframe-entity.cjs.map +7 -0
- package/lib/types/oleframe-entity.js +1 -0
- package/lib/types/oleframe-entity.js.map +7 -0
- package/lib/types/options.cjs.map +1 -1
- package/lib/types/ray-entity.cjs +17 -0
- package/lib/types/ray-entity.cjs.map +7 -0
- package/lib/types/ray-entity.js +1 -0
- package/lib/types/ray-entity.js.map +7 -0
- package/lib/types/region-entity.cjs +17 -0
- package/lib/types/region-entity.cjs.map +7 -0
- package/lib/types/region-entity.js +1 -0
- package/lib/types/region-entity.js.map +7 -0
- package/lib/types/shape-entity.cjs +17 -0
- package/lib/types/shape-entity.cjs.map +7 -0
- package/lib/types/shape-entity.js +1 -0
- package/lib/types/shape-entity.js.map +7 -0
- package/lib/types/table-entity.cjs +17 -0
- package/lib/types/table-entity.cjs.map +7 -0
- package/lib/types/table-entity.js +1 -0
- package/lib/types/table-entity.js.map +7 -0
- package/lib/types/tables.cjs.map +1 -1
- package/lib/types/tolerance-entity.cjs +17 -0
- package/lib/types/tolerance-entity.cjs.map +7 -0
- package/lib/types/tolerance-entity.js +1 -0
- package/lib/types/tolerance-entity.js.map +7 -0
- package/lib/types/trace-entity.cjs +17 -0
- package/lib/types/trace-entity.cjs.map +7 -0
- package/lib/types/trace-entity.js +1 -0
- package/lib/types/trace-entity.js.map +7 -0
- package/lib/types/underlay-entity.cjs +17 -0
- package/lib/types/underlay-entity.cjs.map +7 -0
- package/lib/types/underlay-entity.js +1 -0
- package/lib/types/underlay-entity.js.map +7 -0
- package/lib/types/wipeout-entity.cjs +17 -0
- package/lib/types/wipeout-entity.cjs.map +7 -0
- package/lib/types/wipeout-entity.js +1 -0
- package/lib/types/wipeout-entity.js.map +7 -0
- package/lib/types/xline-entity.cjs +17 -0
- package/lib/types/xline-entity.cjs.map +7 -0
- package/lib/types/xline-entity.js +1 -0
- package/lib/types/xline-entity.js.map +7 -0
- package/lib/util/escapeXmlText.cjs +27 -0
- package/lib/util/escapeXmlText.cjs.map +7 -0
- package/lib/util/escapeXmlText.js +7 -0
- package/lib/util/escapeXmlText.js.map +7 -0
- package/package.json +9 -18
- package/playwright.config.cjs +20 -0
- package/src/Helper.ts +8 -3
- package/src/denormalise.ts +182 -116
- package/src/dimensionToSVG.ts +466 -54
- package/src/entityToPolyline.ts +124 -2
- package/src/handlers/entities.ts +129 -34
- package/src/handlers/entity/dgnUnderlay.ts +94 -0
- package/src/handlers/entity/dimension.ts +27 -1
- package/src/handlers/entity/dwfUnderlay.ts +94 -0
- package/src/handlers/entity/image.ts +118 -0
- package/src/handlers/entity/leader.ts +153 -0
- package/src/handlers/entity/mleader.ts +46 -0
- package/src/handlers/entity/mline.ts +74 -0
- package/src/handlers/entity/oleframe.ts +62 -0
- package/src/handlers/entity/pdfUnderlay.ts +94 -0
- package/src/handlers/entity/ray.ts +52 -0
- package/src/handlers/entity/region.ts +42 -0
- package/src/handlers/entity/shape.ts +73 -0
- package/src/handlers/entity/table.ts +49 -0
- package/src/handlers/entity/tolerance.ts +75 -0
- package/src/handlers/entity/trace.ts +72 -0
- package/src/handlers/entity/wipeout.ts +114 -0
- package/src/handlers/entity/xline.ts +52 -0
- package/src/handlers/objects.ts +379 -139
- package/src/handlers/tables.ts +134 -21
- package/src/index.ts +9 -18
- package/src/toJson.ts +8 -0
- package/src/toSVG.ts +143 -10
- package/src/types/dimension-entity.ts +11 -0
- package/src/types/entity.ts +30 -0
- package/src/types/helper.ts +2 -1
- package/src/types/image-entity.ts +35 -0
- package/src/types/index.ts +14 -0
- package/src/types/leader-entity.ts +40 -0
- package/src/types/mleader-entity.ts +8 -0
- package/src/types/mline-entity.ts +12 -0
- package/src/types/oleframe-entity.ts +40 -0
- package/src/types/options.ts +48 -0
- package/src/types/ray-entity.ts +12 -0
- package/src/types/region-entity.ts +11 -0
- package/src/types/shape-entity.ts +19 -0
- package/src/types/table-entity.ts +14 -0
- package/src/types/tables.ts +160 -0
- package/src/types/tolerance-entity.ts +20 -0
- package/src/types/trace-entity.ts +14 -0
- package/src/types/underlay-entity.ts +35 -0
- package/src/types/wipeout-entity.ts +20 -0
- package/src/types/xline-entity.ts +12 -0
- package/src/util/escapeXmlText.ts +10 -0
- package/tools/browser_test_server.cjs +87 -0
- package/tools/ezdxf_generate_dimensions_all_types.py +246 -0
- package/tools/ezdxf_generate_dimensions_angular_3p.py +59 -0
- package/tools/ezdxf_generate_dimensions_large_scale.py +87 -0
- package/tools/ezdxf_regenerate_problem_fixtures.py +184 -0
- package/tools/ezdxf_validate_fixtures.py +165 -0
- package/docs/DIMENSION_SUMMARY.md +0 -248
- package/docs/DIMENSION_SUMMARY.pt-BR.md +0 -248
- package/docs/IMPLEMENTED-2D-ENTITIES.md +0 -54
- package/docs/IMPLEMENTED-2D-ENTITIES.pt-BR.md +0 -54
- package/docs/TEXT-MTEXT-DIMENSION-SUPPORT.md +0 -241
- package/docs/TEXT-MTEXT-DIMENSION-SUPPORT.pt-BR.md +0 -169
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/region-entity.ts"],
|
|
4
|
+
"sourcesContent": ["import type { BaseEntity } from './base-entity'\n\nexport interface RegionEntity extends BaseEntity {\n type: 'REGION'\n\n /**\n * ACIS data payload (text form). This project currently parses and stores it,\n * but does not attempt to interpret it.\n */\n acisData?: string[]\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=region-entity.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var shape_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(shape_entity_exports);
|
|
17
|
+
//# sourceMappingURL=shape-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/shape-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// SHAPE entity type\n\nimport type { BaseEntity } from './base-entity'\nimport type { Point3D } from './common'\n\nexport interface ShapeEntity extends BaseEntity {\n type: 'SHAPE'\n insertionPoint: Point3D\n /** Shape name (from a loaded SHX shape file). */\n name: string\n /** Size in drawing units. */\n size: number\n rotation?: number\n relativeXScale?: number\n oblique?: number\n thickness?: number\n extrusionX?: number\n extrusionY?: number\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=shape-entity.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var table_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(table_entity_exports);
|
|
17
|
+
//# sourceMappingURL=table-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/table-entity.ts"],
|
|
4
|
+
"sourcesContent": ["import type { BaseEntity } from './base-entity'\n\nexport interface TableEntity extends BaseEntity {\n type: 'TABLE'\n\n rows?: number\n columns?: number\n\n /**\n * Minimal extracted cell text (from group code 1).\n * This is intentionally lossy; full TABLE semantics are not implemented.\n */\n cellText?: string[]\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=table-entity.js.map
|
package/lib/types/tables.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types/tables.ts"],
|
|
4
|
-
"sourcesContent": ["// DXF Tables parsing types\n\nimport type { Point2D, Point3D } from './common'\n\n/**\n * Partial point for parsing (all coordinates optional)\n */\nexport type PartialPoint2D = Partial<Point2D>\n\n/**\n * Partial 3D point for parsing (all coordinates optional)\n */\nexport type PartialPoint3D = Partial<Point3D>\n\n/**\n * DXF Header section result\n */\nexport interface ParsedHeader {\n /** Minimum drawing extents */\n extMin?: PartialPoint3D\n /** Maximum drawing extents */\n extMax?: PartialPoint3D\n /** Drawing units for measurement (0=English, 1=Metric) */\n measurement?: string | number\n /** Default drawing units for AutoCAD DesignCenter blocks */\n insUnits?: string | number\n /** Dimension arrow size */\n dimArrowSize?: string | number | Record<string, unknown>\n}\n\n/**\n * Block table entry\n * Internal representation during DXF parsing\n */\nexport interface BlockInternal {\n /** Block name */\n name?: string | number\n /** Base point X coordinate */\n x?: string | number\n /** Base point Y coordinate */\n y?: string | number\n /** Base point Z coordinate */\n z?: string | number\n /** External reference path */\n xref?: string | number\n /** Paper space flag */\n paperSpace?: string | number\n /** Layout name reference */\n layout?: string | number\n /** Entities within this block */\n entities?: any[]\n}\n\n/**\n * Line type element definition\n * Represents a single element in a complex line type pattern\n */\nexport interface LTypeElement {\n /** Length of the element */\n length?: string | number\n /** Scale factors for the element */\n scales?: Array<string | number>\n /** Offset positions for the element */\n offset?: Array<{ x: string | number; y: string | number }>\n /** Shape definition code */\n shape?: string | number\n /** Shape number reference */\n shapeNumber?: string | number\n /** Style handle reference */\n styleHandle?: string | number\n /** Rotation angle */\n rotation?: string | number\n /** Text content for text elements */\n text?: string | number\n}\n\n/**\n * Line Type (LTYPE) table entry\n * Internal representation during DXF parsing\n */\nexport interface LTypeInternal {\n type: string\n /** Pattern elements that define the line type */\n pattern: LTypeElement[]\n /** Line type name */\n name?: string | number\n /** Line type description */\n description?: string | number\n /** Standard flag values (bit-coded) */\n flag?: string | number\n /** Alignment code (ASCII code for 'A' = 65) */\n alignment?: string | number\n /** Number of elements in the pattern */\n elementCount?: number\n /** Total pattern length */\n patternLength?: string | number\n}\n\n/**\n * Layer table entry\n * Internal representation during DXF parsing\n */\nexport interface LayerInternal {\n type: string\n /** Layer name */\n name?: string | number\n /** Line type name for this layer */\n lineTypeName?: string | number\n /** ACI color number */\n colorNumber?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** Plot flag */\n plot?: boolean\n /** Line weight enumeration */\n lineWeightEnum?: string | number\n}\n\n/**\n * Text Style (STYLE) table entry\n * Internal representation during DXF parsing\n */\nexport interface StyleInternal {\n type: string\n /** Style name */\n name?: string | number\n /** Line type name */\n lineTypeName?: string | number\n /** Fixed text height (0 if variable) */\n fixedTextHeight?: string | number\n /** Width factor */\n widthFactor?: string | number\n /** Oblique angle */\n obliqueAngle?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** Last height used */\n lastHeightUsed?: string | number\n /** Primary font file name */\n primaryFontFileName?: string | number\n /** Big font file name */\n bigFontFileName?: string | number\n}\n\n/**\n * Viewport (VPORT) table entry\n * Internal representation during DXF parsing\n */\nexport interface VPortInternal {\n type: string\n /** Viewport name */\n name?: string | number\n /** Handle reference */\n handle?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** Lower-left corner coordinates */\n lowerLeft: { x?: number; y?: number }\n /** Upper-right corner coordinates */\n upperRight: { x?: number; y?: number }\n /** Center point coordinates */\n center: { x?: number; y?: number }\n /** Snap settings */\n snap?: Record<string, unknown>\n /** Snap spacing */\n snapSpacing: { x?: number; y?: number }\n /** Grid spacing */\n gridSpacing: { x?: number; y?: number }\n /** View direction from target */\n direction: { x?: number; y?: number; z?: number }\n /** View target point */\n target: { x?: number; y?: number; z?: number }\n /** View height */\n height?: number\n /** Snap rotation angle */\n snapAngle?: number\n /** View twist angle */\n angle?: number\n /** UCS origin X coordinate */\n x?: number\n /** UCS origin Y coordinate */\n y?: number\n /** UCS origin Z coordinate */\n z?: number\n /** UCS X-axis X component */\n xAxisX?: number\n /** UCS X-axis Y component */\n xAxisY?: number\n /** UCS X-axis Z component */\n xAxisZ?: number\n /** View elevation */\n elevation?: number\n}\n\n/**\n * Layout object entry\n * Internal representation during DXF parsing\n */\nexport interface LayoutInternal {\n /** Layout name */\n name?: string | number\n /** Handle reference */\n handle?: string | number\n /** Minimum limits X coordinate */\n minLimitX?: number\n /** Minimum limits Y coordinate */\n minLimitY?: number\n /** Maximum limits X coordinate */\n maxLimitX?: number\n /** Maximum limits Y coordinate */\n maxLimitY?: number\n /** Base point X coordinate */\n x?: number\n /** Base point Y coordinate */\n y?: number\n /** Base point Z coordinate */\n z?: number\n /** Minimum extents X coordinate */\n minX?: number\n /** Minimum extents Y coordinate */\n minY?: number\n /** Minimum extents Z coordinate */\n minZ?: number\n /** Maximum extents X coordinate */\n maxX?: number\n /** Maximum extents Y coordinate */\n maxY?: number\n /** Maximum extents Z coordinate */\n maxZ?: number\n /** Layout flag (PSLTSCALE or LIMCHECK) */\n flag?: 'PSLTSCALE' | 'LIMCHECK'\n /** Tab order */\n tabOrder?: string | number\n /** Elevation */\n elevation?: number\n /** UCS origin X coordinate */\n ucsX?: number\n /** UCS origin Y coordinate */\n ucsY?: number\n /** UCS origin Z coordinate */\n ucsZ?: number\n /** UCS X-axis X component */\n ucsXaxisX?: number\n /** UCS X-axis Y component */\n ucsXaxisY?: number\n /** UCS X-axis Z component */\n ucsXaxisZ?: number\n /** UCS Y-axis X component */\n ucsYaxisX?: number\n /** UCS Y-axis Y component */\n ucsYaxisY?: number\n /** UCS Y-axis Z component */\n ucsYaxisZ?: number\n /** UCS orthographic type */\n ucsType?: 'NOT ORTHOGRAPHIC' | 'TOP' | 'BOTTOM' | 'FRONT' | 'BACK' | 'LEFT' | 'RIGHT'\n /** Associated table record handle */\n tableRecord?: string | number\n /** Last active viewport handle */\n lastActiveViewport?: string | number\n /** Shade plot mode */\n shadePlot?: string | number\n}\n\n/**\n * Dimension Style (DIMSTYLE) table entry\n * Internal representation during DXF parsing\n */\nexport interface DimStyleInternal {\n type: string\n /** Dimension style name */\n name?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** DIMPOST - General dimensioning suffix */\n dimPost?: string | number\n /** DIMAPOST - Alternate dimensioning suffix */\n dimAPost?: string | number\n /** DIMSCALE - Overall dimensioning scale factor */\n dimScale?: number\n /** DIMASZ - Dimensioning arrow size */\n dimAsz?: number\n /** DIMEXO - Extension line offset */\n dimExo?: number\n /** DIMDLI - Dimension line increment */\n dimDli?: number\n /** DIMEXE - Extension line extension */\n dimExe?: number\n /** DIMRND - Rounding value for dimension distances */\n dimRnd?: number\n /** DIMDLE - Dimension line extension */\n dimDle?: number\n /** DIMTP - Plus tolerance */\n dimTp?: number\n /** DIMTM - Minus tolerance */\n dimTm?: number\n /** DIMTXT - Dimensioning text height */\n dimTxt?: number\n /** DIMCEN - Size of center mark/lines */\n dimCen?: number\n /** DIMTSZ - Dimensioning tick size */\n dimTsz?: number\n /** DIMALTF - Alternate unit scale factor */\n dimAltf?: number\n /** DIMLFAC - Linear measurements scale factor */\n dimLfac?: number\n /** DIMTVP - Text vertical position */\n dimTvp?: number\n /** DIMTFAC - Dimension tolerance display scale factor */\n dimTfac?: number\n /** DIMGAP - Dimension line gap */\n dimGap?: number\n /** DIMALTRND - Determines rounding of alternate units */\n dimAltRnd?: number\n /** DIMTOL - Dimension tolerances generated if nonzero */\n dimTol?: number\n /** DIMLIM - Dimension limits generated if nonzero */\n dimLim?: number\n /** DIMTIH - Text inside horizontal if nonzero */\n dimTih?: number\n /** DIMTOH - Text outside horizontal if nonzero */\n dimToh?: number\n /** DIMSE1 - First extension line suppressed if nonzero */\n dimSe1?: number\n /** DIMSE2 - Second extension line suppressed if nonzero */\n dimSe2?: number\n /** DIMTAD - Text above dimension line if nonzero */\n dimTad?: number\n /** DIMZIN - Controls suppression of zeros for primary unit values */\n dimZin?: number\n /** DIMAZIN - Controls suppression of zeros for angular dimensions */\n dimAzin?: number\n /** DIMALT - Alternate unit dimensioning performed if nonzero */\n dimAlt?: number\n /** DIMALTD - Alternate unit decimal places */\n dimAltd?: number\n /** DIMTOFL - Force text inside extensions if nonzero */\n dimTofl?: number\n /** DIMSAH - Use separate arrow blocks if nonzero */\n dimSah?: number\n /** DIMTIX - Force text inside extensions if nonzero */\n dimTix?: number\n /** DIMSOXD - Suppress outside-extensions dimension lines if nonzero */\n dimSoxd?: number\n /** DIMCLRD - Dimension line color */\n dimClrd?: number\n /** DIMCLRE - Dimension extension line color */\n dimClre?: number\n /** DIMCLRT - Dimension text color */\n dimClrt?: number\n /** DIMADEC - Number of precision places for angular dimensions */\n dimAdec?: number\n /** DIMUNIT - Units format (obsolete, now use DIMLUNIT AND DIMFRAC) */\n dimUnit?: number\n /** DIMDEC - Number of decimal places for tolerance values */\n dimDec?: number\n /** DIMTDEC - Number of decimal places for tolerance values */\n dimTdec?: number\n /** DIMALTU - Units format for alternate units */\n dimAltu?: number\n /** DIMALTTD - Number of decimal places for alternate tolerance values */\n dimAlttd?: number\n /** DIMAUNIT - Angle format for angular dimensions */\n dimAunit?: number\n /** DIMFRAC - Fraction format */\n dimFrac?: number\n /** DIMLUNIT - Linear unit format */\n dimLunit?: number\n /** DIMDSEP - Decimal separator character */\n dimDsep?: number\n /** DIMTMOVE - Dimension text movement rules */\n dimTmove?: number\n /** DIMJUST - Horizontal dimension text position */\n dimJust?: number\n /** DIMSD1 - Suppression of first extension line */\n dimSd1?: number\n /** DIMSD2 - Suppression of second extension line */\n dimSd2?: number\n /** DIMTOLJ - Vertical justification for tolerance values */\n dimTolj?: number\n /** DIMTZIN - Controls suppression of zeros for tolerance values */\n dimTzin?: number\n /** DIMALTZ - Controls suppression of zeros for alternate unit values */\n dimAltz?: number\n /** DIMALTTZ - Controls suppression of zeros for alternate tolerance values */\n dimAlttz?: number\n /** DIMFIT - Fit options (obsolete, now use DIMATFIT and DIMTMOVE) */\n dimFit?: number\n /** DIMUPT - Cursor functionality for user-positioned text */\n dimUpt?: number\n /** DIMATFIT - Controls dimension text and arrow placement */\n dimAtfit?: number\n /** DIMTXSTY - Dimension text style (handle reference) */\n dimTxsty?: string | number\n /** DIMLDRBLK - Leader arrow block (handle reference) */\n dimLdrblk?: string | number\n /** DIMBLK - Arrow block (handle reference) */\n dimBlk?: string | number\n /** DIMBLK1 - First arrow block (handle reference) */\n dimBlk1?: string | number\n /** DIMBLK2 - Second arrow block (handle reference) */\n dimBlk2?: string | number\n /** DIMLWD - Dimension line lineweight */\n dimLwd?: number\n /** DIMLWE - Extension line lineweight */\n dimLwe?: number\n}\n\n/**\n * DXF Objects section result\n */\nexport interface ParsedObjects {\n /** Layout objects */\n layouts: LayoutInternal[]\n}\n"],
|
|
4
|
+
"sourcesContent": ["// DXF Tables parsing types\n\nimport type { Point2D, Point3D } from './common'\nimport type { DXFTuple } from './dxf'\n\n/**\n * Partial point for parsing (all coordinates optional)\n */\nexport type PartialPoint2D = Partial<Point2D>\n\n/**\n * Partial 3D point for parsing (all coordinates optional)\n */\nexport type PartialPoint3D = Partial<Point3D>\n\n/**\n * DXF Header section result\n */\nexport interface ParsedHeader {\n /** Minimum drawing extents */\n extMin?: PartialPoint3D\n /** Maximum drawing extents */\n extMax?: PartialPoint3D\n /** Drawing units for measurement (0=English, 1=Metric) */\n measurement?: string | number\n /** Default drawing units for AutoCAD DesignCenter blocks */\n insUnits?: string | number\n /** Dimension arrow size */\n dimArrowSize?: string | number | Record<string, unknown>\n}\n\n/**\n * Block table entry\n * Internal representation during DXF parsing\n */\nexport interface BlockInternal {\n /** Block name */\n name?: string | number\n /** Base point X coordinate */\n x?: string | number\n /** Base point Y coordinate */\n y?: string | number\n /** Base point Z coordinate */\n z?: string | number\n /** External reference path */\n xref?: string | number\n /** Paper space flag */\n paperSpace?: string | number\n /** Layout name reference */\n layout?: string | number\n /** Entities within this block */\n entities?: any[]\n}\n\n/**\n * Line type element definition\n * Represents a single element in a complex line type pattern\n */\nexport interface LTypeElement {\n /** Length of the element */\n length?: string | number\n /** Scale factors for the element */\n scales?: Array<string | number>\n /** Offset positions for the element */\n offset?: Array<{ x: string | number; y: string | number }>\n /** Shape definition code */\n shape?: string | number\n /** Shape number reference */\n shapeNumber?: string | number\n /** Style handle reference */\n styleHandle?: string | number\n /** Rotation angle */\n rotation?: string | number\n /** Text content for text elements */\n text?: string | number\n}\n\n/**\n * Line Type (LTYPE) table entry\n * Internal representation during DXF parsing\n */\nexport interface LTypeInternal {\n type: string\n /** Pattern elements that define the line type */\n pattern: LTypeElement[]\n /** Line type name */\n name?: string | number\n /** Line type description */\n description?: string | number\n /** Standard flag values (bit-coded) */\n flag?: string | number\n /** Alignment code (ASCII code for 'A' = 65) */\n alignment?: string | number\n /** Number of elements in the pattern */\n elementCount?: number\n /** Total pattern length */\n patternLength?: string | number\n}\n\n/**\n * Layer table entry\n * Internal representation during DXF parsing\n */\nexport interface LayerInternal {\n type: string\n /** Layer name */\n name?: string | number\n /** Line type name for this layer */\n lineTypeName?: string | number\n /** ACI color number */\n colorNumber?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** Plot flag */\n plot?: boolean\n /** Line weight enumeration */\n lineWeightEnum?: string | number\n}\n\n/**\n * Application ID (APPID) table entry\n * Minimal internal representation during DXF parsing\n */\nexport interface AppIdInternal {\n type: string\n /** Application name */\n name?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n}\n\n/**\n * Block Record (BLOCK_RECORD) table entry\n * Minimal internal representation during DXF parsing\n */\nexport interface BlockRecordInternal {\n type: string\n /** Block record name */\n name?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n}\n\n/**\n * User Coordinate System (UCS) table entry\n * Minimal internal representation during DXF parsing\n */\nexport interface UcsInternal {\n type: string\n /** UCS name */\n name?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n}\n\n/**\n * View (VIEW) table entry\n * Minimal internal representation during DXF parsing\n */\nexport interface ViewInternal {\n type: string\n /** View name */\n name?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n}\n\n/**\n * Text Style (STYLE) table entry\n * Internal representation during DXF parsing\n */\nexport interface StyleInternal {\n type: string\n /** Style name */\n name?: string | number\n /** Line type name */\n lineTypeName?: string | number\n /** Fixed text height (0 if variable) */\n fixedTextHeight?: string | number\n /** Width factor */\n widthFactor?: string | number\n /** Oblique angle */\n obliqueAngle?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** Last height used */\n lastHeightUsed?: string | number\n /** Primary font file name */\n primaryFontFileName?: string | number\n /** Big font file name */\n bigFontFileName?: string | number\n}\n\n/**\n * Viewport (VPORT) table entry\n * Internal representation during DXF parsing\n */\nexport interface VPortInternal {\n type: string\n /** Viewport name */\n name?: string | number\n /** Handle reference */\n handle?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** Lower-left corner coordinates */\n lowerLeft: { x?: number; y?: number }\n /** Upper-right corner coordinates */\n upperRight: { x?: number; y?: number }\n /** Center point coordinates */\n center: { x?: number; y?: number }\n /** Snap settings */\n snap?: Record<string, unknown>\n /** Snap spacing */\n snapSpacing: { x?: number; y?: number }\n /** Grid spacing */\n gridSpacing: { x?: number; y?: number }\n /** View direction from target */\n direction: { x?: number; y?: number; z?: number }\n /** View target point */\n target: { x?: number; y?: number; z?: number }\n /** View height */\n height?: number\n /** Snap rotation angle */\n snapAngle?: number\n /** View twist angle */\n angle?: number\n /** UCS origin X coordinate */\n x?: number\n /** UCS origin Y coordinate */\n y?: number\n /** UCS origin Z coordinate */\n z?: number\n /** UCS X-axis X component */\n xAxisX?: number\n /** UCS X-axis Y component */\n xAxisY?: number\n /** UCS X-axis Z component */\n xAxisZ?: number\n /** View elevation */\n elevation?: number\n}\n\n/**\n * Layout object entry\n * Internal representation during DXF parsing\n */\nexport interface LayoutInternal {\n /** Layout name */\n name?: string | number\n /** Handle reference */\n handle?: string | number\n /** Minimum limits X coordinate */\n minLimitX?: number\n /** Minimum limits Y coordinate */\n minLimitY?: number\n /** Maximum limits X coordinate */\n maxLimitX?: number\n /** Maximum limits Y coordinate */\n maxLimitY?: number\n /** Base point X coordinate */\n x?: number\n /** Base point Y coordinate */\n y?: number\n /** Base point Z coordinate */\n z?: number\n /** Minimum extents X coordinate */\n minX?: number\n /** Minimum extents Y coordinate */\n minY?: number\n /** Minimum extents Z coordinate */\n minZ?: number\n /** Maximum extents X coordinate */\n maxX?: number\n /** Maximum extents Y coordinate */\n maxY?: number\n /** Maximum extents Z coordinate */\n maxZ?: number\n /** Layout flag (PSLTSCALE or LIMCHECK) */\n flag?: 'PSLTSCALE' | 'LIMCHECK'\n /** Tab order */\n tabOrder?: string | number\n /** Elevation */\n elevation?: number\n /** UCS origin X coordinate */\n ucsX?: number\n /** UCS origin Y coordinate */\n ucsY?: number\n /** UCS origin Z coordinate */\n ucsZ?: number\n /** UCS X-axis X component */\n ucsXaxisX?: number\n /** UCS X-axis Y component */\n ucsXaxisY?: number\n /** UCS X-axis Z component */\n ucsXaxisZ?: number\n /** UCS Y-axis X component */\n ucsYaxisX?: number\n /** UCS Y-axis Y component */\n ucsYaxisY?: number\n /** UCS Y-axis Z component */\n ucsYaxisZ?: number\n /** UCS orthographic type */\n ucsType?: 'NOT ORTHOGRAPHIC' | 'TOP' | 'BOTTOM' | 'FRONT' | 'BACK' | 'LEFT' | 'RIGHT'\n /** Associated table record handle */\n tableRecord?: string | number\n /** Last active viewport handle */\n lastActiveViewport?: string | number\n /** Shade plot mode */\n shadePlot?: string | number\n}\n\n/**\n * Dimension Style (DIMSTYLE) table entry\n * Internal representation during DXF parsing\n */\nexport interface DimStyleInternal {\n type: string\n /** Dimension style name */\n name?: string | number\n /** Standard flags (bit-coded) */\n flags?: string | number\n /** DIMPOST - General dimensioning suffix */\n dimPost?: string | number\n /** DIMAPOST - Alternate dimensioning suffix */\n dimAPost?: string | number\n /** DIMSCALE - Overall dimensioning scale factor */\n dimScale?: number\n /** DIMASZ - Dimensioning arrow size */\n dimAsz?: number\n /** DIMEXO - Extension line offset */\n dimExo?: number\n /** DIMDLI - Dimension line increment */\n dimDli?: number\n /** DIMEXE - Extension line extension */\n dimExe?: number\n /** DIMRND - Rounding value for dimension distances */\n dimRnd?: number\n /** DIMDLE - Dimension line extension */\n dimDle?: number\n /** DIMTP - Plus tolerance */\n dimTp?: number\n /** DIMTM - Minus tolerance */\n dimTm?: number\n /** DIMTXT - Dimensioning text height */\n dimTxt?: number\n /** DIMCEN - Size of center mark/lines */\n dimCen?: number\n /** DIMTSZ - Dimensioning tick size */\n dimTsz?: number\n /** DIMALTF - Alternate unit scale factor */\n dimAltf?: number\n /** DIMLFAC - Linear measurements scale factor */\n dimLfac?: number\n /** DIMTVP - Text vertical position */\n dimTvp?: number\n /** DIMTFAC - Dimension tolerance display scale factor */\n dimTfac?: number\n /** DIMGAP - Dimension line gap */\n dimGap?: number\n /** DIMALTRND - Determines rounding of alternate units */\n dimAltRnd?: number\n /** DIMTOL - Dimension tolerances generated if nonzero */\n dimTol?: number\n /** DIMLIM - Dimension limits generated if nonzero */\n dimLim?: number\n /** DIMTIH - Text inside horizontal if nonzero */\n dimTih?: number\n /** DIMTOH - Text outside horizontal if nonzero */\n dimToh?: number\n /** DIMSE1 - First extension line suppressed if nonzero */\n dimSe1?: number\n /** DIMSE2 - Second extension line suppressed if nonzero */\n dimSe2?: number\n /** DIMTAD - Text above dimension line if nonzero */\n dimTad?: number\n /** DIMZIN - Controls suppression of zeros for primary unit values */\n dimZin?: number\n /** DIMAZIN - Controls suppression of zeros for angular dimensions */\n dimAzin?: number\n /** DIMALT - Alternate unit dimensioning performed if nonzero */\n dimAlt?: number\n /** DIMALTD - Alternate unit decimal places */\n dimAltd?: number\n /** DIMTOFL - Force text inside extensions if nonzero */\n dimTofl?: number\n /** DIMSAH - Use separate arrow blocks if nonzero */\n dimSah?: number\n /** DIMTIX - Force text inside extensions if nonzero */\n dimTix?: number\n /** DIMSOXD - Suppress outside-extensions dimension lines if nonzero */\n dimSoxd?: number\n /** DIMCLRD - Dimension line color */\n dimClrd?: number\n /** DIMCLRE - Dimension extension line color */\n dimClre?: number\n /** DIMCLRT - Dimension text color */\n dimClrt?: number\n /** DIMADEC - Number of precision places for angular dimensions */\n dimAdec?: number\n /** DIMUNIT - Units format (obsolete, now use DIMLUNIT AND DIMFRAC) */\n dimUnit?: number\n /** DIMDEC - Number of decimal places for tolerance values */\n dimDec?: number\n /** DIMTDEC - Number of decimal places for tolerance values */\n dimTdec?: number\n /** DIMALTU - Units format for alternate units */\n dimAltu?: number\n /** DIMALTTD - Number of decimal places for alternate tolerance values */\n dimAlttd?: number\n /** DIMAUNIT - Angle format for angular dimensions */\n dimAunit?: number\n /** DIMFRAC - Fraction format */\n dimFrac?: number\n /** DIMLUNIT - Linear unit format */\n dimLunit?: number\n /** DIMDSEP - Decimal separator character */\n dimDsep?: number\n /** DIMTMOVE - Dimension text movement rules */\n dimTmove?: number\n /** DIMJUST - Horizontal dimension text position */\n dimJust?: number\n /** DIMSD1 - Suppression of first extension line */\n dimSd1?: number\n /** DIMSD2 - Suppression of second extension line */\n dimSd2?: number\n /** DIMTOLJ - Vertical justification for tolerance values */\n dimTolj?: number\n /** DIMTZIN - Controls suppression of zeros for tolerance values */\n dimTzin?: number\n /** DIMALTZ - Controls suppression of zeros for alternate unit values */\n dimAltz?: number\n /** DIMALTTZ - Controls suppression of zeros for alternate tolerance values */\n dimAlttz?: number\n /** DIMFIT - Fit options (obsolete, now use DIMATFIT and DIMTMOVE) */\n dimFit?: number\n /** DIMUPT - Cursor functionality for user-positioned text */\n dimUpt?: number\n /** DIMATFIT - Controls dimension text and arrow placement */\n dimAtfit?: number\n /** DIMTXSTY - Dimension text style (handle reference) */\n dimTxsty?: string | number\n /** DIMLDRBLK - Leader arrow block (handle reference) */\n dimLdrblk?: string | number\n /** DIMBLK - Arrow block (handle reference) */\n dimBlk?: string | number\n /** DIMBLK1 - First arrow block (handle reference) */\n dimBlk1?: string | number\n /** DIMBLK2 - Second arrow block (handle reference) */\n dimBlk2?: string | number\n /** DIMLWD - Dimension line lineweight */\n dimLwd?: number\n /** DIMLWE - Extension line lineweight */\n dimLwe?: number\n}\n\n/**\n * DXF Objects section result\n */\nexport interface DictionaryObject {\n type: 'DICTIONARY'\n handle?: string | number\n ownerHandle?: string | number\n entries: Record<string, string>\n}\n\nexport interface XRecordObject {\n type: 'XRECORD'\n handle?: string | number\n ownerHandle?: string | number\n\n /** Raw tuples for downstream consumers (excluding the initial 0/XRECORD tuple). */\n tuples: DXFTuple[]\n}\n\nexport interface ImageDefObject {\n type: 'IMAGEDEF'\n handle?: string | number\n\n /** Soft-pointer ID/handle to the ACAD_IMAGE_dict dictionary (when present). */\n ownerHandle?: string | number\n\n /** File name of the referenced image. */\n fileName?: string\n\n /** Image size in pixels (when available). */\n pixelSizeX?: number\n pixelSizeY?: number\n\n /** Raw tuples for downstream consumers (excluding the initial 0/IMAGEDEF tuple). */\n tuples: DXFTuple[]\n}\n\nexport interface ImageDefReactorObject {\n type: 'IMAGEDEF_REACTOR'\n handle?: string | number\n\n /** Object ID/handle for the associated IMAGE entity (when present). */\n imageHandle?: string | number\n\n /** Raw tuples for downstream consumers (excluding the initial 0/IMAGEDEF_REACTOR tuple). */\n tuples: DXFTuple[]\n}\n\nexport type UnderlayDefinitionObjectType =\n | 'UNDERLAYDEFINITION'\n | 'PDFDEFINITION'\n | 'DWFDEFINITION'\n | 'DGNDEFINITION'\n\nexport interface UnderlayDefinitionObject {\n type: UnderlayDefinitionObjectType\n handle?: string | number\n\n /** Soft-pointer ID/handle to the owning dictionary (when present). */\n ownerHandle?: string | number\n\n /** File name or path of the referenced underlay. */\n fileName?: string\n\n /** Underlay name within the file (e.g., sheet name). */\n underlayName?: string\n\n /** Raw tuples for downstream consumers (excluding the initial 0/<TYPE> tuple). */\n tuples: DXFTuple[]\n}\n\nexport interface DimAssocObject {\n type: 'DIMASSOC'\n handle?: string | number\n\n /** Soft-pointer ID/handle to the owning dictionary (when present). */\n ownerHandle?: string | number\n\n /** Raw tuples for downstream consumers (excluding the initial 0/DIMASSOC tuple). */\n tuples: DXFTuple[]\n}\n\nexport interface FieldObject {\n type: 'FIELD'\n handle?: string | number\n\n /** Soft-pointer ID/handle to the owning dictionary (when present). */\n ownerHandle?: string | number\n\n /** Raw tuples for downstream consumers (excluding the initial 0/FIELD tuple). */\n tuples: DXFTuple[]\n}\n\nexport interface ParsedObjects {\n /** Layout objects */\n layouts: LayoutInternal[]\n\n /** DICTIONARY objects keyed by handle */\n dictionaries?: Record<string, DictionaryObject>\n\n /** XRECORD objects keyed by handle */\n xRecords?: Record<string, XRecordObject>\n\n /** IMAGEDEF objects keyed by handle */\n imageDefs?: Record<string, ImageDefObject>\n\n /** IMAGEDEF_REACTOR objects keyed by handle */\n imageDefReactors?: Record<string, ImageDefReactorObject>\n\n /** UNDERLAYDEFINITION objects keyed by handle */\n underlayDefinitions?: Record<string, UnderlayDefinitionObject>\n\n /** DIMASSOC objects keyed by handle */\n dimAssocs?: Record<string, DimAssocObject>\n\n /** FIELD objects keyed by handle */\n fields?: Record<string, FieldObject>\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var tolerance_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(tolerance_entity_exports);
|
|
17
|
+
//# sourceMappingURL=tolerance-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/tolerance-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// TOLERANCE entity type (feature control frame)\n\nimport type { BaseEntity } from './base-entity'\nimport type { Point3D } from './common'\n\nexport interface ToleranceEntity extends BaseEntity {\n type: 'TOLERANCE'\n\n /** Insertion point (WCS). */\n insertionPoint: Point3D\n\n /** Raw tolerance string (may include control codes like %%v). */\n text?: string\n\n /** Dimension style name (group code 3). */\n dimensionStyleName?: string\n\n /** X-axis direction vector (group codes 11/21/31). */\n xAxisDirection?: Point3D\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=tolerance-entity.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var trace_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(trace_entity_exports);
|
|
17
|
+
//# sourceMappingURL=trace-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/trace-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// TRACE entity type\n\nimport type { BaseEntity } from './base-entity'\nimport type { Point3D } from './common'\n\nexport interface TraceEntity extends BaseEntity {\n type: 'TRACE'\n\n /** Four corner points (10/20/30, 11/21/31, 12/22/32, 13/23/33). */\n corners: Point3D[]\n\n /** Optional thickness (39). */\n thickness?: number\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=trace-entity.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var underlay_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(underlay_entity_exports);
|
|
17
|
+
//# sourceMappingURL=underlay-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/underlay-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// UNDERLAY entity types (DWFUNDERLAY / DGNUNDERLAY / PDFUNDERLAY)\n\nimport type { BaseEntity } from './base-entity'\nimport type { Point3D } from './common'\n\nexport interface UnderlayReferenceEntityBase extends BaseEntity {\n insertionPoint: Point3D\n scale: Point3D\n rotation?: number\n normal?: Point3D\n\n /** Hard reference to UNDERLAYDEFINITION object. */\n underlayDefinitionHandle?: string\n\n /** Display properties bitmask. */\n flags?: number\n\n /** Contrast in range [0, 100]. */\n contrast?: number\n\n /** Fade in range [0, 100]. */\n fade?: number\n}\n\nexport interface DwfUnderlayEntity extends UnderlayReferenceEntityBase {\n type: 'DWFUNDERLAY'\n}\n\nexport interface DgnUnderlayEntity extends UnderlayReferenceEntityBase {\n type: 'DGNUNDERLAY'\n}\n\nexport interface PdfUnderlayEntity extends UnderlayReferenceEntityBase {\n type: 'PDFUNDERLAY'\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=underlay-entity.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var wipeout_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(wipeout_entity_exports);
|
|
17
|
+
//# sourceMappingURL=wipeout-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/wipeout-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// WIPEOUT entity type\n\nimport type { BaseEntity } from './base-entity'\nimport type { Point2D, Point3D } from './common'\n\nexport interface WipeoutEntity extends BaseEntity {\n type: 'WIPEOUT'\n\n insertionPoint: Point3D\n uVector: Point3D\n vVector: Point3D\n\n clipBoundaryType?: 1 | 2\n clipBoundaryVertices?: Point2D[]\n\n displayProperties?: number\n clippingState?: 0 | 1\n classVersion?: number\n imageSizePixels?: { u: number; v: number }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=wipeout-entity.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var xline_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(xline_entity_exports);
|
|
17
|
+
//# sourceMappingURL=xline-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/xline-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// XLINE entity type\n\nimport type { BaseEntity } from './base-entity'\nimport type { Point3D } from './common'\n\nexport interface XLineEntity extends BaseEntity {\n type: 'XLINE'\n /** Base point for the infinite line. */\n basePoint: Point3D\n /** Unit direction vector. */\n direction: Point3D\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=xline-entity.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var escapeXmlText_exports = {};
|
|
20
|
+
__export(escapeXmlText_exports, {
|
|
21
|
+
default: () => escapeXmlText
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(escapeXmlText_exports);
|
|
24
|
+
function escapeXmlText(value) {
|
|
25
|
+
return value.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'");
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=escapeXmlText.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/util/escapeXmlText.ts"],
|
|
4
|
+
"sourcesContent": ["export default function escapeXmlText(value: string): string {\n // Escape text for use inside XML/SVG text nodes.\n // Keep it small and dependency-free.\n return value\n .split('&').join('&')\n .split('<').join('<')\n .split('>').join('>')\n .split('\"').join('"')\n .split(\"'\").join(''')\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAe,SAAR,cAA+B,OAAuB;AAG3D,SAAO,MACJ,MAAM,GAAG,EAAE,KAAK,OAAO,EACvB,MAAM,GAAG,EAAE,KAAK,MAAM,EACtB,MAAM,GAAG,EAAE,KAAK,MAAM,EACtB,MAAM,GAAG,EAAE,KAAK,QAAQ,EACxB,MAAM,GAAG,EAAE,KAAK,QAAQ;AAC7B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/util/escapeXmlText.ts"],
|
|
4
|
+
"sourcesContent": ["export default function escapeXmlText(value: string): string {\n // Escape text for use inside XML/SVG text nodes.\n // Keep it small and dependency-free.\n return value\n .split('&').join('&')\n .split('<').join('<')\n .split('>').join('>')\n .split('\"').join('"')\n .split(\"'\").join(''')\n}\n"],
|
|
5
|
+
"mappings": "AAAe,SAAR,cAA+B,OAAuB;AAG3D,SAAO,MACJ,MAAM,GAAG,EAAE,KAAK,OAAO,EACvB,MAAM,GAAG,EAAE,KAAK,MAAM,EACtB,MAAM,GAAG,EAAE,KAAK,MAAM,EACtB,MAAM,GAAG,EAAE,KAAK,QAAQ,EACxB,MAAM,GAAG,EAAE,KAAK,QAAQ;AAC7B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkiez/dxf-renew",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "DXF parser for node/browser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -32,9 +32,13 @@
|
|
|
32
32
|
"prepublishOnly": "npm run lint && npm run type-check && npm run test && npm run clean && npm run build && npm run dist",
|
|
33
33
|
"prettier": "prettier --write .",
|
|
34
34
|
"test": "npm run test:unit",
|
|
35
|
-
"test:functional": "cd test/functional &&
|
|
36
|
-
"test:unit": "mocha --require tsx --recursive test/unit/** --extensions .ts
|
|
35
|
+
"test:functional": "cd test/functional && vite --port 8030 --open /toSVG.html",
|
|
36
|
+
"test:unit": "mocha --require tsx --recursive test/unit/** --extensions .ts",
|
|
37
|
+
"test:integration": "yarn test:integration:browser",
|
|
38
|
+
"test:integration:node": "mocha --require tsx --recursive test/integration/** --extensions .ts",
|
|
39
|
+
"test:integration:browser": "yarn dist && playwright test -c playwright.config.cjs",
|
|
37
40
|
"test:unit:watch": "npm run test:unit -- --watch",
|
|
41
|
+
"validate:fixtures": "bash -lc 'if [ -x ./.venv-ezdxf/bin/python ]; then ./.venv-ezdxf/bin/python tools/ezdxf_validate_fixtures.py --fail-on-audit-errors; else python3 tools/ezdxf_validate_fixtures.py --fail-on-audit-errors; fi'",
|
|
38
42
|
"prepare": "husky",
|
|
39
43
|
"semantic-release": "semantic-release",
|
|
40
44
|
"commit": "git-cz"
|
|
@@ -59,15 +63,12 @@
|
|
|
59
63
|
},
|
|
60
64
|
"homepage": "https://github.com/linkiez/DXF-Renewed",
|
|
61
65
|
"devDependencies": {
|
|
62
|
-
"@babel/core": "^7.28.5",
|
|
63
|
-
"@babel/eslint-parser": "^7.25.1",
|
|
64
|
-
"@babel/preset-react": "^7.28.5",
|
|
65
66
|
"@commitlint/cli": "^20.1.0",
|
|
66
67
|
"@commitlint/config-conventional": "^20.0.0",
|
|
68
|
+
"@playwright/test": "^1.57.0",
|
|
67
69
|
"@semantic-release/changelog": "^6.0.3",
|
|
68
70
|
"@semantic-release/git": "^10.0.1",
|
|
69
71
|
"@semantic-release/github": "^12.0.2",
|
|
70
|
-
"@types/babel__core": "^7",
|
|
71
72
|
"@types/lodash": "^4.17.20",
|
|
72
73
|
"@types/node": "^24.10.1",
|
|
73
74
|
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
@@ -79,30 +80,20 @@
|
|
|
79
80
|
"eslint": "^8.57.0",
|
|
80
81
|
"eslint-config-prettier": "^8.10.0",
|
|
81
82
|
"eslint-config-standard": "^17.1.0",
|
|
82
|
-
"eslint-config-standard-react": "^13.0.0",
|
|
83
83
|
"eslint-plugin-import": "^2.29.1",
|
|
84
84
|
"eslint-plugin-n": "^16.6.2",
|
|
85
85
|
"eslint-plugin-promise": "^6.6.0",
|
|
86
|
-
"eslint-plugin-react": "^7.35.0",
|
|
87
|
-
"eslint-plugin-react-hooks": "^4.6.2",
|
|
88
86
|
"expect": "^29.7.0",
|
|
89
87
|
"husky": "^9.1.7",
|
|
90
88
|
"mocha": "^10.7.3",
|
|
91
89
|
"prettier": "^3.3.3",
|
|
92
|
-
"prop-types": "^15.8.1",
|
|
93
|
-
"raw-loader": "^4.0.2",
|
|
94
|
-
"react": "^16.14.0",
|
|
95
|
-
"react-dom": "^16.14.0",
|
|
96
|
-
"react-router-dom": "^5.3.4",
|
|
97
90
|
"rimraf": "^6.0.1",
|
|
98
91
|
"semantic-release": "^25.0.2",
|
|
99
92
|
"standard-version": "^9.5.0",
|
|
100
93
|
"ts-node": "^10.9.2",
|
|
101
94
|
"tsx": "^4.20.6",
|
|
102
95
|
"typescript": "^5.9.3",
|
|
103
|
-
"
|
|
104
|
-
"webpack-cli": "^5.1.4",
|
|
105
|
-
"webpack-dev-server": "^4.15.2",
|
|
96
|
+
"vite": "^6.0.6",
|
|
106
97
|
"xml2js": "^0.6.2"
|
|
107
98
|
},
|
|
108
99
|
"dependencies": {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
2
|
+
const config = {
|
|
3
|
+
testDir: 'test/integration-browser',
|
|
4
|
+
timeout: 30_000,
|
|
5
|
+
expect: {
|
|
6
|
+
timeout: 5_000,
|
|
7
|
+
},
|
|
8
|
+
use: {
|
|
9
|
+
baseURL: 'http://localhost:4173',
|
|
10
|
+
},
|
|
11
|
+
webServer: {
|
|
12
|
+
command: 'yarn dist && node tools/browser_test_server.cjs',
|
|
13
|
+
port: 4173,
|
|
14
|
+
reuseExistingServer: !process.env.CI,
|
|
15
|
+
stdout: 'pipe',
|
|
16
|
+
stderr: 'pipe',
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = config
|
package/src/Helper.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import denormalise from './denormalise'
|
|
2
2
|
import groupEntitiesByLayer from './groupEntitiesByLayer'
|
|
3
3
|
import parseString from './parseString'
|
|
4
|
+
import toJson from './toJson'
|
|
4
5
|
import toPolylines from './toPolylines'
|
|
5
6
|
import toSVG from './toSVG'
|
|
6
7
|
import logger from './util/logger'
|
|
7
8
|
|
|
8
|
-
import type { Entity, LayerGroups, ParsedDXF } from './types'
|
|
9
|
+
import type { Entity, LayerGroups, ParsedDXF, ToJsonOptions, ToSVGOptions } from './types'
|
|
9
10
|
|
|
10
11
|
export default class Helper {
|
|
11
12
|
private readonly _contents: string
|
|
@@ -61,8 +62,12 @@ export default class Helper {
|
|
|
61
62
|
return this._groups as LayerGroups
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
toSVG(): string {
|
|
65
|
-
return toSVG(this.parsed)
|
|
65
|
+
toSVG(options?: ToSVGOptions): string {
|
|
66
|
+
return toSVG(this.parsed, options)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
toJson(options?: ToJsonOptions): string {
|
|
70
|
+
return toJson(this.parsed, options)
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
toPolylines(): ReturnType<typeof toPolylines> {
|