@gmb/bitmark-parser-generator 4.14.1 → 4.16.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 +941 -57
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +256 -9
- package/dist/browser/esm/index.d.ts +256 -9
- package/dist/browser/esm/index.js +941 -57
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/index.cjs +960 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +256 -9
- package/dist/index.d.ts +256 -9
- package/dist/index.js +960 -62
- package/dist/index.js.map +1 -1
- package/package.json +27 -26
|
@@ -122,6 +122,9 @@ var BitType = superenum({
|
|
|
122
122
|
bugAlt: "bug-alt",
|
|
123
123
|
bugCollapsible: "bug-collapsible",
|
|
124
124
|
buttonCopyText: "button-copy-text",
|
|
125
|
+
catalogItemBook: "catalog-item-book",
|
|
126
|
+
catalogItemExternalBook: "catalog-item-external-book",
|
|
127
|
+
catalogItemProduct: "catalog-item-product",
|
|
125
128
|
callToAction: "call-to-action",
|
|
126
129
|
callToActionBookNow: "call-to-action-book-now",
|
|
127
130
|
callToActionContact: "call-to-action-contact",
|
|
@@ -243,8 +246,8 @@ var BitType = superenum({
|
|
|
243
246
|
extractorAiChat: "extractor-ai-chat",
|
|
244
247
|
extractorBlock: "extractor-block",
|
|
245
248
|
extractorConfiguration: "extractor-configuration",
|
|
246
|
-
|
|
247
|
-
|
|
249
|
+
extractorImages: "extractor-images",
|
|
250
|
+
extractorImagesCollapsible: "extractor-images-collapsible",
|
|
248
251
|
extractorInformation: "extractor-information",
|
|
249
252
|
extractorPage: "extractor-page",
|
|
250
253
|
extractorPageCollapsible: "extractor-page-collapsible",
|
|
@@ -418,6 +421,7 @@ var BitType = superenum({
|
|
|
418
421
|
pageHero: "page-hero",
|
|
419
422
|
pageOpenBook: "page-open-book",
|
|
420
423
|
pageOpenBookList: "page-open-book-list",
|
|
424
|
+
openBookChapter: "open-book-chapter",
|
|
421
425
|
pagePerson: "page-person",
|
|
422
426
|
pageProduct: "page-product",
|
|
423
427
|
pageProductList: "page-product-list",
|
|
@@ -432,6 +436,7 @@ var BitType = superenum({
|
|
|
432
436
|
parameters: "parameters",
|
|
433
437
|
photo: "photo",
|
|
434
438
|
platform: "platform",
|
|
439
|
+
platformBrandTarget: "platform-brand-target",
|
|
435
440
|
platformHeader: "platform-header",
|
|
436
441
|
platformMain: "platform-main",
|
|
437
442
|
platformMainButton: "platform-main-button",
|
|
@@ -1105,7 +1110,9 @@ var groupKeys = {
|
|
|
1105
1110
|
group_resourceDocumentLink: "group_resourceDocumentLink",
|
|
1106
1111
|
group_resourceDocumentDownload: "group_resourceDocumentDownload",
|
|
1107
1112
|
group_resourceAppLink: "group_resourceAppLink",
|
|
1108
|
-
group_resourceWebsiteLink: "group_resourceWebsiteLink"
|
|
1113
|
+
group_resourceWebsiteLink: "group_resourceWebsiteLink",
|
|
1114
|
+
group_previewImages: "group_previewImages",
|
|
1115
|
+
group_previewVideos: "group_previewVideos"
|
|
1109
1116
|
};
|
|
1110
1117
|
var GroupKey = superenum10(groupKeys);
|
|
1111
1118
|
|
|
@@ -1124,6 +1131,10 @@ var propertyKeys = {
|
|
|
1124
1131
|
property_altLangTag: "@altLangTag",
|
|
1125
1132
|
property_analyticsTag: "@analyticsTag",
|
|
1126
1133
|
property_author: "@author",
|
|
1134
|
+
property_authorFullName: "@authorFullName",
|
|
1135
|
+
property_authorJobTitle: "@authorJobTitle",
|
|
1136
|
+
property_authorPseudonym: "@authorPseudonym",
|
|
1137
|
+
property_authorTitle: "@authorTitle",
|
|
1127
1138
|
property_autoplay: "@autoplay",
|
|
1128
1139
|
property_availableClassifications: "@availableClassifications",
|
|
1129
1140
|
property_brandColor: "@brandColor",
|
|
@@ -1141,6 +1152,23 @@ var propertyKeys = {
|
|
|
1141
1152
|
property_categoryTag: "@categoryTag",
|
|
1142
1153
|
property_chatWithBook: "@chatWithBook",
|
|
1143
1154
|
property_chatWithBookBrainKey: "@chatWithBookBrainKey",
|
|
1155
|
+
property_currency: "@currency",
|
|
1156
|
+
property_bookIsbn: "@bookIsbn",
|
|
1157
|
+
property_bookAuthor: "@bookAuthor",
|
|
1158
|
+
property_bookType: "@bookType",
|
|
1159
|
+
property_bookBindingType: "@bookBindingType",
|
|
1160
|
+
property_bookNumberOfPages: "@bookNumberOfPages",
|
|
1161
|
+
property_bookRating: "@bookRating",
|
|
1162
|
+
property_bookSeriesTitle: "@bookSeriesTitle",
|
|
1163
|
+
property_bookSeriesId: "@bookSeriesId",
|
|
1164
|
+
property_bookSeriesNumber: "@bookSeriesNumber",
|
|
1165
|
+
property_bookLanguage: "@bookLanguage",
|
|
1166
|
+
property_bookPublishingDate: "@bookPublishingDate",
|
|
1167
|
+
property_bookPublisher: "@bookPublisher",
|
|
1168
|
+
property_bookTranslator: "@bookTranslator",
|
|
1169
|
+
property_bookOriginalTitle: "@bookOriginalTitle",
|
|
1170
|
+
property_gmbExternalShop: "@gmbExternalShop",
|
|
1171
|
+
property_gmbExternalShopItems: "@gmbExternalShopItems",
|
|
1144
1172
|
property_citationStyle: "@citationStyle",
|
|
1145
1173
|
property_classification: "@classification",
|
|
1146
1174
|
property_codeLineNumbers: "@codeLineNumbers",
|
|
@@ -1149,6 +1177,9 @@ var propertyKeys = {
|
|
|
1149
1177
|
property_colorTag: "@colorTag",
|
|
1150
1178
|
property_computerLanguage: "@computerLanguage",
|
|
1151
1179
|
property_content2Buy: "@content2Buy",
|
|
1180
|
+
property_listPrice: "@listPrice",
|
|
1181
|
+
property_customerProductId: "@customerProductId",
|
|
1182
|
+
property_customerProductShopLink: "@customerProductShopLink",
|
|
1152
1183
|
property_copyright: "@copyright",
|
|
1153
1184
|
property_coverColor: "@coverColor",
|
|
1154
1185
|
property_coverImage: "@coverImage",
|
|
@@ -1222,6 +1253,7 @@ var propertyKeys = {
|
|
|
1222
1253
|
property_listItemIndent: "@listItemIndent",
|
|
1223
1254
|
property_location: "@location",
|
|
1224
1255
|
property_machineTranslated: "@machineTranslated",
|
|
1256
|
+
property_spansPageBreak: "@spansPageBreak",
|
|
1225
1257
|
property_mailingList: "@mailingList",
|
|
1226
1258
|
property_mark: "@mark",
|
|
1227
1259
|
property_maxCreatedBits: "@maxCreatedBits",
|
|
@@ -1237,6 +1269,7 @@ var propertyKeys = {
|
|
|
1237
1269
|
// Deprecated, replaced by person
|
|
1238
1270
|
property_path: "@path",
|
|
1239
1271
|
property_platformBackgroundColor: "@platformBackgroundColor",
|
|
1272
|
+
property_platformBrandTarget: "@platformBrandTarget",
|
|
1240
1273
|
property_platformButtonBackgroundColor: "@platformButtonBackgroundColor",
|
|
1241
1274
|
property_platformButtonPrimaryColor: "@platformButtonPrimaryColor",
|
|
1242
1275
|
property_platformMessageBackgroundColor: "@platformMessageBackgroundColor",
|
|
@@ -1380,7 +1413,10 @@ var resourceKeys = {
|
|
|
1380
1413
|
resource_platformIcon: "&platformIcon",
|
|
1381
1414
|
resource_platformLogo: "&platformLogo",
|
|
1382
1415
|
resource_backgroundWallpaper: "&backgroundWallpaper",
|
|
1383
|
-
resource_imagePlaceholder: "&imagePlaceholder"
|
|
1416
|
+
resource_imagePlaceholder: "&imagePlaceholder",
|
|
1417
|
+
resource_previewImage: "&previewImage",
|
|
1418
|
+
resource_previewVideo: "&previewVideo",
|
|
1419
|
+
resource_coverImage: "&coverImage"
|
|
1384
1420
|
};
|
|
1385
1421
|
var ResourceKey = superenum12(resourceKeys);
|
|
1386
1422
|
|
|
@@ -1608,7 +1644,10 @@ var ResourceType = superenum13({
|
|
|
1608
1644
|
imagePlaceholder: "imagePlaceholder",
|
|
1609
1645
|
platformIcon: "platformIcon",
|
|
1610
1646
|
platformLogo: "platformLogo",
|
|
1611
|
-
platformBackgroundImage: "platformBackgroundImage"
|
|
1647
|
+
platformBackgroundImage: "platformBackgroundImage",
|
|
1648
|
+
previewImage: "previewImage",
|
|
1649
|
+
previewVideo: "previewVideo",
|
|
1650
|
+
coverImage: "coverImage"
|
|
1612
1651
|
});
|
|
1613
1652
|
function resourceTypeToConfigKey(type) {
|
|
1614
1653
|
return `&${stringUtils.kebabToCamel(type)}`;
|
|
@@ -2691,6 +2730,11 @@ var GROUPS = {
|
|
|
2691
2730
|
description: "If true, the bit is machine-translated",
|
|
2692
2731
|
format: TagFormat.plainText
|
|
2693
2732
|
},
|
|
2733
|
+
{
|
|
2734
|
+
key: ConfigKey.property_spansPageBreak,
|
|
2735
|
+
description: "If true, the bit spans a page break",
|
|
2736
|
+
format: TagFormat.boolean
|
|
2737
|
+
},
|
|
2694
2738
|
{
|
|
2695
2739
|
key: ConfigKey.property_searchIndex,
|
|
2696
2740
|
description: "The search index(es) for the bit",
|
|
@@ -3272,6 +3316,16 @@ var GROUPS = {
|
|
|
3272
3316
|
format: TagFormat.plainText,
|
|
3273
3317
|
maxCount: Count.infinity
|
|
3274
3318
|
},
|
|
3319
|
+
{
|
|
3320
|
+
key: ConfigKey.resource_coverImage,
|
|
3321
|
+
description: "The cover image of the book",
|
|
3322
|
+
chain: [
|
|
3323
|
+
{
|
|
3324
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
3325
|
+
description: "Common image properties for the cover image resource"
|
|
3326
|
+
}
|
|
3327
|
+
]
|
|
3328
|
+
},
|
|
3275
3329
|
{
|
|
3276
3330
|
key: ConfigKey.property_coverColor,
|
|
3277
3331
|
description: "The cover color of the book",
|
|
@@ -4122,6 +4176,38 @@ var GROUPS = {
|
|
|
4122
4176
|
minCount: 1
|
|
4123
4177
|
}
|
|
4124
4178
|
]
|
|
4179
|
+
},
|
|
4180
|
+
[ConfigKey.group_previewImages]: {
|
|
4181
|
+
type: GroupConfigType.resource,
|
|
4182
|
+
description: "Array of preview images for catalog items",
|
|
4183
|
+
tags: [
|
|
4184
|
+
{
|
|
4185
|
+
key: ConfigKey.resource_previewImage,
|
|
4186
|
+
description: "The preview image resource",
|
|
4187
|
+
chain: [
|
|
4188
|
+
{
|
|
4189
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4190
|
+
description: "Common image properties for the image resource"
|
|
4191
|
+
}
|
|
4192
|
+
]
|
|
4193
|
+
}
|
|
4194
|
+
]
|
|
4195
|
+
},
|
|
4196
|
+
[ConfigKey.group_previewVideos]: {
|
|
4197
|
+
type: GroupConfigType.resource,
|
|
4198
|
+
description: "Array of preview videos for catalog items",
|
|
4199
|
+
tags: [
|
|
4200
|
+
{
|
|
4201
|
+
key: ConfigKey.resource_previewVideo,
|
|
4202
|
+
description: "The preview video resource",
|
|
4203
|
+
chain: [
|
|
4204
|
+
{
|
|
4205
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4206
|
+
description: "Common image properties for the image resource"
|
|
4207
|
+
}
|
|
4208
|
+
]
|
|
4209
|
+
}
|
|
4210
|
+
]
|
|
4125
4211
|
}
|
|
4126
4212
|
};
|
|
4127
4213
|
|
|
@@ -4500,6 +4586,440 @@ var BITS = {
|
|
|
4500
4586
|
}
|
|
4501
4587
|
]
|
|
4502
4588
|
},
|
|
4589
|
+
[BitType.catalogItemBook]: {
|
|
4590
|
+
since: "4.15.0",
|
|
4591
|
+
baseBitType: BitType._standard,
|
|
4592
|
+
description: "Catalog item book bit, used to represent a book product in a catalog with cover and description",
|
|
4593
|
+
tags: [
|
|
4594
|
+
{
|
|
4595
|
+
key: ConfigKey.tag_title,
|
|
4596
|
+
description: "Title and subtitle of the catalog item",
|
|
4597
|
+
maxCount: 2
|
|
4598
|
+
},
|
|
4599
|
+
{
|
|
4600
|
+
key: ConfigKey.property_coverImage,
|
|
4601
|
+
description: "Cover image of the catalog item",
|
|
4602
|
+
format: TagFormat.plainText
|
|
4603
|
+
},
|
|
4604
|
+
{
|
|
4605
|
+
key: ConfigKey.resource_coverImage,
|
|
4606
|
+
description: "Cover image of the catalog item",
|
|
4607
|
+
chain: [
|
|
4608
|
+
{
|
|
4609
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4610
|
+
description: "Common image properties for the cover image resource"
|
|
4611
|
+
}
|
|
4612
|
+
]
|
|
4613
|
+
},
|
|
4614
|
+
{
|
|
4615
|
+
key: ConfigKey.property_content2Buy,
|
|
4616
|
+
description: "Content to buy identifier",
|
|
4617
|
+
format: TagFormat.plainText
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
key: ConfigKey.property_listPrice,
|
|
4621
|
+
description: "List price of the catalog item",
|
|
4622
|
+
format: TagFormat.plainText
|
|
4623
|
+
},
|
|
4624
|
+
{
|
|
4625
|
+
key: ConfigKey.property_buttonCaption,
|
|
4626
|
+
description: "Caption for the buy button",
|
|
4627
|
+
format: TagFormat.plainText
|
|
4628
|
+
},
|
|
4629
|
+
{
|
|
4630
|
+
key: ConfigKey.property_customerProductId,
|
|
4631
|
+
description: "Customer-specific product identifier",
|
|
4632
|
+
format: TagFormat.plainText
|
|
4633
|
+
},
|
|
4634
|
+
{
|
|
4635
|
+
key: ConfigKey.property_currency,
|
|
4636
|
+
description: "Currency for the catalog item",
|
|
4637
|
+
format: TagFormat.plainText
|
|
4638
|
+
},
|
|
4639
|
+
{
|
|
4640
|
+
key: ConfigKey.property_bookIsbn,
|
|
4641
|
+
description: "ISBN for iBook version",
|
|
4642
|
+
format: TagFormat.plainText
|
|
4643
|
+
},
|
|
4644
|
+
{
|
|
4645
|
+
key: ConfigKey.property_bookAuthor,
|
|
4646
|
+
description: "Author of the book",
|
|
4647
|
+
format: TagFormat.plainText
|
|
4648
|
+
},
|
|
4649
|
+
{
|
|
4650
|
+
key: ConfigKey.property_bookType,
|
|
4651
|
+
description: "Type of the book",
|
|
4652
|
+
format: TagFormat.plainText
|
|
4653
|
+
},
|
|
4654
|
+
{
|
|
4655
|
+
key: ConfigKey.property_bookBindingType,
|
|
4656
|
+
description: "Binding type of the book",
|
|
4657
|
+
format: TagFormat.plainText
|
|
4658
|
+
},
|
|
4659
|
+
{
|
|
4660
|
+
key: ConfigKey.property_bookNumberOfPages,
|
|
4661
|
+
description: "Number of pages in the book",
|
|
4662
|
+
format: TagFormat.plainText
|
|
4663
|
+
},
|
|
4664
|
+
{
|
|
4665
|
+
key: ConfigKey.property_bookRating,
|
|
4666
|
+
description: "Rating of the book",
|
|
4667
|
+
format: TagFormat.plainText
|
|
4668
|
+
},
|
|
4669
|
+
{
|
|
4670
|
+
key: ConfigKey.property_bookSeriesTitle,
|
|
4671
|
+
description: "Title of the book series",
|
|
4672
|
+
format: TagFormat.plainText
|
|
4673
|
+
},
|
|
4674
|
+
{
|
|
4675
|
+
key: ConfigKey.property_bookSeriesId,
|
|
4676
|
+
description: "ID of the book series",
|
|
4677
|
+
format: TagFormat.plainText
|
|
4678
|
+
},
|
|
4679
|
+
{
|
|
4680
|
+
key: ConfigKey.property_bookSeriesNumber,
|
|
4681
|
+
description: "Number in the book series",
|
|
4682
|
+
format: TagFormat.plainText
|
|
4683
|
+
},
|
|
4684
|
+
{
|
|
4685
|
+
key: ConfigKey.property_bookLanguage,
|
|
4686
|
+
description: "Language of the book",
|
|
4687
|
+
format: TagFormat.plainText
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
key: ConfigKey.property_bookPublishingDate,
|
|
4691
|
+
description: "Publishing date of the book",
|
|
4692
|
+
format: TagFormat.plainText
|
|
4693
|
+
},
|
|
4694
|
+
{
|
|
4695
|
+
key: ConfigKey.property_bookPublisher,
|
|
4696
|
+
description: "Publisher of the book",
|
|
4697
|
+
format: TagFormat.plainText
|
|
4698
|
+
},
|
|
4699
|
+
{
|
|
4700
|
+
key: ConfigKey.property_bookTranslator,
|
|
4701
|
+
description: "Translator of the book",
|
|
4702
|
+
format: TagFormat.plainText
|
|
4703
|
+
},
|
|
4704
|
+
{
|
|
4705
|
+
key: ConfigKey.property_bookOriginalTitle,
|
|
4706
|
+
description: "Original title of the book",
|
|
4707
|
+
format: TagFormat.plainText
|
|
4708
|
+
},
|
|
4709
|
+
{
|
|
4710
|
+
key: ConfigKey.property_gmbExternalShop,
|
|
4711
|
+
description: "External shop identifier",
|
|
4712
|
+
format: TagFormat.plainText
|
|
4713
|
+
},
|
|
4714
|
+
{
|
|
4715
|
+
key: ConfigKey.property_gmbExternalShopItems,
|
|
4716
|
+
description: "Array of external shop items",
|
|
4717
|
+
format: TagFormat.plainText,
|
|
4718
|
+
maxCount: Count.infinity
|
|
4719
|
+
},
|
|
4720
|
+
{
|
|
4721
|
+
key: ConfigKey.group_imageSource,
|
|
4722
|
+
description: "Image source chain"
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
key: ConfigKey.group_previewImages,
|
|
4726
|
+
description: "Array of preview images for the catalog item",
|
|
4727
|
+
maxCount: Count.infinity
|
|
4728
|
+
},
|
|
4729
|
+
{
|
|
4730
|
+
key: ConfigKey.group_previewVideos,
|
|
4731
|
+
description: "Array of preview videos for the catalog item",
|
|
4732
|
+
maxCount: Count.infinity
|
|
4733
|
+
}
|
|
4734
|
+
],
|
|
4735
|
+
rootExampleType: ExampleType.string
|
|
4736
|
+
},
|
|
4737
|
+
[BitType.catalogItemExternalBook]: {
|
|
4738
|
+
since: "4.15.0",
|
|
4739
|
+
baseBitType: BitType._standard,
|
|
4740
|
+
description: "Catalog item external book bit, used to represent an external book product in a catalog with link to external shop",
|
|
4741
|
+
tags: [
|
|
4742
|
+
{
|
|
4743
|
+
key: ConfigKey.tag_title,
|
|
4744
|
+
description: "Title and subtitle of the catalog item",
|
|
4745
|
+
maxCount: 2
|
|
4746
|
+
},
|
|
4747
|
+
{
|
|
4748
|
+
key: ConfigKey.property_coverImage,
|
|
4749
|
+
description: "Cover image of the catalog item",
|
|
4750
|
+
format: TagFormat.plainText
|
|
4751
|
+
},
|
|
4752
|
+
{
|
|
4753
|
+
key: ConfigKey.resource_coverImage,
|
|
4754
|
+
description: "Cover image of the catalog item",
|
|
4755
|
+
chain: [
|
|
4756
|
+
{
|
|
4757
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4758
|
+
description: "Common image properties for the cover image resource"
|
|
4759
|
+
}
|
|
4760
|
+
]
|
|
4761
|
+
},
|
|
4762
|
+
{
|
|
4763
|
+
key: ConfigKey.property_customerProductShopLink,
|
|
4764
|
+
description: "Link to external shop for the product",
|
|
4765
|
+
format: TagFormat.plainText
|
|
4766
|
+
},
|
|
4767
|
+
{
|
|
4768
|
+
key: ConfigKey.property_listPrice,
|
|
4769
|
+
description: "List price of the catalog item",
|
|
4770
|
+
format: TagFormat.plainText
|
|
4771
|
+
},
|
|
4772
|
+
{
|
|
4773
|
+
key: ConfigKey.property_buttonCaption,
|
|
4774
|
+
description: "Caption for the buy button",
|
|
4775
|
+
format: TagFormat.plainText
|
|
4776
|
+
},
|
|
4777
|
+
{
|
|
4778
|
+
key: ConfigKey.property_customerProductId,
|
|
4779
|
+
description: "Customer-specific product identifier",
|
|
4780
|
+
format: TagFormat.plainText
|
|
4781
|
+
},
|
|
4782
|
+
{
|
|
4783
|
+
key: ConfigKey.property_currency,
|
|
4784
|
+
description: "Currency for the catalog item",
|
|
4785
|
+
format: TagFormat.plainText
|
|
4786
|
+
},
|
|
4787
|
+
{
|
|
4788
|
+
key: ConfigKey.property_bookIsbn,
|
|
4789
|
+
description: "ISBN for iBook version",
|
|
4790
|
+
format: TagFormat.plainText
|
|
4791
|
+
},
|
|
4792
|
+
{
|
|
4793
|
+
key: ConfigKey.property_bookAuthor,
|
|
4794
|
+
description: "Author of the book",
|
|
4795
|
+
format: TagFormat.plainText
|
|
4796
|
+
},
|
|
4797
|
+
{
|
|
4798
|
+
key: ConfigKey.property_bookType,
|
|
4799
|
+
description: "Type of the book",
|
|
4800
|
+
format: TagFormat.plainText
|
|
4801
|
+
},
|
|
4802
|
+
{
|
|
4803
|
+
key: ConfigKey.property_bookBindingType,
|
|
4804
|
+
description: "Binding type of the book",
|
|
4805
|
+
format: TagFormat.plainText
|
|
4806
|
+
},
|
|
4807
|
+
{
|
|
4808
|
+
key: ConfigKey.property_bookNumberOfPages,
|
|
4809
|
+
description: "Number of pages in the book",
|
|
4810
|
+
format: TagFormat.plainText
|
|
4811
|
+
},
|
|
4812
|
+
{
|
|
4813
|
+
key: ConfigKey.property_bookRating,
|
|
4814
|
+
description: "Rating of the book",
|
|
4815
|
+
format: TagFormat.plainText
|
|
4816
|
+
},
|
|
4817
|
+
{
|
|
4818
|
+
key: ConfigKey.property_bookSeriesTitle,
|
|
4819
|
+
description: "Title of the book series",
|
|
4820
|
+
format: TagFormat.plainText
|
|
4821
|
+
},
|
|
4822
|
+
{
|
|
4823
|
+
key: ConfigKey.property_bookSeriesId,
|
|
4824
|
+
description: "ID of the book series",
|
|
4825
|
+
format: TagFormat.plainText
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
key: ConfigKey.property_bookSeriesNumber,
|
|
4829
|
+
description: "Number in the book series",
|
|
4830
|
+
format: TagFormat.plainText
|
|
4831
|
+
},
|
|
4832
|
+
{
|
|
4833
|
+
key: ConfigKey.property_bookLanguage,
|
|
4834
|
+
description: "Language of the book",
|
|
4835
|
+
format: TagFormat.plainText
|
|
4836
|
+
},
|
|
4837
|
+
{
|
|
4838
|
+
key: ConfigKey.property_bookPublishingDate,
|
|
4839
|
+
description: "Publishing date of the book",
|
|
4840
|
+
format: TagFormat.plainText
|
|
4841
|
+
},
|
|
4842
|
+
{
|
|
4843
|
+
key: ConfigKey.property_bookPublisher,
|
|
4844
|
+
description: "Publisher of the book",
|
|
4845
|
+
format: TagFormat.plainText
|
|
4846
|
+
},
|
|
4847
|
+
{
|
|
4848
|
+
key: ConfigKey.property_bookTranslator,
|
|
4849
|
+
description: "Translator of the book",
|
|
4850
|
+
format: TagFormat.plainText
|
|
4851
|
+
},
|
|
4852
|
+
{
|
|
4853
|
+
key: ConfigKey.property_bookOriginalTitle,
|
|
4854
|
+
description: "Original title of the book",
|
|
4855
|
+
format: TagFormat.plainText
|
|
4856
|
+
},
|
|
4857
|
+
{
|
|
4858
|
+
key: ConfigKey.property_gmbExternalShop,
|
|
4859
|
+
description: "External shop identifier",
|
|
4860
|
+
format: TagFormat.plainText
|
|
4861
|
+
},
|
|
4862
|
+
{
|
|
4863
|
+
key: ConfigKey.property_gmbExternalShopItems,
|
|
4864
|
+
description: "Array of external shop items",
|
|
4865
|
+
format: TagFormat.plainText,
|
|
4866
|
+
maxCount: Count.infinity
|
|
4867
|
+
},
|
|
4868
|
+
{
|
|
4869
|
+
key: ConfigKey.group_imageSource,
|
|
4870
|
+
description: "Image source chain"
|
|
4871
|
+
},
|
|
4872
|
+
{
|
|
4873
|
+
key: ConfigKey.group_previewImages,
|
|
4874
|
+
description: "Array of preview images for the catalog item",
|
|
4875
|
+
maxCount: Count.infinity
|
|
4876
|
+
},
|
|
4877
|
+
{
|
|
4878
|
+
key: ConfigKey.group_previewVideos,
|
|
4879
|
+
description: "Array of preview videos for the catalog item",
|
|
4880
|
+
maxCount: Count.infinity
|
|
4881
|
+
}
|
|
4882
|
+
],
|
|
4883
|
+
rootExampleType: ExampleType.string
|
|
4884
|
+
},
|
|
4885
|
+
[BitType.catalogItemProduct]: {
|
|
4886
|
+
since: "4.15.0",
|
|
4887
|
+
baseBitType: BitType._standard,
|
|
4888
|
+
description: "Catalog item product bit, used to represent a general product in a catalog with cover and description",
|
|
4889
|
+
tags: [
|
|
4890
|
+
{
|
|
4891
|
+
key: ConfigKey.tag_title,
|
|
4892
|
+
description: "Title and subtitle of the catalog item",
|
|
4893
|
+
maxCount: 2
|
|
4894
|
+
},
|
|
4895
|
+
{
|
|
4896
|
+
key: ConfigKey.property_coverImage,
|
|
4897
|
+
description: "Cover image of the catalog item",
|
|
4898
|
+
format: TagFormat.plainText
|
|
4899
|
+
},
|
|
4900
|
+
{
|
|
4901
|
+
key: ConfigKey.property_content2Buy,
|
|
4902
|
+
description: "Content to buy identifier",
|
|
4903
|
+
format: TagFormat.plainText
|
|
4904
|
+
},
|
|
4905
|
+
{
|
|
4906
|
+
key: ConfigKey.property_listPrice,
|
|
4907
|
+
description: "List price of the catalog item",
|
|
4908
|
+
format: TagFormat.plainText
|
|
4909
|
+
},
|
|
4910
|
+
{
|
|
4911
|
+
key: ConfigKey.property_buttonCaption,
|
|
4912
|
+
description: "Caption for the buy button",
|
|
4913
|
+
format: TagFormat.plainText
|
|
4914
|
+
},
|
|
4915
|
+
{
|
|
4916
|
+
key: ConfigKey.property_customerProductId,
|
|
4917
|
+
description: "Customer-specific product identifier",
|
|
4918
|
+
format: TagFormat.plainText
|
|
4919
|
+
},
|
|
4920
|
+
{
|
|
4921
|
+
key: ConfigKey.property_currency,
|
|
4922
|
+
description: "Currency for the catalog item",
|
|
4923
|
+
format: TagFormat.plainText
|
|
4924
|
+
},
|
|
4925
|
+
{
|
|
4926
|
+
key: ConfigKey.property_bookIsbn,
|
|
4927
|
+
description: "ISBN for iBook version",
|
|
4928
|
+
format: TagFormat.plainText
|
|
4929
|
+
},
|
|
4930
|
+
{
|
|
4931
|
+
key: ConfigKey.property_bookAuthor,
|
|
4932
|
+
description: "Author of the book",
|
|
4933
|
+
format: TagFormat.plainText
|
|
4934
|
+
},
|
|
4935
|
+
{
|
|
4936
|
+
key: ConfigKey.property_bookType,
|
|
4937
|
+
description: "Type of the book",
|
|
4938
|
+
format: TagFormat.plainText
|
|
4939
|
+
},
|
|
4940
|
+
{
|
|
4941
|
+
key: ConfigKey.property_bookBindingType,
|
|
4942
|
+
description: "Binding type of the book",
|
|
4943
|
+
format: TagFormat.plainText
|
|
4944
|
+
},
|
|
4945
|
+
{
|
|
4946
|
+
key: ConfigKey.property_bookNumberOfPages,
|
|
4947
|
+
description: "Number of pages in the book",
|
|
4948
|
+
format: TagFormat.plainText
|
|
4949
|
+
},
|
|
4950
|
+
{
|
|
4951
|
+
key: ConfigKey.property_bookRating,
|
|
4952
|
+
description: "Rating of the book",
|
|
4953
|
+
format: TagFormat.plainText
|
|
4954
|
+
},
|
|
4955
|
+
{
|
|
4956
|
+
key: ConfigKey.property_bookSeriesTitle,
|
|
4957
|
+
description: "Title of the book series",
|
|
4958
|
+
format: TagFormat.plainText
|
|
4959
|
+
},
|
|
4960
|
+
{
|
|
4961
|
+
key: ConfigKey.property_bookSeriesId,
|
|
4962
|
+
description: "ID of the book series",
|
|
4963
|
+
format: TagFormat.plainText
|
|
4964
|
+
},
|
|
4965
|
+
{
|
|
4966
|
+
key: ConfigKey.property_bookSeriesNumber,
|
|
4967
|
+
description: "Number in the book series",
|
|
4968
|
+
format: TagFormat.plainText
|
|
4969
|
+
},
|
|
4970
|
+
{
|
|
4971
|
+
key: ConfigKey.property_bookLanguage,
|
|
4972
|
+
description: "Language of the book",
|
|
4973
|
+
format: TagFormat.plainText
|
|
4974
|
+
},
|
|
4975
|
+
{
|
|
4976
|
+
key: ConfigKey.property_bookPublishingDate,
|
|
4977
|
+
description: "Publishing date of the book",
|
|
4978
|
+
format: TagFormat.plainText
|
|
4979
|
+
},
|
|
4980
|
+
{
|
|
4981
|
+
key: ConfigKey.property_bookPublisher,
|
|
4982
|
+
description: "Publisher of the book",
|
|
4983
|
+
format: TagFormat.plainText
|
|
4984
|
+
},
|
|
4985
|
+
{
|
|
4986
|
+
key: ConfigKey.property_bookTranslator,
|
|
4987
|
+
description: "Translator of the book",
|
|
4988
|
+
format: TagFormat.plainText
|
|
4989
|
+
},
|
|
4990
|
+
{
|
|
4991
|
+
key: ConfigKey.property_bookOriginalTitle,
|
|
4992
|
+
description: "Original title of the book",
|
|
4993
|
+
format: TagFormat.plainText
|
|
4994
|
+
},
|
|
4995
|
+
{
|
|
4996
|
+
key: ConfigKey.property_gmbExternalShop,
|
|
4997
|
+
description: "External shop identifier",
|
|
4998
|
+
format: TagFormat.plainText
|
|
4999
|
+
},
|
|
5000
|
+
{
|
|
5001
|
+
key: ConfigKey.property_gmbExternalShopItems,
|
|
5002
|
+
description: "Array of external shop items",
|
|
5003
|
+
format: TagFormat.plainText,
|
|
5004
|
+
maxCount: Count.infinity
|
|
5005
|
+
},
|
|
5006
|
+
{
|
|
5007
|
+
key: ConfigKey.group_imageSource,
|
|
5008
|
+
description: "Image source chain"
|
|
5009
|
+
},
|
|
5010
|
+
{
|
|
5011
|
+
key: ConfigKey.group_previewImages,
|
|
5012
|
+
description: "Array of preview images for the catalog item",
|
|
5013
|
+
maxCount: Count.infinity
|
|
5014
|
+
},
|
|
5015
|
+
{
|
|
5016
|
+
key: ConfigKey.group_previewVideos,
|
|
5017
|
+
description: "Array of preview videos for the catalog item",
|
|
5018
|
+
maxCount: Count.infinity
|
|
5019
|
+
}
|
|
5020
|
+
],
|
|
5021
|
+
rootExampleType: ExampleType.string
|
|
5022
|
+
},
|
|
4503
5023
|
[BitType.callToAction]: {
|
|
4504
5024
|
since: "1.15.0",
|
|
4505
5025
|
baseBitType: BitType._standard,
|
|
@@ -6583,17 +7103,30 @@ var BITS = {
|
|
|
6583
7103
|
description: "Extractor configuration bit, used to configure extractors in articles or books",
|
|
6584
7104
|
textFormatDefault: TextFormat2.plainText
|
|
6585
7105
|
},
|
|
6586
|
-
[BitType.
|
|
7106
|
+
[BitType.extractorImages]: {
|
|
6587
7107
|
since: "4.3.0",
|
|
6588
|
-
baseBitType: BitType.
|
|
6589
|
-
description: "Extractor
|
|
7108
|
+
baseBitType: BitType._standard,
|
|
7109
|
+
description: "Extractor images bit, used for images extracted from PDFs",
|
|
7110
|
+
tags: [
|
|
7111
|
+
{
|
|
7112
|
+
key: ConfigKey.group_resourceBitTags,
|
|
7113
|
+
description: "Resource bit tags for logo grave images, used to define additional properties"
|
|
7114
|
+
},
|
|
7115
|
+
{
|
|
7116
|
+
// Image resource
|
|
7117
|
+
key: ConfigKey.group_resourceImage,
|
|
7118
|
+
description: "Resource image tags for logo grave images, used to attach images",
|
|
7119
|
+
minCount: 1,
|
|
7120
|
+
maxCount: Count.infinity
|
|
7121
|
+
}
|
|
7122
|
+
],
|
|
7123
|
+
resourceAttachmentAllowed: false,
|
|
6590
7124
|
textFormatDefault: TextFormat2.plainText
|
|
6591
7125
|
},
|
|
6592
|
-
[BitType.
|
|
7126
|
+
[BitType.extractorImagesCollapsible]: {
|
|
6593
7127
|
since: "4.3.0",
|
|
6594
|
-
baseBitType: BitType.
|
|
6595
|
-
description: "Collapsible extractor
|
|
6596
|
-
textFormatDefault: TextFormat2.plainText
|
|
7128
|
+
baseBitType: BitType.extractorImages,
|
|
7129
|
+
description: "Collapsible extractor images bit, used for images extracted from PDFs"
|
|
6597
7130
|
},
|
|
6598
7131
|
[BitType.extractorInformation]: {
|
|
6599
7132
|
since: "3.8.0",
|
|
@@ -6730,9 +7263,34 @@ var BITS = {
|
|
|
6730
7263
|
{
|
|
6731
7264
|
key: ConfigKey.property_buttonCaption,
|
|
6732
7265
|
description: "Caption for the button, used to define the text displayed on the button"
|
|
7266
|
+
},
|
|
7267
|
+
{
|
|
7268
|
+
key: ConfigKey.property_authorFullName,
|
|
7269
|
+
description: "Full name of the author",
|
|
7270
|
+
format: TagFormat.plainText
|
|
7271
|
+
},
|
|
7272
|
+
{
|
|
7273
|
+
key: ConfigKey.property_authorPseudonym,
|
|
7274
|
+
description: "A pseudonym of the author, if any",
|
|
7275
|
+
format: TagFormat.plainText
|
|
7276
|
+
},
|
|
7277
|
+
{
|
|
7278
|
+
key: ConfigKey.property_authorTitle,
|
|
7279
|
+
description: 'The title of the author, e.g. "Dr.", "Prof.", etc.',
|
|
7280
|
+
format: TagFormat.plainText
|
|
7281
|
+
},
|
|
7282
|
+
{
|
|
7283
|
+
key: ConfigKey.property_authorJobTitle,
|
|
7284
|
+
description: 'The job title of the author, e.g. "Software Engineer", "Professor", etc.',
|
|
7285
|
+
format: TagFormat.plainText
|
|
6733
7286
|
}
|
|
6734
7287
|
]
|
|
6735
7288
|
},
|
|
7289
|
+
[BitType.openBookChapter]: {
|
|
7290
|
+
since: "4.16.0",
|
|
7291
|
+
baseBitType: BitType.pageOpenBook,
|
|
7292
|
+
description: "Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"
|
|
7293
|
+
},
|
|
6736
7294
|
[BitType.pageOpenBookList]: {
|
|
6737
7295
|
since: "2.1.0",
|
|
6738
7296
|
baseBitType: BitType.article,
|
|
@@ -8075,6 +8633,18 @@ var BITS = {
|
|
|
8075
8633
|
}
|
|
8076
8634
|
]
|
|
8077
8635
|
},
|
|
8636
|
+
[BitType.platformBrandTarget]: {
|
|
8637
|
+
since: "4.15.0",
|
|
8638
|
+
baseBitType: BitType._standard,
|
|
8639
|
+
description: "Platform brand target bit, used to define the brand target for publishing",
|
|
8640
|
+
tags: [
|
|
8641
|
+
{
|
|
8642
|
+
key: ConfigKey.property_platformBrandTarget,
|
|
8643
|
+
description: 'The platform brand target (typically "light", "dark" or "none")',
|
|
8644
|
+
format: TagFormat.plainText
|
|
8645
|
+
}
|
|
8646
|
+
]
|
|
8647
|
+
},
|
|
8078
8648
|
[BitType.platformHeader]: {
|
|
8079
8649
|
since: "4.12.0",
|
|
8080
8650
|
baseBitType: BitType._standard,
|
|
@@ -9560,7 +10130,7 @@ var instance2 = new Config();
|
|
|
9560
10130
|
// src/generated/package_info.ts
|
|
9561
10131
|
var PACKAGE_INFO = {
|
|
9562
10132
|
"name": "@gmb/bitmark-parser-generator",
|
|
9563
|
-
"version": "4.
|
|
10133
|
+
"version": "4.16.0",
|
|
9564
10134
|
"author": "Get More Brain Ltd",
|
|
9565
10135
|
"license": "ISC",
|
|
9566
10136
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -9935,6 +10505,14 @@ var NodeType = superenum20({
|
|
|
9935
10505
|
audioLink: "audioLink",
|
|
9936
10506
|
author: "author",
|
|
9937
10507
|
authorValue: "authorValue",
|
|
10508
|
+
authorFullName: "authorFullName",
|
|
10509
|
+
authorFullNameValue: "authorFullNameValue",
|
|
10510
|
+
authorJobTitle: "authorJobTitle",
|
|
10511
|
+
authorJobTitleValue: "authorJobTitleValue",
|
|
10512
|
+
authorPseudonym: "authorPseudonym",
|
|
10513
|
+
authorPseudonymValue: "authorPseudonymValue",
|
|
10514
|
+
authorTitle: "authorTitle",
|
|
10515
|
+
authorTitleValue: "authorTitleValue",
|
|
9938
10516
|
availableClassifications: "availableClassifications",
|
|
9939
10517
|
availableClassificationsValue: "availableClassificationsValue",
|
|
9940
10518
|
avatarImage: "avatarImage",
|
|
@@ -9965,8 +10543,22 @@ var NodeType = superenum20({
|
|
|
9965
10543
|
book: "book",
|
|
9966
10544
|
bookAlias: "bookAlias",
|
|
9967
10545
|
bookAliasValue: "bookAliasValue",
|
|
10546
|
+
bookAuthor: "bookAuthor",
|
|
10547
|
+
bookBindingType: "bookBindingType",
|
|
9968
10548
|
bookDiff: "bookDiff",
|
|
9969
10549
|
bookDiffValue: "bookDiffValue",
|
|
10550
|
+
bookIsbn: "bookIsbn",
|
|
10551
|
+
bookLanguage: "bookLanguage",
|
|
10552
|
+
bookNumberOfPages: "bookNumberOfPages",
|
|
10553
|
+
bookOriginalTitle: "bookOriginalTitle",
|
|
10554
|
+
bookPublisher: "bookPublisher",
|
|
10555
|
+
bookPublishingDate: "bookPublishingDate",
|
|
10556
|
+
bookRating: "bookRating",
|
|
10557
|
+
bookSeriesId: "bookSeriesId",
|
|
10558
|
+
bookSeriesNumber: "bookSeriesNumber",
|
|
10559
|
+
bookSeriesTitle: "bookSeriesTitle",
|
|
10560
|
+
bookTranslator: "bookTranslator",
|
|
10561
|
+
bookType: "bookType",
|
|
9970
10562
|
bookValue: "bookValue",
|
|
9971
10563
|
bot: "bot",
|
|
9972
10564
|
botResponses: "botResponses",
|
|
@@ -10024,9 +10616,12 @@ var NodeType = superenum20({
|
|
|
10024
10616
|
coverColorValue: "coverColorValue",
|
|
10025
10617
|
coverImage: "coverImage",
|
|
10026
10618
|
coverImageValue: "coverImageValue",
|
|
10619
|
+
currency: "currency",
|
|
10027
10620
|
customerExternalId: "customerExternalId",
|
|
10028
10621
|
customerId: "customerId",
|
|
10029
10622
|
customerIdValue: "customerIdValue",
|
|
10623
|
+
customerProductId: "customerProductId",
|
|
10624
|
+
customerProductShopLink: "customerProductShopLink",
|
|
10030
10625
|
data: "data",
|
|
10031
10626
|
dataValue: "dataValue",
|
|
10032
10627
|
dataValueValue: "dataValueValue",
|
|
@@ -10101,6 +10696,8 @@ var NodeType = superenum20({
|
|
|
10101
10696
|
fullName: "fullName",
|
|
10102
10697
|
fullNameValue: "fullNameValue",
|
|
10103
10698
|
gap: "gap",
|
|
10699
|
+
gmbExternalShop: "gmbExternalShop",
|
|
10700
|
+
gmbExternalShopItems: "gmbExternalShopItems",
|
|
10104
10701
|
groupTag: "groupTag",
|
|
10105
10702
|
groupTagValue: "groupTagValue",
|
|
10106
10703
|
handInAcceptFileType: "handInAcceptFileType",
|
|
@@ -10208,11 +10805,14 @@ var NodeType = superenum20({
|
|
|
10208
10805
|
list: "list",
|
|
10209
10806
|
listItemIndent: "listItemIndent",
|
|
10210
10807
|
listItemIndentValue: "listItemIndentValue",
|
|
10808
|
+
listPrice: "listPrice",
|
|
10211
10809
|
listValue: "listValue",
|
|
10212
10810
|
location: "location",
|
|
10213
10811
|
locationValue: "locationValue",
|
|
10214
10812
|
machineTranslated: "machineTranslated",
|
|
10215
10813
|
machineTranslatedValue: "machineTranslatedValue",
|
|
10814
|
+
spansPageBreak: "spansPageBreak",
|
|
10815
|
+
spansPageBreakValue: "spansPageBreakValue",
|
|
10216
10816
|
mailingList: "mailingList",
|
|
10217
10817
|
marginNumber: "marginNumber",
|
|
10218
10818
|
marginNumberValue: "marginNumberValue",
|
|
@@ -10254,6 +10854,8 @@ var NodeType = superenum20({
|
|
|
10254
10854
|
partialAnswerValue: "partialAnswerValue",
|
|
10255
10855
|
path: "path",
|
|
10256
10856
|
pathValue: "pathValue",
|
|
10857
|
+
platformBrandTarget: "platformBrandTarget",
|
|
10858
|
+
platformBrandTargetValue: "platformBrandTargetValue",
|
|
10257
10859
|
platformName: "platformName",
|
|
10258
10860
|
platformNameValue: "platformNameValue",
|
|
10259
10861
|
platformIcon: "platformIcon",
|
|
@@ -10293,6 +10895,10 @@ var NodeType = superenum20({
|
|
|
10293
10895
|
posterImageValue: "posterImageValue",
|
|
10294
10896
|
postfix: "postfix",
|
|
10295
10897
|
prefix: "prefix",
|
|
10898
|
+
previewImage: "previewImage",
|
|
10899
|
+
previewImageValue: "previewImageValue",
|
|
10900
|
+
previewVideo: "previewVideo",
|
|
10901
|
+
previewVideoValue: "previewVideoValue",
|
|
10296
10902
|
processHandIn: "processHandIn",
|
|
10297
10903
|
processHandInLocation: "processHandInLocation",
|
|
10298
10904
|
processHandInLocationValue: "processHandInLocationValue",
|
|
@@ -10432,6 +11038,7 @@ var NodeType = superenum20({
|
|
|
10432
11038
|
subject: "subject",
|
|
10433
11039
|
subjectValue: "subjectValue",
|
|
10434
11040
|
subtitle: "subtitle",
|
|
11041
|
+
subtitleValue: "subtitleValue",
|
|
10435
11042
|
subtype: "subtype",
|
|
10436
11043
|
subtypeValue: "subtypeValue",
|
|
10437
11044
|
table: "table",
|
|
@@ -10480,6 +11087,7 @@ var NodeType = superenum20({
|
|
|
10480
11087
|
thumbnails: "thumbnails",
|
|
10481
11088
|
thumbnailsValue: "thumbnailsValue",
|
|
10482
11089
|
title: "title",
|
|
11090
|
+
titleValue: "titleValue",
|
|
10483
11091
|
titleString: "titleString",
|
|
10484
11092
|
toc: "toc",
|
|
10485
11093
|
tocContent: "tocContent",
|
|
@@ -10993,22 +11601,22 @@ var DeprecatedTextFormat = superenum23({
|
|
|
10993
11601
|
// src/parser/json/TableUtils.ts
|
|
10994
11602
|
function isTableBasicFormat(table) {
|
|
10995
11603
|
const t = table;
|
|
10996
|
-
return !!(t.columns || t.data) && !(t.
|
|
11604
|
+
return !!(t.columns || t.data) && !(t.header || t.body || t.footer);
|
|
10997
11605
|
}
|
|
10998
11606
|
function isTableExtendedFormat(table) {
|
|
10999
11607
|
const t = table;
|
|
11000
|
-
return !!(t.
|
|
11608
|
+
return !!(t.header || t.body || t.footer);
|
|
11001
11609
|
}
|
|
11002
11610
|
function isMixedTableFormat(table) {
|
|
11003
11611
|
const t = table;
|
|
11004
11612
|
const hasOld = !!(t.columns || t.data);
|
|
11005
|
-
const hasNew = !!(t.
|
|
11613
|
+
const hasNew = !!(t.header || t.body || t.footer);
|
|
11006
11614
|
return hasOld && hasNew;
|
|
11007
11615
|
}
|
|
11008
11616
|
function convertBasicToExtendedTableFormat(table) {
|
|
11009
11617
|
const tableExtended = {};
|
|
11010
11618
|
if (table.columns && table.columns.length > 0) {
|
|
11011
|
-
tableExtended.
|
|
11619
|
+
tableExtended.header = {
|
|
11012
11620
|
rows: [
|
|
11013
11621
|
{
|
|
11014
11622
|
cells: table.columns.map((col) => ({
|
|
@@ -11039,7 +11647,7 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
11039
11647
|
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
11040
11648
|
};
|
|
11041
11649
|
const dataRows = [];
|
|
11042
|
-
const headRows = tableExtended.
|
|
11650
|
+
const headRows = tableExtended.header?.rows ?? [];
|
|
11043
11651
|
if (headRows.length > 0) {
|
|
11044
11652
|
const primaryHeader = extractRowCells(headRows[0]);
|
|
11045
11653
|
if (primaryHeader.length > 0) {
|
|
@@ -11065,7 +11673,7 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
11065
11673
|
});
|
|
11066
11674
|
};
|
|
11067
11675
|
appendSectionRows(tableExtended.body);
|
|
11068
|
-
appendSectionRows(tableExtended.
|
|
11676
|
+
appendSectionRows(tableExtended.footer);
|
|
11069
11677
|
if (dataRows.length > 0) {
|
|
11070
11678
|
table.data = dataRows;
|
|
11071
11679
|
}
|
|
@@ -21907,6 +22515,8 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
21907
22515
|
case ResourceType.platformIcon:
|
|
21908
22516
|
case ResourceType.platformLogo:
|
|
21909
22517
|
case ResourceType.platformBackgroundImage:
|
|
22518
|
+
case ResourceType.previewImage:
|
|
22519
|
+
case ResourceType.coverImage:
|
|
21910
22520
|
node = this.imageResource(context, finalData, type);
|
|
21911
22521
|
break;
|
|
21912
22522
|
// case ResourceType.imageResponsive: {
|
|
@@ -21939,6 +22549,7 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
21939
22549
|
node = this.audioLinkResource(context, finalData);
|
|
21940
22550
|
break;
|
|
21941
22551
|
case ResourceType.video:
|
|
22552
|
+
case ResourceType.previewVideo:
|
|
21942
22553
|
node = this.videoResource(context, finalData);
|
|
21943
22554
|
break;
|
|
21944
22555
|
case ResourceType.videoEmbed:
|
|
@@ -22025,7 +22636,8 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
22025
22636
|
BitType.imageSeparator,
|
|
22026
22637
|
BitType.pageBanner,
|
|
22027
22638
|
BitType.imagesLogoGrave,
|
|
22028
|
-
BitType.prototypeImages
|
|
22639
|
+
BitType.prototypeImages,
|
|
22640
|
+
BitType.extractorImages
|
|
22029
22641
|
])) {
|
|
22030
22642
|
zoomDisabledDefault = true;
|
|
22031
22643
|
}
|
|
@@ -22976,6 +23588,12 @@ var Builder = class extends BaseBuilder {
|
|
|
22976
23588
|
data.machineTranslated,
|
|
22977
23589
|
options
|
|
22978
23590
|
),
|
|
23591
|
+
spansPageBreak: this.toAstProperty(
|
|
23592
|
+
bitType,
|
|
23593
|
+
ConfigKey.property_spansPageBreak,
|
|
23594
|
+
data.spansPageBreak,
|
|
23595
|
+
options
|
|
23596
|
+
),
|
|
22979
23597
|
searchIndex: this.toAstProperty(
|
|
22980
23598
|
bitType,
|
|
22981
23599
|
ConfigKey.property_searchIndex,
|
|
@@ -23110,12 +23728,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23110
23728
|
subtype: this.toAstProperty(bitType, ConfigKey.property_subtype, data.subtype, options),
|
|
23111
23729
|
bookAlias: this.toAstProperty(bitType, ConfigKey.property_bookAlias, data.bookAlias, options),
|
|
23112
23730
|
bookDiff: this.toAstProperty(bitType, ConfigKey.property_bookDiff, data.bookDiff, options),
|
|
23113
|
-
coverImage: this.toAstProperty(
|
|
23731
|
+
coverImage: typeof data.coverImage === "string" || Array.isArray(data.coverImage) ? this.toAstProperty(
|
|
23114
23732
|
bitType,
|
|
23115
23733
|
ConfigKey.property_coverImage,
|
|
23116
|
-
data.coverImage,
|
|
23734
|
+
instance4.asArray(data.coverImage),
|
|
23117
23735
|
options
|
|
23118
|
-
),
|
|
23736
|
+
) : this.toImageResource(context, data.coverImage),
|
|
23119
23737
|
coverColor: this.toAstProperty(
|
|
23120
23738
|
bitType,
|
|
23121
23739
|
ConfigKey.property_coverColor,
|
|
@@ -23170,6 +23788,93 @@ var Builder = class extends BaseBuilder {
|
|
|
23170
23788
|
data.chatWithBookBrainKey,
|
|
23171
23789
|
options
|
|
23172
23790
|
),
|
|
23791
|
+
currency: this.toAstProperty(bitType, ConfigKey.property_currency, data.currency, options),
|
|
23792
|
+
bookIsbn: this.toAstProperty(bitType, ConfigKey.property_bookIsbn, data.bookIsbn, options),
|
|
23793
|
+
bookAuthor: this.toAstProperty(
|
|
23794
|
+
bitType,
|
|
23795
|
+
ConfigKey.property_bookAuthor,
|
|
23796
|
+
data.bookAuthor,
|
|
23797
|
+
options
|
|
23798
|
+
),
|
|
23799
|
+
bookType: this.toAstProperty(bitType, ConfigKey.property_bookType, data.bookType, options),
|
|
23800
|
+
bookBindingType: this.toAstProperty(
|
|
23801
|
+
bitType,
|
|
23802
|
+
ConfigKey.property_bookBindingType,
|
|
23803
|
+
data.bookBindingType,
|
|
23804
|
+
options
|
|
23805
|
+
),
|
|
23806
|
+
bookNumberOfPages: this.toAstProperty(
|
|
23807
|
+
bitType,
|
|
23808
|
+
ConfigKey.property_bookNumberOfPages,
|
|
23809
|
+
data.bookNumberOfPages,
|
|
23810
|
+
options
|
|
23811
|
+
),
|
|
23812
|
+
bookRating: this.toAstProperty(
|
|
23813
|
+
bitType,
|
|
23814
|
+
ConfigKey.property_bookRating,
|
|
23815
|
+
data.bookRating,
|
|
23816
|
+
options
|
|
23817
|
+
),
|
|
23818
|
+
bookSeriesTitle: this.toAstProperty(
|
|
23819
|
+
bitType,
|
|
23820
|
+
ConfigKey.property_bookSeriesTitle,
|
|
23821
|
+
data.bookSeriesTitle,
|
|
23822
|
+
options
|
|
23823
|
+
),
|
|
23824
|
+
bookSeriesId: this.toAstProperty(
|
|
23825
|
+
bitType,
|
|
23826
|
+
ConfigKey.property_bookSeriesId,
|
|
23827
|
+
data.bookSeriesId,
|
|
23828
|
+
options
|
|
23829
|
+
),
|
|
23830
|
+
bookSeriesNumber: this.toAstProperty(
|
|
23831
|
+
bitType,
|
|
23832
|
+
ConfigKey.property_bookSeriesNumber,
|
|
23833
|
+
data.bookSeriesNumber,
|
|
23834
|
+
options
|
|
23835
|
+
),
|
|
23836
|
+
bookLanguage: this.toAstProperty(
|
|
23837
|
+
bitType,
|
|
23838
|
+
ConfigKey.property_bookLanguage,
|
|
23839
|
+
data.bookLanguage,
|
|
23840
|
+
options
|
|
23841
|
+
),
|
|
23842
|
+
bookPublishingDate: this.toAstProperty(
|
|
23843
|
+
bitType,
|
|
23844
|
+
ConfigKey.property_bookPublishingDate,
|
|
23845
|
+
data.bookPublishingDate,
|
|
23846
|
+
options
|
|
23847
|
+
),
|
|
23848
|
+
bookPublisher: this.toAstProperty(
|
|
23849
|
+
bitType,
|
|
23850
|
+
ConfigKey.property_bookPublisher,
|
|
23851
|
+
data.bookPublisher,
|
|
23852
|
+
options
|
|
23853
|
+
),
|
|
23854
|
+
bookTranslator: this.toAstProperty(
|
|
23855
|
+
bitType,
|
|
23856
|
+
ConfigKey.property_bookTranslator,
|
|
23857
|
+
data.bookTranslator,
|
|
23858
|
+
options
|
|
23859
|
+
),
|
|
23860
|
+
bookOriginalTitle: this.toAstProperty(
|
|
23861
|
+
bitType,
|
|
23862
|
+
ConfigKey.property_bookOriginalTitle,
|
|
23863
|
+
data.bookOriginalTitle,
|
|
23864
|
+
options
|
|
23865
|
+
),
|
|
23866
|
+
gmbExternalShop: this.toAstProperty(
|
|
23867
|
+
bitType,
|
|
23868
|
+
ConfigKey.property_gmbExternalShop,
|
|
23869
|
+
data.gmbExternalShop,
|
|
23870
|
+
options
|
|
23871
|
+
),
|
|
23872
|
+
gmbExternalShopItems: this.toAstProperty(
|
|
23873
|
+
bitType,
|
|
23874
|
+
ConfigKey.property_gmbExternalShopItems,
|
|
23875
|
+
data.gmbExternalShopItems,
|
|
23876
|
+
options
|
|
23877
|
+
),
|
|
23173
23878
|
action: this.toAstProperty(bitType, ConfigKey.property_action, data.action, options),
|
|
23174
23879
|
showInIndex: this.toAstProperty(
|
|
23175
23880
|
bitType,
|
|
@@ -23227,6 +23932,30 @@ var Builder = class extends BaseBuilder {
|
|
|
23227
23932
|
data.allowedBit,
|
|
23228
23933
|
options
|
|
23229
23934
|
),
|
|
23935
|
+
authorFullName: this.toAstProperty(
|
|
23936
|
+
bitType,
|
|
23937
|
+
ConfigKey.property_authorFullName,
|
|
23938
|
+
data.authorFullName,
|
|
23939
|
+
options
|
|
23940
|
+
),
|
|
23941
|
+
authorPseudonym: this.toAstProperty(
|
|
23942
|
+
bitType,
|
|
23943
|
+
ConfigKey.property_authorPseudonym,
|
|
23944
|
+
data.authorPseudonym,
|
|
23945
|
+
options
|
|
23946
|
+
),
|
|
23947
|
+
authorTitle: this.toAstProperty(
|
|
23948
|
+
bitType,
|
|
23949
|
+
ConfigKey.property_authorTitle,
|
|
23950
|
+
data.authorTitle,
|
|
23951
|
+
options
|
|
23952
|
+
),
|
|
23953
|
+
authorJobTitle: this.toAstProperty(
|
|
23954
|
+
bitType,
|
|
23955
|
+
ConfigKey.property_authorJobTitle,
|
|
23956
|
+
data.authorJobTitle,
|
|
23957
|
+
options
|
|
23958
|
+
),
|
|
23230
23959
|
tableFixedHeader: this.toAstProperty(
|
|
23231
23960
|
bitType,
|
|
23232
23961
|
ConfigKey.property_tableFixedHeader,
|
|
@@ -23444,6 +24173,19 @@ var Builder = class extends BaseBuilder {
|
|
|
23444
24173
|
data.content2Buy,
|
|
23445
24174
|
options
|
|
23446
24175
|
),
|
|
24176
|
+
listPrice: this.toAstProperty(bitType, ConfigKey.property_listPrice, data.listPrice, options),
|
|
24177
|
+
customerProductId: this.toAstProperty(
|
|
24178
|
+
bitType,
|
|
24179
|
+
ConfigKey.property_customerProductId,
|
|
24180
|
+
data.customerProductId,
|
|
24181
|
+
options
|
|
24182
|
+
),
|
|
24183
|
+
customerProductShopLink: this.toAstProperty(
|
|
24184
|
+
bitType,
|
|
24185
|
+
ConfigKey.property_customerProductShopLink,
|
|
24186
|
+
data.customerProductShopLink,
|
|
24187
|
+
options
|
|
24188
|
+
),
|
|
23447
24189
|
mailingList: this.toAstProperty(
|
|
23448
24190
|
bitType,
|
|
23449
24191
|
ConfigKey.property_mailingList,
|
|
@@ -23568,6 +24310,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23568
24310
|
options
|
|
23569
24311
|
),
|
|
23570
24312
|
page: this.toAstProperty(bitType, ConfigKey.property_page, data.page, options),
|
|
24313
|
+
platformBrandTarget: this.toAstProperty(
|
|
24314
|
+
bitType,
|
|
24315
|
+
ConfigKey.property_platformBrandTarget,
|
|
24316
|
+
data.platformBrandTarget,
|
|
24317
|
+
options
|
|
24318
|
+
),
|
|
23571
24319
|
platformName: this.toAstProperty(
|
|
23572
24320
|
bitType,
|
|
23573
24321
|
ConfigKey.property_platformName,
|
|
@@ -23738,6 +24486,8 @@ var Builder = class extends BaseBuilder {
|
|
|
23738
24486
|
// Example
|
|
23739
24487
|
...this.toExample(data.__isDefaultExample, data.example),
|
|
23740
24488
|
// Person
|
|
24489
|
+
previewImage: this.toImageResources(context, data.previewImage),
|
|
24490
|
+
previewVideo: this.toVideoResources(context, data.previewVideo),
|
|
23741
24491
|
imagePlaceholder: this.toImageResource(context, data.imagePlaceholder),
|
|
23742
24492
|
resources: instance4.asArray(
|
|
23743
24493
|
this.resourceBuilder.resourceFromResourceJson(context, data.resources)
|
|
@@ -24365,12 +25115,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24365
25115
|
rows
|
|
24366
25116
|
};
|
|
24367
25117
|
};
|
|
24368
|
-
const
|
|
24369
|
-
if (
|
|
25118
|
+
const header = buildSection(nodeTableExtended.header);
|
|
25119
|
+
if (header && header.rows?.length > 0) nodeTableExtended.header = header;
|
|
24370
25120
|
const body = buildSection(nodeTableExtended.body);
|
|
24371
25121
|
if (body && body.rows?.length > 0) nodeTableExtended.body = body;
|
|
24372
|
-
const
|
|
24373
|
-
if (
|
|
25122
|
+
const footer = buildSection(nodeTableExtended.footer);
|
|
25123
|
+
if (footer && footer.rows?.length > 0) nodeTableExtended.footer = footer;
|
|
24374
25124
|
return node;
|
|
24375
25125
|
}
|
|
24376
25126
|
/**
|
|
@@ -25163,6 +25913,36 @@ var Builder = class extends BaseBuilder {
|
|
|
25163
25913
|
this.resourceBuilder.resourceFromResourceDataJson(context, ResourceType.image, data?.image)
|
|
25164
25914
|
);
|
|
25165
25915
|
}
|
|
25916
|
+
toImageResources(context, data) {
|
|
25917
|
+
const arr = instance4.asArray(data);
|
|
25918
|
+
const results = [];
|
|
25919
|
+
if (arr && arr.length > 0) {
|
|
25920
|
+
for (const item of arr) {
|
|
25921
|
+
const res = this.resourceBuilder.resourceFromResourceDataJson(
|
|
25922
|
+
context,
|
|
25923
|
+
ResourceType.image,
|
|
25924
|
+
item.image
|
|
25925
|
+
);
|
|
25926
|
+
results.push(res);
|
|
25927
|
+
}
|
|
25928
|
+
}
|
|
25929
|
+
return results;
|
|
25930
|
+
}
|
|
25931
|
+
toVideoResources(context, data) {
|
|
25932
|
+
const arr = instance4.asArray(data);
|
|
25933
|
+
const results = [];
|
|
25934
|
+
if (arr && arr.length > 0) {
|
|
25935
|
+
for (const item of arr) {
|
|
25936
|
+
const res = this.resourceBuilder.resourceFromResourceDataJson(
|
|
25937
|
+
context,
|
|
25938
|
+
ResourceType.video,
|
|
25939
|
+
item.video
|
|
25940
|
+
);
|
|
25941
|
+
results.push(res);
|
|
25942
|
+
}
|
|
25943
|
+
}
|
|
25944
|
+
return results;
|
|
25945
|
+
}
|
|
25166
25946
|
//
|
|
25167
25947
|
// Private
|
|
25168
25948
|
//
|
|
@@ -26565,9 +27345,9 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26565
27345
|
writeAdvancedTable(table) {
|
|
26566
27346
|
const normalized = normalizeTableFormat(BitType.tableExtended, table);
|
|
26567
27347
|
const sections = [
|
|
26568
|
-
{ key: "
|
|
26569
|
-
{ key: "
|
|
26570
|
-
{ key: "
|
|
27348
|
+
{ key: "header", qualifier: "table-header", section: normalized.header },
|
|
27349
|
+
{ key: "body", qualifier: void 0, section: normalized.body },
|
|
27350
|
+
{ key: "footer", qualifier: "table-footer", section: normalized.footer }
|
|
26571
27351
|
];
|
|
26572
27352
|
let rowCount = 0;
|
|
26573
27353
|
for (const { key, qualifier, section } of sections) {
|
|
@@ -26595,7 +27375,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26595
27375
|
}
|
|
26596
27376
|
}
|
|
26597
27377
|
writeTableCell(cell, section) {
|
|
26598
|
-
const defaultCellType = section === "
|
|
27378
|
+
const defaultCellType = section === "body" ? "td" : "th";
|
|
26599
27379
|
const cellType = cell.title ? "th" : "td";
|
|
26600
27380
|
if (cellType !== defaultCellType) {
|
|
26601
27381
|
this.writeTableCellProperty("tableCellType", cellType);
|
|
@@ -26851,6 +27631,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26851
27631
|
this.writePropertyStyleResource(node.key, resource);
|
|
26852
27632
|
return true;
|
|
26853
27633
|
}
|
|
27634
|
+
// bitmarkAst -> bits -> bitsValue -> previewImageValue
|
|
27635
|
+
enter_previewImageValue(node, _route) {
|
|
27636
|
+
const resource = node.value;
|
|
27637
|
+
this.writeNL();
|
|
27638
|
+
this.writePropertyStyleResource("previewImage", resource);
|
|
27639
|
+
return true;
|
|
27640
|
+
}
|
|
27641
|
+
// bitmarkAst -> bits -> bitsValue -> previewVideoValue
|
|
27642
|
+
enter_previewVideoValue(node, _route) {
|
|
27643
|
+
const resource = node.value;
|
|
27644
|
+
this.writeNL();
|
|
27645
|
+
this.writePropertyStyleResource("previewVideo", resource);
|
|
27646
|
+
return true;
|
|
27647
|
+
}
|
|
26854
27648
|
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
26855
27649
|
enter_platformIcon(node, _route) {
|
|
26856
27650
|
const resource = node.value;
|
|
@@ -26872,6 +27666,59 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26872
27666
|
this.writePropertyStyleResource(node.key, resource);
|
|
26873
27667
|
return true;
|
|
26874
27668
|
}
|
|
27669
|
+
// bitmarkAst -> bits -> bitsValue -> coverImage (when it's a resource object or property array)
|
|
27670
|
+
enter_coverImage(node, route) {
|
|
27671
|
+
const value = node.value;
|
|
27672
|
+
if (value && typeof value === "object" && !Array.isArray(value) && "type" in value) {
|
|
27673
|
+
const resource = value;
|
|
27674
|
+
this.writeNL();
|
|
27675
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
27676
|
+
return true;
|
|
27677
|
+
}
|
|
27678
|
+
if (Array.isArray(value)) {
|
|
27679
|
+
if (value == null) return true;
|
|
27680
|
+
const parent = this.getParentNode(route);
|
|
27681
|
+
if (parent?.key !== NodeType.bitsValue) return true;
|
|
27682
|
+
const bitType = this.getBitType(route);
|
|
27683
|
+
if (!bitType) return true;
|
|
27684
|
+
const config = instance2.getBitConfig(bitType);
|
|
27685
|
+
const propertyConfig = instance2.getTagConfigForTag(
|
|
27686
|
+
config.tags,
|
|
27687
|
+
ConfigKey.property_coverImage
|
|
27688
|
+
);
|
|
27689
|
+
if (!propertyConfig) return true;
|
|
27690
|
+
this.writeNL_IfNotChain(route);
|
|
27691
|
+
this.writeProperty(propertyConfig.tag, value, route, {
|
|
27692
|
+
format: propertyConfig.format ?? TagFormat.plainText,
|
|
27693
|
+
array: propertyConfig.array ?? false,
|
|
27694
|
+
writeEmpty: true,
|
|
27695
|
+
ignoreFalse: propertyConfig.defaultValue === "false",
|
|
27696
|
+
ignoreTrue: propertyConfig.defaultValue === "true"
|
|
27697
|
+
});
|
|
27698
|
+
}
|
|
27699
|
+
return true;
|
|
27700
|
+
}
|
|
27701
|
+
// bitmarkAst -> bits -> bitsValue -> coverImage (when it's a property string)
|
|
27702
|
+
// This is called when coverImage is a simple string value
|
|
27703
|
+
leaf_coverImage(node, route) {
|
|
27704
|
+
const value = node.value;
|
|
27705
|
+
if (value == null) return;
|
|
27706
|
+
const parent = this.getParentNode(route);
|
|
27707
|
+
if (parent?.key !== NodeType.bitsValue) return;
|
|
27708
|
+
const bitType = this.getBitType(route);
|
|
27709
|
+
if (!bitType) return;
|
|
27710
|
+
const config = instance2.getBitConfig(bitType);
|
|
27711
|
+
const propertyConfig = instance2.getTagConfigForTag(config.tags, ConfigKey.property_coverImage);
|
|
27712
|
+
if (!propertyConfig) return;
|
|
27713
|
+
this.writeNL_IfNotChain(route);
|
|
27714
|
+
this.writeProperty(propertyConfig.tag, node.value, route, {
|
|
27715
|
+
format: propertyConfig.format ?? TagFormat.plainText,
|
|
27716
|
+
array: propertyConfig.array ?? false,
|
|
27717
|
+
writeEmpty: true,
|
|
27718
|
+
ignoreFalse: propertyConfig.defaultValue === "false",
|
|
27719
|
+
ignoreTrue: propertyConfig.defaultValue === "true"
|
|
27720
|
+
});
|
|
27721
|
+
}
|
|
26875
27722
|
exit_imagePlaceholder(_node, _route) {
|
|
26876
27723
|
}
|
|
26877
27724
|
// bitmarkAst -> bits -> bitsValue -> posterImage
|
|
@@ -27298,7 +28145,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27298
28145
|
BitType.imageSeparator,
|
|
27299
28146
|
BitType.pageBanner,
|
|
27300
28147
|
BitType.imagesLogoGrave,
|
|
27301
|
-
BitType.prototypeImages
|
|
28148
|
+
BitType.prototypeImages,
|
|
28149
|
+
BitType.extractorImages
|
|
27302
28150
|
])) {
|
|
27303
28151
|
this.writeProperty("zoomDisabled", node.value, route, {
|
|
27304
28152
|
format: TagFormat.boolean,
|
|
@@ -28456,6 +29304,14 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28456
29304
|
enter_imagePlaceholder(node, route) {
|
|
28457
29305
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28458
29306
|
}
|
|
29307
|
+
// bitmarkAst -> bits -> bitsValue -> previewImage
|
|
29308
|
+
enter_previewImage(node, route) {
|
|
29309
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
29310
|
+
}
|
|
29311
|
+
// bitmarkAst -> bits -> bitsValue -> previewVideo
|
|
29312
|
+
enter_previewVideo(node, route) {
|
|
29313
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
29314
|
+
}
|
|
28459
29315
|
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
28460
29316
|
enter_platformIcon(node, route) {
|
|
28461
29317
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
@@ -28468,6 +29324,12 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28468
29324
|
enter_platformBackgroundImage(node, route) {
|
|
28469
29325
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28470
29326
|
}
|
|
29327
|
+
// bitmarkAst -> bits -> bitsValue -> coverImage
|
|
29328
|
+
enter_coverImage(node, route) {
|
|
29329
|
+
return this.standardHandler(node, route, NodeType.bitsValue, {
|
|
29330
|
+
array: Array.isArray(node.value)
|
|
29331
|
+
});
|
|
29332
|
+
}
|
|
28471
29333
|
// bitmarkAst -> bits -> bitsValue -> resources
|
|
28472
29334
|
enter_resources(node, route) {
|
|
28473
29335
|
const resources = node.value;
|
|
@@ -28506,7 +29368,11 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28506
29368
|
}
|
|
28507
29369
|
resourceJson = wrapper;
|
|
28508
29370
|
}
|
|
28509
|
-
} else if (instance2.isOfBitType(bitType, [
|
|
29371
|
+
} else if (instance2.isOfBitType(bitType, [
|
|
29372
|
+
BitType.imagesLogoGrave,
|
|
29373
|
+
BitType.prototypeImages,
|
|
29374
|
+
BitType.extractorImages
|
|
29375
|
+
])) {
|
|
28510
29376
|
const images = [];
|
|
28511
29377
|
for (const r of resources) {
|
|
28512
29378
|
if (r.type === ResourceType.image) {
|
|
@@ -29083,7 +29949,11 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
29083
29949
|
if (bitJson.resolvedDate == null) bitJson.resolvedDate = "";
|
|
29084
29950
|
if (bitJson.resolvedBy == null) bitJson.resolvedBy = "";
|
|
29085
29951
|
}
|
|
29086
|
-
if (instance2.isOfBitType(bitType, [
|
|
29952
|
+
if (instance2.isOfBitType(bitType, [
|
|
29953
|
+
BitType.imagesLogoGrave,
|
|
29954
|
+
BitType.prototypeImages,
|
|
29955
|
+
BitType.extractorImages
|
|
29956
|
+
])) {
|
|
29087
29957
|
if (bitType === BitType.imagesLogoGrave) {
|
|
29088
29958
|
if (bitJson.logos == null) {
|
|
29089
29959
|
bitJson.logos = [];
|
|
@@ -29139,6 +30009,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
29139
30009
|
if (instance2.isOfBitType(bitType, BitType.platformPath)) {
|
|
29140
30010
|
if (bitJson.path == null) bitJson.path = "";
|
|
29141
30011
|
}
|
|
30012
|
+
if (instance2.isOfBitType(bitType, BitType.platformBrandTarget)) {
|
|
30013
|
+
if (bitJson.platformBrandTarget == null) bitJson.platformBrandTarget = "none";
|
|
30014
|
+
}
|
|
29142
30015
|
if (isTopLevelExample) {
|
|
29143
30016
|
if (bitJson.isExample == null) bitJson.isExample = false;
|
|
29144
30017
|
} else {
|
|
@@ -29511,7 +30384,7 @@ var JsonParser = class {
|
|
|
29511
30384
|
processResources(bitType, resource, images, logos) {
|
|
29512
30385
|
const nodes = [];
|
|
29513
30386
|
if (resource) nodes.push(resource);
|
|
29514
|
-
if (instance2.isOfBitType(bitType, [BitType.prototypeImages])) {
|
|
30387
|
+
if (instance2.isOfBitType(bitType, [BitType.prototypeImages, BitType.extractorImages])) {
|
|
29515
30388
|
if (Array.isArray(images)) {
|
|
29516
30389
|
for (const image of images) {
|
|
29517
30390
|
if (image) nodes.push(image);
|
|
@@ -30433,7 +31306,7 @@ var BitmarkPegParserValidator = class {
|
|
|
30433
31306
|
let tagData = validTypeKeys.get(validTypeKey);
|
|
30434
31307
|
if (!tagData && typeKey === TypeKey.Property) {
|
|
30435
31308
|
const resourceKey = key.replace(/^@/, "&");
|
|
30436
|
-
if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder || resourceKey === ConfigKey.resource_platformIcon || resourceKey === ConfigKey.resource_platformLogo || resourceKey === ConfigKey.resource_platformBackgroundImage) {
|
|
31309
|
+
if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder || resourceKey === ConfigKey.resource_platformIcon || resourceKey === ConfigKey.resource_platformLogo || resourceKey === ConfigKey.resource_platformBackgroundImage || resourceKey === ConfigKey.resource_coverImage) {
|
|
30437
31310
|
tagData = validTypeKeys.get(resourceKey);
|
|
30438
31311
|
if (tagData) {
|
|
30439
31312
|
typeKey = TypeKey.Resource;
|
|
@@ -31703,17 +32576,17 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
|
31703
32576
|
}
|
|
31704
32577
|
function parseTable(context, _bitType, cardSet) {
|
|
31705
32578
|
const sectionRows = {
|
|
31706
|
-
|
|
31707
|
-
|
|
31708
|
-
|
|
32579
|
+
header: [],
|
|
32580
|
+
body: [],
|
|
32581
|
+
footer: []
|
|
31709
32582
|
};
|
|
31710
32583
|
const getNormalizedQualifier = (rawQualifier) => {
|
|
31711
32584
|
if (!rawQualifier) return void 0;
|
|
31712
32585
|
const normalized = rawQualifier.trim().toLowerCase();
|
|
31713
|
-
if (normalized === "
|
|
31714
|
-
|
|
31715
|
-
|
|
31716
|
-
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to
|
|
32586
|
+
if (normalized === "table-header") return "header";
|
|
32587
|
+
if (normalized === "table-body") return "body";
|
|
32588
|
+
if (normalized === "table-footer") return "footer";
|
|
32589
|
+
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to body.`);
|
|
31717
32590
|
return void 0;
|
|
31718
32591
|
};
|
|
31719
32592
|
const isLegacyHeadingRow = (card, cardIndex) => {
|
|
@@ -31750,7 +32623,7 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
31750
32623
|
`Invalid table cell type '${raw}', using default for section '${section}'.`
|
|
31751
32624
|
);
|
|
31752
32625
|
}
|
|
31753
|
-
return section === "
|
|
32626
|
+
return section === "body" ? "td" : "th";
|
|
31754
32627
|
};
|
|
31755
32628
|
const normalizeSpan = (raw, kind) => {
|
|
31756
32629
|
if (raw == null) return 1;
|
|
@@ -31818,7 +32691,7 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
31818
32691
|
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
31819
32692
|
const card = cardSet.cards[cardIdx];
|
|
31820
32693
|
const qualifier = resolveSectionQualifier(card);
|
|
31821
|
-
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "
|
|
32694
|
+
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "header" : "body";
|
|
31822
32695
|
const cells = [];
|
|
31823
32696
|
for (const side of card.sides) {
|
|
31824
32697
|
for (const variant of side.variants) {
|
|
@@ -31830,28 +32703,28 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
31830
32703
|
});
|
|
31831
32704
|
}
|
|
31832
32705
|
const table = {};
|
|
31833
|
-
const hasHeadRows = sectionRows.
|
|
31834
|
-
const hasBodyRows = sectionRows.
|
|
31835
|
-
const hasFootRows = sectionRows.
|
|
32706
|
+
const hasHeadRows = sectionRows.header.length > 0;
|
|
32707
|
+
const hasBodyRows = sectionRows.body.length > 0;
|
|
32708
|
+
const hasFootRows = sectionRows.footer.length > 0;
|
|
31836
32709
|
if (hasHeadRows) {
|
|
31837
|
-
table.
|
|
31838
|
-
rows: sectionRows.
|
|
32710
|
+
table.header = {
|
|
32711
|
+
rows: sectionRows.header
|
|
31839
32712
|
};
|
|
31840
32713
|
}
|
|
31841
32714
|
if (hasBodyRows) {
|
|
31842
32715
|
table.body = {
|
|
31843
|
-
rows: sectionRows.
|
|
32716
|
+
rows: sectionRows.body
|
|
31844
32717
|
};
|
|
31845
32718
|
}
|
|
31846
32719
|
if (hasFootRows) {
|
|
31847
|
-
table.
|
|
31848
|
-
rows: sectionRows.
|
|
32720
|
+
table.footer = {
|
|
32721
|
+
rows: sectionRows.footer
|
|
31849
32722
|
};
|
|
31850
32723
|
}
|
|
31851
32724
|
if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
|
|
31852
|
-
table.
|
|
32725
|
+
table.header = { rows: [] };
|
|
31853
32726
|
table.body = { rows: [] };
|
|
31854
|
-
table.
|
|
32727
|
+
table.footer = { rows: [] };
|
|
31855
32728
|
}
|
|
31856
32729
|
return { table };
|
|
31857
32730
|
}
|
|
@@ -32836,8 +33709,19 @@ function resourceContentProcessor(context, _contentDepth, tagsConfig, content, t
|
|
|
32836
33709
|
...tags2
|
|
32837
33710
|
});
|
|
32838
33711
|
if (resource) {
|
|
32839
|
-
if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder || configKey === ConfigKey.resource_platformIcon || configKey === ConfigKey.resource_platformLogo || configKey === ConfigKey.resource_platformBackgroundImage) {
|
|
32840
|
-
if (target.propertyStyleResources)
|
|
33712
|
+
if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder || configKey === ConfigKey.resource_platformIcon || configKey === ConfigKey.resource_platformLogo || configKey === ConfigKey.resource_platformBackgroundImage || configKey === ConfigKey.resource_previewImage || configKey === ConfigKey.resource_previewVideo || configKey === ConfigKey.resource_coverImage) {
|
|
33713
|
+
if (target.propertyStyleResources) {
|
|
33714
|
+
if (target.propertyStyleResources[resourceType]) {
|
|
33715
|
+
if (!Array.isArray(target.propertyStyleResources[resourceType])) {
|
|
33716
|
+
target.propertyStyleResources[resourceType] = [
|
|
33717
|
+
target.propertyStyleResources[resourceType]
|
|
33718
|
+
];
|
|
33719
|
+
}
|
|
33720
|
+
target.propertyStyleResources[resourceType].push(resource);
|
|
33721
|
+
} else {
|
|
33722
|
+
target.propertyStyleResources[resourceType] = resource;
|
|
33723
|
+
}
|
|
33724
|
+
}
|
|
32841
33725
|
} else {
|
|
32842
33726
|
resources.push(resource);
|
|
32843
33727
|
}
|