@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
|
@@ -633,6 +633,7 @@ var BitType2 = {
|
|
|
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",
|
|
@@ -1344,6 +1345,8 @@ var propertyKeys = {
|
|
|
1344
1345
|
property_padletId: "@padletId",
|
|
1345
1346
|
property_page: "@page",
|
|
1346
1347
|
property_printParentChapterLevel: "@printParentChapterLevel",
|
|
1348
|
+
property_printOnRequestCustomerId: "@printOnRequestCustomerId",
|
|
1349
|
+
property_printOnRequestProductId: "@printOnRequestProductId",
|
|
1347
1350
|
property_pageNo: "@pageNo",
|
|
1348
1351
|
property_partialAnswer: "@partialAnswer",
|
|
1349
1352
|
property_partner: "@partner",
|
|
@@ -2190,7 +2193,7 @@ var CARDSETS = {
|
|
|
2190
2193
|
{
|
|
2191
2194
|
key: ConfigKey.group_resourceIcon,
|
|
2192
2195
|
description: "Icon resource for the flashcard.",
|
|
2193
|
-
jsonKey: "question.icon"
|
|
2196
|
+
jsonKey: "question.icon|resource(type=image, key=image)"
|
|
2194
2197
|
}
|
|
2195
2198
|
]
|
|
2196
2199
|
}
|
|
@@ -2213,7 +2216,7 @@ var CARDSETS = {
|
|
|
2213
2216
|
{
|
|
2214
2217
|
key: ConfigKey.group_resourceIcon,
|
|
2215
2218
|
description: "Icon resource for the flashcard.",
|
|
2216
|
-
jsonKey: "answer.icon"
|
|
2219
|
+
jsonKey: "answer.icon|resource(type=image, key=image)"
|
|
2217
2220
|
}
|
|
2218
2221
|
]
|
|
2219
2222
|
},
|
|
@@ -2230,7 +2233,8 @@ var CARDSETS = {
|
|
|
2230
2233
|
},
|
|
2231
2234
|
{
|
|
2232
2235
|
key: ConfigKey.group_resourceIcon,
|
|
2233
|
-
description: "Icon resource for the flashcard."
|
|
2236
|
+
description: "Icon resource for the flashcard.",
|
|
2237
|
+
jsonKey: "alternativeAnswers[].icon|resource(type=image, key=image)"
|
|
2234
2238
|
}
|
|
2235
2239
|
],
|
|
2236
2240
|
repeatCount: Count.infinity
|
|
@@ -2258,12 +2262,14 @@ var CARDSETS = {
|
|
|
2258
2262
|
{
|
|
2259
2263
|
key: ConfigKey.tag_title,
|
|
2260
2264
|
description: "Title of the definition.",
|
|
2265
|
+
format: TagFormat.plainText,
|
|
2261
2266
|
jsonKey: "^heading.forKeys"
|
|
2262
2267
|
},
|
|
2263
2268
|
{
|
|
2264
2269
|
key: ConfigKey.group_resourceIcon,
|
|
2265
2270
|
description: "Icon resource for the definition.",
|
|
2266
|
-
|
|
2271
|
+
format: TagFormat.plainText,
|
|
2272
|
+
jsonKey: "term.icon|resource(type=image, key=image)"
|
|
2267
2273
|
}
|
|
2268
2274
|
]
|
|
2269
2275
|
}
|
|
@@ -2282,12 +2288,13 @@ var CARDSETS = {
|
|
|
2282
2288
|
{
|
|
2283
2289
|
key: ConfigKey.tag_title,
|
|
2284
2290
|
description: "Title of the definition.",
|
|
2291
|
+
format: TagFormat.plainText,
|
|
2285
2292
|
jsonKey: "^heading.forValues"
|
|
2286
2293
|
},
|
|
2287
2294
|
{
|
|
2288
2295
|
key: ConfigKey.group_resourceIcon,
|
|
2289
2296
|
description: "Icon resource for the definition.",
|
|
2290
|
-
jsonKey: "definition.icon"
|
|
2297
|
+
jsonKey: "definition.icon|resource(type=image, key=image)"
|
|
2291
2298
|
}
|
|
2292
2299
|
]
|
|
2293
2300
|
},
|
|
@@ -2304,7 +2311,8 @@ var CARDSETS = {
|
|
|
2304
2311
|
},
|
|
2305
2312
|
{
|
|
2306
2313
|
key: ConfigKey.group_resourceIcon,
|
|
2307
|
-
description: "Icon resource for the definition."
|
|
2314
|
+
description: "Icon resource for the definition.",
|
|
2315
|
+
jsonKey: "alternativeDefinitions[].icon|resource(type=image, key=image)"
|
|
2308
2316
|
}
|
|
2309
2317
|
],
|
|
2310
2318
|
repeatCount: Count.infinity
|
|
@@ -2332,6 +2340,7 @@ var CARDSETS = {
|
|
|
2332
2340
|
{
|
|
2333
2341
|
key: ConfigKey.tag_title,
|
|
2334
2342
|
description: "Title of the match pair.",
|
|
2343
|
+
format: TagFormat.plainText,
|
|
2335
2344
|
jsonKey: "^heading.forKeys"
|
|
2336
2345
|
},
|
|
2337
2346
|
{
|
|
@@ -2367,6 +2376,7 @@ var CARDSETS = {
|
|
|
2367
2376
|
{
|
|
2368
2377
|
key: ConfigKey.tag_title,
|
|
2369
2378
|
description: "Title of the match pair.",
|
|
2379
|
+
format: TagFormat.plainText,
|
|
2370
2380
|
jsonKey: "^heading.forValues"
|
|
2371
2381
|
},
|
|
2372
2382
|
{
|
|
@@ -2400,6 +2410,7 @@ var CARDSETS = {
|
|
|
2400
2410
|
{
|
|
2401
2411
|
key: ConfigKey.tag_title,
|
|
2402
2412
|
description: "Title of the audio match pair.",
|
|
2413
|
+
format: TagFormat.plainText,
|
|
2403
2414
|
jsonKey: "^heading.forKeys"
|
|
2404
2415
|
},
|
|
2405
2416
|
{
|
|
@@ -2425,6 +2436,7 @@ var CARDSETS = {
|
|
|
2425
2436
|
{
|
|
2426
2437
|
key: ConfigKey.tag_title,
|
|
2427
2438
|
description: "Title of the audio match pair.",
|
|
2439
|
+
format: TagFormat.plainText,
|
|
2428
2440
|
jsonKey: "^heading.forValues"
|
|
2429
2441
|
},
|
|
2430
2442
|
{
|
|
@@ -2457,6 +2469,7 @@ var CARDSETS = {
|
|
|
2457
2469
|
{
|
|
2458
2470
|
key: ConfigKey.tag_title,
|
|
2459
2471
|
description: "Title of the image match pair.",
|
|
2472
|
+
format: TagFormat.plainText,
|
|
2460
2473
|
jsonKey: "^heading.forKeys"
|
|
2461
2474
|
},
|
|
2462
2475
|
{
|
|
@@ -2482,6 +2495,7 @@ var CARDSETS = {
|
|
|
2482
2495
|
{
|
|
2483
2496
|
key: ConfigKey.tag_title,
|
|
2484
2497
|
description: "Title of the image match pair.",
|
|
2498
|
+
format: TagFormat.plainText,
|
|
2485
2499
|
jsonKey: "^heading.forValues"
|
|
2486
2500
|
},
|
|
2487
2501
|
{
|
|
@@ -2519,6 +2533,7 @@ var CARDSETS = {
|
|
|
2519
2533
|
{
|
|
2520
2534
|
key: ConfigKey.tag_title,
|
|
2521
2535
|
description: "Title of the match matrix.",
|
|
2536
|
+
format: TagFormat.plainText,
|
|
2522
2537
|
jsonKey: "^heading.forKeys"
|
|
2523
2538
|
},
|
|
2524
2539
|
{
|
|
@@ -2549,6 +2564,7 @@ var CARDSETS = {
|
|
|
2549
2564
|
{
|
|
2550
2565
|
key: ConfigKey.tag_title,
|
|
2551
2566
|
description: "Title of the match matrix.",
|
|
2567
|
+
format: TagFormat.plainText,
|
|
2552
2568
|
jsonKey: "^heading.forValues"
|
|
2553
2569
|
},
|
|
2554
2570
|
{
|
|
@@ -2648,6 +2664,7 @@ var CARDSETS = {
|
|
|
2648
2664
|
{
|
|
2649
2665
|
key: ConfigKey.tag_title,
|
|
2650
2666
|
description: "Title of the feedback.",
|
|
2667
|
+
format: TagFormat.plainText,
|
|
2651
2668
|
jsonKey: "^heading.forKeys"
|
|
2652
2669
|
}
|
|
2653
2670
|
],
|
|
@@ -2678,6 +2695,7 @@ var CARDSETS = {
|
|
|
2678
2695
|
{
|
|
2679
2696
|
key: ConfigKey.tag_title,
|
|
2680
2697
|
description: "Title of the feedback.",
|
|
2698
|
+
format: TagFormat.plainText,
|
|
2681
2699
|
jsonKey: "^heading.forValues"
|
|
2682
2700
|
}
|
|
2683
2701
|
],
|
|
@@ -3022,14 +3040,16 @@ var CARDSETS = {
|
|
|
3022
3040
|
{
|
|
3023
3041
|
key: ConfigKey.tag_true,
|
|
3024
3042
|
description: "Checked state for the ingredient.",
|
|
3025
|
-
jsonKey: "
|
|
3043
|
+
jsonKey: "|set(checked=true)",
|
|
3026
3044
|
maxCount: 1
|
|
3045
|
+
// nullable: true,
|
|
3027
3046
|
},
|
|
3028
3047
|
{
|
|
3029
3048
|
key: ConfigKey.tag_false,
|
|
3030
3049
|
description: "Unchecked state for the ingredient.",
|
|
3031
|
-
jsonKey: "
|
|
3050
|
+
jsonKey: "|set(checked=false)",
|
|
3032
3051
|
maxCount: 1
|
|
3052
|
+
// nullable: true,
|
|
3033
3053
|
},
|
|
3034
3054
|
{
|
|
3035
3055
|
key: ConfigKey.group_standardItemLead,
|
|
@@ -3038,7 +3058,8 @@ var CARDSETS = {
|
|
|
3038
3058
|
{
|
|
3039
3059
|
key: ConfigKey.tag_instruction,
|
|
3040
3060
|
description: "The quantity of the ingredient.",
|
|
3041
|
-
jsonKey: "quantity"
|
|
3061
|
+
jsonKey: "quantity",
|
|
3062
|
+
format: TagFormat.number
|
|
3042
3063
|
},
|
|
3043
3064
|
{
|
|
3044
3065
|
key: ConfigKey.tag_hint,
|
|
@@ -3393,6 +3414,7 @@ var GROUPS = {
|
|
|
3393
3414
|
{
|
|
3394
3415
|
key: ConfigKey.tag_anchor,
|
|
3395
3416
|
name: "Anchor",
|
|
3417
|
+
format: TagFormat.plainText,
|
|
3396
3418
|
description: "The anchor for the bit"
|
|
3397
3419
|
},
|
|
3398
3420
|
{
|
|
@@ -3553,7 +3575,7 @@ var GROUPS = {
|
|
|
3553
3575
|
tags: [
|
|
3554
3576
|
{
|
|
3555
3577
|
key: ConfigKey.property_person,
|
|
3556
|
-
jsonKey: "
|
|
3578
|
+
jsonKey: "partner.name",
|
|
3557
3579
|
description: "A person",
|
|
3558
3580
|
format: TagFormat.plainText,
|
|
3559
3581
|
chain: [
|
|
@@ -3564,6 +3586,7 @@ var GROUPS = {
|
|
|
3564
3586
|
},
|
|
3565
3587
|
{
|
|
3566
3588
|
key: ConfigKey.group_resourceImage,
|
|
3589
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3567
3590
|
description: "The image of the person"
|
|
3568
3591
|
}
|
|
3569
3592
|
]
|
|
@@ -3582,6 +3605,7 @@ var GROUPS = {
|
|
|
3582
3605
|
},
|
|
3583
3606
|
{
|
|
3584
3607
|
key: ConfigKey.group_resourceImage,
|
|
3608
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3585
3609
|
description: "The image of the partner"
|
|
3586
3610
|
}
|
|
3587
3611
|
]
|
|
@@ -3820,7 +3844,8 @@ var GROUPS = {
|
|
|
3820
3844
|
key: ConfigKey.tag_title,
|
|
3821
3845
|
name: "Title",
|
|
3822
3846
|
description: "The title of the book",
|
|
3823
|
-
maxCount: 2
|
|
3847
|
+
maxCount: 2,
|
|
3848
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
3824
3849
|
},
|
|
3825
3850
|
{
|
|
3826
3851
|
key: ConfigKey.property_subtype,
|
|
@@ -3835,6 +3860,7 @@ var GROUPS = {
|
|
|
3835
3860
|
},
|
|
3836
3861
|
{
|
|
3837
3862
|
key: ConfigKey.resource_coverImage,
|
|
3863
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
3838
3864
|
description: "The cover image of the book",
|
|
3839
3865
|
chain: [
|
|
3840
3866
|
{
|
|
@@ -3851,6 +3877,7 @@ var GROUPS = {
|
|
|
3851
3877
|
},
|
|
3852
3878
|
{
|
|
3853
3879
|
key: ConfigKey.resource_backgroundImage,
|
|
3880
|
+
jsonKey: "backgroundImage|resource(type=image, key=image)",
|
|
3854
3881
|
description: "The background image of the book",
|
|
3855
3882
|
chain: [
|
|
3856
3883
|
{
|
|
@@ -4011,6 +4038,7 @@ var GROUPS = {
|
|
|
4011
4038
|
chain: [
|
|
4012
4039
|
{
|
|
4013
4040
|
key: ConfigKey.tag_reference,
|
|
4041
|
+
format: TagFormat.plainText,
|
|
4014
4042
|
description: "The reference(s) for the book(s) in the learning path",
|
|
4015
4043
|
maxCount: 2
|
|
4016
4044
|
}
|
|
@@ -4785,6 +4813,7 @@ var GROUPS = {
|
|
|
4785
4813
|
tags: [
|
|
4786
4814
|
{
|
|
4787
4815
|
key: ConfigKey.resource_previewImage,
|
|
4816
|
+
jsonKey: "previewImage|resource(type=image, key=image)",
|
|
4788
4817
|
description: "The preview image resource",
|
|
4789
4818
|
chain: [
|
|
4790
4819
|
{
|
|
@@ -4801,6 +4830,7 @@ var GROUPS = {
|
|
|
4801
4830
|
tags: [
|
|
4802
4831
|
{
|
|
4803
4832
|
key: ConfigKey.resource_previewVideo,
|
|
4833
|
+
jsonKey: "previewVideo|resource(type=video, key=video)",
|
|
4804
4834
|
description: "The preview video resource",
|
|
4805
4835
|
chain: [
|
|
4806
4836
|
{
|
|
@@ -5225,7 +5255,8 @@ var BITS = {
|
|
|
5225
5255
|
{
|
|
5226
5256
|
key: ConfigKey.tag_title,
|
|
5227
5257
|
description: "Title and subtitle of the catalog item",
|
|
5228
|
-
maxCount: 2
|
|
5258
|
+
maxCount: 2,
|
|
5259
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5229
5260
|
},
|
|
5230
5261
|
{
|
|
5231
5262
|
key: ConfigKey.property_coverImage,
|
|
@@ -5234,6 +5265,7 @@ var BITS = {
|
|
|
5234
5265
|
},
|
|
5235
5266
|
{
|
|
5236
5267
|
key: ConfigKey.resource_coverImage,
|
|
5268
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5237
5269
|
description: "Cover image of the catalog item",
|
|
5238
5270
|
chain: [
|
|
5239
5271
|
{
|
|
@@ -5373,7 +5405,8 @@ var BITS = {
|
|
|
5373
5405
|
{
|
|
5374
5406
|
key: ConfigKey.tag_title,
|
|
5375
5407
|
description: "Title and subtitle of the catalog item",
|
|
5376
|
-
maxCount: 2
|
|
5408
|
+
maxCount: 2,
|
|
5409
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5377
5410
|
},
|
|
5378
5411
|
{
|
|
5379
5412
|
key: ConfigKey.property_coverImage,
|
|
@@ -5382,6 +5415,7 @@ var BITS = {
|
|
|
5382
5415
|
},
|
|
5383
5416
|
{
|
|
5384
5417
|
key: ConfigKey.resource_coverImage,
|
|
5418
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5385
5419
|
description: "Cover image of the catalog item",
|
|
5386
5420
|
chain: [
|
|
5387
5421
|
{
|
|
@@ -5521,7 +5555,8 @@ var BITS = {
|
|
|
5521
5555
|
{
|
|
5522
5556
|
key: ConfigKey.tag_title,
|
|
5523
5557
|
description: "Title and subtitle of the catalog item",
|
|
5524
|
-
maxCount: 2
|
|
5558
|
+
maxCount: 2,
|
|
5559
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5525
5560
|
},
|
|
5526
5561
|
{
|
|
5527
5562
|
key: ConfigKey.property_coverImage,
|
|
@@ -5849,10 +5884,12 @@ var BITS = {
|
|
|
5849
5884
|
tags: [
|
|
5850
5885
|
{
|
|
5851
5886
|
key: ConfigKey.tag_reference,
|
|
5887
|
+
format: TagFormat.plainText,
|
|
5852
5888
|
description: "The reference to the bit that this alias points to"
|
|
5853
5889
|
},
|
|
5854
5890
|
{
|
|
5855
5891
|
key: ConfigKey.tag_anchor,
|
|
5892
|
+
format: TagFormat.plainText,
|
|
5856
5893
|
description: "The anchor for the bit alias, used for linking"
|
|
5857
5894
|
}
|
|
5858
5895
|
]
|
|
@@ -6050,8 +6087,9 @@ var BITS = {
|
|
|
6050
6087
|
{
|
|
6051
6088
|
key: ConfigKey.tag_title,
|
|
6052
6089
|
description: "The title of the book cover",
|
|
6053
|
-
maxCount: 2
|
|
6090
|
+
maxCount: 2,
|
|
6054
6091
|
// title & subtitle
|
|
6092
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
6055
6093
|
},
|
|
6056
6094
|
{
|
|
6057
6095
|
key: ConfigKey.property_coverColor,
|
|
@@ -6196,11 +6234,13 @@ var BITS = {
|
|
|
6196
6234
|
tags: [
|
|
6197
6235
|
{
|
|
6198
6236
|
key: ConfigKey.tag_anchor,
|
|
6237
|
+
format: TagFormat.plainText,
|
|
6199
6238
|
description: "The anchor for the chapter, used for linking"
|
|
6200
6239
|
},
|
|
6201
6240
|
{
|
|
6202
6241
|
key: ConfigKey.tag_title,
|
|
6203
|
-
description: "The title of the chapter"
|
|
6242
|
+
description: "The title of the chapter",
|
|
6243
|
+
jsonKey: "title|setMulti(level)"
|
|
6204
6244
|
},
|
|
6205
6245
|
{
|
|
6206
6246
|
key: ConfigKey.property_toc,
|
|
@@ -6728,7 +6768,8 @@ var BITS = {
|
|
|
6728
6768
|
},
|
|
6729
6769
|
{
|
|
6730
6770
|
key: ConfigKey.tag_hint,
|
|
6731
|
-
description: "Hint for the ingredient, used to provide additional information"
|
|
6771
|
+
description: "Hint for the ingredient, used to provide additional information",
|
|
6772
|
+
format: TagFormat.plainText
|
|
6732
6773
|
}
|
|
6733
6774
|
]
|
|
6734
6775
|
}
|
|
@@ -7954,6 +7995,7 @@ var BITS = {
|
|
|
7954
7995
|
chain: [
|
|
7955
7996
|
{
|
|
7956
7997
|
key: ConfigKey.tag_reference,
|
|
7998
|
+
format: TagFormat.plainText,
|
|
7957
7999
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
7958
8000
|
maxCount: 2
|
|
7959
8001
|
}
|
|
@@ -7962,6 +8004,7 @@ var BITS = {
|
|
|
7962
8004
|
{
|
|
7963
8005
|
/* Allow incorrectly chained reference tag */
|
|
7964
8006
|
key: ConfigKey.tag_reference,
|
|
8007
|
+
format: TagFormat.plainText,
|
|
7965
8008
|
description: "Reference tag for the book, used to link to the book in the system"
|
|
7966
8009
|
},
|
|
7967
8010
|
{
|
|
@@ -8007,6 +8050,7 @@ var BITS = {
|
|
|
8007
8050
|
chain: [
|
|
8008
8051
|
{
|
|
8009
8052
|
key: ConfigKey.tag_reference,
|
|
8053
|
+
format: TagFormat.plainText,
|
|
8010
8054
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8011
8055
|
maxCount: 2
|
|
8012
8056
|
}
|
|
@@ -8015,6 +8059,7 @@ var BITS = {
|
|
|
8015
8059
|
{
|
|
8016
8060
|
/* Allow incorrectly chained reference tag */
|
|
8017
8061
|
key: ConfigKey.tag_reference,
|
|
8062
|
+
format: TagFormat.plainText,
|
|
8018
8063
|
description: "Reference tag for the book, used to link to the book in the system"
|
|
8019
8064
|
},
|
|
8020
8065
|
{
|
|
@@ -8045,6 +8090,7 @@ var BITS = {
|
|
|
8045
8090
|
chain: [
|
|
8046
8091
|
{
|
|
8047
8092
|
key: ConfigKey.tag_reference,
|
|
8093
|
+
format: TagFormat.plainText,
|
|
8048
8094
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8049
8095
|
maxCount: 2
|
|
8050
8096
|
}
|
|
@@ -8565,6 +8611,7 @@ var BITS = {
|
|
|
8565
8611
|
tags: [
|
|
8566
8612
|
{
|
|
8567
8613
|
key: ConfigKey.tag_reference,
|
|
8614
|
+
format: TagFormat.plainText,
|
|
8568
8615
|
description: "Reference tag for the internal link, used to link to the target bit"
|
|
8569
8616
|
}
|
|
8570
8617
|
]
|
|
@@ -9507,6 +9554,7 @@ var BITS = {
|
|
|
9507
9554
|
},
|
|
9508
9555
|
{
|
|
9509
9556
|
key: ConfigKey.resource_platformBackgroundImage,
|
|
9557
|
+
jsonKey: "platformBackgroundImage|resource(type=image, key=image)",
|
|
9510
9558
|
description: "The platform section chat background image",
|
|
9511
9559
|
chain: [
|
|
9512
9560
|
{
|
|
@@ -9671,10 +9719,12 @@ var BITS = {
|
|
|
9671
9719
|
// Not sure if these are actually valid here, but include them as they are in the test bit.
|
|
9672
9720
|
{
|
|
9673
9721
|
key: ConfigKey.tag_anchor,
|
|
9722
|
+
format: TagFormat.plainText,
|
|
9674
9723
|
description: "Anchor for the sample solution, used to link to the solution"
|
|
9675
9724
|
},
|
|
9676
9725
|
{
|
|
9677
9726
|
key: ConfigKey.tag_reference,
|
|
9727
|
+
format: TagFormat.plainText,
|
|
9678
9728
|
description: "Reference for the sample solution, used to link to the source of the solution"
|
|
9679
9729
|
}
|
|
9680
9730
|
]
|
|
@@ -10556,6 +10606,25 @@ var BITS = {
|
|
|
10556
10606
|
baseBitType: BitType2.vendorStripePricingTable,
|
|
10557
10607
|
description: "External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"
|
|
10558
10608
|
},
|
|
10609
|
+
[BitType2.vendorStripePricingTablePrintOnRequest]: {
|
|
10610
|
+
since: "5.21.0",
|
|
10611
|
+
baseBitType: BitType2.vendorStripePricingTable,
|
|
10612
|
+
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",
|
|
10613
|
+
tags: [
|
|
10614
|
+
{
|
|
10615
|
+
key: ConfigKey.property_printOnRequestCustomerId,
|
|
10616
|
+
description: "Print-on-request customer ID, used to identify the customer for the print-on-request flow",
|
|
10617
|
+
format: TagFormat.plainText,
|
|
10618
|
+
minCount: 1
|
|
10619
|
+
},
|
|
10620
|
+
{
|
|
10621
|
+
key: ConfigKey.property_printOnRequestProductId,
|
|
10622
|
+
description: "Print-on-request product ID, used to identify the product for the print-on-request flow",
|
|
10623
|
+
format: TagFormat.plainText,
|
|
10624
|
+
minCount: 1
|
|
10625
|
+
}
|
|
10626
|
+
]
|
|
10627
|
+
},
|
|
10559
10628
|
[BitType2.video]: {
|
|
10560
10629
|
since: "1.3.0",
|
|
10561
10630
|
baseBitType: BitType2._standard,
|
|
@@ -11016,7 +11085,7 @@ var instance2 = new Config();
|
|
|
11016
11085
|
// src/generated/package_info.ts
|
|
11017
11086
|
var PACKAGE_INFO = {
|
|
11018
11087
|
"name": "@gmb/bitmark-parser-generator",
|
|
11019
|
-
"version": "5.
|
|
11088
|
+
"version": "5.22.0",
|
|
11020
11089
|
"author": "Get More Brain Ltd",
|
|
11021
11090
|
"license": "ISC",
|
|
11022
11091
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -11831,6 +11900,10 @@ var NodeType = {
|
|
|
11831
11900
|
previewVideoValue: "previewVideoValue",
|
|
11832
11901
|
printParentChapterLevel: "printParentChapterLevel",
|
|
11833
11902
|
printParentChapterLevelValue: "printParentChapterLevelValue",
|
|
11903
|
+
printOnRequestCustomerId: "printOnRequestCustomerId",
|
|
11904
|
+
printOnRequestCustomerIdValue: "printOnRequestCustomerIdValue",
|
|
11905
|
+
printOnRequestProductId: "printOnRequestProductId",
|
|
11906
|
+
printOnRequestProductIdValue: "printOnRequestProductIdValue",
|
|
11834
11907
|
processHandIn: "processHandIn",
|
|
11835
11908
|
processHandInLocation: "processHandInLocation",
|
|
11836
11909
|
processHandInLocationValue: "processHandInLocationValue",
|
|
@@ -12585,6 +12658,17 @@ function convertBasicToExtendedTableFormat(table) {
|
|
|
12585
12658
|
}))
|
|
12586
12659
|
};
|
|
12587
12660
|
}
|
|
12661
|
+
if (Array.isArray(table.columnWidths) && table.columnWidths.length > 0) {
|
|
12662
|
+
const targetCells = tableExtended.header?.rows[0]?.cells ?? tableExtended.body?.rows[0]?.cells;
|
|
12663
|
+
if (targetCells) {
|
|
12664
|
+
for (let i = 0; i < table.columnWidths.length; i++) {
|
|
12665
|
+
const width = table.columnWidths[i];
|
|
12666
|
+
if (typeof width === "number" && width > 0 && targetCells[i]) {
|
|
12667
|
+
targetCells[i].colwidth = width;
|
|
12668
|
+
}
|
|
12669
|
+
}
|
|
12670
|
+
}
|
|
12671
|
+
}
|
|
12588
12672
|
return tableExtended;
|
|
12589
12673
|
}
|
|
12590
12674
|
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
@@ -12596,7 +12680,23 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12596
12680
|
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
12597
12681
|
};
|
|
12598
12682
|
const dataRows = [];
|
|
12683
|
+
const widths = [];
|
|
12684
|
+
let hasAnyWidth = false;
|
|
12685
|
+
let maxCellCount = 0;
|
|
12686
|
+
const collectWidths = (cells) => {
|
|
12687
|
+
if (!cells) return;
|
|
12688
|
+
if (cells.length > maxCellCount) maxCellCount = cells.length;
|
|
12689
|
+
cells.forEach((cell, idx) => {
|
|
12690
|
+
if (cell && typeof cell.colwidth === "number" && cell.colwidth > 0) {
|
|
12691
|
+
widths[idx] = cell.colwidth;
|
|
12692
|
+
hasAnyWidth = true;
|
|
12693
|
+
}
|
|
12694
|
+
});
|
|
12695
|
+
};
|
|
12599
12696
|
const headRows = tableExtended.header?.rows ?? [];
|
|
12697
|
+
headRows.forEach((row) => collectWidths(row?.cells));
|
|
12698
|
+
(tableExtended.body?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
12699
|
+
(tableExtended.footer?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
12600
12700
|
if (headRows.length > 0) {
|
|
12601
12701
|
const primaryHeader = extractRowCells(headRows[0]);
|
|
12602
12702
|
if (primaryHeader.length > 0) {
|
|
@@ -12626,6 +12726,15 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12626
12726
|
if (dataRows.length > 0) {
|
|
12627
12727
|
table.data = dataRows;
|
|
12628
12728
|
}
|
|
12729
|
+
if (hasAnyWidth) {
|
|
12730
|
+
const columnCount = table.columns?.length ?? maxCellCount;
|
|
12731
|
+
const columnWidths = new Array(columnCount).fill(null);
|
|
12732
|
+
for (let i = 0; i < columnCount; i++) {
|
|
12733
|
+
const w = widths[i];
|
|
12734
|
+
if (typeof w === "number") columnWidths[i] = w;
|
|
12735
|
+
}
|
|
12736
|
+
table.columnWidths = columnWidths;
|
|
12737
|
+
}
|
|
12629
12738
|
return table;
|
|
12630
12739
|
}
|
|
12631
12740
|
function normalizeTableFormat(bitType, table) {
|
|
@@ -12771,6 +12880,31 @@ var AstWalkerGenerator = class {
|
|
|
12771
12880
|
}
|
|
12772
12881
|
return void 0;
|
|
12773
12882
|
}
|
|
12883
|
+
getSiblingNodes(route) {
|
|
12884
|
+
const parentNode = this.getParentNode(route);
|
|
12885
|
+
if (!parentNode || !parentNode.value || !Array.isArray(parentNode.value)) {
|
|
12886
|
+
return {};
|
|
12887
|
+
}
|
|
12888
|
+
const siblings = parentNode.value;
|
|
12889
|
+
const index = siblings.findIndex((s) => s === route[route.length - 1]?.value);
|
|
12890
|
+
if (index === -1) {
|
|
12891
|
+
return {};
|
|
12892
|
+
}
|
|
12893
|
+
return {
|
|
12894
|
+
left: index > 0 ? siblings[index - 1] : void 0,
|
|
12895
|
+
right: index < siblings.length - 1 ? siblings[index + 1] : void 0
|
|
12896
|
+
};
|
|
12897
|
+
}
|
|
12898
|
+
isEmptyParagraph(node) {
|
|
12899
|
+
if (!node) return false;
|
|
12900
|
+
if (node.type !== TextNodeType.paragraph) return false;
|
|
12901
|
+
if (!node.content || !Array.isArray(node.content)) return true;
|
|
12902
|
+
for (const contentNode of node.content) {
|
|
12903
|
+
if (contentNode.type !== TextNodeType.text) return false;
|
|
12904
|
+
if (contentNode.text && contentNode.text.trim() !== "") return false;
|
|
12905
|
+
}
|
|
12906
|
+
return true;
|
|
12907
|
+
}
|
|
12774
12908
|
};
|
|
12775
12909
|
|
|
12776
12910
|
// src/generator/text/TextGenerator.ts
|
|
@@ -12896,7 +13030,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
12896
13030
|
__publicField(this, "inParagraph", false);
|
|
12897
13031
|
__publicField(this, "inHeading", false);
|
|
12898
13032
|
__publicField(this, "inCodeBlock", false);
|
|
12899
|
-
__publicField(this, "exitedCodeBlock", false);
|
|
12900
13033
|
__publicField(this, "inBulletList", false);
|
|
12901
13034
|
__publicField(this, "inInline", false);
|
|
12902
13035
|
__publicField(this, "markDepth", 0);
|
|
@@ -12985,7 +13118,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
12985
13118
|
this.inParagraph = false;
|
|
12986
13119
|
this.inHeading = false;
|
|
12987
13120
|
this.inCodeBlock = false;
|
|
12988
|
-
this.exitedCodeBlock = false;
|
|
12989
13121
|
this.inBulletList = false;
|
|
12990
13122
|
this.inInline = false;
|
|
12991
13123
|
this.markDepth = 0;
|
|
@@ -13051,7 +13183,7 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13051
13183
|
switch (node.type) {
|
|
13052
13184
|
case TextNodeType.paragraph:
|
|
13053
13185
|
this.inParagraph = true;
|
|
13054
|
-
this.writeParagraph(node);
|
|
13186
|
+
this.writeParagraph(node, route);
|
|
13055
13187
|
break;
|
|
13056
13188
|
case TextNodeType.hardBreak:
|
|
13057
13189
|
this.writeHardBreak(node);
|
|
@@ -13108,7 +13240,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13108
13240
|
return false;
|
|
13109
13241
|
default:
|
|
13110
13242
|
}
|
|
13111
|
-
this.exitedCodeBlock = false;
|
|
13112
13243
|
}
|
|
13113
13244
|
handleBetweenNode(node, _left, _right, _route) {
|
|
13114
13245
|
switch (node.type) {
|
|
@@ -13142,7 +13273,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13142
13273
|
this.writeNL();
|
|
13143
13274
|
this.writeNL();
|
|
13144
13275
|
this.inCodeBlock = false;
|
|
13145
|
-
this.exitedCodeBlock = true;
|
|
13146
13276
|
break;
|
|
13147
13277
|
case TextNodeType.noBulletList:
|
|
13148
13278
|
case TextNodeType.bulletList:
|
|
@@ -13506,21 +13636,19 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13506
13636
|
}
|
|
13507
13637
|
}
|
|
13508
13638
|
}
|
|
13509
|
-
writeParagraph(node) {
|
|
13639
|
+
writeParagraph(node, route) {
|
|
13510
13640
|
if (this.textFormat === TextFormat2.bitmarkText) {
|
|
13511
13641
|
if (this.inBulletList) return;
|
|
13512
|
-
const
|
|
13513
|
-
|
|
13514
|
-
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
}
|
|
13519
|
-
if (nodeContentLength > 1) return;
|
|
13642
|
+
const siblingNodes = this.getSiblingNodes(route);
|
|
13643
|
+
const prevSiblingNodeType = siblingNodes.left?.type;
|
|
13644
|
+
const inBody = this.textLocation === TextLocation2.body;
|
|
13645
|
+
const isEmptyParagraph = this.isEmptyParagraph(node);
|
|
13646
|
+
if (!inBody || !isEmptyParagraph && !(prevSiblingNodeType === TextNodeType.codeBlock || prevSiblingNodeType === TextNodeType.paragraph)) {
|
|
13647
|
+
return;
|
|
13520
13648
|
}
|
|
13521
13649
|
this.write("|");
|
|
13522
13650
|
this.writeNL();
|
|
13523
|
-
if (
|
|
13651
|
+
if (prevSiblingNodeType === TextNodeType.codeBlock) {
|
|
13524
13652
|
this.writeNL();
|
|
13525
13653
|
}
|
|
13526
13654
|
}
|
|
@@ -25628,6 +25756,18 @@ var Builder = class extends BaseBuilder {
|
|
|
25628
25756
|
data.printParentChapterLevel,
|
|
25629
25757
|
options
|
|
25630
25758
|
),
|
|
25759
|
+
printOnRequestCustomerId: this.toAstProperty(
|
|
25760
|
+
bitType,
|
|
25761
|
+
ConfigKey.property_printOnRequestCustomerId,
|
|
25762
|
+
data.printOnRequestCustomerId,
|
|
25763
|
+
options
|
|
25764
|
+
),
|
|
25765
|
+
printOnRequestProductId: this.toAstProperty(
|
|
25766
|
+
bitType,
|
|
25767
|
+
ConfigKey.property_printOnRequestProductId,
|
|
25768
|
+
data.printOnRequestProductId,
|
|
25769
|
+
options
|
|
25770
|
+
),
|
|
25631
25771
|
platformBrandTarget: this.toAstProperty(
|
|
25632
25772
|
bitType,
|
|
25633
25773
|
ConfigKey.property_platformBrandTarget,
|
|
@@ -26460,6 +26600,17 @@ var Builder = class extends BaseBuilder {
|
|
|
26460
26600
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation2.tag, cell))
|
|
26461
26601
|
);
|
|
26462
26602
|
}
|
|
26603
|
+
if (Array.isArray(nodeTable.columnWidths)) {
|
|
26604
|
+
const columnCount = Array.isArray(nodeTable.columns) ? nodeTable.columns.length : void 0;
|
|
26605
|
+
const source = columnCount != null ? nodeTable.columnWidths.slice(0, columnCount) : nodeTable.columnWidths;
|
|
26606
|
+
const normalized = source.map((w) => typeof w === "number" && w > 0 ? w : null);
|
|
26607
|
+
const hasAny = normalized.some((w) => w != null);
|
|
26608
|
+
if (hasAny) {
|
|
26609
|
+
nodeTable.columnWidths = normalized;
|
|
26610
|
+
} else {
|
|
26611
|
+
delete nodeTable.columnWidths;
|
|
26612
|
+
}
|
|
26613
|
+
}
|
|
26463
26614
|
const buildSection = (section) => {
|
|
26464
26615
|
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
26465
26616
|
const rows = section.rows.map((row) => {
|
|
@@ -31450,6 +31601,10 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31450
31601
|
if (instance2.isOfBitType(bitType, BitType2.vendorStripePricingTable)) {
|
|
31451
31602
|
if (bitJson.stripePricingTableId == null) bitJson.stripePricingTableId = "";
|
|
31452
31603
|
if (bitJson.stripePublishableKey == null) bitJson.stripePublishableKey = "";
|
|
31604
|
+
if (instance2.isOfBitType(bitType, BitType2.vendorStripePricingTablePrintOnRequest)) {
|
|
31605
|
+
if (bitJson.printOnRequestCustomerId == null) bitJson.printOnRequestCustomerId = "";
|
|
31606
|
+
if (bitJson.printOnRequestProductId == null) bitJson.printOnRequestProductId = "";
|
|
31607
|
+
}
|
|
31453
31608
|
}
|
|
31454
31609
|
if (instance2.isOfBitType(bitType, BitType2.callToAction)) {
|
|
31455
31610
|
if (bitJson.buttonCaption == null) bitJson.buttonCaption = "";
|