@gmb/bitmark-parser-generator 5.8.0 → 5.9.1
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 +5 -5
- package/dist/browser/cjs/index.cjs +71 -28
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +10 -0
- package/dist/browser/esm/index.d.ts +10 -0
- package/dist/browser/esm/index.js +71 -28
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +71 -28
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +71 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +71 -28
- package/dist/index.js.map +1 -1
- package/package.json +16 -16
package/dist/cli/main.js
CHANGED
|
@@ -1108,6 +1108,7 @@ var propertyKeys = {
|
|
|
1108
1108
|
property_aiGenerated: "@aiGenerated",
|
|
1109
1109
|
property_allowedBit: "@allowedBit",
|
|
1110
1110
|
property_allowPrint: "@allowPrint",
|
|
1111
|
+
property_allowPrintEnforceSpaceConfiguration: "@allowPrintEnforceSpaceConfiguration",
|
|
1111
1112
|
property_allowSubtitles: "@allowSubtitles",
|
|
1112
1113
|
property_alt: "@alt",
|
|
1113
1114
|
property_altLangTag: "@altLangTag",
|
|
@@ -1242,6 +1243,7 @@ var propertyKeys = {
|
|
|
1242
1243
|
property_location: "@location",
|
|
1243
1244
|
property_machineTranslated: "@machineTranslated",
|
|
1244
1245
|
property_translationOf: "@translationOf",
|
|
1246
|
+
property_translationOfBook: "@translationOfBook",
|
|
1245
1247
|
property_spansPageBreak: "@spansPageBreak",
|
|
1246
1248
|
property_mailingList: "@mailingList",
|
|
1247
1249
|
property_mark: "@mark",
|
|
@@ -2417,27 +2419,6 @@ var CARDSETS = {
|
|
|
2417
2419
|
]
|
|
2418
2420
|
},
|
|
2419
2421
|
[CardSetConfigKey.table]: {
|
|
2420
|
-
variants: [
|
|
2421
|
-
// Side 1
|
|
2422
|
-
[
|
|
2423
|
-
// Variant 1..N
|
|
2424
|
-
{
|
|
2425
|
-
tags: [
|
|
2426
|
-
{
|
|
2427
|
-
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
2428
|
-
description: "Standard tags for lead, instruction, and hint."
|
|
2429
|
-
},
|
|
2430
|
-
{
|
|
2431
|
-
key: ConfigKey.tag_title,
|
|
2432
|
-
description: "Title of the table."
|
|
2433
|
-
}
|
|
2434
|
-
],
|
|
2435
|
-
repeatCount: Count.infinity
|
|
2436
|
-
}
|
|
2437
|
-
]
|
|
2438
|
-
]
|
|
2439
|
-
},
|
|
2440
|
-
[CardSetConfigKey.tableExtended]: {
|
|
2441
2422
|
variants: [
|
|
2442
2423
|
// Side 1
|
|
2443
2424
|
[
|
|
@@ -3371,6 +3352,11 @@ var GROUPS = {
|
|
|
3371
3352
|
format: TagFormat.plainText,
|
|
3372
3353
|
maxCount: Count.infinity
|
|
3373
3354
|
},
|
|
3355
|
+
{
|
|
3356
|
+
key: ConfigKey.property_translationOfBook,
|
|
3357
|
+
description: "External Id of the translated book",
|
|
3358
|
+
format: TagFormat.plainText
|
|
3359
|
+
},
|
|
3374
3360
|
{
|
|
3375
3361
|
key: ConfigKey.property_duration,
|
|
3376
3362
|
description: "The duration of the book",
|
|
@@ -3397,6 +3383,12 @@ var GROUPS = {
|
|
|
3397
3383
|
format: TagFormat.boolean,
|
|
3398
3384
|
defaultValue: "false"
|
|
3399
3385
|
},
|
|
3386
|
+
{
|
|
3387
|
+
key: ConfigKey.property_allowPrintEnforceSpaceConfiguration,
|
|
3388
|
+
description: "If true, enforces space configuration for printing regardless of the allowPrint setting",
|
|
3389
|
+
format: TagFormat.boolean,
|
|
3390
|
+
defaultValue: "false"
|
|
3391
|
+
},
|
|
3400
3392
|
{
|
|
3401
3393
|
key: ConfigKey.property_hasPrintRestriction,
|
|
3402
3394
|
description: "If true, the book has print restrictions",
|
|
@@ -7792,15 +7784,35 @@ var BITS = {
|
|
|
7792
7784
|
},
|
|
7793
7785
|
[BitType.tableImage]: {
|
|
7794
7786
|
since: "1.5.15",
|
|
7795
|
-
baseBitType: BitType.
|
|
7787
|
+
baseBitType: BitType.table,
|
|
7796
7788
|
description: "Table image bit, used to create images in tables in articles or books",
|
|
7797
7789
|
tags: [
|
|
7798
7790
|
{
|
|
7799
7791
|
key: ConfigKey.property_caption,
|
|
7800
7792
|
description: "Caption for the table image, used to provide a description for the image",
|
|
7801
7793
|
format: TagFormat.bitmarkText
|
|
7794
|
+
},
|
|
7795
|
+
{
|
|
7796
|
+
key: ConfigKey.resource_backgroundWallpaper,
|
|
7797
|
+
description: "Background wallpaper for the image, used to set a background for the image",
|
|
7798
|
+
chain: [
|
|
7799
|
+
{
|
|
7800
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
7801
|
+
description: "Common resource image tags for images"
|
|
7802
|
+
}
|
|
7803
|
+
]
|
|
7804
|
+
},
|
|
7805
|
+
{
|
|
7806
|
+
key: ConfigKey.group_resourceBitTags,
|
|
7807
|
+
description: "Resource bit tags for images, used to define additional properties for images"
|
|
7808
|
+
},
|
|
7809
|
+
{
|
|
7810
|
+
key: ConfigKey.group_resourceImage,
|
|
7811
|
+
description: "Resource image tags for images, used to attach images to the bit",
|
|
7812
|
+
minCount: 1
|
|
7802
7813
|
}
|
|
7803
|
-
]
|
|
7814
|
+
],
|
|
7815
|
+
resourceAttachmentAllowed: false
|
|
7804
7816
|
},
|
|
7805
7817
|
[BitType.tableImageAlt]: {
|
|
7806
7818
|
since: "1.16.0",
|
|
@@ -9320,8 +9332,7 @@ var BITS = {
|
|
|
9320
9332
|
[BitType.tableExtended]: {
|
|
9321
9333
|
since: "4.14.0",
|
|
9322
9334
|
baseBitType: BitType.table,
|
|
9323
|
-
description: "Extended table bit, used to create complex tables with all HTML table features"
|
|
9324
|
-
cardSet: CardSetConfigKey.tableExtended
|
|
9335
|
+
description: "Extended table bit, used to create complex tables with all HTML table features"
|
|
9325
9336
|
},
|
|
9326
9337
|
[BitType.tableAlt]: {
|
|
9327
9338
|
since: "1.16.0",
|
|
@@ -10345,7 +10356,7 @@ var instance2 = new Config();
|
|
|
10345
10356
|
// src/generated/package_info.ts
|
|
10346
10357
|
var PACKAGE_INFO = {
|
|
10347
10358
|
"name": "@gmb/bitmark-parser-generator",
|
|
10348
|
-
"version": "5.
|
|
10359
|
+
"version": "5.9.1",
|
|
10349
10360
|
"license": "ISC"};
|
|
10350
10361
|
var Environment = {
|
|
10351
10362
|
unknown: "",
|
|
@@ -11177,6 +11188,8 @@ var NodeType = {
|
|
|
11177
11188
|
refPublisher: "refPublisher",
|
|
11178
11189
|
relatedBook: "relatedBook",
|
|
11179
11190
|
relatedBookValue: "relatedBookValue",
|
|
11191
|
+
translationOfBook: "translationOfBook",
|
|
11192
|
+
translationOfBookValue: "translationOfBookValue",
|
|
11180
11193
|
releaseDate: "releaseDate",
|
|
11181
11194
|
releaseDateValue: "releaseDateValue",
|
|
11182
11195
|
releaseKind: "releaseKind",
|
|
@@ -11894,7 +11907,7 @@ function normalizeTableFormat(bitType, table) {
|
|
|
11894
11907
|
delete t.columns;
|
|
11895
11908
|
delete t.data;
|
|
11896
11909
|
}
|
|
11897
|
-
const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
|
|
11910
|
+
const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended) || instance2.isOfBitType(bitType, BitType.tableImage);
|
|
11898
11911
|
if (isExtended && isTableBasicFormat(table)) {
|
|
11899
11912
|
return convertBasicToExtendedTableFormat(table);
|
|
11900
11913
|
}
|
|
@@ -24108,6 +24121,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24108
24121
|
data.relatedBook,
|
|
24109
24122
|
options
|
|
24110
24123
|
),
|
|
24124
|
+
translationOfBook: this.toAstProperty(
|
|
24125
|
+
bitType,
|
|
24126
|
+
ConfigKey.property_translationOfBook,
|
|
24127
|
+
data.translationOfBook,
|
|
24128
|
+
options
|
|
24129
|
+
),
|
|
24111
24130
|
author: this.toAstProperty(bitType, ConfigKey.property_author, data.author, options),
|
|
24112
24131
|
subject: this.toAstProperty(bitType, ConfigKey.property_subject, data.subject, options),
|
|
24113
24132
|
date: this.toAstProperty(bitType, ConfigKey.property_date, data.date, options),
|
|
@@ -24684,6 +24703,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24684
24703
|
data.allowPrint,
|
|
24685
24704
|
options
|
|
24686
24705
|
),
|
|
24706
|
+
allowPrintEnforceSpaceConfiguration: this.toAstProperty(
|
|
24707
|
+
bitType,
|
|
24708
|
+
ConfigKey.property_allowPrintEnforceSpaceConfiguration,
|
|
24709
|
+
data.allowPrintEnforceSpaceConfiguration,
|
|
24710
|
+
options
|
|
24711
|
+
),
|
|
24687
24712
|
printParentChapterLevel: this.toAstProperty(
|
|
24688
24713
|
bitType,
|
|
24689
24714
|
ConfigKey.property_printParentChapterLevel,
|
|
@@ -30306,7 +30331,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
30306
30331
|
if (bitJson.isTracked == null) bitJson.isTracked = true;
|
|
30307
30332
|
if (bitJson.isInfoOnly == null) bitJson.isInfoOnly = false;
|
|
30308
30333
|
}
|
|
30309
|
-
if (instance2.isOfBitType(bitType, BitType.table)) {
|
|
30334
|
+
if (instance2.isOfBitType(bitType, BitType.table) && !instance2.isOfBitType(bitType, BitType.tableImage)) {
|
|
30310
30335
|
if (bitJson.tableFixedHeader == null) bitJson.tableFixedHeader = false;
|
|
30311
30336
|
if (bitJson.tableHeaderWhitespaceNoWrap == null) {
|
|
30312
30337
|
bitJson.tableHeaderWhitespaceNoWrap = false;
|
|
@@ -30321,6 +30346,11 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
30321
30346
|
if (bitJson.tableResizableColumns == null) bitJson.tableResizableColumns = false;
|
|
30322
30347
|
if (bitJson.tableColumnMinWidth == null) bitJson.tableColumnMinWidth = 0;
|
|
30323
30348
|
}
|
|
30349
|
+
if (instance2.isOfBitType(bitType, BitType.tableImage)) {
|
|
30350
|
+
if (this.tableIsEmpty(bitJson.table)) {
|
|
30351
|
+
delete bitJson.table;
|
|
30352
|
+
}
|
|
30353
|
+
}
|
|
30324
30354
|
if (instance2.isOfBitType(bitType, BitType.bookReference)) {
|
|
30325
30355
|
if (bitJson.refAuthor == null) bitJson.refAuthor = [];
|
|
30326
30356
|
if (bitJson.refBookTitle == null) bitJson.refBookTitle = "";
|
|
@@ -30461,6 +30491,19 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
30461
30491
|
}
|
|
30462
30492
|
return bitJson;
|
|
30463
30493
|
}
|
|
30494
|
+
tableIsEmpty(table) {
|
|
30495
|
+
if (!table) return true;
|
|
30496
|
+
if (Object.keys(table).length === 0) return true;
|
|
30497
|
+
const tableStandard = table;
|
|
30498
|
+
if (tableStandard.columns?.length === 0 && tableStandard.data?.length) {
|
|
30499
|
+
return true;
|
|
30500
|
+
}
|
|
30501
|
+
const tableExtended = table;
|
|
30502
|
+
if (tableExtended.header?.rows.length === 0 && tableExtended.body?.rows.length === 0 && tableExtended.footer?.rows.length === 0) {
|
|
30503
|
+
return true;
|
|
30504
|
+
}
|
|
30505
|
+
return false;
|
|
30506
|
+
}
|
|
30464
30507
|
/**
|
|
30465
30508
|
* Convert any bitmark texts to strings.
|
|
30466
30509
|
*/
|