lineadraw 0.6.0 → 0.7.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/README.md +16 -13
- package/bin/lineadraw.mjs +276 -277
- package/dist/chunk-NCNZ7A6M.js +7957 -0
- package/dist/chunk-NCNZ7A6M.js.map +1 -0
- package/dist/exportDxf-2HC6UIBS.js +8 -0
- package/dist/exportDxf-2HC6UIBS.js.map +1 -0
- package/dist/{node-OWPSMNLK.js → node-2RH2EKXG.js} +1 -1
- package/dist/node-2RH2EKXG.js.map +1 -0
- package/dist/sdk.d.ts +792 -683
- package/dist/sdk.js +772 -8363
- package/dist/sdk.js.map +1 -1
- package/lineadraw.d.ts +181 -27
- package/package.json +2 -2
- package/templates/README.md +18 -18
- package/dist/node-OWPSMNLK.js.map +0 -1
package/lineadraw.d.ts
CHANGED
|
@@ -772,7 +772,12 @@ declare module "lineadraw" {
|
|
|
772
772
|
width: number;
|
|
773
773
|
height: number;
|
|
774
774
|
};
|
|
775
|
-
/**
|
|
775
|
+
/** What an import added (`objectIds` = the new objects). */
|
|
776
|
+
export interface ImportReport {
|
|
777
|
+
objects: number;
|
|
778
|
+
objectIds: string[];
|
|
779
|
+
}
|
|
780
|
+
/** Options for Drawing.addLayout. */
|
|
776
781
|
export type LayoutSpec = {
|
|
777
782
|
/** Default: A3 landscape. */
|
|
778
783
|
sheet?: SheetSpec;
|
|
@@ -841,7 +846,7 @@ declare module "lineadraw" {
|
|
|
841
846
|
}[];
|
|
842
847
|
};
|
|
843
848
|
/** Filtered objects — model space, or one layout via `filter.layout`. */
|
|
844
|
-
|
|
849
|
+
listObjects(filter?: ObjectQuery): ExistingObject[];
|
|
845
850
|
/** One object from ANY space, or undefined. */
|
|
846
851
|
getObject(id: string): ExistingObject | undefined;
|
|
847
852
|
/** bbox / curve length / enclosed area of one object. */
|
|
@@ -849,9 +854,9 @@ declare module "lineadraw" {
|
|
|
849
854
|
listLayers(): LayerInfo[];
|
|
850
855
|
listLayouts(): LayoutInfo[];
|
|
851
856
|
/** Compilable block definitions in this document. */
|
|
852
|
-
|
|
857
|
+
listBlockDefinitions(): BlockInfo[];
|
|
853
858
|
/** Compilable command modules travelling with this document. */
|
|
854
|
-
|
|
859
|
+
listUserCommands(): CommandInfo[];
|
|
855
860
|
/** Model space (or a layout via `layout`) as an SVG string. */
|
|
856
861
|
renderSvg(opts?: {
|
|
857
862
|
layout?: string;
|
|
@@ -859,6 +864,18 @@ declare module "lineadraw" {
|
|
|
859
864
|
padding?: number;
|
|
860
865
|
palette?: "color" | "grayscale" | "monochrome";
|
|
861
866
|
}): string;
|
|
867
|
+
/** Model space (or a layout) as PNG bytes — absent on hosts that can't
|
|
868
|
+
* rasterize, so check before calling. */
|
|
869
|
+
renderPng?(opts?: {
|
|
870
|
+
layout?: string;
|
|
871
|
+
bbox?: Box;
|
|
872
|
+
padding?: number;
|
|
873
|
+
palette?: "color" | "grayscale" | "monochrome";
|
|
874
|
+
/** Output width in px (height follows). Default 1024. */
|
|
875
|
+
width?: number;
|
|
876
|
+
/** Background fill, e.g. "#ffffff". Default: the dark canvas. */
|
|
877
|
+
background?: string;
|
|
878
|
+
}): Promise<Uint8Array>;
|
|
862
879
|
/** Multi-page PDF of the layouts (default: all) — absent on hosts
|
|
863
880
|
* without fonts, so check before calling. */
|
|
864
881
|
renderPdf?(opts?: {
|
|
@@ -872,7 +889,7 @@ declare module "lineadraw" {
|
|
|
872
889
|
version?: string;
|
|
873
890
|
}): Promise<Uint8Array>;
|
|
874
891
|
/** The `.linea` file text. */
|
|
875
|
-
|
|
892
|
+
toLinea(): string;
|
|
876
893
|
/** Add objects (each may carry `layer` — a name — instead of an id);
|
|
877
894
|
* returns the created ids. */
|
|
878
895
|
add(objects: readonly (ModelObject & {
|
|
@@ -897,7 +914,7 @@ declare module "lineadraw" {
|
|
|
897
914
|
/** count TOTAL copies at multiples of delta; returns the new ids. */
|
|
898
915
|
array(ids: readonly string[], count: number, delta: Vec2Like): string[];
|
|
899
916
|
/** Create a paper layout; returns its id. */
|
|
900
|
-
|
|
917
|
+
addLayout(name: string, opts?: LayoutSpec): string;
|
|
901
918
|
/** Patch a layout's name / sheet / print palette. A bare preset keeps the
|
|
902
919
|
* layout's current orientation. */
|
|
903
920
|
updateLayout(nameOrId: string, patch: {
|
|
@@ -919,20 +936,73 @@ declare module "lineadraw" {
|
|
|
919
936
|
/** Explicit total order (names or ids, every layer exactly once). */
|
|
920
937
|
reorderLayers(order: readonly string[]): void;
|
|
921
938
|
setCurrentLayer(nameOrId: string): void;
|
|
922
|
-
|
|
939
|
+
listTextStyles(): ({
|
|
940
|
+
id: string;
|
|
941
|
+
name: string;
|
|
942
|
+
} & Record<string, unknown>)[];
|
|
943
|
+
listDimStyles(): ({
|
|
944
|
+
id: string;
|
|
945
|
+
name: string;
|
|
946
|
+
} & Record<string, unknown>)[];
|
|
947
|
+
/** Create a style (unique name; unset fields take the defaults); returns
|
|
948
|
+
* its id. Styles are addressed by name or id. */
|
|
949
|
+
addTextStyle(props: {
|
|
950
|
+
name: string;
|
|
951
|
+
} & Record<string, unknown>): string;
|
|
952
|
+
updateTextStyle(nameOrId: string, patch: Record<string, unknown>): void;
|
|
953
|
+
/** Remove a style no object uses (refused otherwise). */
|
|
954
|
+
removeTextStyle(nameOrId: string): void;
|
|
955
|
+
addDimStyle(props: {
|
|
956
|
+
name: string;
|
|
957
|
+
} & Record<string, unknown>): string;
|
|
958
|
+
updateDimStyle(nameOrId: string, patch: Record<string, unknown>): void;
|
|
959
|
+
removeDimStyle(nameOrId: string): void;
|
|
960
|
+
/** @deprecated Use updateDimStyle (default here: the first style). */
|
|
923
961
|
setDimStyle(patch: Record<string, unknown>, styleId?: string): void;
|
|
924
|
-
/**
|
|
962
|
+
/** @deprecated Use updateTextStyle (default here: the first style). */
|
|
925
963
|
setTextStyle(patch: Record<string, unknown>, styleId?: string): void;
|
|
926
964
|
/** Embed image pixels (a data URL); returns the content-keyed assetId
|
|
927
965
|
* that `image` objects reference. */
|
|
928
966
|
addAsset(dataUrl: string): string;
|
|
929
967
|
/** Remove an asset (refused while an image references it). */
|
|
930
968
|
removeAsset(id: string): void;
|
|
969
|
+
/** Embedded image assets and how many images use each. */
|
|
970
|
+
listAssets(): {
|
|
971
|
+
id: string;
|
|
972
|
+
mimeType: string;
|
|
973
|
+
bytes: number;
|
|
974
|
+
users: number;
|
|
975
|
+
}[];
|
|
976
|
+
/** Merge DXF text (new layers, objects, layouts); `unitOverride` = mm
|
|
977
|
+
* per drawing unit. */
|
|
978
|
+
importDxfText(text: string, opts?: {
|
|
979
|
+
unitOverride?: number;
|
|
980
|
+
}): ImportReport & {
|
|
981
|
+
layers: number;
|
|
982
|
+
layouts: number;
|
|
983
|
+
layoutIds: string[];
|
|
984
|
+
};
|
|
985
|
+
/** Merge DWG bytes (transcoded to DXF). */
|
|
986
|
+
importDwgData(data: Uint8Array, opts?: {
|
|
987
|
+
unitOverride?: number;
|
|
988
|
+
}): Promise<ImportReport & {
|
|
989
|
+
layers: number;
|
|
990
|
+
layouts: number;
|
|
991
|
+
layoutIds: string[];
|
|
992
|
+
}>;
|
|
993
|
+
/** Merge a PDF: vectors/text onto the current layer, or (`as: "image"`,
|
|
994
|
+
* not available on every host) each page as an image at true scale. */
|
|
995
|
+
importPdfData(data: ArrayBuffer | Uint8Array, opts?: {
|
|
996
|
+
as?: "vectors" | "image";
|
|
997
|
+
origin?: Vec2Like;
|
|
998
|
+
}): Promise<ImportReport & {
|
|
999
|
+
pageCount: number;
|
|
1000
|
+
}>;
|
|
931
1001
|
/** Merge block module sources into the document library. */
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1002
|
+
addBlockDefinitions(sources: readonly string[]): Promise<MergeReport>;
|
|
1003
|
+
removeBlockDefinition(id: string): void;
|
|
1004
|
+
addUserCommands(sources: readonly string[]): Promise<MergeReport>;
|
|
1005
|
+
removeUserCommand(id: string): void;
|
|
936
1006
|
/** Escape hatch: apply an already-shaped kernel op batch (validated,
|
|
937
1007
|
* atomic, one undo step). */
|
|
938
1008
|
applyOps(ops: readonly Record<string, unknown>[]): void;
|
|
@@ -977,7 +1047,14 @@ declare module "lineadraw" {
|
|
|
977
1047
|
layout: string;
|
|
978
1048
|
}): void;
|
|
979
1049
|
setSelection(ids: readonly string[]): void;
|
|
980
|
-
|
|
1050
|
+
/** "fit" (everything in the active space), "selection", some objects'
|
|
1051
|
+
* extents (`{ ids }`), or a window (`{ bbox }`, world mm; sheet mm in a
|
|
1052
|
+
* layout). */
|
|
1053
|
+
zoom(to: "fit" | "selection" | {
|
|
1054
|
+
ids: readonly string[];
|
|
1055
|
+
} | {
|
|
1056
|
+
bbox: Box;
|
|
1057
|
+
}): void;
|
|
981
1058
|
/** Await one snapped world point; `referencePoint` enables rubber-band
|
|
982
1059
|
* + relative typed entry from there. */
|
|
983
1060
|
pickPoint(opts?: {
|
|
@@ -1282,7 +1359,7 @@ declare module "lineadraw" {
|
|
|
1282
1359
|
* inputs: ["Anchor"],
|
|
1283
1360
|
* params: [{ name: "start", label: "First number", type: "number", default: 1 }],
|
|
1284
1361
|
* run: ({ document, editor, inputs: [anchor], params: { start } }) => {
|
|
1285
|
-
* const texts = document.
|
|
1362
|
+
* const texts = document.listObjects({
|
|
1286
1363
|
* type: "text",
|
|
1287
1364
|
* near: { point: anchor, tol: 500 },
|
|
1288
1365
|
* });
|
|
@@ -2121,7 +2198,12 @@ type SheetSpec = "A4" | "A3" | "A2" | "A1" | "A0" | {
|
|
|
2121
2198
|
width: number;
|
|
2122
2199
|
height: number;
|
|
2123
2200
|
};
|
|
2124
|
-
/**
|
|
2201
|
+
/** What an import added (`objectIds` = the new objects). */
|
|
2202
|
+
interface ImportReport {
|
|
2203
|
+
objects: number;
|
|
2204
|
+
objectIds: string[];
|
|
2205
|
+
}
|
|
2206
|
+
/** Options for Drawing.addLayout. */
|
|
2125
2207
|
type LayoutSpec = {
|
|
2126
2208
|
/** Default: A3 landscape. */
|
|
2127
2209
|
sheet?: SheetSpec;
|
|
@@ -2190,7 +2272,7 @@ interface Drawing {
|
|
|
2190
2272
|
}[];
|
|
2191
2273
|
};
|
|
2192
2274
|
/** Filtered objects — model space, or one layout via `filter.layout`. */
|
|
2193
|
-
|
|
2275
|
+
listObjects(filter?: ObjectQuery): ExistingObject[];
|
|
2194
2276
|
/** One object from ANY space, or undefined. */
|
|
2195
2277
|
getObject(id: string): ExistingObject | undefined;
|
|
2196
2278
|
/** bbox / curve length / enclosed area of one object. */
|
|
@@ -2198,9 +2280,9 @@ interface Drawing {
|
|
|
2198
2280
|
listLayers(): LayerInfo[];
|
|
2199
2281
|
listLayouts(): LayoutInfo[];
|
|
2200
2282
|
/** Compilable block definitions in this document. */
|
|
2201
|
-
|
|
2283
|
+
listBlockDefinitions(): BlockInfo[];
|
|
2202
2284
|
/** Compilable command modules travelling with this document. */
|
|
2203
|
-
|
|
2285
|
+
listUserCommands(): CommandInfo[];
|
|
2204
2286
|
/** Model space (or a layout via `layout`) as an SVG string. */
|
|
2205
2287
|
renderSvg(opts?: {
|
|
2206
2288
|
layout?: string;
|
|
@@ -2208,6 +2290,18 @@ interface Drawing {
|
|
|
2208
2290
|
padding?: number;
|
|
2209
2291
|
palette?: "color" | "grayscale" | "monochrome";
|
|
2210
2292
|
}): string;
|
|
2293
|
+
/** Model space (or a layout) as PNG bytes — absent on hosts that can't
|
|
2294
|
+
* rasterize, so check before calling. */
|
|
2295
|
+
renderPng?(opts?: {
|
|
2296
|
+
layout?: string;
|
|
2297
|
+
bbox?: Box;
|
|
2298
|
+
padding?: number;
|
|
2299
|
+
palette?: "color" | "grayscale" | "monochrome";
|
|
2300
|
+
/** Output width in px (height follows). Default 1024. */
|
|
2301
|
+
width?: number;
|
|
2302
|
+
/** Background fill, e.g. "#ffffff". Default: the dark canvas. */
|
|
2303
|
+
background?: string;
|
|
2304
|
+
}): Promise<Uint8Array>;
|
|
2211
2305
|
/** Multi-page PDF of the layouts (default: all) — absent on hosts
|
|
2212
2306
|
* without fonts, so check before calling. */
|
|
2213
2307
|
renderPdf?(opts?: {
|
|
@@ -2221,7 +2315,7 @@ interface Drawing {
|
|
|
2221
2315
|
version?: string;
|
|
2222
2316
|
}): Promise<Uint8Array>;
|
|
2223
2317
|
/** The `.linea` file text. */
|
|
2224
|
-
|
|
2318
|
+
toLinea(): string;
|
|
2225
2319
|
/** Add objects (each may carry `layer` — a name — instead of an id);
|
|
2226
2320
|
* returns the created ids. */
|
|
2227
2321
|
add(objects: readonly (ModelObject & {
|
|
@@ -2246,7 +2340,7 @@ interface Drawing {
|
|
|
2246
2340
|
/** count TOTAL copies at multiples of delta; returns the new ids. */
|
|
2247
2341
|
array(ids: readonly string[], count: number, delta: Vec2Like): string[];
|
|
2248
2342
|
/** Create a paper layout; returns its id. */
|
|
2249
|
-
|
|
2343
|
+
addLayout(name: string, opts?: LayoutSpec): string;
|
|
2250
2344
|
/** Patch a layout's name / sheet / print palette. A bare preset keeps the
|
|
2251
2345
|
* layout's current orientation. */
|
|
2252
2346
|
updateLayout(nameOrId: string, patch: {
|
|
@@ -2268,20 +2362,73 @@ interface Drawing {
|
|
|
2268
2362
|
/** Explicit total order (names or ids, every layer exactly once). */
|
|
2269
2363
|
reorderLayers(order: readonly string[]): void;
|
|
2270
2364
|
setCurrentLayer(nameOrId: string): void;
|
|
2271
|
-
|
|
2365
|
+
listTextStyles(): ({
|
|
2366
|
+
id: string;
|
|
2367
|
+
name: string;
|
|
2368
|
+
} & Record<string, unknown>)[];
|
|
2369
|
+
listDimStyles(): ({
|
|
2370
|
+
id: string;
|
|
2371
|
+
name: string;
|
|
2372
|
+
} & Record<string, unknown>)[];
|
|
2373
|
+
/** Create a style (unique name; unset fields take the defaults); returns
|
|
2374
|
+
* its id. Styles are addressed by name or id. */
|
|
2375
|
+
addTextStyle(props: {
|
|
2376
|
+
name: string;
|
|
2377
|
+
} & Record<string, unknown>): string;
|
|
2378
|
+
updateTextStyle(nameOrId: string, patch: Record<string, unknown>): void;
|
|
2379
|
+
/** Remove a style no object uses (refused otherwise). */
|
|
2380
|
+
removeTextStyle(nameOrId: string): void;
|
|
2381
|
+
addDimStyle(props: {
|
|
2382
|
+
name: string;
|
|
2383
|
+
} & Record<string, unknown>): string;
|
|
2384
|
+
updateDimStyle(nameOrId: string, patch: Record<string, unknown>): void;
|
|
2385
|
+
removeDimStyle(nameOrId: string): void;
|
|
2386
|
+
/** @deprecated Use updateDimStyle (default here: the first style). */
|
|
2272
2387
|
setDimStyle(patch: Record<string, unknown>, styleId?: string): void;
|
|
2273
|
-
/**
|
|
2388
|
+
/** @deprecated Use updateTextStyle (default here: the first style). */
|
|
2274
2389
|
setTextStyle(patch: Record<string, unknown>, styleId?: string): void;
|
|
2275
2390
|
/** Embed image pixels (a data URL); returns the content-keyed assetId
|
|
2276
2391
|
* that `image` objects reference. */
|
|
2277
2392
|
addAsset(dataUrl: string): string;
|
|
2278
2393
|
/** Remove an asset (refused while an image references it). */
|
|
2279
2394
|
removeAsset(id: string): void;
|
|
2395
|
+
/** Embedded image assets and how many images use each. */
|
|
2396
|
+
listAssets(): {
|
|
2397
|
+
id: string;
|
|
2398
|
+
mimeType: string;
|
|
2399
|
+
bytes: number;
|
|
2400
|
+
users: number;
|
|
2401
|
+
}[];
|
|
2402
|
+
/** Merge DXF text (new layers, objects, layouts); `unitOverride` = mm
|
|
2403
|
+
* per drawing unit. */
|
|
2404
|
+
importDxfText(text: string, opts?: {
|
|
2405
|
+
unitOverride?: number;
|
|
2406
|
+
}): ImportReport & {
|
|
2407
|
+
layers: number;
|
|
2408
|
+
layouts: number;
|
|
2409
|
+
layoutIds: string[];
|
|
2410
|
+
};
|
|
2411
|
+
/** Merge DWG bytes (transcoded to DXF). */
|
|
2412
|
+
importDwgData(data: Uint8Array, opts?: {
|
|
2413
|
+
unitOverride?: number;
|
|
2414
|
+
}): Promise<ImportReport & {
|
|
2415
|
+
layers: number;
|
|
2416
|
+
layouts: number;
|
|
2417
|
+
layoutIds: string[];
|
|
2418
|
+
}>;
|
|
2419
|
+
/** Merge a PDF: vectors/text onto the current layer, or (`as: "image"`,
|
|
2420
|
+
* not available on every host) each page as an image at true scale. */
|
|
2421
|
+
importPdfData(data: ArrayBuffer | Uint8Array, opts?: {
|
|
2422
|
+
as?: "vectors" | "image";
|
|
2423
|
+
origin?: Vec2Like;
|
|
2424
|
+
}): Promise<ImportReport & {
|
|
2425
|
+
pageCount: number;
|
|
2426
|
+
}>;
|
|
2280
2427
|
/** Merge block module sources into the document library. */
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2428
|
+
addBlockDefinitions(sources: readonly string[]): Promise<MergeReport>;
|
|
2429
|
+
removeBlockDefinition(id: string): void;
|
|
2430
|
+
addUserCommands(sources: readonly string[]): Promise<MergeReport>;
|
|
2431
|
+
removeUserCommand(id: string): void;
|
|
2285
2432
|
/** Escape hatch: apply an already-shaped kernel op batch (validated,
|
|
2286
2433
|
* atomic, one undo step). */
|
|
2287
2434
|
applyOps(ops: readonly Record<string, unknown>[]): void;
|
|
@@ -2326,7 +2473,14 @@ interface EditorSurface {
|
|
|
2326
2473
|
layout: string;
|
|
2327
2474
|
}): void;
|
|
2328
2475
|
setSelection(ids: readonly string[]): void;
|
|
2329
|
-
|
|
2476
|
+
/** "fit" (everything in the active space), "selection", some objects'
|
|
2477
|
+
* extents (`{ ids }`), or a window (`{ bbox }`, world mm; sheet mm in a
|
|
2478
|
+
* layout). */
|
|
2479
|
+
zoom(to: "fit" | "selection" | {
|
|
2480
|
+
ids: readonly string[];
|
|
2481
|
+
} | {
|
|
2482
|
+
bbox: Box;
|
|
2483
|
+
}): void;
|
|
2330
2484
|
/** Await one snapped world point; `referencePoint` enables rubber-band
|
|
2331
2485
|
* + relative typed entry from there. */
|
|
2332
2486
|
pickPoint(opts?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lineadraw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Linea for Node: the headless drawing SDK (lineadraw/sdk), block/command script typings, and marketplace tooling",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Mikhail Koshelev",
|
|
@@ -60,4 +60,4 @@
|
|
|
60
60
|
"typescript-eslint": "^8.70.0",
|
|
61
61
|
"vitest": "^5.0.1"
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|
package/templates/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# __NAME__
|
|
2
|
-
|
|
3
|
-
A [Linea](https://github.com/lineadraw/lineadraw) marketplace:
|
|
4
|
-
`blocks/*.block.ts` and `commands/*.cmd.ts` modules plus a generated
|
|
5
|
-
catalog (`.lineadraw/marketplace.json`).
|
|
6
|
-
|
|
7
|
-
## Authoring
|
|
8
|
-
|
|
9
|
-
- Add or edit modules under `blocks/` and `commands/`.
|
|
10
|
-
- Regenerate the catalog: `npm run manifest` — CI fails when it is stale.
|
|
11
|
-
- Validate without writing: `npm run check`.
|
|
12
|
-
|
|
13
|
-
## Using it in the editor
|
|
14
|
-
|
|
15
|
-
Library → Marketplace tab → + → add this repository
|
|
16
|
-
as `owner/repo`. For a private repository, create a fine-grained personal
|
|
17
|
-
access token with read-only Contents access to just this repository and
|
|
18
|
-
paste it in the add dialog — it is stored only on that device.
|
|
1
|
+
# __NAME__
|
|
2
|
+
|
|
3
|
+
A [Linea](https://github.com/lineadraw/lineadraw) marketplace:
|
|
4
|
+
`blocks/*.block.ts` and `commands/*.cmd.ts` modules plus a generated
|
|
5
|
+
catalog (`.lineadraw/marketplace.json`).
|
|
6
|
+
|
|
7
|
+
## Authoring
|
|
8
|
+
|
|
9
|
+
- Add or edit modules under `blocks/` and `commands/`.
|
|
10
|
+
- Regenerate the catalog: `npm run manifest` — CI fails when it is stale.
|
|
11
|
+
- Validate without writing: `npm run check`.
|
|
12
|
+
|
|
13
|
+
## Using it in the editor
|
|
14
|
+
|
|
15
|
+
Library → Marketplace tab → + → add this repository
|
|
16
|
+
as `owner/repo`. For a private repository, create a fine-grained personal
|
|
17
|
+
access token with read-only Contents access to just this repository and
|
|
18
|
+
paste it in the add dialog — it is stored only on that device.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../dwg-wasm/node.js","../../dwg-wasm/pkg/linea_dwg.js"],"sourcesContent":["// Node entry (selected by the \"node\" export condition): fetch() can't load\n// file:// URLs, so read the wasm from disk and hand init the bytes directly.\nimport { readFileSync } from \"node:fs\";\nimport init, { dwg_to_dxf, dxf_to_dwg } from \"./pkg/linea_dwg.js\";\n\nlet ready;\n\n/** Instantiate the transcoder once; concurrent callers share the load. */\nexport const loadDwg = () =>\n (ready ??= init({\n module_or_path: readFileSync(\n new URL(\"./pkg/linea_dwg_bg.wasm\", import.meta.url),\n ),\n })\n .then(() => ({ dwg_to_dxf, dxf_to_dwg }))\n .catch((err) => {\n ready = undefined;\n throw err;\n }));\n","/* @ts-self-types=\"./linea_dwg.d.ts\" */\r\n\r\n/**\r\n * DWG bytes -> ASCII DXF text (feed the result to Linea's dxfToModel).\r\n * @param {Uint8Array} bytes\r\n * @returns {string}\r\n */\r\nexport function dwg_to_dxf(bytes) {\r\n let deferred3_0;\r\n let deferred3_1;\r\n try {\r\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\r\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);\r\n const len0 = WASM_VECTOR_LEN;\r\n wasm.dwg_to_dxf(retptr, ptr0, len0);\r\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\r\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\r\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\r\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\r\n var ptr2 = r0;\r\n var len2 = r1;\r\n if (r3) {\r\n ptr2 = 0; len2 = 0;\r\n throw takeObject(r2);\r\n }\r\n deferred3_0 = ptr2;\r\n deferred3_1 = len2;\r\n return getStringFromWasm0(ptr2, len2);\r\n } finally {\r\n wasm.__wbindgen_add_to_stack_pointer(16);\r\n wasm.__wbindgen_export2(deferred3_0, deferred3_1, 1);\r\n }\r\n}\r\n\r\n/**\r\n * DXF text (e.g. Linea's buildDxf output) -> DWG bytes.\r\n * `version` is optional: \"AC1015\" | \"AC1018\" | \"AC1021\" | \"AC1024\" |\r\n * \"AC1027\" | \"AC1032\"; defaults to AC1027 (AutoCAD 2013) when the DXF\r\n * carries no usable $ACADVER.\r\n * @param {string} dxf_text\r\n * @param {string | null} [version]\r\n * @returns {Uint8Array}\r\n */\r\nexport function dxf_to_dwg(dxf_text, version) {\r\n try {\r\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\r\n const ptr0 = passStringToWasm0(dxf_text, wasm.__wbindgen_export, wasm.__wbindgen_export3);\r\n const len0 = WASM_VECTOR_LEN;\r\n var ptr1 = isLikeNone(version) ? 0 : passStringToWasm0(version, wasm.__wbindgen_export, wasm.__wbindgen_export3);\r\n var len1 = WASM_VECTOR_LEN;\r\n wasm.dxf_to_dwg(retptr, ptr0, len0, ptr1, len1);\r\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\r\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\r\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\r\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\r\n if (r3) {\r\n throw takeObject(r2);\r\n }\r\n var v3 = getArrayU8FromWasm0(r0, r1).slice();\r\n wasm.__wbindgen_export2(r0, r1 * 1, 1);\r\n return v3;\r\n } finally {\r\n wasm.__wbindgen_add_to_stack_pointer(16);\r\n }\r\n}\r\nfunction __wbg_get_imports() {\r\n const import0 = {\r\n __proto__: null,\r\n __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {\r\n const ret = Error(getStringFromWasm0(arg0, arg1));\r\n return addHeapObject(ret);\r\n },\r\n };\r\n return {\r\n __proto__: null,\r\n \"./linea_dwg_bg.js\": import0,\r\n };\r\n}\r\n\r\nfunction addHeapObject(obj) {\r\n if (heap_next === heap.length) heap.push(heap.length + 1);\r\n const idx = heap_next;\r\n heap_next = heap[idx];\r\n\r\n heap[idx] = obj;\r\n return idx;\r\n}\r\n\r\nfunction dropObject(idx) {\r\n if (idx < 1028) return;\r\n heap[idx] = heap_next;\r\n heap_next = idx;\r\n}\r\n\r\nfunction getArrayU8FromWasm0(ptr, len) {\r\n ptr = ptr >>> 0;\r\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\r\n}\r\n\r\nlet cachedDataViewMemory0 = null;\r\nfunction getDataViewMemory0() {\r\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\r\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\r\n }\r\n return cachedDataViewMemory0;\r\n}\r\n\r\nfunction getStringFromWasm0(ptr, len) {\r\n return decodeText(ptr >>> 0, len);\r\n}\r\n\r\nlet cachedUint8ArrayMemory0 = null;\r\nfunction getUint8ArrayMemory0() {\r\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\r\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\r\n }\r\n return cachedUint8ArrayMemory0;\r\n}\r\n\r\nfunction getObject(idx) { return heap[idx]; }\r\n\r\nlet heap = new Array(1024).fill(undefined);\r\nheap.push(undefined, null, true, false);\r\n\r\nlet heap_next = heap.length;\r\n\r\nfunction isLikeNone(x) {\r\n return x === undefined || x === null;\r\n}\r\n\r\nfunction passArray8ToWasm0(arg, malloc) {\r\n const ptr = malloc(arg.length * 1, 1) >>> 0;\r\n getUint8ArrayMemory0().set(arg, ptr / 1);\r\n WASM_VECTOR_LEN = arg.length;\r\n return ptr;\r\n}\r\n\r\nfunction passStringToWasm0(arg, malloc, realloc) {\r\n if (realloc === undefined) {\r\n const buf = cachedTextEncoder.encode(arg);\r\n const ptr = malloc(buf.length, 1) >>> 0;\r\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\r\n WASM_VECTOR_LEN = buf.length;\r\n return ptr;\r\n }\r\n\r\n let len = arg.length;\r\n let ptr = malloc(len, 1) >>> 0;\r\n\r\n const mem = getUint8ArrayMemory0();\r\n\r\n let offset = 0;\r\n\r\n for (; offset < len; offset++) {\r\n const code = arg.charCodeAt(offset);\r\n if (code > 0x7F) break;\r\n mem[ptr + offset] = code;\r\n }\r\n if (offset !== len) {\r\n if (offset !== 0) {\r\n arg = arg.slice(offset);\r\n }\r\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\r\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\r\n const ret = cachedTextEncoder.encodeInto(arg, view);\r\n\r\n offset += ret.written;\r\n ptr = realloc(ptr, len, offset, 1) >>> 0;\r\n }\r\n\r\n WASM_VECTOR_LEN = offset;\r\n return ptr;\r\n}\r\n\r\nfunction takeObject(idx) {\r\n const ret = getObject(idx);\r\n dropObject(idx);\r\n return ret;\r\n}\r\n\r\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\r\ncachedTextDecoder.decode();\r\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\r\nlet numBytesDecoded = 0;\r\nfunction decodeText(ptr, len) {\r\n numBytesDecoded += len;\r\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\r\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\r\n cachedTextDecoder.decode();\r\n numBytesDecoded = len;\r\n }\r\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\r\n}\r\n\r\nconst cachedTextEncoder = new TextEncoder();\r\n\r\nif (!('encodeInto' in cachedTextEncoder)) {\r\n cachedTextEncoder.encodeInto = function (arg, view) {\r\n const buf = cachedTextEncoder.encode(arg);\r\n view.set(buf);\r\n return {\r\n read: arg.length,\r\n written: buf.length\r\n };\r\n };\r\n}\r\n\r\nlet WASM_VECTOR_LEN = 0;\r\n\r\nlet wasmModule, wasmInstance, wasm;\r\nfunction __wbg_finalize_init(instance, module) {\r\n wasmInstance = instance;\r\n wasm = instance.exports;\r\n wasmModule = module;\r\n cachedDataViewMemory0 = null;\r\n cachedUint8ArrayMemory0 = null;\r\n return wasm;\r\n}\r\n\r\nasync function __wbg_load(module, imports) {\r\n if (typeof Response === 'function' && module instanceof Response) {\r\n if (typeof WebAssembly.instantiateStreaming === 'function') {\r\n try {\r\n return await WebAssembly.instantiateStreaming(module, imports);\r\n } catch (e) {\r\n const validResponse = module.ok && expectedResponseType(module.type);\r\n\r\n if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {\r\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\r\n\r\n } else { throw e; }\r\n }\r\n }\r\n\r\n const bytes = await module.arrayBuffer();\r\n return await WebAssembly.instantiate(bytes, imports);\r\n } else {\r\n const instance = await WebAssembly.instantiate(module, imports);\r\n\r\n if (instance instanceof WebAssembly.Instance) {\r\n return { instance, module };\r\n } else {\r\n return instance;\r\n }\r\n }\r\n\r\n function expectedResponseType(type) {\r\n switch (type) {\r\n case 'basic': case 'cors': case 'default': return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\r\nfunction initSync(module) {\r\n if (wasm !== undefined) return wasm;\r\n\r\n\r\n if (module !== undefined) {\r\n if (Object.getPrototypeOf(module) === Object.prototype) {\r\n ({module} = module)\r\n } else {\r\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\r\n }\r\n }\r\n\r\n const imports = __wbg_get_imports();\r\n if (!(module instanceof WebAssembly.Module)) {\r\n module = new WebAssembly.Module(module);\r\n }\r\n const instance = new WebAssembly.Instance(module, imports);\r\n return __wbg_finalize_init(instance, module);\r\n}\r\n\r\nasync function __wbg_init(module_or_path) {\r\n if (wasm !== undefined) return wasm;\r\n\r\n\r\n if (module_or_path !== undefined) {\r\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\r\n ({module_or_path} = module_or_path)\r\n } else {\r\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\r\n }\r\n }\r\n\r\n if (module_or_path === undefined) {\r\n module_or_path = new URL('linea_dwg_bg.wasm', import.meta.url);\r\n }\r\n const imports = __wbg_get_imports();\r\n\r\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\r\n module_or_path = fetch(module_or_path);\r\n }\r\n\r\n const { instance, module } = await __wbg_load(await module_or_path, imports);\r\n\r\n return __wbg_finalize_init(instance, module);\r\n}\r\n\r\nexport { initSync, __wbg_init as default };\r\n"],"mappings":";;;AAEA,SAAS,oBAAoB;;;ACKtB,SAAS,WAAW,OAAO;AAC9B,MAAI;AACJ,MAAI;AACJ,MAAI;AACA,UAAM,SAAS,KAAK,gCAAgC,GAAG;AACvD,UAAM,OAAO,kBAAkB,OAAO,KAAK,iBAAiB;AAC5D,UAAM,OAAO;AACb,SAAK,WAAW,QAAQ,MAAM,IAAI;AAClC,QAAI,KAAK,mBAAmB,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI;AAC3D,QAAI,KAAK,mBAAmB,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI;AAC3D,QAAI,KAAK,mBAAmB,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI;AAC3D,QAAI,KAAK,mBAAmB,EAAE,SAAS,SAAS,IAAI,GAAG,IAAI;AAC3D,QAAI,OAAO;AACX,QAAI,OAAO;AACX,QAAI,IAAI;AACJ,aAAO;AAAG,aAAO;AACjB,YAAM,WAAW,EAAE;AAAA,IACvB;AACA,kBAAc;AACd,kBAAc;AACd,WAAO,mBAAmB,MAAM,IAAI;AAAA,EACxC,U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