@snaptrude/plugin-client 0.3.0 → 0.6.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 (77) hide show
  1. package/AGENTS.md +39 -45
  2. package/CHANGELOG.md +121 -0
  3. package/CLAUDE.md +1 -1
  4. package/dist/api/index.d.ts +13 -13
  5. package/dist/api/index.d.ts.map +1 -1
  6. package/dist/index.cjs +24 -467
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.js +26 -460
  9. package/dist/index.js.map +1 -1
  10. package/dist/rpc-proxy.d.ts +28 -0
  11. package/dist/rpc-proxy.d.ts.map +1 -0
  12. package/package.json +2 -2
  13. package/src/api/index.ts +29 -18
  14. package/src/rpc-proxy.ts +56 -0
  15. package/dist/api/core/geom/arc.d.ts +0 -5
  16. package/dist/api/core/geom/arc.d.ts.map +0 -1
  17. package/dist/api/core/geom/curve.d.ts +0 -5
  18. package/dist/api/core/geom/curve.d.ts.map +0 -1
  19. package/dist/api/core/geom/index.d.ts +0 -17
  20. package/dist/api/core/geom/index.d.ts.map +0 -1
  21. package/dist/api/core/geom/line.d.ts +0 -5
  22. package/dist/api/core/geom/line.d.ts.map +0 -1
  23. package/dist/api/core/geom/profile.d.ts +0 -7
  24. package/dist/api/core/geom/profile.d.ts.map +0 -1
  25. package/dist/api/core/index.d.ts +0 -11
  26. package/dist/api/core/index.d.ts.map +0 -1
  27. package/dist/api/core/math/index.d.ts +0 -11
  28. package/dist/api/core/math/index.d.ts.map +0 -1
  29. package/dist/api/core/math/quat.d.ts +0 -5
  30. package/dist/api/core/math/quat.d.ts.map +0 -1
  31. package/dist/api/core/math/vec3.d.ts +0 -5
  32. package/dist/api/core/math/vec3.d.ts.map +0 -1
  33. package/dist/api/entity/department.d.ts +0 -7
  34. package/dist/api/entity/department.d.ts.map +0 -1
  35. package/dist/api/entity/index.d.ts +0 -17
  36. package/dist/api/entity/index.d.ts.map +0 -1
  37. package/dist/api/entity/referenceLine.d.ts +0 -9
  38. package/dist/api/entity/referenceLine.d.ts.map +0 -1
  39. package/dist/api/entity/space.d.ts +0 -11
  40. package/dist/api/entity/space.d.ts.map +0 -1
  41. package/dist/api/entity/story.d.ts +0 -9
  42. package/dist/api/entity/story.d.ts.map +0 -1
  43. package/dist/api/tools/copy.d.ts +0 -3
  44. package/dist/api/tools/copy.d.ts.map +0 -1
  45. package/dist/api/tools/index.d.ts +0 -17
  46. package/dist/api/tools/index.d.ts.map +0 -1
  47. package/dist/api/tools/material.d.ts +0 -6
  48. package/dist/api/tools/material.d.ts.map +0 -1
  49. package/dist/api/tools/offset.d.ts +0 -3
  50. package/dist/api/tools/offset.d.ts.map +0 -1
  51. package/dist/api/tools/selection.d.ts +0 -6
  52. package/dist/api/tools/selection.d.ts.map +0 -1
  53. package/dist/api/tools/transform.d.ts +0 -7
  54. package/dist/api/tools/transform.d.ts.map +0 -1
  55. package/dist/api/units/index.d.ts +0 -7
  56. package/dist/api/units/index.d.ts.map +0 -1
  57. package/src/api/core/geom/arc.ts +0 -7
  58. package/src/api/core/geom/curve.ts +0 -7
  59. package/src/api/core/geom/index.ts +0 -25
  60. package/src/api/core/geom/line.ts +0 -7
  61. package/src/api/core/geom/profile.ts +0 -17
  62. package/src/api/core/index.ts +0 -17
  63. package/src/api/core/math/index.ts +0 -17
  64. package/src/api/core/math/quat.ts +0 -7
  65. package/src/api/core/math/vec3.ts +0 -7
  66. package/src/api/entity/department.ts +0 -30
  67. package/src/api/entity/index.ts +0 -25
  68. package/src/api/entity/referenceLine.ts +0 -54
  69. package/src/api/entity/space.ts +0 -98
  70. package/src/api/entity/story.ts +0 -66
  71. package/src/api/tools/copy.ts +0 -10
  72. package/src/api/tools/index.ts +0 -36
  73. package/src/api/tools/material.ts +0 -22
  74. package/src/api/tools/offset.ts +0 -15
  75. package/src/api/tools/selection.ts +0 -15
  76. package/src/api/tools/transform.ts +0 -44
  77. package/src/api/units/index.ts +0 -34
package/src/api/index.ts CHANGED
@@ -1,23 +1,39 @@
1
- import { ClientCoreApi } from "./core"
2
- import { ClientEntityApi } from "./entity"
3
- import { ClientToolsApi } from "./tools"
4
- import { ClientUnitsApi } from "./units"
5
- import { PluginApi } from "@snaptrude/plugin-core"
1
+ import {
2
+ PluginApi,
3
+ PluginCoreApi,
4
+ PluginDesignApi,
5
+ PluginEntityApi,
6
+ PluginProgramApi,
7
+ PluginPresentationApi,
8
+ PluginAnalysisApi,
9
+ } from "@snaptrude/plugin-core"
10
+ import { createRpcNamespace } from "../rpc-proxy"
6
11
 
7
12
  export class ClientPluginApi extends PluginApi {
8
13
  private static instance: ClientPluginApi
9
14
 
10
- public core: ClientCoreApi
11
- public tools: ClientToolsApi
12
- public entity: ClientEntityApi
13
- public units: ClientUnitsApi
15
+ /**
16
+ * Every namespace is fully remote under the all-handle model: math/geom now
17
+ * cross to the host (values are opaque handles), so there is no in-worker
18
+ * compute left. All dispatch through a single generic RPC Proxy. Units live
19
+ * under `core.units`, so they ride the `core` proxy.
20
+ */
21
+ public core: PluginCoreApi
22
+ public design: PluginDesignApi
23
+ public entity: PluginEntityApi
24
+ public program: PluginProgramApi
25
+ public presentation: PluginPresentationApi
26
+ public analysis: PluginAnalysisApi
14
27
 
15
28
  private constructor() {
16
29
  super()
17
- this.core = new ClientCoreApi()
18
- this.tools = new ClientToolsApi()
19
- this.entity = new ClientEntityApi()
20
- this.units = new ClientUnitsApi()
30
+ this.core = createRpcNamespace<PluginCoreApi>("core")
31
+ this.design = createRpcNamespace<PluginDesignApi>("design")
32
+ this.entity = createRpcNamespace<PluginEntityApi>("entity")
33
+ this.program = createRpcNamespace<PluginProgramApi>("program")
34
+ this.presentation =
35
+ createRpcNamespace<PluginPresentationApi>("presentation")
36
+ this.analysis = createRpcNamespace<PluginAnalysisApi>("analysis")
21
37
  }
22
38
 
23
39
  static getInstance(): ClientPluginApi {
@@ -27,8 +43,3 @@ export class ClientPluginApi extends PluginApi {
27
43
  return ClientPluginApi.instance
28
44
  }
29
45
  }
30
-
31
- export * from "./core"
32
- export * from "./entity"
33
- export * from "./tools"
34
- export * from "./units"
@@ -0,0 +1,56 @@
1
+ import type {
2
+ PluginApiCallPayload,
3
+ PluginApiMethod,
4
+ } from "@snaptrude/plugin-core"
5
+ import { getHostApi } from "./host-api"
6
+
7
+ /**
8
+ * Build a namespace object whose nested property access maps to a
9
+ * dot-separated host RPC method path, and whose every call dispatches that
10
+ * path through the host bridge.
11
+ *
12
+ * The host exposes the entire plugin API behind a single generic `call()`
13
+ * (see the host `bridge.ts`), and the method string is exactly the property
14
+ * path — so one Proxy replaces every hand-written per-method RPC wrapper for
15
+ * every namespace (`core.*`, `design.*`, `entity.*`):
16
+ *
17
+ * The POSITIONAL transport forwards the whole argument tuple; the host router
18
+ * spreads it back into the resolved method (`fn(...args)`):
19
+ *
20
+ * ```ts
21
+ * snaptrude.core.math.vec3.new(1, 2, 3)
22
+ * // → getHostApi().call({ method: "core.math.vec3.new", args: [1, 2, 3] })
23
+ * ```
24
+ *
25
+ * Typed at the call site, e.g. `createRpcNamespace<PluginEntityApi>("entity")`.
26
+ * The Proxy is structurally cast to the abstract API type — argument and
27
+ * return types are enforced by that type, while dispatch is dynamic.
28
+ *
29
+ * Every namespace uses this — including `core.math.*` and `core.geom.*`: under
30
+ * the all-handle model there is no in-worker compute; math and geometry are
31
+ * host calls like everything else.
32
+ */
33
+ export function createRpcNamespace<T extends object>(basePath: string): T {
34
+ const build = (path: string): unknown =>
35
+ new Proxy(NOOP, {
36
+ get(_target, prop) {
37
+ // Symbols and `then` must not resolve to a callable proxy, otherwise
38
+ // the namespace would look thenable and break Promise resolution if it
39
+ // ever reached an `await`.
40
+ if (typeof prop !== "string" || prop === "then") return undefined
41
+ return build(`${path}.${prop}`)
42
+ },
43
+ apply(_target, _thisArg, argArray: unknown[]) {
44
+ const payload = {
45
+ method: path,
46
+ args: argArray,
47
+ } as unknown as PluginApiCallPayload<PluginApiMethod>
48
+ return getHostApi().call(payload)
49
+ },
50
+ })
51
+
52
+ return build(basePath) as T
53
+ }
54
+
55
+ /** Proxy target must be callable for the `apply` trap; identity is irrelevant. */
56
+ const NOOP = (): void => {}
@@ -1,5 +0,0 @@
1
- import { PluginArcApi } from "@snaptrude/plugin-core";
2
- export declare class ClientArcApi extends PluginArcApi {
3
- constructor();
4
- }
5
- //# sourceMappingURL=arc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arc.d.ts","sourceRoot":"","sources":["../../../../src/api/core/geom/arc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAErD,qBAAa,YAAa,SAAQ,YAAY;;CAI7C"}
@@ -1,5 +0,0 @@
1
- import { PluginCurveApi } from "@snaptrude/plugin-core";
2
- export declare class ClientCurveApi extends PluginCurveApi {
3
- constructor();
4
- }
5
- //# sourceMappingURL=curve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"curve.d.ts","sourceRoot":"","sources":["../../../../src/api/core/geom/curve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,qBAAa,cAAe,SAAQ,cAAc;;CAIjD"}
@@ -1,17 +0,0 @@
1
- import { PluginGeomApi } from "@snaptrude/plugin-core";
2
- import { ClientLineApi } from "./line";
3
- import { ClientArcApi } from "./arc";
4
- import { ClientCurveApi } from "./curve";
5
- import { ClientProfileApi } from "./profile";
6
- export declare class ClientGeomApi extends PluginGeomApi {
7
- line: ClientLineApi;
8
- arc: ClientArcApi;
9
- curve: ClientCurveApi;
10
- profile: ClientProfileApi;
11
- constructor();
12
- }
13
- export * from "./line";
14
- export * from "./arc";
15
- export * from "./curve";
16
- export * from "./profile";
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/geom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5C,qBAAa,aAAc,SAAQ,aAAa;IACvC,IAAI,EAAE,aAAa,CAAA;IACnB,GAAG,EAAE,YAAY,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;IACrB,OAAO,EAAE,gBAAgB,CAAA;;CASjC;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
@@ -1,5 +0,0 @@
1
- import { PluginLineApi } from "@snaptrude/plugin-core";
2
- export declare class ClientLineApi extends PluginLineApi {
3
- constructor();
4
- }
5
- //# sourceMappingURL=line.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../../src/api/core/geom/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,qBAAa,aAAc,SAAQ,aAAa;;CAI/C"}
@@ -1,7 +0,0 @@
1
- import { PluginProfileApi } from "@snaptrude/plugin-core";
2
- import type { PProfile, PluginProfileFromLinePointsArgs } from "@snaptrude/plugin-core";
3
- export declare class ClientProfileApi extends PluginProfileApi {
4
- constructor();
5
- fromLinePoints(args: PluginProfileFromLinePointsArgs): Promise<PProfile>;
6
- }
7
- //# sourceMappingURL=profile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../src/api/core/geom/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAA;AAGvF,qBAAa,gBAAiB,SAAQ,gBAAgB;;IAKvC,cAAc,CAAC,IAAI,EAAE,+BAA+B,GAAG,OAAO,CAAC,QAAQ,CAAC;CAOtF"}
@@ -1,11 +0,0 @@
1
- import { PluginCoreApi } from "@snaptrude/plugin-core";
2
- import { ClientMathApi } from "./math";
3
- import { ClientGeomApi } from "./geom";
4
- export declare class ClientCoreApi extends PluginCoreApi {
5
- math: ClientMathApi;
6
- geom: ClientGeomApi;
7
- constructor();
8
- }
9
- export * from "./math";
10
- export * from "./geom";
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAEtC,qBAAa,aAAc,SAAQ,aAAa;IACvC,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,aAAa,CAAA;;CAO3B;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA"}
@@ -1,11 +0,0 @@
1
- import { PluginMathApi } from "@snaptrude/plugin-core";
2
- import { ClientVec3Api } from "./vec3";
3
- import { ClientQuatApi } from "./quat";
4
- export declare class ClientMathApi extends PluginMathApi {
5
- vec3: ClientVec3Api;
6
- quat: ClientQuatApi;
7
- constructor();
8
- }
9
- export * from "./vec3";
10
- export * from "./quat";
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/math/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAEtC,qBAAa,aAAc,SAAQ,aAAa;IACvC,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,aAAa,CAAA;;CAO3B;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA"}
@@ -1,5 +0,0 @@
1
- import { PluginQuatApi } from "@snaptrude/plugin-core";
2
- export declare class ClientQuatApi extends PluginQuatApi {
3
- constructor();
4
- }
5
- //# sourceMappingURL=quat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quat.d.ts","sourceRoot":"","sources":["../../../../src/api/core/math/quat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,qBAAa,aAAc,SAAQ,aAAa;;CAI/C"}
@@ -1,5 +0,0 @@
1
- import { PluginVec3Api } from "@snaptrude/plugin-core";
2
- export declare class ClientVec3Api extends PluginVec3Api {
3
- constructor();
4
- }
5
- //# sourceMappingURL=vec3.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vec3.d.ts","sourceRoot":"","sources":["../../../../src/api/core/math/vec3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,qBAAa,aAAc,SAAQ,aAAa;;CAI/C"}
@@ -1,7 +0,0 @@
1
- import { PluginDepartmentApi, PluginDepartmentCreateArgs, PluginDepartmentCreateResult, PluginDepartmentGetAllResult } from "@snaptrude/plugin-core";
2
- export declare class ClientDepartmentApi extends PluginDepartmentApi {
3
- constructor();
4
- create(args: PluginDepartmentCreateArgs): Promise<PluginDepartmentCreateResult>;
5
- getAll(): Promise<PluginDepartmentGetAllResult>;
6
- }
7
- //# sourceMappingURL=department.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"department.d.ts","sourceRoot":"","sources":["../../../src/api/entity/department.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,mBAAoB,SAAQ,mBAAmB;;IAK7C,MAAM,CACjB,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,4BAA4B,CAAC;IAQ3B,MAAM,IAAI,OAAO,CAAC,4BAA4B,CAAC;CAM7D"}
@@ -1,17 +0,0 @@
1
- import { PluginEntityApi } from "@snaptrude/plugin-core";
2
- import { ClientDepartmentApi } from "./department";
3
- import { ClientReferenceLineApi } from "./referenceLine";
4
- import { ClientSpaceApi } from "./space";
5
- import { ClientStoryApi } from "./story";
6
- export declare class ClientEntityApi extends PluginEntityApi {
7
- space: ClientSpaceApi;
8
- story: ClientStoryApi;
9
- referenceLine: ClientReferenceLineApi;
10
- department: ClientDepartmentApi;
11
- constructor();
12
- }
13
- export * from "./department";
14
- export * from "./referenceLine";
15
- export * from "./space";
16
- export * from "./story";
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/entity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC,qBAAa,eAAgB,SAAQ,eAAe;IAC3C,KAAK,EAAE,cAAc,CAAA;IACrB,KAAK,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,sBAAsB,CAAA;IACrC,UAAU,EAAE,mBAAmB,CAAA;;CASvC;AAED,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -1,9 +0,0 @@
1
- import { PluginReferenceLineApi, PluginReferenceLineCreateMultiArgs, PluginReferenceLineCreateMultiResult, PluginReferenceLineGetArgs, PluginReferenceLineGetResult, PluginReferenceLineGetAllResult, PluginReferenceLineDeleteArgs, PluginReferenceLineDeleteResult } from "@snaptrude/plugin-core";
2
- export declare class ClientReferenceLineApi extends PluginReferenceLineApi {
3
- constructor();
4
- createMulti(args: PluginReferenceLineCreateMultiArgs): Promise<PluginReferenceLineCreateMultiResult>;
5
- get(args: PluginReferenceLineGetArgs): Promise<PluginReferenceLineGetResult>;
6
- getAll(): Promise<PluginReferenceLineGetAllResult>;
7
- delete(args: PluginReferenceLineDeleteArgs): Promise<PluginReferenceLineDeleteResult>;
8
- }
9
- //# sourceMappingURL=referenceLine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"referenceLine.d.ts","sourceRoot":"","sources":["../../../src/api/entity/referenceLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kCAAkC,EAClC,oCAAoC,EACpC,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,sBAAuB,SAAQ,sBAAsB;;IAKnD,WAAW,CACtB,IAAI,EAAE,kCAAkC,GACvC,OAAO,CAAC,oCAAoC,CAAC;IAQnC,GAAG,CACd,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,4BAA4B,CAAC;IAQ3B,MAAM,IAAI,OAAO,CAAC,+BAA+B,CAAC;IAOlD,MAAM,CACjB,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,+BAA+B,CAAC;CAO5C"}
@@ -1,11 +0,0 @@
1
- import { PluginSpaceApi, PluginSpaceCreateRectangularArgs, PluginSpaceCreateRectangularResult, PluginSpaceCreateFromProfileArgs, PluginSpaceCreateFromProfileResult, PluginSpaceDeleteArgs, PluginSpaceDeleteResult, PluginSpaceGetArgs, PluginSpaceGetResult, PluginSpaceGetAllResult, PluginSpaceUpdateArgs, PluginSpaceUpdateResult } from "@snaptrude/plugin-core";
2
- export declare class ClientSpaceApi extends PluginSpaceApi {
3
- constructor();
4
- createRectangular({ position, dimensions, }: PluginSpaceCreateRectangularArgs): Promise<PluginSpaceCreateRectangularResult>;
5
- createFromProfile({ profile, extrudeHeight, position, }: PluginSpaceCreateFromProfileArgs): Promise<PluginSpaceCreateFromProfileResult>;
6
- get({ spaceId, properties, }: PluginSpaceGetArgs): Promise<PluginSpaceGetResult>;
7
- getAll(): Promise<PluginSpaceGetAllResult>;
8
- delete({ spaceId, }: PluginSpaceDeleteArgs): Promise<PluginSpaceDeleteResult>;
9
- update({ spaceId, properties, }: PluginSpaceUpdateArgs): Promise<PluginSpaceUpdateResult>;
10
- }
11
- //# sourceMappingURL=space.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/api/entity/space.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gCAAgC,EAChC,kCAAkC,EAClC,gCAAgC,EAChC,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,cAAe,SAAQ,cAAc;;IAKnC,iBAAiB,CAAC,EAC7B,QAAQ,EACR,UAAU,GACX,EAAE,gCAAgC,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAWpE,iBAAiB,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,QAAQ,GACT,EAAE,gCAAgC,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAYpE,GAAG,CAAC,EACf,OAAO,EACP,UAAU,GACX,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAWxC,MAAM,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAO1C,MAAM,CAAC,EAClB,OAAO,GACR,EAAE,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAU9C,MAAM,CAAC,EAClB,OAAO,EACP,UAAU,GACX,EAAE,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAU5D"}
@@ -1,9 +0,0 @@
1
- import { PluginStoryApi, PluginStoryGetArgs, PluginStoryGetResult, PluginStoryGetAllResult, PluginStoryCreateArgs, PluginStoryCreateResult, PluginStoryUpdateArgs, PluginStoryUpdateResult } from "@snaptrude/plugin-core";
2
- export declare class ClientStoryApi extends PluginStoryApi {
3
- constructor();
4
- get({ storyValue, properties, }: PluginStoryGetArgs): Promise<PluginStoryGetResult>;
5
- getAll(): Promise<PluginStoryGetAllResult>;
6
- create({ storyValue, height, }: PluginStoryCreateArgs): Promise<PluginStoryCreateResult>;
7
- update({ storyValue, height, }: PluginStoryUpdateArgs): Promise<PluginStoryUpdateResult>;
8
- }
9
- //# sourceMappingURL=story.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../../../src/api/entity/story.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,cAAe,SAAQ,cAAc;;IAKnC,GAAG,CAAC,EACf,UAAU,EACV,UAAU,GACX,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAWxC,MAAM,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAO1C,MAAM,CAAC,EAClB,UAAU,EACV,MAAM,GACP,EAAE,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAW9C,MAAM,CAAC,EAClB,UAAU,EACV,MAAM,GACP,EAAE,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAU5D"}
@@ -1,3 +0,0 @@
1
- import type { PluginCopyArgs, PluginCopyResult } from "@snaptrude/plugin-core";
2
- export declare function copy(args: PluginCopyArgs): Promise<PluginCopyResult>;
3
- //# sourceMappingURL=copy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../src/api/tools/copy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAG9E,wBAAsB,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAM1E"}
@@ -1,17 +0,0 @@
1
- import { PluginToolsApi } from "@snaptrude/plugin-core";
2
- import type { PluginCopyArgs, PluginCopyResult, PluginOffsetArgs, PluginOffsetResult } from "@snaptrude/plugin-core";
3
- import { ClientSelectionApi } from "./selection";
4
- import { ClientTransformApi } from "./transform";
5
- import { ClientMaterialApi } from "./material";
6
- export declare class ClientToolsApi extends PluginToolsApi {
7
- selection: ClientSelectionApi;
8
- transform: ClientTransformApi;
9
- material: ClientMaterialApi;
10
- constructor();
11
- copy(args: PluginCopyArgs): Promise<PluginCopyResult>;
12
- offset(args: PluginOffsetArgs): Promise<PluginOffsetResult>;
13
- }
14
- export * from "./selection";
15
- export * from "./transform";
16
- export * from "./material";
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAI9C,qBAAa,cAAe,SAAQ,cAAc;IACzC,SAAS,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,kBAAkB,CAAA;IAC7B,QAAQ,EAAE,iBAAiB,CAAA;;IAQrB,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrD,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAGzE;AAED,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
@@ -1,6 +0,0 @@
1
- import { PluginMaterialApi, PluginMaterialArgs } from "@snaptrude/plugin-core";
2
- export declare class ClientMaterialApi extends PluginMaterialApi {
3
- constructor();
4
- apply({ materialName, componentIds, }: PluginMaterialArgs): Promise<void>;
5
- }
6
- //# sourceMappingURL=material.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/api/tools/material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAG9E,qBAAa,iBAAkB,SAAQ,iBAAiB;;IAKzC,KAAK,CAAC,EACjB,YAAY,EACZ,YAAY,GACb,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAUtC"}
@@ -1,3 +0,0 @@
1
- import type { PluginOffsetArgs, PluginOffsetResult } from "@snaptrude/plugin-core";
2
- export declare function offset(args: PluginOffsetArgs): Promise<PluginOffsetResult>;
3
- //# sourceMappingURL=offset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offset.d.ts","sourceRoot":"","sources":["../../../src/api/tools/offset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,wBAAwB,CAAA;AAG/B,wBAAsB,MAAM,CAC1B,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAM7B"}
@@ -1,6 +0,0 @@
1
- import { PluginSelectionApi, PluginSelectionGetResult } from "@snaptrude/plugin-core";
2
- export declare class ClientSelectionApi extends PluginSelectionApi {
3
- constructor();
4
- get(): Promise<PluginSelectionGetResult>;
5
- }
6
- //# sourceMappingURL=selection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/api/tools/selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAGrF,qBAAa,kBAAmB,SAAQ,kBAAkB;;IAK3C,GAAG,IAAI,OAAO,CAAC,wBAAwB,CAAC;CAMtD"}
@@ -1,7 +0,0 @@
1
- import { PluginTransformApi, PluginMoveArgs, PluginRotateArgs } from "@snaptrude/plugin-core";
2
- export declare class ClientTransformApi extends PluginTransformApi {
3
- constructor();
4
- move({ componentIds, displacement, }: PluginMoveArgs): Promise<void>;
5
- rotate({ componentIds, angle, axis, pivot, }: PluginRotateArgs): Promise<void>;
6
- }
7
- //# sourceMappingURL=transform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/api/tools/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EACjB,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,kBAAmB,SAAQ,kBAAkB;;IAK3C,IAAI,CAAC,EAChB,YAAY,EACZ,YAAY,GACb,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAWpB,MAAM,CAAC,EAClB,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,KAAK,GACN,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAYpC"}
@@ -1,7 +0,0 @@
1
- import { PluginUnitsApi, PluginUnitsConvertFromArgs, PluginUnitsConvertFromResult, PluginUnitsConvertToArgs, PluginUnitsConvertToResult } from "@snaptrude/plugin-core";
2
- export declare class ClientUnitsApi extends PluginUnitsApi {
3
- constructor();
4
- convertFrom(args: PluginUnitsConvertFromArgs): Promise<PluginUnitsConvertFromResult>;
5
- convertTo(args: PluginUnitsConvertToArgs): Promise<PluginUnitsConvertToResult>;
6
- }
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/units/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,cAAe,SAAQ,cAAc;;IAKnC,WAAW,CACtB,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,4BAA4B,CAAC;IAQ3B,SAAS,CACpB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,0BAA0B,CAAC;CAOvC"}
@@ -1,7 +0,0 @@
1
- import { PluginArcApi } from "@snaptrude/plugin-core"
2
-
3
- export class ClientArcApi extends PluginArcApi {
4
- constructor() {
5
- super()
6
- }
7
- }
@@ -1,7 +0,0 @@
1
- import { PluginCurveApi } from "@snaptrude/plugin-core"
2
-
3
- export class ClientCurveApi extends PluginCurveApi {
4
- constructor() {
5
- super()
6
- }
7
- }
@@ -1,25 +0,0 @@
1
- import { PluginGeomApi } from "@snaptrude/plugin-core"
2
- import { ClientLineApi } from "./line"
3
- import { ClientArcApi } from "./arc"
4
- import { ClientCurveApi } from "./curve"
5
- import { ClientProfileApi } from "./profile"
6
-
7
- export class ClientGeomApi extends PluginGeomApi {
8
- public line: ClientLineApi
9
- public arc: ClientArcApi
10
- public curve: ClientCurveApi
11
- public profile: ClientProfileApi
12
-
13
- constructor() {
14
- super()
15
- this.line = new ClientLineApi()
16
- this.arc = new ClientArcApi()
17
- this.curve = new ClientCurveApi()
18
- this.profile = new ClientProfileApi()
19
- }
20
- }
21
-
22
- export * from "./line"
23
- export * from "./arc"
24
- export * from "./curve"
25
- export * from "./profile"
@@ -1,7 +0,0 @@
1
- import { PluginLineApi } from "@snaptrude/plugin-core"
2
-
3
- export class ClientLineApi extends PluginLineApi {
4
- constructor() {
5
- super()
6
- }
7
- }
@@ -1,17 +0,0 @@
1
- import { PluginProfileApi } from "@snaptrude/plugin-core"
2
- import type { PProfile, PluginProfileFromLinePointsArgs } from "@snaptrude/plugin-core"
3
- import { getHostApi } from "../../../host-api"
4
-
5
- export class ClientProfileApi extends PluginProfileApi {
6
- constructor() {
7
- super()
8
- }
9
-
10
- public async fromLinePoints(args: PluginProfileFromLinePointsArgs): Promise<PProfile> {
11
- const hostApi = getHostApi()
12
- return hostApi.call({
13
- method: "core.geom.profile.fromLinePoints",
14
- args,
15
- })
16
- }
17
- }
@@ -1,17 +0,0 @@
1
- import { PluginCoreApi } from "@snaptrude/plugin-core"
2
- import { ClientMathApi } from "./math"
3
- import { ClientGeomApi } from "./geom"
4
-
5
- export class ClientCoreApi extends PluginCoreApi {
6
- public math: ClientMathApi
7
- public geom: ClientGeomApi
8
-
9
- constructor() {
10
- super()
11
- this.math = new ClientMathApi()
12
- this.geom = new ClientGeomApi()
13
- }
14
- }
15
-
16
- export * from "./math"
17
- export * from "./geom"
@@ -1,17 +0,0 @@
1
- import { PluginMathApi } from "@snaptrude/plugin-core"
2
- import { ClientVec3Api } from "./vec3"
3
- import { ClientQuatApi } from "./quat"
4
-
5
- export class ClientMathApi extends PluginMathApi {
6
- public vec3: ClientVec3Api
7
- public quat: ClientQuatApi
8
-
9
- constructor() {
10
- super()
11
- this.vec3 = new ClientVec3Api()
12
- this.quat = new ClientQuatApi()
13
- }
14
- }
15
-
16
- export * from "./vec3"
17
- export * from "./quat"
@@ -1,7 +0,0 @@
1
- import { PluginQuatApi } from "@snaptrude/plugin-core"
2
-
3
- export class ClientQuatApi extends PluginQuatApi {
4
- constructor() {
5
- super()
6
- }
7
- }
@@ -1,7 +0,0 @@
1
- import { PluginVec3Api } from "@snaptrude/plugin-core"
2
-
3
- export class ClientVec3Api extends PluginVec3Api {
4
- constructor() {
5
- super()
6
- }
7
- }
@@ -1,30 +0,0 @@
1
- import {
2
- PluginDepartmentApi,
3
- PluginDepartmentCreateArgs,
4
- PluginDepartmentCreateResult,
5
- PluginDepartmentGetAllResult,
6
- } from "@snaptrude/plugin-core"
7
- import { getHostApi } from "../../host-api"
8
-
9
- export class ClientDepartmentApi extends PluginDepartmentApi {
10
- constructor() {
11
- super()
12
- }
13
-
14
- public async create(
15
- args: PluginDepartmentCreateArgs
16
- ): Promise<PluginDepartmentCreateResult> {
17
- const hostApi = getHostApi()
18
- return hostApi.call({
19
- method: "entity.department.create",
20
- args,
21
- })
22
- }
23
-
24
- public async getAll(): Promise<PluginDepartmentGetAllResult> {
25
- const hostApi = getHostApi()
26
- return hostApi.call({
27
- method: "entity.department.getAll",
28
- })
29
- }
30
- }
@@ -1,25 +0,0 @@
1
- import { PluginEntityApi } from "@snaptrude/plugin-core"
2
- import { ClientDepartmentApi } from "./department"
3
- import { ClientReferenceLineApi } from "./referenceLine"
4
- import { ClientSpaceApi } from "./space"
5
- import { ClientStoryApi } from "./story"
6
-
7
- export class ClientEntityApi extends PluginEntityApi {
8
- public space: ClientSpaceApi
9
- public story: ClientStoryApi
10
- public referenceLine: ClientReferenceLineApi
11
- public department: ClientDepartmentApi
12
-
13
- constructor() {
14
- super()
15
- this.space = new ClientSpaceApi()
16
- this.story = new ClientStoryApi()
17
- this.referenceLine = new ClientReferenceLineApi()
18
- this.department = new ClientDepartmentApi()
19
- }
20
- }
21
-
22
- export * from "./department"
23
- export * from "./referenceLine"
24
- export * from "./space"
25
- export * from "./story"