@snaptrude/plugin-core 0.2.1 → 0.2.2
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/AGENTS.md +30 -26
- package/CHANGELOG.md +7 -1
- package/dist/api/entity/buildableEnvelope.d.ts +233 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/index.d.ts +5 -0
- package/dist/api/entity/index.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +3 -155
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +2 -2
- package/dist/index.cjs +238 -164
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +230 -162
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/entity/buildableEnvelope.ts +277 -0
- package/src/api/entity/index.ts +5 -0
- package/src/api/entity/space.ts +1 -95
package/dist/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var PluginVec3Api = class {
|
|
|
17
17
|
* // { x: 1, y: 2, z: 3 }
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
new(x, y,
|
|
21
|
-
return { x, y, z:
|
|
20
|
+
new(x, y, z17) {
|
|
21
|
+
return { x, y, z: z17 };
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Add two vectors component-wise.
|
|
@@ -196,8 +196,8 @@ var PluginQuatApi = class {
|
|
|
196
196
|
* @param w - The W (scalar) component
|
|
197
197
|
* @returns A new {@linkcode PQuat}
|
|
198
198
|
*/
|
|
199
|
-
new(x, y,
|
|
200
|
-
return { x, y, z:
|
|
199
|
+
new(x, y, z17, w) {
|
|
200
|
+
return { x, y, z: z17, w };
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
* Create an identity quaternion representing no rotation.
|
|
@@ -241,13 +241,13 @@ var PluginQuatApi = class {
|
|
|
241
241
|
* @param z - Rotation around Z axis in **radians**
|
|
242
242
|
* @returns A new {@linkcode PQuat}
|
|
243
243
|
*/
|
|
244
|
-
fromEuler(x, y,
|
|
244
|
+
fromEuler(x, y, z17) {
|
|
245
245
|
const cx = Math.cos(x / 2);
|
|
246
246
|
const sx = Math.sin(x / 2);
|
|
247
247
|
const cy = Math.cos(y / 2);
|
|
248
248
|
const sy = Math.sin(y / 2);
|
|
249
|
-
const cz = Math.cos(
|
|
250
|
-
const sz = Math.sin(
|
|
249
|
+
const cz = Math.cos(z17 / 2);
|
|
250
|
+
const sz = Math.sin(z17 / 2);
|
|
251
251
|
return {
|
|
252
252
|
x: sx * cy * cz + cx * sy * sz,
|
|
253
253
|
y: cx * sy * cz - sx * cy * sz,
|
|
@@ -578,91 +578,155 @@ var PluginCoreApi = class {
|
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
|
|
581
|
-
// src/api/entity/
|
|
581
|
+
// src/api/entity/buildableEnvelope.ts
|
|
582
582
|
import * as z7 from "zod";
|
|
583
|
+
var PluginBuildableEnvelopeApi = class {
|
|
584
|
+
constructor() {
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
var PluginBuildableEnvelopePolygonVertex = z7.union([
|
|
588
|
+
z7.object({ x: z7.number().finite(), z: z7.number().finite() }).strict(),
|
|
589
|
+
z7.tuple([z7.number().finite(), z7.number().finite()])
|
|
590
|
+
]);
|
|
591
|
+
var PluginBuildableEnvelopeVerticalCap = z7.discriminatedUnion("kind", [
|
|
592
|
+
z7.object({
|
|
593
|
+
kind: z7.literal("max_height"),
|
|
594
|
+
maxHeight: z7.number().finite().positive()
|
|
595
|
+
}).strict(),
|
|
596
|
+
z7.object({
|
|
597
|
+
kind: z7.literal("max_floors"),
|
|
598
|
+
maxFloors: z7.number().finite().int().positive()
|
|
599
|
+
}).strict()
|
|
600
|
+
]);
|
|
601
|
+
var PluginBuildableEnvelopeSetbackTier = z7.object({
|
|
602
|
+
aboveHeight: z7.number().finite().nonnegative(),
|
|
603
|
+
front: z7.number().finite().nonnegative(),
|
|
604
|
+
side: z7.number().finite().nonnegative(),
|
|
605
|
+
rear: z7.number().finite().nonnegative()
|
|
606
|
+
}).strict();
|
|
607
|
+
function refineSetbackTiers(args, ctx) {
|
|
608
|
+
const tiers = args.setbacks;
|
|
609
|
+
if (tiers.length === 0) return;
|
|
610
|
+
if (tiers[0].aboveHeight !== 0) {
|
|
611
|
+
ctx.addIssue({
|
|
612
|
+
code: z7.ZodIssueCode.custom,
|
|
613
|
+
path: ["setbacks", 0, "aboveHeight"],
|
|
614
|
+
message: "Ground tier required: setbacks[0].aboveHeight must be 0."
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
for (let i = 1; i < tiers.length; i++) {
|
|
618
|
+
if (!(tiers[i].aboveHeight > tiers[i - 1].aboveHeight)) {
|
|
619
|
+
ctx.addIssue({
|
|
620
|
+
code: z7.ZodIssueCode.custom,
|
|
621
|
+
path: ["setbacks", i, "aboveHeight"],
|
|
622
|
+
message: "Setback tiers must be ordered by strictly increasing aboveHeight."
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
var PluginBuildableEnvelopeCreateArgs = z7.object({
|
|
628
|
+
sitePolygon: z7.array(PluginBuildableEnvelopePolygonVertex).min(3),
|
|
629
|
+
lengthUnit: z7.union([z7.literal("ft"), z7.literal("m")]),
|
|
630
|
+
setbacks: z7.array(PluginBuildableEnvelopeSetbackTier).min(1),
|
|
631
|
+
verticalCap: PluginBuildableEnvelopeVerticalCap,
|
|
632
|
+
floorToFloor: z7.number().finite().positive(),
|
|
633
|
+
farRatio: z7.number().finite().positive().optional(),
|
|
634
|
+
lotCoverageMaxPct: z7.number().finite().min(0).max(100).optional()
|
|
635
|
+
}).strict().superRefine(refineSetbackTiers);
|
|
636
|
+
var PluginBuildableEnvelopeCreateResult = z7.object({
|
|
637
|
+
buildableEnvelopeId: z7.string().min(1)
|
|
638
|
+
}).strict();
|
|
639
|
+
var PluginBuildableEnvelopeUpdateArgs = z7.object({
|
|
640
|
+
buildableEnvelopeId: z7.string().min(1),
|
|
641
|
+
sitePolygon: z7.array(PluginBuildableEnvelopePolygonVertex).min(3),
|
|
642
|
+
lengthUnit: z7.union([z7.literal("ft"), z7.literal("m")]),
|
|
643
|
+
setbacks: z7.array(PluginBuildableEnvelopeSetbackTier).min(1),
|
|
644
|
+
verticalCap: PluginBuildableEnvelopeVerticalCap,
|
|
645
|
+
floorToFloor: z7.number().finite().positive(),
|
|
646
|
+
farRatio: z7.number().finite().positive().optional(),
|
|
647
|
+
lotCoverageMaxPct: z7.number().finite().min(0).max(100).optional()
|
|
648
|
+
}).strict().superRefine(refineSetbackTiers);
|
|
649
|
+
var PluginBuildableEnvelopeUpdateResult = z7.object({
|
|
650
|
+
buildableEnvelopeId: z7.string().min(1)
|
|
651
|
+
}).strict();
|
|
652
|
+
|
|
653
|
+
// src/api/entity/department.ts
|
|
654
|
+
import * as z8 from "zod";
|
|
583
655
|
var PluginDepartmentApi = class {
|
|
584
656
|
constructor() {
|
|
585
657
|
}
|
|
586
658
|
};
|
|
587
|
-
var PluginDepartmentCreateArgs =
|
|
588
|
-
name:
|
|
589
|
-
color:
|
|
659
|
+
var PluginDepartmentCreateArgs = z8.object({
|
|
660
|
+
name: z8.string(),
|
|
661
|
+
color: z8.string()
|
|
590
662
|
});
|
|
591
|
-
var PluginDepartmentCreateResult =
|
|
592
|
-
departmentId:
|
|
663
|
+
var PluginDepartmentCreateResult = z8.object({
|
|
664
|
+
departmentId: z8.string()
|
|
593
665
|
});
|
|
594
|
-
var PluginDepartmentEntry =
|
|
595
|
-
id:
|
|
596
|
-
name:
|
|
597
|
-
color:
|
|
666
|
+
var PluginDepartmentEntry = z8.object({
|
|
667
|
+
id: z8.string(),
|
|
668
|
+
name: z8.string(),
|
|
669
|
+
color: z8.string()
|
|
598
670
|
});
|
|
599
|
-
var PluginDepartmentGetAllResult =
|
|
600
|
-
departments:
|
|
671
|
+
var PluginDepartmentGetAllResult = z8.object({
|
|
672
|
+
departments: z8.array(PluginDepartmentEntry)
|
|
601
673
|
});
|
|
602
674
|
|
|
603
675
|
// src/api/entity/referenceLine.ts
|
|
604
|
-
import * as
|
|
676
|
+
import * as z9 from "zod";
|
|
605
677
|
var PluginReferenceLineApi = class {
|
|
606
678
|
constructor() {
|
|
607
679
|
}
|
|
608
680
|
};
|
|
609
|
-
var PluginReferenceLineCreateMultiArgs =
|
|
681
|
+
var PluginReferenceLineCreateMultiArgs = z9.object({
|
|
610
682
|
profile: PProfile
|
|
611
683
|
});
|
|
612
|
-
var PluginReferenceLineCreateMultiResult =
|
|
613
|
-
referenceLineIds:
|
|
684
|
+
var PluginReferenceLineCreateMultiResult = z9.object({
|
|
685
|
+
referenceLineIds: z9.array(z9.string())
|
|
614
686
|
});
|
|
615
|
-
var PluginReferenceLineGetProperty =
|
|
687
|
+
var PluginReferenceLineGetProperty = z9.enum([
|
|
616
688
|
"curve"
|
|
617
689
|
]);
|
|
618
|
-
var PluginReferenceLineGetArgs =
|
|
619
|
-
referenceLineId:
|
|
620
|
-
properties:
|
|
690
|
+
var PluginReferenceLineGetArgs = z9.object({
|
|
691
|
+
referenceLineId: z9.string(),
|
|
692
|
+
properties: z9.array(PluginReferenceLineGetProperty)
|
|
621
693
|
});
|
|
622
|
-
var PluginReferenceLineGetResult =
|
|
694
|
+
var PluginReferenceLineGetResult = z9.object({
|
|
623
695
|
curve: PCurve
|
|
624
696
|
}).partial();
|
|
625
|
-
var PluginReferenceLineGetAllResult =
|
|
626
|
-
referenceLineIds:
|
|
697
|
+
var PluginReferenceLineGetAllResult = z9.object({
|
|
698
|
+
referenceLineIds: z9.array(z9.string())
|
|
627
699
|
});
|
|
628
|
-
var PluginReferenceLineDeleteArgs =
|
|
629
|
-
referenceLineId:
|
|
700
|
+
var PluginReferenceLineDeleteArgs = z9.object({
|
|
701
|
+
referenceLineId: z9.string()
|
|
630
702
|
});
|
|
631
703
|
|
|
632
704
|
// src/api/entity/space.ts
|
|
633
|
-
import * as
|
|
705
|
+
import * as z10 from "zod";
|
|
634
706
|
var PluginSpaceApi = class {
|
|
635
707
|
constructor() {
|
|
636
708
|
}
|
|
637
709
|
};
|
|
638
|
-
var PluginSpaceCreateRectangularArgs =
|
|
710
|
+
var PluginSpaceCreateRectangularArgs = z10.object({
|
|
639
711
|
position: PVec3,
|
|
640
|
-
dimensions:
|
|
641
|
-
width:
|
|
642
|
-
height:
|
|
643
|
-
depth:
|
|
712
|
+
dimensions: z10.object({
|
|
713
|
+
width: z10.number(),
|
|
714
|
+
height: z10.number(),
|
|
715
|
+
depth: z10.number()
|
|
644
716
|
})
|
|
645
717
|
});
|
|
646
|
-
var PluginSpaceCreateRectangularResult =
|
|
647
|
-
spaceId:
|
|
718
|
+
var PluginSpaceCreateRectangularResult = z10.object({
|
|
719
|
+
spaceId: z10.string()
|
|
648
720
|
});
|
|
649
|
-
var PluginSpaceCreateFromProfileArgs =
|
|
721
|
+
var PluginSpaceCreateFromProfileArgs = z10.object({
|
|
650
722
|
profile: PProfile,
|
|
651
|
-
extrudeHeight:
|
|
723
|
+
extrudeHeight: z10.number(),
|
|
652
724
|
position: PVec3
|
|
653
725
|
});
|
|
654
|
-
var PluginSpaceCreateFromProfileResult =
|
|
655
|
-
spaceId:
|
|
656
|
-
});
|
|
657
|
-
var PluginSpaceUpdateGeometryFromProfileArgs = z9.object({
|
|
658
|
-
spaceId: z9.string(),
|
|
659
|
-
profile: PProfile,
|
|
660
|
-
extrudeHeight: z9.number()
|
|
661
|
-
});
|
|
662
|
-
var PluginSpaceUpdateGeometryFromProfileResult = z9.object({
|
|
663
|
-
spaceId: z9.string()
|
|
726
|
+
var PluginSpaceCreateFromProfileResult = z10.object({
|
|
727
|
+
spaceId: z10.string()
|
|
664
728
|
});
|
|
665
|
-
var PluginSpaceGetProperty =
|
|
729
|
+
var PluginSpaceGetProperty = z10.enum([
|
|
666
730
|
// Basic
|
|
667
731
|
"id",
|
|
668
732
|
"type",
|
|
@@ -685,14 +749,13 @@ var PluginSpaceGetProperty = z9.enum([
|
|
|
685
749
|
"rotation",
|
|
686
750
|
"rotationQuaternion",
|
|
687
751
|
// Derived from brep
|
|
688
|
-
"planPoints"
|
|
689
|
-
"profile"
|
|
752
|
+
"planPoints"
|
|
690
753
|
]);
|
|
691
|
-
var PluginSpaceGetArgs =
|
|
692
|
-
spaceId:
|
|
693
|
-
properties:
|
|
754
|
+
var PluginSpaceGetArgs = z10.object({
|
|
755
|
+
spaceId: z10.string(),
|
|
756
|
+
properties: z10.array(PluginSpaceGetProperty)
|
|
694
757
|
});
|
|
695
|
-
var PluginSpaceType =
|
|
758
|
+
var PluginSpaceType = z10.enum([
|
|
696
759
|
"Room",
|
|
697
760
|
"Program Block",
|
|
698
761
|
"Balcony",
|
|
@@ -704,39 +767,38 @@ var PluginSpaceType = z9.enum([
|
|
|
704
767
|
"Envelope",
|
|
705
768
|
"Parking"
|
|
706
769
|
]);
|
|
707
|
-
var PluginSpaceGetResult =
|
|
770
|
+
var PluginSpaceGetResult = z10.object({
|
|
708
771
|
// Basic
|
|
709
|
-
id:
|
|
710
|
-
type:
|
|
711
|
-
room_type:
|
|
712
|
-
name:
|
|
772
|
+
id: z10.string(),
|
|
773
|
+
type: z10.string(),
|
|
774
|
+
room_type: z10.string(),
|
|
775
|
+
name: z10.string(),
|
|
713
776
|
// Derived from parametric data
|
|
714
|
-
area:
|
|
715
|
-
breadth:
|
|
716
|
-
depth:
|
|
717
|
-
height:
|
|
718
|
-
massType:
|
|
777
|
+
area: z10.number(),
|
|
778
|
+
breadth: z10.number(),
|
|
779
|
+
depth: z10.number(),
|
|
780
|
+
height: z10.number(),
|
|
781
|
+
massType: z10.string().nullable(),
|
|
719
782
|
spaceType: PluginSpaceType.nullable(),
|
|
720
|
-
storey:
|
|
721
|
-
departmentId:
|
|
722
|
-
departmentName:
|
|
723
|
-
departmentColor:
|
|
783
|
+
storey: z10.number().nullable(),
|
|
784
|
+
departmentId: z10.string().nullable(),
|
|
785
|
+
departmentName: z10.string(),
|
|
786
|
+
departmentColor: z10.string(),
|
|
724
787
|
// Derived from mesh
|
|
725
788
|
position: PVec3,
|
|
726
789
|
absolutePosition: PVec3,
|
|
727
790
|
rotation: PVec3,
|
|
728
791
|
rotationQuaternion: PQuat.nullable(),
|
|
729
792
|
// Derived from brep
|
|
730
|
-
planPoints:
|
|
731
|
-
profile: PProfile
|
|
793
|
+
planPoints: z10.array(PVec3)
|
|
732
794
|
}).partial();
|
|
733
|
-
var PluginSpaceGetAllResult =
|
|
734
|
-
spacesIds:
|
|
795
|
+
var PluginSpaceGetAllResult = z10.object({
|
|
796
|
+
spacesIds: z10.array(z10.string())
|
|
735
797
|
});
|
|
736
|
-
var PluginSpaceDeleteArgs =
|
|
737
|
-
spaceId:
|
|
798
|
+
var PluginSpaceDeleteArgs = z10.object({
|
|
799
|
+
spaceId: z10.string()
|
|
738
800
|
});
|
|
739
|
-
var PluginMassType =
|
|
801
|
+
var PluginMassType = z10.enum([
|
|
740
802
|
"Plinth",
|
|
741
803
|
"Void",
|
|
742
804
|
"Pergola",
|
|
@@ -750,40 +812,40 @@ var PluginMassType = z9.enum([
|
|
|
750
812
|
"Mass",
|
|
751
813
|
"Site"
|
|
752
814
|
]);
|
|
753
|
-
var PluginWellKnownDepartmentId =
|
|
815
|
+
var PluginWellKnownDepartmentId = z10.enum([
|
|
754
816
|
"DEFAULT",
|
|
755
817
|
"SITE",
|
|
756
818
|
"ENVELOPE",
|
|
757
819
|
"CORE"
|
|
758
820
|
]);
|
|
759
|
-
var PluginDepartmentId =
|
|
821
|
+
var PluginDepartmentId = z10.union([
|
|
760
822
|
PluginWellKnownDepartmentId,
|
|
761
|
-
|
|
823
|
+
z10.uuid()
|
|
762
824
|
]);
|
|
763
|
-
var PluginSpaceUpdateArgs =
|
|
764
|
-
spaceId:
|
|
765
|
-
properties:
|
|
766
|
-
room_type:
|
|
825
|
+
var PluginSpaceUpdateArgs = z10.object({
|
|
826
|
+
spaceId: z10.string(),
|
|
827
|
+
properties: z10.object({
|
|
828
|
+
room_type: z10.string().optional(),
|
|
767
829
|
massType: PluginMassType.optional(),
|
|
768
830
|
spaceType: PluginSpaceType.optional(),
|
|
769
831
|
departmentId: PluginDepartmentId.optional()
|
|
770
832
|
})
|
|
771
833
|
});
|
|
772
|
-
var PluginSpaceUpdateResult =
|
|
773
|
-
spaceId:
|
|
774
|
-
room_type:
|
|
775
|
-
massType:
|
|
776
|
-
spaceType:
|
|
777
|
-
departmentId:
|
|
834
|
+
var PluginSpaceUpdateResult = z10.object({
|
|
835
|
+
spaceId: z10.string(),
|
|
836
|
+
room_type: z10.string().optional(),
|
|
837
|
+
massType: z10.string().optional(),
|
|
838
|
+
spaceType: z10.string().optional(),
|
|
839
|
+
departmentId: z10.string().nullable().optional()
|
|
778
840
|
});
|
|
779
841
|
|
|
780
842
|
// src/api/entity/story.ts
|
|
781
|
-
import * as
|
|
843
|
+
import * as z11 from "zod";
|
|
782
844
|
var PluginStoryApi = class {
|
|
783
845
|
constructor() {
|
|
784
846
|
}
|
|
785
847
|
};
|
|
786
|
-
var PluginStoryGetProperty =
|
|
848
|
+
var PluginStoryGetProperty = z11.enum([
|
|
787
849
|
"value",
|
|
788
850
|
"id",
|
|
789
851
|
"name",
|
|
@@ -793,44 +855,44 @@ var PluginStoryGetProperty = z10.enum([
|
|
|
793
855
|
"spacesCount",
|
|
794
856
|
"totalArea"
|
|
795
857
|
]);
|
|
796
|
-
var PluginStoryGetArgs =
|
|
797
|
-
storyValue:
|
|
798
|
-
properties:
|
|
858
|
+
var PluginStoryGetArgs = z11.object({
|
|
859
|
+
storyValue: z11.number().int(),
|
|
860
|
+
properties: z11.array(PluginStoryGetProperty)
|
|
799
861
|
});
|
|
800
|
-
var PluginStoryGetResult =
|
|
801
|
-
value:
|
|
802
|
-
id:
|
|
803
|
-
name:
|
|
804
|
-
height:
|
|
805
|
-
base:
|
|
806
|
-
hidden:
|
|
807
|
-
spacesCount:
|
|
808
|
-
totalArea:
|
|
862
|
+
var PluginStoryGetResult = z11.object({
|
|
863
|
+
value: z11.number(),
|
|
864
|
+
id: z11.string(),
|
|
865
|
+
name: z11.string(),
|
|
866
|
+
height: z11.number(),
|
|
867
|
+
base: z11.number(),
|
|
868
|
+
hidden: z11.boolean(),
|
|
869
|
+
spacesCount: z11.number(),
|
|
870
|
+
totalArea: z11.number()
|
|
809
871
|
}).partial();
|
|
810
|
-
var PluginStoryGetAllResult =
|
|
811
|
-
stories:
|
|
812
|
-
|
|
813
|
-
value:
|
|
814
|
-
id:
|
|
815
|
-
name:
|
|
872
|
+
var PluginStoryGetAllResult = z11.object({
|
|
873
|
+
stories: z11.array(
|
|
874
|
+
z11.object({
|
|
875
|
+
value: z11.number(),
|
|
876
|
+
id: z11.string(),
|
|
877
|
+
name: z11.string()
|
|
816
878
|
})
|
|
817
879
|
)
|
|
818
880
|
});
|
|
819
|
-
var PluginStoryCreateArgs =
|
|
820
|
-
storyValue:
|
|
821
|
-
height:
|
|
881
|
+
var PluginStoryCreateArgs = z11.object({
|
|
882
|
+
storyValue: z11.number().int(),
|
|
883
|
+
height: z11.number().optional()
|
|
822
884
|
});
|
|
823
|
-
var PluginStoryCreateResult =
|
|
824
|
-
storyId:
|
|
825
|
-
storyValue:
|
|
885
|
+
var PluginStoryCreateResult = z11.object({
|
|
886
|
+
storyId: z11.string(),
|
|
887
|
+
storyValue: z11.number()
|
|
826
888
|
});
|
|
827
|
-
var PluginStoryUpdateArgs =
|
|
828
|
-
storyValue:
|
|
829
|
-
height:
|
|
889
|
+
var PluginStoryUpdateArgs = z11.object({
|
|
890
|
+
storyValue: z11.number().int(),
|
|
891
|
+
height: z11.number()
|
|
830
892
|
});
|
|
831
|
-
var PluginStoryUpdateResult =
|
|
832
|
-
storyValue:
|
|
833
|
-
height:
|
|
893
|
+
var PluginStoryUpdateResult = z11.object({
|
|
894
|
+
storyValue: z11.number(),
|
|
895
|
+
height: z11.number()
|
|
834
896
|
});
|
|
835
897
|
|
|
836
898
|
// src/api/entity/index.ts
|
|
@@ -840,53 +902,53 @@ var PluginEntityApi = class {
|
|
|
840
902
|
};
|
|
841
903
|
|
|
842
904
|
// src/api/tools/copy.ts
|
|
843
|
-
import * as
|
|
844
|
-
var PluginCopyMode =
|
|
845
|
-
var PluginCopyArgs =
|
|
846
|
-
componentIds:
|
|
905
|
+
import * as z12 from "zod";
|
|
906
|
+
var PluginCopyMode = z12.enum(["instance", "unique"]);
|
|
907
|
+
var PluginCopyArgs = z12.object({
|
|
908
|
+
componentIds: z12.array(z12.string()).min(1),
|
|
847
909
|
displacement: PVec3,
|
|
848
|
-
count:
|
|
910
|
+
count: z12.number().int().positive().optional(),
|
|
849
911
|
copyMode: PluginCopyMode.optional()
|
|
850
912
|
});
|
|
851
|
-
var PluginCopyResult =
|
|
852
|
-
copiedIds:
|
|
913
|
+
var PluginCopyResult = z12.object({
|
|
914
|
+
copiedIds: z12.array(z12.string())
|
|
853
915
|
});
|
|
854
916
|
|
|
855
917
|
// src/api/tools/offset.ts
|
|
856
|
-
import * as
|
|
857
|
-
var PluginOffsetArgs =
|
|
858
|
-
componentId:
|
|
859
|
-
distance:
|
|
918
|
+
import * as z13 from "zod";
|
|
919
|
+
var PluginOffsetArgs = z13.object({
|
|
920
|
+
componentId: z13.string().min(1),
|
|
921
|
+
distance: z13.number(),
|
|
860
922
|
profilePickPoint: PVec3.optional()
|
|
861
923
|
});
|
|
862
|
-
var PluginOffsetResult =
|
|
863
|
-
createdIds:
|
|
864
|
-
deletedIds:
|
|
924
|
+
var PluginOffsetResult = z13.object({
|
|
925
|
+
createdIds: z13.array(z13.string()),
|
|
926
|
+
deletedIds: z13.array(z13.string())
|
|
865
927
|
});
|
|
866
928
|
|
|
867
929
|
// src/api/tools/selection.ts
|
|
868
|
-
import * as
|
|
930
|
+
import * as z14 from "zod";
|
|
869
931
|
var PluginSelectionApi = class {
|
|
870
932
|
constructor() {
|
|
871
933
|
}
|
|
872
934
|
};
|
|
873
|
-
var PluginSelectionGetResult =
|
|
874
|
-
selected:
|
|
935
|
+
var PluginSelectionGetResult = z14.object({
|
|
936
|
+
selected: z14.array(z14.string())
|
|
875
937
|
});
|
|
876
938
|
|
|
877
939
|
// src/api/tools/transform.ts
|
|
878
|
-
import * as
|
|
940
|
+
import * as z15 from "zod";
|
|
879
941
|
var PluginTransformApi = class {
|
|
880
942
|
constructor() {
|
|
881
943
|
}
|
|
882
944
|
};
|
|
883
|
-
var PluginMoveArgs =
|
|
884
|
-
componentIds:
|
|
945
|
+
var PluginMoveArgs = z15.object({
|
|
946
|
+
componentIds: z15.array(z15.string()),
|
|
885
947
|
displacement: PVec3
|
|
886
948
|
});
|
|
887
|
-
var PluginRotateArgs =
|
|
888
|
-
componentIds:
|
|
889
|
-
angle:
|
|
949
|
+
var PluginRotateArgs = z15.object({
|
|
950
|
+
componentIds: z15.array(z15.string()),
|
|
951
|
+
angle: z15.number(),
|
|
890
952
|
axis: PVec3,
|
|
891
953
|
pivot: PVec3
|
|
892
954
|
});
|
|
@@ -898,12 +960,12 @@ var PluginToolsApi = class {
|
|
|
898
960
|
};
|
|
899
961
|
|
|
900
962
|
// src/api/units/index.ts
|
|
901
|
-
import * as
|
|
963
|
+
import * as z16 from "zod";
|
|
902
964
|
var PluginUnitsApi = class {
|
|
903
965
|
constructor() {
|
|
904
966
|
}
|
|
905
967
|
};
|
|
906
|
-
var PUnitType =
|
|
968
|
+
var PUnitType = z16.enum([
|
|
907
969
|
"meters",
|
|
908
970
|
"feet-inches",
|
|
909
971
|
"inches",
|
|
@@ -912,21 +974,21 @@ var PUnitType = z15.enum([
|
|
|
912
974
|
"kilometers",
|
|
913
975
|
"miles"
|
|
914
976
|
]);
|
|
915
|
-
var PluginUnitsConvertFromArgs =
|
|
977
|
+
var PluginUnitsConvertFromArgs = z16.object({
|
|
916
978
|
unit: PUnitType,
|
|
917
|
-
value:
|
|
918
|
-
degree:
|
|
979
|
+
value: z16.number(),
|
|
980
|
+
degree: z16.number().int().min(1).max(3).optional()
|
|
919
981
|
});
|
|
920
|
-
var PluginUnitsConvertFromResult =
|
|
921
|
-
value:
|
|
982
|
+
var PluginUnitsConvertFromResult = z16.object({
|
|
983
|
+
value: z16.number()
|
|
922
984
|
});
|
|
923
|
-
var PluginUnitsConvertToArgs =
|
|
985
|
+
var PluginUnitsConvertToArgs = z16.object({
|
|
924
986
|
unit: PUnitType,
|
|
925
|
-
value:
|
|
926
|
-
degree:
|
|
987
|
+
value: z16.number(),
|
|
988
|
+
degree: z16.number().int().min(1).max(3).optional()
|
|
927
989
|
});
|
|
928
|
-
var PluginUnitsConvertToResult =
|
|
929
|
-
value:
|
|
990
|
+
var PluginUnitsConvertToResult = z16.object({
|
|
991
|
+
value: z16.number()
|
|
930
992
|
});
|
|
931
993
|
|
|
932
994
|
// src/api/index.ts
|
|
@@ -944,6 +1006,14 @@ export {
|
|
|
944
1006
|
PVec3,
|
|
945
1007
|
PluginApi,
|
|
946
1008
|
PluginArcApi,
|
|
1009
|
+
PluginBuildableEnvelopeApi,
|
|
1010
|
+
PluginBuildableEnvelopeCreateArgs,
|
|
1011
|
+
PluginBuildableEnvelopeCreateResult,
|
|
1012
|
+
PluginBuildableEnvelopePolygonVertex,
|
|
1013
|
+
PluginBuildableEnvelopeSetbackTier,
|
|
1014
|
+
PluginBuildableEnvelopeUpdateArgs,
|
|
1015
|
+
PluginBuildableEnvelopeUpdateResult,
|
|
1016
|
+
PluginBuildableEnvelopeVerticalCap,
|
|
947
1017
|
PluginCopyArgs,
|
|
948
1018
|
PluginCopyMode,
|
|
949
1019
|
PluginCopyResult,
|
|
@@ -989,8 +1059,6 @@ export {
|
|
|
989
1059
|
PluginSpaceGetResult,
|
|
990
1060
|
PluginSpaceType,
|
|
991
1061
|
PluginSpaceUpdateArgs,
|
|
992
|
-
PluginSpaceUpdateGeometryFromProfileArgs,
|
|
993
|
-
PluginSpaceUpdateGeometryFromProfileResult,
|
|
994
1062
|
PluginSpaceUpdateResult,
|
|
995
1063
|
PluginStoryApi,
|
|
996
1064
|
PluginStoryCreateArgs,
|