lineadraw 0.9.0 → 0.11.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 +154 -20
- package/bin/lineadraw.mjs +60 -10
- package/dist/bridge.d.ts +1 -0
- package/dist/bridge.js +1 -1
- package/dist/{chunk-BQCSFVAF.js → chunk-7UFXC7OI.js} +5570 -1174
- package/dist/chunk-7UFXC7OI.js.map +1 -0
- package/dist/chunk-FDLANLIC.js +1161 -0
- package/dist/chunk-FDLANLIC.js.map +1 -0
- package/dist/chunk-M3EDRSHW.js +81 -0
- package/dist/chunk-M3EDRSHW.js.map +1 -0
- package/dist/chunk-MYP7RUYK.js +9 -0
- package/dist/chunk-MYP7RUYK.js.map +1 -0
- package/dist/{chunk-L2CWZAKW.js → chunk-RNA2RDGL.js} +13 -6
- package/dist/chunk-RNA2RDGL.js.map +1 -0
- package/dist/dist-56K6CNML.js +188 -0
- package/dist/dist-56K6CNML.js.map +1 -0
- package/dist/dist-IEN64QSV.js +10 -0
- package/dist/dist-IEN64QSV.js.map +1 -0
- package/dist/emscripten-module-Q67P5WYC-ITCU5LXL.js +2424 -0
- package/dist/emscripten-module-Q67P5WYC-ITCU5LXL.js.map +1 -0
- package/dist/{exportDxf-T2RTSTH5.js → exportDxf-6XTXQ4XN.js} +2 -2
- package/dist/ffi-SHMEF5YV.js +82 -0
- package/dist/ffi-SHMEF5YV.js.map +1 -0
- package/dist/module-ES6BEMUI-BJFWC656.js +14 -0
- package/dist/module-ES6BEMUI-BJFWC656.js.map +1 -0
- package/dist/module-asyncify-2EFITU5U-7F5WZXRA.js +9 -0
- package/dist/module-asyncify-2EFITU5U-7F5WZXRA.js.map +1 -0
- package/dist/sdk.d.ts +1118 -128
- package/dist/sdk.js +742 -620
- package/dist/sdk.js.map +1 -1
- package/lineadraw.d.ts +666 -44
- package/package.json +1 -1
- package/templates/README.md +6 -4
- package/dist/chunk-BQCSFVAF.js.map +0 -1
- package/dist/chunk-L2CWZAKW.js.map +0 -1
- /package/dist/{exportDxf-T2RTSTH5.js.map → exportDxf-6XTXQ4XN.js.map} +0 -0
package/dist/sdk.d.ts
CHANGED
|
@@ -89,6 +89,31 @@ declare const DimStyleSchema: z.ZodObject<{
|
|
|
89
89
|
precision: z.ZodDefault<z.ZodNumber>;
|
|
90
90
|
}, z.core.$strip>;
|
|
91
91
|
type DimStyle$1 = z.infer<typeof DimStyleSchema>;
|
|
92
|
+
declare const BlockSchema: z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
layerId: z.ZodString;
|
|
95
|
+
color: z.ZodOptional<z.ZodString>;
|
|
96
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
97
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
type: z.ZodLiteral<"block">;
|
|
101
|
+
definitionId: z.ZodString;
|
|
102
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
103
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
104
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
105
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
106
|
+
x: z.ZodNumber;
|
|
107
|
+
y: z.ZodNumber;
|
|
108
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
109
|
+
x: z.ZodNumber;
|
|
110
|
+
y: z.ZodNumber;
|
|
111
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
112
|
+
x: z.ZodNumber;
|
|
113
|
+
y: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
type Block = z.infer<typeof BlockSchema>;
|
|
92
117
|
/**
|
|
93
118
|
* A LINKED file drawn in place (an xref): the document holds this record,
|
|
94
119
|
* never the file. The file's model space lands with its origin at
|
|
@@ -247,6 +272,35 @@ declare const ModelObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
247
272
|
ratio: z.ZodNumber;
|
|
248
273
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
249
274
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
id: z.ZodString;
|
|
277
|
+
layerId: z.ZodString;
|
|
278
|
+
color: z.ZodOptional<z.ZodString>;
|
|
279
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
280
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
degree: z.ZodNumber;
|
|
284
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
285
|
+
x: z.ZodNumber;
|
|
286
|
+
y: z.ZodNumber;
|
|
287
|
+
}, z.core.$strip>, unknown>>;
|
|
288
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
289
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
290
|
+
type: z.ZodLiteral<"spline">;
|
|
291
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
292
|
+
x: z.ZodNumber;
|
|
293
|
+
y: z.ZodNumber;
|
|
294
|
+
}, z.core.$strip>, unknown>>>;
|
|
295
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
296
|
+
x: z.ZodNumber;
|
|
297
|
+
y: z.ZodNumber;
|
|
298
|
+
}, z.core.$strip>, unknown>>;
|
|
299
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
300
|
+
x: z.ZodNumber;
|
|
301
|
+
y: z.ZodNumber;
|
|
302
|
+
}, z.core.$strip>, unknown>>;
|
|
303
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
250
304
|
}, z.core.$strip>, z.ZodObject<{
|
|
251
305
|
id: z.ZodString;
|
|
252
306
|
layerId: z.ZodString;
|
|
@@ -257,11 +311,52 @@ declare const ModelObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
257
311
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
258
312
|
type: z.ZodLiteral<"hatch">;
|
|
259
313
|
loops: z.ZodArray<z.ZodObject<{
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
314
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
315
|
+
kind: z.ZodLiteral<"line">;
|
|
316
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
317
|
+
x: z.ZodNumber;
|
|
318
|
+
y: z.ZodNumber;
|
|
319
|
+
}, z.core.$strip>, unknown>;
|
|
320
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
321
|
+
x: z.ZodNumber;
|
|
322
|
+
y: z.ZodNumber;
|
|
323
|
+
}, z.core.$strip>, unknown>;
|
|
324
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
325
|
+
kind: z.ZodLiteral<"arc">;
|
|
326
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
327
|
+
x: z.ZodNumber;
|
|
328
|
+
y: z.ZodNumber;
|
|
329
|
+
}, z.core.$strip>, unknown>;
|
|
330
|
+
radius: z.ZodNumber;
|
|
331
|
+
startAngle: z.ZodNumber;
|
|
332
|
+
endAngle: z.ZodNumber;
|
|
333
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
334
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
335
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
336
|
+
x: z.ZodNumber;
|
|
337
|
+
y: z.ZodNumber;
|
|
338
|
+
}, z.core.$strip>, unknown>;
|
|
339
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
340
|
+
x: z.ZodNumber;
|
|
341
|
+
y: z.ZodNumber;
|
|
342
|
+
}, z.core.$strip>, unknown>;
|
|
343
|
+
ratio: z.ZodNumber;
|
|
344
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
345
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
+
degree: z.ZodNumber;
|
|
348
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
349
|
+
x: z.ZodNumber;
|
|
350
|
+
y: z.ZodNumber;
|
|
351
|
+
}, z.core.$strip>, unknown>>;
|
|
352
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
353
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
354
|
+
kind: z.ZodLiteral<"spline">;
|
|
355
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
356
|
+
x: z.ZodNumber;
|
|
357
|
+
y: z.ZodNumber;
|
|
358
|
+
}, z.core.$strip>, unknown>>>;
|
|
359
|
+
}, z.core.$strip>], "kind">>;
|
|
265
360
|
}, z.core.$strip>>;
|
|
266
361
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
267
362
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -435,11 +530,17 @@ declare const ModelObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
435
530
|
definitionId: z.ZodString;
|
|
436
531
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
437
532
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
438
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
439
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
533
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
534
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
440
535
|
x: z.ZodNumber;
|
|
441
536
|
y: z.ZodNumber;
|
|
442
|
-
}, z.core.$strip>, unknown>, z.ZodString]
|
|
537
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
538
|
+
x: z.ZodNumber;
|
|
539
|
+
y: z.ZodNumber;
|
|
540
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
541
|
+
x: z.ZodNumber;
|
|
542
|
+
y: z.ZodNumber;
|
|
543
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
443
544
|
}, z.core.$strip>, z.ZodObject<{
|
|
444
545
|
id: z.ZodString;
|
|
445
546
|
layerId: z.ZodString;
|
|
@@ -666,12 +767,13 @@ type Layer = z.infer<typeof LayerSchema>;
|
|
|
666
767
|
declare const LineaDocumentSchema: z.ZodPreprocess<z.ZodObject<{
|
|
667
768
|
id: z.ZodDefault<z.ZodString>;
|
|
668
769
|
type: z.ZodDefault<z.ZodLiteral<"lineadraw">>;
|
|
669
|
-
version: z.ZodLiteral<
|
|
770
|
+
version: z.ZodLiteral<25>;
|
|
670
771
|
settings: z.ZodDefault<z.ZodObject<{
|
|
671
772
|
units: z.ZodDefault<z.ZodEnum<{
|
|
672
773
|
in: "in";
|
|
673
774
|
mm: "mm";
|
|
674
775
|
}>>;
|
|
776
|
+
modelScale: z.ZodDefault<z.ZodNumber>;
|
|
675
777
|
}, z.core.$strip>>;
|
|
676
778
|
layers: z.ZodArray<z.ZodObject<{
|
|
677
779
|
id: z.ZodDefault<z.ZodString>;
|
|
@@ -780,6 +882,35 @@ declare const LineaDocumentSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
780
882
|
ratio: z.ZodNumber;
|
|
781
883
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
782
884
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
886
|
+
id: z.ZodString;
|
|
887
|
+
layerId: z.ZodString;
|
|
888
|
+
color: z.ZodOptional<z.ZodString>;
|
|
889
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
890
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
891
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
892
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
893
|
+
degree: z.ZodNumber;
|
|
894
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
895
|
+
x: z.ZodNumber;
|
|
896
|
+
y: z.ZodNumber;
|
|
897
|
+
}, z.core.$strip>, unknown>>;
|
|
898
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
899
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
900
|
+
type: z.ZodLiteral<"spline">;
|
|
901
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
902
|
+
x: z.ZodNumber;
|
|
903
|
+
y: z.ZodNumber;
|
|
904
|
+
}, z.core.$strip>, unknown>>>;
|
|
905
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
906
|
+
x: z.ZodNumber;
|
|
907
|
+
y: z.ZodNumber;
|
|
908
|
+
}, z.core.$strip>, unknown>>;
|
|
909
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
910
|
+
x: z.ZodNumber;
|
|
911
|
+
y: z.ZodNumber;
|
|
912
|
+
}, z.core.$strip>, unknown>>;
|
|
913
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
783
914
|
}, z.core.$strip>, z.ZodObject<{
|
|
784
915
|
id: z.ZodString;
|
|
785
916
|
layerId: z.ZodString;
|
|
@@ -790,11 +921,52 @@ declare const LineaDocumentSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
790
921
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
791
922
|
type: z.ZodLiteral<"hatch">;
|
|
792
923
|
loops: z.ZodArray<z.ZodObject<{
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
924
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
925
|
+
kind: z.ZodLiteral<"line">;
|
|
926
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
927
|
+
x: z.ZodNumber;
|
|
928
|
+
y: z.ZodNumber;
|
|
929
|
+
}, z.core.$strip>, unknown>;
|
|
930
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
931
|
+
x: z.ZodNumber;
|
|
932
|
+
y: z.ZodNumber;
|
|
933
|
+
}, z.core.$strip>, unknown>;
|
|
934
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
935
|
+
kind: z.ZodLiteral<"arc">;
|
|
936
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
937
|
+
x: z.ZodNumber;
|
|
938
|
+
y: z.ZodNumber;
|
|
939
|
+
}, z.core.$strip>, unknown>;
|
|
940
|
+
radius: z.ZodNumber;
|
|
941
|
+
startAngle: z.ZodNumber;
|
|
942
|
+
endAngle: z.ZodNumber;
|
|
943
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
944
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
945
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
946
|
+
x: z.ZodNumber;
|
|
947
|
+
y: z.ZodNumber;
|
|
948
|
+
}, z.core.$strip>, unknown>;
|
|
949
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
950
|
+
x: z.ZodNumber;
|
|
951
|
+
y: z.ZodNumber;
|
|
952
|
+
}, z.core.$strip>, unknown>;
|
|
953
|
+
ratio: z.ZodNumber;
|
|
954
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
955
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
956
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
957
|
+
degree: z.ZodNumber;
|
|
958
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
959
|
+
x: z.ZodNumber;
|
|
960
|
+
y: z.ZodNumber;
|
|
961
|
+
}, z.core.$strip>, unknown>>;
|
|
962
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
963
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
964
|
+
kind: z.ZodLiteral<"spline">;
|
|
965
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
966
|
+
x: z.ZodNumber;
|
|
967
|
+
y: z.ZodNumber;
|
|
968
|
+
}, z.core.$strip>, unknown>>>;
|
|
969
|
+
}, z.core.$strip>], "kind">>;
|
|
798
970
|
}, z.core.$strip>>;
|
|
799
971
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
800
972
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -968,11 +1140,17 @@ declare const LineaDocumentSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
968
1140
|
definitionId: z.ZodString;
|
|
969
1141
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
970
1142
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
971
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
972
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
1143
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
1144
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
973
1145
|
x: z.ZodNumber;
|
|
974
1146
|
y: z.ZodNumber;
|
|
975
|
-
}, z.core.$strip>, unknown>, z.ZodString]
|
|
1147
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
1148
|
+
x: z.ZodNumber;
|
|
1149
|
+
y: z.ZodNumber;
|
|
1150
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
1151
|
+
x: z.ZodNumber;
|
|
1152
|
+
y: z.ZodNumber;
|
|
1153
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
976
1154
|
}, z.core.$strip>, z.ZodObject<{
|
|
977
1155
|
id: z.ZodString;
|
|
978
1156
|
layerId: z.ZodString;
|
|
@@ -1265,6 +1443,35 @@ declare const LineaDocumentSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
1265
1443
|
ratio: z.ZodNumber;
|
|
1266
1444
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
1267
1445
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
1446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1447
|
+
id: z.ZodString;
|
|
1448
|
+
layerId: z.ZodString;
|
|
1449
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1450
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
1451
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
1452
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
1453
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1454
|
+
degree: z.ZodNumber;
|
|
1455
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
1456
|
+
x: z.ZodNumber;
|
|
1457
|
+
y: z.ZodNumber;
|
|
1458
|
+
}, z.core.$strip>, unknown>>;
|
|
1459
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
1460
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1461
|
+
type: z.ZodLiteral<"spline">;
|
|
1462
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
1463
|
+
x: z.ZodNumber;
|
|
1464
|
+
y: z.ZodNumber;
|
|
1465
|
+
}, z.core.$strip>, unknown>>>;
|
|
1466
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
1467
|
+
x: z.ZodNumber;
|
|
1468
|
+
y: z.ZodNumber;
|
|
1469
|
+
}, z.core.$strip>, unknown>>;
|
|
1470
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
1471
|
+
x: z.ZodNumber;
|
|
1472
|
+
y: z.ZodNumber;
|
|
1473
|
+
}, z.core.$strip>, unknown>>;
|
|
1474
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
1268
1475
|
}, z.core.$strip>, z.ZodObject<{
|
|
1269
1476
|
id: z.ZodString;
|
|
1270
1477
|
layerId: z.ZodString;
|
|
@@ -1275,11 +1482,52 @@ declare const LineaDocumentSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
1275
1482
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1276
1483
|
type: z.ZodLiteral<"hatch">;
|
|
1277
1484
|
loops: z.ZodArray<z.ZodObject<{
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1485
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1486
|
+
kind: z.ZodLiteral<"line">;
|
|
1487
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
1488
|
+
x: z.ZodNumber;
|
|
1489
|
+
y: z.ZodNumber;
|
|
1490
|
+
}, z.core.$strip>, unknown>;
|
|
1491
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
1492
|
+
x: z.ZodNumber;
|
|
1493
|
+
y: z.ZodNumber;
|
|
1494
|
+
}, z.core.$strip>, unknown>;
|
|
1495
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1496
|
+
kind: z.ZodLiteral<"arc">;
|
|
1497
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
1498
|
+
x: z.ZodNumber;
|
|
1499
|
+
y: z.ZodNumber;
|
|
1500
|
+
}, z.core.$strip>, unknown>;
|
|
1501
|
+
radius: z.ZodNumber;
|
|
1502
|
+
startAngle: z.ZodNumber;
|
|
1503
|
+
endAngle: z.ZodNumber;
|
|
1504
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1505
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
1506
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
1507
|
+
x: z.ZodNumber;
|
|
1508
|
+
y: z.ZodNumber;
|
|
1509
|
+
}, z.core.$strip>, unknown>;
|
|
1510
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
1511
|
+
x: z.ZodNumber;
|
|
1512
|
+
y: z.ZodNumber;
|
|
1513
|
+
}, z.core.$strip>, unknown>;
|
|
1514
|
+
ratio: z.ZodNumber;
|
|
1515
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
1516
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
1517
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1518
|
+
degree: z.ZodNumber;
|
|
1519
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
1520
|
+
x: z.ZodNumber;
|
|
1521
|
+
y: z.ZodNumber;
|
|
1522
|
+
}, z.core.$strip>, unknown>>;
|
|
1523
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
1524
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1525
|
+
kind: z.ZodLiteral<"spline">;
|
|
1526
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
1527
|
+
x: z.ZodNumber;
|
|
1528
|
+
y: z.ZodNumber;
|
|
1529
|
+
}, z.core.$strip>, unknown>>>;
|
|
1530
|
+
}, z.core.$strip>], "kind">>;
|
|
1283
1531
|
}, z.core.$strip>>;
|
|
1284
1532
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1285
1533
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -1453,11 +1701,17 @@ declare const LineaDocumentSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
1453
1701
|
definitionId: z.ZodString;
|
|
1454
1702
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
1455
1703
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
1456
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
1457
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
1704
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
1705
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
1706
|
+
x: z.ZodNumber;
|
|
1707
|
+
y: z.ZodNumber;
|
|
1708
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
1709
|
+
x: z.ZodNumber;
|
|
1710
|
+
y: z.ZodNumber;
|
|
1711
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
1458
1712
|
x: z.ZodNumber;
|
|
1459
1713
|
y: z.ZodNumber;
|
|
1460
|
-
}, z.core.$strip>, unknown
|
|
1714
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
1461
1715
|
}, z.core.$strip>, z.ZodObject<{
|
|
1462
1716
|
id: z.ZodString;
|
|
1463
1717
|
layerId: z.ZodString;
|
|
@@ -1813,6 +2067,12 @@ declare const ParamDefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1813
2067
|
hint: z.ZodOptional<z.ZodString>;
|
|
1814
2068
|
type: z.ZodLiteral<"hatchPattern">;
|
|
1815
2069
|
default: z.ZodDefault<z.ZodString>;
|
|
2070
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2071
|
+
name: z.ZodString;
|
|
2072
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2073
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
2074
|
+
type: z.ZodLiteral<"data">;
|
|
2075
|
+
default: z.ZodJSONSchema;
|
|
1816
2076
|
}, z.core.$strip>, z.ZodObject<{
|
|
1817
2077
|
name: z.ZodString;
|
|
1818
2078
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1910,14 +2170,86 @@ declare const ParamDefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1910
2170
|
}, z.core.$strip>], "type">>;
|
|
1911
2171
|
}, z.core.$strip>], "type">;
|
|
1912
2172
|
type ParamDef = z.infer<typeof ParamDefSchema>;
|
|
2173
|
+
declare const InputDefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2174
|
+
name: z.ZodString;
|
|
2175
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2176
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2177
|
+
type: z.ZodLiteral<"point">;
|
|
2178
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
2179
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2180
|
+
name: z.ZodString;
|
|
2181
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2182
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2183
|
+
type: z.ZodLiteral<"points">;
|
|
2184
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
2185
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
2186
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
2187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2188
|
+
name: z.ZodString;
|
|
2189
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2190
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2191
|
+
type: z.ZodLiteral<"object">;
|
|
2192
|
+
types: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
2193
|
+
arc: "arc";
|
|
2194
|
+
block: "block";
|
|
2195
|
+
circle: "circle";
|
|
2196
|
+
comment: "comment";
|
|
2197
|
+
dimension: "dimension";
|
|
2198
|
+
ellipse: "ellipse";
|
|
2199
|
+
hatch: "hatch";
|
|
2200
|
+
line: "line";
|
|
2201
|
+
point: "point";
|
|
2202
|
+
polyline: "polyline";
|
|
2203
|
+
reference: "reference";
|
|
2204
|
+
spline: "spline";
|
|
2205
|
+
table: "table";
|
|
2206
|
+
text: "text";
|
|
2207
|
+
viewport: "viewport";
|
|
2208
|
+
}>>>;
|
|
2209
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
2210
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2211
|
+
name: z.ZodString;
|
|
2212
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2213
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2214
|
+
type: z.ZodLiteral<"objects">;
|
|
2215
|
+
types: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
2216
|
+
arc: "arc";
|
|
2217
|
+
block: "block";
|
|
2218
|
+
circle: "circle";
|
|
2219
|
+
comment: "comment";
|
|
2220
|
+
dimension: "dimension";
|
|
2221
|
+
ellipse: "ellipse";
|
|
2222
|
+
hatch: "hatch";
|
|
2223
|
+
line: "line";
|
|
2224
|
+
point: "point";
|
|
2225
|
+
polyline: "polyline";
|
|
2226
|
+
reference: "reference";
|
|
2227
|
+
spline: "spline";
|
|
2228
|
+
table: "table";
|
|
2229
|
+
text: "text";
|
|
2230
|
+
viewport: "viewport";
|
|
2231
|
+
}>>>;
|
|
2232
|
+
min: z.ZodDefault<z.ZodNumber>;
|
|
2233
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
2234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2235
|
+
name: z.ZodString;
|
|
2236
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2237
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2238
|
+
type: z.ZodLiteral<"host">;
|
|
2239
|
+
types: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2240
|
+
}, z.core.$strip>], "type">;
|
|
2241
|
+
type InputDef = z.infer<typeof InputDefSchema>;
|
|
1913
2242
|
|
|
1914
|
-
/**
|
|
2243
|
+
/** Sheet sizes in mm [width, height], portrait: ISO A-series plus US
|
|
2244
|
+
* Letter. */
|
|
1915
2245
|
declare const SHEET_PRESETS: {
|
|
2246
|
+
readonly A5: readonly [148, 210];
|
|
1916
2247
|
readonly A4: readonly [210, 297];
|
|
1917
2248
|
readonly A3: readonly [297, 420];
|
|
1918
2249
|
readonly A2: readonly [420, 594];
|
|
1919
2250
|
readonly A1: readonly [594, 841];
|
|
1920
2251
|
readonly A0: readonly [841, 1189];
|
|
2252
|
+
readonly Letter: readonly [215.9, 279.4];
|
|
1921
2253
|
};
|
|
1922
2254
|
type SheetName = keyof typeof SHEET_PRESETS;
|
|
1923
2255
|
type SheetOrientation = "portrait" | "landscape";
|
|
@@ -2055,6 +2387,35 @@ declare const PaperLayoutSchema: z.ZodObject<{
|
|
|
2055
2387
|
ratio: z.ZodNumber;
|
|
2056
2388
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
2057
2389
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
2390
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2391
|
+
id: z.ZodString;
|
|
2392
|
+
layerId: z.ZodString;
|
|
2393
|
+
color: z.ZodOptional<z.ZodString>;
|
|
2394
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
2395
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
2396
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
2397
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
2398
|
+
degree: z.ZodNumber;
|
|
2399
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
2400
|
+
x: z.ZodNumber;
|
|
2401
|
+
y: z.ZodNumber;
|
|
2402
|
+
}, z.core.$strip>, unknown>>;
|
|
2403
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
2404
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
2405
|
+
type: z.ZodLiteral<"spline">;
|
|
2406
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
2407
|
+
x: z.ZodNumber;
|
|
2408
|
+
y: z.ZodNumber;
|
|
2409
|
+
}, z.core.$strip>, unknown>>>;
|
|
2410
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
2411
|
+
x: z.ZodNumber;
|
|
2412
|
+
y: z.ZodNumber;
|
|
2413
|
+
}, z.core.$strip>, unknown>>;
|
|
2414
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
2415
|
+
x: z.ZodNumber;
|
|
2416
|
+
y: z.ZodNumber;
|
|
2417
|
+
}, z.core.$strip>, unknown>>;
|
|
2418
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
2058
2419
|
}, z.core.$strip>, z.ZodObject<{
|
|
2059
2420
|
id: z.ZodString;
|
|
2060
2421
|
layerId: z.ZodString;
|
|
@@ -2065,11 +2426,52 @@ declare const PaperLayoutSchema: z.ZodObject<{
|
|
|
2065
2426
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
2066
2427
|
type: z.ZodLiteral<"hatch">;
|
|
2067
2428
|
loops: z.ZodArray<z.ZodObject<{
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2429
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2430
|
+
kind: z.ZodLiteral<"line">;
|
|
2431
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
2432
|
+
x: z.ZodNumber;
|
|
2433
|
+
y: z.ZodNumber;
|
|
2434
|
+
}, z.core.$strip>, unknown>;
|
|
2435
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
2436
|
+
x: z.ZodNumber;
|
|
2437
|
+
y: z.ZodNumber;
|
|
2438
|
+
}, z.core.$strip>, unknown>;
|
|
2439
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2440
|
+
kind: z.ZodLiteral<"arc">;
|
|
2441
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
2442
|
+
x: z.ZodNumber;
|
|
2443
|
+
y: z.ZodNumber;
|
|
2444
|
+
}, z.core.$strip>, unknown>;
|
|
2445
|
+
radius: z.ZodNumber;
|
|
2446
|
+
startAngle: z.ZodNumber;
|
|
2447
|
+
endAngle: z.ZodNumber;
|
|
2448
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2449
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
2450
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
2451
|
+
x: z.ZodNumber;
|
|
2452
|
+
y: z.ZodNumber;
|
|
2453
|
+
}, z.core.$strip>, unknown>;
|
|
2454
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
2455
|
+
x: z.ZodNumber;
|
|
2456
|
+
y: z.ZodNumber;
|
|
2457
|
+
}, z.core.$strip>, unknown>;
|
|
2458
|
+
ratio: z.ZodNumber;
|
|
2459
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
2460
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
2461
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2462
|
+
degree: z.ZodNumber;
|
|
2463
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
2464
|
+
x: z.ZodNumber;
|
|
2465
|
+
y: z.ZodNumber;
|
|
2466
|
+
}, z.core.$strip>, unknown>>;
|
|
2467
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
2468
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
2469
|
+
kind: z.ZodLiteral<"spline">;
|
|
2470
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
2471
|
+
x: z.ZodNumber;
|
|
2472
|
+
y: z.ZodNumber;
|
|
2473
|
+
}, z.core.$strip>, unknown>>>;
|
|
2474
|
+
}, z.core.$strip>], "kind">>;
|
|
2073
2475
|
}, z.core.$strip>>;
|
|
2074
2476
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2075
2477
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -2243,11 +2645,17 @@ declare const PaperLayoutSchema: z.ZodObject<{
|
|
|
2243
2645
|
definitionId: z.ZodString;
|
|
2244
2646
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
2245
2647
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
2246
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
2247
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
2648
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
2649
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
2650
|
+
x: z.ZodNumber;
|
|
2651
|
+
y: z.ZodNumber;
|
|
2652
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
2248
2653
|
x: z.ZodNumber;
|
|
2249
2654
|
y: z.ZodNumber;
|
|
2250
|
-
}, z.core.$strip>, unknown>, z.ZodString
|
|
2655
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
2656
|
+
x: z.ZodNumber;
|
|
2657
|
+
y: z.ZodNumber;
|
|
2658
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
2251
2659
|
}, z.core.$strip>, z.ZodObject<{
|
|
2252
2660
|
id: z.ZodString;
|
|
2253
2661
|
layerId: z.ZodString;
|
|
@@ -2443,11 +2851,86 @@ type PaperLayout = z.infer<typeof PaperLayoutSchema>;
|
|
|
2443
2851
|
*/
|
|
2444
2852
|
declare const parseScale: (scale: number | string) => number;
|
|
2445
2853
|
|
|
2446
|
-
|
|
2854
|
+
/** A point as scripts write it: [x, y] or { x, y }. */
|
|
2855
|
+
type CurvePointLike = readonly [number, number] | {
|
|
2856
|
+
readonly x: number;
|
|
2857
|
+
readonly y: number;
|
|
2858
|
+
};
|
|
2859
|
+
/** A `spline` object input, ready for `document.add` or a block's `draw`. */
|
|
2860
|
+
type SplineThrough = {
|
|
2861
|
+
type: "spline";
|
|
2862
|
+
degree: number;
|
|
2863
|
+
controlPoints: {
|
|
2864
|
+
x: number;
|
|
2865
|
+
y: number;
|
|
2866
|
+
}[];
|
|
2867
|
+
knots: number[];
|
|
2868
|
+
fitPoints: {
|
|
2869
|
+
x: number;
|
|
2870
|
+
y: number;
|
|
2871
|
+
}[];
|
|
2872
|
+
};
|
|
2873
|
+
/**
|
|
2874
|
+
* The smooth spline passing THROUGH `points` (in order) — what the Spline
|
|
2875
|
+
* tool draws. `degree` 3 (default) or 2; fewer points lower it. Throws on
|
|
2876
|
+
* fewer than two distinct points.
|
|
2877
|
+
*/
|
|
2878
|
+
declare const splineThrough: (points: readonly CurvePointLike[], degree?: number) => SplineThrough;
|
|
2879
|
+
/** A loop point: [x, y, bulge?] or { x, y, bulge? } — the bulge (tan of a
|
|
2880
|
+
* quarter of the sweep, as on a polyline) bends the edge to the NEXT point
|
|
2881
|
+
* into an arc. */
|
|
2882
|
+
type LoopPointLike = readonly [number, number, number?] | {
|
|
2883
|
+
readonly x: number;
|
|
2884
|
+
readonly y: number;
|
|
2885
|
+
readonly bulge?: number;
|
|
2886
|
+
};
|
|
2887
|
+
/** A hatch loop of lines and arcs, ready for a hatch's `loops`. */
|
|
2888
|
+
type HatchLoopEdges = {
|
|
2889
|
+
edges: ({
|
|
2890
|
+
kind: "line";
|
|
2891
|
+
a: {
|
|
2892
|
+
x: number;
|
|
2893
|
+
y: number;
|
|
2894
|
+
};
|
|
2895
|
+
b: {
|
|
2896
|
+
x: number;
|
|
2897
|
+
y: number;
|
|
2898
|
+
};
|
|
2899
|
+
} | {
|
|
2900
|
+
kind: "arc";
|
|
2901
|
+
center: {
|
|
2902
|
+
x: number;
|
|
2903
|
+
y: number;
|
|
2904
|
+
};
|
|
2905
|
+
radius: number;
|
|
2906
|
+
startAngle: number;
|
|
2907
|
+
endAngle: number;
|
|
2908
|
+
})[];
|
|
2909
|
+
};
|
|
2910
|
+
/**
|
|
2911
|
+
* The closed hatch loop through `points`: straight edges between them, an
|
|
2912
|
+
* arc where a point carries a bulge — the way to hatch a polygon or a
|
|
2913
|
+
* polyline outline (`loops: rings.map(hatchLoop)` for polygon booleans).
|
|
2914
|
+
*/
|
|
2915
|
+
declare const hatchLoop: (points: readonly LoopPointLike[]) => HatchLoopEdges;
|
|
2916
|
+
|
|
2917
|
+
/** Which cache compiles the module: blocks run on the paint path (short
|
|
2918
|
+
* budget, switched off after a timeout), commands run once per call. */
|
|
2919
|
+
type ScriptKind = "block" | "command";
|
|
2920
|
+
type ModuleExecutor = (script: string, kind?: ScriptKind) => Record<string, unknown>;
|
|
2447
2921
|
/** Load the script transpiler (idempotent). Awaited by save/insert flows.
|
|
2448
2922
|
* Shared by block AND command modules. */
|
|
2449
2923
|
declare const ensureScriptTranspiler: () => Promise<ModuleExecutor>;
|
|
2450
2924
|
|
|
2925
|
+
/**
|
|
2926
|
+
* Looks up a referenced object by id — supplied by whoever owns the
|
|
2927
|
+
* document (ids are document-unique, so a document-wide lookup is correct).
|
|
2928
|
+
*/
|
|
2929
|
+
type BlockObjectResolver = ((id: string) => ModelObject | undefined) & {
|
|
2930
|
+
/** Every block instance in the document (all spaces) — how a host finds
|
|
2931
|
+
* what lives on it (hostedOf). Absent → hosts see no `hosted`. */
|
|
2932
|
+
blocks?: () => readonly Block[];
|
|
2933
|
+
};
|
|
2451
2934
|
/** Identity + metadata derived from a block module's exports. The optional
|
|
2452
2935
|
* fields are marketplace/listing metadata (docs/block-marketplace.md) —
|
|
2453
2936
|
* absent ones change nothing about evaluation. */
|
|
@@ -2463,6 +2946,10 @@ interface BlockMeta {
|
|
|
2463
2946
|
* Declared (a param-dependent path may emit only sometimes), but the
|
|
2464
2947
|
* save-time dry run REJECTS emitted instances that are not declared. */
|
|
2465
2948
|
dependencies?: string[];
|
|
2949
|
+
/** The declared input table (`inputs` member) — instances of a module
|
|
2950
|
+
* with one store their inputs as a record by name. Absent for the
|
|
2951
|
+
* positional forms (`place` labels / function, or no `place`). */
|
|
2952
|
+
inputs?: InputDef[];
|
|
2466
2953
|
}
|
|
2467
2954
|
/** Non-throwing meta lookup for list UIs. */
|
|
2468
2955
|
type BlockMetaResult = {
|
|
@@ -2677,14 +3164,23 @@ interface CommandMeta {
|
|
|
2677
3164
|
version?: string;
|
|
2678
3165
|
authors?: string[];
|
|
2679
3166
|
tags?: string[];
|
|
2680
|
-
/** Declared
|
|
2681
|
-
*
|
|
2682
|
-
|
|
3167
|
+
/** Declared inputs, as declared: point LABELS (positional — `ctx.inputs`
|
|
3168
|
+
* is an array) or an input TABLE (named — `ctx.inputs` is a record;
|
|
3169
|
+
* object inputs take the selection first). Acquired before `run`: picked
|
|
3170
|
+
* in the editor, or supplied up front by a headless/remote caller. */
|
|
3171
|
+
inputs?: string[] | CommandInputDef[];
|
|
3172
|
+
/** Asks during the run (editor.pickPoint / prompt / ask), so it can't
|
|
3173
|
+
* run headless: headless runners refuse it up front. */
|
|
3174
|
+
requiresEditor?: boolean;
|
|
2683
3175
|
/** Declared parameters (the blocks' ParamDef table): prompted in the
|
|
2684
3176
|
* editor before `run`, or passed by a headless caller; arrive as
|
|
2685
3177
|
* `ctx.params`. Absent when the command declares none. */
|
|
2686
3178
|
params?: ParamDef[];
|
|
2687
3179
|
}
|
|
3180
|
+
/** A command input: any input kind but `host` (block-only). */
|
|
3181
|
+
type CommandInputDef = Exclude<InputDef, {
|
|
3182
|
+
type: "host";
|
|
3183
|
+
}>;
|
|
2688
3184
|
/** Non-throwing meta lookup for list UIs. */
|
|
2689
3185
|
type CommandMetaResult = {
|
|
2690
3186
|
ok: true;
|
|
@@ -2719,6 +3215,12 @@ interface SnapSegment extends Segment {
|
|
|
2719
3215
|
* exact curve in the nearest tier.
|
|
2720
3216
|
*/
|
|
2721
3217
|
chord?: boolean;
|
|
3218
|
+
/**
|
|
3219
|
+
* True for facets of a curve that HAS no exact form in the entry (a
|
|
3220
|
+
* spline's samples): they take part in everything — intersections,
|
|
3221
|
+
* nearest, perpendicular — except extension snapping.
|
|
3222
|
+
*/
|
|
3223
|
+
facet?: boolean;
|
|
2722
3224
|
}
|
|
2723
3225
|
/** Cached per-object snap geometry (also serves hit-testing). */
|
|
2724
3226
|
interface SnapCacheEntry {
|
|
@@ -2968,6 +3470,35 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2968
3470
|
ratio: z.ZodNumber;
|
|
2969
3471
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
2970
3472
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
3473
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3474
|
+
id: z.ZodString;
|
|
3475
|
+
layerId: z.ZodString;
|
|
3476
|
+
color: z.ZodOptional<z.ZodString>;
|
|
3477
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
3478
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
3479
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
3480
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
3481
|
+
degree: z.ZodNumber;
|
|
3482
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
3483
|
+
x: z.ZodNumber;
|
|
3484
|
+
y: z.ZodNumber;
|
|
3485
|
+
}, z.core.$strip>, unknown>>;
|
|
3486
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
3487
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
3488
|
+
type: z.ZodLiteral<"spline">;
|
|
3489
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
3490
|
+
x: z.ZodNumber;
|
|
3491
|
+
y: z.ZodNumber;
|
|
3492
|
+
}, z.core.$strip>, unknown>>>;
|
|
3493
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
3494
|
+
x: z.ZodNumber;
|
|
3495
|
+
y: z.ZodNumber;
|
|
3496
|
+
}, z.core.$strip>, unknown>>;
|
|
3497
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
3498
|
+
x: z.ZodNumber;
|
|
3499
|
+
y: z.ZodNumber;
|
|
3500
|
+
}, z.core.$strip>, unknown>>;
|
|
3501
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
2971
3502
|
}, z.core.$strip>, z.ZodObject<{
|
|
2972
3503
|
id: z.ZodString;
|
|
2973
3504
|
layerId: z.ZodString;
|
|
@@ -2978,11 +3509,52 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2978
3509
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
2979
3510
|
type: z.ZodLiteral<"hatch">;
|
|
2980
3511
|
loops: z.ZodArray<z.ZodObject<{
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
3512
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3513
|
+
kind: z.ZodLiteral<"line">;
|
|
3514
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
3515
|
+
x: z.ZodNumber;
|
|
3516
|
+
y: z.ZodNumber;
|
|
3517
|
+
}, z.core.$strip>, unknown>;
|
|
3518
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
3519
|
+
x: z.ZodNumber;
|
|
3520
|
+
y: z.ZodNumber;
|
|
3521
|
+
}, z.core.$strip>, unknown>;
|
|
3522
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3523
|
+
kind: z.ZodLiteral<"arc">;
|
|
3524
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
3525
|
+
x: z.ZodNumber;
|
|
3526
|
+
y: z.ZodNumber;
|
|
3527
|
+
}, z.core.$strip>, unknown>;
|
|
3528
|
+
radius: z.ZodNumber;
|
|
3529
|
+
startAngle: z.ZodNumber;
|
|
3530
|
+
endAngle: z.ZodNumber;
|
|
3531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3532
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
3533
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
3534
|
+
x: z.ZodNumber;
|
|
3535
|
+
y: z.ZodNumber;
|
|
3536
|
+
}, z.core.$strip>, unknown>;
|
|
3537
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
3538
|
+
x: z.ZodNumber;
|
|
3539
|
+
y: z.ZodNumber;
|
|
3540
|
+
}, z.core.$strip>, unknown>;
|
|
3541
|
+
ratio: z.ZodNumber;
|
|
3542
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
3543
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
3544
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3545
|
+
degree: z.ZodNumber;
|
|
3546
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
3547
|
+
x: z.ZodNumber;
|
|
3548
|
+
y: z.ZodNumber;
|
|
3549
|
+
}, z.core.$strip>, unknown>>;
|
|
3550
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
3551
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
3552
|
+
kind: z.ZodLiteral<"spline">;
|
|
3553
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
3554
|
+
x: z.ZodNumber;
|
|
3555
|
+
y: z.ZodNumber;
|
|
3556
|
+
}, z.core.$strip>, unknown>>>;
|
|
3557
|
+
}, z.core.$strip>], "kind">>;
|
|
2986
3558
|
}, z.core.$strip>>;
|
|
2987
3559
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2988
3560
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -3156,11 +3728,17 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3156
3728
|
definitionId: z.ZodString;
|
|
3157
3729
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
3158
3730
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
3159
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
3160
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
3731
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
3732
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
3733
|
+
x: z.ZodNumber;
|
|
3734
|
+
y: z.ZodNumber;
|
|
3735
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
3736
|
+
x: z.ZodNumber;
|
|
3737
|
+
y: z.ZodNumber;
|
|
3738
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
3161
3739
|
x: z.ZodNumber;
|
|
3162
3740
|
y: z.ZodNumber;
|
|
3163
|
-
}, z.core.$strip>, unknown
|
|
3741
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
3164
3742
|
}, z.core.$strip>, z.ZodObject<{
|
|
3165
3743
|
id: z.ZodString;
|
|
3166
3744
|
layerId: z.ZodString;
|
|
@@ -3447,6 +4025,35 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3447
4025
|
ratio: z.ZodNumber;
|
|
3448
4026
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
3449
4027
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
4028
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4029
|
+
id: z.ZodString;
|
|
4030
|
+
layerId: z.ZodString;
|
|
4031
|
+
color: z.ZodOptional<z.ZodString>;
|
|
4032
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
4033
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
4034
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
4035
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
4036
|
+
degree: z.ZodNumber;
|
|
4037
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4038
|
+
x: z.ZodNumber;
|
|
4039
|
+
y: z.ZodNumber;
|
|
4040
|
+
}, z.core.$strip>, unknown>>;
|
|
4041
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
4042
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4043
|
+
type: z.ZodLiteral<"spline">;
|
|
4044
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4045
|
+
x: z.ZodNumber;
|
|
4046
|
+
y: z.ZodNumber;
|
|
4047
|
+
}, z.core.$strip>, unknown>>>;
|
|
4048
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
4049
|
+
x: z.ZodNumber;
|
|
4050
|
+
y: z.ZodNumber;
|
|
4051
|
+
}, z.core.$strip>, unknown>>;
|
|
4052
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
4053
|
+
x: z.ZodNumber;
|
|
4054
|
+
y: z.ZodNumber;
|
|
4055
|
+
}, z.core.$strip>, unknown>>;
|
|
4056
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
3450
4057
|
}, z.core.$strip>, z.ZodObject<{
|
|
3451
4058
|
id: z.ZodString;
|
|
3452
4059
|
layerId: z.ZodString;
|
|
@@ -3457,11 +4064,52 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3457
4064
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
3458
4065
|
type: z.ZodLiteral<"hatch">;
|
|
3459
4066
|
loops: z.ZodArray<z.ZodObject<{
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
4067
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4068
|
+
kind: z.ZodLiteral<"line">;
|
|
4069
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
4070
|
+
x: z.ZodNumber;
|
|
4071
|
+
y: z.ZodNumber;
|
|
4072
|
+
}, z.core.$strip>, unknown>;
|
|
4073
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
4074
|
+
x: z.ZodNumber;
|
|
4075
|
+
y: z.ZodNumber;
|
|
4076
|
+
}, z.core.$strip>, unknown>;
|
|
4077
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4078
|
+
kind: z.ZodLiteral<"arc">;
|
|
4079
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
4080
|
+
x: z.ZodNumber;
|
|
4081
|
+
y: z.ZodNumber;
|
|
4082
|
+
}, z.core.$strip>, unknown>;
|
|
4083
|
+
radius: z.ZodNumber;
|
|
4084
|
+
startAngle: z.ZodNumber;
|
|
4085
|
+
endAngle: z.ZodNumber;
|
|
4086
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4087
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
4088
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
4089
|
+
x: z.ZodNumber;
|
|
4090
|
+
y: z.ZodNumber;
|
|
4091
|
+
}, z.core.$strip>, unknown>;
|
|
4092
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
4093
|
+
x: z.ZodNumber;
|
|
4094
|
+
y: z.ZodNumber;
|
|
4095
|
+
}, z.core.$strip>, unknown>;
|
|
4096
|
+
ratio: z.ZodNumber;
|
|
4097
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
4098
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
4099
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4100
|
+
degree: z.ZodNumber;
|
|
4101
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4102
|
+
x: z.ZodNumber;
|
|
4103
|
+
y: z.ZodNumber;
|
|
4104
|
+
}, z.core.$strip>, unknown>>;
|
|
4105
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
4106
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4107
|
+
kind: z.ZodLiteral<"spline">;
|
|
4108
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4109
|
+
x: z.ZodNumber;
|
|
4110
|
+
y: z.ZodNumber;
|
|
4111
|
+
}, z.core.$strip>, unknown>>>;
|
|
4112
|
+
}, z.core.$strip>], "kind">>;
|
|
3465
4113
|
}, z.core.$strip>>;
|
|
3466
4114
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3467
4115
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -3635,11 +4283,17 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3635
4283
|
definitionId: z.ZodString;
|
|
3636
4284
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
3637
4285
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
3638
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
3639
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
4286
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
4287
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
4288
|
+
x: z.ZodNumber;
|
|
4289
|
+
y: z.ZodNumber;
|
|
4290
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
4291
|
+
x: z.ZodNumber;
|
|
4292
|
+
y: z.ZodNumber;
|
|
4293
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
3640
4294
|
x: z.ZodNumber;
|
|
3641
4295
|
y: z.ZodNumber;
|
|
3642
|
-
}, z.core.$strip>, unknown
|
|
4296
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
3643
4297
|
}, z.core.$strip>, z.ZodObject<{
|
|
3644
4298
|
id: z.ZodString;
|
|
3645
4299
|
layerId: z.ZodString;
|
|
@@ -3898,6 +4552,7 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3898
4552
|
in: "in";
|
|
3899
4553
|
mm: "mm";
|
|
3900
4554
|
}>>;
|
|
4555
|
+
modelScale: z.ZodDefault<z.ZodNumber>;
|
|
3901
4556
|
}, z.core.$strip>;
|
|
3902
4557
|
}, z.core.$strip>, z.ZodObject<{
|
|
3903
4558
|
type: z.ZodLiteral<"add-layout">;
|
|
@@ -4008,6 +4663,35 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4008
4663
|
ratio: z.ZodNumber;
|
|
4009
4664
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
4010
4665
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
4666
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4667
|
+
id: z.ZodString;
|
|
4668
|
+
layerId: z.ZodString;
|
|
4669
|
+
color: z.ZodOptional<z.ZodString>;
|
|
4670
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
4671
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
4672
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
4673
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
4674
|
+
degree: z.ZodNumber;
|
|
4675
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4676
|
+
x: z.ZodNumber;
|
|
4677
|
+
y: z.ZodNumber;
|
|
4678
|
+
}, z.core.$strip>, unknown>>;
|
|
4679
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
4680
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4681
|
+
type: z.ZodLiteral<"spline">;
|
|
4682
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4683
|
+
x: z.ZodNumber;
|
|
4684
|
+
y: z.ZodNumber;
|
|
4685
|
+
}, z.core.$strip>, unknown>>>;
|
|
4686
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
4687
|
+
x: z.ZodNumber;
|
|
4688
|
+
y: z.ZodNumber;
|
|
4689
|
+
}, z.core.$strip>, unknown>>;
|
|
4690
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
4691
|
+
x: z.ZodNumber;
|
|
4692
|
+
y: z.ZodNumber;
|
|
4693
|
+
}, z.core.$strip>, unknown>>;
|
|
4694
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
4011
4695
|
}, z.core.$strip>, z.ZodObject<{
|
|
4012
4696
|
id: z.ZodString;
|
|
4013
4697
|
layerId: z.ZodString;
|
|
@@ -4018,11 +4702,52 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4018
4702
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
4019
4703
|
type: z.ZodLiteral<"hatch">;
|
|
4020
4704
|
loops: z.ZodArray<z.ZodObject<{
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4705
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4706
|
+
kind: z.ZodLiteral<"line">;
|
|
4707
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
4708
|
+
x: z.ZodNumber;
|
|
4709
|
+
y: z.ZodNumber;
|
|
4710
|
+
}, z.core.$strip>, unknown>;
|
|
4711
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
4712
|
+
x: z.ZodNumber;
|
|
4713
|
+
y: z.ZodNumber;
|
|
4714
|
+
}, z.core.$strip>, unknown>;
|
|
4715
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4716
|
+
kind: z.ZodLiteral<"arc">;
|
|
4717
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
4718
|
+
x: z.ZodNumber;
|
|
4719
|
+
y: z.ZodNumber;
|
|
4720
|
+
}, z.core.$strip>, unknown>;
|
|
4721
|
+
radius: z.ZodNumber;
|
|
4722
|
+
startAngle: z.ZodNumber;
|
|
4723
|
+
endAngle: z.ZodNumber;
|
|
4724
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4725
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
4726
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
4727
|
+
x: z.ZodNumber;
|
|
4728
|
+
y: z.ZodNumber;
|
|
4729
|
+
}, z.core.$strip>, unknown>;
|
|
4730
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
4731
|
+
x: z.ZodNumber;
|
|
4732
|
+
y: z.ZodNumber;
|
|
4733
|
+
}, z.core.$strip>, unknown>;
|
|
4734
|
+
ratio: z.ZodNumber;
|
|
4735
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
4736
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
4737
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4738
|
+
degree: z.ZodNumber;
|
|
4739
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4740
|
+
x: z.ZodNumber;
|
|
4741
|
+
y: z.ZodNumber;
|
|
4742
|
+
}, z.core.$strip>, unknown>>;
|
|
4743
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
4744
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4745
|
+
kind: z.ZodLiteral<"spline">;
|
|
4746
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4747
|
+
x: z.ZodNumber;
|
|
4748
|
+
y: z.ZodNumber;
|
|
4749
|
+
}, z.core.$strip>, unknown>>>;
|
|
4750
|
+
}, z.core.$strip>], "kind">>;
|
|
4026
4751
|
}, z.core.$strip>>;
|
|
4027
4752
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4028
4753
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -4196,11 +4921,17 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4196
4921
|
definitionId: z.ZodString;
|
|
4197
4922
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
4198
4923
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
4199
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
4200
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
4924
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
4925
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
4201
4926
|
x: z.ZodNumber;
|
|
4202
4927
|
y: z.ZodNumber;
|
|
4203
|
-
}, z.core.$strip>, unknown>, z.ZodString]
|
|
4928
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
4929
|
+
x: z.ZodNumber;
|
|
4930
|
+
y: z.ZodNumber;
|
|
4931
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4932
|
+
x: z.ZodNumber;
|
|
4933
|
+
y: z.ZodNumber;
|
|
4934
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
4204
4935
|
}, z.core.$strip>, z.ZodObject<{
|
|
4205
4936
|
id: z.ZodString;
|
|
4206
4937
|
layerId: z.ZodString;
|
|
@@ -4516,6 +5247,35 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4516
5247
|
ratio: z.ZodNumber;
|
|
4517
5248
|
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
4518
5249
|
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
5250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5251
|
+
id: z.ZodString;
|
|
5252
|
+
layerId: z.ZodString;
|
|
5253
|
+
color: z.ZodOptional<z.ZodString>;
|
|
5254
|
+
lineType: z.ZodOptional<z.ZodString>;
|
|
5255
|
+
lineTypeScale: z.ZodOptional<z.ZodNumber>;
|
|
5256
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
|
5257
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
5258
|
+
degree: z.ZodNumber;
|
|
5259
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
5260
|
+
x: z.ZodNumber;
|
|
5261
|
+
y: z.ZodNumber;
|
|
5262
|
+
}, z.core.$strip>, unknown>>;
|
|
5263
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
5264
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
5265
|
+
type: z.ZodLiteral<"spline">;
|
|
5266
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
5267
|
+
x: z.ZodNumber;
|
|
5268
|
+
y: z.ZodNumber;
|
|
5269
|
+
}, z.core.$strip>, unknown>>>;
|
|
5270
|
+
startTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
5271
|
+
x: z.ZodNumber;
|
|
5272
|
+
y: z.ZodNumber;
|
|
5273
|
+
}, z.core.$strip>, unknown>>;
|
|
5274
|
+
endTangent: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
5275
|
+
x: z.ZodNumber;
|
|
5276
|
+
y: z.ZodNumber;
|
|
5277
|
+
}, z.core.$strip>, unknown>>;
|
|
5278
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
4519
5279
|
}, z.core.$strip>, z.ZodObject<{
|
|
4520
5280
|
id: z.ZodString;
|
|
4521
5281
|
layerId: z.ZodString;
|
|
@@ -4526,11 +5286,52 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4526
5286
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
4527
5287
|
type: z.ZodLiteral<"hatch">;
|
|
4528
5288
|
loops: z.ZodArray<z.ZodObject<{
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
5289
|
+
edges: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5290
|
+
kind: z.ZodLiteral<"line">;
|
|
5291
|
+
a: z.ZodPreprocess<z.ZodObject<{
|
|
5292
|
+
x: z.ZodNumber;
|
|
5293
|
+
y: z.ZodNumber;
|
|
5294
|
+
}, z.core.$strip>, unknown>;
|
|
5295
|
+
b: z.ZodPreprocess<z.ZodObject<{
|
|
5296
|
+
x: z.ZodNumber;
|
|
5297
|
+
y: z.ZodNumber;
|
|
5298
|
+
}, z.core.$strip>, unknown>;
|
|
5299
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5300
|
+
kind: z.ZodLiteral<"arc">;
|
|
5301
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
5302
|
+
x: z.ZodNumber;
|
|
5303
|
+
y: z.ZodNumber;
|
|
5304
|
+
}, z.core.$strip>, unknown>;
|
|
5305
|
+
radius: z.ZodNumber;
|
|
5306
|
+
startAngle: z.ZodNumber;
|
|
5307
|
+
endAngle: z.ZodNumber;
|
|
5308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5309
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
5310
|
+
center: z.ZodPreprocess<z.ZodObject<{
|
|
5311
|
+
x: z.ZodNumber;
|
|
5312
|
+
y: z.ZodNumber;
|
|
5313
|
+
}, z.core.$strip>, unknown>;
|
|
5314
|
+
majorAxis: z.ZodPreprocess<z.ZodObject<{
|
|
5315
|
+
x: z.ZodNumber;
|
|
5316
|
+
y: z.ZodNumber;
|
|
5317
|
+
}, z.core.$strip>, unknown>;
|
|
5318
|
+
ratio: z.ZodNumber;
|
|
5319
|
+
startAngle: z.ZodDefault<z.ZodNumber>;
|
|
5320
|
+
endAngle: z.ZodDefault<z.ZodNumber>;
|
|
5321
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5322
|
+
degree: z.ZodNumber;
|
|
5323
|
+
controlPoints: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
5324
|
+
x: z.ZodNumber;
|
|
5325
|
+
y: z.ZodNumber;
|
|
5326
|
+
}, z.core.$strip>, unknown>>;
|
|
5327
|
+
knots: z.ZodArray<z.ZodNumber>;
|
|
5328
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
5329
|
+
kind: z.ZodLiteral<"spline">;
|
|
5330
|
+
fitPoints: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
5331
|
+
x: z.ZodNumber;
|
|
5332
|
+
y: z.ZodNumber;
|
|
5333
|
+
}, z.core.$strip>, unknown>>>;
|
|
5334
|
+
}, z.core.$strip>], "kind">>;
|
|
4534
5335
|
}, z.core.$strip>>;
|
|
4535
5336
|
fill: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4536
5337
|
kind: z.ZodLiteral<"solid">;
|
|
@@ -4704,11 +5505,17 @@ declare const OperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4704
5505
|
definitionId: z.ZodString;
|
|
4705
5506
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
4706
5507
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
4707
|
-
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString
|
|
4708
|
-
inputs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
5508
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodJSONSchema]>>>;
|
|
5509
|
+
inputs: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
5510
|
+
x: z.ZodNumber;
|
|
5511
|
+
y: z.ZodNumber;
|
|
5512
|
+
}, z.core.$strip>, unknown>, z.ZodString]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPreprocess<z.ZodObject<{
|
|
5513
|
+
x: z.ZodNumber;
|
|
5514
|
+
y: z.ZodNumber;
|
|
5515
|
+
}, z.core.$strip>, unknown>, z.ZodString, z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
4709
5516
|
x: z.ZodNumber;
|
|
4710
5517
|
y: z.ZodNumber;
|
|
4711
|
-
}, z.core.$strip>, unknown
|
|
5518
|
+
}, z.core.$strip>, unknown>>, z.ZodArray<z.ZodString>]>>]>>;
|
|
4712
5519
|
}, z.core.$strip>, z.ZodObject<{
|
|
4713
5520
|
id: z.ZodString;
|
|
4714
5521
|
layerId: z.ZodString;
|
|
@@ -5227,8 +6034,9 @@ interface DrawingHooks {
|
|
|
5227
6034
|
revision(): number;
|
|
5228
6035
|
/** Text metrics for bounds and DXF (default: approximate font metrics). */
|
|
5229
6036
|
measure?: TextMeasurer;
|
|
5230
|
-
/** Document-wide object lookup for block reference inputs
|
|
5231
|
-
|
|
6037
|
+
/** Document-wide object lookup for block reference inputs (and the
|
|
6038
|
+
* document's block list, for hosted blocks). */
|
|
6039
|
+
resolveObject?: BlockObjectResolver;
|
|
5232
6040
|
/** Loaded reference content (default: the drawing's referenceContent). */
|
|
5233
6041
|
resolveReference?: (ref: Reference) => ReferenceContent | null;
|
|
5234
6042
|
/** Snap/hit-test geometry, e.g. from a cache (default: built per call). */
|
|
@@ -5307,6 +6115,9 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5307
6115
|
private resolveLayer;
|
|
5308
6116
|
/** Patch a layer (rename, color, lineWidth, visible, locked) by name or id. */
|
|
5309
6117
|
updateLayer(nameOrId: string, patch: Partial<Omit<Layer, "id">>): void;
|
|
6118
|
+
/** A layer parsed from `full`, refusing an empty name, unknown fields
|
|
6119
|
+
* and an unknown line type among what the caller `sent`. */
|
|
6120
|
+
private checkedLayer;
|
|
5310
6121
|
/** Remove an EMPTY, non-current layer (the kernel refuses otherwise). */
|
|
5311
6122
|
removeLayer(nameOrId: string): void;
|
|
5312
6123
|
/** Reorder the layers (names or ids, every layer exactly once). */
|
|
@@ -5433,6 +6244,8 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5433
6244
|
reorderLayouts(order: readonly string[]): void;
|
|
5434
6245
|
/** Patch a layout's name / sheet (preset or mm) / print palette. */
|
|
5435
6246
|
updateLayout(nameOrId: string, patch: LayoutPatch): void;
|
|
6247
|
+
/** What names in a new or changed object must resolve against. */
|
|
6248
|
+
private get nameSources();
|
|
5436
6249
|
private normalize;
|
|
5437
6250
|
/**
|
|
5438
6251
|
* Add objects (points may be `[x, y]`; `layer` resolves by name) to model
|
|
@@ -5468,6 +6281,9 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5468
6281
|
* by `delta`. Returns the new ids, one batch per step, in one undo step.
|
|
5469
6282
|
*/
|
|
5470
6283
|
array(ids: readonly string[], count: number, delta: PointInput): string[];
|
|
6284
|
+
/** One displaced copy of `ids` per step, applied as ONE add op per space
|
|
6285
|
+
* (an op per step re-copied the whole space each time: quadratic). */
|
|
6286
|
+
private copySteps;
|
|
5471
6287
|
private get measurer();
|
|
5472
6288
|
private resolveObject;
|
|
5473
6289
|
private ctx;
|
|
@@ -5509,11 +6325,21 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5509
6325
|
lineTypeScale?: number | undefined;
|
|
5510
6326
|
lineWidth?: number | undefined;
|
|
5511
6327
|
opacity?: number | undefined;
|
|
5512
|
-
type: "
|
|
5513
|
-
|
|
6328
|
+
type: "block";
|
|
6329
|
+
definitionId: string;
|
|
6330
|
+
rotation: number;
|
|
6331
|
+
scale: number;
|
|
6332
|
+
params: Record<string, string[] | number[] | z.JSONType>;
|
|
6333
|
+
inputs: (string | {
|
|
5514
6334
|
x: number;
|
|
5515
6335
|
y: number;
|
|
5516
|
-
}
|
|
6336
|
+
})[] | Record<string, string | string[] | {
|
|
6337
|
+
x: number;
|
|
6338
|
+
y: number;
|
|
6339
|
+
}[] | {
|
|
6340
|
+
x: number;
|
|
6341
|
+
y: number;
|
|
6342
|
+
}>;
|
|
5517
6343
|
} | {
|
|
5518
6344
|
id: string;
|
|
5519
6345
|
layerId: string;
|
|
@@ -5522,15 +6348,27 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5522
6348
|
lineTypeScale?: number | undefined;
|
|
5523
6349
|
lineWidth?: number | undefined;
|
|
5524
6350
|
opacity?: number | undefined;
|
|
5525
|
-
|
|
5526
|
-
|
|
6351
|
+
degree: number;
|
|
6352
|
+
controlPoints: {
|
|
5527
6353
|
x: number;
|
|
5528
6354
|
y: number;
|
|
5529
|
-
};
|
|
5530
|
-
|
|
6355
|
+
}[];
|
|
6356
|
+
knots: number[];
|
|
6357
|
+
weights?: number[] | undefined;
|
|
6358
|
+
type: "spline";
|
|
6359
|
+
fitPoints?: {
|
|
5531
6360
|
x: number;
|
|
5532
6361
|
y: number;
|
|
5533
|
-
};
|
|
6362
|
+
}[] | undefined;
|
|
6363
|
+
startTangent?: {
|
|
6364
|
+
x: number;
|
|
6365
|
+
y: number;
|
|
6366
|
+
} | undefined;
|
|
6367
|
+
endTangent?: {
|
|
6368
|
+
x: number;
|
|
6369
|
+
y: number;
|
|
6370
|
+
} | undefined;
|
|
6371
|
+
closed: boolean;
|
|
5534
6372
|
} | {
|
|
5535
6373
|
id: string;
|
|
5536
6374
|
layerId: string;
|
|
@@ -5539,13 +6377,15 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5539
6377
|
lineTypeScale?: number | undefined;
|
|
5540
6378
|
lineWidth?: number | undefined;
|
|
5541
6379
|
opacity?: number | undefined;
|
|
5542
|
-
type: "
|
|
5543
|
-
|
|
6380
|
+
type: "line";
|
|
6381
|
+
a: {
|
|
5544
6382
|
x: number;
|
|
5545
6383
|
y: number;
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
6384
|
+
};
|
|
6385
|
+
b: {
|
|
6386
|
+
x: number;
|
|
6387
|
+
y: number;
|
|
6388
|
+
};
|
|
5549
6389
|
} | {
|
|
5550
6390
|
id: string;
|
|
5551
6391
|
layerId: string;
|
|
@@ -5554,12 +6394,14 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5554
6394
|
lineTypeScale?: number | undefined;
|
|
5555
6395
|
lineWidth?: number | undefined;
|
|
5556
6396
|
opacity?: number | undefined;
|
|
5557
|
-
type: "
|
|
6397
|
+
type: "arc";
|
|
5558
6398
|
center: {
|
|
5559
6399
|
x: number;
|
|
5560
6400
|
y: number;
|
|
5561
6401
|
};
|
|
5562
6402
|
radius: number;
|
|
6403
|
+
startAngle: number;
|
|
6404
|
+
endAngle: number;
|
|
5563
6405
|
} | {
|
|
5564
6406
|
id: string;
|
|
5565
6407
|
layerId: string;
|
|
@@ -5568,14 +6410,12 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5568
6410
|
lineTypeScale?: number | undefined;
|
|
5569
6411
|
lineWidth?: number | undefined;
|
|
5570
6412
|
opacity?: number | undefined;
|
|
5571
|
-
type: "
|
|
6413
|
+
type: "circle";
|
|
5572
6414
|
center: {
|
|
5573
6415
|
x: number;
|
|
5574
6416
|
y: number;
|
|
5575
6417
|
};
|
|
5576
6418
|
radius: number;
|
|
5577
|
-
startAngle: number;
|
|
5578
|
-
endAngle: number;
|
|
5579
6419
|
} | {
|
|
5580
6420
|
id: string;
|
|
5581
6421
|
layerId: string;
|
|
@@ -5596,6 +6436,34 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5596
6436
|
ratio: number;
|
|
5597
6437
|
startAngle: number;
|
|
5598
6438
|
endAngle: number;
|
|
6439
|
+
} | {
|
|
6440
|
+
id: string;
|
|
6441
|
+
layerId: string;
|
|
6442
|
+
color?: string | undefined;
|
|
6443
|
+
lineType?: string | undefined;
|
|
6444
|
+
lineTypeScale?: number | undefined;
|
|
6445
|
+
lineWidth?: number | undefined;
|
|
6446
|
+
opacity?: number | undefined;
|
|
6447
|
+
type: "polyline";
|
|
6448
|
+
points: {
|
|
6449
|
+
x: number;
|
|
6450
|
+
y: number;
|
|
6451
|
+
bulge: number;
|
|
6452
|
+
}[];
|
|
6453
|
+
closed: boolean;
|
|
6454
|
+
} | {
|
|
6455
|
+
id: string;
|
|
6456
|
+
layerId: string;
|
|
6457
|
+
color?: string | undefined;
|
|
6458
|
+
lineType?: string | undefined;
|
|
6459
|
+
lineTypeScale?: number | undefined;
|
|
6460
|
+
lineWidth?: number | undefined;
|
|
6461
|
+
opacity?: number | undefined;
|
|
6462
|
+
type: "point";
|
|
6463
|
+
p: {
|
|
6464
|
+
x: number;
|
|
6465
|
+
y: number;
|
|
6466
|
+
};
|
|
5599
6467
|
} | {
|
|
5600
6468
|
id: string;
|
|
5601
6469
|
layerId: string;
|
|
@@ -5606,11 +6474,52 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5606
6474
|
opacity?: number | undefined;
|
|
5607
6475
|
type: "hatch";
|
|
5608
6476
|
loops: {
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
6477
|
+
edges: ({
|
|
6478
|
+
degree: number;
|
|
6479
|
+
controlPoints: {
|
|
6480
|
+
x: number;
|
|
6481
|
+
y: number;
|
|
6482
|
+
}[];
|
|
6483
|
+
knots: number[];
|
|
6484
|
+
weights?: number[] | undefined;
|
|
6485
|
+
kind: "spline";
|
|
6486
|
+
fitPoints?: {
|
|
6487
|
+
x: number;
|
|
6488
|
+
y: number;
|
|
6489
|
+
}[] | undefined;
|
|
6490
|
+
} | {
|
|
6491
|
+
kind: "line";
|
|
6492
|
+
a: {
|
|
6493
|
+
x: number;
|
|
6494
|
+
y: number;
|
|
6495
|
+
};
|
|
6496
|
+
b: {
|
|
6497
|
+
x: number;
|
|
6498
|
+
y: number;
|
|
6499
|
+
};
|
|
6500
|
+
} | {
|
|
6501
|
+
kind: "arc";
|
|
6502
|
+
center: {
|
|
6503
|
+
x: number;
|
|
6504
|
+
y: number;
|
|
6505
|
+
};
|
|
6506
|
+
radius: number;
|
|
6507
|
+
startAngle: number;
|
|
6508
|
+
endAngle: number;
|
|
6509
|
+
} | {
|
|
6510
|
+
kind: "ellipse";
|
|
6511
|
+
center: {
|
|
6512
|
+
x: number;
|
|
6513
|
+
y: number;
|
|
6514
|
+
};
|
|
6515
|
+
majorAxis: {
|
|
6516
|
+
x: number;
|
|
6517
|
+
y: number;
|
|
6518
|
+
};
|
|
6519
|
+
ratio: number;
|
|
6520
|
+
startAngle: number;
|
|
6521
|
+
endAngle: number;
|
|
6522
|
+
})[];
|
|
5614
6523
|
}[];
|
|
5615
6524
|
fill: {
|
|
5616
6525
|
kind: "solid";
|
|
@@ -5728,23 +6637,6 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5728
6637
|
precision?: number | undefined;
|
|
5729
6638
|
} | undefined;
|
|
5730
6639
|
scale: number;
|
|
5731
|
-
} | {
|
|
5732
|
-
id: string;
|
|
5733
|
-
layerId: string;
|
|
5734
|
-
color?: string | undefined;
|
|
5735
|
-
lineType?: string | undefined;
|
|
5736
|
-
lineTypeScale?: number | undefined;
|
|
5737
|
-
lineWidth?: number | undefined;
|
|
5738
|
-
opacity?: number | undefined;
|
|
5739
|
-
type: "block";
|
|
5740
|
-
definitionId: string;
|
|
5741
|
-
rotation: number;
|
|
5742
|
-
scale: number;
|
|
5743
|
-
params: Record<string, string | number | boolean | string[] | number[]>;
|
|
5744
|
-
inputs: (string | {
|
|
5745
|
-
x: number;
|
|
5746
|
-
y: number;
|
|
5747
|
-
})[];
|
|
5748
6640
|
} | {
|
|
5749
6641
|
id: string;
|
|
5750
6642
|
layerId: string;
|
|
@@ -5892,7 +6784,7 @@ declare class LocalDrawing implements Drawing$1 {
|
|
|
5892
6784
|
maxY: number;
|
|
5893
6785
|
} | undefined;
|
|
5894
6786
|
})[];
|
|
5895
|
-
resolveObject:
|
|
6787
|
+
resolveObject: BlockObjectResolver;
|
|
5896
6788
|
resolveReference: (ref: Reference) => ReferenceContent | null;
|
|
5897
6789
|
};
|
|
5898
6790
|
protected resolveLayout(nameOrId: string): PaperLayout;
|
|
@@ -6001,11 +6893,64 @@ type EllipseInput = ObjectInputShape<{
|
|
|
6001
6893
|
startAngle?: number;
|
|
6002
6894
|
endAngle?: number;
|
|
6003
6895
|
}>;
|
|
6896
|
+
/**
|
|
6897
|
+
* A NURBS curve (DXF SPLINE). `knots` number controlPoints + degree + 1,
|
|
6898
|
+
* non-decreasing; `weights` (one per control point) make it rational. With
|
|
6899
|
+
* `fitPoints` the curve was drawn through them. Easiest to create through
|
|
6900
|
+
* points: `splineThrough(points)` from "lineadraw/helpers".
|
|
6901
|
+
*/
|
|
6902
|
+
type SplineInput = ObjectInputShape<{
|
|
6903
|
+
type: "spline";
|
|
6904
|
+
degree: number;
|
|
6905
|
+
controlPoints: readonly Vec2Like[];
|
|
6906
|
+
knots: readonly number[];
|
|
6907
|
+
weights?: readonly number[];
|
|
6908
|
+
fitPoints?: readonly Vec2Like[];
|
|
6909
|
+
/** Fit splines: the direction the curve leaves its first fit point. */
|
|
6910
|
+
startTangent?: Vec2Like;
|
|
6911
|
+
/** Fit splines: the direction the curve arrives at its last fit point. */
|
|
6912
|
+
endTangent?: Vec2Like;
|
|
6913
|
+
closed?: boolean;
|
|
6914
|
+
}>;
|
|
6915
|
+
/**
|
|
6916
|
+
* A hatch boundary edge — the geometry of a line, an arc, an elliptic arc or
|
|
6917
|
+
* a spline. An arc runs CCW from startAngle to endAngle (equal = a full
|
|
6918
|
+
* circle); an ellipse in DXF form (parameters, 0 → 2π = whole). Edges are
|
|
6919
|
+
* chained by their ends, stored in either direction. A polygon or bulged
|
|
6920
|
+
* outline: `hatchLoop(points)` from "lineadraw/helpers".
|
|
6921
|
+
*/
|
|
6922
|
+
type HatchEdgeInput = {
|
|
6923
|
+
kind: "line";
|
|
6924
|
+
a: Vec2Like;
|
|
6925
|
+
b: Vec2Like;
|
|
6926
|
+
} | {
|
|
6927
|
+
kind: "arc";
|
|
6928
|
+
center: Vec2Like;
|
|
6929
|
+
radius: number;
|
|
6930
|
+
startAngle: number;
|
|
6931
|
+
endAngle: number;
|
|
6932
|
+
} | {
|
|
6933
|
+
kind: "ellipse";
|
|
6934
|
+
center: Vec2Like;
|
|
6935
|
+
majorAxis: Vec2Like;
|
|
6936
|
+
ratio: number;
|
|
6937
|
+
startAngle?: number;
|
|
6938
|
+
endAngle?: number;
|
|
6939
|
+
} | {
|
|
6940
|
+
kind: "spline";
|
|
6941
|
+
degree: number;
|
|
6942
|
+
controlPoints: readonly Vec2Like[];
|
|
6943
|
+
knots: readonly number[];
|
|
6944
|
+
weights?: readonly number[];
|
|
6945
|
+
/** Drawn through points: those points, as on a spline. */
|
|
6946
|
+
fitPoints?: readonly Vec2Like[];
|
|
6947
|
+
};
|
|
6004
6948
|
type HatchInput = ObjectInputShape<{
|
|
6005
6949
|
type: "hatch";
|
|
6006
|
-
/** loops[0] = outer boundary, the rest are holes (even-odd)
|
|
6950
|
+
/** loops[0] = outer boundary, the rest are holes (even-odd); each a
|
|
6951
|
+
* closed chain of edges (a circle, ellipse or closed spline is one). */
|
|
6007
6952
|
loops: readonly {
|
|
6008
|
-
|
|
6953
|
+
edges: readonly HatchEdgeInput[];
|
|
6009
6954
|
}[];
|
|
6010
6955
|
fill?: {
|
|
6011
6956
|
kind: "solid";
|
|
@@ -6109,9 +7054,12 @@ type BlockInput = ObjectInputShape<{
|
|
|
6109
7054
|
/** Applied last, about the pivot (the first input point). */
|
|
6110
7055
|
rotation?: number;
|
|
6111
7056
|
scale?: number;
|
|
6112
|
-
params?: Record<string, number | string | boolean | readonly number[] | readonly string[]>;
|
|
6113
|
-
/** Input points in the PARENT's local coords
|
|
6114
|
-
|
|
7057
|
+
params?: Record<string, number | string | boolean | readonly number[] | readonly string[] | JsonValue>;
|
|
7058
|
+
/** Input points in the PARENT's local coords (the first is the pivot):
|
|
7059
|
+
* in pick order, or by input name for a block declaring an `inputs`
|
|
7060
|
+
* table. Object ids (a `host`, picked objects) only on instances a
|
|
7061
|
+
* script ADDS to the document — a block's own children can't reference. */
|
|
7062
|
+
inputs?: readonly Vec2Like[] | Readonly<Record<string, Vec2Like | readonly Vec2Like[] | string | readonly string[]>>;
|
|
6115
7063
|
}>;
|
|
6116
7064
|
/** A table cell: plain text, or text with merge / alignment / style. */
|
|
6117
7065
|
type TableCellInput = string | {
|
|
@@ -6207,7 +7155,7 @@ type ViewportInput = ObjectInputShape<{
|
|
|
6207
7155
|
modelCenter?: Vec2Like;
|
|
6208
7156
|
/** Drawing-scale denominator (model mm per paper mm); 1:50 => 50. */
|
|
6209
7157
|
scale?: number;
|
|
6210
|
-
/** Pinned: no pan/zoom-through, no move/resize
|
|
7158
|
+
/** Pinned: no pan/zoom-through, no move/resize handles. */
|
|
6211
7159
|
locked?: boolean;
|
|
6212
7160
|
/** Layer ids hidden in this viewport only. */
|
|
6213
7161
|
hiddenLayerIds?: readonly string[];
|
|
@@ -6222,7 +7170,7 @@ type CommentInput = ObjectInputShape<{
|
|
|
6222
7170
|
}>;
|
|
6223
7171
|
/** What a script WRITES — the union of the authoring DTOs above (what
|
|
6224
7172
|
* `document.add` takes). Reads return `ModelObject`. */
|
|
6225
|
-
type ModelObjectInput$1 = LineInput | PointInput$1 | PolylineInput | CircleInput | ArcInput | EllipseInput | HatchInput | TextInput | DimensionInput | BlockInput | TableInput | ViewportInput | CommentInput | ReferenceInput;
|
|
7173
|
+
type ModelObjectInput$1 = LineInput | PointInput$1 | PolylineInput | CircleInput | ArcInput | EllipseInput | SplineInput | HatchInput | TextInput | DimensionInput | BlockInput | TableInput | ViewportInput | CommentInput | ReferenceInput;
|
|
6226
7174
|
/** Text style keys a text, table or table cell may override. */
|
|
6227
7175
|
type TextStyleOverride = Partial<Omit<TextStyle, "id" | "name">>;
|
|
6228
7176
|
/** Dimension style keys a dimension may override. */
|
|
@@ -6260,6 +7208,10 @@ type DimStyle = {
|
|
|
6260
7208
|
readonly extensionOvershoot: number;
|
|
6261
7209
|
readonly precision: number;
|
|
6262
7210
|
};
|
|
7211
|
+
/** Any JSON value — what a `data` param holds. */
|
|
7212
|
+
type JsonValue = string | number | boolean | null | readonly JsonValue[] | {
|
|
7213
|
+
readonly [key: string]: JsonValue;
|
|
7214
|
+
};
|
|
6263
7215
|
|
|
6264
7216
|
/** A world point in mm, as `[x, y]` or `{x, y}`. */
|
|
6265
7217
|
type PointInput = Vec2$1 | readonly [number, number];
|
|
@@ -6322,7 +7274,8 @@ interface RenderSvgOptions {
|
|
|
6322
7274
|
layout?: string;
|
|
6323
7275
|
bbox?: AABB;
|
|
6324
7276
|
measure?: TextMeasurer;
|
|
6325
|
-
/** Padding around the content bbox, world mm (default
|
|
7277
|
+
/** Padding around the content bbox, world mm (default: model renders 2%
|
|
7278
|
+
* of the drawing's larger side, at least 5; layouts 0). */
|
|
6326
7279
|
padding?: number;
|
|
6327
7280
|
/** Print-style color remap ("monochrome" = everything black — use with a
|
|
6328
7281
|
* white background so light editor-theme layers stay visible). Default:
|
|
@@ -6513,8 +7466,10 @@ interface Drawing$1 {
|
|
|
6513
7466
|
* capability) embedded, every page a raster reference at true scale. */
|
|
6514
7467
|
importPdfData(data: ArrayBuffer | Uint8Array, opts?: PdfImportOptions): Promise<PdfImportReport>;
|
|
6515
7468
|
/** Merge block module sources into the document library (verbatim →
|
|
6516
|
-
* skip, same id → replace in place, name clash → suffix).
|
|
6517
|
-
*
|
|
7469
|
+
* skip, same id → replace in place, name clash → suffix). All or
|
|
7470
|
+
* nothing: one source that does not compile or validate rejects the call
|
|
7471
|
+
* and adds none (same for `addUserCommands`). Async: awaits the lazy
|
|
7472
|
+
* transpiler so evaluation is definitive on return. */
|
|
6518
7473
|
addBlockDefinitions(sources: readonly string[]): Promise<MergeReport>;
|
|
6519
7474
|
removeBlockDefinition(id: string): void;
|
|
6520
7475
|
addUserCommands(sources: readonly string[]): Promise<MergeReport>;
|
|
@@ -6559,10 +7514,30 @@ interface EditorSurface {
|
|
|
6559
7514
|
zoom(to: ZoomTarget): void;
|
|
6560
7515
|
/** Await one snapped world point; rejects when the user cancels. */
|
|
6561
7516
|
pickPoint(opts?: PickPointOptions): Promise<Vec2$1>;
|
|
6562
|
-
/** Await one object click; resolves the object's id.
|
|
7517
|
+
/** Await one object click; resolves the object's id. `types` limits what
|
|
7518
|
+
* can be picked (ModelObject types; empty/absent = any). */
|
|
6563
7519
|
pickObject(opts?: {
|
|
6564
7520
|
label?: string;
|
|
7521
|
+
types?: readonly string[];
|
|
6565
7522
|
}): Promise<string>;
|
|
7523
|
+
/** Await a chain of snapped points (rubber band from the previous);
|
|
7524
|
+
* Enter/Esc finishes once `min` (default 1) is met, `max` ends it.
|
|
7525
|
+
* Rejects when the user cancels below `min`. */
|
|
7526
|
+
pickPoints(opts?: PickPointsOptions): Promise<Vec2$1[]>;
|
|
7527
|
+
/** Await several object picks (each once); Enter/Esc finishes once
|
|
7528
|
+
* `min` (default 1) is met. Rejects when the user cancels below `min`. */
|
|
7529
|
+
pickObjects(opts?: {
|
|
7530
|
+
label?: string;
|
|
7531
|
+
types?: readonly string[];
|
|
7532
|
+
min?: number;
|
|
7533
|
+
max?: number;
|
|
7534
|
+
}): Promise<string[]>;
|
|
7535
|
+
/** Ask several values in one dialog — the command params form, from a
|
|
7536
|
+
* ParamDef table; resolves the values by name, rejects on cancel. */
|
|
7537
|
+
ask(params: readonly ParamDef[], opts?: {
|
|
7538
|
+
title?: string;
|
|
7539
|
+
description?: string;
|
|
7540
|
+
}): Promise<Record<string, unknown>>;
|
|
6566
7541
|
/** Await a typed value from a small input dialog; rejects on cancel. */
|
|
6567
7542
|
prompt(message: string, opts?: {
|
|
6568
7543
|
initial?: string;
|
|
@@ -6574,7 +7549,21 @@ interface EditorSurface {
|
|
|
6574
7549
|
/** Trigger a command by id (interactive tools start and wait for the
|
|
6575
7550
|
* user; macros with declared inputs / params accept them up front —
|
|
6576
7551
|
* params passed skip the params dialog). */
|
|
6577
|
-
runCommand(id: string, inputs?:
|
|
7552
|
+
runCommand(id: string, inputs?: CommandInputsArg, params?: Readonly<Record<string, unknown>>): Promise<void>;
|
|
7553
|
+
}
|
|
7554
|
+
/** Inputs a caller supplies to a command: positional points (a command
|
|
7555
|
+
* declaring labels) or a record by input name (a command declaring a
|
|
7556
|
+
* table — points as [x, y], objects as ids). */
|
|
7557
|
+
type CommandInputsArg = readonly PointInput[] | Readonly<Record<string, PointInput | readonly PointInput[] | string | readonly string[]>>;
|
|
7558
|
+
interface PickPointsOptions {
|
|
7559
|
+
label?: string;
|
|
7560
|
+
/** Default 1. */
|
|
7561
|
+
min?: number;
|
|
7562
|
+
max?: number;
|
|
7563
|
+
/** Preview the closing segment (a polygon). */
|
|
7564
|
+
closed?: boolean;
|
|
7565
|
+
/** Rubber band from here to the first pick. */
|
|
7566
|
+
referencePoint?: PointInput;
|
|
6578
7567
|
}
|
|
6579
7568
|
/** Where `EditorSurface.zoom` moves the camera: everything in the active
|
|
6580
7569
|
* space, the selection, some objects' extents, or a window (world mm; sheet
|
|
@@ -6647,12 +7636,13 @@ declare class Drawing extends LocalDrawing {
|
|
|
6647
7636
|
importDwg(path: string, opts?: DxfImportOptions): Promise<DxfImportReport>;
|
|
6648
7637
|
importPdf(path: string, opts?: PdfImportOptions): Promise<PdfImportReport>;
|
|
6649
7638
|
/** Run a command module source (`defineCommand`) against this drawing as
|
|
6650
|
-
* ONE undo step, headlessly: declared `inputs` must be supplied
|
|
7639
|
+
* ONE undo step, headlessly: declared `inputs` must be supplied (points
|
|
7640
|
+
* in label order, or a record by name for an inputs table); declared
|
|
6651
7641
|
* `params` take their defaults unless given by name (unknown names and
|
|
6652
7642
|
* wrong types throw). Resolves with the script's return value. */
|
|
6653
|
-
runScript(source: string, inputs?:
|
|
7643
|
+
runScript(source: string, inputs?: CommandInputsArg, params?: Readonly<Record<string, unknown>>): Promise<unknown>;
|
|
6654
7644
|
/** Run one of the document's own commands (by exported id). */
|
|
6655
|
-
runUserCommand(id: string, inputs?:
|
|
7645
|
+
runUserCommand(id: string, inputs?: CommandInputsArg, params?: Readonly<Record<string, unknown>>): Promise<unknown>;
|
|
6656
7646
|
}
|
|
6657
7647
|
/** A fresh empty document, optionally named (until saved to a file, whose
|
|
6658
7648
|
* name then takes over). */
|
|
@@ -6668,4 +7658,4 @@ declare function drawingFromJson(text: string): Drawing;
|
|
|
6668
7658
|
/** Open a `.linea` file (parse + migrate) into an in-process kernel. */
|
|
6669
7659
|
declare function openDrawing(path: string, options?: DrawingOptions): Promise<Drawing>;
|
|
6670
7660
|
|
|
6671
|
-
export { type AABB, type AddOptions, type BlockMeta, type CommandMeta, type DimStyle$1 as DimStyle, type DocumentSummary, Drawing, type Drawing$1 as DrawingApi, type DrawingOptions, type DxfImportOptions, type DxfImportReport, type EditorSurface, type Layer, type LayerInfo, type LayoutOptions, type LayoutPatch, type LineaDocument, type MarketplaceConfig, type MarketplaceHit, type MarketplaceInfo, type MarketplaceQuery, type Measurement, type MergeReport, type ModelObject, type ModelObjectInput, type ModelObjectType, type ObjectQuery, type Operation, type PaperLayout, type PdfImportReport, type RenderPdfOptions as PdfOptions, type RenderPngOptions as PngOptions, type PointInput, type PrintPalette, type SheetName, type RenderSvgOptions as SvgOptions, type TextMeasurer, type TextStyle$1 as TextStyle, type Vec2$1 as Vec2, type ViewportOptions, drawingFromJson, ensureScriptTranspiler, getBlockMetaResult, getCommandMetaResult, newDrawing, openDrawing, parseScale, renderBlockThumbnailSvg, testBlockDefinition };
|
|
7661
|
+
export { type AABB, type AddOptions, type BlockMeta, type CommandMeta, type DimStyle$1 as DimStyle, type DocumentSummary, Drawing, type Drawing$1 as DrawingApi, type DrawingOptions, type DxfImportOptions, type DxfImportReport, type EditorSurface, type Layer, type LayerInfo, type LayoutOptions, type LayoutPatch, type LineaDocument, type MarketplaceConfig, type MarketplaceHit, type MarketplaceInfo, type MarketplaceQuery, type Measurement, type MergeReport, type ModelObject, type ModelObjectInput, type ModelObjectType, type ObjectQuery, type Operation, type PaperLayout, type PdfImportReport, type RenderPdfOptions as PdfOptions, type RenderPngOptions as PngOptions, type PointInput, type PrintPalette, type SheetName, type RenderSvgOptions as SvgOptions, type TextMeasurer, type TextStyle$1 as TextStyle, type Vec2$1 as Vec2, type ViewportOptions, drawingFromJson, ensureScriptTranspiler, getBlockMetaResult, getCommandMetaResult, hatchLoop, newDrawing, openDrawing, parseScale, renderBlockThumbnailSvg, splineThrough, testBlockDefinition };
|