@linkiez/dxf-renew 7.1.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/.yarn/install-state.gz +0 -0
- package/ARCHITECTURE.md +163 -0
- package/CHANGELOG.md +16 -0
- package/README.md +72 -10
- package/{PLAN.md → ROADMAP.md} +227 -35
- package/dist/dxf.js +1090 -344
- package/docs/FIXTURE_VALIDATION_EZDXF.md +1 -1
- package/lib/Helper.cjs +4 -0
- package/lib/Helper.cjs.map +3 -3
- package/lib/Helper.js +4 -0
- package/lib/Helper.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 +22 -2
- package/lib/handlers/entities.cjs.map +3 -3
- package/lib/handlers/entities.js +22 -2
- package/lib/handlers/entities.js.map +2 -2
- 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/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/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 +43 -1
- package/lib/handlers/objects.cjs.map +2 -2
- package/lib/handlers/objects.js +43 -1
- 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 +34 -3
- package/lib/toSVG.cjs.map +2 -2
- package/lib/toSVG.js +34 -3
- package/lib/toSVG.js.map +2 -2
- package/lib/types/entity.cjs.map +1 -1
- package/lib/types/helper.cjs.map +1 -1
- package/lib/types/index.cjs +20 -0
- package/lib/types/index.cjs.map +2 -2
- package/lib/types/index.js +10 -0
- package/lib/types/index.js.map +2 -2
- 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/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/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/package.json +5 -19
- package/src/Helper.ts +6 -1
- package/src/entityToPolyline.ts +124 -2
- package/src/handlers/entities.ts +21 -1
- 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/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/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 +64 -8
- package/src/handlers/tables.ts +134 -21
- package/src/index.ts +9 -18
- package/src/toJson.ts +8 -0
- package/src/toSVG.ts +45 -3
- package/src/types/entity.ts +20 -0
- package/src/types/helper.ts +2 -1
- package/src/types/index.ts +10 -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 +7 -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 +76 -0
- package/src/types/trace-entity.ts +14 -0
- package/src/types/wipeout-entity.ts +20 -0
- package/src/types/xline-entity.ts +12 -0
- package/docs/DIMENSION_SUMMARY.md +0 -254
- package/docs/DXF_VERSION_SUPPORT.md +0 -45
- package/docs/ENTITY_SVG_ROADMAP.md +0 -96
- package/docs/IMPLEMENTED-2D-ENTITIES.md +0 -54
- package/docs/README.md +0 -22
- package/docs/SVG_RENDERING_INTEGRATION_TESTS.md +0 -119
- package/docs/TEXT-MTEXT-DIMENSION-SUPPORT.md +0 -241
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/mline-entity.ts"],
|
|
4
|
+
"sourcesContent": ["import type { BaseEntity } from './base-entity'\nimport type { Point3D } from './common'\n\nexport interface MLineEntity extends BaseEntity {\n type: 'MLINE'\n\n startPoint?: Point3D\n endPoint?: Point3D\n\n vertexCount?: number\n styleName?: string\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=mline-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 oleframe_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(oleframe_entity_exports);
|
|
17
|
+
//# sourceMappingURL=oleframe-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/oleframe-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// OLEFrame entity type\n\nimport type { BaseEntity } from './base-entity'\n\n/**\n * OLEFRAME entity\n * Legacy OLE object frame entity.\n */\nexport interface OleFrameEntity extends BaseEntity {\n type: 'OLEFRAME'\n\n /** OLE version number */\n version?: string | number\n /** End of object name/description */\n name?: string | number\n\n /** Upper-left corner X coordinate (WCS) */\n upperLeftX?: string | number\n /** Upper-left corner Y coordinate (WCS) */\n upperLeftY?: string | number\n /** Upper-left corner Z coordinate (WCS) */\n upperLeftZ?: string | number\n\n /** Lower-right corner X coordinate (WCS) */\n lowerRightX?: string | number\n /** Lower-right corner Y coordinate (WCS) */\n lowerRightY?: string | number\n /** Lower-right corner Z coordinate (WCS) */\n lowerRightZ?: string | number\n\n /** Object type (1=Link, 2=Embedded, 3=Static) */\n objectType?: string | number\n /** Tile mode descriptor (0=Model space, 1=Paper space) */\n tile?: string | number\n\n /** Length of binary data */\n length?: string | number\n /** Binary data (concatenated from multiple 310 codes) */\n data: string\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=oleframe-entity.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types/options.ts"],
|
|
4
|
-
"sourcesContent": ["// Options types for various operations\n\nexport interface ToPolylinesOptions {\n interpolationsPerSplineSegment?: number\n}\n\n/**\n * Viewport percentage controls for DIMENSION autoScale.\n *\n * Each value is a percentage (0..100) of the viewport minimum dimension.\n */\nexport interface DimensionAutoScaleViewportPercentages {\n /** Arrowhead marker size (markerWidth/markerHeight) */\n arrowSize?: number\n /** Text height (`font-size`) */\n textHeight?: number\n /** Extension line offset from the measured points */\n extLineOffset?: number\n /** Extension line overshoot beyond the dimension line */\n extLineExtension?: number\n}\n\nexport interface ToSVGOptions {\n width?: number\n height?: number\n dimension?: {\n /**\n * Automatically scale DIMENSION arrow size, extension endpoints, and\n * text height estimates based on the SVG viewport size.\n */\n autoScale?: boolean\n\n /**\n * Viewport reference size used by DIMENSION autoScale.\n * Scale factor is: min(viewBoxWidth, viewBoxHeight) / autoScaleViewportReference.\n * Default: 40.\n */\n autoScaleViewportReference?: number\n\n /**\n * Per-element viewport-percentage overrides for DIMENSION autoScale.\n *\n * When provided (and `autoScale` is enabled), these values set the final\n * sizes directly as a percentage of the viewport minimum dimension:\n * `size = min(viewBoxWidth, viewBoxHeight) * (percent / 100)`.\n *\n * Percent values are expected in the `0..100` range.\n */\n autoScaleViewportPercentages?: DimensionAutoScaleViewportPercentages\n }\n}\n\nexport interface Config {\n verbose?: boolean\n interpolationsPerSplineSegment: number\n layers: string[]\n}\n\n"],
|
|
4
|
+
"sourcesContent": ["// Options types for various operations\n\nexport interface ToPolylinesOptions {\n interpolationsPerSplineSegment?: number\n}\n\nexport interface ToJsonOptions {\n /** Pretty-print JSON output (defaults to false). */\n pretty?: boolean\n /** Indentation spaces when pretty-printing (defaults to 2). */\n space?: number\n}\n\n/**\n * Viewport percentage controls for DIMENSION autoScale.\n *\n * Each value is a percentage (0..100) of the viewport minimum dimension.\n */\nexport interface DimensionAutoScaleViewportPercentages {\n /** Arrowhead marker size (markerWidth/markerHeight) */\n arrowSize?: number\n /** Text height (`font-size`) */\n textHeight?: number\n /** Extension line offset from the measured points */\n extLineOffset?: number\n /** Extension line overshoot beyond the dimension line */\n extLineExtension?: number\n}\n\nexport interface ToSVGOptions {\n width?: number\n height?: number\n dimension?: {\n /**\n * Automatically scale DIMENSION arrow size, extension endpoints, and\n * text height estimates based on the SVG viewport size.\n */\n autoScale?: boolean\n\n /**\n * Viewport reference size used by DIMENSION autoScale.\n * Scale factor is: min(viewBoxWidth, viewBoxHeight) / autoScaleViewportReference.\n * Default: 40.\n */\n autoScaleViewportReference?: number\n\n /**\n * Per-element viewport-percentage overrides for DIMENSION autoScale.\n *\n * When provided (and `autoScale` is enabled), these values set the final\n * sizes directly as a percentage of the viewport minimum dimension:\n * `size = min(viewBoxWidth, viewBoxHeight) * (percent / 100)`.\n *\n * Percent values are expected in the `0..100` range.\n */\n autoScaleViewportPercentages?: DimensionAutoScaleViewportPercentages\n }\n}\n\nexport interface Config {\n verbose?: boolean\n interpolationsPerSplineSegment: number\n layers: string[]\n}\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 ray_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(ray_entity_exports);
|
|
17
|
+
//# sourceMappingURL=ray-entity.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types/ray-entity.ts"],
|
|
4
|
+
"sourcesContent": ["// RAY entity type\n\nimport type { BaseEntity } from './base-entity'\nimport type { Point3D } from './common'\n\nexport interface RayEntity extends BaseEntity {\n type: 'RAY'\n /** Starting point for the ray. */\n start: Point3D\n /** Unit direction vector. */\n direction: Point3D\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=ray-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 region_entity_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(region_entity_exports);
|
|
17
|
+
//# sourceMappingURL=region-entity.cjs.map
|
|
@@ -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'\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 * 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 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"],
|
|
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 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 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
|
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,10 +32,10 @@
|
|
|
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
37
|
"test:integration": "yarn test:integration:browser",
|
|
38
|
-
"test:integration:node": "mocha --require tsx --recursive test/integration/** --extensions .ts
|
|
38
|
+
"test:integration:node": "mocha --require tsx --recursive test/integration/** --extensions .ts",
|
|
39
39
|
"test:integration:browser": "yarn dist && playwright test -c playwright.config.cjs",
|
|
40
40
|
"test:unit:watch": "npm run test:unit -- --watch",
|
|
41
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'",
|
|
@@ -63,16 +63,12 @@
|
|
|
63
63
|
},
|
|
64
64
|
"homepage": "https://github.com/linkiez/DXF-Renewed",
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/core": "^7.28.5",
|
|
67
|
-
"@babel/eslint-parser": "^7.25.1",
|
|
68
|
-
"@babel/preset-react": "^7.28.5",
|
|
69
66
|
"@commitlint/cli": "^20.1.0",
|
|
70
67
|
"@commitlint/config-conventional": "^20.0.0",
|
|
71
68
|
"@playwright/test": "^1.57.0",
|
|
72
69
|
"@semantic-release/changelog": "^6.0.3",
|
|
73
70
|
"@semantic-release/git": "^10.0.1",
|
|
74
71
|
"@semantic-release/github": "^12.0.2",
|
|
75
|
-
"@types/babel__core": "^7",
|
|
76
72
|
"@types/lodash": "^4.17.20",
|
|
77
73
|
"@types/node": "^24.10.1",
|
|
78
74
|
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
@@ -84,30 +80,20 @@
|
|
|
84
80
|
"eslint": "^8.57.0",
|
|
85
81
|
"eslint-config-prettier": "^8.10.0",
|
|
86
82
|
"eslint-config-standard": "^17.1.0",
|
|
87
|
-
"eslint-config-standard-react": "^13.0.0",
|
|
88
83
|
"eslint-plugin-import": "^2.29.1",
|
|
89
84
|
"eslint-plugin-n": "^16.6.2",
|
|
90
85
|
"eslint-plugin-promise": "^6.6.0",
|
|
91
|
-
"eslint-plugin-react": "^7.35.0",
|
|
92
|
-
"eslint-plugin-react-hooks": "^4.6.2",
|
|
93
86
|
"expect": "^29.7.0",
|
|
94
87
|
"husky": "^9.1.7",
|
|
95
88
|
"mocha": "^10.7.3",
|
|
96
89
|
"prettier": "^3.3.3",
|
|
97
|
-
"prop-types": "^15.8.1",
|
|
98
|
-
"raw-loader": "^4.0.2",
|
|
99
|
-
"react": "^16.14.0",
|
|
100
|
-
"react-dom": "^16.14.0",
|
|
101
|
-
"react-router-dom": "^5.3.4",
|
|
102
90
|
"rimraf": "^6.0.1",
|
|
103
91
|
"semantic-release": "^25.0.2",
|
|
104
92
|
"standard-version": "^9.5.0",
|
|
105
93
|
"ts-node": "^10.9.2",
|
|
106
94
|
"tsx": "^4.20.6",
|
|
107
95
|
"typescript": "^5.9.3",
|
|
108
|
-
"
|
|
109
|
-
"webpack-cli": "^5.1.4",
|
|
110
|
-
"webpack-dev-server": "^4.15.2",
|
|
96
|
+
"vite": "^6.0.6",
|
|
111
97
|
"xml2js": "^0.6.2"
|
|
112
98
|
},
|
|
113
99
|
"dependencies": {
|
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, ToSVGOptions } 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
|
|
@@ -65,6 +66,10 @@ export default class Helper {
|
|
|
65
66
|
return toSVG(this.parsed, options)
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
toJson(options?: ToJsonOptions): string {
|
|
70
|
+
return toJson(this.parsed, options)
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
toPolylines(): ReturnType<typeof toPolylines> {
|
|
69
74
|
return toPolylines(this.parsed)
|
|
70
75
|
}
|