dxf-json 0.0.10 → 0.0.16
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/package.json +3 -4
- package/src/index.ts +4 -2
- package/dist/consts/block.d.ts +0 -10
- package/dist/consts/block.js +0 -22
- package/dist/consts/block.js.map +0 -1
- package/dist/consts/color.d.ts +0 -5
- package/dist/consts/color.js +0 -10
- package/dist/consts/color.js.map +0 -1
- package/dist/consts/config.d.ts +0 -2
- package/dist/consts/config.js +0 -6
- package/dist/consts/config.js.map +0 -1
- package/dist/consts/dimension.d.ts +0 -61
- package/dist/consts/dimension.js +0 -74
- package/dist/consts/dimension.js.map +0 -1
- package/dist/consts/hatch.d.ts +0 -44
- package/dist/consts/hatch.js +0 -57
- package/dist/consts/hatch.js.map +0 -1
- package/dist/consts/header.d.ts +0 -9
- package/dist/consts/header.js +0 -13
- package/dist/consts/header.js.map +0 -1
- package/dist/consts/index.d.ts +0 -9
- package/dist/consts/index.js +0 -26
- package/dist/consts/index.js.map +0 -1
- package/dist/consts/lineweight.d.ts +0 -5
- package/dist/consts/lineweight.js +0 -10
- package/dist/consts/lineweight.js.map +0 -1
- package/dist/consts/measurement.d.ts +0 -4
- package/dist/consts/measurement.js +0 -9
- package/dist/consts/measurement.js.map +0 -1
- package/dist/consts/obscuredLineTypes.d.ts +0 -21
- package/dist/consts/obscuredLineTypes.js +0 -26
- package/dist/consts/obscuredLineTypes.js.map +0 -1
- package/dist/consts/scene.d.ts +0 -2
- package/dist/consts/scene.js +0 -6
- package/dist/consts/scene.js.map +0 -1
- package/dist/consts/viewport.d.ts +0 -56
- package/dist/consts/viewport.js +0 -67
- package/dist/consts/viewport.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/parser/AutoCadColorIndex.d.ts +0 -8
- package/dist/parser/AutoCadColorIndex.js +0 -267
- package/dist/parser/AutoCadColorIndex.js.map +0 -1
- package/dist/parser/DxfArrayScanner.d.ts +0 -38
- package/dist/parser/DxfArrayScanner.js +0 -159
- package/dist/parser/DxfArrayScanner.js.map +0 -1
- package/dist/parser/DxfParser.d.ts +0 -11
- package/dist/parser/DxfParser.js +0 -108
- package/dist/parser/DxfParser.js.map +0 -1
- package/dist/parser/ParseHelpers.d.ts +0 -21
- package/dist/parser/ParseHelpers.js +0 -129
- package/dist/parser/ParseHelpers.js.map +0 -1
- package/dist/parser/blocks/blocks.test.d.ts +0 -1
- package/dist/parser/blocks/blocks.test.js +0 -86
- package/dist/parser/blocks/blocks.test.js.map +0 -1
- package/dist/parser/blocks/index.d.ts +0 -4
- package/dist/parser/blocks/index.js +0 -83
- package/dist/parser/blocks/index.js.map +0 -1
- package/dist/parser/blocks/types.d.ts +0 -14
- package/dist/parser/blocks/types.js +0 -3
- package/dist/parser/blocks/types.js.map +0 -1
- package/dist/parser/entities/3dface.js +0 -106
- package/dist/parser/entities/3dface.js.map +0 -1
- package/dist/parser/entities/arc/index.d.ts +0 -2
- package/dist/parser/entities/arc/index.js +0 -19
- package/dist/parser/entities/arc/index.js.map +0 -1
- package/dist/parser/entities/arc/parser.d.ts +0 -7
- package/dist/parser/entities/arc/parser.js +0 -63
- package/dist/parser/entities/arc/parser.js.map +0 -1
- package/dist/parser/entities/arc/types.d.ts +0 -12
- package/dist/parser/entities/arc/types.js +0 -3
- package/dist/parser/entities/arc/types.js.map +0 -1
- package/dist/parser/entities/attdef/consts.d.ts +0 -11
- package/dist/parser/entities/attdef/consts.js +0 -17
- package/dist/parser/entities/attdef/consts.js.map +0 -1
- package/dist/parser/entities/attdef/index.d.ts +0 -3
- package/dist/parser/entities/attdef/index.js +0 -20
- package/dist/parser/entities/attdef/index.js.map +0 -1
- package/dist/parser/entities/attdef/parser.d.ts +0 -8
- package/dist/parser/entities/attdef/parser.js +0 -108
- package/dist/parser/entities/attdef/parser.js.map +0 -1
- package/dist/parser/entities/attdef/types.d.ts +0 -17
- package/dist/parser/entities/attdef/types.js +0 -3
- package/dist/parser/entities/attdef/types.js.map +0 -1
- package/dist/parser/entities/attribute/consts.d.ts +0 -6
- package/dist/parser/entities/attribute/consts.js +0 -11
- package/dist/parser/entities/attribute/consts.js.map +0 -1
- package/dist/parser/entities/attribute/index.d.ts +0 -3
- package/dist/parser/entities/attribute/index.js +0 -20
- package/dist/parser/entities/attribute/index.js.map +0 -1
- package/dist/parser/entities/attribute/parser.d.ts +0 -8
- package/dist/parser/entities/attribute/parser.js +0 -185
- package/dist/parser/entities/attribute/parser.js.map +0 -1
- package/dist/parser/entities/attribute/types.d.ts +0 -30
- package/dist/parser/entities/attribute/types.js +0 -3
- package/dist/parser/entities/attribute/types.js.map +0 -1
- package/dist/parser/entities/circle/index.d.ts +0 -2
- package/dist/parser/entities/circle/index.js +0 -19
- package/dist/parser/entities/circle/index.js.map +0 -1
- package/dist/parser/entities/circle/parser.d.ts +0 -8
- package/dist/parser/entities/circle/parser.js +0 -50
- package/dist/parser/entities/circle/parser.js.map +0 -1
- package/dist/parser/entities/circle/types.d.ts +0 -10
- package/dist/parser/entities/circle/types.js +0 -3
- package/dist/parser/entities/circle/types.js.map +0 -1
- package/dist/parser/entities/dimension/common.d.ts +0 -6
- package/dist/parser/entities/dimension/common.js +0 -122
- package/dist/parser/entities/dimension/common.js.map +0 -1
- package/dist/parser/entities/dimension/index.d.ts +0 -6
- package/dist/parser/entities/dimension/index.js +0 -21
- package/dist/parser/entities/dimension/index.js.map +0 -1
- package/dist/parser/entities/dimension/types.d.ts +0 -48
- package/dist/parser/entities/dimension/types.js +0 -3
- package/dist/parser/entities/dimension/types.js.map +0 -1
- package/dist/parser/entities/ellipse/index.d.ts +0 -2
- package/dist/parser/entities/ellipse/index.js +0 -19
- package/dist/parser/entities/ellipse/index.js.map +0 -1
- package/dist/parser/entities/ellipse/parser.d.ts +0 -7
- package/dist/parser/entities/ellipse/parser.js +0 -59
- package/dist/parser/entities/ellipse/parser.js.map +0 -1
- package/dist/parser/entities/ellipse/types.d.ts +0 -12
- package/dist/parser/entities/ellipse/types.js +0 -3
- package/dist/parser/entities/ellipse/types.js.map +0 -1
- package/dist/parser/entities/entities.test.d.ts +0 -1
- package/dist/parser/entities/entities.test.js +0 -81
- package/dist/parser/entities/entities.test.js.map +0 -1
- package/dist/parser/entities/hatch/boundaryPathData/edge.d.ts +0 -6
- package/dist/parser/entities/hatch/boundaryPathData/edge.js +0 -178
- package/dist/parser/entities/hatch/boundaryPathData/edge.js.map +0 -1
- package/dist/parser/entities/hatch/boundaryPathData/index.d.ts +0 -5
- package/dist/parser/entities/hatch/boundaryPathData/index.js +0 -23
- package/dist/parser/entities/hatch/boundaryPathData/index.js.map +0 -1
- package/dist/parser/entities/hatch/boundaryPathData/polyline.d.ts +0 -2
- package/dist/parser/entities/hatch/boundaryPathData/polyline.js +0 -41
- package/dist/parser/entities/hatch/boundaryPathData/polyline.js.map +0 -1
- package/dist/parser/entities/hatch/boundaryPathData/shared.d.ts +0 -2
- package/dist/parser/entities/hatch/boundaryPathData/shared.js +0 -19
- package/dist/parser/entities/hatch/boundaryPathData/shared.js.map +0 -1
- package/dist/parser/entities/hatch/index.d.ts +0 -8
- package/dist/parser/entities/hatch/index.js +0 -183
- package/dist/parser/entities/hatch/index.js.map +0 -1
- package/dist/parser/entities/hatch/patternData.d.ts +0 -3
- package/dist/parser/entities/hatch/patternData.js +0 -54
- package/dist/parser/entities/hatch/patternData.js.map +0 -1
- package/dist/parser/entities/hatch/types/boundaryPath.d.ts +0 -59
- package/dist/parser/entities/hatch/types/boundaryPath.js +0 -3
- package/dist/parser/entities/hatch/types/boundaryPath.js.map +0 -1
- package/dist/parser/entities/hatch/types/definitionLine.d.ts +0 -8
- package/dist/parser/entities/hatch/types/definitionLine.js +0 -3
- package/dist/parser/entities/hatch/types/definitionLine.js.map +0 -1
- package/dist/parser/entities/hatch/types/hatch.d.ts +0 -38
- package/dist/parser/entities/hatch/types/hatch.js +0 -3
- package/dist/parser/entities/hatch/types/hatch.js.map +0 -1
- package/dist/parser/entities/hatch/types/index.d.ts +0 -3
- package/dist/parser/entities/hatch/types/index.js +0 -20
- package/dist/parser/entities/hatch/types/index.js.map +0 -1
- package/dist/parser/entities/index.d.ts +0 -8
- package/dist/parser/entities/index.js +0 -81
- package/dist/parser/entities/index.js.map +0 -1
- package/dist/parser/entities/insert/index.d.ts +0 -2
- package/dist/parser/entities/insert/index.js +0 -19
- package/dist/parser/entities/insert/index.js.map +0 -1
- package/dist/parser/entities/insert/parser.d.ts +0 -8
- package/dist/parser/entities/insert/parser.js +0 -97
- package/dist/parser/entities/insert/parser.js.map +0 -1
- package/dist/parser/entities/insert/types.d.ts +0 -18
- package/dist/parser/entities/insert/types.js +0 -3
- package/dist/parser/entities/insert/types.js.map +0 -1
- package/dist/parser/entities/leader/consts.d.ts +0 -6
- package/dist/parser/entities/leader/consts.js +0 -11
- package/dist/parser/entities/leader/consts.js.map +0 -1
- package/dist/parser/entities/leader/index.d.ts +0 -3
- package/dist/parser/entities/leader/index.js +0 -20
- package/dist/parser/entities/leader/index.js.map +0 -1
- package/dist/parser/entities/leader/parser.d.ts +0 -8
- package/dist/parser/entities/leader/parser.js +0 -110
- package/dist/parser/entities/leader/parser.js.map +0 -1
- package/dist/parser/entities/leader/types.d.ts +0 -23
- package/dist/parser/entities/leader/types.js +0 -3
- package/dist/parser/entities/leader/types.js.map +0 -1
- package/dist/parser/entities/line/index.d.ts +0 -2
- package/dist/parser/entities/line/index.js +0 -19
- package/dist/parser/entities/line/index.js.map +0 -1
- package/dist/parser/entities/line/parser.d.ts +0 -8
- package/dist/parser/entities/line/parser.js +0 -50
- package/dist/parser/entities/line/parser.js.map +0 -1
- package/dist/parser/entities/line/types.d.ts +0 -10
- package/dist/parser/entities/line/types.js +0 -3
- package/dist/parser/entities/line/types.js.map +0 -1
- package/dist/parser/entities/lwpolyline/consts.d.ts +0 -4
- package/dist/parser/entities/lwpolyline/consts.js +0 -9
- package/dist/parser/entities/lwpolyline/consts.js.map +0 -1
- package/dist/parser/entities/lwpolyline/index.d.ts +0 -3
- package/dist/parser/entities/lwpolyline/index.js +0 -20
- package/dist/parser/entities/lwpolyline/index.js.map +0 -1
- package/dist/parser/entities/lwpolyline/parser.d.ts +0 -7
- package/dist/parser/entities/lwpolyline/parser.js +0 -105
- package/dist/parser/entities/lwpolyline/parser.js.map +0 -1
- package/dist/parser/entities/lwpolyline/types.d.ts +0 -19
- package/dist/parser/entities/lwpolyline/types.js +0 -3
- package/dist/parser/entities/lwpolyline/types.js.map +0 -1
- package/dist/parser/entities/mtext/consts.d.ts +0 -5
- package/dist/parser/entities/mtext/consts.js +0 -10
- package/dist/parser/entities/mtext/consts.js.map +0 -1
- package/dist/parser/entities/mtext/index.d.ts +0 -3
- package/dist/parser/entities/mtext/index.js +0 -20
- package/dist/parser/entities/mtext/index.js.map +0 -1
- package/dist/parser/entities/mtext/parser.d.ts +0 -10
- package/dist/parser/entities/mtext/parser.js +0 -188
- package/dist/parser/entities/mtext/parser.js.map +0 -1
- package/dist/parser/entities/mtext/types.d.ts +0 -33
- package/dist/parser/entities/mtext/types.js +0 -3
- package/dist/parser/entities/mtext/types.js.map +0 -1
- package/dist/parser/entities/point/index.d.ts +0 -2
- package/dist/parser/entities/point/index.js +0 -19
- package/dist/parser/entities/point/index.js.map +0 -1
- package/dist/parser/entities/point/parser.d.ts +0 -6
- package/dist/parser/entities/point/parser.js +0 -54
- package/dist/parser/entities/point/parser.js.map +0 -1
- package/dist/parser/entities/point/types.d.ts +0 -9
- package/dist/parser/entities/point/types.js +0 -3
- package/dist/parser/entities/point/types.js.map +0 -1
- package/dist/parser/entities/polyline/consts.d.ts +0 -16
- package/dist/parser/entities/polyline/consts.js +0 -22
- package/dist/parser/entities/polyline/consts.js.map +0 -1
- package/dist/parser/entities/polyline/index.d.ts +0 -3
- package/dist/parser/entities/polyline/index.js +0 -20
- package/dist/parser/entities/polyline/index.js.map +0 -1
- package/dist/parser/entities/polyline/parser.d.ts +0 -7
- package/dist/parser/entities/polyline/parser.js +0 -118
- package/dist/parser/entities/polyline/parser.js.map +0 -1
- package/dist/parser/entities/polyline/types.d.ts +0 -19
- package/dist/parser/entities/polyline/types.js +0 -3
- package/dist/parser/entities/polyline/types.js.map +0 -1
- package/dist/parser/entities/section/index.d.ts +0 -2
- package/dist/parser/entities/section/index.js +0 -19
- package/dist/parser/entities/section/index.js.map +0 -1
- package/dist/parser/entities/section/parser.d.ts +0 -7
- package/dist/parser/entities/section/parser.js +0 -97
- package/dist/parser/entities/section/parser.js.map +0 -1
- package/dist/parser/entities/section/types.d.ts +0 -19
- package/dist/parser/entities/section/types.js +0 -3
- package/dist/parser/entities/section/types.js.map +0 -1
- package/dist/parser/entities/shared.d.ts +0 -35
- package/dist/parser/entities/shared.js +0 -136
- package/dist/parser/entities/shared.js.map +0 -1
- package/dist/parser/entities/solid/index.d.ts +0 -2
- package/dist/parser/entities/solid/index.js +0 -19
- package/dist/parser/entities/solid/index.js.map +0 -1
- package/dist/parser/entities/solid/parser.d.ts +0 -8
- package/dist/parser/entities/solid/parser.js +0 -48
- package/dist/parser/entities/solid/parser.js.map +0 -1
- package/dist/parser/entities/solid/types.d.ts +0 -9
- package/dist/parser/entities/solid/types.js +0 -3
- package/dist/parser/entities/solid/types.js.map +0 -1
- package/dist/parser/entities/spline/consts.d.ts +0 -8
- package/dist/parser/entities/spline/consts.js +0 -13
- package/dist/parser/entities/spline/consts.js.map +0 -1
- package/dist/parser/entities/spline/index.d.ts +0 -3
- package/dist/parser/entities/spline/index.js +0 -20
- package/dist/parser/entities/spline/index.js.map +0 -1
- package/dist/parser/entities/spline/parser.d.ts +0 -8
- package/dist/parser/entities/spline/parser.js +0 -113
- package/dist/parser/entities/spline/parser.js.map +0 -1
- package/dist/parser/entities/spline/types.d.ts +0 -21
- package/dist/parser/entities/spline/types.js +0 -3
- package/dist/parser/entities/spline/types.js.map +0 -1
- package/dist/parser/entities/text/consts.d.ts +0 -19
- package/dist/parser/entities/text/consts.js +0 -26
- package/dist/parser/entities/text/consts.js.map +0 -1
- package/dist/parser/entities/text/index.d.ts +0 -3
- package/dist/parser/entities/text/index.js +0 -20
- package/dist/parser/entities/text/index.js.map +0 -1
- package/dist/parser/entities/text/parser.d.ts +0 -26
- package/dist/parser/entities/text/parser.js +0 -112
- package/dist/parser/entities/text/parser.js.map +0 -1
- package/dist/parser/entities/text/types.d.ts +0 -20
- package/dist/parser/entities/text/types.js +0 -3
- package/dist/parser/entities/text/types.js.map +0 -1
- package/dist/parser/entities/vertex/consts.d.ts +0 -10
- package/dist/parser/entities/vertex/consts.js +0 -15
- package/dist/parser/entities/vertex/consts.js.map +0 -1
- package/dist/parser/entities/vertex/index.d.ts +0 -3
- package/dist/parser/entities/vertex/index.js +0 -20
- package/dist/parser/entities/vertex/index.js.map +0 -1
- package/dist/parser/entities/vertex/parser.d.ts +0 -8
- package/dist/parser/entities/vertex/parser.js +0 -86
- package/dist/parser/entities/vertex/parser.js.map +0 -1
- package/dist/parser/entities/vertex/types.d.ts +0 -16
- package/dist/parser/entities/vertex/types.js +0 -3
- package/dist/parser/entities/vertex/types.js.map +0 -1
- package/dist/parser/entities/viewport/index.d.ts +0 -5
- package/dist/parser/entities/viewport/index.js +0 -195
- package/dist/parser/entities/viewport/index.js.map +0 -1
- package/dist/parser/entities/viewport/types.d.ts +0 -51
- package/dist/parser/entities/viewport/types.js +0 -3
- package/dist/parser/entities/viewport/types.js.map +0 -1
- package/dist/parser/filterDummyBlocks.d.ts +0 -2
- package/dist/parser/filterDummyBlocks.js +0 -37
- package/dist/parser/filterDummyBlocks.js.map +0 -1
- package/dist/parser/header/index.d.ts +0 -3
- package/dist/parser/header/index.js +0 -32
- package/dist/parser/header/index.js.map +0 -1
- package/dist/parser/objects/common.d.ts +0 -8
- package/dist/parser/objects/common.js +0 -51
- package/dist/parser/objects/common.js.map +0 -1
- package/dist/parser/objects/dictionary.d.ts +0 -20
- package/dist/parser/objects/dictionary.js +0 -50
- package/dist/parser/objects/dictionary.js.map +0 -1
- package/dist/parser/objects/index.d.ts +0 -6
- package/dist/parser/objects/index.js +0 -43
- package/dist/parser/objects/index.js.map +0 -1
- package/dist/parser/objects/layout.d.ts +0 -30
- package/dist/parser/objects/layout.js +0 -110
- package/dist/parser/objects/layout.js.map +0 -1
- package/dist/parser/objects/plotSettings.d.ts +0 -64
- package/dist/parser/objects/plotSettings.js +0 -198
- package/dist/parser/objects/plotSettings.js.map +0 -1
- package/dist/parser/objects/treefy.d.ts +0 -2
- package/dist/parser/objects/treefy.js +0 -37
- package/dist/parser/objects/treefy.js.map +0 -1
- package/dist/parser/objects/types.d.ts +0 -15
- package/dist/parser/objects/types.js +0 -3
- package/dist/parser/objects/types.js.map +0 -1
- package/dist/parser/shared/index.d.ts +0 -7
- package/dist/parser/shared/index.js +0 -22
- package/dist/parser/shared/index.js.map +0 -1
- package/dist/parser/shared/parsePoint.d.ts +0 -7
- package/dist/parser/shared/parsePoint.js +0 -33
- package/dist/parser/shared/parsePoint.js.map +0 -1
- package/dist/parser/shared/parserGenerator.d.ts +0 -15
- package/dist/parser/shared/parserGenerator.js +0 -114
- package/dist/parser/shared/parserGenerator.js.map +0 -1
- package/dist/parser/shared/parserGenerator.test.d.ts +0 -1
- package/dist/parser/shared/parserGenerator.test.js +0 -153
- package/dist/parser/shared/parserGenerator.test.js.map +0 -1
- package/dist/parser/shared/xdata/index.d.ts +0 -3
- package/dist/parser/shared/xdata/index.js +0 -20
- package/dist/parser/shared/xdata/index.js.map +0 -1
- package/dist/parser/shared/xdata/interpreter.d.ts +0 -20
- package/dist/parser/shared/xdata/interpreter.js +0 -43
- package/dist/parser/shared/xdata/interpreter.js.map +0 -1
- package/dist/parser/shared/xdata/interpreter.test.d.ts +0 -1
- package/dist/parser/shared/xdata/interpreter.test.js +0 -83
- package/dist/parser/shared/xdata/interpreter.test.js.map +0 -1
- package/dist/parser/shared/xdata/parser.d.ts +0 -6
- package/dist/parser/shared/xdata/parser.js +0 -133
- package/dist/parser/shared/xdata/parser.js.map +0 -1
- package/dist/parser/shared/xdata/parser.test.d.ts +0 -1
- package/dist/parser/shared/xdata/parser.test.js +0 -64
- package/dist/parser/shared/xdata/parser.test.js.map +0 -1
- package/dist/parser/shared/xdata/types.d.ts +0 -9
- package/dist/parser/shared/xdata/types.js +0 -3
- package/dist/parser/shared/xdata/types.js.map +0 -1
- package/dist/parser/tables/blockRecord/index.d.ts +0 -2
- package/dist/parser/tables/blockRecord/index.js +0 -19
- package/dist/parser/tables/blockRecord/index.js.map +0 -1
- package/dist/parser/tables/blockRecord/parser.d.ts +0 -1
- package/dist/parser/tables/blockRecord/parser.js +0 -45
- package/dist/parser/tables/blockRecord/parser.js.map +0 -1
- package/dist/parser/tables/blockRecord/types.d.ts +0 -10
- package/dist/parser/tables/blockRecord/types.js +0 -3
- package/dist/parser/tables/blockRecord/types.js.map +0 -1
- package/dist/parser/tables/dimStyle/consts.d.ts +0 -2
- package/dist/parser/tables/dimStyle/consts.js +0 -424
- package/dist/parser/tables/dimStyle/consts.js.map +0 -1
- package/dist/parser/tables/dimStyle/index.d.ts +0 -3
- package/dist/parser/tables/dimStyle/index.js +0 -20
- package/dist/parser/tables/dimStyle/index.js.map +0 -1
- package/dist/parser/tables/dimStyle/parser.d.ts +0 -1
- package/dist/parser/tables/dimStyle/parser.js +0 -35
- package/dist/parser/tables/dimStyle/parser.js.map +0 -1
- package/dist/parser/tables/dimStyle/types.d.ts +0 -83
- package/dist/parser/tables/dimStyle/types.js +0 -3
- package/dist/parser/tables/dimStyle/types.js.map +0 -1
- package/dist/parser/tables/index.d.ts +0 -2
- package/dist/parser/tables/index.js +0 -19
- package/dist/parser/tables/index.js.map +0 -1
- package/dist/parser/tables/layer/index.d.ts +0 -2
- package/dist/parser/tables/layer/index.js +0 -19
- package/dist/parser/tables/layer/index.js.map +0 -1
- package/dist/parser/tables/layer/parser.d.ts +0 -1
- package/dist/parser/tables/layer/parser.js +0 -55
- package/dist/parser/tables/layer/parser.js.map +0 -1
- package/dist/parser/tables/layer/types.d.ts +0 -13
- package/dist/parser/tables/layer/types.js +0 -3
- package/dist/parser/tables/layer/types.js.map +0 -1
- package/dist/parser/tables/ltype/consts.d.ts +0 -6
- package/dist/parser/tables/ltype/consts.js +0 -11
- package/dist/parser/tables/ltype/consts.js.map +0 -1
- package/dist/parser/tables/ltype/index.d.ts +0 -3
- package/dist/parser/tables/ltype/index.js +0 -20
- package/dist/parser/tables/ltype/index.js.map +0 -1
- package/dist/parser/tables/ltype/parser.d.ts +0 -1
- package/dist/parser/tables/ltype/parser.js +0 -105
- package/dist/parser/tables/ltype/parser.js.map +0 -1
- package/dist/parser/tables/ltype/types.d.ts +0 -21
- package/dist/parser/tables/ltype/types.js +0 -3
- package/dist/parser/tables/ltype/types.js.map +0 -1
- package/dist/parser/tables/parser.d.ts +0 -2
- package/dist/parser/tables/parser.js +0 -90
- package/dist/parser/tables/parser.js.map +0 -1
- package/dist/parser/tables/shared.d.ts +0 -2
- package/dist/parser/tables/shared.js +0 -32
- package/dist/parser/tables/shared.js.map +0 -1
- package/dist/parser/tables/style/index.d.ts +0 -2
- package/dist/parser/tables/style/index.js +0 -19
- package/dist/parser/tables/style/index.js.map +0 -1
- package/dist/parser/tables/style/parser.d.ts +0 -1
- package/dist/parser/tables/style/parser.js +0 -68
- package/dist/parser/tables/style/parser.js.map +0 -1
- package/dist/parser/tables/style/types.d.ts +0 -14
- package/dist/parser/tables/style/types.js +0 -3
- package/dist/parser/tables/style/types.js.map +0 -1
- package/dist/parser/tables/types.d.ts +0 -14
- package/dist/parser/tables/types.js +0 -3
- package/dist/parser/tables/types.js.map +0 -1
- package/dist/parser/tables/vport/index.d.ts +0 -2
- package/dist/parser/tables/vport/index.js +0 -19
- package/dist/parser/tables/vport/index.js.map +0 -1
- package/dist/parser/tables/vport/parser.d.ts +0 -1
- package/dist/parser/tables/vport/parser.js +0 -201
- package/dist/parser/tables/vport/parser.js.map +0 -1
- package/dist/parser/tables/vport/types.d.ts +0 -43
- package/dist/parser/tables/vport/types.js +0 -3
- package/dist/parser/tables/vport/types.js.map +0 -1
- package/dist/parser/types.d.ts +0 -29
- package/dist/parser/types.js +0 -3
- package/dist/parser/types.js.map +0 -1
- package/dist/types/color.d.ts +0 -3
- package/dist/types/color.js +0 -3
- package/dist/types/color.js.map +0 -1
- package/dist/types/dxfHeader.d.ts +0 -16
- package/dist/types/dxfHeader.js +0 -3
- package/dist/types/dxfHeader.js.map +0 -1
- package/dist/types/entity.d.ts +0 -6
- package/dist/types/entity.js +0 -3
- package/dist/types/entity.js.map +0 -1
- package/dist/types/index.d.ts +0 -24
- package/dist/types/index.js +0 -20
- package/dist/types/index.js.map +0 -1
- package/dist/utils/binarySearch.d.ts +0 -1
- package/dist/utils/binarySearch.js +0 -23
- package/dist/utils/binarySearch.js.map +0 -1
- package/dist/utils/disjointSet.d.ts +0 -6
- package/dist/utils/disjointSet.js +0 -52
- package/dist/utils/disjointSet.js.map +0 -1
- package/dist/utils/flooding.d.ts +0 -8
- package/dist/utils/flooding.js +0 -26
- package/dist/utils/flooding.js.map +0 -1
- package/dist/utils/functional.d.ts +0 -17
- package/dist/utils/functional.js +0 -111
- package/dist/utils/functional.js.map +0 -1
- package/dist/utils/graph.d.ts +0 -19
- package/dist/utils/graph.js +0 -47
- package/dist/utils/graph.js.map +0 -1
- package/dist/utils/index.d.ts +0 -30
- package/dist/utils/index.js +0 -106
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/queue.d.ts +0 -19
- package/dist/utils/queue.js +0 -71
- package/dist/utils/queue.js.map +0 -1
- package/dist/utils/triangle.d.ts +0 -2
- package/dist/utils/triangle.js +0 -19
- package/dist/utils/triangle.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parserGenerator.js","sourceRoot":"","sources":["../../../src/parser/shared/parserGenerator.ts"],"names":[],"mappings":";;;AAAA,wBAA8B;AAG9B,6CAA0C;AAE7B,QAAA,KAAK,GAAG,MAAM,EAAE,CAAC;AAgC9B,SAAgB,YAAY,CAC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AC,CAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,QAAQ,CAAC,EAAE,KAAK,EAAgB;IAC5C,OAAO,KAAK,CAAC;AACjB,CAAC;AAFD,4BAEC;AAED,SAAgB,WAAW,CAAC,CAAM,EAAE,OAAwB;IACxD,OAAO,IAAA,uBAAU,EAAC,OAAO,CAAC,CAAC;AAC/B,CAAC;AAFD,kCAEC;AAED,SAAgB,SAAS,CAAC,EAAE,KAAK,EAAgB;IAC7C,OAAO,CAAC,CAAC,KAAK,CAAC;AACnB,CAAC;AAFD,8BAEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const DxfArrayScanner_1 = __importDefault(require("../DxfArrayScanner"));
|
|
7
|
-
const parserGenerator_1 = require("./parserGenerator");
|
|
8
|
-
describe('createParser', () => {
|
|
9
|
-
it('snippet을 소모하고 name이 있으면 object에 넣어야 한다.', () => {
|
|
10
|
-
const parse = (0, parserGenerator_1.createParser)([
|
|
11
|
-
{
|
|
12
|
-
code: 1,
|
|
13
|
-
name: 'a',
|
|
14
|
-
parser: parserGenerator_1.Identity,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
code: 2,
|
|
18
|
-
name: 'b',
|
|
19
|
-
parser: parserGenerator_1.Identity,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
code: 3,
|
|
23
|
-
name: 'c',
|
|
24
|
-
parser: parserGenerator_1.Identity,
|
|
25
|
-
},
|
|
26
|
-
]);
|
|
27
|
-
const scanner = new DxfArrayScanner_1.default([
|
|
28
|
-
'1',
|
|
29
|
-
'x',
|
|
30
|
-
'2',
|
|
31
|
-
'y',
|
|
32
|
-
'3',
|
|
33
|
-
'z',
|
|
34
|
-
'0',
|
|
35
|
-
'EOF',
|
|
36
|
-
]);
|
|
37
|
-
const obj = {};
|
|
38
|
-
let curr = scanner.next();
|
|
39
|
-
parse(curr, scanner, obj);
|
|
40
|
-
expect(obj.a).toBe('x');
|
|
41
|
-
expect(obj.b).toBe('y');
|
|
42
|
-
expect(obj.c).toBe('z');
|
|
43
|
-
});
|
|
44
|
-
it('정해진 snippet을 소모하고 나면 파서가 종료해야한다.', () => {
|
|
45
|
-
const parse = (0, parserGenerator_1.createParser)([
|
|
46
|
-
{
|
|
47
|
-
code: 1,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
code: 2,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
code: 3,
|
|
54
|
-
},
|
|
55
|
-
]);
|
|
56
|
-
const scanner = new DxfArrayScanner_1.default([
|
|
57
|
-
'1',
|
|
58
|
-
'',
|
|
59
|
-
'2',
|
|
60
|
-
'',
|
|
61
|
-
'3',
|
|
62
|
-
'',
|
|
63
|
-
'1',
|
|
64
|
-
'',
|
|
65
|
-
'2',
|
|
66
|
-
'',
|
|
67
|
-
'0',
|
|
68
|
-
'EOF',
|
|
69
|
-
]);
|
|
70
|
-
let curr = scanner.next();
|
|
71
|
-
parse(curr, scanner, {});
|
|
72
|
-
curr = scanner.next();
|
|
73
|
-
expect(curr.code).toBe(1);
|
|
74
|
-
});
|
|
75
|
-
it('isMultiple이 걸린 경우 snippet을 소모해선 안된다', () => {
|
|
76
|
-
const parse = (0, parserGenerator_1.createParser)([
|
|
77
|
-
{
|
|
78
|
-
code: 1,
|
|
79
|
-
name: 'a',
|
|
80
|
-
isMultiple: true,
|
|
81
|
-
parser: parserGenerator_1.Identity,
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
code: 2,
|
|
85
|
-
name: 'b',
|
|
86
|
-
parser: parserGenerator_1.Identity,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
code: 3,
|
|
90
|
-
name: 'c',
|
|
91
|
-
parser: parserGenerator_1.Identity,
|
|
92
|
-
},
|
|
93
|
-
]);
|
|
94
|
-
const scanner = new DxfArrayScanner_1.default([
|
|
95
|
-
'1',
|
|
96
|
-
'x',
|
|
97
|
-
'2',
|
|
98
|
-
'y',
|
|
99
|
-
'3',
|
|
100
|
-
'z',
|
|
101
|
-
'1',
|
|
102
|
-
'u',
|
|
103
|
-
'2',
|
|
104
|
-
'v',
|
|
105
|
-
'0',
|
|
106
|
-
'EOF',
|
|
107
|
-
]);
|
|
108
|
-
const obj = {};
|
|
109
|
-
let curr = scanner.next();
|
|
110
|
-
parse(curr, scanner, obj);
|
|
111
|
-
expect(obj.a instanceof Array).toBeTruthy();
|
|
112
|
-
expect(obj.a[0]).toBe('x');
|
|
113
|
-
expect(obj.a[1]).toBe('u');
|
|
114
|
-
curr = scanner.next();
|
|
115
|
-
expect(curr.code).toBe(2);
|
|
116
|
-
});
|
|
117
|
-
it('pushContext가 걸린 경우, 새로 생긴 맥락부터 뒤져본다.', () => {
|
|
118
|
-
const parse = (0, parserGenerator_1.createParser)([
|
|
119
|
-
{
|
|
120
|
-
code: 1,
|
|
121
|
-
name: 'a',
|
|
122
|
-
parser: parserGenerator_1.Identity,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
code: 2,
|
|
126
|
-
name: 'b',
|
|
127
|
-
parser: parserGenerator_1.Identity,
|
|
128
|
-
pushContext: true,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
code: 1,
|
|
132
|
-
name: 'c',
|
|
133
|
-
parser: parserGenerator_1.Identity,
|
|
134
|
-
},
|
|
135
|
-
]);
|
|
136
|
-
const scanner = new DxfArrayScanner_1.default([
|
|
137
|
-
'1',
|
|
138
|
-
'x',
|
|
139
|
-
'2',
|
|
140
|
-
'y',
|
|
141
|
-
'1',
|
|
142
|
-
'z',
|
|
143
|
-
'0',
|
|
144
|
-
'EOF',
|
|
145
|
-
]);
|
|
146
|
-
const obj = {};
|
|
147
|
-
let curr = scanner.next();
|
|
148
|
-
parse(curr, scanner, obj);
|
|
149
|
-
expect(obj.a).toBe('z');
|
|
150
|
-
expect(obj.c).toBe('x');
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
//# sourceMappingURL=parserGenerator.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parserGenerator.test.js","sourceRoot":"","sources":["../../../src/parser/shared/parserGenerator.test.ts"],"names":[],"mappings":";;;;;AAAA,yEAAiD;AACjD,uDAA2D;AAE3D,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC/C,MAAM,KAAK,GAAG,IAAA,8BAAY,EAAC;YACvB;gBACI,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,GAAG;gBACT,MAAM,EAAE,0BAAQ;aACnB;YACD;gBACI,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,GAAG;gBACT,MAAM,EAAE,0BAAQ;aACnB;YACD;gBACI,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,GAAG;gBACT,MAAM,EAAE,0BAAQ;aACnB;SACJ,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,yBAAe,CAAC;YAChC,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,KAAK;SACR,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,EAAS,CAAC;QACtB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,MAAM,CAAC,GAA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,GAAG,EAAS,CAAC;QACtB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAE1B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./parser"), exports);
|
|
19
|
-
__exportStar(require("./interpreter"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/parser/shared/xdata/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { XData, XDataEntry } from './types';
|
|
2
|
-
export type XDataInterpreterSnippet<Name extends string> = {
|
|
3
|
-
code: number;
|
|
4
|
-
name: Name;
|
|
5
|
-
};
|
|
6
|
-
type PackPairType<Snippets> = Snippets extends readonly [infer X, ...infer R] ? X extends XDataInterpreterSnippet<infer N> ? {
|
|
7
|
-
[key in N]?: any;
|
|
8
|
-
} & PackPairType<R> : PackPairType<R> : {};
|
|
9
|
-
/**
|
|
10
|
-
* xdata가 code-value의 연속인 경우에 사용 가능
|
|
11
|
-
* ex) DSTYLE
|
|
12
|
-
*/
|
|
13
|
-
export declare function createXDataControlInterpreter<T extends readonly XDataInterpreterSnippet<string>[]>(snippets: T): (entries: XDataEntry[]) => PackPairType<T>;
|
|
14
|
-
interface CreateXDataCatcherParams {
|
|
15
|
-
appName?: string;
|
|
16
|
-
catcher(entry: XDataEntry): boolean;
|
|
17
|
-
escaper?(entry: XDataEntry, count: number): boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare function createXDataCatcher({ appName, catcher, escaper, }: CreateXDataCatcherParams): (xdata?: XData) => Generator<XDataEntry, void, unknown>;
|
|
20
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createXDataCatcher = exports.createXDataControlInterpreter = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* xdata가 code-value의 연속인 경우에 사용 가능
|
|
6
|
-
* ex) DSTYLE
|
|
7
|
-
*/
|
|
8
|
-
function createXDataControlInterpreter(snippets) {
|
|
9
|
-
return (entries) => {
|
|
10
|
-
var _a;
|
|
11
|
-
const result = {};
|
|
12
|
-
for (let i = 0; i < entries.length; i += 2) {
|
|
13
|
-
const snippet = snippets.find(({ code }) => code === entries[i].value);
|
|
14
|
-
if (!snippet)
|
|
15
|
-
continue;
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
result[snippet.name] = (_a = entries[i + 1]) === null || _a === void 0 ? void 0 : _a.value;
|
|
18
|
-
}
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.createXDataControlInterpreter = createXDataControlInterpreter;
|
|
23
|
-
function createXDataCatcher({ appName = 'ACAD', catcher, escaper, }) {
|
|
24
|
-
return function* (xdata) {
|
|
25
|
-
if ((xdata === null || xdata === void 0 ? void 0 : xdata.appName) !== appName)
|
|
26
|
-
return;
|
|
27
|
-
let isCatchable = false;
|
|
28
|
-
let startIndex = -1;
|
|
29
|
-
for (const [index, entry] of xdata.value.entries()) {
|
|
30
|
-
if (isCatchable) {
|
|
31
|
-
yield entry;
|
|
32
|
-
if (escaper === null || escaper === void 0 ? void 0 : escaper(entry, index - startIndex))
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
else if (catcher(entry)) {
|
|
36
|
-
isCatchable = true;
|
|
37
|
-
startIndex = index;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
exports.createXDataCatcher = createXDataCatcher;
|
|
43
|
-
//# sourceMappingURL=interpreter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interpreter.js","sourceRoot":"","sources":["../../../../src/parser/shared/xdata/interpreter.ts"],"names":[],"mappings":";;;AAaA;;;GAGG;AACH,SAAgB,6BAA6B,CAEvC,QAAW;IACb,OAAO,CAAC,OAAqB,EAAmB,EAAE;;QAC9C,MAAM,MAAM,GAAG,EAAqB,CAAC;QAErC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CACzB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAC1C,CAAC;YAEF,IAAI,CAAC,OAAO;gBAAE,SAAS;YACvB,aAAa;YACb,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,MAAA,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,0CAAE,KAAK,CAAC;QACjD,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC;AAlBD,sEAkBC;AAQD,SAAgB,kBAAkB,CAAC,EAC/B,OAAO,GAAG,MAAM,EAChB,OAAO,EACP,OAAO,GACgB;IACvB,OAAO,QAAQ,CAAC,EAAE,KAAa;QAC3B,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,MAAK,OAAO;YAAE,OAAO;QAEvC,IAAI,WAAW,GAAG,KAAK,CAAC;QACxB,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;QACpB,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACjD,IAAI,WAAW,EAAE,CAAC;gBACd,MAAM,KAAK,CAAC;gBAEZ,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAK,EAAE,KAAK,GAAG,UAAU,CAAC;oBAAE,OAAO;YACrD,CAAC;iBAAM,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxB,WAAW,GAAG,IAAI,CAAC;gBACnB,UAAU,GAAG,KAAK,CAAC;YACvB,CAAC;QACL,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AArBD,gDAqBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const interpreter_1 = require("./interpreter");
|
|
4
|
-
describe('xdata:interpreter', () => {
|
|
5
|
-
it('xdata 엔트리들이 name-value 쌍이면 객체에 snippet대로 풀어서 반환한다', () => {
|
|
6
|
-
const interpreter = (0, interpreter_1.createXDataControlInterpreter)([
|
|
7
|
-
{
|
|
8
|
-
code: 40,
|
|
9
|
-
name: '$DIMSCALE',
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
code: 172,
|
|
13
|
-
name: 'dim-line-forced',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
code: 175,
|
|
17
|
-
name: 'dim-line-inside',
|
|
18
|
-
},
|
|
19
|
-
]);
|
|
20
|
-
const result = interpreter([
|
|
21
|
-
{
|
|
22
|
-
value: 40,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
value: 2.0,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
value: 175,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
value: 0,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
value: 172,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
value: 1,
|
|
38
|
-
},
|
|
39
|
-
]);
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
expect(result['$DIMSCALE']).toBe(2.0);
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
expect(result['dim-line-forced']).toBe(1);
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
expect(result['dim-line-inside']).toBe(0);
|
|
46
|
-
});
|
|
47
|
-
it('snippet에 없는 쌍은 무시한다.', () => {
|
|
48
|
-
const interpreter = (0, interpreter_1.createXDataControlInterpreter)([
|
|
49
|
-
{
|
|
50
|
-
code: 40,
|
|
51
|
-
name: '$DIMSCALE',
|
|
52
|
-
type: 'real',
|
|
53
|
-
},
|
|
54
|
-
]);
|
|
55
|
-
const result = interpreter([
|
|
56
|
-
{
|
|
57
|
-
value: 175,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
value: 0,
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
value: 40,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
value: 2.0,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
value: 172,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
value: 1,
|
|
73
|
-
},
|
|
74
|
-
]);
|
|
75
|
-
// @ts-ignore
|
|
76
|
-
expect(result['$DIMSCALE']).toBe(2.0);
|
|
77
|
-
// @ts-ignore
|
|
78
|
-
expect(result['dim-line-forced']).toBe(undefined);
|
|
79
|
-
// @ts-ignore
|
|
80
|
-
expect(result['dim-line-inside']).toBe(undefined);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
//# sourceMappingURL=interpreter.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interpreter.test.js","sourceRoot":"","sources":["../../../../src/parser/shared/xdata/interpreter.test.ts"],"names":[],"mappings":";;AAAA,+CAA8D;AAE9D,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QACzD,MAAM,WAAW,GAAG,IAAA,2CAA6B,EAAC;YAC9C;gBACI,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,WAAW;aACpB;YACD;gBACI,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,iBAAiB;aAC1B;YACD;gBACI,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,iBAAiB;aAC1B;SACJ,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,WAAW,CAAC;YACvB;gBACI,KAAK,EAAE,EAAE;aACZ;YACD;gBACI,KAAK,EAAE,GAAG;aACb;YACD;gBACI,KAAK,EAAE,GAAG;aACb;YACD;gBACI,KAAK,EAAE,CAAC;aACX;YACD;gBACI,KAAK,EAAE,GAAG;aACb;YACD;gBACI,KAAK,EAAE,CAAC;aACX;SACJ,CAAC,CAAC;QACH,aAAa;QACb,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,aAAa;QACb,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1C,aAAa;QACb,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC5B,MAAM,WAAW,GAAG,IAAA,2CAA6B,EAAC;YAC9C;gBACI,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,MAAM;aACf;SACJ,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,WAAW,CAAC;YACvB;gBACI,KAAK,EAAE,GAAG;aACb;YACD;gBACI,KAAK,EAAE,CAAC;aACX;YACD;gBACI,KAAK,EAAE,EAAE;aACZ;YACD;gBACI,KAAK,EAAE,GAAG;aACb;YACD;gBACI,KAAK,EAAE,GAAG;aACb;YACD;gBACI,KAAK,EAAE,CAAC;aACX;SACJ,CAAC,CAAC;QAEH,aAAa;QACb,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,aAAa;QACb,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAClD,aAAa;QACb,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ScannerGroup } from '../../DxfArrayScanner';
|
|
2
|
-
import type DxfArrayScanner from '../../DxfArrayScanner';
|
|
3
|
-
import { DXFParserSnippet } from '../parserGenerator';
|
|
4
|
-
import type { XData } from './types';
|
|
5
|
-
export declare const XDataParserSnippets: DXFParserSnippet[];
|
|
6
|
-
export declare function parseXData(curr: ScannerGroup, scanner: DxfArrayScanner): XData;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseXData = exports.XDataParserSnippets = void 0;
|
|
4
|
-
const __1 = require("..");
|
|
5
|
-
const parsePoint_1 = require("../parsePoint");
|
|
6
|
-
exports.XDataParserSnippets = [
|
|
7
|
-
{
|
|
8
|
-
code: 1001,
|
|
9
|
-
name: 'xdata',
|
|
10
|
-
parser: parseXData,
|
|
11
|
-
},
|
|
12
|
-
];
|
|
13
|
-
function parseXData(curr, scanner) {
|
|
14
|
-
var _a;
|
|
15
|
-
if (!(0, __1.isMatched)(curr, 1001)) {
|
|
16
|
-
throw new Error('XData must starts with code 1001');
|
|
17
|
-
}
|
|
18
|
-
const xdata = {
|
|
19
|
-
appName: curr.value,
|
|
20
|
-
value: [],
|
|
21
|
-
};
|
|
22
|
-
curr = scanner.next();
|
|
23
|
-
const stack = [xdata.value];
|
|
24
|
-
while (!(0, __1.isMatched)(curr, 0, 'EOF') && curr.code >= 1000) {
|
|
25
|
-
const top = stack.at(-1);
|
|
26
|
-
switch (curr.code) {
|
|
27
|
-
case 1002:
|
|
28
|
-
if (curr.value === '{') {
|
|
29
|
-
stack.push([]);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
stack.pop();
|
|
33
|
-
(_a = stack.at(-1)) === null || _a === void 0 ? void 0 : _a.push(top);
|
|
34
|
-
}
|
|
35
|
-
break;
|
|
36
|
-
case 1000: // string
|
|
37
|
-
case 1004: // hex string
|
|
38
|
-
case 1040: // real
|
|
39
|
-
case 1070: // integer
|
|
40
|
-
case 1071: // long
|
|
41
|
-
top.push({
|
|
42
|
-
type: getType(curr.code),
|
|
43
|
-
value: curr.value,
|
|
44
|
-
});
|
|
45
|
-
break;
|
|
46
|
-
case 1003:
|
|
47
|
-
top.push({
|
|
48
|
-
name: 'layer',
|
|
49
|
-
type: getType(curr.code),
|
|
50
|
-
value: curr.value,
|
|
51
|
-
});
|
|
52
|
-
break;
|
|
53
|
-
case 1005:
|
|
54
|
-
top.push({
|
|
55
|
-
name: 'handle',
|
|
56
|
-
type: getType(curr.code),
|
|
57
|
-
value: curr.value,
|
|
58
|
-
});
|
|
59
|
-
break;
|
|
60
|
-
case 1010: // just 3 reals
|
|
61
|
-
top.push({
|
|
62
|
-
type: getType(curr.code),
|
|
63
|
-
value: (0, parsePoint_1.parsePoint)(scanner),
|
|
64
|
-
});
|
|
65
|
-
break;
|
|
66
|
-
case 1011:
|
|
67
|
-
top.push({
|
|
68
|
-
name: 'worldSpacePosition',
|
|
69
|
-
type: getType(curr.code),
|
|
70
|
-
value: (0, parsePoint_1.parsePoint)(scanner),
|
|
71
|
-
});
|
|
72
|
-
break;
|
|
73
|
-
case 1012:
|
|
74
|
-
top.push({
|
|
75
|
-
name: 'worldSpaceDisplacement',
|
|
76
|
-
type: getType(curr.code),
|
|
77
|
-
value: (0, parsePoint_1.parsePoint)(scanner),
|
|
78
|
-
});
|
|
79
|
-
break;
|
|
80
|
-
case 1013:
|
|
81
|
-
top.push({
|
|
82
|
-
name: 'worldSpaceDirection',
|
|
83
|
-
type: getType(curr.code),
|
|
84
|
-
value: (0, parsePoint_1.parsePoint)(scanner),
|
|
85
|
-
});
|
|
86
|
-
break;
|
|
87
|
-
case 1041:
|
|
88
|
-
top.push({
|
|
89
|
-
name: 'distance',
|
|
90
|
-
type: getType(curr.code),
|
|
91
|
-
value: curr.value,
|
|
92
|
-
});
|
|
93
|
-
break;
|
|
94
|
-
case 1042:
|
|
95
|
-
top.push({
|
|
96
|
-
name: 'scale',
|
|
97
|
-
type: getType(curr.code),
|
|
98
|
-
value: curr.value,
|
|
99
|
-
});
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
curr = scanner.next();
|
|
103
|
-
}
|
|
104
|
-
scanner.rewind();
|
|
105
|
-
return xdata;
|
|
106
|
-
}
|
|
107
|
-
exports.parseXData = parseXData;
|
|
108
|
-
function getType(code) {
|
|
109
|
-
switch (code) {
|
|
110
|
-
case 1000:
|
|
111
|
-
case 1003:
|
|
112
|
-
case 1005:
|
|
113
|
-
return 'string';
|
|
114
|
-
case 1004:
|
|
115
|
-
return 'hex';
|
|
116
|
-
case 1040:
|
|
117
|
-
case 1041:
|
|
118
|
-
case 1042:
|
|
119
|
-
return 'real';
|
|
120
|
-
case 1070:
|
|
121
|
-
return 'integer';
|
|
122
|
-
case 1071:
|
|
123
|
-
return 'long';
|
|
124
|
-
case 1010:
|
|
125
|
-
case 1011:
|
|
126
|
-
case 1012:
|
|
127
|
-
case 1013:
|
|
128
|
-
return 'point';
|
|
129
|
-
default:
|
|
130
|
-
return '';
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../src/parser/shared/xdata/parser.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;AAG/B,8CAA2C;AAI9B,QAAA,mBAAmB,GAAuB;IACnD;QACI,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,UAAU;KACrB;CACJ,CAAC;AAEF,SAAgB,UAAU,CAAC,IAAkB,EAAE,OAAwB;;IACnE,IAAI,CAAC,IAAA,aAAS,EAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,KAAK,GAAU;QACjB,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,KAAK,EAAE,EAAkB;KAC5B,CAAC;IAEF,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAEtB,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK,CAAY,CAAC;IAEvC,OAAO,CAAC,IAAA,aAA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QAED,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,CAAC;IACjB,OAAO,KAAK,CAAC;AACjB,CAAC;AAlGD,gCAkGC;AAED,SAAS,OAAO,CAAC,IAAY;IACzB,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,IAAI,CAAC;QACV,KAAK,IAAI,CAAC;QACV,KAAK,IAAI;YACL,OAAO,QAAQ,CAAC;QACpB,KAAK,IAAI;YACL,OAAO,KAAK,CAAC;QACjB,KAAK,IAAI,CAAC;QACV,KAAK,IAAI,CAAC;QACV,KAAK,IAAI;YACL,OAAO,MAAM,CAAC;QAClB,KAAK,IAAI;YACL,OAAO,SAAS,CAAC;QACrB,KAAK,IAAI;YACL,OAAO,MAAM,CAAC;QAClB,KAAK,IAAI,CAAC;QACV,KAAK,IAAI,CAAC;QACV,KAAK,IAAI,CAAC;QACV,KAAK,IAAI;YACL,OAAO,OAAO,CAAC;QACnB;YACI,OAAO,EAAE,CAAC;IAClB,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const DxfArrayScanner_1 = __importDefault(require("../../DxfArrayScanner"));
|
|
7
|
-
const parser_1 = require("./parser");
|
|
8
|
-
describe('xdata:parser', () => {
|
|
9
|
-
it('xdata entry를 순차적으로 파싱하여 배열로 반환해야 한다', () => {
|
|
10
|
-
const scanner = new DxfArrayScanner_1.default(`1001
|
|
11
|
-
ACAD
|
|
12
|
-
1000
|
|
13
|
-
DSTYLE
|
|
14
|
-
1070
|
|
15
|
-
171
|
|
16
|
-
`.split('\n'));
|
|
17
|
-
const curr = scanner.next();
|
|
18
|
-
const result = (0, parser_1.parseXData)(curr, scanner);
|
|
19
|
-
expect(result.appName).toBe('ACAD');
|
|
20
|
-
expect(result.value.length).toBe(2);
|
|
21
|
-
expect(result.value[0].value).toBe('DSTYLE');
|
|
22
|
-
expect(result.value[1].value).toBe(171);
|
|
23
|
-
});
|
|
24
|
-
it('중첩된 xdata entry를 중첩된 배열로 반환해야 한다.', () => {
|
|
25
|
-
const scanner = new DxfArrayScanner_1.default(`1001
|
|
26
|
-
ACAD
|
|
27
|
-
1000
|
|
28
|
-
a
|
|
29
|
-
1002
|
|
30
|
-
{
|
|
31
|
-
1000
|
|
32
|
-
b
|
|
33
|
-
1000
|
|
34
|
-
c
|
|
35
|
-
1002
|
|
36
|
-
}
|
|
37
|
-
1000
|
|
38
|
-
d
|
|
39
|
-
`.split('\n'));
|
|
40
|
-
const curr = scanner.next();
|
|
41
|
-
const result = (0, parser_1.parseXData)(curr, scanner);
|
|
42
|
-
expect(result.value).toMatchObject([
|
|
43
|
-
{
|
|
44
|
-
type: 'string',
|
|
45
|
-
value: 'a',
|
|
46
|
-
},
|
|
47
|
-
[
|
|
48
|
-
{
|
|
49
|
-
type: 'string',
|
|
50
|
-
value: 'b',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
type: 'string',
|
|
54
|
-
value: 'c',
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
{
|
|
58
|
-
type: 'string',
|
|
59
|
-
value: 'd',
|
|
60
|
-
},
|
|
61
|
-
]);
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
//# sourceMappingURL=parser.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parser.test.js","sourceRoot":"","sources":["../../../../src/parser/shared/xdata/parser.test.ts"],"names":[],"mappings":";;;;;AAAA,4EAAoD;AACpD,qCAAsC;AAEtC,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,qCAAqC,EAAE,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EAAE,GAAG;aACb;SACJ,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/parser/shared/xdata/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./parser"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/parser/tables/blockRecord/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const parseBlockRecordTable: import("../../shared/parserGenerator").DXFParser;
|