@gmb/bitmark-parser-generator 5.20.0 → 5.22.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 +188 -33
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +20 -2
- package/dist/browser/esm/index.d.ts +20 -2
- package/dist/browser/esm/index.js +188 -33
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +204 -35
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +204 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +204 -35
- package/dist/index.js.map +1 -1
- package/package.json +23 -22
package/dist/cli/main.js
CHANGED
|
@@ -633,6 +633,7 @@ var BitType = {
|
|
|
633
633
|
vendorPadletEmbed: "vendor-padlet-embed",
|
|
634
634
|
vendorStripePricingTable: "vendor-stripe-pricing-table",
|
|
635
635
|
vendorStripePricingTableExternal: "vendor-stripe-pricing-table-external",
|
|
636
|
+
vendorStripePricingTablePrintOnRequest: "vendor-stripe-pricing-table-print-on-request",
|
|
636
637
|
video: "video",
|
|
637
638
|
videoEmbed: "video-embed",
|
|
638
639
|
videoEmbedLandscape: "video-embed-landscape",
|
|
@@ -1309,6 +1310,8 @@ var propertyKeys = {
|
|
|
1309
1310
|
property_padletId: "@padletId",
|
|
1310
1311
|
property_page: "@page",
|
|
1311
1312
|
property_printParentChapterLevel: "@printParentChapterLevel",
|
|
1313
|
+
property_printOnRequestCustomerId: "@printOnRequestCustomerId",
|
|
1314
|
+
property_printOnRequestProductId: "@printOnRequestProductId",
|
|
1312
1315
|
property_pageNo: "@pageNo",
|
|
1313
1316
|
property_partialAnswer: "@partialAnswer",
|
|
1314
1317
|
property_partner: "@partner",
|
|
@@ -2146,7 +2149,7 @@ var CARDSETS = {
|
|
|
2146
2149
|
{
|
|
2147
2150
|
key: ConfigKey.group_resourceIcon,
|
|
2148
2151
|
description: "Icon resource for the flashcard.",
|
|
2149
|
-
jsonKey: "question.icon"
|
|
2152
|
+
jsonKey: "question.icon|resource(type=image, key=image)"
|
|
2150
2153
|
}
|
|
2151
2154
|
]
|
|
2152
2155
|
}
|
|
@@ -2169,7 +2172,7 @@ var CARDSETS = {
|
|
|
2169
2172
|
{
|
|
2170
2173
|
key: ConfigKey.group_resourceIcon,
|
|
2171
2174
|
description: "Icon resource for the flashcard.",
|
|
2172
|
-
jsonKey: "answer.icon"
|
|
2175
|
+
jsonKey: "answer.icon|resource(type=image, key=image)"
|
|
2173
2176
|
}
|
|
2174
2177
|
]
|
|
2175
2178
|
},
|
|
@@ -2186,7 +2189,8 @@ var CARDSETS = {
|
|
|
2186
2189
|
},
|
|
2187
2190
|
{
|
|
2188
2191
|
key: ConfigKey.group_resourceIcon,
|
|
2189
|
-
description: "Icon resource for the flashcard."
|
|
2192
|
+
description: "Icon resource for the flashcard.",
|
|
2193
|
+
jsonKey: "alternativeAnswers[].icon|resource(type=image, key=image)"
|
|
2190
2194
|
}
|
|
2191
2195
|
],
|
|
2192
2196
|
repeatCount: Count.infinity
|
|
@@ -2214,12 +2218,14 @@ var CARDSETS = {
|
|
|
2214
2218
|
{
|
|
2215
2219
|
key: ConfigKey.tag_title,
|
|
2216
2220
|
description: "Title of the definition.",
|
|
2221
|
+
format: TagFormat.plainText,
|
|
2217
2222
|
jsonKey: "^heading.forKeys"
|
|
2218
2223
|
},
|
|
2219
2224
|
{
|
|
2220
2225
|
key: ConfigKey.group_resourceIcon,
|
|
2221
2226
|
description: "Icon resource for the definition.",
|
|
2222
|
-
|
|
2227
|
+
format: TagFormat.plainText,
|
|
2228
|
+
jsonKey: "term.icon|resource(type=image, key=image)"
|
|
2223
2229
|
}
|
|
2224
2230
|
]
|
|
2225
2231
|
}
|
|
@@ -2238,12 +2244,13 @@ var CARDSETS = {
|
|
|
2238
2244
|
{
|
|
2239
2245
|
key: ConfigKey.tag_title,
|
|
2240
2246
|
description: "Title of the definition.",
|
|
2247
|
+
format: TagFormat.plainText,
|
|
2241
2248
|
jsonKey: "^heading.forValues"
|
|
2242
2249
|
},
|
|
2243
2250
|
{
|
|
2244
2251
|
key: ConfigKey.group_resourceIcon,
|
|
2245
2252
|
description: "Icon resource for the definition.",
|
|
2246
|
-
jsonKey: "definition.icon"
|
|
2253
|
+
jsonKey: "definition.icon|resource(type=image, key=image)"
|
|
2247
2254
|
}
|
|
2248
2255
|
]
|
|
2249
2256
|
},
|
|
@@ -2260,7 +2267,8 @@ var CARDSETS = {
|
|
|
2260
2267
|
},
|
|
2261
2268
|
{
|
|
2262
2269
|
key: ConfigKey.group_resourceIcon,
|
|
2263
|
-
description: "Icon resource for the definition."
|
|
2270
|
+
description: "Icon resource for the definition.",
|
|
2271
|
+
jsonKey: "alternativeDefinitions[].icon|resource(type=image, key=image)"
|
|
2264
2272
|
}
|
|
2265
2273
|
],
|
|
2266
2274
|
repeatCount: Count.infinity
|
|
@@ -2288,6 +2296,7 @@ var CARDSETS = {
|
|
|
2288
2296
|
{
|
|
2289
2297
|
key: ConfigKey.tag_title,
|
|
2290
2298
|
description: "Title of the match pair.",
|
|
2299
|
+
format: TagFormat.plainText,
|
|
2291
2300
|
jsonKey: "^heading.forKeys"
|
|
2292
2301
|
},
|
|
2293
2302
|
{
|
|
@@ -2323,6 +2332,7 @@ var CARDSETS = {
|
|
|
2323
2332
|
{
|
|
2324
2333
|
key: ConfigKey.tag_title,
|
|
2325
2334
|
description: "Title of the match pair.",
|
|
2335
|
+
format: TagFormat.plainText,
|
|
2326
2336
|
jsonKey: "^heading.forValues"
|
|
2327
2337
|
},
|
|
2328
2338
|
{
|
|
@@ -2356,6 +2366,7 @@ var CARDSETS = {
|
|
|
2356
2366
|
{
|
|
2357
2367
|
key: ConfigKey.tag_title,
|
|
2358
2368
|
description: "Title of the audio match pair.",
|
|
2369
|
+
format: TagFormat.plainText,
|
|
2359
2370
|
jsonKey: "^heading.forKeys"
|
|
2360
2371
|
},
|
|
2361
2372
|
{
|
|
@@ -2381,6 +2392,7 @@ var CARDSETS = {
|
|
|
2381
2392
|
{
|
|
2382
2393
|
key: ConfigKey.tag_title,
|
|
2383
2394
|
description: "Title of the audio match pair.",
|
|
2395
|
+
format: TagFormat.plainText,
|
|
2384
2396
|
jsonKey: "^heading.forValues"
|
|
2385
2397
|
},
|
|
2386
2398
|
{
|
|
@@ -2413,6 +2425,7 @@ var CARDSETS = {
|
|
|
2413
2425
|
{
|
|
2414
2426
|
key: ConfigKey.tag_title,
|
|
2415
2427
|
description: "Title of the image match pair.",
|
|
2428
|
+
format: TagFormat.plainText,
|
|
2416
2429
|
jsonKey: "^heading.forKeys"
|
|
2417
2430
|
},
|
|
2418
2431
|
{
|
|
@@ -2438,6 +2451,7 @@ var CARDSETS = {
|
|
|
2438
2451
|
{
|
|
2439
2452
|
key: ConfigKey.tag_title,
|
|
2440
2453
|
description: "Title of the image match pair.",
|
|
2454
|
+
format: TagFormat.plainText,
|
|
2441
2455
|
jsonKey: "^heading.forValues"
|
|
2442
2456
|
},
|
|
2443
2457
|
{
|
|
@@ -2475,6 +2489,7 @@ var CARDSETS = {
|
|
|
2475
2489
|
{
|
|
2476
2490
|
key: ConfigKey.tag_title,
|
|
2477
2491
|
description: "Title of the match matrix.",
|
|
2492
|
+
format: TagFormat.plainText,
|
|
2478
2493
|
jsonKey: "^heading.forKeys"
|
|
2479
2494
|
},
|
|
2480
2495
|
{
|
|
@@ -2505,6 +2520,7 @@ var CARDSETS = {
|
|
|
2505
2520
|
{
|
|
2506
2521
|
key: ConfigKey.tag_title,
|
|
2507
2522
|
description: "Title of the match matrix.",
|
|
2523
|
+
format: TagFormat.plainText,
|
|
2508
2524
|
jsonKey: "^heading.forValues"
|
|
2509
2525
|
},
|
|
2510
2526
|
{
|
|
@@ -2604,6 +2620,7 @@ var CARDSETS = {
|
|
|
2604
2620
|
{
|
|
2605
2621
|
key: ConfigKey.tag_title,
|
|
2606
2622
|
description: "Title of the feedback.",
|
|
2623
|
+
format: TagFormat.plainText,
|
|
2607
2624
|
jsonKey: "^heading.forKeys"
|
|
2608
2625
|
}
|
|
2609
2626
|
],
|
|
@@ -2634,6 +2651,7 @@ var CARDSETS = {
|
|
|
2634
2651
|
{
|
|
2635
2652
|
key: ConfigKey.tag_title,
|
|
2636
2653
|
description: "Title of the feedback.",
|
|
2654
|
+
format: TagFormat.plainText,
|
|
2637
2655
|
jsonKey: "^heading.forValues"
|
|
2638
2656
|
}
|
|
2639
2657
|
],
|
|
@@ -2978,14 +2996,16 @@ var CARDSETS = {
|
|
|
2978
2996
|
{
|
|
2979
2997
|
key: ConfigKey.tag_true,
|
|
2980
2998
|
description: "Checked state for the ingredient.",
|
|
2981
|
-
jsonKey: "
|
|
2999
|
+
jsonKey: "|set(checked=true)",
|
|
2982
3000
|
maxCount: 1
|
|
3001
|
+
// nullable: true,
|
|
2983
3002
|
},
|
|
2984
3003
|
{
|
|
2985
3004
|
key: ConfigKey.tag_false,
|
|
2986
3005
|
description: "Unchecked state for the ingredient.",
|
|
2987
|
-
jsonKey: "
|
|
3006
|
+
jsonKey: "|set(checked=false)",
|
|
2988
3007
|
maxCount: 1
|
|
3008
|
+
// nullable: true,
|
|
2989
3009
|
},
|
|
2990
3010
|
{
|
|
2991
3011
|
key: ConfigKey.group_standardItemLead,
|
|
@@ -2994,7 +3014,8 @@ var CARDSETS = {
|
|
|
2994
3014
|
{
|
|
2995
3015
|
key: ConfigKey.tag_instruction,
|
|
2996
3016
|
description: "The quantity of the ingredient.",
|
|
2997
|
-
jsonKey: "quantity"
|
|
3017
|
+
jsonKey: "quantity",
|
|
3018
|
+
format: TagFormat.number
|
|
2998
3019
|
},
|
|
2999
3020
|
{
|
|
3000
3021
|
key: ConfigKey.tag_hint,
|
|
@@ -3349,6 +3370,7 @@ var GROUPS = {
|
|
|
3349
3370
|
{
|
|
3350
3371
|
key: ConfigKey.tag_anchor,
|
|
3351
3372
|
name: "Anchor",
|
|
3373
|
+
format: TagFormat.plainText,
|
|
3352
3374
|
description: "The anchor for the bit"
|
|
3353
3375
|
},
|
|
3354
3376
|
{
|
|
@@ -3509,7 +3531,7 @@ var GROUPS = {
|
|
|
3509
3531
|
tags: [
|
|
3510
3532
|
{
|
|
3511
3533
|
key: ConfigKey.property_person,
|
|
3512
|
-
jsonKey: "
|
|
3534
|
+
jsonKey: "partner.name",
|
|
3513
3535
|
description: "A person",
|
|
3514
3536
|
format: TagFormat.plainText,
|
|
3515
3537
|
chain: [
|
|
@@ -3520,6 +3542,7 @@ var GROUPS = {
|
|
|
3520
3542
|
},
|
|
3521
3543
|
{
|
|
3522
3544
|
key: ConfigKey.group_resourceImage,
|
|
3545
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3523
3546
|
description: "The image of the person"
|
|
3524
3547
|
}
|
|
3525
3548
|
]
|
|
@@ -3538,6 +3561,7 @@ var GROUPS = {
|
|
|
3538
3561
|
},
|
|
3539
3562
|
{
|
|
3540
3563
|
key: ConfigKey.group_resourceImage,
|
|
3564
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3541
3565
|
description: "The image of the partner"
|
|
3542
3566
|
}
|
|
3543
3567
|
]
|
|
@@ -3776,7 +3800,8 @@ var GROUPS = {
|
|
|
3776
3800
|
key: ConfigKey.tag_title,
|
|
3777
3801
|
name: "Title",
|
|
3778
3802
|
description: "The title of the book",
|
|
3779
|
-
maxCount: 2
|
|
3803
|
+
maxCount: 2,
|
|
3804
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
3780
3805
|
},
|
|
3781
3806
|
{
|
|
3782
3807
|
key: ConfigKey.property_subtype,
|
|
@@ -3791,6 +3816,7 @@ var GROUPS = {
|
|
|
3791
3816
|
},
|
|
3792
3817
|
{
|
|
3793
3818
|
key: ConfigKey.resource_coverImage,
|
|
3819
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
3794
3820
|
description: "The cover image of the book",
|
|
3795
3821
|
chain: [
|
|
3796
3822
|
{
|
|
@@ -3807,6 +3833,7 @@ var GROUPS = {
|
|
|
3807
3833
|
},
|
|
3808
3834
|
{
|
|
3809
3835
|
key: ConfigKey.resource_backgroundImage,
|
|
3836
|
+
jsonKey: "backgroundImage|resource(type=image, key=image)",
|
|
3810
3837
|
description: "The background image of the book",
|
|
3811
3838
|
chain: [
|
|
3812
3839
|
{
|
|
@@ -3967,6 +3994,7 @@ var GROUPS = {
|
|
|
3967
3994
|
chain: [
|
|
3968
3995
|
{
|
|
3969
3996
|
key: ConfigKey.tag_reference,
|
|
3997
|
+
format: TagFormat.plainText,
|
|
3970
3998
|
description: "The reference(s) for the book(s) in the learning path",
|
|
3971
3999
|
maxCount: 2
|
|
3972
4000
|
}
|
|
@@ -4741,6 +4769,7 @@ var GROUPS = {
|
|
|
4741
4769
|
tags: [
|
|
4742
4770
|
{
|
|
4743
4771
|
key: ConfigKey.resource_previewImage,
|
|
4772
|
+
jsonKey: "previewImage|resource(type=image, key=image)",
|
|
4744
4773
|
description: "The preview image resource",
|
|
4745
4774
|
chain: [
|
|
4746
4775
|
{
|
|
@@ -4757,6 +4786,7 @@ var GROUPS = {
|
|
|
4757
4786
|
tags: [
|
|
4758
4787
|
{
|
|
4759
4788
|
key: ConfigKey.resource_previewVideo,
|
|
4789
|
+
jsonKey: "previewVideo|resource(type=video, key=video)",
|
|
4760
4790
|
description: "The preview video resource",
|
|
4761
4791
|
chain: [
|
|
4762
4792
|
{
|
|
@@ -5181,7 +5211,8 @@ var BITS = {
|
|
|
5181
5211
|
{
|
|
5182
5212
|
key: ConfigKey.tag_title,
|
|
5183
5213
|
description: "Title and subtitle of the catalog item",
|
|
5184
|
-
maxCount: 2
|
|
5214
|
+
maxCount: 2,
|
|
5215
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5185
5216
|
},
|
|
5186
5217
|
{
|
|
5187
5218
|
key: ConfigKey.property_coverImage,
|
|
@@ -5190,6 +5221,7 @@ var BITS = {
|
|
|
5190
5221
|
},
|
|
5191
5222
|
{
|
|
5192
5223
|
key: ConfigKey.resource_coverImage,
|
|
5224
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5193
5225
|
description: "Cover image of the catalog item",
|
|
5194
5226
|
chain: [
|
|
5195
5227
|
{
|
|
@@ -5329,7 +5361,8 @@ var BITS = {
|
|
|
5329
5361
|
{
|
|
5330
5362
|
key: ConfigKey.tag_title,
|
|
5331
5363
|
description: "Title and subtitle of the catalog item",
|
|
5332
|
-
maxCount: 2
|
|
5364
|
+
maxCount: 2,
|
|
5365
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5333
5366
|
},
|
|
5334
5367
|
{
|
|
5335
5368
|
key: ConfigKey.property_coverImage,
|
|
@@ -5338,6 +5371,7 @@ var BITS = {
|
|
|
5338
5371
|
},
|
|
5339
5372
|
{
|
|
5340
5373
|
key: ConfigKey.resource_coverImage,
|
|
5374
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5341
5375
|
description: "Cover image of the catalog item",
|
|
5342
5376
|
chain: [
|
|
5343
5377
|
{
|
|
@@ -5477,7 +5511,8 @@ var BITS = {
|
|
|
5477
5511
|
{
|
|
5478
5512
|
key: ConfigKey.tag_title,
|
|
5479
5513
|
description: "Title and subtitle of the catalog item",
|
|
5480
|
-
maxCount: 2
|
|
5514
|
+
maxCount: 2,
|
|
5515
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5481
5516
|
},
|
|
5482
5517
|
{
|
|
5483
5518
|
key: ConfigKey.property_coverImage,
|
|
@@ -5805,10 +5840,12 @@ var BITS = {
|
|
|
5805
5840
|
tags: [
|
|
5806
5841
|
{
|
|
5807
5842
|
key: ConfigKey.tag_reference,
|
|
5843
|
+
format: TagFormat.plainText,
|
|
5808
5844
|
description: "The reference to the bit that this alias points to"
|
|
5809
5845
|
},
|
|
5810
5846
|
{
|
|
5811
5847
|
key: ConfigKey.tag_anchor,
|
|
5848
|
+
format: TagFormat.plainText,
|
|
5812
5849
|
description: "The anchor for the bit alias, used for linking"
|
|
5813
5850
|
}
|
|
5814
5851
|
]
|
|
@@ -6006,8 +6043,9 @@ var BITS = {
|
|
|
6006
6043
|
{
|
|
6007
6044
|
key: ConfigKey.tag_title,
|
|
6008
6045
|
description: "The title of the book cover",
|
|
6009
|
-
maxCount: 2
|
|
6046
|
+
maxCount: 2,
|
|
6010
6047
|
// title & subtitle
|
|
6048
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
6011
6049
|
},
|
|
6012
6050
|
{
|
|
6013
6051
|
key: ConfigKey.property_coverColor,
|
|
@@ -6152,11 +6190,13 @@ var BITS = {
|
|
|
6152
6190
|
tags: [
|
|
6153
6191
|
{
|
|
6154
6192
|
key: ConfigKey.tag_anchor,
|
|
6193
|
+
format: TagFormat.plainText,
|
|
6155
6194
|
description: "The anchor for the chapter, used for linking"
|
|
6156
6195
|
},
|
|
6157
6196
|
{
|
|
6158
6197
|
key: ConfigKey.tag_title,
|
|
6159
|
-
description: "The title of the chapter"
|
|
6198
|
+
description: "The title of the chapter",
|
|
6199
|
+
jsonKey: "title|setMulti(level)"
|
|
6160
6200
|
},
|
|
6161
6201
|
{
|
|
6162
6202
|
key: ConfigKey.property_toc,
|
|
@@ -6684,7 +6724,8 @@ var BITS = {
|
|
|
6684
6724
|
},
|
|
6685
6725
|
{
|
|
6686
6726
|
key: ConfigKey.tag_hint,
|
|
6687
|
-
description: "Hint for the ingredient, used to provide additional information"
|
|
6727
|
+
description: "Hint for the ingredient, used to provide additional information",
|
|
6728
|
+
format: TagFormat.plainText
|
|
6688
6729
|
}
|
|
6689
6730
|
]
|
|
6690
6731
|
}
|
|
@@ -7910,6 +7951,7 @@ var BITS = {
|
|
|
7910
7951
|
chain: [
|
|
7911
7952
|
{
|
|
7912
7953
|
key: ConfigKey.tag_reference,
|
|
7954
|
+
format: TagFormat.plainText,
|
|
7913
7955
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
7914
7956
|
maxCount: 2
|
|
7915
7957
|
}
|
|
@@ -7918,6 +7960,7 @@ var BITS = {
|
|
|
7918
7960
|
{
|
|
7919
7961
|
/* Allow incorrectly chained reference tag */
|
|
7920
7962
|
key: ConfigKey.tag_reference,
|
|
7963
|
+
format: TagFormat.plainText,
|
|
7921
7964
|
description: "Reference tag for the book, used to link to the book in the system"
|
|
7922
7965
|
},
|
|
7923
7966
|
{
|
|
@@ -7963,6 +8006,7 @@ var BITS = {
|
|
|
7963
8006
|
chain: [
|
|
7964
8007
|
{
|
|
7965
8008
|
key: ConfigKey.tag_reference,
|
|
8009
|
+
format: TagFormat.plainText,
|
|
7966
8010
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
7967
8011
|
maxCount: 2
|
|
7968
8012
|
}
|
|
@@ -7971,6 +8015,7 @@ var BITS = {
|
|
|
7971
8015
|
{
|
|
7972
8016
|
/* Allow incorrectly chained reference tag */
|
|
7973
8017
|
key: ConfigKey.tag_reference,
|
|
8018
|
+
format: TagFormat.plainText,
|
|
7974
8019
|
description: "Reference tag for the book, used to link to the book in the system"
|
|
7975
8020
|
},
|
|
7976
8021
|
{
|
|
@@ -8001,6 +8046,7 @@ var BITS = {
|
|
|
8001
8046
|
chain: [
|
|
8002
8047
|
{
|
|
8003
8048
|
key: ConfigKey.tag_reference,
|
|
8049
|
+
format: TagFormat.plainText,
|
|
8004
8050
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8005
8051
|
maxCount: 2
|
|
8006
8052
|
}
|
|
@@ -8521,6 +8567,7 @@ var BITS = {
|
|
|
8521
8567
|
tags: [
|
|
8522
8568
|
{
|
|
8523
8569
|
key: ConfigKey.tag_reference,
|
|
8570
|
+
format: TagFormat.plainText,
|
|
8524
8571
|
description: "Reference tag for the internal link, used to link to the target bit"
|
|
8525
8572
|
}
|
|
8526
8573
|
]
|
|
@@ -9463,6 +9510,7 @@ var BITS = {
|
|
|
9463
9510
|
},
|
|
9464
9511
|
{
|
|
9465
9512
|
key: ConfigKey.resource_platformBackgroundImage,
|
|
9513
|
+
jsonKey: "platformBackgroundImage|resource(type=image, key=image)",
|
|
9466
9514
|
description: "The platform section chat background image",
|
|
9467
9515
|
chain: [
|
|
9468
9516
|
{
|
|
@@ -9627,10 +9675,12 @@ var BITS = {
|
|
|
9627
9675
|
// Not sure if these are actually valid here, but include them as they are in the test bit.
|
|
9628
9676
|
{
|
|
9629
9677
|
key: ConfigKey.tag_anchor,
|
|
9678
|
+
format: TagFormat.plainText,
|
|
9630
9679
|
description: "Anchor for the sample solution, used to link to the solution"
|
|
9631
9680
|
},
|
|
9632
9681
|
{
|
|
9633
9682
|
key: ConfigKey.tag_reference,
|
|
9683
|
+
format: TagFormat.plainText,
|
|
9634
9684
|
description: "Reference for the sample solution, used to link to the source of the solution"
|
|
9635
9685
|
}
|
|
9636
9686
|
]
|
|
@@ -10512,6 +10562,25 @@ var BITS = {
|
|
|
10512
10562
|
baseBitType: BitType.vendorStripePricingTable,
|
|
10513
10563
|
description: "External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"
|
|
10514
10564
|
},
|
|
10565
|
+
[BitType.vendorStripePricingTablePrintOnRequest]: {
|
|
10566
|
+
since: "5.21.0",
|
|
10567
|
+
baseBitType: BitType.vendorStripePricingTable,
|
|
10568
|
+
description: "Stripe pricing table bit with print-on-request customer/product IDs, used to embed Stripe pricing tables tied to a specific print-on-request customer and product",
|
|
10569
|
+
tags: [
|
|
10570
|
+
{
|
|
10571
|
+
key: ConfigKey.property_printOnRequestCustomerId,
|
|
10572
|
+
description: "Print-on-request customer ID, used to identify the customer for the print-on-request flow",
|
|
10573
|
+
format: TagFormat.plainText,
|
|
10574
|
+
minCount: 1
|
|
10575
|
+
},
|
|
10576
|
+
{
|
|
10577
|
+
key: ConfigKey.property_printOnRequestProductId,
|
|
10578
|
+
description: "Print-on-request product ID, used to identify the product for the print-on-request flow",
|
|
10579
|
+
format: TagFormat.plainText,
|
|
10580
|
+
minCount: 1
|
|
10581
|
+
}
|
|
10582
|
+
]
|
|
10583
|
+
},
|
|
10515
10584
|
[BitType.video]: {
|
|
10516
10585
|
since: "1.3.0",
|
|
10517
10586
|
baseBitType: BitType._standard,
|
|
@@ -10972,7 +11041,7 @@ var instance2 = new Config();
|
|
|
10972
11041
|
// src/generated/package_info.ts
|
|
10973
11042
|
var PACKAGE_INFO = {
|
|
10974
11043
|
"name": "@gmb/bitmark-parser-generator",
|
|
10975
|
-
"version": "5.
|
|
11044
|
+
"version": "5.22.0",
|
|
10976
11045
|
"license": "ISC"};
|
|
10977
11046
|
var Environment = {
|
|
10978
11047
|
unknown: "",
|
|
@@ -11755,6 +11824,10 @@ var NodeType = {
|
|
|
11755
11824
|
previewVideoValue: "previewVideoValue",
|
|
11756
11825
|
printParentChapterLevel: "printParentChapterLevel",
|
|
11757
11826
|
printParentChapterLevelValue: "printParentChapterLevelValue",
|
|
11827
|
+
printOnRequestCustomerId: "printOnRequestCustomerId",
|
|
11828
|
+
printOnRequestCustomerIdValue: "printOnRequestCustomerIdValue",
|
|
11829
|
+
printOnRequestProductId: "printOnRequestProductId",
|
|
11830
|
+
printOnRequestProductIdValue: "printOnRequestProductIdValue",
|
|
11758
11831
|
processHandIn: "processHandIn",
|
|
11759
11832
|
processHandInLocation: "processHandInLocation",
|
|
11760
11833
|
processHandInLocationValue: "processHandInLocationValue",
|
|
@@ -12493,6 +12566,17 @@ function convertBasicToExtendedTableFormat(table) {
|
|
|
12493
12566
|
}))
|
|
12494
12567
|
};
|
|
12495
12568
|
}
|
|
12569
|
+
if (Array.isArray(table.columnWidths) && table.columnWidths.length > 0) {
|
|
12570
|
+
const targetCells = tableExtended.header?.rows[0]?.cells ?? tableExtended.body?.rows[0]?.cells;
|
|
12571
|
+
if (targetCells) {
|
|
12572
|
+
for (let i = 0; i < table.columnWidths.length; i++) {
|
|
12573
|
+
const width = table.columnWidths[i];
|
|
12574
|
+
if (typeof width === "number" && width > 0 && targetCells[i]) {
|
|
12575
|
+
targetCells[i].colwidth = width;
|
|
12576
|
+
}
|
|
12577
|
+
}
|
|
12578
|
+
}
|
|
12579
|
+
}
|
|
12496
12580
|
return tableExtended;
|
|
12497
12581
|
}
|
|
12498
12582
|
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
@@ -12504,7 +12588,23 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12504
12588
|
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
12505
12589
|
};
|
|
12506
12590
|
const dataRows = [];
|
|
12591
|
+
const widths = [];
|
|
12592
|
+
let hasAnyWidth = false;
|
|
12593
|
+
let maxCellCount = 0;
|
|
12594
|
+
const collectWidths = (cells) => {
|
|
12595
|
+
if (!cells) return;
|
|
12596
|
+
if (cells.length > maxCellCount) maxCellCount = cells.length;
|
|
12597
|
+
cells.forEach((cell, idx) => {
|
|
12598
|
+
if (cell && typeof cell.colwidth === "number" && cell.colwidth > 0) {
|
|
12599
|
+
widths[idx] = cell.colwidth;
|
|
12600
|
+
hasAnyWidth = true;
|
|
12601
|
+
}
|
|
12602
|
+
});
|
|
12603
|
+
};
|
|
12507
12604
|
const headRows = tableExtended.header?.rows ?? [];
|
|
12605
|
+
headRows.forEach((row) => collectWidths(row?.cells));
|
|
12606
|
+
(tableExtended.body?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
12607
|
+
(tableExtended.footer?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
12508
12608
|
if (headRows.length > 0) {
|
|
12509
12609
|
const primaryHeader = extractRowCells(headRows[0]);
|
|
12510
12610
|
if (primaryHeader.length > 0) {
|
|
@@ -12534,6 +12634,15 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12534
12634
|
if (dataRows.length > 0) {
|
|
12535
12635
|
table.data = dataRows;
|
|
12536
12636
|
}
|
|
12637
|
+
if (hasAnyWidth) {
|
|
12638
|
+
const columnCount = table.columns?.length ?? maxCellCount;
|
|
12639
|
+
const columnWidths = new Array(columnCount).fill(null);
|
|
12640
|
+
for (let i = 0; i < columnCount; i++) {
|
|
12641
|
+
const w = widths[i];
|
|
12642
|
+
if (typeof w === "number") columnWidths[i] = w;
|
|
12643
|
+
}
|
|
12644
|
+
table.columnWidths = columnWidths;
|
|
12645
|
+
}
|
|
12537
12646
|
return table;
|
|
12538
12647
|
}
|
|
12539
12648
|
function normalizeTableFormat(bitType, table) {
|
|
@@ -12671,6 +12780,31 @@ var AstWalkerGenerator = class {
|
|
|
12671
12780
|
}
|
|
12672
12781
|
return void 0;
|
|
12673
12782
|
}
|
|
12783
|
+
getSiblingNodes(route) {
|
|
12784
|
+
const parentNode = this.getParentNode(route);
|
|
12785
|
+
if (!parentNode || !parentNode.value || !Array.isArray(parentNode.value)) {
|
|
12786
|
+
return {};
|
|
12787
|
+
}
|
|
12788
|
+
const siblings = parentNode.value;
|
|
12789
|
+
const index = siblings.findIndex((s) => s === route[route.length - 1]?.value);
|
|
12790
|
+
if (index === -1) {
|
|
12791
|
+
return {};
|
|
12792
|
+
}
|
|
12793
|
+
return {
|
|
12794
|
+
left: index > 0 ? siblings[index - 1] : void 0,
|
|
12795
|
+
right: index < siblings.length - 1 ? siblings[index + 1] : void 0
|
|
12796
|
+
};
|
|
12797
|
+
}
|
|
12798
|
+
isEmptyParagraph(node) {
|
|
12799
|
+
if (!node) return false;
|
|
12800
|
+
if (node.type !== TextNodeType.paragraph) return false;
|
|
12801
|
+
if (!node.content || !Array.isArray(node.content)) return true;
|
|
12802
|
+
for (const contentNode of node.content) {
|
|
12803
|
+
if (contentNode.type !== TextNodeType.text) return false;
|
|
12804
|
+
if (contentNode.text && contentNode.text.trim() !== "") return false;
|
|
12805
|
+
}
|
|
12806
|
+
return true;
|
|
12807
|
+
}
|
|
12674
12808
|
};
|
|
12675
12809
|
|
|
12676
12810
|
// src/generator/text/TextGenerator.ts
|
|
@@ -12788,7 +12922,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
12788
12922
|
inParagraph = false;
|
|
12789
12923
|
inHeading = false;
|
|
12790
12924
|
inCodeBlock = false;
|
|
12791
|
-
exitedCodeBlock = false;
|
|
12792
12925
|
inBulletList = false;
|
|
12793
12926
|
inInline = false;
|
|
12794
12927
|
markDepth = 0;
|
|
@@ -12883,7 +13016,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
12883
13016
|
this.inParagraph = false;
|
|
12884
13017
|
this.inHeading = false;
|
|
12885
13018
|
this.inCodeBlock = false;
|
|
12886
|
-
this.exitedCodeBlock = false;
|
|
12887
13019
|
this.inBulletList = false;
|
|
12888
13020
|
this.inInline = false;
|
|
12889
13021
|
this.markDepth = 0;
|
|
@@ -12949,7 +13081,7 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
12949
13081
|
switch (node.type) {
|
|
12950
13082
|
case TextNodeType.paragraph:
|
|
12951
13083
|
this.inParagraph = true;
|
|
12952
|
-
this.writeParagraph(node);
|
|
13084
|
+
this.writeParagraph(node, route);
|
|
12953
13085
|
break;
|
|
12954
13086
|
case TextNodeType.hardBreak:
|
|
12955
13087
|
this.writeHardBreak(node);
|
|
@@ -13005,7 +13137,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13005
13137
|
this.writeBodyBit(node, route);
|
|
13006
13138
|
return false;
|
|
13007
13139
|
}
|
|
13008
|
-
this.exitedCodeBlock = false;
|
|
13009
13140
|
}
|
|
13010
13141
|
handleBetweenNode(node, _left, _right, _route) {
|
|
13011
13142
|
switch (node.type) {
|
|
@@ -13038,7 +13169,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13038
13169
|
this.writeNL();
|
|
13039
13170
|
this.writeNL();
|
|
13040
13171
|
this.inCodeBlock = false;
|
|
13041
|
-
this.exitedCodeBlock = true;
|
|
13042
13172
|
break;
|
|
13043
13173
|
case TextNodeType.noBulletList:
|
|
13044
13174
|
case TextNodeType.bulletList:
|
|
@@ -13396,21 +13526,19 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13396
13526
|
}
|
|
13397
13527
|
}
|
|
13398
13528
|
}
|
|
13399
|
-
writeParagraph(node) {
|
|
13529
|
+
writeParagraph(node, route) {
|
|
13400
13530
|
if (this.textFormat === TextFormat.bitmarkText) {
|
|
13401
13531
|
if (this.inBulletList) return;
|
|
13402
|
-
const
|
|
13403
|
-
|
|
13404
|
-
|
|
13405
|
-
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
}
|
|
13409
|
-
if (nodeContentLength > 1) return;
|
|
13532
|
+
const siblingNodes = this.getSiblingNodes(route);
|
|
13533
|
+
const prevSiblingNodeType = siblingNodes.left?.type;
|
|
13534
|
+
const inBody = this.textLocation === TextLocation.body;
|
|
13535
|
+
const isEmptyParagraph = this.isEmptyParagraph(node);
|
|
13536
|
+
if (!inBody || !isEmptyParagraph && !(prevSiblingNodeType === TextNodeType.codeBlock || prevSiblingNodeType === TextNodeType.paragraph)) {
|
|
13537
|
+
return;
|
|
13410
13538
|
}
|
|
13411
13539
|
this.write("|");
|
|
13412
13540
|
this.writeNL();
|
|
13413
|
-
if (
|
|
13541
|
+
if (prevSiblingNodeType === TextNodeType.codeBlock) {
|
|
13414
13542
|
this.writeNL();
|
|
13415
13543
|
}
|
|
13416
13544
|
}
|
|
@@ -25368,6 +25496,18 @@ var Builder = class extends BaseBuilder {
|
|
|
25368
25496
|
data.printParentChapterLevel,
|
|
25369
25497
|
options
|
|
25370
25498
|
),
|
|
25499
|
+
printOnRequestCustomerId: this.toAstProperty(
|
|
25500
|
+
bitType,
|
|
25501
|
+
ConfigKey.property_printOnRequestCustomerId,
|
|
25502
|
+
data.printOnRequestCustomerId,
|
|
25503
|
+
options
|
|
25504
|
+
),
|
|
25505
|
+
printOnRequestProductId: this.toAstProperty(
|
|
25506
|
+
bitType,
|
|
25507
|
+
ConfigKey.property_printOnRequestProductId,
|
|
25508
|
+
data.printOnRequestProductId,
|
|
25509
|
+
options
|
|
25510
|
+
),
|
|
25371
25511
|
platformBrandTarget: this.toAstProperty(
|
|
25372
25512
|
bitType,
|
|
25373
25513
|
ConfigKey.property_platformBrandTarget,
|
|
@@ -26200,6 +26340,17 @@ var Builder = class extends BaseBuilder {
|
|
|
26200
26340
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation.tag, cell))
|
|
26201
26341
|
);
|
|
26202
26342
|
}
|
|
26343
|
+
if (Array.isArray(nodeTable.columnWidths)) {
|
|
26344
|
+
const columnCount = Array.isArray(nodeTable.columns) ? nodeTable.columns.length : void 0;
|
|
26345
|
+
const source = columnCount != null ? nodeTable.columnWidths.slice(0, columnCount) : nodeTable.columnWidths;
|
|
26346
|
+
const normalized = source.map((w) => typeof w === "number" && w > 0 ? w : null);
|
|
26347
|
+
const hasAny = normalized.some((w) => w != null);
|
|
26348
|
+
if (hasAny) {
|
|
26349
|
+
nodeTable.columnWidths = normalized;
|
|
26350
|
+
} else {
|
|
26351
|
+
delete nodeTable.columnWidths;
|
|
26352
|
+
}
|
|
26353
|
+
}
|
|
26203
26354
|
const buildSection = (section) => {
|
|
26204
26355
|
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
26205
26356
|
const rows = section.rows.map((row) => {
|
|
@@ -31165,6 +31316,10 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31165
31316
|
if (instance2.isOfBitType(bitType, BitType.vendorStripePricingTable)) {
|
|
31166
31317
|
if (bitJson.stripePricingTableId == null) bitJson.stripePricingTableId = "";
|
|
31167
31318
|
if (bitJson.stripePublishableKey == null) bitJson.stripePublishableKey = "";
|
|
31319
|
+
if (instance2.isOfBitType(bitType, BitType.vendorStripePricingTablePrintOnRequest)) {
|
|
31320
|
+
if (bitJson.printOnRequestCustomerId == null) bitJson.printOnRequestCustomerId = "";
|
|
31321
|
+
if (bitJson.printOnRequestProductId == null) bitJson.printOnRequestProductId = "";
|
|
31322
|
+
}
|
|
31168
31323
|
}
|
|
31169
31324
|
if (instance2.isOfBitType(bitType, BitType.callToAction)) {
|
|
31170
31325
|
if (bitJson.buttonCaption == null) bitJson.buttonCaption = "";
|
|
@@ -39815,7 +39970,17 @@ var ConfigBuilder = class {
|
|
|
39815
39970
|
let chain = void 0;
|
|
39816
39971
|
if (tagType === BitTagConfigKeyType.tag) {
|
|
39817
39972
|
tagName = tag.key;
|
|
39818
|
-
format
|
|
39973
|
+
if (tag.format === TagFormat.plainText) {
|
|
39974
|
+
format = "string";
|
|
39975
|
+
} else if (tag.format === TagFormat.boolean) {
|
|
39976
|
+
format = "bool";
|
|
39977
|
+
} else if (tag.format === TagFormat.bitmarkText) {
|
|
39978
|
+
format = "bitmark";
|
|
39979
|
+
} else if (tag.format === TagFormat.number) {
|
|
39980
|
+
format = "number";
|
|
39981
|
+
} else {
|
|
39982
|
+
format = "bitmark--";
|
|
39983
|
+
}
|
|
39819
39984
|
} else if (tagType === BitTagConfigKeyType.property) {
|
|
39820
39985
|
tagName = tag.key;
|
|
39821
39986
|
if (tag.format === TagFormat.plainText) {
|
|
@@ -39839,7 +40004,10 @@ var ConfigBuilder = class {
|
|
|
39839
40004
|
tags2.push({
|
|
39840
40005
|
type: "group",
|
|
39841
40006
|
key: groupKey,
|
|
39842
|
-
...tag.jsonKey ? { jsonKey: tag.jsonKey } : {}
|
|
40007
|
+
...tag.jsonKey ? { jsonKey: tag.jsonKey } : {},
|
|
40008
|
+
...tag.minCount != null ? { min: tag.minCount } : {},
|
|
40009
|
+
...tag.maxCount != null ? { max: tag.maxCount } : {},
|
|
40010
|
+
...tag.description ? { description: tag.description } : {}
|
|
39843
40011
|
});
|
|
39844
40012
|
}
|
|
39845
40013
|
return tags2;
|
|
@@ -39857,6 +40025,7 @@ var ConfigBuilder = class {
|
|
|
39857
40025
|
jsonKey,
|
|
39858
40026
|
format,
|
|
39859
40027
|
default: tag.defaultValue ?? null,
|
|
40028
|
+
...tag.nullable ? { nullable: true } : {},
|
|
39860
40029
|
min: tag.minCount == null ? 0 : tag.minCount,
|
|
39861
40030
|
max: tag.maxCount == null ? 1 : tag.maxCount,
|
|
39862
40031
|
description: tag.description ?? "",
|