markdown-codec 3.0.0 → 3.1.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.
Files changed (76) hide show
  1. package/README.md +21 -3
  2. package/dist/ast/ast.cjs +2 -1
  3. package/dist/ast/ast.d.cts +2 -2
  4. package/dist/ast/ast.d.ts +2 -2
  5. package/dist/ast/ast.js +2 -1
  6. package/dist/{ast-DbjiuYr8.d.cts → ast-8XCbjRQT.d.cts} +14 -3
  7. package/dist/{ast-DbjiuYr8.d.ts → ast-8XCbjRQT.d.ts} +14 -3
  8. package/dist/block/block.cjs +79 -28
  9. package/dist/block/block.d.cts +6 -3
  10. package/dist/block/block.d.ts +6 -3
  11. package/dist/block/block.js +79 -28
  12. package/dist/block/definitions.d.cts +1 -1
  13. package/dist/block/definitions.d.ts +1 -1
  14. package/dist/block/node.cjs +2 -0
  15. package/dist/block/node.d.cts +3 -2
  16. package/dist/block/node.d.ts +3 -2
  17. package/dist/block/node.js +2 -0
  18. package/dist/block/table.d.cts +1 -1
  19. package/dist/block/table.d.ts +1 -1
  20. package/dist/diagnostics/diagnostics.cjs +15 -0
  21. package/dist/diagnostics/diagnostics.d.cts +2 -2
  22. package/dist/diagnostics/diagnostics.d.ts +2 -2
  23. package/dist/diagnostics/diagnostics.js +15 -1
  24. package/dist/{diagnostics-B72W0P_E.d.cts → diagnostics-BuO5-SW1.d.cts} +10 -1
  25. package/dist/{diagnostics-B72W0P_E.d.ts → diagnostics-BuO5-SW1.d.ts} +10 -1
  26. package/dist/emit/emit.cjs +77 -7
  27. package/dist/emit/emit.js +79 -9
  28. package/dist/emit/inline.cjs +2 -1
  29. package/dist/emit/inline.d.cts +1 -1
  30. package/dist/emit/inline.d.ts +1 -1
  31. package/dist/emit/inline.js +2 -1
  32. package/dist/emit/table.d.cts +1 -1
  33. package/dist/emit/table.d.ts +1 -1
  34. package/dist/footnote-CKk4JbLk.d.cts +15 -0
  35. package/dist/footnote-CKk4JbLk.d.ts +15 -0
  36. package/dist/html/render.cjs +7 -0
  37. package/dist/html/render.d.cts +1 -1
  38. package/dist/html/render.d.ts +1 -1
  39. package/dist/html/render.js +7 -0
  40. package/dist/index.cjs +2 -0
  41. package/dist/index.d.cts +3 -3
  42. package/dist/index.d.ts +3 -3
  43. package/dist/index.js +3 -3
  44. package/dist/inline/footnote.cjs +30 -0
  45. package/dist/inline/footnote.d.cts +2 -0
  46. package/dist/inline/footnote.d.ts +2 -0
  47. package/dist/inline/footnote.js +27 -0
  48. package/dist/inline/inline.cjs +28 -3
  49. package/dist/inline/inline.d.cts +1 -1
  50. package/dist/inline/inline.d.ts +1 -1
  51. package/dist/inline/inline.js +28 -3
  52. package/dist/inline/node.cjs +1 -0
  53. package/dist/inline/node.d.cts +2 -1
  54. package/dist/inline/node.d.ts +2 -1
  55. package/dist/inline/node.js +1 -0
  56. package/dist/{inline-TuBQ2TUr.d.ts → inline-B_V7bs5j.d.ts} +3 -2
  57. package/dist/{inline-uVHJ5xzT.d.cts → inline-CXVQWQnW.d.cts} +3 -2
  58. package/dist/lower/front-matter.d.cts +1 -1
  59. package/dist/lower/front-matter.d.ts +1 -1
  60. package/dist/lower/inline.cjs +7 -0
  61. package/dist/lower/inline.d.cts +2 -2
  62. package/dist/lower/inline.d.ts +2 -2
  63. package/dist/lower/inline.js +8 -1
  64. package/dist/lower/lower.cjs +51 -0
  65. package/dist/lower/lower.js +51 -0
  66. package/dist/lower/table.d.cts +1 -1
  67. package/dist/lower/table.d.ts +1 -1
  68. package/dist/options/options.d.cts +2 -1
  69. package/dist/options/options.d.ts +2 -1
  70. package/dist/read.d.cts +1 -1
  71. package/dist/read.d.ts +1 -1
  72. package/dist/shared/style-constants.cjs +2 -0
  73. package/dist/shared/style-constants.d.cts +2 -1
  74. package/dist/shared/style-constants.d.ts +2 -1
  75. package/dist/shared/style-constants.js +2 -1
  76. package/package.json +2 -2
@@ -1,10 +1,11 @@
1
- import { g as MarkdownInlineNode } from "./ast-DbjiuYr8.js";
1
+ import { v as MarkdownInlineNode } from "./ast-8XCbjRQT.js";
2
+ import { r as FootnoteLabelSet } from "./footnote-CKk4JbLk.js";
2
3
  import { n as LinkReferenceMap } from "./link-Dv4kxVjk.js";
3
4
  //#region src/inline/inline.d.ts
4
5
  interface InlineParseOptions {
5
6
  readonly gfmAutolinks?: boolean;
6
7
  readonly gfmStrikethrough?: boolean;
7
8
  }
8
- declare function parseInlines(content: string, references: LinkReferenceMap, options?: InlineParseOptions): MarkdownInlineNode[];
9
+ declare function parseInlines(content: string, references: LinkReferenceMap, footnotes: FootnoteLabelSet, options?: InlineParseOptions): MarkdownInlineNode[];
9
10
  //#endregion
10
11
  export { parseInlines as n, InlineParseOptions as t };
@@ -1,10 +1,11 @@
1
- import { g as MarkdownInlineNode } from "./ast-DbjiuYr8.cjs";
1
+ import { v as MarkdownInlineNode } from "./ast-8XCbjRQT.cjs";
2
+ import { r as FootnoteLabelSet } from "./footnote-CKk4JbLk.cjs";
2
3
  import { n as LinkReferenceMap } from "./link-Dv4kxVjk.cjs";
3
4
  //#region src/inline/inline.d.ts
4
5
  interface InlineParseOptions {
5
6
  readonly gfmAutolinks?: boolean;
6
7
  readonly gfmStrikethrough?: boolean;
7
8
  }
8
- declare function parseInlines(content: string, references: LinkReferenceMap, options?: InlineParseOptions): MarkdownInlineNode[];
9
+ declare function parseInlines(content: string, references: LinkReferenceMap, footnotes: FootnoteLabelSet, options?: InlineParseOptions): MarkdownInlineNode[];
9
10
  //#endregion
10
11
  export { parseInlines as n, InlineParseOptions as t };
@@ -1,4 +1,4 @@
1
- import { i as MarkdownDiagnosticSink } from "../diagnostics-B72W0P_E.cjs";
1
+ import { i as MarkdownDiagnosticSink } from "../diagnostics-BuO5-SW1.cjs";
2
2
  import { LayoutMetadata } from "document-schema.js";
3
3
  //#region src/lower/front-matter.d.ts
4
4
  interface FrontMatterResult {
@@ -1,4 +1,4 @@
1
- import { i as MarkdownDiagnosticSink } from "../diagnostics-B72W0P_E.js";
1
+ import { i as MarkdownDiagnosticSink } from "../diagnostics-BuO5-SW1.js";
2
2
  import { LayoutMetadata } from "document-schema.js";
3
3
  //#region src/lower/front-matter.d.ts
4
4
  interface FrontMatterResult {
@@ -53,6 +53,13 @@ function lowerInlineNode(node, style, context) {
53
53
  message: "inline math (\\( \\)) was preserved as literal raw LaTeX text; it is not parsed as LaTeX or converted to MathML by this package"
54
54
  });
55
55
  return [buildRun(node.literal, style, require_shared_style_constants.MATH_INLINE_FONT_MARKER)];
56
+ case "footnoteReference":
57
+ context.sink({
58
+ code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.FOOTNOTE_REFERENCE_PRESERVED_AS_TEXT,
59
+ severity: "info",
60
+ message: `footnote reference "[^${node.label}]" is preserved as a marked text run rather than an anchor construct: a construct's extent is block-scoped, and a reference site sits between two runs inside a paragraph, which no block-level boundary marker can bracket`
61
+ });
62
+ return [buildRun(`[^${node.label}]`, style, require_shared_style_constants.FOOTNOTE_REFERENCE_FONT_MARKER)];
56
63
  case "autolink": {
57
64
  const destination = node.email ? `mailto:${node.destination}` : node.destination;
58
65
  return [buildRun(node.destination, {
@@ -1,5 +1,5 @@
1
- import { g as MarkdownInlineNode } from "../ast-DbjiuYr8.cjs";
2
- import { i as MarkdownDiagnosticSink } from "../diagnostics-B72W0P_E.cjs";
1
+ import { v as MarkdownInlineNode } from "../ast-8XCbjRQT.cjs";
2
+ import { i as MarkdownDiagnosticSink } from "../diagnostics-BuO5-SW1.cjs";
3
3
  import { ContentRun } from "document-schema.js";
4
4
  //#region src/lower/inline.d.ts
5
5
  interface InlineLowerContext {
@@ -1,5 +1,5 @@
1
- import { g as MarkdownInlineNode } from "../ast-DbjiuYr8.js";
2
- import { i as MarkdownDiagnosticSink } from "../diagnostics-B72W0P_E.js";
1
+ import { v as MarkdownInlineNode } from "../ast-8XCbjRQT.js";
2
+ import { i as MarkdownDiagnosticSink } from "../diagnostics-BuO5-SW1.js";
3
3
  import { ContentRun } from "document-schema.js";
4
4
  //#region src/lower/inline.d.ts
5
5
  interface InlineLowerContext {
@@ -1,5 +1,5 @@
1
1
  import { MarkdownDiagnosticCodes } from "../diagnostics/diagnostics.js";
2
- import { MATH_INLINE_FONT_MARKER, MONOSPACE_FONT_FAMILY } from "../shared/style-constants.js";
2
+ import { FOOTNOTE_REFERENCE_FONT_MARKER, MATH_INLINE_FONT_MARKER, MONOSPACE_FONT_FAMILY } from "../shared/style-constants.js";
3
3
  //#region src/lower/inline.ts
4
4
  function buildRun(text, style, fontFamily) {
5
5
  return {
@@ -52,6 +52,13 @@ function lowerInlineNode(node, style, context) {
52
52
  message: "inline math (\\( \\)) was preserved as literal raw LaTeX text; it is not parsed as LaTeX or converted to MathML by this package"
53
53
  });
54
54
  return [buildRun(node.literal, style, MATH_INLINE_FONT_MARKER)];
55
+ case "footnoteReference":
56
+ context.sink({
57
+ code: MarkdownDiagnosticCodes.FOOTNOTE_REFERENCE_PRESERVED_AS_TEXT,
58
+ severity: "info",
59
+ message: `footnote reference "[^${node.label}]" is preserved as a marked text run rather than an anchor construct: a construct's extent is block-scoped, and a reference site sits between two runs inside a paragraph, which no block-level boundary marker can bracket`
60
+ });
61
+ return [buildRun(`[^${node.label}]`, style, FOOTNOTE_REFERENCE_FONT_MARKER)];
55
62
  case "autolink": {
56
63
  const destination = node.email ? `mailto:${node.destination}` : node.destination;
57
64
  return [buildRun(node.destination, {
@@ -230,6 +230,55 @@ function lowerList(node, ancestorNumId, level, context, contentWidthPt) {
230
230
  }
231
231
  return node.children.flatMap((item) => lowerListItem(item, numId, level, context, contentWidthPt));
232
232
  }
233
+ function flattenFootnoteBodyHeadings(node, context) {
234
+ switch (node.type) {
235
+ case "heading":
236
+ context.sink({
237
+ code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.FOOTNOTE_BODY_HEADING_FLATTENED,
238
+ severity: "info",
239
+ message: `a level-${String(node.level)} heading inside a footnote definition's body is carried as literal ATX text: a construct boundary marker's extent may not contain a block that opens or closes a heading scope, so the heading cannot stay a heading inside the anchor construct the definition lowers to`
240
+ });
241
+ return {
242
+ type: "paragraph",
243
+ children: [{
244
+ type: "text",
245
+ value: `${"#".repeat(node.level)} `
246
+ }, ...node.children]
247
+ };
248
+ case "blockquote": return {
249
+ type: "blockquote",
250
+ children: node.children.map((child) => flattenFootnoteBodyHeadings(child, context))
251
+ };
252
+ case "list": return {
253
+ ...node,
254
+ children: node.children.map((item) => flattenFootnoteBodyHeadingsInItem(item, context))
255
+ };
256
+ case "listItem": return flattenFootnoteBodyHeadingsInItem(node, context);
257
+ default: return node;
258
+ }
259
+ }
260
+ function flattenFootnoteBodyHeadingsInItem(item, context) {
261
+ return {
262
+ ...item,
263
+ children: item.children.map((child) => flattenFootnoteBodyHeadings(child, context))
264
+ };
265
+ }
266
+ function lowerFootnoteDefinition(node, context, contentWidthPt) {
267
+ const descriptor = {
268
+ kind: "anchor",
269
+ anchorType: "footnote",
270
+ name: node.label
271
+ };
272
+ const body = node.children.flatMap((child) => lowerBlock(flattenFootnoteBodyHeadings(child, context), context, contentWidthPt));
273
+ return [
274
+ {
275
+ kind: "constructStart",
276
+ descriptor
277
+ },
278
+ ...body,
279
+ { kind: "constructEnd" }
280
+ ];
281
+ }
233
282
  function lowerBlock(node, context, contentWidthPt) {
234
283
  switch (node.type) {
235
284
  case "paragraph": return lowerParagraph(node, context);
@@ -240,6 +289,7 @@ function lowerBlock(node, context, contentWidthPt) {
240
289
  case "thematicBreak": return lowerThematicBreak(context);
241
290
  case "htmlBlock": return lowerHtmlBlock(node, context);
242
291
  case "mathBlock": return lowerMathBlock(node, context);
292
+ case "footnoteDefinition": return lowerFootnoteDefinition(node, context, contentWidthPt);
243
293
  case "table":
244
294
  if (context.list !== void 0) context.sink({
245
295
  code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
@@ -296,6 +346,7 @@ function lowerMarkdown(source, options = {}) {
296
346
  gfmAutolinks: options.gfmAutolinks,
297
347
  gfmStrikethrough: options.gfmStrikethrough,
298
348
  gfmTaskLists: options.gfmTaskLists,
349
+ footnotes: options.footnotes,
299
350
  maxNesting: options.maxBlockNesting,
300
351
  sink
301
352
  };
@@ -229,6 +229,55 @@ function lowerList(node, ancestorNumId, level, context, contentWidthPt) {
229
229
  }
230
230
  return node.children.flatMap((item) => lowerListItem(item, numId, level, context, contentWidthPt));
231
231
  }
232
+ function flattenFootnoteBodyHeadings(node, context) {
233
+ switch (node.type) {
234
+ case "heading":
235
+ context.sink({
236
+ code: MarkdownDiagnosticCodes.FOOTNOTE_BODY_HEADING_FLATTENED,
237
+ severity: "info",
238
+ message: `a level-${String(node.level)} heading inside a footnote definition's body is carried as literal ATX text: a construct boundary marker's extent may not contain a block that opens or closes a heading scope, so the heading cannot stay a heading inside the anchor construct the definition lowers to`
239
+ });
240
+ return {
241
+ type: "paragraph",
242
+ children: [{
243
+ type: "text",
244
+ value: `${"#".repeat(node.level)} `
245
+ }, ...node.children]
246
+ };
247
+ case "blockquote": return {
248
+ type: "blockquote",
249
+ children: node.children.map((child) => flattenFootnoteBodyHeadings(child, context))
250
+ };
251
+ case "list": return {
252
+ ...node,
253
+ children: node.children.map((item) => flattenFootnoteBodyHeadingsInItem(item, context))
254
+ };
255
+ case "listItem": return flattenFootnoteBodyHeadingsInItem(node, context);
256
+ default: return node;
257
+ }
258
+ }
259
+ function flattenFootnoteBodyHeadingsInItem(item, context) {
260
+ return {
261
+ ...item,
262
+ children: item.children.map((child) => flattenFootnoteBodyHeadings(child, context))
263
+ };
264
+ }
265
+ function lowerFootnoteDefinition(node, context, contentWidthPt) {
266
+ const descriptor = {
267
+ kind: "anchor",
268
+ anchorType: "footnote",
269
+ name: node.label
270
+ };
271
+ const body = node.children.flatMap((child) => lowerBlock(flattenFootnoteBodyHeadings(child, context), context, contentWidthPt));
272
+ return [
273
+ {
274
+ kind: "constructStart",
275
+ descriptor
276
+ },
277
+ ...body,
278
+ { kind: "constructEnd" }
279
+ ];
280
+ }
232
281
  function lowerBlock(node, context, contentWidthPt) {
233
282
  switch (node.type) {
234
283
  case "paragraph": return lowerParagraph(node, context);
@@ -239,6 +288,7 @@ function lowerBlock(node, context, contentWidthPt) {
239
288
  case "thematicBreak": return lowerThematicBreak(context);
240
289
  case "htmlBlock": return lowerHtmlBlock(node, context);
241
290
  case "mathBlock": return lowerMathBlock(node, context);
291
+ case "footnoteDefinition": return lowerFootnoteDefinition(node, context, contentWidthPt);
242
292
  case "table":
243
293
  if (context.list !== void 0) context.sink({
244
294
  code: MarkdownDiagnosticCodes.LIST_ITEM_BLOCK_UNLISTED,
@@ -295,6 +345,7 @@ function lowerMarkdown(source, options = {}) {
295
345
  gfmAutolinks: options.gfmAutolinks,
296
346
  gfmStrikethrough: options.gfmStrikethrough,
297
347
  gfmTaskLists: options.gfmTaskLists,
348
+ footnotes: options.footnotes,
298
349
  maxNesting: options.maxBlockNesting,
299
350
  sink
300
351
  };
@@ -1,4 +1,4 @@
1
- import { N as MarkdownTableNode } from "../ast-DbjiuYr8.cjs";
1
+ import { F as MarkdownTableNode } from "../ast-8XCbjRQT.cjs";
2
2
  import { InlineLowerContext } from "./inline.cjs";
3
3
  import { ContentTable } from "document-schema.js";
4
4
  //#region src/lower/table.d.ts
@@ -1,4 +1,4 @@
1
- import { N as MarkdownTableNode } from "../ast-DbjiuYr8.js";
1
+ import { F as MarkdownTableNode } from "../ast-8XCbjRQT.js";
2
2
  import { InlineLowerContext } from "./inline.js";
3
3
  import { ContentTable } from "document-schema.js";
4
4
  //#region src/lower/table.d.ts
@@ -1,4 +1,4 @@
1
- import { i as MarkdownDiagnosticSink } from "../diagnostics-B72W0P_E.cjs";
1
+ import { i as MarkdownDiagnosticSink } from "../diagnostics-BuO5-SW1.cjs";
2
2
  import { n as MarkdownImageResolver } from "../image-C4KYmz_L.cjs";
3
3
  import { Margins, PageSize } from "document-schema.js";
4
4
  //#region src/options/options.d.ts
@@ -14,6 +14,7 @@ interface ReadMarkdownOptions {
14
14
  readonly gfmAutolinks?: boolean;
15
15
  readonly gfmStrikethrough?: boolean;
16
16
  readonly gfmTaskLists?: boolean;
17
+ readonly footnotes?: boolean;
17
18
  readonly maxInputBytes?: number;
18
19
  readonly maxBlockNesting?: number;
19
20
  }
@@ -1,4 +1,4 @@
1
- import { i as MarkdownDiagnosticSink } from "../diagnostics-B72W0P_E.js";
1
+ import { i as MarkdownDiagnosticSink } from "../diagnostics-BuO5-SW1.js";
2
2
  import { n as MarkdownImageResolver } from "../image-Cm3hT5PS.js";
3
3
  import { Margins, PageSize } from "document-schema.js";
4
4
  //#region src/options/options.d.ts
@@ -14,6 +14,7 @@ interface ReadMarkdownOptions {
14
14
  readonly gfmAutolinks?: boolean;
15
15
  readonly gfmStrikethrough?: boolean;
16
16
  readonly gfmTaskLists?: boolean;
17
+ readonly footnotes?: boolean;
17
18
  readonly maxInputBytes?: number;
18
19
  readonly maxBlockNesting?: number;
19
20
  }
package/dist/read.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as MarkdownDiagnostic } from "./diagnostics-B72W0P_E.cjs";
1
+ import { t as MarkdownDiagnostic } from "./diagnostics-BuO5-SW1.cjs";
2
2
  import { ReadMarkdownOptions } from "./options/options.cjs";
3
3
  import { ContentDocument } from "document-schema.js";
4
4
  //#region src/read.d.ts
package/dist/read.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as MarkdownDiagnostic } from "./diagnostics-B72W0P_E.js";
1
+ import { t as MarkdownDiagnostic } from "./diagnostics-BuO5-SW1.js";
2
2
  import { ReadMarkdownOptions } from "./options/options.js";
3
3
  import { ContentDocument } from "document-schema.js";
4
4
  //#region src/read.d.ts
@@ -19,11 +19,13 @@ const HTML_PREFORMATTED_STYLE_ID = "HTMLPreformatted";
19
19
  const MATH_BLOCK_STYLE_ID = "MathBlock";
20
20
  const MONOSPACE_FONT_FAMILY = "Courier New";
21
21
  const MATH_INLINE_FONT_MARKER = "Cambria Math";
22
+ const FOOTNOTE_REFERENCE_FONT_MARKER = "Footnote Reference";
22
23
  const QUOTE_INDENT_PT = 36;
23
24
  const TASK_CHECKBOX_UNCHECKED = "☐";
24
25
  const TASK_CHECKBOX_CHECKED = "☒";
25
26
  //#endregion
26
27
  exports.CODE_BLOCK_STYLE_ID = CODE_BLOCK_STYLE_ID;
28
+ exports.FOOTNOTE_REFERENCE_FONT_MARKER = FOOTNOTE_REFERENCE_FONT_MARKER;
27
29
  exports.HORIZONTAL_RULE_STYLE_ID = HORIZONTAL_RULE_STYLE_ID;
28
30
  exports.HTML_PREFORMATTED_STYLE_ID = HTML_PREFORMATTED_STYLE_ID;
29
31
  exports.MATH_BLOCK_STYLE_ID = MATH_BLOCK_STYLE_ID;
@@ -9,8 +9,9 @@ declare const HTML_PREFORMATTED_STYLE_ID = "HTMLPreformatted";
9
9
  declare const MATH_BLOCK_STYLE_ID = "MathBlock";
10
10
  declare const MONOSPACE_FONT_FAMILY = "Courier New";
11
11
  declare const MATH_INLINE_FONT_MARKER = "Cambria Math";
12
+ declare const FOOTNOTE_REFERENCE_FONT_MARKER = "Footnote Reference";
12
13
  declare const QUOTE_INDENT_PT = 36;
13
14
  declare const TASK_CHECKBOX_UNCHECKED = "☐";
14
15
  declare const TASK_CHECKBOX_CHECKED = "☒";
15
16
  //#endregion
16
- export { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MATH_BLOCK_STYLE_ID, MATH_INLINE_FONT_MARKER, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, TASK_CHECKBOX_CHECKED, TASK_CHECKBOX_UNCHECKED, headingStyleId, parseHeadingStyleId };
17
+ export { CODE_BLOCK_STYLE_ID, FOOTNOTE_REFERENCE_FONT_MARKER, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MATH_BLOCK_STYLE_ID, MATH_INLINE_FONT_MARKER, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, TASK_CHECKBOX_CHECKED, TASK_CHECKBOX_UNCHECKED, headingStyleId, parseHeadingStyleId };
@@ -9,8 +9,9 @@ declare const HTML_PREFORMATTED_STYLE_ID = "HTMLPreformatted";
9
9
  declare const MATH_BLOCK_STYLE_ID = "MathBlock";
10
10
  declare const MONOSPACE_FONT_FAMILY = "Courier New";
11
11
  declare const MATH_INLINE_FONT_MARKER = "Cambria Math";
12
+ declare const FOOTNOTE_REFERENCE_FONT_MARKER = "Footnote Reference";
12
13
  declare const QUOTE_INDENT_PT = 36;
13
14
  declare const TASK_CHECKBOX_UNCHECKED = "☐";
14
15
  declare const TASK_CHECKBOX_CHECKED = "☒";
15
16
  //#endregion
16
- export { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MATH_BLOCK_STYLE_ID, MATH_INLINE_FONT_MARKER, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, TASK_CHECKBOX_CHECKED, TASK_CHECKBOX_UNCHECKED, headingStyleId, parseHeadingStyleId };
17
+ export { CODE_BLOCK_STYLE_ID, FOOTNOTE_REFERENCE_FONT_MARKER, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MATH_BLOCK_STYLE_ID, MATH_INLINE_FONT_MARKER, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, TASK_CHECKBOX_CHECKED, TASK_CHECKBOX_UNCHECKED, headingStyleId, parseHeadingStyleId };
@@ -18,8 +18,9 @@ const HTML_PREFORMATTED_STYLE_ID = "HTMLPreformatted";
18
18
  const MATH_BLOCK_STYLE_ID = "MathBlock";
19
19
  const MONOSPACE_FONT_FAMILY = "Courier New";
20
20
  const MATH_INLINE_FONT_MARKER = "Cambria Math";
21
+ const FOOTNOTE_REFERENCE_FONT_MARKER = "Footnote Reference";
21
22
  const QUOTE_INDENT_PT = 36;
22
23
  const TASK_CHECKBOX_UNCHECKED = "☐";
23
24
  const TASK_CHECKBOX_CHECKED = "☒";
24
25
  //#endregion
25
- export { CODE_BLOCK_STYLE_ID, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MATH_BLOCK_STYLE_ID, MATH_INLINE_FONT_MARKER, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, TASK_CHECKBOX_CHECKED, TASK_CHECKBOX_UNCHECKED, headingStyleId, parseHeadingStyleId };
26
+ export { CODE_BLOCK_STYLE_ID, FOOTNOTE_REFERENCE_FONT_MARKER, HORIZONTAL_RULE_STYLE_ID, HTML_PREFORMATTED_STYLE_ID, MATH_BLOCK_STYLE_ID, MATH_INLINE_FONT_MARKER, MAX_HEADING_STYLE_LEVEL, MONOSPACE_FONT_FAMILY, QUOTE_INDENT_PT, QUOTE_STYLE_ID, TASK_CHECKBOX_CHECKED, TASK_CHECKBOX_UNCHECKED, headingStyleId, parseHeadingStyleId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown-codec",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Hand-written CommonMark+GFM <-> ContentDocument codec, built on document-schema.js",
5
5
  "type": "module",
6
6
  "repository": {
@@ -79,7 +79,7 @@
79
79
  "license": "MIT",
80
80
  "packageManager": "pnpm@11.6.0",
81
81
  "dependencies": {
82
- "document-schema.js": "^4.0.0",
82
+ "document-schema.js": "^4.2.0",
83
83
  "zod": "^4.4.3"
84
84
  },
85
85
  "devDependencies": {