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