@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/index.cjs
CHANGED
|
@@ -850,8 +850,6 @@ var AbstractTagConfig = class {
|
|
|
850
850
|
__publicField(this, "chain");
|
|
851
851
|
__publicField(this, "jsonKey");
|
|
852
852
|
// If the json key is different from the tag
|
|
853
|
-
__publicField(this, "secondaryJsonKey");
|
|
854
|
-
// Heading card alternate path
|
|
855
853
|
__publicField(this, "deprecated");
|
|
856
854
|
this.type = params.type;
|
|
857
855
|
this.configKey = params.configKey;
|
|
@@ -860,7 +858,6 @@ var AbstractTagConfig = class {
|
|
|
860
858
|
this.minCount = params.minCount;
|
|
861
859
|
this.chain = params.chain;
|
|
862
860
|
this.jsonKey = params.jsonKey;
|
|
863
|
-
this.secondaryJsonKey = params.secondaryJsonKey;
|
|
864
861
|
this.deprecated = params.deprecated;
|
|
865
862
|
}
|
|
866
863
|
};
|
|
@@ -1021,12 +1018,14 @@ ${tag.toString(opts)}`;
|
|
|
1021
1018
|
|
|
1022
1019
|
// src/model/config/CardSideConfig.ts
|
|
1023
1020
|
var CardSideConfig = class {
|
|
1024
|
-
constructor(name, repeat, variants) {
|
|
1021
|
+
constructor(name, repeat, variants, jsonKey) {
|
|
1025
1022
|
__publicField(this, "name");
|
|
1026
1023
|
__publicField(this, "repeat");
|
|
1024
|
+
__publicField(this, "jsonKey");
|
|
1027
1025
|
__publicField(this, "variants");
|
|
1028
1026
|
this.name = name;
|
|
1029
1027
|
this.repeat = repeat;
|
|
1028
|
+
this.jsonKey = jsonKey;
|
|
1030
1029
|
this.variants = variants;
|
|
1031
1030
|
}
|
|
1032
1031
|
toString(options) {
|
|
@@ -1048,15 +1047,13 @@ var CardSideConfig = class {
|
|
|
1048
1047
|
|
|
1049
1048
|
// src/model/config/CardSetConfig.ts
|
|
1050
1049
|
var CardSetConfig = class {
|
|
1051
|
-
constructor(configKey, jsonKey,
|
|
1050
|
+
constructor(configKey, jsonKey, sections, sides) {
|
|
1052
1051
|
__publicField(this, "configKey");
|
|
1053
1052
|
__publicField(this, "jsonKey");
|
|
1054
|
-
__publicField(this, "itemType");
|
|
1055
1053
|
__publicField(this, "sections");
|
|
1056
1054
|
__publicField(this, "sides");
|
|
1057
1055
|
this.configKey = configKey;
|
|
1058
1056
|
this.jsonKey = jsonKey;
|
|
1059
|
-
this.itemType = itemType;
|
|
1060
1057
|
this.sections = sections;
|
|
1061
1058
|
this.sides = sides;
|
|
1062
1059
|
}
|
|
@@ -1071,8 +1068,6 @@ var CardSetConfig = class {
|
|
|
1071
1068
|
s += `[CardSet: ${this.configKey}]`;
|
|
1072
1069
|
s += `
|
|
1073
1070
|
jsonKey: ${this.jsonKey}`;
|
|
1074
|
-
s += `
|
|
1075
|
-
itemType: ${this.itemType}`;
|
|
1076
1071
|
for (const side of this.sides) {
|
|
1077
1072
|
s += `
|
|
1078
1073
|
${side.toString(opts)}`;
|
|
@@ -1200,6 +1195,7 @@ var import_superenum14 = require("@ncoderz/superenum");
|
|
|
1200
1195
|
var import_superenum10 = require("@ncoderz/superenum");
|
|
1201
1196
|
var groupKeys = {
|
|
1202
1197
|
group_standardAllBits: "group_standardAllBits",
|
|
1198
|
+
group_standardItemLead: "group_standardItemLead",
|
|
1203
1199
|
group_standardItemLeadInstructionHint: "group_standardItemLeadInstructionHint",
|
|
1204
1200
|
group_standardTags: "group_standardTags",
|
|
1205
1201
|
group_imageSource: "group_imageSource",
|
|
@@ -1283,6 +1279,7 @@ var propertyKeys = {
|
|
|
1283
1279
|
property_bot: "@bot",
|
|
1284
1280
|
property_bubbleTag: "@bubbleTag",
|
|
1285
1281
|
property_extractorTag: "@extractorTag",
|
|
1282
|
+
property_extractorInternal: "@extractorInternal",
|
|
1286
1283
|
property_buttonCaption: "@buttonCaption",
|
|
1287
1284
|
property_callToActionUrl: "@callToActionUrl",
|
|
1288
1285
|
property_caption: "@caption",
|
|
@@ -1497,6 +1494,7 @@ var propertyKeys = {
|
|
|
1497
1494
|
property_subject: "@subject",
|
|
1498
1495
|
property_subtype: "@subtype",
|
|
1499
1496
|
property_tableAutoWidth: "@tableAutoWidth",
|
|
1497
|
+
property_tableColWidth: "@tableColWidth",
|
|
1500
1498
|
property_tableColumnMinWidth: "@tableColumnMinWidth",
|
|
1501
1499
|
property_tableFixedHeader: "@tableFixedHeader",
|
|
1502
1500
|
property_tableHeaderWhitespaceNoWrap: "@tableHeaderWhitespaceNoWrap",
|
|
@@ -2322,7 +2320,7 @@ var CARDSETS = {
|
|
|
2322
2320
|
{
|
|
2323
2321
|
key: ConfigKey.tag_title,
|
|
2324
2322
|
description: "Title of the definition.",
|
|
2325
|
-
|
|
2323
|
+
jsonKey: "^heading.forKeys"
|
|
2326
2324
|
},
|
|
2327
2325
|
{
|
|
2328
2326
|
key: ConfigKey.group_resourceIcon,
|
|
@@ -2346,7 +2344,7 @@ var CARDSETS = {
|
|
|
2346
2344
|
{
|
|
2347
2345
|
key: ConfigKey.tag_title,
|
|
2348
2346
|
description: "Title of the definition.",
|
|
2349
|
-
|
|
2347
|
+
jsonKey: "^heading.forValues"
|
|
2350
2348
|
},
|
|
2351
2349
|
{
|
|
2352
2350
|
key: ConfigKey.group_resourceIcon,
|
|
@@ -2396,7 +2394,7 @@ var CARDSETS = {
|
|
|
2396
2394
|
{
|
|
2397
2395
|
key: ConfigKey.tag_title,
|
|
2398
2396
|
description: "Title of the match pair.",
|
|
2399
|
-
|
|
2397
|
+
jsonKey: "^heading.forKeys"
|
|
2400
2398
|
},
|
|
2401
2399
|
{
|
|
2402
2400
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2431,7 +2429,7 @@ var CARDSETS = {
|
|
|
2431
2429
|
{
|
|
2432
2430
|
key: ConfigKey.tag_title,
|
|
2433
2431
|
description: "Title of the match pair.",
|
|
2434
|
-
|
|
2432
|
+
jsonKey: "^heading.forValues"
|
|
2435
2433
|
},
|
|
2436
2434
|
{
|
|
2437
2435
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2464,7 +2462,7 @@ var CARDSETS = {
|
|
|
2464
2462
|
{
|
|
2465
2463
|
key: ConfigKey.tag_title,
|
|
2466
2464
|
description: "Title of the audio match pair.",
|
|
2467
|
-
|
|
2465
|
+
jsonKey: "^heading.forKeys"
|
|
2468
2466
|
},
|
|
2469
2467
|
{
|
|
2470
2468
|
key: ConfigKey.resource_audio,
|
|
@@ -2489,7 +2487,7 @@ var CARDSETS = {
|
|
|
2489
2487
|
{
|
|
2490
2488
|
key: ConfigKey.tag_title,
|
|
2491
2489
|
description: "Title of the audio match pair.",
|
|
2492
|
-
|
|
2490
|
+
jsonKey: "^heading.forValues"
|
|
2493
2491
|
},
|
|
2494
2492
|
{
|
|
2495
2493
|
key: ConfigKey.resource_audio,
|
|
@@ -2521,7 +2519,7 @@ var CARDSETS = {
|
|
|
2521
2519
|
{
|
|
2522
2520
|
key: ConfigKey.tag_title,
|
|
2523
2521
|
description: "Title of the image match pair.",
|
|
2524
|
-
|
|
2522
|
+
jsonKey: "^heading.forKeys"
|
|
2525
2523
|
},
|
|
2526
2524
|
{
|
|
2527
2525
|
key: ConfigKey.resource_image,
|
|
@@ -2546,7 +2544,7 @@ var CARDSETS = {
|
|
|
2546
2544
|
{
|
|
2547
2545
|
key: ConfigKey.tag_title,
|
|
2548
2546
|
description: "Title of the image match pair.",
|
|
2549
|
-
|
|
2547
|
+
jsonKey: "^heading.forValues"
|
|
2550
2548
|
},
|
|
2551
2549
|
{
|
|
2552
2550
|
key: ConfigKey.resource_image,
|
|
@@ -2583,7 +2581,7 @@ var CARDSETS = {
|
|
|
2583
2581
|
{
|
|
2584
2582
|
key: ConfigKey.tag_title,
|
|
2585
2583
|
description: "Title of the match matrix.",
|
|
2586
|
-
|
|
2584
|
+
jsonKey: "^heading.forKeys"
|
|
2587
2585
|
},
|
|
2588
2586
|
{
|
|
2589
2587
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2613,7 +2611,7 @@ var CARDSETS = {
|
|
|
2613
2611
|
{
|
|
2614
2612
|
key: ConfigKey.tag_title,
|
|
2615
2613
|
description: "Title of the match matrix.",
|
|
2616
|
-
|
|
2614
|
+
jsonKey: "^heading.forValues"
|
|
2617
2615
|
},
|
|
2618
2616
|
{
|
|
2619
2617
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2642,11 +2640,13 @@ var CARDSETS = {
|
|
|
2642
2640
|
{
|
|
2643
2641
|
key: ConfigKey.tag_true,
|
|
2644
2642
|
description: "Tag for true statements.",
|
|
2643
|
+
jsonKey: "statement|set(isCorrect=true)",
|
|
2645
2644
|
maxCount: 1
|
|
2646
2645
|
},
|
|
2647
2646
|
{
|
|
2648
2647
|
key: ConfigKey.tag_false,
|
|
2649
2648
|
description: "Tag for false statements.",
|
|
2649
|
+
jsonKey: "statement|set(isCorrect=false)",
|
|
2650
2650
|
maxCount: 1
|
|
2651
2651
|
},
|
|
2652
2652
|
{
|
|
@@ -2710,7 +2710,7 @@ var CARDSETS = {
|
|
|
2710
2710
|
{
|
|
2711
2711
|
key: ConfigKey.tag_title,
|
|
2712
2712
|
description: "Title of the feedback.",
|
|
2713
|
-
|
|
2713
|
+
jsonKey: "^heading.forKeys"
|
|
2714
2714
|
}
|
|
2715
2715
|
],
|
|
2716
2716
|
bodyAllowed: false
|
|
@@ -2740,7 +2740,7 @@ var CARDSETS = {
|
|
|
2740
2740
|
{
|
|
2741
2741
|
key: ConfigKey.tag_title,
|
|
2742
2742
|
description: "Title of the feedback.",
|
|
2743
|
-
|
|
2743
|
+
jsonKey: "^heading.forValues"
|
|
2744
2744
|
}
|
|
2745
2745
|
],
|
|
2746
2746
|
bodyAllowed: true
|
|
@@ -2830,7 +2830,6 @@ var CARDSETS = {
|
|
|
2830
2830
|
//
|
|
2831
2831
|
[CardSetConfigKey.table]: {
|
|
2832
2832
|
jsonKey: "table.data",
|
|
2833
|
-
itemType: "array",
|
|
2834
2833
|
sides: [
|
|
2835
2834
|
{
|
|
2836
2835
|
name: "cell",
|
|
@@ -2845,8 +2844,8 @@ var CARDSETS = {
|
|
|
2845
2844
|
},
|
|
2846
2845
|
{
|
|
2847
2846
|
key: ConfigKey.tag_title,
|
|
2848
|
-
|
|
2849
|
-
|
|
2847
|
+
jsonKey: "^table.columns[]",
|
|
2848
|
+
description: "Title of the table."
|
|
2850
2849
|
},
|
|
2851
2850
|
{
|
|
2852
2851
|
key: ConfigKey.property_tableCellType,
|
|
@@ -2867,6 +2866,11 @@ var CARDSETS = {
|
|
|
2867
2866
|
key: ConfigKey.property_tableScope,
|
|
2868
2867
|
description: "Scope attribute for header cells.",
|
|
2869
2868
|
format: TagFormat.plainText
|
|
2869
|
+
},
|
|
2870
|
+
{
|
|
2871
|
+
key: ConfigKey.property_tableColWidth,
|
|
2872
|
+
description: "Width for the column.",
|
|
2873
|
+
format: TagFormat.number
|
|
2870
2874
|
}
|
|
2871
2875
|
],
|
|
2872
2876
|
repeatCount: Count.infinity
|
|
@@ -2881,14 +2885,15 @@ var CARDSETS = {
|
|
|
2881
2885
|
[CardSetConfigKey.tableExtended]: {
|
|
2882
2886
|
jsonKey: null,
|
|
2883
2887
|
sections: {
|
|
2884
|
-
|
|
2885
|
-
"table-
|
|
2886
|
-
"table-footer": { jsonKey: "
|
|
2888
|
+
"table-header": { jsonKey: "table.header.rows", sideJsonKey: "cells[{s}]|set(title=true)" },
|
|
2889
|
+
"table-body": { jsonKey: "table.body.rows", isDefault: true },
|
|
2890
|
+
"table-footer": { jsonKey: "table.footer.rows", sideJsonKey: "cells[{s}]|set(title=true)" }
|
|
2887
2891
|
},
|
|
2888
2892
|
sides: [
|
|
2889
2893
|
{
|
|
2890
2894
|
name: "cell",
|
|
2891
2895
|
repeat: true,
|
|
2896
|
+
jsonKey: "cells[{s}]",
|
|
2892
2897
|
variants: [
|
|
2893
2898
|
{
|
|
2894
2899
|
jsonKey: "content",
|
|
@@ -2899,27 +2904,37 @@ var CARDSETS = {
|
|
|
2899
2904
|
},
|
|
2900
2905
|
{
|
|
2901
2906
|
key: ConfigKey.tag_title,
|
|
2907
|
+
jsonKey: ".",
|
|
2902
2908
|
description: "Title of the table cell."
|
|
2903
2909
|
},
|
|
2904
2910
|
{
|
|
2905
2911
|
key: ConfigKey.property_tableCellType,
|
|
2912
|
+
jsonKey: "title|bool(th)",
|
|
2906
2913
|
description: "Table cell type (th/td).",
|
|
2907
2914
|
format: TagFormat.plainText
|
|
2908
2915
|
},
|
|
2909
2916
|
{
|
|
2910
2917
|
key: ConfigKey.property_tableRowSpan,
|
|
2918
|
+
jsonKey: "rowspan",
|
|
2911
2919
|
description: "Number of rows the cell spans.",
|
|
2912
2920
|
format: TagFormat.number
|
|
2913
2921
|
},
|
|
2914
2922
|
{
|
|
2915
2923
|
key: ConfigKey.property_tableColSpan,
|
|
2924
|
+
jsonKey: "colspan",
|
|
2916
2925
|
description: "Number of columns the cell spans.",
|
|
2917
2926
|
format: TagFormat.number
|
|
2918
2927
|
},
|
|
2919
2928
|
{
|
|
2920
2929
|
key: ConfigKey.property_tableScope,
|
|
2930
|
+
jsonKey: "scope",
|
|
2921
2931
|
description: "Scope attribute for header cells.",
|
|
2922
2932
|
format: TagFormat.plainText
|
|
2933
|
+
},
|
|
2934
|
+
{
|
|
2935
|
+
key: ConfigKey.property_tableColWidth,
|
|
2936
|
+
description: "Width for the column.",
|
|
2937
|
+
format: TagFormat.number
|
|
2923
2938
|
}
|
|
2924
2939
|
],
|
|
2925
2940
|
repeatCount: Count.infinity
|
|
@@ -2933,7 +2948,6 @@ var CARDSETS = {
|
|
|
2933
2948
|
//
|
|
2934
2949
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2935
2950
|
jsonKey: "pronunciationTable.data",
|
|
2936
|
-
itemType: "array",
|
|
2937
2951
|
sides: [
|
|
2938
2952
|
{
|
|
2939
2953
|
name: "cell",
|
|
@@ -2980,15 +2994,8 @@ var CARDSETS = {
|
|
|
2980
2994
|
format: TagFormat.plainText
|
|
2981
2995
|
},
|
|
2982
2996
|
{
|
|
2983
|
-
key: ConfigKey.
|
|
2984
|
-
description: "
|
|
2985
|
-
chain: [
|
|
2986
|
-
{
|
|
2987
|
-
key: ConfigKey.tag_item,
|
|
2988
|
-
description: "The lead, page number, source page number, and margin number.",
|
|
2989
|
-
maxCount: 4
|
|
2990
|
-
}
|
|
2991
|
-
]
|
|
2997
|
+
key: ConfigKey.group_standardItemLead,
|
|
2998
|
+
description: "Item, lead, page number, and margin number for the bot action response."
|
|
2992
2999
|
},
|
|
2993
3000
|
{
|
|
2994
3001
|
key: ConfigKey.tag_instruction,
|
|
@@ -3075,19 +3082,20 @@ var CARDSETS = {
|
|
|
3075
3082
|
description: "Title of the ingredient."
|
|
3076
3083
|
},
|
|
3077
3084
|
{
|
|
3078
|
-
key: ConfigKey.
|
|
3079
|
-
description: "
|
|
3085
|
+
key: ConfigKey.tag_true,
|
|
3086
|
+
description: "Checked state for the ingredient.",
|
|
3087
|
+
jsonKey: "ingredient|set(checked=true)",
|
|
3088
|
+
maxCount: 1
|
|
3080
3089
|
},
|
|
3081
3090
|
{
|
|
3082
|
-
key: ConfigKey.
|
|
3083
|
-
description: "
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
]
|
|
3091
|
+
key: ConfigKey.tag_false,
|
|
3092
|
+
description: "Unchecked state for the ingredient.",
|
|
3093
|
+
jsonKey: "ingredient|set(checked=false)",
|
|
3094
|
+
maxCount: 1
|
|
3095
|
+
},
|
|
3096
|
+
{
|
|
3097
|
+
key: ConfigKey.group_standardItemLead,
|
|
3098
|
+
description: "Item, lead, page number, and margin number for the ingredient."
|
|
3091
3099
|
},
|
|
3092
3100
|
{
|
|
3093
3101
|
key: ConfigKey.tag_instruction,
|
|
@@ -3226,8 +3234,7 @@ var GROUPS = {
|
|
|
3226
3234
|
{
|
|
3227
3235
|
key: ConfigKey.property_validationDate,
|
|
3228
3236
|
description: "The date when the bit was validated",
|
|
3229
|
-
format: TagFormat.plainText
|
|
3230
|
-
defaultValue: ""
|
|
3237
|
+
format: TagFormat.plainText
|
|
3231
3238
|
},
|
|
3232
3239
|
{
|
|
3233
3240
|
key: ConfigKey.property_aiGenerated,
|
|
@@ -3372,6 +3379,7 @@ var GROUPS = {
|
|
|
3372
3379
|
},
|
|
3373
3380
|
{
|
|
3374
3381
|
key: ConfigKey.property_groupTag,
|
|
3382
|
+
jsonKey: "groupTag.name",
|
|
3375
3383
|
description: "The group tag(s) for the bit",
|
|
3376
3384
|
format: TagFormat.plainText,
|
|
3377
3385
|
maxCount: Count.infinity,
|
|
@@ -3402,6 +3410,12 @@ var GROUPS = {
|
|
|
3402
3410
|
format: TagFormat.plainText,
|
|
3403
3411
|
maxCount: Count.infinity
|
|
3404
3412
|
},
|
|
3413
|
+
{
|
|
3414
|
+
key: ConfigKey.property_extractorInternal,
|
|
3415
|
+
description: "Internal metadata used by the extractor for processing purposes",
|
|
3416
|
+
format: TagFormat.plainText,
|
|
3417
|
+
maxCount: Count.infinity
|
|
3418
|
+
},
|
|
3405
3419
|
{
|
|
3406
3420
|
key: ConfigKey.property_levelCEFRp,
|
|
3407
3421
|
description: "The CEFRp level for the bit",
|
|
@@ -3468,20 +3482,48 @@ var GROUPS = {
|
|
|
3468
3482
|
}
|
|
3469
3483
|
]
|
|
3470
3484
|
},
|
|
3471
|
-
[ConfigKey.
|
|
3485
|
+
[ConfigKey.group_standardItemLead]: {
|
|
3472
3486
|
type: GroupConfigType.standard,
|
|
3473
|
-
description: "Standard group for item, lead, page number,
|
|
3487
|
+
description: "Standard group for item, lead, page number, and margin number tags",
|
|
3474
3488
|
tags: [
|
|
3475
3489
|
{
|
|
3476
3490
|
key: ConfigKey.tag_item,
|
|
3491
|
+
jsonKey: "item",
|
|
3477
3492
|
description: "The item for the bit",
|
|
3478
3493
|
chain: [
|
|
3479
3494
|
{
|
|
3480
3495
|
key: ConfigKey.tag_item,
|
|
3481
|
-
|
|
3482
|
-
|
|
3496
|
+
jsonKey: "lead",
|
|
3497
|
+
description: "The lead for the bit",
|
|
3498
|
+
maxCount: 1,
|
|
3499
|
+
chain: [
|
|
3500
|
+
{
|
|
3501
|
+
key: ConfigKey.tag_item,
|
|
3502
|
+
jsonKey: "pageNumber",
|
|
3503
|
+
description: "The page number for the bit",
|
|
3504
|
+
maxCount: 1,
|
|
3505
|
+
chain: [
|
|
3506
|
+
{
|
|
3507
|
+
key: ConfigKey.tag_item,
|
|
3508
|
+
jsonKey: "marginNumber",
|
|
3509
|
+
description: "The margin number for the bit",
|
|
3510
|
+
maxCount: 1
|
|
3511
|
+
}
|
|
3512
|
+
]
|
|
3513
|
+
}
|
|
3514
|
+
]
|
|
3483
3515
|
}
|
|
3484
3516
|
]
|
|
3517
|
+
}
|
|
3518
|
+
]
|
|
3519
|
+
},
|
|
3520
|
+
[ConfigKey.group_standardItemLeadInstructionHint]: {
|
|
3521
|
+
type: GroupConfigType.standard,
|
|
3522
|
+
description: "Standard group for item, lead, page number, margin number, instruction and hint tags",
|
|
3523
|
+
tags: [
|
|
3524
|
+
{
|
|
3525
|
+
key: ConfigKey.group_standardItemLead,
|
|
3526
|
+
description: "Item, lead, page number, and margin number tags"
|
|
3485
3527
|
},
|
|
3486
3528
|
{
|
|
3487
3529
|
key: ConfigKey.tag_instruction,
|
|
@@ -3520,6 +3562,7 @@ var GROUPS = {
|
|
|
3520
3562
|
tags: [
|
|
3521
3563
|
{
|
|
3522
3564
|
key: ConfigKey.property_imageSource,
|
|
3565
|
+
jsonKey: "imageSource.url",
|
|
3523
3566
|
description: "The source of an image",
|
|
3524
3567
|
format: TagFormat.plainText,
|
|
3525
3568
|
chain: [
|
|
@@ -3553,6 +3596,7 @@ var GROUPS = {
|
|
|
3553
3596
|
tags: [
|
|
3554
3597
|
{
|
|
3555
3598
|
key: ConfigKey.property_technicalTerm,
|
|
3599
|
+
jsonKey: "technicalTerm.technicalTerm",
|
|
3556
3600
|
description: "The technical term",
|
|
3557
3601
|
format: TagFormat.plainText,
|
|
3558
3602
|
chain: [
|
|
@@ -3571,6 +3615,7 @@ var GROUPS = {
|
|
|
3571
3615
|
tags: [
|
|
3572
3616
|
{
|
|
3573
3617
|
key: ConfigKey.property_person,
|
|
3618
|
+
jsonKey: "person.name",
|
|
3574
3619
|
description: "A person",
|
|
3575
3620
|
format: TagFormat.plainText,
|
|
3576
3621
|
chain: [
|
|
@@ -3588,6 +3633,7 @@ var GROUPS = {
|
|
|
3588
3633
|
{
|
|
3589
3634
|
// Deprecated (parter renamed to person)
|
|
3590
3635
|
key: ConfigKey.property_partner,
|
|
3636
|
+
jsonKey: "partner.name",
|
|
3591
3637
|
description: "A partner",
|
|
3592
3638
|
format: TagFormat.plainText,
|
|
3593
3639
|
chain: [
|
|
@@ -3615,6 +3661,7 @@ var GROUPS = {
|
|
|
3615
3661
|
chain: [
|
|
3616
3662
|
{
|
|
3617
3663
|
key: ConfigKey.tag_gap,
|
|
3664
|
+
jsonKey: "solutions[]",
|
|
3618
3665
|
description: "Alternative values for the gaps in the content",
|
|
3619
3666
|
maxCount: Count.infinity
|
|
3620
3667
|
},
|
|
@@ -3624,13 +3671,16 @@ var GROUPS = {
|
|
|
3624
3671
|
},
|
|
3625
3672
|
{
|
|
3626
3673
|
key: ConfigKey.property_example,
|
|
3674
|
+
jsonKey: "example",
|
|
3627
3675
|
description: "An example for the gap",
|
|
3628
3676
|
format: TagFormat.plainText
|
|
3629
3677
|
},
|
|
3630
3678
|
{
|
|
3631
3679
|
key: ConfigKey.property_isCaseSensitive,
|
|
3680
|
+
jsonKey: "isCaseSensitive",
|
|
3632
3681
|
description: "If true, the gap text is case sensitive",
|
|
3633
|
-
format: TagFormat.boolean
|
|
3682
|
+
format: TagFormat.boolean,
|
|
3683
|
+
defaultValue: "true"
|
|
3634
3684
|
}
|
|
3635
3685
|
]
|
|
3636
3686
|
}
|
|
@@ -3647,11 +3697,13 @@ var GROUPS = {
|
|
|
3647
3697
|
chain: [
|
|
3648
3698
|
{
|
|
3649
3699
|
key: ConfigKey.tag_true,
|
|
3700
|
+
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3650
3701
|
description: "True values for a true/false statement/question",
|
|
3651
3702
|
maxCount: Count.infinity
|
|
3652
3703
|
},
|
|
3653
3704
|
{
|
|
3654
3705
|
key: ConfigKey.tag_false,
|
|
3706
|
+
jsonKey: "choices[]|set(isCorrect=false)",
|
|
3655
3707
|
description: "False values for a true/false statement/question",
|
|
3656
3708
|
maxCount: Count.infinity
|
|
3657
3709
|
},
|
|
@@ -3661,6 +3713,7 @@ var GROUPS = {
|
|
|
3661
3713
|
},
|
|
3662
3714
|
{
|
|
3663
3715
|
key: ConfigKey.property_example,
|
|
3716
|
+
jsonKey: "example",
|
|
3664
3717
|
description: "An example for the true/false statement/question",
|
|
3665
3718
|
format: TagFormat.plainText
|
|
3666
3719
|
}
|
|
@@ -3673,11 +3726,13 @@ var GROUPS = {
|
|
|
3673
3726
|
chain: [
|
|
3674
3727
|
{
|
|
3675
3728
|
key: ConfigKey.tag_true,
|
|
3729
|
+
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3676
3730
|
description: "True values for a true/false statement/question",
|
|
3677
3731
|
maxCount: Count.infinity
|
|
3678
3732
|
},
|
|
3679
3733
|
{
|
|
3680
3734
|
key: ConfigKey.tag_false,
|
|
3735
|
+
jsonKey: "choices[]|set(isCorrect=false)",
|
|
3681
3736
|
description: "False values for a true/false statement/question",
|
|
3682
3737
|
maxCount: Count.infinity
|
|
3683
3738
|
},
|
|
@@ -3687,6 +3742,7 @@ var GROUPS = {
|
|
|
3687
3742
|
},
|
|
3688
3743
|
{
|
|
3689
3744
|
key: ConfigKey.property_example,
|
|
3745
|
+
jsonKey: "example",
|
|
3690
3746
|
description: "An example for the true/false statement/question",
|
|
3691
3747
|
format: TagFormat.plainText
|
|
3692
3748
|
}
|
|
@@ -3700,6 +3756,7 @@ var GROUPS = {
|
|
|
3700
3756
|
tags: [
|
|
3701
3757
|
{
|
|
3702
3758
|
key: ConfigKey.property_mark,
|
|
3759
|
+
jsonKey: "marks.mark",
|
|
3703
3760
|
description: "The mark configuration",
|
|
3704
3761
|
format: TagFormat.plainText,
|
|
3705
3762
|
maxCount: Count.infinity,
|
|
@@ -3729,11 +3786,13 @@ var GROUPS = {
|
|
|
3729
3786
|
chain: [
|
|
3730
3787
|
{
|
|
3731
3788
|
key: ConfigKey.property_mark,
|
|
3789
|
+
jsonKey: "mark",
|
|
3732
3790
|
description: "The mark configuration",
|
|
3733
3791
|
format: TagFormat.plainText
|
|
3734
3792
|
},
|
|
3735
3793
|
{
|
|
3736
3794
|
key: ConfigKey.property_example,
|
|
3795
|
+
jsonKey: "example",
|
|
3737
3796
|
description: "An example for the marked content",
|
|
3738
3797
|
format: TagFormat.plainText
|
|
3739
3798
|
}
|
|
@@ -3904,7 +3963,8 @@ var GROUPS = {
|
|
|
3904
3963
|
{
|
|
3905
3964
|
key: ConfigKey.property_maxTocChapterLevel,
|
|
3906
3965
|
description: "The maximum table of contents chapter level",
|
|
3907
|
-
format: TagFormat.number
|
|
3966
|
+
format: TagFormat.number,
|
|
3967
|
+
defaultValue: "-1"
|
|
3908
3968
|
},
|
|
3909
3969
|
{
|
|
3910
3970
|
key: ConfigKey.property_sourceDocument,
|
|
@@ -3986,12 +4046,14 @@ var GROUPS = {
|
|
|
3986
4046
|
{
|
|
3987
4047
|
key: ConfigKey.property_isTracked,
|
|
3988
4048
|
description: "If true, the learning path is tracked",
|
|
3989
|
-
format: TagFormat.boolean
|
|
4049
|
+
format: TagFormat.boolean,
|
|
4050
|
+
defaultValue: "true"
|
|
3990
4051
|
},
|
|
3991
4052
|
{
|
|
3992
4053
|
key: ConfigKey.property_isInfoOnly,
|
|
3993
4054
|
description: "If true, the learning path is info only",
|
|
3994
|
-
format: TagFormat.boolean
|
|
4055
|
+
format: TagFormat.boolean,
|
|
4056
|
+
defaultValue: "false"
|
|
3995
4057
|
},
|
|
3996
4058
|
{
|
|
3997
4059
|
key: ConfigKey.property_deeplink,
|
|
@@ -4335,6 +4397,7 @@ var GROUPS = {
|
|
|
4335
4397
|
},
|
|
4336
4398
|
{
|
|
4337
4399
|
key: ConfigKey.property_posterImage,
|
|
4400
|
+
jsonKey: "posterImage.src",
|
|
4338
4401
|
description: "The poster image for the video",
|
|
4339
4402
|
format: TagFormat.plainText,
|
|
4340
4403
|
chain: [
|
|
@@ -4860,27 +4923,24 @@ var ConfigHydrator = class {
|
|
|
4860
4923
|
const v = this.hydrateCardVariantConfig(_variant);
|
|
4861
4924
|
variantsOfSide.push(v);
|
|
4862
4925
|
}
|
|
4863
|
-
const sideConfig = new CardSideConfig(
|
|
4926
|
+
const sideConfig = new CardSideConfig(
|
|
4927
|
+
_side.name,
|
|
4928
|
+
_side.repeat ?? false,
|
|
4929
|
+
variantsOfSide,
|
|
4930
|
+
_side.jsonKey
|
|
4931
|
+
);
|
|
4864
4932
|
sides.push(sideConfig);
|
|
4865
4933
|
}
|
|
4866
4934
|
const cardSetConfig = new CardSetConfig(
|
|
4867
4935
|
_cardSet,
|
|
4868
4936
|
_cardSetConfig.jsonKey,
|
|
4869
|
-
_cardSetConfig.itemType ?? "object",
|
|
4870
4937
|
_cardSetConfig.sections,
|
|
4871
4938
|
sides
|
|
4872
4939
|
);
|
|
4873
4940
|
return cardSetConfig;
|
|
4874
4941
|
}
|
|
4875
4942
|
hydrateTagConfig(_tag) {
|
|
4876
|
-
const {
|
|
4877
|
-
key: _configKey,
|
|
4878
|
-
maxCount,
|
|
4879
|
-
minCount,
|
|
4880
|
-
chain: _chain,
|
|
4881
|
-
secondaryJsonKey,
|
|
4882
|
-
deprecated
|
|
4883
|
-
} = _tag;
|
|
4943
|
+
const { key: _configKey, maxCount, minCount, chain: _chain, deprecated } = _tag;
|
|
4884
4944
|
const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4885
4945
|
if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
|
|
4886
4946
|
const tag = (0, import_superenum15.Enum)(Tag).fromValue(configKey);
|
|
@@ -4895,7 +4955,6 @@ var ConfigHydrator = class {
|
|
|
4895
4955
|
maxCount: maxCount ?? MAX_COUNT_DEFAULT,
|
|
4896
4956
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4897
4957
|
chain,
|
|
4898
|
-
secondaryJsonKey,
|
|
4899
4958
|
deprecated
|
|
4900
4959
|
});
|
|
4901
4960
|
return {
|
|
@@ -4914,8 +4973,7 @@ var ConfigHydrator = class {
|
|
|
4914
4973
|
format,
|
|
4915
4974
|
values,
|
|
4916
4975
|
defaultValue,
|
|
4917
|
-
jsonKey
|
|
4918
|
-
secondaryJsonKey
|
|
4976
|
+
jsonKey
|
|
4919
4977
|
} = _tag;
|
|
4920
4978
|
const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4921
4979
|
if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
|
|
@@ -4931,7 +4989,6 @@ var ConfigHydrator = class {
|
|
|
4931
4989
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4932
4990
|
chain,
|
|
4933
4991
|
jsonKey,
|
|
4934
|
-
secondaryJsonKey,
|
|
4935
4992
|
format,
|
|
4936
4993
|
values,
|
|
4937
4994
|
defaultValue,
|
|
@@ -4944,15 +5001,7 @@ var ConfigHydrator = class {
|
|
|
4944
5001
|
};
|
|
4945
5002
|
}
|
|
4946
5003
|
hydrateResourceTagConfig(_tag) {
|
|
4947
|
-
const {
|
|
4948
|
-
key: _configKey,
|
|
4949
|
-
maxCount,
|
|
4950
|
-
minCount,
|
|
4951
|
-
chain: _chain,
|
|
4952
|
-
deprecated,
|
|
4953
|
-
jsonKey,
|
|
4954
|
-
secondaryJsonKey
|
|
4955
|
-
} = _tag;
|
|
5004
|
+
const { key: _configKey, maxCount, minCount, chain: _chain, deprecated, jsonKey } = _tag;
|
|
4956
5005
|
const configKey = (0, import_superenum15.Enum)(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4957
5006
|
if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
|
|
4958
5007
|
const tag = _configKey.substring(1);
|
|
@@ -4967,7 +5016,6 @@ var ConfigHydrator = class {
|
|
|
4967
5016
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4968
5017
|
chain,
|
|
4969
5018
|
jsonKey,
|
|
4970
|
-
secondaryJsonKey,
|
|
4971
5019
|
deprecated
|
|
4972
5020
|
});
|
|
4973
5021
|
return {
|
|
@@ -6268,7 +6316,8 @@ var BITS = {
|
|
|
6268
6316
|
{
|
|
6269
6317
|
key: ConfigKey.property_isCaseSensitive,
|
|
6270
6318
|
description: "If the cloze answers are case sensitive",
|
|
6271
|
-
format: TagFormat.boolean
|
|
6319
|
+
format: TagFormat.boolean,
|
|
6320
|
+
defaultValue: "true"
|
|
6272
6321
|
},
|
|
6273
6322
|
{
|
|
6274
6323
|
key: ConfigKey.property_quizCountItems,
|
|
@@ -6714,6 +6763,7 @@ var BITS = {
|
|
|
6714
6763
|
},
|
|
6715
6764
|
{
|
|
6716
6765
|
key: ConfigKey.property_servings,
|
|
6766
|
+
jsonKey: "servings.servings",
|
|
6717
6767
|
description: "The number of servings for the ingredients",
|
|
6718
6768
|
format: TagFormat.number,
|
|
6719
6769
|
chain: [
|
|
@@ -8969,7 +9019,8 @@ var BITS = {
|
|
|
8969
9019
|
{
|
|
8970
9020
|
key: ConfigKey.property_isCaseSensitive,
|
|
8971
9021
|
description: "Case sensitivity for matching pairs, used to define if matches are case-sensitive",
|
|
8972
|
-
format: TagFormat.boolean
|
|
9022
|
+
format: TagFormat.boolean,
|
|
9023
|
+
defaultValue: "true"
|
|
8973
9024
|
}
|
|
8974
9025
|
],
|
|
8975
9026
|
cardSet: CardSetConfigKey.matchPairs
|
|
@@ -9419,7 +9470,8 @@ var BITS = {
|
|
|
9419
9470
|
{
|
|
9420
9471
|
key: ConfigKey.property_platformBrandTarget,
|
|
9421
9472
|
description: 'The platform brand target (typically "light", "dark" or "none")',
|
|
9422
|
-
format: TagFormat.plainText
|
|
9473
|
+
format: TagFormat.plainText,
|
|
9474
|
+
defaultValue: "none"
|
|
9423
9475
|
}
|
|
9424
9476
|
]
|
|
9425
9477
|
},
|
|
@@ -9442,7 +9494,8 @@ var BITS = {
|
|
|
9442
9494
|
{
|
|
9443
9495
|
key: ConfigKey.property_platformLogoMaxHeight,
|
|
9444
9496
|
description: "Maximum height for the platform logo",
|
|
9445
|
-
format: TagFormat.number
|
|
9497
|
+
format: TagFormat.number,
|
|
9498
|
+
defaultValue: "40"
|
|
9446
9499
|
},
|
|
9447
9500
|
{
|
|
9448
9501
|
key: ConfigKey.group_platformStylesCommon,
|
|
@@ -9615,7 +9668,8 @@ var BITS = {
|
|
|
9615
9668
|
{
|
|
9616
9669
|
key: ConfigKey.property_resolved,
|
|
9617
9670
|
description: "Resolved status for the review note, used to indicate if the note is resolved",
|
|
9618
|
-
format: TagFormat.boolean
|
|
9671
|
+
format: TagFormat.boolean,
|
|
9672
|
+
defaultValue: "false"
|
|
9619
9673
|
},
|
|
9620
9674
|
{
|
|
9621
9675
|
key: ConfigKey.property_resolvedDate,
|
|
@@ -9802,6 +9856,7 @@ var BITS = {
|
|
|
9802
9856
|
tags: [
|
|
9803
9857
|
{
|
|
9804
9858
|
key: ConfigKey.property_ratingLevelStart,
|
|
9859
|
+
jsonKey: "ratingLevelStart.level",
|
|
9805
9860
|
description: "Start level for the rating survey, used to define the lowest rating",
|
|
9806
9861
|
format: TagFormat.number,
|
|
9807
9862
|
chain: [
|
|
@@ -9814,6 +9869,7 @@ var BITS = {
|
|
|
9814
9869
|
},
|
|
9815
9870
|
{
|
|
9816
9871
|
key: ConfigKey.property_ratingLevelEnd,
|
|
9872
|
+
jsonKey: "ratingLevelEnd.level",
|
|
9817
9873
|
description: "End level for the rating survey, used to define the highest rating",
|
|
9818
9874
|
format: TagFormat.number,
|
|
9819
9875
|
chain: [
|
|
@@ -9882,28 +9938,32 @@ var BITS = {
|
|
|
9882
9938
|
{
|
|
9883
9939
|
key: ConfigKey.property_tableFixedHeader,
|
|
9884
9940
|
description: "Fixed header for the table, used to keep the header visible while scrolling",
|
|
9885
|
-
format: TagFormat.boolean
|
|
9941
|
+
format: TagFormat.boolean,
|
|
9942
|
+
defaultValue: "false"
|
|
9886
9943
|
},
|
|
9887
9944
|
{
|
|
9888
9945
|
key: ConfigKey.property_tableHeaderWhitespaceNoWrap,
|
|
9889
9946
|
description: "No wrap for table header whitespace, used to prevent header text wrapping",
|
|
9890
|
-
format: TagFormat.boolean
|
|
9891
|
-
|
|
9947
|
+
format: TagFormat.boolean,
|
|
9948
|
+
defaultValue: "false"
|
|
9892
9949
|
},
|
|
9893
9950
|
{
|
|
9894
9951
|
key: ConfigKey.property_tableSearch,
|
|
9895
9952
|
description: "Search functionality for the table, used to enable searching within the table",
|
|
9896
|
-
format: TagFormat.boolean
|
|
9953
|
+
format: TagFormat.boolean,
|
|
9954
|
+
defaultValue: "false"
|
|
9897
9955
|
},
|
|
9898
9956
|
{
|
|
9899
9957
|
key: ConfigKey.property_tableSort,
|
|
9900
9958
|
description: "Sorting functionality for the table, used to enable sorting of table columns",
|
|
9901
|
-
format: TagFormat.boolean
|
|
9959
|
+
format: TagFormat.boolean,
|
|
9960
|
+
defaultValue: "false"
|
|
9902
9961
|
},
|
|
9903
9962
|
{
|
|
9904
9963
|
key: ConfigKey.property_tablePagination,
|
|
9905
9964
|
description: "Pagination for the table, used to limit the number of rows displayed at once",
|
|
9906
|
-
format: TagFormat.boolean
|
|
9965
|
+
format: TagFormat.boolean,
|
|
9966
|
+
defaultValue: "false"
|
|
9907
9967
|
},
|
|
9908
9968
|
{
|
|
9909
9969
|
key: ConfigKey.property_tablePaginationLimit,
|
|
@@ -9920,24 +9980,26 @@ var BITS = {
|
|
|
9920
9980
|
{
|
|
9921
9981
|
key: ConfigKey.property_tableWhitespaceNoWrap,
|
|
9922
9982
|
description: "No wrap for table whitespace, used to prevent text wrapping in table cells",
|
|
9923
|
-
format: TagFormat.boolean
|
|
9924
|
-
|
|
9983
|
+
format: TagFormat.boolean,
|
|
9984
|
+
defaultValue: "false"
|
|
9925
9985
|
},
|
|
9926
9986
|
{
|
|
9927
9987
|
key: ConfigKey.property_tableAutoWidth,
|
|
9928
9988
|
description: "Auto width for table columns, used to automatically adjust column widths",
|
|
9929
|
-
format: TagFormat.boolean
|
|
9930
|
-
|
|
9989
|
+
format: TagFormat.boolean,
|
|
9990
|
+
defaultValue: "true"
|
|
9931
9991
|
},
|
|
9932
9992
|
{
|
|
9933
9993
|
key: ConfigKey.property_tableResizableColumns,
|
|
9934
9994
|
description: "Resizable columns for the table, used to allow users to resize table columns",
|
|
9935
|
-
format: TagFormat.boolean
|
|
9995
|
+
format: TagFormat.boolean,
|
|
9996
|
+
defaultValue: "false"
|
|
9936
9997
|
},
|
|
9937
9998
|
{
|
|
9938
9999
|
key: ConfigKey.property_tableColumnMinWidth,
|
|
9939
10000
|
description: "Minimum width for table columns, used to define the minimum width of columns",
|
|
9940
|
-
format: TagFormat.number
|
|
10001
|
+
format: TagFormat.number,
|
|
10002
|
+
defaultValue: "0"
|
|
9941
10003
|
}
|
|
9942
10004
|
],
|
|
9943
10005
|
cardSet: CardSetConfigKey.table
|
|
@@ -9945,7 +10007,8 @@ var BITS = {
|
|
|
9945
10007
|
[BitType.tableExtended]: {
|
|
9946
10008
|
since: "4.14.0",
|
|
9947
10009
|
baseBitType: BitType.table,
|
|
9948
|
-
description: "Extended table bit, used to create complex tables with all HTML table features"
|
|
10010
|
+
description: "Extended table bit, used to create complex tables with all HTML table features",
|
|
10011
|
+
cardSet: CardSetConfigKey.tableExtended
|
|
9949
10012
|
},
|
|
9950
10013
|
[BitType.tableExtendedImage]: {
|
|
9951
10014
|
since: "5.13.0",
|
|
@@ -10911,7 +10974,6 @@ var Config = class {
|
|
|
10911
10974
|
maxCount: 1,
|
|
10912
10975
|
chain: tag.chain,
|
|
10913
10976
|
jsonKey: tag.jsonKey,
|
|
10914
|
-
secondaryJsonKey: tag.secondaryJsonKey,
|
|
10915
10977
|
deprecated: tag.deprecated
|
|
10916
10978
|
});
|
|
10917
10979
|
finalResourceTags[k] = newTag;
|
|
@@ -11016,7 +11078,7 @@ var instance2 = new Config();
|
|
|
11016
11078
|
// src/generated/package_info.ts
|
|
11017
11079
|
var PACKAGE_INFO = {
|
|
11018
11080
|
"name": "@gmb/bitmark-parser-generator",
|
|
11019
|
-
"version": "5.
|
|
11081
|
+
"version": "5.20.0",
|
|
11020
11082
|
"author": "Get More Brain Ltd",
|
|
11021
11083
|
"license": "ISC",
|
|
11022
11084
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -11577,6 +11639,8 @@ var NodeType = {
|
|
|
11577
11639
|
extractorExtractionTimestampValue: "extractorExtractionTimestampValue",
|
|
11578
11640
|
extractorTag: "extractorTag",
|
|
11579
11641
|
extractorTagValue: "extractorTagValue",
|
|
11642
|
+
extractorInternal: "extractorInternal",
|
|
11643
|
+
extractorInternalValue: "extractorInternalValue",
|
|
11580
11644
|
extraProperties: "extraProperties",
|
|
11581
11645
|
feedback: "feedback",
|
|
11582
11646
|
feedbackEngine: "feedbackEngine",
|
|
@@ -11982,6 +12046,8 @@ var NodeType = {
|
|
|
11982
12046
|
table: "table",
|
|
11983
12047
|
tableAutoWidth: "tableAutoWidth",
|
|
11984
12048
|
tableAutoWidthValue: "tableAutoWidthValue",
|
|
12049
|
+
tableColWidth: "tableColWidth",
|
|
12050
|
+
tableColWidthValue: "tableColWidthValue",
|
|
11985
12051
|
tableColumnMinWidth: "tableColumnMinWidth",
|
|
11986
12052
|
tableColumnMinWidthValue: "tableColumnMinWidthValue",
|
|
11987
12053
|
tableFixedHeader: "tableFixedHeader",
|
|
@@ -24974,6 +25040,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24974
25040
|
data.extractorTag,
|
|
24975
25041
|
options
|
|
24976
25042
|
),
|
|
25043
|
+
extractorInternal: this.toAstProperty(
|
|
25044
|
+
bitType,
|
|
25045
|
+
ConfigKey.property_extractorInternal,
|
|
25046
|
+
data.extractorInternal,
|
|
25047
|
+
options
|
|
25048
|
+
),
|
|
24977
25049
|
levelCEFRp: this.toAstProperty(
|
|
24978
25050
|
bitType,
|
|
24979
25051
|
ConfigKey.property_levelCEFRp,
|
|
@@ -26461,6 +26533,7 @@ var Builder = class extends BaseBuilder {
|
|
|
26461
26533
|
if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
|
|
26462
26534
|
if (cell.colspan != null) tableCell.colspan = cell.colspan;
|
|
26463
26535
|
if (cell.scope) tableCell.scope = cell.scope;
|
|
26536
|
+
if (cell.colwidth != null) tableCell.colwidth = cell.colwidth;
|
|
26464
26537
|
return tableCell;
|
|
26465
26538
|
});
|
|
26466
26539
|
return {
|
|
@@ -28756,6 +28829,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
28756
28829
|
this.writeTableCellProperty("tableScope", cell.scope);
|
|
28757
28830
|
this.writeNL();
|
|
28758
28831
|
}
|
|
28832
|
+
if (cell.colwidth && cell.colwidth > 0) {
|
|
28833
|
+
this.writeTableCellProperty("tableColWidth", cell.colwidth);
|
|
28834
|
+
this.writeNL();
|
|
28835
|
+
}
|
|
28759
28836
|
const content = cell.content ?? instance3.EMPTY_STRING;
|
|
28760
28837
|
this.writeTextOrValue(content, this.textFormat, TextLocation.body);
|
|
28761
28838
|
}
|
|
@@ -31318,7 +31395,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31318
31395
|
if (bitJson.isTracked == null) bitJson.isTracked = true;
|
|
31319
31396
|
if (bitJson.isInfoOnly == null) bitJson.isInfoOnly = false;
|
|
31320
31397
|
}
|
|
31321
|
-
|
|
31398
|
+
const tableImageHasTable = instance2.isOfBitType(bitType, BitType.tableImage) && !this.tableIsEmpty(bitJson.table);
|
|
31399
|
+
if (instance2.isOfBitType(bitType, BitType.table) && !instance2.isOfBitType(bitType, BitType.tableImage) || tableImageHasTable) {
|
|
31322
31400
|
if (bitJson.tableFixedHeader == null) bitJson.tableFixedHeader = false;
|
|
31323
31401
|
if (bitJson.tableHeaderWhitespaceNoWrap == null) {
|
|
31324
31402
|
bitJson.tableHeaderWhitespaceNoWrap = false;
|
|
@@ -31333,10 +31411,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31333
31411
|
if (bitJson.tableResizableColumns == null) bitJson.tableResizableColumns = false;
|
|
31334
31412
|
if (bitJson.tableColumnMinWidth == null) bitJson.tableColumnMinWidth = 0;
|
|
31335
31413
|
}
|
|
31336
|
-
if (instance2.isOfBitType(bitType, BitType.tableImage)) {
|
|
31337
|
-
|
|
31338
|
-
delete bitJson.table;
|
|
31339
|
-
}
|
|
31414
|
+
if (instance2.isOfBitType(bitType, BitType.tableImage) && !tableImageHasTable) {
|
|
31415
|
+
delete bitJson.table;
|
|
31340
31416
|
}
|
|
31341
31417
|
if (instance2.isOfBitType(bitType, BitType.bookReference)) {
|
|
31342
31418
|
if (bitJson.refAuthor == null) bitJson.refAuthor = [];
|
|
@@ -34154,11 +34230,19 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
34154
34230
|
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
34155
34231
|
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
34156
34232
|
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
34157
|
-
|
|
34233
|
+
const colWidthRaw = tags2.tableColWidth ?? readExtraProperty(tags2.extraProperties, "tableColWidth");
|
|
34234
|
+
cleanupExtraProperties(tags2, [
|
|
34235
|
+
"tableCellType",
|
|
34236
|
+
"tableRowSpan",
|
|
34237
|
+
"tableColSpan",
|
|
34238
|
+
"tableScope",
|
|
34239
|
+
"tableColWidth"
|
|
34240
|
+
]);
|
|
34158
34241
|
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
34159
34242
|
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
34160
34243
|
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
34161
34244
|
const scope = normalizeScope(scopeRaw);
|
|
34245
|
+
const colwidth = instance6.asNumber(colWidthRaw) ?? 0;
|
|
34162
34246
|
const cell = {
|
|
34163
34247
|
content
|
|
34164
34248
|
};
|
|
@@ -34166,6 +34250,7 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
34166
34250
|
if (rowspan > 1) cell.rowspan = rowspan;
|
|
34167
34251
|
if (colspan > 1) cell.colspan = colspan;
|
|
34168
34252
|
if (scope) cell.scope = scope;
|
|
34253
|
+
if (colwidth > 0) cell.colwidth = colwidth;
|
|
34169
34254
|
return cell;
|
|
34170
34255
|
};
|
|
34171
34256
|
const resolveSectionQualifier = (card) => {
|
|
@@ -34552,6 +34637,15 @@ function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, conten
|
|
|
34552
34637
|
}
|
|
34553
34638
|
|
|
34554
34639
|
// src/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.ts
|
|
34640
|
+
function flattenChainContent(content) {
|
|
34641
|
+
const result = [content];
|
|
34642
|
+
if (content.chain) {
|
|
34643
|
+
for (const child of content.chain) {
|
|
34644
|
+
result.push(...flattenChainContent(child));
|
|
34645
|
+
}
|
|
34646
|
+
}
|
|
34647
|
+
return result;
|
|
34648
|
+
}
|
|
34555
34649
|
function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, content, target) {
|
|
34556
34650
|
if (contentDepth === ContentDepth.Chain) {
|
|
34557
34651
|
itemLeadTagContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
@@ -34562,7 +34656,7 @@ function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, conten
|
|
|
34562
34656
|
function buildItemLead(context, _contentDepth, tagsConfig, content, target) {
|
|
34563
34657
|
if (context.DEBUG_CHAIN_CONTENT) context.debugPrint("item lead content", content);
|
|
34564
34658
|
const itemLeadConfig = instance2.getTagConfigForTag(tagsConfig, (0, import_superenum43.Enum)(Tag).fromValue(content.type));
|
|
34565
|
-
const chainContent =
|
|
34659
|
+
const chainContent = flattenChainContent(content);
|
|
34566
34660
|
const chainTags = context.bitContentProcessor(
|
|
34567
34661
|
ContentDepth.Chain,
|
|
34568
34662
|
itemLeadConfig?.chain,
|
|
@@ -35119,7 +35213,6 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
|
|
|
35119
35213
|
minCount: 1,
|
|
35120
35214
|
chain: void 0,
|
|
35121
35215
|
jsonKey: void 0,
|
|
35122
|
-
secondaryJsonKey: void 0,
|
|
35123
35216
|
format: TagFormat.bitmarkText,
|
|
35124
35217
|
values: void 0,
|
|
35125
35218
|
defaultValue: void 0,
|
|
@@ -40126,7 +40219,6 @@ var normalizeCardKey = (cardSetKey) => stringUtils.camelToKebab(cardSetKey);
|
|
|
40126
40219
|
var ConfigBuilder = class {
|
|
40127
40220
|
build(options) {
|
|
40128
40221
|
const opts = Object.assign({}, options);
|
|
40129
|
-
this.buildFlat(opts);
|
|
40130
40222
|
const bitConfigs = [];
|
|
40131
40223
|
const groupConfigs = [];
|
|
40132
40224
|
const bitGroupConfigKeys = /* @__PURE__ */ new Set();
|
|
@@ -40197,7 +40289,7 @@ var ConfigBuilder = class {
|
|
|
40197
40289
|
const keyToJsonKey = (key, tagNameChain) => {
|
|
40198
40290
|
let jsonKey = key;
|
|
40199
40291
|
if (key === "%") {
|
|
40200
|
-
jsonKey = "
|
|
40292
|
+
jsonKey = "item";
|
|
40201
40293
|
} else if (key === "!") {
|
|
40202
40294
|
jsonKey = "instruction";
|
|
40203
40295
|
} else if (key === "?") {
|
|
@@ -40213,13 +40305,13 @@ var ConfigBuilder = class {
|
|
|
40213
40305
|
} else if (key === "$") {
|
|
40214
40306
|
jsonKey = "sampleSolution";
|
|
40215
40307
|
} else if (key === "+") {
|
|
40216
|
-
jsonKey = "
|
|
40308
|
+
jsonKey = "choices[]|set(isCorrect=true)";
|
|
40217
40309
|
} else if (key === "-") {
|
|
40218
|
-
jsonKey = "
|
|
40310
|
+
jsonKey = "choices[]|set(isCorrect=false)";
|
|
40219
40311
|
} else if (key === "_") {
|
|
40220
|
-
jsonKey = "
|
|
40312
|
+
jsonKey = "solutions[]";
|
|
40221
40313
|
} else if (key === "=") {
|
|
40222
|
-
jsonKey = "
|
|
40314
|
+
jsonKey = "solution";
|
|
40223
40315
|
} else if (key.startsWith("@")) {
|
|
40224
40316
|
jsonKey = key.substring(1);
|
|
40225
40317
|
} else if (key.startsWith("&")) {
|
|
@@ -40270,7 +40362,7 @@ var ConfigBuilder = class {
|
|
|
40270
40362
|
if (Array.isArray(tag.chain) && tag.chain.length > 0) {
|
|
40271
40363
|
const chainTags = [];
|
|
40272
40364
|
for (const [_tagKey, chainTag] of tag.chain.entries()) {
|
|
40273
|
-
chainTags.push(...processTagEntries(chainTag, [
|
|
40365
|
+
chainTags.push(...processTagEntries(chainTag, []));
|
|
40274
40366
|
}
|
|
40275
40367
|
chain = chainTags;
|
|
40276
40368
|
}
|
|
@@ -40278,10 +40370,8 @@ var ConfigBuilder = class {
|
|
|
40278
40370
|
type: "tag",
|
|
40279
40371
|
key: tagName,
|
|
40280
40372
|
jsonKey,
|
|
40281
|
-
...tag.secondaryJsonKey ? { secondaryJsonKey: tag.secondaryJsonKey } : {},
|
|
40282
40373
|
format,
|
|
40283
|
-
default: null,
|
|
40284
|
-
alwaysInclude: false,
|
|
40374
|
+
default: tag.defaultValue ?? null,
|
|
40285
40375
|
min: tag.minCount == null ? 0 : tag.minCount,
|
|
40286
40376
|
max: tag.maxCount == null ? 1 : tag.maxCount,
|
|
40287
40377
|
description: tag.description ?? "",
|
|
@@ -40315,22 +40405,51 @@ var ConfigBuilder = class {
|
|
|
40315
40405
|
...variant.jsonKey !== void 0 ? { jsonKey: variant.jsonKey } : {},
|
|
40316
40406
|
tags: variantTags,
|
|
40317
40407
|
repeatCount: variant.repeatCount ?? 1,
|
|
40318
|
-
|
|
40319
|
-
|
|
40408
|
+
...variant.bodyRequired ? { bodyRequired: true } : {},
|
|
40409
|
+
...variant.bodyAllowed === false ? { bodyForbidden: true } : {}
|
|
40320
40410
|
};
|
|
40321
40411
|
});
|
|
40322
40412
|
return {
|
|
40323
40413
|
name: side.name,
|
|
40324
40414
|
...side.repeat ? { repeat: side.repeat } : {},
|
|
40415
|
+
...side.jsonKey != null ? { jsonKey: side.jsonKey } : {},
|
|
40325
40416
|
variants
|
|
40326
40417
|
};
|
|
40327
40418
|
});
|
|
40419
|
+
if (cardSetConfig.sections) {
|
|
40420
|
+
const cards = Object.entries(cardSetConfig.sections).map(([sectionName, section]) => {
|
|
40421
|
+
let cardSides = section.sideJsonKey ? sides.map((s) => ({ ...s, jsonKey: section.sideJsonKey })) : sides;
|
|
40422
|
+
if (normalizedKey === "table-extended" && sectionName !== "table-header") {
|
|
40423
|
+
cardSides = JSON.parse(JSON.stringify(cardSides));
|
|
40424
|
+
for (const side of cardSides) {
|
|
40425
|
+
for (const variant of side.variants) {
|
|
40426
|
+
for (const tag of variant.tags) {
|
|
40427
|
+
if (tag.type === "tag" && tag.key === "#" && tag.jsonKey === ".") {
|
|
40428
|
+
tag.jsonKey = "^table.header.rows.cells[{s}].content";
|
|
40429
|
+
}
|
|
40430
|
+
}
|
|
40431
|
+
}
|
|
40432
|
+
}
|
|
40433
|
+
}
|
|
40434
|
+
return {
|
|
40435
|
+
name: sectionName,
|
|
40436
|
+
...section.isDefault ? { isDefault: true } : {},
|
|
40437
|
+
jsonKey: section.jsonKey,
|
|
40438
|
+
sides: cardSides
|
|
40439
|
+
};
|
|
40440
|
+
});
|
|
40441
|
+
return { name: normalizedKey, cards };
|
|
40442
|
+
}
|
|
40328
40443
|
return {
|
|
40329
|
-
|
|
40330
|
-
|
|
40331
|
-
|
|
40332
|
-
|
|
40333
|
-
|
|
40444
|
+
name: normalizedKey,
|
|
40445
|
+
cards: [
|
|
40446
|
+
{
|
|
40447
|
+
name: "default",
|
|
40448
|
+
isDefault: true,
|
|
40449
|
+
jsonKey: cardSetConfig.jsonKey,
|
|
40450
|
+
sides
|
|
40451
|
+
}
|
|
40452
|
+
]
|
|
40334
40453
|
};
|
|
40335
40454
|
};
|
|
40336
40455
|
for (const bt of bitGroupConfigKeys) {
|
|
@@ -40397,8 +40516,13 @@ var ConfigBuilder = class {
|
|
|
40397
40516
|
}
|
|
40398
40517
|
}
|
|
40399
40518
|
let cardRef;
|
|
40400
|
-
|
|
40401
|
-
|
|
40519
|
+
let current = b;
|
|
40520
|
+
while (current) {
|
|
40521
|
+
if (current.cardSet && CARDSETS[current.cardSet]) {
|
|
40522
|
+
cardRef = normalizeCardKey(current.cardSet);
|
|
40523
|
+
break;
|
|
40524
|
+
}
|
|
40525
|
+
current = current.baseBitType ? BITS[current.baseBitType] : void 0;
|
|
40402
40526
|
}
|
|
40403
40527
|
const bitJson = {
|
|
40404
40528
|
name: b.bitType,
|
|
@@ -40412,10 +40536,10 @@ var ConfigBuilder = class {
|
|
|
40412
40536
|
}
|
|
40413
40537
|
],
|
|
40414
40538
|
format: resolvedBitConfig.textFormatDefault ?? "bitmark--",
|
|
40415
|
-
bodyAllowed: resolvedBitConfig.bodyAllowed ?? true,
|
|
40416
40539
|
bodyRequired: resolvedBitConfig.bodyRequired ?? false,
|
|
40417
|
-
|
|
40540
|
+
bodyForbidden: !(resolvedBitConfig.bodyAllowed ?? true),
|
|
40418
40541
|
footerRequired: resolvedBitConfig.footerRequired ?? false,
|
|
40542
|
+
footerForbidden: !(resolvedBitConfig.footerAllowed ?? true),
|
|
40419
40543
|
resourceAttachmentAllowed: resolvedBitConfig.resourceAttachmentAllowed ?? true,
|
|
40420
40544
|
tags: tags2,
|
|
40421
40545
|
...cardRef ? { card: cardRef } : {}
|
|
@@ -40489,7 +40613,7 @@ var ConfigBuilder = class {
|
|
|
40489
40613
|
for (const cardSetKey of Object.keys(CARDSETS)) {
|
|
40490
40614
|
const cardJson = serializeCardSet(cardSetKey);
|
|
40491
40615
|
if (!cardJson) continue;
|
|
40492
|
-
const output = import_node_path3.default.join(outputFolderCards, `${cardJson.
|
|
40616
|
+
const output = import_node_path3.default.join(outputFolderCards, `${cardJson.name}.jsonc`);
|
|
40493
40617
|
const str = JSON.stringify(cardJson, null, 2);
|
|
40494
40618
|
fileWrites.push(import_fs_extra3.default.writeFile(output, str));
|
|
40495
40619
|
}
|
|
@@ -40656,22 +40780,26 @@ var ConfigBuilder = class {
|
|
|
40656
40780
|
if (config.key && config.key !== expectedKey) {
|
|
40657
40781
|
errors.push(`Card key mismatch in cards/${file}: expected '${expectedKey}'`);
|
|
40658
40782
|
}
|
|
40659
|
-
if (Array.isArray(config.
|
|
40660
|
-
config.
|
|
40661
|
-
|
|
40662
|
-
|
|
40663
|
-
|
|
40664
|
-
|
|
40665
|
-
|
|
40666
|
-
|
|
40667
|
-
variantTags
|
|
40668
|
-
|
|
40669
|
-
|
|
40670
|
-
|
|
40783
|
+
if (Array.isArray(config.cards)) {
|
|
40784
|
+
for (const cardNode of config.cards) {
|
|
40785
|
+
if (cardNode && Array.isArray(cardNode.sides)) {
|
|
40786
|
+
cardNode.sides.forEach((side, sideIdx) => {
|
|
40787
|
+
const variants = side.variants;
|
|
40788
|
+
if (Array.isArray(variants)) {
|
|
40789
|
+
variants.forEach((variant, variantIdx) => {
|
|
40790
|
+
const variantTags = variant.tags;
|
|
40791
|
+
if (Array.isArray(variantTags)) {
|
|
40792
|
+
checkTags(
|
|
40793
|
+
variantTags,
|
|
40794
|
+
`cards/${file} (side ${sideIdx}, variant ${variantIdx})`,
|
|
40795
|
+
10
|
|
40796
|
+
);
|
|
40797
|
+
}
|
|
40798
|
+
});
|
|
40671
40799
|
}
|
|
40672
40800
|
});
|
|
40673
40801
|
}
|
|
40674
|
-
}
|
|
40802
|
+
}
|
|
40675
40803
|
}
|
|
40676
40804
|
} catch (err) {
|
|
40677
40805
|
errors.push(`Failed to parse cards/${file}: ${err}`);
|
|
@@ -40680,128 +40808,6 @@ var ConfigBuilder = class {
|
|
|
40680
40808
|
}
|
|
40681
40809
|
return errors;
|
|
40682
40810
|
}
|
|
40683
|
-
// Build flat bit configs
|
|
40684
|
-
buildFlat(options) {
|
|
40685
|
-
const opts = Object.assign({}, options);
|
|
40686
|
-
const bitConfigs = [];
|
|
40687
|
-
for (const bt of (0, import_superenum50.Enum)(BitType).values()) {
|
|
40688
|
-
const bitType = instance2.getBitType(bt);
|
|
40689
|
-
const bitConfig = instance2.getBitConfig(bitType);
|
|
40690
|
-
if (bitConfig) bitConfigs.push(bitConfig);
|
|
40691
|
-
}
|
|
40692
|
-
const outputFolder = opts.outputDir ?? "assets/config";
|
|
40693
|
-
const outputFolderBits = import_node_path3.default.join(outputFolder, "bits_flat");
|
|
40694
|
-
import_fs_extra3.default.ensureDirSync(outputFolderBits);
|
|
40695
|
-
const existingFiles = import_fs_extra3.default.readdirSync(outputFolderBits).filter((f) => f.endsWith(".jsonc"));
|
|
40696
|
-
for (const file of existingFiles) {
|
|
40697
|
-
import_fs_extra3.default.removeSync(import_node_path3.default.join(outputFolderBits, file));
|
|
40698
|
-
}
|
|
40699
|
-
const processTagEntries = (tag) => {
|
|
40700
|
-
const tags2 = [];
|
|
40701
|
-
let tagName = tag.key;
|
|
40702
|
-
const tagType = typeFromConfigKey(tag.key);
|
|
40703
|
-
let format = "";
|
|
40704
|
-
let chain = void 0;
|
|
40705
|
-
if (tagType === BitTagConfigKeyType.tag) {
|
|
40706
|
-
tagName = tag.name;
|
|
40707
|
-
format = "bitmark--";
|
|
40708
|
-
} else if (tagType === BitTagConfigKeyType.property) {
|
|
40709
|
-
tagName = tag.key;
|
|
40710
|
-
if (tag.format === TagFormat.plainText) {
|
|
40711
|
-
format = "string";
|
|
40712
|
-
} else if (tag.format === TagFormat.boolean) {
|
|
40713
|
-
format = "bool";
|
|
40714
|
-
} else if (tag.format === TagFormat.bitmarkText) {
|
|
40715
|
-
format = "bitmark";
|
|
40716
|
-
} else if (tag.format === TagFormat.number) {
|
|
40717
|
-
format = "number";
|
|
40718
|
-
}
|
|
40719
|
-
} else if (tagType === BitTagConfigKeyType.resource) {
|
|
40720
|
-
format = "string";
|
|
40721
|
-
} else if (tagType === BitTagConfigKeyType.group) {
|
|
40722
|
-
let k = tag.key;
|
|
40723
|
-
if (k.startsWith("group_")) k = k.substring(6);
|
|
40724
|
-
k = /*'_' +*/
|
|
40725
|
-
stringUtils.camelToKebab(k);
|
|
40726
|
-
tags2.push({
|
|
40727
|
-
type: "group",
|
|
40728
|
-
key: k
|
|
40729
|
-
});
|
|
40730
|
-
return tags2;
|
|
40731
|
-
}
|
|
40732
|
-
if (Array.isArray(tag.chain) && tag.chain.length > 0) {
|
|
40733
|
-
const chainTags = [];
|
|
40734
|
-
for (const [_tagKey, chainTag] of tag.chain.entries()) {
|
|
40735
|
-
chainTags.push(...processTagEntries(chainTag));
|
|
40736
|
-
}
|
|
40737
|
-
chain = chainTags;
|
|
40738
|
-
}
|
|
40739
|
-
const t = {
|
|
40740
|
-
key: tagName,
|
|
40741
|
-
format,
|
|
40742
|
-
default: null,
|
|
40743
|
-
alwaysInclude: false,
|
|
40744
|
-
min: tag.minCount == null ? 0 : tag.minCount,
|
|
40745
|
-
max: tag.maxCount == null ? 1 : tag.maxCount,
|
|
40746
|
-
description: tag.description ?? "",
|
|
40747
|
-
chain
|
|
40748
|
-
// raw: {
|
|
40749
|
-
// ...tag,
|
|
40750
|
-
// },
|
|
40751
|
-
};
|
|
40752
|
-
tags2.push(t);
|
|
40753
|
-
return tags2;
|
|
40754
|
-
};
|
|
40755
|
-
for (const b of bitConfigs) {
|
|
40756
|
-
const tags2 = [];
|
|
40757
|
-
const tagEntriesTypeOrder = [
|
|
40758
|
-
BitTagConfigKeyType.tag,
|
|
40759
|
-
BitTagConfigKeyType.property,
|
|
40760
|
-
BitTagConfigKeyType.resource,
|
|
40761
|
-
BitTagConfigKeyType.group,
|
|
40762
|
-
BitTagConfigKeyType.unknown
|
|
40763
|
-
];
|
|
40764
|
-
const tagEntries = Object.entries(b.tags ?? []).sort((a, b2) => {
|
|
40765
|
-
const tagA = a[1];
|
|
40766
|
-
const tagB = b2[1];
|
|
40767
|
-
const typeA = typeFromConfigKey(tagA.configKey);
|
|
40768
|
-
const typeB = typeFromConfigKey(tagB.configKey);
|
|
40769
|
-
const typeOrder = tagEntriesTypeOrder.indexOf(typeA) - tagEntriesTypeOrder.indexOf(typeB);
|
|
40770
|
-
return typeOrder;
|
|
40771
|
-
});
|
|
40772
|
-
for (const [_tagKey, tag] of tagEntries) {
|
|
40773
|
-
tags2.push(...processTagEntries(tag));
|
|
40774
|
-
}
|
|
40775
|
-
let cardRef;
|
|
40776
|
-
const cardSetKey = b.cardSet?.configKey;
|
|
40777
|
-
if (cardSetKey && CARDSETS[cardSetKey]) {
|
|
40778
|
-
cardRef = normalizeCardKey(cardSetKey);
|
|
40779
|
-
}
|
|
40780
|
-
const bitJson = {
|
|
40781
|
-
name: b.bitType,
|
|
40782
|
-
description: "",
|
|
40783
|
-
since: b.since,
|
|
40784
|
-
deprecated: b.deprecated,
|
|
40785
|
-
history: [
|
|
40786
|
-
{
|
|
40787
|
-
version: b.since,
|
|
40788
|
-
changes: ["Initial version"]
|
|
40789
|
-
}
|
|
40790
|
-
],
|
|
40791
|
-
format: b.textFormatDefault ?? "bitmark--",
|
|
40792
|
-
bodyAllowed: b.bodyAllowed ?? true,
|
|
40793
|
-
bodyRequired: b.bodyRequired ?? false,
|
|
40794
|
-
footerAllowed: b.footerAllowed ?? true,
|
|
40795
|
-
footerRequired: b.footerRequired ?? false,
|
|
40796
|
-
resourceAttachmentAllowed: b.resourceAttachmentAllowed ?? true,
|
|
40797
|
-
tags: tags2,
|
|
40798
|
-
...cardRef ? { card: cardRef } : {}
|
|
40799
|
-
};
|
|
40800
|
-
const output = import_node_path3.default.join(outputFolderBits, `${b.bitType}.jsonc`);
|
|
40801
|
-
const str = JSON.stringify(bitJson, null, 2);
|
|
40802
|
-
import_fs_extra3.default.writeFileSync(output, str);
|
|
40803
|
-
}
|
|
40804
|
-
}
|
|
40805
40811
|
};
|
|
40806
40812
|
|
|
40807
40813
|
// src/BitmarkParserGenerator.ts
|