@gmb/bitmark-parser-generator 5.11.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.
@@ -295,6 +295,8 @@ var BitType = {
295
295
  exampleList: "example-list",
296
296
  extractorAiChat: "extractor-ai-chat",
297
297
  extractorBlock: "extractor-block",
298
+ extractorBlueprint: "extractor-blueprint",
299
+ extractorBlueprintConfiguration: "extractor-blueprint-configuration",
298
300
  extractorConfiguration: "extractor-configuration",
299
301
  extractorImage: "extractor-image",
300
302
  extractorImageCollapsible: "extractor-image-collapsible",
@@ -478,6 +480,7 @@ var BitType = {
478
480
  pageOpenBookList: "page-open-book-list",
479
481
  printBook: "print-book",
480
482
  openBookChapter: "open-book-chapter",
483
+ openBookChapterTeaser: "open-book-chapter-teaser",
481
484
  pagePerson: "page-person",
482
485
  pageProduct: "page-product",
483
486
  pageProductList: "page-product-list",
@@ -827,6 +830,8 @@ var AbstractTagConfig = class {
827
830
  __publicField(this, "chain");
828
831
  __publicField(this, "jsonKey");
829
832
  // If the json key is different from the tag
833
+ __publicField(this, "secondaryJsonKey");
834
+ // Heading card alternate path
830
835
  __publicField(this, "deprecated");
831
836
  this.type = params.type;
832
837
  this.configKey = params.configKey;
@@ -835,6 +840,7 @@ var AbstractTagConfig = class {
835
840
  this.minCount = params.minCount;
836
841
  this.chain = params.chain;
837
842
  this.jsonKey = params.jsonKey;
843
+ this.secondaryJsonKey = params.secondaryJsonKey;
838
844
  this.deprecated = params.deprecated;
839
845
  }
840
846
  };
@@ -956,18 +962,22 @@ var ResourceTagConfig = class extends AbstractTagConfig {
956
962
 
957
963
  // src/model/config/CardVariantConfig.ts
958
964
  var CardVariantConfig = class {
959
- // Default: 1
960
- constructor(tags2, bodyAllowed, bodyRequired, repeatCount) {
965
+ // JSON path for body text
966
+ constructor(tags2, bodyAllowed, bodyRequired, repeatCount, jsonKey) {
961
967
  __publicField(this, "tags");
962
968
  __publicField(this, "bodyAllowed");
963
969
  // Default: true
964
970
  __publicField(this, "bodyRequired");
965
971
  // Default: false
966
972
  __publicField(this, "repeatCount");
973
+ // Default: 1
974
+ // JSON mapping fields
975
+ __publicField(this, "jsonKey");
967
976
  this.tags = tags2;
968
977
  this.bodyAllowed = bodyAllowed == null ? true : bodyAllowed;
969
978
  this.bodyRequired = bodyRequired;
970
979
  this.repeatCount = repeatCount;
980
+ this.jsonKey = jsonKey;
971
981
  }
972
982
  toString(options) {
973
983
  const opts = Object.assign({}, options);
@@ -989,27 +999,63 @@ ${tag.toString(opts)}`;
989
999
  }
990
1000
  };
991
1001
 
1002
+ // src/model/config/CardSideConfig.ts
1003
+ var CardSideConfig = class {
1004
+ constructor(name, repeat, variants) {
1005
+ __publicField(this, "name");
1006
+ __publicField(this, "repeat");
1007
+ __publicField(this, "variants");
1008
+ this.name = name;
1009
+ this.repeat = repeat;
1010
+ this.variants = variants;
1011
+ }
1012
+ toString(options) {
1013
+ const opts = Object.assign({}, options);
1014
+ let s = "";
1015
+ s += `[Side: ${this.name}]`;
1016
+ if (this.repeat) s += " (repeat)";
1017
+ let variantNo = 0;
1018
+ for (const variant of this.variants) {
1019
+ s += `
1020
+ [Variant ${variantNo}]`;
1021
+ s += `
1022
+ ${variant.toString(opts)}`;
1023
+ variantNo++;
1024
+ }
1025
+ return s;
1026
+ }
1027
+ };
1028
+
992
1029
  // src/model/config/CardSetConfig.ts
993
1030
  var CardSetConfig = class {
994
- constructor(configKey, variants) {
1031
+ constructor(configKey, jsonKey, itemType, sections, sides) {
995
1032
  __publicField(this, "configKey");
996
- __publicField(this, "variants");
1033
+ __publicField(this, "jsonKey");
1034
+ __publicField(this, "itemType");
1035
+ __publicField(this, "sections");
1036
+ __publicField(this, "sides");
997
1037
  this.configKey = configKey;
998
- this.variants = variants;
1038
+ this.jsonKey = jsonKey;
1039
+ this.itemType = itemType;
1040
+ this.sections = sections;
1041
+ this.sides = sides;
1042
+ }
1043
+ // Legacy accessor — provides the same shape as the old `variants: CardVariantConfig[][]`
1044
+ // so downstream consumers (Config.getCardSetVariantConfig, etc.) continue to work.
1045
+ get variants() {
1046
+ return this.sides.map((side) => side.variants);
999
1047
  }
1000
1048
  toString(options) {
1001
1049
  const opts = Object.assign({}, options);
1002
1050
  let s = "";
1003
- let sideNo = 0;
1004
- let variantNo = 0;
1005
- for (const sides of this.variants) {
1006
- for (const variant of sides) {
1007
- s += `[Card - Side ${sideNo}, Variant ${variantNo}]`;
1008
- s += `
1009
- ${variant.toString(opts)}`;
1010
- variantNo++;
1011
- }
1012
- sideNo++;
1051
+ s += `[CardSet: ${this.configKey}]`;
1052
+ s += `
1053
+ jsonKey: ${this.jsonKey}`;
1054
+ s += `
1055
+ itemType: ${this.itemType}`;
1056
+ for (const side of this.sides) {
1057
+ s += `
1058
+ ${side.toString(opts)}`;
1013
1059
  }
1014
1060
  return s;
1015
1061
  }
@@ -2162,589 +2208,947 @@ var import_superenum15 = require("@ncoderz/superenum");
2162
2208
 
2163
2209
  // src/config/raw/cardSets.ts
2164
2210
  var CARDSETS = {
2165
- [CardSetConfigKey.definitionList]: {
2166
- variants: [
2167
- [
2168
- {
2169
- tags: [
2170
- {
2171
- key: ConfigKey.group_standardItemLeadInstructionHint,
2172
- description: "Standard tags for lead, instruction, and hint."
2173
- },
2174
- {
2175
- key: ConfigKey.property_example,
2176
- description: "Example text for the definition.",
2177
- format: TagFormat.plainText
2178
- },
2179
- {
2180
- key: ConfigKey.tag_title,
2181
- description: "Title of the definition."
2182
- },
2183
- {
2184
- key: ConfigKey.group_resourceIcon,
2185
- description: "Icon resource for the definition."
2186
- }
2187
- ],
2188
- repeatCount: Count.infinity
2189
- }
2190
- ]
2211
+ //
2212
+ // flashcard
2213
+ //
2214
+ [CardSetConfigKey.flashcard]: {
2215
+ jsonKey: "cards",
2216
+ sides: [
2217
+ {
2218
+ name: "question",
2219
+ variants: [
2220
+ {
2221
+ jsonKey: "question.text",
2222
+ tags: [
2223
+ {
2224
+ key: ConfigKey.group_standardTags,
2225
+ description: "Standard tags for the flashcard."
2226
+ },
2227
+ {
2228
+ key: ConfigKey.tag_title,
2229
+ description: "Title of the flashcard."
2230
+ },
2231
+ {
2232
+ key: ConfigKey.group_resourceIcon,
2233
+ description: "Icon resource for the flashcard.",
2234
+ jsonKey: "question.icon"
2235
+ }
2236
+ ]
2237
+ }
2238
+ ]
2239
+ },
2240
+ {
2241
+ name: "answer",
2242
+ variants: [
2243
+ {
2244
+ jsonKey: "answer.text",
2245
+ tags: [
2246
+ {
2247
+ key: ConfigKey.group_standardTags,
2248
+ description: "Standard tags for the flashcard."
2249
+ },
2250
+ {
2251
+ key: ConfigKey.tag_title,
2252
+ description: "Title of the flashcard."
2253
+ },
2254
+ {
2255
+ key: ConfigKey.group_resourceIcon,
2256
+ description: "Icon resource for the flashcard.",
2257
+ jsonKey: "answer.icon"
2258
+ }
2259
+ ]
2260
+ },
2261
+ {
2262
+ jsonKey: "alternativeAnswers[].text",
2263
+ tags: [
2264
+ {
2265
+ key: ConfigKey.group_standardTags,
2266
+ description: "Standard tags for the flashcard."
2267
+ },
2268
+ {
2269
+ key: ConfigKey.tag_title,
2270
+ description: "Title of the flashcard."
2271
+ },
2272
+ {
2273
+ key: ConfigKey.group_resourceIcon,
2274
+ description: "Icon resource for the flashcard."
2275
+ }
2276
+ ],
2277
+ repeatCount: Count.infinity
2278
+ }
2279
+ ]
2280
+ }
2191
2281
  ]
2192
2282
  },
2193
- [CardSetConfigKey.flashcard]: {
2194
- variants: [
2195
- [
2196
- {
2197
- tags: [
2198
- {
2199
- key: ConfigKey.group_standardItemLeadInstructionHint,
2200
- description: "Standard tags for lead, instruction, and hint."
2201
- },
2202
- {
2203
- key: ConfigKey.property_example,
2204
- description: "Example text for the flashcard.",
2205
- format: TagFormat.plainText
2206
- },
2207
- {
2208
- key: ConfigKey.tag_title,
2209
- description: "Title of the flashcard."
2210
- },
2211
- {
2212
- key: ConfigKey.group_resourceIcon,
2213
- description: "Icon resource for the flashcard."
2214
- }
2215
- ],
2216
- repeatCount: Count.infinity
2217
- }
2218
- ]
2283
+ //
2284
+ // definition-list
2285
+ //
2286
+ [CardSetConfigKey.definitionList]: {
2287
+ jsonKey: "definitions",
2288
+ sides: [
2289
+ {
2290
+ name: "term",
2291
+ variants: [
2292
+ {
2293
+ jsonKey: "term.text",
2294
+ tags: [
2295
+ {
2296
+ key: ConfigKey.group_standardTags,
2297
+ description: "Standard tags for the definition."
2298
+ },
2299
+ {
2300
+ key: ConfigKey.tag_title,
2301
+ description: "Title of the definition.",
2302
+ secondaryJsonKey: "heading.forKeys"
2303
+ },
2304
+ {
2305
+ key: ConfigKey.group_resourceIcon,
2306
+ description: "Icon resource for the definition.",
2307
+ jsonKey: "term.icon"
2308
+ }
2309
+ ]
2310
+ }
2311
+ ]
2312
+ },
2313
+ {
2314
+ name: "definition",
2315
+ variants: [
2316
+ {
2317
+ jsonKey: "definition.text",
2318
+ tags: [
2319
+ {
2320
+ key: ConfigKey.group_standardTags,
2321
+ description: "Standard tags for the definition."
2322
+ },
2323
+ {
2324
+ key: ConfigKey.tag_title,
2325
+ description: "Title of the definition.",
2326
+ secondaryJsonKey: "heading.forValues"
2327
+ },
2328
+ {
2329
+ key: ConfigKey.group_resourceIcon,
2330
+ description: "Icon resource for the definition.",
2331
+ jsonKey: "definition.icon"
2332
+ }
2333
+ ]
2334
+ },
2335
+ {
2336
+ jsonKey: "alternativeDefinitions[].text",
2337
+ tags: [
2338
+ {
2339
+ key: ConfigKey.group_standardTags,
2340
+ description: "Standard tags for the definition."
2341
+ },
2342
+ {
2343
+ key: ConfigKey.tag_title,
2344
+ description: "Title of the definition."
2345
+ },
2346
+ {
2347
+ key: ConfigKey.group_resourceIcon,
2348
+ description: "Icon resource for the definition."
2349
+ }
2350
+ ],
2351
+ repeatCount: Count.infinity
2352
+ }
2353
+ ]
2354
+ }
2219
2355
  ]
2220
2356
  },
2221
- [CardSetConfigKey.elements]: {
2222
- variants: [
2223
- [
2224
- {
2225
- tags: [
2226
- {
2227
- key: ConfigKey.group_standardItemLeadInstructionHint,
2228
- description: "Standard tags for lead, instruction, and hint."
2229
- },
2230
- {
2231
- key: ConfigKey.property_example,
2232
- description: "Example text for the element.",
2233
- format: TagFormat.plainText
2234
- }
2235
- ],
2236
- repeatCount: Count.infinity
2237
- }
2238
- ]
2357
+ //
2358
+ // match-pairs
2359
+ //
2360
+ [CardSetConfigKey.matchPairs]: {
2361
+ jsonKey: "pairs",
2362
+ sides: [
2363
+ {
2364
+ name: "key",
2365
+ variants: [
2366
+ {
2367
+ jsonKey: "key",
2368
+ tags: [
2369
+ {
2370
+ key: ConfigKey.group_standardTags,
2371
+ description: "Standard tags for the match pair."
2372
+ },
2373
+ {
2374
+ key: ConfigKey.tag_title,
2375
+ description: "Title of the match pair.",
2376
+ secondaryJsonKey: "heading.forKeys"
2377
+ },
2378
+ {
2379
+ key: ConfigKey.property_isCaseSensitive,
2380
+ description: "Property to indicate if the match is case sensitive.",
2381
+ format: TagFormat.boolean
2382
+ },
2383
+ {
2384
+ key: ConfigKey.resource_audio,
2385
+ description: "Audio resource for the match pair.",
2386
+ jsonKey: "keyAudio"
2387
+ },
2388
+ {
2389
+ key: ConfigKey.resource_image,
2390
+ description: "Image resource for the match pair.",
2391
+ jsonKey: "keyImage"
2392
+ }
2393
+ ]
2394
+ }
2395
+ ]
2396
+ },
2397
+ {
2398
+ name: "values",
2399
+ repeat: true,
2400
+ variants: [
2401
+ {
2402
+ jsonKey: "values[]",
2403
+ tags: [
2404
+ {
2405
+ key: ConfigKey.group_standardTags,
2406
+ description: "Standard tags for the match pair."
2407
+ },
2408
+ {
2409
+ key: ConfigKey.tag_title,
2410
+ description: "Title of the match pair.",
2411
+ secondaryJsonKey: "heading.forValues"
2412
+ },
2413
+ {
2414
+ key: ConfigKey.property_isCaseSensitive,
2415
+ description: "Property to indicate if the match is case sensitive.",
2416
+ format: TagFormat.boolean
2417
+ }
2418
+ ],
2419
+ repeatCount: Count.infinity
2420
+ }
2421
+ ]
2422
+ }
2239
2423
  ]
2240
2424
  },
2241
- [CardSetConfigKey.statements]: {
2242
- variants: [
2243
- [
2244
- {
2245
- tags: [
2246
- {
2247
- key: ConfigKey.tag_true,
2248
- description: "Tag for true statements.",
2249
- maxCount: 1
2250
- },
2251
- {
2252
- key: ConfigKey.tag_false,
2253
- description: "Tag for false statements.",
2254
- maxCount: 1
2255
- },
2256
- {
2257
- key: ConfigKey.group_standardItemLeadInstructionHint,
2258
- description: "Standard tags for lead, instruction, and hint."
2259
- },
2260
- {
2261
- key: ConfigKey.property_example,
2262
- description: "Example text for the statement.",
2263
- format: TagFormat.plainText
2264
- }
2265
- ],
2266
- bodyAllowed: false
2267
- }
2268
- ]
2425
+ //
2426
+ // match-audio-pairs
2427
+ //
2428
+ [CardSetConfigKey.matchAudioPairs]: {
2429
+ jsonKey: "pairs",
2430
+ sides: [
2431
+ {
2432
+ name: "key",
2433
+ variants: [
2434
+ {
2435
+ jsonKey: "key",
2436
+ tags: [
2437
+ {
2438
+ key: ConfigKey.group_standardTags,
2439
+ description: "Standard tags for the audio match pair."
2440
+ },
2441
+ {
2442
+ key: ConfigKey.tag_title,
2443
+ description: "Title of the audio match pair.",
2444
+ secondaryJsonKey: "heading.forKeys"
2445
+ },
2446
+ {
2447
+ key: ConfigKey.resource_audio,
2448
+ description: "Audio resource for the match pair.",
2449
+ jsonKey: "keyAudio"
2450
+ }
2451
+ ]
2452
+ }
2453
+ ]
2454
+ },
2455
+ {
2456
+ name: "values",
2457
+ repeat: true,
2458
+ variants: [
2459
+ {
2460
+ jsonKey: "values[]",
2461
+ tags: [
2462
+ {
2463
+ key: ConfigKey.group_standardTags,
2464
+ description: "Standard tags for the audio match pair."
2465
+ },
2466
+ {
2467
+ key: ConfigKey.tag_title,
2468
+ description: "Title of the audio match pair.",
2469
+ secondaryJsonKey: "heading.forValues"
2470
+ },
2471
+ {
2472
+ key: ConfigKey.resource_audio,
2473
+ description: "Audio resource for the match pair."
2474
+ }
2475
+ ],
2476
+ repeatCount: Count.infinity
2477
+ }
2478
+ ]
2479
+ }
2269
2480
  ]
2270
2481
  },
2271
- [CardSetConfigKey.quiz]: {
2272
- variants: [
2273
- [
2274
- {
2275
- tags: [
2276
- {
2277
- key: ConfigKey.group_trueFalse,
2278
- description: "Group for true/false questions."
2279
- },
2280
- {
2281
- key: ConfigKey.group_standardItemLeadInstructionHint,
2282
- description: "Standard tags for lead, instruction, and hint."
2283
- },
2284
- {
2285
- key: ConfigKey.property_example,
2286
- description: "Example text for the quiz question.",
2287
- format: TagFormat.plainText
2288
- }
2289
- ],
2290
- bodyAllowed: false
2291
- }
2292
- ]
2482
+ //
2483
+ // match-image-pairs
2484
+ //
2485
+ [CardSetConfigKey.matchImagePairs]: {
2486
+ jsonKey: "pairs",
2487
+ sides: [
2488
+ {
2489
+ name: "key",
2490
+ variants: [
2491
+ {
2492
+ jsonKey: "key",
2493
+ tags: [
2494
+ {
2495
+ key: ConfigKey.group_standardTags,
2496
+ description: "Standard tags for the image match pair."
2497
+ },
2498
+ {
2499
+ key: ConfigKey.tag_title,
2500
+ description: "Title of the image match pair.",
2501
+ secondaryJsonKey: "heading.forKeys"
2502
+ },
2503
+ {
2504
+ key: ConfigKey.resource_image,
2505
+ description: "Image resource for the match pair.",
2506
+ jsonKey: "keyImage"
2507
+ }
2508
+ ]
2509
+ }
2510
+ ]
2511
+ },
2512
+ {
2513
+ name: "values",
2514
+ repeat: true,
2515
+ variants: [
2516
+ {
2517
+ jsonKey: "values[]",
2518
+ tags: [
2519
+ {
2520
+ key: ConfigKey.group_standardTags,
2521
+ description: "Standard tags for the image match pair."
2522
+ },
2523
+ {
2524
+ key: ConfigKey.tag_title,
2525
+ description: "Title of the image match pair.",
2526
+ secondaryJsonKey: "heading.forValues"
2527
+ },
2528
+ {
2529
+ key: ConfigKey.resource_image,
2530
+ description: "Image resource for the match pair."
2531
+ }
2532
+ ],
2533
+ repeatCount: Count.infinity
2534
+ }
2535
+ ]
2536
+ }
2293
2537
  ]
2294
2538
  },
2295
- [CardSetConfigKey.feedback]: {
2296
- variants: [
2297
- // Side 1
2298
- [
2299
- // Variant 1..N
2300
- {
2301
- tags: [
2302
- {
2303
- key: ConfigKey.group_standardItemLeadInstructionHint,
2304
- description: "Standard tags for lead, instruction, and hint."
2305
- },
2306
- {
2307
- key: ConfigKey.group_trueFalse,
2308
- description: "Group for true/false feedback."
2309
- },
2310
- {
2311
- key: ConfigKey.tag_title,
2312
- description: "Title of the feedback."
2313
- }
2314
- ],
2315
- bodyAllowed: false
2316
- }
2317
- ],
2318
- // Side 2
2319
- [
2320
- // Variant 1..N
2321
- {
2322
- tags: [
2323
- {
2324
- key: ConfigKey.group_standardItemLeadInstructionHint,
2325
- description: "Standard tags for lead, instruction, and hint."
2326
- },
2327
- {
2328
- key: ConfigKey.property_reasonableNumOfChars,
2329
- description: "Property for reasonable number of characters.",
2330
- format: TagFormat.number
2331
- },
2332
- {
2333
- key: ConfigKey.property_example,
2334
- description: "Example text for the feedback.",
2335
- format: TagFormat.plainText
2336
- },
2337
- {
2338
- key: ConfigKey.tag_title,
2339
- description: "Title of the feedback."
2340
- }
2341
- ],
2342
- bodyAllowed: true
2343
- }
2344
- ]
2539
+ //
2540
+ // match-matrix
2541
+ //
2542
+ [CardSetConfigKey.matchMatrix]: {
2543
+ jsonKey: "matrix",
2544
+ sides: [
2545
+ {
2546
+ name: "key",
2547
+ variants: [
2548
+ {
2549
+ jsonKey: "key",
2550
+ tags: [
2551
+ {
2552
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2553
+ description: "Standard tags for lead, instruction, and hint."
2554
+ },
2555
+ {
2556
+ key: ConfigKey.property_example,
2557
+ description: "Example text for the match matrix.",
2558
+ format: TagFormat.plainText
2559
+ },
2560
+ {
2561
+ key: ConfigKey.tag_title,
2562
+ description: "Title of the match matrix.",
2563
+ secondaryJsonKey: "heading.forKeys"
2564
+ },
2565
+ {
2566
+ key: ConfigKey.property_isCaseSensitive,
2567
+ description: "Property to indicate if the match is case sensitive.",
2568
+ format: TagFormat.boolean
2569
+ }
2570
+ ]
2571
+ }
2572
+ ]
2573
+ },
2574
+ {
2575
+ name: "cell",
2576
+ repeat: true,
2577
+ variants: [
2578
+ {
2579
+ jsonKey: "cells[{s}].values[]",
2580
+ tags: [
2581
+ {
2582
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2583
+ description: "Standard tags for lead, instruction, and hint."
2584
+ },
2585
+ {
2586
+ key: ConfigKey.property_example,
2587
+ description: "Example text for the match matrix.",
2588
+ format: TagFormat.plainText
2589
+ },
2590
+ {
2591
+ key: ConfigKey.tag_title,
2592
+ description: "Title of the match matrix.",
2593
+ secondaryJsonKey: "heading.forValues"
2594
+ },
2595
+ {
2596
+ key: ConfigKey.property_isCaseSensitive,
2597
+ description: "Property to indicate if the match is case sensitive.",
2598
+ format: TagFormat.boolean
2599
+ }
2600
+ ],
2601
+ repeatCount: Count.infinity
2602
+ }
2603
+ ]
2604
+ }
2345
2605
  ]
2346
2606
  },
2347
- [CardSetConfigKey.questions]: {
2348
- variants: [
2349
- [
2350
- {
2351
- tags: [
2352
- {
2353
- key: ConfigKey.property_reasonableNumOfChars,
2354
- description: "Property for reasonable number of characters.",
2355
- format: TagFormat.number
2356
- },
2357
- {
2358
- key: ConfigKey.tag_sampleSolution,
2359
- description: "Sample solution for the question."
2360
- },
2361
- {
2362
- key: ConfigKey.property_sampleSolution,
2363
- description: "Property for sample solution text.",
2364
- format: TagFormat.plainText
2365
- },
2366
- {
2367
- key: ConfigKey.property_additionalSolutions,
2368
- description: "Property for additional solutions.",
2369
- format: TagFormat.plainText,
2370
- maxCount: Count.infinity
2371
- },
2372
- {
2373
- key: ConfigKey.property_partialAnswer,
2374
- description: "Property for partial answer text.",
2375
- format: TagFormat.plainText
2376
- },
2377
- {
2378
- key: ConfigKey.group_standardItemLeadInstructionHint,
2379
- description: "Standard tags for lead, instruction, and hint."
2380
- },
2381
- {
2382
- key: ConfigKey.property_example,
2383
- description: "Example text for the question.",
2384
- format: TagFormat.plainText
2385
- }
2386
- ],
2387
- repeatCount: Count.infinity
2388
- }
2389
- ]
2607
+ //
2608
+ // statements
2609
+ //
2610
+ [CardSetConfigKey.statements]: {
2611
+ jsonKey: "statements",
2612
+ sides: [
2613
+ {
2614
+ name: "statement",
2615
+ variants: [
2616
+ {
2617
+ jsonKey: "statement",
2618
+ tags: [
2619
+ {
2620
+ key: ConfigKey.tag_true,
2621
+ description: "Tag for true statements.",
2622
+ maxCount: 1
2623
+ },
2624
+ {
2625
+ key: ConfigKey.tag_false,
2626
+ description: "Tag for false statements.",
2627
+ maxCount: 1
2628
+ },
2629
+ {
2630
+ key: ConfigKey.group_standardTags,
2631
+ description: "Standard tags for the statement."
2632
+ }
2633
+ ],
2634
+ bodyAllowed: false
2635
+ }
2636
+ ]
2637
+ }
2390
2638
  ]
2391
2639
  },
2392
- // matchPairs
2393
- // TODO: We actually need to allow for different card configurations, because titles are valid on the first card only.
2394
- // For now we allow them to be valid on all cards, but we need to change this.
2395
- [CardSetConfigKey.matchPairs]: {
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 pair.",
2409
- format: TagFormat.plainText
2410
- },
2411
- {
2412
- key: ConfigKey.tag_title,
2413
- description: "Title of the match pair."
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
- ]
2640
+ //
2641
+ // quiz
2642
+ //
2643
+ [CardSetConfigKey.quiz]: {
2644
+ jsonKey: "quizzes",
2645
+ sides: [
2646
+ {
2647
+ name: "choices",
2648
+ variants: [
2649
+ {
2650
+ jsonKey: null,
2651
+ tags: [
2652
+ {
2653
+ key: ConfigKey.group_trueFalse,
2654
+ description: "Group for true/false questions."
2655
+ },
2656
+ {
2657
+ key: ConfigKey.group_standardTags,
2658
+ description: "Standard tags for the quiz."
2659
+ }
2660
+ ],
2661
+ bodyAllowed: false
2662
+ }
2663
+ ]
2664
+ }
2424
2665
  ]
2425
2666
  },
2426
- [CardSetConfigKey.matchAudioPairs]: {
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.property_example,
2439
- description: "Example text for the audio match pair.",
2440
- format: TagFormat.plainText
2441
- },
2442
- {
2443
- key: ConfigKey.tag_title,
2444
- description: "Title of the audio match pair."
2445
- },
2446
- {
2447
- key: ConfigKey.resource_audio,
2448
- description: "Audio resource for the match pair."
2449
- }
2450
- ],
2451
- repeatCount: Count.infinity
2452
- }
2453
- ]
2667
+ //
2668
+ // feedback
2669
+ //
2670
+ [CardSetConfigKey.feedback]: {
2671
+ jsonKey: "feedbacks",
2672
+ sides: [
2673
+ {
2674
+ name: "choices",
2675
+ variants: [
2676
+ {
2677
+ jsonKey: null,
2678
+ tags: [
2679
+ {
2680
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2681
+ description: "Standard tags for lead, instruction, and hint."
2682
+ },
2683
+ {
2684
+ key: ConfigKey.group_trueFalse,
2685
+ description: "Group for true/false feedback."
2686
+ },
2687
+ {
2688
+ key: ConfigKey.tag_title,
2689
+ description: "Title of the feedback.",
2690
+ secondaryJsonKey: "heading.forKeys"
2691
+ }
2692
+ ],
2693
+ bodyAllowed: false
2694
+ }
2695
+ ]
2696
+ },
2697
+ {
2698
+ name: "reason",
2699
+ variants: [
2700
+ {
2701
+ jsonKey: "reason.text",
2702
+ tags: [
2703
+ {
2704
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2705
+ description: "Standard tags for lead, instruction, and hint."
2706
+ },
2707
+ {
2708
+ key: ConfigKey.property_reasonableNumOfChars,
2709
+ description: "Property for reasonable number of characters.",
2710
+ format: TagFormat.number
2711
+ },
2712
+ {
2713
+ key: ConfigKey.property_example,
2714
+ description: "Example text for the feedback.",
2715
+ format: TagFormat.plainText
2716
+ },
2717
+ {
2718
+ key: ConfigKey.tag_title,
2719
+ description: "Title of the feedback.",
2720
+ secondaryJsonKey: "heading.forValues"
2721
+ }
2722
+ ],
2723
+ bodyAllowed: true
2724
+ }
2725
+ ]
2726
+ }
2454
2727
  ]
2455
2728
  },
2456
- [CardSetConfigKey.matchImagePairs]: {
2457
- variants: [
2458
- // Side 1
2459
- [
2460
- // Variant 1..N
2461
- {
2462
- tags: [
2463
- {
2464
- key: ConfigKey.group_standardItemLeadInstructionHint,
2465
- description: "Standard tags for lead, instruction, and hint."
2466
- },
2467
- {
2468
- key: ConfigKey.property_example,
2469
- description: "Example text for the image match pair.",
2470
- format: TagFormat.plainText
2471
- },
2472
- {
2473
- key: ConfigKey.tag_title,
2474
- description: "Title of the image match pair."
2475
- },
2476
- {
2477
- key: ConfigKey.resource_image,
2478
- description: "Image resource for the match pair."
2479
- }
2480
- ],
2481
- repeatCount: Count.infinity
2482
- }
2483
- ]
2729
+ //
2730
+ // questions
2731
+ //
2732
+ [CardSetConfigKey.questions]: {
2733
+ jsonKey: "questions",
2734
+ sides: [
2735
+ {
2736
+ name: "question",
2737
+ variants: [
2738
+ {
2739
+ jsonKey: "question",
2740
+ tags: [
2741
+ {
2742
+ key: ConfigKey.property_reasonableNumOfChars,
2743
+ description: "Property for reasonable number of characters.",
2744
+ format: TagFormat.number
2745
+ },
2746
+ {
2747
+ key: ConfigKey.tag_sampleSolution,
2748
+ description: "Sample solution for the question."
2749
+ },
2750
+ {
2751
+ key: ConfigKey.property_sampleSolution,
2752
+ description: "Property for sample solution text.",
2753
+ format: TagFormat.plainText
2754
+ },
2755
+ {
2756
+ key: ConfigKey.property_additionalSolutions,
2757
+ description: "Property for additional solutions.",
2758
+ format: TagFormat.plainText,
2759
+ maxCount: Count.infinity
2760
+ },
2761
+ {
2762
+ key: ConfigKey.property_partialAnswer,
2763
+ description: "Property for partial answer text.",
2764
+ format: TagFormat.plainText
2765
+ },
2766
+ {
2767
+ key: ConfigKey.group_standardTags,
2768
+ description: "Standard tags for the question."
2769
+ }
2770
+ ]
2771
+ }
2772
+ ]
2773
+ }
2484
2774
  ]
2485
2775
  },
2486
- [CardSetConfigKey.matchMatrix]: {
2487
- variants: [
2488
- // Side 1
2489
- [
2490
- // Variant 1..N
2491
- {
2492
- tags: [
2493
- {
2494
- key: ConfigKey.group_standardItemLeadInstructionHint,
2495
- description: "Standard tags for lead, instruction, and hint."
2496
- },
2497
- {
2498
- key: ConfigKey.property_example,
2499
- description: "Example text for the match matrix.",
2500
- format: TagFormat.plainText
2501
- },
2502
- {
2503
- key: ConfigKey.tag_title,
2504
- description: "Title of the match matrix."
2505
- },
2506
- {
2507
- key: ConfigKey.property_isCaseSensitive,
2508
- description: "Property to indicate if the match is case sensitive.",
2509
- format: TagFormat.boolean
2510
- }
2511
- ],
2512
- repeatCount: Count.infinity
2513
- }
2514
- ]
2776
+ //
2777
+ // elements
2778
+ //
2779
+ [CardSetConfigKey.elements]: {
2780
+ jsonKey: null,
2781
+ sides: [
2782
+ {
2783
+ name: "element",
2784
+ repeat: true,
2785
+ variants: [
2786
+ {
2787
+ jsonKey: "elements[]",
2788
+ tags: [
2789
+ {
2790
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2791
+ description: "Standard tags for lead, instruction, and hint."
2792
+ },
2793
+ {
2794
+ key: ConfigKey.property_example,
2795
+ description: "Example text for the element.",
2796
+ format: TagFormat.plainText
2797
+ }
2798
+ ],
2799
+ repeatCount: Count.infinity
2800
+ }
2801
+ ]
2802
+ }
2515
2803
  ]
2516
2804
  },
2805
+ //
2806
+ // table
2807
+ //
2517
2808
  [CardSetConfigKey.table]: {
2518
- variants: [
2519
- // Side 1
2520
- [
2521
- // Variant 1..N
2522
- {
2523
- tags: [
2524
- {
2525
- key: ConfigKey.group_standardItemLeadInstructionHint,
2526
- description: "Standard tags for lead, instruction, and hint."
2527
- },
2528
- {
2529
- key: ConfigKey.tag_title,
2530
- description: "Title of the table."
2531
- },
2532
- {
2533
- key: ConfigKey.property_tableCellType,
2534
- description: "Table cell type (th/td).",
2535
- format: TagFormat.plainText
2536
- },
2537
- {
2538
- key: ConfigKey.property_tableRowSpan,
2539
- description: "Number of rows the cell spans.",
2540
- format: TagFormat.number
2541
- },
2542
- {
2543
- key: ConfigKey.property_tableColSpan,
2544
- description: "Number of columns the cell spans.",
2545
- format: TagFormat.number
2546
- },
2547
- {
2548
- key: ConfigKey.property_tableScope,
2549
- description: "Scope attribute for header cells.",
2550
- format: TagFormat.plainText
2551
- }
2552
- ],
2553
- repeatCount: Count.infinity
2554
- }
2555
- ]
2809
+ jsonKey: "table.data",
2810
+ itemType: "array",
2811
+ sides: [
2812
+ {
2813
+ name: "cell",
2814
+ repeat: true,
2815
+ variants: [
2816
+ {
2817
+ jsonKey: null,
2818
+ tags: [
2819
+ {
2820
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2821
+ description: "Standard tags for lead, instruction, and hint."
2822
+ },
2823
+ {
2824
+ key: ConfigKey.tag_title,
2825
+ description: "Title of the table.",
2826
+ secondaryJsonKey: "table.columns[]"
2827
+ },
2828
+ {
2829
+ key: ConfigKey.property_tableCellType,
2830
+ description: "Table cell type (th/td).",
2831
+ format: TagFormat.plainText
2832
+ },
2833
+ {
2834
+ key: ConfigKey.property_tableRowSpan,
2835
+ description: "Number of rows the cell spans.",
2836
+ format: TagFormat.number
2837
+ },
2838
+ {
2839
+ key: ConfigKey.property_tableColSpan,
2840
+ description: "Number of columns the cell spans.",
2841
+ format: TagFormat.number
2842
+ },
2843
+ {
2844
+ key: ConfigKey.property_tableScope,
2845
+ description: "Scope attribute for header cells.",
2846
+ format: TagFormat.plainText
2847
+ }
2848
+ ],
2849
+ repeatCount: Count.infinity
2850
+ }
2851
+ ]
2852
+ }
2853
+ ]
2854
+ },
2855
+ //
2856
+ // table-extended
2857
+ //
2858
+ [CardSetConfigKey.tableExtended]: {
2859
+ jsonKey: null,
2860
+ sections: {
2861
+ default: { jsonKey: "tableExtended.body.rows" },
2862
+ "table-header": { jsonKey: "tableExtended.header.rows" },
2863
+ "table-footer": { jsonKey: "tableExtended.footer.rows" }
2864
+ },
2865
+ sides: [
2866
+ {
2867
+ name: "cell",
2868
+ repeat: true,
2869
+ variants: [
2870
+ {
2871
+ jsonKey: "content",
2872
+ tags: [
2873
+ {
2874
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2875
+ description: "Standard tags for lead, instruction, and hint."
2876
+ },
2877
+ {
2878
+ key: ConfigKey.tag_title,
2879
+ description: "Title of the table cell."
2880
+ },
2881
+ {
2882
+ key: ConfigKey.property_tableCellType,
2883
+ description: "Table cell type (th/td).",
2884
+ format: TagFormat.plainText
2885
+ },
2886
+ {
2887
+ key: ConfigKey.property_tableRowSpan,
2888
+ description: "Number of rows the cell spans.",
2889
+ format: TagFormat.number
2890
+ },
2891
+ {
2892
+ key: ConfigKey.property_tableColSpan,
2893
+ description: "Number of columns the cell spans.",
2894
+ format: TagFormat.number
2895
+ },
2896
+ {
2897
+ key: ConfigKey.property_tableScope,
2898
+ description: "Scope attribute for header cells.",
2899
+ format: TagFormat.plainText
2900
+ }
2901
+ ],
2902
+ repeatCount: Count.infinity
2903
+ }
2904
+ ]
2905
+ }
2556
2906
  ]
2557
2907
  },
2908
+ //
2909
+ // pronunciation-table
2910
+ //
2558
2911
  [CardSetConfigKey.pronunciationTable]: {
2559
- variants: [
2560
- // Side 1
2561
- [
2562
- // Variant 1..N
2563
- {
2564
- tags: [
2565
- {
2566
- key: ConfigKey.group_standardItemLeadInstructionHint,
2567
- description: "Standard tags for lead, instruction, and hint."
2568
- },
2569
- {
2570
- key: ConfigKey.tag_title,
2571
- description: "Title of the pronunciation table."
2572
- },
2573
- {
2574
- key: ConfigKey.resource_audio,
2575
- description: "Audio resource for the pronunciation table."
2576
- }
2577
- ],
2578
- repeatCount: Count.infinity
2579
- }
2580
- ]
2912
+ jsonKey: "pronunciationTable.data",
2913
+ itemType: "array",
2914
+ sides: [
2915
+ {
2916
+ name: "cell",
2917
+ repeat: true,
2918
+ variants: [
2919
+ {
2920
+ jsonKey: "body",
2921
+ tags: [
2922
+ {
2923
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2924
+ description: "Standard tags for lead, instruction, and hint."
2925
+ },
2926
+ {
2927
+ key: ConfigKey.tag_title,
2928
+ description: "Title of the pronunciation table."
2929
+ },
2930
+ {
2931
+ key: ConfigKey.resource_audio,
2932
+ description: "Audio resource for the pronunciation table.",
2933
+ jsonKey: "audio"
2934
+ }
2935
+ ],
2936
+ repeatCount: Count.infinity
2937
+ }
2938
+ ]
2939
+ }
2581
2940
  ]
2582
2941
  },
2942
+ //
2943
+ // bot-action-responses
2944
+ //
2583
2945
  [CardSetConfigKey.botActionResponses]: {
2584
- variants: [
2585
- [
2586
- {
2587
- tags: [
2588
- {
2589
- key: ConfigKey.property_reaction,
2590
- description: "Reaction to the bot action.",
2591
- format: TagFormat.plainText
2592
- },
2593
- {
2594
- key: ConfigKey.group_standardItemLeadInstructionHint,
2595
- description: "Standard tags for lead, instruction, and hint."
2596
- },
2597
- {
2598
- key: ConfigKey.property_example,
2599
- description: "Example text for the bot action response.",
2600
- format: TagFormat.plainText
2601
- }
2602
- ]
2603
- }
2604
- ]
2946
+ jsonKey: "responses",
2947
+ sides: [
2948
+ {
2949
+ name: "response",
2950
+ variants: [
2951
+ {
2952
+ jsonKey: "feedback",
2953
+ tags: [
2954
+ {
2955
+ key: ConfigKey.property_reaction,
2956
+ description: "Reaction to the bot action.",
2957
+ format: TagFormat.plainText
2958
+ },
2959
+ {
2960
+ key: ConfigKey.tag_item,
2961
+ description: "The item for the bot action response.",
2962
+ chain: [
2963
+ {
2964
+ key: ConfigKey.tag_item,
2965
+ description: "The lead, page number, source page number, and margin number.",
2966
+ maxCount: 4
2967
+ }
2968
+ ]
2969
+ },
2970
+ {
2971
+ key: ConfigKey.tag_instruction,
2972
+ description: "The response label for the bot action.",
2973
+ jsonKey: "response"
2974
+ },
2975
+ {
2976
+ key: ConfigKey.property_example,
2977
+ description: "Example text for the bot action response.",
2978
+ format: TagFormat.plainText
2979
+ }
2980
+ ]
2981
+ }
2982
+ ]
2983
+ }
2605
2984
  ]
2606
2985
  },
2986
+ //
2987
+ // cloze-list
2988
+ //
2607
2989
  [CardSetConfigKey.clozeList]: {
2608
- variants: [
2609
- [
2610
- {
2611
- tags: [
2612
- {
2613
- key: ConfigKey.group_standardTags,
2614
- description: "Standard tags for cloze items."
2615
- },
2616
- {
2617
- key: ConfigKey.group_gap,
2618
- description: "Group for gap tags in cloze items."
2619
- }
2620
- ]
2621
- }
2622
- ]
2990
+ jsonKey: "listItems",
2991
+ sides: [
2992
+ {
2993
+ name: "content",
2994
+ variants: [
2995
+ {
2996
+ jsonKey: "body",
2997
+ tags: [
2998
+ {
2999
+ key: ConfigKey.group_standardTags,
3000
+ description: "Standard tags for cloze items."
3001
+ },
3002
+ {
3003
+ key: ConfigKey.group_gap,
3004
+ description: "Group for gap tags in cloze items."
3005
+ }
3006
+ ]
3007
+ }
3008
+ ]
3009
+ }
2623
3010
  ]
2624
3011
  },
3012
+ //
3013
+ // example-bit-list
3014
+ //
2625
3015
  [CardSetConfigKey.exampleBitList]: {
2626
- variants: [
2627
- [
2628
- {
2629
- tags: [
2630
- {
2631
- key: ConfigKey.group_standardTags,
2632
- description: "Standard tags for example bits."
2633
- },
2634
- {
2635
- key: ConfigKey.tag_title,
2636
- description: "Title of the example bit."
2637
- }
2638
- ],
2639
- repeatCount: Count.infinity
2640
- }
2641
- ]
3016
+ jsonKey: "listItems",
3017
+ sides: [
3018
+ {
3019
+ name: "item",
3020
+ variants: [
3021
+ {
3022
+ jsonKey: "body",
3023
+ tags: [
3024
+ {
3025
+ key: ConfigKey.group_standardTags,
3026
+ description: "Standard tags for example bits."
3027
+ },
3028
+ {
3029
+ key: ConfigKey.tag_title,
3030
+ description: "Title of the example bit."
3031
+ }
3032
+ ]
3033
+ }
3034
+ ]
3035
+ }
2642
3036
  ]
2643
3037
  },
3038
+ //
3039
+ // ingredients
3040
+ //
2644
3041
  [CardSetConfigKey.ingredients]: {
2645
- variants: [
2646
- [
2647
- {
2648
- tags: [
2649
- {
2650
- key: ConfigKey.tag_title,
2651
- description: "Title of the ingredient."
2652
- },
2653
- {
2654
- key: ConfigKey.group_trueFalse,
2655
- description: "Group for true/false properties of the ingredient."
2656
- },
2657
- {
2658
- key: ConfigKey.group_standardItemLeadInstructionHint,
2659
- description: "Standard tags for lead, instruction, and hint."
2660
- },
2661
- {
2662
- key: ConfigKey.property_unit,
2663
- description: "Unit of measurement for the ingredient.",
2664
- format: TagFormat.plainText
2665
- },
2666
- {
2667
- key: ConfigKey.property_unitAbbr,
2668
- description: "Abbreviation for the unit of measurement.",
2669
- format: TagFormat.plainText
2670
- },
2671
- {
2672
- key: ConfigKey.property_decimalPlaces,
2673
- description: "Number of decimal places for the ingredient quantity.",
2674
- format: TagFormat.number,
2675
- defaultValue: "1"
2676
- },
2677
- {
2678
- key: ConfigKey.property_disableCalculation,
2679
- description: "Disable calculation for the ingredient.",
2680
- format: TagFormat.boolean
2681
- }
2682
- ],
2683
- repeatCount: Count.infinity
2684
- }
2685
- ]
3042
+ jsonKey: "ingredients",
3043
+ sides: [
3044
+ {
3045
+ name: "ingredient",
3046
+ variants: [
3047
+ {
3048
+ jsonKey: "ingredient",
3049
+ tags: [
3050
+ {
3051
+ key: ConfigKey.tag_title,
3052
+ description: "Title of the ingredient."
3053
+ },
3054
+ {
3055
+ key: ConfigKey.group_trueFalse,
3056
+ description: "Group for true/false properties of the ingredient."
3057
+ },
3058
+ {
3059
+ key: ConfigKey.tag_item,
3060
+ description: "The item for the ingredient.",
3061
+ chain: [
3062
+ {
3063
+ key: ConfigKey.tag_item,
3064
+ description: "Lead, page number, source page number, and margin number.",
3065
+ maxCount: 4
3066
+ }
3067
+ ]
3068
+ },
3069
+ {
3070
+ key: ConfigKey.tag_instruction,
3071
+ description: "The quantity of the ingredient.",
3072
+ jsonKey: "quantity"
3073
+ },
3074
+ {
3075
+ key: ConfigKey.tag_hint,
3076
+ description: "The hint for the ingredient."
3077
+ },
3078
+ {
3079
+ key: ConfigKey.property_unit,
3080
+ description: "Unit of measurement for the ingredient.",
3081
+ format: TagFormat.plainText
3082
+ },
3083
+ {
3084
+ key: ConfigKey.property_unitAbbr,
3085
+ description: "Abbreviation for the unit of measurement.",
3086
+ format: TagFormat.plainText
3087
+ },
3088
+ {
3089
+ key: ConfigKey.property_decimalPlaces,
3090
+ description: "Number of decimal places for the ingredient quantity.",
3091
+ format: TagFormat.number,
3092
+ defaultValue: "1"
3093
+ },
3094
+ {
3095
+ key: ConfigKey.property_disableCalculation,
3096
+ description: "Disable calculation for the ingredient.",
3097
+ format: TagFormat.boolean
3098
+ }
3099
+ ]
3100
+ }
3101
+ ]
3102
+ }
2686
3103
  ]
2687
3104
  },
2688
- // DEPRECATED - TO BE REMOVED IN THE FUTURE
2689
- // [CardSetConfigKey._captionDefinitionsList]: {
2690
- // variants: [
2691
- // // Side 1
2692
- // [
2693
- // // Variant 1..N
2694
- // {
2695
- // tags: [
2696
- // {
2697
- // type: BitTagType.tag,
2698
- // configKey: TagConfigKey.title,
2699
- // },
2700
- // ],
2701
- // repeatCount: Count.infinity,
2702
- // },
2703
- // ],
2704
- // ],
2705
- // },
3105
+ //
3106
+ // book-reference-list
3107
+ //
2706
3108
  [CardSetConfigKey.bookReferenceList]: {
2707
- variants: [
2708
- // Side 1
2709
- [
2710
- // Variant 1..N
2711
- {
2712
- tags: [
2713
- {
2714
- key: ConfigKey.group_standardTags,
2715
- description: "Standard tags for book references."
2716
- },
2717
- {
2718
- key: ConfigKey.property_refAuthor,
2719
- description: "Author of the book.",
2720
- format: TagFormat.plainText,
2721
- maxCount: Count.infinity
2722
- },
2723
- {
2724
- key: ConfigKey.property_refBookTitle,
2725
- description: "Title of the book.",
2726
- format: TagFormat.plainText
2727
- },
2728
- {
2729
- key: ConfigKey.property_refPublisher,
2730
- description: "Publisher of the book.",
2731
- format: TagFormat.plainText,
2732
- maxCount: Count.infinity
2733
- },
2734
- {
2735
- key: ConfigKey.property_refPublicationYear,
2736
- description: "Year of publication of the book.",
2737
- format: TagFormat.plainText
2738
- },
2739
- {
2740
- key: ConfigKey.property_citationStyle,
2741
- description: "Citation style for the book reference.",
2742
- format: TagFormat.plainText
2743
- }
2744
- ],
2745
- repeatCount: Count.infinity
2746
- }
2747
- ]
3109
+ jsonKey: "bookReferences",
3110
+ sides: [
3111
+ {
3112
+ name: "reference",
3113
+ variants: [
3114
+ {
3115
+ jsonKey: null,
3116
+ tags: [
3117
+ {
3118
+ key: ConfigKey.group_standardTags,
3119
+ description: "Standard tags for book references."
3120
+ },
3121
+ {
3122
+ key: ConfigKey.property_refAuthor,
3123
+ description: "Author of the book.",
3124
+ format: TagFormat.plainText,
3125
+ maxCount: Count.infinity
3126
+ },
3127
+ {
3128
+ key: ConfigKey.property_refBookTitle,
3129
+ description: "Title of the book.",
3130
+ format: TagFormat.plainText
3131
+ },
3132
+ {
3133
+ key: ConfigKey.property_refPublisher,
3134
+ description: "Publisher of the book.",
3135
+ format: TagFormat.plainText,
3136
+ maxCount: Count.infinity
3137
+ },
3138
+ {
3139
+ key: ConfigKey.property_refPublicationYear,
3140
+ description: "Year of publication of the book.",
3141
+ format: TagFormat.plainText
3142
+ },
3143
+ {
3144
+ key: ConfigKey.property_citationStyle,
3145
+ description: "Citation style for the book reference.",
3146
+ format: TagFormat.plainText
3147
+ }
3148
+ ]
3149
+ }
3150
+ ]
3151
+ }
2748
3152
  ]
2749
3153
  }
2750
3154
  };
@@ -4410,20 +4814,34 @@ var ConfigHydrator = class {
4410
4814
  if (!_cardSet) return void 0;
4411
4815
  const _cardSetConfig = CARDSETS[_cardSet];
4412
4816
  if (!_cardSetConfig) throw new Error(`No config found for card set config key '${_cardSet}'`);
4413
- const variants = [];
4414
- for (const _variants of _cardSetConfig.variants) {
4817
+ const sides = [];
4818
+ for (const _side of _cardSetConfig.sides) {
4415
4819
  const variantsOfSide = [];
4416
- for (const _variant of _variants) {
4820
+ for (const _variant of _side.variants) {
4417
4821
  const v = this.hydrateCardVariantConfig(_variant);
4418
4822
  variantsOfSide.push(v);
4419
4823
  }
4420
- variants.push(variantsOfSide);
4824
+ const sideConfig = new CardSideConfig(_side.name, _side.repeat ?? false, variantsOfSide);
4825
+ sides.push(sideConfig);
4421
4826
  }
4422
- const cardSetConfig = new CardSetConfig(_cardSet, variants);
4827
+ const cardSetConfig = new CardSetConfig(
4828
+ _cardSet,
4829
+ _cardSetConfig.jsonKey,
4830
+ _cardSetConfig.itemType ?? "object",
4831
+ _cardSetConfig.sections,
4832
+ sides
4833
+ );
4423
4834
  return cardSetConfig;
4424
4835
  }
4425
4836
  hydrateTagConfig(_tag) {
4426
- const { key: _configKey, maxCount, minCount, chain: _chain, deprecated } = _tag;
4837
+ const {
4838
+ key: _configKey,
4839
+ maxCount,
4840
+ minCount,
4841
+ chain: _chain,
4842
+ secondaryJsonKey,
4843
+ deprecated
4844
+ } = _tag;
4427
4845
  const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4428
4846
  if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
4429
4847
  const tag = (0, import_superenum15.Enum)(Tag).fromValue(configKey);
@@ -4438,6 +4856,7 @@ var ConfigHydrator = class {
4438
4856
  maxCount: maxCount ?? MAX_COUNT_DEFAULT,
4439
4857
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4440
4858
  chain,
4859
+ secondaryJsonKey,
4441
4860
  deprecated
4442
4861
  });
4443
4862
  return {
@@ -4456,7 +4875,8 @@ var ConfigHydrator = class {
4456
4875
  format,
4457
4876
  values,
4458
4877
  defaultValue,
4459
- jsonKey
4878
+ jsonKey,
4879
+ secondaryJsonKey
4460
4880
  } = _tag;
4461
4881
  const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4462
4882
  if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
@@ -4472,6 +4892,7 @@ var ConfigHydrator = class {
4472
4892
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4473
4893
  chain,
4474
4894
  jsonKey,
4895
+ secondaryJsonKey,
4475
4896
  format,
4476
4897
  values,
4477
4898
  defaultValue,
@@ -4484,7 +4905,15 @@ var ConfigHydrator = class {
4484
4905
  };
4485
4906
  }
4486
4907
  hydrateResourceTagConfig(_tag) {
4487
- const { key: _configKey, maxCount, minCount, chain: _chain, deprecated, jsonKey } = _tag;
4908
+ const {
4909
+ key: _configKey,
4910
+ maxCount,
4911
+ minCount,
4912
+ chain: _chain,
4913
+ deprecated,
4914
+ jsonKey,
4915
+ secondaryJsonKey
4916
+ } = _tag;
4488
4917
  const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4489
4918
  if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
4490
4919
  const tag = _configKey.substring(1);
@@ -4499,6 +4928,7 @@ var ConfigHydrator = class {
4499
4928
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4500
4929
  chain,
4501
4930
  jsonKey,
4931
+ secondaryJsonKey,
4502
4932
  deprecated
4503
4933
  });
4504
4934
  return {
@@ -4530,9 +4960,15 @@ var ConfigHydrator = class {
4530
4960
  };
4531
4961
  }
4532
4962
  hydrateCardVariantConfig(_variant) {
4533
- const { tags: _tags, bodyAllowed, bodyRequired, repeatCount } = _variant;
4963
+ const { tags: _tags, bodyAllowed, bodyRequired, repeatCount, jsonKey } = _variant;
4534
4964
  const tags2 = this.hydrateTagsConfig(_tags);
4535
- const cardSetConfig = new CardVariantConfig(tags2.tags, bodyAllowed, bodyRequired, repeatCount);
4965
+ const cardSetConfig = new CardVariantConfig(
4966
+ tags2.tags,
4967
+ bodyAllowed,
4968
+ bodyRequired,
4969
+ repeatCount,
4970
+ jsonKey
4971
+ );
4536
4972
  return cardSetConfig;
4537
4973
  }
4538
4974
  };
@@ -7298,6 +7734,12 @@ var BITS = {
7298
7734
  description: "Extractor configuration bit, used to configure extractors in articles or books",
7299
7735
  textFormatDefault: TextFormat2.plainText
7300
7736
  },
7737
+ [BitType.extractorBlueprintConfiguration]: {
7738
+ since: "5.11.0",
7739
+ baseBitType: BitType._standard,
7740
+ description: "Extractor blueprint configuration bit, used to specify extractor blueprint configuration when extracting from blueprints",
7741
+ textFormatDefault: TextFormat2.plainText
7742
+ },
7301
7743
  [BitType.extractorImage]: {
7302
7744
  since: "4.3.0",
7303
7745
  baseBitType: BitType._standard,
@@ -7323,6 +7765,12 @@ var BITS = {
7323
7765
  baseBitType: BitType.extractorImage,
7324
7766
  description: "Collapsible extractor images bit, used for images extracted from PDFs"
7325
7767
  },
7768
+ [BitType.extractorBlueprint]: {
7769
+ since: "5.12.0",
7770
+ baseBitType: BitType._standard,
7771
+ description: "Extractor blueprint bit, used to provide blueprint information about extractors",
7772
+ textFormatDefault: TextFormat2.json
7773
+ },
7326
7774
  [BitType.extractorInformation]: {
7327
7775
  since: "3.8.0",
7328
7776
  baseBitType: BitType._standard,
@@ -7525,6 +7973,11 @@ var BITS = {
7525
7973
  baseBitType: BitType.pageOpenBook,
7526
7974
  description: "Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"
7527
7975
  },
7976
+ [BitType.openBookChapterTeaser]: {
7977
+ since: "4.16.0",
7978
+ baseBitType: BitType.openBookChapter,
7979
+ description: "Open book chapter teaser bit, equal to open-book-chapter, used to create teaser chapter pages that open books"
7980
+ },
7528
7981
  [BitType.pageOpenBookList]: {
7529
7982
  since: "2.1.0",
7530
7983
  baseBitType: BitType.article,
@@ -10345,6 +10798,7 @@ var Config = class {
10345
10798
  maxCount: 1,
10346
10799
  chain: tag.chain,
10347
10800
  jsonKey: tag.jsonKey,
10801
+ secondaryJsonKey: tag.secondaryJsonKey,
10348
10802
  deprecated: tag.deprecated
10349
10803
  });
10350
10804
  finalResourceTags[k] = newTag;
@@ -10449,7 +10903,7 @@ var instance2 = new Config();
10449
10903
  // src/generated/package_info.ts
10450
10904
  var PACKAGE_INFO = {
10451
10905
  "name": "@gmb/bitmark-parser-generator",
10452
- "version": "5.11.0",
10906
+ "version": "5.12.0",
10453
10907
  "author": "Get More Brain Ltd",
10454
10908
  "license": "ISC",
10455
10909
  "description": "A bitmark parser and generator using Peggy.js"
@@ -34442,6 +34896,7 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
34442
34896
  minCount: 1,
34443
34897
  chain: void 0,
34444
34898
  jsonKey: void 0,
34899
+ secondaryJsonKey: void 0,
34445
34900
  format: TagFormat.bitmarkText,
34446
34901
  values: void 0,
34447
34902
  defaultValue: void 0,