@snaptrude/plugin-client 0.2.4 → 0.2.5

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 (52) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/api/core/geom/arc.d.ts +5 -0
  3. package/dist/api/core/geom/arc.d.ts.map +1 -0
  4. package/dist/api/core/geom/curve.d.ts +5 -0
  5. package/dist/api/core/geom/curve.d.ts.map +1 -0
  6. package/dist/api/core/geom/index.d.ts +17 -0
  7. package/dist/api/core/geom/index.d.ts.map +1 -0
  8. package/dist/api/core/geom/line.d.ts +5 -0
  9. package/dist/api/core/geom/line.d.ts.map +1 -0
  10. package/dist/api/core/geom/profile.d.ts +7 -0
  11. package/dist/api/core/geom/profile.d.ts.map +1 -0
  12. package/dist/api/core/index.d.ts +11 -0
  13. package/dist/api/core/index.d.ts.map +1 -0
  14. package/dist/api/core/math/index.d.ts +11 -0
  15. package/dist/api/core/math/index.d.ts.map +1 -0
  16. package/dist/api/core/math/quat.d.ts +5 -0
  17. package/dist/api/core/math/quat.d.ts.map +1 -0
  18. package/dist/api/core/math/vec3.d.ts +5 -0
  19. package/dist/api/core/math/vec3.d.ts.map +1 -0
  20. package/dist/api/entity/buildableEnvelope.d.ts +7 -0
  21. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  22. package/dist/api/entity/department.d.ts +7 -0
  23. package/dist/api/entity/department.d.ts.map +1 -0
  24. package/dist/api/entity/index.d.ts +20 -0
  25. package/dist/api/entity/index.d.ts.map +1 -0
  26. package/dist/api/entity/referenceLine.d.ts +9 -0
  27. package/dist/api/entity/referenceLine.d.ts.map +1 -0
  28. package/dist/api/entity/space.d.ts +12 -0
  29. package/dist/api/entity/space.d.ts.map +1 -0
  30. package/dist/api/entity/story.d.ts +9 -0
  31. package/dist/api/entity/story.d.ts.map +1 -0
  32. package/dist/api/index.d.ts +19 -0
  33. package/dist/api/index.d.ts.map +1 -0
  34. package/dist/api/tools/copy.d.ts +3 -0
  35. package/dist/api/tools/copy.d.ts.map +1 -0
  36. package/dist/api/tools/index.d.ts +14 -0
  37. package/dist/api/tools/index.d.ts.map +1 -0
  38. package/dist/api/tools/offset.d.ts +3 -0
  39. package/dist/api/tools/offset.d.ts.map +1 -0
  40. package/dist/api/tools/selection.d.ts +6 -0
  41. package/dist/api/tools/selection.d.ts.map +1 -0
  42. package/dist/api/tools/transform.d.ts +7 -0
  43. package/dist/api/tools/transform.d.ts.map +1 -0
  44. package/dist/api/units/index.d.ts +7 -0
  45. package/dist/api/units/index.d.ts.map +1 -0
  46. package/dist/host-api.d.ts +11 -0
  47. package/dist/host-api.d.ts.map +1 -0
  48. package/dist/index.d.ts +11 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/plugin-worker.d.ts +54 -0
  51. package/dist/plugin-worker.d.ts.map +1 -0
  52. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @snaptrude/plugin-client
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Restore declaration files in published plugin packages.
8
+ - Updated dependencies
9
+ - @snaptrude/plugin-core@0.2.5
10
+
3
11
  ## 0.2.4
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,5 @@
1
+ import { PluginArcApi } from "@snaptrude/plugin-core";
2
+ export declare class ClientArcApi extends PluginArcApi {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=arc.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ import { PluginCurveApi } from "@snaptrude/plugin-core";
2
+ export declare class ClientCurveApi extends PluginCurveApi {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=curve.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ import { PluginLineApi } from "@snaptrude/plugin-core";
2
+ export declare class ClientLineApi extends PluginLineApi {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=line.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ import { PluginQuatApi } from "@snaptrude/plugin-core";
2
+ export declare class ClientQuatApi extends PluginQuatApi {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=quat.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ import { PluginVec3Api } from "@snaptrude/plugin-core";
2
+ export declare class ClientVec3Api extends PluginVec3Api {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=vec3.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
1
+ import { PluginBuildableEnvelopeCreateArgs, PluginBuildableEnvelopeCreateResult, PluginBuildableEnvelopeUpdateArgs, PluginBuildableEnvelopeUpdateResult, PluginBuildableEnvelopeApi } from "@snaptrude/plugin-core";
2
+ export declare class ClientBuildableEnvelopeApi extends PluginBuildableEnvelopeApi {
3
+ constructor();
4
+ create(args: PluginBuildableEnvelopeCreateArgs): Promise<PluginBuildableEnvelopeCreateResult>;
5
+ update(args: PluginBuildableEnvelopeUpdateArgs): Promise<PluginBuildableEnvelopeUpdateResult>;
6
+ }
7
+ //# sourceMappingURL=buildableEnvelope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildableEnvelope.d.ts","sourceRoot":"","sources":["../../../src/api/entity/buildableEnvelope.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,mCAAmC,EACnC,iCAAiC,EACjC,mCAAmC,EACnC,0BAA0B,EAC3B,MAAM,wBAAwB,CAAA;AAG/B,qBAAa,0BAA2B,SAAQ,0BAA0B;;IAK3D,MAAM,CACjB,IAAI,EAAE,iCAAiC,GACtC,OAAO,CAAC,mCAAmC,CAAC;IAQlC,MAAM,CACjB,IAAI,EAAE,iCAAiC,GACtC,OAAO,CAAC,mCAAmC,CAAC;CAOhD"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,20 @@
1
+ import { PluginEntityApi } from "@snaptrude/plugin-core";
2
+ import { ClientBuildableEnvelopeApi } from "./buildableEnvelope";
3
+ import { ClientDepartmentApi } from "./department";
4
+ import { ClientReferenceLineApi } from "./referenceLine";
5
+ import { ClientSpaceApi } from "./space";
6
+ import { ClientStoryApi } from "./story";
7
+ export declare class ClientEntityApi extends PluginEntityApi {
8
+ space: ClientSpaceApi;
9
+ story: ClientStoryApi;
10
+ referenceLine: ClientReferenceLineApi;
11
+ department: ClientDepartmentApi;
12
+ buildableEnvelope: ClientBuildableEnvelopeApi;
13
+ constructor();
14
+ }
15
+ export * from "./buildableEnvelope";
16
+ export * from "./department";
17
+ export * from "./referenceLine";
18
+ export * from "./space";
19
+ export * from "./story";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAChE,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;IAC/B,iBAAiB,EAAE,0BAA0B,CAAA;;CAUrD;AAED,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,12 @@
1
+ import { PluginSpaceApi, PluginSpaceCreateRectangularArgs, PluginSpaceCreateRectangularResult, PluginSpaceCreateFromProfileArgs, PluginSpaceCreateFromProfileResult, PluginSpaceDeleteArgs, PluginSpaceDeleteResult, PluginSpaceGetArgs, PluginSpaceGetResult, PluginSpaceGetAllResult, PluginSpaceUpdateGeometryFromProfileArgs, PluginSpaceUpdateGeometryFromProfileResult, 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, innerProfiles, extrudeHeight, position, }: PluginSpaceCreateFromProfileArgs): Promise<PluginSpaceCreateFromProfileResult>;
6
+ updateGeometryFromProfile({ spaceId, profile, extrudeHeight, }: PluginSpaceUpdateGeometryFromProfileArgs): Promise<PluginSpaceUpdateGeometryFromProfileResult>;
7
+ get({ spaceId, properties, }: PluginSpaceGetArgs): Promise<PluginSpaceGetResult>;
8
+ getAll(): Promise<PluginSpaceGetAllResult>;
9
+ delete({ spaceId, }: PluginSpaceDeleteArgs): Promise<PluginSpaceDeleteResult>;
10
+ update({ spaceId, properties, }: PluginSpaceUpdateArgs): Promise<PluginSpaceUpdateResult>;
11
+ }
12
+ //# sourceMappingURL=space.d.ts.map
@@ -0,0 +1 @@
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,wCAAwC,EACxC,0CAA0C,EAC1C,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,aAAa,EACb,QAAQ,GACT,EAAE,gCAAgC,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAapE,yBAAyB,CAAC,EACrC,OAAO,EACP,OAAO,EACP,aAAa,GACd,EAAE,wCAAwC,GAAG,OAAO,CAAC,0CAA0C,CAAC;IAYpF,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"}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,19 @@
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";
6
+ export declare class ClientPluginApi extends PluginApi {
7
+ private static instance;
8
+ core: ClientCoreApi;
9
+ tools: ClientToolsApi;
10
+ entity: ClientEntityApi;
11
+ units: ClientUnitsApi;
12
+ private constructor();
13
+ static getInstance(): ClientPluginApi;
14
+ }
15
+ export * from "./core";
16
+ export * from "./entity";
17
+ export * from "./tools";
18
+ export * from "./units";
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,qBAAa,eAAgB,SAAQ,SAAS;IAC5C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;IAEjC,IAAI,EAAE,aAAa,CAAA;IACnB,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,cAAc,CAAA;IAE5B,OAAO;IAQP,MAAM,CAAC,WAAW,IAAI,eAAe;CAMtC;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { PluginCopyArgs, PluginCopyResult } from "@snaptrude/plugin-core";
2
+ export declare function copy(args: PluginCopyArgs): Promise<PluginCopyResult>;
3
+ //# sourceMappingURL=copy.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,14 @@
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
+ export declare class ClientToolsApi extends PluginToolsApi {
6
+ selection: ClientSelectionApi;
7
+ transform: ClientTransformApi;
8
+ constructor();
9
+ copy(args: PluginCopyArgs): Promise<PluginCopyResult>;
10
+ offset(args: PluginOffsetArgs): Promise<PluginOffsetResult>;
11
+ }
12
+ export * from "./selection";
13
+ export * from "./transform";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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;AAIhD,qBAAa,cAAe,SAAQ,cAAc;IACzC,SAAS,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,kBAAkB,CAAA;;IAQvB,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"}
@@ -0,0 +1,3 @@
1
+ import type { PluginOffsetArgs, PluginOffsetResult } from "@snaptrude/plugin-core";
2
+ export declare function offset(args: PluginOffsetArgs): Promise<PluginOffsetResult>;
3
+ //# sourceMappingURL=offset.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,11 @@
1
+ import * as Comlink from "comlink";
2
+ import type { PluginApiMethod, PluginApiCallPayload, PluginApiCallWrappedResult, PluginApiCallResult } from "@snaptrude/plugin-core";
3
+ export interface HostApi {
4
+ call<M extends PluginApiMethod>(payload: PluginApiCallPayload<M>): Promise<PluginApiCallWrappedResult<M>>;
5
+ }
6
+ export interface HostApiWrapped {
7
+ call<M extends PluginApiMethod>(payload: PluginApiCallPayload<M>): Promise<PluginApiCallResult<M>>;
8
+ }
9
+ export declare function createHostApi(endpoint?: Comlink.Endpoint): HostApi;
10
+ export declare function getHostApi(): HostApiWrapped;
11
+ //# sourceMappingURL=host-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-api.d.ts","sourceRoot":"","sources":["../src/host-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,CAAC,SAAS,eAAe,EAC5B,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,CAAC,SAAS,eAAe,EAC5B,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAA;CACnC;AAED,wBAAgB,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAIlE;AAID,wBAAgB,UAAU,IAAI,cAAc,CAkB3C"}
@@ -0,0 +1,11 @@
1
+ import { ClientPluginApi } from "./api";
2
+ export * from "./api";
3
+ export * from "./host-api";
4
+ export * from "./plugin-worker";
5
+ /**
6
+ * The Snaptrude plugin client API.
7
+ *
8
+ * The main entry point for plugins to interact with the Snaptrude platform.
9
+ */
10
+ export declare const snaptrude: ClientPluginApi;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAEvC,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAE/B;;;;GAIG;AACH,eAAO,MAAM,SAAS,iBAAgC,CAAA"}
@@ -0,0 +1,54 @@
1
+ export interface UIMessage {
2
+ action: string;
3
+ payload: unknown;
4
+ }
5
+ /**
6
+ * Base class for Snaptrude plugin workers.
7
+ *
8
+ * Handles Comlink wiring, host communication, and the standard lifecycle
9
+ * methods (`init`, `destroy`, `ping`, `onUIMessage`). Subclass this and
10
+ * override only the methods you need — then call `start()` to expose the
11
+ * worker API.
12
+ *
13
+ * The plugin ID is received automatically from the host during
14
+ * initialization — no need to pass it manually.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * import { PluginWorker } from "@snaptrude/plugin-client";
19
+ *
20
+ * class MyPlugin extends PluginWorker {
21
+ * async onUIMessage(message: UIMessage) {
22
+ * // handle messages from the UI panel
23
+ * }
24
+ * }
25
+ *
26
+ * new MyPlugin().start();
27
+ * ```
28
+ */
29
+ export declare abstract class PluginWorker {
30
+ protected pluginId: string;
31
+ private hostAPI;
32
+ constructor();
33
+ protected sendToUI(action: string, payload: unknown): void;
34
+ /**
35
+ * Signal the host that this plugin has finished its work and should be
36
+ * stopped. Use this in headless (UI-less) plugins that run a task and
37
+ * self-terminate.
38
+ */
39
+ protected complete(): void;
40
+ init(): Promise<void>;
41
+ destroy(): Promise<void>;
42
+ ping(): Promise<string>;
43
+ onUIMessage(_message: UIMessage): Promise<void>;
44
+ /**
45
+ * Expose the worker API via Comlink and start listening.
46
+ * Call this once after constructing the plugin instance.
47
+ *
48
+ * The host calls `init(config)` with `{ pluginId }`,
49
+ * which is captured here to set `this.pluginId` before the
50
+ * subclass's `init()` runs.
51
+ */
52
+ start(): void;
53
+ }
54
+ //# sourceMappingURL=plugin-worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-worker.d.ts","sourceRoot":"","sources":["../src/plugin-worker.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;CACjB;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,8BAAsB,YAAY;IAChC,SAAS,CAAC,QAAQ,EAAG,MAAM,CAAA;IAC3B,OAAO,CAAC,OAAO,CAAyC;;IAQxD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAI1D;;;;OAIG;IACH,SAAS,CAAC,QAAQ,IAAI,IAAI;IAIpB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvB,WAAW,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD;;;;;;;OAOG;IACH,KAAK,IAAI,IAAI;CAed"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snaptrude/plugin-client",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "comlink": "^4.4.2",
21
- "@snaptrude/plugin-core": "0.2.4"
21
+ "@snaptrude/plugin-core": "0.2.5"
22
22
  },
23
23
  "devDependencies": {
24
24
  "tsup": "^8.5.1",