@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
|
@@ -681,6 +681,7 @@ var BitType2 = {
|
|
|
681
681
|
vendorPadletEmbed: "vendor-padlet-embed",
|
|
682
682
|
vendorStripePricingTable: "vendor-stripe-pricing-table",
|
|
683
683
|
vendorStripePricingTableExternal: "vendor-stripe-pricing-table-external",
|
|
684
|
+
vendorStripePricingTablePrintOnRequest: "vendor-stripe-pricing-table-print-on-request",
|
|
684
685
|
video: "video",
|
|
685
686
|
videoEmbed: "video-embed",
|
|
686
687
|
videoEmbedLandscape: "video-embed-landscape",
|
|
@@ -1392,6 +1393,8 @@ var propertyKeys = {
|
|
|
1392
1393
|
property_padletId: "@padletId",
|
|
1393
1394
|
property_page: "@page",
|
|
1394
1395
|
property_printParentChapterLevel: "@printParentChapterLevel",
|
|
1396
|
+
property_printOnRequestCustomerId: "@printOnRequestCustomerId",
|
|
1397
|
+
property_printOnRequestProductId: "@printOnRequestProductId",
|
|
1395
1398
|
property_pageNo: "@pageNo",
|
|
1396
1399
|
property_partialAnswer: "@partialAnswer",
|
|
1397
1400
|
property_partner: "@partner",
|
|
@@ -2238,7 +2241,7 @@ var CARDSETS = {
|
|
|
2238
2241
|
{
|
|
2239
2242
|
key: ConfigKey.group_resourceIcon,
|
|
2240
2243
|
description: "Icon resource for the flashcard.",
|
|
2241
|
-
jsonKey: "question.icon"
|
|
2244
|
+
jsonKey: "question.icon|resource(type=image, key=image)"
|
|
2242
2245
|
}
|
|
2243
2246
|
]
|
|
2244
2247
|
}
|
|
@@ -2261,7 +2264,7 @@ var CARDSETS = {
|
|
|
2261
2264
|
{
|
|
2262
2265
|
key: ConfigKey.group_resourceIcon,
|
|
2263
2266
|
description: "Icon resource for the flashcard.",
|
|
2264
|
-
jsonKey: "answer.icon"
|
|
2267
|
+
jsonKey: "answer.icon|resource(type=image, key=image)"
|
|
2265
2268
|
}
|
|
2266
2269
|
]
|
|
2267
2270
|
},
|
|
@@ -2278,7 +2281,8 @@ var CARDSETS = {
|
|
|
2278
2281
|
},
|
|
2279
2282
|
{
|
|
2280
2283
|
key: ConfigKey.group_resourceIcon,
|
|
2281
|
-
description: "Icon resource for the flashcard."
|
|
2284
|
+
description: "Icon resource for the flashcard.",
|
|
2285
|
+
jsonKey: "alternativeAnswers[].icon|resource(type=image, key=image)"
|
|
2282
2286
|
}
|
|
2283
2287
|
],
|
|
2284
2288
|
repeatCount: Count.infinity
|
|
@@ -2306,12 +2310,14 @@ var CARDSETS = {
|
|
|
2306
2310
|
{
|
|
2307
2311
|
key: ConfigKey.tag_title,
|
|
2308
2312
|
description: "Title of the definition.",
|
|
2313
|
+
format: TagFormat.plainText,
|
|
2309
2314
|
jsonKey: "^heading.forKeys"
|
|
2310
2315
|
},
|
|
2311
2316
|
{
|
|
2312
2317
|
key: ConfigKey.group_resourceIcon,
|
|
2313
2318
|
description: "Icon resource for the definition.",
|
|
2314
|
-
|
|
2319
|
+
format: TagFormat.plainText,
|
|
2320
|
+
jsonKey: "term.icon|resource(type=image, key=image)"
|
|
2315
2321
|
}
|
|
2316
2322
|
]
|
|
2317
2323
|
}
|
|
@@ -2330,12 +2336,13 @@ var CARDSETS = {
|
|
|
2330
2336
|
{
|
|
2331
2337
|
key: ConfigKey.tag_title,
|
|
2332
2338
|
description: "Title of the definition.",
|
|
2339
|
+
format: TagFormat.plainText,
|
|
2333
2340
|
jsonKey: "^heading.forValues"
|
|
2334
2341
|
},
|
|
2335
2342
|
{
|
|
2336
2343
|
key: ConfigKey.group_resourceIcon,
|
|
2337
2344
|
description: "Icon resource for the definition.",
|
|
2338
|
-
jsonKey: "definition.icon"
|
|
2345
|
+
jsonKey: "definition.icon|resource(type=image, key=image)"
|
|
2339
2346
|
}
|
|
2340
2347
|
]
|
|
2341
2348
|
},
|
|
@@ -2352,7 +2359,8 @@ var CARDSETS = {
|
|
|
2352
2359
|
},
|
|
2353
2360
|
{
|
|
2354
2361
|
key: ConfigKey.group_resourceIcon,
|
|
2355
|
-
description: "Icon resource for the definition."
|
|
2362
|
+
description: "Icon resource for the definition.",
|
|
2363
|
+
jsonKey: "alternativeDefinitions[].icon|resource(type=image, key=image)"
|
|
2356
2364
|
}
|
|
2357
2365
|
],
|
|
2358
2366
|
repeatCount: Count.infinity
|
|
@@ -2380,6 +2388,7 @@ var CARDSETS = {
|
|
|
2380
2388
|
{
|
|
2381
2389
|
key: ConfigKey.tag_title,
|
|
2382
2390
|
description: "Title of the match pair.",
|
|
2391
|
+
format: TagFormat.plainText,
|
|
2383
2392
|
jsonKey: "^heading.forKeys"
|
|
2384
2393
|
},
|
|
2385
2394
|
{
|
|
@@ -2415,6 +2424,7 @@ var CARDSETS = {
|
|
|
2415
2424
|
{
|
|
2416
2425
|
key: ConfigKey.tag_title,
|
|
2417
2426
|
description: "Title of the match pair.",
|
|
2427
|
+
format: TagFormat.plainText,
|
|
2418
2428
|
jsonKey: "^heading.forValues"
|
|
2419
2429
|
},
|
|
2420
2430
|
{
|
|
@@ -2448,6 +2458,7 @@ var CARDSETS = {
|
|
|
2448
2458
|
{
|
|
2449
2459
|
key: ConfigKey.tag_title,
|
|
2450
2460
|
description: "Title of the audio match pair.",
|
|
2461
|
+
format: TagFormat.plainText,
|
|
2451
2462
|
jsonKey: "^heading.forKeys"
|
|
2452
2463
|
},
|
|
2453
2464
|
{
|
|
@@ -2473,6 +2484,7 @@ var CARDSETS = {
|
|
|
2473
2484
|
{
|
|
2474
2485
|
key: ConfigKey.tag_title,
|
|
2475
2486
|
description: "Title of the audio match pair.",
|
|
2487
|
+
format: TagFormat.plainText,
|
|
2476
2488
|
jsonKey: "^heading.forValues"
|
|
2477
2489
|
},
|
|
2478
2490
|
{
|
|
@@ -2505,6 +2517,7 @@ var CARDSETS = {
|
|
|
2505
2517
|
{
|
|
2506
2518
|
key: ConfigKey.tag_title,
|
|
2507
2519
|
description: "Title of the image match pair.",
|
|
2520
|
+
format: TagFormat.plainText,
|
|
2508
2521
|
jsonKey: "^heading.forKeys"
|
|
2509
2522
|
},
|
|
2510
2523
|
{
|
|
@@ -2530,6 +2543,7 @@ var CARDSETS = {
|
|
|
2530
2543
|
{
|
|
2531
2544
|
key: ConfigKey.tag_title,
|
|
2532
2545
|
description: "Title of the image match pair.",
|
|
2546
|
+
format: TagFormat.plainText,
|
|
2533
2547
|
jsonKey: "^heading.forValues"
|
|
2534
2548
|
},
|
|
2535
2549
|
{
|
|
@@ -2567,6 +2581,7 @@ var CARDSETS = {
|
|
|
2567
2581
|
{
|
|
2568
2582
|
key: ConfigKey.tag_title,
|
|
2569
2583
|
description: "Title of the match matrix.",
|
|
2584
|
+
format: TagFormat.plainText,
|
|
2570
2585
|
jsonKey: "^heading.forKeys"
|
|
2571
2586
|
},
|
|
2572
2587
|
{
|
|
@@ -2597,6 +2612,7 @@ var CARDSETS = {
|
|
|
2597
2612
|
{
|
|
2598
2613
|
key: ConfigKey.tag_title,
|
|
2599
2614
|
description: "Title of the match matrix.",
|
|
2615
|
+
format: TagFormat.plainText,
|
|
2600
2616
|
jsonKey: "^heading.forValues"
|
|
2601
2617
|
},
|
|
2602
2618
|
{
|
|
@@ -2696,6 +2712,7 @@ var CARDSETS = {
|
|
|
2696
2712
|
{
|
|
2697
2713
|
key: ConfigKey.tag_title,
|
|
2698
2714
|
description: "Title of the feedback.",
|
|
2715
|
+
format: TagFormat.plainText,
|
|
2699
2716
|
jsonKey: "^heading.forKeys"
|
|
2700
2717
|
}
|
|
2701
2718
|
],
|
|
@@ -2726,6 +2743,7 @@ var CARDSETS = {
|
|
|
2726
2743
|
{
|
|
2727
2744
|
key: ConfigKey.tag_title,
|
|
2728
2745
|
description: "Title of the feedback.",
|
|
2746
|
+
format: TagFormat.plainText,
|
|
2729
2747
|
jsonKey: "^heading.forValues"
|
|
2730
2748
|
}
|
|
2731
2749
|
],
|
|
@@ -3070,14 +3088,16 @@ var CARDSETS = {
|
|
|
3070
3088
|
{
|
|
3071
3089
|
key: ConfigKey.tag_true,
|
|
3072
3090
|
description: "Checked state for the ingredient.",
|
|
3073
|
-
jsonKey: "
|
|
3091
|
+
jsonKey: "|set(checked=true)",
|
|
3074
3092
|
maxCount: 1
|
|
3093
|
+
// nullable: true,
|
|
3075
3094
|
},
|
|
3076
3095
|
{
|
|
3077
3096
|
key: ConfigKey.tag_false,
|
|
3078
3097
|
description: "Unchecked state for the ingredient.",
|
|
3079
|
-
jsonKey: "
|
|
3098
|
+
jsonKey: "|set(checked=false)",
|
|
3080
3099
|
maxCount: 1
|
|
3100
|
+
// nullable: true,
|
|
3081
3101
|
},
|
|
3082
3102
|
{
|
|
3083
3103
|
key: ConfigKey.group_standardItemLead,
|
|
@@ -3086,7 +3106,8 @@ var CARDSETS = {
|
|
|
3086
3106
|
{
|
|
3087
3107
|
key: ConfigKey.tag_instruction,
|
|
3088
3108
|
description: "The quantity of the ingredient.",
|
|
3089
|
-
jsonKey: "quantity"
|
|
3109
|
+
jsonKey: "quantity",
|
|
3110
|
+
format: TagFormat.number
|
|
3090
3111
|
},
|
|
3091
3112
|
{
|
|
3092
3113
|
key: ConfigKey.tag_hint,
|
|
@@ -3441,6 +3462,7 @@ var GROUPS = {
|
|
|
3441
3462
|
{
|
|
3442
3463
|
key: ConfigKey.tag_anchor,
|
|
3443
3464
|
name: "Anchor",
|
|
3465
|
+
format: TagFormat.plainText,
|
|
3444
3466
|
description: "The anchor for the bit"
|
|
3445
3467
|
},
|
|
3446
3468
|
{
|
|
@@ -3601,7 +3623,7 @@ var GROUPS = {
|
|
|
3601
3623
|
tags: [
|
|
3602
3624
|
{
|
|
3603
3625
|
key: ConfigKey.property_person,
|
|
3604
|
-
jsonKey: "
|
|
3626
|
+
jsonKey: "partner.name",
|
|
3605
3627
|
description: "A person",
|
|
3606
3628
|
format: TagFormat.plainText,
|
|
3607
3629
|
chain: [
|
|
@@ -3612,6 +3634,7 @@ var GROUPS = {
|
|
|
3612
3634
|
},
|
|
3613
3635
|
{
|
|
3614
3636
|
key: ConfigKey.group_resourceImage,
|
|
3637
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3615
3638
|
description: "The image of the person"
|
|
3616
3639
|
}
|
|
3617
3640
|
]
|
|
@@ -3630,6 +3653,7 @@ var GROUPS = {
|
|
|
3630
3653
|
},
|
|
3631
3654
|
{
|
|
3632
3655
|
key: ConfigKey.group_resourceImage,
|
|
3656
|
+
jsonKey: "avatarImage|resource(type=image, key=image)",
|
|
3633
3657
|
description: "The image of the partner"
|
|
3634
3658
|
}
|
|
3635
3659
|
]
|
|
@@ -3868,7 +3892,8 @@ var GROUPS = {
|
|
|
3868
3892
|
key: ConfigKey.tag_title,
|
|
3869
3893
|
name: "Title",
|
|
3870
3894
|
description: "The title of the book",
|
|
3871
|
-
maxCount: 2
|
|
3895
|
+
maxCount: 2,
|
|
3896
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
3872
3897
|
},
|
|
3873
3898
|
{
|
|
3874
3899
|
key: ConfigKey.property_subtype,
|
|
@@ -3883,6 +3908,7 @@ var GROUPS = {
|
|
|
3883
3908
|
},
|
|
3884
3909
|
{
|
|
3885
3910
|
key: ConfigKey.resource_coverImage,
|
|
3911
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
3886
3912
|
description: "The cover image of the book",
|
|
3887
3913
|
chain: [
|
|
3888
3914
|
{
|
|
@@ -3899,6 +3925,7 @@ var GROUPS = {
|
|
|
3899
3925
|
},
|
|
3900
3926
|
{
|
|
3901
3927
|
key: ConfigKey.resource_backgroundImage,
|
|
3928
|
+
jsonKey: "backgroundImage|resource(type=image, key=image)",
|
|
3902
3929
|
description: "The background image of the book",
|
|
3903
3930
|
chain: [
|
|
3904
3931
|
{
|
|
@@ -4059,6 +4086,7 @@ var GROUPS = {
|
|
|
4059
4086
|
chain: [
|
|
4060
4087
|
{
|
|
4061
4088
|
key: ConfigKey.tag_reference,
|
|
4089
|
+
format: TagFormat.plainText,
|
|
4062
4090
|
description: "The reference(s) for the book(s) in the learning path",
|
|
4063
4091
|
maxCount: 2
|
|
4064
4092
|
}
|
|
@@ -4833,6 +4861,7 @@ var GROUPS = {
|
|
|
4833
4861
|
tags: [
|
|
4834
4862
|
{
|
|
4835
4863
|
key: ConfigKey.resource_previewImage,
|
|
4864
|
+
jsonKey: "previewImage|resource(type=image, key=image)",
|
|
4836
4865
|
description: "The preview image resource",
|
|
4837
4866
|
chain: [
|
|
4838
4867
|
{
|
|
@@ -4849,6 +4878,7 @@ var GROUPS = {
|
|
|
4849
4878
|
tags: [
|
|
4850
4879
|
{
|
|
4851
4880
|
key: ConfigKey.resource_previewVideo,
|
|
4881
|
+
jsonKey: "previewVideo|resource(type=video, key=video)",
|
|
4852
4882
|
description: "The preview video resource",
|
|
4853
4883
|
chain: [
|
|
4854
4884
|
{
|
|
@@ -5273,7 +5303,8 @@ var BITS = {
|
|
|
5273
5303
|
{
|
|
5274
5304
|
key: ConfigKey.tag_title,
|
|
5275
5305
|
description: "Title and subtitle of the catalog item",
|
|
5276
|
-
maxCount: 2
|
|
5306
|
+
maxCount: 2,
|
|
5307
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5277
5308
|
},
|
|
5278
5309
|
{
|
|
5279
5310
|
key: ConfigKey.property_coverImage,
|
|
@@ -5282,6 +5313,7 @@ var BITS = {
|
|
|
5282
5313
|
},
|
|
5283
5314
|
{
|
|
5284
5315
|
key: ConfigKey.resource_coverImage,
|
|
5316
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5285
5317
|
description: "Cover image of the catalog item",
|
|
5286
5318
|
chain: [
|
|
5287
5319
|
{
|
|
@@ -5421,7 +5453,8 @@ var BITS = {
|
|
|
5421
5453
|
{
|
|
5422
5454
|
key: ConfigKey.tag_title,
|
|
5423
5455
|
description: "Title and subtitle of the catalog item",
|
|
5424
|
-
maxCount: 2
|
|
5456
|
+
maxCount: 2,
|
|
5457
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5425
5458
|
},
|
|
5426
5459
|
{
|
|
5427
5460
|
key: ConfigKey.property_coverImage,
|
|
@@ -5430,6 +5463,7 @@ var BITS = {
|
|
|
5430
5463
|
},
|
|
5431
5464
|
{
|
|
5432
5465
|
key: ConfigKey.resource_coverImage,
|
|
5466
|
+
jsonKey: "coverImage|resource(type=image, key=image)",
|
|
5433
5467
|
description: "Cover image of the catalog item",
|
|
5434
5468
|
chain: [
|
|
5435
5469
|
{
|
|
@@ -5569,7 +5603,8 @@ var BITS = {
|
|
|
5569
5603
|
{
|
|
5570
5604
|
key: ConfigKey.tag_title,
|
|
5571
5605
|
description: "Title and subtitle of the catalog item",
|
|
5572
|
-
maxCount: 2
|
|
5606
|
+
maxCount: 2,
|
|
5607
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
5573
5608
|
},
|
|
5574
5609
|
{
|
|
5575
5610
|
key: ConfigKey.property_coverImage,
|
|
@@ -5897,10 +5932,12 @@ var BITS = {
|
|
|
5897
5932
|
tags: [
|
|
5898
5933
|
{
|
|
5899
5934
|
key: ConfigKey.tag_reference,
|
|
5935
|
+
format: TagFormat.plainText,
|
|
5900
5936
|
description: "The reference to the bit that this alias points to"
|
|
5901
5937
|
},
|
|
5902
5938
|
{
|
|
5903
5939
|
key: ConfigKey.tag_anchor,
|
|
5940
|
+
format: TagFormat.plainText,
|
|
5904
5941
|
description: "The anchor for the bit alias, used for linking"
|
|
5905
5942
|
}
|
|
5906
5943
|
]
|
|
@@ -6098,8 +6135,9 @@ var BITS = {
|
|
|
6098
6135
|
{
|
|
6099
6136
|
key: ConfigKey.tag_title,
|
|
6100
6137
|
description: "The title of the book cover",
|
|
6101
|
-
maxCount: 2
|
|
6138
|
+
maxCount: 2,
|
|
6102
6139
|
// title & subtitle
|
|
6140
|
+
jsonKey: "title|multi(count=2, key=subtitle)"
|
|
6103
6141
|
},
|
|
6104
6142
|
{
|
|
6105
6143
|
key: ConfigKey.property_coverColor,
|
|
@@ -6244,11 +6282,13 @@ var BITS = {
|
|
|
6244
6282
|
tags: [
|
|
6245
6283
|
{
|
|
6246
6284
|
key: ConfigKey.tag_anchor,
|
|
6285
|
+
format: TagFormat.plainText,
|
|
6247
6286
|
description: "The anchor for the chapter, used for linking"
|
|
6248
6287
|
},
|
|
6249
6288
|
{
|
|
6250
6289
|
key: ConfigKey.tag_title,
|
|
6251
|
-
description: "The title of the chapter"
|
|
6290
|
+
description: "The title of the chapter",
|
|
6291
|
+
jsonKey: "title|setMulti(level)"
|
|
6252
6292
|
},
|
|
6253
6293
|
{
|
|
6254
6294
|
key: ConfigKey.property_toc,
|
|
@@ -6776,7 +6816,8 @@ var BITS = {
|
|
|
6776
6816
|
},
|
|
6777
6817
|
{
|
|
6778
6818
|
key: ConfigKey.tag_hint,
|
|
6779
|
-
description: "Hint for the ingredient, used to provide additional information"
|
|
6819
|
+
description: "Hint for the ingredient, used to provide additional information",
|
|
6820
|
+
format: TagFormat.plainText
|
|
6780
6821
|
}
|
|
6781
6822
|
]
|
|
6782
6823
|
}
|
|
@@ -8002,6 +8043,7 @@ var BITS = {
|
|
|
8002
8043
|
chain: [
|
|
8003
8044
|
{
|
|
8004
8045
|
key: ConfigKey.tag_reference,
|
|
8046
|
+
format: TagFormat.plainText,
|
|
8005
8047
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8006
8048
|
maxCount: 2
|
|
8007
8049
|
}
|
|
@@ -8010,6 +8052,7 @@ var BITS = {
|
|
|
8010
8052
|
{
|
|
8011
8053
|
/* Allow incorrectly chained reference tag */
|
|
8012
8054
|
key: ConfigKey.tag_reference,
|
|
8055
|
+
format: TagFormat.plainText,
|
|
8013
8056
|
description: "Reference tag for the book, used to link to the book in the system"
|
|
8014
8057
|
},
|
|
8015
8058
|
{
|
|
@@ -8055,6 +8098,7 @@ var BITS = {
|
|
|
8055
8098
|
chain: [
|
|
8056
8099
|
{
|
|
8057
8100
|
key: ConfigKey.tag_reference,
|
|
8101
|
+
format: TagFormat.plainText,
|
|
8058
8102
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8059
8103
|
maxCount: 2
|
|
8060
8104
|
}
|
|
@@ -8063,6 +8107,7 @@ var BITS = {
|
|
|
8063
8107
|
{
|
|
8064
8108
|
/* Allow incorrectly chained reference tag */
|
|
8065
8109
|
key: ConfigKey.tag_reference,
|
|
8110
|
+
format: TagFormat.plainText,
|
|
8066
8111
|
description: "Reference tag for the book, used to link to the book in the system"
|
|
8067
8112
|
},
|
|
8068
8113
|
{
|
|
@@ -8093,6 +8138,7 @@ var BITS = {
|
|
|
8093
8138
|
chain: [
|
|
8094
8139
|
{
|
|
8095
8140
|
key: ConfigKey.tag_reference,
|
|
8141
|
+
format: TagFormat.plainText,
|
|
8096
8142
|
description: "Reference tag for the book, used to link to the book in the system",
|
|
8097
8143
|
maxCount: 2
|
|
8098
8144
|
}
|
|
@@ -8613,6 +8659,7 @@ var BITS = {
|
|
|
8613
8659
|
tags: [
|
|
8614
8660
|
{
|
|
8615
8661
|
key: ConfigKey.tag_reference,
|
|
8662
|
+
format: TagFormat.plainText,
|
|
8616
8663
|
description: "Reference tag for the internal link, used to link to the target bit"
|
|
8617
8664
|
}
|
|
8618
8665
|
]
|
|
@@ -9555,6 +9602,7 @@ var BITS = {
|
|
|
9555
9602
|
},
|
|
9556
9603
|
{
|
|
9557
9604
|
key: ConfigKey.resource_platformBackgroundImage,
|
|
9605
|
+
jsonKey: "platformBackgroundImage|resource(type=image, key=image)",
|
|
9558
9606
|
description: "The platform section chat background image",
|
|
9559
9607
|
chain: [
|
|
9560
9608
|
{
|
|
@@ -9719,10 +9767,12 @@ var BITS = {
|
|
|
9719
9767
|
// Not sure if these are actually valid here, but include them as they are in the test bit.
|
|
9720
9768
|
{
|
|
9721
9769
|
key: ConfigKey.tag_anchor,
|
|
9770
|
+
format: TagFormat.plainText,
|
|
9722
9771
|
description: "Anchor for the sample solution, used to link to the solution"
|
|
9723
9772
|
},
|
|
9724
9773
|
{
|
|
9725
9774
|
key: ConfigKey.tag_reference,
|
|
9775
|
+
format: TagFormat.plainText,
|
|
9726
9776
|
description: "Reference for the sample solution, used to link to the source of the solution"
|
|
9727
9777
|
}
|
|
9728
9778
|
]
|
|
@@ -10604,6 +10654,25 @@ var BITS = {
|
|
|
10604
10654
|
baseBitType: BitType2.vendorStripePricingTable,
|
|
10605
10655
|
description: "External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"
|
|
10606
10656
|
},
|
|
10657
|
+
[BitType2.vendorStripePricingTablePrintOnRequest]: {
|
|
10658
|
+
since: "5.21.0",
|
|
10659
|
+
baseBitType: BitType2.vendorStripePricingTable,
|
|
10660
|
+
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",
|
|
10661
|
+
tags: [
|
|
10662
|
+
{
|
|
10663
|
+
key: ConfigKey.property_printOnRequestCustomerId,
|
|
10664
|
+
description: "Print-on-request customer ID, used to identify the customer for the print-on-request flow",
|
|
10665
|
+
format: TagFormat.plainText,
|
|
10666
|
+
minCount: 1
|
|
10667
|
+
},
|
|
10668
|
+
{
|
|
10669
|
+
key: ConfigKey.property_printOnRequestProductId,
|
|
10670
|
+
description: "Print-on-request product ID, used to identify the product for the print-on-request flow",
|
|
10671
|
+
format: TagFormat.plainText,
|
|
10672
|
+
minCount: 1
|
|
10673
|
+
}
|
|
10674
|
+
]
|
|
10675
|
+
},
|
|
10607
10676
|
[BitType2.video]: {
|
|
10608
10677
|
since: "1.3.0",
|
|
10609
10678
|
baseBitType: BitType2._standard,
|
|
@@ -11064,7 +11133,7 @@ var instance2 = new Config();
|
|
|
11064
11133
|
// src/generated/package_info.ts
|
|
11065
11134
|
var PACKAGE_INFO = {
|
|
11066
11135
|
"name": "@gmb/bitmark-parser-generator",
|
|
11067
|
-
"version": "5.
|
|
11136
|
+
"version": "5.22.0",
|
|
11068
11137
|
"author": "Get More Brain Ltd",
|
|
11069
11138
|
"license": "ISC",
|
|
11070
11139
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -11879,6 +11948,10 @@ var NodeType = {
|
|
|
11879
11948
|
previewVideoValue: "previewVideoValue",
|
|
11880
11949
|
printParentChapterLevel: "printParentChapterLevel",
|
|
11881
11950
|
printParentChapterLevelValue: "printParentChapterLevelValue",
|
|
11951
|
+
printOnRequestCustomerId: "printOnRequestCustomerId",
|
|
11952
|
+
printOnRequestCustomerIdValue: "printOnRequestCustomerIdValue",
|
|
11953
|
+
printOnRequestProductId: "printOnRequestProductId",
|
|
11954
|
+
printOnRequestProductIdValue: "printOnRequestProductIdValue",
|
|
11882
11955
|
processHandIn: "processHandIn",
|
|
11883
11956
|
processHandInLocation: "processHandInLocation",
|
|
11884
11957
|
processHandInLocationValue: "processHandInLocationValue",
|
|
@@ -12633,6 +12706,17 @@ function convertBasicToExtendedTableFormat(table) {
|
|
|
12633
12706
|
}))
|
|
12634
12707
|
};
|
|
12635
12708
|
}
|
|
12709
|
+
if (Array.isArray(table.columnWidths) && table.columnWidths.length > 0) {
|
|
12710
|
+
const targetCells = tableExtended.header?.rows[0]?.cells ?? tableExtended.body?.rows[0]?.cells;
|
|
12711
|
+
if (targetCells) {
|
|
12712
|
+
for (let i = 0; i < table.columnWidths.length; i++) {
|
|
12713
|
+
const width = table.columnWidths[i];
|
|
12714
|
+
if (typeof width === "number" && width > 0 && targetCells[i]) {
|
|
12715
|
+
targetCells[i].colwidth = width;
|
|
12716
|
+
}
|
|
12717
|
+
}
|
|
12718
|
+
}
|
|
12719
|
+
}
|
|
12636
12720
|
return tableExtended;
|
|
12637
12721
|
}
|
|
12638
12722
|
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
@@ -12644,7 +12728,23 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12644
12728
|
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
12645
12729
|
};
|
|
12646
12730
|
const dataRows = [];
|
|
12731
|
+
const widths = [];
|
|
12732
|
+
let hasAnyWidth = false;
|
|
12733
|
+
let maxCellCount = 0;
|
|
12734
|
+
const collectWidths = (cells) => {
|
|
12735
|
+
if (!cells) return;
|
|
12736
|
+
if (cells.length > maxCellCount) maxCellCount = cells.length;
|
|
12737
|
+
cells.forEach((cell, idx) => {
|
|
12738
|
+
if (cell && typeof cell.colwidth === "number" && cell.colwidth > 0) {
|
|
12739
|
+
widths[idx] = cell.colwidth;
|
|
12740
|
+
hasAnyWidth = true;
|
|
12741
|
+
}
|
|
12742
|
+
});
|
|
12743
|
+
};
|
|
12647
12744
|
const headRows = tableExtended.header?.rows ?? [];
|
|
12745
|
+
headRows.forEach((row) => collectWidths(row?.cells));
|
|
12746
|
+
(tableExtended.body?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
12747
|
+
(tableExtended.footer?.rows ?? []).forEach((row) => collectWidths(row?.cells));
|
|
12648
12748
|
if (headRows.length > 0) {
|
|
12649
12749
|
const primaryHeader = extractRowCells(headRows[0]);
|
|
12650
12750
|
if (primaryHeader.length > 0) {
|
|
@@ -12674,6 +12774,15 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
12674
12774
|
if (dataRows.length > 0) {
|
|
12675
12775
|
table.data = dataRows;
|
|
12676
12776
|
}
|
|
12777
|
+
if (hasAnyWidth) {
|
|
12778
|
+
const columnCount = table.columns?.length ?? maxCellCount;
|
|
12779
|
+
const columnWidths = new Array(columnCount).fill(null);
|
|
12780
|
+
for (let i = 0; i < columnCount; i++) {
|
|
12781
|
+
const w = widths[i];
|
|
12782
|
+
if (typeof w === "number") columnWidths[i] = w;
|
|
12783
|
+
}
|
|
12784
|
+
table.columnWidths = columnWidths;
|
|
12785
|
+
}
|
|
12677
12786
|
return table;
|
|
12678
12787
|
}
|
|
12679
12788
|
function normalizeTableFormat(bitType, table) {
|
|
@@ -12819,6 +12928,31 @@ var AstWalkerGenerator = class {
|
|
|
12819
12928
|
}
|
|
12820
12929
|
return void 0;
|
|
12821
12930
|
}
|
|
12931
|
+
getSiblingNodes(route) {
|
|
12932
|
+
const parentNode = this.getParentNode(route);
|
|
12933
|
+
if (!parentNode || !parentNode.value || !Array.isArray(parentNode.value)) {
|
|
12934
|
+
return {};
|
|
12935
|
+
}
|
|
12936
|
+
const siblings = parentNode.value;
|
|
12937
|
+
const index = siblings.findIndex((s) => s === route[route.length - 1]?.value);
|
|
12938
|
+
if (index === -1) {
|
|
12939
|
+
return {};
|
|
12940
|
+
}
|
|
12941
|
+
return {
|
|
12942
|
+
left: index > 0 ? siblings[index - 1] : void 0,
|
|
12943
|
+
right: index < siblings.length - 1 ? siblings[index + 1] : void 0
|
|
12944
|
+
};
|
|
12945
|
+
}
|
|
12946
|
+
isEmptyParagraph(node) {
|
|
12947
|
+
if (!node) return false;
|
|
12948
|
+
if (node.type !== TextNodeType.paragraph) return false;
|
|
12949
|
+
if (!node.content || !Array.isArray(node.content)) return true;
|
|
12950
|
+
for (const contentNode of node.content) {
|
|
12951
|
+
if (contentNode.type !== TextNodeType.text) return false;
|
|
12952
|
+
if (contentNode.text && contentNode.text.trim() !== "") return false;
|
|
12953
|
+
}
|
|
12954
|
+
return true;
|
|
12955
|
+
}
|
|
12822
12956
|
};
|
|
12823
12957
|
|
|
12824
12958
|
// src/generator/text/TextGenerator.ts
|
|
@@ -12944,7 +13078,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
12944
13078
|
__publicField(this, "inParagraph", false);
|
|
12945
13079
|
__publicField(this, "inHeading", false);
|
|
12946
13080
|
__publicField(this, "inCodeBlock", false);
|
|
12947
|
-
__publicField(this, "exitedCodeBlock", false);
|
|
12948
13081
|
__publicField(this, "inBulletList", false);
|
|
12949
13082
|
__publicField(this, "inInline", false);
|
|
12950
13083
|
__publicField(this, "markDepth", 0);
|
|
@@ -13033,7 +13166,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13033
13166
|
this.inParagraph = false;
|
|
13034
13167
|
this.inHeading = false;
|
|
13035
13168
|
this.inCodeBlock = false;
|
|
13036
|
-
this.exitedCodeBlock = false;
|
|
13037
13169
|
this.inBulletList = false;
|
|
13038
13170
|
this.inInline = false;
|
|
13039
13171
|
this.markDepth = 0;
|
|
@@ -13099,7 +13231,7 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13099
13231
|
switch (node.type) {
|
|
13100
13232
|
case TextNodeType.paragraph:
|
|
13101
13233
|
this.inParagraph = true;
|
|
13102
|
-
this.writeParagraph(node);
|
|
13234
|
+
this.writeParagraph(node, route);
|
|
13103
13235
|
break;
|
|
13104
13236
|
case TextNodeType.hardBreak:
|
|
13105
13237
|
this.writeHardBreak(node);
|
|
@@ -13156,7 +13288,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13156
13288
|
return false;
|
|
13157
13289
|
default:
|
|
13158
13290
|
}
|
|
13159
|
-
this.exitedCodeBlock = false;
|
|
13160
13291
|
}
|
|
13161
13292
|
handleBetweenNode(node, _left, _right, _route) {
|
|
13162
13293
|
switch (node.type) {
|
|
@@ -13190,7 +13321,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13190
13321
|
this.writeNL();
|
|
13191
13322
|
this.writeNL();
|
|
13192
13323
|
this.inCodeBlock = false;
|
|
13193
|
-
this.exitedCodeBlock = true;
|
|
13194
13324
|
break;
|
|
13195
13325
|
case TextNodeType.noBulletList:
|
|
13196
13326
|
case TextNodeType.bulletList:
|
|
@@ -13554,21 +13684,19 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
|
13554
13684
|
}
|
|
13555
13685
|
}
|
|
13556
13686
|
}
|
|
13557
|
-
writeParagraph(node) {
|
|
13687
|
+
writeParagraph(node, route) {
|
|
13558
13688
|
if (this.textFormat === TextFormat2.bitmarkText) {
|
|
13559
13689
|
if (this.inBulletList) return;
|
|
13560
|
-
const
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
}
|
|
13567
|
-
if (nodeContentLength > 1) return;
|
|
13690
|
+
const siblingNodes = this.getSiblingNodes(route);
|
|
13691
|
+
const prevSiblingNodeType = siblingNodes.left?.type;
|
|
13692
|
+
const inBody = this.textLocation === TextLocation2.body;
|
|
13693
|
+
const isEmptyParagraph = this.isEmptyParagraph(node);
|
|
13694
|
+
if (!inBody || !isEmptyParagraph && !(prevSiblingNodeType === TextNodeType.codeBlock || prevSiblingNodeType === TextNodeType.paragraph)) {
|
|
13695
|
+
return;
|
|
13568
13696
|
}
|
|
13569
13697
|
this.write("|");
|
|
13570
13698
|
this.writeNL();
|
|
13571
|
-
if (
|
|
13699
|
+
if (prevSiblingNodeType === TextNodeType.codeBlock) {
|
|
13572
13700
|
this.writeNL();
|
|
13573
13701
|
}
|
|
13574
13702
|
}
|
|
@@ -25676,6 +25804,18 @@ var Builder = class extends BaseBuilder {
|
|
|
25676
25804
|
data.printParentChapterLevel,
|
|
25677
25805
|
options
|
|
25678
25806
|
),
|
|
25807
|
+
printOnRequestCustomerId: this.toAstProperty(
|
|
25808
|
+
bitType,
|
|
25809
|
+
ConfigKey.property_printOnRequestCustomerId,
|
|
25810
|
+
data.printOnRequestCustomerId,
|
|
25811
|
+
options
|
|
25812
|
+
),
|
|
25813
|
+
printOnRequestProductId: this.toAstProperty(
|
|
25814
|
+
bitType,
|
|
25815
|
+
ConfigKey.property_printOnRequestProductId,
|
|
25816
|
+
data.printOnRequestProductId,
|
|
25817
|
+
options
|
|
25818
|
+
),
|
|
25679
25819
|
platformBrandTarget: this.toAstProperty(
|
|
25680
25820
|
bitType,
|
|
25681
25821
|
ConfigKey.property_platformBrandTarget,
|
|
@@ -26508,6 +26648,17 @@ var Builder = class extends BaseBuilder {
|
|
|
26508
26648
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation2.tag, cell))
|
|
26509
26649
|
);
|
|
26510
26650
|
}
|
|
26651
|
+
if (Array.isArray(nodeTable.columnWidths)) {
|
|
26652
|
+
const columnCount = Array.isArray(nodeTable.columns) ? nodeTable.columns.length : void 0;
|
|
26653
|
+
const source = columnCount != null ? nodeTable.columnWidths.slice(0, columnCount) : nodeTable.columnWidths;
|
|
26654
|
+
const normalized = source.map((w) => typeof w === "number" && w > 0 ? w : null);
|
|
26655
|
+
const hasAny = normalized.some((w) => w != null);
|
|
26656
|
+
if (hasAny) {
|
|
26657
|
+
nodeTable.columnWidths = normalized;
|
|
26658
|
+
} else {
|
|
26659
|
+
delete nodeTable.columnWidths;
|
|
26660
|
+
}
|
|
26661
|
+
}
|
|
26511
26662
|
const buildSection = (section) => {
|
|
26512
26663
|
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
26513
26664
|
const rows = section.rows.map((row) => {
|
|
@@ -31498,6 +31649,10 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31498
31649
|
if (instance2.isOfBitType(bitType, BitType2.vendorStripePricingTable)) {
|
|
31499
31650
|
if (bitJson.stripePricingTableId == null) bitJson.stripePricingTableId = "";
|
|
31500
31651
|
if (bitJson.stripePublishableKey == null) bitJson.stripePublishableKey = "";
|
|
31652
|
+
if (instance2.isOfBitType(bitType, BitType2.vendorStripePricingTablePrintOnRequest)) {
|
|
31653
|
+
if (bitJson.printOnRequestCustomerId == null) bitJson.printOnRequestCustomerId = "";
|
|
31654
|
+
if (bitJson.printOnRequestProductId == null) bitJson.printOnRequestProductId = "";
|
|
31655
|
+
}
|
|
31501
31656
|
}
|
|
31502
31657
|
if (instance2.isOfBitType(bitType, BitType2.callToAction)) {
|
|
31503
31658
|
if (bitJson.buttonCaption == null) bitJson.buttonCaption = "";
|