@snaptrude/plugin-core 1.1.0-dev.20261025.1 → 1.1.0-pbr-20261026.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/design/dimensions.d.ts +2 -2
- package/dist/api/design/family.d.ts +11 -0
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +5 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lights/index.d.ts +504 -0
- package/dist/api/design/lights/index.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +63 -7
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +1 -61
- package/dist/api/design/networks.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +34 -1
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/index.cjs +2487 -2372
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2470 -2367
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/design/family.ts +11 -0
- package/src/api/design/index.ts +5 -0
- package/src/api/design/lights/index.ts +406 -0
- package/src/api/design/materials/index.ts +58 -7
- package/src/api/design/networks.ts +2 -62
- package/src/api/design/windows/index.ts +38 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/lights/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAE7C,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,QAA4B,CAAA;AAIjE;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB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;;;;;;;;OAkBG;aACa,UAAU,CACxB,SAAS,EAAE,eAAe,EAC1B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,GACf,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;OAmBG;aACa,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,eAAe,CAAC,wBAAwB,CAAC;CAChG"}
|
|
@@ -20,6 +20,12 @@ import { ComponentHandle, MaterialHandle } from "../../../handles";
|
|
|
20
20
|
* is durable only while the component's BREP topology (face count/order) is unchanged.
|
|
21
21
|
*
|
|
22
22
|
* `copy` (needs an undo wrapper) lands in a later pass.
|
|
23
|
+
*
|
|
24
|
+
* A material is a reusable finish, not a fixture source. Emissive appearance alone does not
|
|
25
|
+
* create a physical light. Author new fixtures through schema 1.3 family.fixture.emitters:
|
|
26
|
+
* generated side geometry, total lumens, temperature and enabled state belong to the placed
|
|
27
|
+
* fixture, not its shared material. Its visible emission is derived from the same photometry
|
|
28
|
+
* used by direct and DDGI lighting. Repainting a source must not change output or another lamp.
|
|
23
29
|
*/
|
|
24
30
|
export declare abstract class PluginDesignMaterialsApi {
|
|
25
31
|
constructor();
|
|
@@ -45,16 +51,20 @@ export declare abstract class PluginDesignMaterialsApi {
|
|
|
45
51
|
abstract list(): PluginApiReturn<MaterialHandle[]>;
|
|
46
52
|
/**
|
|
47
53
|
* List the preset material library — the catalog the app's material browser
|
|
48
|
-
* shows
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
54
|
+
* shows: the deployment PBR catalogue plus the server library and workspace uploads.
|
|
55
|
+
* Library entries are **not** scene materials and carry no {@linkcode MaterialHandle}.
|
|
56
|
+
* PBR names include an identity-qualified suffix `[catalogId@catalogVersion]`:
|
|
57
|
+
* preserve the EXACT returned name and pass `{ name: preset.name }` to create/apply.
|
|
58
|
+
* The host resolves all authored PBR maps, physical coverage and glass properties;
|
|
59
|
+
* do not strip the suffix, substitute an image-only finish, or override color/alpha.
|
|
60
|
+
* Scalar paints and clear glass can have an empty textureUrl and are still valid.
|
|
61
|
+
* For legacy image entries, feed the returned record to
|
|
52
62
|
* {@linkcode PluginDesignMaterialsApi.create} /
|
|
53
63
|
* {@linkcode PluginDesignMaterialsApi.apply} as a
|
|
54
64
|
* {@linkcode PluginMaterialSpec}: `{ name, textureUrl, materialType: category }`.
|
|
55
65
|
*
|
|
56
|
-
* @returns The library as {@linkcode PluginPresetMaterial}`[]
|
|
57
|
-
* library
|
|
66
|
+
* @returns The library as {@linkcode PluginPresetMaterial}`[]`. Missing/malformed
|
|
67
|
+
* deployment PBR data rejects; the legacy server library may return `[]` on failure.
|
|
58
68
|
*
|
|
59
69
|
* @examplePrompt Show me the preset materials library
|
|
60
70
|
* @examplePrompt What wood finishes are available in the material library?
|
|
@@ -152,6 +162,20 @@ export declare abstract class PluginDesignMaterialsApi {
|
|
|
152
162
|
* ```
|
|
153
163
|
*/
|
|
154
164
|
abstract apply(targets: ComponentHandle[], material: MaterialHandle | PluginMaterialSpec, save?: boolean): PluginApiReturn<PluginMaterialResult>;
|
|
165
|
+
/**
|
|
166
|
+
* Paint only glazing or frame slots, never the whole window/door. This preserves
|
|
167
|
+
* clear panes when painting metal frames. Families change with their linked copies;
|
|
168
|
+
* legacy instanced types change every instance of that type. BREP components are
|
|
169
|
+
* refused (use applyToFaces), as are locked targets or locked linked/type members.
|
|
170
|
+
* Slot roles come from the authored appearance, not a previously applied paint.
|
|
171
|
+
* Always one undo step. Catalogue selectors use the exact listPresets name.
|
|
172
|
+
* @param components Components whose family/type slots to paint
|
|
173
|
+
* @param slot Authored glazing slots or every other (frame/hardware) slot
|
|
174
|
+
* @param material Existing handle or inline spec, e.g. `{ name: preset.name }`
|
|
175
|
+
* @returns Count of targets whose family/type had at least one matching slot
|
|
176
|
+
* @examplePrompt Paint only the window frames with a catalogue metal finish
|
|
177
|
+
*/
|
|
178
|
+
abstract applyToSlot(components: ComponentHandle[], slot: "glazing" | "frame", material: MaterialHandle | PluginMaterialSpec): PluginApiReturn<PluginMaterialResult>;
|
|
155
179
|
/**
|
|
156
180
|
* Reset one or more components back to the default material for their type,
|
|
157
181
|
* removing any applied finish. The inverse of `apply`; undoable when `save`
|
|
@@ -282,9 +306,11 @@ export declare abstract class PluginDesignMaterialsApi {
|
|
|
282
306
|
* @examplePrompt Make a material from this texture image URL
|
|
283
307
|
* @examplePrompt Add a semi-transparent glass material to the project
|
|
284
308
|
* @examplePrompt Define a dark grey concrete finish I can reuse
|
|
309
|
+
* @examplePrompt Make the lampshade a linen that glows when the lamp is on
|
|
285
310
|
*
|
|
286
311
|
* # Example
|
|
287
312
|
* ```ts
|
|
313
|
+
* const linen = await snaptrude.design.materials.create({ name: "Linen Shade", color: "#efe6d4", transmission: 0.3 })
|
|
288
314
|
* const glass = await snaptrude.design.materials.create({ name: "Frosted Glass", color: "#cfe4e8", alpha: 0.4 })
|
|
289
315
|
* const walls = await snaptrude.design.query.listWalls({ storeys: [1] })
|
|
290
316
|
* await snaptrude.design.materials.apply(walls, glass)
|
|
@@ -375,6 +401,7 @@ export declare abstract class PluginDesignMaterialsApi {
|
|
|
375
401
|
* | `alpha` | `number` | Opacity `0..1` |
|
|
376
402
|
* | `materialType` | `string` | Material type tag (optional) |
|
|
377
403
|
* | `textureUrl` | `string` | Diffuse texture URL (optional) |
|
|
404
|
+
* | `transmission` | `number` | Diffuse transmission `0..1` (optional; absent when none) |
|
|
378
405
|
*/
|
|
379
406
|
export declare const PluginMaterialInfo: z.ZodObject<{
|
|
380
407
|
name: z.ZodString;
|
|
@@ -383,6 +410,7 @@ export declare const PluginMaterialInfo: z.ZodObject<{
|
|
|
383
410
|
alpha: z.ZodNumber;
|
|
384
411
|
materialType: z.ZodOptional<z.ZodString>;
|
|
385
412
|
textureUrl: z.ZodOptional<z.ZodString>;
|
|
413
|
+
transmission: z.ZodOptional<z.ZodNumber>;
|
|
386
414
|
}, z.core.$strip>;
|
|
387
415
|
export type PluginMaterialInfo = z.infer<typeof PluginMaterialInfo>;
|
|
388
416
|
/**
|
|
@@ -390,11 +418,18 @@ export type PluginMaterialInfo = z.infer<typeof PluginMaterialInfo>;
|
|
|
390
418
|
*
|
|
391
419
|
* | Property | Type | Description |
|
|
392
420
|
* |---|---|---|
|
|
393
|
-
* | `name` | `string` | Name (optional; generated if omitted) |
|
|
421
|
+
* | `name` | `string` | Name (optional; generated if omitted); an exact identity-qualified listPresets name selects the full authored PBR finish |
|
|
394
422
|
* | `color` | `string` | Diffuse color `#rrggbb` (optional) |
|
|
395
423
|
* | `textureUrl` | `string` | Diffuse texture URL (optional; wins over color) |
|
|
396
424
|
* | `alpha` | `number` | Opacity `0..1` (optional) |
|
|
397
425
|
* | `materialType` | `string` | Material type tag (optional) |
|
|
426
|
+
* | `transmission` | `number` | Diffuse transmission `0..1` (optional): the share of a fixture light the material passes through, scattered |
|
|
427
|
+
*
|
|
428
|
+
* `transmission` is for lampshades and lenses: a fabric or paper shade (linen ~0.3, paper ~0.5)
|
|
429
|
+
* or an opal diffuser (~0.6). A component painted with it glows from the fixture lights
|
|
430
|
+
* (`design.lights`) behind it and passes that share of their light into the room. Fixture
|
|
431
|
+
* lights only: daylight does not pass. Leave it out for opaque finishes. Not combinable with a
|
|
432
|
+
* catalog (listPresets) name.
|
|
398
433
|
*/
|
|
399
434
|
export declare const PluginMaterialSpec: z.ZodObject<{
|
|
400
435
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -402,6 +437,7 @@ export declare const PluginMaterialSpec: z.ZodObject<{
|
|
|
402
437
|
textureUrl: z.ZodOptional<z.ZodString>;
|
|
403
438
|
alpha: z.ZodOptional<z.ZodNumber>;
|
|
404
439
|
materialType: z.ZodOptional<z.ZodString>;
|
|
440
|
+
transmission: z.ZodOptional<z.ZodNumber>;
|
|
405
441
|
}, z.core.$strip>;
|
|
406
442
|
export type PluginMaterialSpec = z.infer<typeof PluginMaterialSpec>;
|
|
407
443
|
/** Result of a material mutation — the count of targets affected. */
|
|
@@ -486,10 +522,28 @@ export declare const PluginDesignMaterialsApplyArgs: z.ZodObject<{
|
|
|
486
522
|
textureUrl: z.ZodOptional<z.ZodString>;
|
|
487
523
|
alpha: z.ZodOptional<z.ZodNumber>;
|
|
488
524
|
materialType: z.ZodOptional<z.ZodString>;
|
|
525
|
+
transmission: z.ZodOptional<z.ZodNumber>;
|
|
489
526
|
}, z.core.$strip>]>;
|
|
490
527
|
save: z.ZodOptional<z.ZodBoolean>;
|
|
491
528
|
}, z.core.$strip>;
|
|
492
529
|
export type PluginDesignMaterialsApplyArgs = z.infer<typeof PluginDesignMaterialsApplyArgs>;
|
|
530
|
+
/** Arguments for the existing host slot-paint contract. */
|
|
531
|
+
export declare const PluginDesignMaterialsApplyToSlotArgs: z.ZodObject<{
|
|
532
|
+
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
533
|
+
slot: z.ZodEnum<{
|
|
534
|
+
frame: "frame";
|
|
535
|
+
glazing: "glazing";
|
|
536
|
+
}>;
|
|
537
|
+
material: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<MaterialHandle, string>>, z.ZodObject<{
|
|
538
|
+
name: z.ZodOptional<z.ZodString>;
|
|
539
|
+
color: z.ZodOptional<z.ZodString>;
|
|
540
|
+
textureUrl: z.ZodOptional<z.ZodString>;
|
|
541
|
+
alpha: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
materialType: z.ZodOptional<z.ZodString>;
|
|
543
|
+
transmission: z.ZodOptional<z.ZodNumber>;
|
|
544
|
+
}, z.core.$strip>]>;
|
|
545
|
+
}, z.core.$strip>;
|
|
546
|
+
export type PluginDesignMaterialsApplyToSlotArgs = z.infer<typeof PluginDesignMaterialsApplyToSlotArgs>;
|
|
493
547
|
/** Arguments for {@linkcode PluginDesignMaterialsApi.reset}. */
|
|
494
548
|
export declare const PluginDesignMaterialsResetArgs: z.ZodObject<{
|
|
495
549
|
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
@@ -504,6 +558,7 @@ export declare const PluginDesignMaterialsCreateArgs: z.ZodObject<{
|
|
|
504
558
|
textureUrl: z.ZodOptional<z.ZodString>;
|
|
505
559
|
alpha: z.ZodOptional<z.ZodNumber>;
|
|
506
560
|
materialType: z.ZodOptional<z.ZodString>;
|
|
561
|
+
transmission: z.ZodOptional<z.ZodNumber>;
|
|
507
562
|
}, z.core.$strip>;
|
|
508
563
|
}, z.core.$strip>;
|
|
509
564
|
export type PluginDesignMaterialsCreateArgs = z.infer<typeof PluginDesignMaterialsCreateArgs>;
|
|
@@ -526,6 +581,7 @@ export declare const PluginDesignMaterialsApplyToFacesArgs: z.ZodObject<{
|
|
|
526
581
|
textureUrl: z.ZodOptional<z.ZodString>;
|
|
527
582
|
alpha: z.ZodOptional<z.ZodNumber>;
|
|
528
583
|
materialType: z.ZodOptional<z.ZodString>;
|
|
584
|
+
transmission: z.ZodOptional<z.ZodNumber>;
|
|
529
585
|
}, z.core.$strip>]>;
|
|
530
586
|
save: z.ZodOptional<z.ZodBoolean>;
|
|
531
587
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/materials/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAElE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/materials/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAElE;;;;;;;;;;;;;;;;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,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,+BAA+B;;;;;;;;;iBAE1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;iBAKhD,CAAA;AACF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,mCAAmC;;;;iBAI9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED,oEAAoE;AACpE,eAAO,MAAM,kCAAkC;;;iBAG7C,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AAED,sFAAsF;AACtF,eAAO,MAAM,mCAAmC;;iBACZ,CAAA;AACpC,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA"}
|
|
@@ -1514,49 +1514,6 @@ export declare const NetworkCreateArgs: z.ZodObject<{
|
|
|
1514
1514
|
export declare const NetworkGetArgs: z.ZodObject<{
|
|
1515
1515
|
graphId: z.ZodString;
|
|
1516
1516
|
}, z.core.$strict>;
|
|
1517
|
-
/** Displacement components are world millimetres, Y up, not Snaptrude units. */
|
|
1518
|
-
export declare const NetworkMoveEdgeArgs: z.ZodObject<{
|
|
1519
|
-
graphId: z.ZodString;
|
|
1520
|
-
expectedRevision: z.ZodNumber;
|
|
1521
|
-
edgeId: z.ZodString;
|
|
1522
|
-
displacement: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
1523
|
-
requestId: z.ZodString;
|
|
1524
|
-
}, z.core.$strict>;
|
|
1525
|
-
export type NetworkMoveEdgeArgs = z.input<typeof NetworkMoveEdgeArgs>;
|
|
1526
|
-
export declare const NetworkMoveEdgeResult: z.ZodObject<{
|
|
1527
|
-
graphId: z.ZodString;
|
|
1528
|
-
revision: z.ZodNumber;
|
|
1529
|
-
affectedComponentIds: z.ZodArray<z.ZodString>;
|
|
1530
|
-
alreadyApplied: z.ZodBoolean;
|
|
1531
|
-
saveStatus: z.ZodEnum<{
|
|
1532
|
-
queued: "queued";
|
|
1533
|
-
existing: "existing";
|
|
1534
|
-
}>;
|
|
1535
|
-
}, z.core.$strict>;
|
|
1536
|
-
export type NetworkMoveEdgeResult = z.infer<typeof NetworkMoveEdgeResult>;
|
|
1537
|
-
/** Immutable receipts survive undo. Retrying a move never executes it again. */
|
|
1538
|
-
export declare const NetworkEditReceipt: z.ZodObject<{
|
|
1539
|
-
requestId: z.ZodString;
|
|
1540
|
-
fingerprint: z.ZodString;
|
|
1541
|
-
revision: z.ZodNumber;
|
|
1542
|
-
affectedComponentIds: z.ZodArray<z.ZodString>;
|
|
1543
|
-
}, z.core.$strict>;
|
|
1544
|
-
export type NetworkEditReceipt = z.infer<typeof NetworkEditReceipt>;
|
|
1545
|
-
/** Each intentional apply/undo/redo has its own identity. Retries reuse it. */
|
|
1546
|
-
export declare const NetworkTransition: z.ZodObject<{
|
|
1547
|
-
id: z.ZodString;
|
|
1548
|
-
expectedRevision: z.ZodNumber;
|
|
1549
|
-
forward: z.ZodBoolean;
|
|
1550
|
-
}, z.core.$strict>;
|
|
1551
|
-
export type NetworkTransition = z.infer<typeof NetworkTransition>;
|
|
1552
|
-
export declare const NetworkTransitionReceipt: z.ZodObject<{
|
|
1553
|
-
id: z.ZodString;
|
|
1554
|
-
expectedRevision: z.ZodNumber;
|
|
1555
|
-
forward: z.ZodBoolean;
|
|
1556
|
-
requestId: z.ZodString;
|
|
1557
|
-
revision: z.ZodNumber;
|
|
1558
|
-
}, z.core.$strict>;
|
|
1559
|
-
export type NetworkTransitionReceipt = z.infer<typeof NetworkTransitionReceipt>;
|
|
1560
1517
|
export declare const NetworkContextArgs: z.ZodObject<{
|
|
1561
1518
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
1562
1519
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1611,12 +1568,10 @@ export type NetworkComponentBinding = z.infer<typeof NetworkComponentBinding>;
|
|
|
1611
1568
|
export interface SavedNetworkGraph {
|
|
1612
1569
|
id: string;
|
|
1613
1570
|
domain: NetworkDomain;
|
|
1614
|
-
revision:
|
|
1571
|
+
revision: 1;
|
|
1615
1572
|
requestId: string;
|
|
1616
1573
|
document: NetworkGraphDocument;
|
|
1617
1574
|
components: NetworkComponentBinding[];
|
|
1618
|
-
edits?: NetworkEditReceipt[];
|
|
1619
|
-
transitions?: NetworkTransitionReceipt[];
|
|
1620
1575
|
}
|
|
1621
1576
|
export interface NetworkCreateResult {
|
|
1622
1577
|
graphId: string;
|
|
@@ -1741,21 +1696,6 @@ export declare abstract class PluginElectricalApi extends PluginDomainNetworkApi
|
|
|
1741
1696
|
}
|
|
1742
1697
|
/** Plumbing equipment and routed pipe networks, constructed from agent-authored intent. */
|
|
1743
1698
|
export declare abstract class PluginPlumbingApi extends PluginDomainNetworkApi {
|
|
1744
|
-
/** Offset one straight pipe perpendicular to its axis between two rigid 90-degree elbows.
|
|
1745
|
-
* Resize adjacent pipes through instance length parameters. Out-of-plane offsets add
|
|
1746
|
-
* one pinned elbow and straight pipe per affected end, preserving fixed outer ports
|
|
1747
|
-
* and existing component identities. Rigid fittings only rotate and translate.
|
|
1748
|
-
* Reject axial sliding, moving tees, constrained fittings,
|
|
1749
|
-
* scene drift, stale revisions, and infeasible family geometry before mutation.
|
|
1750
|
-
* @param args Graph/edge identity, current revision, displacement handle in world mm,
|
|
1751
|
-
* and a unique retry identity. Identical retries return the original receipt after undo too.
|
|
1752
|
-
* @returns Affected component IDs and revision in one undoable, queued transaction.
|
|
1753
|
-
* @example
|
|
1754
|
-
* const displacement = await snaptrude.core.math.vec3.new(0, 300, 0)
|
|
1755
|
-
* await snaptrude.design.plumbing.moveEdge({ graphId, edgeId, expectedRevision,
|
|
1756
|
-
* displacement, requestId: crypto.randomUUID() })
|
|
1757
|
-
*/
|
|
1758
|
-
abstract moveEdge(args: NetworkMoveEdgeArgs): PluginApiReturn<NetworkMoveEdgeResult>;
|
|
1759
1699
|
}
|
|
1760
1700
|
/** Family-backed air-side HVAC networks. The agent authors engineering intent; the host constructs it. */
|
|
1761
1701
|
export declare abstract class PluginMechanicalApi extends PluginDomainNetworkApi {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../src/api/design/networks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../src/api/design/networks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AA2BlD;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;kBAqCvB,CAAA;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAazE;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiDzB,CAAA;AACX,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,eAAO,MAAM,mBAAmB;;;;;;EAM9B,CAAA;AASF;;;;;;GAMG;AACH,eAAO,M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,oBAAoB,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CACf,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GACxC,eAAe,CAAC,iBAAiB,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CACb,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GACtC,eAAe,CAAC,mBAAmB,CAAC;IACvC,sGAAsG;IACtG,QAAQ,CAAC,GAAG,CACV,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,GACnC,eAAe,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAC5C,8GAA8G;IAC9G,QAAQ,CAAC,KAAK,CACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,GACrC,eAAe,CAAC,kBAAkB,CAAC;CACvC;AAED,0GAA0G;AAC1G,8BAAsB,mBAAoB,SAAQ,sBAAsB;CAAG;AAC3E,2FAA2F;AAC3F,8BAAsB,iBAAkB,SAAQ,sBAAsB;CAAG;AACzE,0GAA0G;AAC1G,8BAAsB,mBAAoB,SAAQ,sBAAsB;CAAG"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../types";
|
|
3
|
-
import { ComponentHandle } from "../../../handles";
|
|
3
|
+
import { ComponentHandle, MaterialHandle } from "../../../handles";
|
|
4
4
|
import { PluginDesignChangeResult } from "../lock";
|
|
5
5
|
import { PluginObjectCatalogGroup, PluginObjectCatalogItem } from "../doors";
|
|
6
|
+
import { PluginMaterialSpec } from "../materials";
|
|
6
7
|
/**
|
|
7
8
|
* `snaptrude.design.windows` — window-specific reads. Creation lives at
|
|
8
9
|
* `design.create.window`; generic reads (`listWindows`/`getHost`/`getProperties`) live
|
|
@@ -20,6 +21,25 @@ import { PluginObjectCatalogGroup, PluginObjectCatalogItem } from "../doors";
|
|
|
20
21
|
*/
|
|
21
22
|
export declare abstract class PluginDesignWindowsApi {
|
|
22
23
|
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Paint only the window's authored glazing, preserving its frame. Families change
|
|
26
|
+
* with linked copies; legacy catalogue types change every instance of that type.
|
|
27
|
+
* Undoable; refuses locked linked/type members or out-of-proposal targets.
|
|
28
|
+
* @param window Window whose glazing to paint
|
|
29
|
+
* @param material Handle or spec; preserve the exact listPresets name for PBR glass
|
|
30
|
+
* @returns Components affected, including linked/type instances
|
|
31
|
+
* @examplePrompt Use clear glass for this window without changing its frame
|
|
32
|
+
*/
|
|
33
|
+
abstract setGlazing(window: ComponentHandle, material: MaterialHandle | PluginMaterialSpec): PluginApiReturn<PluginDesignChangeResult>;
|
|
34
|
+
/**
|
|
35
|
+
* Paint only non-glazing slots (frames, sashes, hardware), never the clear panes.
|
|
36
|
+
* Scope, locking and undo match setGlazing and design.materials.applyToSlot.
|
|
37
|
+
* @param window Window whose frame to paint
|
|
38
|
+
* @param material Handle or spec, e.g. `{ name: preset.name }` from listPresets
|
|
39
|
+
* @returns Components affected, including linked/type instances
|
|
40
|
+
* @examplePrompt Use brushed metal for this window's frame without changing the glass
|
|
41
|
+
*/
|
|
42
|
+
abstract setFrame(window: ComponentHandle, material: MaterialHandle | PluginMaterialSpec): PluginApiReturn<PluginDesignChangeResult>;
|
|
23
43
|
/**
|
|
24
44
|
* Get the type name of a window — the label that identifies which kind of
|
|
25
45
|
* window the instance is, as shown in its properties.
|
|
@@ -270,6 +290,19 @@ export declare const PluginDesignWindowSetHeightArgs: z.ZodObject<{
|
|
|
270
290
|
height: z.ZodNumber;
|
|
271
291
|
}, z.core.$strip>;
|
|
272
292
|
export type PluginDesignWindowSetHeightArgs = z.infer<typeof PluginDesignWindowSetHeightArgs>;
|
|
293
|
+
/** Arguments for setGlazing / setFrame; both preserve the other authored slot kind. */
|
|
294
|
+
export declare const PluginDesignWindowSetSlotArgs: z.ZodObject<{
|
|
295
|
+
window: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
296
|
+
material: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<MaterialHandle, string>>, z.ZodObject<{
|
|
297
|
+
name: z.ZodOptional<z.ZodString>;
|
|
298
|
+
color: z.ZodOptional<z.ZodString>;
|
|
299
|
+
textureUrl: z.ZodOptional<z.ZodString>;
|
|
300
|
+
alpha: z.ZodOptional<z.ZodNumber>;
|
|
301
|
+
materialType: z.ZodOptional<z.ZodString>;
|
|
302
|
+
transmission: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
}, z.core.$strip>]>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
export type PluginDesignWindowSetSlotArgs = z.infer<typeof PluginDesignWindowSetSlotArgs>;
|
|
273
306
|
export { PluginObjectCatalogGroup, PluginObjectCatalogItem };
|
|
274
307
|
/**
|
|
275
308
|
* Arguments for {@linkcode PluginDesignWindowsApi.listCatalog}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/windows/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/windows/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAC5E,OAAO,EAAE,kB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