@gmb/bitmark-parser-generator 5.4.0 → 5.5.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.
@@ -419,6 +419,7 @@ declare const BitType: {
419
419
  readonly pageHero: "page-hero";
420
420
  readonly pageOpenBook: "page-open-book";
421
421
  readonly pageOpenBookList: "page-open-book-list";
422
+ readonly printBook: "print-book";
422
423
  readonly openBookChapter: "open-book-chapter";
423
424
  readonly pagePerson: "page-person";
424
425
  readonly pageProduct: "page-product";
@@ -816,6 +817,7 @@ declare const ConfigKey: {
816
817
  readonly property_internalPrintPdf: "@internalPrintPdf";
817
818
  readonly property_hasPrintRestriction: "@hasPrintRestriction";
818
819
  readonly property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput";
820
+ readonly property_extractorExtractionTimestamp: "@extractorExtractionTimestamp";
819
821
  readonly property_isCaseSensitive: "@isCaseSensitive";
820
822
  readonly property_isInfoOnly: "@isInfoOnly";
821
823
  readonly property_isPublic: "@isPublic";
@@ -853,6 +855,7 @@ declare const ConfigKey: {
853
855
  readonly property_mute: "@mute";
854
856
  readonly property_padletId: "@padletId";
855
857
  readonly property_page: "@page";
858
+ readonly property_printParentChapterLevel: "@printParentChapterLevel";
856
859
  readonly property_pageNo: "@pageNo";
857
860
  readonly property_partialAnswer: "@partialAnswer";
858
861
  readonly property_partner: "@partner";
@@ -1791,10 +1794,12 @@ interface BitJson {
1791
1794
  maxCreatedBits: number;
1792
1795
  maxDisplayLevel: number;
1793
1796
  maxTocChapterLevel: number;
1797
+ printParentChapterLevel: number;
1794
1798
  sourceDocument: string;
1795
1799
  internalPrintPdf: string;
1796
1800
  hasPrintRestriction: boolean;
1797
1801
  enforceUpdateOverUserInput: boolean;
1802
+ extractorExtractionTimestamp: string[];
1798
1803
  tocResource: string | string[];
1799
1804
  tocContent: string | string[];
1800
1805
  page: string;
@@ -2408,9 +2413,11 @@ interface Bit {
2408
2413
  internalPrintPdf?: Property;
2409
2414
  hasPrintRestriction?: Property;
2410
2415
  enforceUpdateOverUserInput?: Property;
2416
+ extractorExtractionTimestamp?: Property;
2411
2417
  tocResource?: Property;
2412
2418
  tocContent?: Property;
2413
2419
  page?: Property;
2420
+ printParentChapterLevel?: Property;
2414
2421
  platformBrandTarget?: Property;
2415
2422
  platformName?: Property;
2416
2423
  platformIcon?: ImageResourceWrapperJson;
@@ -2816,6 +2823,8 @@ declare const NodeType: {
2816
2823
  readonly hasPrintRestrictionValue: "hasPrintRestrictionValue";
2817
2824
  readonly enforceUpdateOverUserInput: "enforceUpdateOverUserInput";
2818
2825
  readonly enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue";
2826
+ readonly extractorExtractionTimestamp: "extractorExtractionTimestamp";
2827
+ readonly extractorExtractionTimestampValue: "extractorExtractionTimestampValue";
2819
2828
  readonly isCaseSensitive: "isCaseSensitive";
2820
2829
  readonly isCommented: "isCommented";
2821
2830
  readonly isCorrect: "isCorrect";
@@ -2918,6 +2927,8 @@ declare const NodeType: {
2918
2927
  readonly pageNumber: "pageNumber";
2919
2928
  readonly pageNumberValue: "pageNumberValue";
2920
2929
  readonly pageValue: "pageValue";
2930
+ readonly printParentChapterLevel: "printParentChapterLevel";
2931
+ readonly printParentChapterLevelValue: "printParentChapterLevelValue";
2921
2932
  readonly pairs: "pairs";
2922
2933
  readonly pairsValue: "pairsValue";
2923
2934
  readonly parent: "parent";
@@ -4214,9 +4225,11 @@ declare class Builder extends BaseBuilder {
4214
4225
  internalPrintPdf?: string;
4215
4226
  hasPrintRestriction?: boolean;
4216
4227
  enforceUpdateOverUserInput?: boolean;
4228
+ extractorExtractionTimestamp?: string[];
4217
4229
  tocResource?: string | string[];
4218
4230
  tocContent?: string | string[];
4219
4231
  page?: string | string[];
4232
+ printParentChapterLevel?: number;
4220
4233
  platformBrandTarget?: string;
4221
4234
  platformName?: string;
4222
4235
  platformIcon?: Partial<ImageResourceWrapperJson>;
@@ -419,6 +419,7 @@ declare const BitType: {
419
419
  readonly pageHero: "page-hero";
420
420
  readonly pageOpenBook: "page-open-book";
421
421
  readonly pageOpenBookList: "page-open-book-list";
422
+ readonly printBook: "print-book";
422
423
  readonly openBookChapter: "open-book-chapter";
423
424
  readonly pagePerson: "page-person";
424
425
  readonly pageProduct: "page-product";
@@ -816,6 +817,7 @@ declare const ConfigKey: {
816
817
  readonly property_internalPrintPdf: "@internalPrintPdf";
817
818
  readonly property_hasPrintRestriction: "@hasPrintRestriction";
818
819
  readonly property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput";
820
+ readonly property_extractorExtractionTimestamp: "@extractorExtractionTimestamp";
819
821
  readonly property_isCaseSensitive: "@isCaseSensitive";
820
822
  readonly property_isInfoOnly: "@isInfoOnly";
821
823
  readonly property_isPublic: "@isPublic";
@@ -853,6 +855,7 @@ declare const ConfigKey: {
853
855
  readonly property_mute: "@mute";
854
856
  readonly property_padletId: "@padletId";
855
857
  readonly property_page: "@page";
858
+ readonly property_printParentChapterLevel: "@printParentChapterLevel";
856
859
  readonly property_pageNo: "@pageNo";
857
860
  readonly property_partialAnswer: "@partialAnswer";
858
861
  readonly property_partner: "@partner";
@@ -1791,10 +1794,12 @@ interface BitJson {
1791
1794
  maxCreatedBits: number;
1792
1795
  maxDisplayLevel: number;
1793
1796
  maxTocChapterLevel: number;
1797
+ printParentChapterLevel: number;
1794
1798
  sourceDocument: string;
1795
1799
  internalPrintPdf: string;
1796
1800
  hasPrintRestriction: boolean;
1797
1801
  enforceUpdateOverUserInput: boolean;
1802
+ extractorExtractionTimestamp: string[];
1798
1803
  tocResource: string | string[];
1799
1804
  tocContent: string | string[];
1800
1805
  page: string;
@@ -2408,9 +2413,11 @@ interface Bit {
2408
2413
  internalPrintPdf?: Property;
2409
2414
  hasPrintRestriction?: Property;
2410
2415
  enforceUpdateOverUserInput?: Property;
2416
+ extractorExtractionTimestamp?: Property;
2411
2417
  tocResource?: Property;
2412
2418
  tocContent?: Property;
2413
2419
  page?: Property;
2420
+ printParentChapterLevel?: Property;
2414
2421
  platformBrandTarget?: Property;
2415
2422
  platformName?: Property;
2416
2423
  platformIcon?: ImageResourceWrapperJson;
@@ -2816,6 +2823,8 @@ declare const NodeType: {
2816
2823
  readonly hasPrintRestrictionValue: "hasPrintRestrictionValue";
2817
2824
  readonly enforceUpdateOverUserInput: "enforceUpdateOverUserInput";
2818
2825
  readonly enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue";
2826
+ readonly extractorExtractionTimestamp: "extractorExtractionTimestamp";
2827
+ readonly extractorExtractionTimestampValue: "extractorExtractionTimestampValue";
2819
2828
  readonly isCaseSensitive: "isCaseSensitive";
2820
2829
  readonly isCommented: "isCommented";
2821
2830
  readonly isCorrect: "isCorrect";
@@ -2918,6 +2927,8 @@ declare const NodeType: {
2918
2927
  readonly pageNumber: "pageNumber";
2919
2928
  readonly pageNumberValue: "pageNumberValue";
2920
2929
  readonly pageValue: "pageValue";
2930
+ readonly printParentChapterLevel: "printParentChapterLevel";
2931
+ readonly printParentChapterLevelValue: "printParentChapterLevelValue";
2921
2932
  readonly pairs: "pairs";
2922
2933
  readonly pairsValue: "pairsValue";
2923
2934
  readonly parent: "parent";
@@ -4214,9 +4225,11 @@ declare class Builder extends BaseBuilder {
4214
4225
  internalPrintPdf?: string;
4215
4226
  hasPrintRestriction?: boolean;
4216
4227
  enforceUpdateOverUserInput?: boolean;
4228
+ extractorExtractionTimestamp?: string[];
4217
4229
  tocResource?: string | string[];
4218
4230
  tocContent?: string | string[];
4219
4231
  page?: string | string[];
4232
+ printParentChapterLevel?: number;
4220
4233
  platformBrandTarget?: string;
4221
4234
  platformName?: string;
4222
4235
  platformIcon?: Partial<ImageResourceWrapperJson>;
@@ -428,6 +428,7 @@ var BitType = {
428
428
  pageHero: "page-hero",
429
429
  pageOpenBook: "page-open-book",
430
430
  pageOpenBookList: "page-open-book-list",
431
+ printBook: "print-book",
431
432
  openBookChapter: "open-book-chapter",
432
433
  pagePerson: "page-person",
433
434
  pageProduct: "page-product",
@@ -1241,6 +1242,7 @@ var propertyKeys = {
1241
1242
  property_internalPrintPdf: "@internalPrintPdf",
1242
1243
  property_hasPrintRestriction: "@hasPrintRestriction",
1243
1244
  property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput",
1245
+ property_extractorExtractionTimestamp: "@extractorExtractionTimestamp",
1244
1246
  property_isCaseSensitive: "@isCaseSensitive",
1245
1247
  property_isInfoOnly: "@isInfoOnly",
1246
1248
  property_isPublic: "@isPublic",
@@ -1278,6 +1280,7 @@ var propertyKeys = {
1278
1280
  property_mute: "@mute",
1279
1281
  property_padletId: "@padletId",
1280
1282
  property_page: "@page",
1283
+ property_printParentChapterLevel: "@printParentChapterLevel",
1281
1284
  property_pageNo: "@pageNo",
1282
1285
  property_partialAnswer: "@partialAnswer",
1283
1286
  property_partner: "@partner",
@@ -3417,6 +3420,12 @@ var GROUPS = {
3417
3420
  description: "If true, prioritize new content over legacy content from the instance API",
3418
3421
  format: TagFormat.boolean,
3419
3422
  defaultValue: "false"
3423
+ },
3424
+ {
3425
+ key: ConfigKey.property_extractorExtractionTimestamp,
3426
+ description: "Extraction timestamps for book conversion",
3427
+ format: TagFormat.plainText,
3428
+ maxCount: Count.infinity
3420
3429
  }
3421
3430
  ]
3422
3431
  },
@@ -6813,6 +6822,12 @@ var BITS = {
6813
6822
  key: ConfigKey.property_buttonCaption,
6814
6823
  description: "The caption of the print button",
6815
6824
  format: TagFormat.plainText
6825
+ },
6826
+ {
6827
+ key: ConfigKey.property_printParentChapterLevel,
6828
+ description: "The parent chapter level to print",
6829
+ format: TagFormat.number,
6830
+ defaultValue: "-1"
6816
6831
  }
6817
6832
  ]
6818
6833
  },
@@ -7393,6 +7408,39 @@ var BITS = {
7393
7408
  }
7394
7409
  ]
7395
7410
  },
7411
+ [BitType.printBook]: {
7412
+ since: "5.5.0",
7413
+ baseBitType: BitType.article,
7414
+ description: "Print book bit, used to create pages that open books without author information in articles or books",
7415
+ tags: [
7416
+ {
7417
+ key: ConfigKey.property_slug,
7418
+ description: "Slug for the book, used to identify the book in the system",
7419
+ format: TagFormat.plainText
7420
+ },
7421
+ {
7422
+ key: ConfigKey.property_book,
7423
+ description: "Book reference for the page, used to link to a specific book",
7424
+ format: TagFormat.plainText,
7425
+ chain: [
7426
+ {
7427
+ key: ConfigKey.tag_reference,
7428
+ description: "Reference tag for the book, used to link to the book in the system",
7429
+ maxCount: 2
7430
+ }
7431
+ ]
7432
+ },
7433
+ {
7434
+ /* Allow incorrectly chained reference tag */
7435
+ key: ConfigKey.tag_reference,
7436
+ description: "Reference tag for the book, used to link to the book in the system"
7437
+ },
7438
+ {
7439
+ key: ConfigKey.property_buttonCaption,
7440
+ description: "Caption for the button, used to define the text displayed on the button"
7441
+ }
7442
+ ]
7443
+ },
7396
7444
  [BitType.openBookChapter]: {
7397
7445
  since: "4.16.0",
7398
7446
  baseBitType: BitType.pageOpenBook,
@@ -10288,7 +10336,7 @@ var instance2 = new Config();
10288
10336
  // src/generated/package_info.ts
10289
10337
  var PACKAGE_INFO = {
10290
10338
  "name": "@gmb/bitmark-parser-generator",
10291
- "version": "5.4.0",
10339
+ "version": "5.5.0",
10292
10340
  "author": "Get More Brain Ltd",
10293
10341
  "license": "ISC",
10294
10342
  "description": "A bitmark parser and generator using Peggy.js"
@@ -10911,6 +10959,8 @@ var NodeType = {
10911
10959
  hasPrintRestrictionValue: "hasPrintRestrictionValue",
10912
10960
  enforceUpdateOverUserInput: "enforceUpdateOverUserInput",
10913
10961
  enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue",
10962
+ extractorExtractionTimestamp: "extractorExtractionTimestamp",
10963
+ extractorExtractionTimestampValue: "extractorExtractionTimestampValue",
10914
10964
  isCaseSensitive: "isCaseSensitive",
10915
10965
  isCommented: "isCommented",
10916
10966
  isCorrect: "isCorrect",
@@ -11014,6 +11064,8 @@ var NodeType = {
11014
11064
  pageNumber: "pageNumber",
11015
11065
  pageNumberValue: "pageNumberValue",
11016
11066
  pageValue: "pageValue",
11067
+ printParentChapterLevel: "printParentChapterLevel",
11068
+ printParentChapterLevelValue: "printParentChapterLevelValue",
11017
11069
  pairs: "pairs",
11018
11070
  pairsValue: "pairsValue",
11019
11071
  parent: "parent",
@@ -24793,6 +24845,12 @@ var Builder = class extends BaseBuilder {
24793
24845
  data.enforceUpdateOverUserInput,
24794
24846
  options
24795
24847
  ),
24848
+ extractorExtractionTimestamp: this.toAstProperty(
24849
+ bitType,
24850
+ ConfigKey.property_extractorExtractionTimestamp,
24851
+ data.extractorExtractionTimestamp,
24852
+ options
24853
+ ),
24796
24854
  tocResource: this.toAstProperty(
24797
24855
  bitType,
24798
24856
  ConfigKey.property_tocResource,
@@ -24806,6 +24864,12 @@ var Builder = class extends BaseBuilder {
24806
24864
  options
24807
24865
  ),
24808
24866
  page: this.toAstProperty(bitType, ConfigKey.property_page, data.page, options),
24867
+ printParentChapterLevel: this.toAstProperty(
24868
+ bitType,
24869
+ ConfigKey.property_printParentChapterLevel,
24870
+ data.printParentChapterLevel,
24871
+ options
24872
+ ),
24809
24873
  platformBrandTarget: this.toAstProperty(
24810
24874
  bitType,
24811
24875
  ConfigKey.property_platformBrandTarget,
@@ -30476,6 +30540,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
30476
30540
  BitType.pageFooter,
30477
30541
  BitType.pageOpenBook,
30478
30542
  BitType.pagePerson,
30543
+ BitType.printBook,
30479
30544
  BitType.pageProduct,
30480
30545
  BitType.pageProductList,
30481
30546
  BitType.pageProductVideo,
@@ -30496,6 +30561,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
30496
30561
  if (instance2.isOfBitType(bitType, BitType.tocContent)) {
30497
30562
  if (bitJson.tocContent == null) bitJson.tocContent = [];
30498
30563
  }
30564
+ if (instance2.isOfBitType(bitType, BitType.printThisChapter)) {
30565
+ if (bitJson.printParentChapterLevel == null) bitJson.printParentChapterLevel = -1;
30566
+ }
30499
30567
  if (instance2.isOfBitType(bitType, BitType.book)) {
30500
30568
  if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
30501
30569
  if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;