@gmb/bitmark-parser-generator 5.1.0 → 5.2.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/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +82 -6
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +21 -3
- package/dist/browser/esm/index.d.ts +21 -3
- package/dist/browser/esm/index.js +82 -6
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +82 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +82 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +82 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -585,6 +585,7 @@ declare const BitType: {
|
|
|
585
585
|
readonly trueFalse: "true-false";
|
|
586
586
|
readonly trueFalse1: "true-false-1";
|
|
587
587
|
readonly vendorAmcharts5Chart: "vendor-amcharts-5-chart";
|
|
588
|
+
readonly vendorDatadogDashboard: "vendor-datadog-dashboard";
|
|
588
589
|
readonly vendorDatadogDashboardEmbed: "vendor-datadog-dashboard-embed";
|
|
589
590
|
readonly vendorFormbricksEmbed: "vendor-formbricks-embed";
|
|
590
591
|
readonly vendorFormbricksLink: "vendor-formbricks-link";
|
|
@@ -808,6 +809,7 @@ declare const ConfigKey: {
|
|
|
808
809
|
readonly property_internalComment: "@internalComment";
|
|
809
810
|
readonly property_internalPrintPdf: "@internalPrintPdf";
|
|
810
811
|
readonly property_hasPrintRestriction: "@hasPrintRestriction";
|
|
812
|
+
readonly property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput";
|
|
811
813
|
readonly property_isCaseSensitive: "@isCaseSensitive";
|
|
812
814
|
readonly property_isInfoOnly: "@isInfoOnly";
|
|
813
815
|
readonly property_isPublic: "@isPublic";
|
|
@@ -834,6 +836,7 @@ declare const ConfigKey: {
|
|
|
834
836
|
readonly property_listItemIndent: "@listItemIndent";
|
|
835
837
|
readonly property_location: "@location";
|
|
836
838
|
readonly property_machineTranslated: "@machineTranslated";
|
|
839
|
+
readonly property_translationOf: "@translationOf";
|
|
837
840
|
readonly property_spansPageBreak: "@spansPageBreak";
|
|
838
841
|
readonly property_mailingList: "@mailingList";
|
|
839
842
|
readonly property_mark: "@mark";
|
|
@@ -1613,6 +1616,7 @@ interface BitJson {
|
|
|
1613
1616
|
isEditable: boolean;
|
|
1614
1617
|
aiGenerated: boolean;
|
|
1615
1618
|
machineTranslated: string;
|
|
1619
|
+
translationOf: string;
|
|
1616
1620
|
spansPageBreak: boolean;
|
|
1617
1621
|
searchIndex: string | string[];
|
|
1618
1622
|
analyticsTag: string | string[];
|
|
@@ -1783,6 +1787,7 @@ interface BitJson {
|
|
|
1783
1787
|
sourceDocument: string;
|
|
1784
1788
|
internalPrintPdf: string;
|
|
1785
1789
|
hasPrintRestriction: boolean;
|
|
1790
|
+
enforceUpdateOverUserInput: boolean;
|
|
1786
1791
|
tocResource: string | string[];
|
|
1787
1792
|
tocContent: string | string[];
|
|
1788
1793
|
page: string;
|
|
@@ -2212,6 +2217,7 @@ interface Bit {
|
|
|
2212
2217
|
isEditable?: Property;
|
|
2213
2218
|
aiGenerated?: Property;
|
|
2214
2219
|
machineTranslated?: Property;
|
|
2220
|
+
translationOf?: Property;
|
|
2215
2221
|
spansPageBreak?: Property;
|
|
2216
2222
|
searchIndex?: Property;
|
|
2217
2223
|
analyticsTag?: Property;
|
|
@@ -2393,6 +2399,7 @@ interface Bit {
|
|
|
2393
2399
|
sourceDocument?: Property;
|
|
2394
2400
|
internalPrintPdf?: Property;
|
|
2395
2401
|
hasPrintRestriction?: Property;
|
|
2402
|
+
enforceUpdateOverUserInput?: Property;
|
|
2396
2403
|
tocResource?: Property;
|
|
2397
2404
|
tocContent?: Property;
|
|
2398
2405
|
page?: Property;
|
|
@@ -2798,6 +2805,8 @@ declare const NodeType: {
|
|
|
2798
2805
|
readonly internalPrintPdfValue: "internalPrintPdfValue";
|
|
2799
2806
|
readonly hasPrintRestriction: "hasPrintRestriction";
|
|
2800
2807
|
readonly hasPrintRestrictionValue: "hasPrintRestrictionValue";
|
|
2808
|
+
readonly enforceUpdateOverUserInput: "enforceUpdateOverUserInput";
|
|
2809
|
+
readonly enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue";
|
|
2801
2810
|
readonly isCaseSensitive: "isCaseSensitive";
|
|
2802
2811
|
readonly isCommented: "isCommented";
|
|
2803
2812
|
readonly isCorrect: "isCorrect";
|
|
@@ -2864,6 +2873,8 @@ declare const NodeType: {
|
|
|
2864
2873
|
readonly locationValue: "locationValue";
|
|
2865
2874
|
readonly machineTranslated: "machineTranslated";
|
|
2866
2875
|
readonly machineTranslatedValue: "machineTranslatedValue";
|
|
2876
|
+
readonly translationOf: "translationOf";
|
|
2877
|
+
readonly translationOfValue: "translationOfValue";
|
|
2867
2878
|
readonly spansPageBreak: "spansPageBreak";
|
|
2868
2879
|
readonly spansPageBreakValue: "spansPageBreakValue";
|
|
2869
2880
|
readonly mailingList: "mailingList";
|
|
@@ -3445,6 +3456,7 @@ interface TextOptions {
|
|
|
3445
3456
|
type GenerateOptions = {
|
|
3446
3457
|
plainTextDividerAllowed?: boolean;
|
|
3447
3458
|
noBreakscaping?: boolean;
|
|
3459
|
+
forceInline?: boolean;
|
|
3448
3460
|
};
|
|
3449
3461
|
declare const Stage: {
|
|
3450
3462
|
enter: string;
|
|
@@ -3464,6 +3476,7 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3464
3476
|
protected ast: Ast;
|
|
3465
3477
|
private bitmarkVersion;
|
|
3466
3478
|
private options;
|
|
3479
|
+
private internalTextGenerator;
|
|
3467
3480
|
private generateOptions;
|
|
3468
3481
|
private textFormat;
|
|
3469
3482
|
private textLocation;
|
|
@@ -3478,6 +3491,7 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3478
3491
|
private exitedCodeBlock;
|
|
3479
3492
|
private inBulletList;
|
|
3480
3493
|
private inInline;
|
|
3494
|
+
private markDepth;
|
|
3481
3495
|
private textDepth;
|
|
3482
3496
|
private placeholderIndex;
|
|
3483
3497
|
private placeholders;
|
|
@@ -3519,6 +3533,8 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3519
3533
|
protected enter_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
|
|
3520
3534
|
protected between_contentValueValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void;
|
|
3521
3535
|
protected exit_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
|
|
3536
|
+
protected enter_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
|
|
3537
|
+
protected exit_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
|
|
3522
3538
|
protected handleEnterNode(node: TextNode, route: NodeInfo[]): void | false;
|
|
3523
3539
|
protected handleBetweenNode(node: TextNode, _left: NodeInfo, _right: NodeInfo, _route: NodeInfo[]): void;
|
|
3524
3540
|
protected handleExitNode(node: TextNode, _route: NodeInfo[]): void | false;
|
|
@@ -3585,7 +3601,7 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3585
3601
|
* @param node the text node
|
|
3586
3602
|
* @param start true if starting (before) the text, false if ending (after) the text
|
|
3587
3603
|
*/
|
|
3588
|
-
protected writeMarks(node: TextNode, stage: StageType): void;
|
|
3604
|
+
protected writeMarks(node: TextNode, stage: StageType): void | false;
|
|
3589
3605
|
protected writeParagraph(node: TextNode): void;
|
|
3590
3606
|
protected writeHardBreak(_node: TextNode): void;
|
|
3591
3607
|
protected writeHeading(node: HeadingTextNode): void;
|
|
@@ -3601,8 +3617,8 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3601
3617
|
protected writeRefMark(mark: RefMark): void;
|
|
3602
3618
|
protected writeXRefMark(mark: XRefMark): void;
|
|
3603
3619
|
protected writeExtRefMark(mark: ExtRefMark): void;
|
|
3604
|
-
protected writeFootnoteMark(
|
|
3605
|
-
protected writeFootnoteStarMark(
|
|
3620
|
+
protected writeFootnoteMark(mark: FootnoteMark): void;
|
|
3621
|
+
protected writeFootnoteStarMark(mark: FootnoteMark): void;
|
|
3606
3622
|
protected writeSymbolMark(mark: SymbolMark): void;
|
|
3607
3623
|
protected writeInlineMarkStartEnd(): void;
|
|
3608
3624
|
protected writePlainTextDivider(): void;
|
|
@@ -4009,6 +4025,7 @@ declare class Builder extends BaseBuilder {
|
|
|
4009
4025
|
isEditable?: boolean;
|
|
4010
4026
|
aiGenerated?: boolean;
|
|
4011
4027
|
machineTranslated?: string;
|
|
4028
|
+
translationOf?: string;
|
|
4012
4029
|
spansPageBreak?: boolean;
|
|
4013
4030
|
searchIndex?: string | string[];
|
|
4014
4031
|
analyticsTag?: string | string[];
|
|
@@ -4185,6 +4202,7 @@ declare class Builder extends BaseBuilder {
|
|
|
4185
4202
|
sourceDocument?: string;
|
|
4186
4203
|
internalPrintPdf?: string;
|
|
4187
4204
|
hasPrintRestriction?: boolean;
|
|
4205
|
+
enforceUpdateOverUserInput?: boolean;
|
|
4188
4206
|
tocResource?: string | string[];
|
|
4189
4207
|
tocContent?: string | string[];
|
|
4190
4208
|
page?: string | string[];
|
|
@@ -585,6 +585,7 @@ declare const BitType: {
|
|
|
585
585
|
readonly trueFalse: "true-false";
|
|
586
586
|
readonly trueFalse1: "true-false-1";
|
|
587
587
|
readonly vendorAmcharts5Chart: "vendor-amcharts-5-chart";
|
|
588
|
+
readonly vendorDatadogDashboard: "vendor-datadog-dashboard";
|
|
588
589
|
readonly vendorDatadogDashboardEmbed: "vendor-datadog-dashboard-embed";
|
|
589
590
|
readonly vendorFormbricksEmbed: "vendor-formbricks-embed";
|
|
590
591
|
readonly vendorFormbricksLink: "vendor-formbricks-link";
|
|
@@ -808,6 +809,7 @@ declare const ConfigKey: {
|
|
|
808
809
|
readonly property_internalComment: "@internalComment";
|
|
809
810
|
readonly property_internalPrintPdf: "@internalPrintPdf";
|
|
810
811
|
readonly property_hasPrintRestriction: "@hasPrintRestriction";
|
|
812
|
+
readonly property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput";
|
|
811
813
|
readonly property_isCaseSensitive: "@isCaseSensitive";
|
|
812
814
|
readonly property_isInfoOnly: "@isInfoOnly";
|
|
813
815
|
readonly property_isPublic: "@isPublic";
|
|
@@ -834,6 +836,7 @@ declare const ConfigKey: {
|
|
|
834
836
|
readonly property_listItemIndent: "@listItemIndent";
|
|
835
837
|
readonly property_location: "@location";
|
|
836
838
|
readonly property_machineTranslated: "@machineTranslated";
|
|
839
|
+
readonly property_translationOf: "@translationOf";
|
|
837
840
|
readonly property_spansPageBreak: "@spansPageBreak";
|
|
838
841
|
readonly property_mailingList: "@mailingList";
|
|
839
842
|
readonly property_mark: "@mark";
|
|
@@ -1613,6 +1616,7 @@ interface BitJson {
|
|
|
1613
1616
|
isEditable: boolean;
|
|
1614
1617
|
aiGenerated: boolean;
|
|
1615
1618
|
machineTranslated: string;
|
|
1619
|
+
translationOf: string;
|
|
1616
1620
|
spansPageBreak: boolean;
|
|
1617
1621
|
searchIndex: string | string[];
|
|
1618
1622
|
analyticsTag: string | string[];
|
|
@@ -1783,6 +1787,7 @@ interface BitJson {
|
|
|
1783
1787
|
sourceDocument: string;
|
|
1784
1788
|
internalPrintPdf: string;
|
|
1785
1789
|
hasPrintRestriction: boolean;
|
|
1790
|
+
enforceUpdateOverUserInput: boolean;
|
|
1786
1791
|
tocResource: string | string[];
|
|
1787
1792
|
tocContent: string | string[];
|
|
1788
1793
|
page: string;
|
|
@@ -2212,6 +2217,7 @@ interface Bit {
|
|
|
2212
2217
|
isEditable?: Property;
|
|
2213
2218
|
aiGenerated?: Property;
|
|
2214
2219
|
machineTranslated?: Property;
|
|
2220
|
+
translationOf?: Property;
|
|
2215
2221
|
spansPageBreak?: Property;
|
|
2216
2222
|
searchIndex?: Property;
|
|
2217
2223
|
analyticsTag?: Property;
|
|
@@ -2393,6 +2399,7 @@ interface Bit {
|
|
|
2393
2399
|
sourceDocument?: Property;
|
|
2394
2400
|
internalPrintPdf?: Property;
|
|
2395
2401
|
hasPrintRestriction?: Property;
|
|
2402
|
+
enforceUpdateOverUserInput?: Property;
|
|
2396
2403
|
tocResource?: Property;
|
|
2397
2404
|
tocContent?: Property;
|
|
2398
2405
|
page?: Property;
|
|
@@ -2798,6 +2805,8 @@ declare const NodeType: {
|
|
|
2798
2805
|
readonly internalPrintPdfValue: "internalPrintPdfValue";
|
|
2799
2806
|
readonly hasPrintRestriction: "hasPrintRestriction";
|
|
2800
2807
|
readonly hasPrintRestrictionValue: "hasPrintRestrictionValue";
|
|
2808
|
+
readonly enforceUpdateOverUserInput: "enforceUpdateOverUserInput";
|
|
2809
|
+
readonly enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue";
|
|
2801
2810
|
readonly isCaseSensitive: "isCaseSensitive";
|
|
2802
2811
|
readonly isCommented: "isCommented";
|
|
2803
2812
|
readonly isCorrect: "isCorrect";
|
|
@@ -2864,6 +2873,8 @@ declare const NodeType: {
|
|
|
2864
2873
|
readonly locationValue: "locationValue";
|
|
2865
2874
|
readonly machineTranslated: "machineTranslated";
|
|
2866
2875
|
readonly machineTranslatedValue: "machineTranslatedValue";
|
|
2876
|
+
readonly translationOf: "translationOf";
|
|
2877
|
+
readonly translationOfValue: "translationOfValue";
|
|
2867
2878
|
readonly spansPageBreak: "spansPageBreak";
|
|
2868
2879
|
readonly spansPageBreakValue: "spansPageBreakValue";
|
|
2869
2880
|
readonly mailingList: "mailingList";
|
|
@@ -3445,6 +3456,7 @@ interface TextOptions {
|
|
|
3445
3456
|
type GenerateOptions = {
|
|
3446
3457
|
plainTextDividerAllowed?: boolean;
|
|
3447
3458
|
noBreakscaping?: boolean;
|
|
3459
|
+
forceInline?: boolean;
|
|
3448
3460
|
};
|
|
3449
3461
|
declare const Stage: {
|
|
3450
3462
|
enter: string;
|
|
@@ -3464,6 +3476,7 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3464
3476
|
protected ast: Ast;
|
|
3465
3477
|
private bitmarkVersion;
|
|
3466
3478
|
private options;
|
|
3479
|
+
private internalTextGenerator;
|
|
3467
3480
|
private generateOptions;
|
|
3468
3481
|
private textFormat;
|
|
3469
3482
|
private textLocation;
|
|
@@ -3478,6 +3491,7 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3478
3491
|
private exitedCodeBlock;
|
|
3479
3492
|
private inBulletList;
|
|
3480
3493
|
private inInline;
|
|
3494
|
+
private markDepth;
|
|
3481
3495
|
private textDepth;
|
|
3482
3496
|
private placeholderIndex;
|
|
3483
3497
|
private placeholders;
|
|
@@ -3519,6 +3533,8 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3519
3533
|
protected enter_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
|
|
3520
3534
|
protected between_contentValueValue(node: NodeInfo, left: NodeInfo, right: NodeInfo, route: NodeInfo[]): void;
|
|
3521
3535
|
protected exit_contentValueValue(node: NodeInfo, route: NodeInfo[]): void | false;
|
|
3536
|
+
protected enter_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
|
|
3537
|
+
protected exit_marks(_node: NodeInfo, _route: NodeInfo[]): void | false;
|
|
3522
3538
|
protected handleEnterNode(node: TextNode, route: NodeInfo[]): void | false;
|
|
3523
3539
|
protected handleBetweenNode(node: TextNode, _left: NodeInfo, _right: NodeInfo, _route: NodeInfo[]): void;
|
|
3524
3540
|
protected handleExitNode(node: TextNode, _route: NodeInfo[]): void | false;
|
|
@@ -3585,7 +3601,7 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3585
3601
|
* @param node the text node
|
|
3586
3602
|
* @param start true if starting (before) the text, false if ending (after) the text
|
|
3587
3603
|
*/
|
|
3588
|
-
protected writeMarks(node: TextNode, stage: StageType): void;
|
|
3604
|
+
protected writeMarks(node: TextNode, stage: StageType): void | false;
|
|
3589
3605
|
protected writeParagraph(node: TextNode): void;
|
|
3590
3606
|
protected writeHardBreak(_node: TextNode): void;
|
|
3591
3607
|
protected writeHeading(node: HeadingTextNode): void;
|
|
@@ -3601,8 +3617,8 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
|
|
|
3601
3617
|
protected writeRefMark(mark: RefMark): void;
|
|
3602
3618
|
protected writeXRefMark(mark: XRefMark): void;
|
|
3603
3619
|
protected writeExtRefMark(mark: ExtRefMark): void;
|
|
3604
|
-
protected writeFootnoteMark(
|
|
3605
|
-
protected writeFootnoteStarMark(
|
|
3620
|
+
protected writeFootnoteMark(mark: FootnoteMark): void;
|
|
3621
|
+
protected writeFootnoteStarMark(mark: FootnoteMark): void;
|
|
3606
3622
|
protected writeSymbolMark(mark: SymbolMark): void;
|
|
3607
3623
|
protected writeInlineMarkStartEnd(): void;
|
|
3608
3624
|
protected writePlainTextDivider(): void;
|
|
@@ -4009,6 +4025,7 @@ declare class Builder extends BaseBuilder {
|
|
|
4009
4025
|
isEditable?: boolean;
|
|
4010
4026
|
aiGenerated?: boolean;
|
|
4011
4027
|
machineTranslated?: string;
|
|
4028
|
+
translationOf?: string;
|
|
4012
4029
|
spansPageBreak?: boolean;
|
|
4013
4030
|
searchIndex?: string | string[];
|
|
4014
4031
|
analyticsTag?: string | string[];
|
|
@@ -4185,6 +4202,7 @@ declare class Builder extends BaseBuilder {
|
|
|
4185
4202
|
sourceDocument?: string;
|
|
4186
4203
|
internalPrintPdf?: string;
|
|
4187
4204
|
hasPrintRestriction?: boolean;
|
|
4205
|
+
enforceUpdateOverUserInput?: boolean;
|
|
4188
4206
|
tocResource?: string | string[];
|
|
4189
4207
|
tocContent?: string | string[];
|
|
4190
4208
|
page?: string | string[];
|
|
@@ -594,6 +594,7 @@ var BitType = {
|
|
|
594
594
|
trueFalse: "true-false",
|
|
595
595
|
trueFalse1: "true-false-1",
|
|
596
596
|
vendorAmcharts5Chart: "vendor-amcharts-5-chart",
|
|
597
|
+
vendorDatadogDashboard: "vendor-datadog-dashboard",
|
|
597
598
|
vendorDatadogDashboardEmbed: "vendor-datadog-dashboard-embed",
|
|
598
599
|
vendorFormbricksEmbed: "vendor-formbricks-embed",
|
|
599
600
|
vendorFormbricksLink: "vendor-formbricks-link",
|
|
@@ -1233,6 +1234,7 @@ var propertyKeys = {
|
|
|
1233
1234
|
property_internalComment: "@internalComment",
|
|
1234
1235
|
property_internalPrintPdf: "@internalPrintPdf",
|
|
1235
1236
|
property_hasPrintRestriction: "@hasPrintRestriction",
|
|
1237
|
+
property_enforceUpdateOverUserInput: "@enforceUpdateOverUserInput",
|
|
1236
1238
|
property_isCaseSensitive: "@isCaseSensitive",
|
|
1237
1239
|
property_isInfoOnly: "@isInfoOnly",
|
|
1238
1240
|
property_isPublic: "@isPublic",
|
|
@@ -1259,6 +1261,7 @@ var propertyKeys = {
|
|
|
1259
1261
|
property_listItemIndent: "@listItemIndent",
|
|
1260
1262
|
property_location: "@location",
|
|
1261
1263
|
property_machineTranslated: "@machineTranslated",
|
|
1264
|
+
property_translationOf: "@translationOf",
|
|
1262
1265
|
property_spansPageBreak: "@spansPageBreak",
|
|
1263
1266
|
property_mailingList: "@mailingList",
|
|
1264
1267
|
property_mark: "@mark",
|
|
@@ -2746,6 +2749,11 @@ var GROUPS = {
|
|
|
2746
2749
|
description: "If true, the bit is machine-translated",
|
|
2747
2750
|
format: TagFormat.plainText
|
|
2748
2751
|
},
|
|
2752
|
+
{
|
|
2753
|
+
key: ConfigKey.property_translationOf,
|
|
2754
|
+
description: "Translation source reference",
|
|
2755
|
+
format: TagFormat.plainText
|
|
2756
|
+
},
|
|
2749
2757
|
{
|
|
2750
2758
|
key: ConfigKey.property_spansPageBreak,
|
|
2751
2759
|
description: "If true, the bit spans a page break",
|
|
@@ -3396,6 +3404,12 @@ var GROUPS = {
|
|
|
3396
3404
|
description: "If true, the book has print restrictions",
|
|
3397
3405
|
format: TagFormat.boolean,
|
|
3398
3406
|
defaultValue: "true"
|
|
3407
|
+
},
|
|
3408
|
+
{
|
|
3409
|
+
key: ConfigKey.property_enforceUpdateOverUserInput,
|
|
3410
|
+
description: "If true, prioritize new content over legacy content from the instance API",
|
|
3411
|
+
format: TagFormat.boolean,
|
|
3412
|
+
defaultValue: "false"
|
|
3399
3413
|
}
|
|
3400
3414
|
]
|
|
3401
3415
|
},
|
|
@@ -9584,6 +9598,11 @@ var BITS = {
|
|
|
9584
9598
|
description: "AmCharts 5 chart bit, used to embed AmCharts 5 charts in articles or books",
|
|
9585
9599
|
textFormatDefault: TextFormat2.json
|
|
9586
9600
|
},
|
|
9601
|
+
[BitType.vendorDatadogDashboard]: {
|
|
9602
|
+
since: "5.2.0",
|
|
9603
|
+
baseBitType: BitType.nonProductionPrototypeIframe,
|
|
9604
|
+
description: "A Datadog dashboard bit, used to embed Datadog dashboards"
|
|
9605
|
+
},
|
|
9587
9606
|
[BitType.vendorDatadogDashboardEmbed]: {
|
|
9588
9607
|
since: "3.12.0",
|
|
9589
9608
|
baseBitType: BitType.code,
|
|
@@ -10213,7 +10232,7 @@ var instance2 = new Config();
|
|
|
10213
10232
|
// src/generated/package_info.ts
|
|
10214
10233
|
var PACKAGE_INFO = {
|
|
10215
10234
|
"name": "@gmb/bitmark-parser-generator",
|
|
10216
|
-
"version": "5.
|
|
10235
|
+
"version": "5.2.0",
|
|
10217
10236
|
"author": "Get More Brain Ltd",
|
|
10218
10237
|
"license": "ISC",
|
|
10219
10238
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -10834,6 +10853,8 @@ var NodeType = {
|
|
|
10834
10853
|
internalPrintPdfValue: "internalPrintPdfValue",
|
|
10835
10854
|
hasPrintRestriction: "hasPrintRestriction",
|
|
10836
10855
|
hasPrintRestrictionValue: "hasPrintRestrictionValue",
|
|
10856
|
+
enforceUpdateOverUserInput: "enforceUpdateOverUserInput",
|
|
10857
|
+
enforceUpdateOverUserInputValue: "enforceUpdateOverUserInputValue",
|
|
10837
10858
|
isCaseSensitive: "isCaseSensitive",
|
|
10838
10859
|
isCommented: "isCommented",
|
|
10839
10860
|
isCorrect: "isCorrect",
|
|
@@ -10900,6 +10921,8 @@ var NodeType = {
|
|
|
10900
10921
|
locationValue: "locationValue",
|
|
10901
10922
|
machineTranslated: "machineTranslated",
|
|
10902
10923
|
machineTranslatedValue: "machineTranslatedValue",
|
|
10924
|
+
translationOf: "translationOf",
|
|
10925
|
+
translationOfValue: "translationOfValue",
|
|
10903
10926
|
spansPageBreak: "spansPageBreak",
|
|
10904
10927
|
spansPageBreakValue: "spansPageBreakValue",
|
|
10905
10928
|
mailingList: "mailingList",
|
|
@@ -12019,7 +12042,7 @@ var Stage = {
|
|
|
12019
12042
|
between: "between",
|
|
12020
12043
|
exit: "exit"
|
|
12021
12044
|
};
|
|
12022
|
-
var TextGenerator = class extends AstWalkerGenerator {
|
|
12045
|
+
var TextGenerator = class _TextGenerator extends AstWalkerGenerator {
|
|
12023
12046
|
/**
|
|
12024
12047
|
* Generate text from a bitmark text AST
|
|
12025
12048
|
*
|
|
@@ -12031,6 +12054,7 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12031
12054
|
__publicField(this, "ast", new Ast());
|
|
12032
12055
|
__publicField(this, "bitmarkVersion");
|
|
12033
12056
|
__publicField(this, "options");
|
|
12057
|
+
__publicField(this, "internalTextGenerator", null);
|
|
12034
12058
|
// State
|
|
12035
12059
|
__publicField(this, "generateOptions", {});
|
|
12036
12060
|
__publicField(this, "textFormat", TextFormat2.bitmarkText);
|
|
@@ -12046,6 +12070,7 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12046
12070
|
__publicField(this, "exitedCodeBlock", false);
|
|
12047
12071
|
__publicField(this, "inBulletList", false);
|
|
12048
12072
|
__publicField(this, "inInline", false);
|
|
12073
|
+
__publicField(this, "markDepth", 0);
|
|
12049
12074
|
__publicField(this, "textDepth", 0);
|
|
12050
12075
|
__publicField(this, "placeholderIndex", 0);
|
|
12051
12076
|
__publicField(this, "placeholders", {});
|
|
@@ -12070,6 +12095,13 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12070
12095
|
this.between = this.between.bind(this);
|
|
12071
12096
|
this.exit = this.exit.bind(this);
|
|
12072
12097
|
this.leaf = this.leaf.bind(this);
|
|
12098
|
+
if (!this.options.isInternal) {
|
|
12099
|
+
this.internalTextGenerator = new _TextGenerator(bitmarkVersion, {
|
|
12100
|
+
...this.options,
|
|
12101
|
+
writeCallback: void 0,
|
|
12102
|
+
isInternal: true
|
|
12103
|
+
});
|
|
12104
|
+
}
|
|
12073
12105
|
}
|
|
12074
12106
|
/**
|
|
12075
12107
|
* Generate text from a bitmark text AST
|
|
@@ -12126,6 +12158,7 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12126
12158
|
this.exitedCodeBlock = false;
|
|
12127
12159
|
this.inBulletList = false;
|
|
12128
12160
|
this.inInline = false;
|
|
12161
|
+
this.markDepth = 0;
|
|
12129
12162
|
this.textDepth = 0;
|
|
12130
12163
|
this.placeholderIndex = 0;
|
|
12131
12164
|
this.placeholders = {};
|
|
@@ -12173,8 +12206,16 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12173
12206
|
exit_contentValueValue(node, route) {
|
|
12174
12207
|
return this.handleExitNode(node.value, route);
|
|
12175
12208
|
}
|
|
12209
|
+
// * -> marks
|
|
12210
|
+
enter_marks(_node, _route) {
|
|
12211
|
+
this.markDepth++;
|
|
12212
|
+
}
|
|
12213
|
+
exit_marks(_node, _route) {
|
|
12214
|
+
this.markDepth--;
|
|
12215
|
+
}
|
|
12176
12216
|
// END NODE HANDLERS
|
|
12177
12217
|
handleEnterNode(node, route) {
|
|
12218
|
+
if (this.markDepth > 0) return;
|
|
12178
12219
|
this.handleEnterNodePreTextCheck(node, route);
|
|
12179
12220
|
this.handleIndent(node);
|
|
12180
12221
|
switch (node.type) {
|
|
@@ -12185,7 +12226,7 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12185
12226
|
case TextNodeType.hardBreak:
|
|
12186
12227
|
this.writeHardBreak(node);
|
|
12187
12228
|
break;
|
|
12188
|
-
case TextNodeType.text:
|
|
12229
|
+
case TextNodeType.text: {
|
|
12189
12230
|
this.writeMarks(node, Stage.enter);
|
|
12190
12231
|
this.writeText(node);
|
|
12191
12232
|
this.writeMarks(node, Stage.between);
|
|
@@ -12194,6 +12235,7 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12194
12235
|
}
|
|
12195
12236
|
this.textDepth++;
|
|
12196
12237
|
break;
|
|
12238
|
+
}
|
|
12197
12239
|
case TextNodeType.heading:
|
|
12198
12240
|
this.writeHeading(node);
|
|
12199
12241
|
this.inHeading = true;
|
|
@@ -12244,6 +12286,7 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12244
12286
|
}
|
|
12245
12287
|
}
|
|
12246
12288
|
handleExitNode(node, _route) {
|
|
12289
|
+
if (this.markDepth > 0) return;
|
|
12247
12290
|
switch (node.type) {
|
|
12248
12291
|
case TextNodeType.text:
|
|
12249
12292
|
this.textDepth--;
|
|
@@ -12550,7 +12593,7 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12550
12593
|
*/
|
|
12551
12594
|
writeMarks(node, stage) {
|
|
12552
12595
|
if (node.marks) {
|
|
12553
|
-
const forceSingleMark = !!(this.inInline || this.inHeading);
|
|
12596
|
+
const forceSingleMark = this.generateOptions.forceInline || !!(this.inInline || this.inHeading);
|
|
12554
12597
|
this.thisNodeIsPreText = false;
|
|
12555
12598
|
const emptyMarks = node.marks.length === 0;
|
|
12556
12599
|
if (emptyMarks) {
|
|
@@ -12781,13 +12824,33 @@ var TextGenerator = class extends AstWalkerGenerator {
|
|
|
12781
12824
|
s += `|provider:${provider}`;
|
|
12782
12825
|
this.write(s);
|
|
12783
12826
|
}
|
|
12784
|
-
writeFootnoteMark(
|
|
12827
|
+
writeFootnoteMark(mark) {
|
|
12785
12828
|
const s = `footnote:`;
|
|
12786
12829
|
this.write(s);
|
|
12830
|
+
const text = this.internalTextGenerator?.generateSync(
|
|
12831
|
+
mark.attrs?.content,
|
|
12832
|
+
this.textFormat,
|
|
12833
|
+
this.textLocation,
|
|
12834
|
+
{
|
|
12835
|
+
...this.generateOptions,
|
|
12836
|
+
forceInline: true
|
|
12837
|
+
}
|
|
12838
|
+
) ?? "";
|
|
12839
|
+
this.write(text);
|
|
12787
12840
|
}
|
|
12788
|
-
writeFootnoteStarMark(
|
|
12841
|
+
writeFootnoteStarMark(mark) {
|
|
12789
12842
|
const s = `footnote*:`;
|
|
12790
12843
|
this.write(s);
|
|
12844
|
+
const text = this.internalTextGenerator?.generateSync(
|
|
12845
|
+
mark.attrs?.content,
|
|
12846
|
+
this.textFormat,
|
|
12847
|
+
this.textLocation,
|
|
12848
|
+
{
|
|
12849
|
+
...this.generateOptions,
|
|
12850
|
+
forceInline: true
|
|
12851
|
+
}
|
|
12852
|
+
) ?? "";
|
|
12853
|
+
this.write(text);
|
|
12791
12854
|
}
|
|
12792
12855
|
writeSymbolMark(mark) {
|
|
12793
12856
|
if (mark.attrs == null) return;
|
|
@@ -23944,6 +24007,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23944
24007
|
data.machineTranslated,
|
|
23945
24008
|
options
|
|
23946
24009
|
),
|
|
24010
|
+
translationOf: this.toAstProperty(
|
|
24011
|
+
bitType,
|
|
24012
|
+
ConfigKey.property_translationOf,
|
|
24013
|
+
data.translationOf,
|
|
24014
|
+
options
|
|
24015
|
+
),
|
|
23947
24016
|
spansPageBreak: this.toAstProperty(
|
|
23948
24017
|
bitType,
|
|
23949
24018
|
ConfigKey.property_spansPageBreak,
|
|
@@ -24660,6 +24729,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24660
24729
|
data.hasPrintRestriction,
|
|
24661
24730
|
options
|
|
24662
24731
|
),
|
|
24732
|
+
enforceUpdateOverUserInput: this.toAstProperty(
|
|
24733
|
+
bitType,
|
|
24734
|
+
ConfigKey.property_enforceUpdateOverUserInput,
|
|
24735
|
+
data.enforceUpdateOverUserInput,
|
|
24736
|
+
options
|
|
24737
|
+
),
|
|
24663
24738
|
tocResource: this.toAstProperty(
|
|
24664
24739
|
bitType,
|
|
24665
24740
|
ConfigKey.property_tocResource,
|
|
@@ -30360,6 +30435,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
30360
30435
|
if (instance2.isOfBitType(bitType, BitType.book)) {
|
|
30361
30436
|
if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
|
|
30362
30437
|
if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
|
|
30438
|
+
if (bitJson.enforceUpdateOverUserInput == null) bitJson.enforceUpdateOverUserInput = false;
|
|
30363
30439
|
if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
|
|
30364
30440
|
if (bitJson.processHandIn == null) bitJson.processHandIn = false;
|
|
30365
30441
|
if (bitJson.isPublic == null) bitJson.isPublic = false;
|