@mlightcad/libredwg-web 0.6.5 → 0.6.7

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.
Files changed (126) hide show
  1. package/dist/libredwg-web.js +102 -6
  2. package/dist/libredwg-web.umd.cjs +102 -6
  3. package/lib/converter/converter.js +24 -2
  4. package/lib/converter/entityConverter.d.ts +1 -0
  5. package/lib/converter/entityConverter.js +56 -5
  6. package/lib/database/entities/attrib.d.ts +1 -1
  7. package/lib/database/entities/insert.d.ts +5 -0
  8. package/lib/enums.d.ts +340 -0
  9. package/lib/enums.js +351 -0
  10. package/lib/libredwg-web.js +33 -32
  11. package/lib/libredwg.d.ts +7 -0
  12. package/lib/libredwg.js +11 -0
  13. package/lib/svg/ToSVG.d.ts +16 -0
  14. package/lib/svg/ToSVG.js +235 -0
  15. package/lib/svg/util/boundingBox.d.ts +9 -0
  16. package/lib/svg/util/boundingBox.js +19 -0
  17. package/lib/svg/util/box2d.d.ts +9 -0
  18. package/lib/svg/util/box2d.js +19 -0
  19. package/lib/svg/util/denormalise.d.ts +19 -0
  20. package/lib/svg/util/denormalise.js +24 -0
  21. package/lib/svg/util/entityToPolyline.d.ts +2 -0
  22. package/lib/svg/util/entityToPolyline.js +5 -0
  23. package/lib/svg/util/getRGBForEntity.d.ts +3 -0
  24. package/lib/svg/util/getRGBForEntity.js +9 -0
  25. package/lib/svg/util/rgbToColorAttribute.d.ts +6 -0
  26. package/lib/svg/util/rgbToColorAttribute.js +4 -0
  27. package/lib/svg/util/rotate.d.ts +6 -0
  28. package/lib/svg/util/rotate.js +9 -0
  29. package/lib/svg/util/toPiecewiseBezier.d.ts +9 -0
  30. package/lib/svg/util/toPiecewiseBezier.js +24 -0
  31. package/lib/svg/util/transformBoundingBoxAndElement.d.ts +19 -0
  32. package/lib/svg/util/transformBoundingBoxAndElement.js +20 -0
  33. package/lib/types/common.d.ts +2 -1
  34. package/lib/types/database.d.ts +17 -0
  35. package/lib/types/database.js +2 -0
  36. package/lib/types/entities/arc.d.ts +12 -0
  37. package/lib/types/entities/arc.js +2 -0
  38. package/lib/types/entities/circle.d.ts +10 -0
  39. package/lib/types/entities/circle.js +2 -0
  40. package/lib/types/entities/dimension.d.ts +108 -0
  41. package/lib/types/entities/dimension.js +2 -0
  42. package/lib/types/entities/ellipse.d.ts +12 -0
  43. package/lib/types/entities/ellipse.js +2 -0
  44. package/lib/types/entities/entity.d.ts +25 -0
  45. package/lib/types/entities/entity.js +2 -0
  46. package/lib/types/entities/hatch.d.ts +142 -0
  47. package/lib/types/entities/hatch.js +2 -0
  48. package/lib/types/entities/image.d.ts +36 -0
  49. package/lib/types/entities/image.js +2 -0
  50. package/lib/types/entities/index.d.ts +24 -0
  51. package/lib/types/entities/index.js +24 -0
  52. package/lib/types/entities/insert.d.ts +18 -0
  53. package/lib/types/entities/insert.js +2 -0
  54. package/lib/types/entities/leader.d.ts +28 -0
  55. package/lib/types/entities/leader.js +2 -0
  56. package/lib/types/entities/line.d.ts +10 -0
  57. package/lib/types/entities/line.js +2 -0
  58. package/lib/types/entities/lwpolyline.d.ts +19 -0
  59. package/lib/types/entities/lwpolyline.js +2 -0
  60. package/lib/types/entities/mtext.d.ts +37 -0
  61. package/lib/types/entities/mtext.js +2 -0
  62. package/lib/types/entities/point.d.ts +10 -0
  63. package/lib/types/entities/point.js +2 -0
  64. package/lib/types/entities/polyline.d.ts +34 -0
  65. package/lib/types/entities/polyline.js +2 -0
  66. package/lib/types/entities/ray.d.ts +8 -0
  67. package/lib/types/entities/ray.js +2 -0
  68. package/lib/types/entities/section.d.ts +19 -0
  69. package/lib/types/entities/section.js +2 -0
  70. package/lib/types/entities/solid.d.ts +9 -0
  71. package/lib/types/entities/solid.js +2 -0
  72. package/lib/types/entities/spline.d.ts +21 -0
  73. package/lib/types/entities/spline.js +2 -0
  74. package/lib/types/entities/table.d.ts +52 -0
  75. package/lib/types/entities/table.js +2 -0
  76. package/lib/types/entities/text.d.ts +38 -0
  77. package/lib/types/entities/text.js +2 -0
  78. package/lib/types/entities/vertex.d.ts +25 -0
  79. package/lib/types/entities/vertex.js +2 -0
  80. package/lib/types/entities/viewport.d.ts +105 -0
  81. package/lib/types/entities/viewport.js +2 -0
  82. package/lib/types/entities/xline.d.ts +8 -0
  83. package/lib/types/entities/xline.js +2 -0
  84. package/lib/types/enums.d.ts +8 -0
  85. package/lib/types/enums.js +9 -0
  86. package/lib/types/objects/common.d.ts +5 -0
  87. package/lib/types/objects/common.js +2 -0
  88. package/lib/types/objects/imageDef.d.ts +10 -0
  89. package/lib/types/objects/imageDef.js +2 -0
  90. package/lib/types/objects/index.d.ts +5 -0
  91. package/lib/types/objects/index.js +5 -0
  92. package/lib/types/objects/layout.d.ts +23 -0
  93. package/lib/types/objects/layout.js +2 -0
  94. package/lib/types/objects/plotSetting.d.ts +35 -0
  95. package/lib/types/objects/plotSetting.js +2 -0
  96. package/lib/types/shared/xdata.d.ts +10 -0
  97. package/lib/types/shared/xdata.js +2 -0
  98. package/lib/types/tables/blockRecord.d.ts +12 -0
  99. package/lib/types/tables/blockRecord.js +2 -0
  100. package/lib/types/tables/dimStyle.d.ts +84 -0
  101. package/lib/types/tables/dimStyle.js +2 -0
  102. package/lib/types/tables/index.d.ts +8 -0
  103. package/lib/types/tables/index.js +8 -0
  104. package/lib/types/tables/layer.d.ts +16 -0
  105. package/lib/types/tables/layer.js +2 -0
  106. package/lib/types/tables/ltype.d.ts +21 -0
  107. package/lib/types/tables/ltype.js +2 -0
  108. package/lib/types/tables/style.d.ts +13 -0
  109. package/lib/types/tables/style.js +2 -0
  110. package/lib/types/tables/table.d.ts +9 -0
  111. package/lib/types/tables/table.js +2 -0
  112. package/lib/types/tables/vport.d.ts +42 -0
  113. package/lib/types/tables/vport.js +2 -0
  114. package/package.json +1 -1
  115. package/wasm/libredwg-web.d.ts +1 -0
  116. package/wasm/libredwg-web.wasm +0 -0
  117. package/lib/converter/stringConverter.d.ts +0 -3
  118. package/lib/converter/stringConverter.js +0 -7
  119. package/lib/database/entities/unknown.d.ts +0 -7
  120. package/lib/database/entities/unknown.js +0 -2
  121. package/lib/database/objects/unknown.d.ts +0 -7
  122. package/lib/database/objects/unknown.js +0 -2
  123. package/lib/utils/common.d.ts +0 -4
  124. package/lib/utils/common.js +0 -12
  125. package/lib/utils/index.d.ts +0 -2
  126. package/lib/utils/index.js +0 -2
@@ -0,0 +1,25 @@
1
+ import { DwgPoint3D } from '../common';
2
+ import { DwgEntity } from './entity';
3
+ export declare enum DwgVertexFlag {
4
+ CREATED_BY_CURVE_FIT = 1,
5
+ TANGENT_DEFINED = 2,
6
+ NOT_USED = 4,
7
+ CREATED_BY_SPLINE_FIT = 8,
8
+ SPLINE_CONTROL_POINT = 16,
9
+ FOR_POLYLINE = 32,
10
+ FOR_POLYGON = 64,
11
+ POLYFACE = 128
12
+ }
13
+ export interface DwgVertexEntity extends DwgEntity, DwgPoint3D {
14
+ startWidth: number;
15
+ endWidth: number;
16
+ bulge: number;
17
+ flag: DwgVertexFlag;
18
+ tangentDirection: number;
19
+ polyfaceIndex0?: number;
20
+ polyfaceIndex1?: number;
21
+ polyfaceIndex2?: number;
22
+ polyfaceIndex3?: number;
23
+ id: number;
24
+ }
25
+ //# sourceMappingURL=vertex.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=vertex.js.map
@@ -0,0 +1,105 @@
1
+ import { DwgPoint2D, DwgPoint3D } from '../common';
2
+ import { DwgEntity } from './entity';
3
+ export declare enum DwgViewportStatusFlag {
4
+ PERSPECTIVE_MODE = 1,
5
+ FRONT_CLIPPING = 2,
6
+ BACK_CLIPPING = 4,
7
+ UCS_FOLLOW = 8,
8
+ FRONT_CLIP_NOT_AT_EYE = 16,
9
+ UCS_ICON_VISIBILITY = 32,
10
+ UCS_ICON_AT_ORIGIN = 64,
11
+ FAST_ZOOM = 128,
12
+ SNAP_MODE = 256,
13
+ GRID_MODE = 512,
14
+ ISOMETRIC_SNAP_STYLE = 1024,
15
+ HIDE_PLOT_MODE = 2048,
16
+ K_ISO_PAIR_TOP = 4096,
17
+ K_ISO_PAIR_RIGHT = 8192,
18
+ VIEWPORT_ZOOM_LOCKING = 16384,
19
+ UNUSED = 32768,
20
+ NON_RECTANGULAR_CLIPPING = 65536,
21
+ VIEWPORT_OFF = 131072,
22
+ GRID_BEYOND_DRAWING_LIMITS = 262144,
23
+ ADAPTIVE_GRID_DISPLAY = 524288,
24
+ SUBDIVISION_BELOW_SPACING = 1048576,
25
+ GRID_FOLLOWS_WORKPLANE = 2097152
26
+ }
27
+ export declare enum DwgRenderMode {
28
+ OPTIMIZED_2D = 0,// classic 2D
29
+ WIREFRAME = 1,
30
+ HIDDEN_LINE = 2,
31
+ FLAT_SHADED = 3,
32
+ GOURAUD_SHADED = 4,
33
+ FLAT_SHADED_WITH_WIREFRAME = 5,
34
+ GOURAUD_SHADED_WITH_WIREFRAME = 6
35
+ }
36
+ export declare enum DwgUCSPerViewport {
37
+ UCS_UNCHANGED = 0,
38
+ HAS_OWN_UCS = 1
39
+ }
40
+ export declare enum DwgOrthographicType {
41
+ NON_ORTHOGRAPHIC = 0,
42
+ TOP = 1,
43
+ BOTTOM = 2,
44
+ FRONT = 3,
45
+ BACK = 4,
46
+ LEFT = 5,
47
+ RIGHT = 6
48
+ }
49
+ export declare enum DwgShadePlotMode {
50
+ AS_DISPLAYED = 0,
51
+ WIREFRAME = 1,
52
+ HIDDEN = 2,
53
+ RENDERED = 3
54
+ }
55
+ export declare enum DwgDefaultLightingType {
56
+ ONE_DISTANT_LIGHT = 0,
57
+ TWO_DISTANT_LIGHTS = 1
58
+ }
59
+ export interface DwgViewportEntity extends DwgEntity {
60
+ type: 'VIEWPORT';
61
+ viewportCenter: DwgPoint3D;
62
+ width: number;
63
+ height: number;
64
+ status: number;
65
+ viewportId: number;
66
+ displayCenter: DwgPoint2D;
67
+ snapBase: DwgPoint2D;
68
+ snapSpacing: DwgPoint2D;
69
+ gridSpacing: DwgPoint2D;
70
+ viewDirection: DwgPoint3D;
71
+ targetPoint: DwgPoint3D;
72
+ perspectiveLensLength: number;
73
+ frontClipZ: number;
74
+ backClipZ: number;
75
+ viewHeight: number;
76
+ snapAngle: number;
77
+ viewTwistAngle: number;
78
+ circleZoomPercent: number;
79
+ frozenLayerIds?: string[];
80
+ statusBitFlags: number;
81
+ clippingBoundaryId?: string;
82
+ sheetName: string;
83
+ renderMode: DwgRenderMode;
84
+ ucsPerViewport: DwgUCSPerViewport;
85
+ ucsOrigin?: DwgPoint3D;
86
+ ucsXAxis?: DwgPoint3D;
87
+ ucsYAxis?: DwgPoint3D;
88
+ ucsId?: string;
89
+ ucsBaseId?: string;
90
+ orthographicType?: DwgOrthographicType;
91
+ elevation: number;
92
+ shadePlotMode: DwgShadePlotMode;
93
+ majorGridFrequency: number;
94
+ backgroundId?: string;
95
+ shadePlotId?: string;
96
+ visualStyleId?: string;
97
+ isDefaultLighting: boolean;
98
+ defaultLightingType?: DwgDefaultLightingType;
99
+ brightness: number;
100
+ contrast: number;
101
+ ambientLightColor?: string;
102
+ sunId?: string;
103
+ softPointer?: string;
104
+ }
105
+ //# sourceMappingURL=viewport.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=viewport.js.map
@@ -0,0 +1,8 @@
1
+ import { DwgPoint3D } from '../common';
2
+ import { DwgEntity } from './entity';
3
+ export interface DwgXlineEntity extends DwgEntity {
4
+ type: 'XLINE';
5
+ firstPoint: DwgPoint3D;
6
+ unitDirection: DwgPoint3D;
7
+ }
8
+ //# sourceMappingURL=xline.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=xline.js.map
@@ -348,4 +348,12 @@ export declare enum Dwg_Hatch_Edge_Type {
348
348
  EllipticArc = 3,
349
349
  Spline = 4
350
350
  }
351
+ export declare enum Dwg_Color_Method {
352
+ ByLayer = 192,
353
+ ByBlock = 193,
354
+ Entities = 194,
355
+ TrueColor = 195,
356
+ ForegroundColor = 197,
357
+ None = 200
358
+ }
351
359
  //# sourceMappingURL=enums.d.ts.map
@@ -360,4 +360,13 @@ export var Dwg_Hatch_Edge_Type;
360
360
  Dwg_Hatch_Edge_Type[Dwg_Hatch_Edge_Type["EllipticArc"] = 3] = "EllipticArc";
361
361
  Dwg_Hatch_Edge_Type[Dwg_Hatch_Edge_Type["Spline"] = 4] = "Spline";
362
362
  })(Dwg_Hatch_Edge_Type || (Dwg_Hatch_Edge_Type = {}));
363
+ export var Dwg_Color_Method;
364
+ (function (Dwg_Color_Method) {
365
+ Dwg_Color_Method[Dwg_Color_Method["ByLayer"] = 192] = "ByLayer";
366
+ Dwg_Color_Method[Dwg_Color_Method["ByBlock"] = 193] = "ByBlock";
367
+ Dwg_Color_Method[Dwg_Color_Method["Entities"] = 194] = "Entities";
368
+ Dwg_Color_Method[Dwg_Color_Method["TrueColor"] = 195] = "TrueColor";
369
+ Dwg_Color_Method[Dwg_Color_Method["ForegroundColor"] = 197] = "ForegroundColor";
370
+ Dwg_Color_Method[Dwg_Color_Method["None"] = 200] = "None";
371
+ })(Dwg_Color_Method || (Dwg_Color_Method = {}));
363
372
  //# sourceMappingURL=enums.js.map
@@ -0,0 +1,5 @@
1
+ export interface DwgCommonObject {
2
+ ownerHandle: number;
3
+ handle: number;
4
+ }
5
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1,10 @@
1
+ import { DwgPoint2D } from '../common';
2
+ import { DwgCommonObject } from './common';
3
+ export interface DwgImageDefObject extends DwgCommonObject {
4
+ fileName: string;
5
+ size: DwgPoint2D;
6
+ sizeOfOnePixel: DwgPoint2D;
7
+ isLoaded: number;
8
+ resolutionUnits: number;
9
+ }
10
+ //# sourceMappingURL=imageDef.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=imageDef.js.map
@@ -0,0 +1,5 @@
1
+ export * from './common';
2
+ export * from './imageDef';
3
+ export * from './layout';
4
+ export * from './plotSetting';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ export * from './common';
2
+ export * from './imageDef';
3
+ export * from './layout';
4
+ export * from './plotSetting';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,23 @@
1
+ import { DwgPoint2D, DwgPoint3D } from '../common';
2
+ import { DwgCommonObject } from './common';
3
+ export interface DwgLayoutObject extends DwgCommonObject {
4
+ layoutName: string;
5
+ controlFlag: number;
6
+ tabOrder: number;
7
+ minLimit: DwgPoint2D;
8
+ maxLimit: DwgPoint2D;
9
+ insertionPoint: DwgPoint3D;
10
+ minExtent: DwgPoint3D;
11
+ maxExtent: DwgPoint3D;
12
+ elevation: number;
13
+ ucsOrigin: DwgPoint3D;
14
+ ucsXAxis: DwgPoint3D;
15
+ ucsYAxis: DwgPoint3D;
16
+ orthographicType: number;
17
+ paperSpaceTableId: string;
18
+ viewportId: string;
19
+ namedUcsId?: string;
20
+ orthographicUcsId?: string;
21
+ shadePlotId: string;
22
+ }
23
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1,35 @@
1
+ import { DwgCommonObject } from './common';
2
+ export interface DwgPlotSettingObject extends DwgCommonObject {
3
+ pageSetupName: string;
4
+ configName: string;
5
+ paperSize: string;
6
+ plotViewName: string;
7
+ marginLeft: number;
8
+ marginBottom: number;
9
+ marginRight: number;
10
+ marginTop: number;
11
+ paperWidth: number;
12
+ paperHeight: number;
13
+ plotOriginX: number;
14
+ plotOriginY: number;
15
+ windowAreaXMin: number;
16
+ windowAreaYMin: number;
17
+ windowAreaXMax: number;
18
+ windowAreaYMax: number;
19
+ printScaleNominator: number;
20
+ printScaleDenominator: number;
21
+ layoutFlag: number;
22
+ plotPaperUnit: number;
23
+ plotRotation: 0 | 1 | 2 | 3;
24
+ plotType: number;
25
+ currentStyleSheet: string;
26
+ standardScaleType: number;
27
+ shadePlotMode: number;
28
+ shadePlotResolution: number;
29
+ shadePlotCustomDPI?: number;
30
+ scaleFactor: number;
31
+ imageOriginX: number;
32
+ imageOriginY: number;
33
+ shadePlotId: string;
34
+ }
35
+ //# sourceMappingURL=plotSetting.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plotSetting.js.map
@@ -0,0 +1,10 @@
1
+ import { DwgPoint3D } from '../common';
2
+ export interface DwgXData {
3
+ appName: string;
4
+ value: DwgXDataEntry[];
5
+ }
6
+ export interface DwgXDataEntry {
7
+ name?: string;
8
+ value: DwgXDataEntry[] | number | string | DwgPoint3D;
9
+ }
10
+ //# sourceMappingURL=xdata.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=xdata.js.map
@@ -0,0 +1,12 @@
1
+ import { DwgEntity } from '../entities';
2
+ import { DwgCommonTableEntry } from './table';
3
+ export interface DwgBlockRecordTableEntry extends DwgCommonTableEntry {
4
+ name: string;
5
+ layout: number;
6
+ insertionUnits: number;
7
+ explodability: number;
8
+ scalability: number;
9
+ bmpPreview?: string;
10
+ entities: DwgEntity[];
11
+ }
12
+ //# sourceMappingURL=blockRecord.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=blockRecord.js.map
@@ -0,0 +1,84 @@
1
+ import { DwgCommonTableEntry } from './table';
2
+ export interface DwgDimStyleTableEntry extends DwgCommonTableEntry {
3
+ DIMPOST?: string;
4
+ DIMAPOST?: string;
5
+ DIMBLK: string;
6
+ DIMBLK1: string;
7
+ DIMBLK2: string;
8
+ DIMSCALE: number;
9
+ DIMASZ: number;
10
+ DIMEXO: number;
11
+ DIMDLI: number;
12
+ DIMEXE: number;
13
+ DIMRND: number;
14
+ DIMDLE: number;
15
+ DIMTP: number;
16
+ DIMTM: number;
17
+ DIMTXT: number;
18
+ DIMCEN: number;
19
+ DIMTSZ: number;
20
+ DIMALTF: number;
21
+ DIMLFAC: number;
22
+ DIMTVP: number;
23
+ DIMTFAC: number;
24
+ DIMGAP: number;
25
+ DIMALTRND: number;
26
+ DIMTOL: number;
27
+ DIMLIM: number;
28
+ DIMTIH: number;
29
+ DIMTOH: number;
30
+ DIMSE1: 0 | 1;
31
+ DIMSE2: 0 | 1;
32
+ DIMTAD: number;
33
+ DIMZIN: number;
34
+ DIMAZIN: number;
35
+ DIMALT: 0 | 1;
36
+ DIMALTD: number;
37
+ DIMTOFL: 0 | 1;
38
+ DIMSAH: 0 | 1;
39
+ DIMTIX: 0 | 1;
40
+ DIMSOXD: 0 | 1;
41
+ DIMCLRD: number;
42
+ DIMCLRE: number;
43
+ DIMCLRT: number;
44
+ DIMADEC?: number;
45
+ DIMUNIT?: number;
46
+ DIMDEC: number;
47
+ DIMTDEC: number;
48
+ DIMALTU: number;
49
+ DIMALTTD: number;
50
+ DIMAUNIT: number;
51
+ DIMFRAC: number;
52
+ DIMLUNIT: number;
53
+ DIMDSEP: string;
54
+ DIMTMOVE: number;
55
+ DIMJUST: number;
56
+ DIMSD1: 0 | 1;
57
+ DIMSD2: 0 | 1;
58
+ DIMTOLJ: number;
59
+ DIMTZIN: number;
60
+ DIMALTZ: number;
61
+ DIMALTTZ: number;
62
+ DIMFIT?: number;
63
+ DIMUPT: number;
64
+ DIMATFIT: number;
65
+ DIMTXSTY?: number;
66
+ DIMLDRBLK?: number;
67
+ DIMLWD: number;
68
+ DIMLWE: number;
69
+ DIMFXL: number;
70
+ DIMJOGANG: number;
71
+ DIMTFILL: number;
72
+ DIMTFILLCLR: number;
73
+ DIMARCSYM: number;
74
+ DIMCLRD_N: number;
75
+ DIMCLRE_N: number;
76
+ DIMCLRT_N: number;
77
+ DIMFXLON: number;
78
+ DIMTXTDIRECTION: number;
79
+ DIMALTMZF: number;
80
+ DIMALTMZS: string;
81
+ DIMMZF: number;
82
+ DIMMZS: string;
83
+ }
84
+ //# sourceMappingURL=dimStyle.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dimStyle.js.map
@@ -0,0 +1,8 @@
1
+ export * from './blockRecord';
2
+ export * from './dimStyle';
3
+ export * from './layer';
4
+ export * from './ltype';
5
+ export * from './style';
6
+ export * from './table';
7
+ export * from './vport';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ export * from './blockRecord';
2
+ export * from './dimStyle';
3
+ export * from './layer';
4
+ export * from './ltype';
5
+ export * from './style';
6
+ export * from './table';
7
+ export * from './vport';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,16 @@
1
+ import { DwgCommonTableEntry } from './table';
2
+ export interface DwgLayerTableEntry extends DwgCommonTableEntry {
3
+ name: string;
4
+ standardFlag: number;
5
+ colorIndex: number;
6
+ lineType: string;
7
+ frozen: boolean;
8
+ off: boolean;
9
+ frozenInNew: boolean;
10
+ locked: boolean;
11
+ plotFlag: number;
12
+ lineweight: number;
13
+ plotStyleNameObjectId?: string;
14
+ materialObjectId?: string;
15
+ }
16
+ //# sourceMappingURL=layer.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=layer.js.map
@@ -0,0 +1,21 @@
1
+ import { DwgCommonTableEntry } from './table';
2
+ export interface DwgLTypeTableEntry extends DwgCommonTableEntry {
3
+ name: string;
4
+ standardFlag: number;
5
+ description: string;
6
+ numberOfLineTypes: number;
7
+ totalPatternLength: number;
8
+ pattern?: DwgLineTypeElement[];
9
+ }
10
+ export interface DwgLineTypeElement {
11
+ elementLength: number;
12
+ elementTypeFlag: number;
13
+ shapeNumber?: number;
14
+ styleObjectId?: string;
15
+ scale?: number;
16
+ rotation?: number;
17
+ offsetX?: number;
18
+ offsetY?: number;
19
+ text?: string;
20
+ }
21
+ //# sourceMappingURL=ltype.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ltype.js.map
@@ -0,0 +1,13 @@
1
+ import { DwgCommonTableEntry } from './table';
2
+ export interface DwgStyleTableEntry extends DwgCommonTableEntry {
3
+ standardFlag: number;
4
+ fixedTextHeight: number;
5
+ widthFactor: number;
6
+ obliqueAngle: number;
7
+ textGenerationFlag: number;
8
+ lastHeight: number;
9
+ font: string;
10
+ bigFont: string;
11
+ extendedFont?: string;
12
+ }
13
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1,9 @@
1
+ export interface DwgCommonTableEntry {
2
+ name: string;
3
+ handle: number;
4
+ ownerHandle: number;
5
+ }
6
+ export interface DwgTable<T extends DwgCommonTableEntry> {
7
+ entries: T[];
8
+ }
9
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1,42 @@
1
+ import { DwgPoint2D, DwgPoint3D } from '../common';
2
+ import { DwgCommonTableEntry } from './table';
3
+ export interface DwgVPortTableEntry extends DwgCommonTableEntry {
4
+ name: string;
5
+ standardFlag: number;
6
+ lowerLeftCorner: DwgPoint2D;
7
+ upperRightCorner: DwgPoint2D;
8
+ center: DwgPoint2D;
9
+ snapBasePoint: DwgPoint2D;
10
+ snapSpacing: DwgPoint2D;
11
+ gridSpacing: DwgPoint2D;
12
+ viewDirectionFromTarget: DwgPoint3D;
13
+ viewTarget: DwgPoint3D;
14
+ lensLength: number;
15
+ frontClippingPlane: number;
16
+ backClippingPlane: number;
17
+ viewHeight: number;
18
+ snapRotationAngle: number;
19
+ viewTwistAngle: number;
20
+ circleSides: number;
21
+ frozenLayers: string[];
22
+ styleSheet: string;
23
+ renderMode: number;
24
+ viewMode: number;
25
+ ucsIconSetting: number;
26
+ ucsOrigin: DwgPoint3D;
27
+ ucsXAxis: DwgPoint3D;
28
+ ucsYAxis: DwgPoint3D;
29
+ orthographicType: number;
30
+ elevation: number;
31
+ shadePlotSetting: number;
32
+ majorGridLines: number;
33
+ backgroundObjectId?: string;
34
+ shadePlotObjectId?: string;
35
+ visualStyleObjectId?: string;
36
+ isDefaultLightingOn: boolean;
37
+ defaultLightingType: number;
38
+ brightness: number;
39
+ contrast: number;
40
+ ambientColor?: number;
41
+ }
42
+ //# sourceMappingURL=vport.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=vport.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A DWG/DXF JavaScript parser based on libredwg",
4
4
  "license": "GPL-2.0-only",
5
5
  "private": false,
6
- "version": "0.6.5",
6
+ "version": "0.6.7",
7
7
  "author": "MLight Lee <mlight.lee@outlook.com>",
8
8
  "type": "module",
9
9
  "repository": {
@@ -518,6 +518,7 @@ interface EmbindModule {
518
518
  dwg_entity_polyline_3d_get_points(_0: number): any;
519
519
  dwg_entity_polyline_3d_get_vertices(_0: number): any;
520
520
  dwg_entity_block_header_get_preview(_0: number): any;
521
+ dwg_entity_insert_get_attribs(_0: number): any;
521
522
  dwg_object_dictionary_get_texts(_0: number): any;
522
523
  dwg_read_file(_0: EmbindString): any;
523
524
  dwg_bmp(_0: number): any;
Binary file
@@ -1,3 +0,0 @@
1
- import { DwgCodePage } from "../database";
2
- export declare const decodeString: (array: Uint8Array, codepage: DwgCodePage) => string;
3
- //# sourceMappingURL=stringConverter.d.ts.map
@@ -1,7 +0,0 @@
1
- import { dwgCodePageToEncoding } from "../database";
2
- export const decodeString = (array, codepage) => {
3
- const encoding = dwgCodePageToEncoding(codepage);
4
- const decoder = new TextDecoder(encoding);
5
- return decoder.decode(array);
6
- };
7
- //# sourceMappingURL=stringConverter.js.map
@@ -1,7 +0,0 @@
1
- export interface DwgUnknownEntity {
2
- /**
3
- * Entity type
4
- */
5
- type: 'UNKNOWN_ENTITY';
6
- }
7
- //# sourceMappingURL=unknown.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=unknown.js.map
@@ -1,7 +0,0 @@
1
- export interface DwgUnknownObject {
2
- /**
3
- * Object type
4
- */
5
- type: 'UNKNOWN_OBJECT';
6
- }
7
- //# sourceMappingURL=unknown.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=unknown.js.map
@@ -1,4 +0,0 @@
1
- export declare const isModelSpace: (name: string) => boolean | "";
2
- export declare const isPaperSpace: (name: string) => boolean | "";
3
- export declare const idToString: (id: number | bigint) => string;
4
- //# sourceMappingURL=common.d.ts.map
@@ -1,12 +0,0 @@
1
- const MODEL_SPACE = '*MODEL_SPACE';
2
- const MODEL_SPACE_PREFIX = '*PAPER_SPACE';
3
- export const isModelSpace = (name) => {
4
- return name && name.toUpperCase() == MODEL_SPACE;
5
- };
6
- export const isPaperSpace = (name) => {
7
- return name && name.toUpperCase().startsWith(MODEL_SPACE_PREFIX);
8
- };
9
- export const idToString = (id) => {
10
- return id.toString(16).toUpperCase();
11
- };
12
- //# sourceMappingURL=common.js.map
@@ -1,2 +0,0 @@
1
- export * from './common';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +0,0 @@
1
- export * from './common';
2
- //# sourceMappingURL=index.js.map