@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.
package/dist/index.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",
@@ -780,6 +783,8 @@ var AbstractTagConfig = class {
780
783
  __publicField(this, "chain");
781
784
  __publicField(this, "jsonKey");
782
785
  // If the json key is different from the tag
786
+ __publicField(this, "secondaryJsonKey");
787
+ // Heading card alternate path
783
788
  __publicField(this, "deprecated");
784
789
  this.type = params.type;
785
790
  this.configKey = params.configKey;
@@ -788,6 +793,7 @@ var AbstractTagConfig = class {
788
793
  this.minCount = params.minCount;
789
794
  this.chain = params.chain;
790
795
  this.jsonKey = params.jsonKey;
796
+ this.secondaryJsonKey = params.secondaryJsonKey;
791
797
  this.deprecated = params.deprecated;
792
798
  }
793
799
  };
@@ -909,18 +915,22 @@ var ResourceTagConfig = class extends AbstractTagConfig {
909
915
 
910
916
  // src/model/config/CardVariantConfig.ts
911
917
  var CardVariantConfig = class {
912
- // Default: 1
913
- constructor(tags2, bodyAllowed, bodyRequired, repeatCount) {
918
+ // JSON path for body text
919
+ constructor(tags2, bodyAllowed, bodyRequired, repeatCount, jsonKey) {
914
920
  __publicField(this, "tags");
915
921
  __publicField(this, "bodyAllowed");
916
922
  // Default: true
917
923
  __publicField(this, "bodyRequired");
918
924
  // Default: false
919
925
  __publicField(this, "repeatCount");
926
+ // Default: 1
927
+ // JSON mapping fields
928
+ __publicField(this, "jsonKey");
920
929
  this.tags = tags2;
921
930
  this.bodyAllowed = bodyAllowed == null ? true : bodyAllowed;
922
931
  this.bodyRequired = bodyRequired;
923
932
  this.repeatCount = repeatCount;
933
+ this.jsonKey = jsonKey;
924
934
  }
925
935
  toString(options) {
926
936
  const opts = Object.assign({}, options);
@@ -942,27 +952,63 @@ ${tag.toString(opts)}`;
942
952
  }
943
953
  };
944
954
 
955
+ // src/model/config/CardSideConfig.ts
956
+ var CardSideConfig = class {
957
+ constructor(name, repeat, variants) {
958
+ __publicField(this, "name");
959
+ __publicField(this, "repeat");
960
+ __publicField(this, "variants");
961
+ this.name = name;
962
+ this.repeat = repeat;
963
+ this.variants = variants;
964
+ }
965
+ toString(options) {
966
+ const opts = Object.assign({}, options);
967
+ let s = "";
968
+ s += `[Side: ${this.name}]`;
969
+ if (this.repeat) s += " (repeat)";
970
+ let variantNo = 0;
971
+ for (const variant of this.variants) {
972
+ s += `
973
+ [Variant ${variantNo}]`;
974
+ s += `
975
+ ${variant.toString(opts)}`;
976
+ variantNo++;
977
+ }
978
+ return s;
979
+ }
980
+ };
981
+
945
982
  // src/model/config/CardSetConfig.ts
946
983
  var CardSetConfig = class {
947
- constructor(configKey, variants) {
984
+ constructor(configKey, jsonKey, itemType, sections, sides) {
948
985
  __publicField(this, "configKey");
949
- __publicField(this, "variants");
986
+ __publicField(this, "jsonKey");
987
+ __publicField(this, "itemType");
988
+ __publicField(this, "sections");
989
+ __publicField(this, "sides");
950
990
  this.configKey = configKey;
951
- this.variants = variants;
991
+ this.jsonKey = jsonKey;
992
+ this.itemType = itemType;
993
+ this.sections = sections;
994
+ this.sides = sides;
995
+ }
996
+ // Legacy accessor — provides the same shape as the old `variants: CardVariantConfig[][]`
997
+ // so downstream consumers (Config.getCardSetVariantConfig, etc.) continue to work.
998
+ get variants() {
999
+ return this.sides.map((side) => side.variants);
952
1000
  }
953
1001
  toString(options) {
954
1002
  const opts = Object.assign({}, options);
955
1003
  let s = "";
956
- let sideNo = 0;
957
- let variantNo = 0;
958
- for (const sides of this.variants) {
959
- for (const variant of sides) {
960
- s += `[Card - Side ${sideNo}, Variant ${variantNo}]`;
961
- s += `
962
- ${variant.toString(opts)}`;
963
- variantNo++;
964
- }
965
- sideNo++;
1004
+ s += `[CardSet: ${this.configKey}]`;
1005
+ s += `
1006
+ jsonKey: ${this.jsonKey}`;
1007
+ s += `
1008
+ itemType: ${this.itemType}`;
1009
+ for (const side of this.sides) {
1010
+ s += `
1011
+ ${side.toString(opts)}`;
966
1012
  }
967
1013
  return s;
968
1014
  }
@@ -2115,589 +2161,947 @@ import { Enum as Enum2 } from "@ncoderz/superenum";
2115
2161
 
2116
2162
  // src/config/raw/cardSets.ts
2117
2163
  var CARDSETS = {
2118
- [CardSetConfigKey.definitionList]: {
2119
- variants: [
2120
- [
2121
- {
2122
- tags: [
2123
- {
2124
- key: ConfigKey.group_standardItemLeadInstructionHint,
2125
- description: "Standard tags for lead, instruction, and hint."
2126
- },
2127
- {
2128
- key: ConfigKey.property_example,
2129
- description: "Example text for the definition.",
2130
- format: TagFormat.plainText
2131
- },
2132
- {
2133
- key: ConfigKey.tag_title,
2134
- description: "Title of the definition."
2135
- },
2136
- {
2137
- key: ConfigKey.group_resourceIcon,
2138
- description: "Icon resource for the definition."
2139
- }
2140
- ],
2141
- repeatCount: Count.infinity
2142
- }
2143
- ]
2164
+ //
2165
+ // flashcard
2166
+ //
2167
+ [CardSetConfigKey.flashcard]: {
2168
+ jsonKey: "cards",
2169
+ sides: [
2170
+ {
2171
+ name: "question",
2172
+ variants: [
2173
+ {
2174
+ jsonKey: "question.text",
2175
+ tags: [
2176
+ {
2177
+ key: ConfigKey.group_standardTags,
2178
+ description: "Standard tags for the flashcard."
2179
+ },
2180
+ {
2181
+ key: ConfigKey.tag_title,
2182
+ description: "Title of the flashcard."
2183
+ },
2184
+ {
2185
+ key: ConfigKey.group_resourceIcon,
2186
+ description: "Icon resource for the flashcard.",
2187
+ jsonKey: "question.icon"
2188
+ }
2189
+ ]
2190
+ }
2191
+ ]
2192
+ },
2193
+ {
2194
+ name: "answer",
2195
+ variants: [
2196
+ {
2197
+ jsonKey: "answer.text",
2198
+ tags: [
2199
+ {
2200
+ key: ConfigKey.group_standardTags,
2201
+ description: "Standard tags for the flashcard."
2202
+ },
2203
+ {
2204
+ key: ConfigKey.tag_title,
2205
+ description: "Title of the flashcard."
2206
+ },
2207
+ {
2208
+ key: ConfigKey.group_resourceIcon,
2209
+ description: "Icon resource for the flashcard.",
2210
+ jsonKey: "answer.icon"
2211
+ }
2212
+ ]
2213
+ },
2214
+ {
2215
+ jsonKey: "alternativeAnswers[].text",
2216
+ tags: [
2217
+ {
2218
+ key: ConfigKey.group_standardTags,
2219
+ description: "Standard tags for the flashcard."
2220
+ },
2221
+ {
2222
+ key: ConfigKey.tag_title,
2223
+ description: "Title of the flashcard."
2224
+ },
2225
+ {
2226
+ key: ConfigKey.group_resourceIcon,
2227
+ description: "Icon resource for the flashcard."
2228
+ }
2229
+ ],
2230
+ repeatCount: Count.infinity
2231
+ }
2232
+ ]
2233
+ }
2144
2234
  ]
2145
2235
  },
2146
- [CardSetConfigKey.flashcard]: {
2147
- variants: [
2148
- [
2149
- {
2150
- tags: [
2151
- {
2152
- key: ConfigKey.group_standardItemLeadInstructionHint,
2153
- description: "Standard tags for lead, instruction, and hint."
2154
- },
2155
- {
2156
- key: ConfigKey.property_example,
2157
- description: "Example text for the flashcard.",
2158
- format: TagFormat.plainText
2159
- },
2160
- {
2161
- key: ConfigKey.tag_title,
2162
- description: "Title of the flashcard."
2163
- },
2164
- {
2165
- key: ConfigKey.group_resourceIcon,
2166
- description: "Icon resource for the flashcard."
2167
- }
2168
- ],
2169
- repeatCount: Count.infinity
2170
- }
2171
- ]
2236
+ //
2237
+ // definition-list
2238
+ //
2239
+ [CardSetConfigKey.definitionList]: {
2240
+ jsonKey: "definitions",
2241
+ sides: [
2242
+ {
2243
+ name: "term",
2244
+ variants: [
2245
+ {
2246
+ jsonKey: "term.text",
2247
+ tags: [
2248
+ {
2249
+ key: ConfigKey.group_standardTags,
2250
+ description: "Standard tags for the definition."
2251
+ },
2252
+ {
2253
+ key: ConfigKey.tag_title,
2254
+ description: "Title of the definition.",
2255
+ secondaryJsonKey: "heading.forKeys"
2256
+ },
2257
+ {
2258
+ key: ConfigKey.group_resourceIcon,
2259
+ description: "Icon resource for the definition.",
2260
+ jsonKey: "term.icon"
2261
+ }
2262
+ ]
2263
+ }
2264
+ ]
2265
+ },
2266
+ {
2267
+ name: "definition",
2268
+ variants: [
2269
+ {
2270
+ jsonKey: "definition.text",
2271
+ tags: [
2272
+ {
2273
+ key: ConfigKey.group_standardTags,
2274
+ description: "Standard tags for the definition."
2275
+ },
2276
+ {
2277
+ key: ConfigKey.tag_title,
2278
+ description: "Title of the definition.",
2279
+ secondaryJsonKey: "heading.forValues"
2280
+ },
2281
+ {
2282
+ key: ConfigKey.group_resourceIcon,
2283
+ description: "Icon resource for the definition.",
2284
+ jsonKey: "definition.icon"
2285
+ }
2286
+ ]
2287
+ },
2288
+ {
2289
+ jsonKey: "alternativeDefinitions[].text",
2290
+ tags: [
2291
+ {
2292
+ key: ConfigKey.group_standardTags,
2293
+ description: "Standard tags for the definition."
2294
+ },
2295
+ {
2296
+ key: ConfigKey.tag_title,
2297
+ description: "Title of the definition."
2298
+ },
2299
+ {
2300
+ key: ConfigKey.group_resourceIcon,
2301
+ description: "Icon resource for the definition."
2302
+ }
2303
+ ],
2304
+ repeatCount: Count.infinity
2305
+ }
2306
+ ]
2307
+ }
2172
2308
  ]
2173
2309
  },
2174
- [CardSetConfigKey.elements]: {
2175
- variants: [
2176
- [
2177
- {
2178
- tags: [
2179
- {
2180
- key: ConfigKey.group_standardItemLeadInstructionHint,
2181
- description: "Standard tags for lead, instruction, and hint."
2182
- },
2183
- {
2184
- key: ConfigKey.property_example,
2185
- description: "Example text for the element.",
2186
- format: TagFormat.plainText
2187
- }
2188
- ],
2189
- repeatCount: Count.infinity
2190
- }
2191
- ]
2310
+ //
2311
+ // match-pairs
2312
+ //
2313
+ [CardSetConfigKey.matchPairs]: {
2314
+ jsonKey: "pairs",
2315
+ sides: [
2316
+ {
2317
+ name: "key",
2318
+ variants: [
2319
+ {
2320
+ jsonKey: "key",
2321
+ tags: [
2322
+ {
2323
+ key: ConfigKey.group_standardTags,
2324
+ description: "Standard tags for the match pair."
2325
+ },
2326
+ {
2327
+ key: ConfigKey.tag_title,
2328
+ description: "Title of the match pair.",
2329
+ secondaryJsonKey: "heading.forKeys"
2330
+ },
2331
+ {
2332
+ key: ConfigKey.property_isCaseSensitive,
2333
+ description: "Property to indicate if the match is case sensitive.",
2334
+ format: TagFormat.boolean
2335
+ },
2336
+ {
2337
+ key: ConfigKey.resource_audio,
2338
+ description: "Audio resource for the match pair.",
2339
+ jsonKey: "keyAudio"
2340
+ },
2341
+ {
2342
+ key: ConfigKey.resource_image,
2343
+ description: "Image resource for the match pair.",
2344
+ jsonKey: "keyImage"
2345
+ }
2346
+ ]
2347
+ }
2348
+ ]
2349
+ },
2350
+ {
2351
+ name: "values",
2352
+ repeat: true,
2353
+ variants: [
2354
+ {
2355
+ jsonKey: "values[]",
2356
+ tags: [
2357
+ {
2358
+ key: ConfigKey.group_standardTags,
2359
+ description: "Standard tags for the match pair."
2360
+ },
2361
+ {
2362
+ key: ConfigKey.tag_title,
2363
+ description: "Title of the match pair.",
2364
+ secondaryJsonKey: "heading.forValues"
2365
+ },
2366
+ {
2367
+ key: ConfigKey.property_isCaseSensitive,
2368
+ description: "Property to indicate if the match is case sensitive.",
2369
+ format: TagFormat.boolean
2370
+ }
2371
+ ],
2372
+ repeatCount: Count.infinity
2373
+ }
2374
+ ]
2375
+ }
2192
2376
  ]
2193
2377
  },
2194
- [CardSetConfigKey.statements]: {
2195
- variants: [
2196
- [
2197
- {
2198
- tags: [
2199
- {
2200
- key: ConfigKey.tag_true,
2201
- description: "Tag for true statements.",
2202
- maxCount: 1
2203
- },
2204
- {
2205
- key: ConfigKey.tag_false,
2206
- description: "Tag for false statements.",
2207
- maxCount: 1
2208
- },
2209
- {
2210
- key: ConfigKey.group_standardItemLeadInstructionHint,
2211
- description: "Standard tags for lead, instruction, and hint."
2212
- },
2213
- {
2214
- key: ConfigKey.property_example,
2215
- description: "Example text for the statement.",
2216
- format: TagFormat.plainText
2217
- }
2218
- ],
2219
- bodyAllowed: false
2220
- }
2221
- ]
2378
+ //
2379
+ // match-audio-pairs
2380
+ //
2381
+ [CardSetConfigKey.matchAudioPairs]: {
2382
+ jsonKey: "pairs",
2383
+ sides: [
2384
+ {
2385
+ name: "key",
2386
+ variants: [
2387
+ {
2388
+ jsonKey: "key",
2389
+ tags: [
2390
+ {
2391
+ key: ConfigKey.group_standardTags,
2392
+ description: "Standard tags for the audio match pair."
2393
+ },
2394
+ {
2395
+ key: ConfigKey.tag_title,
2396
+ description: "Title of the audio match pair.",
2397
+ secondaryJsonKey: "heading.forKeys"
2398
+ },
2399
+ {
2400
+ key: ConfigKey.resource_audio,
2401
+ description: "Audio resource for the match pair.",
2402
+ jsonKey: "keyAudio"
2403
+ }
2404
+ ]
2405
+ }
2406
+ ]
2407
+ },
2408
+ {
2409
+ name: "values",
2410
+ repeat: true,
2411
+ variants: [
2412
+ {
2413
+ jsonKey: "values[]",
2414
+ tags: [
2415
+ {
2416
+ key: ConfigKey.group_standardTags,
2417
+ description: "Standard tags for the audio match pair."
2418
+ },
2419
+ {
2420
+ key: ConfigKey.tag_title,
2421
+ description: "Title of the audio match pair.",
2422
+ secondaryJsonKey: "heading.forValues"
2423
+ },
2424
+ {
2425
+ key: ConfigKey.resource_audio,
2426
+ description: "Audio resource for the match pair."
2427
+ }
2428
+ ],
2429
+ repeatCount: Count.infinity
2430
+ }
2431
+ ]
2432
+ }
2222
2433
  ]
2223
2434
  },
2224
- [CardSetConfigKey.quiz]: {
2225
- variants: [
2226
- [
2227
- {
2228
- tags: [
2229
- {
2230
- key: ConfigKey.group_trueFalse,
2231
- description: "Group for true/false questions."
2232
- },
2233
- {
2234
- key: ConfigKey.group_standardItemLeadInstructionHint,
2235
- description: "Standard tags for lead, instruction, and hint."
2236
- },
2237
- {
2238
- key: ConfigKey.property_example,
2239
- description: "Example text for the quiz question.",
2240
- format: TagFormat.plainText
2241
- }
2242
- ],
2243
- bodyAllowed: false
2244
- }
2245
- ]
2435
+ //
2436
+ // match-image-pairs
2437
+ //
2438
+ [CardSetConfigKey.matchImagePairs]: {
2439
+ jsonKey: "pairs",
2440
+ sides: [
2441
+ {
2442
+ name: "key",
2443
+ variants: [
2444
+ {
2445
+ jsonKey: "key",
2446
+ tags: [
2447
+ {
2448
+ key: ConfigKey.group_standardTags,
2449
+ description: "Standard tags for the image match pair."
2450
+ },
2451
+ {
2452
+ key: ConfigKey.tag_title,
2453
+ description: "Title of the image match pair.",
2454
+ secondaryJsonKey: "heading.forKeys"
2455
+ },
2456
+ {
2457
+ key: ConfigKey.resource_image,
2458
+ description: "Image resource for the match pair.",
2459
+ jsonKey: "keyImage"
2460
+ }
2461
+ ]
2462
+ }
2463
+ ]
2464
+ },
2465
+ {
2466
+ name: "values",
2467
+ repeat: true,
2468
+ variants: [
2469
+ {
2470
+ jsonKey: "values[]",
2471
+ tags: [
2472
+ {
2473
+ key: ConfigKey.group_standardTags,
2474
+ description: "Standard tags for the image match pair."
2475
+ },
2476
+ {
2477
+ key: ConfigKey.tag_title,
2478
+ description: "Title of the image match pair.",
2479
+ secondaryJsonKey: "heading.forValues"
2480
+ },
2481
+ {
2482
+ key: ConfigKey.resource_image,
2483
+ description: "Image resource for the match pair."
2484
+ }
2485
+ ],
2486
+ repeatCount: Count.infinity
2487
+ }
2488
+ ]
2489
+ }
2246
2490
  ]
2247
2491
  },
2248
- [CardSetConfigKey.feedback]: {
2249
- variants: [
2250
- // Side 1
2251
- [
2252
- // Variant 1..N
2253
- {
2254
- tags: [
2255
- {
2256
- key: ConfigKey.group_standardItemLeadInstructionHint,
2257
- description: "Standard tags for lead, instruction, and hint."
2258
- },
2259
- {
2260
- key: ConfigKey.group_trueFalse,
2261
- description: "Group for true/false feedback."
2262
- },
2263
- {
2264
- key: ConfigKey.tag_title,
2265
- description: "Title of the feedback."
2266
- }
2267
- ],
2268
- bodyAllowed: false
2269
- }
2270
- ],
2271
- // Side 2
2272
- [
2273
- // Variant 1..N
2274
- {
2275
- tags: [
2276
- {
2277
- key: ConfigKey.group_standardItemLeadInstructionHint,
2278
- description: "Standard tags for lead, instruction, and hint."
2279
- },
2280
- {
2281
- key: ConfigKey.property_reasonableNumOfChars,
2282
- description: "Property for reasonable number of characters.",
2283
- format: TagFormat.number
2284
- },
2285
- {
2286
- key: ConfigKey.property_example,
2287
- description: "Example text for the feedback.",
2288
- format: TagFormat.plainText
2289
- },
2290
- {
2291
- key: ConfigKey.tag_title,
2292
- description: "Title of the feedback."
2293
- }
2294
- ],
2295
- bodyAllowed: true
2296
- }
2297
- ]
2492
+ //
2493
+ // match-matrix
2494
+ //
2495
+ [CardSetConfigKey.matchMatrix]: {
2496
+ jsonKey: "matrix",
2497
+ sides: [
2498
+ {
2499
+ name: "key",
2500
+ variants: [
2501
+ {
2502
+ jsonKey: "key",
2503
+ tags: [
2504
+ {
2505
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2506
+ description: "Standard tags for lead, instruction, and hint."
2507
+ },
2508
+ {
2509
+ key: ConfigKey.property_example,
2510
+ description: "Example text for the match matrix.",
2511
+ format: TagFormat.plainText
2512
+ },
2513
+ {
2514
+ key: ConfigKey.tag_title,
2515
+ description: "Title of the match matrix.",
2516
+ secondaryJsonKey: "heading.forKeys"
2517
+ },
2518
+ {
2519
+ key: ConfigKey.property_isCaseSensitive,
2520
+ description: "Property to indicate if the match is case sensitive.",
2521
+ format: TagFormat.boolean
2522
+ }
2523
+ ]
2524
+ }
2525
+ ]
2526
+ },
2527
+ {
2528
+ name: "cell",
2529
+ repeat: true,
2530
+ variants: [
2531
+ {
2532
+ jsonKey: "cells[{s}].values[]",
2533
+ tags: [
2534
+ {
2535
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2536
+ description: "Standard tags for lead, instruction, and hint."
2537
+ },
2538
+ {
2539
+ key: ConfigKey.property_example,
2540
+ description: "Example text for the match matrix.",
2541
+ format: TagFormat.plainText
2542
+ },
2543
+ {
2544
+ key: ConfigKey.tag_title,
2545
+ description: "Title of the match matrix.",
2546
+ secondaryJsonKey: "heading.forValues"
2547
+ },
2548
+ {
2549
+ key: ConfigKey.property_isCaseSensitive,
2550
+ description: "Property to indicate if the match is case sensitive.",
2551
+ format: TagFormat.boolean
2552
+ }
2553
+ ],
2554
+ repeatCount: Count.infinity
2555
+ }
2556
+ ]
2557
+ }
2298
2558
  ]
2299
2559
  },
2300
- [CardSetConfigKey.questions]: {
2301
- variants: [
2302
- [
2303
- {
2304
- tags: [
2305
- {
2306
- key: ConfigKey.property_reasonableNumOfChars,
2307
- description: "Property for reasonable number of characters.",
2308
- format: TagFormat.number
2309
- },
2310
- {
2311
- key: ConfigKey.tag_sampleSolution,
2312
- description: "Sample solution for the question."
2313
- },
2314
- {
2315
- key: ConfigKey.property_sampleSolution,
2316
- description: "Property for sample solution text.",
2317
- format: TagFormat.plainText
2318
- },
2319
- {
2320
- key: ConfigKey.property_additionalSolutions,
2321
- description: "Property for additional solutions.",
2322
- format: TagFormat.plainText,
2323
- maxCount: Count.infinity
2324
- },
2325
- {
2326
- key: ConfigKey.property_partialAnswer,
2327
- description: "Property for partial answer text.",
2328
- format: TagFormat.plainText
2329
- },
2330
- {
2331
- key: ConfigKey.group_standardItemLeadInstructionHint,
2332
- description: "Standard tags for lead, instruction, and hint."
2333
- },
2334
- {
2335
- key: ConfigKey.property_example,
2336
- description: "Example text for the question.",
2337
- format: TagFormat.plainText
2338
- }
2339
- ],
2340
- repeatCount: Count.infinity
2341
- }
2342
- ]
2560
+ //
2561
+ // statements
2562
+ //
2563
+ [CardSetConfigKey.statements]: {
2564
+ jsonKey: "statements",
2565
+ sides: [
2566
+ {
2567
+ name: "statement",
2568
+ variants: [
2569
+ {
2570
+ jsonKey: "statement",
2571
+ tags: [
2572
+ {
2573
+ key: ConfigKey.tag_true,
2574
+ description: "Tag for true statements.",
2575
+ maxCount: 1
2576
+ },
2577
+ {
2578
+ key: ConfigKey.tag_false,
2579
+ description: "Tag for false statements.",
2580
+ maxCount: 1
2581
+ },
2582
+ {
2583
+ key: ConfigKey.group_standardTags,
2584
+ description: "Standard tags for the statement."
2585
+ }
2586
+ ],
2587
+ bodyAllowed: false
2588
+ }
2589
+ ]
2590
+ }
2343
2591
  ]
2344
2592
  },
2345
- // matchPairs
2346
- // TODO: We actually need to allow for different card configurations, because titles are valid on the first card only.
2347
- // For now we allow them to be valid on all cards, but we need to change this.
2348
- [CardSetConfigKey.matchPairs]: {
2349
- variants: [
2350
- // Side 1
2351
- [
2352
- // Variant 1..N
2353
- {
2354
- tags: [
2355
- {
2356
- key: ConfigKey.group_standardItemLeadInstructionHint,
2357
- description: "Standard tags for lead, instruction, and hint."
2358
- },
2359
- {
2360
- key: ConfigKey.property_example,
2361
- description: "Example text for the match pair.",
2362
- format: TagFormat.plainText
2363
- },
2364
- {
2365
- key: ConfigKey.tag_title,
2366
- description: "Title of the match pair."
2367
- },
2368
- {
2369
- key: ConfigKey.property_isCaseSensitive,
2370
- description: "Property to indicate if the match is case sensitive.",
2371
- format: TagFormat.boolean
2372
- }
2373
- ],
2374
- repeatCount: Count.infinity
2375
- }
2376
- ]
2593
+ //
2594
+ // quiz
2595
+ //
2596
+ [CardSetConfigKey.quiz]: {
2597
+ jsonKey: "quizzes",
2598
+ sides: [
2599
+ {
2600
+ name: "choices",
2601
+ variants: [
2602
+ {
2603
+ jsonKey: null,
2604
+ tags: [
2605
+ {
2606
+ key: ConfigKey.group_trueFalse,
2607
+ description: "Group for true/false questions."
2608
+ },
2609
+ {
2610
+ key: ConfigKey.group_standardTags,
2611
+ description: "Standard tags for the quiz."
2612
+ }
2613
+ ],
2614
+ bodyAllowed: false
2615
+ }
2616
+ ]
2617
+ }
2377
2618
  ]
2378
2619
  },
2379
- [CardSetConfigKey.matchAudioPairs]: {
2380
- variants: [
2381
- // Side 1
2382
- [
2383
- // Variant 1..N
2384
- {
2385
- tags: [
2386
- {
2387
- key: ConfigKey.group_standardItemLeadInstructionHint,
2388
- description: "Standard tags for lead, instruction, and hint."
2389
- },
2390
- {
2391
- key: ConfigKey.property_example,
2392
- description: "Example text for the audio match pair.",
2393
- format: TagFormat.plainText
2394
- },
2395
- {
2396
- key: ConfigKey.tag_title,
2397
- description: "Title of the audio match pair."
2398
- },
2399
- {
2400
- key: ConfigKey.resource_audio,
2401
- description: "Audio resource for the match pair."
2402
- }
2403
- ],
2404
- repeatCount: Count.infinity
2405
- }
2406
- ]
2620
+ //
2621
+ // feedback
2622
+ //
2623
+ [CardSetConfigKey.feedback]: {
2624
+ jsonKey: "feedbacks",
2625
+ sides: [
2626
+ {
2627
+ name: "choices",
2628
+ variants: [
2629
+ {
2630
+ jsonKey: null,
2631
+ tags: [
2632
+ {
2633
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2634
+ description: "Standard tags for lead, instruction, and hint."
2635
+ },
2636
+ {
2637
+ key: ConfigKey.group_trueFalse,
2638
+ description: "Group for true/false feedback."
2639
+ },
2640
+ {
2641
+ key: ConfigKey.tag_title,
2642
+ description: "Title of the feedback.",
2643
+ secondaryJsonKey: "heading.forKeys"
2644
+ }
2645
+ ],
2646
+ bodyAllowed: false
2647
+ }
2648
+ ]
2649
+ },
2650
+ {
2651
+ name: "reason",
2652
+ variants: [
2653
+ {
2654
+ jsonKey: "reason.text",
2655
+ tags: [
2656
+ {
2657
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2658
+ description: "Standard tags for lead, instruction, and hint."
2659
+ },
2660
+ {
2661
+ key: ConfigKey.property_reasonableNumOfChars,
2662
+ description: "Property for reasonable number of characters.",
2663
+ format: TagFormat.number
2664
+ },
2665
+ {
2666
+ key: ConfigKey.property_example,
2667
+ description: "Example text for the feedback.",
2668
+ format: TagFormat.plainText
2669
+ },
2670
+ {
2671
+ key: ConfigKey.tag_title,
2672
+ description: "Title of the feedback.",
2673
+ secondaryJsonKey: "heading.forValues"
2674
+ }
2675
+ ],
2676
+ bodyAllowed: true
2677
+ }
2678
+ ]
2679
+ }
2407
2680
  ]
2408
2681
  },
2409
- [CardSetConfigKey.matchImagePairs]: {
2410
- variants: [
2411
- // Side 1
2412
- [
2413
- // Variant 1..N
2414
- {
2415
- tags: [
2416
- {
2417
- key: ConfigKey.group_standardItemLeadInstructionHint,
2418
- description: "Standard tags for lead, instruction, and hint."
2419
- },
2420
- {
2421
- key: ConfigKey.property_example,
2422
- description: "Example text for the image match pair.",
2423
- format: TagFormat.plainText
2424
- },
2425
- {
2426
- key: ConfigKey.tag_title,
2427
- description: "Title of the image match pair."
2428
- },
2429
- {
2430
- key: ConfigKey.resource_image,
2431
- description: "Image resource for the match pair."
2432
- }
2433
- ],
2434
- repeatCount: Count.infinity
2435
- }
2436
- ]
2682
+ //
2683
+ // questions
2684
+ //
2685
+ [CardSetConfigKey.questions]: {
2686
+ jsonKey: "questions",
2687
+ sides: [
2688
+ {
2689
+ name: "question",
2690
+ variants: [
2691
+ {
2692
+ jsonKey: "question",
2693
+ tags: [
2694
+ {
2695
+ key: ConfigKey.property_reasonableNumOfChars,
2696
+ description: "Property for reasonable number of characters.",
2697
+ format: TagFormat.number
2698
+ },
2699
+ {
2700
+ key: ConfigKey.tag_sampleSolution,
2701
+ description: "Sample solution for the question."
2702
+ },
2703
+ {
2704
+ key: ConfigKey.property_sampleSolution,
2705
+ description: "Property for sample solution text.",
2706
+ format: TagFormat.plainText
2707
+ },
2708
+ {
2709
+ key: ConfigKey.property_additionalSolutions,
2710
+ description: "Property for additional solutions.",
2711
+ format: TagFormat.plainText,
2712
+ maxCount: Count.infinity
2713
+ },
2714
+ {
2715
+ key: ConfigKey.property_partialAnswer,
2716
+ description: "Property for partial answer text.",
2717
+ format: TagFormat.plainText
2718
+ },
2719
+ {
2720
+ key: ConfigKey.group_standardTags,
2721
+ description: "Standard tags for the question."
2722
+ }
2723
+ ]
2724
+ }
2725
+ ]
2726
+ }
2437
2727
  ]
2438
2728
  },
2439
- [CardSetConfigKey.matchMatrix]: {
2440
- variants: [
2441
- // Side 1
2442
- [
2443
- // Variant 1..N
2444
- {
2445
- tags: [
2446
- {
2447
- key: ConfigKey.group_standardItemLeadInstructionHint,
2448
- description: "Standard tags for lead, instruction, and hint."
2449
- },
2450
- {
2451
- key: ConfigKey.property_example,
2452
- description: "Example text for the match matrix.",
2453
- format: TagFormat.plainText
2454
- },
2455
- {
2456
- key: ConfigKey.tag_title,
2457
- description: "Title of the match matrix."
2458
- },
2459
- {
2460
- key: ConfigKey.property_isCaseSensitive,
2461
- description: "Property to indicate if the match is case sensitive.",
2462
- format: TagFormat.boolean
2463
- }
2464
- ],
2465
- repeatCount: Count.infinity
2466
- }
2467
- ]
2729
+ //
2730
+ // elements
2731
+ //
2732
+ [CardSetConfigKey.elements]: {
2733
+ jsonKey: null,
2734
+ sides: [
2735
+ {
2736
+ name: "element",
2737
+ repeat: true,
2738
+ variants: [
2739
+ {
2740
+ jsonKey: "elements[]",
2741
+ tags: [
2742
+ {
2743
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2744
+ description: "Standard tags for lead, instruction, and hint."
2745
+ },
2746
+ {
2747
+ key: ConfigKey.property_example,
2748
+ description: "Example text for the element.",
2749
+ format: TagFormat.plainText
2750
+ }
2751
+ ],
2752
+ repeatCount: Count.infinity
2753
+ }
2754
+ ]
2755
+ }
2468
2756
  ]
2469
2757
  },
2758
+ //
2759
+ // table
2760
+ //
2470
2761
  [CardSetConfigKey.table]: {
2471
- variants: [
2472
- // Side 1
2473
- [
2474
- // Variant 1..N
2475
- {
2476
- tags: [
2477
- {
2478
- key: ConfigKey.group_standardItemLeadInstructionHint,
2479
- description: "Standard tags for lead, instruction, and hint."
2480
- },
2481
- {
2482
- key: ConfigKey.tag_title,
2483
- description: "Title of the table."
2484
- },
2485
- {
2486
- key: ConfigKey.property_tableCellType,
2487
- description: "Table cell type (th/td).",
2488
- format: TagFormat.plainText
2489
- },
2490
- {
2491
- key: ConfigKey.property_tableRowSpan,
2492
- description: "Number of rows the cell spans.",
2493
- format: TagFormat.number
2494
- },
2495
- {
2496
- key: ConfigKey.property_tableColSpan,
2497
- description: "Number of columns the cell spans.",
2498
- format: TagFormat.number
2499
- },
2500
- {
2501
- key: ConfigKey.property_tableScope,
2502
- description: "Scope attribute for header cells.",
2503
- format: TagFormat.plainText
2504
- }
2505
- ],
2506
- repeatCount: Count.infinity
2507
- }
2508
- ]
2762
+ jsonKey: "table.data",
2763
+ itemType: "array",
2764
+ sides: [
2765
+ {
2766
+ name: "cell",
2767
+ repeat: true,
2768
+ variants: [
2769
+ {
2770
+ jsonKey: null,
2771
+ tags: [
2772
+ {
2773
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2774
+ description: "Standard tags for lead, instruction, and hint."
2775
+ },
2776
+ {
2777
+ key: ConfigKey.tag_title,
2778
+ description: "Title of the table.",
2779
+ secondaryJsonKey: "table.columns[]"
2780
+ },
2781
+ {
2782
+ key: ConfigKey.property_tableCellType,
2783
+ description: "Table cell type (th/td).",
2784
+ format: TagFormat.plainText
2785
+ },
2786
+ {
2787
+ key: ConfigKey.property_tableRowSpan,
2788
+ description: "Number of rows the cell spans.",
2789
+ format: TagFormat.number
2790
+ },
2791
+ {
2792
+ key: ConfigKey.property_tableColSpan,
2793
+ description: "Number of columns the cell spans.",
2794
+ format: TagFormat.number
2795
+ },
2796
+ {
2797
+ key: ConfigKey.property_tableScope,
2798
+ description: "Scope attribute for header cells.",
2799
+ format: TagFormat.plainText
2800
+ }
2801
+ ],
2802
+ repeatCount: Count.infinity
2803
+ }
2804
+ ]
2805
+ }
2806
+ ]
2807
+ },
2808
+ //
2809
+ // table-extended
2810
+ //
2811
+ [CardSetConfigKey.tableExtended]: {
2812
+ jsonKey: null,
2813
+ sections: {
2814
+ default: { jsonKey: "tableExtended.body.rows" },
2815
+ "table-header": { jsonKey: "tableExtended.header.rows" },
2816
+ "table-footer": { jsonKey: "tableExtended.footer.rows" }
2817
+ },
2818
+ sides: [
2819
+ {
2820
+ name: "cell",
2821
+ repeat: true,
2822
+ variants: [
2823
+ {
2824
+ jsonKey: "content",
2825
+ tags: [
2826
+ {
2827
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2828
+ description: "Standard tags for lead, instruction, and hint."
2829
+ },
2830
+ {
2831
+ key: ConfigKey.tag_title,
2832
+ description: "Title of the table cell."
2833
+ },
2834
+ {
2835
+ key: ConfigKey.property_tableCellType,
2836
+ description: "Table cell type (th/td).",
2837
+ format: TagFormat.plainText
2838
+ },
2839
+ {
2840
+ key: ConfigKey.property_tableRowSpan,
2841
+ description: "Number of rows the cell spans.",
2842
+ format: TagFormat.number
2843
+ },
2844
+ {
2845
+ key: ConfigKey.property_tableColSpan,
2846
+ description: "Number of columns the cell spans.",
2847
+ format: TagFormat.number
2848
+ },
2849
+ {
2850
+ key: ConfigKey.property_tableScope,
2851
+ description: "Scope attribute for header cells.",
2852
+ format: TagFormat.plainText
2853
+ }
2854
+ ],
2855
+ repeatCount: Count.infinity
2856
+ }
2857
+ ]
2858
+ }
2509
2859
  ]
2510
2860
  },
2861
+ //
2862
+ // pronunciation-table
2863
+ //
2511
2864
  [CardSetConfigKey.pronunciationTable]: {
2512
- variants: [
2513
- // Side 1
2514
- [
2515
- // Variant 1..N
2516
- {
2517
- tags: [
2518
- {
2519
- key: ConfigKey.group_standardItemLeadInstructionHint,
2520
- description: "Standard tags for lead, instruction, and hint."
2521
- },
2522
- {
2523
- key: ConfigKey.tag_title,
2524
- description: "Title of the pronunciation table."
2525
- },
2526
- {
2527
- key: ConfigKey.resource_audio,
2528
- description: "Audio resource for the pronunciation table."
2529
- }
2530
- ],
2531
- repeatCount: Count.infinity
2532
- }
2533
- ]
2865
+ jsonKey: "pronunciationTable.data",
2866
+ itemType: "array",
2867
+ sides: [
2868
+ {
2869
+ name: "cell",
2870
+ repeat: true,
2871
+ variants: [
2872
+ {
2873
+ jsonKey: "body",
2874
+ tags: [
2875
+ {
2876
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2877
+ description: "Standard tags for lead, instruction, and hint."
2878
+ },
2879
+ {
2880
+ key: ConfigKey.tag_title,
2881
+ description: "Title of the pronunciation table."
2882
+ },
2883
+ {
2884
+ key: ConfigKey.resource_audio,
2885
+ description: "Audio resource for the pronunciation table.",
2886
+ jsonKey: "audio"
2887
+ }
2888
+ ],
2889
+ repeatCount: Count.infinity
2890
+ }
2891
+ ]
2892
+ }
2534
2893
  ]
2535
2894
  },
2895
+ //
2896
+ // bot-action-responses
2897
+ //
2536
2898
  [CardSetConfigKey.botActionResponses]: {
2537
- variants: [
2538
- [
2539
- {
2540
- tags: [
2541
- {
2542
- key: ConfigKey.property_reaction,
2543
- description: "Reaction to the bot action.",
2544
- format: TagFormat.plainText
2545
- },
2546
- {
2547
- key: ConfigKey.group_standardItemLeadInstructionHint,
2548
- description: "Standard tags for lead, instruction, and hint."
2549
- },
2550
- {
2551
- key: ConfigKey.property_example,
2552
- description: "Example text for the bot action response.",
2553
- format: TagFormat.plainText
2554
- }
2555
- ]
2556
- }
2557
- ]
2899
+ jsonKey: "responses",
2900
+ sides: [
2901
+ {
2902
+ name: "response",
2903
+ variants: [
2904
+ {
2905
+ jsonKey: "feedback",
2906
+ tags: [
2907
+ {
2908
+ key: ConfigKey.property_reaction,
2909
+ description: "Reaction to the bot action.",
2910
+ format: TagFormat.plainText
2911
+ },
2912
+ {
2913
+ key: ConfigKey.tag_item,
2914
+ description: "The item for the bot action response.",
2915
+ chain: [
2916
+ {
2917
+ key: ConfigKey.tag_item,
2918
+ description: "The lead, page number, source page number, and margin number.",
2919
+ maxCount: 4
2920
+ }
2921
+ ]
2922
+ },
2923
+ {
2924
+ key: ConfigKey.tag_instruction,
2925
+ description: "The response label for the bot action.",
2926
+ jsonKey: "response"
2927
+ },
2928
+ {
2929
+ key: ConfigKey.property_example,
2930
+ description: "Example text for the bot action response.",
2931
+ format: TagFormat.plainText
2932
+ }
2933
+ ]
2934
+ }
2935
+ ]
2936
+ }
2558
2937
  ]
2559
2938
  },
2939
+ //
2940
+ // cloze-list
2941
+ //
2560
2942
  [CardSetConfigKey.clozeList]: {
2561
- variants: [
2562
- [
2563
- {
2564
- tags: [
2565
- {
2566
- key: ConfigKey.group_standardTags,
2567
- description: "Standard tags for cloze items."
2568
- },
2569
- {
2570
- key: ConfigKey.group_gap,
2571
- description: "Group for gap tags in cloze items."
2572
- }
2573
- ]
2574
- }
2575
- ]
2943
+ jsonKey: "listItems",
2944
+ sides: [
2945
+ {
2946
+ name: "content",
2947
+ variants: [
2948
+ {
2949
+ jsonKey: "body",
2950
+ tags: [
2951
+ {
2952
+ key: ConfigKey.group_standardTags,
2953
+ description: "Standard tags for cloze items."
2954
+ },
2955
+ {
2956
+ key: ConfigKey.group_gap,
2957
+ description: "Group for gap tags in cloze items."
2958
+ }
2959
+ ]
2960
+ }
2961
+ ]
2962
+ }
2576
2963
  ]
2577
2964
  },
2965
+ //
2966
+ // example-bit-list
2967
+ //
2578
2968
  [CardSetConfigKey.exampleBitList]: {
2579
- variants: [
2580
- [
2581
- {
2582
- tags: [
2583
- {
2584
- key: ConfigKey.group_standardTags,
2585
- description: "Standard tags for example bits."
2586
- },
2587
- {
2588
- key: ConfigKey.tag_title,
2589
- description: "Title of the example bit."
2590
- }
2591
- ],
2592
- repeatCount: Count.infinity
2593
- }
2594
- ]
2969
+ jsonKey: "listItems",
2970
+ sides: [
2971
+ {
2972
+ name: "item",
2973
+ variants: [
2974
+ {
2975
+ jsonKey: "body",
2976
+ tags: [
2977
+ {
2978
+ key: ConfigKey.group_standardTags,
2979
+ description: "Standard tags for example bits."
2980
+ },
2981
+ {
2982
+ key: ConfigKey.tag_title,
2983
+ description: "Title of the example bit."
2984
+ }
2985
+ ]
2986
+ }
2987
+ ]
2988
+ }
2595
2989
  ]
2596
2990
  },
2991
+ //
2992
+ // ingredients
2993
+ //
2597
2994
  [CardSetConfigKey.ingredients]: {
2598
- variants: [
2599
- [
2600
- {
2601
- tags: [
2602
- {
2603
- key: ConfigKey.tag_title,
2604
- description: "Title of the ingredient."
2605
- },
2606
- {
2607
- key: ConfigKey.group_trueFalse,
2608
- description: "Group for true/false properties of the ingredient."
2609
- },
2610
- {
2611
- key: ConfigKey.group_standardItemLeadInstructionHint,
2612
- description: "Standard tags for lead, instruction, and hint."
2613
- },
2614
- {
2615
- key: ConfigKey.property_unit,
2616
- description: "Unit of measurement for the ingredient.",
2617
- format: TagFormat.plainText
2618
- },
2619
- {
2620
- key: ConfigKey.property_unitAbbr,
2621
- description: "Abbreviation for the unit of measurement.",
2622
- format: TagFormat.plainText
2623
- },
2624
- {
2625
- key: ConfigKey.property_decimalPlaces,
2626
- description: "Number of decimal places for the ingredient quantity.",
2627
- format: TagFormat.number,
2628
- defaultValue: "1"
2629
- },
2630
- {
2631
- key: ConfigKey.property_disableCalculation,
2632
- description: "Disable calculation for the ingredient.",
2633
- format: TagFormat.boolean
2634
- }
2635
- ],
2636
- repeatCount: Count.infinity
2637
- }
2638
- ]
2995
+ jsonKey: "ingredients",
2996
+ sides: [
2997
+ {
2998
+ name: "ingredient",
2999
+ variants: [
3000
+ {
3001
+ jsonKey: "ingredient",
3002
+ tags: [
3003
+ {
3004
+ key: ConfigKey.tag_title,
3005
+ description: "Title of the ingredient."
3006
+ },
3007
+ {
3008
+ key: ConfigKey.group_trueFalse,
3009
+ description: "Group for true/false properties of the ingredient."
3010
+ },
3011
+ {
3012
+ key: ConfigKey.tag_item,
3013
+ description: "The item for the ingredient.",
3014
+ chain: [
3015
+ {
3016
+ key: ConfigKey.tag_item,
3017
+ description: "Lead, page number, source page number, and margin number.",
3018
+ maxCount: 4
3019
+ }
3020
+ ]
3021
+ },
3022
+ {
3023
+ key: ConfigKey.tag_instruction,
3024
+ description: "The quantity of the ingredient.",
3025
+ jsonKey: "quantity"
3026
+ },
3027
+ {
3028
+ key: ConfigKey.tag_hint,
3029
+ description: "The hint for the ingredient."
3030
+ },
3031
+ {
3032
+ key: ConfigKey.property_unit,
3033
+ description: "Unit of measurement for the ingredient.",
3034
+ format: TagFormat.plainText
3035
+ },
3036
+ {
3037
+ key: ConfigKey.property_unitAbbr,
3038
+ description: "Abbreviation for the unit of measurement.",
3039
+ format: TagFormat.plainText
3040
+ },
3041
+ {
3042
+ key: ConfigKey.property_decimalPlaces,
3043
+ description: "Number of decimal places for the ingredient quantity.",
3044
+ format: TagFormat.number,
3045
+ defaultValue: "1"
3046
+ },
3047
+ {
3048
+ key: ConfigKey.property_disableCalculation,
3049
+ description: "Disable calculation for the ingredient.",
3050
+ format: TagFormat.boolean
3051
+ }
3052
+ ]
3053
+ }
3054
+ ]
3055
+ }
2639
3056
  ]
2640
3057
  },
2641
- // DEPRECATED - TO BE REMOVED IN THE FUTURE
2642
- // [CardSetConfigKey._captionDefinitionsList]: {
2643
- // variants: [
2644
- // // Side 1
2645
- // [
2646
- // // Variant 1..N
2647
- // {
2648
- // tags: [
2649
- // {
2650
- // type: BitTagType.tag,
2651
- // configKey: TagConfigKey.title,
2652
- // },
2653
- // ],
2654
- // repeatCount: Count.infinity,
2655
- // },
2656
- // ],
2657
- // ],
2658
- // },
3058
+ //
3059
+ // book-reference-list
3060
+ //
2659
3061
  [CardSetConfigKey.bookReferenceList]: {
2660
- variants: [
2661
- // Side 1
2662
- [
2663
- // Variant 1..N
2664
- {
2665
- tags: [
2666
- {
2667
- key: ConfigKey.group_standardTags,
2668
- description: "Standard tags for book references."
2669
- },
2670
- {
2671
- key: ConfigKey.property_refAuthor,
2672
- description: "Author of the book.",
2673
- format: TagFormat.plainText,
2674
- maxCount: Count.infinity
2675
- },
2676
- {
2677
- key: ConfigKey.property_refBookTitle,
2678
- description: "Title of the book.",
2679
- format: TagFormat.plainText
2680
- },
2681
- {
2682
- key: ConfigKey.property_refPublisher,
2683
- description: "Publisher of the book.",
2684
- format: TagFormat.plainText,
2685
- maxCount: Count.infinity
2686
- },
2687
- {
2688
- key: ConfigKey.property_refPublicationYear,
2689
- description: "Year of publication of the book.",
2690
- format: TagFormat.plainText
2691
- },
2692
- {
2693
- key: ConfigKey.property_citationStyle,
2694
- description: "Citation style for the book reference.",
2695
- format: TagFormat.plainText
2696
- }
2697
- ],
2698
- repeatCount: Count.infinity
2699
- }
2700
- ]
3062
+ jsonKey: "bookReferences",
3063
+ sides: [
3064
+ {
3065
+ name: "reference",
3066
+ variants: [
3067
+ {
3068
+ jsonKey: null,
3069
+ tags: [
3070
+ {
3071
+ key: ConfigKey.group_standardTags,
3072
+ description: "Standard tags for book references."
3073
+ },
3074
+ {
3075
+ key: ConfigKey.property_refAuthor,
3076
+ description: "Author of the book.",
3077
+ format: TagFormat.plainText,
3078
+ maxCount: Count.infinity
3079
+ },
3080
+ {
3081
+ key: ConfigKey.property_refBookTitle,
3082
+ description: "Title of the book.",
3083
+ format: TagFormat.plainText
3084
+ },
3085
+ {
3086
+ key: ConfigKey.property_refPublisher,
3087
+ description: "Publisher of the book.",
3088
+ format: TagFormat.plainText,
3089
+ maxCount: Count.infinity
3090
+ },
3091
+ {
3092
+ key: ConfigKey.property_refPublicationYear,
3093
+ description: "Year of publication of the book.",
3094
+ format: TagFormat.plainText
3095
+ },
3096
+ {
3097
+ key: ConfigKey.property_citationStyle,
3098
+ description: "Citation style for the book reference.",
3099
+ format: TagFormat.plainText
3100
+ }
3101
+ ]
3102
+ }
3103
+ ]
3104
+ }
2701
3105
  ]
2702
3106
  }
2703
3107
  };
@@ -4363,20 +4767,34 @@ var ConfigHydrator = class {
4363
4767
  if (!_cardSet) return void 0;
4364
4768
  const _cardSetConfig = CARDSETS[_cardSet];
4365
4769
  if (!_cardSetConfig) throw new Error(`No config found for card set config key '${_cardSet}'`);
4366
- const variants = [];
4367
- for (const _variants of _cardSetConfig.variants) {
4770
+ const sides = [];
4771
+ for (const _side of _cardSetConfig.sides) {
4368
4772
  const variantsOfSide = [];
4369
- for (const _variant of _variants) {
4773
+ for (const _variant of _side.variants) {
4370
4774
  const v = this.hydrateCardVariantConfig(_variant);
4371
4775
  variantsOfSide.push(v);
4372
4776
  }
4373
- variants.push(variantsOfSide);
4777
+ const sideConfig = new CardSideConfig(_side.name, _side.repeat ?? false, variantsOfSide);
4778
+ sides.push(sideConfig);
4374
4779
  }
4375
- const cardSetConfig = new CardSetConfig(_cardSet, variants);
4780
+ const cardSetConfig = new CardSetConfig(
4781
+ _cardSet,
4782
+ _cardSetConfig.jsonKey,
4783
+ _cardSetConfig.itemType ?? "object",
4784
+ _cardSetConfig.sections,
4785
+ sides
4786
+ );
4376
4787
  return cardSetConfig;
4377
4788
  }
4378
4789
  hydrateTagConfig(_tag) {
4379
- const { key: _configKey, maxCount, minCount, chain: _chain, deprecated } = _tag;
4790
+ const {
4791
+ key: _configKey,
4792
+ maxCount,
4793
+ minCount,
4794
+ chain: _chain,
4795
+ secondaryJsonKey,
4796
+ deprecated
4797
+ } = _tag;
4380
4798
  const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4381
4799
  if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
4382
4800
  const tag = Enum2(Tag).fromValue(configKey);
@@ -4391,6 +4809,7 @@ var ConfigHydrator = class {
4391
4809
  maxCount: maxCount ?? MAX_COUNT_DEFAULT,
4392
4810
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4393
4811
  chain,
4812
+ secondaryJsonKey,
4394
4813
  deprecated
4395
4814
  });
4396
4815
  return {
@@ -4409,7 +4828,8 @@ var ConfigHydrator = class {
4409
4828
  format,
4410
4829
  values,
4411
4830
  defaultValue,
4412
- jsonKey
4831
+ jsonKey,
4832
+ secondaryJsonKey
4413
4833
  } = _tag;
4414
4834
  const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4415
4835
  if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
@@ -4425,6 +4845,7 @@ var ConfigHydrator = class {
4425
4845
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4426
4846
  chain,
4427
4847
  jsonKey,
4848
+ secondaryJsonKey,
4428
4849
  format,
4429
4850
  values,
4430
4851
  defaultValue,
@@ -4437,7 +4858,15 @@ var ConfigHydrator = class {
4437
4858
  };
4438
4859
  }
4439
4860
  hydrateResourceTagConfig(_tag) {
4440
- const { key: _configKey, maxCount, minCount, chain: _chain, deprecated, jsonKey } = _tag;
4861
+ const {
4862
+ key: _configKey,
4863
+ maxCount,
4864
+ minCount,
4865
+ chain: _chain,
4866
+ deprecated,
4867
+ jsonKey,
4868
+ secondaryJsonKey
4869
+ } = _tag;
4441
4870
  const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4442
4871
  if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
4443
4872
  const tag = _configKey.substring(1);
@@ -4452,6 +4881,7 @@ var ConfigHydrator = class {
4452
4881
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4453
4882
  chain,
4454
4883
  jsonKey,
4884
+ secondaryJsonKey,
4455
4885
  deprecated
4456
4886
  });
4457
4887
  return {
@@ -4483,9 +4913,15 @@ var ConfigHydrator = class {
4483
4913
  };
4484
4914
  }
4485
4915
  hydrateCardVariantConfig(_variant) {
4486
- const { tags: _tags, bodyAllowed, bodyRequired, repeatCount } = _variant;
4916
+ const { tags: _tags, bodyAllowed, bodyRequired, repeatCount, jsonKey } = _variant;
4487
4917
  const tags2 = this.hydrateTagsConfig(_tags);
4488
- const cardSetConfig = new CardVariantConfig(tags2.tags, bodyAllowed, bodyRequired, repeatCount);
4918
+ const cardSetConfig = new CardVariantConfig(
4919
+ tags2.tags,
4920
+ bodyAllowed,
4921
+ bodyRequired,
4922
+ repeatCount,
4923
+ jsonKey
4924
+ );
4489
4925
  return cardSetConfig;
4490
4926
  }
4491
4927
  };
@@ -7251,6 +7687,12 @@ var BITS = {
7251
7687
  description: "Extractor configuration bit, used to configure extractors in articles or books",
7252
7688
  textFormatDefault: TextFormat.plainText
7253
7689
  },
7690
+ [BitType.extractorBlueprintConfiguration]: {
7691
+ since: "5.11.0",
7692
+ baseBitType: BitType._standard,
7693
+ description: "Extractor blueprint configuration bit, used to specify extractor blueprint configuration when extracting from blueprints",
7694
+ textFormatDefault: TextFormat.plainText
7695
+ },
7254
7696
  [BitType.extractorImage]: {
7255
7697
  since: "4.3.0",
7256
7698
  baseBitType: BitType._standard,
@@ -7276,6 +7718,12 @@ var BITS = {
7276
7718
  baseBitType: BitType.extractorImage,
7277
7719
  description: "Collapsible extractor images bit, used for images extracted from PDFs"
7278
7720
  },
7721
+ [BitType.extractorBlueprint]: {
7722
+ since: "5.12.0",
7723
+ baseBitType: BitType._standard,
7724
+ description: "Extractor blueprint bit, used to provide blueprint information about extractors",
7725
+ textFormatDefault: TextFormat.json
7726
+ },
7279
7727
  [BitType.extractorInformation]: {
7280
7728
  since: "3.8.0",
7281
7729
  baseBitType: BitType._standard,
@@ -7478,6 +7926,11 @@ var BITS = {
7478
7926
  baseBitType: BitType.pageOpenBook,
7479
7927
  description: "Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"
7480
7928
  },
7929
+ [BitType.openBookChapterTeaser]: {
7930
+ since: "4.16.0",
7931
+ baseBitType: BitType.openBookChapter,
7932
+ description: "Open book chapter teaser bit, equal to open-book-chapter, used to create teaser chapter pages that open books"
7933
+ },
7481
7934
  [BitType.pageOpenBookList]: {
7482
7935
  since: "2.1.0",
7483
7936
  baseBitType: BitType.article,
@@ -10298,6 +10751,7 @@ var Config = class {
10298
10751
  maxCount: 1,
10299
10752
  chain: tag.chain,
10300
10753
  jsonKey: tag.jsonKey,
10754
+ secondaryJsonKey: tag.secondaryJsonKey,
10301
10755
  deprecated: tag.deprecated
10302
10756
  });
10303
10757
  finalResourceTags[k] = newTag;
@@ -10402,7 +10856,7 @@ var instance2 = new Config();
10402
10856
  // src/generated/package_info.ts
10403
10857
  var PACKAGE_INFO = {
10404
10858
  "name": "@gmb/bitmark-parser-generator",
10405
- "version": "5.11.0",
10859
+ "version": "5.12.0",
10406
10860
  "author": "Get More Brain Ltd",
10407
10861
  "license": "ISC",
10408
10862
  "description": "A bitmark parser and generator using Peggy.js"
@@ -34413,6 +34867,7 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
34413
34867
  minCount: 1,
34414
34868
  chain: void 0,
34415
34869
  jsonKey: void 0,
34870
+ secondaryJsonKey: void 0,
34416
34871
  format: TagFormat.bitmarkText,
34417
34872
  values: void 0,
34418
34873
  defaultValue: void 0,
@@ -39266,7 +39721,7 @@ var ConfigBuilder = class {
39266
39721
  const processTagEntries = (tag, tagNameChain) => {
39267
39722
  const tags2 = [];
39268
39723
  let tagName = tag.key;
39269
- const jsonKey = keyToJsonKey(tagName, tagNameChain);
39724
+ const jsonKey = tag.jsonKey ?? keyToJsonKey(tagName, tagNameChain);
39270
39725
  const tagType = typeFromConfigKey(tag.key);
39271
39726
  let format = "";
39272
39727
  let chain = void 0;
@@ -39295,7 +39750,8 @@ var ConfigBuilder = class {
39295
39750
  for (const groupKey of resolvedGroups) {
39296
39751
  tags2.push({
39297
39752
  type: "group",
39298
- key: groupKey
39753
+ key: groupKey,
39754
+ ...tag.jsonKey ? { jsonKey: tag.jsonKey } : {}
39299
39755
  });
39300
39756
  }
39301
39757
  return tags2;
@@ -39311,6 +39767,7 @@ var ConfigBuilder = class {
39311
39767
  type: "tag",
39312
39768
  key: tagName,
39313
39769
  jsonKey,
39770
+ ...tag.secondaryJsonKey ? { secondaryJsonKey: tag.secondaryJsonKey } : {},
39314
39771
  format,
39315
39772
  default: null,
39316
39773
  alwaysInclude: false,
@@ -39329,8 +39786,8 @@ var ConfigBuilder = class {
39329
39786
  const cardSetConfig = CARDSETS[cardSetKey];
39330
39787
  if (!cardSetConfig) return void 0;
39331
39788
  const normalizedKey = normalizeCardKey(cardSetKey);
39332
- const sides = cardSetConfig.variants.map((variantList) => {
39333
- const variants = variantList.map((variant) => {
39789
+ const sides = cardSetConfig.sides.map((side) => {
39790
+ const variants = side.variants.map((variant) => {
39334
39791
  const variantTags = [];
39335
39792
  const variantTagEntries = Object.entries(variant.tags ?? []).sort((a, b) => {
39336
39793
  const tagA = a[1];
@@ -39344,16 +39801,24 @@ var ConfigBuilder = class {
39344
39801
  variantTags.push(...processTagEntries(variantTag, []));
39345
39802
  }
39346
39803
  return {
39804
+ ...variant.jsonKey !== void 0 ? { jsonKey: variant.jsonKey } : {},
39347
39805
  tags: variantTags,
39348
39806
  repeatCount: variant.repeatCount ?? 1,
39349
39807
  bodyAllowed: variant.bodyAllowed ?? true,
39350
39808
  bodyRequired: variant.bodyRequired ?? false
39351
39809
  };
39352
39810
  });
39353
- return { variants };
39811
+ return {
39812
+ name: side.name,
39813
+ ...side.repeat ? { repeat: side.repeat } : {},
39814
+ variants
39815
+ };
39354
39816
  });
39355
39817
  return {
39356
39818
  key: normalizedKey,
39819
+ jsonKey: cardSetConfig.jsonKey,
39820
+ ...cardSetConfig.itemType && cardSetConfig.itemType !== "object" ? { itemType: cardSetConfig.itemType } : {},
39821
+ ...cardSetConfig.sections ? { sections: cardSetConfig.sections } : {},
39357
39822
  sides
39358
39823
  };
39359
39824
  };