@snaptrude/plugin-core 0.9.16-networks-20261012.1 → 0.9.17

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/api-manifest.json +9711 -0
  3. package/dist/api/analysis/daylight.d.ts +5 -5
  4. package/dist/api/analysis/solar.d.ts +2 -2
  5. package/dist/api/core/camera/index.d.ts +0 -29
  6. package/dist/api/core/camera/index.d.ts.map +1 -1
  7. package/dist/api/core/zoom/index.d.ts +0 -13
  8. package/dist/api/core/zoom/index.d.ts.map +1 -1
  9. package/dist/api/design/create/bulk-items.d.ts +21 -40
  10. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  11. package/dist/api/design/create/index.d.ts +97 -120
  12. package/dist/api/design/create/index.d.ts.map +1 -1
  13. package/dist/api/design/create/opening-fields.d.ts +12 -13
  14. package/dist/api/design/create/opening-fields.d.ts.map +1 -1
  15. package/dist/api/design/doors/index.d.ts +24 -18
  16. package/dist/api/design/doors/index.d.ts.map +1 -1
  17. package/dist/api/design/family.d.ts +27 -797
  18. package/dist/api/design/family.d.ts.map +1 -1
  19. package/dist/api/design/index.d.ts +0 -16
  20. package/dist/api/design/index.d.ts.map +1 -1
  21. package/dist/api/design/query/index.d.ts +30 -30
  22. package/dist/api/design/selection/index.d.ts +10 -10
  23. package/dist/api/design/types/index.d.ts +24 -40
  24. package/dist/api/design/types/index.d.ts.map +1 -1
  25. package/dist/api/design/update/index.d.ts +3 -40
  26. package/dist/api/design/update/index.d.ts.map +1 -1
  27. package/dist/api/design/windows/index.d.ts +8 -8
  28. package/dist/api/design/windows/index.d.ts.map +1 -1
  29. package/dist/api/presentation/aiInspiration.d.ts +10 -10
  30. package/dist/api/presentation/annotate.d.ts +22 -38
  31. package/dist/api/presentation/annotate.d.ts.map +1 -1
  32. package/dist/api/presentation/export.d.ts +5 -23
  33. package/dist/api/presentation/export.d.ts.map +1 -1
  34. package/dist/api/presentation/index.d.ts +21 -32
  35. package/dist/api/presentation/index.d.ts.map +1 -1
  36. package/dist/api/presentation/placedViews.d.ts +6 -106
  37. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  38. package/dist/api/presentation/sections.d.ts +461 -0
  39. package/dist/api/presentation/sections.d.ts.map +1 -0
  40. package/dist/api/presentation/shapes.d.ts +2 -2
  41. package/dist/api/presentation/sheets.d.ts +19 -175
  42. package/dist/api/presentation/sheets.d.ts.map +1 -1
  43. package/dist/api/presentation/views.d.ts +5 -103
  44. package/dist/api/presentation/views.d.ts.map +1 -1
  45. package/dist/api/presentation/walkthroughs.d.ts +6 -6
  46. package/dist/index.cjs +2434 -3619
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.js +2421 -3501
  49. package/dist/index.js.map +1 -1
  50. package/package.json +1 -1
  51. package/scripts/generate-manifest.mjs +0 -5
  52. package/src/api/core/camera/index.ts +0 -29
  53. package/src/api/core/zoom/index.ts +0 -13
  54. package/src/api/design/create/bulk-items.ts +16 -23
  55. package/src/api/design/create/index.ts +119 -129
  56. package/src/api/design/create/opening-fields.ts +12 -15
  57. package/src/api/design/doors/index.ts +42 -58
  58. package/src/api/design/family.ts +32 -662
  59. package/src/api/design/index.ts +4 -34
  60. package/src/api/design/types/index.ts +24 -31
  61. package/src/api/design/update/index.ts +3 -41
  62. package/src/api/design/windows/index.ts +22 -40
  63. package/src/api/presentation/annotate.ts +58 -90
  64. package/src/api/presentation/export.ts +6 -32
  65. package/src/api/presentation/index.ts +23 -39
  66. package/src/api/presentation/placedViews.ts +28 -119
  67. package/src/api/presentation/sections.ts +420 -0
  68. package/src/api/presentation/sheets.ts +20 -181
  69. package/src/api/presentation/views.ts +6 -46
  70. package/dist/api/design/bim.d.ts +0 -209
  71. package/dist/api/design/bim.d.ts.map +0 -1
  72. package/dist/api/design/catalog.d.ts +0 -320
  73. package/dist/api/design/catalog.d.ts.map +0 -1
  74. package/dist/api/design/networks.d.ts +0 -1703
  75. package/dist/api/design/networks.d.ts.map +0 -1
  76. package/dist/api/presentation/drawingContract.d.ts +0 -32
  77. package/dist/api/presentation/drawingContract.d.ts.map +0 -1
  78. package/dist/api/presentation/drawings.d.ts +0 -3523
  79. package/dist/api/presentation/drawings.d.ts.map +0 -1
  80. package/dist/api/presentation/viewPresets.d.ts +0 -222
  81. package/dist/api/presentation/viewPresets.d.ts.map +0 -1
  82. package/src/api/design/bim.ts +0 -121
  83. package/src/api/design/catalog.ts +0 -203
  84. package/src/api/design/networks.ts +0 -607
  85. package/src/api/presentation/drawingContract.ts +0 -70
  86. package/src/api/presentation/drawings.ts +0 -1179
  87. package/src/api/presentation/viewPresets.ts +0 -241
  88. package/test/drawingContract.test.mjs +0 -288
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawings.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/drawings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAEL,oBAAoB,EAGpB,qBAAqB,EACtB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAO9C,sFAAsF;AACtF,eAAO,MAAM,mBAAmB;;kBAErB,CAAA;AACX,eAAO,MAAM,qBAAqB;;;kBAEhC,CAAA;AACF,eAAO,MAAM,oBAAoB;;kBAEtB,CAAA;AACX,eAAO,MAAM,0BAA0B;;;;;;kBAK5B,CAAA;AACX,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AACD,eAAO,MAAM,uBAAuB;;;;;;;kBAElC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,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MAAM,CACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE,0BAA0B,GACnC,eAAe,CAAC,yBAAyB,CAAC;CAC9C"}
@@ -1,222 +0,0 @@
1
- import * as z from "zod";
2
- import type { PluginApiReturn } from "../../types";
3
- /** Presets are document-local. Their ids are stable across reload; built-ins are immutable. */
4
- export declare const PluginViewPreset: z.ZodObject<{
5
- id: z.ZodString;
6
- name: z.ZodString;
7
- builtIn: z.ZodBoolean;
8
- revision: z.ZodNumber;
9
- }, z.core.$strip>;
10
- export type PluginViewPreset = z.infer<typeof PluginViewPreset>;
11
- export declare const PluginViewPresetIdArgs: z.ZodObject<{
12
- presetId: z.ZodString;
13
- }, z.core.$strict>;
14
- export type PluginViewPresetIdArgs = z.infer<typeof PluginViewPresetIdArgs>;
15
- export declare const PluginViewPresetCreateArgs: z.ZodObject<{
16
- name: z.ZodString;
17
- fromDrawingId: z.ZodString;
18
- }, z.core.$strict>;
19
- export type PluginViewPresetCreateArgs = z.infer<typeof PluginViewPresetCreateArgs>;
20
- export declare const PluginViewPresetRenameArgs: z.ZodObject<{
21
- presetId: z.ZodString;
22
- name: z.ZodString;
23
- }, z.core.$strict>;
24
- export type PluginViewPresetRenameArgs = z.infer<typeof PluginViewPresetRenameArgs>;
25
- export declare const PluginViewPresetUpdateArgs: z.ZodObject<{
26
- presetId: z.ZodString;
27
- fromDrawingId: z.ZodString;
28
- }, z.core.$strict>;
29
- export type PluginViewPresetUpdateArgs = z.infer<typeof PluginViewPresetUpdateArgs>;
30
- export declare const PluginViewPresetDeleteArgs: z.ZodObject<{
31
- presetId: z.ZodString;
32
- replacementId: z.ZodString;
33
- }, z.core.$strict>;
34
- export type PluginViewPresetDeleteArgs = z.infer<typeof PluginViewPresetDeleteArgs>;
35
- /**
36
- * Reusable styles for kernel-plan drawings, stored in the Present document.
37
- *
38
- * A preset holds every style category of a native kernel plan. A drawing is
39
- * bound to one with {@linkcode PluginPresentationDrawingsApi.applyPreset}; its
40
- * own style changes are overrides on top, dropped by
41
- * {@linkcode PluginPresentationDrawingsApi.resetOverrides}. Presets apply only
42
- * to drawings whose `drawings.getCapabilities(drawingId).presets` is `true`.
43
- * Local title text is excluded from preset values.
44
- *
45
- * Presets are document-local; their ids survive reload. Built-in presets are
46
- * immutable. Catalog writes (`create`, `copy`, `rename`, `update`, `delete`)
47
- * are native document metadata and are **not undoable**; binding a drawing or
48
- * changing its overrides uses Present undo. Every method requires **Present
49
- * mode to be open** and throws `PRECONDITION_FAILED` ("Present mode is not
50
- * open") when it is closed; no method switches tabs.
51
- *
52
- * Accessed via `snaptrude.presentation.viewPresets`.
53
- */
54
- export declare abstract class PluginPresentationViewPresetsApi {
55
- /**
56
- * List the preset catalog: built-ins first, then custom presets by name.
57
- *
58
- * @returns Every {@linkcode PluginViewPreset}.
59
- * @throws `PRECONDITION_FAILED` if Present mode is not open.
60
- *
61
- * @examplePrompt List the available drawing style presets
62
- * @examplePrompt Which custom presets does this presentation have?
63
- * @examplePrompt Is there a Planning Issue preset?
64
- *
65
- * # Example
66
- * ```ts
67
- * const presets = await snaptrude.presentation.viewPresets.list()
68
- * const custom = presets.filter((preset) => !preset.builtIn)
69
- * ```
70
- */
71
- abstract list(): PluginApiReturn<PluginViewPreset[]>;
72
- /**
73
- * Read one preset by id.
74
- *
75
- * @param presetId - The preset to read.
76
- * @returns The {@linkcode PluginViewPreset}, or `null` if no preset has that id.
77
- * @throws `PRECONDITION_FAILED` if Present mode is not open.
78
- *
79
- * @examplePrompt Which preset is this drawing using?
80
- * @examplePrompt Is this preset a built-in one?
81
- * @examplePrompt Read the preset bound to the ground floor plan
82
- *
83
- * # Example
84
- * ```ts
85
- * const drawing = await snaptrude.presentation.drawings.get(drawingId)
86
- * const preset = drawing?.presetId
87
- * ? await snaptrude.presentation.viewPresets.get(drawing.presetId)
88
- * : null
89
- * ```
90
- */
91
- abstract get(presetId: string): PluginApiReturn<PluginViewPreset | null>;
92
- /**
93
- * Save a kernel-plan drawing's effective styles as a new custom preset and
94
- * bind that drawing to it. Not undoable (catalog write).
95
- *
96
- * @param name - A unique preset name (non-empty after trimming).
97
- * @param options - `fromDrawingId`: the kernel-plan drawing to take styles from.
98
- * @returns The new {@linkcode PluginViewPreset}.
99
- * @throws `VALIDATION` for an empty or duplicate name (with a hint);
100
- * `PRECONDITION_FAILED` if Present mode is not open, the document is
101
- * read-only, or the drawing is not a kernel vector plan (each with a
102
- * hint); `HANDLE_INVALID` if `fromDrawingId` is not a drawing.
103
- *
104
- * @examplePrompt Save this drawing's styles as a new preset
105
- * @examplePrompt Make a preset called Planning Issue from this plan
106
- * @examplePrompt Turn my restyled drawing into a reusable style
107
- *
108
- * # Example
109
- * ```ts
110
- * const capabilities = await snaptrude.presentation.drawings.getCapabilities(drawing.id)
111
- * if (capabilities.presets) {
112
- * const preset = await snaptrude.presentation.viewPresets.create("Planning Issue", {
113
- * fromDrawingId: drawing.id,
114
- * })
115
- * }
116
- * ```
117
- */
118
- abstract create(name: string, options: {
119
- fromDrawingId: string;
120
- }): PluginApiReturn<PluginViewPreset>;
121
- /**
122
- * Duplicate a preset under a native-generated unique name. Drawing bindings
123
- * do not change. Not undoable (catalog write). Built-ins can be copied.
124
- *
125
- * @param presetId - The preset to copy.
126
- * @returns The new custom {@linkcode PluginViewPreset}.
127
- * @throws `PRECONDITION_FAILED` if Present mode is not open or the document
128
- * is read-only (each with a hint); `HANDLE_INVALID` if `presetId` does not
129
- * exist.
130
- *
131
- * @examplePrompt Duplicate this preset
132
- * @examplePrompt Make an editable copy of the built-in preset
133
- * @examplePrompt Copy the Planning Issue preset so I can change it
134
- *
135
- * # Example
136
- * ```ts
137
- * const copy = await snaptrude.presentation.viewPresets.copy(preset.id)
138
- * await snaptrude.presentation.viewPresets.rename(copy.id, "Planning Issue B")
139
- * ```
140
- */
141
- abstract copy(presetId: string): PluginApiReturn<PluginViewPreset>;
142
- /**
143
- * Rename a custom preset. Names must stay unique; built-ins cannot be
144
- * renamed. Not undoable (catalog write).
145
- *
146
- * @param presetId - The custom preset to rename.
147
- * @param name - The new unique name (non-empty after trimming).
148
- * @returns The renamed {@linkcode PluginViewPreset}.
149
- * @throws `VALIDATION` when the catalog refuses: an empty or duplicate name,
150
- * a built-in preset, or an unknown `presetId` (with a hint);
151
- * `PRECONDITION_FAILED` if Present mode is not open or the document is
152
- * read-only (each with a hint).
153
- *
154
- * @examplePrompt Rename this preset to Client Review
155
- * @examplePrompt Call the copied preset Planning Issue B
156
- * @examplePrompt Change the name of my custom drawing style
157
- *
158
- * # Example
159
- * ```ts
160
- * await snaptrude.presentation.viewPresets.rename(preset.id, "Client Review")
161
- * ```
162
- */
163
- abstract rename(presetId: string, name: string): PluginApiReturn<PluginViewPreset>;
164
- /**
165
- * Replace a custom preset's values with the effective styles of a drawing
166
- * already bound to it, then refresh every bound drawing. Built-ins cannot
167
- * be updated. Not undoable (catalog write).
168
- *
169
- * @param presetId - The custom preset to update.
170
- * @param options - `fromDrawingId`: a kernel-plan drawing bound to this preset.
171
- * @returns The updated {@linkcode PluginViewPreset} (its `revision` grows).
172
- * @throws `VALIDATION` when the catalog refuses: a built-in preset (with a
173
- * hint); `PRECONDITION_FAILED` if Present mode is not open, the document
174
- * is read-only, or the drawing is not a kernel vector plan bound to this
175
- * preset (each with a hint); `HANDLE_INVALID` if `fromDrawingId` is not a
176
- * drawing.
177
- *
178
- * @examplePrompt Update this preset from the current drawing styles
179
- * @examplePrompt Push my style changes to every drawing using this preset
180
- * @examplePrompt Save these overrides into the Planning Issue preset
181
- *
182
- * # Example
183
- * ```ts
184
- * await snaptrude.presentation.viewPresets.update(drawing.presetId!, {
185
- * fromDrawingId: drawing.id,
186
- * })
187
- * ```
188
- */
189
- abstract update(presetId: string, options: {
190
- fromDrawingId: string;
191
- }): PluginApiReturn<PluginViewPreset>;
192
- /**
193
- * Delete a custom preset and rebind its drawings to another existing
194
- * preset. Built-ins cannot be deleted. Not undoable (catalog write).
195
- *
196
- * @param presetId - The custom preset to delete.
197
- * @param options - `replacementId`: the existing preset its drawings move to
198
- * (not the deleted one).
199
- * @returns Nothing.
200
- * @throws `VALIDATION` when the catalog refuses: a built-in or unknown
201
- * `presetId`, or an unknown `replacementId` (with a hint);
202
- * `PRECONDITION_FAILED` if Present mode is not open or the document is
203
- * read-only (each with a hint).
204
- *
205
- * @examplePrompt Delete this preset
206
- * @examplePrompt Remove the old style preset and switch its drawings to the default
207
- * @examplePrompt Get rid of the Planning Issue B preset
208
- *
209
- * # Example
210
- * ```ts
211
- * const presets = await snaptrude.presentation.viewPresets.list()
212
- * const replacement = presets.find((each) => each.builtIn)!
213
- * await snaptrude.presentation.viewPresets.delete(customPreset.id, {
214
- * replacementId: replacement.id,
215
- * })
216
- * ```
217
- */
218
- abstract delete(presetId: string, options: {
219
- replacementId: string;
220
- }): PluginApiReturn<void>;
221
- }
222
- //# sourceMappingURL=viewPresets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"viewPresets.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/viewPresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;iBAK3B,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC/D,eAAO,MAAM,sBAAsB;;kBAExB,CAAA;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,eAAO,MAAM,0BAA0B;;;kBAE5B,CAAA;AACX,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AACD,eAAO,MAAM,0BAA0B;;;kBAErC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG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CAAA;KAAE,GACjC,eAAe,CAAC,IAAI,CAAC;CACzB"}
@@ -1,121 +0,0 @@
1
- import * as z from "zod"
2
- import { ComponentHandle } from "../../handles"
3
- import type { PluginApiReturn } from "../../types"
4
- import { PluginConstructionType, PluginFamilyValues } from "./catalog"
5
- import { PluginFamilyBundleSchema } from "./family"
6
-
7
- const id = z.string().min(1).max(300)
8
- const spaces = z.array(ComponentHandle).min(1).max(1000)
9
-
10
- /** Read scope. Omit spaces to inspect the active proposal's sketch spaces. */
11
- export const PluginBimContextArgs = z.object({ spaces: spaces.optional() }).strict()
12
- export type PluginBimContextArgs = z.infer<typeof PluginBimContextArgs>
13
-
14
- /** Directed graph edge. Side A lies along world-up × curve-direction; side B is opposite.
15
- * Region IDs are snapshot identifiers, not component handles. Null means no adjacent region.
16
- */
17
- export const PluginBimEdge = z.object({
18
- id,
19
- startMm: z.tuple([z.number(), z.number(), z.number()]),
20
- endMm: z.tuple([z.number(), z.number(), z.number()]),
21
- lengthMm: z.number(),
22
- heightMm: z.number(),
23
- sideA: id.nullable(),
24
- sideB: id.nullable(),
25
- wall: ComponentHandle.nullable(),
26
- supported: z.boolean(),
27
- })
28
- export type PluginBimEdge = z.infer<typeof PluginBimEdge>
29
-
30
- /** Construction context is detached. Revision covers geometry, room metadata and construction state. */
31
- export const PluginBimContext = z.object({
32
- revision: id,
33
- proposalId: id,
34
- units: z.literal("mm"),
35
- spaces: z.array(z.object({
36
- component: ComponentHandle,
37
- label: z.string(),
38
- storey: z.number(),
39
- eligible: z.boolean(),
40
- reason: z.string().optional(),
41
- })),
42
- regions: z.array(z.object({ id, spaces: z.array(ComponentHandle) })),
43
- edges: z.array(PluginBimEdge),
44
- })
45
- export type PluginBimContext = z.infer<typeof PluginBimContext>
46
-
47
- /** Plan-local key selects either an existing construction or a new project-only native recipe.
48
- * Bundles use the native DSL's SU/unit-expression rules; values overrides use mm/degrees.
49
- */
50
- export const PluginBimConstruction = z.union([
51
- z.object({ key: id, reference: PluginConstructionType }).strict(),
52
- z.object({ key: id, bundle: PluginFamilyBundleSchema }).strict(),
53
- ])
54
- export type PluginBimConstruction = z.infer<typeof PluginBimConstruction>
55
-
56
- /** Every unwalled edge in the selected scope needs exactly one assignment.
57
- * The first authored layer faces sideA unless reversed. Alignment sets the initial core-centre offset.
58
- * Later parameter edits preserve the offset and reject invalid core alignment.
59
- */
60
- export const PluginBimWallAssignment = z.object({
61
- edgeId: id,
62
- construction: id,
63
- values: PluginFamilyValues.optional(),
64
- reversed: z.boolean(),
65
- alignment: z.literal("coreCentre"),
66
- }).strict()
67
- export type PluginBimWallAssignment = z.infer<typeof PluginBimWallAssignment>
68
-
69
- export const PluginBimPrepareArgs = z.object({
70
- revision: id,
71
- spaces,
72
- constructions: z.array(PluginBimConstruction).max(1000),
73
- walls: z.array(PluginBimWallAssignment).max(10000),
74
- }).strict()
75
- export type PluginBimPrepareArgs = z.infer<typeof PluginBimPrepareArgs>
76
-
77
- /** Expected recipe/plan failures are diagnostics. No scene or library change occurs during prepare. */
78
- export const PluginBimPreparation = z.object({
79
- ok: z.boolean(),
80
- preparationId: id.optional(),
81
- diagnostics: z.array(z.object({ path: z.string(), message: z.string() })),
82
- })
83
- export type PluginBimPreparation = z.infer<typeof PluginBimPreparation>
84
- export const PluginBimCreateArgs = z.object({ preparationId: id }).strict()
85
-
86
- /** Source IDs identify removed sketch spaces, not live handles. Successful storeys share one undo step.
87
- * Failed storeys remain spaces. Cancellation rolls back the whole conversion. Persistence is queued
88
- * through normal model commands; this result is not a durable server-save acknowledgement.
89
- */
90
- export const PluginBimResult = z.object({
91
- status: z.enum(["created", "partial", "cancelled", "unchanged"]),
92
- convertedSpaceIds: z.array(z.string()),
93
- created: z.array(ComponentHandle),
94
- kept: z.array(z.object({ space: ComponentHandle, reason: z.string() })),
95
- })
96
- export type PluginBimResult = z.infer<typeof PluginBimResult>
97
-
98
- /** Agent-driven Sketch-to-BIM. Uses PG2 topology; never redraws routes or publishes library families. */
99
- export abstract class PluginDesignBimApi {
100
- /** Read room adjacency and native conversion eligibility in the active proposal.
101
- * @param options Optional explicit spaces; filters edges but keeps adjacent room metadata.
102
- * @returns Rooms, directed boundaries in mm, eligibility and revision.
103
- * @examplePrompt Inspect the rooms on each side of these sketch wall boundaries
104
- */
105
- abstract getContext(options?: PluginBimContextArgs): PluginApiReturn<PluginBimContext>
106
-
107
- /** Stage a complete wall-construction assignment. A new prepare replaces this plugin's prior plan.
108
- * @param plan Exact context revision, selected spaces, constructions and edge assignments.
109
- * @returns Diagnostics or an opaque preparation ID, scoped to the caller and current project.
110
- * @examplePrompt Validate wall layer assignments before converting sketch rooms to BIM
111
- */
112
- abstract prepare(plan: PluginBimPrepareArgs): PluginApiReturn<PluginBimPreparation>
113
-
114
- /** Execute native Sketch-to-BIM. Revalidates scope, catalogue access and construction before mutation.
115
- * Uses native progress/cancel controls and worker cancellation. Floors/roofs retain project defaults.
116
- * @param preparationId ID returned by prepare. Consumed once; stale or foreign IDs throw PRECONDITION_FAILED.
117
- * @returns Created component handles and explicit converted/kept outcomes, including partial success.
118
- * @examplePrompt Convert these sketch rooms to BIM with wall layers chosen for each room boundary
119
- */
120
- abstract create(preparationId: string): PluginApiReturn<PluginBimResult>
121
- }
@@ -1,203 +0,0 @@
1
- import * as z from "zod"
2
- import { ContourHandle, LineHandle, Vec3Handle } from "../../handles"
3
- import type { PluginApiReturn } from "../../types"
4
- import {
5
- PluginFamilyDefinitionParameter,
6
- PluginFamilyBundleSchema,
7
- } from "./family"
8
- import { NetworkFamilyContract } from "./networks"
9
-
10
- /** Exact saved family identity. A label or a selected Draw type is not an identity. */
11
- export const PluginSavedFamilyReference = z
12
- .object({
13
- id: z.string().min(1),
14
- version: z.number().int().positive(),
15
- })
16
- .strict()
17
- export type PluginSavedFamilyReference = z.infer<
18
- typeof PluginSavedFamilyReference
19
- >
20
-
21
- /** Public overrides: physical lengths use mm, angles use degrees. Omitted values retain defaults. */
22
- export const PluginFamilyValues = z.record(
23
- z.string(),
24
- z.union([z.number().finite(), z.string(), z.boolean()]),
25
- )
26
- export type PluginFamilyValues = z.infer<typeof PluginFamilyValues>
27
-
28
- /** Native construction uses a saved family or a project assembly token from the catalogue. */
29
- export const PluginConstructionType = z.union([
30
- PluginSavedFamilyReference,
31
- z.string().min(1),
32
- ])
33
- export type PluginConstructionType = z.infer<typeof PluginConstructionType>
34
-
35
- /** Family owns its layers/section. Geometry owns the footprint/axis; it is never a values override. */
36
- export const PluginFamilyPlacement = z
37
- .object({
38
- type: PluginConstructionType,
39
- values: PluginFamilyValues.optional(),
40
- })
41
- .strict()
42
- export type PluginFamilyPlacement = z.infer<typeof PluginFamilyPlacement>
43
-
44
- /** Sparse native family edit. Omitted type keeps the component's exact saved reference. */
45
- export const PluginFamilyUpdates = PluginFamilyPlacement.partial().refine(
46
- (updates) => updates.type !== undefined || updates.values !== undefined,
47
- { message: "Supply a type or parameter values" },
48
- )
49
- export type PluginFamilyUpdates = z.infer<typeof PluginFamilyUpdates>
50
-
51
- export const PluginFamilyFloorOptions = PluginFamilyPlacement.extend({
52
- position: Vec3Handle.optional(),
53
- })
54
- export type PluginFamilyFloorOptions = z.infer<typeof PluginFamilyFloorOptions>
55
- export const PluginFamilySlabOptions = PluginFamilyPlacement.extend({
56
- direction: z.enum(["up", "down"]).optional(),
57
- })
58
- export type PluginFamilySlabOptions = z.infer<typeof PluginFamilySlabOptions>
59
- export const PluginFamilyCeilingOptions = PluginFamilyPlacement.extend({
60
- heightFromFloor: z.number().finite().optional(),
61
- })
62
- export type PluginFamilyCeilingOptions = z.infer<
63
- typeof PluginFamilyCeilingOptions
64
- >
65
- export const PluginFamilyContourArgs = z.object({
66
- contour: ContourHandle,
67
- options: PluginFamilyPlacement,
68
- })
69
- export const PluginFamilyAxisArgs = z.object({
70
- axis: LineHandle,
71
- options: PluginFamilyPlacement,
72
- })
73
-
74
- /** Inventory includes architectural recipes, ordinary PCs, and the existing placement libraries. */
75
- export const PluginCatalogKind = z.enum([
76
- "wall",
77
- "floor",
78
- "slab",
79
- "roof",
80
- "ceiling",
81
- "beam",
82
- "column",
83
- "component",
84
- "door",
85
- "window",
86
- "furniture",
87
- ])
88
- export type PluginCatalogKind = z.infer<typeof PluginCatalogKind>
89
- export const PluginCatalogReference = z.union([
90
- PluginSavedFamilyReference,
91
- // Project assemblies retain kind:name; asset tokens retain the underlying library identity.
92
- z.string().min(1),
93
- ])
94
- export type PluginCatalogReference = z.infer<typeof PluginCatalogReference>
95
-
96
- /** Read-only capability record. Availability is checked again on every mutation. */
97
- export const PluginCatalogEntry = z.object({
98
- reference: PluginCatalogReference,
99
- label: z.string(),
100
- kind: PluginCatalogKind,
101
- source: z.enum(["native", "revit", "project", "asset"]),
102
- createMethods: z.array(z.string()),
103
- updateMethods: z.array(z.string()),
104
- requirements: z.array(z.string()),
105
- unsupportedReason: z.string().optional(),
106
- parameters: z.array(PluginFamilyDefinitionParameter).optional(),
107
- /** Parameter keys owned by native placement geometry, never accepted as values overrides. */
108
- geometryParameters: z.array(z.string()),
109
- network: NetworkFamilyContract.optional(),
110
- /** get() includes the native wall recipe without opening a Family Studio draft.
111
- * Bare recipe lengths use SU; parameter metadata and public values overrides use mm.
112
- */
113
- construction: PluginFamilyBundleSchema.optional(),
114
- })
115
- export type PluginCatalogEntry = z.infer<typeof PluginCatalogEntry>
116
- export const PluginCatalogListArgs = z.object({
117
- kind: PluginCatalogKind.optional(),
118
- })
119
- export const PluginCatalogGetArgs = z.object({
120
- reference: PluginCatalogReference,
121
- })
122
-
123
- /** Search metadata is extensible. A slash separates category path segments. */
124
- export const PluginCatalogSearchArgs = z
125
- .object({
126
- query: z.string().trim().max(200).optional(),
127
- category: z.string().trim().max(1000).optional(),
128
- limit: z.number().int().min(1).max(50).optional(),
129
- cursor: z.string().min(1).max(16384).optional(),
130
- })
131
- .strict()
132
- export type PluginCatalogSearchArgs = z.infer<typeof PluginCatalogSearchArgs>
133
-
134
- /** Browse one hierarchy level without enumerating families or fetching recipe bodies. */
135
- export const PluginCatalogListCategoriesArgs = z
136
- .object({
137
- parent: z.string().trim().max(1000).optional(),
138
- after: z.string().max(1000).optional(),
139
- limit: z.number().int().min(1).max(100).optional(),
140
- })
141
- .strict()
142
- export type PluginCatalogListCategoriesArgs = z.infer<
143
- typeof PluginCatalogListCategoriesArgs
144
- >
145
-
146
- /** Metadata only: the category does not establish placement capabilities or recipe validity. */
147
- export const PluginCatalogCategory = z.object({
148
- categoryPath: z.array(z.string()).min(1),
149
- hasChildren: z.boolean(),
150
- })
151
- export type PluginCatalogCategory = z.infer<typeof PluginCatalogCategory>
152
-
153
- /** Metadata only. Read get(reference) to validate a selected family and inspect placement methods. */
154
- export const PluginCatalogSummary = z.object({
155
- reference: PluginCatalogReference,
156
- label: z.string(),
157
- categoryPath: z.array(z.string()),
158
- description: z.string(),
159
- source: PluginCatalogEntry.shape.source,
160
- })
161
- export type PluginCatalogSummary = z.infer<typeof PluginCatalogSummary>
162
- export const PluginCatalogSearchResult = z.object({
163
- items: z.array(PluginCatalogSummary),
164
- nextCursor: z.string().nullable(),
165
- })
166
- export type PluginCatalogSearchResult = z.infer<
167
- typeof PluginCatalogSearchResult
168
- >
169
-
170
- /** Shared read surface over existing libraries. Does not publish, register, or place definitions. */
171
- export abstract class PluginDesignCatalogApi {
172
- /**
173
- * Discover categories from accessible saved families and current project constructions.
174
- * Omit parent for roots; pass a slash-separated returned path for its direct children.
175
- * This metadata read does not fetch recipes, include unsaved drafts or legacy mesh inventories,
176
- * or establish capabilities. Use search then get before placement. Names retain their case.
177
- * @param args Parent path, exclusive after-name, and page limit (default 50, maximum 100).
178
- * For another page at the same parent, pass the last item's final categoryPath segment as after.
179
- * @returns Categories in Unicode code-point order, with descendant flags. Stop when a page has
180
- * fewer than limit items. Live pagination is not a snapshot. Metadata-service failures reject.
181
- */
182
- abstract listCategories(
183
- args?: PluginCatalogListCategoriesArgs,
184
- ): PluginApiReturn<PluginCatalogCategory[]>
185
- /**
186
- * Search accessible saved-family and project-construction metadata without downloading recipes.
187
- * Categories are data, not an SDK enum. Legacy mesh inventories and unsaved drafts are excluded.
188
- * Inspect selected references with get before placement; a search match does not prove validity
189
- * or supported behavior. Pagination reads live data, not a snapshot. Failures reject.
190
- * @param args Text/category filters, page limit (default 20, maximum 50), and opaque cursor.
191
- * @returns Compact metadata and continuation. Continue until nextCursor is null or a suitable
192
- * family is found. Concurrent changes can leave an empty page with continuation.
193
- */
194
- abstract search(
195
- args?: PluginCatalogSearchArgs,
196
- ): PluginApiReturn<PluginCatalogSearchResult>
197
- /** @param kind Optional element filter. @returns Accessible entries and their supported API paths. */
198
- abstract list(kind?: PluginCatalogKind): PluginApiReturn<PluginCatalogEntry[]>
199
- /** @param reference Exact reference from search or list. @returns The current entry, or null when unavailable. */
200
- abstract get(
201
- reference: PluginCatalogReference,
202
- ): PluginApiReturn<PluginCatalogEntry | null>
203
- }