@gmb/bitmark-parser-generator 5.3.2 → 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";
@@ -447,6 +448,9 @@ declare const BitType: {
447
448
  readonly platformSectionInput: "platform-section-input";
448
449
  readonly platformSystemIcon: "platform-system-icon";
449
450
  readonly preparationNote: "preparation-note";
451
+ readonly printThisBook: "print-this-book";
452
+ readonly printThisChapter: "print-this-chapter";
453
+ readonly printPageBreak: "print-page-break";
450
454
  readonly pronunciationTable: "pronunciation-table";
451
455
  readonly prototypeImages: "prototype-images";
452
456
  readonly qAndA: "q-and-a";
@@ -813,6 +817,7 @@ declare const ConfigKey: {
813
817
  readonly property_internalPrintPdf: "@internalPrintPdf";
814
818
  readonly property_hasPrintRestriction: "@hasPrintRestriction";
815
819
  readonly property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput";
820
+ readonly property_extractorExtractionTimestamp: "@extractorExtractionTimestamp";
816
821
  readonly property_isCaseSensitive: "@isCaseSensitive";
817
822
  readonly property_isInfoOnly: "@isInfoOnly";
818
823
  readonly property_isPublic: "@isPublic";
@@ -850,6 +855,7 @@ declare const ConfigKey: {
850
855
  readonly property_mute: "@mute";
851
856
  readonly property_padletId: "@padletId";
852
857
  readonly property_page: "@page";
858
+ readonly property_printParentChapterLevel: "@printParentChapterLevel";
853
859
  readonly property_pageNo: "@pageNo";
854
860
  readonly property_partialAnswer: "@partialAnswer";
855
861
  readonly property_partner: "@partner";
@@ -1788,10 +1794,12 @@ interface BitJson {
1788
1794
  maxCreatedBits: number;
1789
1795
  maxDisplayLevel: number;
1790
1796
  maxTocChapterLevel: number;
1797
+ printParentChapterLevel: number;
1791
1798
  sourceDocument: string;
1792
1799
  internalPrintPdf: string;
1793
1800
  hasPrintRestriction: boolean;
1794
1801
  enforceUpdateOverUserInput: boolean;
1802
+ extractorExtractionTimestamp: string[];
1795
1803
  tocResource: string | string[];
1796
1804
  tocContent: string | string[];
1797
1805
  page: string;
@@ -2405,9 +2413,11 @@ interface Bit {
2405
2413
  internalPrintPdf?: Property;
2406
2414
  hasPrintRestriction?: Property;
2407
2415
  enforceUpdateOverUserInput?: Property;
2416
+ extractorExtractionTimestamp?: Property;
2408
2417
  tocResource?: Property;
2409
2418
  tocContent?: Property;
2410
2419
  page?: Property;
2420
+ printParentChapterLevel?: Property;
2411
2421
  platformBrandTarget?: Property;
2412
2422
  platformName?: Property;
2413
2423
  platformIcon?: ImageResourceWrapperJson;
@@ -2813,6 +2823,8 @@ declare const NodeType: {
2813
2823
  readonly hasPrintRestrictionValue: "hasPrintRestrictionValue";
2814
2824
  readonly enforceUpdateOverUserInput: "enforceUpdateOverUserInput";
2815
2825
  readonly enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue";
2826
+ readonly extractorExtractionTimestamp: "extractorExtractionTimestamp";
2827
+ readonly extractorExtractionTimestampValue: "extractorExtractionTimestampValue";
2816
2828
  readonly isCaseSensitive: "isCaseSensitive";
2817
2829
  readonly isCommented: "isCommented";
2818
2830
  readonly isCorrect: "isCorrect";
@@ -2915,6 +2927,8 @@ declare const NodeType: {
2915
2927
  readonly pageNumber: "pageNumber";
2916
2928
  readonly pageNumberValue: "pageNumberValue";
2917
2929
  readonly pageValue: "pageValue";
2930
+ readonly printParentChapterLevel: "printParentChapterLevel";
2931
+ readonly printParentChapterLevelValue: "printParentChapterLevelValue";
2918
2932
  readonly pairs: "pairs";
2919
2933
  readonly pairsValue: "pairsValue";
2920
2934
  readonly parent: "parent";
@@ -4211,9 +4225,11 @@ declare class Builder extends BaseBuilder {
4211
4225
  internalPrintPdf?: string;
4212
4226
  hasPrintRestriction?: boolean;
4213
4227
  enforceUpdateOverUserInput?: boolean;
4228
+ extractorExtractionTimestamp?: string[];
4214
4229
  tocResource?: string | string[];
4215
4230
  tocContent?: string | string[];
4216
4231
  page?: string | string[];
4232
+ printParentChapterLevel?: number;
4217
4233
  platformBrandTarget?: string;
4218
4234
  platformName?: string;
4219
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";
@@ -447,6 +448,9 @@ declare const BitType: {
447
448
  readonly platformSectionInput: "platform-section-input";
448
449
  readonly platformSystemIcon: "platform-system-icon";
449
450
  readonly preparationNote: "preparation-note";
451
+ readonly printThisBook: "print-this-book";
452
+ readonly printThisChapter: "print-this-chapter";
453
+ readonly printPageBreak: "print-page-break";
450
454
  readonly pronunciationTable: "pronunciation-table";
451
455
  readonly prototypeImages: "prototype-images";
452
456
  readonly qAndA: "q-and-a";
@@ -813,6 +817,7 @@ declare const ConfigKey: {
813
817
  readonly property_internalPrintPdf: "@internalPrintPdf";
814
818
  readonly property_hasPrintRestriction: "@hasPrintRestriction";
815
819
  readonly property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput";
820
+ readonly property_extractorExtractionTimestamp: "@extractorExtractionTimestamp";
816
821
  readonly property_isCaseSensitive: "@isCaseSensitive";
817
822
  readonly property_isInfoOnly: "@isInfoOnly";
818
823
  readonly property_isPublic: "@isPublic";
@@ -850,6 +855,7 @@ declare const ConfigKey: {
850
855
  readonly property_mute: "@mute";
851
856
  readonly property_padletId: "@padletId";
852
857
  readonly property_page: "@page";
858
+ readonly property_printParentChapterLevel: "@printParentChapterLevel";
853
859
  readonly property_pageNo: "@pageNo";
854
860
  readonly property_partialAnswer: "@partialAnswer";
855
861
  readonly property_partner: "@partner";
@@ -1788,10 +1794,12 @@ interface BitJson {
1788
1794
  maxCreatedBits: number;
1789
1795
  maxDisplayLevel: number;
1790
1796
  maxTocChapterLevel: number;
1797
+ printParentChapterLevel: number;
1791
1798
  sourceDocument: string;
1792
1799
  internalPrintPdf: string;
1793
1800
  hasPrintRestriction: boolean;
1794
1801
  enforceUpdateOverUserInput: boolean;
1802
+ extractorExtractionTimestamp: string[];
1795
1803
  tocResource: string | string[];
1796
1804
  tocContent: string | string[];
1797
1805
  page: string;
@@ -2405,9 +2413,11 @@ interface Bit {
2405
2413
  internalPrintPdf?: Property;
2406
2414
  hasPrintRestriction?: Property;
2407
2415
  enforceUpdateOverUserInput?: Property;
2416
+ extractorExtractionTimestamp?: Property;
2408
2417
  tocResource?: Property;
2409
2418
  tocContent?: Property;
2410
2419
  page?: Property;
2420
+ printParentChapterLevel?: Property;
2411
2421
  platformBrandTarget?: Property;
2412
2422
  platformName?: Property;
2413
2423
  platformIcon?: ImageResourceWrapperJson;
@@ -2813,6 +2823,8 @@ declare const NodeType: {
2813
2823
  readonly hasPrintRestrictionValue: "hasPrintRestrictionValue";
2814
2824
  readonly enforceUpdateOverUserInput: "enforceUpdateOverUserInput";
2815
2825
  readonly enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue";
2826
+ readonly extractorExtractionTimestamp: "extractorExtractionTimestamp";
2827
+ readonly extractorExtractionTimestampValue: "extractorExtractionTimestampValue";
2816
2828
  readonly isCaseSensitive: "isCaseSensitive";
2817
2829
  readonly isCommented: "isCommented";
2818
2830
  readonly isCorrect: "isCorrect";
@@ -2915,6 +2927,8 @@ declare const NodeType: {
2915
2927
  readonly pageNumber: "pageNumber";
2916
2928
  readonly pageNumberValue: "pageNumberValue";
2917
2929
  readonly pageValue: "pageValue";
2930
+ readonly printParentChapterLevel: "printParentChapterLevel";
2931
+ readonly printParentChapterLevelValue: "printParentChapterLevelValue";
2918
2932
  readonly pairs: "pairs";
2919
2933
  readonly pairsValue: "pairsValue";
2920
2934
  readonly parent: "parent";
@@ -4211,9 +4225,11 @@ declare class Builder extends BaseBuilder {
4211
4225
  internalPrintPdf?: string;
4212
4226
  hasPrintRestriction?: boolean;
4213
4227
  enforceUpdateOverUserInput?: boolean;
4228
+ extractorExtractionTimestamp?: string[];
4214
4229
  tocResource?: string | string[];
4215
4230
  tocContent?: string | string[];
4216
4231
  page?: string | string[];
4232
+ printParentChapterLevel?: number;
4217
4233
  platformBrandTarget?: string;
4218
4234
  platformName?: string;
4219
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",
@@ -456,6 +457,9 @@ var BitType = {
456
457
  platformSectionInput: "platform-section-input",
457
458
  platformSystemIcon: "platform-system-icon",
458
459
  preparationNote: "preparation-note",
460
+ printThisBook: "print-this-book",
461
+ printThisChapter: "print-this-chapter",
462
+ printPageBreak: "print-page-break",
459
463
  pronunciationTable: "pronunciation-table",
460
464
  prototypeImages: "prototype-images",
461
465
  qAndA: "q-and-a",
@@ -1238,6 +1242,7 @@ var propertyKeys = {
1238
1242
  property_internalPrintPdf: "@internalPrintPdf",
1239
1243
  property_hasPrintRestriction: "@hasPrintRestriction",
1240
1244
  property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput",
1245
+ property_extractorExtractionTimestamp: "@extractorExtractionTimestamp",
1241
1246
  property_isCaseSensitive: "@isCaseSensitive",
1242
1247
  property_isInfoOnly: "@isInfoOnly",
1243
1248
  property_isPublic: "@isPublic",
@@ -1275,6 +1280,7 @@ var propertyKeys = {
1275
1280
  property_mute: "@mute",
1276
1281
  property_padletId: "@padletId",
1277
1282
  property_page: "@page",
1283
+ property_printParentChapterLevel: "@printParentChapterLevel",
1278
1284
  property_pageNo: "@pageNo",
1279
1285
  property_partialAnswer: "@partialAnswer",
1280
1286
  property_partner: "@partner",
@@ -3414,6 +3420,12 @@ var GROUPS = {
3414
3420
  description: "If true, prioritize new content over legacy content from the instance API",
3415
3421
  format: TagFormat.boolean,
3416
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
3417
3429
  }
3418
3430
  ]
3419
3431
  },
@@ -6789,6 +6801,41 @@ var BITS = {
6789
6801
  baseBitType: BitType.article,
6790
6802
  description: "Preparation note bit, used to provide preparation notes in articles or books"
6791
6803
  },
6804
+ [BitType.printThisBook]: {
6805
+ since: "5.4.0",
6806
+ baseBitType: BitType._standard,
6807
+ description: "Print this book bit, used to create a button that prints the entire book",
6808
+ tags: [
6809
+ {
6810
+ key: ConfigKey.property_buttonCaption,
6811
+ description: "The caption of the print button",
6812
+ format: TagFormat.plainText
6813
+ }
6814
+ ]
6815
+ },
6816
+ [BitType.printThisChapter]: {
6817
+ since: "5.4.0",
6818
+ baseBitType: BitType._standard,
6819
+ description: "Print this chapter bit, used to create a button that prints the current chapter",
6820
+ tags: [
6821
+ {
6822
+ key: ConfigKey.property_buttonCaption,
6823
+ description: "The caption of the print button",
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"
6831
+ }
6832
+ ]
6833
+ },
6834
+ [BitType.printPageBreak]: {
6835
+ since: "5.4.0",
6836
+ baseBitType: BitType.separator,
6837
+ description: "Print page break bit, used to create page breaks for printing in articles or books"
6838
+ },
6792
6839
  [BitType.releaseNotesSummary]: {
6793
6840
  since: "1.3.0",
6794
6841
  baseBitType: BitType.article,
@@ -7361,6 +7408,39 @@ var BITS = {
7361
7408
  }
7362
7409
  ]
7363
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
+ },
7364
7444
  [BitType.openBookChapter]: {
7365
7445
  since: "4.16.0",
7366
7446
  baseBitType: BitType.pageOpenBook,
@@ -10256,7 +10336,7 @@ var instance2 = new Config();
10256
10336
  // src/generated/package_info.ts
10257
10337
  var PACKAGE_INFO = {
10258
10338
  "name": "@gmb/bitmark-parser-generator",
10259
- "version": "5.3.2",
10339
+ "version": "5.5.0",
10260
10340
  "author": "Get More Brain Ltd",
10261
10341
  "license": "ISC",
10262
10342
  "description": "A bitmark parser and generator using Peggy.js"
@@ -10879,6 +10959,8 @@ var NodeType = {
10879
10959
  hasPrintRestrictionValue: "hasPrintRestrictionValue",
10880
10960
  enforceUpdateOverUserInput: "enforceUpdateOverUserInput",
10881
10961
  enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue",
10962
+ extractorExtractionTimestamp: "extractorExtractionTimestamp",
10963
+ extractorExtractionTimestampValue: "extractorExtractionTimestampValue",
10882
10964
  isCaseSensitive: "isCaseSensitive",
10883
10965
  isCommented: "isCommented",
10884
10966
  isCorrect: "isCorrect",
@@ -10982,6 +11064,8 @@ var NodeType = {
10982
11064
  pageNumber: "pageNumber",
10983
11065
  pageNumberValue: "pageNumberValue",
10984
11066
  pageValue: "pageValue",
11067
+ printParentChapterLevel: "printParentChapterLevel",
11068
+ printParentChapterLevelValue: "printParentChapterLevelValue",
10985
11069
  pairs: "pairs",
10986
11070
  pairsValue: "pairsValue",
10987
11071
  parent: "parent",
@@ -24761,6 +24845,12 @@ var Builder = class extends BaseBuilder {
24761
24845
  data.enforceUpdateOverUserInput,
24762
24846
  options
24763
24847
  ),
24848
+ extractorExtractionTimestamp: this.toAstProperty(
24849
+ bitType,
24850
+ ConfigKey.property_extractorExtractionTimestamp,
24851
+ data.extractorExtractionTimestamp,
24852
+ options
24853
+ ),
24764
24854
  tocResource: this.toAstProperty(
24765
24855
  bitType,
24766
24856
  ConfigKey.property_tocResource,
@@ -24774,6 +24864,12 @@ var Builder = class extends BaseBuilder {
24774
24864
  options
24775
24865
  ),
24776
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
+ ),
24777
24873
  platformBrandTarget: this.toAstProperty(
24778
24874
  bitType,
24779
24875
  ConfigKey.property_platformBrandTarget,
@@ -30444,6 +30540,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
30444
30540
  BitType.pageFooter,
30445
30541
  BitType.pageOpenBook,
30446
30542
  BitType.pagePerson,
30543
+ BitType.printBook,
30447
30544
  BitType.pageProduct,
30448
30545
  BitType.pageProductList,
30449
30546
  BitType.pageProductVideo,
@@ -30464,6 +30561,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
30464
30561
  if (instance2.isOfBitType(bitType, BitType.tocContent)) {
30465
30562
  if (bitJson.tocContent == null) bitJson.tocContent = [];
30466
30563
  }
30564
+ if (instance2.isOfBitType(bitType, BitType.printThisChapter)) {
30565
+ if (bitJson.printParentChapterLevel == null) bitJson.printParentChapterLevel = -1;
30566
+ }
30467
30567
  if (instance2.isOfBitType(bitType, BitType.book)) {
30468
30568
  if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
30469
30569
  if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;