@mathscan/math-exercise-engine 1.1.16 → 1.1.17
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/index.d.ts +596 -194
- package/dist/index.js +494 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +494 -11
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +95 -0
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,8 @@ export declare const AST_TYPES: {
|
|
|
55
55
|
readonly VOP_CARRY_ROW: "VopCarryRow";
|
|
56
56
|
/** Number line layout block */
|
|
57
57
|
readonly NUMBER_LINE_BLOCK: "NumberLineBlock";
|
|
58
|
+
/** Symmetry exercise on a square grid */
|
|
59
|
+
readonly GRID_SYMMETRY_BLOCK: "GridSymmetryBlock";
|
|
58
60
|
/** A position marker on the number line */
|
|
59
61
|
readonly NUMBER_LINE_POSITION: "NumberLinePosition";
|
|
60
62
|
/** A draggable cursor on the number line */
|
|
@@ -636,8 +638,15 @@ export declare function compileWithAST(dsl: string): {
|
|
|
636
638
|
}[] | undefined;
|
|
637
639
|
dragMode?: "axis" | "inputs" | undefined;
|
|
638
640
|
} | {
|
|
639
|
-
|
|
641
|
+
axis: "horizontal" | "vertical";
|
|
642
|
+
type: "GridSymmetryBlock";
|
|
643
|
+
rows: number;
|
|
640
644
|
cols: number;
|
|
645
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
646
|
+
cellSize: number;
|
|
647
|
+
cells: [number, number][];
|
|
648
|
+
} | {
|
|
649
|
+
type: "TableBlock";
|
|
641
650
|
rows: {
|
|
642
651
|
type: "TableRow";
|
|
643
652
|
cells: {
|
|
@@ -726,7 +735,9 @@ export declare function compileWithAST(dsl: string): {
|
|
|
726
735
|
}[];
|
|
727
736
|
backgroundColor?: string | undefined;
|
|
728
737
|
}[];
|
|
738
|
+
cols: number;
|
|
729
739
|
} | {
|
|
740
|
+
type: "VerticalOperationBlock";
|
|
730
741
|
items: ({
|
|
731
742
|
type: "VopRow";
|
|
732
743
|
cells: ({
|
|
@@ -797,17 +808,17 @@ export declare function compileWithAST(dsl: string): {
|
|
|
797
808
|
} | {
|
|
798
809
|
type: "VopSeparator";
|
|
799
810
|
})[];
|
|
800
|
-
type: "VerticalOperationBlock";
|
|
801
811
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
802
812
|
} | {
|
|
803
|
-
type: "RadioOptions";
|
|
804
813
|
options: string[];
|
|
814
|
+
type: "RadioOptions";
|
|
805
815
|
name: string;
|
|
806
816
|
answer: string;
|
|
807
817
|
} | {
|
|
808
818
|
type: "MatcherBlock";
|
|
809
819
|
name: string;
|
|
810
820
|
rows: {
|
|
821
|
+
type: "MatcherRow";
|
|
811
822
|
items: {
|
|
812
823
|
type: "MatcherItem";
|
|
813
824
|
inlines: ({
|
|
@@ -857,7 +868,6 @@ export declare function compileWithAST(dsl: string): {
|
|
|
857
868
|
})[];
|
|
858
869
|
itemId: string;
|
|
859
870
|
}[];
|
|
860
|
-
type: "MatcherRow";
|
|
861
871
|
}[];
|
|
862
872
|
answers: string[][];
|
|
863
873
|
colors?: string[] | undefined;
|
|
@@ -964,10 +974,6 @@ export declare function compileWithAST(dsl: string): {
|
|
|
964
974
|
itemId: string;
|
|
965
975
|
}[];
|
|
966
976
|
})[];
|
|
967
|
-
question?: {
|
|
968
|
-
value: string;
|
|
969
|
-
type: "TextBlock";
|
|
970
|
-
} | undefined;
|
|
971
977
|
validation?: {
|
|
972
978
|
type: "SimpleValidation";
|
|
973
979
|
} | {
|
|
@@ -977,9 +983,13 @@ export declare function compileWithAST(dsl: string): {
|
|
|
977
983
|
expression: string;
|
|
978
984
|
type: "MixedValidation";
|
|
979
985
|
} | undefined;
|
|
986
|
+
question?: {
|
|
987
|
+
value: string;
|
|
988
|
+
type: "TextBlock";
|
|
989
|
+
} | undefined;
|
|
980
990
|
tools?: ({
|
|
981
|
-
type: "DragOptions";
|
|
982
991
|
options: string[];
|
|
992
|
+
type: "DragOptions";
|
|
983
993
|
} | {
|
|
984
994
|
type: "NumericKeypad";
|
|
985
995
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -1010,14 +1020,14 @@ export declare function compileWithAST(dsl: string): {
|
|
|
1010
1020
|
digits: number;
|
|
1011
1021
|
placeholder?: string | undefined;
|
|
1012
1022
|
} | {
|
|
1013
|
-
type: "drag-options";
|
|
1014
1023
|
options: string[];
|
|
1024
|
+
type: "drag-options";
|
|
1015
1025
|
} | {
|
|
1016
1026
|
value: string;
|
|
1017
1027
|
type: "inline-drag-option";
|
|
1018
1028
|
} | {
|
|
1019
|
-
type: "radio-options";
|
|
1020
1029
|
options: string[];
|
|
1030
|
+
type: "radio-options";
|
|
1021
1031
|
} | {
|
|
1022
1032
|
type: "numeric-keypad";
|
|
1023
1033
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -1032,13 +1042,13 @@ export declare function compileWithAST(dsl: string): {
|
|
|
1032
1042
|
} | {
|
|
1033
1043
|
type: "matcher";
|
|
1034
1044
|
rows: {
|
|
1045
|
+
type: "matcher-row";
|
|
1035
1046
|
items: {
|
|
1036
1047
|
type: "matcher-item";
|
|
1037
1048
|
itemId: string;
|
|
1038
1049
|
id: string;
|
|
1039
1050
|
content: any[];
|
|
1040
1051
|
}[];
|
|
1041
|
-
type: "matcher-row";
|
|
1042
1052
|
id: string;
|
|
1043
1053
|
}[];
|
|
1044
1054
|
groupCount: number;
|
|
@@ -1066,6 +1076,14 @@ export declare function compileWithAST(dsl: string): {
|
|
|
1066
1076
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
1067
1077
|
label?: string | undefined;
|
|
1068
1078
|
size?: number | undefined;
|
|
1079
|
+
} | {
|
|
1080
|
+
axis: "horizontal" | "vertical";
|
|
1081
|
+
type: "grid-symmetry";
|
|
1082
|
+
rows: number;
|
|
1083
|
+
cols: number;
|
|
1084
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
1085
|
+
cellSize: number;
|
|
1086
|
+
cells: [number, number][];
|
|
1069
1087
|
} | {
|
|
1070
1088
|
type: "ruler";
|
|
1071
1089
|
size?: number | undefined;
|
|
@@ -1079,7 +1097,7 @@ export declare function compileWithAST(dsl: string): {
|
|
|
1079
1097
|
validation?: {
|
|
1080
1098
|
mode: "simple" | "expression" | "mixed";
|
|
1081
1099
|
expression?: string | undefined;
|
|
1082
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
1100
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
1083
1101
|
variables?: string[] | undefined;
|
|
1084
1102
|
} | undefined;
|
|
1085
1103
|
id?: string | undefined;
|
|
@@ -1092,6 +1110,22 @@ export declare function compileWithAST(dsl: string): {
|
|
|
1092
1110
|
};
|
|
1093
1111
|
};
|
|
1094
1112
|
|
|
1113
|
+
export declare function computeGridSymmetryCellsToFill(data: {
|
|
1114
|
+
rows: number;
|
|
1115
|
+
cols: number;
|
|
1116
|
+
axis: GridSymmetryAxis;
|
|
1117
|
+
interactiveArea: GridSymmetryInteractiveArea;
|
|
1118
|
+
cells: GridCell[];
|
|
1119
|
+
}): GridCell[];
|
|
1120
|
+
|
|
1121
|
+
export declare function computeGridSymmetryExpectedCells(data: {
|
|
1122
|
+
rows: number;
|
|
1123
|
+
cols: number;
|
|
1124
|
+
axis: GridSymmetryAxis;
|
|
1125
|
+
interactiveArea: GridSymmetryInteractiveArea;
|
|
1126
|
+
cells: GridCell[];
|
|
1127
|
+
}): GridCell[];
|
|
1128
|
+
|
|
1095
1129
|
export declare type ContentBlock = z.infer<typeof ContentBlockSchema>;
|
|
1096
1130
|
|
|
1097
1131
|
export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
@@ -2115,7 +2149,6 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2115
2149
|
}>, "many">;
|
|
2116
2150
|
}, "strip", z.ZodTypeAny, {
|
|
2117
2151
|
type: "TableBlock";
|
|
2118
|
-
cols: number;
|
|
2119
2152
|
rows: {
|
|
2120
2153
|
type: "TableRow";
|
|
2121
2154
|
cells: {
|
|
@@ -2204,9 +2237,9 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2204
2237
|
}[];
|
|
2205
2238
|
backgroundColor?: string | undefined;
|
|
2206
2239
|
}[];
|
|
2240
|
+
cols: number;
|
|
2207
2241
|
}, {
|
|
2208
2242
|
type: "TableBlock";
|
|
2209
|
-
cols: number;
|
|
2210
2243
|
rows: {
|
|
2211
2244
|
type: "TableRow";
|
|
2212
2245
|
cells: {
|
|
@@ -2295,19 +2328,20 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2295
2328
|
}[];
|
|
2296
2329
|
backgroundColor?: string | undefined;
|
|
2297
2330
|
}[];
|
|
2331
|
+
cols: number;
|
|
2298
2332
|
}>, z.ZodObject<{
|
|
2299
2333
|
type: z.ZodLiteral<"RadioOptions">;
|
|
2300
2334
|
name: z.ZodString;
|
|
2301
2335
|
options: z.ZodArray<z.ZodString, "many">;
|
|
2302
2336
|
answer: z.ZodString;
|
|
2303
2337
|
}, "strip", z.ZodTypeAny, {
|
|
2304
|
-
type: "RadioOptions";
|
|
2305
2338
|
options: string[];
|
|
2339
|
+
type: "RadioOptions";
|
|
2306
2340
|
name: string;
|
|
2307
2341
|
answer: string;
|
|
2308
2342
|
}, {
|
|
2309
|
-
type: "RadioOptions";
|
|
2310
2343
|
options: string[];
|
|
2344
|
+
type: "RadioOptions";
|
|
2311
2345
|
name: string;
|
|
2312
2346
|
answer: string;
|
|
2313
2347
|
}>, z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
@@ -4900,6 +4934,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
4900
4934
|
itemId: string;
|
|
4901
4935
|
}>, "many">;
|
|
4902
4936
|
}, "strip", z.ZodTypeAny, {
|
|
4937
|
+
type: "MatcherRow";
|
|
4903
4938
|
items: {
|
|
4904
4939
|
type: "MatcherItem";
|
|
4905
4940
|
inlines: ({
|
|
@@ -4949,8 +4984,8 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
4949
4984
|
})[];
|
|
4950
4985
|
itemId: string;
|
|
4951
4986
|
}[];
|
|
4952
|
-
type: "MatcherRow";
|
|
4953
4987
|
}, {
|
|
4988
|
+
type: "MatcherRow";
|
|
4954
4989
|
items: {
|
|
4955
4990
|
type: "MatcherItem";
|
|
4956
4991
|
inlines: ({
|
|
@@ -5000,13 +5035,13 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5000
5035
|
})[];
|
|
5001
5036
|
itemId: string;
|
|
5002
5037
|
}[];
|
|
5003
|
-
type: "MatcherRow";
|
|
5004
5038
|
}>, "many">;
|
|
5005
5039
|
answers: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
|
|
5006
5040
|
}, "strip", z.ZodTypeAny, {
|
|
5007
5041
|
type: "MatcherBlock";
|
|
5008
5042
|
name: string;
|
|
5009
5043
|
rows: {
|
|
5044
|
+
type: "MatcherRow";
|
|
5010
5045
|
items: {
|
|
5011
5046
|
type: "MatcherItem";
|
|
5012
5047
|
inlines: ({
|
|
@@ -5056,7 +5091,6 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5056
5091
|
})[];
|
|
5057
5092
|
itemId: string;
|
|
5058
5093
|
}[];
|
|
5059
|
-
type: "MatcherRow";
|
|
5060
5094
|
}[];
|
|
5061
5095
|
answers: string[][];
|
|
5062
5096
|
colors?: string[] | undefined;
|
|
@@ -5064,6 +5098,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5064
5098
|
type: "MatcherBlock";
|
|
5065
5099
|
name: string;
|
|
5066
5100
|
rows: {
|
|
5101
|
+
type: "MatcherRow";
|
|
5067
5102
|
items: {
|
|
5068
5103
|
type: "MatcherItem";
|
|
5069
5104
|
inlines: ({
|
|
@@ -5113,7 +5148,6 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5113
5148
|
})[];
|
|
5114
5149
|
itemId: string;
|
|
5115
5150
|
}[];
|
|
5116
|
-
type: "MatcherRow";
|
|
5117
5151
|
}[];
|
|
5118
5152
|
answers: string[][];
|
|
5119
5153
|
colors?: string[] | undefined;
|
|
@@ -5121,6 +5155,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5121
5155
|
type: "MatcherBlock";
|
|
5122
5156
|
name: string;
|
|
5123
5157
|
rows: {
|
|
5158
|
+
type: "MatcherRow";
|
|
5124
5159
|
items: {
|
|
5125
5160
|
type: "MatcherItem";
|
|
5126
5161
|
inlines: ({
|
|
@@ -5170,7 +5205,6 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5170
5205
|
})[];
|
|
5171
5206
|
itemId: string;
|
|
5172
5207
|
}[];
|
|
5173
|
-
type: "MatcherRow";
|
|
5174
5208
|
}[];
|
|
5175
5209
|
answers: string[][];
|
|
5176
5210
|
colors?: string[] | undefined;
|
|
@@ -5178,6 +5212,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5178
5212
|
type: "MatcherBlock";
|
|
5179
5213
|
name: string;
|
|
5180
5214
|
rows: {
|
|
5215
|
+
type: "MatcherRow";
|
|
5181
5216
|
items: {
|
|
5182
5217
|
type: "MatcherItem";
|
|
5183
5218
|
inlines: ({
|
|
@@ -5227,7 +5262,6 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5227
5262
|
})[];
|
|
5228
5263
|
itemId: string;
|
|
5229
5264
|
}[];
|
|
5230
|
-
type: "MatcherRow";
|
|
5231
5265
|
}[];
|
|
5232
5266
|
answers: string[][];
|
|
5233
5267
|
colors?: string[] | undefined;
|
|
@@ -6553,6 +6587,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6553
6587
|
type: "VopSeparator";
|
|
6554
6588
|
}>]>, "many">;
|
|
6555
6589
|
}, "strip", z.ZodTypeAny, {
|
|
6590
|
+
type: "VerticalOperationBlock";
|
|
6556
6591
|
items: ({
|
|
6557
6592
|
type: "VopRow";
|
|
6558
6593
|
cells: ({
|
|
@@ -6623,9 +6658,9 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6623
6658
|
} | {
|
|
6624
6659
|
type: "VopSeparator";
|
|
6625
6660
|
})[];
|
|
6626
|
-
type: "VerticalOperationBlock";
|
|
6627
6661
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
6628
6662
|
}, {
|
|
6663
|
+
type: "VerticalOperationBlock";
|
|
6629
6664
|
items: ({
|
|
6630
6665
|
type: "VopRow";
|
|
6631
6666
|
cells: ({
|
|
@@ -6696,8 +6731,47 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6696
6731
|
} | {
|
|
6697
6732
|
type: "VopSeparator";
|
|
6698
6733
|
})[];
|
|
6699
|
-
type: "VerticalOperationBlock";
|
|
6700
6734
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
6735
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
6736
|
+
type: z.ZodLiteral<"GridSymmetryBlock">;
|
|
6737
|
+
rows: z.ZodNumber;
|
|
6738
|
+
cols: z.ZodNumber;
|
|
6739
|
+
axis: z.ZodEnum<["vertical", "horizontal"]>;
|
|
6740
|
+
interactiveArea: z.ZodEnum<["left", "right", "top", "bottom"]>;
|
|
6741
|
+
cellSize: z.ZodDefault<z.ZodNumber>;
|
|
6742
|
+
cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
6743
|
+
}, "strip", z.ZodTypeAny, {
|
|
6744
|
+
axis: "horizontal" | "vertical";
|
|
6745
|
+
type: "GridSymmetryBlock";
|
|
6746
|
+
rows: number;
|
|
6747
|
+
cols: number;
|
|
6748
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
6749
|
+
cellSize: number;
|
|
6750
|
+
cells: [number, number][];
|
|
6751
|
+
}, {
|
|
6752
|
+
axis: "horizontal" | "vertical";
|
|
6753
|
+
type: "GridSymmetryBlock";
|
|
6754
|
+
rows: number;
|
|
6755
|
+
cols: number;
|
|
6756
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
6757
|
+
cells: [number, number][];
|
|
6758
|
+
cellSize?: number | undefined;
|
|
6759
|
+
}>, {
|
|
6760
|
+
axis: "horizontal" | "vertical";
|
|
6761
|
+
type: "GridSymmetryBlock";
|
|
6762
|
+
rows: number;
|
|
6763
|
+
cols: number;
|
|
6764
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
6765
|
+
cellSize: number;
|
|
6766
|
+
cells: [number, number][];
|
|
6767
|
+
}, {
|
|
6768
|
+
axis: "horizontal" | "vertical";
|
|
6769
|
+
type: "GridSymmetryBlock";
|
|
6770
|
+
rows: number;
|
|
6771
|
+
cols: number;
|
|
6772
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
6773
|
+
cells: [number, number][];
|
|
6774
|
+
cellSize?: number | undefined;
|
|
6701
6775
|
}>]>;
|
|
6702
6776
|
|
|
6703
6777
|
/**
|
|
@@ -6751,6 +6825,8 @@ export declare function createFraction(name: string, options?: {
|
|
|
6751
6825
|
*/
|
|
6752
6826
|
export declare function createFreeText(value: string): FreeTextInline;
|
|
6753
6827
|
|
|
6828
|
+
export declare function createGridSymmetryBlock(rows: number, cols: number, axis: GridSymmetryAxis, interactiveArea: GridSymmetryInteractiveArea, cells: GridCell[], cellSize?: number): GridSymmetryBlock;
|
|
6829
|
+
|
|
6754
6830
|
/**
|
|
6755
6831
|
* Create a highlighted text inline element
|
|
6756
6832
|
*/
|
|
@@ -7068,11 +7144,11 @@ export declare const DragOptionsJSONSchema: z.ZodObject<{
|
|
|
7068
7144
|
type: z.ZodLiteral<"drag-options">;
|
|
7069
7145
|
options: z.ZodArray<z.ZodString, "many">;
|
|
7070
7146
|
}, "strip", z.ZodTypeAny, {
|
|
7071
|
-
type: "drag-options";
|
|
7072
7147
|
options: string[];
|
|
7073
|
-
}, {
|
|
7074
7148
|
type: "drag-options";
|
|
7149
|
+
}, {
|
|
7075
7150
|
options: string[];
|
|
7151
|
+
type: "drag-options";
|
|
7076
7152
|
}>;
|
|
7077
7153
|
|
|
7078
7154
|
export declare type DragOptionsTool = z.infer<typeof DragOptionsToolSchema>;
|
|
@@ -7095,11 +7171,11 @@ export declare const DragOptionsToolSchema: z.ZodObject<{
|
|
|
7095
7171
|
type: z.ZodLiteral<"DragOptions">;
|
|
7096
7172
|
options: z.ZodArray<z.ZodString, "many">;
|
|
7097
7173
|
}, "strip", z.ZodTypeAny, {
|
|
7098
|
-
type: "DragOptions";
|
|
7099
7174
|
options: string[];
|
|
7100
|
-
}, {
|
|
7101
7175
|
type: "DragOptions";
|
|
7176
|
+
}, {
|
|
7102
7177
|
options: string[];
|
|
7178
|
+
type: "DragOptions";
|
|
7103
7179
|
}>;
|
|
7104
7180
|
|
|
7105
7181
|
/**
|
|
@@ -8188,7 +8264,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
8188
8264
|
}>, "many">;
|
|
8189
8265
|
}, "strip", z.ZodTypeAny, {
|
|
8190
8266
|
type: "TableBlock";
|
|
8191
|
-
cols: number;
|
|
8192
8267
|
rows: {
|
|
8193
8268
|
type: "TableRow";
|
|
8194
8269
|
cells: {
|
|
@@ -8277,9 +8352,9 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
8277
8352
|
}[];
|
|
8278
8353
|
backgroundColor?: string | undefined;
|
|
8279
8354
|
}[];
|
|
8355
|
+
cols: number;
|
|
8280
8356
|
}, {
|
|
8281
8357
|
type: "TableBlock";
|
|
8282
|
-
cols: number;
|
|
8283
8358
|
rows: {
|
|
8284
8359
|
type: "TableRow";
|
|
8285
8360
|
cells: {
|
|
@@ -8368,19 +8443,20 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
8368
8443
|
}[];
|
|
8369
8444
|
backgroundColor?: string | undefined;
|
|
8370
8445
|
}[];
|
|
8446
|
+
cols: number;
|
|
8371
8447
|
}>, z.ZodObject<{
|
|
8372
8448
|
type: z.ZodLiteral<"RadioOptions">;
|
|
8373
8449
|
name: z.ZodString;
|
|
8374
8450
|
options: z.ZodArray<z.ZodString, "many">;
|
|
8375
8451
|
answer: z.ZodString;
|
|
8376
8452
|
}, "strip", z.ZodTypeAny, {
|
|
8377
|
-
type: "RadioOptions";
|
|
8378
8453
|
options: string[];
|
|
8454
|
+
type: "RadioOptions";
|
|
8379
8455
|
name: string;
|
|
8380
8456
|
answer: string;
|
|
8381
8457
|
}, {
|
|
8382
|
-
type: "RadioOptions";
|
|
8383
8458
|
options: string[];
|
|
8459
|
+
type: "RadioOptions";
|
|
8384
8460
|
name: string;
|
|
8385
8461
|
answer: string;
|
|
8386
8462
|
}>, z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
@@ -10973,6 +11049,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
10973
11049
|
itemId: string;
|
|
10974
11050
|
}>, "many">;
|
|
10975
11051
|
}, "strip", z.ZodTypeAny, {
|
|
11052
|
+
type: "MatcherRow";
|
|
10976
11053
|
items: {
|
|
10977
11054
|
type: "MatcherItem";
|
|
10978
11055
|
inlines: ({
|
|
@@ -11022,8 +11099,8 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11022
11099
|
})[];
|
|
11023
11100
|
itemId: string;
|
|
11024
11101
|
}[];
|
|
11025
|
-
type: "MatcherRow";
|
|
11026
11102
|
}, {
|
|
11103
|
+
type: "MatcherRow";
|
|
11027
11104
|
items: {
|
|
11028
11105
|
type: "MatcherItem";
|
|
11029
11106
|
inlines: ({
|
|
@@ -11073,13 +11150,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11073
11150
|
})[];
|
|
11074
11151
|
itemId: string;
|
|
11075
11152
|
}[];
|
|
11076
|
-
type: "MatcherRow";
|
|
11077
11153
|
}>, "many">;
|
|
11078
11154
|
answers: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
|
|
11079
11155
|
}, "strip", z.ZodTypeAny, {
|
|
11080
11156
|
type: "MatcherBlock";
|
|
11081
11157
|
name: string;
|
|
11082
11158
|
rows: {
|
|
11159
|
+
type: "MatcherRow";
|
|
11083
11160
|
items: {
|
|
11084
11161
|
type: "MatcherItem";
|
|
11085
11162
|
inlines: ({
|
|
@@ -11129,7 +11206,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11129
11206
|
})[];
|
|
11130
11207
|
itemId: string;
|
|
11131
11208
|
}[];
|
|
11132
|
-
type: "MatcherRow";
|
|
11133
11209
|
}[];
|
|
11134
11210
|
answers: string[][];
|
|
11135
11211
|
colors?: string[] | undefined;
|
|
@@ -11137,6 +11213,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11137
11213
|
type: "MatcherBlock";
|
|
11138
11214
|
name: string;
|
|
11139
11215
|
rows: {
|
|
11216
|
+
type: "MatcherRow";
|
|
11140
11217
|
items: {
|
|
11141
11218
|
type: "MatcherItem";
|
|
11142
11219
|
inlines: ({
|
|
@@ -11186,7 +11263,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11186
11263
|
})[];
|
|
11187
11264
|
itemId: string;
|
|
11188
11265
|
}[];
|
|
11189
|
-
type: "MatcherRow";
|
|
11190
11266
|
}[];
|
|
11191
11267
|
answers: string[][];
|
|
11192
11268
|
colors?: string[] | undefined;
|
|
@@ -11194,6 +11270,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11194
11270
|
type: "MatcherBlock";
|
|
11195
11271
|
name: string;
|
|
11196
11272
|
rows: {
|
|
11273
|
+
type: "MatcherRow";
|
|
11197
11274
|
items: {
|
|
11198
11275
|
type: "MatcherItem";
|
|
11199
11276
|
inlines: ({
|
|
@@ -11243,7 +11320,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11243
11320
|
})[];
|
|
11244
11321
|
itemId: string;
|
|
11245
11322
|
}[];
|
|
11246
|
-
type: "MatcherRow";
|
|
11247
11323
|
}[];
|
|
11248
11324
|
answers: string[][];
|
|
11249
11325
|
colors?: string[] | undefined;
|
|
@@ -11251,6 +11327,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11251
11327
|
type: "MatcherBlock";
|
|
11252
11328
|
name: string;
|
|
11253
11329
|
rows: {
|
|
11330
|
+
type: "MatcherRow";
|
|
11254
11331
|
items: {
|
|
11255
11332
|
type: "MatcherItem";
|
|
11256
11333
|
inlines: ({
|
|
@@ -11300,7 +11377,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11300
11377
|
})[];
|
|
11301
11378
|
itemId: string;
|
|
11302
11379
|
}[];
|
|
11303
|
-
type: "MatcherRow";
|
|
11304
11380
|
}[];
|
|
11305
11381
|
answers: string[][];
|
|
11306
11382
|
colors?: string[] | undefined;
|
|
@@ -12626,6 +12702,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12626
12702
|
type: "VopSeparator";
|
|
12627
12703
|
}>]>, "many">;
|
|
12628
12704
|
}, "strip", z.ZodTypeAny, {
|
|
12705
|
+
type: "VerticalOperationBlock";
|
|
12629
12706
|
items: ({
|
|
12630
12707
|
type: "VopRow";
|
|
12631
12708
|
cells: ({
|
|
@@ -12696,9 +12773,9 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12696
12773
|
} | {
|
|
12697
12774
|
type: "VopSeparator";
|
|
12698
12775
|
})[];
|
|
12699
|
-
type: "VerticalOperationBlock";
|
|
12700
12776
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
12701
12777
|
}, {
|
|
12778
|
+
type: "VerticalOperationBlock";
|
|
12702
12779
|
items: ({
|
|
12703
12780
|
type: "VopRow";
|
|
12704
12781
|
cells: ({
|
|
@@ -12769,18 +12846,57 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12769
12846
|
} | {
|
|
12770
12847
|
type: "VopSeparator";
|
|
12771
12848
|
})[];
|
|
12772
|
-
type: "VerticalOperationBlock";
|
|
12773
12849
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
12850
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
12851
|
+
type: z.ZodLiteral<"GridSymmetryBlock">;
|
|
12852
|
+
rows: z.ZodNumber;
|
|
12853
|
+
cols: z.ZodNumber;
|
|
12854
|
+
axis: z.ZodEnum<["vertical", "horizontal"]>;
|
|
12855
|
+
interactiveArea: z.ZodEnum<["left", "right", "top", "bottom"]>;
|
|
12856
|
+
cellSize: z.ZodDefault<z.ZodNumber>;
|
|
12857
|
+
cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
12858
|
+
}, "strip", z.ZodTypeAny, {
|
|
12859
|
+
axis: "horizontal" | "vertical";
|
|
12860
|
+
type: "GridSymmetryBlock";
|
|
12861
|
+
rows: number;
|
|
12862
|
+
cols: number;
|
|
12863
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
12864
|
+
cellSize: number;
|
|
12865
|
+
cells: [number, number][];
|
|
12866
|
+
}, {
|
|
12867
|
+
axis: "horizontal" | "vertical";
|
|
12868
|
+
type: "GridSymmetryBlock";
|
|
12869
|
+
rows: number;
|
|
12870
|
+
cols: number;
|
|
12871
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
12872
|
+
cells: [number, number][];
|
|
12873
|
+
cellSize?: number | undefined;
|
|
12874
|
+
}>, {
|
|
12875
|
+
axis: "horizontal" | "vertical";
|
|
12876
|
+
type: "GridSymmetryBlock";
|
|
12877
|
+
rows: number;
|
|
12878
|
+
cols: number;
|
|
12879
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
12880
|
+
cellSize: number;
|
|
12881
|
+
cells: [number, number][];
|
|
12882
|
+
}, {
|
|
12883
|
+
axis: "horizontal" | "vertical";
|
|
12884
|
+
type: "GridSymmetryBlock";
|
|
12885
|
+
rows: number;
|
|
12886
|
+
cols: number;
|
|
12887
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
12888
|
+
cells: [number, number][];
|
|
12889
|
+
cellSize?: number | undefined;
|
|
12774
12890
|
}>]>, "many">;
|
|
12775
12891
|
tools: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
12776
12892
|
type: z.ZodLiteral<"DragOptions">;
|
|
12777
12893
|
options: z.ZodArray<z.ZodString, "many">;
|
|
12778
12894
|
}, "strip", z.ZodTypeAny, {
|
|
12779
|
-
type: "DragOptions";
|
|
12780
12895
|
options: string[];
|
|
12781
|
-
}, {
|
|
12782
12896
|
type: "DragOptions";
|
|
12897
|
+
}, {
|
|
12783
12898
|
options: string[];
|
|
12899
|
+
type: "DragOptions";
|
|
12784
12900
|
}>, z.ZodObject<{
|
|
12785
12901
|
type: z.ZodLiteral<"NumericKeypad">;
|
|
12786
12902
|
includeOperators: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -13130,8 +13246,15 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13130
13246
|
}[] | undefined;
|
|
13131
13247
|
dragMode?: "axis" | "inputs" | undefined;
|
|
13132
13248
|
} | {
|
|
13133
|
-
|
|
13249
|
+
axis: "horizontal" | "vertical";
|
|
13250
|
+
type: "GridSymmetryBlock";
|
|
13251
|
+
rows: number;
|
|
13134
13252
|
cols: number;
|
|
13253
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
13254
|
+
cellSize: number;
|
|
13255
|
+
cells: [number, number][];
|
|
13256
|
+
} | {
|
|
13257
|
+
type: "TableBlock";
|
|
13135
13258
|
rows: {
|
|
13136
13259
|
type: "TableRow";
|
|
13137
13260
|
cells: {
|
|
@@ -13220,7 +13343,9 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13220
13343
|
}[];
|
|
13221
13344
|
backgroundColor?: string | undefined;
|
|
13222
13345
|
}[];
|
|
13346
|
+
cols: number;
|
|
13223
13347
|
} | {
|
|
13348
|
+
type: "VerticalOperationBlock";
|
|
13224
13349
|
items: ({
|
|
13225
13350
|
type: "VopRow";
|
|
13226
13351
|
cells: ({
|
|
@@ -13291,17 +13416,17 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13291
13416
|
} | {
|
|
13292
13417
|
type: "VopSeparator";
|
|
13293
13418
|
})[];
|
|
13294
|
-
type: "VerticalOperationBlock";
|
|
13295
13419
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
13296
13420
|
} | {
|
|
13297
|
-
type: "RadioOptions";
|
|
13298
13421
|
options: string[];
|
|
13422
|
+
type: "RadioOptions";
|
|
13299
13423
|
name: string;
|
|
13300
13424
|
answer: string;
|
|
13301
13425
|
} | {
|
|
13302
13426
|
type: "MatcherBlock";
|
|
13303
13427
|
name: string;
|
|
13304
13428
|
rows: {
|
|
13429
|
+
type: "MatcherRow";
|
|
13305
13430
|
items: {
|
|
13306
13431
|
type: "MatcherItem";
|
|
13307
13432
|
inlines: ({
|
|
@@ -13351,7 +13476,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13351
13476
|
})[];
|
|
13352
13477
|
itemId: string;
|
|
13353
13478
|
}[];
|
|
13354
|
-
type: "MatcherRow";
|
|
13355
13479
|
}[];
|
|
13356
13480
|
answers: string[][];
|
|
13357
13481
|
colors?: string[] | undefined;
|
|
@@ -13458,10 +13582,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13458
13582
|
itemId: string;
|
|
13459
13583
|
}[];
|
|
13460
13584
|
})[];
|
|
13461
|
-
question?: {
|
|
13462
|
-
value: string;
|
|
13463
|
-
type: "TextBlock";
|
|
13464
|
-
} | undefined;
|
|
13465
13585
|
validation?: {
|
|
13466
13586
|
type: "SimpleValidation";
|
|
13467
13587
|
} | {
|
|
@@ -13471,9 +13591,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13471
13591
|
expression: string;
|
|
13472
13592
|
type: "MixedValidation";
|
|
13473
13593
|
} | undefined;
|
|
13594
|
+
question?: {
|
|
13595
|
+
value: string;
|
|
13596
|
+
type: "TextBlock";
|
|
13597
|
+
} | undefined;
|
|
13474
13598
|
tools?: ({
|
|
13475
|
-
type: "DragOptions";
|
|
13476
13599
|
options: string[];
|
|
13600
|
+
type: "DragOptions";
|
|
13477
13601
|
} | {
|
|
13478
13602
|
type: "NumericKeypad";
|
|
13479
13603
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -13770,8 +13894,15 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13770
13894
|
}[] | undefined;
|
|
13771
13895
|
dragMode?: "axis" | "inputs" | undefined;
|
|
13772
13896
|
} | {
|
|
13773
|
-
|
|
13897
|
+
axis: "horizontal" | "vertical";
|
|
13898
|
+
type: "GridSymmetryBlock";
|
|
13899
|
+
rows: number;
|
|
13774
13900
|
cols: number;
|
|
13901
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
13902
|
+
cells: [number, number][];
|
|
13903
|
+
cellSize?: number | undefined;
|
|
13904
|
+
} | {
|
|
13905
|
+
type: "TableBlock";
|
|
13775
13906
|
rows: {
|
|
13776
13907
|
type: "TableRow";
|
|
13777
13908
|
cells: {
|
|
@@ -13860,7 +13991,9 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13860
13991
|
}[];
|
|
13861
13992
|
backgroundColor?: string | undefined;
|
|
13862
13993
|
}[];
|
|
13994
|
+
cols: number;
|
|
13863
13995
|
} | {
|
|
13996
|
+
type: "VerticalOperationBlock";
|
|
13864
13997
|
items: ({
|
|
13865
13998
|
type: "VopRow";
|
|
13866
13999
|
cells: ({
|
|
@@ -13931,17 +14064,17 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13931
14064
|
} | {
|
|
13932
14065
|
type: "VopSeparator";
|
|
13933
14066
|
})[];
|
|
13934
|
-
type: "VerticalOperationBlock";
|
|
13935
14067
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
13936
14068
|
} | {
|
|
13937
|
-
type: "RadioOptions";
|
|
13938
14069
|
options: string[];
|
|
14070
|
+
type: "RadioOptions";
|
|
13939
14071
|
name: string;
|
|
13940
14072
|
answer: string;
|
|
13941
14073
|
} | {
|
|
13942
14074
|
type: "MatcherBlock";
|
|
13943
14075
|
name: string;
|
|
13944
14076
|
rows: {
|
|
14077
|
+
type: "MatcherRow";
|
|
13945
14078
|
items: {
|
|
13946
14079
|
type: "MatcherItem";
|
|
13947
14080
|
inlines: ({
|
|
@@ -13991,7 +14124,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13991
14124
|
})[];
|
|
13992
14125
|
itemId: string;
|
|
13993
14126
|
}[];
|
|
13994
|
-
type: "MatcherRow";
|
|
13995
14127
|
}[];
|
|
13996
14128
|
answers: string[][];
|
|
13997
14129
|
colors?: string[] | undefined;
|
|
@@ -14098,10 +14230,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14098
14230
|
itemId: string;
|
|
14099
14231
|
}[];
|
|
14100
14232
|
})[];
|
|
14101
|
-
question?: {
|
|
14102
|
-
value: string;
|
|
14103
|
-
type: "TextBlock";
|
|
14104
|
-
} | undefined;
|
|
14105
14233
|
validation?: {
|
|
14106
14234
|
type: "SimpleValidation";
|
|
14107
14235
|
} | {
|
|
@@ -14111,9 +14239,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14111
14239
|
expression: string;
|
|
14112
14240
|
type: "MixedValidation";
|
|
14113
14241
|
} | undefined;
|
|
14242
|
+
question?: {
|
|
14243
|
+
value: string;
|
|
14244
|
+
type: "TextBlock";
|
|
14245
|
+
} | undefined;
|
|
14114
14246
|
tools?: ({
|
|
14115
|
-
type: "DragOptions";
|
|
14116
14247
|
options: string[];
|
|
14248
|
+
type: "DragOptions";
|
|
14117
14249
|
} | {
|
|
14118
14250
|
type: "NumericKeypad";
|
|
14119
14251
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -14410,8 +14542,15 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14410
14542
|
}[] | undefined;
|
|
14411
14543
|
dragMode?: "axis" | "inputs" | undefined;
|
|
14412
14544
|
} | {
|
|
14413
|
-
|
|
14545
|
+
axis: "horizontal" | "vertical";
|
|
14546
|
+
type: "GridSymmetryBlock";
|
|
14547
|
+
rows: number;
|
|
14414
14548
|
cols: number;
|
|
14549
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
14550
|
+
cellSize: number;
|
|
14551
|
+
cells: [number, number][];
|
|
14552
|
+
} | {
|
|
14553
|
+
type: "TableBlock";
|
|
14415
14554
|
rows: {
|
|
14416
14555
|
type: "TableRow";
|
|
14417
14556
|
cells: {
|
|
@@ -14500,7 +14639,9 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14500
14639
|
}[];
|
|
14501
14640
|
backgroundColor?: string | undefined;
|
|
14502
14641
|
}[];
|
|
14642
|
+
cols: number;
|
|
14503
14643
|
} | {
|
|
14644
|
+
type: "VerticalOperationBlock";
|
|
14504
14645
|
items: ({
|
|
14505
14646
|
type: "VopRow";
|
|
14506
14647
|
cells: ({
|
|
@@ -14571,17 +14712,17 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14571
14712
|
} | {
|
|
14572
14713
|
type: "VopSeparator";
|
|
14573
14714
|
})[];
|
|
14574
|
-
type: "VerticalOperationBlock";
|
|
14575
14715
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
14576
14716
|
} | {
|
|
14577
|
-
type: "RadioOptions";
|
|
14578
14717
|
options: string[];
|
|
14718
|
+
type: "RadioOptions";
|
|
14579
14719
|
name: string;
|
|
14580
14720
|
answer: string;
|
|
14581
14721
|
} | {
|
|
14582
14722
|
type: "MatcherBlock";
|
|
14583
14723
|
name: string;
|
|
14584
14724
|
rows: {
|
|
14725
|
+
type: "MatcherRow";
|
|
14585
14726
|
items: {
|
|
14586
14727
|
type: "MatcherItem";
|
|
14587
14728
|
inlines: ({
|
|
@@ -14631,7 +14772,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14631
14772
|
})[];
|
|
14632
14773
|
itemId: string;
|
|
14633
14774
|
}[];
|
|
14634
|
-
type: "MatcherRow";
|
|
14635
14775
|
}[];
|
|
14636
14776
|
answers: string[][];
|
|
14637
14777
|
colors?: string[] | undefined;
|
|
@@ -14738,10 +14878,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14738
14878
|
itemId: string;
|
|
14739
14879
|
}[];
|
|
14740
14880
|
})[];
|
|
14741
|
-
question?: {
|
|
14742
|
-
value: string;
|
|
14743
|
-
type: "TextBlock";
|
|
14744
|
-
} | undefined;
|
|
14745
14881
|
validation?: {
|
|
14746
14882
|
type: "SimpleValidation";
|
|
14747
14883
|
} | {
|
|
@@ -14751,9 +14887,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14751
14887
|
expression: string;
|
|
14752
14888
|
type: "MixedValidation";
|
|
14753
14889
|
} | undefined;
|
|
14890
|
+
question?: {
|
|
14891
|
+
value: string;
|
|
14892
|
+
type: "TextBlock";
|
|
14893
|
+
} | undefined;
|
|
14754
14894
|
tools?: ({
|
|
14755
|
-
type: "DragOptions";
|
|
14756
14895
|
options: string[];
|
|
14896
|
+
type: "DragOptions";
|
|
14757
14897
|
} | {
|
|
14758
14898
|
type: "NumericKeypad";
|
|
14759
14899
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -15050,8 +15190,15 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15050
15190
|
}[] | undefined;
|
|
15051
15191
|
dragMode?: "axis" | "inputs" | undefined;
|
|
15052
15192
|
} | {
|
|
15053
|
-
|
|
15193
|
+
axis: "horizontal" | "vertical";
|
|
15194
|
+
type: "GridSymmetryBlock";
|
|
15195
|
+
rows: number;
|
|
15054
15196
|
cols: number;
|
|
15197
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
15198
|
+
cells: [number, number][];
|
|
15199
|
+
cellSize?: number | undefined;
|
|
15200
|
+
} | {
|
|
15201
|
+
type: "TableBlock";
|
|
15055
15202
|
rows: {
|
|
15056
15203
|
type: "TableRow";
|
|
15057
15204
|
cells: {
|
|
@@ -15140,7 +15287,9 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15140
15287
|
}[];
|
|
15141
15288
|
backgroundColor?: string | undefined;
|
|
15142
15289
|
}[];
|
|
15290
|
+
cols: number;
|
|
15143
15291
|
} | {
|
|
15292
|
+
type: "VerticalOperationBlock";
|
|
15144
15293
|
items: ({
|
|
15145
15294
|
type: "VopRow";
|
|
15146
15295
|
cells: ({
|
|
@@ -15211,17 +15360,17 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15211
15360
|
} | {
|
|
15212
15361
|
type: "VopSeparator";
|
|
15213
15362
|
})[];
|
|
15214
|
-
type: "VerticalOperationBlock";
|
|
15215
15363
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
15216
15364
|
} | {
|
|
15217
|
-
type: "RadioOptions";
|
|
15218
15365
|
options: string[];
|
|
15366
|
+
type: "RadioOptions";
|
|
15219
15367
|
name: string;
|
|
15220
15368
|
answer: string;
|
|
15221
15369
|
} | {
|
|
15222
15370
|
type: "MatcherBlock";
|
|
15223
15371
|
name: string;
|
|
15224
15372
|
rows: {
|
|
15373
|
+
type: "MatcherRow";
|
|
15225
15374
|
items: {
|
|
15226
15375
|
type: "MatcherItem";
|
|
15227
15376
|
inlines: ({
|
|
@@ -15271,7 +15420,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15271
15420
|
})[];
|
|
15272
15421
|
itemId: string;
|
|
15273
15422
|
}[];
|
|
15274
|
-
type: "MatcherRow";
|
|
15275
15423
|
}[];
|
|
15276
15424
|
answers: string[][];
|
|
15277
15425
|
colors?: string[] | undefined;
|
|
@@ -15378,10 +15526,6 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15378
15526
|
itemId: string;
|
|
15379
15527
|
}[];
|
|
15380
15528
|
})[];
|
|
15381
|
-
question?: {
|
|
15382
|
-
value: string;
|
|
15383
|
-
type: "TextBlock";
|
|
15384
|
-
} | undefined;
|
|
15385
15529
|
validation?: {
|
|
15386
15530
|
type: "SimpleValidation";
|
|
15387
15531
|
} | {
|
|
@@ -15391,9 +15535,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15391
15535
|
expression: string;
|
|
15392
15536
|
type: "MixedValidation";
|
|
15393
15537
|
} | undefined;
|
|
15538
|
+
question?: {
|
|
15539
|
+
value: string;
|
|
15540
|
+
type: "TextBlock";
|
|
15541
|
+
} | undefined;
|
|
15394
15542
|
tools?: ({
|
|
15395
|
-
type: "DragOptions";
|
|
15396
15543
|
options: string[];
|
|
15544
|
+
type: "DragOptions";
|
|
15397
15545
|
} | {
|
|
15398
15546
|
type: "NumericKeypad";
|
|
15399
15547
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -15451,11 +15599,11 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15451
15599
|
type: z.ZodLiteral<"drag-options">;
|
|
15452
15600
|
options: z.ZodArray<z.ZodString, "many">;
|
|
15453
15601
|
}, "strip", z.ZodTypeAny, {
|
|
15454
|
-
type: "drag-options";
|
|
15455
15602
|
options: string[];
|
|
15456
|
-
}, {
|
|
15457
15603
|
type: "drag-options";
|
|
15604
|
+
}, {
|
|
15458
15605
|
options: string[];
|
|
15606
|
+
type: "drag-options";
|
|
15459
15607
|
}>, z.ZodObject<{
|
|
15460
15608
|
type: z.ZodLiteral<"inline-drag-option">;
|
|
15461
15609
|
value: z.ZodString;
|
|
@@ -15469,11 +15617,11 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15469
15617
|
type: z.ZodLiteral<"radio-options">;
|
|
15470
15618
|
options: z.ZodArray<z.ZodString, "many">;
|
|
15471
15619
|
}, "strip", z.ZodTypeAny, {
|
|
15472
|
-
type: "radio-options";
|
|
15473
15620
|
options: string[];
|
|
15474
|
-
}, {
|
|
15475
15621
|
type: "radio-options";
|
|
15622
|
+
}, {
|
|
15476
15623
|
options: string[];
|
|
15624
|
+
type: "radio-options";
|
|
15477
15625
|
}>, z.ZodObject<{
|
|
15478
15626
|
type: z.ZodLiteral<"numeric-keypad">;
|
|
15479
15627
|
includeOperators: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -15531,22 +15679,22 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15531
15679
|
content: any[];
|
|
15532
15680
|
}>, "many">;
|
|
15533
15681
|
}, "strip", z.ZodTypeAny, {
|
|
15682
|
+
type: "matcher-row";
|
|
15534
15683
|
items: {
|
|
15535
15684
|
type: "matcher-item";
|
|
15536
15685
|
itemId: string;
|
|
15537
15686
|
id: string;
|
|
15538
15687
|
content: any[];
|
|
15539
15688
|
}[];
|
|
15540
|
-
type: "matcher-row";
|
|
15541
15689
|
id: string;
|
|
15542
15690
|
}, {
|
|
15691
|
+
type: "matcher-row";
|
|
15543
15692
|
items: {
|
|
15544
15693
|
type: "matcher-item";
|
|
15545
15694
|
itemId: string;
|
|
15546
15695
|
id: string;
|
|
15547
15696
|
content: any[];
|
|
15548
15697
|
}[];
|
|
15549
|
-
type: "matcher-row";
|
|
15550
15698
|
id: string;
|
|
15551
15699
|
}>, "many">;
|
|
15552
15700
|
/** Optional color palette for the renderer (one color per answer group) */
|
|
@@ -15556,13 +15704,13 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15556
15704
|
}, "strip", z.ZodTypeAny, {
|
|
15557
15705
|
type: "matcher";
|
|
15558
15706
|
rows: {
|
|
15707
|
+
type: "matcher-row";
|
|
15559
15708
|
items: {
|
|
15560
15709
|
type: "matcher-item";
|
|
15561
15710
|
itemId: string;
|
|
15562
15711
|
id: string;
|
|
15563
15712
|
content: any[];
|
|
15564
15713
|
}[];
|
|
15565
|
-
type: "matcher-row";
|
|
15566
15714
|
id: string;
|
|
15567
15715
|
}[];
|
|
15568
15716
|
groupCount: number;
|
|
@@ -15570,13 +15718,13 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15570
15718
|
}, {
|
|
15571
15719
|
type: "matcher";
|
|
15572
15720
|
rows: {
|
|
15721
|
+
type: "matcher-row";
|
|
15573
15722
|
items: {
|
|
15574
15723
|
type: "matcher-item";
|
|
15575
15724
|
itemId: string;
|
|
15576
15725
|
id: string;
|
|
15577
15726
|
content: any[];
|
|
15578
15727
|
}[];
|
|
15579
|
-
type: "matcher-row";
|
|
15580
15728
|
id: string;
|
|
15581
15729
|
}[];
|
|
15582
15730
|
groupCount: number;
|
|
@@ -15697,6 +15845,46 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15697
15845
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
15698
15846
|
label?: string | undefined;
|
|
15699
15847
|
size?: number | undefined;
|
|
15848
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
15849
|
+
type: z.ZodLiteral<"grid-symmetry">;
|
|
15850
|
+
rows: z.ZodNumber;
|
|
15851
|
+
cols: z.ZodNumber;
|
|
15852
|
+
axis: z.ZodEnum<["vertical", "horizontal"]>;
|
|
15853
|
+
interactiveArea: z.ZodEnum<["left", "right", "top", "bottom"]>;
|
|
15854
|
+
cellSize: z.ZodDefault<z.ZodNumber>;
|
|
15855
|
+
cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
15856
|
+
}, "strip", z.ZodTypeAny, {
|
|
15857
|
+
axis: "horizontal" | "vertical";
|
|
15858
|
+
type: "grid-symmetry";
|
|
15859
|
+
rows: number;
|
|
15860
|
+
cols: number;
|
|
15861
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
15862
|
+
cellSize: number;
|
|
15863
|
+
cells: [number, number][];
|
|
15864
|
+
}, {
|
|
15865
|
+
axis: "horizontal" | "vertical";
|
|
15866
|
+
type: "grid-symmetry";
|
|
15867
|
+
rows: number;
|
|
15868
|
+
cols: number;
|
|
15869
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
15870
|
+
cells: [number, number][];
|
|
15871
|
+
cellSize?: number | undefined;
|
|
15872
|
+
}>, {
|
|
15873
|
+
axis: "horizontal" | "vertical";
|
|
15874
|
+
type: "grid-symmetry";
|
|
15875
|
+
rows: number;
|
|
15876
|
+
cols: number;
|
|
15877
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
15878
|
+
cellSize: number;
|
|
15879
|
+
cells: [number, number][];
|
|
15880
|
+
}, {
|
|
15881
|
+
axis: "horizontal" | "vertical";
|
|
15882
|
+
type: "grid-symmetry";
|
|
15883
|
+
rows: number;
|
|
15884
|
+
cols: number;
|
|
15885
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
15886
|
+
cells: [number, number][];
|
|
15887
|
+
cellSize?: number | undefined;
|
|
15700
15888
|
}>, z.ZodObject<{
|
|
15701
15889
|
type: z.ZodLiteral<"ruler">;
|
|
15702
15890
|
size: z.ZodOptional<z.ZodNumber>;
|
|
@@ -15727,18 +15915,18 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15727
15915
|
}>]>>;
|
|
15728
15916
|
validation: z.ZodOptional<z.ZodObject<{
|
|
15729
15917
|
mode: z.ZodEnum<["simple", "expression", "mixed"]>;
|
|
15730
|
-
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">, z.ZodArray<z.ZodNumber, "many">]>>>;
|
|
15918
|
+
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>>;
|
|
15731
15919
|
expression: z.ZodOptional<z.ZodString>;
|
|
15732
15920
|
variables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15733
15921
|
}, "strip", z.ZodTypeAny, {
|
|
15734
15922
|
mode: "simple" | "expression" | "mixed";
|
|
15735
15923
|
expression?: string | undefined;
|
|
15736
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
15924
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
15737
15925
|
variables?: string[] | undefined;
|
|
15738
15926
|
}, {
|
|
15739
15927
|
mode: "simple" | "expression" | "mixed";
|
|
15740
15928
|
expression?: string | undefined;
|
|
15741
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
15929
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
15742
15930
|
variables?: string[] | undefined;
|
|
15743
15931
|
}>>;
|
|
15744
15932
|
meta: z.ZodOptional<z.ZodObject<{
|
|
@@ -15771,14 +15959,14 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15771
15959
|
digits: number;
|
|
15772
15960
|
placeholder?: string | undefined;
|
|
15773
15961
|
} | {
|
|
15774
|
-
type: "drag-options";
|
|
15775
15962
|
options: string[];
|
|
15963
|
+
type: "drag-options";
|
|
15776
15964
|
} | {
|
|
15777
15965
|
value: string;
|
|
15778
15966
|
type: "inline-drag-option";
|
|
15779
15967
|
} | {
|
|
15780
|
-
type: "radio-options";
|
|
15781
15968
|
options: string[];
|
|
15969
|
+
type: "radio-options";
|
|
15782
15970
|
} | {
|
|
15783
15971
|
type: "numeric-keypad";
|
|
15784
15972
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -15793,13 +15981,13 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15793
15981
|
} | {
|
|
15794
15982
|
type: "matcher";
|
|
15795
15983
|
rows: {
|
|
15984
|
+
type: "matcher-row";
|
|
15796
15985
|
items: {
|
|
15797
15986
|
type: "matcher-item";
|
|
15798
15987
|
itemId: string;
|
|
15799
15988
|
id: string;
|
|
15800
15989
|
content: any[];
|
|
15801
15990
|
}[];
|
|
15802
|
-
type: "matcher-row";
|
|
15803
15991
|
id: string;
|
|
15804
15992
|
}[];
|
|
15805
15993
|
groupCount: number;
|
|
@@ -15827,6 +16015,14 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15827
16015
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
15828
16016
|
label?: string | undefined;
|
|
15829
16017
|
size?: number | undefined;
|
|
16018
|
+
} | {
|
|
16019
|
+
axis: "horizontal" | "vertical";
|
|
16020
|
+
type: "grid-symmetry";
|
|
16021
|
+
rows: number;
|
|
16022
|
+
cols: number;
|
|
16023
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16024
|
+
cellSize: number;
|
|
16025
|
+
cells: [number, number][];
|
|
15830
16026
|
} | {
|
|
15831
16027
|
type: "ruler";
|
|
15832
16028
|
size?: number | undefined;
|
|
@@ -15840,7 +16036,7 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15840
16036
|
validation?: {
|
|
15841
16037
|
mode: "simple" | "expression" | "mixed";
|
|
15842
16038
|
expression?: string | undefined;
|
|
15843
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
16039
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
15844
16040
|
variables?: string[] | undefined;
|
|
15845
16041
|
} | undefined;
|
|
15846
16042
|
id?: string | undefined;
|
|
@@ -15864,14 +16060,14 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15864
16060
|
digits: number;
|
|
15865
16061
|
placeholder?: string | undefined;
|
|
15866
16062
|
} | {
|
|
15867
|
-
type: "drag-options";
|
|
15868
16063
|
options: string[];
|
|
16064
|
+
type: "drag-options";
|
|
15869
16065
|
} | {
|
|
15870
16066
|
value: string;
|
|
15871
16067
|
type: "inline-drag-option";
|
|
15872
16068
|
} | {
|
|
15873
|
-
type: "radio-options";
|
|
15874
16069
|
options: string[];
|
|
16070
|
+
type: "radio-options";
|
|
15875
16071
|
} | {
|
|
15876
16072
|
type: "numeric-keypad";
|
|
15877
16073
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -15886,13 +16082,13 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15886
16082
|
} | {
|
|
15887
16083
|
type: "matcher";
|
|
15888
16084
|
rows: {
|
|
16085
|
+
type: "matcher-row";
|
|
15889
16086
|
items: {
|
|
15890
16087
|
type: "matcher-item";
|
|
15891
16088
|
itemId: string;
|
|
15892
16089
|
id: string;
|
|
15893
16090
|
content: any[];
|
|
15894
16091
|
}[];
|
|
15895
|
-
type: "matcher-row";
|
|
15896
16092
|
id: string;
|
|
15897
16093
|
}[];
|
|
15898
16094
|
groupCount: number;
|
|
@@ -15920,6 +16116,14 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15920
16116
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
15921
16117
|
label?: string | undefined;
|
|
15922
16118
|
size?: number | undefined;
|
|
16119
|
+
} | {
|
|
16120
|
+
axis: "horizontal" | "vertical";
|
|
16121
|
+
type: "grid-symmetry";
|
|
16122
|
+
rows: number;
|
|
16123
|
+
cols: number;
|
|
16124
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16125
|
+
cells: [number, number][];
|
|
16126
|
+
cellSize?: number | undefined;
|
|
15923
16127
|
} | {
|
|
15924
16128
|
type: "ruler";
|
|
15925
16129
|
size?: number | undefined;
|
|
@@ -15933,7 +16137,7 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15933
16137
|
validation?: {
|
|
15934
16138
|
mode: "simple" | "expression" | "mixed";
|
|
15935
16139
|
expression?: string | undefined;
|
|
15936
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
16140
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
15937
16141
|
variables?: string[] | undefined;
|
|
15938
16142
|
} | undefined;
|
|
15939
16143
|
id?: string | undefined;
|
|
@@ -16156,7 +16360,117 @@ export declare function getFractionKey(widgetId: string, part: FractionPart): st
|
|
|
16156
16360
|
* @param userInputs - User's answers
|
|
16157
16361
|
* @returns Array of missing widget IDs
|
|
16158
16362
|
*/
|
|
16159
|
-
export declare function getMissingInputs(exercise: ExerciseJSON, userInputs: Record<string, string | number | string[][] | number[]>): string[];
|
|
16363
|
+
export declare function getMissingInputs(exercise: ExerciseJSON, userInputs: Record<string, string | number | string[][] | number[] | GridCell[]>): string[];
|
|
16364
|
+
|
|
16365
|
+
export declare const GRID_SYMMETRY_AXES: readonly ["vertical", "horizontal"];
|
|
16366
|
+
|
|
16367
|
+
export declare const GRID_SYMMETRY_INTERACTIVE_AREAS: readonly ["left", "right", "top", "bottom"];
|
|
16368
|
+
|
|
16369
|
+
export declare const GRID_SYMMETRY_MAX_CELL_SIZE = 2;
|
|
16370
|
+
|
|
16371
|
+
export declare const GRID_SYMMETRY_MAX_COLS = 20;
|
|
16372
|
+
|
|
16373
|
+
export declare const GRID_SYMMETRY_MAX_ROWS = 20;
|
|
16374
|
+
|
|
16375
|
+
export declare const GRID_SYMMETRY_MIN_CELL_SIZE = 0.25;
|
|
16376
|
+
|
|
16377
|
+
/** One-based row/column coordinate shared by grid-based widgets. */
|
|
16378
|
+
export declare type GridCell = [row: number, col: number];
|
|
16379
|
+
|
|
16380
|
+
/** Structural validation shared by grid-based widgets. Grid bounds remain widget-specific. */
|
|
16381
|
+
export declare const GridCellSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
16382
|
+
|
|
16383
|
+
export declare type GridSymmetryAxis = (typeof GRID_SYMMETRY_AXES)[number];
|
|
16384
|
+
|
|
16385
|
+
export declare type GridSymmetryBlock = z.infer<typeof GridSymmetryBlockSchema>;
|
|
16386
|
+
|
|
16387
|
+
export declare const GridSymmetryBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
16388
|
+
type: z.ZodLiteral<"GridSymmetryBlock">;
|
|
16389
|
+
rows: z.ZodNumber;
|
|
16390
|
+
cols: z.ZodNumber;
|
|
16391
|
+
axis: z.ZodEnum<["vertical", "horizontal"]>;
|
|
16392
|
+
interactiveArea: z.ZodEnum<["left", "right", "top", "bottom"]>;
|
|
16393
|
+
cellSize: z.ZodDefault<z.ZodNumber>;
|
|
16394
|
+
cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
16395
|
+
}, "strip", z.ZodTypeAny, {
|
|
16396
|
+
axis: "horizontal" | "vertical";
|
|
16397
|
+
type: "GridSymmetryBlock";
|
|
16398
|
+
rows: number;
|
|
16399
|
+
cols: number;
|
|
16400
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16401
|
+
cellSize: number;
|
|
16402
|
+
cells: [number, number][];
|
|
16403
|
+
}, {
|
|
16404
|
+
axis: "horizontal" | "vertical";
|
|
16405
|
+
type: "GridSymmetryBlock";
|
|
16406
|
+
rows: number;
|
|
16407
|
+
cols: number;
|
|
16408
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16409
|
+
cells: [number, number][];
|
|
16410
|
+
cellSize?: number | undefined;
|
|
16411
|
+
}>, {
|
|
16412
|
+
axis: "horizontal" | "vertical";
|
|
16413
|
+
type: "GridSymmetryBlock";
|
|
16414
|
+
rows: number;
|
|
16415
|
+
cols: number;
|
|
16416
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16417
|
+
cellSize: number;
|
|
16418
|
+
cells: [number, number][];
|
|
16419
|
+
}, {
|
|
16420
|
+
axis: "horizontal" | "vertical";
|
|
16421
|
+
type: "GridSymmetryBlock";
|
|
16422
|
+
rows: number;
|
|
16423
|
+
cols: number;
|
|
16424
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16425
|
+
cells: [number, number][];
|
|
16426
|
+
cellSize?: number | undefined;
|
|
16427
|
+
}>;
|
|
16428
|
+
|
|
16429
|
+
export declare type GridSymmetryInteractiveArea = (typeof GRID_SYMMETRY_INTERACTIVE_AREAS)[number];
|
|
16430
|
+
|
|
16431
|
+
export declare type GridSymmetryJSON = z.infer<typeof GridSymmetryJSONSchema>;
|
|
16432
|
+
|
|
16433
|
+
export declare const GridSymmetryJSONSchema: z.ZodEffects<z.ZodObject<{
|
|
16434
|
+
type: z.ZodLiteral<"grid-symmetry">;
|
|
16435
|
+
rows: z.ZodNumber;
|
|
16436
|
+
cols: z.ZodNumber;
|
|
16437
|
+
axis: z.ZodEnum<["vertical", "horizontal"]>;
|
|
16438
|
+
interactiveArea: z.ZodEnum<["left", "right", "top", "bottom"]>;
|
|
16439
|
+
cellSize: z.ZodDefault<z.ZodNumber>;
|
|
16440
|
+
cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
16441
|
+
}, "strip", z.ZodTypeAny, {
|
|
16442
|
+
axis: "horizontal" | "vertical";
|
|
16443
|
+
type: "grid-symmetry";
|
|
16444
|
+
rows: number;
|
|
16445
|
+
cols: number;
|
|
16446
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16447
|
+
cellSize: number;
|
|
16448
|
+
cells: [number, number][];
|
|
16449
|
+
}, {
|
|
16450
|
+
axis: "horizontal" | "vertical";
|
|
16451
|
+
type: "grid-symmetry";
|
|
16452
|
+
rows: number;
|
|
16453
|
+
cols: number;
|
|
16454
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16455
|
+
cells: [number, number][];
|
|
16456
|
+
cellSize?: number | undefined;
|
|
16457
|
+
}>, {
|
|
16458
|
+
axis: "horizontal" | "vertical";
|
|
16459
|
+
type: "grid-symmetry";
|
|
16460
|
+
rows: number;
|
|
16461
|
+
cols: number;
|
|
16462
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16463
|
+
cellSize: number;
|
|
16464
|
+
cells: [number, number][];
|
|
16465
|
+
}, {
|
|
16466
|
+
axis: "horizontal" | "vertical";
|
|
16467
|
+
type: "grid-symmetry";
|
|
16468
|
+
rows: number;
|
|
16469
|
+
cols: number;
|
|
16470
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
16471
|
+
cells: [number, number][];
|
|
16472
|
+
cellSize?: number | undefined;
|
|
16473
|
+
}>;
|
|
16160
16474
|
|
|
16161
16475
|
export declare type GroupItem = z.infer<typeof GroupItemSchema>;
|
|
16162
16476
|
|
|
@@ -16165,20 +16479,15 @@ export declare const GroupItemSchema: z.ZodObject<{
|
|
|
16165
16479
|
type: z.ZodLiteral<"group">;
|
|
16166
16480
|
items: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
|
|
16167
16481
|
}, "strip", z.ZodTypeAny, {
|
|
16168
|
-
items: any[];
|
|
16169
16482
|
type: "group";
|
|
16483
|
+
items: any[];
|
|
16170
16484
|
id: string;
|
|
16171
16485
|
}, {
|
|
16172
|
-
items: any[];
|
|
16173
16486
|
type: "group";
|
|
16487
|
+
items: any[];
|
|
16174
16488
|
id: string;
|
|
16175
16489
|
}>;
|
|
16176
16490
|
|
|
16177
|
-
/**
|
|
16178
|
-
* Validation Result Types
|
|
16179
|
-
*
|
|
16180
|
-
* These define the output of validation operations.
|
|
16181
|
-
*/
|
|
16182
16491
|
/**
|
|
16183
16492
|
* Validation result for a single matched group (works for any matcher-type widget:
|
|
16184
16493
|
* Matcher groups of N items, PairMatcher pairs of 2 items, etc.)
|
|
@@ -16709,6 +17018,8 @@ export declare function isBoldText(item: LayoutItem): item is Extract<LayoutItem
|
|
|
16709
17018
|
type: 'bold-text';
|
|
16710
17019
|
}>;
|
|
16711
17020
|
|
|
17021
|
+
export declare function isCellInInteractiveArea(cell: GridCell, rows: number, cols: number, area: GridSymmetryInteractiveArea): boolean;
|
|
17022
|
+
|
|
16712
17023
|
export declare function isClock(value: unknown): value is ClockInline;
|
|
16713
17024
|
|
|
16714
17025
|
/**
|
|
@@ -16751,6 +17062,12 @@ export declare function isFractionKey(key: string): boolean;
|
|
|
16751
17062
|
|
|
16752
17063
|
export declare function isFreeText(value: unknown): value is FreeTextInline;
|
|
16753
17064
|
|
|
17065
|
+
export declare function isGridSymmetryBlock(value: unknown): value is GridSymmetryBlock;
|
|
17066
|
+
|
|
17067
|
+
export declare function isGridSymmetryJSON(widget: WidgetJSON): widget is Extract<WidgetJSON, {
|
|
17068
|
+
type: 'grid-symmetry';
|
|
17069
|
+
}>;
|
|
17070
|
+
|
|
16754
17071
|
/**
|
|
16755
17072
|
* Type guard for GroupItem
|
|
16756
17073
|
*/
|
|
@@ -17031,6 +17348,8 @@ export declare const JSON_TYPES: {
|
|
|
17031
17348
|
readonly FRACTION: "fraction";
|
|
17032
17349
|
/** Visual fraction widget */
|
|
17033
17350
|
readonly VISUAL_FRACTION: "visual-fraction";
|
|
17351
|
+
/** Interactive symmetry exercise on a grid */
|
|
17352
|
+
readonly GRID_SYMMETRY: "grid-symmetry";
|
|
17034
17353
|
/** Ruler geometry tool widget */
|
|
17035
17354
|
readonly RULER: "ruler";
|
|
17036
17355
|
/** Protractor geometry tool widget */
|
|
@@ -17822,6 +18141,7 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
17822
18141
|
itemId: string;
|
|
17823
18142
|
}>, "many">;
|
|
17824
18143
|
}, "strip", z.ZodTypeAny, {
|
|
18144
|
+
type: "MatcherRow";
|
|
17825
18145
|
items: {
|
|
17826
18146
|
type: "MatcherItem";
|
|
17827
18147
|
inlines: ({
|
|
@@ -17871,8 +18191,8 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
17871
18191
|
})[];
|
|
17872
18192
|
itemId: string;
|
|
17873
18193
|
}[];
|
|
17874
|
-
type: "MatcherRow";
|
|
17875
18194
|
}, {
|
|
18195
|
+
type: "MatcherRow";
|
|
17876
18196
|
items: {
|
|
17877
18197
|
type: "MatcherItem";
|
|
17878
18198
|
inlines: ({
|
|
@@ -17922,13 +18242,13 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
17922
18242
|
})[];
|
|
17923
18243
|
itemId: string;
|
|
17924
18244
|
}[];
|
|
17925
|
-
type: "MatcherRow";
|
|
17926
18245
|
}>, "many">;
|
|
17927
18246
|
answers: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
|
|
17928
18247
|
}, "strip", z.ZodTypeAny, {
|
|
17929
18248
|
type: "MatcherBlock";
|
|
17930
18249
|
name: string;
|
|
17931
18250
|
rows: {
|
|
18251
|
+
type: "MatcherRow";
|
|
17932
18252
|
items: {
|
|
17933
18253
|
type: "MatcherItem";
|
|
17934
18254
|
inlines: ({
|
|
@@ -17978,7 +18298,6 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
17978
18298
|
})[];
|
|
17979
18299
|
itemId: string;
|
|
17980
18300
|
}[];
|
|
17981
|
-
type: "MatcherRow";
|
|
17982
18301
|
}[];
|
|
17983
18302
|
answers: string[][];
|
|
17984
18303
|
colors?: string[] | undefined;
|
|
@@ -17986,6 +18305,7 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
17986
18305
|
type: "MatcherBlock";
|
|
17987
18306
|
name: string;
|
|
17988
18307
|
rows: {
|
|
18308
|
+
type: "MatcherRow";
|
|
17989
18309
|
items: {
|
|
17990
18310
|
type: "MatcherItem";
|
|
17991
18311
|
inlines: ({
|
|
@@ -18035,7 +18355,6 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
18035
18355
|
})[];
|
|
18036
18356
|
itemId: string;
|
|
18037
18357
|
}[];
|
|
18038
|
-
type: "MatcherRow";
|
|
18039
18358
|
}[];
|
|
18040
18359
|
answers: string[][];
|
|
18041
18360
|
colors?: string[] | undefined;
|
|
@@ -18043,6 +18362,7 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
18043
18362
|
type: "MatcherBlock";
|
|
18044
18363
|
name: string;
|
|
18045
18364
|
rows: {
|
|
18365
|
+
type: "MatcherRow";
|
|
18046
18366
|
items: {
|
|
18047
18367
|
type: "MatcherItem";
|
|
18048
18368
|
inlines: ({
|
|
@@ -18092,7 +18412,6 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
18092
18412
|
})[];
|
|
18093
18413
|
itemId: string;
|
|
18094
18414
|
}[];
|
|
18095
|
-
type: "MatcherRow";
|
|
18096
18415
|
}[];
|
|
18097
18416
|
answers: string[][];
|
|
18098
18417
|
colors?: string[] | undefined;
|
|
@@ -18100,6 +18419,7 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
18100
18419
|
type: "MatcherBlock";
|
|
18101
18420
|
name: string;
|
|
18102
18421
|
rows: {
|
|
18422
|
+
type: "MatcherRow";
|
|
18103
18423
|
items: {
|
|
18104
18424
|
type: "MatcherItem";
|
|
18105
18425
|
inlines: ({
|
|
@@ -18149,7 +18469,6 @@ export declare const MatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
18149
18469
|
})[];
|
|
18150
18470
|
itemId: string;
|
|
18151
18471
|
}[];
|
|
18152
|
-
type: "MatcherRow";
|
|
18153
18472
|
}[];
|
|
18154
18473
|
answers: string[][];
|
|
18155
18474
|
colors?: string[] | undefined;
|
|
@@ -18494,22 +18813,22 @@ declare const MatcherRowItemSchema: z.ZodObject<{
|
|
|
18494
18813
|
content: any[];
|
|
18495
18814
|
}>, "many">;
|
|
18496
18815
|
}, "strip", z.ZodTypeAny, {
|
|
18816
|
+
type: "matcher-row";
|
|
18497
18817
|
items: {
|
|
18498
18818
|
type: "matcher-item";
|
|
18499
18819
|
itemId: string;
|
|
18500
18820
|
id: string;
|
|
18501
18821
|
content: any[];
|
|
18502
18822
|
}[];
|
|
18503
|
-
type: "matcher-row";
|
|
18504
18823
|
id: string;
|
|
18505
18824
|
}, {
|
|
18825
|
+
type: "matcher-row";
|
|
18506
18826
|
items: {
|
|
18507
18827
|
type: "matcher-item";
|
|
18508
18828
|
itemId: string;
|
|
18509
18829
|
id: string;
|
|
18510
18830
|
content: any[];
|
|
18511
18831
|
}[];
|
|
18512
|
-
type: "matcher-row";
|
|
18513
18832
|
id: string;
|
|
18514
18833
|
}>;
|
|
18515
18834
|
|
|
@@ -18806,6 +19125,7 @@ export declare const MatcherRowSchema: z.ZodObject<{
|
|
|
18806
19125
|
itemId: string;
|
|
18807
19126
|
}>, "many">;
|
|
18808
19127
|
}, "strip", z.ZodTypeAny, {
|
|
19128
|
+
type: "MatcherRow";
|
|
18809
19129
|
items: {
|
|
18810
19130
|
type: "MatcherItem";
|
|
18811
19131
|
inlines: ({
|
|
@@ -18855,8 +19175,8 @@ export declare const MatcherRowSchema: z.ZodObject<{
|
|
|
18855
19175
|
})[];
|
|
18856
19176
|
itemId: string;
|
|
18857
19177
|
}[];
|
|
18858
|
-
type: "MatcherRow";
|
|
18859
19178
|
}, {
|
|
19179
|
+
type: "MatcherRow";
|
|
18860
19180
|
items: {
|
|
18861
19181
|
type: "MatcherItem";
|
|
18862
19182
|
inlines: ({
|
|
@@ -18906,7 +19226,6 @@ export declare const MatcherRowSchema: z.ZodObject<{
|
|
|
18906
19226
|
})[];
|
|
18907
19227
|
itemId: string;
|
|
18908
19228
|
}[];
|
|
18909
|
-
type: "MatcherRow";
|
|
18910
19229
|
}>;
|
|
18911
19230
|
|
|
18912
19231
|
export declare type MatcherWidgetJSON = z.infer<typeof MatcherWidgetJSONSchema>;
|
|
@@ -18940,22 +19259,22 @@ export declare const MatcherWidgetJSONSchema: z.ZodObject<{
|
|
|
18940
19259
|
content: any[];
|
|
18941
19260
|
}>, "many">;
|
|
18942
19261
|
}, "strip", z.ZodTypeAny, {
|
|
19262
|
+
type: "matcher-row";
|
|
18943
19263
|
items: {
|
|
18944
19264
|
type: "matcher-item";
|
|
18945
19265
|
itemId: string;
|
|
18946
19266
|
id: string;
|
|
18947
19267
|
content: any[];
|
|
18948
19268
|
}[];
|
|
18949
|
-
type: "matcher-row";
|
|
18950
19269
|
id: string;
|
|
18951
19270
|
}, {
|
|
19271
|
+
type: "matcher-row";
|
|
18952
19272
|
items: {
|
|
18953
19273
|
type: "matcher-item";
|
|
18954
19274
|
itemId: string;
|
|
18955
19275
|
id: string;
|
|
18956
19276
|
content: any[];
|
|
18957
19277
|
}[];
|
|
18958
|
-
type: "matcher-row";
|
|
18959
19278
|
id: string;
|
|
18960
19279
|
}>, "many">;
|
|
18961
19280
|
/** Optional color palette for the renderer (one color per answer group) */
|
|
@@ -18965,13 +19284,13 @@ export declare const MatcherWidgetJSONSchema: z.ZodObject<{
|
|
|
18965
19284
|
}, "strip", z.ZodTypeAny, {
|
|
18966
19285
|
type: "matcher";
|
|
18967
19286
|
rows: {
|
|
19287
|
+
type: "matcher-row";
|
|
18968
19288
|
items: {
|
|
18969
19289
|
type: "matcher-item";
|
|
18970
19290
|
itemId: string;
|
|
18971
19291
|
id: string;
|
|
18972
19292
|
content: any[];
|
|
18973
19293
|
}[];
|
|
18974
|
-
type: "matcher-row";
|
|
18975
19294
|
id: string;
|
|
18976
19295
|
}[];
|
|
18977
19296
|
groupCount: number;
|
|
@@ -18979,13 +19298,13 @@ export declare const MatcherWidgetJSONSchema: z.ZodObject<{
|
|
|
18979
19298
|
}, {
|
|
18980
19299
|
type: "matcher";
|
|
18981
19300
|
rows: {
|
|
19301
|
+
type: "matcher-row";
|
|
18982
19302
|
items: {
|
|
18983
19303
|
type: "matcher-item";
|
|
18984
19304
|
itemId: string;
|
|
18985
19305
|
id: string;
|
|
18986
19306
|
content: any[];
|
|
18987
19307
|
}[];
|
|
18988
|
-
type: "matcher-row";
|
|
18989
19308
|
id: string;
|
|
18990
19309
|
}[];
|
|
18991
19310
|
groupCount: number;
|
|
@@ -24066,13 +24385,13 @@ declare const RadioOptionsBlockSchema: z.ZodObject<{
|
|
|
24066
24385
|
options: z.ZodArray<z.ZodString, "many">;
|
|
24067
24386
|
answer: z.ZodString;
|
|
24068
24387
|
}, "strip", z.ZodTypeAny, {
|
|
24069
|
-
type: "RadioOptions";
|
|
24070
24388
|
options: string[];
|
|
24389
|
+
type: "RadioOptions";
|
|
24071
24390
|
name: string;
|
|
24072
24391
|
answer: string;
|
|
24073
24392
|
}, {
|
|
24074
|
-
type: "RadioOptions";
|
|
24075
24393
|
options: string[];
|
|
24394
|
+
type: "RadioOptions";
|
|
24076
24395
|
name: string;
|
|
24077
24396
|
answer: string;
|
|
24078
24397
|
}>;
|
|
@@ -24083,13 +24402,15 @@ export declare const RadioOptionsJSONSchema: z.ZodObject<{
|
|
|
24083
24402
|
type: z.ZodLiteral<"radio-options">;
|
|
24084
24403
|
options: z.ZodArray<z.ZodString, "many">;
|
|
24085
24404
|
}, "strip", z.ZodTypeAny, {
|
|
24086
|
-
type: "radio-options";
|
|
24087
24405
|
options: string[];
|
|
24088
|
-
}, {
|
|
24089
24406
|
type: "radio-options";
|
|
24407
|
+
}, {
|
|
24090
24408
|
options: string[];
|
|
24409
|
+
type: "radio-options";
|
|
24091
24410
|
}>;
|
|
24092
24411
|
|
|
24412
|
+
export declare function reflectGridSymmetryCell(cell: GridCell, rows: number, cols: number, axis: GridSymmetryAxis): GridCell;
|
|
24413
|
+
|
|
24093
24414
|
/**
|
|
24094
24415
|
* DOM helper for quick usage / demos.
|
|
24095
24416
|
*
|
|
@@ -24876,7 +25197,6 @@ declare const TableBlockSchema: z.ZodObject<{
|
|
|
24876
25197
|
}>, "many">;
|
|
24877
25198
|
}, "strip", z.ZodTypeAny, {
|
|
24878
25199
|
type: "TableBlock";
|
|
24879
|
-
cols: number;
|
|
24880
25200
|
rows: {
|
|
24881
25201
|
type: "TableRow";
|
|
24882
25202
|
cells: {
|
|
@@ -24965,9 +25285,9 @@ declare const TableBlockSchema: z.ZodObject<{
|
|
|
24965
25285
|
}[];
|
|
24966
25286
|
backgroundColor?: string | undefined;
|
|
24967
25287
|
}[];
|
|
25288
|
+
cols: number;
|
|
24968
25289
|
}, {
|
|
24969
25290
|
type: "TableBlock";
|
|
24970
|
-
cols: number;
|
|
24971
25291
|
rows: {
|
|
24972
25292
|
type: "TableRow";
|
|
24973
25293
|
cells: {
|
|
@@ -25056,6 +25376,7 @@ declare const TableBlockSchema: z.ZodObject<{
|
|
|
25056
25376
|
}[];
|
|
25057
25377
|
backgroundColor?: string | undefined;
|
|
25058
25378
|
}[];
|
|
25379
|
+
cols: number;
|
|
25059
25380
|
}>;
|
|
25060
25381
|
|
|
25061
25382
|
export declare type TableCell = z.infer<typeof TableCellSchema>;
|
|
@@ -25070,15 +25391,15 @@ export declare const TableCellItemSchema: z.ZodObject<{
|
|
|
25070
25391
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
25071
25392
|
items: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
|
|
25072
25393
|
}, "strip", z.ZodTypeAny, {
|
|
25073
|
-
items: any[];
|
|
25074
25394
|
type: "table-cell";
|
|
25395
|
+
items: any[];
|
|
25075
25396
|
id: string;
|
|
25076
25397
|
colspan?: number | undefined;
|
|
25077
25398
|
rowspan?: number | undefined;
|
|
25078
25399
|
backgroundColor?: string | undefined;
|
|
25079
25400
|
}, {
|
|
25080
|
-
items: any[];
|
|
25081
25401
|
type: "table-cell";
|
|
25402
|
+
items: any[];
|
|
25082
25403
|
id: string;
|
|
25083
25404
|
colspan?: number | undefined;
|
|
25084
25405
|
rowspan?: number | undefined;
|
|
@@ -25528,15 +25849,15 @@ export declare const TableItemSchema: z.ZodObject<{
|
|
|
25528
25849
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
25529
25850
|
items: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
|
|
25530
25851
|
}, "strip", z.ZodTypeAny, {
|
|
25531
|
-
items: any[];
|
|
25532
25852
|
type: "table-cell";
|
|
25853
|
+
items: any[];
|
|
25533
25854
|
id: string;
|
|
25534
25855
|
colspan?: number | undefined;
|
|
25535
25856
|
rowspan?: number | undefined;
|
|
25536
25857
|
backgroundColor?: string | undefined;
|
|
25537
25858
|
}, {
|
|
25538
|
-
items: any[];
|
|
25539
25859
|
type: "table-cell";
|
|
25860
|
+
items: any[];
|
|
25540
25861
|
id: string;
|
|
25541
25862
|
colspan?: number | undefined;
|
|
25542
25863
|
rowspan?: number | undefined;
|
|
@@ -25545,8 +25866,8 @@ export declare const TableItemSchema: z.ZodObject<{
|
|
|
25545
25866
|
}, "strip", z.ZodTypeAny, {
|
|
25546
25867
|
type: "table-row";
|
|
25547
25868
|
cells: {
|
|
25548
|
-
items: any[];
|
|
25549
25869
|
type: "table-cell";
|
|
25870
|
+
items: any[];
|
|
25550
25871
|
id: string;
|
|
25551
25872
|
colspan?: number | undefined;
|
|
25552
25873
|
rowspan?: number | undefined;
|
|
@@ -25557,8 +25878,8 @@ export declare const TableItemSchema: z.ZodObject<{
|
|
|
25557
25878
|
}, {
|
|
25558
25879
|
type: "table-row";
|
|
25559
25880
|
cells: {
|
|
25560
|
-
items: any[];
|
|
25561
25881
|
type: "table-cell";
|
|
25882
|
+
items: any[];
|
|
25562
25883
|
id: string;
|
|
25563
25884
|
colspan?: number | undefined;
|
|
25564
25885
|
rowspan?: number | undefined;
|
|
@@ -25569,12 +25890,11 @@ export declare const TableItemSchema: z.ZodObject<{
|
|
|
25569
25890
|
}>, "many">;
|
|
25570
25891
|
}, "strip", z.ZodTypeAny, {
|
|
25571
25892
|
type: "table";
|
|
25572
|
-
cols: number;
|
|
25573
25893
|
rows: {
|
|
25574
25894
|
type: "table-row";
|
|
25575
25895
|
cells: {
|
|
25576
|
-
items: any[];
|
|
25577
25896
|
type: "table-cell";
|
|
25897
|
+
items: any[];
|
|
25578
25898
|
id: string;
|
|
25579
25899
|
colspan?: number | undefined;
|
|
25580
25900
|
rowspan?: number | undefined;
|
|
@@ -25583,15 +25903,15 @@ export declare const TableItemSchema: z.ZodObject<{
|
|
|
25583
25903
|
id: string;
|
|
25584
25904
|
backgroundColor?: string | undefined;
|
|
25585
25905
|
}[];
|
|
25906
|
+
cols: number;
|
|
25586
25907
|
id: string;
|
|
25587
25908
|
}, {
|
|
25588
25909
|
type: "table";
|
|
25589
|
-
cols: number;
|
|
25590
25910
|
rows: {
|
|
25591
25911
|
type: "table-row";
|
|
25592
25912
|
cells: {
|
|
25593
|
-
items: any[];
|
|
25594
25913
|
type: "table-cell";
|
|
25914
|
+
items: any[];
|
|
25595
25915
|
id: string;
|
|
25596
25916
|
colspan?: number | undefined;
|
|
25597
25917
|
rowspan?: number | undefined;
|
|
@@ -25600,6 +25920,7 @@ export declare const TableItemSchema: z.ZodObject<{
|
|
|
25600
25920
|
id: string;
|
|
25601
25921
|
backgroundColor?: string | undefined;
|
|
25602
25922
|
}[];
|
|
25923
|
+
cols: number;
|
|
25603
25924
|
id: string;
|
|
25604
25925
|
}>;
|
|
25605
25926
|
|
|
@@ -25619,15 +25940,15 @@ export declare const TableRowItemSchema: z.ZodObject<{
|
|
|
25619
25940
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
25620
25941
|
items: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
|
|
25621
25942
|
}, "strip", z.ZodTypeAny, {
|
|
25622
|
-
items: any[];
|
|
25623
25943
|
type: "table-cell";
|
|
25944
|
+
items: any[];
|
|
25624
25945
|
id: string;
|
|
25625
25946
|
colspan?: number | undefined;
|
|
25626
25947
|
rowspan?: number | undefined;
|
|
25627
25948
|
backgroundColor?: string | undefined;
|
|
25628
25949
|
}, {
|
|
25629
|
-
items: any[];
|
|
25630
25950
|
type: "table-cell";
|
|
25951
|
+
items: any[];
|
|
25631
25952
|
id: string;
|
|
25632
25953
|
colspan?: number | undefined;
|
|
25633
25954
|
rowspan?: number | undefined;
|
|
@@ -25636,8 +25957,8 @@ export declare const TableRowItemSchema: z.ZodObject<{
|
|
|
25636
25957
|
}, "strip", z.ZodTypeAny, {
|
|
25637
25958
|
type: "table-row";
|
|
25638
25959
|
cells: {
|
|
25639
|
-
items: any[];
|
|
25640
25960
|
type: "table-cell";
|
|
25961
|
+
items: any[];
|
|
25641
25962
|
id: string;
|
|
25642
25963
|
colspan?: number | undefined;
|
|
25643
25964
|
rowspan?: number | undefined;
|
|
@@ -25648,8 +25969,8 @@ export declare const TableRowItemSchema: z.ZodObject<{
|
|
|
25648
25969
|
}, {
|
|
25649
25970
|
type: "table-row";
|
|
25650
25971
|
cells: {
|
|
25651
|
-
items: any[];
|
|
25652
25972
|
type: "table-cell";
|
|
25973
|
+
items: any[];
|
|
25653
25974
|
id: string;
|
|
25654
25975
|
colspan?: number | undefined;
|
|
25655
25976
|
rowspan?: number | undefined;
|
|
@@ -26349,11 +26670,11 @@ export declare const ToolNodeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
26349
26670
|
type: z.ZodLiteral<"DragOptions">;
|
|
26350
26671
|
options: z.ZodArray<z.ZodString, "many">;
|
|
26351
26672
|
}, "strip", z.ZodTypeAny, {
|
|
26352
|
-
type: "DragOptions";
|
|
26353
26673
|
options: string[];
|
|
26354
|
-
}, {
|
|
26355
26674
|
type: "DragOptions";
|
|
26675
|
+
}, {
|
|
26356
26676
|
options: string[];
|
|
26677
|
+
type: "DragOptions";
|
|
26357
26678
|
}>, z.ZodObject<{
|
|
26358
26679
|
type: z.ZodLiteral<"NumericKeypad">;
|
|
26359
26680
|
includeOperators: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -26406,18 +26727,11 @@ export declare class TransformError extends EngineError {
|
|
|
26406
26727
|
constructor(message: string, position?: SourcePosition);
|
|
26407
26728
|
}
|
|
26408
26729
|
|
|
26409
|
-
/**
|
|
26410
|
-
|
|
26411
|
-
|
|
26412
|
-
|
|
26413
|
-
|
|
26414
|
-
* - `string[][]` — matcher widget (groups of item IDs, no JSON serialisation needed)
|
|
26415
|
-
* - `number[]` — visual-fraction widget (counts per shaded group)
|
|
26416
|
-
*
|
|
26417
|
-
* This union matches the type accepted by `validate()` and avoids any
|
|
26418
|
-
* JSON.stringify / JSON.parse round-trips for structured widget values.
|
|
26419
|
-
*/
|
|
26420
|
-
declare type UserAnswerValue = string | string[][] | number[];
|
|
26730
|
+
/** User answers keyed by widget ID. */
|
|
26731
|
+
export declare type UserAnswers = Record<string, UserAnswerValue>;
|
|
26732
|
+
|
|
26733
|
+
/** Runtime value produced by any answer-bearing widget. */
|
|
26734
|
+
export declare type UserAnswerValue = string | number | string[][] | number[] | [number, number][];
|
|
26421
26735
|
|
|
26422
26736
|
/**
|
|
26423
26737
|
* Returns `play(event)`. Safe to call outside a SoundProvider — it returns a
|
|
@@ -26445,7 +26759,7 @@ export declare function useSound(): (event: SoundEvent) => void;
|
|
|
26445
26759
|
* }
|
|
26446
26760
|
* ```
|
|
26447
26761
|
*/
|
|
26448
|
-
export declare function validate(exercise: ExerciseJSON, userInputs: Record<string, string | number | string[][] | number[]>): ValidationResult;
|
|
26762
|
+
export declare function validate(exercise: ExerciseJSON, userInputs: Record<string, string | number | string[][] | number[] | GridCell[]>): ValidationResult;
|
|
26449
26763
|
|
|
26450
26764
|
/**
|
|
26451
26765
|
* Validate that an expression will return a boolean
|
|
@@ -26490,14 +26804,14 @@ export declare function validateExerciseJSON(data: unknown): {
|
|
|
26490
26804
|
digits: number;
|
|
26491
26805
|
placeholder?: string | undefined;
|
|
26492
26806
|
} | {
|
|
26493
|
-
type: "drag-options";
|
|
26494
26807
|
options: string[];
|
|
26808
|
+
type: "drag-options";
|
|
26495
26809
|
} | {
|
|
26496
26810
|
value: string;
|
|
26497
26811
|
type: "inline-drag-option";
|
|
26498
26812
|
} | {
|
|
26499
|
-
type: "radio-options";
|
|
26500
26813
|
options: string[];
|
|
26814
|
+
type: "radio-options";
|
|
26501
26815
|
} | {
|
|
26502
26816
|
type: "numeric-keypad";
|
|
26503
26817
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -26512,13 +26826,13 @@ export declare function validateExerciseJSON(data: unknown): {
|
|
|
26512
26826
|
} | {
|
|
26513
26827
|
type: "matcher";
|
|
26514
26828
|
rows: {
|
|
26829
|
+
type: "matcher-row";
|
|
26515
26830
|
items: {
|
|
26516
26831
|
type: "matcher-item";
|
|
26517
26832
|
itemId: string;
|
|
26518
26833
|
id: string;
|
|
26519
26834
|
content: any[];
|
|
26520
26835
|
}[];
|
|
26521
|
-
type: "matcher-row";
|
|
26522
26836
|
id: string;
|
|
26523
26837
|
}[];
|
|
26524
26838
|
groupCount: number;
|
|
@@ -26546,6 +26860,14 @@ export declare function validateExerciseJSON(data: unknown): {
|
|
|
26546
26860
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
26547
26861
|
label?: string | undefined;
|
|
26548
26862
|
size?: number | undefined;
|
|
26863
|
+
} | {
|
|
26864
|
+
axis: "horizontal" | "vertical";
|
|
26865
|
+
type: "grid-symmetry";
|
|
26866
|
+
rows: number;
|
|
26867
|
+
cols: number;
|
|
26868
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
26869
|
+
cellSize: number;
|
|
26870
|
+
cells: [number, number][];
|
|
26549
26871
|
} | {
|
|
26550
26872
|
type: "ruler";
|
|
26551
26873
|
size?: number | undefined;
|
|
@@ -26559,7 +26881,7 @@ export declare function validateExerciseJSON(data: unknown): {
|
|
|
26559
26881
|
validation?: {
|
|
26560
26882
|
mode: "simple" | "expression" | "mixed";
|
|
26561
26883
|
expression?: string | undefined;
|
|
26562
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
26884
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
26563
26885
|
variables?: string[] | undefined;
|
|
26564
26886
|
} | undefined;
|
|
26565
26887
|
id?: string | undefined;
|
|
@@ -26601,14 +26923,14 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26601
26923
|
digits: number;
|
|
26602
26924
|
placeholder?: string | undefined;
|
|
26603
26925
|
} | {
|
|
26604
|
-
type: "drag-options";
|
|
26605
26926
|
options: string[];
|
|
26927
|
+
type: "drag-options";
|
|
26606
26928
|
} | {
|
|
26607
26929
|
value: string;
|
|
26608
26930
|
type: "inline-drag-option";
|
|
26609
26931
|
} | {
|
|
26610
|
-
type: "radio-options";
|
|
26611
26932
|
options: string[];
|
|
26933
|
+
type: "radio-options";
|
|
26612
26934
|
} | {
|
|
26613
26935
|
type: "numeric-keypad";
|
|
26614
26936
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -26623,13 +26945,13 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26623
26945
|
} | {
|
|
26624
26946
|
type: "matcher";
|
|
26625
26947
|
rows: {
|
|
26948
|
+
type: "matcher-row";
|
|
26626
26949
|
items: {
|
|
26627
26950
|
type: "matcher-item";
|
|
26628
26951
|
itemId: string;
|
|
26629
26952
|
id: string;
|
|
26630
26953
|
content: any[];
|
|
26631
26954
|
}[];
|
|
26632
|
-
type: "matcher-row";
|
|
26633
26955
|
id: string;
|
|
26634
26956
|
}[];
|
|
26635
26957
|
groupCount: number;
|
|
@@ -26657,6 +26979,14 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26657
26979
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
26658
26980
|
label?: string | undefined;
|
|
26659
26981
|
size?: number | undefined;
|
|
26982
|
+
} | {
|
|
26983
|
+
axis: "horizontal" | "vertical";
|
|
26984
|
+
type: "grid-symmetry";
|
|
26985
|
+
rows: number;
|
|
26986
|
+
cols: number;
|
|
26987
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
26988
|
+
cells: [number, number][];
|
|
26989
|
+
cellSize?: number | undefined;
|
|
26660
26990
|
} | {
|
|
26661
26991
|
type: "ruler";
|
|
26662
26992
|
size?: number | undefined;
|
|
@@ -26670,7 +27000,7 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26670
27000
|
validation?: {
|
|
26671
27001
|
mode: "simple" | "expression" | "mixed";
|
|
26672
27002
|
expression?: string | undefined;
|
|
26673
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
27003
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
26674
27004
|
variables?: string[] | undefined;
|
|
26675
27005
|
} | undefined;
|
|
26676
27006
|
id?: string | undefined;
|
|
@@ -26694,14 +27024,14 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26694
27024
|
digits: number;
|
|
26695
27025
|
placeholder?: string | undefined;
|
|
26696
27026
|
} | {
|
|
26697
|
-
type: "drag-options";
|
|
26698
27027
|
options: string[];
|
|
27028
|
+
type: "drag-options";
|
|
26699
27029
|
} | {
|
|
26700
27030
|
value: string;
|
|
26701
27031
|
type: "inline-drag-option";
|
|
26702
27032
|
} | {
|
|
26703
|
-
type: "radio-options";
|
|
26704
27033
|
options: string[];
|
|
27034
|
+
type: "radio-options";
|
|
26705
27035
|
} | {
|
|
26706
27036
|
type: "numeric-keypad";
|
|
26707
27037
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -26716,13 +27046,13 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26716
27046
|
} | {
|
|
26717
27047
|
type: "matcher";
|
|
26718
27048
|
rows: {
|
|
27049
|
+
type: "matcher-row";
|
|
26719
27050
|
items: {
|
|
26720
27051
|
type: "matcher-item";
|
|
26721
27052
|
itemId: string;
|
|
26722
27053
|
id: string;
|
|
26723
27054
|
content: any[];
|
|
26724
27055
|
}[];
|
|
26725
|
-
type: "matcher-row";
|
|
26726
27056
|
id: string;
|
|
26727
27057
|
}[];
|
|
26728
27058
|
groupCount: number;
|
|
@@ -26750,6 +27080,14 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26750
27080
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
26751
27081
|
label?: string | undefined;
|
|
26752
27082
|
size?: number | undefined;
|
|
27083
|
+
} | {
|
|
27084
|
+
axis: "horizontal" | "vertical";
|
|
27085
|
+
type: "grid-symmetry";
|
|
27086
|
+
rows: number;
|
|
27087
|
+
cols: number;
|
|
27088
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
27089
|
+
cellSize: number;
|
|
27090
|
+
cells: [number, number][];
|
|
26753
27091
|
} | {
|
|
26754
27092
|
type: "ruler";
|
|
26755
27093
|
size?: number | undefined;
|
|
@@ -26763,7 +27101,7 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26763
27101
|
validation?: {
|
|
26764
27102
|
mode: "simple" | "expression" | "mixed";
|
|
26765
27103
|
expression?: string | undefined;
|
|
26766
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
27104
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
26767
27105
|
variables?: string[] | undefined;
|
|
26768
27106
|
} | undefined;
|
|
26769
27107
|
id?: string | undefined;
|
|
@@ -26801,7 +27139,7 @@ export declare function validateInputFormats(exercise: ExerciseJSON, userInputs:
|
|
|
26801
27139
|
* @param userInputs - User's answers keyed by widget ID
|
|
26802
27140
|
* @returns Validation result
|
|
26803
27141
|
*/
|
|
26804
|
-
export declare function validateMixed(exercise: ValidatedExerciseJSON, userInputs: Record<string, string | number | string[][] | number[]>): ValidationResult;
|
|
27142
|
+
export declare function validateMixed(exercise: ValidatedExerciseJSON, userInputs: Record<string, string | number | string[][] | number[] | GridCell[]>): ValidationResult;
|
|
26805
27143
|
|
|
26806
27144
|
/**
|
|
26807
27145
|
* Validate using simple mode (predetermined answers)
|
|
@@ -26810,7 +27148,7 @@ export declare function validateMixed(exercise: ValidatedExerciseJSON, userInput
|
|
|
26810
27148
|
* @param userInputs - User's answers keyed by widget ID
|
|
26811
27149
|
* @returns Validation result
|
|
26812
27150
|
*/
|
|
26813
|
-
export declare function validateSimple(exercise: ValidatedExerciseJSON, userInputs: Record<string, string | number | string[][] | number[]>): ValidationResult;
|
|
27151
|
+
export declare function validateSimple(exercise: ValidatedExerciseJSON, userInputs: Record<string, string | number | string[][] | number[] | GridCell[]>): ValidationResult;
|
|
26814
27152
|
|
|
26815
27153
|
export declare function validateVisualFractionCapacity(data: {
|
|
26816
27154
|
divisions: number;
|
|
@@ -26837,14 +27175,14 @@ export declare function validateWidgetJSON(data: unknown): {
|
|
|
26837
27175
|
digits: number;
|
|
26838
27176
|
placeholder?: string | undefined;
|
|
26839
27177
|
} | {
|
|
26840
|
-
type: "drag-options";
|
|
26841
27178
|
options: string[];
|
|
27179
|
+
type: "drag-options";
|
|
26842
27180
|
} | {
|
|
26843
27181
|
value: string;
|
|
26844
27182
|
type: "inline-drag-option";
|
|
26845
27183
|
} | {
|
|
26846
|
-
type: "radio-options";
|
|
26847
27184
|
options: string[];
|
|
27185
|
+
type: "radio-options";
|
|
26848
27186
|
} | {
|
|
26849
27187
|
type: "numeric-keypad";
|
|
26850
27188
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -26859,13 +27197,13 @@ export declare function validateWidgetJSON(data: unknown): {
|
|
|
26859
27197
|
} | {
|
|
26860
27198
|
type: "matcher";
|
|
26861
27199
|
rows: {
|
|
27200
|
+
type: "matcher-row";
|
|
26862
27201
|
items: {
|
|
26863
27202
|
type: "matcher-item";
|
|
26864
27203
|
itemId: string;
|
|
26865
27204
|
id: string;
|
|
26866
27205
|
content: any[];
|
|
26867
27206
|
}[];
|
|
26868
|
-
type: "matcher-row";
|
|
26869
27207
|
id: string;
|
|
26870
27208
|
}[];
|
|
26871
27209
|
groupCount: number;
|
|
@@ -26893,6 +27231,14 @@ export declare function validateWidgetJSON(data: unknown): {
|
|
|
26893
27231
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
26894
27232
|
label?: string | undefined;
|
|
26895
27233
|
size?: number | undefined;
|
|
27234
|
+
} | {
|
|
27235
|
+
axis: "horizontal" | "vertical";
|
|
27236
|
+
type: "grid-symmetry";
|
|
27237
|
+
rows: number;
|
|
27238
|
+
cols: number;
|
|
27239
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
27240
|
+
cellSize: number;
|
|
27241
|
+
cells: [number, number][];
|
|
26896
27242
|
} | {
|
|
26897
27243
|
type: "ruler";
|
|
26898
27244
|
size?: number | undefined;
|
|
@@ -26921,14 +27267,14 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
26921
27267
|
digits: number;
|
|
26922
27268
|
placeholder?: string | undefined;
|
|
26923
27269
|
} | {
|
|
26924
|
-
type: "drag-options";
|
|
26925
27270
|
options: string[];
|
|
27271
|
+
type: "drag-options";
|
|
26926
27272
|
} | {
|
|
26927
27273
|
value: string;
|
|
26928
27274
|
type: "inline-drag-option";
|
|
26929
27275
|
} | {
|
|
26930
|
-
type: "radio-options";
|
|
26931
27276
|
options: string[];
|
|
27277
|
+
type: "radio-options";
|
|
26932
27278
|
} | {
|
|
26933
27279
|
type: "numeric-keypad";
|
|
26934
27280
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -26943,13 +27289,13 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
26943
27289
|
} | {
|
|
26944
27290
|
type: "matcher";
|
|
26945
27291
|
rows: {
|
|
27292
|
+
type: "matcher-row";
|
|
26946
27293
|
items: {
|
|
26947
27294
|
type: "matcher-item";
|
|
26948
27295
|
itemId: string;
|
|
26949
27296
|
id: string;
|
|
26950
27297
|
content: any[];
|
|
26951
27298
|
}[];
|
|
26952
|
-
type: "matcher-row";
|
|
26953
27299
|
id: string;
|
|
26954
27300
|
}[];
|
|
26955
27301
|
groupCount: number;
|
|
@@ -26977,6 +27323,14 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
26977
27323
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
26978
27324
|
label?: string | undefined;
|
|
26979
27325
|
size?: number | undefined;
|
|
27326
|
+
} | {
|
|
27327
|
+
axis: "horizontal" | "vertical";
|
|
27328
|
+
type: "grid-symmetry";
|
|
27329
|
+
rows: number;
|
|
27330
|
+
cols: number;
|
|
27331
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
27332
|
+
cells: [number, number][];
|
|
27333
|
+
cellSize?: number | undefined;
|
|
26980
27334
|
} | {
|
|
26981
27335
|
type: "ruler";
|
|
26982
27336
|
size?: number | undefined;
|
|
@@ -26997,14 +27351,14 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
26997
27351
|
digits: number;
|
|
26998
27352
|
placeholder?: string | undefined;
|
|
26999
27353
|
} | {
|
|
27000
|
-
type: "drag-options";
|
|
27001
27354
|
options: string[];
|
|
27355
|
+
type: "drag-options";
|
|
27002
27356
|
} | {
|
|
27003
27357
|
value: string;
|
|
27004
27358
|
type: "inline-drag-option";
|
|
27005
27359
|
} | {
|
|
27006
|
-
type: "radio-options";
|
|
27007
27360
|
options: string[];
|
|
27361
|
+
type: "radio-options";
|
|
27008
27362
|
} | {
|
|
27009
27363
|
type: "numeric-keypad";
|
|
27010
27364
|
style?: "diamond" | "classic" | undefined;
|
|
@@ -27019,13 +27373,13 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
27019
27373
|
} | {
|
|
27020
27374
|
type: "matcher";
|
|
27021
27375
|
rows: {
|
|
27376
|
+
type: "matcher-row";
|
|
27022
27377
|
items: {
|
|
27023
27378
|
type: "matcher-item";
|
|
27024
27379
|
itemId: string;
|
|
27025
27380
|
id: string;
|
|
27026
27381
|
content: any[];
|
|
27027
27382
|
}[];
|
|
27028
|
-
type: "matcher-row";
|
|
27029
27383
|
id: string;
|
|
27030
27384
|
}[];
|
|
27031
27385
|
groupCount: number;
|
|
@@ -27053,6 +27407,14 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
27053
27407
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
27054
27408
|
label?: string | undefined;
|
|
27055
27409
|
size?: number | undefined;
|
|
27410
|
+
} | {
|
|
27411
|
+
axis: "horizontal" | "vertical";
|
|
27412
|
+
type: "grid-symmetry";
|
|
27413
|
+
rows: number;
|
|
27414
|
+
cols: number;
|
|
27415
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
27416
|
+
cellSize: number;
|
|
27417
|
+
cells: [number, number][];
|
|
27056
27418
|
} | {
|
|
27057
27419
|
type: "ruler";
|
|
27058
27420
|
size?: number | undefined;
|
|
@@ -27076,18 +27438,18 @@ export declare type ValidationJSON = z.infer<typeof ValidationJSONSchema>;
|
|
|
27076
27438
|
|
|
27077
27439
|
export declare const ValidationJSONSchema: z.ZodObject<{
|
|
27078
27440
|
mode: z.ZodEnum<["simple", "expression", "mixed"]>;
|
|
27079
|
-
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">, z.ZodArray<z.ZodNumber, "many">]>>>;
|
|
27441
|
+
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>>;
|
|
27080
27442
|
expression: z.ZodOptional<z.ZodString>;
|
|
27081
27443
|
variables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27082
27444
|
}, "strip", z.ZodTypeAny, {
|
|
27083
27445
|
mode: "simple" | "expression" | "mixed";
|
|
27084
27446
|
expression?: string | undefined;
|
|
27085
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
27447
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
27086
27448
|
variables?: string[] | undefined;
|
|
27087
27449
|
}, {
|
|
27088
27450
|
mode: "simple" | "expression" | "mixed";
|
|
27089
27451
|
expression?: string | undefined;
|
|
27090
|
-
answers?: Record<string, string | number | number[] | string[][]> | undefined;
|
|
27452
|
+
answers?: Record<string, string | number | number[] | string[][] | [number, number][]> | undefined;
|
|
27091
27453
|
variables?: string[] | undefined;
|
|
27092
27454
|
}>;
|
|
27093
27455
|
|
|
@@ -27476,6 +27838,7 @@ export declare const VerticalOperationBlockSchema: z.ZodObject<{
|
|
|
27476
27838
|
type: "VopSeparator";
|
|
27477
27839
|
}>]>, "many">;
|
|
27478
27840
|
}, "strip", z.ZodTypeAny, {
|
|
27841
|
+
type: "VerticalOperationBlock";
|
|
27479
27842
|
items: ({
|
|
27480
27843
|
type: "VopRow";
|
|
27481
27844
|
cells: ({
|
|
@@ -27546,9 +27909,9 @@ export declare const VerticalOperationBlockSchema: z.ZodObject<{
|
|
|
27546
27909
|
} | {
|
|
27547
27910
|
type: "VopSeparator";
|
|
27548
27911
|
})[];
|
|
27549
|
-
type: "VerticalOperationBlock";
|
|
27550
27912
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
27551
27913
|
}, {
|
|
27914
|
+
type: "VerticalOperationBlock";
|
|
27552
27915
|
items: ({
|
|
27553
27916
|
type: "VopRow";
|
|
27554
27917
|
cells: ({
|
|
@@ -27619,7 +27982,6 @@ export declare const VerticalOperationBlockSchema: z.ZodObject<{
|
|
|
27619
27982
|
} | {
|
|
27620
27983
|
type: "VopSeparator";
|
|
27621
27984
|
})[];
|
|
27622
|
-
type: "VerticalOperationBlock";
|
|
27623
27985
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
27624
27986
|
}>;
|
|
27625
27987
|
|
|
@@ -28018,6 +28380,7 @@ export declare const VerticalOperationItemSchema: z.ZodObject<{
|
|
|
28018
28380
|
id: string;
|
|
28019
28381
|
}>]>, "many">;
|
|
28020
28382
|
}, "strip", z.ZodTypeAny, {
|
|
28383
|
+
type: "vertical-operation";
|
|
28021
28384
|
items: ({
|
|
28022
28385
|
type: "vop-row";
|
|
28023
28386
|
cells: ({
|
|
@@ -28101,11 +28464,11 @@ export declare const VerticalOperationItemSchema: z.ZodObject<{
|
|
|
28101
28464
|
type: "vop-separator";
|
|
28102
28465
|
id: string;
|
|
28103
28466
|
})[];
|
|
28104
|
-
type: "vertical-operation";
|
|
28105
28467
|
cols: number;
|
|
28106
28468
|
id: string;
|
|
28107
28469
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
28108
28470
|
}, {
|
|
28471
|
+
type: "vertical-operation";
|
|
28109
28472
|
items: ({
|
|
28110
28473
|
type: "vop-row";
|
|
28111
28474
|
cells: ({
|
|
@@ -28189,7 +28552,6 @@ export declare const VerticalOperationItemSchema: z.ZodObject<{
|
|
|
28189
28552
|
type: "vop-separator";
|
|
28190
28553
|
id: string;
|
|
28191
28554
|
})[];
|
|
28192
|
-
type: "vertical-operation";
|
|
28193
28555
|
cols: number;
|
|
28194
28556
|
id: string;
|
|
28195
28557
|
op?: "+" | "-" | "×" | "÷" | "=" | undefined;
|
|
@@ -29843,11 +30205,11 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
29843
30205
|
type: z.ZodLiteral<"drag-options">;
|
|
29844
30206
|
options: z.ZodArray<z.ZodString, "many">;
|
|
29845
30207
|
}, "strip", z.ZodTypeAny, {
|
|
29846
|
-
type: "drag-options";
|
|
29847
30208
|
options: string[];
|
|
29848
|
-
}, {
|
|
29849
30209
|
type: "drag-options";
|
|
30210
|
+
}, {
|
|
29850
30211
|
options: string[];
|
|
30212
|
+
type: "drag-options";
|
|
29851
30213
|
}>, z.ZodObject<{
|
|
29852
30214
|
type: z.ZodLiteral<"inline-drag-option">;
|
|
29853
30215
|
value: z.ZodString;
|
|
@@ -29861,11 +30223,11 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
29861
30223
|
type: z.ZodLiteral<"radio-options">;
|
|
29862
30224
|
options: z.ZodArray<z.ZodString, "many">;
|
|
29863
30225
|
}, "strip", z.ZodTypeAny, {
|
|
29864
|
-
type: "radio-options";
|
|
29865
30226
|
options: string[];
|
|
29866
|
-
}, {
|
|
29867
30227
|
type: "radio-options";
|
|
30228
|
+
}, {
|
|
29868
30229
|
options: string[];
|
|
30230
|
+
type: "radio-options";
|
|
29869
30231
|
}>, z.ZodObject<{
|
|
29870
30232
|
type: z.ZodLiteral<"numeric-keypad">;
|
|
29871
30233
|
includeOperators: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -29923,22 +30285,22 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
29923
30285
|
content: any[];
|
|
29924
30286
|
}>, "many">;
|
|
29925
30287
|
}, "strip", z.ZodTypeAny, {
|
|
30288
|
+
type: "matcher-row";
|
|
29926
30289
|
items: {
|
|
29927
30290
|
type: "matcher-item";
|
|
29928
30291
|
itemId: string;
|
|
29929
30292
|
id: string;
|
|
29930
30293
|
content: any[];
|
|
29931
30294
|
}[];
|
|
29932
|
-
type: "matcher-row";
|
|
29933
30295
|
id: string;
|
|
29934
30296
|
}, {
|
|
30297
|
+
type: "matcher-row";
|
|
29935
30298
|
items: {
|
|
29936
30299
|
type: "matcher-item";
|
|
29937
30300
|
itemId: string;
|
|
29938
30301
|
id: string;
|
|
29939
30302
|
content: any[];
|
|
29940
30303
|
}[];
|
|
29941
|
-
type: "matcher-row";
|
|
29942
30304
|
id: string;
|
|
29943
30305
|
}>, "many">;
|
|
29944
30306
|
/** Optional color palette for the renderer (one color per answer group) */
|
|
@@ -29948,13 +30310,13 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
29948
30310
|
}, "strip", z.ZodTypeAny, {
|
|
29949
30311
|
type: "matcher";
|
|
29950
30312
|
rows: {
|
|
30313
|
+
type: "matcher-row";
|
|
29951
30314
|
items: {
|
|
29952
30315
|
type: "matcher-item";
|
|
29953
30316
|
itemId: string;
|
|
29954
30317
|
id: string;
|
|
29955
30318
|
content: any[];
|
|
29956
30319
|
}[];
|
|
29957
|
-
type: "matcher-row";
|
|
29958
30320
|
id: string;
|
|
29959
30321
|
}[];
|
|
29960
30322
|
groupCount: number;
|
|
@@ -29962,13 +30324,13 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
29962
30324
|
}, {
|
|
29963
30325
|
type: "matcher";
|
|
29964
30326
|
rows: {
|
|
30327
|
+
type: "matcher-row";
|
|
29965
30328
|
items: {
|
|
29966
30329
|
type: "matcher-item";
|
|
29967
30330
|
itemId: string;
|
|
29968
30331
|
id: string;
|
|
29969
30332
|
content: any[];
|
|
29970
30333
|
}[];
|
|
29971
|
-
type: "matcher-row";
|
|
29972
30334
|
id: string;
|
|
29973
30335
|
}[];
|
|
29974
30336
|
groupCount: number;
|
|
@@ -30089,6 +30451,46 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
30089
30451
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
30090
30452
|
label?: string | undefined;
|
|
30091
30453
|
size?: number | undefined;
|
|
30454
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
30455
|
+
type: z.ZodLiteral<"grid-symmetry">;
|
|
30456
|
+
rows: z.ZodNumber;
|
|
30457
|
+
cols: z.ZodNumber;
|
|
30458
|
+
axis: z.ZodEnum<["vertical", "horizontal"]>;
|
|
30459
|
+
interactiveArea: z.ZodEnum<["left", "right", "top", "bottom"]>;
|
|
30460
|
+
cellSize: z.ZodDefault<z.ZodNumber>;
|
|
30461
|
+
cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">;
|
|
30462
|
+
}, "strip", z.ZodTypeAny, {
|
|
30463
|
+
axis: "horizontal" | "vertical";
|
|
30464
|
+
type: "grid-symmetry";
|
|
30465
|
+
rows: number;
|
|
30466
|
+
cols: number;
|
|
30467
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
30468
|
+
cellSize: number;
|
|
30469
|
+
cells: [number, number][];
|
|
30470
|
+
}, {
|
|
30471
|
+
axis: "horizontal" | "vertical";
|
|
30472
|
+
type: "grid-symmetry";
|
|
30473
|
+
rows: number;
|
|
30474
|
+
cols: number;
|
|
30475
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
30476
|
+
cells: [number, number][];
|
|
30477
|
+
cellSize?: number | undefined;
|
|
30478
|
+
}>, {
|
|
30479
|
+
axis: "horizontal" | "vertical";
|
|
30480
|
+
type: "grid-symmetry";
|
|
30481
|
+
rows: number;
|
|
30482
|
+
cols: number;
|
|
30483
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
30484
|
+
cellSize: number;
|
|
30485
|
+
cells: [number, number][];
|
|
30486
|
+
}, {
|
|
30487
|
+
axis: "horizontal" | "vertical";
|
|
30488
|
+
type: "grid-symmetry";
|
|
30489
|
+
rows: number;
|
|
30490
|
+
cols: number;
|
|
30491
|
+
interactiveArea: "left" | "right" | "top" | "bottom";
|
|
30492
|
+
cells: [number, number][];
|
|
30493
|
+
cellSize?: number | undefined;
|
|
30092
30494
|
}>, z.ZodObject<{
|
|
30093
30495
|
type: z.ZodLiteral<"ruler">;
|
|
30094
30496
|
size: z.ZodOptional<z.ZodNumber>;
|
|
@@ -30166,7 +30568,7 @@ export declare interface WidgetValidation {
|
|
|
30166
30568
|
/** The widget ID */
|
|
30167
30569
|
widgetId: string;
|
|
30168
30570
|
/** The user's input value */
|
|
30169
|
-
userValue:
|
|
30571
|
+
userValue: UserAnswerValue | undefined;
|
|
30170
30572
|
/** Whether the input is correct (aggregate verdict; for mixed mode this is simple AND expression) */
|
|
30171
30573
|
isCorrect: boolean;
|
|
30172
30574
|
/**
|