@snaptrude/plugin-client 0.2.9 → 0.5.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/AGENTS.md +38 -46
- package/CHANGELOG.md +11 -0
- package/CLAUDE.md +1 -1
- package/dist/api/index.d.ts +12 -16
- package/dist/api/index.d.ts.map +1 -1
- package/dist/index.cjs +23 -655
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -648
- package/dist/index.js.map +1 -1
- package/dist/rpc-proxy.d.ts +28 -0
- package/dist/rpc-proxy.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/api/index.ts +26 -22
- package/src/rpc-proxy.ts +56 -0
- package/dist/api/core/geom/arc.d.ts +0 -5
- package/dist/api/core/geom/arc.d.ts.map +0 -1
- package/dist/api/core/geom/curve.d.ts +0 -5
- package/dist/api/core/geom/curve.d.ts.map +0 -1
- package/dist/api/core/geom/index.d.ts +0 -17
- package/dist/api/core/geom/index.d.ts.map +0 -1
- package/dist/api/core/geom/line.d.ts +0 -5
- package/dist/api/core/geom/line.d.ts.map +0 -1
- package/dist/api/core/geom/profile.d.ts +0 -7
- package/dist/api/core/geom/profile.d.ts.map +0 -1
- package/dist/api/core/index.d.ts +0 -11
- package/dist/api/core/index.d.ts.map +0 -1
- package/dist/api/core/math/index.d.ts +0 -11
- package/dist/api/core/math/index.d.ts.map +0 -1
- package/dist/api/core/math/quat.d.ts +0 -5
- package/dist/api/core/math/quat.d.ts.map +0 -1
- package/dist/api/core/math/vec3.d.ts +0 -5
- package/dist/api/core/math/vec3.d.ts.map +0 -1
- package/dist/api/documentation/aiInspiration.d.ts +0 -24
- package/dist/api/documentation/aiInspiration.d.ts.map +0 -1
- package/dist/api/documentation/index.d.ts +0 -8
- package/dist/api/documentation/index.d.ts.map +0 -1
- package/dist/api/entity/buildableEnvelope.d.ts +0 -7
- package/dist/api/entity/buildableEnvelope.d.ts.map +0 -1
- package/dist/api/entity/department.d.ts +0 -7
- package/dist/api/entity/department.d.ts.map +0 -1
- package/dist/api/entity/index.d.ts +0 -20
- package/dist/api/entity/index.d.ts.map +0 -1
- package/dist/api/entity/referenceLine.d.ts +0 -9
- package/dist/api/entity/referenceLine.d.ts.map +0 -1
- package/dist/api/entity/space.d.ts +0 -15
- package/dist/api/entity/space.d.ts.map +0 -1
- package/dist/api/entity/story.d.ts +0 -9
- package/dist/api/entity/story.d.ts.map +0 -1
- package/dist/api/tools/copy.d.ts +0 -3
- package/dist/api/tools/copy.d.ts.map +0 -1
- package/dist/api/tools/index.d.ts +0 -14
- package/dist/api/tools/index.d.ts.map +0 -1
- package/dist/api/tools/offset.d.ts +0 -3
- package/dist/api/tools/offset.d.ts.map +0 -1
- package/dist/api/tools/selection.d.ts +0 -6
- package/dist/api/tools/selection.d.ts.map +0 -1
- package/dist/api/tools/transform.d.ts +0 -7
- package/dist/api/tools/transform.d.ts.map +0 -1
- package/dist/api/units/index.d.ts +0 -7
- package/dist/api/units/index.d.ts.map +0 -1
- package/src/api/core/geom/arc.ts +0 -7
- package/src/api/core/geom/curve.ts +0 -7
- package/src/api/core/geom/index.ts +0 -25
- package/src/api/core/geom/line.ts +0 -7
- package/src/api/core/geom/profile.ts +0 -17
- package/src/api/core/index.ts +0 -17
- package/src/api/core/math/index.ts +0 -17
- package/src/api/core/math/quat.ts +0 -7
- package/src/api/core/math/vec3.ts +0 -7
- package/src/api/documentation/aiInspiration.ts +0 -193
- package/src/api/documentation/index.ts +0 -13
- package/src/api/entity/buildableEnvelope.ts +0 -34
- package/src/api/entity/department.ts +0 -30
- package/src/api/entity/index.ts +0 -29
- package/src/api/entity/referenceLine.ts +0 -54
- package/src/api/entity/space.ts +0 -160
- package/src/api/entity/story.ts +0 -66
- package/src/api/tools/copy.ts +0 -10
- package/src/api/tools/index.ts +0 -33
- package/src/api/tools/offset.ts +0 -15
- package/src/api/tools/selection.ts +0 -15
- package/src/api/tools/transform.ts +0 -44
- package/src/api/units/index.ts +0 -34
package/dist/index.js
CHANGED
|
@@ -1,63 +1,7 @@
|
|
|
1
|
-
// src/api/
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { PluginMathApi } from "@snaptrude/plugin-core";
|
|
6
|
-
|
|
7
|
-
// src/api/core/math/vec3.ts
|
|
8
|
-
import { PluginVec3Api } from "@snaptrude/plugin-core";
|
|
9
|
-
var ClientVec3Api = class extends PluginVec3Api {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
// src/api/core/math/quat.ts
|
|
16
|
-
import { PluginQuatApi } from "@snaptrude/plugin-core";
|
|
17
|
-
var ClientQuatApi = class extends PluginQuatApi {
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// src/api/core/math/index.ts
|
|
24
|
-
var ClientMathApi = class extends PluginMathApi {
|
|
25
|
-
constructor() {
|
|
26
|
-
super();
|
|
27
|
-
this.vec3 = new ClientVec3Api();
|
|
28
|
-
this.quat = new ClientQuatApi();
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// src/api/core/geom/index.ts
|
|
33
|
-
import { PluginGeomApi } from "@snaptrude/plugin-core";
|
|
34
|
-
|
|
35
|
-
// src/api/core/geom/line.ts
|
|
36
|
-
import { PluginLineApi } from "@snaptrude/plugin-core";
|
|
37
|
-
var ClientLineApi = class extends PluginLineApi {
|
|
38
|
-
constructor() {
|
|
39
|
-
super();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// src/api/core/geom/arc.ts
|
|
44
|
-
import { PluginArcApi } from "@snaptrude/plugin-core";
|
|
45
|
-
var ClientArcApi = class extends PluginArcApi {
|
|
46
|
-
constructor() {
|
|
47
|
-
super();
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// src/api/core/geom/curve.ts
|
|
52
|
-
import { PluginCurveApi } from "@snaptrude/plugin-core";
|
|
53
|
-
var ClientCurveApi = class extends PluginCurveApi {
|
|
54
|
-
constructor() {
|
|
55
|
-
super();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
// src/api/core/geom/profile.ts
|
|
60
|
-
import { PluginProfileApi } from "@snaptrude/plugin-core";
|
|
1
|
+
// src/api/index.ts
|
|
2
|
+
import {
|
|
3
|
+
PluginApi
|
|
4
|
+
} from "@snaptrude/plugin-core";
|
|
61
5
|
|
|
62
6
|
// src/host-api.ts
|
|
63
7
|
import * as Comlink from "comlink";
|
|
@@ -87,581 +31,35 @@ function getHostApi() {
|
|
|
87
31
|
};
|
|
88
32
|
}
|
|
89
33
|
|
|
90
|
-
// src/
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
// src/api/core/geom/index.ts
|
|
105
|
-
var ClientGeomApi = class extends PluginGeomApi {
|
|
106
|
-
constructor() {
|
|
107
|
-
super();
|
|
108
|
-
this.line = new ClientLineApi();
|
|
109
|
-
this.arc = new ClientArcApi();
|
|
110
|
-
this.curve = new ClientCurveApi();
|
|
111
|
-
this.profile = new ClientProfileApi();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// src/api/core/index.ts
|
|
116
|
-
var ClientCoreApi = class extends PluginCoreApi {
|
|
117
|
-
constructor() {
|
|
118
|
-
super();
|
|
119
|
-
this.math = new ClientMathApi();
|
|
120
|
-
this.geom = new ClientGeomApi();
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
// src/api/entity/index.ts
|
|
125
|
-
import { PluginEntityApi } from "@snaptrude/plugin-core";
|
|
126
|
-
|
|
127
|
-
// src/api/entity/buildableEnvelope.ts
|
|
128
|
-
import {
|
|
129
|
-
PluginBuildableEnvelopeApi
|
|
130
|
-
} from "@snaptrude/plugin-core";
|
|
131
|
-
var ClientBuildableEnvelopeApi = class extends PluginBuildableEnvelopeApi {
|
|
132
|
-
constructor() {
|
|
133
|
-
super();
|
|
134
|
-
}
|
|
135
|
-
async create(args) {
|
|
136
|
-
const hostApi = getHostApi();
|
|
137
|
-
return hostApi.call({
|
|
138
|
-
method: "entity.buildableEnvelope.create",
|
|
139
|
-
args
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
async update(args) {
|
|
143
|
-
const hostApi = getHostApi();
|
|
144
|
-
return hostApi.call({
|
|
145
|
-
method: "entity.buildableEnvelope.update",
|
|
146
|
-
args
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
// src/api/entity/department.ts
|
|
152
|
-
import {
|
|
153
|
-
PluginDepartmentApi
|
|
154
|
-
} from "@snaptrude/plugin-core";
|
|
155
|
-
var ClientDepartmentApi = class extends PluginDepartmentApi {
|
|
156
|
-
constructor() {
|
|
157
|
-
super();
|
|
158
|
-
}
|
|
159
|
-
async create(args) {
|
|
160
|
-
const hostApi = getHostApi();
|
|
161
|
-
return hostApi.call({
|
|
162
|
-
method: "entity.department.create",
|
|
163
|
-
args
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
async getAll() {
|
|
167
|
-
const hostApi = getHostApi();
|
|
168
|
-
return hostApi.call({
|
|
169
|
-
method: "entity.department.getAll"
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
// src/api/entity/referenceLine.ts
|
|
175
|
-
import {
|
|
176
|
-
PluginReferenceLineApi
|
|
177
|
-
} from "@snaptrude/plugin-core";
|
|
178
|
-
var ClientReferenceLineApi = class extends PluginReferenceLineApi {
|
|
179
|
-
constructor() {
|
|
180
|
-
super();
|
|
181
|
-
}
|
|
182
|
-
async createMulti(args) {
|
|
183
|
-
const hostApi = getHostApi();
|
|
184
|
-
return hostApi.call({
|
|
185
|
-
method: "entity.referenceLine.createMulti",
|
|
186
|
-
args
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
async get(args) {
|
|
190
|
-
const hostApi = getHostApi();
|
|
191
|
-
return hostApi.call({
|
|
192
|
-
method: "entity.referenceLine.get",
|
|
193
|
-
args
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
async getAll() {
|
|
197
|
-
const hostApi = getHostApi();
|
|
198
|
-
return hostApi.call({
|
|
199
|
-
method: "entity.referenceLine.getAll"
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
async delete(args) {
|
|
203
|
-
const hostApi = getHostApi();
|
|
204
|
-
return hostApi.call({
|
|
205
|
-
method: "entity.referenceLine.delete",
|
|
206
|
-
args
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
// src/api/entity/space.ts
|
|
212
|
-
import {
|
|
213
|
-
PluginSpaceApi
|
|
214
|
-
} from "@snaptrude/plugin-core";
|
|
215
|
-
var ClientSpaceApi = class extends PluginSpaceApi {
|
|
216
|
-
constructor() {
|
|
217
|
-
super();
|
|
218
|
-
}
|
|
219
|
-
async createRectangular({
|
|
220
|
-
position,
|
|
221
|
-
dimensions
|
|
222
|
-
}) {
|
|
223
|
-
const hostApi = getHostApi();
|
|
224
|
-
return hostApi.call({
|
|
225
|
-
method: "entity.space.createRectangular",
|
|
226
|
-
args: {
|
|
227
|
-
position,
|
|
228
|
-
dimensions
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
async createFromProfile({
|
|
233
|
-
profile,
|
|
234
|
-
innerProfiles,
|
|
235
|
-
extrudeHeight,
|
|
236
|
-
position
|
|
237
|
-
}) {
|
|
238
|
-
const hostApi = getHostApi();
|
|
239
|
-
return hostApi.call({
|
|
240
|
-
method: "entity.space.createFromProfile",
|
|
241
|
-
args: {
|
|
242
|
-
profile,
|
|
243
|
-
innerProfiles,
|
|
244
|
-
extrudeHeight,
|
|
245
|
-
position
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
async updateGeometryFromProfile({
|
|
250
|
-
spaceId,
|
|
251
|
-
profile,
|
|
252
|
-
extrudeHeight
|
|
253
|
-
}) {
|
|
254
|
-
const hostApi = getHostApi();
|
|
255
|
-
return hostApi.call({
|
|
256
|
-
method: "entity.space.updateGeometryFromProfile",
|
|
257
|
-
args: {
|
|
258
|
-
spaceId,
|
|
259
|
-
profile,
|
|
260
|
-
extrudeHeight
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
async get({
|
|
265
|
-
spaceId,
|
|
266
|
-
properties
|
|
267
|
-
}) {
|
|
268
|
-
const hostApi = getHostApi();
|
|
269
|
-
return hostApi.call({
|
|
270
|
-
method: "entity.space.get",
|
|
271
|
-
args: {
|
|
272
|
-
spaceId,
|
|
273
|
-
properties
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
async getAll() {
|
|
278
|
-
const hostApi = getHostApi();
|
|
279
|
-
return hostApi.call({
|
|
280
|
-
method: "entity.space.getAll"
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
async delete({
|
|
284
|
-
spaceId
|
|
285
|
-
}) {
|
|
286
|
-
const hostApi = getHostApi();
|
|
287
|
-
return hostApi.call({
|
|
288
|
-
method: "entity.space.delete",
|
|
289
|
-
args: {
|
|
290
|
-
spaceId
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
async update({
|
|
295
|
-
spaceId,
|
|
296
|
-
properties
|
|
297
|
-
}) {
|
|
298
|
-
const hostApi = getHostApi();
|
|
299
|
-
return hostApi.call({
|
|
300
|
-
method: "entity.space.update",
|
|
301
|
-
args: {
|
|
302
|
-
spaceId,
|
|
303
|
-
properties
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
async bulkCreate({
|
|
308
|
-
items
|
|
309
|
-
}) {
|
|
310
|
-
const hostApi = getHostApi();
|
|
311
|
-
return hostApi.call({
|
|
312
|
-
method: "entity.space.bulkCreate",
|
|
313
|
-
args: {
|
|
314
|
-
items
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
async bulkUpdate({
|
|
319
|
-
items
|
|
320
|
-
}) {
|
|
321
|
-
const hostApi = getHostApi();
|
|
322
|
-
return hostApi.call({
|
|
323
|
-
method: "entity.space.bulkUpdate",
|
|
324
|
-
args: {
|
|
325
|
-
items
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
async bulkDelete({
|
|
330
|
-
spaceIds
|
|
331
|
-
}) {
|
|
332
|
-
const hostApi = getHostApi();
|
|
333
|
-
return hostApi.call({
|
|
334
|
-
method: "entity.space.bulkDelete",
|
|
335
|
-
args: {
|
|
336
|
-
spaceIds
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
// src/api/entity/story.ts
|
|
343
|
-
import {
|
|
344
|
-
PluginStoryApi
|
|
345
|
-
} from "@snaptrude/plugin-core";
|
|
346
|
-
var ClientStoryApi = class extends PluginStoryApi {
|
|
347
|
-
constructor() {
|
|
348
|
-
super();
|
|
349
|
-
}
|
|
350
|
-
async get({
|
|
351
|
-
storyValue,
|
|
352
|
-
properties
|
|
353
|
-
}) {
|
|
354
|
-
const hostApi = getHostApi();
|
|
355
|
-
return hostApi.call({
|
|
356
|
-
method: "entity.story.get",
|
|
357
|
-
args: {
|
|
358
|
-
storyValue,
|
|
359
|
-
properties
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
async getAll() {
|
|
364
|
-
const hostApi = getHostApi();
|
|
365
|
-
return hostApi.call({
|
|
366
|
-
method: "entity.story.getAll"
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
async create({
|
|
370
|
-
storyValue,
|
|
371
|
-
height
|
|
372
|
-
}) {
|
|
373
|
-
const hostApi = getHostApi();
|
|
374
|
-
return hostApi.call({
|
|
375
|
-
method: "entity.story.create",
|
|
376
|
-
args: {
|
|
377
|
-
storyValue,
|
|
378
|
-
height
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
async update({
|
|
383
|
-
storyValue,
|
|
384
|
-
height
|
|
385
|
-
}) {
|
|
386
|
-
const hostApi = getHostApi();
|
|
387
|
-
return hostApi.call({
|
|
388
|
-
method: "entity.story.update",
|
|
389
|
-
args: {
|
|
390
|
-
storyValue,
|
|
391
|
-
height
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
// src/api/entity/index.ts
|
|
398
|
-
var ClientEntityApi = class extends PluginEntityApi {
|
|
399
|
-
constructor() {
|
|
400
|
-
super();
|
|
401
|
-
this.space = new ClientSpaceApi();
|
|
402
|
-
this.story = new ClientStoryApi();
|
|
403
|
-
this.referenceLine = new ClientReferenceLineApi();
|
|
404
|
-
this.department = new ClientDepartmentApi();
|
|
405
|
-
this.buildableEnvelope = new ClientBuildableEnvelopeApi();
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
// src/api/tools/index.ts
|
|
410
|
-
import { PluginToolsApi } from "@snaptrude/plugin-core";
|
|
411
|
-
|
|
412
|
-
// src/api/tools/selection.ts
|
|
413
|
-
import { PluginSelectionApi } from "@snaptrude/plugin-core";
|
|
414
|
-
var ClientSelectionApi = class extends PluginSelectionApi {
|
|
415
|
-
constructor() {
|
|
416
|
-
super();
|
|
417
|
-
}
|
|
418
|
-
async get() {
|
|
419
|
-
const hostApi = getHostApi();
|
|
420
|
-
return hostApi.call({
|
|
421
|
-
method: "tools.selection.get"
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
// src/api/tools/transform.ts
|
|
427
|
-
import {
|
|
428
|
-
PluginTransformApi
|
|
429
|
-
} from "@snaptrude/plugin-core";
|
|
430
|
-
var ClientTransformApi = class extends PluginTransformApi {
|
|
431
|
-
constructor() {
|
|
432
|
-
super();
|
|
433
|
-
}
|
|
434
|
-
async move({
|
|
435
|
-
componentIds,
|
|
436
|
-
displacement
|
|
437
|
-
}) {
|
|
438
|
-
const hostApi = getHostApi();
|
|
439
|
-
return hostApi.call({
|
|
440
|
-
method: "tools.transform.move",
|
|
441
|
-
args: {
|
|
442
|
-
componentIds,
|
|
443
|
-
displacement
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
async rotate({
|
|
448
|
-
componentIds,
|
|
449
|
-
angle,
|
|
450
|
-
axis,
|
|
451
|
-
pivot
|
|
452
|
-
}) {
|
|
453
|
-
const hostApi = getHostApi();
|
|
454
|
-
return hostApi.call({
|
|
455
|
-
method: "tools.transform.rotate",
|
|
456
|
-
args: {
|
|
457
|
-
componentIds,
|
|
458
|
-
angle,
|
|
459
|
-
axis,
|
|
460
|
-
pivot
|
|
461
|
-
}
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
// src/api/tools/copy.ts
|
|
467
|
-
async function copy(args) {
|
|
468
|
-
const hostApi = getHostApi();
|
|
469
|
-
return hostApi.call({
|
|
470
|
-
method: "tools.copy",
|
|
471
|
-
args
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
// src/api/tools/offset.ts
|
|
476
|
-
async function offset(args) {
|
|
477
|
-
const hostApi = getHostApi();
|
|
478
|
-
return hostApi.call({
|
|
479
|
-
method: "tools.offset",
|
|
480
|
-
args
|
|
34
|
+
// src/rpc-proxy.ts
|
|
35
|
+
function createRpcNamespace(basePath) {
|
|
36
|
+
const build = (path) => new Proxy(NOOP, {
|
|
37
|
+
get(_target, prop) {
|
|
38
|
+
if (typeof prop !== "string" || prop === "then") return void 0;
|
|
39
|
+
return build(`${path}.${prop}`);
|
|
40
|
+
},
|
|
41
|
+
apply(_target, _thisArg, argArray) {
|
|
42
|
+
const payload = {
|
|
43
|
+
method: path,
|
|
44
|
+
args: argArray
|
|
45
|
+
};
|
|
46
|
+
return getHostApi().call(payload);
|
|
47
|
+
}
|
|
481
48
|
});
|
|
49
|
+
return build(basePath);
|
|
482
50
|
}
|
|
483
|
-
|
|
484
|
-
// src/api/tools/index.ts
|
|
485
|
-
var ClientToolsApi = class extends PluginToolsApi {
|
|
486
|
-
constructor() {
|
|
487
|
-
super();
|
|
488
|
-
this.selection = new ClientSelectionApi();
|
|
489
|
-
this.transform = new ClientTransformApi();
|
|
490
|
-
}
|
|
491
|
-
async copy(args) {
|
|
492
|
-
return copy(args);
|
|
493
|
-
}
|
|
494
|
-
async offset(args) {
|
|
495
|
-
return offset(args);
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
// src/api/units/index.ts
|
|
500
|
-
import {
|
|
501
|
-
PluginUnitsApi
|
|
502
|
-
} from "@snaptrude/plugin-core";
|
|
503
|
-
var ClientUnitsApi = class extends PluginUnitsApi {
|
|
504
|
-
constructor() {
|
|
505
|
-
super();
|
|
506
|
-
}
|
|
507
|
-
async convertFrom(args) {
|
|
508
|
-
const hostApi = getHostApi();
|
|
509
|
-
return hostApi.call({
|
|
510
|
-
method: "units.convertFrom",
|
|
511
|
-
args
|
|
512
|
-
});
|
|
513
|
-
}
|
|
514
|
-
async convertTo(args) {
|
|
515
|
-
const hostApi = getHostApi();
|
|
516
|
-
return hostApi.call({
|
|
517
|
-
method: "units.convertTo",
|
|
518
|
-
args
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
// src/api/documentation/index.ts
|
|
524
|
-
import { PluginDocumentationApi } from "@snaptrude/plugin-core";
|
|
525
|
-
|
|
526
|
-
// src/api/documentation/aiInspiration.ts
|
|
527
|
-
import { PluginDocumentationAIInspirationApi } from "@snaptrude/plugin-core";
|
|
528
|
-
var ClientDocumentationAIInspirationApi = class extends PluginDocumentationAIInspirationApi {
|
|
529
|
-
constructor() {
|
|
530
|
-
super();
|
|
531
|
-
}
|
|
532
|
-
async listModels() {
|
|
533
|
-
const hostApi = getHostApi();
|
|
534
|
-
return hostApi.call({ method: "documentation.aiInspiration.listModels" });
|
|
535
|
-
}
|
|
536
|
-
async getModelCapabilities(args) {
|
|
537
|
-
const hostApi = getHostApi();
|
|
538
|
-
return hostApi.call({
|
|
539
|
-
method: "documentation.aiInspiration.getModelCapabilities",
|
|
540
|
-
args
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
async listSources(args) {
|
|
544
|
-
const hostApi = getHostApi();
|
|
545
|
-
return hostApi.call({
|
|
546
|
-
method: "documentation.aiInspiration.listSources",
|
|
547
|
-
args
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
async getSelection() {
|
|
551
|
-
const hostApi = getHostApi();
|
|
552
|
-
return hostApi.call({ method: "documentation.aiInspiration.getSelection" });
|
|
553
|
-
}
|
|
554
|
-
async getPresetCatalog() {
|
|
555
|
-
const hostApi = getHostApi();
|
|
556
|
-
return hostApi.call({
|
|
557
|
-
method: "documentation.aiInspiration.getPresetCatalog"
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
async generate(args) {
|
|
561
|
-
const hostApi = getHostApi();
|
|
562
|
-
return hostApi.call({
|
|
563
|
-
method: "documentation.aiInspiration.generate",
|
|
564
|
-
args
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
async refine(args) {
|
|
568
|
-
const hostApi = getHostApi();
|
|
569
|
-
return hostApi.call({
|
|
570
|
-
method: "documentation.aiInspiration.refine",
|
|
571
|
-
args
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
async getJob(args) {
|
|
575
|
-
const hostApi = getHostApi();
|
|
576
|
-
return hostApi.call({
|
|
577
|
-
method: "documentation.aiInspiration.getJob",
|
|
578
|
-
args
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
async cancelJob(args) {
|
|
582
|
-
const hostApi = getHostApi();
|
|
583
|
-
return hostApi.call({
|
|
584
|
-
method: "documentation.aiInspiration.cancelJob",
|
|
585
|
-
args
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
async listJobs() {
|
|
589
|
-
const hostApi = getHostApi();
|
|
590
|
-
return hostApi.call({ method: "documentation.aiInspiration.listJobs" });
|
|
591
|
-
}
|
|
592
|
-
async getWorkflowForShape(args) {
|
|
593
|
-
const hostApi = getHostApi();
|
|
594
|
-
return hostApi.call({
|
|
595
|
-
method: "documentation.aiInspiration.getWorkflowForShape",
|
|
596
|
-
args
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
async getSelectedBranchRerunPlan(args) {
|
|
600
|
-
const hostApi = getHostApi();
|
|
601
|
-
return hostApi.call({
|
|
602
|
-
method: "documentation.aiInspiration.getSelectedBranchRerunPlan",
|
|
603
|
-
args
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
async rerunSelectedBranch(args) {
|
|
607
|
-
const hostApi = getHostApi();
|
|
608
|
-
return hostApi.call({
|
|
609
|
-
method: "documentation.aiInspiration.rerunSelectedBranch",
|
|
610
|
-
args
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
async extractRecipeFromShape(args) {
|
|
614
|
-
const hostApi = getHostApi();
|
|
615
|
-
return hostApi.call({
|
|
616
|
-
method: "documentation.aiInspiration.extractRecipeFromShape",
|
|
617
|
-
args
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
async listRecipes() {
|
|
621
|
-
const hostApi = getHostApi();
|
|
622
|
-
return hostApi.call({ method: "documentation.aiInspiration.listRecipes" });
|
|
623
|
-
}
|
|
624
|
-
async saveRecipe(args) {
|
|
625
|
-
const hostApi = getHostApi();
|
|
626
|
-
return hostApi.call({
|
|
627
|
-
method: "documentation.aiInspiration.saveRecipe",
|
|
628
|
-
args
|
|
629
|
-
});
|
|
630
|
-
}
|
|
631
|
-
async deleteRecipe(args) {
|
|
632
|
-
const hostApi = getHostApi();
|
|
633
|
-
return hostApi.call({
|
|
634
|
-
method: "documentation.aiInspiration.deleteRecipe",
|
|
635
|
-
args
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
async runRecipe(args) {
|
|
639
|
-
const hostApi = getHostApi();
|
|
640
|
-
return hostApi.call({
|
|
641
|
-
method: "documentation.aiInspiration.runRecipe",
|
|
642
|
-
args
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
// src/api/documentation/index.ts
|
|
648
|
-
var ClientDocumentationApi = class extends PluginDocumentationApi {
|
|
649
|
-
constructor() {
|
|
650
|
-
super();
|
|
651
|
-
this.aiInspiration = new ClientDocumentationAIInspirationApi();
|
|
652
|
-
}
|
|
51
|
+
var NOOP = () => {
|
|
653
52
|
};
|
|
654
53
|
|
|
655
54
|
// src/api/index.ts
|
|
656
|
-
import { PluginApi } from "@snaptrude/plugin-core";
|
|
657
55
|
var ClientPluginApi = class _ClientPluginApi extends PluginApi {
|
|
658
56
|
constructor() {
|
|
659
57
|
super();
|
|
660
|
-
this.core =
|
|
661
|
-
this.
|
|
662
|
-
this.entity =
|
|
663
|
-
this.
|
|
664
|
-
this.
|
|
58
|
+
this.core = createRpcNamespace("core");
|
|
59
|
+
this.design = createRpcNamespace("design");
|
|
60
|
+
this.entity = createRpcNamespace("entity");
|
|
61
|
+
this.program = createRpcNamespace("program");
|
|
62
|
+
this.presentation = createRpcNamespace("presentation");
|
|
665
63
|
}
|
|
666
64
|
static getInstance() {
|
|
667
65
|
if (!_ClientPluginApi.instance) {
|
|
@@ -732,28 +130,7 @@ var PluginWorker = class {
|
|
|
732
130
|
// src/index.ts
|
|
733
131
|
var snaptrude = ClientPluginApi.getInstance();
|
|
734
132
|
export {
|
|
735
|
-
ClientArcApi,
|
|
736
|
-
ClientBuildableEnvelopeApi,
|
|
737
|
-
ClientCoreApi,
|
|
738
|
-
ClientCurveApi,
|
|
739
|
-
ClientDepartmentApi,
|
|
740
|
-
ClientDocumentationAIInspirationApi,
|
|
741
|
-
ClientDocumentationApi,
|
|
742
|
-
ClientEntityApi,
|
|
743
|
-
ClientGeomApi,
|
|
744
|
-
ClientLineApi,
|
|
745
|
-
ClientMathApi,
|
|
746
133
|
ClientPluginApi,
|
|
747
|
-
ClientProfileApi,
|
|
748
|
-
ClientQuatApi,
|
|
749
|
-
ClientReferenceLineApi,
|
|
750
|
-
ClientSelectionApi,
|
|
751
|
-
ClientSpaceApi,
|
|
752
|
-
ClientStoryApi,
|
|
753
|
-
ClientToolsApi,
|
|
754
|
-
ClientTransformApi,
|
|
755
|
-
ClientUnitsApi,
|
|
756
|
-
ClientVec3Api,
|
|
757
134
|
PluginWorker,
|
|
758
135
|
createHostApi,
|
|
759
136
|
getHostApi,
|