@gmb/bitmark-parser-generator 5.19.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.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +203 -110
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +19 -8
- package/dist/browser/esm/index.d.ts +19 -8
- package/dist/browser/esm/index.js +203 -110
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +273 -267
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +273 -267
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -8
- package/dist/index.d.ts +19 -8
- package/dist/index.js +273 -267
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/main.js
CHANGED
|
@@ -760,8 +760,6 @@ var AbstractTagConfig = class {
|
|
|
760
760
|
chain;
|
|
761
761
|
jsonKey;
|
|
762
762
|
// If the json key is different from the tag
|
|
763
|
-
secondaryJsonKey;
|
|
764
|
-
// Heading card alternate path
|
|
765
763
|
deprecated;
|
|
766
764
|
// Deprecated version
|
|
767
765
|
constructor(params) {
|
|
@@ -772,7 +770,6 @@ var AbstractTagConfig = class {
|
|
|
772
770
|
this.minCount = params.minCount;
|
|
773
771
|
this.chain = params.chain;
|
|
774
772
|
this.jsonKey = params.jsonKey;
|
|
775
|
-
this.secondaryJsonKey = params.secondaryJsonKey;
|
|
776
773
|
this.deprecated = params.deprecated;
|
|
777
774
|
}
|
|
778
775
|
};
|
|
@@ -935,10 +932,12 @@ ${tag.toString(opts)}`;
|
|
|
935
932
|
var CardSideConfig = class {
|
|
936
933
|
name;
|
|
937
934
|
repeat;
|
|
935
|
+
jsonKey;
|
|
938
936
|
variants;
|
|
939
|
-
constructor(name, repeat, variants) {
|
|
937
|
+
constructor(name, repeat, variants, jsonKey) {
|
|
940
938
|
this.name = name;
|
|
941
939
|
this.repeat = repeat;
|
|
940
|
+
this.jsonKey = jsonKey;
|
|
942
941
|
this.variants = variants;
|
|
943
942
|
}
|
|
944
943
|
toString(options) {
|
|
@@ -962,7 +961,6 @@ var CardSideConfig = class {
|
|
|
962
961
|
var CardSetConfig = class {
|
|
963
962
|
configKey;
|
|
964
963
|
jsonKey;
|
|
965
|
-
itemType;
|
|
966
964
|
sections;
|
|
967
965
|
sides;
|
|
968
966
|
// Legacy accessor — provides the same shape as the old `variants: CardVariantConfig[][]`
|
|
@@ -970,10 +968,9 @@ var CardSetConfig = class {
|
|
|
970
968
|
get variants() {
|
|
971
969
|
return this.sides.map((side) => side.variants);
|
|
972
970
|
}
|
|
973
|
-
constructor(configKey, jsonKey,
|
|
971
|
+
constructor(configKey, jsonKey, sections, sides) {
|
|
974
972
|
this.configKey = configKey;
|
|
975
973
|
this.jsonKey = jsonKey;
|
|
976
|
-
this.itemType = itemType;
|
|
977
974
|
this.sections = sections;
|
|
978
975
|
this.sides = sides;
|
|
979
976
|
}
|
|
@@ -983,8 +980,6 @@ var CardSetConfig = class {
|
|
|
983
980
|
s += `[CardSet: ${this.configKey}]`;
|
|
984
981
|
s += `
|
|
985
982
|
jsonKey: ${this.jsonKey}`;
|
|
986
|
-
s += `
|
|
987
|
-
itemType: ${this.itemType}`;
|
|
988
983
|
for (const side of this.sides) {
|
|
989
984
|
s += `
|
|
990
985
|
${side.toString(opts)}`;
|
|
@@ -1106,6 +1101,7 @@ ${this.cardSet.toString(opts)}`;
|
|
|
1106
1101
|
};
|
|
1107
1102
|
var groupKeys = {
|
|
1108
1103
|
group_standardAllBits: "group_standardAllBits",
|
|
1104
|
+
group_standardItemLead: "group_standardItemLead",
|
|
1109
1105
|
group_standardItemLeadInstructionHint: "group_standardItemLeadInstructionHint",
|
|
1110
1106
|
group_standardTags: "group_standardTags",
|
|
1111
1107
|
group_imageSource: "group_imageSource",
|
|
@@ -1186,6 +1182,7 @@ var propertyKeys = {
|
|
|
1186
1182
|
property_bot: "@bot",
|
|
1187
1183
|
property_bubbleTag: "@bubbleTag",
|
|
1188
1184
|
property_extractorTag: "@extractorTag",
|
|
1185
|
+
property_extractorInternal: "@extractorInternal",
|
|
1189
1186
|
property_buttonCaption: "@buttonCaption",
|
|
1190
1187
|
property_callToActionUrl: "@callToActionUrl",
|
|
1191
1188
|
property_caption: "@caption",
|
|
@@ -1400,6 +1397,7 @@ var propertyKeys = {
|
|
|
1400
1397
|
property_subject: "@subject",
|
|
1401
1398
|
property_subtype: "@subtype",
|
|
1402
1399
|
property_tableAutoWidth: "@tableAutoWidth",
|
|
1400
|
+
property_tableColWidth: "@tableColWidth",
|
|
1403
1401
|
property_tableColumnMinWidth: "@tableColumnMinWidth",
|
|
1404
1402
|
property_tableFixedHeader: "@tableFixedHeader",
|
|
1405
1403
|
property_tableHeaderWhitespaceNoWrap: "@tableHeaderWhitespaceNoWrap",
|
|
@@ -2216,7 +2214,7 @@ var CARDSETS = {
|
|
|
2216
2214
|
{
|
|
2217
2215
|
key: ConfigKey.tag_title,
|
|
2218
2216
|
description: "Title of the definition.",
|
|
2219
|
-
|
|
2217
|
+
jsonKey: "^heading.forKeys"
|
|
2220
2218
|
},
|
|
2221
2219
|
{
|
|
2222
2220
|
key: ConfigKey.group_resourceIcon,
|
|
@@ -2240,7 +2238,7 @@ var CARDSETS = {
|
|
|
2240
2238
|
{
|
|
2241
2239
|
key: ConfigKey.tag_title,
|
|
2242
2240
|
description: "Title of the definition.",
|
|
2243
|
-
|
|
2241
|
+
jsonKey: "^heading.forValues"
|
|
2244
2242
|
},
|
|
2245
2243
|
{
|
|
2246
2244
|
key: ConfigKey.group_resourceIcon,
|
|
@@ -2290,7 +2288,7 @@ var CARDSETS = {
|
|
|
2290
2288
|
{
|
|
2291
2289
|
key: ConfigKey.tag_title,
|
|
2292
2290
|
description: "Title of the match pair.",
|
|
2293
|
-
|
|
2291
|
+
jsonKey: "^heading.forKeys"
|
|
2294
2292
|
},
|
|
2295
2293
|
{
|
|
2296
2294
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2325,7 +2323,7 @@ var CARDSETS = {
|
|
|
2325
2323
|
{
|
|
2326
2324
|
key: ConfigKey.tag_title,
|
|
2327
2325
|
description: "Title of the match pair.",
|
|
2328
|
-
|
|
2326
|
+
jsonKey: "^heading.forValues"
|
|
2329
2327
|
},
|
|
2330
2328
|
{
|
|
2331
2329
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2358,7 +2356,7 @@ var CARDSETS = {
|
|
|
2358
2356
|
{
|
|
2359
2357
|
key: ConfigKey.tag_title,
|
|
2360
2358
|
description: "Title of the audio match pair.",
|
|
2361
|
-
|
|
2359
|
+
jsonKey: "^heading.forKeys"
|
|
2362
2360
|
},
|
|
2363
2361
|
{
|
|
2364
2362
|
key: ConfigKey.resource_audio,
|
|
@@ -2383,7 +2381,7 @@ var CARDSETS = {
|
|
|
2383
2381
|
{
|
|
2384
2382
|
key: ConfigKey.tag_title,
|
|
2385
2383
|
description: "Title of the audio match pair.",
|
|
2386
|
-
|
|
2384
|
+
jsonKey: "^heading.forValues"
|
|
2387
2385
|
},
|
|
2388
2386
|
{
|
|
2389
2387
|
key: ConfigKey.resource_audio,
|
|
@@ -2415,7 +2413,7 @@ var CARDSETS = {
|
|
|
2415
2413
|
{
|
|
2416
2414
|
key: ConfigKey.tag_title,
|
|
2417
2415
|
description: "Title of the image match pair.",
|
|
2418
|
-
|
|
2416
|
+
jsonKey: "^heading.forKeys"
|
|
2419
2417
|
},
|
|
2420
2418
|
{
|
|
2421
2419
|
key: ConfigKey.resource_image,
|
|
@@ -2440,7 +2438,7 @@ var CARDSETS = {
|
|
|
2440
2438
|
{
|
|
2441
2439
|
key: ConfigKey.tag_title,
|
|
2442
2440
|
description: "Title of the image match pair.",
|
|
2443
|
-
|
|
2441
|
+
jsonKey: "^heading.forValues"
|
|
2444
2442
|
},
|
|
2445
2443
|
{
|
|
2446
2444
|
key: ConfigKey.resource_image,
|
|
@@ -2477,7 +2475,7 @@ var CARDSETS = {
|
|
|
2477
2475
|
{
|
|
2478
2476
|
key: ConfigKey.tag_title,
|
|
2479
2477
|
description: "Title of the match matrix.",
|
|
2480
|
-
|
|
2478
|
+
jsonKey: "^heading.forKeys"
|
|
2481
2479
|
},
|
|
2482
2480
|
{
|
|
2483
2481
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2507,7 +2505,7 @@ var CARDSETS = {
|
|
|
2507
2505
|
{
|
|
2508
2506
|
key: ConfigKey.tag_title,
|
|
2509
2507
|
description: "Title of the match matrix.",
|
|
2510
|
-
|
|
2508
|
+
jsonKey: "^heading.forValues"
|
|
2511
2509
|
},
|
|
2512
2510
|
{
|
|
2513
2511
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2536,11 +2534,13 @@ var CARDSETS = {
|
|
|
2536
2534
|
{
|
|
2537
2535
|
key: ConfigKey.tag_true,
|
|
2538
2536
|
description: "Tag for true statements.",
|
|
2537
|
+
jsonKey: "statement|set(isCorrect=true)",
|
|
2539
2538
|
maxCount: 1
|
|
2540
2539
|
},
|
|
2541
2540
|
{
|
|
2542
2541
|
key: ConfigKey.tag_false,
|
|
2543
2542
|
description: "Tag for false statements.",
|
|
2543
|
+
jsonKey: "statement|set(isCorrect=false)",
|
|
2544
2544
|
maxCount: 1
|
|
2545
2545
|
},
|
|
2546
2546
|
{
|
|
@@ -2604,7 +2604,7 @@ var CARDSETS = {
|
|
|
2604
2604
|
{
|
|
2605
2605
|
key: ConfigKey.tag_title,
|
|
2606
2606
|
description: "Title of the feedback.",
|
|
2607
|
-
|
|
2607
|
+
jsonKey: "^heading.forKeys"
|
|
2608
2608
|
}
|
|
2609
2609
|
],
|
|
2610
2610
|
bodyAllowed: false
|
|
@@ -2634,7 +2634,7 @@ var CARDSETS = {
|
|
|
2634
2634
|
{
|
|
2635
2635
|
key: ConfigKey.tag_title,
|
|
2636
2636
|
description: "Title of the feedback.",
|
|
2637
|
-
|
|
2637
|
+
jsonKey: "^heading.forValues"
|
|
2638
2638
|
}
|
|
2639
2639
|
],
|
|
2640
2640
|
bodyAllowed: true
|
|
@@ -2724,7 +2724,6 @@ var CARDSETS = {
|
|
|
2724
2724
|
//
|
|
2725
2725
|
[CardSetConfigKey.table]: {
|
|
2726
2726
|
jsonKey: "table.data",
|
|
2727
|
-
itemType: "array",
|
|
2728
2727
|
sides: [
|
|
2729
2728
|
{
|
|
2730
2729
|
name: "cell",
|
|
@@ -2739,8 +2738,8 @@ var CARDSETS = {
|
|
|
2739
2738
|
},
|
|
2740
2739
|
{
|
|
2741
2740
|
key: ConfigKey.tag_title,
|
|
2742
|
-
|
|
2743
|
-
|
|
2741
|
+
jsonKey: "^table.columns[]",
|
|
2742
|
+
description: "Title of the table."
|
|
2744
2743
|
},
|
|
2745
2744
|
{
|
|
2746
2745
|
key: ConfigKey.property_tableCellType,
|
|
@@ -2761,6 +2760,11 @@ var CARDSETS = {
|
|
|
2761
2760
|
key: ConfigKey.property_tableScope,
|
|
2762
2761
|
description: "Scope attribute for header cells.",
|
|
2763
2762
|
format: TagFormat.plainText
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
key: ConfigKey.property_tableColWidth,
|
|
2766
|
+
description: "Width for the column.",
|
|
2767
|
+
format: TagFormat.number
|
|
2764
2768
|
}
|
|
2765
2769
|
],
|
|
2766
2770
|
repeatCount: Count.infinity
|
|
@@ -2775,14 +2779,15 @@ var CARDSETS = {
|
|
|
2775
2779
|
[CardSetConfigKey.tableExtended]: {
|
|
2776
2780
|
jsonKey: null,
|
|
2777
2781
|
sections: {
|
|
2778
|
-
|
|
2779
|
-
"table-
|
|
2780
|
-
"table-footer": { jsonKey: "
|
|
2782
|
+
"table-header": { jsonKey: "table.header.rows", sideJsonKey: "cells[{s}]|set(title=true)" },
|
|
2783
|
+
"table-body": { jsonKey: "table.body.rows", isDefault: true },
|
|
2784
|
+
"table-footer": { jsonKey: "table.footer.rows", sideJsonKey: "cells[{s}]|set(title=true)" }
|
|
2781
2785
|
},
|
|
2782
2786
|
sides: [
|
|
2783
2787
|
{
|
|
2784
2788
|
name: "cell",
|
|
2785
2789
|
repeat: true,
|
|
2790
|
+
jsonKey: "cells[{s}]",
|
|
2786
2791
|
variants: [
|
|
2787
2792
|
{
|
|
2788
2793
|
jsonKey: "content",
|
|
@@ -2793,27 +2798,37 @@ var CARDSETS = {
|
|
|
2793
2798
|
},
|
|
2794
2799
|
{
|
|
2795
2800
|
key: ConfigKey.tag_title,
|
|
2801
|
+
jsonKey: ".",
|
|
2796
2802
|
description: "Title of the table cell."
|
|
2797
2803
|
},
|
|
2798
2804
|
{
|
|
2799
2805
|
key: ConfigKey.property_tableCellType,
|
|
2806
|
+
jsonKey: "title|bool(th)",
|
|
2800
2807
|
description: "Table cell type (th/td).",
|
|
2801
2808
|
format: TagFormat.plainText
|
|
2802
2809
|
},
|
|
2803
2810
|
{
|
|
2804
2811
|
key: ConfigKey.property_tableRowSpan,
|
|
2812
|
+
jsonKey: "rowspan",
|
|
2805
2813
|
description: "Number of rows the cell spans.",
|
|
2806
2814
|
format: TagFormat.number
|
|
2807
2815
|
},
|
|
2808
2816
|
{
|
|
2809
2817
|
key: ConfigKey.property_tableColSpan,
|
|
2818
|
+
jsonKey: "colspan",
|
|
2810
2819
|
description: "Number of columns the cell spans.",
|
|
2811
2820
|
format: TagFormat.number
|
|
2812
2821
|
},
|
|
2813
2822
|
{
|
|
2814
2823
|
key: ConfigKey.property_tableScope,
|
|
2824
|
+
jsonKey: "scope",
|
|
2815
2825
|
description: "Scope attribute for header cells.",
|
|
2816
2826
|
format: TagFormat.plainText
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
key: ConfigKey.property_tableColWidth,
|
|
2830
|
+
description: "Width for the column.",
|
|
2831
|
+
format: TagFormat.number
|
|
2817
2832
|
}
|
|
2818
2833
|
],
|
|
2819
2834
|
repeatCount: Count.infinity
|
|
@@ -2827,7 +2842,6 @@ var CARDSETS = {
|
|
|
2827
2842
|
//
|
|
2828
2843
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2829
2844
|
jsonKey: "pronunciationTable.data",
|
|
2830
|
-
itemType: "array",
|
|
2831
2845
|
sides: [
|
|
2832
2846
|
{
|
|
2833
2847
|
name: "cell",
|
|
@@ -2874,15 +2888,8 @@ var CARDSETS = {
|
|
|
2874
2888
|
format: TagFormat.plainText
|
|
2875
2889
|
},
|
|
2876
2890
|
{
|
|
2877
|
-
key: ConfigKey.
|
|
2878
|
-
description: "
|
|
2879
|
-
chain: [
|
|
2880
|
-
{
|
|
2881
|
-
key: ConfigKey.tag_item,
|
|
2882
|
-
description: "The lead, page number, source page number, and margin number.",
|
|
2883
|
-
maxCount: 4
|
|
2884
|
-
}
|
|
2885
|
-
]
|
|
2891
|
+
key: ConfigKey.group_standardItemLead,
|
|
2892
|
+
description: "Item, lead, page number, and margin number for the bot action response."
|
|
2886
2893
|
},
|
|
2887
2894
|
{
|
|
2888
2895
|
key: ConfigKey.tag_instruction,
|
|
@@ -2969,19 +2976,20 @@ var CARDSETS = {
|
|
|
2969
2976
|
description: "Title of the ingredient."
|
|
2970
2977
|
},
|
|
2971
2978
|
{
|
|
2972
|
-
key: ConfigKey.
|
|
2973
|
-
description: "
|
|
2979
|
+
key: ConfigKey.tag_true,
|
|
2980
|
+
description: "Checked state for the ingredient.",
|
|
2981
|
+
jsonKey: "ingredient|set(checked=true)",
|
|
2982
|
+
maxCount: 1
|
|
2974
2983
|
},
|
|
2975
2984
|
{
|
|
2976
|
-
key: ConfigKey.
|
|
2977
|
-
description: "
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
]
|
|
2985
|
+
key: ConfigKey.tag_false,
|
|
2986
|
+
description: "Unchecked state for the ingredient.",
|
|
2987
|
+
jsonKey: "ingredient|set(checked=false)",
|
|
2988
|
+
maxCount: 1
|
|
2989
|
+
},
|
|
2990
|
+
{
|
|
2991
|
+
key: ConfigKey.group_standardItemLead,
|
|
2992
|
+
description: "Item, lead, page number, and margin number for the ingredient."
|
|
2985
2993
|
},
|
|
2986
2994
|
{
|
|
2987
2995
|
key: ConfigKey.tag_instruction,
|
|
@@ -3120,8 +3128,7 @@ var GROUPS = {
|
|
|
3120
3128
|
{
|
|
3121
3129
|
key: ConfigKey.property_validationDate,
|
|
3122
3130
|
description: "The date when the bit was validated",
|
|
3123
|
-
format: TagFormat.plainText
|
|
3124
|
-
defaultValue: ""
|
|
3131
|
+
format: TagFormat.plainText
|
|
3125
3132
|
},
|
|
3126
3133
|
{
|
|
3127
3134
|
key: ConfigKey.property_aiGenerated,
|
|
@@ -3266,6 +3273,7 @@ var GROUPS = {
|
|
|
3266
3273
|
},
|
|
3267
3274
|
{
|
|
3268
3275
|
key: ConfigKey.property_groupTag,
|
|
3276
|
+
jsonKey: "groupTag.name",
|
|
3269
3277
|
description: "The group tag(s) for the bit",
|
|
3270
3278
|
format: TagFormat.plainText,
|
|
3271
3279
|
maxCount: Count.infinity,
|
|
@@ -3296,6 +3304,12 @@ var GROUPS = {
|
|
|
3296
3304
|
format: TagFormat.plainText,
|
|
3297
3305
|
maxCount: Count.infinity
|
|
3298
3306
|
},
|
|
3307
|
+
{
|
|
3308
|
+
key: ConfigKey.property_extractorInternal,
|
|
3309
|
+
description: "Internal metadata used by the extractor for processing purposes",
|
|
3310
|
+
format: TagFormat.plainText,
|
|
3311
|
+
maxCount: Count.infinity
|
|
3312
|
+
},
|
|
3299
3313
|
{
|
|
3300
3314
|
key: ConfigKey.property_levelCEFRp,
|
|
3301
3315
|
description: "The CEFRp level for the bit",
|
|
@@ -3362,20 +3376,48 @@ var GROUPS = {
|
|
|
3362
3376
|
}
|
|
3363
3377
|
]
|
|
3364
3378
|
},
|
|
3365
|
-
[ConfigKey.
|
|
3379
|
+
[ConfigKey.group_standardItemLead]: {
|
|
3366
3380
|
type: GroupConfigType.standard,
|
|
3367
|
-
description: "Standard group for item, lead, page number,
|
|
3381
|
+
description: "Standard group for item, lead, page number, and margin number tags",
|
|
3368
3382
|
tags: [
|
|
3369
3383
|
{
|
|
3370
3384
|
key: ConfigKey.tag_item,
|
|
3385
|
+
jsonKey: "item",
|
|
3371
3386
|
description: "The item for the bit",
|
|
3372
3387
|
chain: [
|
|
3373
3388
|
{
|
|
3374
3389
|
key: ConfigKey.tag_item,
|
|
3375
|
-
|
|
3376
|
-
|
|
3390
|
+
jsonKey: "lead",
|
|
3391
|
+
description: "The lead for the bit",
|
|
3392
|
+
maxCount: 1,
|
|
3393
|
+
chain: [
|
|
3394
|
+
{
|
|
3395
|
+
key: ConfigKey.tag_item,
|
|
3396
|
+
jsonKey: "pageNumber",
|
|
3397
|
+
description: "The page number for the bit",
|
|
3398
|
+
maxCount: 1,
|
|
3399
|
+
chain: [
|
|
3400
|
+
{
|
|
3401
|
+
key: ConfigKey.tag_item,
|
|
3402
|
+
jsonKey: "marginNumber",
|
|
3403
|
+
description: "The margin number for the bit",
|
|
3404
|
+
maxCount: 1
|
|
3405
|
+
}
|
|
3406
|
+
]
|
|
3407
|
+
}
|
|
3408
|
+
]
|
|
3377
3409
|
}
|
|
3378
3410
|
]
|
|
3411
|
+
}
|
|
3412
|
+
]
|
|
3413
|
+
},
|
|
3414
|
+
[ConfigKey.group_standardItemLeadInstructionHint]: {
|
|
3415
|
+
type: GroupConfigType.standard,
|
|
3416
|
+
description: "Standard group for item, lead, page number, margin number, instruction and hint tags",
|
|
3417
|
+
tags: [
|
|
3418
|
+
{
|
|
3419
|
+
key: ConfigKey.group_standardItemLead,
|
|
3420
|
+
description: "Item, lead, page number, and margin number tags"
|
|
3379
3421
|
},
|
|
3380
3422
|
{
|
|
3381
3423
|
key: ConfigKey.tag_instruction,
|
|
@@ -3414,6 +3456,7 @@ var GROUPS = {
|
|
|
3414
3456
|
tags: [
|
|
3415
3457
|
{
|
|
3416
3458
|
key: ConfigKey.property_imageSource,
|
|
3459
|
+
jsonKey: "imageSource.url",
|
|
3417
3460
|
description: "The source of an image",
|
|
3418
3461
|
format: TagFormat.plainText,
|
|
3419
3462
|
chain: [
|
|
@@ -3447,6 +3490,7 @@ var GROUPS = {
|
|
|
3447
3490
|
tags: [
|
|
3448
3491
|
{
|
|
3449
3492
|
key: ConfigKey.property_technicalTerm,
|
|
3493
|
+
jsonKey: "technicalTerm.technicalTerm",
|
|
3450
3494
|
description: "The technical term",
|
|
3451
3495
|
format: TagFormat.plainText,
|
|
3452
3496
|
chain: [
|
|
@@ -3465,6 +3509,7 @@ var GROUPS = {
|
|
|
3465
3509
|
tags: [
|
|
3466
3510
|
{
|
|
3467
3511
|
key: ConfigKey.property_person,
|
|
3512
|
+
jsonKey: "person.name",
|
|
3468
3513
|
description: "A person",
|
|
3469
3514
|
format: TagFormat.plainText,
|
|
3470
3515
|
chain: [
|
|
@@ -3482,6 +3527,7 @@ var GROUPS = {
|
|
|
3482
3527
|
{
|
|
3483
3528
|
// Deprecated (parter renamed to person)
|
|
3484
3529
|
key: ConfigKey.property_partner,
|
|
3530
|
+
jsonKey: "partner.name",
|
|
3485
3531
|
description: "A partner",
|
|
3486
3532
|
format: TagFormat.plainText,
|
|
3487
3533
|
chain: [
|
|
@@ -3509,6 +3555,7 @@ var GROUPS = {
|
|
|
3509
3555
|
chain: [
|
|
3510
3556
|
{
|
|
3511
3557
|
key: ConfigKey.tag_gap,
|
|
3558
|
+
jsonKey: "solutions[]",
|
|
3512
3559
|
description: "Alternative values for the gaps in the content",
|
|
3513
3560
|
maxCount: Count.infinity
|
|
3514
3561
|
},
|
|
@@ -3518,13 +3565,16 @@ var GROUPS = {
|
|
|
3518
3565
|
},
|
|
3519
3566
|
{
|
|
3520
3567
|
key: ConfigKey.property_example,
|
|
3568
|
+
jsonKey: "example",
|
|
3521
3569
|
description: "An example for the gap",
|
|
3522
3570
|
format: TagFormat.plainText
|
|
3523
3571
|
},
|
|
3524
3572
|
{
|
|
3525
3573
|
key: ConfigKey.property_isCaseSensitive,
|
|
3574
|
+
jsonKey: "isCaseSensitive",
|
|
3526
3575
|
description: "If true, the gap text is case sensitive",
|
|
3527
|
-
format: TagFormat.boolean
|
|
3576
|
+
format: TagFormat.boolean,
|
|
3577
|
+
defaultValue: "true"
|
|
3528
3578
|
}
|
|
3529
3579
|
]
|
|
3530
3580
|
}
|
|
@@ -3541,11 +3591,13 @@ var GROUPS = {
|
|
|
3541
3591
|
chain: [
|
|
3542
3592
|
{
|
|
3543
3593
|
key: ConfigKey.tag_true,
|
|
3594
|
+
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3544
3595
|
description: "True values for a true/false statement/question",
|
|
3545
3596
|
maxCount: Count.infinity
|
|
3546
3597
|
},
|
|
3547
3598
|
{
|
|
3548
3599
|
key: ConfigKey.tag_false,
|
|
3600
|
+
jsonKey: "choices[]|set(isCorrect=false)",
|
|
3549
3601
|
description: "False values for a true/false statement/question",
|
|
3550
3602
|
maxCount: Count.infinity
|
|
3551
3603
|
},
|
|
@@ -3555,6 +3607,7 @@ var GROUPS = {
|
|
|
3555
3607
|
},
|
|
3556
3608
|
{
|
|
3557
3609
|
key: ConfigKey.property_example,
|
|
3610
|
+
jsonKey: "example",
|
|
3558
3611
|
description: "An example for the true/false statement/question",
|
|
3559
3612
|
format: TagFormat.plainText
|
|
3560
3613
|
}
|
|
@@ -3567,11 +3620,13 @@ var GROUPS = {
|
|
|
3567
3620
|
chain: [
|
|
3568
3621
|
{
|
|
3569
3622
|
key: ConfigKey.tag_true,
|
|
3623
|
+
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3570
3624
|
description: "True values for a true/false statement/question",
|
|
3571
3625
|
maxCount: Count.infinity
|
|
3572
3626
|
},
|
|
3573
3627
|
{
|
|
3574
3628
|
key: ConfigKey.tag_false,
|
|
3629
|
+
jsonKey: "choices[]|set(isCorrect=false)",
|
|
3575
3630
|
description: "False values for a true/false statement/question",
|
|
3576
3631
|
maxCount: Count.infinity
|
|
3577
3632
|
},
|
|
@@ -3581,6 +3636,7 @@ var GROUPS = {
|
|
|
3581
3636
|
},
|
|
3582
3637
|
{
|
|
3583
3638
|
key: ConfigKey.property_example,
|
|
3639
|
+
jsonKey: "example",
|
|
3584
3640
|
description: "An example for the true/false statement/question",
|
|
3585
3641
|
format: TagFormat.plainText
|
|
3586
3642
|
}
|
|
@@ -3594,6 +3650,7 @@ var GROUPS = {
|
|
|
3594
3650
|
tags: [
|
|
3595
3651
|
{
|
|
3596
3652
|
key: ConfigKey.property_mark,
|
|
3653
|
+
jsonKey: "marks.mark",
|
|
3597
3654
|
description: "The mark configuration",
|
|
3598
3655
|
format: TagFormat.plainText,
|
|
3599
3656
|
maxCount: Count.infinity,
|
|
@@ -3623,11 +3680,13 @@ var GROUPS = {
|
|
|
3623
3680
|
chain: [
|
|
3624
3681
|
{
|
|
3625
3682
|
key: ConfigKey.property_mark,
|
|
3683
|
+
jsonKey: "mark",
|
|
3626
3684
|
description: "The mark configuration",
|
|
3627
3685
|
format: TagFormat.plainText
|
|
3628
3686
|
},
|
|
3629
3687
|
{
|
|
3630
3688
|
key: ConfigKey.property_example,
|
|
3689
|
+
jsonKey: "example",
|
|
3631
3690
|
description: "An example for the marked content",
|
|
3632
3691
|
format: TagFormat.plainText
|
|
3633
3692
|
}
|
|
@@ -3798,7 +3857,8 @@ var GROUPS = {
|
|
|
3798
3857
|
{
|
|
3799
3858
|
key: ConfigKey.property_maxTocChapterLevel,
|
|
3800
3859
|
description: "The maximum table of contents chapter level",
|
|
3801
|
-
format: TagFormat.number
|
|
3860
|
+
format: TagFormat.number,
|
|
3861
|
+
defaultValue: "-1"
|
|
3802
3862
|
},
|
|
3803
3863
|
{
|
|
3804
3864
|
key: ConfigKey.property_sourceDocument,
|
|
@@ -3880,12 +3940,14 @@ var GROUPS = {
|
|
|
3880
3940
|
{
|
|
3881
3941
|
key: ConfigKey.property_isTracked,
|
|
3882
3942
|
description: "If true, the learning path is tracked",
|
|
3883
|
-
format: TagFormat.boolean
|
|
3943
|
+
format: TagFormat.boolean,
|
|
3944
|
+
defaultValue: "true"
|
|
3884
3945
|
},
|
|
3885
3946
|
{
|
|
3886
3947
|
key: ConfigKey.property_isInfoOnly,
|
|
3887
3948
|
description: "If true, the learning path is info only",
|
|
3888
|
-
format: TagFormat.boolean
|
|
3949
|
+
format: TagFormat.boolean,
|
|
3950
|
+
defaultValue: "false"
|
|
3889
3951
|
},
|
|
3890
3952
|
{
|
|
3891
3953
|
key: ConfigKey.property_deeplink,
|
|
@@ -4229,6 +4291,7 @@ var GROUPS = {
|
|
|
4229
4291
|
},
|
|
4230
4292
|
{
|
|
4231
4293
|
key: ConfigKey.property_posterImage,
|
|
4294
|
+
jsonKey: "posterImage.src",
|
|
4232
4295
|
description: "The poster image for the video",
|
|
4233
4296
|
format: TagFormat.plainText,
|
|
4234
4297
|
chain: [
|
|
@@ -4754,27 +4817,24 @@ var ConfigHydrator = class {
|
|
|
4754
4817
|
const v = this.hydrateCardVariantConfig(_variant);
|
|
4755
4818
|
variantsOfSide.push(v);
|
|
4756
4819
|
}
|
|
4757
|
-
const sideConfig = new CardSideConfig(
|
|
4820
|
+
const sideConfig = new CardSideConfig(
|
|
4821
|
+
_side.name,
|
|
4822
|
+
_side.repeat ?? false,
|
|
4823
|
+
variantsOfSide,
|
|
4824
|
+
_side.jsonKey
|
|
4825
|
+
);
|
|
4758
4826
|
sides.push(sideConfig);
|
|
4759
4827
|
}
|
|
4760
4828
|
const cardSetConfig = new CardSetConfig(
|
|
4761
4829
|
_cardSet,
|
|
4762
4830
|
_cardSetConfig.jsonKey,
|
|
4763
|
-
_cardSetConfig.itemType ?? "object",
|
|
4764
4831
|
_cardSetConfig.sections,
|
|
4765
4832
|
sides
|
|
4766
4833
|
);
|
|
4767
4834
|
return cardSetConfig;
|
|
4768
4835
|
}
|
|
4769
4836
|
hydrateTagConfig(_tag) {
|
|
4770
|
-
const {
|
|
4771
|
-
key: _configKey,
|
|
4772
|
-
maxCount,
|
|
4773
|
-
minCount,
|
|
4774
|
-
chain: _chain,
|
|
4775
|
-
secondaryJsonKey,
|
|
4776
|
-
deprecated
|
|
4777
|
-
} = _tag;
|
|
4837
|
+
const { key: _configKey, maxCount, minCount, chain: _chain, deprecated } = _tag;
|
|
4778
4838
|
const configKey = Enum(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4779
4839
|
if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
|
|
4780
4840
|
const tag = Enum(Tag).fromValue(configKey);
|
|
@@ -4789,7 +4849,6 @@ var ConfigHydrator = class {
|
|
|
4789
4849
|
maxCount: maxCount ?? MAX_COUNT_DEFAULT,
|
|
4790
4850
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4791
4851
|
chain,
|
|
4792
|
-
secondaryJsonKey,
|
|
4793
4852
|
deprecated
|
|
4794
4853
|
});
|
|
4795
4854
|
return {
|
|
@@ -4808,8 +4867,7 @@ var ConfigHydrator = class {
|
|
|
4808
4867
|
format,
|
|
4809
4868
|
values,
|
|
4810
4869
|
defaultValue,
|
|
4811
|
-
jsonKey
|
|
4812
|
-
secondaryJsonKey
|
|
4870
|
+
jsonKey
|
|
4813
4871
|
} = _tag;
|
|
4814
4872
|
const configKey = Enum(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4815
4873
|
if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
|
|
@@ -4825,7 +4883,6 @@ var ConfigHydrator = class {
|
|
|
4825
4883
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4826
4884
|
chain,
|
|
4827
4885
|
jsonKey,
|
|
4828
|
-
secondaryJsonKey,
|
|
4829
4886
|
format,
|
|
4830
4887
|
values,
|
|
4831
4888
|
defaultValue,
|
|
@@ -4838,15 +4895,7 @@ var ConfigHydrator = class {
|
|
|
4838
4895
|
};
|
|
4839
4896
|
}
|
|
4840
4897
|
hydrateResourceTagConfig(_tag) {
|
|
4841
|
-
const {
|
|
4842
|
-
key: _configKey,
|
|
4843
|
-
maxCount,
|
|
4844
|
-
minCount,
|
|
4845
|
-
chain: _chain,
|
|
4846
|
-
deprecated,
|
|
4847
|
-
jsonKey,
|
|
4848
|
-
secondaryJsonKey
|
|
4849
|
-
} = _tag;
|
|
4898
|
+
const { key: _configKey, maxCount, minCount, chain: _chain, deprecated, jsonKey } = _tag;
|
|
4850
4899
|
const configKey = Enum(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4851
4900
|
if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
|
|
4852
4901
|
const tag = _configKey.substring(1);
|
|
@@ -4861,7 +4910,6 @@ var ConfigHydrator = class {
|
|
|
4861
4910
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4862
4911
|
chain,
|
|
4863
4912
|
jsonKey,
|
|
4864
|
-
secondaryJsonKey,
|
|
4865
4913
|
deprecated
|
|
4866
4914
|
});
|
|
4867
4915
|
return {
|
|
@@ -6162,7 +6210,8 @@ var BITS = {
|
|
|
6162
6210
|
{
|
|
6163
6211
|
key: ConfigKey.property_isCaseSensitive,
|
|
6164
6212
|
description: "If the cloze answers are case sensitive",
|
|
6165
|
-
format: TagFormat.boolean
|
|
6213
|
+
format: TagFormat.boolean,
|
|
6214
|
+
defaultValue: "true"
|
|
6166
6215
|
},
|
|
6167
6216
|
{
|
|
6168
6217
|
key: ConfigKey.property_quizCountItems,
|
|
@@ -6608,6 +6657,7 @@ var BITS = {
|
|
|
6608
6657
|
},
|
|
6609
6658
|
{
|
|
6610
6659
|
key: ConfigKey.property_servings,
|
|
6660
|
+
jsonKey: "servings.servings",
|
|
6611
6661
|
description: "The number of servings for the ingredients",
|
|
6612
6662
|
format: TagFormat.number,
|
|
6613
6663
|
chain: [
|
|
@@ -8863,7 +8913,8 @@ var BITS = {
|
|
|
8863
8913
|
{
|
|
8864
8914
|
key: ConfigKey.property_isCaseSensitive,
|
|
8865
8915
|
description: "Case sensitivity for matching pairs, used to define if matches are case-sensitive",
|
|
8866
|
-
format: TagFormat.boolean
|
|
8916
|
+
format: TagFormat.boolean,
|
|
8917
|
+
defaultValue: "true"
|
|
8867
8918
|
}
|
|
8868
8919
|
],
|
|
8869
8920
|
cardSet: CardSetConfigKey.matchPairs
|
|
@@ -9313,7 +9364,8 @@ var BITS = {
|
|
|
9313
9364
|
{
|
|
9314
9365
|
key: ConfigKey.property_platformBrandTarget,
|
|
9315
9366
|
description: 'The platform brand target (typically "light", "dark" or "none")',
|
|
9316
|
-
format: TagFormat.plainText
|
|
9367
|
+
format: TagFormat.plainText,
|
|
9368
|
+
defaultValue: "none"
|
|
9317
9369
|
}
|
|
9318
9370
|
]
|
|
9319
9371
|
},
|
|
@@ -9336,7 +9388,8 @@ var BITS = {
|
|
|
9336
9388
|
{
|
|
9337
9389
|
key: ConfigKey.property_platformLogoMaxHeight,
|
|
9338
9390
|
description: "Maximum height for the platform logo",
|
|
9339
|
-
format: TagFormat.number
|
|
9391
|
+
format: TagFormat.number,
|
|
9392
|
+
defaultValue: "40"
|
|
9340
9393
|
},
|
|
9341
9394
|
{
|
|
9342
9395
|
key: ConfigKey.group_platformStylesCommon,
|
|
@@ -9509,7 +9562,8 @@ var BITS = {
|
|
|
9509
9562
|
{
|
|
9510
9563
|
key: ConfigKey.property_resolved,
|
|
9511
9564
|
description: "Resolved status for the review note, used to indicate if the note is resolved",
|
|
9512
|
-
format: TagFormat.boolean
|
|
9565
|
+
format: TagFormat.boolean,
|
|
9566
|
+
defaultValue: "false"
|
|
9513
9567
|
},
|
|
9514
9568
|
{
|
|
9515
9569
|
key: ConfigKey.property_resolvedDate,
|
|
@@ -9696,6 +9750,7 @@ var BITS = {
|
|
|
9696
9750
|
tags: [
|
|
9697
9751
|
{
|
|
9698
9752
|
key: ConfigKey.property_ratingLevelStart,
|
|
9753
|
+
jsonKey: "ratingLevelStart.level",
|
|
9699
9754
|
description: "Start level for the rating survey, used to define the lowest rating",
|
|
9700
9755
|
format: TagFormat.number,
|
|
9701
9756
|
chain: [
|
|
@@ -9708,6 +9763,7 @@ var BITS = {
|
|
|
9708
9763
|
},
|
|
9709
9764
|
{
|
|
9710
9765
|
key: ConfigKey.property_ratingLevelEnd,
|
|
9766
|
+
jsonKey: "ratingLevelEnd.level",
|
|
9711
9767
|
description: "End level for the rating survey, used to define the highest rating",
|
|
9712
9768
|
format: TagFormat.number,
|
|
9713
9769
|
chain: [
|
|
@@ -9776,28 +9832,32 @@ var BITS = {
|
|
|
9776
9832
|
{
|
|
9777
9833
|
key: ConfigKey.property_tableFixedHeader,
|
|
9778
9834
|
description: "Fixed header for the table, used to keep the header visible while scrolling",
|
|
9779
|
-
format: TagFormat.boolean
|
|
9835
|
+
format: TagFormat.boolean,
|
|
9836
|
+
defaultValue: "false"
|
|
9780
9837
|
},
|
|
9781
9838
|
{
|
|
9782
9839
|
key: ConfigKey.property_tableHeaderWhitespaceNoWrap,
|
|
9783
9840
|
description: "No wrap for table header whitespace, used to prevent header text wrapping",
|
|
9784
|
-
format: TagFormat.boolean
|
|
9785
|
-
|
|
9841
|
+
format: TagFormat.boolean,
|
|
9842
|
+
defaultValue: "false"
|
|
9786
9843
|
},
|
|
9787
9844
|
{
|
|
9788
9845
|
key: ConfigKey.property_tableSearch,
|
|
9789
9846
|
description: "Search functionality for the table, used to enable searching within the table",
|
|
9790
|
-
format: TagFormat.boolean
|
|
9847
|
+
format: TagFormat.boolean,
|
|
9848
|
+
defaultValue: "false"
|
|
9791
9849
|
},
|
|
9792
9850
|
{
|
|
9793
9851
|
key: ConfigKey.property_tableSort,
|
|
9794
9852
|
description: "Sorting functionality for the table, used to enable sorting of table columns",
|
|
9795
|
-
format: TagFormat.boolean
|
|
9853
|
+
format: TagFormat.boolean,
|
|
9854
|
+
defaultValue: "false"
|
|
9796
9855
|
},
|
|
9797
9856
|
{
|
|
9798
9857
|
key: ConfigKey.property_tablePagination,
|
|
9799
9858
|
description: "Pagination for the table, used to limit the number of rows displayed at once",
|
|
9800
|
-
format: TagFormat.boolean
|
|
9859
|
+
format: TagFormat.boolean,
|
|
9860
|
+
defaultValue: "false"
|
|
9801
9861
|
},
|
|
9802
9862
|
{
|
|
9803
9863
|
key: ConfigKey.property_tablePaginationLimit,
|
|
@@ -9814,24 +9874,26 @@ var BITS = {
|
|
|
9814
9874
|
{
|
|
9815
9875
|
key: ConfigKey.property_tableWhitespaceNoWrap,
|
|
9816
9876
|
description: "No wrap for table whitespace, used to prevent text wrapping in table cells",
|
|
9817
|
-
format: TagFormat.boolean
|
|
9818
|
-
|
|
9877
|
+
format: TagFormat.boolean,
|
|
9878
|
+
defaultValue: "false"
|
|
9819
9879
|
},
|
|
9820
9880
|
{
|
|
9821
9881
|
key: ConfigKey.property_tableAutoWidth,
|
|
9822
9882
|
description: "Auto width for table columns, used to automatically adjust column widths",
|
|
9823
|
-
format: TagFormat.boolean
|
|
9824
|
-
|
|
9883
|
+
format: TagFormat.boolean,
|
|
9884
|
+
defaultValue: "true"
|
|
9825
9885
|
},
|
|
9826
9886
|
{
|
|
9827
9887
|
key: ConfigKey.property_tableResizableColumns,
|
|
9828
9888
|
description: "Resizable columns for the table, used to allow users to resize table columns",
|
|
9829
|
-
format: TagFormat.boolean
|
|
9889
|
+
format: TagFormat.boolean,
|
|
9890
|
+
defaultValue: "false"
|
|
9830
9891
|
},
|
|
9831
9892
|
{
|
|
9832
9893
|
key: ConfigKey.property_tableColumnMinWidth,
|
|
9833
9894
|
description: "Minimum width for table columns, used to define the minimum width of columns",
|
|
9834
|
-
format: TagFormat.number
|
|
9895
|
+
format: TagFormat.number,
|
|
9896
|
+
defaultValue: "0"
|
|
9835
9897
|
}
|
|
9836
9898
|
],
|
|
9837
9899
|
cardSet: CardSetConfigKey.table
|
|
@@ -9839,7 +9901,8 @@ var BITS = {
|
|
|
9839
9901
|
[BitType.tableExtended]: {
|
|
9840
9902
|
since: "4.14.0",
|
|
9841
9903
|
baseBitType: BitType.table,
|
|
9842
|
-
description: "Extended table bit, used to create complex tables with all HTML table features"
|
|
9904
|
+
description: "Extended table bit, used to create complex tables with all HTML table features",
|
|
9905
|
+
cardSet: CardSetConfigKey.tableExtended
|
|
9843
9906
|
},
|
|
9844
9907
|
[BitType.tableExtendedImage]: {
|
|
9845
9908
|
since: "5.13.0",
|
|
@@ -10805,7 +10868,6 @@ var Config = class {
|
|
|
10805
10868
|
maxCount: 1,
|
|
10806
10869
|
chain: tag.chain,
|
|
10807
10870
|
jsonKey: tag.jsonKey,
|
|
10808
|
-
secondaryJsonKey: tag.secondaryJsonKey,
|
|
10809
10871
|
deprecated: tag.deprecated
|
|
10810
10872
|
});
|
|
10811
10873
|
finalResourceTags[k] = newTag;
|
|
@@ -10910,7 +10972,7 @@ var instance2 = new Config();
|
|
|
10910
10972
|
// src/generated/package_info.ts
|
|
10911
10973
|
var PACKAGE_INFO = {
|
|
10912
10974
|
"name": "@gmb/bitmark-parser-generator",
|
|
10913
|
-
"version": "5.
|
|
10975
|
+
"version": "5.20.0",
|
|
10914
10976
|
"license": "ISC"};
|
|
10915
10977
|
var Environment = {
|
|
10916
10978
|
unknown: "",
|
|
@@ -11439,6 +11501,8 @@ var NodeType = {
|
|
|
11439
11501
|
extractorExtractionTimestampValue: "extractorExtractionTimestampValue",
|
|
11440
11502
|
extractorTag: "extractorTag",
|
|
11441
11503
|
extractorTagValue: "extractorTagValue",
|
|
11504
|
+
extractorInternal: "extractorInternal",
|
|
11505
|
+
extractorInternalValue: "extractorInternalValue",
|
|
11442
11506
|
extraProperties: "extraProperties",
|
|
11443
11507
|
feedback: "feedback",
|
|
11444
11508
|
feedbackEngine: "feedbackEngine",
|
|
@@ -11844,6 +11908,8 @@ var NodeType = {
|
|
|
11844
11908
|
table: "table",
|
|
11845
11909
|
tableAutoWidth: "tableAutoWidth",
|
|
11846
11910
|
tableAutoWidthValue: "tableAutoWidthValue",
|
|
11911
|
+
tableColWidth: "tableColWidth",
|
|
11912
|
+
tableColWidthValue: "tableColWidthValue",
|
|
11847
11913
|
tableColumnMinWidth: "tableColumnMinWidth",
|
|
11848
11914
|
tableColumnMinWidthValue: "tableColumnMinWidthValue",
|
|
11849
11915
|
tableFixedHeader: "tableFixedHeader",
|
|
@@ -24652,6 +24718,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24652
24718
|
data.extractorTag,
|
|
24653
24719
|
options
|
|
24654
24720
|
),
|
|
24721
|
+
extractorInternal: this.toAstProperty(
|
|
24722
|
+
bitType,
|
|
24723
|
+
ConfigKey.property_extractorInternal,
|
|
24724
|
+
data.extractorInternal,
|
|
24725
|
+
options
|
|
24726
|
+
),
|
|
24655
24727
|
levelCEFRp: this.toAstProperty(
|
|
24656
24728
|
bitType,
|
|
24657
24729
|
ConfigKey.property_levelCEFRp,
|
|
@@ -26139,6 +26211,7 @@ var Builder = class extends BaseBuilder {
|
|
|
26139
26211
|
if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
|
|
26140
26212
|
if (cell.colspan != null) tableCell.colspan = cell.colspan;
|
|
26141
26213
|
if (cell.scope) tableCell.scope = cell.scope;
|
|
26214
|
+
if (cell.colwidth != null) tableCell.colwidth = cell.colwidth;
|
|
26142
26215
|
return tableCell;
|
|
26143
26216
|
});
|
|
26144
26217
|
return {
|
|
@@ -28418,6 +28491,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
28418
28491
|
this.writeTableCellProperty("tableScope", cell.scope);
|
|
28419
28492
|
this.writeNL();
|
|
28420
28493
|
}
|
|
28494
|
+
if (cell.colwidth && cell.colwidth > 0) {
|
|
28495
|
+
this.writeTableCellProperty("tableColWidth", cell.colwidth);
|
|
28496
|
+
this.writeNL();
|
|
28497
|
+
}
|
|
28421
28498
|
const content = cell.content ?? instance3.EMPTY_STRING;
|
|
28422
28499
|
this.writeTextOrValue(content, this.textFormat, TextLocation.body);
|
|
28423
28500
|
}
|
|
@@ -30971,7 +31048,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
30971
31048
|
if (bitJson.isTracked == null) bitJson.isTracked = true;
|
|
30972
31049
|
if (bitJson.isInfoOnly == null) bitJson.isInfoOnly = false;
|
|
30973
31050
|
}
|
|
30974
|
-
|
|
31051
|
+
const tableImageHasTable = instance2.isOfBitType(bitType, BitType.tableImage) && !this.tableIsEmpty(bitJson.table);
|
|
31052
|
+
if (instance2.isOfBitType(bitType, BitType.table) && !instance2.isOfBitType(bitType, BitType.tableImage) || tableImageHasTable) {
|
|
30975
31053
|
if (bitJson.tableFixedHeader == null) bitJson.tableFixedHeader = false;
|
|
30976
31054
|
if (bitJson.tableHeaderWhitespaceNoWrap == null) {
|
|
30977
31055
|
bitJson.tableHeaderWhitespaceNoWrap = false;
|
|
@@ -30986,10 +31064,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
30986
31064
|
if (bitJson.tableResizableColumns == null) bitJson.tableResizableColumns = false;
|
|
30987
31065
|
if (bitJson.tableColumnMinWidth == null) bitJson.tableColumnMinWidth = 0;
|
|
30988
31066
|
}
|
|
30989
|
-
if (instance2.isOfBitType(bitType, BitType.tableImage)) {
|
|
30990
|
-
|
|
30991
|
-
delete bitJson.table;
|
|
30992
|
-
}
|
|
31067
|
+
if (instance2.isOfBitType(bitType, BitType.tableImage) && !tableImageHasTable) {
|
|
31068
|
+
delete bitJson.table;
|
|
30993
31069
|
}
|
|
30994
31070
|
if (instance2.isOfBitType(bitType, BitType.bookReference)) {
|
|
30995
31071
|
if (bitJson.refAuthor == null) bitJson.refAuthor = [];
|
|
@@ -33733,11 +33809,19 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
33733
33809
|
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
33734
33810
|
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
33735
33811
|
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
33736
|
-
|
|
33812
|
+
const colWidthRaw = tags2.tableColWidth ?? readExtraProperty(tags2.extraProperties, "tableColWidth");
|
|
33813
|
+
cleanupExtraProperties(tags2, [
|
|
33814
|
+
"tableCellType",
|
|
33815
|
+
"tableRowSpan",
|
|
33816
|
+
"tableColSpan",
|
|
33817
|
+
"tableScope",
|
|
33818
|
+
"tableColWidth"
|
|
33819
|
+
]);
|
|
33737
33820
|
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
33738
33821
|
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
33739
33822
|
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
33740
33823
|
const scope = normalizeScope(scopeRaw);
|
|
33824
|
+
const colwidth = instance6.asNumber(colWidthRaw) ?? 0;
|
|
33741
33825
|
const cell = {
|
|
33742
33826
|
content
|
|
33743
33827
|
};
|
|
@@ -33745,6 +33829,7 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
33745
33829
|
if (rowspan > 1) cell.rowspan = rowspan;
|
|
33746
33830
|
if (colspan > 1) cell.colspan = colspan;
|
|
33747
33831
|
if (scope) cell.scope = scope;
|
|
33832
|
+
if (colwidth > 0) cell.colwidth = colwidth;
|
|
33748
33833
|
return cell;
|
|
33749
33834
|
};
|
|
33750
33835
|
const resolveSectionQualifier = (card) => {
|
|
@@ -34124,6 +34209,15 @@ function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, conten
|
|
|
34124
34209
|
}
|
|
34125
34210
|
|
|
34126
34211
|
// src/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.ts
|
|
34212
|
+
function flattenChainContent(content) {
|
|
34213
|
+
const result = [content];
|
|
34214
|
+
if (content.chain) {
|
|
34215
|
+
for (const child of content.chain) {
|
|
34216
|
+
result.push(...flattenChainContent(child));
|
|
34217
|
+
}
|
|
34218
|
+
}
|
|
34219
|
+
return result;
|
|
34220
|
+
}
|
|
34127
34221
|
function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, content, target) {
|
|
34128
34222
|
if (contentDepth === ContentDepth.Chain) {
|
|
34129
34223
|
itemLeadTagContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
@@ -34134,7 +34228,7 @@ function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, conten
|
|
|
34134
34228
|
function buildItemLead(context, _contentDepth, tagsConfig, content, target) {
|
|
34135
34229
|
if (context.DEBUG_CHAIN_CONTENT) context.debugPrint("item lead content", content);
|
|
34136
34230
|
const itemLeadConfig = instance2.getTagConfigForTag(tagsConfig, Enum(Tag).fromValue(content.type));
|
|
34137
|
-
const chainContent =
|
|
34231
|
+
const chainContent = flattenChainContent(content);
|
|
34138
34232
|
const chainTags = context.bitContentProcessor(
|
|
34139
34233
|
ContentDepth.Chain,
|
|
34140
34234
|
itemLeadConfig?.chain,
|
|
@@ -34677,7 +34771,6 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
|
|
|
34677
34771
|
minCount: 1,
|
|
34678
34772
|
chain: void 0,
|
|
34679
34773
|
jsonKey: void 0,
|
|
34680
|
-
secondaryJsonKey: void 0,
|
|
34681
34774
|
format: TagFormat.bitmarkText,
|
|
34682
34775
|
values: void 0,
|
|
34683
34776
|
defaultValue: void 0,
|
|
@@ -39611,7 +39704,6 @@ var normalizeCardKey = (cardSetKey) => stringUtils.camelToKebab(cardSetKey);
|
|
|
39611
39704
|
var ConfigBuilder = class {
|
|
39612
39705
|
build(options) {
|
|
39613
39706
|
const opts = Object.assign({}, options);
|
|
39614
|
-
this.buildFlat(opts);
|
|
39615
39707
|
const bitConfigs = [];
|
|
39616
39708
|
const groupConfigs = [];
|
|
39617
39709
|
const bitGroupConfigKeys = /* @__PURE__ */ new Set();
|
|
@@ -39682,7 +39774,7 @@ var ConfigBuilder = class {
|
|
|
39682
39774
|
const keyToJsonKey = (key, tagNameChain) => {
|
|
39683
39775
|
let jsonKey = key;
|
|
39684
39776
|
if (key === "%") {
|
|
39685
|
-
jsonKey = "
|
|
39777
|
+
jsonKey = "item";
|
|
39686
39778
|
} else if (key === "!") {
|
|
39687
39779
|
jsonKey = "instruction";
|
|
39688
39780
|
} else if (key === "?") {
|
|
@@ -39698,13 +39790,13 @@ var ConfigBuilder = class {
|
|
|
39698
39790
|
} else if (key === "$") {
|
|
39699
39791
|
jsonKey = "sampleSolution";
|
|
39700
39792
|
} else if (key === "+") {
|
|
39701
|
-
jsonKey = "
|
|
39793
|
+
jsonKey = "choices[]|set(isCorrect=true)";
|
|
39702
39794
|
} else if (key === "-") {
|
|
39703
|
-
jsonKey = "
|
|
39795
|
+
jsonKey = "choices[]|set(isCorrect=false)";
|
|
39704
39796
|
} else if (key === "_") {
|
|
39705
|
-
jsonKey = "
|
|
39797
|
+
jsonKey = "solutions[]";
|
|
39706
39798
|
} else if (key === "=") {
|
|
39707
|
-
jsonKey = "
|
|
39799
|
+
jsonKey = "solution";
|
|
39708
39800
|
} else if (key.startsWith("@")) {
|
|
39709
39801
|
jsonKey = key.substring(1);
|
|
39710
39802
|
} else if (key.startsWith("&")) {
|
|
@@ -39755,7 +39847,7 @@ var ConfigBuilder = class {
|
|
|
39755
39847
|
if (Array.isArray(tag.chain) && tag.chain.length > 0) {
|
|
39756
39848
|
const chainTags = [];
|
|
39757
39849
|
for (const [_tagKey, chainTag] of tag.chain.entries()) {
|
|
39758
|
-
chainTags.push(...processTagEntries(chainTag, [
|
|
39850
|
+
chainTags.push(...processTagEntries(chainTag, []));
|
|
39759
39851
|
}
|
|
39760
39852
|
chain = chainTags;
|
|
39761
39853
|
}
|
|
@@ -39763,10 +39855,8 @@ var ConfigBuilder = class {
|
|
|
39763
39855
|
type: "tag",
|
|
39764
39856
|
key: tagName,
|
|
39765
39857
|
jsonKey,
|
|
39766
|
-
...tag.secondaryJsonKey ? { secondaryJsonKey: tag.secondaryJsonKey } : {},
|
|
39767
39858
|
format,
|
|
39768
|
-
default: null,
|
|
39769
|
-
alwaysInclude: false,
|
|
39859
|
+
default: tag.defaultValue ?? null,
|
|
39770
39860
|
min: tag.minCount == null ? 0 : tag.minCount,
|
|
39771
39861
|
max: tag.maxCount == null ? 1 : tag.maxCount,
|
|
39772
39862
|
description: tag.description ?? "",
|
|
@@ -39800,22 +39890,51 @@ var ConfigBuilder = class {
|
|
|
39800
39890
|
...variant.jsonKey !== void 0 ? { jsonKey: variant.jsonKey } : {},
|
|
39801
39891
|
tags: variantTags,
|
|
39802
39892
|
repeatCount: variant.repeatCount ?? 1,
|
|
39803
|
-
|
|
39804
|
-
|
|
39893
|
+
...variant.bodyRequired ? { bodyRequired: true } : {},
|
|
39894
|
+
...variant.bodyAllowed === false ? { bodyForbidden: true } : {}
|
|
39805
39895
|
};
|
|
39806
39896
|
});
|
|
39807
39897
|
return {
|
|
39808
39898
|
name: side.name,
|
|
39809
39899
|
...side.repeat ? { repeat: side.repeat } : {},
|
|
39900
|
+
...side.jsonKey != null ? { jsonKey: side.jsonKey } : {},
|
|
39810
39901
|
variants
|
|
39811
39902
|
};
|
|
39812
39903
|
});
|
|
39904
|
+
if (cardSetConfig.sections) {
|
|
39905
|
+
const cards = Object.entries(cardSetConfig.sections).map(([sectionName, section]) => {
|
|
39906
|
+
let cardSides = section.sideJsonKey ? sides.map((s) => ({ ...s, jsonKey: section.sideJsonKey })) : sides;
|
|
39907
|
+
if (normalizedKey === "table-extended" && sectionName !== "table-header") {
|
|
39908
|
+
cardSides = JSON.parse(JSON.stringify(cardSides));
|
|
39909
|
+
for (const side of cardSides) {
|
|
39910
|
+
for (const variant of side.variants) {
|
|
39911
|
+
for (const tag of variant.tags) {
|
|
39912
|
+
if (tag.type === "tag" && tag.key === "#" && tag.jsonKey === ".") {
|
|
39913
|
+
tag.jsonKey = "^table.header.rows.cells[{s}].content";
|
|
39914
|
+
}
|
|
39915
|
+
}
|
|
39916
|
+
}
|
|
39917
|
+
}
|
|
39918
|
+
}
|
|
39919
|
+
return {
|
|
39920
|
+
name: sectionName,
|
|
39921
|
+
...section.isDefault ? { isDefault: true } : {},
|
|
39922
|
+
jsonKey: section.jsonKey,
|
|
39923
|
+
sides: cardSides
|
|
39924
|
+
};
|
|
39925
|
+
});
|
|
39926
|
+
return { name: normalizedKey, cards };
|
|
39927
|
+
}
|
|
39813
39928
|
return {
|
|
39814
|
-
|
|
39815
|
-
|
|
39816
|
-
|
|
39817
|
-
|
|
39818
|
-
|
|
39929
|
+
name: normalizedKey,
|
|
39930
|
+
cards: [
|
|
39931
|
+
{
|
|
39932
|
+
name: "default",
|
|
39933
|
+
isDefault: true,
|
|
39934
|
+
jsonKey: cardSetConfig.jsonKey,
|
|
39935
|
+
sides
|
|
39936
|
+
}
|
|
39937
|
+
]
|
|
39819
39938
|
};
|
|
39820
39939
|
};
|
|
39821
39940
|
for (const bt of bitGroupConfigKeys) {
|
|
@@ -39882,8 +40001,13 @@ var ConfigBuilder = class {
|
|
|
39882
40001
|
}
|
|
39883
40002
|
}
|
|
39884
40003
|
let cardRef;
|
|
39885
|
-
|
|
39886
|
-
|
|
40004
|
+
let current = b;
|
|
40005
|
+
while (current) {
|
|
40006
|
+
if (current.cardSet && CARDSETS[current.cardSet]) {
|
|
40007
|
+
cardRef = normalizeCardKey(current.cardSet);
|
|
40008
|
+
break;
|
|
40009
|
+
}
|
|
40010
|
+
current = current.baseBitType ? BITS[current.baseBitType] : void 0;
|
|
39887
40011
|
}
|
|
39888
40012
|
const bitJson = {
|
|
39889
40013
|
name: b.bitType,
|
|
@@ -39897,10 +40021,10 @@ var ConfigBuilder = class {
|
|
|
39897
40021
|
}
|
|
39898
40022
|
],
|
|
39899
40023
|
format: resolvedBitConfig.textFormatDefault ?? "bitmark--",
|
|
39900
|
-
bodyAllowed: resolvedBitConfig.bodyAllowed ?? true,
|
|
39901
40024
|
bodyRequired: resolvedBitConfig.bodyRequired ?? false,
|
|
39902
|
-
|
|
40025
|
+
bodyForbidden: !(resolvedBitConfig.bodyAllowed ?? true),
|
|
39903
40026
|
footerRequired: resolvedBitConfig.footerRequired ?? false,
|
|
40027
|
+
footerForbidden: !(resolvedBitConfig.footerAllowed ?? true),
|
|
39904
40028
|
resourceAttachmentAllowed: resolvedBitConfig.resourceAttachmentAllowed ?? true,
|
|
39905
40029
|
tags: tags2,
|
|
39906
40030
|
...cardRef ? { card: cardRef } : {}
|
|
@@ -39974,7 +40098,7 @@ var ConfigBuilder = class {
|
|
|
39974
40098
|
for (const cardSetKey of Object.keys(CARDSETS)) {
|
|
39975
40099
|
const cardJson = serializeCardSet(cardSetKey);
|
|
39976
40100
|
if (!cardJson) continue;
|
|
39977
|
-
const output = path3.join(outputFolderCards, `${cardJson.
|
|
40101
|
+
const output = path3.join(outputFolderCards, `${cardJson.name}.jsonc`);
|
|
39978
40102
|
const str = JSON.stringify(cardJson, null, 2);
|
|
39979
40103
|
fileWrites.push(fs3.writeFile(output, str));
|
|
39980
40104
|
}
|
|
@@ -40141,22 +40265,26 @@ var ConfigBuilder = class {
|
|
|
40141
40265
|
if (config.key && config.key !== expectedKey) {
|
|
40142
40266
|
errors.push(`Card key mismatch in cards/${file}: expected '${expectedKey}'`);
|
|
40143
40267
|
}
|
|
40144
|
-
if (Array.isArray(config.
|
|
40145
|
-
config.
|
|
40146
|
-
|
|
40147
|
-
|
|
40148
|
-
|
|
40149
|
-
|
|
40150
|
-
|
|
40151
|
-
|
|
40152
|
-
variantTags
|
|
40153
|
-
|
|
40154
|
-
|
|
40155
|
-
|
|
40268
|
+
if (Array.isArray(config.cards)) {
|
|
40269
|
+
for (const cardNode of config.cards) {
|
|
40270
|
+
if (cardNode && Array.isArray(cardNode.sides)) {
|
|
40271
|
+
cardNode.sides.forEach((side, sideIdx) => {
|
|
40272
|
+
const variants = side.variants;
|
|
40273
|
+
if (Array.isArray(variants)) {
|
|
40274
|
+
variants.forEach((variant, variantIdx) => {
|
|
40275
|
+
const variantTags = variant.tags;
|
|
40276
|
+
if (Array.isArray(variantTags)) {
|
|
40277
|
+
checkTags(
|
|
40278
|
+
variantTags,
|
|
40279
|
+
`cards/${file} (side ${sideIdx}, variant ${variantIdx})`,
|
|
40280
|
+
10
|
|
40281
|
+
);
|
|
40282
|
+
}
|
|
40283
|
+
});
|
|
40156
40284
|
}
|
|
40157
40285
|
});
|
|
40158
40286
|
}
|
|
40159
|
-
}
|
|
40287
|
+
}
|
|
40160
40288
|
}
|
|
40161
40289
|
} catch (err) {
|
|
40162
40290
|
errors.push(`Failed to parse cards/${file}: ${err}`);
|
|
@@ -40165,128 +40293,6 @@ var ConfigBuilder = class {
|
|
|
40165
40293
|
}
|
|
40166
40294
|
return errors;
|
|
40167
40295
|
}
|
|
40168
|
-
// Build flat bit configs
|
|
40169
|
-
buildFlat(options) {
|
|
40170
|
-
const opts = Object.assign({}, options);
|
|
40171
|
-
const bitConfigs = [];
|
|
40172
|
-
for (const bt of Enum(BitType).values()) {
|
|
40173
|
-
const bitType = instance2.getBitType(bt);
|
|
40174
|
-
const bitConfig = instance2.getBitConfig(bitType);
|
|
40175
|
-
if (bitConfig) bitConfigs.push(bitConfig);
|
|
40176
|
-
}
|
|
40177
|
-
const outputFolder = opts.outputDir ?? "assets/config";
|
|
40178
|
-
const outputFolderBits = path3.join(outputFolder, "bits_flat");
|
|
40179
|
-
fs3.ensureDirSync(outputFolderBits);
|
|
40180
|
-
const existingFiles = fs3.readdirSync(outputFolderBits).filter((f) => f.endsWith(".jsonc"));
|
|
40181
|
-
for (const file of existingFiles) {
|
|
40182
|
-
fs3.removeSync(path3.join(outputFolderBits, file));
|
|
40183
|
-
}
|
|
40184
|
-
const processTagEntries = (tag) => {
|
|
40185
|
-
const tags2 = [];
|
|
40186
|
-
let tagName = tag.key;
|
|
40187
|
-
const tagType = typeFromConfigKey(tag.key);
|
|
40188
|
-
let format = "";
|
|
40189
|
-
let chain = void 0;
|
|
40190
|
-
if (tagType === BitTagConfigKeyType.tag) {
|
|
40191
|
-
tagName = tag.name;
|
|
40192
|
-
format = "bitmark--";
|
|
40193
|
-
} else if (tagType === BitTagConfigKeyType.property) {
|
|
40194
|
-
tagName = tag.key;
|
|
40195
|
-
if (tag.format === TagFormat.plainText) {
|
|
40196
|
-
format = "string";
|
|
40197
|
-
} else if (tag.format === TagFormat.boolean) {
|
|
40198
|
-
format = "bool";
|
|
40199
|
-
} else if (tag.format === TagFormat.bitmarkText) {
|
|
40200
|
-
format = "bitmark";
|
|
40201
|
-
} else if (tag.format === TagFormat.number) {
|
|
40202
|
-
format = "number";
|
|
40203
|
-
}
|
|
40204
|
-
} else if (tagType === BitTagConfigKeyType.resource) {
|
|
40205
|
-
format = "string";
|
|
40206
|
-
} else if (tagType === BitTagConfigKeyType.group) {
|
|
40207
|
-
let k = tag.key;
|
|
40208
|
-
if (k.startsWith("group_")) k = k.substring(6);
|
|
40209
|
-
k = /*'_' +*/
|
|
40210
|
-
stringUtils.camelToKebab(k);
|
|
40211
|
-
tags2.push({
|
|
40212
|
-
type: "group",
|
|
40213
|
-
key: k
|
|
40214
|
-
});
|
|
40215
|
-
return tags2;
|
|
40216
|
-
}
|
|
40217
|
-
if (Array.isArray(tag.chain) && tag.chain.length > 0) {
|
|
40218
|
-
const chainTags = [];
|
|
40219
|
-
for (const [_tagKey, chainTag] of tag.chain.entries()) {
|
|
40220
|
-
chainTags.push(...processTagEntries(chainTag));
|
|
40221
|
-
}
|
|
40222
|
-
chain = chainTags;
|
|
40223
|
-
}
|
|
40224
|
-
const t = {
|
|
40225
|
-
key: tagName,
|
|
40226
|
-
format,
|
|
40227
|
-
default: null,
|
|
40228
|
-
alwaysInclude: false,
|
|
40229
|
-
min: tag.minCount == null ? 0 : tag.minCount,
|
|
40230
|
-
max: tag.maxCount == null ? 1 : tag.maxCount,
|
|
40231
|
-
description: tag.description ?? "",
|
|
40232
|
-
chain
|
|
40233
|
-
// raw: {
|
|
40234
|
-
// ...tag,
|
|
40235
|
-
// },
|
|
40236
|
-
};
|
|
40237
|
-
tags2.push(t);
|
|
40238
|
-
return tags2;
|
|
40239
|
-
};
|
|
40240
|
-
for (const b of bitConfigs) {
|
|
40241
|
-
const tags2 = [];
|
|
40242
|
-
const tagEntriesTypeOrder = [
|
|
40243
|
-
BitTagConfigKeyType.tag,
|
|
40244
|
-
BitTagConfigKeyType.property,
|
|
40245
|
-
BitTagConfigKeyType.resource,
|
|
40246
|
-
BitTagConfigKeyType.group,
|
|
40247
|
-
BitTagConfigKeyType.unknown
|
|
40248
|
-
];
|
|
40249
|
-
const tagEntries = Object.entries(b.tags ?? []).sort((a, b2) => {
|
|
40250
|
-
const tagA = a[1];
|
|
40251
|
-
const tagB = b2[1];
|
|
40252
|
-
const typeA = typeFromConfigKey(tagA.configKey);
|
|
40253
|
-
const typeB = typeFromConfigKey(tagB.configKey);
|
|
40254
|
-
const typeOrder = tagEntriesTypeOrder.indexOf(typeA) - tagEntriesTypeOrder.indexOf(typeB);
|
|
40255
|
-
return typeOrder;
|
|
40256
|
-
});
|
|
40257
|
-
for (const [_tagKey, tag] of tagEntries) {
|
|
40258
|
-
tags2.push(...processTagEntries(tag));
|
|
40259
|
-
}
|
|
40260
|
-
let cardRef;
|
|
40261
|
-
const cardSetKey = b.cardSet?.configKey;
|
|
40262
|
-
if (cardSetKey && CARDSETS[cardSetKey]) {
|
|
40263
|
-
cardRef = normalizeCardKey(cardSetKey);
|
|
40264
|
-
}
|
|
40265
|
-
const bitJson = {
|
|
40266
|
-
name: b.bitType,
|
|
40267
|
-
description: "",
|
|
40268
|
-
since: b.since,
|
|
40269
|
-
deprecated: b.deprecated,
|
|
40270
|
-
history: [
|
|
40271
|
-
{
|
|
40272
|
-
version: b.since,
|
|
40273
|
-
changes: ["Initial version"]
|
|
40274
|
-
}
|
|
40275
|
-
],
|
|
40276
|
-
format: b.textFormatDefault ?? "bitmark--",
|
|
40277
|
-
bodyAllowed: b.bodyAllowed ?? true,
|
|
40278
|
-
bodyRequired: b.bodyRequired ?? false,
|
|
40279
|
-
footerAllowed: b.footerAllowed ?? true,
|
|
40280
|
-
footerRequired: b.footerRequired ?? false,
|
|
40281
|
-
resourceAttachmentAllowed: b.resourceAttachmentAllowed ?? true,
|
|
40282
|
-
tags: tags2,
|
|
40283
|
-
...cardRef ? { card: cardRef } : {}
|
|
40284
|
-
};
|
|
40285
|
-
const output = path3.join(outputFolderBits, `${b.bitType}.jsonc`);
|
|
40286
|
-
const str = JSON.stringify(bitJson, null, 2);
|
|
40287
|
-
fs3.writeFileSync(output, str);
|
|
40288
|
-
}
|
|
40289
|
-
}
|
|
40290
40296
|
};
|
|
40291
40297
|
|
|
40292
40298
|
// src/BitmarkParserGenerator.ts
|