@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/index.cjs CHANGED
@@ -695,6 +695,7 @@ var BitType = {
695
695
  vendorPadletEmbed: "vendor-padlet-embed",
696
696
  vendorStripePricingTable: "vendor-stripe-pricing-table",
697
697
  vendorStripePricingTableExternal: "vendor-stripe-pricing-table-external",
698
+ vendorStripePricingTablePrintOnRequest: "vendor-stripe-pricing-table-print-on-request",
698
699
  video: "video",
699
700
  videoEmbed: "video-embed",
700
701
  videoEmbedLandscape: "video-embed-landscape",
@@ -1406,6 +1407,8 @@ var propertyKeys = {
1406
1407
  property_padletId: "@padletId",
1407
1408
  property_page: "@page",
1408
1409
  property_printParentChapterLevel: "@printParentChapterLevel",
1410
+ property_printOnRequestCustomerId: "@printOnRequestCustomerId",
1411
+ property_printOnRequestProductId: "@printOnRequestProductId",
1409
1412
  property_pageNo: "@pageNo",
1410
1413
  property_partialAnswer: "@partialAnswer",
1411
1414
  property_partner: "@partner",
@@ -2252,7 +2255,7 @@ var CARDSETS = {
2252
2255
  {
2253
2256
  key: ConfigKey.group_resourceIcon,
2254
2257
  description: "Icon resource for the flashcard.",
2255
- jsonKey: "question.icon"
2258
+ jsonKey: "question.icon|resource(type=image, key=image)"
2256
2259
  }
2257
2260
  ]
2258
2261
  }
@@ -2275,7 +2278,7 @@ var CARDSETS = {
2275
2278
  {
2276
2279
  key: ConfigKey.group_resourceIcon,
2277
2280
  description: "Icon resource for the flashcard.",
2278
- jsonKey: "answer.icon"
2281
+ jsonKey: "answer.icon|resource(type=image, key=image)"
2279
2282
  }
2280
2283
  ]
2281
2284
  },
@@ -2292,7 +2295,8 @@ var CARDSETS = {
2292
2295
  },
2293
2296
  {
2294
2297
  key: ConfigKey.group_resourceIcon,
2295
- description: "Icon resource for the flashcard."
2298
+ description: "Icon resource for the flashcard.",
2299
+ jsonKey: "alternativeAnswers[].icon|resource(type=image, key=image)"
2296
2300
  }
2297
2301
  ],
2298
2302
  repeatCount: Count.infinity
@@ -2320,12 +2324,14 @@ var CARDSETS = {
2320
2324
  {
2321
2325
  key: ConfigKey.tag_title,
2322
2326
  description: "Title of the definition.",
2327
+ format: TagFormat.plainText,
2323
2328
  jsonKey: "^heading.forKeys"
2324
2329
  },
2325
2330
  {
2326
2331
  key: ConfigKey.group_resourceIcon,
2327
2332
  description: "Icon resource for the definition.",
2328
- jsonKey: "term.icon"
2333
+ format: TagFormat.plainText,
2334
+ jsonKey: "term.icon|resource(type=image, key=image)"
2329
2335
  }
2330
2336
  ]
2331
2337
  }
@@ -2344,12 +2350,13 @@ var CARDSETS = {
2344
2350
  {
2345
2351
  key: ConfigKey.tag_title,
2346
2352
  description: "Title of the definition.",
2353
+ format: TagFormat.plainText,
2347
2354
  jsonKey: "^heading.forValues"
2348
2355
  },
2349
2356
  {
2350
2357
  key: ConfigKey.group_resourceIcon,
2351
2358
  description: "Icon resource for the definition.",
2352
- jsonKey: "definition.icon"
2359
+ jsonKey: "definition.icon|resource(type=image, key=image)"
2353
2360
  }
2354
2361
  ]
2355
2362
  },
@@ -2366,7 +2373,8 @@ var CARDSETS = {
2366
2373
  },
2367
2374
  {
2368
2375
  key: ConfigKey.group_resourceIcon,
2369
- description: "Icon resource for the definition."
2376
+ description: "Icon resource for the definition.",
2377
+ jsonKey: "alternativeDefinitions[].icon|resource(type=image, key=image)"
2370
2378
  }
2371
2379
  ],
2372
2380
  repeatCount: Count.infinity
@@ -2394,6 +2402,7 @@ var CARDSETS = {
2394
2402
  {
2395
2403
  key: ConfigKey.tag_title,
2396
2404
  description: "Title of the match pair.",
2405
+ format: TagFormat.plainText,
2397
2406
  jsonKey: "^heading.forKeys"
2398
2407
  },
2399
2408
  {
@@ -2429,6 +2438,7 @@ var CARDSETS = {
2429
2438
  {
2430
2439
  key: ConfigKey.tag_title,
2431
2440
  description: "Title of the match pair.",
2441
+ format: TagFormat.plainText,
2432
2442
  jsonKey: "^heading.forValues"
2433
2443
  },
2434
2444
  {
@@ -2462,6 +2472,7 @@ var CARDSETS = {
2462
2472
  {
2463
2473
  key: ConfigKey.tag_title,
2464
2474
  description: "Title of the audio match pair.",
2475
+ format: TagFormat.plainText,
2465
2476
  jsonKey: "^heading.forKeys"
2466
2477
  },
2467
2478
  {
@@ -2487,6 +2498,7 @@ var CARDSETS = {
2487
2498
  {
2488
2499
  key: ConfigKey.tag_title,
2489
2500
  description: "Title of the audio match pair.",
2501
+ format: TagFormat.plainText,
2490
2502
  jsonKey: "^heading.forValues"
2491
2503
  },
2492
2504
  {
@@ -2519,6 +2531,7 @@ var CARDSETS = {
2519
2531
  {
2520
2532
  key: ConfigKey.tag_title,
2521
2533
  description: "Title of the image match pair.",
2534
+ format: TagFormat.plainText,
2522
2535
  jsonKey: "^heading.forKeys"
2523
2536
  },
2524
2537
  {
@@ -2544,6 +2557,7 @@ var CARDSETS = {
2544
2557
  {
2545
2558
  key: ConfigKey.tag_title,
2546
2559
  description: "Title of the image match pair.",
2560
+ format: TagFormat.plainText,
2547
2561
  jsonKey: "^heading.forValues"
2548
2562
  },
2549
2563
  {
@@ -2581,6 +2595,7 @@ var CARDSETS = {
2581
2595
  {
2582
2596
  key: ConfigKey.tag_title,
2583
2597
  description: "Title of the match matrix.",
2598
+ format: TagFormat.plainText,
2584
2599
  jsonKey: "^heading.forKeys"
2585
2600
  },
2586
2601
  {
@@ -2611,6 +2626,7 @@ var CARDSETS = {
2611
2626
  {
2612
2627
  key: ConfigKey.tag_title,
2613
2628
  description: "Title of the match matrix.",
2629
+ format: TagFormat.plainText,
2614
2630
  jsonKey: "^heading.forValues"
2615
2631
  },
2616
2632
  {
@@ -2710,6 +2726,7 @@ var CARDSETS = {
2710
2726
  {
2711
2727
  key: ConfigKey.tag_title,
2712
2728
  description: "Title of the feedback.",
2729
+ format: TagFormat.plainText,
2713
2730
  jsonKey: "^heading.forKeys"
2714
2731
  }
2715
2732
  ],
@@ -2740,6 +2757,7 @@ var CARDSETS = {
2740
2757
  {
2741
2758
  key: ConfigKey.tag_title,
2742
2759
  description: "Title of the feedback.",
2760
+ format: TagFormat.plainText,
2743
2761
  jsonKey: "^heading.forValues"
2744
2762
  }
2745
2763
  ],
@@ -3084,14 +3102,16 @@ var CARDSETS = {
3084
3102
  {
3085
3103
  key: ConfigKey.tag_true,
3086
3104
  description: "Checked state for the ingredient.",
3087
- jsonKey: "ingredient|set(checked=true)",
3105
+ jsonKey: "|set(checked=true)",
3088
3106
  maxCount: 1
3107
+ // nullable: true,
3089
3108
  },
3090
3109
  {
3091
3110
  key: ConfigKey.tag_false,
3092
3111
  description: "Unchecked state for the ingredient.",
3093
- jsonKey: "ingredient|set(checked=false)",
3112
+ jsonKey: "|set(checked=false)",
3094
3113
  maxCount: 1
3114
+ // nullable: true,
3095
3115
  },
3096
3116
  {
3097
3117
  key: ConfigKey.group_standardItemLead,
@@ -3100,7 +3120,8 @@ var CARDSETS = {
3100
3120
  {
3101
3121
  key: ConfigKey.tag_instruction,
3102
3122
  description: "The quantity of the ingredient.",
3103
- jsonKey: "quantity"
3123
+ jsonKey: "quantity",
3124
+ format: TagFormat.number
3104
3125
  },
3105
3126
  {
3106
3127
  key: ConfigKey.tag_hint,
@@ -3455,6 +3476,7 @@ var GROUPS = {
3455
3476
  {
3456
3477
  key: ConfigKey.tag_anchor,
3457
3478
  name: "Anchor",
3479
+ format: TagFormat.plainText,
3458
3480
  description: "The anchor for the bit"
3459
3481
  },
3460
3482
  {
@@ -3615,7 +3637,7 @@ var GROUPS = {
3615
3637
  tags: [
3616
3638
  {
3617
3639
  key: ConfigKey.property_person,
3618
- jsonKey: "person.name",
3640
+ jsonKey: "partner.name",
3619
3641
  description: "A person",
3620
3642
  format: TagFormat.plainText,
3621
3643
  chain: [
@@ -3626,6 +3648,7 @@ var GROUPS = {
3626
3648
  },
3627
3649
  {
3628
3650
  key: ConfigKey.group_resourceImage,
3651
+ jsonKey: "avatarImage|resource(type=image, key=image)",
3629
3652
  description: "The image of the person"
3630
3653
  }
3631
3654
  ]
@@ -3644,6 +3667,7 @@ var GROUPS = {
3644
3667
  },
3645
3668
  {
3646
3669
  key: ConfigKey.group_resourceImage,
3670
+ jsonKey: "avatarImage|resource(type=image, key=image)",
3647
3671
  description: "The image of the partner"
3648
3672
  }
3649
3673
  ]
@@ -3882,7 +3906,8 @@ var GROUPS = {
3882
3906
  key: ConfigKey.tag_title,
3883
3907
  name: "Title",
3884
3908
  description: "The title of the book",
3885
- maxCount: 2
3909
+ maxCount: 2,
3910
+ jsonKey: "title|multi(count=2, key=subtitle)"
3886
3911
  },
3887
3912
  {
3888
3913
  key: ConfigKey.property_subtype,
@@ -3897,6 +3922,7 @@ var GROUPS = {
3897
3922
  },
3898
3923
  {
3899
3924
  key: ConfigKey.resource_coverImage,
3925
+ jsonKey: "coverImage|resource(type=image, key=image)",
3900
3926
  description: "The cover image of the book",
3901
3927
  chain: [
3902
3928
  {
@@ -3913,6 +3939,7 @@ var GROUPS = {
3913
3939
  },
3914
3940
  {
3915
3941
  key: ConfigKey.resource_backgroundImage,
3942
+ jsonKey: "backgroundImage|resource(type=image, key=image)",
3916
3943
  description: "The background image of the book",
3917
3944
  chain: [
3918
3945
  {
@@ -4073,6 +4100,7 @@ var GROUPS = {
4073
4100
  chain: [
4074
4101
  {
4075
4102
  key: ConfigKey.tag_reference,
4103
+ format: TagFormat.plainText,
4076
4104
  description: "The reference(s) for the book(s) in the learning path",
4077
4105
  maxCount: 2
4078
4106
  }
@@ -4847,6 +4875,7 @@ var GROUPS = {
4847
4875
  tags: [
4848
4876
  {
4849
4877
  key: ConfigKey.resource_previewImage,
4878
+ jsonKey: "previewImage|resource(type=image, key=image)",
4850
4879
  description: "The preview image resource",
4851
4880
  chain: [
4852
4881
  {
@@ -4863,6 +4892,7 @@ var GROUPS = {
4863
4892
  tags: [
4864
4893
  {
4865
4894
  key: ConfigKey.resource_previewVideo,
4895
+ jsonKey: "previewVideo|resource(type=video, key=video)",
4866
4896
  description: "The preview video resource",
4867
4897
  chain: [
4868
4898
  {
@@ -5287,7 +5317,8 @@ var BITS = {
5287
5317
  {
5288
5318
  key: ConfigKey.tag_title,
5289
5319
  description: "Title and subtitle of the catalog item",
5290
- maxCount: 2
5320
+ maxCount: 2,
5321
+ jsonKey: "title|multi(count=2, key=subtitle)"
5291
5322
  },
5292
5323
  {
5293
5324
  key: ConfigKey.property_coverImage,
@@ -5296,6 +5327,7 @@ var BITS = {
5296
5327
  },
5297
5328
  {
5298
5329
  key: ConfigKey.resource_coverImage,
5330
+ jsonKey: "coverImage|resource(type=image, key=image)",
5299
5331
  description: "Cover image of the catalog item",
5300
5332
  chain: [
5301
5333
  {
@@ -5435,7 +5467,8 @@ var BITS = {
5435
5467
  {
5436
5468
  key: ConfigKey.tag_title,
5437
5469
  description: "Title and subtitle of the catalog item",
5438
- maxCount: 2
5470
+ maxCount: 2,
5471
+ jsonKey: "title|multi(count=2, key=subtitle)"
5439
5472
  },
5440
5473
  {
5441
5474
  key: ConfigKey.property_coverImage,
@@ -5444,6 +5477,7 @@ var BITS = {
5444
5477
  },
5445
5478
  {
5446
5479
  key: ConfigKey.resource_coverImage,
5480
+ jsonKey: "coverImage|resource(type=image, key=image)",
5447
5481
  description: "Cover image of the catalog item",
5448
5482
  chain: [
5449
5483
  {
@@ -5583,7 +5617,8 @@ var BITS = {
5583
5617
  {
5584
5618
  key: ConfigKey.tag_title,
5585
5619
  description: "Title and subtitle of the catalog item",
5586
- maxCount: 2
5620
+ maxCount: 2,
5621
+ jsonKey: "title|multi(count=2, key=subtitle)"
5587
5622
  },
5588
5623
  {
5589
5624
  key: ConfigKey.property_coverImage,
@@ -5911,10 +5946,12 @@ var BITS = {
5911
5946
  tags: [
5912
5947
  {
5913
5948
  key: ConfigKey.tag_reference,
5949
+ format: TagFormat.plainText,
5914
5950
  description: "The reference to the bit that this alias points to"
5915
5951
  },
5916
5952
  {
5917
5953
  key: ConfigKey.tag_anchor,
5954
+ format: TagFormat.plainText,
5918
5955
  description: "The anchor for the bit alias, used for linking"
5919
5956
  }
5920
5957
  ]
@@ -6112,8 +6149,9 @@ var BITS = {
6112
6149
  {
6113
6150
  key: ConfigKey.tag_title,
6114
6151
  description: "The title of the book cover",
6115
- maxCount: 2
6152
+ maxCount: 2,
6116
6153
  // title & subtitle
6154
+ jsonKey: "title|multi(count=2, key=subtitle)"
6117
6155
  },
6118
6156
  {
6119
6157
  key: ConfigKey.property_coverColor,
@@ -6258,11 +6296,13 @@ var BITS = {
6258
6296
  tags: [
6259
6297
  {
6260
6298
  key: ConfigKey.tag_anchor,
6299
+ format: TagFormat.plainText,
6261
6300
  description: "The anchor for the chapter, used for linking"
6262
6301
  },
6263
6302
  {
6264
6303
  key: ConfigKey.tag_title,
6265
- description: "The title of the chapter"
6304
+ description: "The title of the chapter",
6305
+ jsonKey: "title|setMulti(level)"
6266
6306
  },
6267
6307
  {
6268
6308
  key: ConfigKey.property_toc,
@@ -6790,7 +6830,8 @@ var BITS = {
6790
6830
  },
6791
6831
  {
6792
6832
  key: ConfigKey.tag_hint,
6793
- description: "Hint for the ingredient, used to provide additional information"
6833
+ description: "Hint for the ingredient, used to provide additional information",
6834
+ format: TagFormat.plainText
6794
6835
  }
6795
6836
  ]
6796
6837
  }
@@ -8016,6 +8057,7 @@ var BITS = {
8016
8057
  chain: [
8017
8058
  {
8018
8059
  key: ConfigKey.tag_reference,
8060
+ format: TagFormat.plainText,
8019
8061
  description: "Reference tag for the book, used to link to the book in the system",
8020
8062
  maxCount: 2
8021
8063
  }
@@ -8024,6 +8066,7 @@ var BITS = {
8024
8066
  {
8025
8067
  /* Allow incorrectly chained reference tag */
8026
8068
  key: ConfigKey.tag_reference,
8069
+ format: TagFormat.plainText,
8027
8070
  description: "Reference tag for the book, used to link to the book in the system"
8028
8071
  },
8029
8072
  {
@@ -8069,6 +8112,7 @@ var BITS = {
8069
8112
  chain: [
8070
8113
  {
8071
8114
  key: ConfigKey.tag_reference,
8115
+ format: TagFormat.plainText,
8072
8116
  description: "Reference tag for the book, used to link to the book in the system",
8073
8117
  maxCount: 2
8074
8118
  }
@@ -8077,6 +8121,7 @@ var BITS = {
8077
8121
  {
8078
8122
  /* Allow incorrectly chained reference tag */
8079
8123
  key: ConfigKey.tag_reference,
8124
+ format: TagFormat.plainText,
8080
8125
  description: "Reference tag for the book, used to link to the book in the system"
8081
8126
  },
8082
8127
  {
@@ -8107,6 +8152,7 @@ var BITS = {
8107
8152
  chain: [
8108
8153
  {
8109
8154
  key: ConfigKey.tag_reference,
8155
+ format: TagFormat.plainText,
8110
8156
  description: "Reference tag for the book, used to link to the book in the system",
8111
8157
  maxCount: 2
8112
8158
  }
@@ -8627,6 +8673,7 @@ var BITS = {
8627
8673
  tags: [
8628
8674
  {
8629
8675
  key: ConfigKey.tag_reference,
8676
+ format: TagFormat.plainText,
8630
8677
  description: "Reference tag for the internal link, used to link to the target bit"
8631
8678
  }
8632
8679
  ]
@@ -9569,6 +9616,7 @@ var BITS = {
9569
9616
  },
9570
9617
  {
9571
9618
  key: ConfigKey.resource_platformBackgroundImage,
9619
+ jsonKey: "platformBackgroundImage|resource(type=image, key=image)",
9572
9620
  description: "The platform section chat background image",
9573
9621
  chain: [
9574
9622
  {
@@ -9733,10 +9781,12 @@ var BITS = {
9733
9781
  // Not sure if these are actually valid here, but include them as they are in the test bit.
9734
9782
  {
9735
9783
  key: ConfigKey.tag_anchor,
9784
+ format: TagFormat.plainText,
9736
9785
  description: "Anchor for the sample solution, used to link to the solution"
9737
9786
  },
9738
9787
  {
9739
9788
  key: ConfigKey.tag_reference,
9789
+ format: TagFormat.plainText,
9740
9790
  description: "Reference for the sample solution, used to link to the source of the solution"
9741
9791
  }
9742
9792
  ]
@@ -10618,6 +10668,25 @@ var BITS = {
10618
10668
  baseBitType: BitType.vendorStripePricingTable,
10619
10669
  description: "External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"
10620
10670
  },
10671
+ [BitType.vendorStripePricingTablePrintOnRequest]: {
10672
+ since: "5.21.0",
10673
+ baseBitType: BitType.vendorStripePricingTable,
10674
+ 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",
10675
+ tags: [
10676
+ {
10677
+ key: ConfigKey.property_printOnRequestCustomerId,
10678
+ description: "Print-on-request customer ID, used to identify the customer for the print-on-request flow",
10679
+ format: TagFormat.plainText,
10680
+ minCount: 1
10681
+ },
10682
+ {
10683
+ key: ConfigKey.property_printOnRequestProductId,
10684
+ description: "Print-on-request product ID, used to identify the product for the print-on-request flow",
10685
+ format: TagFormat.plainText,
10686
+ minCount: 1
10687
+ }
10688
+ ]
10689
+ },
10621
10690
  [BitType.video]: {
10622
10691
  since: "1.3.0",
10623
10692
  baseBitType: BitType._standard,
@@ -11078,7 +11147,7 @@ var instance2 = new Config();
11078
11147
  // src/generated/package_info.ts
11079
11148
  var PACKAGE_INFO = {
11080
11149
  "name": "@gmb/bitmark-parser-generator",
11081
- "version": "5.20.0",
11150
+ "version": "5.22.0",
11082
11151
  "author": "Get More Brain Ltd",
11083
11152
  "license": "ISC",
11084
11153
  "description": "A bitmark parser and generator using Peggy.js"
@@ -11893,6 +11962,10 @@ var NodeType = {
11893
11962
  previewVideoValue: "previewVideoValue",
11894
11963
  printParentChapterLevel: "printParentChapterLevel",
11895
11964
  printParentChapterLevelValue: "printParentChapterLevelValue",
11965
+ printOnRequestCustomerId: "printOnRequestCustomerId",
11966
+ printOnRequestCustomerIdValue: "printOnRequestCustomerIdValue",
11967
+ printOnRequestProductId: "printOnRequestProductId",
11968
+ printOnRequestProductIdValue: "printOnRequestProductIdValue",
11896
11969
  processHandIn: "processHandIn",
11897
11970
  processHandInLocation: "processHandInLocation",
11898
11971
  processHandInLocationValue: "processHandInLocationValue",
@@ -12647,6 +12720,17 @@ function convertBasicToExtendedTableFormat(table) {
12647
12720
  }))
12648
12721
  };
12649
12722
  }
12723
+ if (Array.isArray(table.columnWidths) && table.columnWidths.length > 0) {
12724
+ const targetCells = tableExtended.header?.rows[0]?.cells ?? tableExtended.body?.rows[0]?.cells;
12725
+ if (targetCells) {
12726
+ for (let i = 0; i < table.columnWidths.length; i++) {
12727
+ const width = table.columnWidths[i];
12728
+ if (typeof width === "number" && width > 0 && targetCells[i]) {
12729
+ targetCells[i].colwidth = width;
12730
+ }
12731
+ }
12732
+ }
12733
+ }
12650
12734
  return tableExtended;
12651
12735
  }
12652
12736
  function convertExtendedToBasicTableFormat(tableExtended) {
@@ -12658,7 +12742,23 @@ function convertExtendedToBasicTableFormat(tableExtended) {
12658
12742
  return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
12659
12743
  };
12660
12744
  const dataRows = [];
12745
+ const widths = [];
12746
+ let hasAnyWidth = false;
12747
+ let maxCellCount = 0;
12748
+ const collectWidths = (cells) => {
12749
+ if (!cells) return;
12750
+ if (cells.length > maxCellCount) maxCellCount = cells.length;
12751
+ cells.forEach((cell, idx) => {
12752
+ if (cell && typeof cell.colwidth === "number" && cell.colwidth > 0) {
12753
+ widths[idx] = cell.colwidth;
12754
+ hasAnyWidth = true;
12755
+ }
12756
+ });
12757
+ };
12661
12758
  const headRows = tableExtended.header?.rows ?? [];
12759
+ headRows.forEach((row) => collectWidths(row?.cells));
12760
+ (tableExtended.body?.rows ?? []).forEach((row) => collectWidths(row?.cells));
12761
+ (tableExtended.footer?.rows ?? []).forEach((row) => collectWidths(row?.cells));
12662
12762
  if (headRows.length > 0) {
12663
12763
  const primaryHeader = extractRowCells(headRows[0]);
12664
12764
  if (primaryHeader.length > 0) {
@@ -12688,6 +12788,15 @@ function convertExtendedToBasicTableFormat(tableExtended) {
12688
12788
  if (dataRows.length > 0) {
12689
12789
  table.data = dataRows;
12690
12790
  }
12791
+ if (hasAnyWidth) {
12792
+ const columnCount = table.columns?.length ?? maxCellCount;
12793
+ const columnWidths = new Array(columnCount).fill(null);
12794
+ for (let i = 0; i < columnCount; i++) {
12795
+ const w = widths[i];
12796
+ if (typeof w === "number") columnWidths[i] = w;
12797
+ }
12798
+ table.columnWidths = columnWidths;
12799
+ }
12691
12800
  return table;
12692
12801
  }
12693
12802
  function normalizeTableFormat(bitType, table) {
@@ -12833,6 +12942,31 @@ var AstWalkerGenerator = class {
12833
12942
  }
12834
12943
  return void 0;
12835
12944
  }
12945
+ getSiblingNodes(route) {
12946
+ const parentNode = this.getParentNode(route);
12947
+ if (!parentNode || !parentNode.value || !Array.isArray(parentNode.value)) {
12948
+ return {};
12949
+ }
12950
+ const siblings = parentNode.value;
12951
+ const index = siblings.findIndex((s) => s === route[route.length - 1]?.value);
12952
+ if (index === -1) {
12953
+ return {};
12954
+ }
12955
+ return {
12956
+ left: index > 0 ? siblings[index - 1] : void 0,
12957
+ right: index < siblings.length - 1 ? siblings[index + 1] : void 0
12958
+ };
12959
+ }
12960
+ isEmptyParagraph(node) {
12961
+ if (!node) return false;
12962
+ if (node.type !== TextNodeType.paragraph) return false;
12963
+ if (!node.content || !Array.isArray(node.content)) return true;
12964
+ for (const contentNode of node.content) {
12965
+ if (contentNode.type !== TextNodeType.text) return false;
12966
+ if (contentNode.text && contentNode.text.trim() !== "") return false;
12967
+ }
12968
+ return true;
12969
+ }
12836
12970
  };
12837
12971
 
12838
12972
  // src/generator/text/TextGenerator.ts
@@ -12958,7 +13092,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
12958
13092
  __publicField(this, "inParagraph", false);
12959
13093
  __publicField(this, "inHeading", false);
12960
13094
  __publicField(this, "inCodeBlock", false);
12961
- __publicField(this, "exitedCodeBlock", false);
12962
13095
  __publicField(this, "inBulletList", false);
12963
13096
  __publicField(this, "inInline", false);
12964
13097
  __publicField(this, "markDepth", 0);
@@ -13047,7 +13180,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
13047
13180
  this.inParagraph = false;
13048
13181
  this.inHeading = false;
13049
13182
  this.inCodeBlock = false;
13050
- this.exitedCodeBlock = false;
13051
13183
  this.inBulletList = false;
13052
13184
  this.inInline = false;
13053
13185
  this.markDepth = 0;
@@ -13113,7 +13245,7 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
13113
13245
  switch (node.type) {
13114
13246
  case TextNodeType.paragraph:
13115
13247
  this.inParagraph = true;
13116
- this.writeParagraph(node);
13248
+ this.writeParagraph(node, route);
13117
13249
  break;
13118
13250
  case TextNodeType.hardBreak:
13119
13251
  this.writeHardBreak(node);
@@ -13170,7 +13302,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
13170
13302
  return false;
13171
13303
  default:
13172
13304
  }
13173
- this.exitedCodeBlock = false;
13174
13305
  }
13175
13306
  handleBetweenNode(node, _left, _right, _route) {
13176
13307
  switch (node.type) {
@@ -13204,7 +13335,6 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
13204
13335
  this.writeNL();
13205
13336
  this.writeNL();
13206
13337
  this.inCodeBlock = false;
13207
- this.exitedCodeBlock = true;
13208
13338
  break;
13209
13339
  case TextNodeType.noBulletList:
13210
13340
  case TextNodeType.bulletList:
@@ -13568,21 +13698,19 @@ var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
13568
13698
  }
13569
13699
  }
13570
13700
  }
13571
- writeParagraph(node) {
13701
+ writeParagraph(node, route) {
13572
13702
  if (this.textFormat === TextFormat.bitmarkText) {
13573
13703
  if (this.inBulletList) return;
13574
- const nodeContentLength = node.content?.length ?? 0;
13575
- if (this.nodeIndex === 0) {
13576
- if (nodeContentLength === 1) {
13577
- const isTextNode = node.content?.[0].type === TextNodeType.text;
13578
- const text = node.content?.[0].text ?? "";
13579
- if (!isTextNode || text !== "") return;
13580
- }
13581
- if (nodeContentLength > 1) return;
13704
+ const siblingNodes = this.getSiblingNodes(route);
13705
+ const prevSiblingNodeType = siblingNodes.left?.type;
13706
+ const inBody = this.textLocation === TextLocation.body;
13707
+ const isEmptyParagraph = this.isEmptyParagraph(node);
13708
+ if (!inBody || !isEmptyParagraph && !(prevSiblingNodeType === TextNodeType.codeBlock || prevSiblingNodeType === TextNodeType.paragraph)) {
13709
+ return;
13582
13710
  }
13583
13711
  this.write("|");
13584
13712
  this.writeNL();
13585
- if (this.exitedCodeBlock) {
13713
+ if (prevSiblingNodeType === TextNodeType.codeBlock) {
13586
13714
  this.writeNL();
13587
13715
  }
13588
13716
  }
@@ -25690,6 +25818,18 @@ var Builder = class extends BaseBuilder {
25690
25818
  data.printParentChapterLevel,
25691
25819
  options
25692
25820
  ),
25821
+ printOnRequestCustomerId: this.toAstProperty(
25822
+ bitType,
25823
+ ConfigKey.property_printOnRequestCustomerId,
25824
+ data.printOnRequestCustomerId,
25825
+ options
25826
+ ),
25827
+ printOnRequestProductId: this.toAstProperty(
25828
+ bitType,
25829
+ ConfigKey.property_printOnRequestProductId,
25830
+ data.printOnRequestProductId,
25831
+ options
25832
+ ),
25693
25833
  platformBrandTarget: this.toAstProperty(
25694
25834
  bitType,
25695
25835
  ConfigKey.property_platformBrandTarget,
@@ -26522,6 +26662,17 @@ var Builder = class extends BaseBuilder {
26522
26662
  (row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation.tag, cell))
26523
26663
  );
26524
26664
  }
26665
+ if (Array.isArray(nodeTable.columnWidths)) {
26666
+ const columnCount = Array.isArray(nodeTable.columns) ? nodeTable.columns.length : void 0;
26667
+ const source = columnCount != null ? nodeTable.columnWidths.slice(0, columnCount) : nodeTable.columnWidths;
26668
+ const normalized = source.map((w) => typeof w === "number" && w > 0 ? w : null);
26669
+ const hasAny = normalized.some((w) => w != null);
26670
+ if (hasAny) {
26671
+ nodeTable.columnWidths = normalized;
26672
+ } else {
26673
+ delete nodeTable.columnWidths;
26674
+ }
26675
+ }
26525
26676
  const buildSection = (section) => {
26526
26677
  if (!section || !Array.isArray(section.rows)) return void 0;
26527
26678
  const rows = section.rows.map((row) => {
@@ -31512,6 +31663,10 @@ var JsonGenerator = class extends AstWalkerGenerator {
31512
31663
  if (instance2.isOfBitType(bitType, BitType.vendorStripePricingTable)) {
31513
31664
  if (bitJson.stripePricingTableId == null) bitJson.stripePricingTableId = "";
31514
31665
  if (bitJson.stripePublishableKey == null) bitJson.stripePublishableKey = "";
31666
+ if (instance2.isOfBitType(bitType, BitType.vendorStripePricingTablePrintOnRequest)) {
31667
+ if (bitJson.printOnRequestCustomerId == null) bitJson.printOnRequestCustomerId = "";
31668
+ if (bitJson.printOnRequestProductId == null) bitJson.printOnRequestProductId = "";
31669
+ }
31515
31670
  }
31516
31671
  if (instance2.isOfBitType(bitType, BitType.callToAction)) {
31517
31672
  if (bitJson.buttonCaption == null) bitJson.buttonCaption = "";
@@ -40330,7 +40485,17 @@ var ConfigBuilder = class {
40330
40485
  let chain = void 0;
40331
40486
  if (tagType === BitTagConfigKeyType.tag) {
40332
40487
  tagName = tag.key;
40333
- format = "bitmark--";
40488
+ if (tag.format === TagFormat.plainText) {
40489
+ format = "string";
40490
+ } else if (tag.format === TagFormat.boolean) {
40491
+ format = "bool";
40492
+ } else if (tag.format === TagFormat.bitmarkText) {
40493
+ format = "bitmark";
40494
+ } else if (tag.format === TagFormat.number) {
40495
+ format = "number";
40496
+ } else {
40497
+ format = "bitmark--";
40498
+ }
40334
40499
  } else if (tagType === BitTagConfigKeyType.property) {
40335
40500
  tagName = tag.key;
40336
40501
  if (tag.format === TagFormat.plainText) {
@@ -40354,7 +40519,10 @@ var ConfigBuilder = class {
40354
40519
  tags2.push({
40355
40520
  type: "group",
40356
40521
  key: groupKey,
40357
- ...tag.jsonKey ? { jsonKey: tag.jsonKey } : {}
40522
+ ...tag.jsonKey ? { jsonKey: tag.jsonKey } : {},
40523
+ ...tag.minCount != null ? { min: tag.minCount } : {},
40524
+ ...tag.maxCount != null ? { max: tag.maxCount } : {},
40525
+ ...tag.description ? { description: tag.description } : {}
40358
40526
  });
40359
40527
  }
40360
40528
  return tags2;
@@ -40372,6 +40540,7 @@ var ConfigBuilder = class {
40372
40540
  jsonKey,
40373
40541
  format,
40374
40542
  default: tag.defaultValue ?? null,
40543
+ ...tag.nullable ? { nullable: true } : {},
40375
40544
  min: tag.minCount == null ? 0 : tag.minCount,
40376
40545
  max: tag.maxCount == null ? 1 : tag.maxCount,
40377
40546
  description: tag.description ?? "",