@mlightcad/libredwg-web 0.7.2 → 0.7.4
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/dist/libredwg-web.js +181 -4130
- package/dist/libredwg-web.umd.cjs +181 -4133
- package/lib/converter/converter.d.ts +1 -0
- package/lib/converter/converter.js +21 -6
- package/lib/converter/entityConverter.d.ts +5 -2
- package/lib/converter/entityConverter.js +77 -8
- package/lib/converter/utils.d.ts +1 -0
- package/lib/converter/utils.js +7 -0
- package/lib/database/entities/proxy.d.ts +38 -1
- package/lib/database/entities/proxy.js +9 -1
- package/lib/libredwg.d.ts +13 -1
- package/lib/libredwg.js +46 -3
- package/lib/types/common.d.ts +1 -0
- package/lib/types/enums.d.ts +17 -0
- package/lib/types/enums.js +18 -0
- package/package.json +24 -17
- package/wasm/libredwg-web.d.ts +32 -22
- package/wasm/libredwg-web.js +2 -15
- package/wasm/libredwg-web.wasm +0 -0
- package/lib/enums.d.ts +0 -340
- package/lib/enums.js +0 -351
- package/lib/libredwg-web.d.ts +0 -3
- package/lib/libredwg-web.js +0 -2360
- package/lib/svg/ToSVG.d.ts +0 -16
- package/lib/svg/ToSVG.js +0 -235
- package/lib/svg/util/boundingBox.d.ts +0 -9
- package/lib/svg/util/boundingBox.js +0 -19
- package/lib/svg/util/box2d.d.ts +0 -9
- package/lib/svg/util/box2d.js +0 -19
- package/lib/svg/util/denormalise.d.ts +0 -19
- package/lib/svg/util/denormalise.js +0 -24
- package/lib/svg/util/entityToPolyline.d.ts +0 -2
- package/lib/svg/util/entityToPolyline.js +0 -5
- package/lib/svg/util/getRGBForEntity.d.ts +0 -3
- package/lib/svg/util/getRGBForEntity.js +0 -9
- package/lib/svg/util/rgbToColorAttribute.d.ts +0 -6
- package/lib/svg/util/rgbToColorAttribute.js +0 -4
- package/lib/svg/util/rotate.d.ts +0 -6
- package/lib/svg/util/rotate.js +0 -9
- package/lib/svg/util/toPiecewiseBezier.d.ts +0 -9
- package/lib/svg/util/toPiecewiseBezier.js +0 -24
- package/lib/svg/util/transformBoundingBoxAndElement.d.ts +0 -19
- package/lib/svg/util/transformBoundingBoxAndElement.js +0 -20
- package/lib/types/database.d.ts +0 -17
- package/lib/types/database.js +0 -2
- package/lib/types/entities/arc.d.ts +0 -12
- package/lib/types/entities/arc.js +0 -2
- package/lib/types/entities/circle.d.ts +0 -10
- package/lib/types/entities/circle.js +0 -2
- package/lib/types/entities/dimension.d.ts +0 -108
- package/lib/types/entities/dimension.js +0 -2
- package/lib/types/entities/ellipse.d.ts +0 -12
- package/lib/types/entities/ellipse.js +0 -2
- package/lib/types/entities/entity.d.ts +0 -25
- package/lib/types/entities/entity.js +0 -2
- package/lib/types/entities/hatch.d.ts +0 -142
- package/lib/types/entities/hatch.js +0 -2
- package/lib/types/entities/image.d.ts +0 -36
- package/lib/types/entities/image.js +0 -2
- package/lib/types/entities/index.d.ts +0 -24
- package/lib/types/entities/index.js +0 -24
- package/lib/types/entities/insert.d.ts +0 -18
- package/lib/types/entities/insert.js +0 -2
- package/lib/types/entities/leader.d.ts +0 -28
- package/lib/types/entities/leader.js +0 -2
- package/lib/types/entities/line.d.ts +0 -10
- package/lib/types/entities/line.js +0 -2
- package/lib/types/entities/lwpolyline.d.ts +0 -19
- package/lib/types/entities/lwpolyline.js +0 -2
- package/lib/types/entities/mtext.d.ts +0 -37
- package/lib/types/entities/mtext.js +0 -2
- package/lib/types/entities/point.d.ts +0 -10
- package/lib/types/entities/point.js +0 -2
- package/lib/types/entities/polyline.d.ts +0 -34
- package/lib/types/entities/polyline.js +0 -2
- package/lib/types/entities/ray.d.ts +0 -8
- package/lib/types/entities/ray.js +0 -2
- package/lib/types/entities/section.d.ts +0 -19
- package/lib/types/entities/section.js +0 -2
- package/lib/types/entities/solid.d.ts +0 -9
- package/lib/types/entities/solid.js +0 -2
- package/lib/types/entities/spline.d.ts +0 -21
- package/lib/types/entities/spline.js +0 -2
- package/lib/types/entities/table.d.ts +0 -52
- package/lib/types/entities/table.js +0 -2
- package/lib/types/entities/text.d.ts +0 -38
- package/lib/types/entities/text.js +0 -2
- package/lib/types/entities/vertex.d.ts +0 -25
- package/lib/types/entities/vertex.js +0 -2
- package/lib/types/entities/viewport.d.ts +0 -105
- package/lib/types/entities/viewport.js +0 -2
- package/lib/types/entities/xline.d.ts +0 -8
- package/lib/types/entities/xline.js +0 -2
- package/lib/types/objects/common.d.ts +0 -5
- package/lib/types/objects/common.js +0 -2
- package/lib/types/objects/imageDef.d.ts +0 -10
- package/lib/types/objects/imageDef.js +0 -2
- package/lib/types/objects/index.d.ts +0 -5
- package/lib/types/objects/index.js +0 -5
- package/lib/types/objects/layout.d.ts +0 -23
- package/lib/types/objects/layout.js +0 -2
- package/lib/types/objects/plotSetting.d.ts +0 -35
- package/lib/types/objects/plotSetting.js +0 -2
- package/lib/types/shared/xdata.d.ts +0 -10
- package/lib/types/shared/xdata.js +0 -2
- package/lib/types/tables/blockRecord.d.ts +0 -12
- package/lib/types/tables/blockRecord.js +0 -2
- package/lib/types/tables/dimStyle.d.ts +0 -84
- package/lib/types/tables/dimStyle.js +0 -2
- package/lib/types/tables/index.d.ts +0 -8
- package/lib/types/tables/index.js +0 -8
- package/lib/types/tables/layer.d.ts +0 -16
- package/lib/types/tables/layer.js +0 -2
- package/lib/types/tables/ltype.d.ts +0 -21
- package/lib/types/tables/ltype.js +0 -2
- package/lib/types/tables/style.d.ts +0 -13
- package/lib/types/tables/style.js +0 -2
- package/lib/types/tables/table.d.ts +0 -9
- package/lib/types/tables/table.js +0 -2
- package/lib/types/tables/vport.d.ts +0 -42
- package/lib/types/tables/vport.js +0 -2
package/wasm/libredwg-web.d.ts
CHANGED
|
@@ -10,10 +10,9 @@ declare namespace RuntimeExports {
|
|
|
10
10
|
export let currentPath: string;
|
|
11
11
|
export let initialized: boolean;
|
|
12
12
|
export let ignorePermissions: boolean;
|
|
13
|
-
export { ErrnoError };
|
|
14
13
|
export let filesystems: any;
|
|
15
14
|
export let syncFSRequests: number;
|
|
16
|
-
export
|
|
15
|
+
export { ErrnoError };
|
|
17
16
|
export { FSStream };
|
|
18
17
|
export { FSNode };
|
|
19
18
|
export function lookupPath(path: any, opts?: {}): {
|
|
@@ -114,11 +113,10 @@ declare namespace RuntimeExports {
|
|
|
114
113
|
export function llseek(stream: any, offset: any, whence: any): any;
|
|
115
114
|
export function read(stream: any, buffer: any, offset: any, length: any, position: any): any;
|
|
116
115
|
export function write(stream: any, buffer: any, offset: any, length: any, position: any, canOwn: any): any;
|
|
117
|
-
export function allocate(stream: any, offset: any, length: any): void;
|
|
118
116
|
export function mmap(stream: any, length: any, position: any, prot: any, flags: any): any;
|
|
119
117
|
export function msync(stream: any, buffer: any, offset: any, length: any, mmapFlags: any): any;
|
|
120
118
|
export function ioctl(stream: any, cmd: any, arg: any): any;
|
|
121
|
-
export function readFile(path: any, opts?: {}): any
|
|
119
|
+
export function readFile(path: any, opts?: {}): Uint8Array<any>;
|
|
122
120
|
export function writeFile(path: any, data: any, opts?: {}): void;
|
|
123
121
|
export function cwd(): any;
|
|
124
122
|
export function chdir(path: any): void;
|
|
@@ -152,10 +150,10 @@ declare namespace RuntimeExports {
|
|
|
152
150
|
/**
|
|
153
151
|
* @param {string|null=} returnType
|
|
154
152
|
* @param {Array=} argTypes
|
|
155
|
-
* @param {
|
|
153
|
+
* @param {Array=} args
|
|
156
154
|
* @param {Object=} opts
|
|
157
155
|
*/
|
|
158
|
-
function ccall(ident: any, returnType?: (string | null) | undefined, argTypes?: any[] | undefined, args?:
|
|
156
|
+
function ccall(ident: any, returnType?: (string | null) | undefined, argTypes?: any[] | undefined, args?: any[] | undefined, opts?: any | undefined): any;
|
|
159
157
|
/**
|
|
160
158
|
* @param {string=} returnType
|
|
161
159
|
* @param {Array=} argTypes
|
|
@@ -171,13 +169,11 @@ declare namespace RuntimeExports {
|
|
|
171
169
|
* maximum number of bytes to read. You can omit this parameter to scan the
|
|
172
170
|
* string until the first 0 byte. If maxBytesToRead is passed, and the string
|
|
173
171
|
* at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
|
|
174
|
-
* string will cut short at that byte index
|
|
175
|
-
*
|
|
176
|
-
* frequent uses of UTF8ToString() with and without maxBytesToRead may throw
|
|
177
|
-
* JS JIT optimizations off, so it is worth to consider consistently using one
|
|
172
|
+
* string will cut short at that byte index.
|
|
173
|
+
* @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.
|
|
178
174
|
* @return {string}
|
|
179
175
|
*/
|
|
180
|
-
function UTF8ToString(ptr: number, maxBytesToRead?: number | undefined): string;
|
|
176
|
+
function UTF8ToString(ptr: number, maxBytesToRead?: number | undefined, ignoreNul?: boolean | undefined): string;
|
|
181
177
|
function stringToNewUTF8(str: any): any;
|
|
182
178
|
/**
|
|
183
179
|
* @param {number} ptr
|
|
@@ -185,17 +181,6 @@ declare namespace RuntimeExports {
|
|
|
185
181
|
* @param {string} type
|
|
186
182
|
*/
|
|
187
183
|
function setValue(ptr: number, value: number, type?: string): void;
|
|
188
|
-
let HEAPF32: any;
|
|
189
|
-
let HEAPF64: any;
|
|
190
|
-
let HEAP_DATA_VIEW: any;
|
|
191
|
-
let HEAP8: any;
|
|
192
|
-
let HEAPU8: any;
|
|
193
|
-
let HEAP16: any;
|
|
194
|
-
let HEAPU16: any;
|
|
195
|
-
let HEAP32: any;
|
|
196
|
-
let HEAPU32: any;
|
|
197
|
-
let HEAP64: any;
|
|
198
|
-
let HEAPU64: any;
|
|
199
184
|
}
|
|
200
185
|
declare class ErrnoError {
|
|
201
186
|
constructor(errno: any);
|
|
@@ -239,6 +224,26 @@ declare class FSNode {
|
|
|
239
224
|
get isDevice(): any;
|
|
240
225
|
}
|
|
241
226
|
interface WasmModule {
|
|
227
|
+
__Znwm(_0: number): number;
|
|
228
|
+
__ZdlPvm(_0: number, _1: number): void;
|
|
229
|
+
_strndup(_0: number, _1: number): number;
|
|
230
|
+
__ZdaPv(_0: number): void;
|
|
231
|
+
__ZdaPvm(_0: number, _1: number): void;
|
|
232
|
+
__ZdlPv(_0: number): void;
|
|
233
|
+
_emscripten_builtin_malloc(_0: number): number;
|
|
234
|
+
__Znam(_0: number): number;
|
|
235
|
+
__ZnamSt11align_val_t(_0: number, _1: number): number;
|
|
236
|
+
__ZnwmSt11align_val_t(_0: number, _1: number): number;
|
|
237
|
+
___libc_calloc(_0: number, _1: number): number;
|
|
238
|
+
___libc_free(_0: number): void;
|
|
239
|
+
___libc_malloc(_0: number): number;
|
|
240
|
+
___libc_realloc(_0: number, _1: number): number;
|
|
241
|
+
_emscripten_builtin_calloc(_0: number, _1: number): number;
|
|
242
|
+
_emscripten_builtin_free(_0: number): void;
|
|
243
|
+
_emscripten_builtin_realloc(_0: number, _1: number): number;
|
|
244
|
+
_malloc_size(_0: number): number;
|
|
245
|
+
_malloc_usable_size(_0: number): number;
|
|
246
|
+
_reallocf(_0: number, _1: number): number;
|
|
242
247
|
}
|
|
243
248
|
|
|
244
249
|
type EmbindString = ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string;
|
|
@@ -247,6 +252,8 @@ export interface ClassHandle {
|
|
|
247
252
|
delete(): void;
|
|
248
253
|
deleteLater(): this;
|
|
249
254
|
isDeleted(): boolean;
|
|
255
|
+
// @ts-ignore - If targeting lower than ESNext, this symbol might not exist.
|
|
256
|
+
[Symbol.dispose](): void;
|
|
250
257
|
clone(): this;
|
|
251
258
|
}
|
|
252
259
|
export interface Dwg_Version_TypeValue<T extends number> {
|
|
@@ -402,6 +409,7 @@ interface EmbindModule {
|
|
|
402
409
|
dwg_get_next_object(_0: number, _1: Dwg_Object_Type, _2: number): number;
|
|
403
410
|
dwg_resolve_jump(_0: number): number;
|
|
404
411
|
dwg_free(_0: number): void;
|
|
412
|
+
dwg_abandon(_0: number): void;
|
|
405
413
|
dwg_free_object(_0: number): void;
|
|
406
414
|
dwg_new_ref(_0: number): number;
|
|
407
415
|
dwg_dup_handleref(_0: number, _1: number): number;
|
|
@@ -520,6 +528,8 @@ interface EmbindModule {
|
|
|
520
528
|
dwg_entity_polyline_3d_get_points(_0: number): any;
|
|
521
529
|
dwg_entity_polyline_3d_get_vertices(_0: number): any;
|
|
522
530
|
dwg_entity_block_header_get_preview(_0: number): any;
|
|
531
|
+
dwg_entity_get_preview(_0: number): any;
|
|
532
|
+
dwg_entity_proxy_entity_get_entity_data(_0: number): any;
|
|
523
533
|
dwg_entity_insert_get_attribs(_0: number): any;
|
|
524
534
|
dwg_object_dictionary_get_texts(_0: number): any;
|
|
525
535
|
dwg_read_file(_0: EmbindString): any;
|