@gmb/bitmark-parser-generator 5.18.0 → 5.20.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.
@@ -315,6 +315,7 @@ var BitType2 = {
315
315
  extractorPageWithBlocks: "extractor-page-with-blocks",
316
316
  extractorPageWithBlocksCollapsible: "extractor-page-with-blocks-collapsible",
317
317
  extractorRepeatedText: "extractor-repeated-text",
318
+ extractorRule: "extractor-rule",
318
319
  extractorTheme: "extractor-theme",
319
320
  featured: "featured",
320
321
  feedback: "feedback",
@@ -835,8 +836,6 @@ var AbstractTagConfig = class {
835
836
  __publicField(this, "chain");
836
837
  __publicField(this, "jsonKey");
837
838
  // If the json key is different from the tag
838
- __publicField(this, "secondaryJsonKey");
839
- // Heading card alternate path
840
839
  __publicField(this, "deprecated");
841
840
  this.type = params.type;
842
841
  this.configKey = params.configKey;
@@ -845,7 +844,6 @@ var AbstractTagConfig = class {
845
844
  this.minCount = params.minCount;
846
845
  this.chain = params.chain;
847
846
  this.jsonKey = params.jsonKey;
848
- this.secondaryJsonKey = params.secondaryJsonKey;
849
847
  this.deprecated = params.deprecated;
850
848
  }
851
849
  };
@@ -1006,12 +1004,14 @@ ${tag.toString(opts)}`;
1006
1004
 
1007
1005
  // src/model/config/CardSideConfig.ts
1008
1006
  var CardSideConfig = class {
1009
- constructor(name, repeat, variants) {
1007
+ constructor(name, repeat, variants, jsonKey) {
1010
1008
  __publicField(this, "name");
1011
1009
  __publicField(this, "repeat");
1010
+ __publicField(this, "jsonKey");
1012
1011
  __publicField(this, "variants");
1013
1012
  this.name = name;
1014
1013
  this.repeat = repeat;
1014
+ this.jsonKey = jsonKey;
1015
1015
  this.variants = variants;
1016
1016
  }
1017
1017
  toString(options) {
@@ -1033,15 +1033,13 @@ var CardSideConfig = class {
1033
1033
 
1034
1034
  // src/model/config/CardSetConfig.ts
1035
1035
  var CardSetConfig = class {
1036
- constructor(configKey, jsonKey, itemType, sections, sides) {
1036
+ constructor(configKey, jsonKey, sections, sides) {
1037
1037
  __publicField(this, "configKey");
1038
1038
  __publicField(this, "jsonKey");
1039
- __publicField(this, "itemType");
1040
1039
  __publicField(this, "sections");
1041
1040
  __publicField(this, "sides");
1042
1041
  this.configKey = configKey;
1043
1042
  this.jsonKey = jsonKey;
1044
- this.itemType = itemType;
1045
1043
  this.sections = sections;
1046
1044
  this.sides = sides;
1047
1045
  }
@@ -1056,8 +1054,6 @@ var CardSetConfig = class {
1056
1054
  s += `[CardSet: ${this.configKey}]`;
1057
1055
  s += `
1058
1056
  jsonKey: ${this.jsonKey}`;
1059
- s += `
1060
- itemType: ${this.itemType}`;
1061
1057
  for (const side of this.sides) {
1062
1058
  s += `
1063
1059
  ${side.toString(opts)}`;
@@ -1185,6 +1181,7 @@ var import_superenum14 = require("@ncoderz/superenum");
1185
1181
  var import_superenum10 = require("@ncoderz/superenum");
1186
1182
  var groupKeys = {
1187
1183
  group_standardAllBits: "group_standardAllBits",
1184
+ group_standardItemLead: "group_standardItemLead",
1188
1185
  group_standardItemLeadInstructionHint: "group_standardItemLeadInstructionHint",
1189
1186
  group_standardTags: "group_standardTags",
1190
1187
  group_imageSource: "group_imageSource",
@@ -1268,6 +1265,7 @@ var propertyKeys = {
1268
1265
  property_bot: "@bot",
1269
1266
  property_bubbleTag: "@bubbleTag",
1270
1267
  property_extractorTag: "@extractorTag",
1268
+ property_extractorInternal: "@extractorInternal",
1271
1269
  property_buttonCaption: "@buttonCaption",
1272
1270
  property_callToActionUrl: "@callToActionUrl",
1273
1271
  property_caption: "@caption",
@@ -1482,6 +1480,7 @@ var propertyKeys = {
1482
1480
  property_subject: "@subject",
1483
1481
  property_subtype: "@subtype",
1484
1482
  property_tableAutoWidth: "@tableAutoWidth",
1483
+ property_tableColWidth: "@tableColWidth",
1485
1484
  property_tableColumnMinWidth: "@tableColumnMinWidth",
1486
1485
  property_tableFixedHeader: "@tableFixedHeader",
1487
1486
  property_tableHeaderWhitespaceNoWrap: "@tableHeaderWhitespaceNoWrap",
@@ -2307,7 +2306,7 @@ var CARDSETS = {
2307
2306
  {
2308
2307
  key: ConfigKey.tag_title,
2309
2308
  description: "Title of the definition.",
2310
- secondaryJsonKey: "heading.forKeys"
2309
+ jsonKey: "^heading.forKeys"
2311
2310
  },
2312
2311
  {
2313
2312
  key: ConfigKey.group_resourceIcon,
@@ -2331,7 +2330,7 @@ var CARDSETS = {
2331
2330
  {
2332
2331
  key: ConfigKey.tag_title,
2333
2332
  description: "Title of the definition.",
2334
- secondaryJsonKey: "heading.forValues"
2333
+ jsonKey: "^heading.forValues"
2335
2334
  },
2336
2335
  {
2337
2336
  key: ConfigKey.group_resourceIcon,
@@ -2381,7 +2380,7 @@ var CARDSETS = {
2381
2380
  {
2382
2381
  key: ConfigKey.tag_title,
2383
2382
  description: "Title of the match pair.",
2384
- secondaryJsonKey: "heading.forKeys"
2383
+ jsonKey: "^heading.forKeys"
2385
2384
  },
2386
2385
  {
2387
2386
  key: ConfigKey.property_isCaseSensitive,
@@ -2416,7 +2415,7 @@ var CARDSETS = {
2416
2415
  {
2417
2416
  key: ConfigKey.tag_title,
2418
2417
  description: "Title of the match pair.",
2419
- secondaryJsonKey: "heading.forValues"
2418
+ jsonKey: "^heading.forValues"
2420
2419
  },
2421
2420
  {
2422
2421
  key: ConfigKey.property_isCaseSensitive,
@@ -2449,7 +2448,7 @@ var CARDSETS = {
2449
2448
  {
2450
2449
  key: ConfigKey.tag_title,
2451
2450
  description: "Title of the audio match pair.",
2452
- secondaryJsonKey: "heading.forKeys"
2451
+ jsonKey: "^heading.forKeys"
2453
2452
  },
2454
2453
  {
2455
2454
  key: ConfigKey.resource_audio,
@@ -2474,7 +2473,7 @@ var CARDSETS = {
2474
2473
  {
2475
2474
  key: ConfigKey.tag_title,
2476
2475
  description: "Title of the audio match pair.",
2477
- secondaryJsonKey: "heading.forValues"
2476
+ jsonKey: "^heading.forValues"
2478
2477
  },
2479
2478
  {
2480
2479
  key: ConfigKey.resource_audio,
@@ -2506,7 +2505,7 @@ var CARDSETS = {
2506
2505
  {
2507
2506
  key: ConfigKey.tag_title,
2508
2507
  description: "Title of the image match pair.",
2509
- secondaryJsonKey: "heading.forKeys"
2508
+ jsonKey: "^heading.forKeys"
2510
2509
  },
2511
2510
  {
2512
2511
  key: ConfigKey.resource_image,
@@ -2531,7 +2530,7 @@ var CARDSETS = {
2531
2530
  {
2532
2531
  key: ConfigKey.tag_title,
2533
2532
  description: "Title of the image match pair.",
2534
- secondaryJsonKey: "heading.forValues"
2533
+ jsonKey: "^heading.forValues"
2535
2534
  },
2536
2535
  {
2537
2536
  key: ConfigKey.resource_image,
@@ -2568,7 +2567,7 @@ var CARDSETS = {
2568
2567
  {
2569
2568
  key: ConfigKey.tag_title,
2570
2569
  description: "Title of the match matrix.",
2571
- secondaryJsonKey: "heading.forKeys"
2570
+ jsonKey: "^heading.forKeys"
2572
2571
  },
2573
2572
  {
2574
2573
  key: ConfigKey.property_isCaseSensitive,
@@ -2598,7 +2597,7 @@ var CARDSETS = {
2598
2597
  {
2599
2598
  key: ConfigKey.tag_title,
2600
2599
  description: "Title of the match matrix.",
2601
- secondaryJsonKey: "heading.forValues"
2600
+ jsonKey: "^heading.forValues"
2602
2601
  },
2603
2602
  {
2604
2603
  key: ConfigKey.property_isCaseSensitive,
@@ -2627,11 +2626,13 @@ var CARDSETS = {
2627
2626
  {
2628
2627
  key: ConfigKey.tag_true,
2629
2628
  description: "Tag for true statements.",
2629
+ jsonKey: "statement|set(isCorrect=true)",
2630
2630
  maxCount: 1
2631
2631
  },
2632
2632
  {
2633
2633
  key: ConfigKey.tag_false,
2634
2634
  description: "Tag for false statements.",
2635
+ jsonKey: "statement|set(isCorrect=false)",
2635
2636
  maxCount: 1
2636
2637
  },
2637
2638
  {
@@ -2695,7 +2696,7 @@ var CARDSETS = {
2695
2696
  {
2696
2697
  key: ConfigKey.tag_title,
2697
2698
  description: "Title of the feedback.",
2698
- secondaryJsonKey: "heading.forKeys"
2699
+ jsonKey: "^heading.forKeys"
2699
2700
  }
2700
2701
  ],
2701
2702
  bodyAllowed: false
@@ -2725,7 +2726,7 @@ var CARDSETS = {
2725
2726
  {
2726
2727
  key: ConfigKey.tag_title,
2727
2728
  description: "Title of the feedback.",
2728
- secondaryJsonKey: "heading.forValues"
2729
+ jsonKey: "^heading.forValues"
2729
2730
  }
2730
2731
  ],
2731
2732
  bodyAllowed: true
@@ -2815,7 +2816,6 @@ var CARDSETS = {
2815
2816
  //
2816
2817
  [CardSetConfigKey.table]: {
2817
2818
  jsonKey: "table.data",
2818
- itemType: "array",
2819
2819
  sides: [
2820
2820
  {
2821
2821
  name: "cell",
@@ -2830,8 +2830,8 @@ var CARDSETS = {
2830
2830
  },
2831
2831
  {
2832
2832
  key: ConfigKey.tag_title,
2833
- description: "Title of the table.",
2834
- secondaryJsonKey: "table.columns[]"
2833
+ jsonKey: "^table.columns[]",
2834
+ description: "Title of the table."
2835
2835
  },
2836
2836
  {
2837
2837
  key: ConfigKey.property_tableCellType,
@@ -2852,6 +2852,11 @@ var CARDSETS = {
2852
2852
  key: ConfigKey.property_tableScope,
2853
2853
  description: "Scope attribute for header cells.",
2854
2854
  format: TagFormat.plainText
2855
+ },
2856
+ {
2857
+ key: ConfigKey.property_tableColWidth,
2858
+ description: "Width for the column.",
2859
+ format: TagFormat.number
2855
2860
  }
2856
2861
  ],
2857
2862
  repeatCount: Count.infinity
@@ -2866,14 +2871,15 @@ var CARDSETS = {
2866
2871
  [CardSetConfigKey.tableExtended]: {
2867
2872
  jsonKey: null,
2868
2873
  sections: {
2869
- default: { jsonKey: "tableExtended.body.rows" },
2870
- "table-header": { jsonKey: "tableExtended.header.rows" },
2871
- "table-footer": { jsonKey: "tableExtended.footer.rows" }
2874
+ "table-header": { jsonKey: "table.header.rows", sideJsonKey: "cells[{s}]|set(title=true)" },
2875
+ "table-body": { jsonKey: "table.body.rows", isDefault: true },
2876
+ "table-footer": { jsonKey: "table.footer.rows", sideJsonKey: "cells[{s}]|set(title=true)" }
2872
2877
  },
2873
2878
  sides: [
2874
2879
  {
2875
2880
  name: "cell",
2876
2881
  repeat: true,
2882
+ jsonKey: "cells[{s}]",
2877
2883
  variants: [
2878
2884
  {
2879
2885
  jsonKey: "content",
@@ -2884,27 +2890,37 @@ var CARDSETS = {
2884
2890
  },
2885
2891
  {
2886
2892
  key: ConfigKey.tag_title,
2893
+ jsonKey: ".",
2887
2894
  description: "Title of the table cell."
2888
2895
  },
2889
2896
  {
2890
2897
  key: ConfigKey.property_tableCellType,
2898
+ jsonKey: "title|bool(th)",
2891
2899
  description: "Table cell type (th/td).",
2892
2900
  format: TagFormat.plainText
2893
2901
  },
2894
2902
  {
2895
2903
  key: ConfigKey.property_tableRowSpan,
2904
+ jsonKey: "rowspan",
2896
2905
  description: "Number of rows the cell spans.",
2897
2906
  format: TagFormat.number
2898
2907
  },
2899
2908
  {
2900
2909
  key: ConfigKey.property_tableColSpan,
2910
+ jsonKey: "colspan",
2901
2911
  description: "Number of columns the cell spans.",
2902
2912
  format: TagFormat.number
2903
2913
  },
2904
2914
  {
2905
2915
  key: ConfigKey.property_tableScope,
2916
+ jsonKey: "scope",
2906
2917
  description: "Scope attribute for header cells.",
2907
2918
  format: TagFormat.plainText
2919
+ },
2920
+ {
2921
+ key: ConfigKey.property_tableColWidth,
2922
+ description: "Width for the column.",
2923
+ format: TagFormat.number
2908
2924
  }
2909
2925
  ],
2910
2926
  repeatCount: Count.infinity
@@ -2918,7 +2934,6 @@ var CARDSETS = {
2918
2934
  //
2919
2935
  [CardSetConfigKey.pronunciationTable]: {
2920
2936
  jsonKey: "pronunciationTable.data",
2921
- itemType: "array",
2922
2937
  sides: [
2923
2938
  {
2924
2939
  name: "cell",
@@ -2965,15 +2980,8 @@ var CARDSETS = {
2965
2980
  format: TagFormat.plainText
2966
2981
  },
2967
2982
  {
2968
- key: ConfigKey.tag_item,
2969
- description: "The item for the bot action response.",
2970
- chain: [
2971
- {
2972
- key: ConfigKey.tag_item,
2973
- description: "The lead, page number, source page number, and margin number.",
2974
- maxCount: 4
2975
- }
2976
- ]
2983
+ key: ConfigKey.group_standardItemLead,
2984
+ description: "Item, lead, page number, and margin number for the bot action response."
2977
2985
  },
2978
2986
  {
2979
2987
  key: ConfigKey.tag_instruction,
@@ -3060,19 +3068,20 @@ var CARDSETS = {
3060
3068
  description: "Title of the ingredient."
3061
3069
  },
3062
3070
  {
3063
- key: ConfigKey.group_trueFalse,
3064
- description: "Group for true/false properties of the ingredient."
3071
+ key: ConfigKey.tag_true,
3072
+ description: "Checked state for the ingredient.",
3073
+ jsonKey: "ingredient|set(checked=true)",
3074
+ maxCount: 1
3065
3075
  },
3066
3076
  {
3067
- key: ConfigKey.tag_item,
3068
- description: "The item for the ingredient.",
3069
- chain: [
3070
- {
3071
- key: ConfigKey.tag_item,
3072
- description: "Lead, page number, source page number, and margin number.",
3073
- maxCount: 4
3074
- }
3075
- ]
3077
+ key: ConfigKey.tag_false,
3078
+ description: "Unchecked state for the ingredient.",
3079
+ jsonKey: "ingredient|set(checked=false)",
3080
+ maxCount: 1
3081
+ },
3082
+ {
3083
+ key: ConfigKey.group_standardItemLead,
3084
+ description: "Item, lead, page number, and margin number for the ingredient."
3076
3085
  },
3077
3086
  {
3078
3087
  key: ConfigKey.tag_instruction,
@@ -3211,8 +3220,7 @@ var GROUPS = {
3211
3220
  {
3212
3221
  key: ConfigKey.property_validationDate,
3213
3222
  description: "The date when the bit was validated",
3214
- format: TagFormat.plainText,
3215
- defaultValue: ""
3223
+ format: TagFormat.plainText
3216
3224
  },
3217
3225
  {
3218
3226
  key: ConfigKey.property_aiGenerated,
@@ -3357,6 +3365,7 @@ var GROUPS = {
3357
3365
  },
3358
3366
  {
3359
3367
  key: ConfigKey.property_groupTag,
3368
+ jsonKey: "groupTag.name",
3360
3369
  description: "The group tag(s) for the bit",
3361
3370
  format: TagFormat.plainText,
3362
3371
  maxCount: Count.infinity,
@@ -3387,6 +3396,12 @@ var GROUPS = {
3387
3396
  format: TagFormat.plainText,
3388
3397
  maxCount: Count.infinity
3389
3398
  },
3399
+ {
3400
+ key: ConfigKey.property_extractorInternal,
3401
+ description: "Internal metadata used by the extractor for processing purposes",
3402
+ format: TagFormat.plainText,
3403
+ maxCount: Count.infinity
3404
+ },
3390
3405
  {
3391
3406
  key: ConfigKey.property_levelCEFRp,
3392
3407
  description: "The CEFRp level for the bit",
@@ -3453,20 +3468,48 @@ var GROUPS = {
3453
3468
  }
3454
3469
  ]
3455
3470
  },
3456
- [ConfigKey.group_standardItemLeadInstructionHint]: {
3471
+ [ConfigKey.group_standardItemLead]: {
3457
3472
  type: GroupConfigType.standard,
3458
- description: "Standard group for item, lead, page number, source page number, margin number, instruction and hint tags",
3473
+ description: "Standard group for item, lead, page number, and margin number tags",
3459
3474
  tags: [
3460
3475
  {
3461
3476
  key: ConfigKey.tag_item,
3477
+ jsonKey: "item",
3462
3478
  description: "The item for the bit",
3463
3479
  chain: [
3464
3480
  {
3465
3481
  key: ConfigKey.tag_item,
3466
- description: "The lead, page number, source page number, and margin number for the bit",
3467
- maxCount: 4
3482
+ jsonKey: "lead",
3483
+ description: "The lead for the bit",
3484
+ maxCount: 1,
3485
+ chain: [
3486
+ {
3487
+ key: ConfigKey.tag_item,
3488
+ jsonKey: "pageNumber",
3489
+ description: "The page number for the bit",
3490
+ maxCount: 1,
3491
+ chain: [
3492
+ {
3493
+ key: ConfigKey.tag_item,
3494
+ jsonKey: "marginNumber",
3495
+ description: "The margin number for the bit",
3496
+ maxCount: 1
3497
+ }
3498
+ ]
3499
+ }
3500
+ ]
3468
3501
  }
3469
3502
  ]
3503
+ }
3504
+ ]
3505
+ },
3506
+ [ConfigKey.group_standardItemLeadInstructionHint]: {
3507
+ type: GroupConfigType.standard,
3508
+ description: "Standard group for item, lead, page number, margin number, instruction and hint tags",
3509
+ tags: [
3510
+ {
3511
+ key: ConfigKey.group_standardItemLead,
3512
+ description: "Item, lead, page number, and margin number tags"
3470
3513
  },
3471
3514
  {
3472
3515
  key: ConfigKey.tag_instruction,
@@ -3505,6 +3548,7 @@ var GROUPS = {
3505
3548
  tags: [
3506
3549
  {
3507
3550
  key: ConfigKey.property_imageSource,
3551
+ jsonKey: "imageSource.url",
3508
3552
  description: "The source of an image",
3509
3553
  format: TagFormat.plainText,
3510
3554
  chain: [
@@ -3538,6 +3582,7 @@ var GROUPS = {
3538
3582
  tags: [
3539
3583
  {
3540
3584
  key: ConfigKey.property_technicalTerm,
3585
+ jsonKey: "technicalTerm.technicalTerm",
3541
3586
  description: "The technical term",
3542
3587
  format: TagFormat.plainText,
3543
3588
  chain: [
@@ -3556,6 +3601,7 @@ var GROUPS = {
3556
3601
  tags: [
3557
3602
  {
3558
3603
  key: ConfigKey.property_person,
3604
+ jsonKey: "person.name",
3559
3605
  description: "A person",
3560
3606
  format: TagFormat.plainText,
3561
3607
  chain: [
@@ -3573,6 +3619,7 @@ var GROUPS = {
3573
3619
  {
3574
3620
  // Deprecated (parter renamed to person)
3575
3621
  key: ConfigKey.property_partner,
3622
+ jsonKey: "partner.name",
3576
3623
  description: "A partner",
3577
3624
  format: TagFormat.plainText,
3578
3625
  chain: [
@@ -3600,6 +3647,7 @@ var GROUPS = {
3600
3647
  chain: [
3601
3648
  {
3602
3649
  key: ConfigKey.tag_gap,
3650
+ jsonKey: "solutions[]",
3603
3651
  description: "Alternative values for the gaps in the content",
3604
3652
  maxCount: Count.infinity
3605
3653
  },
@@ -3609,13 +3657,16 @@ var GROUPS = {
3609
3657
  },
3610
3658
  {
3611
3659
  key: ConfigKey.property_example,
3660
+ jsonKey: "example",
3612
3661
  description: "An example for the gap",
3613
3662
  format: TagFormat.plainText
3614
3663
  },
3615
3664
  {
3616
3665
  key: ConfigKey.property_isCaseSensitive,
3666
+ jsonKey: "isCaseSensitive",
3617
3667
  description: "If true, the gap text is case sensitive",
3618
- format: TagFormat.boolean
3668
+ format: TagFormat.boolean,
3669
+ defaultValue: "true"
3619
3670
  }
3620
3671
  ]
3621
3672
  }
@@ -3632,11 +3683,13 @@ var GROUPS = {
3632
3683
  chain: [
3633
3684
  {
3634
3685
  key: ConfigKey.tag_true,
3686
+ jsonKey: "choices[]|set(isCorrect=true)",
3635
3687
  description: "True values for a true/false statement/question",
3636
3688
  maxCount: Count.infinity
3637
3689
  },
3638
3690
  {
3639
3691
  key: ConfigKey.tag_false,
3692
+ jsonKey: "choices[]|set(isCorrect=false)",
3640
3693
  description: "False values for a true/false statement/question",
3641
3694
  maxCount: Count.infinity
3642
3695
  },
@@ -3646,6 +3699,7 @@ var GROUPS = {
3646
3699
  },
3647
3700
  {
3648
3701
  key: ConfigKey.property_example,
3702
+ jsonKey: "example",
3649
3703
  description: "An example for the true/false statement/question",
3650
3704
  format: TagFormat.plainText
3651
3705
  }
@@ -3658,11 +3712,13 @@ var GROUPS = {
3658
3712
  chain: [
3659
3713
  {
3660
3714
  key: ConfigKey.tag_true,
3715
+ jsonKey: "choices[]|set(isCorrect=true)",
3661
3716
  description: "True values for a true/false statement/question",
3662
3717
  maxCount: Count.infinity
3663
3718
  },
3664
3719
  {
3665
3720
  key: ConfigKey.tag_false,
3721
+ jsonKey: "choices[]|set(isCorrect=false)",
3666
3722
  description: "False values for a true/false statement/question",
3667
3723
  maxCount: Count.infinity
3668
3724
  },
@@ -3672,6 +3728,7 @@ var GROUPS = {
3672
3728
  },
3673
3729
  {
3674
3730
  key: ConfigKey.property_example,
3731
+ jsonKey: "example",
3675
3732
  description: "An example for the true/false statement/question",
3676
3733
  format: TagFormat.plainText
3677
3734
  }
@@ -3685,6 +3742,7 @@ var GROUPS = {
3685
3742
  tags: [
3686
3743
  {
3687
3744
  key: ConfigKey.property_mark,
3745
+ jsonKey: "marks.mark",
3688
3746
  description: "The mark configuration",
3689
3747
  format: TagFormat.plainText,
3690
3748
  maxCount: Count.infinity,
@@ -3714,11 +3772,13 @@ var GROUPS = {
3714
3772
  chain: [
3715
3773
  {
3716
3774
  key: ConfigKey.property_mark,
3775
+ jsonKey: "mark",
3717
3776
  description: "The mark configuration",
3718
3777
  format: TagFormat.plainText
3719
3778
  },
3720
3779
  {
3721
3780
  key: ConfigKey.property_example,
3781
+ jsonKey: "example",
3722
3782
  description: "An example for the marked content",
3723
3783
  format: TagFormat.plainText
3724
3784
  }
@@ -3889,7 +3949,8 @@ var GROUPS = {
3889
3949
  {
3890
3950
  key: ConfigKey.property_maxTocChapterLevel,
3891
3951
  description: "The maximum table of contents chapter level",
3892
- format: TagFormat.number
3952
+ format: TagFormat.number,
3953
+ defaultValue: "-1"
3893
3954
  },
3894
3955
  {
3895
3956
  key: ConfigKey.property_sourceDocument,
@@ -3971,12 +4032,14 @@ var GROUPS = {
3971
4032
  {
3972
4033
  key: ConfigKey.property_isTracked,
3973
4034
  description: "If true, the learning path is tracked",
3974
- format: TagFormat.boolean
4035
+ format: TagFormat.boolean,
4036
+ defaultValue: "true"
3975
4037
  },
3976
4038
  {
3977
4039
  key: ConfigKey.property_isInfoOnly,
3978
4040
  description: "If true, the learning path is info only",
3979
- format: TagFormat.boolean
4041
+ format: TagFormat.boolean,
4042
+ defaultValue: "false"
3980
4043
  },
3981
4044
  {
3982
4045
  key: ConfigKey.property_deeplink,
@@ -4320,6 +4383,7 @@ var GROUPS = {
4320
4383
  },
4321
4384
  {
4322
4385
  key: ConfigKey.property_posterImage,
4386
+ jsonKey: "posterImage.src",
4323
4387
  description: "The poster image for the video",
4324
4388
  format: TagFormat.plainText,
4325
4389
  chain: [
@@ -4845,27 +4909,24 @@ var ConfigHydrator = class {
4845
4909
  const v = this.hydrateCardVariantConfig(_variant);
4846
4910
  variantsOfSide.push(v);
4847
4911
  }
4848
- const sideConfig = new CardSideConfig(_side.name, _side.repeat ?? false, variantsOfSide);
4912
+ const sideConfig = new CardSideConfig(
4913
+ _side.name,
4914
+ _side.repeat ?? false,
4915
+ variantsOfSide,
4916
+ _side.jsonKey
4917
+ );
4849
4918
  sides.push(sideConfig);
4850
4919
  }
4851
4920
  const cardSetConfig = new CardSetConfig(
4852
4921
  _cardSet,
4853
4922
  _cardSetConfig.jsonKey,
4854
- _cardSetConfig.itemType ?? "object",
4855
4923
  _cardSetConfig.sections,
4856
4924
  sides
4857
4925
  );
4858
4926
  return cardSetConfig;
4859
4927
  }
4860
4928
  hydrateTagConfig(_tag) {
4861
- const {
4862
- key: _configKey,
4863
- maxCount,
4864
- minCount,
4865
- chain: _chain,
4866
- secondaryJsonKey,
4867
- deprecated
4868
- } = _tag;
4929
+ const { key: _configKey, maxCount, minCount, chain: _chain, deprecated } = _tag;
4869
4930
  const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4870
4931
  if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
4871
4932
  const tag = (0, import_superenum15.Enum)(Tag).fromValue(configKey);
@@ -4880,7 +4941,6 @@ var ConfigHydrator = class {
4880
4941
  maxCount: maxCount ?? MAX_COUNT_DEFAULT,
4881
4942
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4882
4943
  chain,
4883
- secondaryJsonKey,
4884
4944
  deprecated
4885
4945
  });
4886
4946
  return {
@@ -4899,8 +4959,7 @@ var ConfigHydrator = class {
4899
4959
  format,
4900
4960
  values,
4901
4961
  defaultValue,
4902
- jsonKey,
4903
- secondaryJsonKey
4962
+ jsonKey
4904
4963
  } = _tag;
4905
4964
  const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4906
4965
  if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
@@ -4916,7 +4975,6 @@ var ConfigHydrator = class {
4916
4975
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4917
4976
  chain,
4918
4977
  jsonKey,
4919
- secondaryJsonKey,
4920
4978
  format,
4921
4979
  values,
4922
4980
  defaultValue,
@@ -4929,15 +4987,7 @@ var ConfigHydrator = class {
4929
4987
  };
4930
4988
  }
4931
4989
  hydrateResourceTagConfig(_tag) {
4932
- const {
4933
- key: _configKey,
4934
- maxCount,
4935
- minCount,
4936
- chain: _chain,
4937
- deprecated,
4938
- jsonKey,
4939
- secondaryJsonKey
4940
- } = _tag;
4990
+ const { key: _configKey, maxCount, minCount, chain: _chain, deprecated, jsonKey } = _tag;
4941
4991
  const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
4942
4992
  if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
4943
4993
  const tag = _configKey.substring(1);
@@ -4952,7 +5002,6 @@ var ConfigHydrator = class {
4952
5002
  minCount: minCount ?? MIN_COUNT_DEFAULT,
4953
5003
  chain,
4954
5004
  jsonKey,
4955
- secondaryJsonKey,
4956
5005
  deprecated
4957
5006
  });
4958
5007
  return {
@@ -6253,7 +6302,8 @@ var BITS = {
6253
6302
  {
6254
6303
  key: ConfigKey.property_isCaseSensitive,
6255
6304
  description: "If the cloze answers are case sensitive",
6256
- format: TagFormat.boolean
6305
+ format: TagFormat.boolean,
6306
+ defaultValue: "true"
6257
6307
  },
6258
6308
  {
6259
6309
  key: ConfigKey.property_quizCountItems,
@@ -6699,6 +6749,7 @@ var BITS = {
6699
6749
  },
6700
6750
  {
6701
6751
  key: ConfigKey.property_servings,
6752
+ jsonKey: "servings.servings",
6702
6753
  description: "The number of servings for the ingredients",
6703
6754
  format: TagFormat.number,
6704
6755
  chain: [
@@ -7886,6 +7937,24 @@ var BITS = {
7886
7937
  baseBitType: BitType2.article,
7887
7938
  description: "Extractor repeated text bit, used to define repeated text in extractor pages"
7888
7939
  },
7940
+ [BitType2.extractorRule]: {
7941
+ since: "5.17.0",
7942
+ baseBitType: BitType2._standard,
7943
+ description: "Extractor rule bit, used to define extraction rules with reference images and instructions",
7944
+ tags: [
7945
+ {
7946
+ key: ConfigKey.group_resourceBitTags,
7947
+ description: "Resource bit tags for extraction rule images"
7948
+ },
7949
+ {
7950
+ key: ConfigKey.group_resourceImage,
7951
+ description: "Resource image tags for the rule reference image",
7952
+ minCount: 1
7953
+ }
7954
+ ],
7955
+ resourceAttachmentAllowed: false,
7956
+ textFormatDefault: TextFormat2.plainText
7957
+ },
7889
7958
  [BitType2.extractorPageNumber]: {
7890
7959
  since: "1.5.21",
7891
7960
  baseBitType: BitType2.article,
@@ -8936,7 +9005,8 @@ var BITS = {
8936
9005
  {
8937
9006
  key: ConfigKey.property_isCaseSensitive,
8938
9007
  description: "Case sensitivity for matching pairs, used to define if matches are case-sensitive",
8939
- format: TagFormat.boolean
9008
+ format: TagFormat.boolean,
9009
+ defaultValue: "true"
8940
9010
  }
8941
9011
  ],
8942
9012
  cardSet: CardSetConfigKey.matchPairs
@@ -9386,7 +9456,8 @@ var BITS = {
9386
9456
  {
9387
9457
  key: ConfigKey.property_platformBrandTarget,
9388
9458
  description: 'The platform brand target (typically "light", "dark" or "none")',
9389
- format: TagFormat.plainText
9459
+ format: TagFormat.plainText,
9460
+ defaultValue: "none"
9390
9461
  }
9391
9462
  ]
9392
9463
  },
@@ -9409,7 +9480,8 @@ var BITS = {
9409
9480
  {
9410
9481
  key: ConfigKey.property_platformLogoMaxHeight,
9411
9482
  description: "Maximum height for the platform logo",
9412
- format: TagFormat.number
9483
+ format: TagFormat.number,
9484
+ defaultValue: "40"
9413
9485
  },
9414
9486
  {
9415
9487
  key: ConfigKey.group_platformStylesCommon,
@@ -9582,7 +9654,8 @@ var BITS = {
9582
9654
  {
9583
9655
  key: ConfigKey.property_resolved,
9584
9656
  description: "Resolved status for the review note, used to indicate if the note is resolved",
9585
- format: TagFormat.boolean
9657
+ format: TagFormat.boolean,
9658
+ defaultValue: "false"
9586
9659
  },
9587
9660
  {
9588
9661
  key: ConfigKey.property_resolvedDate,
@@ -9769,6 +9842,7 @@ var BITS = {
9769
9842
  tags: [
9770
9843
  {
9771
9844
  key: ConfigKey.property_ratingLevelStart,
9845
+ jsonKey: "ratingLevelStart.level",
9772
9846
  description: "Start level for the rating survey, used to define the lowest rating",
9773
9847
  format: TagFormat.number,
9774
9848
  chain: [
@@ -9781,6 +9855,7 @@ var BITS = {
9781
9855
  },
9782
9856
  {
9783
9857
  key: ConfigKey.property_ratingLevelEnd,
9858
+ jsonKey: "ratingLevelEnd.level",
9784
9859
  description: "End level for the rating survey, used to define the highest rating",
9785
9860
  format: TagFormat.number,
9786
9861
  chain: [
@@ -9849,28 +9924,32 @@ var BITS = {
9849
9924
  {
9850
9925
  key: ConfigKey.property_tableFixedHeader,
9851
9926
  description: "Fixed header for the table, used to keep the header visible while scrolling",
9852
- format: TagFormat.boolean
9927
+ format: TagFormat.boolean,
9928
+ defaultValue: "false"
9853
9929
  },
9854
9930
  {
9855
9931
  key: ConfigKey.property_tableHeaderWhitespaceNoWrap,
9856
9932
  description: "No wrap for table header whitespace, used to prevent header text wrapping",
9857
- format: TagFormat.boolean
9858
- // defaultValue: 'false',
9933
+ format: TagFormat.boolean,
9934
+ defaultValue: "false"
9859
9935
  },
9860
9936
  {
9861
9937
  key: ConfigKey.property_tableSearch,
9862
9938
  description: "Search functionality for the table, used to enable searching within the table",
9863
- format: TagFormat.boolean
9939
+ format: TagFormat.boolean,
9940
+ defaultValue: "false"
9864
9941
  },
9865
9942
  {
9866
9943
  key: ConfigKey.property_tableSort,
9867
9944
  description: "Sorting functionality for the table, used to enable sorting of table columns",
9868
- format: TagFormat.boolean
9945
+ format: TagFormat.boolean,
9946
+ defaultValue: "false"
9869
9947
  },
9870
9948
  {
9871
9949
  key: ConfigKey.property_tablePagination,
9872
9950
  description: "Pagination for the table, used to limit the number of rows displayed at once",
9873
- format: TagFormat.boolean
9951
+ format: TagFormat.boolean,
9952
+ defaultValue: "false"
9874
9953
  },
9875
9954
  {
9876
9955
  key: ConfigKey.property_tablePaginationLimit,
@@ -9887,24 +9966,26 @@ var BITS = {
9887
9966
  {
9888
9967
  key: ConfigKey.property_tableWhitespaceNoWrap,
9889
9968
  description: "No wrap for table whitespace, used to prevent text wrapping in table cells",
9890
- format: TagFormat.boolean
9891
- // defaultValue: 'false',
9969
+ format: TagFormat.boolean,
9970
+ defaultValue: "false"
9892
9971
  },
9893
9972
  {
9894
9973
  key: ConfigKey.property_tableAutoWidth,
9895
9974
  description: "Auto width for table columns, used to automatically adjust column widths",
9896
- format: TagFormat.boolean
9897
- // defaultValue: 'true',
9975
+ format: TagFormat.boolean,
9976
+ defaultValue: "true"
9898
9977
  },
9899
9978
  {
9900
9979
  key: ConfigKey.property_tableResizableColumns,
9901
9980
  description: "Resizable columns for the table, used to allow users to resize table columns",
9902
- format: TagFormat.boolean
9981
+ format: TagFormat.boolean,
9982
+ defaultValue: "false"
9903
9983
  },
9904
9984
  {
9905
9985
  key: ConfigKey.property_tableColumnMinWidth,
9906
9986
  description: "Minimum width for table columns, used to define the minimum width of columns",
9907
- format: TagFormat.number
9987
+ format: TagFormat.number,
9988
+ defaultValue: "0"
9908
9989
  }
9909
9990
  ],
9910
9991
  cardSet: CardSetConfigKey.table
@@ -9912,7 +9993,8 @@ var BITS = {
9912
9993
  [BitType2.tableExtended]: {
9913
9994
  since: "4.14.0",
9914
9995
  baseBitType: BitType2.table,
9915
- description: "Extended table bit, used to create complex tables with all HTML table features"
9996
+ description: "Extended table bit, used to create complex tables with all HTML table features",
9997
+ cardSet: CardSetConfigKey.tableExtended
9916
9998
  },
9917
9999
  [BitType2.tableExtendedImage]: {
9918
10000
  since: "5.13.0",
@@ -10878,7 +10960,6 @@ var Config = class {
10878
10960
  maxCount: 1,
10879
10961
  chain: tag.chain,
10880
10962
  jsonKey: tag.jsonKey,
10881
- secondaryJsonKey: tag.secondaryJsonKey,
10882
10963
  deprecated: tag.deprecated
10883
10964
  });
10884
10965
  finalResourceTags[k] = newTag;
@@ -10983,7 +11064,7 @@ var instance2 = new Config();
10983
11064
  // src/generated/package_info.ts
10984
11065
  var PACKAGE_INFO = {
10985
11066
  "name": "@gmb/bitmark-parser-generator",
10986
- "version": "5.18.0",
11067
+ "version": "5.20.0",
10987
11068
  "author": "Get More Brain Ltd",
10988
11069
  "license": "ISC",
10989
11070
  "description": "A bitmark parser and generator using Peggy.js"
@@ -11544,6 +11625,8 @@ var NodeType = {
11544
11625
  extractorExtractionTimestampValue: "extractorExtractionTimestampValue",
11545
11626
  extractorTag: "extractorTag",
11546
11627
  extractorTagValue: "extractorTagValue",
11628
+ extractorInternal: "extractorInternal",
11629
+ extractorInternalValue: "extractorInternalValue",
11547
11630
  extraProperties: "extraProperties",
11548
11631
  feedback: "feedback",
11549
11632
  feedbackEngine: "feedbackEngine",
@@ -11949,6 +12032,8 @@ var NodeType = {
11949
12032
  table: "table",
11950
12033
  tableAutoWidth: "tableAutoWidth",
11951
12034
  tableAutoWidthValue: "tableAutoWidthValue",
12035
+ tableColWidth: "tableColWidth",
12036
+ tableColWidthValue: "tableColWidthValue",
11952
12037
  tableColumnMinWidth: "tableColumnMinWidth",
11953
12038
  tableColumnMinWidthValue: "tableColumnMinWidthValue",
11954
12039
  tableFixedHeader: "tableFixedHeader",
@@ -24941,6 +25026,12 @@ var Builder = class extends BaseBuilder {
24941
25026
  data.extractorTag,
24942
25027
  options
24943
25028
  ),
25029
+ extractorInternal: this.toAstProperty(
25030
+ bitType,
25031
+ ConfigKey.property_extractorInternal,
25032
+ data.extractorInternal,
25033
+ options
25034
+ ),
24944
25035
  levelCEFRp: this.toAstProperty(
24945
25036
  bitType,
24946
25037
  ConfigKey.property_levelCEFRp,
@@ -26428,6 +26519,7 @@ var Builder = class extends BaseBuilder {
26428
26519
  if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
26429
26520
  if (cell.colspan != null) tableCell.colspan = cell.colspan;
26430
26521
  if (cell.scope) tableCell.scope = cell.scope;
26522
+ if (cell.colwidth != null) tableCell.colwidth = cell.colwidth;
26431
26523
  return tableCell;
26432
26524
  });
26433
26525
  return {
@@ -28723,6 +28815,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28723
28815
  this.writeTableCellProperty("tableScope", cell.scope);
28724
28816
  this.writeNL();
28725
28817
  }
28818
+ if (cell.colwidth && cell.colwidth > 0) {
28819
+ this.writeTableCellProperty("tableColWidth", cell.colwidth);
28820
+ this.writeNL();
28821
+ }
28726
28822
  const content = cell.content ?? instance3.EMPTY_STRING;
28727
28823
  this.writeTextOrValue(content, this.textFormat, TextLocation2.body);
28728
28824
  }
@@ -31285,7 +31381,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
31285
31381
  if (bitJson.isTracked == null) bitJson.isTracked = true;
31286
31382
  if (bitJson.isInfoOnly == null) bitJson.isInfoOnly = false;
31287
31383
  }
31288
- if (instance2.isOfBitType(bitType, BitType2.table) && !instance2.isOfBitType(bitType, BitType2.tableImage)) {
31384
+ const tableImageHasTable = instance2.isOfBitType(bitType, BitType2.tableImage) && !this.tableIsEmpty(bitJson.table);
31385
+ if (instance2.isOfBitType(bitType, BitType2.table) && !instance2.isOfBitType(bitType, BitType2.tableImage) || tableImageHasTable) {
31289
31386
  if (bitJson.tableFixedHeader == null) bitJson.tableFixedHeader = false;
31290
31387
  if (bitJson.tableHeaderWhitespaceNoWrap == null) {
31291
31388
  bitJson.tableHeaderWhitespaceNoWrap = false;
@@ -31300,10 +31397,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
31300
31397
  if (bitJson.tableResizableColumns == null) bitJson.tableResizableColumns = false;
31301
31398
  if (bitJson.tableColumnMinWidth == null) bitJson.tableColumnMinWidth = 0;
31302
31399
  }
31303
- if (instance2.isOfBitType(bitType, BitType2.tableImage)) {
31304
- if (this.tableIsEmpty(bitJson.table)) {
31305
- delete bitJson.table;
31306
- }
31400
+ if (instance2.isOfBitType(bitType, BitType2.tableImage) && !tableImageHasTable) {
31401
+ delete bitJson.table;
31307
31402
  }
31308
31403
  if (instance2.isOfBitType(bitType, BitType2.bookReference)) {
31309
31404
  if (bitJson.refAuthor == null) bitJson.refAuthor = [];
@@ -34103,11 +34198,19 @@ function parseTable(context, _bitType, cardSet) {
34103
34198
  const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
34104
34199
  const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
34105
34200
  const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
34106
- cleanupExtraProperties(tags2, ["tableCellType", "tableRowSpan", "tableColSpan", "tableScope"]);
34201
+ const colWidthRaw = tags2.tableColWidth ?? readExtraProperty(tags2.extraProperties, "tableColWidth");
34202
+ cleanupExtraProperties(tags2, [
34203
+ "tableCellType",
34204
+ "tableRowSpan",
34205
+ "tableColSpan",
34206
+ "tableScope",
34207
+ "tableColWidth"
34208
+ ]);
34107
34209
  const cellType = normalizeCellType(cellTypeRaw, section);
34108
34210
  const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
34109
34211
  const colspan = normalizeSpan(colSpanRaw, "colspan");
34110
34212
  const scope = normalizeScope(scopeRaw);
34213
+ const colwidth = instance6.asNumber(colWidthRaw) ?? 0;
34111
34214
  const cell = {
34112
34215
  content
34113
34216
  };
@@ -34115,6 +34218,7 @@ function parseTable(context, _bitType, cardSet) {
34115
34218
  if (rowspan > 1) cell.rowspan = rowspan;
34116
34219
  if (colspan > 1) cell.colspan = colspan;
34117
34220
  if (scope) cell.scope = scope;
34221
+ if (colwidth > 0) cell.colwidth = colwidth;
34118
34222
  return cell;
34119
34223
  };
34120
34224
  const resolveSectionQualifier = (card) => {
@@ -34501,6 +34605,15 @@ function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, conten
34501
34605
  }
34502
34606
 
34503
34607
  // src/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.ts
34608
+ function flattenChainContent(content) {
34609
+ const result = [content];
34610
+ if (content.chain) {
34611
+ for (const child of content.chain) {
34612
+ result.push(...flattenChainContent(child));
34613
+ }
34614
+ }
34615
+ return result;
34616
+ }
34504
34617
  function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, content, target) {
34505
34618
  if (contentDepth === ContentDepth.Chain) {
34506
34619
  itemLeadTagContentProcessor(context, contentDepth, tagsConfig, content, target);
@@ -34511,7 +34624,7 @@ function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, conten
34511
34624
  function buildItemLead(context, _contentDepth, tagsConfig, content, target) {
34512
34625
  if (context.DEBUG_CHAIN_CONTENT) context.debugPrint("item lead content", content);
34513
34626
  const itemLeadConfig = instance2.getTagConfigForTag(tagsConfig, (0, import_superenum43.Enum)(Tag).fromValue(content.type));
34514
- const chainContent = [content, ...content.chain ?? []];
34627
+ const chainContent = flattenChainContent(content);
34515
34628
  const chainTags = context.bitContentProcessor(
34516
34629
  ContentDepth.Chain,
34517
34630
  itemLeadConfig?.chain,
@@ -35068,7 +35181,6 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
35068
35181
  minCount: 1,
35069
35182
  chain: void 0,
35070
35183
  jsonKey: void 0,
35071
- secondaryJsonKey: void 0,
35072
35184
  format: TagFormat.bitmarkText,
35073
35185
  values: void 0,
35074
35186
  defaultValue: void 0,