@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
package/dist/index.cjs
CHANGED
|
@@ -181,6 +181,9 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
181
181
|
bugAlt: "bug-alt",
|
|
182
182
|
bugCollapsible: "bug-collapsible",
|
|
183
183
|
buttonCopyText: "button-copy-text",
|
|
184
|
+
catalogItemBook: "catalog-item-book",
|
|
185
|
+
catalogItemExternalBook: "catalog-item-external-book",
|
|
186
|
+
catalogItemProduct: "catalog-item-product",
|
|
184
187
|
callToAction: "call-to-action",
|
|
185
188
|
callToActionBookNow: "call-to-action-book-now",
|
|
186
189
|
callToActionContact: "call-to-action-contact",
|
|
@@ -302,8 +305,8 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
302
305
|
extractorAiChat: "extractor-ai-chat",
|
|
303
306
|
extractorBlock: "extractor-block",
|
|
304
307
|
extractorConfiguration: "extractor-configuration",
|
|
305
|
-
|
|
306
|
-
|
|
308
|
+
extractorImages: "extractor-images",
|
|
309
|
+
extractorImagesCollapsible: "extractor-images-collapsible",
|
|
307
310
|
extractorInformation: "extractor-information",
|
|
308
311
|
extractorPage: "extractor-page",
|
|
309
312
|
extractorPageCollapsible: "extractor-page-collapsible",
|
|
@@ -477,6 +480,7 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
477
480
|
pageHero: "page-hero",
|
|
478
481
|
pageOpenBook: "page-open-book",
|
|
479
482
|
pageOpenBookList: "page-open-book-list",
|
|
483
|
+
openBookChapter: "open-book-chapter",
|
|
480
484
|
pagePerson: "page-person",
|
|
481
485
|
pageProduct: "page-product",
|
|
482
486
|
pageProductList: "page-product-list",
|
|
@@ -491,6 +495,7 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
491
495
|
parameters: "parameters",
|
|
492
496
|
photo: "photo",
|
|
493
497
|
platform: "platform",
|
|
498
|
+
platformBrandTarget: "platform-brand-target",
|
|
494
499
|
platformHeader: "platform-header",
|
|
495
500
|
platformMain: "platform-main",
|
|
496
501
|
platformMainButton: "platform-main-button",
|
|
@@ -1164,7 +1169,9 @@ var groupKeys = {
|
|
|
1164
1169
|
group_resourceDocumentLink: "group_resourceDocumentLink",
|
|
1165
1170
|
group_resourceDocumentDownload: "group_resourceDocumentDownload",
|
|
1166
1171
|
group_resourceAppLink: "group_resourceAppLink",
|
|
1167
|
-
group_resourceWebsiteLink: "group_resourceWebsiteLink"
|
|
1172
|
+
group_resourceWebsiteLink: "group_resourceWebsiteLink",
|
|
1173
|
+
group_previewImages: "group_previewImages",
|
|
1174
|
+
group_previewVideos: "group_previewVideos"
|
|
1168
1175
|
};
|
|
1169
1176
|
var GroupKey = (0, import_superenum10.superenum)(groupKeys);
|
|
1170
1177
|
|
|
@@ -1183,6 +1190,10 @@ var propertyKeys = {
|
|
|
1183
1190
|
property_altLangTag: "@altLangTag",
|
|
1184
1191
|
property_analyticsTag: "@analyticsTag",
|
|
1185
1192
|
property_author: "@author",
|
|
1193
|
+
property_authorFullName: "@authorFullName",
|
|
1194
|
+
property_authorJobTitle: "@authorJobTitle",
|
|
1195
|
+
property_authorPseudonym: "@authorPseudonym",
|
|
1196
|
+
property_authorTitle: "@authorTitle",
|
|
1186
1197
|
property_autoplay: "@autoplay",
|
|
1187
1198
|
property_availableClassifications: "@availableClassifications",
|
|
1188
1199
|
property_brandColor: "@brandColor",
|
|
@@ -1200,6 +1211,23 @@ var propertyKeys = {
|
|
|
1200
1211
|
property_categoryTag: "@categoryTag",
|
|
1201
1212
|
property_chatWithBook: "@chatWithBook",
|
|
1202
1213
|
property_chatWithBookBrainKey: "@chatWithBookBrainKey",
|
|
1214
|
+
property_currency: "@currency",
|
|
1215
|
+
property_bookIsbn: "@bookIsbn",
|
|
1216
|
+
property_bookAuthor: "@bookAuthor",
|
|
1217
|
+
property_bookType: "@bookType",
|
|
1218
|
+
property_bookBindingType: "@bookBindingType",
|
|
1219
|
+
property_bookNumberOfPages: "@bookNumberOfPages",
|
|
1220
|
+
property_bookRating: "@bookRating",
|
|
1221
|
+
property_bookSeriesTitle: "@bookSeriesTitle",
|
|
1222
|
+
property_bookSeriesId: "@bookSeriesId",
|
|
1223
|
+
property_bookSeriesNumber: "@bookSeriesNumber",
|
|
1224
|
+
property_bookLanguage: "@bookLanguage",
|
|
1225
|
+
property_bookPublishingDate: "@bookPublishingDate",
|
|
1226
|
+
property_bookPublisher: "@bookPublisher",
|
|
1227
|
+
property_bookTranslator: "@bookTranslator",
|
|
1228
|
+
property_bookOriginalTitle: "@bookOriginalTitle",
|
|
1229
|
+
property_gmbExternalShop: "@gmbExternalShop",
|
|
1230
|
+
property_gmbExternalShopItems: "@gmbExternalShopItems",
|
|
1203
1231
|
property_citationStyle: "@citationStyle",
|
|
1204
1232
|
property_classification: "@classification",
|
|
1205
1233
|
property_codeLineNumbers: "@codeLineNumbers",
|
|
@@ -1208,6 +1236,9 @@ var propertyKeys = {
|
|
|
1208
1236
|
property_colorTag: "@colorTag",
|
|
1209
1237
|
property_computerLanguage: "@computerLanguage",
|
|
1210
1238
|
property_content2Buy: "@content2Buy",
|
|
1239
|
+
property_listPrice: "@listPrice",
|
|
1240
|
+
property_customerProductId: "@customerProductId",
|
|
1241
|
+
property_customerProductShopLink: "@customerProductShopLink",
|
|
1211
1242
|
property_copyright: "@copyright",
|
|
1212
1243
|
property_coverColor: "@coverColor",
|
|
1213
1244
|
property_coverImage: "@coverImage",
|
|
@@ -1281,6 +1312,7 @@ var propertyKeys = {
|
|
|
1281
1312
|
property_listItemIndent: "@listItemIndent",
|
|
1282
1313
|
property_location: "@location",
|
|
1283
1314
|
property_machineTranslated: "@machineTranslated",
|
|
1315
|
+
property_spansPageBreak: "@spansPageBreak",
|
|
1284
1316
|
property_mailingList: "@mailingList",
|
|
1285
1317
|
property_mark: "@mark",
|
|
1286
1318
|
property_maxCreatedBits: "@maxCreatedBits",
|
|
@@ -1296,6 +1328,7 @@ var propertyKeys = {
|
|
|
1296
1328
|
// Deprecated, replaced by person
|
|
1297
1329
|
property_path: "@path",
|
|
1298
1330
|
property_platformBackgroundColor: "@platformBackgroundColor",
|
|
1331
|
+
property_platformBrandTarget: "@platformBrandTarget",
|
|
1299
1332
|
property_platformButtonBackgroundColor: "@platformButtonBackgroundColor",
|
|
1300
1333
|
property_platformButtonPrimaryColor: "@platformButtonPrimaryColor",
|
|
1301
1334
|
property_platformMessageBackgroundColor: "@platformMessageBackgroundColor",
|
|
@@ -1439,7 +1472,10 @@ var resourceKeys = {
|
|
|
1439
1472
|
resource_platformIcon: "&platformIcon",
|
|
1440
1473
|
resource_platformLogo: "&platformLogo",
|
|
1441
1474
|
resource_backgroundWallpaper: "&backgroundWallpaper",
|
|
1442
|
-
resource_imagePlaceholder: "&imagePlaceholder"
|
|
1475
|
+
resource_imagePlaceholder: "&imagePlaceholder",
|
|
1476
|
+
resource_previewImage: "&previewImage",
|
|
1477
|
+
resource_previewVideo: "&previewVideo",
|
|
1478
|
+
resource_coverImage: "&coverImage"
|
|
1443
1479
|
};
|
|
1444
1480
|
var ResourceKey = (0, import_superenum12.superenum)(resourceKeys);
|
|
1445
1481
|
|
|
@@ -1667,7 +1703,10 @@ var ResourceType = (0, import_superenum13.superenum)({
|
|
|
1667
1703
|
imagePlaceholder: "imagePlaceholder",
|
|
1668
1704
|
platformIcon: "platformIcon",
|
|
1669
1705
|
platformLogo: "platformLogo",
|
|
1670
|
-
platformBackgroundImage: "platformBackgroundImage"
|
|
1706
|
+
platformBackgroundImage: "platformBackgroundImage",
|
|
1707
|
+
previewImage: "previewImage",
|
|
1708
|
+
previewVideo: "previewVideo",
|
|
1709
|
+
coverImage: "coverImage"
|
|
1671
1710
|
});
|
|
1672
1711
|
function resourceTypeToConfigKey(type) {
|
|
1673
1712
|
return `&${stringUtils.kebabToCamel(type)}`;
|
|
@@ -2750,6 +2789,11 @@ var GROUPS = {
|
|
|
2750
2789
|
description: "If true, the bit is machine-translated",
|
|
2751
2790
|
format: TagFormat.plainText
|
|
2752
2791
|
},
|
|
2792
|
+
{
|
|
2793
|
+
key: ConfigKey.property_spansPageBreak,
|
|
2794
|
+
description: "If true, the bit spans a page break",
|
|
2795
|
+
format: TagFormat.boolean
|
|
2796
|
+
},
|
|
2753
2797
|
{
|
|
2754
2798
|
key: ConfigKey.property_searchIndex,
|
|
2755
2799
|
description: "The search index(es) for the bit",
|
|
@@ -3331,6 +3375,16 @@ var GROUPS = {
|
|
|
3331
3375
|
format: TagFormat.plainText,
|
|
3332
3376
|
maxCount: Count.infinity
|
|
3333
3377
|
},
|
|
3378
|
+
{
|
|
3379
|
+
key: ConfigKey.resource_coverImage,
|
|
3380
|
+
description: "The cover image of the book",
|
|
3381
|
+
chain: [
|
|
3382
|
+
{
|
|
3383
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
3384
|
+
description: "Common image properties for the cover image resource"
|
|
3385
|
+
}
|
|
3386
|
+
]
|
|
3387
|
+
},
|
|
3334
3388
|
{
|
|
3335
3389
|
key: ConfigKey.property_coverColor,
|
|
3336
3390
|
description: "The cover color of the book",
|
|
@@ -4181,6 +4235,38 @@ var GROUPS = {
|
|
|
4181
4235
|
minCount: 1
|
|
4182
4236
|
}
|
|
4183
4237
|
]
|
|
4238
|
+
},
|
|
4239
|
+
[ConfigKey.group_previewImages]: {
|
|
4240
|
+
type: GroupConfigType.resource,
|
|
4241
|
+
description: "Array of preview images for catalog items",
|
|
4242
|
+
tags: [
|
|
4243
|
+
{
|
|
4244
|
+
key: ConfigKey.resource_previewImage,
|
|
4245
|
+
description: "The preview image resource",
|
|
4246
|
+
chain: [
|
|
4247
|
+
{
|
|
4248
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4249
|
+
description: "Common image properties for the image resource"
|
|
4250
|
+
}
|
|
4251
|
+
]
|
|
4252
|
+
}
|
|
4253
|
+
]
|
|
4254
|
+
},
|
|
4255
|
+
[ConfigKey.group_previewVideos]: {
|
|
4256
|
+
type: GroupConfigType.resource,
|
|
4257
|
+
description: "Array of preview videos for catalog items",
|
|
4258
|
+
tags: [
|
|
4259
|
+
{
|
|
4260
|
+
key: ConfigKey.resource_previewVideo,
|
|
4261
|
+
description: "The preview video resource",
|
|
4262
|
+
chain: [
|
|
4263
|
+
{
|
|
4264
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4265
|
+
description: "Common image properties for the image resource"
|
|
4266
|
+
}
|
|
4267
|
+
]
|
|
4268
|
+
}
|
|
4269
|
+
]
|
|
4184
4270
|
}
|
|
4185
4271
|
};
|
|
4186
4272
|
|
|
@@ -4559,6 +4645,440 @@ var BITS = {
|
|
|
4559
4645
|
}
|
|
4560
4646
|
]
|
|
4561
4647
|
},
|
|
4648
|
+
[BitType.catalogItemBook]: {
|
|
4649
|
+
since: "4.15.0",
|
|
4650
|
+
baseBitType: BitType._standard,
|
|
4651
|
+
description: "Catalog item book bit, used to represent a book product in a catalog with cover and description",
|
|
4652
|
+
tags: [
|
|
4653
|
+
{
|
|
4654
|
+
key: ConfigKey.tag_title,
|
|
4655
|
+
description: "Title and subtitle of the catalog item",
|
|
4656
|
+
maxCount: 2
|
|
4657
|
+
},
|
|
4658
|
+
{
|
|
4659
|
+
key: ConfigKey.property_coverImage,
|
|
4660
|
+
description: "Cover image of the catalog item",
|
|
4661
|
+
format: TagFormat.plainText
|
|
4662
|
+
},
|
|
4663
|
+
{
|
|
4664
|
+
key: ConfigKey.resource_coverImage,
|
|
4665
|
+
description: "Cover image of the catalog item",
|
|
4666
|
+
chain: [
|
|
4667
|
+
{
|
|
4668
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4669
|
+
description: "Common image properties for the cover image resource"
|
|
4670
|
+
}
|
|
4671
|
+
]
|
|
4672
|
+
},
|
|
4673
|
+
{
|
|
4674
|
+
key: ConfigKey.property_content2Buy,
|
|
4675
|
+
description: "Content to buy identifier",
|
|
4676
|
+
format: TagFormat.plainText
|
|
4677
|
+
},
|
|
4678
|
+
{
|
|
4679
|
+
key: ConfigKey.property_listPrice,
|
|
4680
|
+
description: "List price of the catalog item",
|
|
4681
|
+
format: TagFormat.plainText
|
|
4682
|
+
},
|
|
4683
|
+
{
|
|
4684
|
+
key: ConfigKey.property_buttonCaption,
|
|
4685
|
+
description: "Caption for the buy button",
|
|
4686
|
+
format: TagFormat.plainText
|
|
4687
|
+
},
|
|
4688
|
+
{
|
|
4689
|
+
key: ConfigKey.property_customerProductId,
|
|
4690
|
+
description: "Customer-specific product identifier",
|
|
4691
|
+
format: TagFormat.plainText
|
|
4692
|
+
},
|
|
4693
|
+
{
|
|
4694
|
+
key: ConfigKey.property_currency,
|
|
4695
|
+
description: "Currency for the catalog item",
|
|
4696
|
+
format: TagFormat.plainText
|
|
4697
|
+
},
|
|
4698
|
+
{
|
|
4699
|
+
key: ConfigKey.property_bookIsbn,
|
|
4700
|
+
description: "ISBN for iBook version",
|
|
4701
|
+
format: TagFormat.plainText
|
|
4702
|
+
},
|
|
4703
|
+
{
|
|
4704
|
+
key: ConfigKey.property_bookAuthor,
|
|
4705
|
+
description: "Author of the book",
|
|
4706
|
+
format: TagFormat.plainText
|
|
4707
|
+
},
|
|
4708
|
+
{
|
|
4709
|
+
key: ConfigKey.property_bookType,
|
|
4710
|
+
description: "Type of the book",
|
|
4711
|
+
format: TagFormat.plainText
|
|
4712
|
+
},
|
|
4713
|
+
{
|
|
4714
|
+
key: ConfigKey.property_bookBindingType,
|
|
4715
|
+
description: "Binding type of the book",
|
|
4716
|
+
format: TagFormat.plainText
|
|
4717
|
+
},
|
|
4718
|
+
{
|
|
4719
|
+
key: ConfigKey.property_bookNumberOfPages,
|
|
4720
|
+
description: "Number of pages in the book",
|
|
4721
|
+
format: TagFormat.plainText
|
|
4722
|
+
},
|
|
4723
|
+
{
|
|
4724
|
+
key: ConfigKey.property_bookRating,
|
|
4725
|
+
description: "Rating of the book",
|
|
4726
|
+
format: TagFormat.plainText
|
|
4727
|
+
},
|
|
4728
|
+
{
|
|
4729
|
+
key: ConfigKey.property_bookSeriesTitle,
|
|
4730
|
+
description: "Title of the book series",
|
|
4731
|
+
format: TagFormat.plainText
|
|
4732
|
+
},
|
|
4733
|
+
{
|
|
4734
|
+
key: ConfigKey.property_bookSeriesId,
|
|
4735
|
+
description: "ID of the book series",
|
|
4736
|
+
format: TagFormat.plainText
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
key: ConfigKey.property_bookSeriesNumber,
|
|
4740
|
+
description: "Number in the book series",
|
|
4741
|
+
format: TagFormat.plainText
|
|
4742
|
+
},
|
|
4743
|
+
{
|
|
4744
|
+
key: ConfigKey.property_bookLanguage,
|
|
4745
|
+
description: "Language of the book",
|
|
4746
|
+
format: TagFormat.plainText
|
|
4747
|
+
},
|
|
4748
|
+
{
|
|
4749
|
+
key: ConfigKey.property_bookPublishingDate,
|
|
4750
|
+
description: "Publishing date of the book",
|
|
4751
|
+
format: TagFormat.plainText
|
|
4752
|
+
},
|
|
4753
|
+
{
|
|
4754
|
+
key: ConfigKey.property_bookPublisher,
|
|
4755
|
+
description: "Publisher of the book",
|
|
4756
|
+
format: TagFormat.plainText
|
|
4757
|
+
},
|
|
4758
|
+
{
|
|
4759
|
+
key: ConfigKey.property_bookTranslator,
|
|
4760
|
+
description: "Translator of the book",
|
|
4761
|
+
format: TagFormat.plainText
|
|
4762
|
+
},
|
|
4763
|
+
{
|
|
4764
|
+
key: ConfigKey.property_bookOriginalTitle,
|
|
4765
|
+
description: "Original title of the book",
|
|
4766
|
+
format: TagFormat.plainText
|
|
4767
|
+
},
|
|
4768
|
+
{
|
|
4769
|
+
key: ConfigKey.property_gmbExternalShop,
|
|
4770
|
+
description: "External shop identifier",
|
|
4771
|
+
format: TagFormat.plainText
|
|
4772
|
+
},
|
|
4773
|
+
{
|
|
4774
|
+
key: ConfigKey.property_gmbExternalShopItems,
|
|
4775
|
+
description: "Array of external shop items",
|
|
4776
|
+
format: TagFormat.plainText,
|
|
4777
|
+
maxCount: Count.infinity
|
|
4778
|
+
},
|
|
4779
|
+
{
|
|
4780
|
+
key: ConfigKey.group_imageSource,
|
|
4781
|
+
description: "Image source chain"
|
|
4782
|
+
},
|
|
4783
|
+
{
|
|
4784
|
+
key: ConfigKey.group_previewImages,
|
|
4785
|
+
description: "Array of preview images for the catalog item",
|
|
4786
|
+
maxCount: Count.infinity
|
|
4787
|
+
},
|
|
4788
|
+
{
|
|
4789
|
+
key: ConfigKey.group_previewVideos,
|
|
4790
|
+
description: "Array of preview videos for the catalog item",
|
|
4791
|
+
maxCount: Count.infinity
|
|
4792
|
+
}
|
|
4793
|
+
],
|
|
4794
|
+
rootExampleType: ExampleType.string
|
|
4795
|
+
},
|
|
4796
|
+
[BitType.catalogItemExternalBook]: {
|
|
4797
|
+
since: "4.15.0",
|
|
4798
|
+
baseBitType: BitType._standard,
|
|
4799
|
+
description: "Catalog item external book bit, used to represent an external book product in a catalog with link to external shop",
|
|
4800
|
+
tags: [
|
|
4801
|
+
{
|
|
4802
|
+
key: ConfigKey.tag_title,
|
|
4803
|
+
description: "Title and subtitle of the catalog item",
|
|
4804
|
+
maxCount: 2
|
|
4805
|
+
},
|
|
4806
|
+
{
|
|
4807
|
+
key: ConfigKey.property_coverImage,
|
|
4808
|
+
description: "Cover image of the catalog item",
|
|
4809
|
+
format: TagFormat.plainText
|
|
4810
|
+
},
|
|
4811
|
+
{
|
|
4812
|
+
key: ConfigKey.resource_coverImage,
|
|
4813
|
+
description: "Cover image of the catalog item",
|
|
4814
|
+
chain: [
|
|
4815
|
+
{
|
|
4816
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
4817
|
+
description: "Common image properties for the cover image resource"
|
|
4818
|
+
}
|
|
4819
|
+
]
|
|
4820
|
+
},
|
|
4821
|
+
{
|
|
4822
|
+
key: ConfigKey.property_customerProductShopLink,
|
|
4823
|
+
description: "Link to external shop for the product",
|
|
4824
|
+
format: TagFormat.plainText
|
|
4825
|
+
},
|
|
4826
|
+
{
|
|
4827
|
+
key: ConfigKey.property_listPrice,
|
|
4828
|
+
description: "List price of the catalog item",
|
|
4829
|
+
format: TagFormat.plainText
|
|
4830
|
+
},
|
|
4831
|
+
{
|
|
4832
|
+
key: ConfigKey.property_buttonCaption,
|
|
4833
|
+
description: "Caption for the buy button",
|
|
4834
|
+
format: TagFormat.plainText
|
|
4835
|
+
},
|
|
4836
|
+
{
|
|
4837
|
+
key: ConfigKey.property_customerProductId,
|
|
4838
|
+
description: "Customer-specific product identifier",
|
|
4839
|
+
format: TagFormat.plainText
|
|
4840
|
+
},
|
|
4841
|
+
{
|
|
4842
|
+
key: ConfigKey.property_currency,
|
|
4843
|
+
description: "Currency for the catalog item",
|
|
4844
|
+
format: TagFormat.plainText
|
|
4845
|
+
},
|
|
4846
|
+
{
|
|
4847
|
+
key: ConfigKey.property_bookIsbn,
|
|
4848
|
+
description: "ISBN for iBook version",
|
|
4849
|
+
format: TagFormat.plainText
|
|
4850
|
+
},
|
|
4851
|
+
{
|
|
4852
|
+
key: ConfigKey.property_bookAuthor,
|
|
4853
|
+
description: "Author of the book",
|
|
4854
|
+
format: TagFormat.plainText
|
|
4855
|
+
},
|
|
4856
|
+
{
|
|
4857
|
+
key: ConfigKey.property_bookType,
|
|
4858
|
+
description: "Type of the book",
|
|
4859
|
+
format: TagFormat.plainText
|
|
4860
|
+
},
|
|
4861
|
+
{
|
|
4862
|
+
key: ConfigKey.property_bookBindingType,
|
|
4863
|
+
description: "Binding type of the book",
|
|
4864
|
+
format: TagFormat.plainText
|
|
4865
|
+
},
|
|
4866
|
+
{
|
|
4867
|
+
key: ConfigKey.property_bookNumberOfPages,
|
|
4868
|
+
description: "Number of pages in the book",
|
|
4869
|
+
format: TagFormat.plainText
|
|
4870
|
+
},
|
|
4871
|
+
{
|
|
4872
|
+
key: ConfigKey.property_bookRating,
|
|
4873
|
+
description: "Rating of the book",
|
|
4874
|
+
format: TagFormat.plainText
|
|
4875
|
+
},
|
|
4876
|
+
{
|
|
4877
|
+
key: ConfigKey.property_bookSeriesTitle,
|
|
4878
|
+
description: "Title of the book series",
|
|
4879
|
+
format: TagFormat.plainText
|
|
4880
|
+
},
|
|
4881
|
+
{
|
|
4882
|
+
key: ConfigKey.property_bookSeriesId,
|
|
4883
|
+
description: "ID of the book series",
|
|
4884
|
+
format: TagFormat.plainText
|
|
4885
|
+
},
|
|
4886
|
+
{
|
|
4887
|
+
key: ConfigKey.property_bookSeriesNumber,
|
|
4888
|
+
description: "Number in the book series",
|
|
4889
|
+
format: TagFormat.plainText
|
|
4890
|
+
},
|
|
4891
|
+
{
|
|
4892
|
+
key: ConfigKey.property_bookLanguage,
|
|
4893
|
+
description: "Language of the book",
|
|
4894
|
+
format: TagFormat.plainText
|
|
4895
|
+
},
|
|
4896
|
+
{
|
|
4897
|
+
key: ConfigKey.property_bookPublishingDate,
|
|
4898
|
+
description: "Publishing date of the book",
|
|
4899
|
+
format: TagFormat.plainText
|
|
4900
|
+
},
|
|
4901
|
+
{
|
|
4902
|
+
key: ConfigKey.property_bookPublisher,
|
|
4903
|
+
description: "Publisher of the book",
|
|
4904
|
+
format: TagFormat.plainText
|
|
4905
|
+
},
|
|
4906
|
+
{
|
|
4907
|
+
key: ConfigKey.property_bookTranslator,
|
|
4908
|
+
description: "Translator of the book",
|
|
4909
|
+
format: TagFormat.plainText
|
|
4910
|
+
},
|
|
4911
|
+
{
|
|
4912
|
+
key: ConfigKey.property_bookOriginalTitle,
|
|
4913
|
+
description: "Original title of the book",
|
|
4914
|
+
format: TagFormat.plainText
|
|
4915
|
+
},
|
|
4916
|
+
{
|
|
4917
|
+
key: ConfigKey.property_gmbExternalShop,
|
|
4918
|
+
description: "External shop identifier",
|
|
4919
|
+
format: TagFormat.plainText
|
|
4920
|
+
},
|
|
4921
|
+
{
|
|
4922
|
+
key: ConfigKey.property_gmbExternalShopItems,
|
|
4923
|
+
description: "Array of external shop items",
|
|
4924
|
+
format: TagFormat.plainText,
|
|
4925
|
+
maxCount: Count.infinity
|
|
4926
|
+
},
|
|
4927
|
+
{
|
|
4928
|
+
key: ConfigKey.group_imageSource,
|
|
4929
|
+
description: "Image source chain"
|
|
4930
|
+
},
|
|
4931
|
+
{
|
|
4932
|
+
key: ConfigKey.group_previewImages,
|
|
4933
|
+
description: "Array of preview images for the catalog item",
|
|
4934
|
+
maxCount: Count.infinity
|
|
4935
|
+
},
|
|
4936
|
+
{
|
|
4937
|
+
key: ConfigKey.group_previewVideos,
|
|
4938
|
+
description: "Array of preview videos for the catalog item",
|
|
4939
|
+
maxCount: Count.infinity
|
|
4940
|
+
}
|
|
4941
|
+
],
|
|
4942
|
+
rootExampleType: ExampleType.string
|
|
4943
|
+
},
|
|
4944
|
+
[BitType.catalogItemProduct]: {
|
|
4945
|
+
since: "4.15.0",
|
|
4946
|
+
baseBitType: BitType._standard,
|
|
4947
|
+
description: "Catalog item product bit, used to represent a general product in a catalog with cover and description",
|
|
4948
|
+
tags: [
|
|
4949
|
+
{
|
|
4950
|
+
key: ConfigKey.tag_title,
|
|
4951
|
+
description: "Title and subtitle of the catalog item",
|
|
4952
|
+
maxCount: 2
|
|
4953
|
+
},
|
|
4954
|
+
{
|
|
4955
|
+
key: ConfigKey.property_coverImage,
|
|
4956
|
+
description: "Cover image of the catalog item",
|
|
4957
|
+
format: TagFormat.plainText
|
|
4958
|
+
},
|
|
4959
|
+
{
|
|
4960
|
+
key: ConfigKey.property_content2Buy,
|
|
4961
|
+
description: "Content to buy identifier",
|
|
4962
|
+
format: TagFormat.plainText
|
|
4963
|
+
},
|
|
4964
|
+
{
|
|
4965
|
+
key: ConfigKey.property_listPrice,
|
|
4966
|
+
description: "List price of the catalog item",
|
|
4967
|
+
format: TagFormat.plainText
|
|
4968
|
+
},
|
|
4969
|
+
{
|
|
4970
|
+
key: ConfigKey.property_buttonCaption,
|
|
4971
|
+
description: "Caption for the buy button",
|
|
4972
|
+
format: TagFormat.plainText
|
|
4973
|
+
},
|
|
4974
|
+
{
|
|
4975
|
+
key: ConfigKey.property_customerProductId,
|
|
4976
|
+
description: "Customer-specific product identifier",
|
|
4977
|
+
format: TagFormat.plainText
|
|
4978
|
+
},
|
|
4979
|
+
{
|
|
4980
|
+
key: ConfigKey.property_currency,
|
|
4981
|
+
description: "Currency for the catalog item",
|
|
4982
|
+
format: TagFormat.plainText
|
|
4983
|
+
},
|
|
4984
|
+
{
|
|
4985
|
+
key: ConfigKey.property_bookIsbn,
|
|
4986
|
+
description: "ISBN for iBook version",
|
|
4987
|
+
format: TagFormat.plainText
|
|
4988
|
+
},
|
|
4989
|
+
{
|
|
4990
|
+
key: ConfigKey.property_bookAuthor,
|
|
4991
|
+
description: "Author of the book",
|
|
4992
|
+
format: TagFormat.plainText
|
|
4993
|
+
},
|
|
4994
|
+
{
|
|
4995
|
+
key: ConfigKey.property_bookType,
|
|
4996
|
+
description: "Type of the book",
|
|
4997
|
+
format: TagFormat.plainText
|
|
4998
|
+
},
|
|
4999
|
+
{
|
|
5000
|
+
key: ConfigKey.property_bookBindingType,
|
|
5001
|
+
description: "Binding type of the book",
|
|
5002
|
+
format: TagFormat.plainText
|
|
5003
|
+
},
|
|
5004
|
+
{
|
|
5005
|
+
key: ConfigKey.property_bookNumberOfPages,
|
|
5006
|
+
description: "Number of pages in the book",
|
|
5007
|
+
format: TagFormat.plainText
|
|
5008
|
+
},
|
|
5009
|
+
{
|
|
5010
|
+
key: ConfigKey.property_bookRating,
|
|
5011
|
+
description: "Rating of the book",
|
|
5012
|
+
format: TagFormat.plainText
|
|
5013
|
+
},
|
|
5014
|
+
{
|
|
5015
|
+
key: ConfigKey.property_bookSeriesTitle,
|
|
5016
|
+
description: "Title of the book series",
|
|
5017
|
+
format: TagFormat.plainText
|
|
5018
|
+
},
|
|
5019
|
+
{
|
|
5020
|
+
key: ConfigKey.property_bookSeriesId,
|
|
5021
|
+
description: "ID of the book series",
|
|
5022
|
+
format: TagFormat.plainText
|
|
5023
|
+
},
|
|
5024
|
+
{
|
|
5025
|
+
key: ConfigKey.property_bookSeriesNumber,
|
|
5026
|
+
description: "Number in the book series",
|
|
5027
|
+
format: TagFormat.plainText
|
|
5028
|
+
},
|
|
5029
|
+
{
|
|
5030
|
+
key: ConfigKey.property_bookLanguage,
|
|
5031
|
+
description: "Language of the book",
|
|
5032
|
+
format: TagFormat.plainText
|
|
5033
|
+
},
|
|
5034
|
+
{
|
|
5035
|
+
key: ConfigKey.property_bookPublishingDate,
|
|
5036
|
+
description: "Publishing date of the book",
|
|
5037
|
+
format: TagFormat.plainText
|
|
5038
|
+
},
|
|
5039
|
+
{
|
|
5040
|
+
key: ConfigKey.property_bookPublisher,
|
|
5041
|
+
description: "Publisher of the book",
|
|
5042
|
+
format: TagFormat.plainText
|
|
5043
|
+
},
|
|
5044
|
+
{
|
|
5045
|
+
key: ConfigKey.property_bookTranslator,
|
|
5046
|
+
description: "Translator of the book",
|
|
5047
|
+
format: TagFormat.plainText
|
|
5048
|
+
},
|
|
5049
|
+
{
|
|
5050
|
+
key: ConfigKey.property_bookOriginalTitle,
|
|
5051
|
+
description: "Original title of the book",
|
|
5052
|
+
format: TagFormat.plainText
|
|
5053
|
+
},
|
|
5054
|
+
{
|
|
5055
|
+
key: ConfigKey.property_gmbExternalShop,
|
|
5056
|
+
description: "External shop identifier",
|
|
5057
|
+
format: TagFormat.plainText
|
|
5058
|
+
},
|
|
5059
|
+
{
|
|
5060
|
+
key: ConfigKey.property_gmbExternalShopItems,
|
|
5061
|
+
description: "Array of external shop items",
|
|
5062
|
+
format: TagFormat.plainText,
|
|
5063
|
+
maxCount: Count.infinity
|
|
5064
|
+
},
|
|
5065
|
+
{
|
|
5066
|
+
key: ConfigKey.group_imageSource,
|
|
5067
|
+
description: "Image source chain"
|
|
5068
|
+
},
|
|
5069
|
+
{
|
|
5070
|
+
key: ConfigKey.group_previewImages,
|
|
5071
|
+
description: "Array of preview images for the catalog item",
|
|
5072
|
+
maxCount: Count.infinity
|
|
5073
|
+
},
|
|
5074
|
+
{
|
|
5075
|
+
key: ConfigKey.group_previewVideos,
|
|
5076
|
+
description: "Array of preview videos for the catalog item",
|
|
5077
|
+
maxCount: Count.infinity
|
|
5078
|
+
}
|
|
5079
|
+
],
|
|
5080
|
+
rootExampleType: ExampleType.string
|
|
5081
|
+
},
|
|
4562
5082
|
[BitType.callToAction]: {
|
|
4563
5083
|
since: "1.15.0",
|
|
4564
5084
|
baseBitType: BitType._standard,
|
|
@@ -6642,17 +7162,30 @@ var BITS = {
|
|
|
6642
7162
|
description: "Extractor configuration bit, used to configure extractors in articles or books",
|
|
6643
7163
|
textFormatDefault: TextFormat.plainText
|
|
6644
7164
|
},
|
|
6645
|
-
[BitType.
|
|
7165
|
+
[BitType.extractorImages]: {
|
|
6646
7166
|
since: "4.3.0",
|
|
6647
|
-
baseBitType: BitType.
|
|
6648
|
-
description: "Extractor
|
|
7167
|
+
baseBitType: BitType._standard,
|
|
7168
|
+
description: "Extractor images bit, used for images extracted from PDFs",
|
|
7169
|
+
tags: [
|
|
7170
|
+
{
|
|
7171
|
+
key: ConfigKey.group_resourceBitTags,
|
|
7172
|
+
description: "Resource bit tags for logo grave images, used to define additional properties"
|
|
7173
|
+
},
|
|
7174
|
+
{
|
|
7175
|
+
// Image resource
|
|
7176
|
+
key: ConfigKey.group_resourceImage,
|
|
7177
|
+
description: "Resource image tags for logo grave images, used to attach images",
|
|
7178
|
+
minCount: 1,
|
|
7179
|
+
maxCount: Count.infinity
|
|
7180
|
+
}
|
|
7181
|
+
],
|
|
7182
|
+
resourceAttachmentAllowed: false,
|
|
6649
7183
|
textFormatDefault: TextFormat.plainText
|
|
6650
7184
|
},
|
|
6651
|
-
[BitType.
|
|
7185
|
+
[BitType.extractorImagesCollapsible]: {
|
|
6652
7186
|
since: "4.3.0",
|
|
6653
|
-
baseBitType: BitType.
|
|
6654
|
-
description: "Collapsible extractor
|
|
6655
|
-
textFormatDefault: TextFormat.plainText
|
|
7187
|
+
baseBitType: BitType.extractorImages,
|
|
7188
|
+
description: "Collapsible extractor images bit, used for images extracted from PDFs"
|
|
6656
7189
|
},
|
|
6657
7190
|
[BitType.extractorInformation]: {
|
|
6658
7191
|
since: "3.8.0",
|
|
@@ -6789,9 +7322,34 @@ var BITS = {
|
|
|
6789
7322
|
{
|
|
6790
7323
|
key: ConfigKey.property_buttonCaption,
|
|
6791
7324
|
description: "Caption for the button, used to define the text displayed on the button"
|
|
7325
|
+
},
|
|
7326
|
+
{
|
|
7327
|
+
key: ConfigKey.property_authorFullName,
|
|
7328
|
+
description: "Full name of the author",
|
|
7329
|
+
format: TagFormat.plainText
|
|
7330
|
+
},
|
|
7331
|
+
{
|
|
7332
|
+
key: ConfigKey.property_authorPseudonym,
|
|
7333
|
+
description: "A pseudonym of the author, if any",
|
|
7334
|
+
format: TagFormat.plainText
|
|
7335
|
+
},
|
|
7336
|
+
{
|
|
7337
|
+
key: ConfigKey.property_authorTitle,
|
|
7338
|
+
description: 'The title of the author, e.g. "Dr.", "Prof.", etc.',
|
|
7339
|
+
format: TagFormat.plainText
|
|
7340
|
+
},
|
|
7341
|
+
{
|
|
7342
|
+
key: ConfigKey.property_authorJobTitle,
|
|
7343
|
+
description: 'The job title of the author, e.g. "Software Engineer", "Professor", etc.',
|
|
7344
|
+
format: TagFormat.plainText
|
|
6792
7345
|
}
|
|
6793
7346
|
]
|
|
6794
7347
|
},
|
|
7348
|
+
[BitType.openBookChapter]: {
|
|
7349
|
+
since: "4.16.0",
|
|
7350
|
+
baseBitType: BitType.pageOpenBook,
|
|
7351
|
+
description: "Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"
|
|
7352
|
+
},
|
|
6795
7353
|
[BitType.pageOpenBookList]: {
|
|
6796
7354
|
since: "2.1.0",
|
|
6797
7355
|
baseBitType: BitType.article,
|
|
@@ -8134,6 +8692,18 @@ var BITS = {
|
|
|
8134
8692
|
}
|
|
8135
8693
|
]
|
|
8136
8694
|
},
|
|
8695
|
+
[BitType.platformBrandTarget]: {
|
|
8696
|
+
since: "4.15.0",
|
|
8697
|
+
baseBitType: BitType._standard,
|
|
8698
|
+
description: "Platform brand target bit, used to define the brand target for publishing",
|
|
8699
|
+
tags: [
|
|
8700
|
+
{
|
|
8701
|
+
key: ConfigKey.property_platformBrandTarget,
|
|
8702
|
+
description: 'The platform brand target (typically "light", "dark" or "none")',
|
|
8703
|
+
format: TagFormat.plainText
|
|
8704
|
+
}
|
|
8705
|
+
]
|
|
8706
|
+
},
|
|
8137
8707
|
[BitType.platformHeader]: {
|
|
8138
8708
|
since: "4.12.0",
|
|
8139
8709
|
baseBitType: BitType._standard,
|
|
@@ -9619,7 +10189,7 @@ var instance2 = new Config();
|
|
|
9619
10189
|
// src/generated/package_info.ts
|
|
9620
10190
|
var PACKAGE_INFO = {
|
|
9621
10191
|
"name": "@gmb/bitmark-parser-generator",
|
|
9622
|
-
"version": "4.
|
|
10192
|
+
"version": "4.16.0",
|
|
9623
10193
|
"author": "Get More Brain Ltd",
|
|
9624
10194
|
"license": "ISC",
|
|
9625
10195
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -9994,6 +10564,14 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9994
10564
|
audioLink: "audioLink",
|
|
9995
10565
|
author: "author",
|
|
9996
10566
|
authorValue: "authorValue",
|
|
10567
|
+
authorFullName: "authorFullName",
|
|
10568
|
+
authorFullNameValue: "authorFullNameValue",
|
|
10569
|
+
authorJobTitle: "authorJobTitle",
|
|
10570
|
+
authorJobTitleValue: "authorJobTitleValue",
|
|
10571
|
+
authorPseudonym: "authorPseudonym",
|
|
10572
|
+
authorPseudonymValue: "authorPseudonymValue",
|
|
10573
|
+
authorTitle: "authorTitle",
|
|
10574
|
+
authorTitleValue: "authorTitleValue",
|
|
9997
10575
|
availableClassifications: "availableClassifications",
|
|
9998
10576
|
availableClassificationsValue: "availableClassificationsValue",
|
|
9999
10577
|
avatarImage: "avatarImage",
|
|
@@ -10024,8 +10602,22 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10024
10602
|
book: "book",
|
|
10025
10603
|
bookAlias: "bookAlias",
|
|
10026
10604
|
bookAliasValue: "bookAliasValue",
|
|
10605
|
+
bookAuthor: "bookAuthor",
|
|
10606
|
+
bookBindingType: "bookBindingType",
|
|
10027
10607
|
bookDiff: "bookDiff",
|
|
10028
10608
|
bookDiffValue: "bookDiffValue",
|
|
10609
|
+
bookIsbn: "bookIsbn",
|
|
10610
|
+
bookLanguage: "bookLanguage",
|
|
10611
|
+
bookNumberOfPages: "bookNumberOfPages",
|
|
10612
|
+
bookOriginalTitle: "bookOriginalTitle",
|
|
10613
|
+
bookPublisher: "bookPublisher",
|
|
10614
|
+
bookPublishingDate: "bookPublishingDate",
|
|
10615
|
+
bookRating: "bookRating",
|
|
10616
|
+
bookSeriesId: "bookSeriesId",
|
|
10617
|
+
bookSeriesNumber: "bookSeriesNumber",
|
|
10618
|
+
bookSeriesTitle: "bookSeriesTitle",
|
|
10619
|
+
bookTranslator: "bookTranslator",
|
|
10620
|
+
bookType: "bookType",
|
|
10029
10621
|
bookValue: "bookValue",
|
|
10030
10622
|
bot: "bot",
|
|
10031
10623
|
botResponses: "botResponses",
|
|
@@ -10083,9 +10675,12 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10083
10675
|
coverColorValue: "coverColorValue",
|
|
10084
10676
|
coverImage: "coverImage",
|
|
10085
10677
|
coverImageValue: "coverImageValue",
|
|
10678
|
+
currency: "currency",
|
|
10086
10679
|
customerExternalId: "customerExternalId",
|
|
10087
10680
|
customerId: "customerId",
|
|
10088
10681
|
customerIdValue: "customerIdValue",
|
|
10682
|
+
customerProductId: "customerProductId",
|
|
10683
|
+
customerProductShopLink: "customerProductShopLink",
|
|
10089
10684
|
data: "data",
|
|
10090
10685
|
dataValue: "dataValue",
|
|
10091
10686
|
dataValueValue: "dataValueValue",
|
|
@@ -10160,6 +10755,8 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10160
10755
|
fullName: "fullName",
|
|
10161
10756
|
fullNameValue: "fullNameValue",
|
|
10162
10757
|
gap: "gap",
|
|
10758
|
+
gmbExternalShop: "gmbExternalShop",
|
|
10759
|
+
gmbExternalShopItems: "gmbExternalShopItems",
|
|
10163
10760
|
groupTag: "groupTag",
|
|
10164
10761
|
groupTagValue: "groupTagValue",
|
|
10165
10762
|
handInAcceptFileType: "handInAcceptFileType",
|
|
@@ -10267,11 +10864,14 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10267
10864
|
list: "list",
|
|
10268
10865
|
listItemIndent: "listItemIndent",
|
|
10269
10866
|
listItemIndentValue: "listItemIndentValue",
|
|
10867
|
+
listPrice: "listPrice",
|
|
10270
10868
|
listValue: "listValue",
|
|
10271
10869
|
location: "location",
|
|
10272
10870
|
locationValue: "locationValue",
|
|
10273
10871
|
machineTranslated: "machineTranslated",
|
|
10274
10872
|
machineTranslatedValue: "machineTranslatedValue",
|
|
10873
|
+
spansPageBreak: "spansPageBreak",
|
|
10874
|
+
spansPageBreakValue: "spansPageBreakValue",
|
|
10275
10875
|
mailingList: "mailingList",
|
|
10276
10876
|
marginNumber: "marginNumber",
|
|
10277
10877
|
marginNumberValue: "marginNumberValue",
|
|
@@ -10313,6 +10913,8 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10313
10913
|
partialAnswerValue: "partialAnswerValue",
|
|
10314
10914
|
path: "path",
|
|
10315
10915
|
pathValue: "pathValue",
|
|
10916
|
+
platformBrandTarget: "platformBrandTarget",
|
|
10917
|
+
platformBrandTargetValue: "platformBrandTargetValue",
|
|
10316
10918
|
platformName: "platformName",
|
|
10317
10919
|
platformNameValue: "platformNameValue",
|
|
10318
10920
|
platformIcon: "platformIcon",
|
|
@@ -10352,6 +10954,10 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10352
10954
|
posterImageValue: "posterImageValue",
|
|
10353
10955
|
postfix: "postfix",
|
|
10354
10956
|
prefix: "prefix",
|
|
10957
|
+
previewImage: "previewImage",
|
|
10958
|
+
previewImageValue: "previewImageValue",
|
|
10959
|
+
previewVideo: "previewVideo",
|
|
10960
|
+
previewVideoValue: "previewVideoValue",
|
|
10355
10961
|
processHandIn: "processHandIn",
|
|
10356
10962
|
processHandInLocation: "processHandInLocation",
|
|
10357
10963
|
processHandInLocationValue: "processHandInLocationValue",
|
|
@@ -10491,6 +11097,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10491
11097
|
subject: "subject",
|
|
10492
11098
|
subjectValue: "subjectValue",
|
|
10493
11099
|
subtitle: "subtitle",
|
|
11100
|
+
subtitleValue: "subtitleValue",
|
|
10494
11101
|
subtype: "subtype",
|
|
10495
11102
|
subtypeValue: "subtypeValue",
|
|
10496
11103
|
table: "table",
|
|
@@ -10539,6 +11146,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10539
11146
|
thumbnails: "thumbnails",
|
|
10540
11147
|
thumbnailsValue: "thumbnailsValue",
|
|
10541
11148
|
title: "title",
|
|
11149
|
+
titleValue: "titleValue",
|
|
10542
11150
|
titleString: "titleString",
|
|
10543
11151
|
toc: "toc",
|
|
10544
11152
|
tocContent: "tocContent",
|
|
@@ -11052,22 +11660,22 @@ var DeprecatedTextFormat = (0, import_superenum23.superenum)({
|
|
|
11052
11660
|
// src/parser/json/TableUtils.ts
|
|
11053
11661
|
function isTableBasicFormat(table) {
|
|
11054
11662
|
const t = table;
|
|
11055
|
-
return !!(t.columns || t.data) && !(t.
|
|
11663
|
+
return !!(t.columns || t.data) && !(t.header || t.body || t.footer);
|
|
11056
11664
|
}
|
|
11057
11665
|
function isTableExtendedFormat(table) {
|
|
11058
11666
|
const t = table;
|
|
11059
|
-
return !!(t.
|
|
11667
|
+
return !!(t.header || t.body || t.footer);
|
|
11060
11668
|
}
|
|
11061
11669
|
function isMixedTableFormat(table) {
|
|
11062
11670
|
const t = table;
|
|
11063
11671
|
const hasOld = !!(t.columns || t.data);
|
|
11064
|
-
const hasNew = !!(t.
|
|
11672
|
+
const hasNew = !!(t.header || t.body || t.footer);
|
|
11065
11673
|
return hasOld && hasNew;
|
|
11066
11674
|
}
|
|
11067
11675
|
function convertBasicToExtendedTableFormat(table) {
|
|
11068
11676
|
const tableExtended = {};
|
|
11069
11677
|
if (table.columns && table.columns.length > 0) {
|
|
11070
|
-
tableExtended.
|
|
11678
|
+
tableExtended.header = {
|
|
11071
11679
|
rows: [
|
|
11072
11680
|
{
|
|
11073
11681
|
cells: table.columns.map((col) => ({
|
|
@@ -11098,7 +11706,7 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
11098
11706
|
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
11099
11707
|
};
|
|
11100
11708
|
const dataRows = [];
|
|
11101
|
-
const headRows = tableExtended.
|
|
11709
|
+
const headRows = tableExtended.header?.rows ?? [];
|
|
11102
11710
|
if (headRows.length > 0) {
|
|
11103
11711
|
const primaryHeader = extractRowCells(headRows[0]);
|
|
11104
11712
|
if (primaryHeader.length > 0) {
|
|
@@ -11124,7 +11732,7 @@ function convertExtendedToBasicTableFormat(tableExtended) {
|
|
|
11124
11732
|
});
|
|
11125
11733
|
};
|
|
11126
11734
|
appendSectionRows(tableExtended.body);
|
|
11127
|
-
appendSectionRows(tableExtended.
|
|
11735
|
+
appendSectionRows(tableExtended.footer);
|
|
11128
11736
|
if (dataRows.length > 0) {
|
|
11129
11737
|
table.data = dataRows;
|
|
11130
11738
|
}
|
|
@@ -21966,6 +22574,8 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
21966
22574
|
case ResourceType.platformIcon:
|
|
21967
22575
|
case ResourceType.platformLogo:
|
|
21968
22576
|
case ResourceType.platformBackgroundImage:
|
|
22577
|
+
case ResourceType.previewImage:
|
|
22578
|
+
case ResourceType.coverImage:
|
|
21969
22579
|
node = this.imageResource(context, finalData, type);
|
|
21970
22580
|
break;
|
|
21971
22581
|
// case ResourceType.imageResponsive: {
|
|
@@ -21998,6 +22608,7 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
21998
22608
|
node = this.audioLinkResource(context, finalData);
|
|
21999
22609
|
break;
|
|
22000
22610
|
case ResourceType.video:
|
|
22611
|
+
case ResourceType.previewVideo:
|
|
22001
22612
|
node = this.videoResource(context, finalData);
|
|
22002
22613
|
break;
|
|
22003
22614
|
case ResourceType.videoEmbed:
|
|
@@ -22084,7 +22695,8 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
22084
22695
|
BitType.imageSeparator,
|
|
22085
22696
|
BitType.pageBanner,
|
|
22086
22697
|
BitType.imagesLogoGrave,
|
|
22087
|
-
BitType.prototypeImages
|
|
22698
|
+
BitType.prototypeImages,
|
|
22699
|
+
BitType.extractorImages
|
|
22088
22700
|
])) {
|
|
22089
22701
|
zoomDisabledDefault = true;
|
|
22090
22702
|
}
|
|
@@ -23035,6 +23647,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23035
23647
|
data.machineTranslated,
|
|
23036
23648
|
options
|
|
23037
23649
|
),
|
|
23650
|
+
spansPageBreak: this.toAstProperty(
|
|
23651
|
+
bitType,
|
|
23652
|
+
ConfigKey.property_spansPageBreak,
|
|
23653
|
+
data.spansPageBreak,
|
|
23654
|
+
options
|
|
23655
|
+
),
|
|
23038
23656
|
searchIndex: this.toAstProperty(
|
|
23039
23657
|
bitType,
|
|
23040
23658
|
ConfigKey.property_searchIndex,
|
|
@@ -23169,12 +23787,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23169
23787
|
subtype: this.toAstProperty(bitType, ConfigKey.property_subtype, data.subtype, options),
|
|
23170
23788
|
bookAlias: this.toAstProperty(bitType, ConfigKey.property_bookAlias, data.bookAlias, options),
|
|
23171
23789
|
bookDiff: this.toAstProperty(bitType, ConfigKey.property_bookDiff, data.bookDiff, options),
|
|
23172
|
-
coverImage: this.toAstProperty(
|
|
23790
|
+
coverImage: typeof data.coverImage === "string" || Array.isArray(data.coverImage) ? this.toAstProperty(
|
|
23173
23791
|
bitType,
|
|
23174
23792
|
ConfigKey.property_coverImage,
|
|
23175
|
-
data.coverImage,
|
|
23793
|
+
instance4.asArray(data.coverImage),
|
|
23176
23794
|
options
|
|
23177
|
-
),
|
|
23795
|
+
) : this.toImageResource(context, data.coverImage),
|
|
23178
23796
|
coverColor: this.toAstProperty(
|
|
23179
23797
|
bitType,
|
|
23180
23798
|
ConfigKey.property_coverColor,
|
|
@@ -23229,6 +23847,93 @@ var Builder = class extends BaseBuilder {
|
|
|
23229
23847
|
data.chatWithBookBrainKey,
|
|
23230
23848
|
options
|
|
23231
23849
|
),
|
|
23850
|
+
currency: this.toAstProperty(bitType, ConfigKey.property_currency, data.currency, options),
|
|
23851
|
+
bookIsbn: this.toAstProperty(bitType, ConfigKey.property_bookIsbn, data.bookIsbn, options),
|
|
23852
|
+
bookAuthor: this.toAstProperty(
|
|
23853
|
+
bitType,
|
|
23854
|
+
ConfigKey.property_bookAuthor,
|
|
23855
|
+
data.bookAuthor,
|
|
23856
|
+
options
|
|
23857
|
+
),
|
|
23858
|
+
bookType: this.toAstProperty(bitType, ConfigKey.property_bookType, data.bookType, options),
|
|
23859
|
+
bookBindingType: this.toAstProperty(
|
|
23860
|
+
bitType,
|
|
23861
|
+
ConfigKey.property_bookBindingType,
|
|
23862
|
+
data.bookBindingType,
|
|
23863
|
+
options
|
|
23864
|
+
),
|
|
23865
|
+
bookNumberOfPages: this.toAstProperty(
|
|
23866
|
+
bitType,
|
|
23867
|
+
ConfigKey.property_bookNumberOfPages,
|
|
23868
|
+
data.bookNumberOfPages,
|
|
23869
|
+
options
|
|
23870
|
+
),
|
|
23871
|
+
bookRating: this.toAstProperty(
|
|
23872
|
+
bitType,
|
|
23873
|
+
ConfigKey.property_bookRating,
|
|
23874
|
+
data.bookRating,
|
|
23875
|
+
options
|
|
23876
|
+
),
|
|
23877
|
+
bookSeriesTitle: this.toAstProperty(
|
|
23878
|
+
bitType,
|
|
23879
|
+
ConfigKey.property_bookSeriesTitle,
|
|
23880
|
+
data.bookSeriesTitle,
|
|
23881
|
+
options
|
|
23882
|
+
),
|
|
23883
|
+
bookSeriesId: this.toAstProperty(
|
|
23884
|
+
bitType,
|
|
23885
|
+
ConfigKey.property_bookSeriesId,
|
|
23886
|
+
data.bookSeriesId,
|
|
23887
|
+
options
|
|
23888
|
+
),
|
|
23889
|
+
bookSeriesNumber: this.toAstProperty(
|
|
23890
|
+
bitType,
|
|
23891
|
+
ConfigKey.property_bookSeriesNumber,
|
|
23892
|
+
data.bookSeriesNumber,
|
|
23893
|
+
options
|
|
23894
|
+
),
|
|
23895
|
+
bookLanguage: this.toAstProperty(
|
|
23896
|
+
bitType,
|
|
23897
|
+
ConfigKey.property_bookLanguage,
|
|
23898
|
+
data.bookLanguage,
|
|
23899
|
+
options
|
|
23900
|
+
),
|
|
23901
|
+
bookPublishingDate: this.toAstProperty(
|
|
23902
|
+
bitType,
|
|
23903
|
+
ConfigKey.property_bookPublishingDate,
|
|
23904
|
+
data.bookPublishingDate,
|
|
23905
|
+
options
|
|
23906
|
+
),
|
|
23907
|
+
bookPublisher: this.toAstProperty(
|
|
23908
|
+
bitType,
|
|
23909
|
+
ConfigKey.property_bookPublisher,
|
|
23910
|
+
data.bookPublisher,
|
|
23911
|
+
options
|
|
23912
|
+
),
|
|
23913
|
+
bookTranslator: this.toAstProperty(
|
|
23914
|
+
bitType,
|
|
23915
|
+
ConfigKey.property_bookTranslator,
|
|
23916
|
+
data.bookTranslator,
|
|
23917
|
+
options
|
|
23918
|
+
),
|
|
23919
|
+
bookOriginalTitle: this.toAstProperty(
|
|
23920
|
+
bitType,
|
|
23921
|
+
ConfigKey.property_bookOriginalTitle,
|
|
23922
|
+
data.bookOriginalTitle,
|
|
23923
|
+
options
|
|
23924
|
+
),
|
|
23925
|
+
gmbExternalShop: this.toAstProperty(
|
|
23926
|
+
bitType,
|
|
23927
|
+
ConfigKey.property_gmbExternalShop,
|
|
23928
|
+
data.gmbExternalShop,
|
|
23929
|
+
options
|
|
23930
|
+
),
|
|
23931
|
+
gmbExternalShopItems: this.toAstProperty(
|
|
23932
|
+
bitType,
|
|
23933
|
+
ConfigKey.property_gmbExternalShopItems,
|
|
23934
|
+
data.gmbExternalShopItems,
|
|
23935
|
+
options
|
|
23936
|
+
),
|
|
23232
23937
|
action: this.toAstProperty(bitType, ConfigKey.property_action, data.action, options),
|
|
23233
23938
|
showInIndex: this.toAstProperty(
|
|
23234
23939
|
bitType,
|
|
@@ -23286,6 +23991,30 @@ var Builder = class extends BaseBuilder {
|
|
|
23286
23991
|
data.allowedBit,
|
|
23287
23992
|
options
|
|
23288
23993
|
),
|
|
23994
|
+
authorFullName: this.toAstProperty(
|
|
23995
|
+
bitType,
|
|
23996
|
+
ConfigKey.property_authorFullName,
|
|
23997
|
+
data.authorFullName,
|
|
23998
|
+
options
|
|
23999
|
+
),
|
|
24000
|
+
authorPseudonym: this.toAstProperty(
|
|
24001
|
+
bitType,
|
|
24002
|
+
ConfigKey.property_authorPseudonym,
|
|
24003
|
+
data.authorPseudonym,
|
|
24004
|
+
options
|
|
24005
|
+
),
|
|
24006
|
+
authorTitle: this.toAstProperty(
|
|
24007
|
+
bitType,
|
|
24008
|
+
ConfigKey.property_authorTitle,
|
|
24009
|
+
data.authorTitle,
|
|
24010
|
+
options
|
|
24011
|
+
),
|
|
24012
|
+
authorJobTitle: this.toAstProperty(
|
|
24013
|
+
bitType,
|
|
24014
|
+
ConfigKey.property_authorJobTitle,
|
|
24015
|
+
data.authorJobTitle,
|
|
24016
|
+
options
|
|
24017
|
+
),
|
|
23289
24018
|
tableFixedHeader: this.toAstProperty(
|
|
23290
24019
|
bitType,
|
|
23291
24020
|
ConfigKey.property_tableFixedHeader,
|
|
@@ -23503,6 +24232,19 @@ var Builder = class extends BaseBuilder {
|
|
|
23503
24232
|
data.content2Buy,
|
|
23504
24233
|
options
|
|
23505
24234
|
),
|
|
24235
|
+
listPrice: this.toAstProperty(bitType, ConfigKey.property_listPrice, data.listPrice, options),
|
|
24236
|
+
customerProductId: this.toAstProperty(
|
|
24237
|
+
bitType,
|
|
24238
|
+
ConfigKey.property_customerProductId,
|
|
24239
|
+
data.customerProductId,
|
|
24240
|
+
options
|
|
24241
|
+
),
|
|
24242
|
+
customerProductShopLink: this.toAstProperty(
|
|
24243
|
+
bitType,
|
|
24244
|
+
ConfigKey.property_customerProductShopLink,
|
|
24245
|
+
data.customerProductShopLink,
|
|
24246
|
+
options
|
|
24247
|
+
),
|
|
23506
24248
|
mailingList: this.toAstProperty(
|
|
23507
24249
|
bitType,
|
|
23508
24250
|
ConfigKey.property_mailingList,
|
|
@@ -23627,6 +24369,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23627
24369
|
options
|
|
23628
24370
|
),
|
|
23629
24371
|
page: this.toAstProperty(bitType, ConfigKey.property_page, data.page, options),
|
|
24372
|
+
platformBrandTarget: this.toAstProperty(
|
|
24373
|
+
bitType,
|
|
24374
|
+
ConfigKey.property_platformBrandTarget,
|
|
24375
|
+
data.platformBrandTarget,
|
|
24376
|
+
options
|
|
24377
|
+
),
|
|
23630
24378
|
platformName: this.toAstProperty(
|
|
23631
24379
|
bitType,
|
|
23632
24380
|
ConfigKey.property_platformName,
|
|
@@ -23797,6 +24545,8 @@ var Builder = class extends BaseBuilder {
|
|
|
23797
24545
|
// Example
|
|
23798
24546
|
...this.toExample(data.__isDefaultExample, data.example),
|
|
23799
24547
|
// Person
|
|
24548
|
+
previewImage: this.toImageResources(context, data.previewImage),
|
|
24549
|
+
previewVideo: this.toVideoResources(context, data.previewVideo),
|
|
23800
24550
|
imagePlaceholder: this.toImageResource(context, data.imagePlaceholder),
|
|
23801
24551
|
resources: instance4.asArray(
|
|
23802
24552
|
this.resourceBuilder.resourceFromResourceJson(context, data.resources)
|
|
@@ -24424,12 +25174,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24424
25174
|
rows
|
|
24425
25175
|
};
|
|
24426
25176
|
};
|
|
24427
|
-
const
|
|
24428
|
-
if (
|
|
25177
|
+
const header = buildSection(nodeTableExtended.header);
|
|
25178
|
+
if (header && header.rows?.length > 0) nodeTableExtended.header = header;
|
|
24429
25179
|
const body = buildSection(nodeTableExtended.body);
|
|
24430
25180
|
if (body && body.rows?.length > 0) nodeTableExtended.body = body;
|
|
24431
|
-
const
|
|
24432
|
-
if (
|
|
25181
|
+
const footer = buildSection(nodeTableExtended.footer);
|
|
25182
|
+
if (footer && footer.rows?.length > 0) nodeTableExtended.footer = footer;
|
|
24433
25183
|
return node;
|
|
24434
25184
|
}
|
|
24435
25185
|
/**
|
|
@@ -25222,6 +25972,36 @@ var Builder = class extends BaseBuilder {
|
|
|
25222
25972
|
this.resourceBuilder.resourceFromResourceDataJson(context, ResourceType.image, data?.image)
|
|
25223
25973
|
);
|
|
25224
25974
|
}
|
|
25975
|
+
toImageResources(context, data) {
|
|
25976
|
+
const arr = instance4.asArray(data);
|
|
25977
|
+
const results = [];
|
|
25978
|
+
if (arr && arr.length > 0) {
|
|
25979
|
+
for (const item of arr) {
|
|
25980
|
+
const res = this.resourceBuilder.resourceFromResourceDataJson(
|
|
25981
|
+
context,
|
|
25982
|
+
ResourceType.image,
|
|
25983
|
+
item.image
|
|
25984
|
+
);
|
|
25985
|
+
results.push(res);
|
|
25986
|
+
}
|
|
25987
|
+
}
|
|
25988
|
+
return results;
|
|
25989
|
+
}
|
|
25990
|
+
toVideoResources(context, data) {
|
|
25991
|
+
const arr = instance4.asArray(data);
|
|
25992
|
+
const results = [];
|
|
25993
|
+
if (arr && arr.length > 0) {
|
|
25994
|
+
for (const item of arr) {
|
|
25995
|
+
const res = this.resourceBuilder.resourceFromResourceDataJson(
|
|
25996
|
+
context,
|
|
25997
|
+
ResourceType.video,
|
|
25998
|
+
item.video
|
|
25999
|
+
);
|
|
26000
|
+
results.push(res);
|
|
26001
|
+
}
|
|
26002
|
+
}
|
|
26003
|
+
return results;
|
|
26004
|
+
}
|
|
25225
26005
|
//
|
|
25226
26006
|
// Private
|
|
25227
26007
|
//
|
|
@@ -26624,9 +27404,9 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26624
27404
|
writeAdvancedTable(table) {
|
|
26625
27405
|
const normalized = normalizeTableFormat(BitType.tableExtended, table);
|
|
26626
27406
|
const sections = [
|
|
26627
|
-
{ key: "
|
|
26628
|
-
{ key: "
|
|
26629
|
-
{ key: "
|
|
27407
|
+
{ key: "header", qualifier: "table-header", section: normalized.header },
|
|
27408
|
+
{ key: "body", qualifier: void 0, section: normalized.body },
|
|
27409
|
+
{ key: "footer", qualifier: "table-footer", section: normalized.footer }
|
|
26630
27410
|
];
|
|
26631
27411
|
let rowCount = 0;
|
|
26632
27412
|
for (const { key, qualifier, section } of sections) {
|
|
@@ -26654,7 +27434,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26654
27434
|
}
|
|
26655
27435
|
}
|
|
26656
27436
|
writeTableCell(cell, section) {
|
|
26657
|
-
const defaultCellType = section === "
|
|
27437
|
+
const defaultCellType = section === "body" ? "td" : "th";
|
|
26658
27438
|
const cellType = cell.title ? "th" : "td";
|
|
26659
27439
|
if (cellType !== defaultCellType) {
|
|
26660
27440
|
this.writeTableCellProperty("tableCellType", cellType);
|
|
@@ -26910,6 +27690,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26910
27690
|
this.writePropertyStyleResource(node.key, resource);
|
|
26911
27691
|
return true;
|
|
26912
27692
|
}
|
|
27693
|
+
// bitmarkAst -> bits -> bitsValue -> previewImageValue
|
|
27694
|
+
enter_previewImageValue(node, _route) {
|
|
27695
|
+
const resource = node.value;
|
|
27696
|
+
this.writeNL();
|
|
27697
|
+
this.writePropertyStyleResource("previewImage", resource);
|
|
27698
|
+
return true;
|
|
27699
|
+
}
|
|
27700
|
+
// bitmarkAst -> bits -> bitsValue -> previewVideoValue
|
|
27701
|
+
enter_previewVideoValue(node, _route) {
|
|
27702
|
+
const resource = node.value;
|
|
27703
|
+
this.writeNL();
|
|
27704
|
+
this.writePropertyStyleResource("previewVideo", resource);
|
|
27705
|
+
return true;
|
|
27706
|
+
}
|
|
26913
27707
|
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
26914
27708
|
enter_platformIcon(node, _route) {
|
|
26915
27709
|
const resource = node.value;
|
|
@@ -26931,6 +27725,59 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26931
27725
|
this.writePropertyStyleResource(node.key, resource);
|
|
26932
27726
|
return true;
|
|
26933
27727
|
}
|
|
27728
|
+
// bitmarkAst -> bits -> bitsValue -> coverImage (when it's a resource object or property array)
|
|
27729
|
+
enter_coverImage(node, route) {
|
|
27730
|
+
const value = node.value;
|
|
27731
|
+
if (value && typeof value === "object" && !Array.isArray(value) && "type" in value) {
|
|
27732
|
+
const resource = value;
|
|
27733
|
+
this.writeNL();
|
|
27734
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
27735
|
+
return true;
|
|
27736
|
+
}
|
|
27737
|
+
if (Array.isArray(value)) {
|
|
27738
|
+
if (value == null) return true;
|
|
27739
|
+
const parent = this.getParentNode(route);
|
|
27740
|
+
if (parent?.key !== NodeType.bitsValue) return true;
|
|
27741
|
+
const bitType = this.getBitType(route);
|
|
27742
|
+
if (!bitType) return true;
|
|
27743
|
+
const config = instance2.getBitConfig(bitType);
|
|
27744
|
+
const propertyConfig = instance2.getTagConfigForTag(
|
|
27745
|
+
config.tags,
|
|
27746
|
+
ConfigKey.property_coverImage
|
|
27747
|
+
);
|
|
27748
|
+
if (!propertyConfig) return true;
|
|
27749
|
+
this.writeNL_IfNotChain(route);
|
|
27750
|
+
this.writeProperty(propertyConfig.tag, value, route, {
|
|
27751
|
+
format: propertyConfig.format ?? TagFormat.plainText,
|
|
27752
|
+
array: propertyConfig.array ?? false,
|
|
27753
|
+
writeEmpty: true,
|
|
27754
|
+
ignoreFalse: propertyConfig.defaultValue === "false",
|
|
27755
|
+
ignoreTrue: propertyConfig.defaultValue === "true"
|
|
27756
|
+
});
|
|
27757
|
+
}
|
|
27758
|
+
return true;
|
|
27759
|
+
}
|
|
27760
|
+
// bitmarkAst -> bits -> bitsValue -> coverImage (when it's a property string)
|
|
27761
|
+
// This is called when coverImage is a simple string value
|
|
27762
|
+
leaf_coverImage(node, route) {
|
|
27763
|
+
const value = node.value;
|
|
27764
|
+
if (value == null) return;
|
|
27765
|
+
const parent = this.getParentNode(route);
|
|
27766
|
+
if (parent?.key !== NodeType.bitsValue) return;
|
|
27767
|
+
const bitType = this.getBitType(route);
|
|
27768
|
+
if (!bitType) return;
|
|
27769
|
+
const config = instance2.getBitConfig(bitType);
|
|
27770
|
+
const propertyConfig = instance2.getTagConfigForTag(config.tags, ConfigKey.property_coverImage);
|
|
27771
|
+
if (!propertyConfig) return;
|
|
27772
|
+
this.writeNL_IfNotChain(route);
|
|
27773
|
+
this.writeProperty(propertyConfig.tag, node.value, route, {
|
|
27774
|
+
format: propertyConfig.format ?? TagFormat.plainText,
|
|
27775
|
+
array: propertyConfig.array ?? false,
|
|
27776
|
+
writeEmpty: true,
|
|
27777
|
+
ignoreFalse: propertyConfig.defaultValue === "false",
|
|
27778
|
+
ignoreTrue: propertyConfig.defaultValue === "true"
|
|
27779
|
+
});
|
|
27780
|
+
}
|
|
26934
27781
|
exit_imagePlaceholder(_node, _route) {
|
|
26935
27782
|
}
|
|
26936
27783
|
// bitmarkAst -> bits -> bitsValue -> posterImage
|
|
@@ -27357,7 +28204,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27357
28204
|
BitType.imageSeparator,
|
|
27358
28205
|
BitType.pageBanner,
|
|
27359
28206
|
BitType.imagesLogoGrave,
|
|
27360
|
-
BitType.prototypeImages
|
|
28207
|
+
BitType.prototypeImages,
|
|
28208
|
+
BitType.extractorImages
|
|
27361
28209
|
])) {
|
|
27362
28210
|
this.writeProperty("zoomDisabled", node.value, route, {
|
|
27363
28211
|
format: TagFormat.boolean,
|
|
@@ -28515,6 +29363,14 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28515
29363
|
enter_imagePlaceholder(node, route) {
|
|
28516
29364
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28517
29365
|
}
|
|
29366
|
+
// bitmarkAst -> bits -> bitsValue -> previewImage
|
|
29367
|
+
enter_previewImage(node, route) {
|
|
29368
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
29369
|
+
}
|
|
29370
|
+
// bitmarkAst -> bits -> bitsValue -> previewVideo
|
|
29371
|
+
enter_previewVideo(node, route) {
|
|
29372
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
29373
|
+
}
|
|
28518
29374
|
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
28519
29375
|
enter_platformIcon(node, route) {
|
|
28520
29376
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
@@ -28527,6 +29383,12 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28527
29383
|
enter_platformBackgroundImage(node, route) {
|
|
28528
29384
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28529
29385
|
}
|
|
29386
|
+
// bitmarkAst -> bits -> bitsValue -> coverImage
|
|
29387
|
+
enter_coverImage(node, route) {
|
|
29388
|
+
return this.standardHandler(node, route, NodeType.bitsValue, {
|
|
29389
|
+
array: Array.isArray(node.value)
|
|
29390
|
+
});
|
|
29391
|
+
}
|
|
28530
29392
|
// bitmarkAst -> bits -> bitsValue -> resources
|
|
28531
29393
|
enter_resources(node, route) {
|
|
28532
29394
|
const resources = node.value;
|
|
@@ -28565,7 +29427,11 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28565
29427
|
}
|
|
28566
29428
|
resourceJson = wrapper;
|
|
28567
29429
|
}
|
|
28568
|
-
} else if (instance2.isOfBitType(bitType, [
|
|
29430
|
+
} else if (instance2.isOfBitType(bitType, [
|
|
29431
|
+
BitType.imagesLogoGrave,
|
|
29432
|
+
BitType.prototypeImages,
|
|
29433
|
+
BitType.extractorImages
|
|
29434
|
+
])) {
|
|
28569
29435
|
const images = [];
|
|
28570
29436
|
for (const r of resources) {
|
|
28571
29437
|
if (r.type === ResourceType.image) {
|
|
@@ -29142,7 +30008,11 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
29142
30008
|
if (bitJson.resolvedDate == null) bitJson.resolvedDate = "";
|
|
29143
30009
|
if (bitJson.resolvedBy == null) bitJson.resolvedBy = "";
|
|
29144
30010
|
}
|
|
29145
|
-
if (instance2.isOfBitType(bitType, [
|
|
30011
|
+
if (instance2.isOfBitType(bitType, [
|
|
30012
|
+
BitType.imagesLogoGrave,
|
|
30013
|
+
BitType.prototypeImages,
|
|
30014
|
+
BitType.extractorImages
|
|
30015
|
+
])) {
|
|
29146
30016
|
if (bitType === BitType.imagesLogoGrave) {
|
|
29147
30017
|
if (bitJson.logos == null) {
|
|
29148
30018
|
bitJson.logos = [];
|
|
@@ -29198,6 +30068,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
29198
30068
|
if (instance2.isOfBitType(bitType, BitType.platformPath)) {
|
|
29199
30069
|
if (bitJson.path == null) bitJson.path = "";
|
|
29200
30070
|
}
|
|
30071
|
+
if (instance2.isOfBitType(bitType, BitType.platformBrandTarget)) {
|
|
30072
|
+
if (bitJson.platformBrandTarget == null) bitJson.platformBrandTarget = "none";
|
|
30073
|
+
}
|
|
29201
30074
|
if (isTopLevelExample) {
|
|
29202
30075
|
if (bitJson.isExample == null) bitJson.isExample = false;
|
|
29203
30076
|
} else {
|
|
@@ -29570,7 +30443,7 @@ var JsonParser = class {
|
|
|
29570
30443
|
processResources(bitType, resource, images, logos) {
|
|
29571
30444
|
const nodes = [];
|
|
29572
30445
|
if (resource) nodes.push(resource);
|
|
29573
|
-
if (instance2.isOfBitType(bitType, [BitType.prototypeImages])) {
|
|
30446
|
+
if (instance2.isOfBitType(bitType, [BitType.prototypeImages, BitType.extractorImages])) {
|
|
29574
30447
|
if (Array.isArray(images)) {
|
|
29575
30448
|
for (const image of images) {
|
|
29576
30449
|
if (image) nodes.push(image);
|
|
@@ -30510,7 +31383,7 @@ var BitmarkPegParserValidator = class {
|
|
|
30510
31383
|
let tagData = validTypeKeys.get(validTypeKey);
|
|
30511
31384
|
if (!tagData && typeKey === TypeKey.Property) {
|
|
30512
31385
|
const resourceKey = key.replace(/^@/, "&");
|
|
30513
|
-
if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder || resourceKey === ConfigKey.resource_platformIcon || resourceKey === ConfigKey.resource_platformLogo || resourceKey === ConfigKey.resource_platformBackgroundImage) {
|
|
31386
|
+
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) {
|
|
30514
31387
|
tagData = validTypeKeys.get(resourceKey);
|
|
30515
31388
|
if (tagData) {
|
|
30516
31389
|
typeKey = TypeKey.Resource;
|
|
@@ -31780,17 +32653,17 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
|
31780
32653
|
}
|
|
31781
32654
|
function parseTable(context, _bitType, cardSet) {
|
|
31782
32655
|
const sectionRows = {
|
|
31783
|
-
|
|
31784
|
-
|
|
31785
|
-
|
|
32656
|
+
header: [],
|
|
32657
|
+
body: [],
|
|
32658
|
+
footer: []
|
|
31786
32659
|
};
|
|
31787
32660
|
const getNormalizedQualifier = (rawQualifier) => {
|
|
31788
32661
|
if (!rawQualifier) return void 0;
|
|
31789
32662
|
const normalized = rawQualifier.trim().toLowerCase();
|
|
31790
|
-
if (normalized === "
|
|
31791
|
-
|
|
31792
|
-
|
|
31793
|
-
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to
|
|
32663
|
+
if (normalized === "table-header") return "header";
|
|
32664
|
+
if (normalized === "table-body") return "body";
|
|
32665
|
+
if (normalized === "table-footer") return "footer";
|
|
32666
|
+
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to body.`);
|
|
31794
32667
|
return void 0;
|
|
31795
32668
|
};
|
|
31796
32669
|
const isLegacyHeadingRow = (card, cardIndex) => {
|
|
@@ -31827,7 +32700,7 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
31827
32700
|
`Invalid table cell type '${raw}', using default for section '${section}'.`
|
|
31828
32701
|
);
|
|
31829
32702
|
}
|
|
31830
|
-
return section === "
|
|
32703
|
+
return section === "body" ? "td" : "th";
|
|
31831
32704
|
};
|
|
31832
32705
|
const normalizeSpan = (raw, kind) => {
|
|
31833
32706
|
if (raw == null) return 1;
|
|
@@ -31895,7 +32768,7 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
31895
32768
|
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
31896
32769
|
const card = cardSet.cards[cardIdx];
|
|
31897
32770
|
const qualifier = resolveSectionQualifier(card);
|
|
31898
|
-
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "
|
|
32771
|
+
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "header" : "body";
|
|
31899
32772
|
const cells = [];
|
|
31900
32773
|
for (const side of card.sides) {
|
|
31901
32774
|
for (const variant of side.variants) {
|
|
@@ -31907,28 +32780,28 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
31907
32780
|
});
|
|
31908
32781
|
}
|
|
31909
32782
|
const table = {};
|
|
31910
|
-
const hasHeadRows = sectionRows.
|
|
31911
|
-
const hasBodyRows = sectionRows.
|
|
31912
|
-
const hasFootRows = sectionRows.
|
|
32783
|
+
const hasHeadRows = sectionRows.header.length > 0;
|
|
32784
|
+
const hasBodyRows = sectionRows.body.length > 0;
|
|
32785
|
+
const hasFootRows = sectionRows.footer.length > 0;
|
|
31913
32786
|
if (hasHeadRows) {
|
|
31914
|
-
table.
|
|
31915
|
-
rows: sectionRows.
|
|
32787
|
+
table.header = {
|
|
32788
|
+
rows: sectionRows.header
|
|
31916
32789
|
};
|
|
31917
32790
|
}
|
|
31918
32791
|
if (hasBodyRows) {
|
|
31919
32792
|
table.body = {
|
|
31920
|
-
rows: sectionRows.
|
|
32793
|
+
rows: sectionRows.body
|
|
31921
32794
|
};
|
|
31922
32795
|
}
|
|
31923
32796
|
if (hasFootRows) {
|
|
31924
|
-
table.
|
|
31925
|
-
rows: sectionRows.
|
|
32797
|
+
table.footer = {
|
|
32798
|
+
rows: sectionRows.footer
|
|
31926
32799
|
};
|
|
31927
32800
|
}
|
|
31928
32801
|
if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
|
|
31929
|
-
table.
|
|
32802
|
+
table.header = { rows: [] };
|
|
31930
32803
|
table.body = { rows: [] };
|
|
31931
|
-
table.
|
|
32804
|
+
table.footer = { rows: [] };
|
|
31932
32805
|
}
|
|
31933
32806
|
return { table };
|
|
31934
32807
|
}
|
|
@@ -32913,8 +33786,19 @@ function resourceContentProcessor(context, _contentDepth, tagsConfig, content, t
|
|
|
32913
33786
|
...tags2
|
|
32914
33787
|
});
|
|
32915
33788
|
if (resource) {
|
|
32916
|
-
if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder || configKey === ConfigKey.resource_platformIcon || configKey === ConfigKey.resource_platformLogo || configKey === ConfigKey.resource_platformBackgroundImage) {
|
|
32917
|
-
if (target.propertyStyleResources)
|
|
33789
|
+
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) {
|
|
33790
|
+
if (target.propertyStyleResources) {
|
|
33791
|
+
if (target.propertyStyleResources[resourceType]) {
|
|
33792
|
+
if (!Array.isArray(target.propertyStyleResources[resourceType])) {
|
|
33793
|
+
target.propertyStyleResources[resourceType] = [
|
|
33794
|
+
target.propertyStyleResources[resourceType]
|
|
33795
|
+
];
|
|
33796
|
+
}
|
|
33797
|
+
target.propertyStyleResources[resourceType].push(resource);
|
|
33798
|
+
} else {
|
|
33799
|
+
target.propertyStyleResources[resourceType] = resource;
|
|
33800
|
+
}
|
|
33801
|
+
}
|
|
32918
33802
|
} else {
|
|
32919
33803
|
resources.push(resource);
|
|
32920
33804
|
}
|
|
@@ -37570,7 +38454,11 @@ var ConfigBuilder = class {
|
|
|
37570
38454
|
const typeOrder = tagEntriesTypeOrder.indexOf(typeA) - tagEntriesTypeOrder.indexOf(typeB);
|
|
37571
38455
|
return typeOrder;
|
|
37572
38456
|
});
|
|
37573
|
-
if (b.baseBitType)
|
|
38457
|
+
if (b.baseBitType)
|
|
38458
|
+
inherits.push({
|
|
38459
|
+
type: "bit",
|
|
38460
|
+
name: b.baseBitType
|
|
38461
|
+
});
|
|
37574
38462
|
for (const [_tagKey, tag] of tagEntries) {
|
|
37575
38463
|
const tagName = tag.key;
|
|
37576
38464
|
let format = "";
|
|
@@ -37615,8 +38503,12 @@ var ConfigBuilder = class {
|
|
|
37615
38503
|
} else if (tagType === BitTagConfigKeyType.group) {
|
|
37616
38504
|
let k = tag.key;
|
|
37617
38505
|
if (k.startsWith("group_")) k = k.substring(6);
|
|
37618
|
-
k =
|
|
37619
|
-
|
|
38506
|
+
k = /*'_' +*/
|
|
38507
|
+
stringUtils.camelToKebab(k);
|
|
38508
|
+
inherits.push({
|
|
38509
|
+
type: "group",
|
|
38510
|
+
name: k
|
|
38511
|
+
});
|
|
37620
38512
|
continue;
|
|
37621
38513
|
}
|
|
37622
38514
|
const t = {
|
|
@@ -37724,7 +38616,10 @@ var ConfigBuilder = class {
|
|
|
37724
38616
|
if (k.startsWith("group_")) k = k.substring(6);
|
|
37725
38617
|
k = /*'_' +*/
|
|
37726
38618
|
stringUtils.camelToKebab(k);
|
|
37727
|
-
inherits.push(
|
|
38619
|
+
inherits.push({
|
|
38620
|
+
type: "group",
|
|
38621
|
+
name: k
|
|
38622
|
+
});
|
|
37728
38623
|
continue;
|
|
37729
38624
|
}
|
|
37730
38625
|
const t = {
|
|
@@ -37892,7 +38787,10 @@ var ConfigBuilder = class {
|
|
|
37892
38787
|
let k = tag.configKey;
|
|
37893
38788
|
if (k.startsWith("group_")) k = k.substring(6);
|
|
37894
38789
|
k = "_" + k;
|
|
37895
|
-
inherits.push(
|
|
38790
|
+
inherits.push({
|
|
38791
|
+
type: "group",
|
|
38792
|
+
name: k
|
|
38793
|
+
});
|
|
37896
38794
|
continue;
|
|
37897
38795
|
}
|
|
37898
38796
|
const t = {
|