@gmb/bitmark-parser-generator 5.9.0 → 5.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -752,8 +752,10 @@ var TagFormat = {
752
752
  // If the value is treated as a number
753
753
  boolean: "boolean",
754
754
  // If the value is treated as a boolean
755
- invertedBoolean: "invertedBoolean"
755
+ invertedBoolean: "invertedBoolean",
756
756
  // If the value is treated as a boolean with the value inverted (e.g. isLongAnswer ==> isShortAnswer = false)
757
+ enumeration: "enumeration"
758
+ // If the value is treated as an enumeration (the value is a string that must be one of a predefined set of values)
757
759
  };
758
760
 
759
761
  // src/model/enum/TextFormat.ts
@@ -897,9 +899,12 @@ var PropertyTagConfig = class extends AbstractTagConfig {
897
899
  // If the property is treated as an array rather than a single value
898
900
  __publicField(this, "format");
899
901
  // How the property is formatted
902
+ __publicField(this, "values");
903
+ // If the format is an enumeration, the possible values of the property
900
904
  __publicField(this, "defaultValue");
901
905
  this.array = params.maxCount === Count.infinity || params.maxCount > 1;
902
906
  this.format = params.format;
907
+ this.values = params.values;
903
908
  this.defaultValue = params.defaultValue;
904
909
  }
905
910
  toString(options) {
@@ -911,6 +916,7 @@ var PropertyTagConfig = class extends AbstractTagConfig {
911
916
  if (this.minCount != null) s += `, min=${this.minCount}`;
912
917
  if (this.array != null) s += `, arr=${this.array}`;
913
918
  if (this.format != null) s += `, fmt=${this.format}`;
919
+ if (this.values != null) s += `, vals=[${this.values.join(",")}]`;
914
920
  if (this.defaultValue != null) s += `, def=${this.defaultValue}`;
915
921
  if (this.jsonKey != null) s += `, json=${this.jsonKey}`;
916
922
  }
@@ -1204,7 +1210,6 @@ var propertyKeys = {
1204
1210
  property_aiGenerated: "@aiGenerated",
1205
1211
  property_allowedBit: "@allowedBit",
1206
1212
  property_allowPrint: "@allowPrint",
1207
- property_allowPrintEnforceSpaceConfiguration: "@allowPrintEnforceSpaceConfiguration",
1208
1213
  property_allowSubtitles: "@allowSubtitles",
1209
1214
  property_alt: "@alt",
1210
1215
  property_altLangTag: "@altLangTag",
@@ -2524,27 +2529,6 @@ var CARDSETS = {
2524
2529
  ]
2525
2530
  },
2526
2531
  [CardSetConfigKey.table]: {
2527
- variants: [
2528
- // Side 1
2529
- [
2530
- // Variant 1..N
2531
- {
2532
- tags: [
2533
- {
2534
- key: ConfigKey.group_standardItemLeadInstructionHint,
2535
- description: "Standard tags for lead, instruction, and hint."
2536
- },
2537
- {
2538
- key: ConfigKey.tag_title,
2539
- description: "Title of the table."
2540
- }
2541
- ],
2542
- repeatCount: Count.infinity
2543
- }
2544
- ]
2545
- ]
2546
- },
2547
- [CardSetConfigKey.tableExtended]: {
2548
2532
  variants: [
2549
2533
  // Side 1
2550
2534
  [
@@ -3506,14 +3490,9 @@ var GROUPS = {
3506
3490
  {
3507
3491
  key: ConfigKey.property_allowPrint,
3508
3492
  description: "If true, the book allows printing",
3509
- format: TagFormat.boolean,
3510
- defaultValue: "false"
3511
- },
3512
- {
3513
- key: ConfigKey.property_allowPrintEnforceSpaceConfiguration,
3514
- description: "If true, enforces space configuration for printing regardless of the allowPrint setting",
3515
- format: TagFormat.boolean,
3516
- defaultValue: "false"
3493
+ format: TagFormat.enumeration,
3494
+ values: ["enforceFalse", "enforceTrue", "useSpaceConfiguration"],
3495
+ defaultValue: "enforceFalse"
3517
3496
  },
3518
3497
  {
3519
3498
  key: ConfigKey.property_hasPrintRestriction,
@@ -4489,6 +4468,7 @@ var ConfigHydrator = class {
4489
4468
  chain: _chain,
4490
4469
  deprecated,
4491
4470
  format,
4471
+ values,
4492
4472
  defaultValue,
4493
4473
  jsonKey
4494
4474
  } = _tag;
@@ -4507,6 +4487,7 @@ var ConfigHydrator = class {
4507
4487
  chain,
4508
4488
  jsonKey,
4509
4489
  format,
4490
+ values,
4510
4491
  defaultValue,
4511
4492
  deprecated
4512
4493
  });
@@ -7910,15 +7891,35 @@ var BITS = {
7910
7891
  },
7911
7892
  [BitType.tableImage]: {
7912
7893
  since: "1.5.15",
7913
- baseBitType: BitType.image,
7894
+ baseBitType: BitType.table,
7914
7895
  description: "Table image bit, used to create images in tables in articles or books",
7915
7896
  tags: [
7916
7897
  {
7917
7898
  key: ConfigKey.property_caption,
7918
7899
  description: "Caption for the table image, used to provide a description for the image",
7919
7900
  format: TagFormat.bitmarkText
7901
+ },
7902
+ {
7903
+ key: ConfigKey.resource_backgroundWallpaper,
7904
+ description: "Background wallpaper for the image, used to set a background for the image",
7905
+ chain: [
7906
+ {
7907
+ key: ConfigKey.group_resourceImageCommon,
7908
+ description: "Common resource image tags for images"
7909
+ }
7910
+ ]
7911
+ },
7912
+ {
7913
+ key: ConfigKey.group_resourceBitTags,
7914
+ description: "Resource bit tags for images, used to define additional properties for images"
7915
+ },
7916
+ {
7917
+ key: ConfigKey.group_resourceImage,
7918
+ description: "Resource image tags for images, used to attach images to the bit",
7919
+ minCount: 1
7920
7920
  }
7921
- ]
7921
+ ],
7922
+ resourceAttachmentAllowed: false
7922
7923
  },
7923
7924
  [BitType.tableImageAlt]: {
7924
7925
  since: "1.16.0",
@@ -9438,8 +9439,7 @@ var BITS = {
9438
9439
  [BitType.tableExtended]: {
9439
9440
  since: "4.14.0",
9440
9441
  baseBitType: BitType.table,
9441
- description: "Extended table bit, used to create complex tables with all HTML table features",
9442
- cardSet: CardSetConfigKey.tableExtended
9442
+ description: "Extended table bit, used to create complex tables with all HTML table features"
9443
9443
  },
9444
9444
  [BitType.tableAlt]: {
9445
9445
  since: "1.16.0",
@@ -10463,7 +10463,7 @@ var instance2 = new Config();
10463
10463
  // src/generated/package_info.ts
10464
10464
  var PACKAGE_INFO = {
10465
10465
  "name": "@gmb/bitmark-parser-generator",
10466
- "version": "5.9.0",
10466
+ "version": "5.10.0",
10467
10467
  "author": "Get More Brain Ltd",
10468
10468
  "license": "ISC",
10469
10469
  "description": "A bitmark parser and generator using Peggy.js"
@@ -11084,6 +11084,8 @@ var NodeType = {
11084
11084
  indexValue: "indexValue",
11085
11085
  ingredients: "ingredients",
11086
11086
  ingredientsValue: "ingredientsValue",
11087
+ ingredient: "ingredient",
11088
+ ingredientValue: "ingredientValue",
11087
11089
  instruction: "instruction",
11088
11090
  instructionValue: "instructionValue",
11089
11091
  internalComment: "internalComment",
@@ -11396,6 +11398,7 @@ var NodeType = {
11396
11398
  srcAltValue: "srcAltValue",
11397
11399
  start: "start",
11398
11400
  statement: "statement",
11401
+ statementValue: "statementValue",
11399
11402
  statements: "statements",
11400
11403
  statementsValue: "statementsValue",
11401
11404
  statementText: "statementText",
@@ -12062,7 +12065,7 @@ function normalizeTableFormat(bitType, table) {
12062
12065
  delete t.columns;
12063
12066
  delete t.data;
12064
12067
  }
12065
- const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
12068
+ const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended) || instance2.isOfBitType(bitType, BitType.tableImage);
12066
12069
  if (isExtended && isTableBasicFormat(table)) {
12067
12070
  return convertBasicToExtendedTableFormat(table);
12068
12071
  }
@@ -25026,12 +25029,6 @@ var Builder = class extends BaseBuilder {
25026
25029
  data.allowPrint,
25027
25030
  options
25028
25031
  ),
25029
- allowPrintEnforceSpaceConfiguration: this.toAstProperty(
25030
- bitType,
25031
- ConfigKey.property_allowPrintEnforceSpaceConfiguration,
25032
- data.allowPrintEnforceSpaceConfiguration,
25033
- options
25034
- ),
25035
25032
  printParentChapterLevel: this.toAstProperty(
25036
25033
  bitType,
25037
25034
  ConfigKey.property_printParentChapterLevel,
@@ -27404,7 +27401,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27404
27401
  if (parent?.key !== NodeType.bitsValue) return true;
27405
27402
  for (const gt of groupTag) {
27406
27403
  const { name, tags: tags2 } = gt;
27407
- this.writeNL();
27408
27404
  this.writeProperty("groupTag", name, route, {
27409
27405
  format: TagFormat.plainText,
27410
27406
  writeEmpty: true
@@ -27413,7 +27409,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27413
27409
  for (const t of tags2) {
27414
27410
  this.writeProperty("tag", t, route, {
27415
27411
  format: TagFormat.plainText,
27416
- writeEmpty: true
27412
+ writeEmpty: true,
27413
+ forceChain: true
27417
27414
  });
27418
27415
  }
27419
27416
  }
@@ -27421,7 +27418,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27421
27418
  return false;
27422
27419
  }
27423
27420
  // bitmarkAst -> bits -> bitsValue -> labelTrue / labelFalse
27424
- enter_labelTrue(node, route) {
27421
+ leaf_labelTrue(node, route) {
27425
27422
  const value = node.value;
27426
27423
  const parent = this.getParentNode(route);
27427
27424
  if (parent?.key !== NodeType.bitsValue) return true;
@@ -27434,16 +27431,18 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27434
27431
  }
27435
27432
  if (haveTrue)
27436
27433
  this.writeProperty("labelTrue", value, route, {
27437
- format: TagFormat.plainText
27434
+ format: TagFormat.plainText,
27435
+ forceChain: true
27438
27436
  });
27439
27437
  if (haveFalse)
27440
27438
  this.writeProperty("labelFalse", bit.labelFalse, route, {
27441
- format: TagFormat.plainText
27439
+ format: TagFormat.plainText,
27440
+ forceChain: true
27442
27441
  });
27443
27442
  }
27444
27443
  return false;
27445
27444
  }
27446
- enter_labelFalse(_node, _route) {
27445
+ leaf_labelFalse(_node, _route) {
27447
27446
  return true;
27448
27447
  }
27449
27448
  // bitmarkAst -> bits -> bitsValue -> imageSource
@@ -27452,26 +27451,29 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27452
27451
  const parent = this.getParentNode(route);
27453
27452
  if (parent?.key !== NodeType.bitsValue) return true;
27454
27453
  const { url, mockupId, size, format, trim } = imageSource;
27455
- this.writeNL();
27456
27454
  this.writeProperty("imageSource", url, route, {
27457
27455
  format: TagFormat.plainText
27458
27456
  });
27459
27457
  if (url) {
27460
27458
  if (mockupId)
27461
27459
  this.writeProperty("mockupId", mockupId, route, {
27462
- format: TagFormat.plainText
27460
+ format: TagFormat.plainText,
27461
+ forceChain: true
27463
27462
  });
27464
27463
  if (size)
27465
27464
  this.writeProperty("size", size, route, {
27466
- format: TagFormat.plainText
27465
+ format: TagFormat.plainText,
27466
+ forceChain: true
27467
27467
  });
27468
27468
  if (format)
27469
27469
  this.writeProperty("format", format, route, {
27470
- format: TagFormat.plainText
27470
+ format: TagFormat.plainText,
27471
+ forceChain: true
27471
27472
  });
27472
27473
  if (instance5.isBoolean(trim))
27473
27474
  this.writeProperty("trim", trim, route, {
27474
- format: TagFormat.plainText
27475
+ format: TagFormat.plainText,
27476
+ forceChain: true
27475
27477
  });
27476
27478
  }
27477
27479
  return false;
@@ -27482,13 +27484,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27482
27484
  const parent = this.getParentNode(route);
27483
27485
  if (parent?.key !== NodeType.bitsValue) return true;
27484
27486
  const { technicalTerm, lang } = nodeValue;
27485
- this.writeNL();
27486
27487
  this.writeProperty("technicalTerm", technicalTerm, route, {
27487
27488
  format: TagFormat.plainText
27488
27489
  });
27489
27490
  if (lang != null) {
27490
27491
  this.writeProperty("lang", lang, route, {
27491
- format: TagFormat.plainText
27492
+ format: TagFormat.plainText,
27493
+ forceChain: true
27492
27494
  });
27493
27495
  }
27494
27496
  return false;
@@ -27499,28 +27501,31 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27499
27501
  const parent = this.getParentNode(route);
27500
27502
  if (parent?.key !== NodeType.bitsValue) return true;
27501
27503
  const { servings, unit, unitAbbr, decimalPlaces, disableCalculation, hint } = nodeValue;
27502
- this.writeNL();
27503
27504
  this.writeProperty("servings", servings, route, {
27504
27505
  format: TagFormat.plainText
27505
27506
  });
27506
27507
  if (unit != null) {
27507
27508
  this.writeProperty("unit", unit, route, {
27508
- format: TagFormat.plainText
27509
+ format: TagFormat.plainText,
27510
+ forceChain: true
27509
27511
  });
27510
27512
  }
27511
27513
  if (unitAbbr != null) {
27512
27514
  this.writeProperty("unitAbbr", unitAbbr, route, {
27513
- format: TagFormat.plainText
27515
+ format: TagFormat.plainText,
27516
+ forceChain: true
27514
27517
  });
27515
27518
  }
27516
27519
  if (decimalPlaces != null) {
27517
27520
  this.writeProperty("decimalPlaces", decimalPlaces, route, {
27518
- format: TagFormat.plainText
27521
+ format: TagFormat.plainText,
27522
+ forceChain: true
27519
27523
  });
27520
27524
  }
27521
27525
  if (disableCalculation != null) {
27522
27526
  this.writeProperty("disableCalculation", disableCalculation, route, {
27523
- format: TagFormat.plainText
27527
+ format: TagFormat.plainText,
27528
+ forceChain: true
27524
27529
  });
27525
27530
  }
27526
27531
  if (hint != null) {
@@ -27536,13 +27541,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27536
27541
  const parent = this.getParentNode(route);
27537
27542
  if (parent?.key !== NodeType.bitsValue) return true;
27538
27543
  const { name, title, avatarImage } = person;
27539
- this.writeNL();
27540
27544
  this.writeProperty("person", name, route, {
27541
27545
  format: TagFormat.plainText
27542
27546
  });
27543
27547
  if (title) {
27544
27548
  this.writeProperty("title", title, route, {
27545
- format: TagFormat.plainText
27549
+ format: TagFormat.plainText,
27550
+ forceChain: true
27546
27551
  });
27547
27552
  }
27548
27553
  if (avatarImage) {
@@ -27590,7 +27595,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27590
27595
  if (parent.key !== NodeType.term && parent.key !== NodeType.definition && parent.key !== NodeType.alternativeDefinitionsValue && parent.key !== NodeType.question && parent.key !== NodeType.answer && parent.key !== NodeType.alternativeAnswersValue) {
27591
27596
  return true;
27592
27597
  }
27593
- this.writeNL();
27594
27598
  this.writeResource(ResourceType.icon, resource.image.src);
27595
27599
  return true;
27596
27600
  }
@@ -27618,13 +27622,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27618
27622
  if (parent?.key !== NodeType.bitsValue) return true;
27619
27623
  const { level, label } = n;
27620
27624
  const levelKey = node.key === NodeType.ratingLevelStart ? "ratingLevelStart" : "ratingLevelEnd";
27621
- this.writeNL();
27622
27625
  this.writeProperty(levelKey, level, route, {
27623
27626
  format: TagFormat.plainText
27624
27627
  });
27625
27628
  if (label) {
27626
27629
  this.writeProperty("label", label, route, {
27627
- format: TagFormat.bitmarkText
27630
+ format: TagFormat.bitmarkText,
27631
+ forceChain: true
27628
27632
  });
27629
27633
  }
27630
27634
  return false;
@@ -27646,12 +27650,14 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27646
27650
  });
27647
27651
  if (color) {
27648
27652
  this.writeProperty("color", color, route, {
27649
- format: TagFormat.plainText
27653
+ format: TagFormat.plainText,
27654
+ forceChain: true
27650
27655
  });
27651
27656
  }
27652
27657
  if (emphasis) {
27653
27658
  this.writeProperty("emphasis", emphasis, route, {
27654
- format: TagFormat.plainText
27659
+ format: TagFormat.plainText,
27660
+ forceChain: true
27655
27661
  });
27656
27662
  }
27657
27663
  }
@@ -27660,7 +27666,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27660
27666
  // bitmarkAst -> bits -> bitsValue -> partialAnswer
27661
27667
  enter_partialAnswer(node, route) {
27662
27668
  if (node.value) {
27663
- this.writeNL();
27664
27669
  this.writeProperty("partialAnswer", node.value, route, {
27665
27670
  format: TagFormat.plainText
27666
27671
  });
@@ -27670,7 +27675,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27670
27675
  // bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> partialAnswer
27671
27676
  leaf_partialAnswer(node, route) {
27672
27677
  if (node.value) {
27673
- this.writeNL();
27674
27678
  this.writeProperty("partialAnswer", node.value, route, {
27675
27679
  format: TagFormat.plainText
27676
27680
  });
@@ -27681,7 +27685,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27681
27685
  // bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> sampleSolution
27682
27686
  enter_sampleSolution(node, route) {
27683
27687
  if (node.value) {
27684
- this.writeNL();
27685
27688
  this.writeProperty("sampleSolution", node.value, route, {
27686
27689
  format: TagFormat.plainText
27687
27690
  });
@@ -27690,7 +27693,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27690
27693
  }
27691
27694
  leaf_sampleSolution(node, route) {
27692
27695
  if (node.value) {
27693
- this.writeNL();
27694
27696
  this.writeProperty("sampleSolution", node.value, route, {
27695
27697
  format: TagFormat.plainText
27696
27698
  });
@@ -27700,7 +27702,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27700
27702
  // bitmarkAst -> bits -> bitsValue -> reasonableNumOfChars
27701
27703
  // bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> reasonableNumOfChars
27702
27704
  leaf_reasonableNumOfChars(node, route) {
27703
- this.writeNL();
27704
27705
  this.writeProperty("reasonableNumOfChars", node.value, route, {
27705
27706
  format: TagFormat.plainText
27706
27707
  });
@@ -28707,7 +28708,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28707
28708
  // bitmarkAst -> bits -> bitsValue -> * -> lang
28708
28709
  leaf_lang(node, route) {
28709
28710
  if (!node.value) return;
28710
- this.writeNL();
28711
28711
  this.writeProperty("lang", node.value, route, {
28712
28712
  format: TagFormat.boolean
28713
28713
  });
@@ -28715,7 +28715,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28715
28715
  // bitmarkAst -> bits -> bitsValue -> * -> refAuthor
28716
28716
  enter_refAuthor(node, route) {
28717
28717
  if (!node.value) return;
28718
- this.writeNL();
28719
28718
  this.writeProperty("refAuthor", node.value, route, {
28720
28719
  format: TagFormat.plainText,
28721
28720
  array: true
@@ -28724,7 +28723,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28724
28723
  // bitmarkAst -> bits -> bitsValue -> * -> refBookTitle
28725
28724
  leaf_refBookTitle(node, route) {
28726
28725
  if (!node.value) return;
28727
- this.writeNL();
28728
28726
  this.writeProperty("refBookTitle", node.value, route, {
28729
28727
  format: TagFormat.plainText,
28730
28728
  array: true
@@ -28733,7 +28731,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28733
28731
  // bitmarkAst -> bits -> bitsValue -> * -> refPublisher
28734
28732
  enter_refPublisher(node, route) {
28735
28733
  if (!node.value) return;
28736
- this.writeNL();
28737
28734
  this.writeProperty("refPublisher", node.value, route, {
28738
28735
  format: TagFormat.plainText,
28739
28736
  array: true
@@ -28742,7 +28739,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28742
28739
  // bitmarkAst -> bits -> bitsValue -> * -> refPublicationYear
28743
28740
  leaf_refPublicationYear(node, route) {
28744
28741
  if (!node.value) return;
28745
- this.writeNL();
28746
28742
  this.writeProperty("refPublicationYear", node.value, route, {
28747
28743
  format: TagFormat.plainText
28748
28744
  });
@@ -28750,7 +28746,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28750
28746
  // bitmarkAst -> bits -> bitsValue -> * -> citationStyle
28751
28747
  leaf_citationStyle(node, route) {
28752
28748
  if (!node.value) return;
28753
- this.writeNL();
28754
28749
  this.writeProperty("citationStyle", node.value, route, {
28755
28750
  format: TagFormat.plainText
28756
28751
  });
@@ -29082,7 +29077,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
29082
29077
  const config = instance2.getBitConfig(bitType);
29083
29078
  const propertyConfig = instance2.getTagConfigForTag(config.tags, propertyConfigKey);
29084
29079
  if (!propertyConfig) return;
29085
- this.writeNL_IfNotChain(route);
29086
29080
  this.writeProperty(propertyConfig.tag, node.value, route, {
29087
29081
  format: propertyConfig.format ?? TagFormat.plainText,
29088
29082
  array: propertyConfig.array ?? false,
@@ -29466,7 +29460,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
29466
29460
  if (options.ignoreFalse && val === false) continue;
29467
29461
  if (options.ignoreTrue && val === true) continue;
29468
29462
  if (!options.writeEmpty && val === "") continue;
29469
- if (propertyIndex > 0) this.writeNL_IfNotChain(route);
29463
+ if (!options.forceChain && propertyIndex === 0) this.writeNL_IfNotChain(route);
29470
29464
  this.writeOPA();
29471
29465
  this.writeTagKey(name);
29472
29466
  this.writeColon();
@@ -30679,7 +30673,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
30679
30673
  if (bitJson.isTracked == null) bitJson.isTracked = true;
30680
30674
  if (bitJson.isInfoOnly == null) bitJson.isInfoOnly = false;
30681
30675
  }
30682
- if (instance2.isOfBitType(bitType, BitType.table)) {
30676
+ if (instance2.isOfBitType(bitType, BitType.table) && !instance2.isOfBitType(bitType, BitType.tableImage)) {
30683
30677
  if (bitJson.tableFixedHeader == null) bitJson.tableFixedHeader = false;
30684
30678
  if (bitJson.tableHeaderWhitespaceNoWrap == null) {
30685
30679
  bitJson.tableHeaderWhitespaceNoWrap = false;
@@ -30694,6 +30688,11 @@ var JsonGenerator = class extends AstWalkerGenerator {
30694
30688
  if (bitJson.tableResizableColumns == null) bitJson.tableResizableColumns = false;
30695
30689
  if (bitJson.tableColumnMinWidth == null) bitJson.tableColumnMinWidth = 0;
30696
30690
  }
30691
+ if (instance2.isOfBitType(bitType, BitType.tableImage)) {
30692
+ if (this.tableIsEmpty(bitJson.table)) {
30693
+ delete bitJson.table;
30694
+ }
30695
+ }
30697
30696
  if (instance2.isOfBitType(bitType, BitType.bookReference)) {
30698
30697
  if (bitJson.refAuthor == null) bitJson.refAuthor = [];
30699
30698
  if (bitJson.refBookTitle == null) bitJson.refBookTitle = "";
@@ -30734,7 +30733,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
30734
30733
  }
30735
30734
  if (instance2.isOfBitType(bitType, BitType.book)) {
30736
30735
  if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
30737
- if (bitJson.allowPrint == null) bitJson.allowPrint = false;
30736
+ if (bitJson.allowPrint == null) bitJson.allowPrint = "enforceFalse";
30738
30737
  if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
30739
30738
  if (bitJson.enforceUpdateOverUserInput == null) bitJson.enforceUpdateOverUserInput = false;
30740
30739
  if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
@@ -30834,6 +30833,19 @@ var JsonGenerator = class extends AstWalkerGenerator {
30834
30833
  }
30835
30834
  return bitJson;
30836
30835
  }
30836
+ tableIsEmpty(table) {
30837
+ if (!table) return true;
30838
+ if (Object.keys(table).length === 0) return true;
30839
+ const tableStandard = table;
30840
+ if (tableStandard.columns?.length === 0 && tableStandard.data?.length) {
30841
+ return true;
30842
+ }
30843
+ const tableExtended = table;
30844
+ if (tableExtended.header?.rows.length === 0 && tableExtended.body?.rows.length === 0 && tableExtended.footer?.rows.length === 0) {
30845
+ return true;
30846
+ }
30847
+ return false;
30848
+ }
30837
30849
  /**
30838
30850
  * Convert any bitmark texts to strings.
30839
30851
  */
@@ -34463,6 +34475,7 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
34463
34475
  chain: void 0,
34464
34476
  jsonKey: void 0,
34465
34477
  format: TagFormat.bitmarkText,
34478
+ values: void 0,
34466
34479
  defaultValue: void 0,
34467
34480
  deprecated: void 0
34468
34481
  })