@mathscan/math-exercise-engine 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +169 -164
- package/dist/index.js +72 -95
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +72 -95
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +44 -0
- package/package.json +20 -19
package/dist/index.d.ts
CHANGED
|
@@ -875,7 +875,7 @@ export declare function compileWithAST(dsl: string): {
|
|
|
875
875
|
type: "PairMatcherBlock";
|
|
876
876
|
name: string;
|
|
877
877
|
answers: [string, string][];
|
|
878
|
-
|
|
878
|
+
groups: [{
|
|
879
879
|
type: "MatcherItem";
|
|
880
880
|
inlines: ({
|
|
881
881
|
value: string;
|
|
@@ -923,8 +923,7 @@ export declare function compileWithAST(dsl: string): {
|
|
|
923
923
|
size?: number | undefined;
|
|
924
924
|
})[];
|
|
925
925
|
itemId: string;
|
|
926
|
-
}[]
|
|
927
|
-
bottomItems: {
|
|
926
|
+
}[], {
|
|
928
927
|
type: "MatcherItem";
|
|
929
928
|
inlines: ({
|
|
930
929
|
value: string;
|
|
@@ -972,7 +971,8 @@ export declare function compileWithAST(dsl: string): {
|
|
|
972
971
|
size?: number | undefined;
|
|
973
972
|
})[];
|
|
974
973
|
itemId: string;
|
|
975
|
-
}[];
|
|
974
|
+
}[]];
|
|
975
|
+
layout?: "rows" | "columns" | undefined;
|
|
976
976
|
})[];
|
|
977
977
|
validation?: {
|
|
978
978
|
type: "SimpleValidation";
|
|
@@ -1007,8 +1007,8 @@ export declare function compileWithAST(dsl: string): {
|
|
|
1007
1007
|
})[] | undefined;
|
|
1008
1008
|
};
|
|
1009
1009
|
json: {
|
|
1010
|
-
version: "2.0";
|
|
1011
1010
|
layout: any[];
|
|
1011
|
+
version: "2.0";
|
|
1012
1012
|
widgets: Record<string, {
|
|
1013
1013
|
length: number;
|
|
1014
1014
|
type: "inline-input";
|
|
@@ -1055,18 +1055,18 @@ export declare function compileWithAST(dsl: string): {
|
|
|
1055
1055
|
colors?: string[] | undefined;
|
|
1056
1056
|
} | {
|
|
1057
1057
|
type: "pair-matcher";
|
|
1058
|
-
|
|
1058
|
+
groups: [{
|
|
1059
1059
|
type: "matcher-item";
|
|
1060
1060
|
itemId: string;
|
|
1061
1061
|
id: string;
|
|
1062
1062
|
content: any[];
|
|
1063
|
-
}[]
|
|
1064
|
-
bottomItems: {
|
|
1063
|
+
}[], {
|
|
1065
1064
|
type: "matcher-item";
|
|
1066
1065
|
itemId: string;
|
|
1067
1066
|
id: string;
|
|
1068
1067
|
content: any[];
|
|
1069
|
-
}[];
|
|
1068
|
+
}[]];
|
|
1069
|
+
layout?: "rows" | "columns" | undefined;
|
|
1070
1070
|
} | {
|
|
1071
1071
|
type: "visual-fraction";
|
|
1072
1072
|
shape: "bar" | "circle" | "triangle" | "grid";
|
|
@@ -5268,7 +5268,8 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5268
5268
|
}>, z.ZodEffects<z.ZodObject<{
|
|
5269
5269
|
type: z.ZodLiteral<"PairMatcherBlock">;
|
|
5270
5270
|
name: z.ZodString;
|
|
5271
|
-
|
|
5271
|
+
layout: z.ZodOptional<z.ZodEnum<["rows", "columns"]>>;
|
|
5272
|
+
groups: z.ZodTuple<[z.ZodArray<z.ZodObject<{
|
|
5272
5273
|
type: z.ZodLiteral<"MatcherItem">;
|
|
5273
5274
|
itemId: z.ZodString;
|
|
5274
5275
|
inlines: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -5556,8 +5557,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5556
5557
|
size?: number | undefined;
|
|
5557
5558
|
})[];
|
|
5558
5559
|
itemId: string;
|
|
5559
|
-
}>, "many"
|
|
5560
|
-
bottomItems: z.ZodArray<z.ZodObject<{
|
|
5560
|
+
}>, "many">, z.ZodArray<z.ZodObject<{
|
|
5561
5561
|
type: z.ZodLiteral<"MatcherItem">;
|
|
5562
5562
|
itemId: z.ZodString;
|
|
5563
5563
|
inlines: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -5845,13 +5845,13 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5845
5845
|
size?: number | undefined;
|
|
5846
5846
|
})[];
|
|
5847
5847
|
itemId: string;
|
|
5848
|
-
}>, "many">;
|
|
5848
|
+
}>, "many">], null>;
|
|
5849
5849
|
answers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
5850
5850
|
}, "strip", z.ZodTypeAny, {
|
|
5851
5851
|
type: "PairMatcherBlock";
|
|
5852
5852
|
name: string;
|
|
5853
5853
|
answers: [string, string][];
|
|
5854
|
-
|
|
5854
|
+
groups: [{
|
|
5855
5855
|
type: "MatcherItem";
|
|
5856
5856
|
inlines: ({
|
|
5857
5857
|
value: string;
|
|
@@ -5899,8 +5899,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5899
5899
|
size?: number | undefined;
|
|
5900
5900
|
})[];
|
|
5901
5901
|
itemId: string;
|
|
5902
|
-
}[]
|
|
5903
|
-
bottomItems: {
|
|
5902
|
+
}[], {
|
|
5904
5903
|
type: "MatcherItem";
|
|
5905
5904
|
inlines: ({
|
|
5906
5905
|
value: string;
|
|
@@ -5948,12 +5947,13 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
5948
5947
|
size?: number | undefined;
|
|
5949
5948
|
})[];
|
|
5950
5949
|
itemId: string;
|
|
5951
|
-
}[];
|
|
5950
|
+
}[]];
|
|
5951
|
+
layout?: "rows" | "columns" | undefined;
|
|
5952
5952
|
}, {
|
|
5953
5953
|
type: "PairMatcherBlock";
|
|
5954
5954
|
name: string;
|
|
5955
5955
|
answers: [string, string][];
|
|
5956
|
-
|
|
5956
|
+
groups: [{
|
|
5957
5957
|
type: "MatcherItem";
|
|
5958
5958
|
inlines: ({
|
|
5959
5959
|
value: string;
|
|
@@ -6001,8 +6001,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6001
6001
|
size?: number | undefined;
|
|
6002
6002
|
})[];
|
|
6003
6003
|
itemId: string;
|
|
6004
|
-
}[]
|
|
6005
|
-
bottomItems: {
|
|
6004
|
+
}[], {
|
|
6006
6005
|
type: "MatcherItem";
|
|
6007
6006
|
inlines: ({
|
|
6008
6007
|
value: string;
|
|
@@ -6050,12 +6049,13 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6050
6049
|
size?: number | undefined;
|
|
6051
6050
|
})[];
|
|
6052
6051
|
itemId: string;
|
|
6053
|
-
}[];
|
|
6052
|
+
}[]];
|
|
6053
|
+
layout?: "rows" | "columns" | undefined;
|
|
6054
6054
|
}>, {
|
|
6055
6055
|
type: "PairMatcherBlock";
|
|
6056
6056
|
name: string;
|
|
6057
6057
|
answers: [string, string][];
|
|
6058
|
-
|
|
6058
|
+
groups: [{
|
|
6059
6059
|
type: "MatcherItem";
|
|
6060
6060
|
inlines: ({
|
|
6061
6061
|
value: string;
|
|
@@ -6103,8 +6103,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6103
6103
|
size?: number | undefined;
|
|
6104
6104
|
})[];
|
|
6105
6105
|
itemId: string;
|
|
6106
|
-
}[]
|
|
6107
|
-
bottomItems: {
|
|
6106
|
+
}[], {
|
|
6108
6107
|
type: "MatcherItem";
|
|
6109
6108
|
inlines: ({
|
|
6110
6109
|
value: string;
|
|
@@ -6152,12 +6151,13 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6152
6151
|
size?: number | undefined;
|
|
6153
6152
|
})[];
|
|
6154
6153
|
itemId: string;
|
|
6155
|
-
}[];
|
|
6154
|
+
}[]];
|
|
6155
|
+
layout?: "rows" | "columns" | undefined;
|
|
6156
6156
|
}, {
|
|
6157
6157
|
type: "PairMatcherBlock";
|
|
6158
6158
|
name: string;
|
|
6159
6159
|
answers: [string, string][];
|
|
6160
|
-
|
|
6160
|
+
groups: [{
|
|
6161
6161
|
type: "MatcherItem";
|
|
6162
6162
|
inlines: ({
|
|
6163
6163
|
value: string;
|
|
@@ -6205,8 +6205,7 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6205
6205
|
size?: number | undefined;
|
|
6206
6206
|
})[];
|
|
6207
6207
|
itemId: string;
|
|
6208
|
-
}[]
|
|
6209
|
-
bottomItems: {
|
|
6208
|
+
}[], {
|
|
6210
6209
|
type: "MatcherItem";
|
|
6211
6210
|
inlines: ({
|
|
6212
6211
|
value: string;
|
|
@@ -6254,7 +6253,8 @@ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
6254
6253
|
size?: number | undefined;
|
|
6255
6254
|
})[];
|
|
6256
6255
|
itemId: string;
|
|
6257
|
-
}[];
|
|
6256
|
+
}[]];
|
|
6257
|
+
layout?: "rows" | "columns" | undefined;
|
|
6258
6258
|
}>, z.ZodObject<{
|
|
6259
6259
|
type: z.ZodLiteral<"VerticalOperationBlock">;
|
|
6260
6260
|
op: z.ZodOptional<z.ZodEnum<["+", "-", "×", "÷", "="]>>;
|
|
@@ -6883,7 +6883,7 @@ export declare function createNumericInput(name: string, digits: number, answer?
|
|
|
6883
6883
|
*/
|
|
6884
6884
|
export declare function createNumericKeypad(includeOperators?: boolean, includeDecimal?: boolean, style?: 'diamond' | 'classic'): NumericKeypadTool;
|
|
6885
6885
|
|
|
6886
|
-
export declare function createPairMatcherBlock(name: string,
|
|
6886
|
+
export declare function createPairMatcherBlock(name: string, groups: [MatcherItem[], MatcherItem[]], answers: [string, string][], layout?: 'rows' | 'columns'): PairMatcherBlock;
|
|
6887
6887
|
|
|
6888
6888
|
export declare function createProtractorTool(size?: number): ProtractorTool;
|
|
6889
6889
|
|
|
@@ -11383,7 +11383,8 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11383
11383
|
}>, z.ZodEffects<z.ZodObject<{
|
|
11384
11384
|
type: z.ZodLiteral<"PairMatcherBlock">;
|
|
11385
11385
|
name: z.ZodString;
|
|
11386
|
-
|
|
11386
|
+
layout: z.ZodOptional<z.ZodEnum<["rows", "columns"]>>;
|
|
11387
|
+
groups: z.ZodTuple<[z.ZodArray<z.ZodObject<{
|
|
11387
11388
|
type: z.ZodLiteral<"MatcherItem">;
|
|
11388
11389
|
itemId: z.ZodString;
|
|
11389
11390
|
inlines: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -11671,8 +11672,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11671
11672
|
size?: number | undefined;
|
|
11672
11673
|
})[];
|
|
11673
11674
|
itemId: string;
|
|
11674
|
-
}>, "many"
|
|
11675
|
-
bottomItems: z.ZodArray<z.ZodObject<{
|
|
11675
|
+
}>, "many">, z.ZodArray<z.ZodObject<{
|
|
11676
11676
|
type: z.ZodLiteral<"MatcherItem">;
|
|
11677
11677
|
itemId: z.ZodString;
|
|
11678
11678
|
inlines: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -11960,13 +11960,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
11960
11960
|
size?: number | undefined;
|
|
11961
11961
|
})[];
|
|
11962
11962
|
itemId: string;
|
|
11963
|
-
}>, "many">;
|
|
11963
|
+
}>, "many">], null>;
|
|
11964
11964
|
answers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
11965
11965
|
}, "strip", z.ZodTypeAny, {
|
|
11966
11966
|
type: "PairMatcherBlock";
|
|
11967
11967
|
name: string;
|
|
11968
11968
|
answers: [string, string][];
|
|
11969
|
-
|
|
11969
|
+
groups: [{
|
|
11970
11970
|
type: "MatcherItem";
|
|
11971
11971
|
inlines: ({
|
|
11972
11972
|
value: string;
|
|
@@ -12014,8 +12014,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12014
12014
|
size?: number | undefined;
|
|
12015
12015
|
})[];
|
|
12016
12016
|
itemId: string;
|
|
12017
|
-
}[]
|
|
12018
|
-
bottomItems: {
|
|
12017
|
+
}[], {
|
|
12019
12018
|
type: "MatcherItem";
|
|
12020
12019
|
inlines: ({
|
|
12021
12020
|
value: string;
|
|
@@ -12063,12 +12062,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12063
12062
|
size?: number | undefined;
|
|
12064
12063
|
})[];
|
|
12065
12064
|
itemId: string;
|
|
12066
|
-
}[];
|
|
12065
|
+
}[]];
|
|
12066
|
+
layout?: "rows" | "columns" | undefined;
|
|
12067
12067
|
}, {
|
|
12068
12068
|
type: "PairMatcherBlock";
|
|
12069
12069
|
name: string;
|
|
12070
12070
|
answers: [string, string][];
|
|
12071
|
-
|
|
12071
|
+
groups: [{
|
|
12072
12072
|
type: "MatcherItem";
|
|
12073
12073
|
inlines: ({
|
|
12074
12074
|
value: string;
|
|
@@ -12116,8 +12116,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12116
12116
|
size?: number | undefined;
|
|
12117
12117
|
})[];
|
|
12118
12118
|
itemId: string;
|
|
12119
|
-
}[]
|
|
12120
|
-
bottomItems: {
|
|
12119
|
+
}[], {
|
|
12121
12120
|
type: "MatcherItem";
|
|
12122
12121
|
inlines: ({
|
|
12123
12122
|
value: string;
|
|
@@ -12165,12 +12164,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12165
12164
|
size?: number | undefined;
|
|
12166
12165
|
})[];
|
|
12167
12166
|
itemId: string;
|
|
12168
|
-
}[];
|
|
12167
|
+
}[]];
|
|
12168
|
+
layout?: "rows" | "columns" | undefined;
|
|
12169
12169
|
}>, {
|
|
12170
12170
|
type: "PairMatcherBlock";
|
|
12171
12171
|
name: string;
|
|
12172
12172
|
answers: [string, string][];
|
|
12173
|
-
|
|
12173
|
+
groups: [{
|
|
12174
12174
|
type: "MatcherItem";
|
|
12175
12175
|
inlines: ({
|
|
12176
12176
|
value: string;
|
|
@@ -12218,8 +12218,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12218
12218
|
size?: number | undefined;
|
|
12219
12219
|
})[];
|
|
12220
12220
|
itemId: string;
|
|
12221
|
-
}[]
|
|
12222
|
-
bottomItems: {
|
|
12221
|
+
}[], {
|
|
12223
12222
|
type: "MatcherItem";
|
|
12224
12223
|
inlines: ({
|
|
12225
12224
|
value: string;
|
|
@@ -12267,12 +12266,13 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12267
12266
|
size?: number | undefined;
|
|
12268
12267
|
})[];
|
|
12269
12268
|
itemId: string;
|
|
12270
|
-
}[];
|
|
12269
|
+
}[]];
|
|
12270
|
+
layout?: "rows" | "columns" | undefined;
|
|
12271
12271
|
}, {
|
|
12272
12272
|
type: "PairMatcherBlock";
|
|
12273
12273
|
name: string;
|
|
12274
12274
|
answers: [string, string][];
|
|
12275
|
-
|
|
12275
|
+
groups: [{
|
|
12276
12276
|
type: "MatcherItem";
|
|
12277
12277
|
inlines: ({
|
|
12278
12278
|
value: string;
|
|
@@ -12320,8 +12320,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12320
12320
|
size?: number | undefined;
|
|
12321
12321
|
})[];
|
|
12322
12322
|
itemId: string;
|
|
12323
|
-
}[]
|
|
12324
|
-
bottomItems: {
|
|
12323
|
+
}[], {
|
|
12325
12324
|
type: "MatcherItem";
|
|
12326
12325
|
inlines: ({
|
|
12327
12326
|
value: string;
|
|
@@ -12369,7 +12368,8 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
12369
12368
|
size?: number | undefined;
|
|
12370
12369
|
})[];
|
|
12371
12370
|
itemId: string;
|
|
12372
|
-
}[];
|
|
12371
|
+
}[]];
|
|
12372
|
+
layout?: "rows" | "columns" | undefined;
|
|
12373
12373
|
}>, z.ZodObject<{
|
|
12374
12374
|
type: z.ZodLiteral<"VerticalOperationBlock">;
|
|
12375
12375
|
op: z.ZodOptional<z.ZodEnum<["+", "-", "×", "÷", "="]>>;
|
|
@@ -13483,7 +13483,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13483
13483
|
type: "PairMatcherBlock";
|
|
13484
13484
|
name: string;
|
|
13485
13485
|
answers: [string, string][];
|
|
13486
|
-
|
|
13486
|
+
groups: [{
|
|
13487
13487
|
type: "MatcherItem";
|
|
13488
13488
|
inlines: ({
|
|
13489
13489
|
value: string;
|
|
@@ -13531,8 +13531,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13531
13531
|
size?: number | undefined;
|
|
13532
13532
|
})[];
|
|
13533
13533
|
itemId: string;
|
|
13534
|
-
}[]
|
|
13535
|
-
bottomItems: {
|
|
13534
|
+
}[], {
|
|
13536
13535
|
type: "MatcherItem";
|
|
13537
13536
|
inlines: ({
|
|
13538
13537
|
value: string;
|
|
@@ -13580,7 +13579,8 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
13580
13579
|
size?: number | undefined;
|
|
13581
13580
|
})[];
|
|
13582
13581
|
itemId: string;
|
|
13583
|
-
}[];
|
|
13582
|
+
}[]];
|
|
13583
|
+
layout?: "rows" | "columns" | undefined;
|
|
13584
13584
|
})[];
|
|
13585
13585
|
validation?: {
|
|
13586
13586
|
type: "SimpleValidation";
|
|
@@ -14131,7 +14131,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14131
14131
|
type: "PairMatcherBlock";
|
|
14132
14132
|
name: string;
|
|
14133
14133
|
answers: [string, string][];
|
|
14134
|
-
|
|
14134
|
+
groups: [{
|
|
14135
14135
|
type: "MatcherItem";
|
|
14136
14136
|
inlines: ({
|
|
14137
14137
|
value: string;
|
|
@@ -14179,8 +14179,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14179
14179
|
size?: number | undefined;
|
|
14180
14180
|
})[];
|
|
14181
14181
|
itemId: string;
|
|
14182
|
-
}[]
|
|
14183
|
-
bottomItems: {
|
|
14182
|
+
}[], {
|
|
14184
14183
|
type: "MatcherItem";
|
|
14185
14184
|
inlines: ({
|
|
14186
14185
|
value: string;
|
|
@@ -14228,7 +14227,8 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14228
14227
|
size?: number | undefined;
|
|
14229
14228
|
})[];
|
|
14230
14229
|
itemId: string;
|
|
14231
|
-
}[];
|
|
14230
|
+
}[]];
|
|
14231
|
+
layout?: "rows" | "columns" | undefined;
|
|
14232
14232
|
})[];
|
|
14233
14233
|
validation?: {
|
|
14234
14234
|
type: "SimpleValidation";
|
|
@@ -14779,7 +14779,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14779
14779
|
type: "PairMatcherBlock";
|
|
14780
14780
|
name: string;
|
|
14781
14781
|
answers: [string, string][];
|
|
14782
|
-
|
|
14782
|
+
groups: [{
|
|
14783
14783
|
type: "MatcherItem";
|
|
14784
14784
|
inlines: ({
|
|
14785
14785
|
value: string;
|
|
@@ -14827,8 +14827,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14827
14827
|
size?: number | undefined;
|
|
14828
14828
|
})[];
|
|
14829
14829
|
itemId: string;
|
|
14830
|
-
}[]
|
|
14831
|
-
bottomItems: {
|
|
14830
|
+
}[], {
|
|
14832
14831
|
type: "MatcherItem";
|
|
14833
14832
|
inlines: ({
|
|
14834
14833
|
value: string;
|
|
@@ -14876,7 +14875,8 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14876
14875
|
size?: number | undefined;
|
|
14877
14876
|
})[];
|
|
14878
14877
|
itemId: string;
|
|
14879
|
-
}[];
|
|
14878
|
+
}[]];
|
|
14879
|
+
layout?: "rows" | "columns" | undefined;
|
|
14880
14880
|
})[];
|
|
14881
14881
|
validation?: {
|
|
14882
14882
|
type: "SimpleValidation";
|
|
@@ -15427,7 +15427,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15427
15427
|
type: "PairMatcherBlock";
|
|
15428
15428
|
name: string;
|
|
15429
15429
|
answers: [string, string][];
|
|
15430
|
-
|
|
15430
|
+
groups: [{
|
|
15431
15431
|
type: "MatcherItem";
|
|
15432
15432
|
inlines: ({
|
|
15433
15433
|
value: string;
|
|
@@ -15475,8 +15475,7 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15475
15475
|
size?: number | undefined;
|
|
15476
15476
|
})[];
|
|
15477
15477
|
itemId: string;
|
|
15478
|
-
}[]
|
|
15479
|
-
bottomItems: {
|
|
15478
|
+
}[], {
|
|
15480
15479
|
type: "MatcherItem";
|
|
15481
15480
|
inlines: ({
|
|
15482
15481
|
value: string;
|
|
@@ -15524,7 +15523,8 @@ export declare const ExerciseDocumentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15524
15523
|
size?: number | undefined;
|
|
15525
15524
|
})[];
|
|
15526
15525
|
itemId: string;
|
|
15527
|
-
}[];
|
|
15526
|
+
}[]];
|
|
15527
|
+
layout?: "rows" | "columns" | undefined;
|
|
15528
15528
|
})[];
|
|
15529
15529
|
validation?: {
|
|
15530
15530
|
type: "SimpleValidation";
|
|
@@ -15731,7 +15731,9 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15731
15731
|
colors?: string[] | undefined;
|
|
15732
15732
|
}>, z.ZodObject<{
|
|
15733
15733
|
type: z.ZodLiteral<"pair-matcher">;
|
|
15734
|
-
|
|
15734
|
+
/** Row layout (top/bottom, default) or column layout (left/right). */
|
|
15735
|
+
layout: z.ZodOptional<z.ZodEnum<["rows", "columns"]>>;
|
|
15736
|
+
groups: z.ZodTuple<[z.ZodArray<z.ZodObject<{
|
|
15735
15737
|
id: z.ZodString;
|
|
15736
15738
|
type: z.ZodLiteral<"matcher-item">;
|
|
15737
15739
|
/** Item identifier (no pipe allowed) */
|
|
@@ -15748,8 +15750,7 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15748
15750
|
itemId: string;
|
|
15749
15751
|
id: string;
|
|
15750
15752
|
content: any[];
|
|
15751
|
-
}>, "many"
|
|
15752
|
-
bottomItems: z.ZodArray<z.ZodObject<{
|
|
15753
|
+
}>, "many">, z.ZodArray<z.ZodObject<{
|
|
15753
15754
|
id: z.ZodString;
|
|
15754
15755
|
type: z.ZodLiteral<"matcher-item">;
|
|
15755
15756
|
/** Item identifier (no pipe allowed) */
|
|
@@ -15766,35 +15767,35 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15766
15767
|
itemId: string;
|
|
15767
15768
|
id: string;
|
|
15768
15769
|
content: any[];
|
|
15769
|
-
}>, "many">;
|
|
15770
|
+
}>, "many">], null>;
|
|
15770
15771
|
}, "strip", z.ZodTypeAny, {
|
|
15771
15772
|
type: "pair-matcher";
|
|
15772
|
-
|
|
15773
|
+
groups: [{
|
|
15773
15774
|
type: "matcher-item";
|
|
15774
15775
|
itemId: string;
|
|
15775
15776
|
id: string;
|
|
15776
15777
|
content: any[];
|
|
15777
|
-
}[]
|
|
15778
|
-
bottomItems: {
|
|
15778
|
+
}[], {
|
|
15779
15779
|
type: "matcher-item";
|
|
15780
15780
|
itemId: string;
|
|
15781
15781
|
id: string;
|
|
15782
15782
|
content: any[];
|
|
15783
|
-
}[];
|
|
15783
|
+
}[]];
|
|
15784
|
+
layout?: "rows" | "columns" | undefined;
|
|
15784
15785
|
}, {
|
|
15785
15786
|
type: "pair-matcher";
|
|
15786
|
-
|
|
15787
|
+
groups: [{
|
|
15787
15788
|
type: "matcher-item";
|
|
15788
15789
|
itemId: string;
|
|
15789
15790
|
id: string;
|
|
15790
15791
|
content: any[];
|
|
15791
|
-
}[]
|
|
15792
|
-
bottomItems: {
|
|
15792
|
+
}[], {
|
|
15793
15793
|
type: "matcher-item";
|
|
15794
15794
|
itemId: string;
|
|
15795
15795
|
id: string;
|
|
15796
15796
|
content: any[];
|
|
15797
|
-
}[];
|
|
15797
|
+
}[]];
|
|
15798
|
+
layout?: "rows" | "columns" | undefined;
|
|
15798
15799
|
}>, z.ZodEffects<z.ZodObject<{
|
|
15799
15800
|
type: z.ZodLiteral<"visual-fraction">;
|
|
15800
15801
|
shape: z.ZodDefault<z.ZodEnum<["bar", "circle", "triangle", "grid"]>>;
|
|
@@ -15946,8 +15947,8 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15946
15947
|
difficulty?: number | undefined;
|
|
15947
15948
|
}>>;
|
|
15948
15949
|
}, "strip", z.ZodTypeAny, {
|
|
15949
|
-
version: "2.0";
|
|
15950
15950
|
layout: any[];
|
|
15951
|
+
version: "2.0";
|
|
15951
15952
|
widgets: Record<string, {
|
|
15952
15953
|
length: number;
|
|
15953
15954
|
type: "inline-input";
|
|
@@ -15994,18 +15995,18 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
15994
15995
|
colors?: string[] | undefined;
|
|
15995
15996
|
} | {
|
|
15996
15997
|
type: "pair-matcher";
|
|
15997
|
-
|
|
15998
|
+
groups: [{
|
|
15998
15999
|
type: "matcher-item";
|
|
15999
16000
|
itemId: string;
|
|
16000
16001
|
id: string;
|
|
16001
16002
|
content: any[];
|
|
16002
|
-
}[]
|
|
16003
|
-
bottomItems: {
|
|
16003
|
+
}[], {
|
|
16004
16004
|
type: "matcher-item";
|
|
16005
16005
|
itemId: string;
|
|
16006
16006
|
id: string;
|
|
16007
16007
|
content: any[];
|
|
16008
|
-
}[];
|
|
16008
|
+
}[]];
|
|
16009
|
+
layout?: "rows" | "columns" | undefined;
|
|
16009
16010
|
} | {
|
|
16010
16011
|
type: "visual-fraction";
|
|
16011
16012
|
shape: "bar" | "circle" | "triangle" | "grid";
|
|
@@ -16047,8 +16048,8 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
16047
16048
|
difficulty?: number | undefined;
|
|
16048
16049
|
} | undefined;
|
|
16049
16050
|
}, {
|
|
16050
|
-
version: "2.0";
|
|
16051
16051
|
layout: any[];
|
|
16052
|
+
version: "2.0";
|
|
16052
16053
|
widgets: Record<string, {
|
|
16053
16054
|
length: number;
|
|
16054
16055
|
type: "inline-input";
|
|
@@ -16095,18 +16096,18 @@ export declare const ExerciseJSONSchema: z.ZodObject<{
|
|
|
16095
16096
|
colors?: string[] | undefined;
|
|
16096
16097
|
} | {
|
|
16097
16098
|
type: "pair-matcher";
|
|
16098
|
-
|
|
16099
|
+
groups: [{
|
|
16099
16100
|
type: "matcher-item";
|
|
16100
16101
|
itemId: string;
|
|
16101
16102
|
id: string;
|
|
16102
16103
|
content: any[];
|
|
16103
|
-
}[]
|
|
16104
|
-
bottomItems: {
|
|
16104
|
+
}[], {
|
|
16105
16105
|
type: "matcher-item";
|
|
16106
16106
|
itemId: string;
|
|
16107
16107
|
id: string;
|
|
16108
16108
|
content: any[];
|
|
16109
|
-
}[];
|
|
16109
|
+
}[]];
|
|
16110
|
+
layout?: "rows" | "columns" | undefined;
|
|
16110
16111
|
} | {
|
|
16111
16112
|
type: "visual-fraction";
|
|
16112
16113
|
answer: number[];
|
|
@@ -23237,8 +23238,10 @@ export declare type PairMatcherBlock = z.infer<typeof PairMatcherBlockSchema>;
|
|
|
23237
23238
|
export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
23238
23239
|
type: z.ZodLiteral<"PairMatcherBlock">;
|
|
23239
23240
|
name: z.ZodString;
|
|
23240
|
-
/**
|
|
23241
|
-
|
|
23241
|
+
/** Row layout (top/bottom, default) or column layout (left/right). */
|
|
23242
|
+
layout: z.ZodOptional<z.ZodEnum<["rows", "columns"]>>;
|
|
23243
|
+
/** Exactly two groups, in declaration order — neither more nor fewer. */
|
|
23244
|
+
groups: z.ZodTuple<[z.ZodArray<z.ZodObject<{
|
|
23242
23245
|
type: z.ZodLiteral<"MatcherItem">;
|
|
23243
23246
|
itemId: z.ZodString;
|
|
23244
23247
|
inlines: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -23526,9 +23529,7 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23526
23529
|
size?: number | undefined;
|
|
23527
23530
|
})[];
|
|
23528
23531
|
itemId: string;
|
|
23529
|
-
}>, "many"
|
|
23530
|
-
/** Items in the bottom row — at least one required */
|
|
23531
|
-
bottomItems: z.ZodArray<z.ZodObject<{
|
|
23532
|
+
}>, "many">, z.ZodArray<z.ZodObject<{
|
|
23532
23533
|
type: z.ZodLiteral<"MatcherItem">;
|
|
23533
23534
|
itemId: z.ZodString;
|
|
23534
23535
|
inlines: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -23816,9 +23817,9 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23816
23817
|
size?: number | undefined;
|
|
23817
23818
|
})[];
|
|
23818
23819
|
itemId: string;
|
|
23819
|
-
}>, "many">;
|
|
23820
|
+
}>, "many">], null>;
|
|
23820
23821
|
/**
|
|
23821
|
-
* Each answer pair is [
|
|
23822
|
+
* Each answer pair is [groups[0] id, groups[1] id].
|
|
23822
23823
|
* At least one pair is required.
|
|
23823
23824
|
*/
|
|
23824
23825
|
answers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
@@ -23826,7 +23827,7 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23826
23827
|
type: "PairMatcherBlock";
|
|
23827
23828
|
name: string;
|
|
23828
23829
|
answers: [string, string][];
|
|
23829
|
-
|
|
23830
|
+
groups: [{
|
|
23830
23831
|
type: "MatcherItem";
|
|
23831
23832
|
inlines: ({
|
|
23832
23833
|
value: string;
|
|
@@ -23874,8 +23875,7 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23874
23875
|
size?: number | undefined;
|
|
23875
23876
|
})[];
|
|
23876
23877
|
itemId: string;
|
|
23877
|
-
}[]
|
|
23878
|
-
bottomItems: {
|
|
23878
|
+
}[], {
|
|
23879
23879
|
type: "MatcherItem";
|
|
23880
23880
|
inlines: ({
|
|
23881
23881
|
value: string;
|
|
@@ -23923,12 +23923,13 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23923
23923
|
size?: number | undefined;
|
|
23924
23924
|
})[];
|
|
23925
23925
|
itemId: string;
|
|
23926
|
-
}[];
|
|
23926
|
+
}[]];
|
|
23927
|
+
layout?: "rows" | "columns" | undefined;
|
|
23927
23928
|
}, {
|
|
23928
23929
|
type: "PairMatcherBlock";
|
|
23929
23930
|
name: string;
|
|
23930
23931
|
answers: [string, string][];
|
|
23931
|
-
|
|
23932
|
+
groups: [{
|
|
23932
23933
|
type: "MatcherItem";
|
|
23933
23934
|
inlines: ({
|
|
23934
23935
|
value: string;
|
|
@@ -23976,8 +23977,7 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23976
23977
|
size?: number | undefined;
|
|
23977
23978
|
})[];
|
|
23978
23979
|
itemId: string;
|
|
23979
|
-
}[]
|
|
23980
|
-
bottomItems: {
|
|
23980
|
+
}[], {
|
|
23981
23981
|
type: "MatcherItem";
|
|
23982
23982
|
inlines: ({
|
|
23983
23983
|
value: string;
|
|
@@ -24025,12 +24025,13 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
24025
24025
|
size?: number | undefined;
|
|
24026
24026
|
})[];
|
|
24027
24027
|
itemId: string;
|
|
24028
|
-
}[];
|
|
24028
|
+
}[]];
|
|
24029
|
+
layout?: "rows" | "columns" | undefined;
|
|
24029
24030
|
}>, {
|
|
24030
24031
|
type: "PairMatcherBlock";
|
|
24031
24032
|
name: string;
|
|
24032
24033
|
answers: [string, string][];
|
|
24033
|
-
|
|
24034
|
+
groups: [{
|
|
24034
24035
|
type: "MatcherItem";
|
|
24035
24036
|
inlines: ({
|
|
24036
24037
|
value: string;
|
|
@@ -24078,8 +24079,7 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
24078
24079
|
size?: number | undefined;
|
|
24079
24080
|
})[];
|
|
24080
24081
|
itemId: string;
|
|
24081
|
-
}[]
|
|
24082
|
-
bottomItems: {
|
|
24082
|
+
}[], {
|
|
24083
24083
|
type: "MatcherItem";
|
|
24084
24084
|
inlines: ({
|
|
24085
24085
|
value: string;
|
|
@@ -24127,12 +24127,13 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
24127
24127
|
size?: number | undefined;
|
|
24128
24128
|
})[];
|
|
24129
24129
|
itemId: string;
|
|
24130
|
-
}[];
|
|
24130
|
+
}[]];
|
|
24131
|
+
layout?: "rows" | "columns" | undefined;
|
|
24131
24132
|
}, {
|
|
24132
24133
|
type: "PairMatcherBlock";
|
|
24133
24134
|
name: string;
|
|
24134
24135
|
answers: [string, string][];
|
|
24135
|
-
|
|
24136
|
+
groups: [{
|
|
24136
24137
|
type: "MatcherItem";
|
|
24137
24138
|
inlines: ({
|
|
24138
24139
|
value: string;
|
|
@@ -24180,8 +24181,7 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
24180
24181
|
size?: number | undefined;
|
|
24181
24182
|
})[];
|
|
24182
24183
|
itemId: string;
|
|
24183
|
-
}[]
|
|
24184
|
-
bottomItems: {
|
|
24184
|
+
}[], {
|
|
24185
24185
|
type: "MatcherItem";
|
|
24186
24186
|
inlines: ({
|
|
24187
24187
|
value: string;
|
|
@@ -24229,18 +24229,23 @@ export declare const PairMatcherBlockSchema: z.ZodEffects<z.ZodObject<{
|
|
|
24229
24229
|
size?: number | undefined;
|
|
24230
24230
|
})[];
|
|
24231
24231
|
itemId: string;
|
|
24232
|
-
}[];
|
|
24232
|
+
}[]];
|
|
24233
|
+
layout?: "rows" | "columns" | undefined;
|
|
24233
24234
|
}>;
|
|
24234
24235
|
|
|
24235
24236
|
export declare type PairMatcherWidgetJSON = z.infer<typeof PairMatcherWidgetJSONSchema>;
|
|
24236
24237
|
|
|
24237
24238
|
/**
|
|
24238
|
-
* Pair-Matcher widget —
|
|
24239
|
-
*
|
|
24239
|
+
* Pair-Matcher widget — two-group item pairing.
|
|
24240
|
+
* `groups` is a fixed 2-tuple, in declaration order; items carry IDs for
|
|
24241
|
+
* React keys. Neither group has a spatial meaning — `layout` decides whether
|
|
24242
|
+
* they render as rows or columns.
|
|
24240
24243
|
*/
|
|
24241
24244
|
export declare const PairMatcherWidgetJSONSchema: z.ZodObject<{
|
|
24242
24245
|
type: z.ZodLiteral<"pair-matcher">;
|
|
24243
|
-
|
|
24246
|
+
/** Row layout (top/bottom, default) or column layout (left/right). */
|
|
24247
|
+
layout: z.ZodOptional<z.ZodEnum<["rows", "columns"]>>;
|
|
24248
|
+
groups: z.ZodTuple<[z.ZodArray<z.ZodObject<{
|
|
24244
24249
|
id: z.ZodString;
|
|
24245
24250
|
type: z.ZodLiteral<"matcher-item">;
|
|
24246
24251
|
/** Item identifier (no pipe allowed) */
|
|
@@ -24257,8 +24262,7 @@ export declare const PairMatcherWidgetJSONSchema: z.ZodObject<{
|
|
|
24257
24262
|
itemId: string;
|
|
24258
24263
|
id: string;
|
|
24259
24264
|
content: any[];
|
|
24260
|
-
}>, "many"
|
|
24261
|
-
bottomItems: z.ZodArray<z.ZodObject<{
|
|
24265
|
+
}>, "many">, z.ZodArray<z.ZodObject<{
|
|
24262
24266
|
id: z.ZodString;
|
|
24263
24267
|
type: z.ZodLiteral<"matcher-item">;
|
|
24264
24268
|
/** Item identifier (no pipe allowed) */
|
|
@@ -24275,35 +24279,35 @@ export declare const PairMatcherWidgetJSONSchema: z.ZodObject<{
|
|
|
24275
24279
|
itemId: string;
|
|
24276
24280
|
id: string;
|
|
24277
24281
|
content: any[];
|
|
24278
|
-
}>, "many">;
|
|
24282
|
+
}>, "many">], null>;
|
|
24279
24283
|
}, "strip", z.ZodTypeAny, {
|
|
24280
24284
|
type: "pair-matcher";
|
|
24281
|
-
|
|
24285
|
+
groups: [{
|
|
24282
24286
|
type: "matcher-item";
|
|
24283
24287
|
itemId: string;
|
|
24284
24288
|
id: string;
|
|
24285
24289
|
content: any[];
|
|
24286
|
-
}[]
|
|
24287
|
-
bottomItems: {
|
|
24290
|
+
}[], {
|
|
24288
24291
|
type: "matcher-item";
|
|
24289
24292
|
itemId: string;
|
|
24290
24293
|
id: string;
|
|
24291
24294
|
content: any[];
|
|
24292
|
-
}[];
|
|
24295
|
+
}[]];
|
|
24296
|
+
layout?: "rows" | "columns" | undefined;
|
|
24293
24297
|
}, {
|
|
24294
24298
|
type: "pair-matcher";
|
|
24295
|
-
|
|
24299
|
+
groups: [{
|
|
24296
24300
|
type: "matcher-item";
|
|
24297
24301
|
itemId: string;
|
|
24298
24302
|
id: string;
|
|
24299
24303
|
content: any[];
|
|
24300
|
-
}[]
|
|
24301
|
-
bottomItems: {
|
|
24304
|
+
}[], {
|
|
24302
24305
|
type: "matcher-item";
|
|
24303
24306
|
itemId: string;
|
|
24304
24307
|
id: string;
|
|
24305
24308
|
content: any[];
|
|
24306
|
-
}[];
|
|
24309
|
+
}[]];
|
|
24310
|
+
layout?: "rows" | "columns" | undefined;
|
|
24307
24311
|
}>;
|
|
24308
24312
|
|
|
24309
24313
|
/**
|
|
@@ -26808,8 +26812,8 @@ declare type ValidatedExerciseJSON = ExerciseJSON & {
|
|
|
26808
26812
|
* ```
|
|
26809
26813
|
*/
|
|
26810
26814
|
export declare function validateExerciseJSON(data: unknown): {
|
|
26811
|
-
version: "2.0";
|
|
26812
26815
|
layout: any[];
|
|
26816
|
+
version: "2.0";
|
|
26813
26817
|
widgets: Record<string, {
|
|
26814
26818
|
length: number;
|
|
26815
26819
|
type: "inline-input";
|
|
@@ -26856,18 +26860,18 @@ export declare function validateExerciseJSON(data: unknown): {
|
|
|
26856
26860
|
colors?: string[] | undefined;
|
|
26857
26861
|
} | {
|
|
26858
26862
|
type: "pair-matcher";
|
|
26859
|
-
|
|
26863
|
+
groups: [{
|
|
26860
26864
|
type: "matcher-item";
|
|
26861
26865
|
itemId: string;
|
|
26862
26866
|
id: string;
|
|
26863
26867
|
content: any[];
|
|
26864
|
-
}[]
|
|
26865
|
-
bottomItems: {
|
|
26868
|
+
}[], {
|
|
26866
26869
|
type: "matcher-item";
|
|
26867
26870
|
itemId: string;
|
|
26868
26871
|
id: string;
|
|
26869
26872
|
content: any[];
|
|
26870
|
-
}[];
|
|
26873
|
+
}[]];
|
|
26874
|
+
layout?: "rows" | "columns" | undefined;
|
|
26871
26875
|
} | {
|
|
26872
26876
|
type: "visual-fraction";
|
|
26873
26877
|
shape: "bar" | "circle" | "triangle" | "grid";
|
|
@@ -26927,8 +26931,8 @@ export declare function validateExerciseJSON(data: unknown): {
|
|
|
26927
26931
|
* ```
|
|
26928
26932
|
*/
|
|
26929
26933
|
export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseReturnType<{
|
|
26930
|
-
version: "2.0";
|
|
26931
26934
|
layout: any[];
|
|
26935
|
+
version: "2.0";
|
|
26932
26936
|
widgets: Record<string, {
|
|
26933
26937
|
length: number;
|
|
26934
26938
|
type: "inline-input";
|
|
@@ -26975,18 +26979,18 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
26975
26979
|
colors?: string[] | undefined;
|
|
26976
26980
|
} | {
|
|
26977
26981
|
type: "pair-matcher";
|
|
26978
|
-
|
|
26982
|
+
groups: [{
|
|
26979
26983
|
type: "matcher-item";
|
|
26980
26984
|
itemId: string;
|
|
26981
26985
|
id: string;
|
|
26982
26986
|
content: any[];
|
|
26983
|
-
}[]
|
|
26984
|
-
bottomItems: {
|
|
26987
|
+
}[], {
|
|
26985
26988
|
type: "matcher-item";
|
|
26986
26989
|
itemId: string;
|
|
26987
26990
|
id: string;
|
|
26988
26991
|
content: any[];
|
|
26989
|
-
}[];
|
|
26992
|
+
}[]];
|
|
26993
|
+
layout?: "rows" | "columns" | undefined;
|
|
26990
26994
|
} | {
|
|
26991
26995
|
type: "visual-fraction";
|
|
26992
26996
|
answer: number[];
|
|
@@ -27028,8 +27032,8 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
27028
27032
|
difficulty?: number | undefined;
|
|
27029
27033
|
} | undefined;
|
|
27030
27034
|
}, {
|
|
27031
|
-
version: "2.0";
|
|
27032
27035
|
layout: any[];
|
|
27036
|
+
version: "2.0";
|
|
27033
27037
|
widgets: Record<string, {
|
|
27034
27038
|
length: number;
|
|
27035
27039
|
type: "inline-input";
|
|
@@ -27076,18 +27080,18 @@ export declare function validateExerciseJSONSafe(data: unknown): z.SafeParseRetu
|
|
|
27076
27080
|
colors?: string[] | undefined;
|
|
27077
27081
|
} | {
|
|
27078
27082
|
type: "pair-matcher";
|
|
27079
|
-
|
|
27083
|
+
groups: [{
|
|
27080
27084
|
type: "matcher-item";
|
|
27081
27085
|
itemId: string;
|
|
27082
27086
|
id: string;
|
|
27083
27087
|
content: any[];
|
|
27084
|
-
}[]
|
|
27085
|
-
bottomItems: {
|
|
27088
|
+
}[], {
|
|
27086
27089
|
type: "matcher-item";
|
|
27087
27090
|
itemId: string;
|
|
27088
27091
|
id: string;
|
|
27089
27092
|
content: any[];
|
|
27090
|
-
}[];
|
|
27093
|
+
}[]];
|
|
27094
|
+
layout?: "rows" | "columns" | undefined;
|
|
27091
27095
|
} | {
|
|
27092
27096
|
type: "visual-fraction";
|
|
27093
27097
|
shape: "bar" | "circle" | "triangle" | "grid";
|
|
@@ -27227,18 +27231,18 @@ export declare function validateWidgetJSON(data: unknown): {
|
|
|
27227
27231
|
colors?: string[] | undefined;
|
|
27228
27232
|
} | {
|
|
27229
27233
|
type: "pair-matcher";
|
|
27230
|
-
|
|
27234
|
+
groups: [{
|
|
27231
27235
|
type: "matcher-item";
|
|
27232
27236
|
itemId: string;
|
|
27233
27237
|
id: string;
|
|
27234
27238
|
content: any[];
|
|
27235
|
-
}[]
|
|
27236
|
-
bottomItems: {
|
|
27239
|
+
}[], {
|
|
27237
27240
|
type: "matcher-item";
|
|
27238
27241
|
itemId: string;
|
|
27239
27242
|
id: string;
|
|
27240
27243
|
content: any[];
|
|
27241
|
-
}[];
|
|
27244
|
+
}[]];
|
|
27245
|
+
layout?: "rows" | "columns" | undefined;
|
|
27242
27246
|
} | {
|
|
27243
27247
|
type: "visual-fraction";
|
|
27244
27248
|
shape: "bar" | "circle" | "triangle" | "grid";
|
|
@@ -27319,18 +27323,18 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
27319
27323
|
colors?: string[] | undefined;
|
|
27320
27324
|
} | {
|
|
27321
27325
|
type: "pair-matcher";
|
|
27322
|
-
|
|
27326
|
+
groups: [{
|
|
27323
27327
|
type: "matcher-item";
|
|
27324
27328
|
itemId: string;
|
|
27325
27329
|
id: string;
|
|
27326
27330
|
content: any[];
|
|
27327
|
-
}[]
|
|
27328
|
-
bottomItems: {
|
|
27331
|
+
}[], {
|
|
27329
27332
|
type: "matcher-item";
|
|
27330
27333
|
itemId: string;
|
|
27331
27334
|
id: string;
|
|
27332
27335
|
content: any[];
|
|
27333
|
-
}[];
|
|
27336
|
+
}[]];
|
|
27337
|
+
layout?: "rows" | "columns" | undefined;
|
|
27334
27338
|
} | {
|
|
27335
27339
|
type: "visual-fraction";
|
|
27336
27340
|
answer: number[];
|
|
@@ -27403,18 +27407,18 @@ export declare function validateWidgetJSONSafe(data: unknown): z.SafeParseReturn
|
|
|
27403
27407
|
colors?: string[] | undefined;
|
|
27404
27408
|
} | {
|
|
27405
27409
|
type: "pair-matcher";
|
|
27406
|
-
|
|
27410
|
+
groups: [{
|
|
27407
27411
|
type: "matcher-item";
|
|
27408
27412
|
itemId: string;
|
|
27409
27413
|
id: string;
|
|
27410
27414
|
content: any[];
|
|
27411
|
-
}[]
|
|
27412
|
-
bottomItems: {
|
|
27415
|
+
}[], {
|
|
27413
27416
|
type: "matcher-item";
|
|
27414
27417
|
itemId: string;
|
|
27415
27418
|
id: string;
|
|
27416
27419
|
content: any[];
|
|
27417
|
-
}[];
|
|
27420
|
+
}[]];
|
|
27421
|
+
layout?: "rows" | "columns" | undefined;
|
|
27418
27422
|
} | {
|
|
27419
27423
|
type: "visual-fraction";
|
|
27420
27424
|
shape: "bar" | "circle" | "triangle" | "grid";
|
|
@@ -30354,7 +30358,9 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
30354
30358
|
colors?: string[] | undefined;
|
|
30355
30359
|
}>, z.ZodObject<{
|
|
30356
30360
|
type: z.ZodLiteral<"pair-matcher">;
|
|
30357
|
-
|
|
30361
|
+
/** Row layout (top/bottom, default) or column layout (left/right). */
|
|
30362
|
+
layout: z.ZodOptional<z.ZodEnum<["rows", "columns"]>>;
|
|
30363
|
+
groups: z.ZodTuple<[z.ZodArray<z.ZodObject<{
|
|
30358
30364
|
id: z.ZodString;
|
|
30359
30365
|
type: z.ZodLiteral<"matcher-item">;
|
|
30360
30366
|
/** Item identifier (no pipe allowed) */
|
|
@@ -30371,8 +30377,7 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
30371
30377
|
itemId: string;
|
|
30372
30378
|
id: string;
|
|
30373
30379
|
content: any[];
|
|
30374
|
-
}>, "many"
|
|
30375
|
-
bottomItems: z.ZodArray<z.ZodObject<{
|
|
30380
|
+
}>, "many">, z.ZodArray<z.ZodObject<{
|
|
30376
30381
|
id: z.ZodString;
|
|
30377
30382
|
type: z.ZodLiteral<"matcher-item">;
|
|
30378
30383
|
/** Item identifier (no pipe allowed) */
|
|
@@ -30389,35 +30394,35 @@ export declare const WidgetJSONSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"inpu
|
|
|
30389
30394
|
itemId: string;
|
|
30390
30395
|
id: string;
|
|
30391
30396
|
content: any[];
|
|
30392
|
-
}>, "many">;
|
|
30397
|
+
}>, "many">], null>;
|
|
30393
30398
|
}, "strip", z.ZodTypeAny, {
|
|
30394
30399
|
type: "pair-matcher";
|
|
30395
|
-
|
|
30400
|
+
groups: [{
|
|
30396
30401
|
type: "matcher-item";
|
|
30397
30402
|
itemId: string;
|
|
30398
30403
|
id: string;
|
|
30399
30404
|
content: any[];
|
|
30400
|
-
}[]
|
|
30401
|
-
bottomItems: {
|
|
30405
|
+
}[], {
|
|
30402
30406
|
type: "matcher-item";
|
|
30403
30407
|
itemId: string;
|
|
30404
30408
|
id: string;
|
|
30405
30409
|
content: any[];
|
|
30406
|
-
}[];
|
|
30410
|
+
}[]];
|
|
30411
|
+
layout?: "rows" | "columns" | undefined;
|
|
30407
30412
|
}, {
|
|
30408
30413
|
type: "pair-matcher";
|
|
30409
|
-
|
|
30414
|
+
groups: [{
|
|
30410
30415
|
type: "matcher-item";
|
|
30411
30416
|
itemId: string;
|
|
30412
30417
|
id: string;
|
|
30413
30418
|
content: any[];
|
|
30414
|
-
}[]
|
|
30415
|
-
bottomItems: {
|
|
30419
|
+
}[], {
|
|
30416
30420
|
type: "matcher-item";
|
|
30417
30421
|
itemId: string;
|
|
30418
30422
|
id: string;
|
|
30419
30423
|
content: any[];
|
|
30420
|
-
}[];
|
|
30424
|
+
}[]];
|
|
30425
|
+
layout?: "rows" | "columns" | undefined;
|
|
30421
30426
|
}>, z.ZodEffects<z.ZodObject<{
|
|
30422
30427
|
type: z.ZodLiteral<"visual-fraction">;
|
|
30423
30428
|
shape: z.ZodDefault<z.ZodEnum<["bar", "circle", "triangle", "grid"]>>;
|