@readme/markdown 14.14.0 → 14.14.1

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "14.14.0",
5
+ "version": "14.14.1",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",
package/types.d.ts CHANGED
@@ -83,12 +83,12 @@ export interface EmbedBlock extends Node {
83
83
  hName: 'Embed' | 'embed';
84
84
  hProperties: Record<string, unknown> & {
85
85
  favicon?: string;
86
- height?:string;
86
+ height?: string;
87
87
  href?: string;
88
88
  html?: string;
89
89
  iframe?: boolean;
90
90
  image?: string;
91
- provider?:string;
91
+ provider?: string;
92
92
  providerName?: string;
93
93
  providerUrl?: string;
94
94
  title: string;
@@ -105,7 +105,7 @@ export interface EmbedBlock extends Node {
105
105
 
106
106
  export interface Figure extends Node {
107
107
  children: [ImageBlock & { url: string }, FigCaption];
108
- data: {
108
+ data: Data & {
109
109
  hName: 'figure';
110
110
  };
111
111
  type: NodeTypes.figure;
@@ -113,7 +113,7 @@ export interface Figure extends Node {
113
113
 
114
114
  export interface FigCaption extends Node {
115
115
  children: BlockContent[];
116
- data: {
116
+ data: Data & {
117
117
  hName: 'figcaption';
118
118
  };
119
119
  type: NodeTypes.figcaption;
@@ -205,7 +205,7 @@ export interface Variable extends Node {
205
205
  }
206
206
 
207
207
  export interface Glossary extends Node {
208
- children: [{ type: 'text'; value: string }];
208
+ children: [Text];
209
209
  data: Data & {
210
210
  hName: 'Glossary';
211
211
  hProperties: { term: string };
@@ -230,6 +230,16 @@ export interface Anchor extends Node {
230
230
  }
231
231
 
232
232
  declare module 'mdast' {
233
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- augmenting mdast's `Data` requires reusing the name
234
+ interface Data {
235
+ /**
236
+ * Marks the root of a re-parsed subtree: this node's and its descendants' positions
237
+ * index into this string rather than the document. Resolve a node's source from its
238
+ * nearest stamped self-or-ancestor; unstamped means `parserReadyContent`.
239
+ */
240
+ reparseSource?: string;
241
+ }
242
+
233
243
  interface BlockContentMap {
234
244
  [NodeTypes.callout]: Callout;
235
245
  [NodeTypes.codeTabs]: CodeTabs;