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