@retikz/core 0.2.0-alpha.3 → 0.2.0-alpha.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.
- package/dist/es/compile/compile.d.ts.map +1 -1
- package/dist/es/compile/compile.js +74 -12
- package/dist/es/compile/node.d.ts +4 -0
- package/dist/es/compile/node.d.ts.map +1 -1
- package/dist/es/compile/node.js +83 -32
- package/dist/es/compile/path/index.d.ts.map +1 -1
- package/dist/es/compile/path/index.js +91 -12
- package/dist/es/compile/path/relative.d.ts.map +1 -1
- package/dist/es/compile/path/relative.js +5 -1
- package/dist/es/geometry/arc.d.ts +11 -0
- package/dist/es/geometry/arc.d.ts.map +1 -1
- package/dist/es/geometry/arc.js +27 -1
- package/dist/es/geometry/rect.d.ts +23 -0
- package/dist/es/geometry/rect.d.ts.map +1 -1
- package/dist/es/geometry/rect.js +84 -1
- package/dist/es/geometry/segment.d.ts +2 -0
- package/dist/es/geometry/segment.d.ts.map +1 -1
- package/dist/es/geometry/segment.js +12 -1
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +2 -2
- package/dist/es/ir/node.d.ts +33 -4
- package/dist/es/ir/node.d.ts.map +1 -1
- package/dist/es/ir/node.js +9 -2
- package/dist/es/ir/path/path.d.ts +230 -5
- package/dist/es/ir/path/path.d.ts.map +1 -1
- package/dist/es/ir/path/path.js +1 -0
- package/dist/es/ir/path/step.d.ts +311 -8
- package/dist/es/ir/path/step.d.ts.map +1 -1
- package/dist/es/ir/path/step.js +36 -11
- package/dist/es/ir/scope.d.ts +348 -16
- package/dist/es/ir/scope.d.ts.map +1 -1
- package/dist/es/ir/scope.js +5 -2
- package/dist/lib/compile/compile.cjs +74 -12
- package/dist/lib/compile/compile.d.ts.map +1 -1
- package/dist/lib/compile/node.cjs +83 -32
- package/dist/lib/compile/node.d.ts +4 -0
- package/dist/lib/compile/node.d.ts.map +1 -1
- package/dist/lib/compile/path/index.cjs +89 -10
- package/dist/lib/compile/path/index.d.ts.map +1 -1
- package/dist/lib/compile/path/relative.cjs +5 -1
- package/dist/lib/compile/path/relative.d.ts.map +1 -1
- package/dist/lib/geometry/arc.cjs +28 -0
- package/dist/lib/geometry/arc.d.ts +11 -0
- package/dist/lib/geometry/arc.d.ts.map +1 -1
- package/dist/lib/geometry/rect.cjs +84 -0
- package/dist/lib/geometry/rect.d.ts +23 -0
- package/dist/lib/geometry/rect.d.ts.map +1 -1
- package/dist/lib/geometry/segment.cjs +12 -0
- package/dist/lib/geometry/segment.d.ts +2 -0
- package/dist/lib/geometry/segment.d.ts.map +1 -1
- package/dist/lib/index.cjs +1 -0
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ir/node.cjs +9 -2
- package/dist/lib/ir/node.d.ts +33 -4
- package/dist/lib/ir/node.d.ts.map +1 -1
- package/dist/lib/ir/path/path.cjs +1 -0
- package/dist/lib/ir/path/path.d.ts +230 -5
- package/dist/lib/ir/path/path.d.ts.map +1 -1
- package/dist/lib/ir/path/step.cjs +36 -10
- package/dist/lib/ir/path/step.d.ts +311 -8
- package/dist/lib/ir/path/step.d.ts.map +1 -1
- package/dist/lib/ir/scope.cjs +5 -2
- package/dist/lib/ir/scope.d.ts +348 -16
- package/dist/lib/ir/scope.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -745,7 +745,31 @@ export declare const ArcStepSchema: z.ZodObject<{
|
|
|
745
745
|
kind: z.ZodLiteral<"arc">;
|
|
746
746
|
startAngle: z.ZodNumber;
|
|
747
747
|
endAngle: z.ZodNumber;
|
|
748
|
-
radius: z.ZodNumber
|
|
748
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
749
|
+
radiusX: z.ZodOptional<z.ZodNumber>;
|
|
750
|
+
radiusY: z.ZodOptional<z.ZodNumber>;
|
|
751
|
+
center: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodString, z.ZodObject<{
|
|
752
|
+
relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
753
|
+
}, "strip", z.ZodTypeAny, {
|
|
754
|
+
relative: [number, number];
|
|
755
|
+
}, {
|
|
756
|
+
relative: [number, number];
|
|
757
|
+
}>, z.ZodObject<{
|
|
758
|
+
relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
759
|
+
}, "strip", z.ZodTypeAny, {
|
|
760
|
+
relativeAccumulate: [number, number];
|
|
761
|
+
}, {
|
|
762
|
+
relativeAccumulate: [number, number];
|
|
763
|
+
}>, z.ZodObject<{
|
|
764
|
+
of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
|
|
765
|
+
offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
766
|
+
}, "strip", z.ZodTypeAny, {
|
|
767
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
768
|
+
offset: [number, number];
|
|
769
|
+
}, {
|
|
770
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
771
|
+
offset: [number, number];
|
|
772
|
+
}>]>>;
|
|
749
773
|
label: z.ZodOptional<z.ZodObject<{
|
|
750
774
|
text: z.ZodString;
|
|
751
775
|
position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
|
|
@@ -795,10 +819,10 @@ export declare const ArcStepSchema: z.ZodObject<{
|
|
|
795
819
|
}>>;
|
|
796
820
|
}, "strip", z.ZodTypeAny, {
|
|
797
821
|
type: "step";
|
|
798
|
-
radius: number;
|
|
799
822
|
kind: "arc";
|
|
800
823
|
startAngle: number;
|
|
801
824
|
endAngle: number;
|
|
825
|
+
radius?: number | undefined;
|
|
802
826
|
label?: {
|
|
803
827
|
text: string;
|
|
804
828
|
opacity?: number | undefined;
|
|
@@ -812,12 +836,22 @@ export declare const ArcStepSchema: z.ZodObject<{
|
|
|
812
836
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
813
837
|
textColor?: string | undefined;
|
|
814
838
|
} | undefined;
|
|
839
|
+
radiusX?: number | undefined;
|
|
840
|
+
radiusY?: number | undefined;
|
|
841
|
+
center?: string | [number, number] | import('..').PolarPosition | {
|
|
842
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
843
|
+
offset: [number, number];
|
|
844
|
+
} | {
|
|
845
|
+
relative: [number, number];
|
|
846
|
+
} | {
|
|
847
|
+
relativeAccumulate: [number, number];
|
|
848
|
+
} | undefined;
|
|
815
849
|
}, {
|
|
816
850
|
type: "step";
|
|
817
|
-
radius: number;
|
|
818
851
|
kind: "arc";
|
|
819
852
|
startAngle: number;
|
|
820
853
|
endAngle: number;
|
|
854
|
+
radius?: number | undefined;
|
|
821
855
|
label?: {
|
|
822
856
|
text: string;
|
|
823
857
|
opacity?: number | undefined;
|
|
@@ -831,11 +865,24 @@ export declare const ArcStepSchema: z.ZodObject<{
|
|
|
831
865
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
832
866
|
textColor?: string | undefined;
|
|
833
867
|
} | undefined;
|
|
868
|
+
radiusX?: number | undefined;
|
|
869
|
+
radiusY?: number | undefined;
|
|
870
|
+
center?: string | [number, number] | import('..').PolarPosition | {
|
|
871
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
872
|
+
offset: [number, number];
|
|
873
|
+
} | {
|
|
874
|
+
relative: [number, number];
|
|
875
|
+
} | {
|
|
876
|
+
relativeAccumulate: [number, number];
|
|
877
|
+
} | undefined;
|
|
834
878
|
}>;
|
|
835
879
|
export declare const CirclePathStepSchema: z.ZodObject<{
|
|
836
880
|
type: z.ZodLiteral<"step">;
|
|
837
881
|
kind: z.ZodLiteral<"circlePath">;
|
|
838
882
|
radius: z.ZodNumber;
|
|
883
|
+
startAngle: z.ZodOptional<z.ZodNumber>;
|
|
884
|
+
endAngle: z.ZodOptional<z.ZodNumber>;
|
|
885
|
+
closed: z.ZodOptional<z.ZodEnum<["closed", "chord", "open"]>>;
|
|
839
886
|
label: z.ZodOptional<z.ZodObject<{
|
|
840
887
|
text: z.ZodString;
|
|
841
888
|
position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
|
|
@@ -900,6 +947,9 @@ export declare const CirclePathStepSchema: z.ZodObject<{
|
|
|
900
947
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
901
948
|
textColor?: string | undefined;
|
|
902
949
|
} | undefined;
|
|
950
|
+
startAngle?: number | undefined;
|
|
951
|
+
endAngle?: number | undefined;
|
|
952
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
903
953
|
}, {
|
|
904
954
|
type: "step";
|
|
905
955
|
radius: number;
|
|
@@ -917,12 +967,18 @@ export declare const CirclePathStepSchema: z.ZodObject<{
|
|
|
917
967
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
918
968
|
textColor?: string | undefined;
|
|
919
969
|
} | undefined;
|
|
970
|
+
startAngle?: number | undefined;
|
|
971
|
+
endAngle?: number | undefined;
|
|
972
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
920
973
|
}>;
|
|
921
974
|
export declare const EllipsePathStepSchema: z.ZodObject<{
|
|
922
975
|
type: z.ZodLiteral<"step">;
|
|
923
976
|
kind: z.ZodLiteral<"ellipsePath">;
|
|
924
977
|
radiusX: z.ZodNumber;
|
|
925
978
|
radiusY: z.ZodNumber;
|
|
979
|
+
startAngle: z.ZodOptional<z.ZodNumber>;
|
|
980
|
+
endAngle: z.ZodOptional<z.ZodNumber>;
|
|
981
|
+
closed: z.ZodOptional<z.ZodEnum<["closed", "chord", "open"]>>;
|
|
926
982
|
label: z.ZodOptional<z.ZodObject<{
|
|
927
983
|
text: z.ZodString;
|
|
928
984
|
position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
|
|
@@ -988,6 +1044,9 @@ export declare const EllipsePathStepSchema: z.ZodObject<{
|
|
|
988
1044
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
989
1045
|
textColor?: string | undefined;
|
|
990
1046
|
} | undefined;
|
|
1047
|
+
startAngle?: number | undefined;
|
|
1048
|
+
endAngle?: number | undefined;
|
|
1049
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
991
1050
|
}, {
|
|
992
1051
|
type: "step";
|
|
993
1052
|
kind: "ellipsePath";
|
|
@@ -1006,6 +1065,98 @@ export declare const EllipsePathStepSchema: z.ZodObject<{
|
|
|
1006
1065
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
1007
1066
|
textColor?: string | undefined;
|
|
1008
1067
|
} | undefined;
|
|
1068
|
+
startAngle?: number | undefined;
|
|
1069
|
+
endAngle?: number | undefined;
|
|
1070
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
1071
|
+
}>;
|
|
1072
|
+
export declare const RectangleStepSchema: z.ZodObject<{
|
|
1073
|
+
type: z.ZodLiteral<"step">;
|
|
1074
|
+
kind: z.ZodLiteral<"rectangle">;
|
|
1075
|
+
from: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodString, z.ZodObject<{
|
|
1076
|
+
relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1077
|
+
}, "strip", z.ZodTypeAny, {
|
|
1078
|
+
relative: [number, number];
|
|
1079
|
+
}, {
|
|
1080
|
+
relative: [number, number];
|
|
1081
|
+
}>, z.ZodObject<{
|
|
1082
|
+
relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1083
|
+
}, "strip", z.ZodTypeAny, {
|
|
1084
|
+
relativeAccumulate: [number, number];
|
|
1085
|
+
}, {
|
|
1086
|
+
relativeAccumulate: [number, number];
|
|
1087
|
+
}>, z.ZodObject<{
|
|
1088
|
+
of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
|
|
1089
|
+
offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1090
|
+
}, "strip", z.ZodTypeAny, {
|
|
1091
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1092
|
+
offset: [number, number];
|
|
1093
|
+
}, {
|
|
1094
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1095
|
+
offset: [number, number];
|
|
1096
|
+
}>]>;
|
|
1097
|
+
to: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodString, z.ZodObject<{
|
|
1098
|
+
relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1099
|
+
}, "strip", z.ZodTypeAny, {
|
|
1100
|
+
relative: [number, number];
|
|
1101
|
+
}, {
|
|
1102
|
+
relative: [number, number];
|
|
1103
|
+
}>, z.ZodObject<{
|
|
1104
|
+
relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1105
|
+
}, "strip", z.ZodTypeAny, {
|
|
1106
|
+
relativeAccumulate: [number, number];
|
|
1107
|
+
}, {
|
|
1108
|
+
relativeAccumulate: [number, number];
|
|
1109
|
+
}>, z.ZodObject<{
|
|
1110
|
+
of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
|
|
1111
|
+
offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1112
|
+
}, "strip", z.ZodTypeAny, {
|
|
1113
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1114
|
+
offset: [number, number];
|
|
1115
|
+
}, {
|
|
1116
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1117
|
+
offset: [number, number];
|
|
1118
|
+
}>]>;
|
|
1119
|
+
roundedCorners: z.ZodOptional<z.ZodNumber>;
|
|
1120
|
+
}, "strip", z.ZodTypeAny, {
|
|
1121
|
+
type: "step";
|
|
1122
|
+
kind: "rectangle";
|
|
1123
|
+
to: string | [number, number] | import('..').PolarPosition | {
|
|
1124
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1125
|
+
offset: [number, number];
|
|
1126
|
+
} | {
|
|
1127
|
+
relative: [number, number];
|
|
1128
|
+
} | {
|
|
1129
|
+
relativeAccumulate: [number, number];
|
|
1130
|
+
};
|
|
1131
|
+
from: string | [number, number] | import('..').PolarPosition | {
|
|
1132
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1133
|
+
offset: [number, number];
|
|
1134
|
+
} | {
|
|
1135
|
+
relative: [number, number];
|
|
1136
|
+
} | {
|
|
1137
|
+
relativeAccumulate: [number, number];
|
|
1138
|
+
};
|
|
1139
|
+
roundedCorners?: number | undefined;
|
|
1140
|
+
}, {
|
|
1141
|
+
type: "step";
|
|
1142
|
+
kind: "rectangle";
|
|
1143
|
+
to: string | [number, number] | import('..').PolarPosition | {
|
|
1144
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1145
|
+
offset: [number, number];
|
|
1146
|
+
} | {
|
|
1147
|
+
relative: [number, number];
|
|
1148
|
+
} | {
|
|
1149
|
+
relativeAccumulate: [number, number];
|
|
1150
|
+
};
|
|
1151
|
+
from: string | [number, number] | import('..').PolarPosition | {
|
|
1152
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1153
|
+
offset: [number, number];
|
|
1154
|
+
} | {
|
|
1155
|
+
relative: [number, number];
|
|
1156
|
+
} | {
|
|
1157
|
+
relativeAccumulate: [number, number];
|
|
1158
|
+
};
|
|
1159
|
+
roundedCorners?: number | undefined;
|
|
1009
1160
|
}>;
|
|
1010
1161
|
export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1011
1162
|
type: z.ZodLiteral<"step">;
|
|
@@ -1686,7 +1837,31 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1686
1837
|
kind: z.ZodLiteral<"arc">;
|
|
1687
1838
|
startAngle: z.ZodNumber;
|
|
1688
1839
|
endAngle: z.ZodNumber;
|
|
1689
|
-
radius: z.ZodNumber
|
|
1840
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
1841
|
+
radiusX: z.ZodOptional<z.ZodNumber>;
|
|
1842
|
+
radiusY: z.ZodOptional<z.ZodNumber>;
|
|
1843
|
+
center: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodString, z.ZodObject<{
|
|
1844
|
+
relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1845
|
+
}, "strip", z.ZodTypeAny, {
|
|
1846
|
+
relative: [number, number];
|
|
1847
|
+
}, {
|
|
1848
|
+
relative: [number, number];
|
|
1849
|
+
}>, z.ZodObject<{
|
|
1850
|
+
relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1851
|
+
}, "strip", z.ZodTypeAny, {
|
|
1852
|
+
relativeAccumulate: [number, number];
|
|
1853
|
+
}, {
|
|
1854
|
+
relativeAccumulate: [number, number];
|
|
1855
|
+
}>, z.ZodObject<{
|
|
1856
|
+
of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
|
|
1857
|
+
offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1858
|
+
}, "strip", z.ZodTypeAny, {
|
|
1859
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1860
|
+
offset: [number, number];
|
|
1861
|
+
}, {
|
|
1862
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1863
|
+
offset: [number, number];
|
|
1864
|
+
}>]>>;
|
|
1690
1865
|
label: z.ZodOptional<z.ZodObject<{
|
|
1691
1866
|
text: z.ZodString;
|
|
1692
1867
|
position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
|
|
@@ -1736,10 +1911,10 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1736
1911
|
}>>;
|
|
1737
1912
|
}, "strip", z.ZodTypeAny, {
|
|
1738
1913
|
type: "step";
|
|
1739
|
-
radius: number;
|
|
1740
1914
|
kind: "arc";
|
|
1741
1915
|
startAngle: number;
|
|
1742
1916
|
endAngle: number;
|
|
1917
|
+
radius?: number | undefined;
|
|
1743
1918
|
label?: {
|
|
1744
1919
|
text: string;
|
|
1745
1920
|
opacity?: number | undefined;
|
|
@@ -1753,12 +1928,22 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1753
1928
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
1754
1929
|
textColor?: string | undefined;
|
|
1755
1930
|
} | undefined;
|
|
1931
|
+
radiusX?: number | undefined;
|
|
1932
|
+
radiusY?: number | undefined;
|
|
1933
|
+
center?: string | [number, number] | import('..').PolarPosition | {
|
|
1934
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1935
|
+
offset: [number, number];
|
|
1936
|
+
} | {
|
|
1937
|
+
relative: [number, number];
|
|
1938
|
+
} | {
|
|
1939
|
+
relativeAccumulate: [number, number];
|
|
1940
|
+
} | undefined;
|
|
1756
1941
|
}, {
|
|
1757
1942
|
type: "step";
|
|
1758
|
-
radius: number;
|
|
1759
1943
|
kind: "arc";
|
|
1760
1944
|
startAngle: number;
|
|
1761
1945
|
endAngle: number;
|
|
1946
|
+
radius?: number | undefined;
|
|
1762
1947
|
label?: {
|
|
1763
1948
|
text: string;
|
|
1764
1949
|
opacity?: number | undefined;
|
|
@@ -1772,10 +1957,23 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1772
1957
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
1773
1958
|
textColor?: string | undefined;
|
|
1774
1959
|
} | undefined;
|
|
1960
|
+
radiusX?: number | undefined;
|
|
1961
|
+
radiusY?: number | undefined;
|
|
1962
|
+
center?: string | [number, number] | import('..').PolarPosition | {
|
|
1963
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
1964
|
+
offset: [number, number];
|
|
1965
|
+
} | {
|
|
1966
|
+
relative: [number, number];
|
|
1967
|
+
} | {
|
|
1968
|
+
relativeAccumulate: [number, number];
|
|
1969
|
+
} | undefined;
|
|
1775
1970
|
}>, z.ZodObject<{
|
|
1776
1971
|
type: z.ZodLiteral<"step">;
|
|
1777
1972
|
kind: z.ZodLiteral<"circlePath">;
|
|
1778
1973
|
radius: z.ZodNumber;
|
|
1974
|
+
startAngle: z.ZodOptional<z.ZodNumber>;
|
|
1975
|
+
endAngle: z.ZodOptional<z.ZodNumber>;
|
|
1976
|
+
closed: z.ZodOptional<z.ZodEnum<["closed", "chord", "open"]>>;
|
|
1779
1977
|
label: z.ZodOptional<z.ZodObject<{
|
|
1780
1978
|
text: z.ZodString;
|
|
1781
1979
|
position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
|
|
@@ -1840,6 +2038,9 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1840
2038
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
1841
2039
|
textColor?: string | undefined;
|
|
1842
2040
|
} | undefined;
|
|
2041
|
+
startAngle?: number | undefined;
|
|
2042
|
+
endAngle?: number | undefined;
|
|
2043
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
1843
2044
|
}, {
|
|
1844
2045
|
type: "step";
|
|
1845
2046
|
radius: number;
|
|
@@ -1857,11 +2058,17 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1857
2058
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
1858
2059
|
textColor?: string | undefined;
|
|
1859
2060
|
} | undefined;
|
|
2061
|
+
startAngle?: number | undefined;
|
|
2062
|
+
endAngle?: number | undefined;
|
|
2063
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
1860
2064
|
}>, z.ZodObject<{
|
|
1861
2065
|
type: z.ZodLiteral<"step">;
|
|
1862
2066
|
kind: z.ZodLiteral<"ellipsePath">;
|
|
1863
2067
|
radiusX: z.ZodNumber;
|
|
1864
2068
|
radiusY: z.ZodNumber;
|
|
2069
|
+
startAngle: z.ZodOptional<z.ZodNumber>;
|
|
2070
|
+
endAngle: z.ZodOptional<z.ZodNumber>;
|
|
2071
|
+
closed: z.ZodOptional<z.ZodEnum<["closed", "chord", "open"]>>;
|
|
1865
2072
|
label: z.ZodOptional<z.ZodObject<{
|
|
1866
2073
|
text: z.ZodString;
|
|
1867
2074
|
position: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["at-start", "very-near-start", "near-start", "midway", "near-end", "very-near-end", "at-end"]>, z.ZodNumber]>>;
|
|
@@ -1927,6 +2134,9 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1927
2134
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
1928
2135
|
textColor?: string | undefined;
|
|
1929
2136
|
} | undefined;
|
|
2137
|
+
startAngle?: number | undefined;
|
|
2138
|
+
endAngle?: number | undefined;
|
|
2139
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
1930
2140
|
}, {
|
|
1931
2141
|
type: "step";
|
|
1932
2142
|
kind: "ellipsePath";
|
|
@@ -1945,6 +2155,97 @@ export declare const StepSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
1945
2155
|
side?: "above" | "below" | "left" | "right" | "sloped" | undefined;
|
|
1946
2156
|
textColor?: string | undefined;
|
|
1947
2157
|
} | undefined;
|
|
2158
|
+
startAngle?: number | undefined;
|
|
2159
|
+
endAngle?: number | undefined;
|
|
2160
|
+
closed?: "open" | "closed" | "chord" | undefined;
|
|
2161
|
+
}>, z.ZodObject<{
|
|
2162
|
+
type: z.ZodLiteral<"step">;
|
|
2163
|
+
kind: z.ZodLiteral<"rectangle">;
|
|
2164
|
+
from: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodString, z.ZodObject<{
|
|
2165
|
+
relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2166
|
+
}, "strip", z.ZodTypeAny, {
|
|
2167
|
+
relative: [number, number];
|
|
2168
|
+
}, {
|
|
2169
|
+
relative: [number, number];
|
|
2170
|
+
}>, z.ZodObject<{
|
|
2171
|
+
relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2172
|
+
}, "strip", z.ZodTypeAny, {
|
|
2173
|
+
relativeAccumulate: [number, number];
|
|
2174
|
+
}, {
|
|
2175
|
+
relativeAccumulate: [number, number];
|
|
2176
|
+
}>, z.ZodObject<{
|
|
2177
|
+
of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
|
|
2178
|
+
offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2179
|
+
}, "strip", z.ZodTypeAny, {
|
|
2180
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2181
|
+
offset: [number, number];
|
|
2182
|
+
}, {
|
|
2183
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2184
|
+
offset: [number, number];
|
|
2185
|
+
}>]>;
|
|
2186
|
+
to: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>, z.ZodString, z.ZodObject<{
|
|
2187
|
+
relative: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2188
|
+
}, "strip", z.ZodTypeAny, {
|
|
2189
|
+
relative: [number, number];
|
|
2190
|
+
}, {
|
|
2191
|
+
relative: [number, number];
|
|
2192
|
+
}>, z.ZodObject<{
|
|
2193
|
+
relativeAccumulate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2194
|
+
}, "strip", z.ZodTypeAny, {
|
|
2195
|
+
relativeAccumulate: [number, number];
|
|
2196
|
+
}, {
|
|
2197
|
+
relativeAccumulate: [number, number];
|
|
2198
|
+
}>, z.ZodObject<{
|
|
2199
|
+
of: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodType<import('..').PolarPosition, z.ZodTypeDef, import('..').PolarPosition>]>;
|
|
2200
|
+
offset: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
2201
|
+
}, "strip", z.ZodTypeAny, {
|
|
2202
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2203
|
+
offset: [number, number];
|
|
2204
|
+
}, {
|
|
2205
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2206
|
+
offset: [number, number];
|
|
2207
|
+
}>]>;
|
|
2208
|
+
roundedCorners: z.ZodOptional<z.ZodNumber>;
|
|
2209
|
+
}, "strip", z.ZodTypeAny, {
|
|
2210
|
+
type: "step";
|
|
2211
|
+
kind: "rectangle";
|
|
2212
|
+
to: string | [number, number] | import('..').PolarPosition | {
|
|
2213
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2214
|
+
offset: [number, number];
|
|
2215
|
+
} | {
|
|
2216
|
+
relative: [number, number];
|
|
2217
|
+
} | {
|
|
2218
|
+
relativeAccumulate: [number, number];
|
|
2219
|
+
};
|
|
2220
|
+
from: string | [number, number] | import('..').PolarPosition | {
|
|
2221
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2222
|
+
offset: [number, number];
|
|
2223
|
+
} | {
|
|
2224
|
+
relative: [number, number];
|
|
2225
|
+
} | {
|
|
2226
|
+
relativeAccumulate: [number, number];
|
|
2227
|
+
};
|
|
2228
|
+
roundedCorners?: number | undefined;
|
|
2229
|
+
}, {
|
|
2230
|
+
type: "step";
|
|
2231
|
+
kind: "rectangle";
|
|
2232
|
+
to: string | [number, number] | import('..').PolarPosition | {
|
|
2233
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2234
|
+
offset: [number, number];
|
|
2235
|
+
} | {
|
|
2236
|
+
relative: [number, number];
|
|
2237
|
+
} | {
|
|
2238
|
+
relativeAccumulate: [number, number];
|
|
2239
|
+
};
|
|
2240
|
+
from: string | [number, number] | import('..').PolarPosition | {
|
|
2241
|
+
of: string | [number, number] | import('..').PolarPosition;
|
|
2242
|
+
offset: [number, number];
|
|
2243
|
+
} | {
|
|
2244
|
+
relative: [number, number];
|
|
2245
|
+
} | {
|
|
2246
|
+
relativeAccumulate: [number, number];
|
|
2247
|
+
};
|
|
2248
|
+
roundedCorners?: number | undefined;
|
|
1948
2249
|
}>]>;
|
|
1949
2250
|
/** Move step:移动游标但不绘制 */
|
|
1950
2251
|
export type IRMoveStep = z.infer<typeof MoveStepSchema>;
|
|
@@ -1966,9 +2267,11 @@ export type IRArcStep = z.infer<typeof ArcStepSchema>;
|
|
|
1966
2267
|
export type IRCirclePathStep = z.infer<typeof CirclePathStepSchema>;
|
|
1967
2268
|
/** EllipsePath step:以游标为圆心的整椭圆 */
|
|
1968
2269
|
export type IREllipsePathStep = z.infer<typeof EllipsePathStepSchema>;
|
|
2270
|
+
/** Rectangle step:两对角定义的轴对齐矩形(可圆角) */
|
|
2271
|
+
export type IRRectangleStep = z.infer<typeof RectangleStepSchema>;
|
|
1969
2272
|
/**
|
|
1970
|
-
*
|
|
1971
|
-
* @description
|
|
2273
|
+
* 路径上的一个动作(十一种 kind)
|
|
2274
|
+
* @description 十一种 kind:move / line / step(折角)/ cycle / curve / cubic / bend / arc / circlePath / ellipsePath / rectangle(矩形);`to` 字段支持 relative / relativeAccumulate 变体;除 move/cycle/rectangle 外可挂 `label?` 边标注
|
|
1972
2275
|
*/
|
|
1973
2276
|
export type IRStep = z.infer<typeof StepSchema>;
|
|
1974
2277
|
//# sourceMappingURL=step.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/ir/path/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDzB,CAAC;AAEJ,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQyC,CAAC;AAErE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS4C,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAA4B;AAC5B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1D,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,oCAAoC;AACpC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,gCAAgC;AAChC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,kCAAkC;AAClC,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,sCAAsC;AACtC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/es/ir/path/step.js
CHANGED
|
@@ -81,25 +81,49 @@ var BendStepSchema = z.object({
|
|
|
81
81
|
}).describe("Bend action: shorthand for an arc-like cubic; control points computed at compile time");
|
|
82
82
|
var ArcStepSchema = z.object({
|
|
83
83
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
84
|
-
kind: z.literal("arc").describe("Arc segment
|
|
84
|
+
kind: z.literal("arc").describe("Arc segment sweeping startAngle → endAngle around a center. Circular (radius) or elliptical (radiusX/radiusY). Center defaults to the cursor but can be set explicitly. Pen ends at the arc endpoint, not the center (TikZ `arc[start angle=…, end angle=…, radius=…]`)."),
|
|
85
85
|
startAngle: z.number().describe("Arc start angle in degrees, measured from +x axis. 0° = +x, 90° = +y = screen-down (visual clockwise under screen y-down); matches polar / Node label angle convention."),
|
|
86
86
|
endAngle: z.number().describe("Arc end angle in degrees; sweep direction inferred from startAngle vs endAngle"),
|
|
87
|
-
radius: z.number().positive().describe("
|
|
87
|
+
radius: z.number().positive().optional().describe("Circular arc radius in user units. Give EITHER radius (circular) OR both radiusX and radiusY (elliptical), never both — enforced by the sugar/compile layer, not schema."),
|
|
88
|
+
radiusX: z.number().positive().optional().describe("Elliptical arc x-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
89
|
+
radiusY: z.number().positive().optional().describe("Elliptical arc y-axis radius; requires radiusX and radiusY together (mutually exclusive with radius)."),
|
|
90
|
+
center: TargetSchema.optional().describe("Explicit arc center. Defaults to the cursor (previous step anchor) for backward compatibility; set it to anchor the arc independently of the cursor (used by <Sector> to draw a correct wedge)."),
|
|
88
91
|
label: StepLabelSchema.optional().describe("Edge label attached to this arc")
|
|
89
|
-
}).describe("Arc action:
|
|
92
|
+
}).describe("Arc action: circular (radius) or elliptical (radiusX/radiusY) arc around a center (cursor by default, or explicit). Pen is left at the arc endpoint.");
|
|
90
93
|
var CirclePathStepSchema = z.object({
|
|
91
94
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
92
|
-
kind: z.literal("circlePath").describe("
|
|
95
|
+
kind: z.literal("circlePath").describe("Circle centered at the cursor. Without angles: a full circle (TikZ `circle[radius=…]`), pen returns to center. With startAngle + endAngle: a partial arc closed per `closed` (half circle / segment)."),
|
|
93
96
|
radius: z.number().positive().describe("Circle radius in user units"),
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
startAngle: z.number().optional().describe("Partial-circle start angle in degrees (same convention as arc: 0°=+x, 90°=+y screen-down). Give both startAngle and endAngle for a partial circle, or neither for a full circle (enforced by the sugar/compile layer, not schema)."),
|
|
98
|
+
endAngle: z.number().optional().describe("Partial-circle end angle in degrees; sweep direction inferred from startAngle vs endAngle."),
|
|
99
|
+
closed: z.enum([
|
|
100
|
+
"closed",
|
|
101
|
+
"chord",
|
|
102
|
+
"open"
|
|
103
|
+
]).optional().describe("Closing mode. 'closed' = full circle (only valid with no angles; the default then). With angles: 'chord' (straight chord between the two arc ends → half circle / segment; default) or 'open' (pure unclosed arc)."),
|
|
104
|
+
label: StepLabelSchema.optional().describe("Edge label attached to this circle")
|
|
105
|
+
}).describe("CirclePath action: full circle (no angles, pen returns to center) or partial arc (with angles, closed per chord/open).");
|
|
96
106
|
var EllipsePathStepSchema = z.object({
|
|
97
107
|
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
98
|
-
kind: z.literal("ellipsePath").describe("
|
|
108
|
+
kind: z.literal("ellipsePath").describe("Ellipse centered at the cursor. Without angles: a full ellipse (TikZ `ellipse[x radius=…, y radius=…]`), pen returns to center. With startAngle + endAngle: a partial elliptical arc closed per `closed`."),
|
|
99
109
|
radiusX: z.number().positive().describe("Ellipse x-axis radius (semi-major or semi-minor on x)"),
|
|
100
110
|
radiusY: z.number().positive().describe("Ellipse y-axis radius (semi-major or semi-minor on y)"),
|
|
101
|
-
|
|
102
|
-
|
|
111
|
+
startAngle: z.number().optional().describe("Partial-ellipse start angle in degrees (parametric, same convention as arc). Give both startAngle and endAngle for a partial ellipse, or neither for a full ellipse."),
|
|
112
|
+
endAngle: z.number().optional().describe("Partial-ellipse end angle in degrees."),
|
|
113
|
+
closed: z.enum([
|
|
114
|
+
"closed",
|
|
115
|
+
"chord",
|
|
116
|
+
"open"
|
|
117
|
+
]).optional().describe("Closing mode. 'closed' = full ellipse (only valid with no angles; default then). With angles: 'chord' (chord between arc ends; default) or 'open' (pure unclosed arc)."),
|
|
118
|
+
label: StepLabelSchema.optional().describe("Edge label attached to this ellipse")
|
|
119
|
+
}).describe("EllipsePath action: full ellipse (no angles, pen returns to center) or partial elliptical arc (with angles, closed per chord/open).");
|
|
120
|
+
var RectangleStepSchema = z.object({
|
|
121
|
+
type: z.literal("step").describe("Discriminator marking this as a path step node"),
|
|
122
|
+
kind: z.literal("rectangle").describe("Axis-aligned rectangle between two opposite corners (TikZ `(a) rectangle (b)`); compiled to path commands (4 lines + close, or rounded corners via quarter arcs). Self-contained: corners come from from/to, not the cursor."),
|
|
123
|
+
from: TargetSchema.describe("One corner of the rectangle"),
|
|
124
|
+
to: TargetSchema.describe("The opposite corner; order is irrelevant (compile normalizes to min/max)"),
|
|
125
|
+
roundedCorners: z.number().nonnegative().optional().describe("Single corner radius applied to all four corners; omitted = sharp corners. Clamped to half the smaller side at compile time.")
|
|
126
|
+
}).describe("Rectangle action: closed axis-aligned rectangle (optionally rounded) drawn between two opposite corners.");
|
|
103
127
|
var StepSchema = z.discriminatedUnion("kind", [
|
|
104
128
|
MoveStepSchema,
|
|
105
129
|
LineStepSchema,
|
|
@@ -110,7 +134,8 @@ var StepSchema = z.discriminatedUnion("kind", [
|
|
|
110
134
|
BendStepSchema,
|
|
111
135
|
ArcStepSchema,
|
|
112
136
|
CirclePathStepSchema,
|
|
113
|
-
EllipsePathStepSchema
|
|
137
|
+
EllipsePathStepSchema,
|
|
138
|
+
RectangleStepSchema
|
|
114
139
|
]).describe("A single path action; the discriminator field is `kind`");
|
|
115
140
|
//#endregion
|
|
116
|
-
export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, LineStepSchema, MoveStepSchema, StepLabelSchema, StepSchema };
|
|
141
|
+
export { ArcStepSchema, BendStepSchema, CirclePathStepSchema, ControlPointSchema, CubicStepSchema, CurveStepSchema, CycleStepSchema, EllipsePathStepSchema, FoldStepSchema, LineStepSchema, MoveStepSchema, RectangleStepSchema, StepLabelSchema, StepSchema };
|