@gmb/bitmark-parser-generator 5.31.0 → 5.32.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.
@@ -1170,6 +1170,7 @@ declare const TextMarkType: {
1170
1170
  readonly del: "del";
1171
1171
  readonly underline: "underline";
1172
1172
  readonly doubleUnderline: "doubleUnderline";
1173
+ readonly smallcaps: "smallcaps";
1173
1174
  readonly circle: "circle";
1174
1175
  readonly languageEmRed: "languageEmRed";
1175
1176
  readonly languageEmOrange: "languageEmOrange";
@@ -1201,6 +1202,7 @@ declare const TextMarkType: {
1201
1202
  readonly timer: "timer";
1202
1203
  readonly duration: "duration";
1203
1204
  readonly color: "color";
1205
+ readonly textStyle: "textStyle";
1204
1206
  readonly colorPicker: "colorPicker";
1205
1207
  readonly comment: "comment";
1206
1208
  };
@@ -3792,6 +3794,27 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
3792
3794
  protected writeLatex(node: LatexTextNode): void;
3793
3795
  protected writeMarkTextWrapper(s: string): void;
3794
3796
  protected writeInlineMark(mark: TextMark): void;
3797
+ /**
3798
+ * Resolve the marks of a text node into the marks that will actually be written.
3799
+ *
3800
+ * - Merges a legacy standalone 'duration' mark into its sibling 'timer' mark.
3801
+ * - Drops marks the current grammar cannot express (standalone 'duration', 'timer'
3802
+ * without a duration).
3803
+ * - Moves a 'textStyle'/'color' mark before a preceding bare 'highlight'/'userHighlight'
3804
+ * mark when its color is a valid highlight color; written in the original order the
3805
+ * output would re-parse as a highlight-with-color compound mark and change meaning.
3806
+ */
3807
+ protected getWritableMarks(nodeMarks: TextMark[]): TextMark[];
3808
+ /**
3809
+ * True if the mark is written using its standard form (e.g. **bold**, !!highlight!!)
3810
+ * when it is the only mark. A highlight mark with a color attribute is excluded - it
3811
+ * can only be expressed using the inline chain form (==text==|highlight|color:x|).
3812
+ */
3813
+ protected isStandardMark(mark: TextMark): boolean;
3814
+ /**
3815
+ * True if the mark is written using the inline chain form (==text==|mark|).
3816
+ */
3817
+ protected isInlineMark(mark: TextMark): boolean;
3795
3818
  protected writeCommentMark(mark: CommentMark): void;
3796
3819
  protected writeLinkMark(mark: LinkMark): void;
3797
3820
  protected writeRefMark(mark: RefMark): void;
@@ -1170,6 +1170,7 @@ declare const TextMarkType: {
1170
1170
  readonly del: "del";
1171
1171
  readonly underline: "underline";
1172
1172
  readonly doubleUnderline: "doubleUnderline";
1173
+ readonly smallcaps: "smallcaps";
1173
1174
  readonly circle: "circle";
1174
1175
  readonly languageEmRed: "languageEmRed";
1175
1176
  readonly languageEmOrange: "languageEmOrange";
@@ -1201,6 +1202,7 @@ declare const TextMarkType: {
1201
1202
  readonly timer: "timer";
1202
1203
  readonly duration: "duration";
1203
1204
  readonly color: "color";
1205
+ readonly textStyle: "textStyle";
1204
1206
  readonly colorPicker: "colorPicker";
1205
1207
  readonly comment: "comment";
1206
1208
  };
@@ -3792,6 +3794,27 @@ declare class TextGenerator extends AstWalkerGenerator<TextAst, BreakscapedStrin
3792
3794
  protected writeLatex(node: LatexTextNode): void;
3793
3795
  protected writeMarkTextWrapper(s: string): void;
3794
3796
  protected writeInlineMark(mark: TextMark): void;
3797
+ /**
3798
+ * Resolve the marks of a text node into the marks that will actually be written.
3799
+ *
3800
+ * - Merges a legacy standalone 'duration' mark into its sibling 'timer' mark.
3801
+ * - Drops marks the current grammar cannot express (standalone 'duration', 'timer'
3802
+ * without a duration).
3803
+ * - Moves a 'textStyle'/'color' mark before a preceding bare 'highlight'/'userHighlight'
3804
+ * mark when its color is a valid highlight color; written in the original order the
3805
+ * output would re-parse as a highlight-with-color compound mark and change meaning.
3806
+ */
3807
+ protected getWritableMarks(nodeMarks: TextMark[]): TextMark[];
3808
+ /**
3809
+ * True if the mark is written using its standard form (e.g. **bold**, !!highlight!!)
3810
+ * when it is the only mark. A highlight mark with a color attribute is excluded - it
3811
+ * can only be expressed using the inline chain form (==text==|highlight|color:x|).
3812
+ */
3813
+ protected isStandardMark(mark: TextMark): boolean;
3814
+ /**
3815
+ * True if the mark is written using the inline chain form (==text==|mark|).
3816
+ */
3817
+ protected isInlineMark(mark: TextMark): boolean;
3795
3818
  protected writeCommentMark(mark: CommentMark): void;
3796
3819
  protected writeLinkMark(mark: LinkMark): void;
3797
3820
  protected writeRefMark(mark: RefMark): void;