@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/cli/main.js CHANGED
@@ -677,8 +677,10 @@ var TagFormat = {
677
677
  // If the value is treated as a number
678
678
  boolean: "boolean",
679
679
  // If the value is treated as a boolean
680
- invertedBoolean: "invertedBoolean"
680
+ invertedBoolean: "invertedBoolean",
681
681
  // If the value is treated as a boolean with the value inverted (e.g. isLongAnswer ==> isShortAnswer = false)
682
+ enumeration: "enumeration"
683
+ // If the value is treated as an enumeration (the value is a string that must be one of a predefined set of values)
682
684
  };
683
685
  var TextFormat = {
684
686
  // plain text
@@ -804,6 +806,8 @@ var PropertyTagConfig = class extends AbstractTagConfig {
804
806
  // If the property is treated as an array rather than a single value
805
807
  format;
806
808
  // How the property is formatted
809
+ values;
810
+ // If the format is an enumeration, the possible values of the property
807
811
  defaultValue;
808
812
  // The default value of the property - this value can be omitted from the markup
809
813
  constructor(params) {
@@ -813,6 +817,7 @@ var PropertyTagConfig = class extends AbstractTagConfig {
813
817
  });
814
818
  this.array = params.maxCount === Count.infinity || params.maxCount > 1;
815
819
  this.format = params.format;
820
+ this.values = params.values;
816
821
  this.defaultValue = params.defaultValue;
817
822
  }
818
823
  toString(options) {
@@ -824,6 +829,7 @@ var PropertyTagConfig = class extends AbstractTagConfig {
824
829
  if (this.minCount != null) s += `, min=${this.minCount}`;
825
830
  if (this.array != null) s += `, arr=${this.array}`;
826
831
  if (this.format != null) s += `, fmt=${this.format}`;
832
+ if (this.values != null) s += `, vals=[${this.values.join(",")}]`;
827
833
  if (this.defaultValue != null) s += `, def=${this.defaultValue}`;
828
834
  if (this.jsonKey != null) s += `, json=${this.jsonKey}`;
829
835
  }
@@ -1108,7 +1114,6 @@ var propertyKeys = {
1108
1114
  property_aiGenerated: "@aiGenerated",
1109
1115
  property_allowedBit: "@allowedBit",
1110
1116
  property_allowPrint: "@allowPrint",
1111
- property_allowPrintEnforceSpaceConfiguration: "@allowPrintEnforceSpaceConfiguration",
1112
1117
  property_allowSubtitles: "@allowSubtitles",
1113
1118
  property_alt: "@alt",
1114
1119
  property_altLangTag: "@altLangTag",
@@ -2419,27 +2424,6 @@ var CARDSETS = {
2419
2424
  ]
2420
2425
  },
2421
2426
  [CardSetConfigKey.table]: {
2422
- variants: [
2423
- // Side 1
2424
- [
2425
- // Variant 1..N
2426
- {
2427
- tags: [
2428
- {
2429
- key: ConfigKey.group_standardItemLeadInstructionHint,
2430
- description: "Standard tags for lead, instruction, and hint."
2431
- },
2432
- {
2433
- key: ConfigKey.tag_title,
2434
- description: "Title of the table."
2435
- }
2436
- ],
2437
- repeatCount: Count.infinity
2438
- }
2439
- ]
2440
- ]
2441
- },
2442
- [CardSetConfigKey.tableExtended]: {
2443
2427
  variants: [
2444
2428
  // Side 1
2445
2429
  [
@@ -3401,14 +3385,9 @@ var GROUPS = {
3401
3385
  {
3402
3386
  key: ConfigKey.property_allowPrint,
3403
3387
  description: "If true, the book allows printing",
3404
- format: TagFormat.boolean,
3405
- defaultValue: "false"
3406
- },
3407
- {
3408
- key: ConfigKey.property_allowPrintEnforceSpaceConfiguration,
3409
- description: "If true, enforces space configuration for printing regardless of the allowPrint setting",
3410
- format: TagFormat.boolean,
3411
- defaultValue: "false"
3388
+ format: TagFormat.enumeration,
3389
+ values: ["enforceFalse", "enforceTrue", "useSpaceConfiguration"],
3390
+ defaultValue: "enforceFalse"
3412
3391
  },
3413
3392
  {
3414
3393
  key: ConfigKey.property_hasPrintRestriction,
@@ -4384,6 +4363,7 @@ var ConfigHydrator = class {
4384
4363
  chain: _chain,
4385
4364
  deprecated,
4386
4365
  format,
4366
+ values,
4387
4367
  defaultValue,
4388
4368
  jsonKey
4389
4369
  } = _tag;
@@ -4402,6 +4382,7 @@ var ConfigHydrator = class {
4402
4382
  chain,
4403
4383
  jsonKey,
4404
4384
  format,
4385
+ values,
4405
4386
  defaultValue,
4406
4387
  deprecated
4407
4388
  });
@@ -7805,15 +7786,35 @@ var BITS = {
7805
7786
  },
7806
7787
  [BitType.tableImage]: {
7807
7788
  since: "1.5.15",
7808
- baseBitType: BitType.image,
7789
+ baseBitType: BitType.table,
7809
7790
  description: "Table image bit, used to create images in tables in articles or books",
7810
7791
  tags: [
7811
7792
  {
7812
7793
  key: ConfigKey.property_caption,
7813
7794
  description: "Caption for the table image, used to provide a description for the image",
7814
7795
  format: TagFormat.bitmarkText
7796
+ },
7797
+ {
7798
+ key: ConfigKey.resource_backgroundWallpaper,
7799
+ description: "Background wallpaper for the image, used to set a background for the image",
7800
+ chain: [
7801
+ {
7802
+ key: ConfigKey.group_resourceImageCommon,
7803
+ description: "Common resource image tags for images"
7804
+ }
7805
+ ]
7806
+ },
7807
+ {
7808
+ key: ConfigKey.group_resourceBitTags,
7809
+ description: "Resource bit tags for images, used to define additional properties for images"
7810
+ },
7811
+ {
7812
+ key: ConfigKey.group_resourceImage,
7813
+ description: "Resource image tags for images, used to attach images to the bit",
7814
+ minCount: 1
7815
7815
  }
7816
- ]
7816
+ ],
7817
+ resourceAttachmentAllowed: false
7817
7818
  },
7818
7819
  [BitType.tableImageAlt]: {
7819
7820
  since: "1.16.0",
@@ -9333,8 +9334,7 @@ var BITS = {
9333
9334
  [BitType.tableExtended]: {
9334
9335
  since: "4.14.0",
9335
9336
  baseBitType: BitType.table,
9336
- description: "Extended table bit, used to create complex tables with all HTML table features",
9337
- cardSet: CardSetConfigKey.tableExtended
9337
+ description: "Extended table bit, used to create complex tables with all HTML table features"
9338
9338
  },
9339
9339
  [BitType.tableAlt]: {
9340
9340
  since: "1.16.0",
@@ -10358,7 +10358,7 @@ var instance2 = new Config();
10358
10358
  // src/generated/package_info.ts
10359
10359
  var PACKAGE_INFO = {
10360
10360
  "name": "@gmb/bitmark-parser-generator",
10361
- "version": "5.9.0",
10361
+ "version": "5.10.0",
10362
10362
  "license": "ISC"};
10363
10363
  var Environment = {
10364
10364
  unknown: "",
@@ -10947,6 +10947,8 @@ var NodeType = {
10947
10947
  indexValue: "indexValue",
10948
10948
  ingredients: "ingredients",
10949
10949
  ingredientsValue: "ingredientsValue",
10950
+ ingredient: "ingredient",
10951
+ ingredientValue: "ingredientValue",
10950
10952
  instruction: "instruction",
10951
10953
  instructionValue: "instructionValue",
10952
10954
  internalComment: "internalComment",
@@ -11259,6 +11261,7 @@ var NodeType = {
11259
11261
  srcAltValue: "srcAltValue",
11260
11262
  start: "start",
11261
11263
  statement: "statement",
11264
+ statementValue: "statementValue",
11262
11265
  statements: "statements",
11263
11266
  statementsValue: "statementsValue",
11264
11267
  statementText: "statementText",
@@ -11909,7 +11912,7 @@ function normalizeTableFormat(bitType, table) {
11909
11912
  delete t.columns;
11910
11913
  delete t.data;
11911
11914
  }
11912
- const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
11915
+ const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended) || instance2.isOfBitType(bitType, BitType.tableImage);
11913
11916
  if (isExtended && isTableBasicFormat(table)) {
11914
11917
  return convertBasicToExtendedTableFormat(table);
11915
11918
  }
@@ -24705,12 +24708,6 @@ var Builder = class extends BaseBuilder {
24705
24708
  data.allowPrint,
24706
24709
  options
24707
24710
  ),
24708
- allowPrintEnforceSpaceConfiguration: this.toAstProperty(
24709
- bitType,
24710
- ConfigKey.property_allowPrintEnforceSpaceConfiguration,
24711
- data.allowPrintEnforceSpaceConfiguration,
24712
- options
24713
- ),
24714
24711
  printParentChapterLevel: this.toAstProperty(
24715
24712
  bitType,
24716
24713
  ConfigKey.property_printParentChapterLevel,
@@ -27070,7 +27067,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27070
27067
  if (parent?.key !== NodeType.bitsValue) return true;
27071
27068
  for (const gt of groupTag) {
27072
27069
  const { name, tags: tags2 } = gt;
27073
- this.writeNL();
27074
27070
  this.writeProperty("groupTag", name, route, {
27075
27071
  format: TagFormat.plainText,
27076
27072
  writeEmpty: true
@@ -27079,7 +27075,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27079
27075
  for (const t of tags2) {
27080
27076
  this.writeProperty("tag", t, route, {
27081
27077
  format: TagFormat.plainText,
27082
- writeEmpty: true
27078
+ writeEmpty: true,
27079
+ forceChain: true
27083
27080
  });
27084
27081
  }
27085
27082
  }
@@ -27087,7 +27084,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27087
27084
  return false;
27088
27085
  }
27089
27086
  // bitmarkAst -> bits -> bitsValue -> labelTrue / labelFalse
27090
- enter_labelTrue(node, route) {
27087
+ leaf_labelTrue(node, route) {
27091
27088
  const value = node.value;
27092
27089
  const parent = this.getParentNode(route);
27093
27090
  if (parent?.key !== NodeType.bitsValue) return true;
@@ -27100,16 +27097,18 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27100
27097
  }
27101
27098
  if (haveTrue)
27102
27099
  this.writeProperty("labelTrue", value, route, {
27103
- format: TagFormat.plainText
27100
+ format: TagFormat.plainText,
27101
+ forceChain: true
27104
27102
  });
27105
27103
  if (haveFalse)
27106
27104
  this.writeProperty("labelFalse", bit.labelFalse, route, {
27107
- format: TagFormat.plainText
27105
+ format: TagFormat.plainText,
27106
+ forceChain: true
27108
27107
  });
27109
27108
  }
27110
27109
  return false;
27111
27110
  }
27112
- enter_labelFalse(_node, _route) {
27111
+ leaf_labelFalse(_node, _route) {
27113
27112
  return true;
27114
27113
  }
27115
27114
  // bitmarkAst -> bits -> bitsValue -> imageSource
@@ -27118,26 +27117,29 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27118
27117
  const parent = this.getParentNode(route);
27119
27118
  if (parent?.key !== NodeType.bitsValue) return true;
27120
27119
  const { url, mockupId, size, format, trim } = imageSource;
27121
- this.writeNL();
27122
27120
  this.writeProperty("imageSource", url, route, {
27123
27121
  format: TagFormat.plainText
27124
27122
  });
27125
27123
  if (url) {
27126
27124
  if (mockupId)
27127
27125
  this.writeProperty("mockupId", mockupId, route, {
27128
- format: TagFormat.plainText
27126
+ format: TagFormat.plainText,
27127
+ forceChain: true
27129
27128
  });
27130
27129
  if (size)
27131
27130
  this.writeProperty("size", size, route, {
27132
- format: TagFormat.plainText
27131
+ format: TagFormat.plainText,
27132
+ forceChain: true
27133
27133
  });
27134
27134
  if (format)
27135
27135
  this.writeProperty("format", format, route, {
27136
- format: TagFormat.plainText
27136
+ format: TagFormat.plainText,
27137
+ forceChain: true
27137
27138
  });
27138
27139
  if (instance5.isBoolean(trim))
27139
27140
  this.writeProperty("trim", trim, route, {
27140
- format: TagFormat.plainText
27141
+ format: TagFormat.plainText,
27142
+ forceChain: true
27141
27143
  });
27142
27144
  }
27143
27145
  return false;
@@ -27148,13 +27150,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27148
27150
  const parent = this.getParentNode(route);
27149
27151
  if (parent?.key !== NodeType.bitsValue) return true;
27150
27152
  const { technicalTerm, lang } = nodeValue;
27151
- this.writeNL();
27152
27153
  this.writeProperty("technicalTerm", technicalTerm, route, {
27153
27154
  format: TagFormat.plainText
27154
27155
  });
27155
27156
  if (lang != null) {
27156
27157
  this.writeProperty("lang", lang, route, {
27157
- format: TagFormat.plainText
27158
+ format: TagFormat.plainText,
27159
+ forceChain: true
27158
27160
  });
27159
27161
  }
27160
27162
  return false;
@@ -27165,28 +27167,31 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27165
27167
  const parent = this.getParentNode(route);
27166
27168
  if (parent?.key !== NodeType.bitsValue) return true;
27167
27169
  const { servings, unit, unitAbbr, decimalPlaces, disableCalculation, hint } = nodeValue;
27168
- this.writeNL();
27169
27170
  this.writeProperty("servings", servings, route, {
27170
27171
  format: TagFormat.plainText
27171
27172
  });
27172
27173
  if (unit != null) {
27173
27174
  this.writeProperty("unit", unit, route, {
27174
- format: TagFormat.plainText
27175
+ format: TagFormat.plainText,
27176
+ forceChain: true
27175
27177
  });
27176
27178
  }
27177
27179
  if (unitAbbr != null) {
27178
27180
  this.writeProperty("unitAbbr", unitAbbr, route, {
27179
- format: TagFormat.plainText
27181
+ format: TagFormat.plainText,
27182
+ forceChain: true
27180
27183
  });
27181
27184
  }
27182
27185
  if (decimalPlaces != null) {
27183
27186
  this.writeProperty("decimalPlaces", decimalPlaces, route, {
27184
- format: TagFormat.plainText
27187
+ format: TagFormat.plainText,
27188
+ forceChain: true
27185
27189
  });
27186
27190
  }
27187
27191
  if (disableCalculation != null) {
27188
27192
  this.writeProperty("disableCalculation", disableCalculation, route, {
27189
- format: TagFormat.plainText
27193
+ format: TagFormat.plainText,
27194
+ forceChain: true
27190
27195
  });
27191
27196
  }
27192
27197
  if (hint != null) {
@@ -27202,13 +27207,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27202
27207
  const parent = this.getParentNode(route);
27203
27208
  if (parent?.key !== NodeType.bitsValue) return true;
27204
27209
  const { name, title, avatarImage } = person;
27205
- this.writeNL();
27206
27210
  this.writeProperty("person", name, route, {
27207
27211
  format: TagFormat.plainText
27208
27212
  });
27209
27213
  if (title) {
27210
27214
  this.writeProperty("title", title, route, {
27211
- format: TagFormat.plainText
27215
+ format: TagFormat.plainText,
27216
+ forceChain: true
27212
27217
  });
27213
27218
  }
27214
27219
  if (avatarImage) {
@@ -27256,7 +27261,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27256
27261
  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) {
27257
27262
  return true;
27258
27263
  }
27259
- this.writeNL();
27260
27264
  this.writeResource(ResourceType.icon, resource.image.src);
27261
27265
  return true;
27262
27266
  }
@@ -27284,13 +27288,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27284
27288
  if (parent?.key !== NodeType.bitsValue) return true;
27285
27289
  const { level, label } = n;
27286
27290
  const levelKey = node.key === NodeType.ratingLevelStart ? "ratingLevelStart" : "ratingLevelEnd";
27287
- this.writeNL();
27288
27291
  this.writeProperty(levelKey, level, route, {
27289
27292
  format: TagFormat.plainText
27290
27293
  });
27291
27294
  if (label) {
27292
27295
  this.writeProperty("label", label, route, {
27293
- format: TagFormat.bitmarkText
27296
+ format: TagFormat.bitmarkText,
27297
+ forceChain: true
27294
27298
  });
27295
27299
  }
27296
27300
  return false;
@@ -27312,12 +27316,14 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27312
27316
  });
27313
27317
  if (color) {
27314
27318
  this.writeProperty("color", color, route, {
27315
- format: TagFormat.plainText
27319
+ format: TagFormat.plainText,
27320
+ forceChain: true
27316
27321
  });
27317
27322
  }
27318
27323
  if (emphasis) {
27319
27324
  this.writeProperty("emphasis", emphasis, route, {
27320
- format: TagFormat.plainText
27325
+ format: TagFormat.plainText,
27326
+ forceChain: true
27321
27327
  });
27322
27328
  }
27323
27329
  }
@@ -27326,7 +27332,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27326
27332
  // bitmarkAst -> bits -> bitsValue -> partialAnswer
27327
27333
  enter_partialAnswer(node, route) {
27328
27334
  if (node.value) {
27329
- this.writeNL();
27330
27335
  this.writeProperty("partialAnswer", node.value, route, {
27331
27336
  format: TagFormat.plainText
27332
27337
  });
@@ -27336,7 +27341,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27336
27341
  // bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> partialAnswer
27337
27342
  leaf_partialAnswer(node, route) {
27338
27343
  if (node.value) {
27339
- this.writeNL();
27340
27344
  this.writeProperty("partialAnswer", node.value, route, {
27341
27345
  format: TagFormat.plainText
27342
27346
  });
@@ -27347,7 +27351,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27347
27351
  // bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> sampleSolution
27348
27352
  enter_sampleSolution(node, route) {
27349
27353
  if (node.value) {
27350
- this.writeNL();
27351
27354
  this.writeProperty("sampleSolution", node.value, route, {
27352
27355
  format: TagFormat.plainText
27353
27356
  });
@@ -27356,7 +27359,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27356
27359
  }
27357
27360
  leaf_sampleSolution(node, route) {
27358
27361
  if (node.value) {
27359
- this.writeNL();
27360
27362
  this.writeProperty("sampleSolution", node.value, route, {
27361
27363
  format: TagFormat.plainText
27362
27364
  });
@@ -27366,7 +27368,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27366
27368
  // bitmarkAst -> bits -> bitsValue -> reasonableNumOfChars
27367
27369
  // bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> reasonableNumOfChars
27368
27370
  leaf_reasonableNumOfChars(node, route) {
27369
- this.writeNL();
27370
27371
  this.writeProperty("reasonableNumOfChars", node.value, route, {
27371
27372
  format: TagFormat.plainText
27372
27373
  });
@@ -28370,7 +28371,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28370
28371
  // bitmarkAst -> bits -> bitsValue -> * -> lang
28371
28372
  leaf_lang(node, route) {
28372
28373
  if (!node.value) return;
28373
- this.writeNL();
28374
28374
  this.writeProperty("lang", node.value, route, {
28375
28375
  format: TagFormat.boolean
28376
28376
  });
@@ -28378,7 +28378,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28378
28378
  // bitmarkAst -> bits -> bitsValue -> * -> refAuthor
28379
28379
  enter_refAuthor(node, route) {
28380
28380
  if (!node.value) return;
28381
- this.writeNL();
28382
28381
  this.writeProperty("refAuthor", node.value, route, {
28383
28382
  format: TagFormat.plainText,
28384
28383
  array: true
@@ -28387,7 +28386,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28387
28386
  // bitmarkAst -> bits -> bitsValue -> * -> refBookTitle
28388
28387
  leaf_refBookTitle(node, route) {
28389
28388
  if (!node.value) return;
28390
- this.writeNL();
28391
28389
  this.writeProperty("refBookTitle", node.value, route, {
28392
28390
  format: TagFormat.plainText,
28393
28391
  array: true
@@ -28396,7 +28394,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28396
28394
  // bitmarkAst -> bits -> bitsValue -> * -> refPublisher
28397
28395
  enter_refPublisher(node, route) {
28398
28396
  if (!node.value) return;
28399
- this.writeNL();
28400
28397
  this.writeProperty("refPublisher", node.value, route, {
28401
28398
  format: TagFormat.plainText,
28402
28399
  array: true
@@ -28405,7 +28402,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28405
28402
  // bitmarkAst -> bits -> bitsValue -> * -> refPublicationYear
28406
28403
  leaf_refPublicationYear(node, route) {
28407
28404
  if (!node.value) return;
28408
- this.writeNL();
28409
28405
  this.writeProperty("refPublicationYear", node.value, route, {
28410
28406
  format: TagFormat.plainText
28411
28407
  });
@@ -28413,7 +28409,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28413
28409
  // bitmarkAst -> bits -> bitsValue -> * -> citationStyle
28414
28410
  leaf_citationStyle(node, route) {
28415
28411
  if (!node.value) return;
28416
- this.writeNL();
28417
28412
  this.writeProperty("citationStyle", node.value, route, {
28418
28413
  format: TagFormat.plainText
28419
28414
  });
@@ -28744,7 +28739,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
28744
28739
  const config = instance2.getBitConfig(bitType);
28745
28740
  const propertyConfig = instance2.getTagConfigForTag(config.tags, propertyConfigKey);
28746
28741
  if (!propertyConfig) return;
28747
- this.writeNL_IfNotChain(route);
28748
28742
  this.writeProperty(propertyConfig.tag, node.value, route, {
28749
28743
  format: propertyConfig.format ?? TagFormat.plainText,
28750
28744
  array: propertyConfig.array ?? false,
@@ -29125,7 +29119,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
29125
29119
  if (options.ignoreFalse && val === false) continue;
29126
29120
  if (options.ignoreTrue && val === true) continue;
29127
29121
  if (!options.writeEmpty && val === "") continue;
29128
- if (propertyIndex > 0) this.writeNL_IfNotChain(route);
29122
+ if (!options.forceChain && propertyIndex === 0) this.writeNL_IfNotChain(route);
29129
29123
  this.writeOPA();
29130
29124
  this.writeTagKey(name);
29131
29125
  this.writeColon();
@@ -30333,7 +30327,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
30333
30327
  if (bitJson.isTracked == null) bitJson.isTracked = true;
30334
30328
  if (bitJson.isInfoOnly == null) bitJson.isInfoOnly = false;
30335
30329
  }
30336
- if (instance2.isOfBitType(bitType, BitType.table)) {
30330
+ if (instance2.isOfBitType(bitType, BitType.table) && !instance2.isOfBitType(bitType, BitType.tableImage)) {
30337
30331
  if (bitJson.tableFixedHeader == null) bitJson.tableFixedHeader = false;
30338
30332
  if (bitJson.tableHeaderWhitespaceNoWrap == null) {
30339
30333
  bitJson.tableHeaderWhitespaceNoWrap = false;
@@ -30348,6 +30342,11 @@ var JsonGenerator = class extends AstWalkerGenerator {
30348
30342
  if (bitJson.tableResizableColumns == null) bitJson.tableResizableColumns = false;
30349
30343
  if (bitJson.tableColumnMinWidth == null) bitJson.tableColumnMinWidth = 0;
30350
30344
  }
30345
+ if (instance2.isOfBitType(bitType, BitType.tableImage)) {
30346
+ if (this.tableIsEmpty(bitJson.table)) {
30347
+ delete bitJson.table;
30348
+ }
30349
+ }
30351
30350
  if (instance2.isOfBitType(bitType, BitType.bookReference)) {
30352
30351
  if (bitJson.refAuthor == null) bitJson.refAuthor = [];
30353
30352
  if (bitJson.refBookTitle == null) bitJson.refBookTitle = "";
@@ -30388,7 +30387,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
30388
30387
  }
30389
30388
  if (instance2.isOfBitType(bitType, BitType.book)) {
30390
30389
  if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
30391
- if (bitJson.allowPrint == null) bitJson.allowPrint = false;
30390
+ if (bitJson.allowPrint == null) bitJson.allowPrint = "enforceFalse";
30392
30391
  if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
30393
30392
  if (bitJson.enforceUpdateOverUserInput == null) bitJson.enforceUpdateOverUserInput = false;
30394
30393
  if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
@@ -30488,6 +30487,19 @@ var JsonGenerator = class extends AstWalkerGenerator {
30488
30487
  }
30489
30488
  return bitJson;
30490
30489
  }
30490
+ tableIsEmpty(table) {
30491
+ if (!table) return true;
30492
+ if (Object.keys(table).length === 0) return true;
30493
+ const tableStandard = table;
30494
+ if (tableStandard.columns?.length === 0 && tableStandard.data?.length) {
30495
+ return true;
30496
+ }
30497
+ const tableExtended = table;
30498
+ if (tableExtended.header?.rows.length === 0 && tableExtended.body?.rows.length === 0 && tableExtended.footer?.rows.length === 0) {
30499
+ return true;
30500
+ }
30501
+ return false;
30502
+ }
30491
30503
  /**
30492
30504
  * Convert any bitmark texts to strings.
30493
30505
  */
@@ -34022,6 +34034,7 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
34022
34034
  chain: void 0,
34023
34035
  jsonKey: void 0,
34024
34036
  format: TagFormat.bitmarkText,
34037
+ values: void 0,
34025
34038
  defaultValue: void 0,
34026
34039
  deprecated: void 0
34027
34040
  })