@snaptrude/plugin-core 0.0.0-dev-20260908074328 → 0.0.0-dev-20260921132444

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 (95) hide show
  1. package/AGENTS.md +4 -0
  2. package/CHANGELOG.md +52 -16
  3. package/dist/api/core/io/import/index.d.ts +3 -1
  4. package/dist/api/core/io/import/index.d.ts.map +1 -1
  5. package/dist/api/core/mode/index.d.ts +19 -7
  6. package/dist/api/core/mode/index.d.ts.map +1 -1
  7. package/dist/api/core/tags.d.ts +81 -0
  8. package/dist/api/core/tags.d.ts.map +1 -1
  9. package/dist/api/design/create/bulk-items.d.ts +185 -0
  10. package/dist/api/design/create/bulk-items.d.ts.map +1 -0
  11. package/dist/api/design/create/grids.d.ts +132 -0
  12. package/dist/api/design/create/grids.d.ts.map +1 -0
  13. package/dist/api/design/create/index.d.ts +424 -51
  14. package/dist/api/design/create/index.d.ts.map +1 -1
  15. package/dist/api/design/create/opening-fields.d.ts +37 -0
  16. package/dist/api/design/create/opening-fields.d.ts.map +1 -0
  17. package/dist/api/design/delete/index.d.ts +6 -20
  18. package/dist/api/design/delete/index.d.ts.map +1 -1
  19. package/dist/api/design/dimensions.d.ts +427 -0
  20. package/dist/api/design/dimensions.d.ts.map +1 -0
  21. package/dist/api/design/doors/index.d.ts +20 -13
  22. package/dist/api/design/doors/index.d.ts.map +1 -1
  23. package/dist/api/design/family.d.ts +73 -5
  24. package/dist/api/design/family.d.ts.map +1 -1
  25. package/dist/api/design/grids.d.ts +237 -0
  26. package/dist/api/design/grids.d.ts.map +1 -0
  27. package/dist/api/design/index.d.ts +9 -0
  28. package/dist/api/design/index.d.ts.map +1 -1
  29. package/dist/api/design/query/grids.d.ts +287 -0
  30. package/dist/api/design/query/grids.d.ts.map +1 -0
  31. package/dist/api/design/query/index.d.ts +29 -2
  32. package/dist/api/design/query/index.d.ts.map +1 -1
  33. package/dist/api/design/query/spaces.d.ts +0 -61
  34. package/dist/api/design/query/spaces.d.ts.map +1 -1
  35. package/dist/api/design/update/index.d.ts +74 -0
  36. package/dist/api/design/update/index.d.ts.map +1 -1
  37. package/dist/api/entity/space.d.ts +0 -3
  38. package/dist/api/entity/space.d.ts.map +1 -1
  39. package/dist/api/presentation/annotate.d.ts +2 -2
  40. package/dist/api/presentation/placedViews.d.ts +1 -35
  41. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  42. package/dist/api/presentation/shapes.d.ts +2 -2
  43. package/dist/api/presentation/sheets.d.ts +2 -20
  44. package/dist/api/presentation/sheets.d.ts.map +1 -1
  45. package/dist/api/program/departments.d.ts +58 -2
  46. package/dist/api/program/departments.d.ts.map +1 -1
  47. package/dist/api/program/index.d.ts +16 -6
  48. package/dist/api/program/index.d.ts.map +1 -1
  49. package/dist/api/program/labels.d.ts +355 -0
  50. package/dist/api/program/labels.d.ts.map +1 -0
  51. package/dist/api/program/metadata.d.ts +328 -0
  52. package/dist/api/program/metadata.d.ts.map +1 -0
  53. package/dist/api/program/spreadsheet.d.ts +263 -0
  54. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  55. package/dist/api/workspace/index.d.ts +49 -2
  56. package/dist/api/workspace/index.d.ts.map +1 -1
  57. package/dist/errors/codes.d.ts +3 -8
  58. package/dist/errors/codes.d.ts.map +1 -1
  59. package/dist/handles.d.ts +19 -0
  60. package/dist/handles.d.ts.map +1 -1
  61. package/dist/index.cjs +2489 -1941
  62. package/dist/index.cjs.map +1 -1
  63. package/dist/index.js +2395 -1936
  64. package/dist/index.js.map +1 -1
  65. package/package.json +1 -1
  66. package/src/api/core/io/import/index.ts +11 -3
  67. package/src/api/core/mode/index.ts +19 -7
  68. package/src/api/core/tags.ts +76 -0
  69. package/src/api/design/create/bulk-items.ts +186 -0
  70. package/src/api/design/create/grids.ts +137 -0
  71. package/src/api/design/create/index.ts +472 -70
  72. package/src/api/design/create/opening-fields.ts +37 -0
  73. package/src/api/design/delete/index.ts +5 -20
  74. package/src/api/design/dimensions.ts +453 -0
  75. package/src/api/design/doors/index.ts +20 -13
  76. package/src/api/design/family.ts +51 -4
  77. package/src/api/design/grids.ts +237 -0
  78. package/src/api/design/index.ts +10 -0
  79. package/src/api/design/query/grids.ts +197 -0
  80. package/src/api/design/query/index.ts +27 -2
  81. package/src/api/design/query/spaces.ts +0 -68
  82. package/src/api/design/update/index.ts +53 -0
  83. package/src/api/entity/space.ts +0 -2
  84. package/src/api/presentation/placedViews.ts +1 -29
  85. package/src/api/presentation/sheets.ts +3 -19
  86. package/src/api/program/departments.ts +54 -2
  87. package/src/api/program/index.ts +16 -6
  88. package/src/api/program/labels.ts +332 -0
  89. package/src/api/program/metadata.ts +364 -0
  90. package/src/api/program/spreadsheet.ts +282 -0
  91. package/src/api/workspace/index.ts +51 -2
  92. package/src/errors/codes.ts +2 -30
  93. package/src/handles.ts +24 -0
  94. package/test/errors.test.mjs +0 -4
  95. package/snaptrude-plugin-core-0.11.0.tgz +0 -0
@@ -0,0 +1,132 @@
1
+ import * as z from "zod";
2
+ import { ComponentHandle } from "../../../handles";
3
+ /**
4
+ * Grid line style (mirrors the engine `LineMode` values verbatim — the same
5
+ * vocabulary as {@linkcode PluginReferenceLineStyle}).
6
+ */
7
+ export declare const PluginGridLineStyle: z.ZodEnum<{
8
+ SOLID: "SOLID";
9
+ DASHED: "DASHED";
10
+ DOT_DASH: "DOT_DASH";
11
+ }>;
12
+ export type PluginGridLineStyle = z.infer<typeof PluginGridLineStyle>;
13
+ /**
14
+ * Optional visual styling shared by every grid creator (and reused as the
15
+ * patch shape by `design.update.grid`). All fields optional; engine defaults
16
+ * apply when omitted.
17
+ *
18
+ * | Property | Type | Description |
19
+ * |---|---|---|
20
+ * | `style` | {@linkcode PluginGridLineStyle}? | Line style |
21
+ * | `weight` | `number`? | Line weight (> 0) |
22
+ * | `color` | `string`? | Line color as a `#rrggbb` hex string |
23
+ * | `showStart` | `boolean`? | Show the start-end tag bubble |
24
+ * | `showEnd` | `boolean`? | Show the end-end tag bubble |
25
+ */
26
+ export declare const PluginGridStyleOptions: z.ZodObject<{
27
+ style: z.ZodOptional<z.ZodEnum<{
28
+ SOLID: "SOLID";
29
+ DASHED: "DASHED";
30
+ DOT_DASH: "DOT_DASH";
31
+ }>>;
32
+ weight: z.ZodOptional<z.ZodNumber>;
33
+ color: z.ZodOptional<z.ZodString>;
34
+ showStart: z.ZodOptional<z.ZodBoolean>;
35
+ showEnd: z.ZodOptional<z.ZodBoolean>;
36
+ }, z.core.$strip>;
37
+ export type PluginGridStyleOptions = z.infer<typeof PluginGridStyleOptions>;
38
+ /**
39
+ * Arguments for {@linkcode PluginDesignCreateApi.grid}.
40
+ *
41
+ * | Property | Type | Description |
42
+ * |---|---|---|
43
+ * | `linesX` | `number` | Line count of the first family (integer ≥ 1) |
44
+ * | `linesY` | `number` | Line count of the second family (integer ≥ 1) |
45
+ * | `spacingX` | `number` | Spacing of the first family (Snaptrude units, > 0) |
46
+ * | `spacingY` | `number` | Spacing of the second family (Snaptrude units, > 0) |
47
+ * | `angle` | `number`? | Rotation in degrees, CCW about +Y (default 0) |
48
+ * | `center` | {@linkcode Vec3Handle}? | Placement centre; defaults to the native viewport-centre behavior |
49
+ * | …style | {@linkcode PluginGridStyleOptions} | Optional line styling |
50
+ */
51
+ export declare const PluginDesignCreateGridArgs: z.ZodObject<{
52
+ linesX: z.ZodNumber;
53
+ linesY: z.ZodNumber;
54
+ spacingX: z.ZodNumber;
55
+ spacingY: z.ZodNumber;
56
+ angle: z.ZodOptional<z.ZodNumber>;
57
+ center: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
58
+ style: z.ZodOptional<z.ZodEnum<{
59
+ SOLID: "SOLID";
60
+ DASHED: "DASHED";
61
+ DOT_DASH: "DOT_DASH";
62
+ }>>;
63
+ weight: z.ZodOptional<z.ZodNumber>;
64
+ color: z.ZodOptional<z.ZodString>;
65
+ showStart: z.ZodOptional<z.ZodBoolean>;
66
+ showEnd: z.ZodOptional<z.ZodBoolean>;
67
+ }, z.core.$strip>;
68
+ export type PluginDesignCreateGridArgs = z.infer<typeof PluginDesignCreateGridArgs>;
69
+ /**
70
+ * Arguments for {@linkcode PluginDesignCreateApi.gridFromCurve}.
71
+ *
72
+ * | Property | Type | Description |
73
+ * |---|---|---|
74
+ * | `curve` | {@linkcode CurveHandle} | The grid line's geometry — a line or arc (circles are rejected) |
75
+ * | `tag` | `string`? | The line's grid tag (defaults to the draw tool's next tag) |
76
+ * | …style | {@linkcode PluginGridStyleOptions} | Optional line styling |
77
+ */
78
+ export declare const PluginDesignCreateGridFromCurveArgs: z.ZodObject<{
79
+ curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
80
+ tag: z.ZodOptional<z.ZodString>;
81
+ style: z.ZodOptional<z.ZodEnum<{
82
+ SOLID: "SOLID";
83
+ DASHED: "DASHED";
84
+ DOT_DASH: "DOT_DASH";
85
+ }>>;
86
+ weight: z.ZodOptional<z.ZodNumber>;
87
+ color: z.ZodOptional<z.ZodString>;
88
+ showStart: z.ZodOptional<z.ZodBoolean>;
89
+ showEnd: z.ZodOptional<z.ZodBoolean>;
90
+ }, z.core.$strip>;
91
+ export type PluginDesignCreateGridFromCurveArgs = z.infer<typeof PluginDesignCreateGridFromCurveArgs>;
92
+ /**
93
+ * Arguments for {@linkcode PluginDesignCreateApi.gridsFromMasses}.
94
+ *
95
+ * | Property | Type | Description |
96
+ * |---|---|---|
97
+ * | `masses` | {@linkcode ComponentHandle}`[]` | Masses whose footprints seat the grids |
98
+ * | `spacingX` | `number` | First-family spacing (Snaptrude units, > 0) |
99
+ * | `spacingY` | `number` | Second-family spacing (Snaptrude units, > 0) |
100
+ * | …style | {@linkcode PluginGridStyleOptions} | Optional line styling |
101
+ */
102
+ export declare const PluginDesignCreateGridsFromMassesArgs: z.ZodObject<{
103
+ masses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
104
+ spacingX: z.ZodNumber;
105
+ spacingY: z.ZodNumber;
106
+ style: z.ZodOptional<z.ZodEnum<{
107
+ SOLID: "SOLID";
108
+ DASHED: "DASHED";
109
+ DOT_DASH: "DOT_DASH";
110
+ }>>;
111
+ weight: z.ZodOptional<z.ZodNumber>;
112
+ color: z.ZodOptional<z.ZodString>;
113
+ showStart: z.ZodOptional<z.ZodBoolean>;
114
+ showEnd: z.ZodOptional<z.ZodBoolean>;
115
+ }, z.core.$strip>;
116
+ export type PluginDesignCreateGridsFromMassesArgs = z.infer<typeof PluginDesignCreateGridsFromMassesArgs>;
117
+ /**
118
+ * Arguments for {@linkcode PluginDesignCreateApi.columnsFromGrids}.
119
+ *
120
+ * | Property | Type | Description |
121
+ * |---|---|---|
122
+ * | `grids` | {@linkcode ComponentHandle}`[]` | Grid groups whose line intersections seat the columns |
123
+ * | `width` | `number` | Column width (Snaptrude units, > 0) |
124
+ * | `depth` | `number` | Column depth (Snaptrude units, > 0) |
125
+ */
126
+ export declare const PluginDesignCreateColumnsFromGridsArgs: z.ZodObject<{
127
+ grids: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
128
+ width: z.ZodNumber;
129
+ depth: z.ZodNumber;
130
+ }, z.core.$strip>;
131
+ export type PluginDesignCreateColumnsFromGridsArgs = z.infer<typeof PluginDesignCreateColumnsFromGridsArgs>;
132
+ //# sourceMappingURL=grids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grids.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/grids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAA2B,MAAM,kBAAkB,CAAA;AAM3E;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;EAA0C,CAAA;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;iBASjC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAM3E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;iBASP,CAAA;AAChC,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAMnF;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;iBAKhB,CAAA;AAChC,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAMD;;;;;;;;;GASG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;iBAMlB,CAAA;AAChC,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,sCAAsC;;;;iBAIjD,CAAA;AACF,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,sCAAsC,CAC9C,CAAA"}