@snaptrude/plugin-core 0.9.5 → 0.9.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @snaptrude/plugin-core
2
2
 
3
+ ## 0.9.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Add five APIs the plugin agent repeatedly reached for but that did not exist.
8
+ - `core.project.getInfo()` — project id, display name, unit type, storey count (scoped to the active building), active storey, and site location in one call. Closes a genuine capability gap: nothing previously returned the current project's identity.
9
+ - `core.storeys.getActive()` — `setActive` had no getter, unlike `core.buildings`, `core.layers` and `core.proposals`.
10
+ - `core.camera.getMode()` — `setMode` had no getter, while `getProjection`/`setProjection` on the same class were paired.
11
+ - `design.visibility.show(components)` — `hide` previously had only `showAll` as its inverse, so specific components could not be revealed.
12
+ - `design.furniture.listCatalogGroups()` — matches `design.doors` and `design.windows`, so all three catalog surfaces are named alike. `design.furniture.listCategories()` is deprecated but still supported.
13
+
3
14
  ## 0.9.4
4
15
 
5
16
  ### Patch Changes
package/api-manifest.json CHANGED
@@ -483,6 +483,17 @@
483
483
  "argsType": "string",
484
484
  "resultType": "PluginCoreBuildingsUpdateResult"
485
485
  },
486
+ {
487
+ "path": "core.camera.getMode",
488
+ "namespace": "core.camera",
489
+ "summary": "Get the current camera mode. Paired with {@linkcode PluginCameraApi.setMode}.",
490
+ "examplePrompts": [
491
+ "Am I in 2D or 3D?",
492
+ "What view mode is the editor in?\n\n# Example\n```ts\nif ((await snaptrude.core.camera.getMode()) === \"2d\") {\nawait snaptrude.core.camera.setMode(\"3d\")\n}\n```"
493
+ ],
494
+ "argsType": null,
495
+ "resultType": "PluginCameraMode"
496
+ },
486
497
  {
487
498
  "path": "core.camera.getProjection",
488
499
  "namespace": "core.camera",
@@ -3397,6 +3408,19 @@
3397
3408
  "argsType": "PluginAppMode",
3398
3409
  "resultType": "PluginCoreModeSetResult"
3399
3410
  },
3411
+ {
3412
+ "path": "core.project.getInfo",
3413
+ "namespace": "core.project",
3414
+ "summary": "Read identity and headline facts about the currently open project — id, display name, unit type, storey count, active storey, and site location when the project is geo-located.",
3415
+ "examplePrompts": [
3416
+ "What is this project called?",
3417
+ "Where is this project located?",
3418
+ "Give me a summary of this project",
3419
+ "How many storeys does this project have?\n\n# Example\n```ts\nconst info = await snaptrude.core.project.getInfo()\nconsole.log(info.name, info.units, info.storeyCount)\n```"
3420
+ ],
3421
+ "argsType": null,
3422
+ "resultType": "PluginProjectInfo"
3423
+ },
3400
3424
  {
3401
3425
  "path": "core.project.settings.getTolerance",
3402
3426
  "namespace": "core.project.settings",
@@ -3819,6 +3843,17 @@
3819
3843
  "argsType": "number",
3820
3844
  "resultType": "PluginStoryGetResult"
3821
3845
  },
3846
+ {
3847
+ "path": "core.storeys.getActive",
3848
+ "namespace": "core.storeys",
3849
+ "summary": "Get the active storey's value. Paired with {@linkcode PluginCoreStoreysApi.setActive}.",
3850
+ "examplePrompts": [
3851
+ "Which storey am I on?",
3852
+ "What is the current storey?\n\n# Example\n```ts\nconst storey = await snaptrude.core.storeys.getActive()\n```"
3853
+ ],
3854
+ "argsType": null,
3855
+ "resultType": "number"
3856
+ },
3822
3857
  {
3823
3858
  "path": "core.storeys.list",
3824
3859
  "namespace": "core.storeys",
@@ -4757,6 +4792,17 @@
4757
4792
  "argsType": "\"team\" | \"general\"",
4758
4793
  "resultType": "PluginFurnitureCatalogItem[]"
4759
4794
  },
4795
+ {
4796
+ "path": "design.furniture.listCatalogGroups",
4797
+ "namespace": "design.furniture",
4798
+ "summary": "List the furniture catalog's groups. Matches {@linkcode PluginDesignDoorsApi.listCatalogGroups} and {@linkcode PluginDesignWindowsApi.listCatalogGroups}, so all three catalog surfaces are named alike.",
4799
+ "examplePrompts": [
4800
+ "What furniture groups are available?",
4801
+ "List the furniture categories in this project\n\n# Example\n```ts\nconst groups = await snaptrude.design.furniture.listCatalogGroups()\nfor (const g of groups) console.log(g.dbType, g.label, g.source)\n```"
4802
+ ],
4803
+ "argsType": null,
4804
+ "resultType": "PluginObjectCatalogGroup[]"
4805
+ },
4760
4806
  {
4761
4807
  "path": "design.furniture.listCategories",
4762
4808
  "namespace": "design.furniture",
@@ -4768,7 +4814,8 @@
4768
4814
  "Which furniture categories can I filter by?\n\n# Example\n```ts\nconst categories = await snaptrude.design.furniture.listCategories()\nconst [first] = categories\nconst items = await snaptrude.design.furniture.listCatalog(undefined, first)\nconsole.log(first, \"→\", items.length, \"items\")\n```"
4769
4815
  ],
4770
4816
  "argsType": null,
4771
- "resultType": "string[]"
4817
+ "resultType": "string[]",
4818
+ "deprecated": "design.furniture.listCatalogGroups"
4772
4819
  },
4773
4820
  {
4774
4821
  "path": "design.furniture.setDimensions",
@@ -5936,6 +5983,17 @@
5936
5983
  "argsType": "ComponentHandle[]",
5937
5984
  "resultType": "PluginDesignChangeResult"
5938
5985
  },
5986
+ {
5987
+ "path": "design.visibility.show",
5988
+ "namespace": "design.visibility",
5989
+ "summary": "Reveal specific hidden components — the inverse of {@linkcode PluginDesignVisibilityApi.hide}. Use {@linkcode PluginDesignVisibilityApi.showAll} to reveal everything.",
5990
+ "examplePrompts": [
5991
+ "Show these walls again",
5992
+ "Unhide the selected furniture\n\n# Example\n```ts\nawait snaptrude.design.visibility.show([wall])\n```"
5993
+ ],
5994
+ "argsType": "ComponentHandle[]",
5995
+ "resultType": "PluginDesignChangeResult"
5996
+ },
5939
5997
  {
5940
5998
  "path": "design.visibility.showAll",
5941
5999
  "namespace": "design.visibility",
@@ -53,6 +53,22 @@ export declare abstract class PluginCameraApi {
53
53
  * ```
54
54
  */
55
55
  abstract setStandardView(view: PluginStandardView): PluginApiReturn<boolean>;
56
+ /**
57
+ * Get the current camera mode. Paired with {@linkcode PluginCameraApi.setMode}.
58
+ *
59
+ * @returns `"2d"` when the editor is in plan view, `"3d"` otherwise.
60
+ *
61
+ * @examplePrompt Am I in 2D or 3D?
62
+ * @examplePrompt What view mode is the editor in?
63
+ *
64
+ * # Example
65
+ * ```ts
66
+ * if ((await snaptrude.core.camera.getMode()) === "2d") {
67
+ * await snaptrude.core.camera.setMode("3d")
68
+ * }
69
+ * ```
70
+ */
71
+ abstract getMode(): PluginApiReturn<PluginCameraMode>;
56
72
  /**
57
73
  * Toggle the modelling mode between `2d` (plan) and `3d`. Mirrors the canvas
58
74
  * 2D/3D toggle: `3d` enters the isometric perspective view, `2d` drops to the
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/camera/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C;;;;;;;;GAQG;AACH,8BAAsB,eAAe;;IAGnC;;;;;;;;;;;;;;;;;;OAkBG;aACa,QAAQ,CACtB,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,UAAU,GACjB,eAAe,CAAC,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;OAmBG;aACa,eAAe,CAC7B,IAAI,EAAE,kBAAkB,GACvB,eAAe,CAAC,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;;OAiBG;aACa,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,eAAe,CAAC,OAAO,CAAC;IAEzE;;;;;;;;;;;;;;;;OAgBG;aACa,aAAa,IAAI,eAAe,CAAC,sBAAsB,CAAC;IAExE;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,aAAa,CAC3B,UAAU,EAAE,sBAAsB,GACjC,eAAe,CAAC,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;OAgBG;aACa,WAAW,IAAI,eAAe,CAAC,OAAO,CAAC;IAEvD;;;;;;;;;;;;;;;;;OAiBG;aACa,aAAa,IAAI,eAAe,CAAC,OAAO,CAAC;CAC1D;AAED;;;GAGG;AACH,e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CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;iBAE1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;iBAElC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;iBAExC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,6BAA6B,CACrC,CAAA"}
@@ -3,11 +3,41 @@ import { PluginApiReturn } from "../../../types";
3
3
  /**
4
4
  * Project-level settings and info.
5
5
  *
6
- * Accessed via `snaptrude.core.project`. Currently exposes
6
+ * Accessed via `snaptrude.core.project`. Exposes
7
+ * {@linkcode PluginProjectApi.getInfo} (project identity) and
7
8
  * {@linkcode PluginProjectApi.settings} (snap + grid controls).
8
9
  */
9
10
  export declare abstract class PluginProjectApi {
10
11
  constructor();
12
+ /**
13
+ * Read identity and headline facts about the currently open project — id,
14
+ * display name, unit type, storey count, active storey, and site location
15
+ * when the project is geo-located.
16
+ *
17
+ * `activeStorey` and `storeyCount` are both scoped to the ACTIVE BUILDING, so
18
+ * they always describe the same building. In a multi-building project
19
+ * `storeyCount` is therefore NOT the total across every building — use
20
+ * `core.storeys.list()`, which spans all buildings, for that.
21
+ *
22
+ * @returns A {@linkcode PluginProjectInfo}. `name` is `null` only when the
23
+ * project genuinely has no title; `location` is `null` only when the project
24
+ * is not geo-located. Neither is used to signal a failure.
25
+ * @throws PRECONDITION_FAILED when no project is open.
26
+ * @throws OPERATION_FAILED when the project lookup or the site-location read
27
+ * fails. A failed read is never reported as `null`.
28
+ *
29
+ * @examplePrompt What is this project called?
30
+ * @examplePrompt Where is this project located?
31
+ * @examplePrompt Give me a summary of this project
32
+ * @examplePrompt How many storeys does this project have?
33
+ *
34
+ * # Example
35
+ * ```ts
36
+ * const info = await snaptrude.core.project.getInfo()
37
+ * console.log(info.name, info.units, info.storeyCount)
38
+ * ```
39
+ */
40
+ abstract getInfo(): PluginApiReturn<PluginProjectInfo>;
11
41
  /** Project settings — snaps and grid. See {@linkcode PluginProjectSettingsApi}. */
12
42
  abstract settings: PluginProjectSettingsApi;
13
43
  }
@@ -396,4 +426,41 @@ export declare const PluginToleranceArgs: z.ZodObject<{
396
426
  value: z.ZodNumber;
397
427
  }, z.core.$strip>;
398
428
  export type PluginToleranceArgs = z.infer<typeof PluginToleranceArgs>;
429
+ /**
430
+ * Identity and headline facts about the currently open project.
431
+ *
432
+ * `location` is a read-only projection of {@linkcode PluginProgramSiteApi.getLocation}
433
+ * — `program.site.*` remains the full site surface (context, weather, polygons).
434
+ * It is mirrored here because "what and where is this project" is one question.
435
+ *
436
+ * | Property | Type | Description |
437
+ * |---|---|---|
438
+ * | `projectId` | `string` | The open project's id (floorkey) |
439
+ * | `name` | `string \| null` | Display name; `null` only when the project has no title (a failed lookup throws) |
440
+ * | `units` | {@linkcode PUnitType} | The project's unit type |
441
+ * | `activeStorey` | `number` | The active storey value, in the active building |
442
+ * | `storeyCount` | `number` | How many storeys the ACTIVE BUILDING has (not the project-wide total — `core.storeys.list()` spans all buildings) |
443
+ * | `location` | `{ latitude, longitude } \| null` | Site location; `null` only when not geo-located (a failed read throws) |
444
+ */
445
+ export declare const PluginProjectInfo: z.ZodObject<{
446
+ projectId: z.ZodString;
447
+ name: z.ZodNullable<z.ZodString>;
448
+ units: z.ZodEnum<{
449
+ meters: "meters";
450
+ "feet-inches": "feet-inches";
451
+ inches: "inches";
452
+ centimeters: "centimeters";
453
+ millimeters: "millimeters";
454
+ kilometers: "kilometers";
455
+ miles: "miles";
456
+ babylon: "babylon";
457
+ }>;
458
+ activeStorey: z.ZodNumber;
459
+ storeyCount: z.ZodNumber;
460
+ location: z.ZodNullable<z.ZodObject<{
461
+ latitude: z.ZodNumber;
462
+ longitude: z.ZodNumber;
463
+ }, z.core.$strip>>;
464
+ }, z.core.$strip>;
465
+ export type PluginProjectInfo = z.infer<typeof PluginProjectInfo>;
399
466
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;GAKG;AACH,8BAAsB,gBAAgB;;IAGpC,mFAAmF;IACnF,SAAgB,QAAQ,EAAE,wBAAwB,CAAA;CACnD;AAED;;;;GAIG;AACH,8BAAsB,wBAAwB;;IAG5C;;;;;;;;;;;;;;;;;OAiBG;aACa,YAAY,IAAI,eAAe,CAAC,MAAM,CAAC;IAEvD;;;;;;;;;;;;;;;;;;OAkBG;aACa,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC;IAErE,wGAAwG;IACxG,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,oDAAoD;IACpD,SAAgB,IAAI,EAAE,aAAa,CAAA;CACpC;AAED;;;;;;GAMG;AACH,8BAAsB,cAAc;;IAGlC;;;;;;;;;;;;;;;;;OAiBG;aACa,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC;IACrE;;;;;;;;;;;;;;OAcG;aACa,YAAY,IAAI,eAAe,CAAC,MAAM,CAAC;IACvD;;;;;;;;;;;;;OAaG;aACa,eAAe,IAAI,eAAe,CAAC,OAAO,CAAC;IAC3D;;;;;;;;;;;;;OAaG;aACa,gBAAgB,IAAI,eAAe,CAAC,OAAO,CAAC;IAE5D;;;;;;;;;;;;;;;;;OAiB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;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;iBAE9B,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;iBAE9B,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;iBAS5B,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -137,6 +137,20 @@ export declare abstract class PluginCoreStoreysApi {
137
137
  abstract update(storyValue: number, height?: number, options?: {
138
138
  name?: string;
139
139
  }): PluginApiReturn<PluginStoryUpdateResult>;
140
+ /**
141
+ * Get the active storey's value. Paired with {@linkcode PluginCoreStoreysApi.setActive}.
142
+ *
143
+ * @returns The active storey value, in the same numbering `list` and `get` use.
144
+ *
145
+ * @examplePrompt Which storey am I on?
146
+ * @examplePrompt What is the current storey?
147
+ *
148
+ * # Example
149
+ * ```ts
150
+ * const storey = await snaptrude.core.storeys.getActive()
151
+ * ```
152
+ */
153
+ abstract getActive(): PluginApiReturn<number>;
140
154
  /**
141
155
  * Make a storey the active storey — the same as clicking it in the storey/layer
142
156
  * panel. Subsequent draws and creates target this storey, and in 2D the
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/storeys/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,EACL,sBAAsB,EACtB,oBAAoB,EAEpB,uBAAuB,EACvB,u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U,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,CAAC;IAE9C;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,MAAM,CACpB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,IAAI,CAClB,SAAS,EAAE,IAAI,GAAG,MAAM,EACxB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAC7D,eAAe,CAAC,0BAA0B,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;;iBAEtC,CAAA;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,2BAA2B,CACnC,CAAA"}
@@ -2,6 +2,7 @@ import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../types";
3
3
  import { ComponentHandle } from "../../../handles";
4
4
  import { PluginDesignChangeResult } from "../lock";
5
+ import { PluginObjectCatalogGroup } from "../doors";
5
6
  /**
6
7
  * `snaptrude.design.furniture` — the placeable furniture **catalog** (a library of
7
8
  * source items, NOT scene entities) plus dimension reads/edits of PLACED furniture.
@@ -83,8 +84,40 @@ export declare abstract class PluginDesignFurnitureApi {
83
84
  * const items = await snaptrude.design.furniture.listCatalog(undefined, first)
84
85
  * console.log(first, "→", items.length, "items")
85
86
  * ```
87
+ *
88
+ * @deprecated Use `design.furniture.listCatalogGroups` — the same name
89
+ * `design.doors` and `design.windows` use. Still supported.
86
90
  */
87
91
  abstract listCategories(): PluginApiReturn<string[]>;
92
+ /**
93
+ * List the furniture catalog's groups. Matches
94
+ * {@linkcode PluginDesignDoorsApi.listCatalogGroups} and
95
+ * {@linkcode PluginDesignWindowsApi.listCatalogGroups}, so all three catalog
96
+ * surfaces are named alike.
97
+ *
98
+ * `source` is `"default"` for the built-in picker groups and `"team"` for the
99
+ * sub-types of THIS project's team library — exactly the split
100
+ * {@linkcode PluginDesignFurnitureApi.listCatalog}'s `source` filter uses, so
101
+ * every `"team"` group is guaranteed to match at least one team item here.
102
+ * For furniture the group token and its label are the same string (the
103
+ * category), so `dbType === label`; `design.doors`/`design.windows` have a
104
+ * distinct engine `dbType`.
105
+ *
106
+ * @returns The catalog groups as {@linkcode PluginObjectCatalogGroup}`[]`
107
+ * (`[]` when empty). Pass a group's `dbType` (=== `label`) to
108
+ * {@linkcode PluginDesignFurnitureApi.listCatalog}'s `category` filter to
109
+ * list its items.
110
+ *
111
+ * @examplePrompt What furniture groups are available?
112
+ * @examplePrompt List the furniture categories in this project
113
+ *
114
+ * # Example
115
+ * ```ts
116
+ * const groups = await snaptrude.design.furniture.listCatalogGroups()
117
+ * for (const g of groups) console.log(g.dbType, g.label, g.source)
118
+ * ```
119
+ */
120
+ abstract listCatalogGroups(): PluginApiReturn<PluginObjectCatalogGroup[]>;
88
121
  /**
89
122
  * List the placeable furniture catalog (team + general libraries),
90
123
  * optionally filtered by library `source` and/or `category`.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/furniture/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;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,wBAAwB;;IAG5C;;;;;;;;;;;;;;;;;;;OAmBG;aACa,aAAa,CAC3B,IAAI,EAAE,eAAe,GACpB,eAAe,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAEpD;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,aAAa,CAC3B,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE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AAC,CAAA;AAEzF;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B;;;;iBAI1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC;;;;;;;iBAGjD,CAAA;AACF,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,sCAAsC,CAC9C,CAAA"}
@@ -34,6 +34,23 @@ export declare abstract class PluginDesignVisibilityApi {
34
34
  * ```
35
35
  */
36
36
  abstract hide(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>;
37
+ /**
38
+ * Reveal specific hidden components — the inverse of
39
+ * {@linkcode PluginDesignVisibilityApi.hide}. Use
40
+ * {@linkcode PluginDesignVisibilityApi.showAll} to reveal everything.
41
+ *
42
+ * @param components - The components to reveal.
43
+ * @returns A {@linkcode PluginDesignChangeResult} echoing the components shown.
44
+ *
45
+ * @examplePrompt Show these walls again
46
+ * @examplePrompt Unhide the selected furniture
47
+ *
48
+ * # Example
49
+ * ```ts
50
+ * await snaptrude.design.visibility.show([wall])
51
+ * ```
52
+ */
53
+ abstract show(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>;
37
54
  /**
38
55
  * Isolate entities — hide everything else so only the given entities remain
39
56
  * visible (the "Isolate" / solo action). Undoable. Reverse it with
@@ -84,6 +101,17 @@ export declare const PluginDesignVisibilityHideArgs: z.ZodObject<{
84
101
  components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
85
102
  }, z.core.$strip>;
86
103
  export type PluginDesignVisibilityHideArgs = z.infer<typeof PluginDesignVisibilityHideArgs>;
104
+ /**
105
+ * Arguments for {@linkcode PluginDesignVisibilityApi.show}.
106
+ *
107
+ * | Property | Type | Description |
108
+ * |---|---|---|
109
+ * | `components` | {@linkcode ComponentHandle}`[]` | Entities to reveal |
110
+ */
111
+ export declare const PluginDesignVisibilityShowArgs: z.ZodObject<{
112
+ components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
113
+ }, z.core.$strip>;
114
+ export type PluginDesignVisibilityShowArgs = z.infer<typeof PluginDesignVisibilityShowArgs>;
87
115
  /**
88
116
  * Arguments for {@linkcode PluginDesignVisibilityApi.isolate}.
89
117
  *
@@ -1 +1 @@
1
- {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../src/api/design/visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AAEjD;;;;;;;;;GASG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,CAClB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;OAkBG;aACa,OAAO,CACrB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;OAgBG;aACa,OAAO,IAAI,eAAe,CAAC,wBAAwB,CAAC;CACrE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC;;iBAE5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA"}
1
+ {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../src/api/design/visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AAEjD;;;;;;;;;GASG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,CAClB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;OAeG;aACa,IAAI,CAClB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;OAkBG;aACa,OAAO,CACrB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;OAgBG;aACa,OAAO,IAAI,eAAe,CAAC,wBAAwB,CAAC;CACrE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC;;iBAE5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA"}
package/dist/index.cjs CHANGED
@@ -443,6 +443,7 @@ __export(index_exports, {
443
443
  PluginDesignVisibilityApi: () => PluginDesignVisibilityApi,
444
444
  PluginDesignVisibilityHideArgs: () => PluginDesignVisibilityHideArgs,
445
445
  PluginDesignVisibilityIsolateArgs: () => PluginDesignVisibilityIsolateArgs,
446
+ PluginDesignVisibilityShowArgs: () => PluginDesignVisibilityShowArgs,
446
447
  PluginDesignWindowArgs: () => PluginDesignWindowArgs,
447
448
  PluginDesignWindowExistsArgs: () => PluginDesignWindowExistsArgs,
448
449
  PluginDesignWindowGetCatalogItemArgs: () => PluginDesignWindowGetCatalogItemArgs,
@@ -919,6 +920,7 @@ __export(index_exports, {
919
920
  PluginProgramSpreadsheetTransactionArgs: () => PluginProgramSpreadsheetTransactionArgs,
920
921
  PluginProgramSpreadsheetTransactionResult: () => PluginProgramSpreadsheetTransactionResult,
921
922
  PluginProjectApi: () => PluginProjectApi,
923
+ PluginProjectInfo: () => PluginProjectInfo,
922
924
  PluginProjectRef: () => PluginProjectRef,
923
925
  PluginProjectSettingsApi: () => PluginProjectSettingsApi,
924
926
  PluginQuatApi: () => PluginQuatApi,
@@ -2006,6 +2008,14 @@ var PluginGridValueArgs = z21.object({
2006
2008
  var PluginToleranceArgs = z21.object({
2007
2009
  value: z21.number()
2008
2010
  });
2011
+ var PluginProjectInfo = z21.object({
2012
+ projectId: z21.string(),
2013
+ name: z21.string().nullable(),
2014
+ units: PUnitType,
2015
+ activeStorey: z21.number(),
2016
+ storeyCount: z21.number(),
2017
+ location: z21.object({ latitude: z21.number(), longitude: z21.number() }).nullable()
2018
+ });
2009
2019
 
2010
2020
  // src/api/core/comment/index.ts
2011
2021
  var z22 = __toESM(require("zod"), 1);
@@ -3967,6 +3977,9 @@ var PluginDesignVisibilityApi = class {
3967
3977
  var PluginDesignVisibilityHideArgs = z56.object({
3968
3978
  components: z56.array(ComponentHandle)
3969
3979
  });
3980
+ var PluginDesignVisibilityShowArgs = z56.object({
3981
+ components: z56.array(ComponentHandle)
3982
+ });
3970
3983
  var PluginDesignVisibilityIsolateArgs = z56.object({
3971
3984
  components: z56.array(ComponentHandle)
3972
3985
  });
@@ -7035,6 +7048,7 @@ function makeClientEnvelope(code, message, extra) {
7035
7048
  PluginDesignVisibilityApi,
7036
7049
  PluginDesignVisibilityHideArgs,
7037
7050
  PluginDesignVisibilityIsolateArgs,
7051
+ PluginDesignVisibilityShowArgs,
7038
7052
  PluginDesignWindowArgs,
7039
7053
  PluginDesignWindowExistsArgs,
7040
7054
  PluginDesignWindowGetCatalogItemArgs,
@@ -7511,6 +7525,7 @@ function makeClientEnvelope(code, message, extra) {
7511
7525
  PluginProgramSpreadsheetTransactionArgs,
7512
7526
  PluginProgramSpreadsheetTransactionResult,
7513
7527
  PluginProjectApi,
7528
+ PluginProjectInfo,
7514
7529
  PluginProjectRef,
7515
7530
  PluginProjectSettingsApi,
7516
7531
  PluginQuatApi,