markdown-to-jsx 9.8.1 → 9.9.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/native.d.cts CHANGED
@@ -64,13 +64,15 @@ type RequireAtLeastOne<
64
64
  inList?: boolean;
65
65
  /** true if parsing in an inline context (subset of rules around formatting and links) */
66
66
  inline?: boolean;
67
+ /** internal (react-native renderer): the enclosing subtree is already known inline-safe, so a nested inline container can skip re-deriving it */
68
+ inlineSafe?: boolean;
67
69
  /** use this for the `key` prop */
68
70
  key?: string | number;
69
- /** reference definitions (footnotes are stored with '^' prefix) */
71
+ /** reference definitions (footnotes are stored with '^' prefix); footnotes carry no title */
70
72
  refs?: {
71
73
  [key: string]: {
72
74
  target: string;
73
- title: string;
75
+ title: string | undefined;
74
76
  };
75
77
  };
76
78
  /** current recursion depth during rendering */
@@ -83,8 +85,32 @@ type RequireAtLeastOne<
83
85
  _htmlDepth?: number;
84
86
  /** internal: set by collectReferenceDefinitions when input ends inside an unclosed fence */
85
87
  _endsInsideFence?: boolean;
88
+ /** internal: true when the current block content cannot hold the document's streaming edge, so streaming suppression can be skipped */
89
+ _notAtEdge?: boolean;
90
+ /** internal: enable hard/soft line-break processing in parseInline (paragraph inline content) */
91
+ _breaks?: boolean;
86
92
  /** internal: smallest bare-URL start position known to fail by reaching end-of-input (issue #874); scoped per parseInline call */
87
93
  _inlineUrlFailFrom?: number;
94
+ /** internal: deferred inline parses, drained by the owning parseMarkdown after the block pass so all reference definitions are known */
95
+ _pendingInline?: {
96
+ dest: ASTNode[];
97
+ text: string;
98
+ breaks: boolean;
99
+ inline?: boolean;
100
+ inAnchor?: boolean;
101
+ inHTML?: boolean;
102
+ htmlDepth?: number;
103
+ inList?: boolean;
104
+ inBlockQuote?: boolean;
105
+ noSetext?: boolean;
106
+ depth?: number;
107
+ }[];
108
+ /** internal: deferred list-item unwrap/concat ops, run after _pendingInline drains */
109
+ _pendingOps?: {
110
+ src: ASTNode[];
111
+ dest: ASTNode[];
112
+ unwrap: boolean;
113
+ }[];
88
114
  };
89
115
  /**
90
116
  * Blockquote node in the AST
@@ -179,6 +205,10 @@ type RequireAtLeastOne<
179
205
  type: typeof RuleType.htmlComment;
180
206
  /** Comment text */
181
207
  text: string;
208
+ /** @internal Whether the source comment ended with `>` (empty/special comments) */
209
+ _endsWithGT?: boolean;
210
+ /** @internal Whether the comment should be emitted as raw source text */
211
+ raw?: boolean;
182
212
  }
183
213
  /**
184
214
  * Image node
@@ -241,11 +271,11 @@ type RequireAtLeastOne<
241
271
  */
242
272
  export interface ReferenceCollectionNode {
243
273
  type: typeof RuleType.refCollection;
244
- /** Map of reference labels to their definitions */
274
+ /** Map of reference labels to their definitions; footnotes carry no title */
245
275
  refs: {
246
276
  [key: string]: {
247
277
  target: string;
248
- title: string;
278
+ title: string | undefined;
249
279
  };
250
280
  };
251
281
  }
@@ -302,6 +332,8 @@ type RequireAtLeastOne<
302
332
  _rawAttrs?: string;
303
333
  /** @internal Original raw HTML content (for verbatim blocks) */
304
334
  _rawText?: string | undefined;
335
+ /** @internal rawText is a closed block; the HTML compiler emits the closing tag itself */
336
+ _emitOwnClose?: boolean;
305
337
  /** @deprecated Use `_rawText` instead. This property will be removed in a future major version. */
306
338
  text?: string | undefined;
307
339
  /** HTML tag name */
@@ -549,6 +581,8 @@ interface NativeStyles {
549
581
  heading5?: StyleProp<TextStyle>;
550
582
  heading6?: StyleProp<TextStyle>;
551
583
  link?: StyleProp<TextStyle>;
584
+ /** Footnote reference marker, rendered as a Unicode superscript for numeric identifiers. */
585
+ footnote?: StyleProp<TextStyle>;
552
586
  image?: StyleProp<ImageStyle>;
553
587
  codeBlock?: StyleProp<ViewStyle>;
554
588
  codeInline?: StyleProp<TextStyle>;
@@ -562,13 +596,23 @@ interface NativeStyles {
562
596
  table?: StyleProp<ViewStyle>;
563
597
  tableHeader?: StyleProp<ViewStyle>;
564
598
  tableHeaderCell?: StyleProp<ViewStyle>;
599
+ /** Text run inside header cells, bold by default. */
600
+ tableHeaderText?: StyleProp<TextStyle>;
565
601
  tableRow?: StyleProp<ViewStyle>;
566
602
  tableCell?: StyleProp<ViewStyle>;
603
+ /** Vertical grid divider drawn on every cell but the last in a row. */
604
+ tableCellDivider?: StyleProp<ViewStyle>;
605
+ /** Horizontal grid divider drawn under every row but the last. */
606
+ tableRowDivider?: StyleProp<ViewStyle>;
567
607
  em?: StyleProp<TextStyle>;
568
608
  strong?: StyleProp<TextStyle>;
569
609
  del?: StyleProp<TextStyle>;
570
610
  mark?: StyleProp<TextStyle>;
571
611
  gfmTask?: StyleProp<ViewStyle>;
612
+ /** Accent fill layered over gfmTask when the task is completed. */
613
+ gfmTaskChecked?: StyleProp<ViewStyle>;
614
+ /** Checkmark glyph drawn inside a completed GFM task box. */
615
+ checkmark?: StyleProp<TextStyle>;
572
616
  div?: StyleProp<ViewStyle>;
573
617
  section?: StyleProp<ViewStyle>;
574
618
  article?: StyleProp<ViewStyle>;
package/dist/native.d.ts CHANGED
@@ -64,13 +64,15 @@ type RequireAtLeastOne<
64
64
  inList?: boolean;
65
65
  /** true if parsing in an inline context (subset of rules around formatting and links) */
66
66
  inline?: boolean;
67
+ /** internal (react-native renderer): the enclosing subtree is already known inline-safe, so a nested inline container can skip re-deriving it */
68
+ inlineSafe?: boolean;
67
69
  /** use this for the `key` prop */
68
70
  key?: string | number;
69
- /** reference definitions (footnotes are stored with '^' prefix) */
71
+ /** reference definitions (footnotes are stored with '^' prefix); footnotes carry no title */
70
72
  refs?: {
71
73
  [key: string]: {
72
74
  target: string;
73
- title: string;
75
+ title: string | undefined;
74
76
  };
75
77
  };
76
78
  /** current recursion depth during rendering */
@@ -83,8 +85,32 @@ type RequireAtLeastOne<
83
85
  _htmlDepth?: number;
84
86
  /** internal: set by collectReferenceDefinitions when input ends inside an unclosed fence */
85
87
  _endsInsideFence?: boolean;
88
+ /** internal: true when the current block content cannot hold the document's streaming edge, so streaming suppression can be skipped */
89
+ _notAtEdge?: boolean;
90
+ /** internal: enable hard/soft line-break processing in parseInline (paragraph inline content) */
91
+ _breaks?: boolean;
86
92
  /** internal: smallest bare-URL start position known to fail by reaching end-of-input (issue #874); scoped per parseInline call */
87
93
  _inlineUrlFailFrom?: number;
94
+ /** internal: deferred inline parses, drained by the owning parseMarkdown after the block pass so all reference definitions are known */
95
+ _pendingInline?: {
96
+ dest: ASTNode[];
97
+ text: string;
98
+ breaks: boolean;
99
+ inline?: boolean;
100
+ inAnchor?: boolean;
101
+ inHTML?: boolean;
102
+ htmlDepth?: number;
103
+ inList?: boolean;
104
+ inBlockQuote?: boolean;
105
+ noSetext?: boolean;
106
+ depth?: number;
107
+ }[];
108
+ /** internal: deferred list-item unwrap/concat ops, run after _pendingInline drains */
109
+ _pendingOps?: {
110
+ src: ASTNode[];
111
+ dest: ASTNode[];
112
+ unwrap: boolean;
113
+ }[];
88
114
  };
89
115
  /**
90
116
  * Blockquote node in the AST
@@ -179,6 +205,10 @@ type RequireAtLeastOne<
179
205
  type: typeof RuleType.htmlComment;
180
206
  /** Comment text */
181
207
  text: string;
208
+ /** @internal Whether the source comment ended with `>` (empty/special comments) */
209
+ _endsWithGT?: boolean;
210
+ /** @internal Whether the comment should be emitted as raw source text */
211
+ raw?: boolean;
182
212
  }
183
213
  /**
184
214
  * Image node
@@ -241,11 +271,11 @@ type RequireAtLeastOne<
241
271
  */
242
272
  export interface ReferenceCollectionNode {
243
273
  type: typeof RuleType.refCollection;
244
- /** Map of reference labels to their definitions */
274
+ /** Map of reference labels to their definitions; footnotes carry no title */
245
275
  refs: {
246
276
  [key: string]: {
247
277
  target: string;
248
- title: string;
278
+ title: string | undefined;
249
279
  };
250
280
  };
251
281
  }
@@ -302,6 +332,8 @@ type RequireAtLeastOne<
302
332
  _rawAttrs?: string;
303
333
  /** @internal Original raw HTML content (for verbatim blocks) */
304
334
  _rawText?: string | undefined;
335
+ /** @internal rawText is a closed block; the HTML compiler emits the closing tag itself */
336
+ _emitOwnClose?: boolean;
305
337
  /** @deprecated Use `_rawText` instead. This property will be removed in a future major version. */
306
338
  text?: string | undefined;
307
339
  /** HTML tag name */
@@ -549,6 +581,8 @@ interface NativeStyles {
549
581
  heading5?: StyleProp<TextStyle>;
550
582
  heading6?: StyleProp<TextStyle>;
551
583
  link?: StyleProp<TextStyle>;
584
+ /** Footnote reference marker, rendered as a Unicode superscript for numeric identifiers. */
585
+ footnote?: StyleProp<TextStyle>;
552
586
  image?: StyleProp<ImageStyle>;
553
587
  codeBlock?: StyleProp<ViewStyle>;
554
588
  codeInline?: StyleProp<TextStyle>;
@@ -562,13 +596,23 @@ interface NativeStyles {
562
596
  table?: StyleProp<ViewStyle>;
563
597
  tableHeader?: StyleProp<ViewStyle>;
564
598
  tableHeaderCell?: StyleProp<ViewStyle>;
599
+ /** Text run inside header cells, bold by default. */
600
+ tableHeaderText?: StyleProp<TextStyle>;
565
601
  tableRow?: StyleProp<ViewStyle>;
566
602
  tableCell?: StyleProp<ViewStyle>;
603
+ /** Vertical grid divider drawn on every cell but the last in a row. */
604
+ tableCellDivider?: StyleProp<ViewStyle>;
605
+ /** Horizontal grid divider drawn under every row but the last. */
606
+ tableRowDivider?: StyleProp<ViewStyle>;
567
607
  em?: StyleProp<TextStyle>;
568
608
  strong?: StyleProp<TextStyle>;
569
609
  del?: StyleProp<TextStyle>;
570
610
  mark?: StyleProp<TextStyle>;
571
611
  gfmTask?: StyleProp<ViewStyle>;
612
+ /** Accent fill layered over gfmTask when the task is completed. */
613
+ gfmTaskChecked?: StyleProp<ViewStyle>;
614
+ /** Checkmark glyph drawn inside a completed GFM task box. */
615
+ checkmark?: StyleProp<TextStyle>;
572
616
  div?: StyleProp<ViewStyle>;
573
617
  section?: StyleProp<ViewStyle>;
574
618
  article?: StyleProp<ViewStyle>;