@snaptrude/plugin-core 0.7.1 → 0.9.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.
- package/CHANGELOG.md +29 -0
- package/api-manifest.full.json +7703 -0
- package/api-manifest.json +2946 -259
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +438 -14
- package/dist/api/analysis/heatmaps.d.ts.map +1 -1
- package/dist/api/analysis/index.d.ts +15 -0
- package/dist/api/analysis/index.d.ts.map +1 -1
- package/dist/api/analysis/solar.d.ts +249 -0
- package/dist/api/analysis/solar.d.ts.map +1 -0
- package/dist/api/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +245 -0
- package/dist/api/core/camera/index.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +105 -2
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +331 -14
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/delete/index.d.ts +8 -2
- package/dist/api/core/geom/delete/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +5 -5
- package/dist/api/core/geom/query/brep.d.ts +18 -18
- package/dist/api/core/geom/query/circle.d.ts +18 -18
- package/dist/api/core/geom/query/contour.d.ts +20 -20
- package/dist/api/core/geom/query/curve.d.ts +49 -49
- package/dist/api/core/geom/query/edge.d.ts +5 -5
- package/dist/api/core/geom/query/face.d.ts +16 -16
- package/dist/api/core/geom/query/halfedge.d.ts +8 -8
- package/dist/api/core/geom/query/profile.d.ts +19 -19
- package/dist/api/core/geom/query/vertex.d.ts +8 -8
- package/dist/api/core/geom/update/contour.d.ts +14 -14
- package/dist/api/core/geom/update/curve.d.ts +7 -7
- package/dist/api/core/geom/update/profile.d.ts +16 -16
- package/dist/api/core/handles/index.d.ts +210 -0
- package/dist/api/core/handles/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +24 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/export/index.d.ts +134 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +62 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/io/index.d.ts +5 -0
- package/dist/api/core/io/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +7 -7
- package/dist/api/core/mode/index.d.ts +99 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/proposals/index.d.ts +65 -9
- package/dist/api/core/proposals/index.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +251 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +24 -0
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/core/user.d.ts +44 -0
- package/dist/api/core/user.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +4 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +4 -4
- package/dist/api/design/create/index.d.ts +253 -47
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +3 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +36 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +1 -1
- package/dist/api/design/erase/index.d.ts +2 -2
- package/dist/api/design/furniture/index.d.ts +114 -3
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +10 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +111 -14
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +112 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +35 -1
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +178 -5
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/transform/index.d.ts +95 -14
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/types/index.d.ts +181 -0
- package/dist/api/design/types/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +385 -2
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +98 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +4 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +10 -2
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +19 -19
- package/dist/api/entity/story.d.ts +148 -15
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +448 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +49 -8
- package/dist/api/presentation/diagrams.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +108 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +6 -0
- package/dist/api/presentation/import.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +47 -0
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +370 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +410 -13
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +165 -10
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +63 -3
- package/dist/api/program/areas.d.ts.map +1 -1
- package/dist/api/program/cores.d.ts +3 -99
- package/dist/api/program/cores.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +2 -2
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +172 -12
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +105 -8
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/program/spreadsheet.d.ts +365 -41
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +460 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- package/dist/handles.d.ts +64 -25
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +3210 -1671
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3008 -1666
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/scripts/generate-manifest.mjs +45 -0
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +444 -17
- package/src/api/analysis/index.ts +15 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/camera/index.ts +251 -0
- package/src/api/core/comment/index.ts +120 -2
- package/src/api/core/geom/create/index.ts +344 -1
- package/src/api/core/geom/delete/index.ts +6 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/index.ts +24 -0
- package/src/api/core/io/export/index.ts +126 -0
- package/src/api/core/io/import/index.ts +64 -0
- package/src/api/core/io/index.ts +5 -0
- package/src/api/core/mode/index.ts +96 -0
- package/src/api/core/proposals/index.ts +71 -11
- package/src/api/core/storeys/index.ts +279 -0
- package/src/api/core/tags.ts +27 -0
- package/src/api/core/user.ts +46 -0
- package/src/api/core/zoom/index.ts +4 -0
- package/src/api/design/create/index.ts +303 -36
- package/src/api/design/delete/index.ts +3 -0
- package/src/api/design/doors/index.ts +40 -0
- package/src/api/design/furniture/index.ts +127 -3
- package/src/api/design/index.ts +10 -0
- package/src/api/design/materials/index.ts +157 -30
- package/src/api/design/query/geometry/index.ts +125 -3
- package/src/api/design/query/index.ts +37 -7
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +143 -0
- package/src/api/design/transform/index.ts +101 -12
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +467 -6
- package/src/api/design/visibility.ts +109 -0
- package/src/api/entity/buildableEnvelope.ts +4 -0
- package/src/api/entity/referenceLine.ts +8 -0
- package/src/api/entity/story.ts +161 -15
- package/src/api/index.ts +5 -0
- package/src/api/presentation/annotate.ts +360 -0
- package/src/api/presentation/diagrams.ts +53 -8
- package/src/api/presentation/export.ts +108 -0
- package/src/api/presentation/import.ts +6 -0
- package/src/api/presentation/index.ts +55 -0
- package/src/api/presentation/placedViews.ts +363 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/presentation/sheets.ts +346 -13
- package/src/api/presentation/views.ts +164 -12
- package/src/api/program/areas.ts +57 -6
- package/src/api/program/cores.ts +3 -91
- package/src/api/program/index.ts +2 -2
- package/src/api/program/layout.ts +182 -12
- package/src/api/program/site.ts +106 -8
- package/src/api/program/spreadsheet.ts +376 -35
- package/src/api/workspace/index.ts +516 -0
- package/src/handles.ts +77 -13
- package/tsconfig.json +7 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* User locale.
|
|
5
|
+
*
|
|
6
|
+
* Read the viewer's timezone and language — for date/number formatting and
|
|
7
|
+
* localized labels. This is locale only: NO precise geolocation, no IP, no
|
|
8
|
+
* account identity. Accessed via `snaptrude.core.user`.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class PluginUserApi {
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Get the viewer's locale: IANA timezone and BCP-47 language tag, resolved
|
|
14
|
+
* from the browser (`Intl.DateTimeFormat().resolvedOptions().timeZone` and
|
|
15
|
+
* `navigator.language`). Locale only — no precise location.
|
|
16
|
+
*
|
|
17
|
+
* @returns `{ timezone, language }` — e.g. `{ timezone: "Asia/Kolkata", language: "en-US" }`.
|
|
18
|
+
*
|
|
19
|
+
* @examplePrompt What timezone is the user in?
|
|
20
|
+
* @examplePrompt Get the viewer's language for localized labels
|
|
21
|
+
* @examplePrompt Format the report date in the user's local timezone
|
|
22
|
+
* @examplePrompt Which locale should I use for this plugin's UI?
|
|
23
|
+
*
|
|
24
|
+
* # Example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const { timezone, language } = await snaptrude.core.user.getLocale()
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
abstract getLocale(): PluginApiReturn<PluginUserLocale>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The viewer's locale.
|
|
33
|
+
*
|
|
34
|
+
* | Property | Type | Description |
|
|
35
|
+
* |---|---|---|
|
|
36
|
+
* | `timezone` | `string` | IANA timezone id (e.g. `"Asia/Kolkata"`) |
|
|
37
|
+
* | `language` | `string` | BCP-47 language tag (e.g. `"en-US"`) |
|
|
38
|
+
*/
|
|
39
|
+
export declare const PluginUserLocale: z.ZodObject<{
|
|
40
|
+
timezone: z.ZodString;
|
|
41
|
+
language: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type PluginUserLocale = z.infer<typeof PluginUserLocale>;
|
|
44
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/api/core/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;GAMG;AACH,8BAAsB,aAAa;;IAGjC;;;;;;;;;;;;;;;;OAgBG;aACa,SAAS,IAAI,eAAe,CAAC,gBAAgB,CAAC;CAC/D;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -22,6 +22,8 @@ export declare abstract class PluginZoomApi {
|
|
|
22
22
|
* ```ts
|
|
23
23
|
* await snaptrude.core.zoom.extents()
|
|
24
24
|
* ```
|
|
25
|
+
*
|
|
26
|
+
* @deprecated Use `core.camera.zoomExtents`
|
|
25
27
|
*/
|
|
26
28
|
abstract extents(): PluginApiReturn<boolean>;
|
|
27
29
|
/**
|
|
@@ -39,6 +41,8 @@ export declare abstract class PluginZoomApi {
|
|
|
39
41
|
* ```ts
|
|
40
42
|
* await snaptrude.core.zoom.selection()
|
|
41
43
|
* ```
|
|
44
|
+
*
|
|
45
|
+
* @deprecated Use `core.camera.zoomSelection`
|
|
42
46
|
*/
|
|
43
47
|
abstract selection(): PluginApiReturn<boolean>;
|
|
44
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/zoom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;GAKG;AACH,8BAAsB,aAAa;;IAGjC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/zoom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;GAKG;AACH,8BAAsB,aAAa;;IAGjC;;;;;;;;;;;;;;;;;OAiBG;aACa,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC;IAEnD;;;;;;;;;;;;;;;;;OAiBG;aACa,SAAS,IAAI,eAAe,CAAC,OAAO,CAAC;CACtD"}
|
|
@@ -115,7 +115,7 @@ export declare abstract class PluginDesignBooleanApi {
|
|
|
115
115
|
* | `offset` | {@linkcode Vec3Handle} | Translation added to the created result mass(es) (default: none) |
|
|
116
116
|
*/
|
|
117
117
|
export declare const BooleanOptions: z.ZodObject<{
|
|
118
|
-
offset: z.ZodOptional<z.ZodPipe<z.
|
|
118
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
119
119
|
}, z.core.$strip>;
|
|
120
120
|
export type BooleanOptions = z.infer<typeof BooleanOptions>;
|
|
121
121
|
/**
|
|
@@ -129,7 +129,7 @@ export type BooleanOptions = z.infer<typeof BooleanOptions>;
|
|
|
129
129
|
export declare const PluginDesignBooleanUnionArgs: z.ZodObject<{
|
|
130
130
|
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
131
131
|
options: z.ZodOptional<z.ZodObject<{
|
|
132
|
-
offset: z.ZodOptional<z.ZodPipe<z.
|
|
132
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
133
133
|
}, z.core.$strip>>;
|
|
134
134
|
}, z.core.$strip>;
|
|
135
135
|
export type PluginDesignBooleanUnionArgs = z.infer<typeof PluginDesignBooleanUnionArgs>;
|
|
@@ -146,7 +146,7 @@ export declare const PluginDesignBooleanSubtractArgs: z.ZodObject<{
|
|
|
146
146
|
target: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
147
147
|
tools: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
148
148
|
options: z.ZodOptional<z.ZodObject<{
|
|
149
|
-
offset: z.ZodOptional<z.ZodPipe<z.
|
|
149
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
150
150
|
}, z.core.$strip>>;
|
|
151
151
|
}, z.core.$strip>;
|
|
152
152
|
export type PluginDesignBooleanSubtractArgs = z.infer<typeof PluginDesignBooleanSubtractArgs>;
|
|
@@ -161,7 +161,7 @@ export type PluginDesignBooleanSubtractArgs = z.infer<typeof PluginDesignBoolean
|
|
|
161
161
|
export declare const PluginDesignBooleanIntersectArgs: z.ZodObject<{
|
|
162
162
|
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
163
163
|
options: z.ZodOptional<z.ZodObject<{
|
|
164
|
-
offset: z.ZodOptional<z.ZodPipe<z.
|
|
164
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
165
165
|
}, z.core.$strip>>;
|
|
166
166
|
}, z.core.$strip>;
|
|
167
167
|
export type PluginDesignBooleanIntersectArgs = z.infer<typeof PluginDesignBooleanIntersectArgs>;
|