@gmb/bitmark-parser-generator 5.10.0 → 5.12.0

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/cli/main.js CHANGED
@@ -248,6 +248,8 @@ var BitType = {
248
248
  exampleList: "example-list",
249
249
  extractorAiChat: "extractor-ai-chat",
250
250
  extractorBlock: "extractor-block",
251
+ extractorBlueprint: "extractor-blueprint",
252
+ extractorBlueprintConfiguration: "extractor-blueprint-configuration",
251
253
  extractorConfiguration: "extractor-configuration",
252
254
  extractorImage: "extractor-image",
253
255
  extractorImageCollapsible: "extractor-image-collapsible",
@@ -431,6 +433,7 @@ var BitType = {
431
433
  pageOpenBookList: "page-open-book-list",
432
434
  printBook: "print-book",
433
435
  openBookChapter: "open-book-chapter",
436
+ openBookChapterTeaser: "open-book-chapter-teaser",
434
437
  pagePerson: "page-person",
435
438
  pageProduct: "page-product",
436
439
  pageProductList: "page-product-list",
@@ -752,6 +755,8 @@ var AbstractTagConfig = class {
752
755
  chain;
753
756
  jsonKey;
754
757
  // If the json key is different from the tag
758
+ secondaryJsonKey;
759
+ // Heading card alternate path
755
760
  deprecated;
756
761
  // Deprecated version
757
762
  constructor(params) {
@@ -762,6 +767,7 @@ var AbstractTagConfig = class {
762
767
  this.minCount = params.minCount;
763
768
  this.chain = params.chain;
764
769
  this.jsonKey = params.jsonKey;
770
+ this.secondaryJsonKey = params.secondaryJsonKey;
765
771
  this.deprecated = params.deprecated;
766
772
  }
767
773
  };
@@ -890,11 +896,15 @@ var CardVariantConfig = class {
890
896
  // Default: false
891
897
  repeatCount;
892
898
  // Default: 1
893
- constructor(tags2, bodyAllowed, bodyRequired, repeatCount) {
899
+ // JSON mapping fields
900
+ jsonKey;
901
+ // JSON path for body text
902
+ constructor(tags2, bodyAllowed, bodyRequired, repeatCount, jsonKey) {
894
903
  this.tags = tags2;
895
904
  this.bodyAllowed = bodyAllowed == null ? true : bodyAllowed;
896
905
  this.bodyRequired = bodyRequired;
897
906
  this.repeatCount = repeatCount;
907
+ this.jsonKey = jsonKey;
898
908
  }
899
909
  toString(options) {
900
910
  const opts = Object.assign({}, options);
@@ -916,27 +926,63 @@ ${tag.toString(opts)}`;
916
926
  }
917
927
  };
918
928
 
929
+ // src/model/config/CardSideConfig.ts
930
+ var CardSideConfig = class {
931
+ name;
932
+ repeat;
933
+ variants;
934
+ constructor(name, repeat, variants) {
935
+ this.name = name;
936
+ this.repeat = repeat;
937
+ this.variants = variants;
938
+ }
939
+ toString(options) {
940
+ const opts = Object.assign({}, options);
941
+ let s = "";
942
+ s += `[Side: ${this.name}]`;
943
+ if (this.repeat) s += " (repeat)";
944
+ let variantNo = 0;
945
+ for (const variant of this.variants) {
946
+ s += `
947
+ [Variant ${variantNo}]`;
948
+ s += `
949
+ ${variant.toString(opts)}`;
950
+ variantNo++;
951
+ }
952
+ return s;
953
+ }
954
+ };
955
+
919
956
  // src/model/config/CardSetConfig.ts
920
957
  var CardSetConfig = class {
921
958
  configKey;
922
- variants;
923
- constructor(configKey, variants) {
959
+ jsonKey;
960
+ itemType;
961
+ sections;
962
+ sides;
963
+ // Legacy accessor — provides the same shape as the old `variants: CardVariantConfig[][]`
964
+ // so downstream consumers (Config.getCardSetVariantConfig, etc.) continue to work.
965
+ get variants() {
966
+ return this.sides.map((side) => side.variants);
967
+ }
968
+ constructor(configKey, jsonKey, itemType, sections, sides) {
924
969
  this.configKey = configKey;
925
- this.variants = variants;
970
+ this.jsonKey = jsonKey;
971
+ this.itemType = itemType;
972
+ this.sections = sections;
973
+ this.sides = sides;
926
974
  }
927
975
  toString(options) {
928
976
  const opts = Object.assign({}, options);
929
977
  let s = "";
930
- let sideNo = 0;
931
- let variantNo = 0;
932
- for (const sides of this.variants) {
933
- for (const variant of sides) {
934
- s += `[Card - Side ${sideNo}, Variant ${variantNo}]`;
935
- s += `
936
- ${variant.toString(opts)}`;
937
- variantNo++;
938
- }
939
- sideNo++;
978
+ s += `[CardSet: ${this.configKey}]`;
979
+ s += `
980
+ jsonKey: ${this.jsonKey}`;
981
+ s += `
982
+ itemType: ${this.itemType}`;
983
+ for (const side of this.sides) {
984
+ s += `
985
+ ${side.toString(opts)}`;
940
986
  }
941
987
  return s;
942
988
  }
@@ -2071,589 +2117,947 @@ var objectUtils = new ObjectUtils();
2071
2117
 
2072
2118
  // src/config/raw/cardSets.ts
2073
2119
  var CARDSETS = {
2074
- [CardSetConfigKey.definitionList]: {
2075
- variants: [
2076
- [
2077
- {
2078
- tags: [
2079
- {
2080
- key: ConfigKey.group_standardItemLeadInstructionHint,
2081
- description: "Standard tags for lead, instruction, and hint."
2082
- },
2083
- {
2084
- key: ConfigKey.property_example,
2085
- description: "Example text for the definition.",
2086
- format: TagFormat.plainText
2087
- },
2088
- {
2089
- key: ConfigKey.tag_title,
2090
- description: "Title of the definition."
2091
- },
2092
- {
2093
- key: ConfigKey.group_resourceIcon,
2094
- description: "Icon resource for the definition."
2095
- }
2096
- ],
2097
- repeatCount: Count.infinity
2098
- }
2099
- ]
2120
+ //
2121
+ // flashcard
2122
+ //
2123
+ [CardSetConfigKey.flashcard]: {
2124
+ jsonKey: "cards",
2125
+ sides: [
2126
+ {
2127
+ name: "question",
2128
+ variants: [
2129
+ {
2130
+ jsonKey: "question.text",
2131
+ tags: [
2132
+ {
2133
+ key: ConfigKey.group_standardTags,
2134
+ description: "Standard tags for the flashcard."
2135
+ },
2136
+ {
2137
+ key: ConfigKey.tag_title,
2138
+ description: "Title of the flashcard."
2139
+ },
2140
+ {
2141
+ key: ConfigKey.group_resourceIcon,
2142
+ description: "Icon resource for the flashcard.",
2143
+ jsonKey: "question.icon"
2144
+ }
2145
+ ]
2146
+ }
2147
+ ]
2148
+ },
2149
+ {
2150
+ name: "answer",
2151
+ variants: [
2152
+ {
2153
+ jsonKey: "answer.text",
2154
+ tags: [
2155
+ {
2156
+ key: ConfigKey.group_standardTags,
2157
+ description: "Standard tags for the flashcard."
2158
+ },
2159
+ {
2160
+ key: ConfigKey.tag_title,
2161
+ description: "Title of the flashcard."
2162
+ },
2163
+ {
2164
+ key: ConfigKey.group_resourceIcon,
2165
+ description: "Icon resource for the flashcard.",
2166
+ jsonKey: "answer.icon"
2167
+ }
2168
+ ]
2169
+ },
2170
+ {
2171
+ jsonKey: "alternativeAnswers[].text",
2172
+ tags: [
2173
+ {
2174
+ key: ConfigKey.group_standardTags,
2175
+ description: "Standard tags for the flashcard."
2176
+ },
2177
+ {
2178
+ key: ConfigKey.tag_title,
2179
+ description: "Title of the flashcard."
2180
+ },
2181
+ {
2182
+ key: ConfigKey.group_resourceIcon,
2183
+ description: "Icon resource for the flashcard."
2184
+ }
2185
+ ],
2186
+ repeatCount: Count.infinity
2187
+ }
2188
+ ]
2189
+ }
2100
2190
  ]
2101
2191
  },
2102
- [CardSetConfigKey.flashcard]: {
2103
- variants: [
2104
- [
2105
- {
2106
- tags: [
2107
- {
2108
- key: ConfigKey.group_standardItemLeadInstructionHint,
2109
- description: "Standard tags for lead, instruction, and hint."
2110
- },
2111
- {
2112
- key: ConfigKey.property_example,
2113
- description: "Example text for the flashcard.",
2114
- format: TagFormat.plainText
2115
- },
2116
- {
2117
- key: ConfigKey.tag_title,
2118
- description: "Title of the flashcard."
2119
- },
2120
- {
2121
- key: ConfigKey.group_resourceIcon,
2122
- description: "Icon resource for the flashcard."
2123
- }
2124
- ],
2125
- repeatCount: Count.infinity
2126
- }
2127
- ]
2192
+ //
2193
+ // definition-list
2194
+ //
2195
+ [CardSetConfigKey.definitionList]: {
2196
+ jsonKey: "definitions",
2197
+ sides: [
2198
+ {
2199
+ name: "term",
2200
+ variants: [
2201
+ {
2202
+ jsonKey: "term.text",
2203
+ tags: [
2204
+ {
2205
+ key: ConfigKey.group_standardTags,
2206
+ description: "Standard tags for the definition."
2207
+ },
2208
+ {
2209
+ key: ConfigKey.tag_title,
2210
+ description: "Title of the definition.",
2211
+ secondaryJsonKey: "heading.forKeys"
2212
+ },
2213
+ {
2214
+ key: ConfigKey.group_resourceIcon,
2215
+ description: "Icon resource for the definition.",
2216
+ jsonKey: "term.icon"
2217
+ }
2218
+ ]
2219
+ }
2220
+ ]
2221
+ },
2222
+ {
2223
+ name: "definition",
2224
+ variants: [
2225
+ {
2226
+ jsonKey: "definition.text",
2227
+ tags: [
2228
+ {
2229
+ key: ConfigKey.group_standardTags,
2230
+ description: "Standard tags for the definition."
2231
+ },
2232
+ {
2233
+ key: ConfigKey.tag_title,
2234
+ description: "Title of the definition.",
2235
+ secondaryJsonKey: "heading.forValues"
2236
+ },
2237
+ {
2238
+ key: ConfigKey.group_resourceIcon,
2239
+ description: "Icon resource for the definition.",
2240
+ jsonKey: "definition.icon"
2241
+ }
2242
+ ]
2243
+ },
2244
+ {
2245
+ jsonKey: "alternativeDefinitions[].text",
2246
+ tags: [
2247
+ {
2248
+ key: ConfigKey.group_standardTags,
2249
+ description: "Standard tags for the definition."
2250
+ },
2251
+ {
2252
+ key: ConfigKey.tag_title,
2253
+ description: "Title of the definition."
2254
+ },
2255
+ {
2256
+ key: ConfigKey.group_resourceIcon,
2257
+ description: "Icon resource for the definition."
2258
+ }
2259
+ ],
2260
+ repeatCount: Count.infinity
2261
+ }
2262
+ ]
2263
+ }
2128
2264
  ]
2129
2265
  },
2130
- [CardSetConfigKey.elements]: {
2131
- variants: [
2132
- [
2133
- {
2134
- tags: [
2135
- {
2136
- key: ConfigKey.group_standardItemLeadInstructionHint,
2137
- description: "Standard tags for lead, instruction, and hint."
2138
- },
2139
- {
2140
- key: ConfigKey.property_example,
2141
- description: "Example text for the element.",
2142
- format: TagFormat.plainText
2143
- }
2144
- ],
2145
- repeatCount: Count.infinity
2146
- }
2147
- ]
2266
+ //
2267
+ // match-pairs
2268
+ //
2269
+ [CardSetConfigKey.matchPairs]: {
2270
+ jsonKey: "pairs",
2271
+ sides: [
2272
+ {
2273
+ name: "key",
2274
+ variants: [
2275
+ {
2276
+ jsonKey: "key",
2277
+ tags: [
2278
+ {
2279
+ key: ConfigKey.group_standardTags,
2280
+ description: "Standard tags for the match pair."
2281
+ },
2282
+ {
2283
+ key: ConfigKey.tag_title,
2284
+ description: "Title of the match pair.",
2285
+ secondaryJsonKey: "heading.forKeys"
2286
+ },
2287
+ {
2288
+ key: ConfigKey.property_isCaseSensitive,
2289
+ description: "Property to indicate if the match is case sensitive.",
2290
+ format: TagFormat.boolean
2291
+ },
2292
+ {
2293
+ key: ConfigKey.resource_audio,
2294
+ description: "Audio resource for the match pair.",
2295
+ jsonKey: "keyAudio"
2296
+ },
2297
+ {
2298
+ key: ConfigKey.resource_image,
2299
+ description: "Image resource for the match pair.",
2300
+ jsonKey: "keyImage"
2301
+ }
2302
+ ]
2303
+ }
2304
+ ]
2305
+ },
2306
+ {
2307
+ name: "values",
2308
+ repeat: true,
2309
+ variants: [
2310
+ {
2311
+ jsonKey: "values[]",
2312
+ tags: [
2313
+ {
2314
+ key: ConfigKey.group_standardTags,
2315
+ description: "Standard tags for the match pair."
2316
+ },
2317
+ {
2318
+ key: ConfigKey.tag_title,
2319
+ description: "Title of the match pair.",
2320
+ secondaryJsonKey: "heading.forValues"
2321
+ },
2322
+ {
2323
+ key: ConfigKey.property_isCaseSensitive,
2324
+ description: "Property to indicate if the match is case sensitive.",
2325
+ format: TagFormat.boolean
2326
+ }
2327
+ ],
2328
+ repeatCount: Count.infinity
2329
+ }
2330
+ ]
2331
+ }
2148
2332
  ]
2149
2333
  },
2150
- [CardSetConfigKey.statements]: {
2151
- variants: [
2152
- [
2153
- {
2154
- tags: [
2155
- {
2156
- key: ConfigKey.tag_true,
2157
- description: "Tag for true statements.",
2158
- maxCount: 1
2159
- },
2160
- {
2161
- key: ConfigKey.tag_false,
2162
- description: "Tag for false statements.",
2163
- maxCount: 1
2164
- },
2165
- {
2166
- key: ConfigKey.group_standardItemLeadInstructionHint,
2167
- description: "Standard tags for lead, instruction, and hint."
2168
- },
2169
- {
2170
- key: ConfigKey.property_example,
2171
- description: "Example text for the statement.",
2172
- format: TagFormat.plainText
2173
- }
2174
- ],
2175
- bodyAllowed: false
2176
- }
2177
- ]
2334
+ //
2335
+ // match-audio-pairs
2336
+ //
2337
+ [CardSetConfigKey.matchAudioPairs]: {
2338
+ jsonKey: "pairs",
2339
+ sides: [
2340
+ {
2341
+ name: "key",
2342
+ variants: [
2343
+ {
2344
+ jsonKey: "key",
2345
+ tags: [
2346
+ {
2347
+ key: ConfigKey.group_standardTags,
2348
+ description: "Standard tags for the audio match pair."
2349
+ },
2350
+ {
2351
+ key: ConfigKey.tag_title,
2352
+ description: "Title of the audio match pair.",
2353
+ secondaryJsonKey: "heading.forKeys"
2354
+ },
2355
+ {
2356
+ key: ConfigKey.resource_audio,
2357
+ description: "Audio resource for the match pair.",
2358
+ jsonKey: "keyAudio"
2359
+ }
2360
+ ]
2361
+ }
2362
+ ]
2363
+ },
2364
+ {
2365
+ name: "values",
2366
+ repeat: true,
2367
+ variants: [
2368
+ {
2369
+ jsonKey: "values[]",
2370
+ tags: [
2371
+ {
2372
+ key: ConfigKey.group_standardTags,
2373
+ description: "Standard tags for the audio match pair."
2374
+ },
2375
+ {
2376
+ key: ConfigKey.tag_title,
2377
+ description: "Title of the audio match pair.",
2378
+ secondaryJsonKey: "heading.forValues"
2379
+ },
2380
+ {
2381
+ key: ConfigKey.resource_audio,
2382
+ description: "Audio resource for the match pair."
2383
+ }
2384
+ ],
2385
+ repeatCount: Count.infinity
2386
+ }
2387
+ ]
2388
+ }
2178
2389
  ]
2179
2390
  },
2180
- [CardSetConfigKey.quiz]: {
2181
- variants: [
2182
- [
2183
- {
2184
- tags: [
2185
- {
2186
- key: ConfigKey.group_trueFalse,
2187
- description: "Group for true/false questions."
2188
- },
2189
- {
2190
- key: ConfigKey.group_standardItemLeadInstructionHint,
2191
- description: "Standard tags for lead, instruction, and hint."
2192
- },
2193
- {
2194
- key: ConfigKey.property_example,
2195
- description: "Example text for the quiz question.",
2196
- format: TagFormat.plainText
2197
- }
2198
- ],
2199
- bodyAllowed: false
2200
- }
2201
- ]
2391
+ //
2392
+ // match-image-pairs
2393
+ //
2394
+ [CardSetConfigKey.matchImagePairs]: {
2395
+ jsonKey: "pairs",
2396
+ sides: [
2397
+ {
2398
+ name: "key",
2399
+ variants: [
2400
+ {
2401
+ jsonKey: "key",
2402
+ tags: [
2403
+ {
2404
+ key: ConfigKey.group_standardTags,
2405
+ description: "Standard tags for the image match pair."
2406
+ },
2407
+ {
2408
+ key: ConfigKey.tag_title,
2409
+ description: "Title of the image match pair.",
2410
+ secondaryJsonKey: "heading.forKeys"
2411
+ },
2412
+ {
2413
+ key: ConfigKey.resource_image,
2414
+ description: "Image resource for the match pair.",
2415
+ jsonKey: "keyImage"
2416
+ }
2417
+ ]
2418
+ }
2419
+ ]
2420
+ },
2421
+ {
2422
+ name: "values",
2423
+ repeat: true,
2424
+ variants: [
2425
+ {
2426
+ jsonKey: "values[]",
2427
+ tags: [
2428
+ {
2429
+ key: ConfigKey.group_standardTags,
2430
+ description: "Standard tags for the image match pair."
2431
+ },
2432
+ {
2433
+ key: ConfigKey.tag_title,
2434
+ description: "Title of the image match pair.",
2435
+ secondaryJsonKey: "heading.forValues"
2436
+ },
2437
+ {
2438
+ key: ConfigKey.resource_image,
2439
+ description: "Image resource for the match pair."
2440
+ }
2441
+ ],
2442
+ repeatCount: Count.infinity
2443
+ }
2444
+ ]
2445
+ }
2202
2446
  ]
2203
2447
  },
2204
- [CardSetConfigKey.feedback]: {
2205
- variants: [
2206
- // Side 1
2207
- [
2208
- // Variant 1..N
2209
- {
2210
- tags: [
2211
- {
2212
- key: ConfigKey.group_standardItemLeadInstructionHint,
2213
- description: "Standard tags for lead, instruction, and hint."
2214
- },
2215
- {
2216
- key: ConfigKey.group_trueFalse,
2217
- description: "Group for true/false feedback."
2218
- },
2219
- {
2220
- key: ConfigKey.tag_title,
2221
- description: "Title of the feedback."
2222
- }
2223
- ],
2224
- bodyAllowed: false
2225
- }
2226
- ],
2227
- // Side 2
2228
- [
2229
- // Variant 1..N
2230
- {
2231
- tags: [
2232
- {
2233
- key: ConfigKey.group_standardItemLeadInstructionHint,
2234
- description: "Standard tags for lead, instruction, and hint."
2235
- },
2236
- {
2237
- key: ConfigKey.property_reasonableNumOfChars,
2238
- description: "Property for reasonable number of characters.",
2239
- format: TagFormat.number
2240
- },
2241
- {
2242
- key: ConfigKey.property_example,
2243
- description: "Example text for the feedback.",
2244
- format: TagFormat.plainText
2245
- },
2246
- {
2247
- key: ConfigKey.tag_title,
2248
- description: "Title of the feedback."
2249
- }
2250
- ],
2251
- bodyAllowed: true
2252
- }
2253
- ]
2448
+ //
2449
+ // match-matrix
2450
+ //
2451
+ [CardSetConfigKey.matchMatrix]: {
2452
+ jsonKey: "matrix",
2453
+ sides: [
2454
+ {
2455
+ name: "key",
2456
+ variants: [
2457
+ {
2458
+ jsonKey: "key",
2459
+ tags: [
2460
+ {
2461
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2462
+ description: "Standard tags for lead, instruction, and hint."
2463
+ },
2464
+ {
2465
+ key: ConfigKey.property_example,
2466
+ description: "Example text for the match matrix.",
2467
+ format: TagFormat.plainText
2468
+ },
2469
+ {
2470
+ key: ConfigKey.tag_title,
2471
+ description: "Title of the match matrix.",
2472
+ secondaryJsonKey: "heading.forKeys"
2473
+ },
2474
+ {
2475
+ key: ConfigKey.property_isCaseSensitive,
2476
+ description: "Property to indicate if the match is case sensitive.",
2477
+ format: TagFormat.boolean
2478
+ }
2479
+ ]
2480
+ }
2481
+ ]
2482
+ },
2483
+ {
2484
+ name: "cell",
2485
+ repeat: true,
2486
+ variants: [
2487
+ {
2488
+ jsonKey: "cells[{s}].values[]",
2489
+ tags: [
2490
+ {
2491
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2492
+ description: "Standard tags for lead, instruction, and hint."
2493
+ },
2494
+ {
2495
+ key: ConfigKey.property_example,
2496
+ description: "Example text for the match matrix.",
2497
+ format: TagFormat.plainText
2498
+ },
2499
+ {
2500
+ key: ConfigKey.tag_title,
2501
+ description: "Title of the match matrix.",
2502
+ secondaryJsonKey: "heading.forValues"
2503
+ },
2504
+ {
2505
+ key: ConfigKey.property_isCaseSensitive,
2506
+ description: "Property to indicate if the match is case sensitive.",
2507
+ format: TagFormat.boolean
2508
+ }
2509
+ ],
2510
+ repeatCount: Count.infinity
2511
+ }
2512
+ ]
2513
+ }
2254
2514
  ]
2255
2515
  },
2256
- [CardSetConfigKey.questions]: {
2257
- variants: [
2258
- [
2259
- {
2260
- tags: [
2261
- {
2262
- key: ConfigKey.property_reasonableNumOfChars,
2263
- description: "Property for reasonable number of characters.",
2264
- format: TagFormat.number
2265
- },
2266
- {
2267
- key: ConfigKey.tag_sampleSolution,
2268
- description: "Sample solution for the question."
2269
- },
2270
- {
2271
- key: ConfigKey.property_sampleSolution,
2272
- description: "Property for sample solution text.",
2273
- format: TagFormat.plainText
2274
- },
2275
- {
2276
- key: ConfigKey.property_additionalSolutions,
2277
- description: "Property for additional solutions.",
2278
- format: TagFormat.plainText,
2279
- maxCount: Count.infinity
2280
- },
2281
- {
2282
- key: ConfigKey.property_partialAnswer,
2283
- description: "Property for partial answer text.",
2284
- format: TagFormat.plainText
2285
- },
2286
- {
2287
- key: ConfigKey.group_standardItemLeadInstructionHint,
2288
- description: "Standard tags for lead, instruction, and hint."
2289
- },
2290
- {
2291
- key: ConfigKey.property_example,
2292
- description: "Example text for the question.",
2293
- format: TagFormat.plainText
2294
- }
2295
- ],
2296
- repeatCount: Count.infinity
2297
- }
2298
- ]
2516
+ //
2517
+ // statements
2518
+ //
2519
+ [CardSetConfigKey.statements]: {
2520
+ jsonKey: "statements",
2521
+ sides: [
2522
+ {
2523
+ name: "statement",
2524
+ variants: [
2525
+ {
2526
+ jsonKey: "statement",
2527
+ tags: [
2528
+ {
2529
+ key: ConfigKey.tag_true,
2530
+ description: "Tag for true statements.",
2531
+ maxCount: 1
2532
+ },
2533
+ {
2534
+ key: ConfigKey.tag_false,
2535
+ description: "Tag for false statements.",
2536
+ maxCount: 1
2537
+ },
2538
+ {
2539
+ key: ConfigKey.group_standardTags,
2540
+ description: "Standard tags for the statement."
2541
+ }
2542
+ ],
2543
+ bodyAllowed: false
2544
+ }
2545
+ ]
2546
+ }
2299
2547
  ]
2300
2548
  },
2301
- // matchPairs
2302
- // TODO: We actually need to allow for different card configurations, because titles are valid on the first card only.
2303
- // For now we allow them to be valid on all cards, but we need to change this.
2304
- [CardSetConfigKey.matchPairs]: {
2305
- variants: [
2306
- // Side 1
2307
- [
2308
- // Variant 1..N
2309
- {
2310
- tags: [
2311
- {
2312
- key: ConfigKey.group_standardItemLeadInstructionHint,
2313
- description: "Standard tags for lead, instruction, and hint."
2314
- },
2315
- {
2316
- key: ConfigKey.property_example,
2317
- description: "Example text for the match pair.",
2318
- format: TagFormat.plainText
2319
- },
2320
- {
2321
- key: ConfigKey.tag_title,
2322
- description: "Title of the match pair."
2323
- },
2324
- {
2325
- key: ConfigKey.property_isCaseSensitive,
2326
- description: "Property to indicate if the match is case sensitive.",
2327
- format: TagFormat.boolean
2328
- }
2329
- ],
2330
- repeatCount: Count.infinity
2331
- }
2332
- ]
2549
+ //
2550
+ // quiz
2551
+ //
2552
+ [CardSetConfigKey.quiz]: {
2553
+ jsonKey: "quizzes",
2554
+ sides: [
2555
+ {
2556
+ name: "choices",
2557
+ variants: [
2558
+ {
2559
+ jsonKey: null,
2560
+ tags: [
2561
+ {
2562
+ key: ConfigKey.group_trueFalse,
2563
+ description: "Group for true/false questions."
2564
+ },
2565
+ {
2566
+ key: ConfigKey.group_standardTags,
2567
+ description: "Standard tags for the quiz."
2568
+ }
2569
+ ],
2570
+ bodyAllowed: false
2571
+ }
2572
+ ]
2573
+ }
2333
2574
  ]
2334
2575
  },
2335
- [CardSetConfigKey.matchAudioPairs]: {
2336
- variants: [
2337
- // Side 1
2338
- [
2339
- // Variant 1..N
2340
- {
2341
- tags: [
2342
- {
2343
- key: ConfigKey.group_standardItemLeadInstructionHint,
2344
- description: "Standard tags for lead, instruction, and hint."
2345
- },
2346
- {
2347
- key: ConfigKey.property_example,
2348
- description: "Example text for the audio match pair.",
2349
- format: TagFormat.plainText
2350
- },
2351
- {
2352
- key: ConfigKey.tag_title,
2353
- description: "Title of the audio match pair."
2354
- },
2355
- {
2356
- key: ConfigKey.resource_audio,
2357
- description: "Audio resource for the match pair."
2358
- }
2359
- ],
2360
- repeatCount: Count.infinity
2361
- }
2362
- ]
2576
+ //
2577
+ // feedback
2578
+ //
2579
+ [CardSetConfigKey.feedback]: {
2580
+ jsonKey: "feedbacks",
2581
+ sides: [
2582
+ {
2583
+ name: "choices",
2584
+ variants: [
2585
+ {
2586
+ jsonKey: null,
2587
+ tags: [
2588
+ {
2589
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2590
+ description: "Standard tags for lead, instruction, and hint."
2591
+ },
2592
+ {
2593
+ key: ConfigKey.group_trueFalse,
2594
+ description: "Group for true/false feedback."
2595
+ },
2596
+ {
2597
+ key: ConfigKey.tag_title,
2598
+ description: "Title of the feedback.",
2599
+ secondaryJsonKey: "heading.forKeys"
2600
+ }
2601
+ ],
2602
+ bodyAllowed: false
2603
+ }
2604
+ ]
2605
+ },
2606
+ {
2607
+ name: "reason",
2608
+ variants: [
2609
+ {
2610
+ jsonKey: "reason.text",
2611
+ tags: [
2612
+ {
2613
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2614
+ description: "Standard tags for lead, instruction, and hint."
2615
+ },
2616
+ {
2617
+ key: ConfigKey.property_reasonableNumOfChars,
2618
+ description: "Property for reasonable number of characters.",
2619
+ format: TagFormat.number
2620
+ },
2621
+ {
2622
+ key: ConfigKey.property_example,
2623
+ description: "Example text for the feedback.",
2624
+ format: TagFormat.plainText
2625
+ },
2626
+ {
2627
+ key: ConfigKey.tag_title,
2628
+ description: "Title of the feedback.",
2629
+ secondaryJsonKey: "heading.forValues"
2630
+ }
2631
+ ],
2632
+ bodyAllowed: true
2633
+ }
2634
+ ]
2635
+ }
2363
2636
  ]
2364
2637
  },
2365
- [CardSetConfigKey.matchImagePairs]: {
2366
- variants: [
2367
- // Side 1
2368
- [
2369
- // Variant 1..N
2370
- {
2371
- tags: [
2372
- {
2373
- key: ConfigKey.group_standardItemLeadInstructionHint,
2374
- description: "Standard tags for lead, instruction, and hint."
2375
- },
2376
- {
2377
- key: ConfigKey.property_example,
2378
- description: "Example text for the image match pair.",
2379
- format: TagFormat.plainText
2380
- },
2381
- {
2382
- key: ConfigKey.tag_title,
2383
- description: "Title of the image match pair."
2384
- },
2385
- {
2386
- key: ConfigKey.resource_image,
2387
- description: "Image resource for the match pair."
2388
- }
2389
- ],
2390
- repeatCount: Count.infinity
2391
- }
2392
- ]
2638
+ //
2639
+ // questions
2640
+ //
2641
+ [CardSetConfigKey.questions]: {
2642
+ jsonKey: "questions",
2643
+ sides: [
2644
+ {
2645
+ name: "question",
2646
+ variants: [
2647
+ {
2648
+ jsonKey: "question",
2649
+ tags: [
2650
+ {
2651
+ key: ConfigKey.property_reasonableNumOfChars,
2652
+ description: "Property for reasonable number of characters.",
2653
+ format: TagFormat.number
2654
+ },
2655
+ {
2656
+ key: ConfigKey.tag_sampleSolution,
2657
+ description: "Sample solution for the question."
2658
+ },
2659
+ {
2660
+ key: ConfigKey.property_sampleSolution,
2661
+ description: "Property for sample solution text.",
2662
+ format: TagFormat.plainText
2663
+ },
2664
+ {
2665
+ key: ConfigKey.property_additionalSolutions,
2666
+ description: "Property for additional solutions.",
2667
+ format: TagFormat.plainText,
2668
+ maxCount: Count.infinity
2669
+ },
2670
+ {
2671
+ key: ConfigKey.property_partialAnswer,
2672
+ description: "Property for partial answer text.",
2673
+ format: TagFormat.plainText
2674
+ },
2675
+ {
2676
+ key: ConfigKey.group_standardTags,
2677
+ description: "Standard tags for the question."
2678
+ }
2679
+ ]
2680
+ }
2681
+ ]
2682
+ }
2393
2683
  ]
2394
2684
  },
2395
- [CardSetConfigKey.matchMatrix]: {
2396
- variants: [
2397
- // Side 1
2398
- [
2399
- // Variant 1..N
2400
- {
2401
- tags: [
2402
- {
2403
- key: ConfigKey.group_standardItemLeadInstructionHint,
2404
- description: "Standard tags for lead, instruction, and hint."
2405
- },
2406
- {
2407
- key: ConfigKey.property_example,
2408
- description: "Example text for the match matrix.",
2409
- format: TagFormat.plainText
2410
- },
2411
- {
2412
- key: ConfigKey.tag_title,
2413
- description: "Title of the match matrix."
2414
- },
2415
- {
2416
- key: ConfigKey.property_isCaseSensitive,
2417
- description: "Property to indicate if the match is case sensitive.",
2418
- format: TagFormat.boolean
2419
- }
2420
- ],
2421
- repeatCount: Count.infinity
2422
- }
2423
- ]
2685
+ //
2686
+ // elements
2687
+ //
2688
+ [CardSetConfigKey.elements]: {
2689
+ jsonKey: null,
2690
+ sides: [
2691
+ {
2692
+ name: "element",
2693
+ repeat: true,
2694
+ variants: [
2695
+ {
2696
+ jsonKey: "elements[]",
2697
+ tags: [
2698
+ {
2699
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2700
+ description: "Standard tags for lead, instruction, and hint."
2701
+ },
2702
+ {
2703
+ key: ConfigKey.property_example,
2704
+ description: "Example text for the element.",
2705
+ format: TagFormat.plainText
2706
+ }
2707
+ ],
2708
+ repeatCount: Count.infinity
2709
+ }
2710
+ ]
2711
+ }
2424
2712
  ]
2425
2713
  },
2714
+ //
2715
+ // table
2716
+ //
2426
2717
  [CardSetConfigKey.table]: {
2427
- variants: [
2428
- // Side 1
2429
- [
2430
- // Variant 1..N
2431
- {
2432
- tags: [
2433
- {
2434
- key: ConfigKey.group_standardItemLeadInstructionHint,
2435
- description: "Standard tags for lead, instruction, and hint."
2436
- },
2437
- {
2438
- key: ConfigKey.tag_title,
2439
- description: "Title of the table."
2440
- },
2441
- {
2442
- key: ConfigKey.property_tableCellType,
2443
- description: "Table cell type (th/td).",
2444
- format: TagFormat.plainText
2445
- },
2446
- {
2447
- key: ConfigKey.property_tableRowSpan,
2448
- description: "Number of rows the cell spans.",
2449
- format: TagFormat.number
2450
- },
2451
- {
2452
- key: ConfigKey.property_tableColSpan,
2453
- description: "Number of columns the cell spans.",
2454
- format: TagFormat.number
2455
- },
2456
- {
2457
- key: ConfigKey.property_tableScope,
2458
- description: "Scope attribute for header cells.",
2459
- format: TagFormat.plainText
2460
- }
2461
- ],
2462
- repeatCount: Count.infinity
2463
- }
2464
- ]
2718
+ jsonKey: "table.data",
2719
+ itemType: "array",
2720
+ sides: [
2721
+ {
2722
+ name: "cell",
2723
+ repeat: true,
2724
+ variants: [
2725
+ {
2726
+ jsonKey: null,
2727
+ tags: [
2728
+ {
2729
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2730
+ description: "Standard tags for lead, instruction, and hint."
2731
+ },
2732
+ {
2733
+ key: ConfigKey.tag_title,
2734
+ description: "Title of the table.",
2735
+ secondaryJsonKey: "table.columns[]"
2736
+ },
2737
+ {
2738
+ key: ConfigKey.property_tableCellType,
2739
+ description: "Table cell type (th/td).",
2740
+ format: TagFormat.plainText
2741
+ },
2742
+ {
2743
+ key: ConfigKey.property_tableRowSpan,
2744
+ description: "Number of rows the cell spans.",
2745
+ format: TagFormat.number
2746
+ },
2747
+ {
2748
+ key: ConfigKey.property_tableColSpan,
2749
+ description: "Number of columns the cell spans.",
2750
+ format: TagFormat.number
2751
+ },
2752
+ {
2753
+ key: ConfigKey.property_tableScope,
2754
+ description: "Scope attribute for header cells.",
2755
+ format: TagFormat.plainText
2756
+ }
2757
+ ],
2758
+ repeatCount: Count.infinity
2759
+ }
2760
+ ]
2761
+ }
2762
+ ]
2763
+ },
2764
+ //
2765
+ // table-extended
2766
+ //
2767
+ [CardSetConfigKey.tableExtended]: {
2768
+ jsonKey: null,
2769
+ sections: {
2770
+ default: { jsonKey: "tableExtended.body.rows" },
2771
+ "table-header": { jsonKey: "tableExtended.header.rows" },
2772
+ "table-footer": { jsonKey: "tableExtended.footer.rows" }
2773
+ },
2774
+ sides: [
2775
+ {
2776
+ name: "cell",
2777
+ repeat: true,
2778
+ variants: [
2779
+ {
2780
+ jsonKey: "content",
2781
+ tags: [
2782
+ {
2783
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2784
+ description: "Standard tags for lead, instruction, and hint."
2785
+ },
2786
+ {
2787
+ key: ConfigKey.tag_title,
2788
+ description: "Title of the table cell."
2789
+ },
2790
+ {
2791
+ key: ConfigKey.property_tableCellType,
2792
+ description: "Table cell type (th/td).",
2793
+ format: TagFormat.plainText
2794
+ },
2795
+ {
2796
+ key: ConfigKey.property_tableRowSpan,
2797
+ description: "Number of rows the cell spans.",
2798
+ format: TagFormat.number
2799
+ },
2800
+ {
2801
+ key: ConfigKey.property_tableColSpan,
2802
+ description: "Number of columns the cell spans.",
2803
+ format: TagFormat.number
2804
+ },
2805
+ {
2806
+ key: ConfigKey.property_tableScope,
2807
+ description: "Scope attribute for header cells.",
2808
+ format: TagFormat.plainText
2809
+ }
2810
+ ],
2811
+ repeatCount: Count.infinity
2812
+ }
2813
+ ]
2814
+ }
2465
2815
  ]
2466
2816
  },
2817
+ //
2818
+ // pronunciation-table
2819
+ //
2467
2820
  [CardSetConfigKey.pronunciationTable]: {
2468
- variants: [
2469
- // Side 1
2470
- [
2471
- // Variant 1..N
2472
- {
2473
- tags: [
2474
- {
2475
- key: ConfigKey.group_standardItemLeadInstructionHint,
2476
- description: "Standard tags for lead, instruction, and hint."
2477
- },
2478
- {
2479
- key: ConfigKey.tag_title,
2480
- description: "Title of the pronunciation table."
2481
- },
2482
- {
2483
- key: ConfigKey.resource_audio,
2484
- description: "Audio resource for the pronunciation table."
2485
- }
2486
- ],
2487
- repeatCount: Count.infinity
2488
- }
2489
- ]
2821
+ jsonKey: "pronunciationTable.data",
2822
+ itemType: "array",
2823
+ sides: [
2824
+ {
2825
+ name: "cell",
2826
+ repeat: true,
2827
+ variants: [
2828
+ {
2829
+ jsonKey: "body",
2830
+ tags: [
2831
+ {
2832
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2833
+ description: "Standard tags for lead, instruction, and hint."
2834
+ },
2835
+ {
2836
+ key: ConfigKey.tag_title,
2837
+ description: "Title of the pronunciation table."
2838
+ },
2839
+ {
2840
+ key: ConfigKey.resource_audio,
2841
+ description: "Audio resource for the pronunciation table.",
2842
+ jsonKey: "audio"
2843
+ }
2844
+ ],
2845
+ repeatCount: Count.infinity
2846
+ }
2847
+ ]
2848
+ }
2490
2849
  ]
2491
2850
  },
2851
+ //
2852
+ // bot-action-responses
2853
+ //
2492
2854
  [CardSetConfigKey.botActionResponses]: {
2493
- variants: [
2494
- [
2495
- {
2496
- tags: [
2497
- {
2498
- key: ConfigKey.property_reaction,
2499
- description: "Reaction to the bot action.",
2500
- format: TagFormat.plainText
2501
- },
2502
- {
2503
- key: ConfigKey.group_standardItemLeadInstructionHint,
2504
- description: "Standard tags for lead, instruction, and hint."
2505
- },
2506
- {
2507
- key: ConfigKey.property_example,
2508
- description: "Example text for the bot action response.",
2509
- format: TagFormat.plainText
2510
- }
2511
- ]
2512
- }
2513
- ]
2855
+ jsonKey: "responses",
2856
+ sides: [
2857
+ {
2858
+ name: "response",
2859
+ variants: [
2860
+ {
2861
+ jsonKey: "feedback",
2862
+ tags: [
2863
+ {
2864
+ key: ConfigKey.property_reaction,
2865
+ description: "Reaction to the bot action.",
2866
+ format: TagFormat.plainText
2867
+ },
2868
+ {
2869
+ key: ConfigKey.tag_item,
2870
+ description: "The item for the bot action response.",
2871
+ chain: [
2872
+ {
2873
+ key: ConfigKey.tag_item,
2874
+ description: "The lead, page number, source page number, and margin number.",
2875
+ maxCount: 4
2876
+ }
2877
+ ]
2878
+ },
2879
+ {
2880
+ key: ConfigKey.tag_instruction,
2881
+ description: "The response label for the bot action.",
2882
+ jsonKey: "response"
2883
+ },
2884
+ {
2885
+ key: ConfigKey.property_example,
2886
+ description: "Example text for the bot action response.",
2887
+ format: TagFormat.plainText
2888
+ }
2889
+ ]
2890
+ }
2891
+ ]
2892
+ }
2514
2893
  ]
2515
2894
  },
2895
+ //
2896
+ // cloze-list
2897
+ //
2516
2898
  [CardSetConfigKey.clozeList]: {
2517
- variants: [
2518
- [
2519
- {
2520
- tags: [
2521
- {
2522
- key: ConfigKey.group_standardTags,
2523
- description: "Standard tags for cloze items."
2524
- },
2525
- {
2526
- key: ConfigKey.group_gap,
2527
- description: "Group for gap tags in cloze items."
2528
- }
2529
- ]
2530
- }
2531
- ]
2899
+ jsonKey: "listItems",
2900
+ sides: [
2901
+ {
2902
+ name: "content",
2903
+ variants: [
2904
+ {
2905
+ jsonKey: "body",
2906
+ tags: [
2907
+ {
2908
+ key: ConfigKey.group_standardTags,
2909
+ description: "Standard tags for cloze items."
2910
+ },
2911
+ {
2912
+ key: ConfigKey.group_gap,
2913
+ description: "Group for gap tags in cloze items."
2914
+ }
2915
+ ]
2916
+ }
2917
+ ]
2918
+ }
2532
2919
  ]
2533
2920
  },
2921
+ //
2922
+ // example-bit-list
2923
+ //
2534
2924
  [CardSetConfigKey.exampleBitList]: {
2535
- variants: [
2536
- [
2537
- {
2538
- tags: [
2539
- {
2540
- key: ConfigKey.group_standardTags,
2541
- description: "Standard tags for example bits."
2542
- },
2543
- {
2544
- key: ConfigKey.tag_title,
2545
- description: "Title of the example bit."
2546
- }
2547
- ],
2548
- repeatCount: Count.infinity
2549
- }
2550
- ]
2925
+ jsonKey: "listItems",
2926
+ sides: [
2927
+ {
2928
+ name: "item",
2929
+ variants: [
2930
+ {
2931
+ jsonKey: "body",
2932
+ tags: [
2933
+ {
2934
+ key: ConfigKey.group_standardTags,
2935
+ description: "Standard tags for example bits."
2936
+ },
2937
+ {
2938
+ key: ConfigKey.tag_title,
2939
+ description: "Title of the example bit."
2940
+ }
2941
+ ]
2942
+ }
2943
+ ]
2944
+ }
2551
2945
  ]
2552
2946
  },
2947
+ //
2948
+ // ingredients
2949
+ //
2553
2950
  [CardSetConfigKey.ingredients]: {
2554
- variants: [
2555
- [
2556
- {
2557
- tags: [
2558
- {
2559
- key: ConfigKey.tag_title,
2560
- description: "Title of the ingredient."
2561
- },
2562
- {
2563
- key: ConfigKey.group_trueFalse,
2564
- description: "Group for true/false properties of the ingredient."
2565
- },
2566
- {
2567
- key: ConfigKey.group_standardItemLeadInstructionHint,
2568
- description: "Standard tags for lead, instruction, and hint."
2569
- },
2570
- {
2571
- key: ConfigKey.property_unit,
2572
- description: "Unit of measurement for the ingredient.",
2573
- format: TagFormat.plainText
2574
- },
2575
- {
2576
- key: ConfigKey.property_unitAbbr,
2577
- description: "Abbreviation for the unit of measurement.",
2578
- format: TagFormat.plainText
2579
- },
2580
- {
2581
- key: ConfigKey.property_decimalPlaces,
2582
- description: "Number of decimal places for the ingredient quantity.",
2583
- format: TagFormat.number,
2584
- defaultValue: "1"
2585
- },
2586
- {
2587
- key: ConfigKey.property_disableCalculation,
2588
- description: "Disable calculation for the ingredient.",
2589
- format: TagFormat.boolean
2590
- }
2591
- ],
2592
- repeatCount: Count.infinity
2593
- }
2594
- ]
2951
+ jsonKey: "ingredients",
2952
+ sides: [
2953
+ {
2954
+ name: "ingredient",
2955
+ variants: [
2956
+ {
2957
+ jsonKey: "ingredient",
2958
+ tags: [
2959
+ {
2960
+ key: ConfigKey.tag_title,
2961
+ description: "Title of the ingredient."
2962
+ },
2963
+ {
2964
+ key: ConfigKey.group_trueFalse,
2965
+ description: "Group for true/false properties of the ingredient."
2966
+ },
2967
+ {
2968
+ key: ConfigKey.tag_item,
2969
+ description: "The item for the ingredient.",
2970
+ chain: [
2971
+ {
2972
+ key: ConfigKey.tag_item,
2973
+ description: "Lead, page number, source page number, and margin number.",
2974
+ maxCount: 4
2975
+ }
2976
+ ]
2977
+ },
2978
+ {
2979
+ key: ConfigKey.tag_instruction,
2980
+ description: "The quantity of the ingredient.",
2981
+ jsonKey: "quantity"
2982
+ },
2983
+ {
2984
+ key: ConfigKey.tag_hint,
2985
+ description: "The hint for the ingredient."
2986
+ },
2987
+ {
2988
+ key: ConfigKey.property_unit,
2989
+ description: "Unit of measurement for the ingredient.",
2990
+ format: TagFormat.plainText
2991
+ },
2992
+ {
2993
+ key: ConfigKey.property_unitAbbr,
2994
+ description: "Abbreviation for the unit of measurement.",
2995
+ format: TagFormat.plainText
2996
+ },
2997
+ {
2998
+ key: ConfigKey.property_decimalPlaces,
2999
+ description: "Number of decimal places for the ingredient quantity.",
3000
+ format: TagFormat.number,
3001
+ defaultValue: "1"
3002
+ },
3003
+ {
3004
+ key: ConfigKey.property_disableCalculation,
3005
+ description: "Disable calculation for the ingredient.",
3006
+ format: TagFormat.boolean
3007
+ }
3008
+ ]
3009
+ }
3010
+ ]
3011
+ }
2595
3012
  ]
2596
3013
  },
2597
- // DEPRECATED - TO BE REMOVED IN THE FUTURE
2598
- // [CardSetConfigKey._captionDefinitionsList]: {
2599
- // variants: [
2600
- // // Side 1
2601
- // [
2602
- // // Variant 1..N
2603
- // {
2604
- // tags: [
2605
- // {
2606
- // type: BitTagType.tag,
2607
- // configKey: TagConfigKey.title,
2608
- // },
2609
- // ],
2610
- // repeatCount: Count.infinity,
2611
- // },
2612
- // ],
2613
- // ],
2614
- // },
3014
+ //
3015
+ // book-reference-list
3016
+ //
2615
3017
  [CardSetConfigKey.bookReferenceList]: {
2616
- variants: [
2617
- // Side 1
2618
- [
2619
- // Variant 1..N
2620
- {
2621
- tags: [
2622
- {
2623
- key: ConfigKey.group_standardTags,
2624
- description: "Standard tags for book references."
2625
- },
2626
- {
2627
- key: ConfigKey.property_refAuthor,
2628
- description: "Author of the book.",
2629
- format: TagFormat.plainText,
2630
- maxCount: Count.infinity
2631
- },
2632
- {
2633
- key: ConfigKey.property_refBookTitle,
2634
- description: "Title of the book.",
2635
- format: TagFormat.plainText
2636
- },
2637
- {
2638
- key: ConfigKey.property_refPublisher,
2639
- description: "Publisher of the book.",
2640
- format: TagFormat.plainText,
2641
- maxCount: Count.infinity
2642
- },
2643
- {
2644
- key: ConfigKey.property_refPublicationYear,
2645
- description: "Year of publication of the book.",
2646
- format: TagFormat.plainText
2647
- },
2648
- {
2649
- key: ConfigKey.property_citationStyle,
2650
- description: "Citation style for the book reference.",
2651
- format: TagFormat.plainText
2652
- }
2653
- ],
2654
- repeatCount: Count.infinity
2655
- }
2656
- ]
3018
+ jsonKey: "bookReferences",
3019
+ sides: [
3020
+ {
3021
+ name: "reference",
3022
+ variants: [
3023
+ {
3024
+ jsonKey: null,
3025
+ tags: [
3026
+ {
3027
+ key: ConfigKey.group_standardTags,
3028
+ description: "Standard tags for book references."
3029
+ },
3030
+ {
3031
+ key: ConfigKey.property_refAuthor,
3032
+ description: "Author of the book.",
3033
+ format: TagFormat.plainText,
3034
+ maxCount: Count.infinity
3035
+ },
3036
+ {
3037
+ key: ConfigKey.property_refBookTitle,
3038
+ description: "Title of the book.",
3039
+ format: TagFormat.plainText
3040
+ },
3041
+ {
3042
+ key: ConfigKey.property_refPublisher,
3043
+ description: "Publisher of the book.",
3044
+ format: TagFormat.plainText,
3045
+ maxCount: Count.infinity
3046
+ },
3047
+ {
3048
+ key: ConfigKey.property_refPublicationYear,
3049
+ description: "Year of publication of the book.",
3050
+ format: TagFormat.plainText
3051
+ },
3052
+ {
3053
+ key: ConfigKey.property_citationStyle,
3054
+ description: "Citation style for the book reference.",
3055
+ format: TagFormat.plainText
3056
+ }
3057
+ ]
3058
+ }
3059
+ ]
3060
+ }
2657
3061
  ]
2658
3062
  }
2659
3063
  };
@@ -3387,7 +3791,7 @@ var GROUPS = {
3387
3791
  description: "If true, the book allows printing",
3388
3792
  format: TagFormat.enumeration,
3389
3793
  values: ["enforceFalse", "enforceTrue", "useSpaceConfiguration"],
3390
- defaultValue: "enforceFalse"
3794
+ defaultValue: "useSpaceConfiguration"
3391
3795
  },
3392
3796
  {
3393
3797
  key: ConfigKey.property_hasPrintRestriction,
@@ -4319,20 +4723,34 @@ var ConfigHydrator = class {
4319
4723
  if (!_cardSet) return void 0;
4320
4724
  const _cardSetConfig = CARDSETS[_cardSet];
4321
4725
  if (!_cardSetConfig) throw new Error(`No config found for card set config key '${_cardSet}'`);
4322
- const variants = [];
4323
- for (const _variants of _cardSetConfig.variants) {
4726
+ const sides = [];
4727
+ for (const _side of _cardSetConfig.sides) {
4324
4728
  const variantsOfSide = [];
4325
- for (const _variant of _variants) {
4729
+ for (const _variant of _side.variants) {
4326
4730
  const v = this.hydrateCardVariantConfig(_variant);
4327
4731
  variantsOfSide.push(v);
4328
4732
  }
4329
- variants.push(variantsOfSide);
4733
+ const sideConfig = new CardSideConfig(_side.name, _side.repeat ?? false, variantsOfSide);
4734
+ sides.push(sideConfig);
4330
4735
  }
4331
- const cardSetConfig = new CardSetConfig(_cardSet, variants);
4736
+ const cardSetConfig = new CardSetConfig(
4737
+ _cardSet,
4738
+ _cardSetConfig.jsonKey,
4739
+ _cardSetConfig.itemType ?? "object",
4740
+ _cardSetConfig.sections,
4741
+ sides
4742
+ );
4332
4743
  return cardSetConfig;
4333
4744
  }
4334
4745
  hydrateTagConfig(_tag) {
4335
- const { key: _configKey, maxCount, minCount, chain: _chain, deprecated } = _tag;
4746
+ const {
4747
+ key: _configKey,
4748
+ maxCount,
4749
+ minCount,
4750
+ chain: _chain,
4751
+ secondaryJsonKey,
4752
+ deprecated
4753
+ } = _tag;
4336
4754
  const configKey = Enum(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4337
4755
  if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
4338
4756
  const tag = Enum(Tag).fromValue(configKey);
@@ -4347,6 +4765,7 @@ var ConfigHydrator = class {
4347
4765
  maxCount: maxCount ?? MAX_COUNT_DEFAULT,
4348
4766
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4349
4767
  chain,
4768
+ secondaryJsonKey,
4350
4769
  deprecated
4351
4770
  });
4352
4771
  return {
@@ -4365,7 +4784,8 @@ var ConfigHydrator = class {
4365
4784
  format,
4366
4785
  values,
4367
4786
  defaultValue,
4368
- jsonKey
4787
+ jsonKey,
4788
+ secondaryJsonKey
4369
4789
  } = _tag;
4370
4790
  const configKey = Enum(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4371
4791
  if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
@@ -4381,6 +4801,7 @@ var ConfigHydrator = class {
4381
4801
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4382
4802
  chain,
4383
4803
  jsonKey,
4804
+ secondaryJsonKey,
4384
4805
  format,
4385
4806
  values,
4386
4807
  defaultValue,
@@ -4393,7 +4814,15 @@ var ConfigHydrator = class {
4393
4814
  };
4394
4815
  }
4395
4816
  hydrateResourceTagConfig(_tag) {
4396
- const { key: _configKey, maxCount, minCount, chain: _chain, deprecated, jsonKey } = _tag;
4817
+ const {
4818
+ key: _configKey,
4819
+ maxCount,
4820
+ minCount,
4821
+ chain: _chain,
4822
+ deprecated,
4823
+ jsonKey,
4824
+ secondaryJsonKey
4825
+ } = _tag;
4397
4826
  const configKey = Enum(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4398
4827
  if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
4399
4828
  const tag = _configKey.substring(1);
@@ -4408,6 +4837,7 @@ var ConfigHydrator = class {
4408
4837
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4409
4838
  chain,
4410
4839
  jsonKey,
4840
+ secondaryJsonKey,
4411
4841
  deprecated
4412
4842
  });
4413
4843
  return {
@@ -4439,9 +4869,15 @@ var ConfigHydrator = class {
4439
4869
  };
4440
4870
  }
4441
4871
  hydrateCardVariantConfig(_variant) {
4442
- const { tags: _tags, bodyAllowed, bodyRequired, repeatCount } = _variant;
4872
+ const { tags: _tags, bodyAllowed, bodyRequired, repeatCount, jsonKey } = _variant;
4443
4873
  const tags2 = this.hydrateTagsConfig(_tags);
4444
- const cardSetConfig = new CardVariantConfig(tags2.tags, bodyAllowed, bodyRequired, repeatCount);
4874
+ const cardSetConfig = new CardVariantConfig(
4875
+ tags2.tags,
4876
+ bodyAllowed,
4877
+ bodyRequired,
4878
+ repeatCount,
4879
+ jsonKey
4880
+ );
4445
4881
  return cardSetConfig;
4446
4882
  }
4447
4883
  };
@@ -7207,6 +7643,12 @@ var BITS = {
7207
7643
  description: "Extractor configuration bit, used to configure extractors in articles or books",
7208
7644
  textFormatDefault: TextFormat.plainText
7209
7645
  },
7646
+ [BitType.extractorBlueprintConfiguration]: {
7647
+ since: "5.11.0",
7648
+ baseBitType: BitType._standard,
7649
+ description: "Extractor blueprint configuration bit, used to specify extractor blueprint configuration when extracting from blueprints",
7650
+ textFormatDefault: TextFormat.plainText
7651
+ },
7210
7652
  [BitType.extractorImage]: {
7211
7653
  since: "4.3.0",
7212
7654
  baseBitType: BitType._standard,
@@ -7232,6 +7674,12 @@ var BITS = {
7232
7674
  baseBitType: BitType.extractorImage,
7233
7675
  description: "Collapsible extractor images bit, used for images extracted from PDFs"
7234
7676
  },
7677
+ [BitType.extractorBlueprint]: {
7678
+ since: "5.12.0",
7679
+ baseBitType: BitType._standard,
7680
+ description: "Extractor blueprint bit, used to provide blueprint information about extractors",
7681
+ textFormatDefault: TextFormat.json
7682
+ },
7235
7683
  [BitType.extractorInformation]: {
7236
7684
  since: "3.8.0",
7237
7685
  baseBitType: BitType._standard,
@@ -7434,6 +7882,11 @@ var BITS = {
7434
7882
  baseBitType: BitType.pageOpenBook,
7435
7883
  description: "Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"
7436
7884
  },
7885
+ [BitType.openBookChapterTeaser]: {
7886
+ since: "4.16.0",
7887
+ baseBitType: BitType.openBookChapter,
7888
+ description: "Open book chapter teaser bit, equal to open-book-chapter, used to create teaser chapter pages that open books"
7889
+ },
7437
7890
  [BitType.pageOpenBookList]: {
7438
7891
  since: "2.1.0",
7439
7892
  baseBitType: BitType.article,
@@ -10254,6 +10707,7 @@ var Config = class {
10254
10707
  maxCount: 1,
10255
10708
  chain: tag.chain,
10256
10709
  jsonKey: tag.jsonKey,
10710
+ secondaryJsonKey: tag.secondaryJsonKey,
10257
10711
  deprecated: tag.deprecated
10258
10712
  });
10259
10713
  finalResourceTags[k] = newTag;
@@ -10358,7 +10812,7 @@ var instance2 = new Config();
10358
10812
  // src/generated/package_info.ts
10359
10813
  var PACKAGE_INFO = {
10360
10814
  "name": "@gmb/bitmark-parser-generator",
10361
- "version": "5.10.0",
10815
+ "version": "5.12.0",
10362
10816
  "license": "ISC"};
10363
10817
  var Environment = {
10364
10818
  unknown: "",
@@ -30387,7 +30841,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
30387
30841
  }
30388
30842
  if (instance2.isOfBitType(bitType, BitType.book)) {
30389
30843
  if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
30390
- if (bitJson.allowPrint == null) bitJson.allowPrint = "enforceFalse";
30844
+ if (bitJson.allowPrint == null) bitJson.allowPrint = "useSpaceConfiguration";
30391
30845
  if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
30392
30846
  if (bitJson.enforceUpdateOverUserInput == null) bitJson.enforceUpdateOverUserInput = false;
30393
30847
  if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
@@ -34033,6 +34487,7 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
34033
34487
  minCount: 1,
34034
34488
  chain: void 0,
34035
34489
  jsonKey: void 0,
34490
+ secondaryJsonKey: void 0,
34036
34491
  format: TagFormat.bitmarkText,
34037
34492
  values: void 0,
34038
34493
  defaultValue: void 0,
@@ -38813,7 +39268,7 @@ var ConfigBuilder = class {
38813
39268
  const processTagEntries = (tag, tagNameChain) => {
38814
39269
  const tags2 = [];
38815
39270
  let tagName = tag.key;
38816
- const jsonKey = keyToJsonKey(tagName, tagNameChain);
39271
+ const jsonKey = tag.jsonKey ?? keyToJsonKey(tagName, tagNameChain);
38817
39272
  const tagType = typeFromConfigKey(tag.key);
38818
39273
  let format = "";
38819
39274
  let chain = void 0;
@@ -38842,7 +39297,8 @@ var ConfigBuilder = class {
38842
39297
  for (const groupKey of resolvedGroups) {
38843
39298
  tags2.push({
38844
39299
  type: "group",
38845
- key: groupKey
39300
+ key: groupKey,
39301
+ ...tag.jsonKey ? { jsonKey: tag.jsonKey } : {}
38846
39302
  });
38847
39303
  }
38848
39304
  return tags2;
@@ -38858,6 +39314,7 @@ var ConfigBuilder = class {
38858
39314
  type: "tag",
38859
39315
  key: tagName,
38860
39316
  jsonKey,
39317
+ ...tag.secondaryJsonKey ? { secondaryJsonKey: tag.secondaryJsonKey } : {},
38861
39318
  format,
38862
39319
  default: null,
38863
39320
  alwaysInclude: false,
@@ -38876,8 +39333,8 @@ var ConfigBuilder = class {
38876
39333
  const cardSetConfig = CARDSETS[cardSetKey];
38877
39334
  if (!cardSetConfig) return void 0;
38878
39335
  const normalizedKey = normalizeCardKey(cardSetKey);
38879
- const sides = cardSetConfig.variants.map((variantList) => {
38880
- const variants = variantList.map((variant) => {
39336
+ const sides = cardSetConfig.sides.map((side) => {
39337
+ const variants = side.variants.map((variant) => {
38881
39338
  const variantTags = [];
38882
39339
  const variantTagEntries = Object.entries(variant.tags ?? []).sort((a, b) => {
38883
39340
  const tagA = a[1];
@@ -38891,16 +39348,24 @@ var ConfigBuilder = class {
38891
39348
  variantTags.push(...processTagEntries(variantTag, []));
38892
39349
  }
38893
39350
  return {
39351
+ ...variant.jsonKey !== void 0 ? { jsonKey: variant.jsonKey } : {},
38894
39352
  tags: variantTags,
38895
39353
  repeatCount: variant.repeatCount ?? 1,
38896
39354
  bodyAllowed: variant.bodyAllowed ?? true,
38897
39355
  bodyRequired: variant.bodyRequired ?? false
38898
39356
  };
38899
39357
  });
38900
- return { variants };
39358
+ return {
39359
+ name: side.name,
39360
+ ...side.repeat ? { repeat: side.repeat } : {},
39361
+ variants
39362
+ };
38901
39363
  });
38902
39364
  return {
38903
39365
  key: normalizedKey,
39366
+ jsonKey: cardSetConfig.jsonKey,
39367
+ ...cardSetConfig.itemType && cardSetConfig.itemType !== "object" ? { itemType: cardSetConfig.itemType } : {},
39368
+ ...cardSetConfig.sections ? { sections: cardSetConfig.sections } : {},
38904
39369
  sides
38905
39370
  };
38906
39371
  };