@snaptrude/plugin-core 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/AGENTS.md +130 -48
  2. package/CHANGELOG.md +111 -0
  3. package/api-manifest.full.json +3999 -0
  4. package/api-manifest.json +3845 -0
  5. package/dist/api/core/buildings.d.ts +427 -0
  6. package/dist/api/core/buildings.d.ts.map +1 -0
  7. package/dist/api/core/comment/index.d.ts +230 -0
  8. package/dist/api/core/comment/index.d.ts.map +1 -0
  9. package/dist/api/core/geom/create/index.d.ts +247 -0
  10. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  11. package/dist/api/core/geom/delete/index.d.ts +72 -0
  12. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  13. package/dist/api/core/geom/index.d.ts +24 -23
  14. package/dist/api/core/geom/index.d.ts.map +1 -1
  15. package/dist/api/core/geom/query/arc.d.ts +169 -0
  16. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  17. package/dist/api/core/geom/query/brep.d.ts +402 -0
  18. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  19. package/dist/api/core/geom/query/circle.d.ts +378 -0
  20. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  21. package/dist/api/core/geom/query/contour.d.ts +450 -0
  22. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  23. package/dist/api/core/geom/query/curve.d.ts +918 -0
  24. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  25. package/dist/api/core/geom/query/edge.d.ts +128 -0
  26. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  27. package/dist/api/core/geom/query/face.d.ts +363 -0
  28. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  29. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  30. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  31. package/dist/api/core/geom/query/index.d.ts +61 -0
  32. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/query/profile.d.ts +410 -0
  34. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  36. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  37. package/dist/api/core/geom/update/contour.d.ts +272 -0
  38. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  39. package/dist/api/core/geom/update/curve.d.ts +180 -0
  40. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  41. package/dist/api/core/geom/update/index.d.ts +27 -0
  42. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  43. package/dist/api/core/geom/update/profile.d.ts +329 -0
  44. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  45. package/dist/api/core/groups.d.ts +485 -0
  46. package/dist/api/core/groups.d.ts.map +1 -0
  47. package/dist/api/core/history/index.d.ts +78 -0
  48. package/dist/api/core/history/index.d.ts.map +1 -0
  49. package/dist/api/core/index.d.ts +46 -1
  50. package/dist/api/core/index.d.ts.map +1 -1
  51. package/dist/api/core/layers.d.ts +402 -0
  52. package/dist/api/core/layers.d.ts.map +1 -0
  53. package/dist/api/core/math/quat.d.ts +111 -128
  54. package/dist/api/core/math/quat.d.ts.map +1 -1
  55. package/dist/api/core/math/vec3.d.ts +120 -102
  56. package/dist/api/core/math/vec3.d.ts.map +1 -1
  57. package/dist/api/core/project/index.d.ts +399 -0
  58. package/dist/api/core/project/index.d.ts.map +1 -0
  59. package/dist/api/core/tags.d.ts +755 -0
  60. package/dist/api/core/tags.d.ts.map +1 -0
  61. package/dist/api/core/units/index.d.ts +175 -0
  62. package/dist/api/core/units/index.d.ts.map +1 -0
  63. package/dist/api/core/zoom/index.d.ts +45 -0
  64. package/dist/api/core/zoom/index.d.ts.map +1 -0
  65. package/dist/api/design/boolean/index.d.ts +168 -0
  66. package/dist/api/design/boolean/index.d.ts.map +1 -0
  67. package/dist/api/design/create/index.d.ts +828 -0
  68. package/dist/api/design/create/index.d.ts.map +1 -0
  69. package/dist/api/design/delete/index.d.ts +63 -0
  70. package/dist/api/design/delete/index.d.ts.map +1 -0
  71. package/dist/api/design/doors/index.d.ts +268 -0
  72. package/dist/api/design/doors/index.d.ts.map +1 -0
  73. package/dist/api/design/edit/index.d.ts +49 -0
  74. package/dist/api/design/edit/index.d.ts.map +1 -0
  75. package/dist/api/design/erase/index.d.ts +160 -0
  76. package/dist/api/design/erase/index.d.ts.map +1 -0
  77. package/dist/api/design/furniture/index.d.ts +123 -0
  78. package/dist/api/design/furniture/index.d.ts.map +1 -0
  79. package/dist/api/design/index.d.ts +153 -0
  80. package/dist/api/design/index.d.ts.map +1 -0
  81. package/dist/api/design/lock.d.ts +41 -0
  82. package/dist/api/design/lock.d.ts.map +1 -0
  83. package/dist/api/design/materials/index.d.ts +297 -0
  84. package/dist/api/design/materials/index.d.ts.map +1 -0
  85. package/dist/api/design/query/geometry/index.d.ts +140 -0
  86. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  87. package/dist/api/design/query/index.d.ts +1011 -0
  88. package/dist/api/design/query/index.d.ts.map +1 -0
  89. package/dist/api/design/query/spaces.d.ts +221 -0
  90. package/dist/api/design/query/spaces.d.ts.map +1 -0
  91. package/dist/api/design/selection/index.d.ts +138 -0
  92. package/dist/api/design/selection/index.d.ts.map +1 -0
  93. package/dist/api/design/shared.d.ts +38 -0
  94. package/dist/api/design/shared.d.ts.map +1 -0
  95. package/dist/api/design/transform/index.d.ts +87 -0
  96. package/dist/api/design/transform/index.d.ts.map +1 -0
  97. package/dist/api/design/update/index.d.ts +178 -0
  98. package/dist/api/design/update/index.d.ts.map +1 -0
  99. package/dist/api/design/windows/index.d.ts +189 -0
  100. package/dist/api/design/windows/index.d.ts.map +1 -0
  101. package/dist/api/entity/buildableEnvelope.d.ts +261 -0
  102. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  103. package/dist/api/entity/department.d.ts +0 -98
  104. package/dist/api/entity/department.d.ts.map +1 -1
  105. package/dist/api/entity/index.d.ts +9 -9
  106. package/dist/api/entity/index.d.ts.map +1 -1
  107. package/dist/api/entity/referenceLine.d.ts +49 -106
  108. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  109. package/dist/api/entity/space.d.ts +482 -249
  110. package/dist/api/entity/space.d.ts.map +1 -1
  111. package/dist/api/entity/story.d.ts +49 -39
  112. package/dist/api/entity/story.d.ts.map +1 -1
  113. package/dist/api/index.d.ts +17 -12
  114. package/dist/api/index.d.ts.map +1 -1
  115. package/dist/api/presentation/aiInspiration.d.ts +440 -0
  116. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  117. package/dist/api/presentation/diagrams.d.ts +81 -0
  118. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  119. package/dist/api/presentation/import.d.ts +113 -0
  120. package/dist/api/presentation/import.d.ts.map +1 -0
  121. package/dist/api/presentation/index.d.ts +46 -0
  122. package/dist/api/presentation/index.d.ts.map +1 -0
  123. package/dist/api/presentation/sheets.d.ts +176 -0
  124. package/dist/api/presentation/sheets.d.ts.map +1 -0
  125. package/dist/api/presentation/views.d.ts +296 -0
  126. package/dist/api/presentation/views.d.ts.map +1 -0
  127. package/dist/api/program/adjacency.d.ts +155 -0
  128. package/dist/api/program/adjacency.d.ts.map +1 -0
  129. package/dist/api/program/areas.d.ts +360 -0
  130. package/dist/api/program/areas.d.ts.map +1 -0
  131. package/dist/api/program/classification.d.ts +135 -0
  132. package/dist/api/program/classification.d.ts.map +1 -0
  133. package/dist/api/program/cores.d.ts +174 -0
  134. package/dist/api/program/cores.d.ts.map +1 -0
  135. package/dist/api/program/departments.d.ts +431 -0
  136. package/dist/api/program/departments.d.ts.map +1 -0
  137. package/dist/api/program/index.d.ts +69 -0
  138. package/dist/api/program/index.d.ts.map +1 -0
  139. package/dist/api/program/layout.d.ts +63 -0
  140. package/dist/api/program/layout.d.ts.map +1 -0
  141. package/dist/api/program/metrics.d.ts +108 -0
  142. package/dist/api/program/metrics.d.ts.map +1 -0
  143. package/dist/api/program/site.d.ts +367 -0
  144. package/dist/api/program/site.d.ts.map +1 -0
  145. package/dist/api/program/spreadsheet.d.ts +2041 -0
  146. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  147. package/dist/handles.d.ts +138 -0
  148. package/dist/handles.d.ts.map +1 -0
  149. package/dist/host-utils.d.ts +7 -5
  150. package/dist/host-utils.d.ts.map +1 -1
  151. package/dist/index.cjs +4001 -904
  152. package/dist/index.cjs.map +1 -1
  153. package/dist/index.d.ts +1 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +3392 -870
  156. package/dist/index.js.map +1 -1
  157. package/package.json +6 -2
  158. package/scripts/generate-manifest.mjs +193 -0
  159. package/scripts/generate-manifest.test.mjs +193 -0
  160. package/src/api/core/buildings.ts +485 -0
  161. package/src/api/core/comment/index.ts +258 -0
  162. package/src/api/core/geom/create/index.ts +293 -0
  163. package/src/api/core/geom/delete/index.ts +78 -0
  164. package/src/api/core/geom/index.ts +24 -23
  165. package/src/api/core/geom/query/arc.ts +169 -0
  166. package/src/api/core/geom/query/brep.ts +444 -0
  167. package/src/api/core/geom/query/circle.ts +404 -0
  168. package/src/api/core/geom/query/contour.ts +540 -0
  169. package/src/api/core/geom/query/curve.ts +1078 -0
  170. package/src/api/core/geom/query/edge.ts +130 -0
  171. package/src/api/core/geom/query/face.ts +403 -0
  172. package/src/api/core/geom/query/halfedge.ts +210 -0
  173. package/src/api/core/geom/query/index.ts +63 -0
  174. package/src/api/core/geom/query/profile.ts +473 -0
  175. package/src/api/core/geom/query/vertex.ts +205 -0
  176. package/src/api/core/geom/update/contour.ts +315 -0
  177. package/src/api/core/geom/update/curve.ts +209 -0
  178. package/src/api/core/geom/update/index.ts +29 -0
  179. package/src/api/core/geom/update/profile.ts +377 -0
  180. package/src/api/core/groups.ts +521 -0
  181. package/src/api/core/history/index.ts +84 -0
  182. package/src/api/core/index.ts +46 -1
  183. package/src/api/core/layers.ts +333 -0
  184. package/src/api/core/math/quat.ts +112 -235
  185. package/src/api/core/math/vec3.ts +124 -159
  186. package/src/api/core/project/index.ts +418 -0
  187. package/src/api/core/tags.ts +808 -0
  188. package/src/api/core/units/index.ts +164 -0
  189. package/src/api/core/zoom/index.ts +47 -0
  190. package/src/api/design/boolean/index.ts +179 -0
  191. package/src/api/design/create/index.ts +886 -0
  192. package/src/api/design/delete/index.ts +67 -0
  193. package/src/api/design/doors/index.ts +285 -0
  194. package/src/api/design/edit/index.ts +54 -0
  195. package/src/api/design/erase/index.ts +151 -0
  196. package/src/api/design/furniture/index.ts +130 -0
  197. package/src/api/design/index.ts +162 -0
  198. package/src/api/design/lock.ts +42 -0
  199. package/src/api/design/materials/index.ts +301 -0
  200. package/src/api/design/query/geometry/index.ts +166 -0
  201. package/src/api/design/query/index.ts +937 -0
  202. package/src/api/design/query/spaces.ts +132 -0
  203. package/src/api/design/selection/index.ts +144 -0
  204. package/src/api/design/shared.ts +40 -0
  205. package/src/api/design/transform/index.ts +93 -0
  206. package/src/api/design/update/index.ts +117 -0
  207. package/src/api/design/windows/index.ts +207 -0
  208. package/src/api/entity/buildableEnvelope.ts +318 -0
  209. package/src/api/entity/department.ts +0 -113
  210. package/src/api/entity/index.ts +9 -9
  211. package/src/api/entity/referenceLine.ts +50 -38
  212. package/src/api/entity/space.ts +285 -226
  213. package/src/api/entity/story.ts +53 -42
  214. package/src/api/index.ts +17 -12
  215. package/src/api/presentation/aiInspiration.ts +362 -0
  216. package/src/api/presentation/diagrams.ts +84 -0
  217. package/src/api/presentation/import.ts +112 -0
  218. package/src/api/presentation/index.ts +48 -0
  219. package/src/api/presentation/sheets.ts +198 -0
  220. package/src/api/presentation/views.ts +303 -0
  221. package/src/api/program/adjacency.ts +164 -0
  222. package/src/api/program/areas.ts +335 -0
  223. package/src/api/program/classification.ts +138 -0
  224. package/src/api/program/cores.ts +171 -0
  225. package/src/api/program/departments.ts +465 -0
  226. package/src/api/program/index.ts +71 -0
  227. package/src/api/program/layout.ts +68 -0
  228. package/src/api/program/metrics.ts +120 -0
  229. package/src/api/program/site.ts +326 -0
  230. package/src/api/program/spreadsheet.ts +2075 -0
  231. package/src/handles.ts +148 -0
  232. package/src/host-utils.ts +10 -6
  233. package/src/index.ts +1 -0
  234. package/dist/api/core/geom/arc.d.ts +0 -81
  235. package/dist/api/core/geom/arc.d.ts.map +0 -1
  236. package/dist/api/core/geom/curve.d.ts +0 -70
  237. package/dist/api/core/geom/curve.d.ts.map +0 -1
  238. package/dist/api/core/geom/line.d.ts +0 -56
  239. package/dist/api/core/geom/line.d.ts.map +0 -1
  240. package/dist/api/core/geom/profile.d.ts +0 -121
  241. package/dist/api/core/geom/profile.d.ts.map +0 -1
  242. package/dist/api/tools/copy.d.ts +0 -59
  243. package/dist/api/tools/copy.d.ts.map +0 -1
  244. package/dist/api/tools/index.d.ts +0 -33
  245. package/dist/api/tools/index.d.ts.map +0 -1
  246. package/dist/api/tools/material.d.ts +0 -51
  247. package/dist/api/tools/material.d.ts.map +0 -1
  248. package/dist/api/tools/offset.d.ts +0 -43
  249. package/dist/api/tools/offset.d.ts.map +0 -1
  250. package/dist/api/tools/selection.d.ts +0 -48
  251. package/dist/api/tools/selection.d.ts.map +0 -1
  252. package/dist/api/tools/transform.d.ts +0 -114
  253. package/dist/api/tools/transform.d.ts.map +0 -1
  254. package/dist/api/units/index.d.ts +0 -163
  255. package/dist/api/units/index.d.ts.map +0 -1
  256. package/src/api/core/geom/arc.ts +0 -70
  257. package/src/api/core/geom/curve.ts +0 -41
  258. package/src/api/core/geom/line.ts +0 -53
  259. package/src/api/core/geom/profile.ts +0 -94
  260. package/src/api/tools/copy.ts +0 -55
  261. package/src/api/tools/index.ts +0 -39
  262. package/src/api/tools/material.ts +0 -49
  263. package/src/api/tools/offset.ts +0 -43
  264. package/src/api/tools/selection.ts +0 -51
  265. package/src/api/tools/transform.ts +0 -117
  266. package/src/api/units/index.ts +0 -163
@@ -0,0 +1,399 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../types";
3
+ /**
4
+ * Project-level settings and info.
5
+ *
6
+ * Accessed via `snaptrude.core.project`. Currently exposes
7
+ * {@linkcode PluginProjectApi.settings} (snap + grid controls).
8
+ */
9
+ export declare abstract class PluginProjectApi {
10
+ constructor();
11
+ /** Project settings — snaps and grid. See {@linkcode PluginProjectSettingsApi}. */
12
+ abstract settings: PluginProjectSettingsApi;
13
+ }
14
+ /**
15
+ * Project settings — tolerance, snaps, and grid.
16
+ *
17
+ * Accessed via `snaptrude.core.project.settings`.
18
+ */
19
+ export declare abstract class PluginProjectSettingsApi {
20
+ constructor();
21
+ /**
22
+ * Get the project tolerance as a numeric magnitude.
23
+ *
24
+ * The engine stores tolerance as a discrete per-unit precision option; this
25
+ * returns its magnitude (decimal precision `"0.00"` → `0.01`; fraction `"1/4"`
26
+ * → `0.25`).
27
+ *
28
+ * @examplePrompt What is the tolerance setting in this project?
29
+ * @examplePrompt Check the current dimension precision of the model
30
+ * @examplePrompt How precise are the measurements in this project?
31
+ * @examplePrompt Show me the project's tolerance value
32
+ *
33
+ * # Example
34
+ * ```ts
35
+ * const tolerance = await snaptrude.core.project.settings.getTolerance()
36
+ * console.log(tolerance) // e.g. 0.01
37
+ * ```
38
+ */
39
+ abstract getTolerance(): PluginApiReturn<number>;
40
+ /**
41
+ * Set the project tolerance. The value snaps to the **nearest allowed**
42
+ * per-unit precision option (tolerance is a discrete dropdown, not arbitrary).
43
+ *
44
+ * @param value - Target tolerance magnitude; snaps to the nearest allowed option.
45
+ * @returns `true` once applied; `false` if no tolerance options are available.
46
+ *
47
+ * @examplePrompt Set the project tolerance to 0.01
48
+ * @examplePrompt Change the dimension precision to two decimal places
49
+ * @examplePrompt Round dimensions to the nearest quarter inch
50
+ * @examplePrompt Make the measurements in this project more precise
51
+ *
52
+ * # Example
53
+ * ```ts
54
+ * // snaps to the nearest allowed precision option
55
+ * const applied = await snaptrude.core.project.settings.setTolerance(0.01)
56
+ * if (!applied) console.log("no tolerance options available")
57
+ * ```
58
+ */
59
+ abstract setTolerance(value: number): PluginApiReturn<boolean>;
60
+ /** Snap controls (dimension / angle / parallel / normal / magnetic). See {@linkcode PluginSnapsApi}. */
61
+ abstract snaps: PluginSnapsApi;
62
+ /** Grid controls. See {@linkcode PluginGridApi}. */
63
+ abstract grid: PluginGridApi;
64
+ }
65
+ /**
66
+ * Snap controls. Dimension and angle snaps each have a numeric threshold plus an
67
+ * on/off toggle; parallel, normal, and magnetic snaps are on/off only.
68
+ * (`normal` is the perpendicular snap.)
69
+ *
70
+ * Accessed via `snaptrude.core.project.settings.snaps`.
71
+ */
72
+ export declare abstract class PluginSnapsApi {
73
+ constructor();
74
+ /**
75
+ * Set the dimension-snap threshold — the length increment that drawing and
76
+ * editing snap to when dimension snapping is on.
77
+ *
78
+ * @param value - The snap threshold distance.
79
+ *
80
+ * @examplePrompt Set the dimension snap to 100mm
81
+ * @examplePrompt Change the snap distance to half a metre
82
+ * @examplePrompt Make the cursor snap every 6 inches when drawing
83
+ * @examplePrompt Adjust the snapping increment for lengths
84
+ *
85
+ * # Example
86
+ * ```ts
87
+ * // the threshold only applies while dimension snapping is on
88
+ * await snaptrude.core.project.settings.snaps.setDimension(100)
89
+ * await snaptrude.core.project.settings.snaps.enableDimension()
90
+ * ```
91
+ */
92
+ abstract setDimension(value: number): PluginApiReturn<boolean>;
93
+ /**
94
+ * Get the current dimension-snap threshold — the length increment that
95
+ * drawing and editing snap to when dimension snapping is on.
96
+ *
97
+ * @examplePrompt What is the dimension snap distance?
98
+ * @examplePrompt Check the current snap increment for drawing
99
+ * @examplePrompt How far apart are the length snaps set?
100
+ * @examplePrompt Show me the snap spacing value
101
+ *
102
+ * # Example
103
+ * ```ts
104
+ * const increment = await snaptrude.core.project.settings.snaps.getDimension()
105
+ * console.log(increment)
106
+ * ```
107
+ */
108
+ abstract getDimension(): PluginApiReturn<number>;
109
+ /**
110
+ * Turn dimension snapping on, so drawing and editing snap to the configured
111
+ * length increment.
112
+ *
113
+ * @examplePrompt Turn on dimension snapping
114
+ * @examplePrompt Enable snapping to set lengths while I draw
115
+ * @examplePrompt Make my walls snap to round dimensions
116
+ * @examplePrompt Switch length snapping back on
117
+ *
118
+ * # Example
119
+ * ```ts
120
+ * await snaptrude.core.project.settings.snaps.enableDimension()
121
+ * ```
122
+ */
123
+ abstract enableDimension(): PluginApiReturn<boolean>;
124
+ /**
125
+ * Turn dimension snapping off, so lengths no longer snap to the configured
126
+ * increment while drawing.
127
+ *
128
+ * @examplePrompt Turn off dimension snapping
129
+ * @examplePrompt Stop snapping to fixed lengths when I draw
130
+ * @examplePrompt Disable the length snap so I can draw freely
131
+ * @examplePrompt I don't want dimensions to snap anymore
132
+ *
133
+ * # Example
134
+ * ```ts
135
+ * await snaptrude.core.project.settings.snaps.disableDimension()
136
+ * ```
137
+ */
138
+ abstract disableDimension(): PluginApiReturn<boolean>;
139
+ /**
140
+ * Set the angle-snap threshold in degrees — the angular increment that
141
+ * drawing snaps to when angle snapping is on.
142
+ *
143
+ * @param value - The snap threshold in degrees.
144
+ *
145
+ * @examplePrompt Set the angle snap to 15 degrees
146
+ * @examplePrompt Change angle snapping to every 45 degrees
147
+ * @examplePrompt Make drawing snap at 30 degree increments
148
+ * @examplePrompt Adjust the rotation snap angle
149
+ *
150
+ * # Example
151
+ * ```ts
152
+ * // snap drawing to 15-degree increments (applies while angle snapping is on)
153
+ * await snaptrude.core.project.settings.snaps.setAngle(15)
154
+ * await snaptrude.core.project.settings.snaps.enableAngle()
155
+ * ```
156
+ */
157
+ abstract setAngle(value: number): PluginApiReturn<boolean>;
158
+ /**
159
+ * Get the current angle-snap threshold in degrees — the angular increment
160
+ * that drawing snaps to when angle snapping is on.
161
+ *
162
+ * @examplePrompt What angle does drawing snap to?
163
+ * @examplePrompt Check the current angle snap in degrees
164
+ * @examplePrompt Show me the angle snapping increment
165
+ * @examplePrompt How many degrees is the angle snap set to?
166
+ *
167
+ * # Example
168
+ * ```ts
169
+ * const degrees = await snaptrude.core.project.settings.snaps.getAngle()
170
+ * console.log(degrees)
171
+ * ```
172
+ */
173
+ abstract getAngle(): PluginApiReturn<number>;
174
+ /**
175
+ * Turn angle snapping on, so drawn lines snap to the configured angle
176
+ * increment.
177
+ *
178
+ * @examplePrompt Turn on angle snapping
179
+ * @examplePrompt Enable snapping to angles while drawing
180
+ * @examplePrompt Make my lines snap to set angles
181
+ * @examplePrompt Switch angle snap back on
182
+ *
183
+ * # Example
184
+ * ```ts
185
+ * await snaptrude.core.project.settings.snaps.enableAngle()
186
+ * ```
187
+ */
188
+ abstract enableAngle(): PluginApiReturn<boolean>;
189
+ /**
190
+ * Turn angle snapping off, so lines can be drawn at any angle without
191
+ * snapping to fixed increments.
192
+ *
193
+ * @examplePrompt Turn off angle snapping
194
+ * @examplePrompt Stop lines snapping to fixed angles
195
+ * @examplePrompt Disable the angle snap so I can draw at any angle
196
+ * @examplePrompt Remove angle snapping while sketching
197
+ *
198
+ * # Example
199
+ * ```ts
200
+ * await snaptrude.core.project.settings.snaps.disableAngle()
201
+ * ```
202
+ */
203
+ abstract disableAngle(): PluginApiReturn<boolean>;
204
+ /**
205
+ * Turn parallel snapping on, so drawing snaps when the cursor lines up
206
+ * parallel to existing edges.
207
+ *
208
+ * @examplePrompt Turn on parallel snapping
209
+ * @examplePrompt Enable snapping to parallel lines
210
+ * @examplePrompt Help me draw walls parallel to existing ones
211
+ * @examplePrompt Snap to parallel edges when drawing
212
+ *
213
+ * # Example
214
+ * ```ts
215
+ * await snaptrude.core.project.settings.snaps.enableParallel()
216
+ * ```
217
+ */
218
+ abstract enableParallel(): PluginApiReturn<boolean>;
219
+ /**
220
+ * Turn parallel snapping off, so drawing no longer snaps to directions
221
+ * parallel to existing edges.
222
+ *
223
+ * @examplePrompt Turn off parallel snapping
224
+ * @examplePrompt Stop snapping to parallel edges
225
+ * @examplePrompt Disable the parallel snap guide
226
+ * @examplePrompt I don't want my lines snapping parallel anymore
227
+ *
228
+ * # Example
229
+ * ```ts
230
+ * await snaptrude.core.project.settings.snaps.disableParallel()
231
+ * ```
232
+ */
233
+ abstract disableParallel(): PluginApiReturn<boolean>;
234
+ /**
235
+ * Turn normal (perpendicular) snapping on, so drawing snaps when the cursor
236
+ * is at a right angle to existing edges.
237
+ *
238
+ * @examplePrompt Turn on perpendicular snapping
239
+ * @examplePrompt Enable the normal snap so lines snap at right angles
240
+ * @examplePrompt Snap to perpendicular when I draw walls
241
+ * @examplePrompt Help me draw at 90 degrees to existing edges
242
+ *
243
+ * # Example
244
+ * ```ts
245
+ * await snaptrude.core.project.settings.snaps.enableNormal()
246
+ * ```
247
+ */
248
+ abstract enableNormal(): PluginApiReturn<boolean>;
249
+ /**
250
+ * Turn normal (perpendicular) snapping off, so drawing no longer snaps at
251
+ * right angles to existing edges.
252
+ *
253
+ * @examplePrompt Turn off perpendicular snapping
254
+ * @examplePrompt Disable the normal snap
255
+ * @examplePrompt Stop snapping at right angles to edges
256
+ * @examplePrompt Remove the 90 degree snap guide
257
+ *
258
+ * # Example
259
+ * ```ts
260
+ * await snaptrude.core.project.settings.snaps.disableNormal()
261
+ * ```
262
+ */
263
+ abstract disableNormal(): PluginApiReturn<boolean>;
264
+ /**
265
+ * Turn magnetic snapping on, so the cursor is pulled to nearby geometry
266
+ * while drawing.
267
+ *
268
+ * @examplePrompt Turn on magnetic snapping
269
+ * @examplePrompt Enable the magnet snap
270
+ * @examplePrompt Make the cursor stick to nearby geometry when drawing
271
+ * @examplePrompt Switch magnetic snap back on
272
+ *
273
+ * # Example
274
+ * ```ts
275
+ * await snaptrude.core.project.settings.snaps.enableMagnetic()
276
+ * ```
277
+ */
278
+ abstract enableMagnetic(): PluginApiReturn<boolean>;
279
+ /**
280
+ * Turn magnetic snapping off, so the cursor is no longer pulled to nearby
281
+ * geometry while drawing.
282
+ *
283
+ * @examplePrompt Turn off magnetic snapping
284
+ * @examplePrompt Disable the magnet snap
285
+ * @examplePrompt Stop the cursor sticking to nearby objects
286
+ * @examplePrompt The magnetic snap is annoying, switch it off
287
+ *
288
+ * # Example
289
+ * ```ts
290
+ * await snaptrude.core.project.settings.snaps.disableMagnetic()
291
+ * ```
292
+ */
293
+ abstract disableMagnetic(): PluginApiReturn<boolean>;
294
+ }
295
+ /**
296
+ * Grid controls — the visual snap-to grid.
297
+ *
298
+ * Accessed via `snaptrude.core.project.settings.grid`.
299
+ */
300
+ export declare abstract class PluginGridApi {
301
+ constructor();
302
+ /**
303
+ * Turn the grid on, showing the visual snap-to grid in the canvas.
304
+ *
305
+ * @examplePrompt Turn on the grid
306
+ * @examplePrompt Show the grid in my project
307
+ * @examplePrompt Enable the drawing grid
308
+ * @examplePrompt Switch the snap grid back on
309
+ *
310
+ * # Example
311
+ * ```ts
312
+ * await snaptrude.core.project.settings.grid.enable()
313
+ * ```
314
+ */
315
+ abstract enable(): PluginApiReturn<boolean>;
316
+ /**
317
+ * Turn the grid off, hiding the visual snap-to grid in the canvas.
318
+ *
319
+ * @examplePrompt Turn off the grid
320
+ * @examplePrompt Hide the grid
321
+ * @examplePrompt Disable the background grid in the canvas
322
+ * @examplePrompt Remove the drawing grid from view
323
+ *
324
+ * # Example
325
+ * ```ts
326
+ * await snaptrude.core.project.settings.grid.disable()
327
+ * ```
328
+ */
329
+ abstract disable(): PluginApiReturn<boolean>;
330
+ /**
331
+ * Set the grid cell value — the size of each cell in the visual snap-to
332
+ * grid.
333
+ *
334
+ * @param value - The grid cell value.
335
+ *
336
+ * @examplePrompt Set the grid spacing to 1 metre
337
+ * @examplePrompt Change the grid cell size to 500mm
338
+ * @examplePrompt Make the grid squares 2 feet wide
339
+ * @examplePrompt Adjust the grid size in this project
340
+ *
341
+ * # Example
342
+ * ```ts
343
+ * await snaptrude.core.project.settings.grid.setValue(1)
344
+ * await snaptrude.core.project.settings.grid.enable()
345
+ * ```
346
+ */
347
+ abstract setValue(value: number): PluginApiReturn<boolean>;
348
+ /**
349
+ * Get the current grid cell value — the size of each cell in the visual
350
+ * snap-to grid.
351
+ *
352
+ * @examplePrompt What is the grid spacing?
353
+ * @examplePrompt Check the current grid cell size
354
+ * @examplePrompt How big are the grid squares?
355
+ * @examplePrompt Show me the grid size setting
356
+ *
357
+ * # Example
358
+ * ```ts
359
+ * const cellSize = await snaptrude.core.project.settings.grid.getValue()
360
+ * console.log(cellSize)
361
+ * ```
362
+ */
363
+ abstract getValue(): PluginApiReturn<number>;
364
+ }
365
+ /**
366
+ * Arguments for the snap-threshold setters
367
+ * ({@linkcode PluginSnapsApi.setDimension} / {@linkcode PluginSnapsApi.setAngle}).
368
+ *
369
+ * | Property | Type | Description |
370
+ * |---|---|---|
371
+ * | `value` | `number` | The snap threshold (distance, or degrees for angle) |
372
+ */
373
+ export declare const PluginSnapValueArgs: z.ZodObject<{
374
+ value: z.ZodNumber;
375
+ }, z.core.$strip>;
376
+ export type PluginSnapValueArgs = z.infer<typeof PluginSnapValueArgs>;
377
+ /**
378
+ * Arguments for {@linkcode PluginGridApi.setValue}.
379
+ *
380
+ * | Property | Type | Description |
381
+ * |---|---|---|
382
+ * | `value` | `number` | The grid cell value |
383
+ */
384
+ export declare const PluginGridValueArgs: z.ZodObject<{
385
+ value: z.ZodNumber;
386
+ }, z.core.$strip>;
387
+ export type PluginGridValueArgs = z.infer<typeof PluginGridValueArgs>;
388
+ /**
389
+ * Arguments for {@linkcode PluginProjectSettingsApi.setTolerance}.
390
+ *
391
+ * | Property | Type | Description |
392
+ * |---|---|---|
393
+ * | `value` | `number` | Target tolerance magnitude; snaps to the nearest allowed option |
394
+ */
395
+ export declare const PluginToleranceArgs: z.ZodObject<{
396
+ value: z.ZodNumber;
397
+ }, z.core.$strip>;
398
+ export type PluginToleranceArgs = z.infer<typeof PluginToleranceArgs>;
399
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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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