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