@snaptrude/plugin-core 0.2.1 → 0.2.3
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 +13 -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 +2 -2
- package/dist/api/entity/story.d.ts +2 -2
- package/dist/index.cjs +242 -154
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +234 -154
- 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/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,163 @@ 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:
|
|
726
|
+
var PluginSpaceCreateFromProfileResult = z10.object({
|
|
727
|
+
spaceId: z10.string()
|
|
656
728
|
});
|
|
657
|
-
var PluginSpaceUpdateGeometryFromProfileArgs =
|
|
658
|
-
spaceId:
|
|
729
|
+
var PluginSpaceUpdateGeometryFromProfileArgs = z10.object({
|
|
730
|
+
spaceId: z10.string(),
|
|
659
731
|
profile: PProfile,
|
|
660
|
-
extrudeHeight:
|
|
732
|
+
extrudeHeight: z10.number()
|
|
661
733
|
});
|
|
662
|
-
var PluginSpaceUpdateGeometryFromProfileResult =
|
|
663
|
-
spaceId:
|
|
734
|
+
var PluginSpaceUpdateGeometryFromProfileResult = z10.object({
|
|
735
|
+
spaceId: z10.string()
|
|
664
736
|
});
|
|
665
|
-
var PluginSpaceGetProperty =
|
|
737
|
+
var PluginSpaceGetProperty = z10.enum([
|
|
666
738
|
// Basic
|
|
667
739
|
"id",
|
|
668
740
|
"type",
|
|
@@ -688,11 +760,11 @@ var PluginSpaceGetProperty = z9.enum([
|
|
|
688
760
|
"planPoints",
|
|
689
761
|
"profile"
|
|
690
762
|
]);
|
|
691
|
-
var PluginSpaceGetArgs =
|
|
692
|
-
spaceId:
|
|
693
|
-
properties:
|
|
763
|
+
var PluginSpaceGetArgs = z10.object({
|
|
764
|
+
spaceId: z10.string(),
|
|
765
|
+
properties: z10.array(PluginSpaceGetProperty)
|
|
694
766
|
});
|
|
695
|
-
var PluginSpaceType =
|
|
767
|
+
var PluginSpaceType = z10.enum([
|
|
696
768
|
"Room",
|
|
697
769
|
"Program Block",
|
|
698
770
|
"Balcony",
|
|
@@ -704,39 +776,39 @@ var PluginSpaceType = z9.enum([
|
|
|
704
776
|
"Envelope",
|
|
705
777
|
"Parking"
|
|
706
778
|
]);
|
|
707
|
-
var PluginSpaceGetResult =
|
|
779
|
+
var PluginSpaceGetResult = z10.object({
|
|
708
780
|
// Basic
|
|
709
|
-
id:
|
|
710
|
-
type:
|
|
711
|
-
room_type:
|
|
712
|
-
name:
|
|
781
|
+
id: z10.string(),
|
|
782
|
+
type: z10.string(),
|
|
783
|
+
room_type: z10.string(),
|
|
784
|
+
name: z10.string(),
|
|
713
785
|
// Derived from parametric data
|
|
714
|
-
area:
|
|
715
|
-
breadth:
|
|
716
|
-
depth:
|
|
717
|
-
height:
|
|
718
|
-
massType:
|
|
786
|
+
area: z10.number(),
|
|
787
|
+
breadth: z10.number(),
|
|
788
|
+
depth: z10.number(),
|
|
789
|
+
height: z10.number(),
|
|
790
|
+
massType: z10.string().nullable(),
|
|
719
791
|
spaceType: PluginSpaceType.nullable(),
|
|
720
|
-
storey:
|
|
721
|
-
departmentId:
|
|
722
|
-
departmentName:
|
|
723
|
-
departmentColor:
|
|
792
|
+
storey: z10.number().nullable(),
|
|
793
|
+
departmentId: z10.string().nullable(),
|
|
794
|
+
departmentName: z10.string(),
|
|
795
|
+
departmentColor: z10.string(),
|
|
724
796
|
// Derived from mesh
|
|
725
797
|
position: PVec3,
|
|
726
798
|
absolutePosition: PVec3,
|
|
727
799
|
rotation: PVec3,
|
|
728
800
|
rotationQuaternion: PQuat.nullable(),
|
|
729
801
|
// Derived from brep
|
|
730
|
-
planPoints:
|
|
802
|
+
planPoints: z10.array(PVec3),
|
|
731
803
|
profile: PProfile
|
|
732
804
|
}).partial();
|
|
733
|
-
var PluginSpaceGetAllResult =
|
|
734
|
-
spacesIds:
|
|
805
|
+
var PluginSpaceGetAllResult = z10.object({
|
|
806
|
+
spacesIds: z10.array(z10.string())
|
|
735
807
|
});
|
|
736
|
-
var PluginSpaceDeleteArgs =
|
|
737
|
-
spaceId:
|
|
808
|
+
var PluginSpaceDeleteArgs = z10.object({
|
|
809
|
+
spaceId: z10.string()
|
|
738
810
|
});
|
|
739
|
-
var PluginMassType =
|
|
811
|
+
var PluginMassType = z10.enum([
|
|
740
812
|
"Plinth",
|
|
741
813
|
"Void",
|
|
742
814
|
"Pergola",
|
|
@@ -750,40 +822,40 @@ var PluginMassType = z9.enum([
|
|
|
750
822
|
"Mass",
|
|
751
823
|
"Site"
|
|
752
824
|
]);
|
|
753
|
-
var PluginWellKnownDepartmentId =
|
|
825
|
+
var PluginWellKnownDepartmentId = z10.enum([
|
|
754
826
|
"DEFAULT",
|
|
755
827
|
"SITE",
|
|
756
828
|
"ENVELOPE",
|
|
757
829
|
"CORE"
|
|
758
830
|
]);
|
|
759
|
-
var PluginDepartmentId =
|
|
831
|
+
var PluginDepartmentId = z10.union([
|
|
760
832
|
PluginWellKnownDepartmentId,
|
|
761
|
-
|
|
833
|
+
z10.uuid()
|
|
762
834
|
]);
|
|
763
|
-
var PluginSpaceUpdateArgs =
|
|
764
|
-
spaceId:
|
|
765
|
-
properties:
|
|
766
|
-
room_type:
|
|
835
|
+
var PluginSpaceUpdateArgs = z10.object({
|
|
836
|
+
spaceId: z10.string(),
|
|
837
|
+
properties: z10.object({
|
|
838
|
+
room_type: z10.string().optional(),
|
|
767
839
|
massType: PluginMassType.optional(),
|
|
768
840
|
spaceType: PluginSpaceType.optional(),
|
|
769
841
|
departmentId: PluginDepartmentId.optional()
|
|
770
842
|
})
|
|
771
843
|
});
|
|
772
|
-
var PluginSpaceUpdateResult =
|
|
773
|
-
spaceId:
|
|
774
|
-
room_type:
|
|
775
|
-
massType:
|
|
776
|
-
spaceType:
|
|
777
|
-
departmentId:
|
|
844
|
+
var PluginSpaceUpdateResult = z10.object({
|
|
845
|
+
spaceId: z10.string(),
|
|
846
|
+
room_type: z10.string().optional(),
|
|
847
|
+
massType: z10.string().optional(),
|
|
848
|
+
spaceType: z10.string().optional(),
|
|
849
|
+
departmentId: z10.string().nullable().optional()
|
|
778
850
|
});
|
|
779
851
|
|
|
780
852
|
// src/api/entity/story.ts
|
|
781
|
-
import * as
|
|
853
|
+
import * as z11 from "zod";
|
|
782
854
|
var PluginStoryApi = class {
|
|
783
855
|
constructor() {
|
|
784
856
|
}
|
|
785
857
|
};
|
|
786
|
-
var PluginStoryGetProperty =
|
|
858
|
+
var PluginStoryGetProperty = z11.enum([
|
|
787
859
|
"value",
|
|
788
860
|
"id",
|
|
789
861
|
"name",
|
|
@@ -793,44 +865,44 @@ var PluginStoryGetProperty = z10.enum([
|
|
|
793
865
|
"spacesCount",
|
|
794
866
|
"totalArea"
|
|
795
867
|
]);
|
|
796
|
-
var PluginStoryGetArgs =
|
|
797
|
-
storyValue:
|
|
798
|
-
properties:
|
|
868
|
+
var PluginStoryGetArgs = z11.object({
|
|
869
|
+
storyValue: z11.number().int(),
|
|
870
|
+
properties: z11.array(PluginStoryGetProperty)
|
|
799
871
|
});
|
|
800
|
-
var PluginStoryGetResult =
|
|
801
|
-
value:
|
|
802
|
-
id:
|
|
803
|
-
name:
|
|
804
|
-
height:
|
|
805
|
-
base:
|
|
806
|
-
hidden:
|
|
807
|
-
spacesCount:
|
|
808
|
-
totalArea:
|
|
872
|
+
var PluginStoryGetResult = z11.object({
|
|
873
|
+
value: z11.number(),
|
|
874
|
+
id: z11.string(),
|
|
875
|
+
name: z11.string(),
|
|
876
|
+
height: z11.number(),
|
|
877
|
+
base: z11.number(),
|
|
878
|
+
hidden: z11.boolean(),
|
|
879
|
+
spacesCount: z11.number(),
|
|
880
|
+
totalArea: z11.number()
|
|
809
881
|
}).partial();
|
|
810
|
-
var PluginStoryGetAllResult =
|
|
811
|
-
stories:
|
|
812
|
-
|
|
813
|
-
value:
|
|
814
|
-
id:
|
|
815
|
-
name:
|
|
882
|
+
var PluginStoryGetAllResult = z11.object({
|
|
883
|
+
stories: z11.array(
|
|
884
|
+
z11.object({
|
|
885
|
+
value: z11.number(),
|
|
886
|
+
id: z11.string(),
|
|
887
|
+
name: z11.string()
|
|
816
888
|
})
|
|
817
889
|
)
|
|
818
890
|
});
|
|
819
|
-
var PluginStoryCreateArgs =
|
|
820
|
-
storyValue:
|
|
821
|
-
height:
|
|
891
|
+
var PluginStoryCreateArgs = z11.object({
|
|
892
|
+
storyValue: z11.number().int(),
|
|
893
|
+
height: z11.number().optional()
|
|
822
894
|
});
|
|
823
|
-
var PluginStoryCreateResult =
|
|
824
|
-
storyId:
|
|
825
|
-
storyValue:
|
|
895
|
+
var PluginStoryCreateResult = z11.object({
|
|
896
|
+
storyId: z11.string(),
|
|
897
|
+
storyValue: z11.number()
|
|
826
898
|
});
|
|
827
|
-
var PluginStoryUpdateArgs =
|
|
828
|
-
storyValue:
|
|
829
|
-
height:
|
|
899
|
+
var PluginStoryUpdateArgs = z11.object({
|
|
900
|
+
storyValue: z11.number().int(),
|
|
901
|
+
height: z11.number()
|
|
830
902
|
});
|
|
831
|
-
var PluginStoryUpdateResult =
|
|
832
|
-
storyValue:
|
|
833
|
-
height:
|
|
903
|
+
var PluginStoryUpdateResult = z11.object({
|
|
904
|
+
storyValue: z11.number(),
|
|
905
|
+
height: z11.number()
|
|
834
906
|
});
|
|
835
907
|
|
|
836
908
|
// src/api/entity/index.ts
|
|
@@ -840,53 +912,53 @@ var PluginEntityApi = class {
|
|
|
840
912
|
};
|
|
841
913
|
|
|
842
914
|
// src/api/tools/copy.ts
|
|
843
|
-
import * as
|
|
844
|
-
var PluginCopyMode =
|
|
845
|
-
var PluginCopyArgs =
|
|
846
|
-
componentIds:
|
|
915
|
+
import * as z12 from "zod";
|
|
916
|
+
var PluginCopyMode = z12.enum(["instance", "unique"]);
|
|
917
|
+
var PluginCopyArgs = z12.object({
|
|
918
|
+
componentIds: z12.array(z12.string()).min(1),
|
|
847
919
|
displacement: PVec3,
|
|
848
|
-
count:
|
|
920
|
+
count: z12.number().int().positive().optional(),
|
|
849
921
|
copyMode: PluginCopyMode.optional()
|
|
850
922
|
});
|
|
851
|
-
var PluginCopyResult =
|
|
852
|
-
copiedIds:
|
|
923
|
+
var PluginCopyResult = z12.object({
|
|
924
|
+
copiedIds: z12.array(z12.string())
|
|
853
925
|
});
|
|
854
926
|
|
|
855
927
|
// src/api/tools/offset.ts
|
|
856
|
-
import * as
|
|
857
|
-
var PluginOffsetArgs =
|
|
858
|
-
componentId:
|
|
859
|
-
distance:
|
|
928
|
+
import * as z13 from "zod";
|
|
929
|
+
var PluginOffsetArgs = z13.object({
|
|
930
|
+
componentId: z13.string().min(1),
|
|
931
|
+
distance: z13.number(),
|
|
860
932
|
profilePickPoint: PVec3.optional()
|
|
861
933
|
});
|
|
862
|
-
var PluginOffsetResult =
|
|
863
|
-
createdIds:
|
|
864
|
-
deletedIds:
|
|
934
|
+
var PluginOffsetResult = z13.object({
|
|
935
|
+
createdIds: z13.array(z13.string()),
|
|
936
|
+
deletedIds: z13.array(z13.string())
|
|
865
937
|
});
|
|
866
938
|
|
|
867
939
|
// src/api/tools/selection.ts
|
|
868
|
-
import * as
|
|
940
|
+
import * as z14 from "zod";
|
|
869
941
|
var PluginSelectionApi = class {
|
|
870
942
|
constructor() {
|
|
871
943
|
}
|
|
872
944
|
};
|
|
873
|
-
var PluginSelectionGetResult =
|
|
874
|
-
selected:
|
|
945
|
+
var PluginSelectionGetResult = z14.object({
|
|
946
|
+
selected: z14.array(z14.string())
|
|
875
947
|
});
|
|
876
948
|
|
|
877
949
|
// src/api/tools/transform.ts
|
|
878
|
-
import * as
|
|
950
|
+
import * as z15 from "zod";
|
|
879
951
|
var PluginTransformApi = class {
|
|
880
952
|
constructor() {
|
|
881
953
|
}
|
|
882
954
|
};
|
|
883
|
-
var PluginMoveArgs =
|
|
884
|
-
componentIds:
|
|
955
|
+
var PluginMoveArgs = z15.object({
|
|
956
|
+
componentIds: z15.array(z15.string()),
|
|
885
957
|
displacement: PVec3
|
|
886
958
|
});
|
|
887
|
-
var PluginRotateArgs =
|
|
888
|
-
componentIds:
|
|
889
|
-
angle:
|
|
959
|
+
var PluginRotateArgs = z15.object({
|
|
960
|
+
componentIds: z15.array(z15.string()),
|
|
961
|
+
angle: z15.number(),
|
|
890
962
|
axis: PVec3,
|
|
891
963
|
pivot: PVec3
|
|
892
964
|
});
|
|
@@ -898,12 +970,12 @@ var PluginToolsApi = class {
|
|
|
898
970
|
};
|
|
899
971
|
|
|
900
972
|
// src/api/units/index.ts
|
|
901
|
-
import * as
|
|
973
|
+
import * as z16 from "zod";
|
|
902
974
|
var PluginUnitsApi = class {
|
|
903
975
|
constructor() {
|
|
904
976
|
}
|
|
905
977
|
};
|
|
906
|
-
var PUnitType =
|
|
978
|
+
var PUnitType = z16.enum([
|
|
907
979
|
"meters",
|
|
908
980
|
"feet-inches",
|
|
909
981
|
"inches",
|
|
@@ -912,21 +984,21 @@ var PUnitType = z15.enum([
|
|
|
912
984
|
"kilometers",
|
|
913
985
|
"miles"
|
|
914
986
|
]);
|
|
915
|
-
var PluginUnitsConvertFromArgs =
|
|
987
|
+
var PluginUnitsConvertFromArgs = z16.object({
|
|
916
988
|
unit: PUnitType,
|
|
917
|
-
value:
|
|
918
|
-
degree:
|
|
989
|
+
value: z16.number(),
|
|
990
|
+
degree: z16.number().int().min(1).max(3).optional()
|
|
919
991
|
});
|
|
920
|
-
var PluginUnitsConvertFromResult =
|
|
921
|
-
value:
|
|
992
|
+
var PluginUnitsConvertFromResult = z16.object({
|
|
993
|
+
value: z16.number()
|
|
922
994
|
});
|
|
923
|
-
var PluginUnitsConvertToArgs =
|
|
995
|
+
var PluginUnitsConvertToArgs = z16.object({
|
|
924
996
|
unit: PUnitType,
|
|
925
|
-
value:
|
|
926
|
-
degree:
|
|
997
|
+
value: z16.number(),
|
|
998
|
+
degree: z16.number().int().min(1).max(3).optional()
|
|
927
999
|
});
|
|
928
|
-
var PluginUnitsConvertToResult =
|
|
929
|
-
value:
|
|
1000
|
+
var PluginUnitsConvertToResult = z16.object({
|
|
1001
|
+
value: z16.number()
|
|
930
1002
|
});
|
|
931
1003
|
|
|
932
1004
|
// src/api/index.ts
|
|
@@ -944,6 +1016,14 @@ export {
|
|
|
944
1016
|
PVec3,
|
|
945
1017
|
PluginApi,
|
|
946
1018
|
PluginArcApi,
|
|
1019
|
+
PluginBuildableEnvelopeApi,
|
|
1020
|
+
PluginBuildableEnvelopeCreateArgs,
|
|
1021
|
+
PluginBuildableEnvelopeCreateResult,
|
|
1022
|
+
PluginBuildableEnvelopePolygonVertex,
|
|
1023
|
+
PluginBuildableEnvelopeSetbackTier,
|
|
1024
|
+
PluginBuildableEnvelopeUpdateArgs,
|
|
1025
|
+
PluginBuildableEnvelopeUpdateResult,
|
|
1026
|
+
PluginBuildableEnvelopeVerticalCap,
|
|
947
1027
|
PluginCopyArgs,
|
|
948
1028
|
PluginCopyMode,
|
|
949
1029
|
PluginCopyResult,
|