@podlite/markdown 0.0.77 → 0.0.79
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/CHANGELOG.podlite +4 -0
- package/lib/index.cjs +16 -16
- package/lib/index.cjs.map +3 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.esm.js +26 -19
- package/lib/index.esm.js.map +2 -2
- package/lib/tools.d.ts +1 -0
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { Plugins } from '@podlite/schema';
|
|
|
2
2
|
import { Plugin } from '@podlite/schema';
|
|
3
3
|
export declare const plugin: Plugin;
|
|
4
4
|
export declare const PluginRegister: Plugins;
|
|
5
|
-
export { md2ast as parseMd } from './tools';
|
|
5
|
+
export { md2ast as parseMd, markdownLinkTargets } from './tools';
|
|
6
6
|
export default plugin;
|
package/lib/index.esm.js
CHANGED
|
@@ -22,11 +22,21 @@ import { mkRootBlock } from "@podlite/schema";
|
|
|
22
22
|
import { assignHeadingKeys } from "@podlite/schema";
|
|
23
23
|
import { mkImage } from "@podlite/schema";
|
|
24
24
|
import { mkFomattingCodeO } from "@podlite/schema";
|
|
25
|
+
var markdownLinkTargets = (src) => {
|
|
26
|
+
const targets = [];
|
|
27
|
+
const walk = (node) => {
|
|
28
|
+
if (["link", "image", "definition"].includes(node.type || "") && typeof node.url === "string")
|
|
29
|
+
targets.push(node.url);
|
|
30
|
+
if (Array.isArray(node.children)) node.children.forEach(walk);
|
|
31
|
+
};
|
|
32
|
+
walk(unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src));
|
|
33
|
+
return targets;
|
|
34
|
+
};
|
|
25
35
|
var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
26
36
|
var _a;
|
|
27
37
|
const md_tree = unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src);
|
|
28
38
|
let definitionMap = {};
|
|
29
|
-
const applyLineOffset = ((offset) => (location) => {
|
|
39
|
+
const applyLineOffset = /* @__PURE__ */ ((offset) => (location) => {
|
|
30
40
|
const { start, end } = location;
|
|
31
41
|
return {
|
|
32
42
|
start: {
|
|
@@ -41,8 +51,7 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
41
51
|
})(lineOffset);
|
|
42
52
|
toAny({ processor: 1 }).use({
|
|
43
53
|
"*:*": (writer, processor) => (node, ctx, interator) => {
|
|
44
|
-
if (node.children)
|
|
45
|
-
interator(node.children, { ...ctx });
|
|
54
|
+
if (node.children) interator(node.children, { ...ctx });
|
|
46
55
|
}
|
|
47
56
|
}).use({
|
|
48
57
|
":definition": (writer, processor) => (node, ctx, interator) => {
|
|
@@ -51,8 +60,7 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
51
60
|
}).run(md_tree);
|
|
52
61
|
const htmlParents = /* @__PURE__ */ new WeakMap();
|
|
53
62
|
const recordParents = (node) => (node.children || []).forEach((child) => {
|
|
54
|
-
if ((child == null ? void 0 : child.type) === "html")
|
|
55
|
-
htmlParents.set(child, node.type || "");
|
|
63
|
+
if ((child == null ? void 0 : child.type) === "html") htmlParents.set(child, node.type || "");
|
|
56
64
|
recordParents(child);
|
|
57
65
|
});
|
|
58
66
|
recordParents(md_tree);
|
|
@@ -61,8 +69,7 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
61
69
|
"*:*": (writer, processor) => (node, ctx, interator) => {
|
|
62
70
|
console.warn("[Podlite:md2ast]- unhandled MD node");
|
|
63
71
|
console.warn(JSON.stringify(node, null, 2));
|
|
64
|
-
if (node.children)
|
|
65
|
-
interator(node.children, { ...ctx });
|
|
72
|
+
if (node.children) interator(node.children, { ...ctx });
|
|
66
73
|
}
|
|
67
74
|
}).use({
|
|
68
75
|
":root": (writer, processor) => (node, ctx, interator) => {
|
|
@@ -174,10 +181,10 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
174
181
|
const { title, alt, url, position, ...attr } = node;
|
|
175
182
|
let config = [];
|
|
176
183
|
const image = mkImage(url, alt);
|
|
177
|
-
if (typeof title === "string")
|
|
178
|
-
image.title = title;
|
|
184
|
+
if (typeof title === "string") image.title = title;
|
|
179
185
|
return mkBlock({ type: "block", name: "Image", config, location: applyLineOffset(position) }, [image]);
|
|
180
186
|
},
|
|
187
|
+
// a rule between blocks is the boundary of Podlite
|
|
181
188
|
":thematicBreak": (writer, processor) => (node, ctx, interator) => {
|
|
182
189
|
const { position } = node;
|
|
183
190
|
return mkBlock({ type: "block", name: "boundary", config: [], location: applyLineOffset(position) }, []);
|
|
@@ -186,6 +193,7 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
186
193
|
const { children, position, ...attr } = node;
|
|
187
194
|
return mkBlock({ name: "nested", location: applyLineOffset(position) }, interator(children, { ...ctx }));
|
|
188
195
|
},
|
|
196
|
+
//table section
|
|
189
197
|
":table": (writer, processor) => (node, ctx, interator) => {
|
|
190
198
|
const { children, position, align, ...attr } = node;
|
|
191
199
|
return mkBlock(
|
|
@@ -213,6 +221,7 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
213
221
|
const { children, position, ...attr } = node;
|
|
214
222
|
return mkFomattingCodeO(interator(children, { ...ctx }));
|
|
215
223
|
},
|
|
224
|
+
// a hard line break is a line break S<> keeps
|
|
216
225
|
":break": (writer, processor) => (node, ctx, interator) => {
|
|
217
226
|
return mkFomattingCode({ name: "S" }, ["\n"]);
|
|
218
227
|
}
|
|
@@ -226,15 +235,11 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
|
|
|
226
235
|
};
|
|
227
236
|
var inlineParents = ["paragraph", "heading", "tableCell", "strong", "emphasis", "delete", "link", "linkReference"];
|
|
228
237
|
var markSource = (node) => {
|
|
229
|
-
if (Array.isArray(node))
|
|
230
|
-
|
|
231
|
-
if (!node || typeof node !== "object")
|
|
232
|
-
return;
|
|
238
|
+
if (Array.isArray(node)) return node.forEach(markSource);
|
|
239
|
+
if (!node || typeof node !== "object") return;
|
|
233
240
|
const item = node;
|
|
234
|
-
if (item.type === "block")
|
|
235
|
-
|
|
236
|
-
if (item.content)
|
|
237
|
-
markSource(item.content);
|
|
241
|
+
if (item.type === "block") item.sourceFormat = "markdown";
|
|
242
|
+
if (item.content) markSource(item.content);
|
|
238
243
|
};
|
|
239
244
|
|
|
240
245
|
// src/index.tsx
|
|
@@ -255,12 +260,14 @@ var plugin = {
|
|
|
255
260
|
};
|
|
256
261
|
var PluginRegister = {
|
|
257
262
|
Markdown: plugin,
|
|
263
|
+
//TODO: deprecate it
|
|
258
264
|
markdown: plugin
|
|
259
265
|
};
|
|
260
|
-
var
|
|
266
|
+
var index_default = plugin;
|
|
261
267
|
export {
|
|
262
268
|
PluginRegister,
|
|
263
|
-
|
|
269
|
+
index_default as default,
|
|
270
|
+
markdownLinkTargets,
|
|
264
271
|
md2ast as parseMd,
|
|
265
272
|
plugin
|
|
266
273
|
};
|
package/lib/index.esm.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.tsx", "../src/tools.ts"],
|
|
4
|
-
"sourcesContent": ["import { content as nodeContent, Plugins } from '@podlite/schema'\nimport { Plugin } from '@podlite/schema'\nimport { md2ast } from './tools'\n\nexport const plugin: Plugin = {\n toAst: (_, processor) => (node, ctx) => {\n if (typeof node !== 'string' && 'type' in node && 'content' in node && node.type === 'block') {\n const content = node.content[0]\n if (content && typeof content !== 'string' && 'location' in node && 'value' in content) {\n const lineOffset = node.location.start.line\n return { ...node, content: md2ast(content, { lineOffset }) }\n }\n return node\n }\n },\n toJSX: helper => {\n return nodeContent\n },\n}\nexport const PluginRegister: Plugins = {\n Markdown: plugin, //TODO: deprecate it\n markdown: plugin,\n}\n\nexport { md2ast as parseMd } from './tools'\nexport default plugin\n", "import { unified } from 'unified'\nimport markdown from 'remark-parse'\nimport remarkGfm from 'remark-gfm'\nimport remarkMath from 'remark-math'\n\nimport {\n toAny,\n AstTree,\n BlockImage,\n mkBlock,\n mkFomattingCode,\n mkFomattingCodeL,\n mkVerbatim,\n Location,\n mkMarkupCodeF,\n mkFormulaBlock,\n parseAttributes,\n headingId,\n getTextContentFromNode,\n} from '@podlite/schema'\nimport { mkRootBlock } from '@podlite/schema'\nimport { assignHeadingKeys } from '@podlite/schema'\nimport { mkImage } from '@podlite/schema'\nimport { mkFomattingCodeO } from '@podlite/schema'\n\ntype Md2astArgs = { lineOffset?: number }\nexport const md2ast = (src: string, { lineOffset }: Md2astArgs = { lineOffset: 0 }): AstTree => {\n // first convert mardown to ast\n const md_tree = unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src)\n\n // first pass : collect linkRefs\n let definitionMap = {}\n const applyLineOffset = (\n (offset: number) =>\n (location: Location): Location => {\n const { start, end } = location\n return {\n start: {\n ...start,\n line: start.line + offset,\n },\n end: {\n ...end,\n line: end.line + offset,\n },\n }\n }\n )(lineOffset)\n toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':definition': (writer, processor) => (node, ctx, interator) => {\n definitionMap[node.identifier] = node\n },\n })\n .run(md_tree)\n\n // HTML stands for a part of a line inside a paragraph, a heading, a cell or a span,\n // and for a block anywhere else: the parent each piece of HTML has here is kept\n const htmlParents = new WeakMap<object, string>()\n const recordParents = (node: { type?: string; children?: any[] }): void =>\n (node.children || []).forEach(child => {\n if (child?.type === 'html') htmlParents.set(child, node.type || '')\n recordParents(child)\n })\n recordParents(md_tree)\n\n // second stage - make Universal AST nodes\n const uast = []\n const res = toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n console.warn('[Podlite:md2ast]- unhandled MD node')\n console.warn(JSON.stringify(node, null, 2))\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':root': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkRootBlock({}, interator(children, ctx))\n },\n ':math': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkFormulaBlock({ value, location: applyLineOffset(position) })\n },\n ':inlineMath': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkMarkupCodeF(value)\n },\n\n ':heading': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const block = mkBlock(\n { type: 'block', level: node.depth, name: 'head', location: applyLineOffset(position) },\n interator(children, ctx),\n )\n // a link to a heading is written against its text, so a generated id points at nothing\n const id = headingId(getTextContentFromNode(block))\n // a heading holding only an image has no text to be named by, and an empty id would\n // repeat across every such heading\n return id ? { ...block, id } : block\n },\n ':text': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return node.value\n // return mkNode({type:\"text\", value: node.value})\n },\n ':list': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'list', level: savedListLevel + 1, list: node.ordered ? 'ordered' : 'itemized' },\n interator(children, { ...ctx, listLevel: savedListLevel + 1, ordered: node.ordered }),\n )\n },\n ':listItem': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, checked, ...attr } = node\n const blockAttrs: any = {\n name: 'item',\n type: 'block',\n level: ctx['listLevel'],\n location: applyLineOffset(position),\n }\n\n if (checked !== null && checked !== undefined) {\n blockAttrs.checked = checked\n blockAttrs.config = [{ name: 'checked', value: checked, type: 'boolean' }]\n }\n\n return mkBlock(blockAttrs, interator(children, { ...ctx, listLevel: savedListLevel, ordered: node.ordered }))\n },\n ':paragraph': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'para', location: applyLineOffset(position), text: 'text', margin: '' },\n interator(children, { ...ctx }),\n )\n },\n ':linkReference': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const definition = definitionMap[attr.identifier]\n const meta = definition?.url || ''\n return mkFomattingCodeL({ meta }, interator(children, { ...ctx }))\n },\n ':definition': (writer, processor) => (node, ctx, interator) => {\n return null\n },\n ':inlineCode': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'C' }, [node.value])\n },\n ':strong': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'B' }, interator(children, { ...ctx }))\n },\n ':emphasis': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'I' }, interator(children, { ...ctx }))\n },\n ':link': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeL({ meta: node.url }, interator(children, { ...ctx }))\n },\n ':html': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const markdownHtml = inlineParents.includes(htmlParents.get(node)) ? 'inline' : 'block'\n return mkBlock({ type: 'block', name: 'Html', markdownHtml, location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n },\n ':code': (writer, processor) => (node, ctx, interator) => {\n const { children, position, lang, meta, ...attr } = node\n if (lang === 'mermaid' || lang === 'diagram') {\n return mkBlock({ type: 'block', name: 'Mermaid', config: [], location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n }\n let config = []\n if (lang) {\n config.push({ name: 'lang', value: lang, type: 'string' })\n }\n if (meta) {\n config.push(...parseAttributes(meta))\n }\n return mkBlock({ type: 'block', name: 'code', config, location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n },\n ':image':\n (writer, processor) =>\n (node, ctx, interator): BlockImage => {\n const { title, alt, url, position, ...attr } = node\n let config = []\n // the title of a picture is the hint a reader shows over it, not a caption\n const image = mkImage(url, alt)\n if (typeof title === 'string') image.title = title\n return mkBlock({ type: 'block', name: 'Image', config, location: applyLineOffset(position) }, [image])\n },\n // a rule between blocks is the boundary of Podlite\n ':thematicBreak': (writer, processor) => (node, ctx, interator) => {\n const { position } = node\n return mkBlock({ type: 'block', name: 'boundary', config: [], location: applyLineOffset(position) }, [])\n },\n ':blockquote': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'nested', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n //table section\n ':table': (writer, processor) => (node, ctx, interator) => {\n const { children, position, align, ...attr } = node\n return mkBlock(\n { name: 'table', location: applyLineOffset(position), align },\n interator(children, { ...ctx, isHeaderUsed: 0 }),\n )\n },\n ':tableRow': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const isHeaderUsed = ctx.isHeaderUsed++\n const blockAttrs: Record<string, unknown> = {\n name: 'row',\n location: applyLineOffset(position),\n }\n if (!isHeaderUsed) {\n blockAttrs.config = [{ name: 'header', value: true, type: 'boolean' }]\n }\n return mkBlock(blockAttrs, interator(children, { ...ctx }))\n },\n ':tableCell': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'cell', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n ':delete': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeO(interator(children, { ...ctx }))\n },\n // a hard line break is a line break S<> keeps\n ':break': (writer, processor) => (node, ctx, interator) => {\n return mkFomattingCode({ name: 'S' }, ['\\n'])\n },\n })\n .run(md_tree)\n // a =markdown block hands over its verbatim node: the keys are fingerprinted from the\n // text the reader parsed\n const tree = assignHeadingKeys(\n res.interator,\n typeof src === 'string' ? src : (src as { value?: string })?.value ?? '',\n )\n markSource(tree)\n return tree\n}\n\nconst inlineParents = ['paragraph', 'heading', 'tableCell', 'strong', 'emphasis', 'delete', 'link', 'linkReference']\n\n// Every block made here is marked as coming from Markdown: HTML of Markdown is a block\n// named Html as an author's =Html is, and a writer must keep the first raw.\n// The walk goes into every node, since HTML stands in paragraphs, lists and codes too.\nconst markSource = (node: unknown): void => {\n if (Array.isArray(node)) return node.forEach(markSource)\n if (!node || typeof node !== 'object') return\n const item = node as { type?: string; content?: unknown; sourceFormat?: string }\n if (item.type === 'block') item.sourceFormat = 'markdown'\n if (item.content) markSource(item.content)\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW,mBAA4B;;;ACAhD,SAAS,eAAe;AACxB,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAEvB;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,eAAe;AACxB,SAAS,wBAAwB;
|
|
4
|
+
"sourcesContent": ["import { content as nodeContent, Plugins } from '@podlite/schema'\nimport { Plugin } from '@podlite/schema'\nimport { md2ast } from './tools'\n\nexport const plugin: Plugin = {\n toAst: (_, processor) => (node, ctx) => {\n if (typeof node !== 'string' && 'type' in node && 'content' in node && node.type === 'block') {\n const content = node.content[0]\n if (content && typeof content !== 'string' && 'location' in node && 'value' in content) {\n const lineOffset = node.location.start.line\n return { ...node, content: md2ast(content, { lineOffset }) }\n }\n return node\n }\n },\n toJSX: helper => {\n return nodeContent\n },\n}\nexport const PluginRegister: Plugins = {\n Markdown: plugin, //TODO: deprecate it\n markdown: plugin,\n}\n\nexport { md2ast as parseMd, markdownLinkTargets } from './tools'\nexport default plugin\n", "import { unified } from 'unified'\nimport markdown from 'remark-parse'\nimport remarkGfm from 'remark-gfm'\nimport remarkMath from 'remark-math'\n\nimport {\n toAny,\n AstTree,\n BlockImage,\n mkBlock,\n mkFomattingCode,\n mkFomattingCodeL,\n mkVerbatim,\n Location,\n mkMarkupCodeF,\n mkFormulaBlock,\n parseAttributes,\n headingId,\n getTextContentFromNode,\n} from '@podlite/schema'\nimport { mkRootBlock } from '@podlite/schema'\nimport { assignHeadingKeys } from '@podlite/schema'\nimport { mkImage } from '@podlite/schema'\nimport { mkFomattingCodeO } from '@podlite/schema'\n\ntype Md2astArgs = { lineOffset?: number }\n// the destinations of links, images and reference definitions, read by the parser so that code holds none\nexport const markdownLinkTargets = (src: string): string[] => {\n const targets: string[] = []\n const walk = (node: { type?: string; url?: unknown; children?: unknown }) => {\n if (['link', 'image', 'definition'].includes(node.type || '') && typeof node.url === 'string')\n targets.push(node.url)\n if (Array.isArray(node.children)) node.children.forEach(walk)\n }\n walk(unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src))\n return targets\n}\n\nexport const md2ast = (src: string, { lineOffset }: Md2astArgs = { lineOffset: 0 }): AstTree => {\n // first convert mardown to ast\n const md_tree = unified().use(markdown).use(remarkGfm).use(remarkMath).parse(src)\n\n // first pass : collect linkRefs\n let definitionMap = {}\n const applyLineOffset = (\n (offset: number) =>\n (location: Location): Location => {\n const { start, end } = location\n return {\n start: {\n ...start,\n line: start.line + offset,\n },\n end: {\n ...end,\n line: end.line + offset,\n },\n }\n }\n )(lineOffset)\n toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':definition': (writer, processor) => (node, ctx, interator) => {\n definitionMap[node.identifier] = node\n },\n })\n .run(md_tree)\n\n // HTML stands for a part of a line inside a paragraph, a heading, a cell or a span,\n // and for a block anywhere else: the parent each piece of HTML has here is kept\n const htmlParents = new WeakMap<object, string>()\n const recordParents = (node: { type?: string; children?: any[] }): void =>\n (node.children || []).forEach(child => {\n if (child?.type === 'html') htmlParents.set(child, node.type || '')\n recordParents(child)\n })\n recordParents(md_tree)\n\n // second stage - make Universal AST nodes\n const uast = []\n const res = toAny({ processor: 1 })\n .use({\n '*:*': (writer, processor) => (node, ctx, interator) => {\n console.warn('[Podlite:md2ast]- unhandled MD node')\n console.warn(JSON.stringify(node, null, 2))\n if (node.children) interator(node.children, { ...ctx })\n },\n })\n .use({\n ':root': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkRootBlock({}, interator(children, ctx))\n },\n ':math': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkFormulaBlock({ value, location: applyLineOffset(position) })\n },\n ':inlineMath': (writer, processor) => (node, ctx, interator) => {\n const { value, children, position, ...attr } = node\n return mkMarkupCodeF(value)\n },\n\n ':heading': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const block = mkBlock(\n { type: 'block', level: node.depth, name: 'head', location: applyLineOffset(position) },\n interator(children, ctx),\n )\n // a link to a heading is written against its text, so a generated id points at nothing\n const id = headingId(getTextContentFromNode(block))\n // a heading holding only an image has no text to be named by, and an empty id would\n // repeat across every such heading\n return id ? { ...block, id } : block\n },\n ':text': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return node.value\n // return mkNode({type:\"text\", value: node.value})\n },\n ':list': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'list', level: savedListLevel + 1, list: node.ordered ? 'ordered' : 'itemized' },\n interator(children, { ...ctx, listLevel: savedListLevel + 1, ordered: node.ordered }),\n )\n },\n ':listItem': (writer, processor) => (node, ctx, interator) => {\n const savedListLevel = ctx['listLevel'] || 0\n const { children, position, checked, ...attr } = node\n const blockAttrs: any = {\n name: 'item',\n type: 'block',\n level: ctx['listLevel'],\n location: applyLineOffset(position),\n }\n\n if (checked !== null && checked !== undefined) {\n blockAttrs.checked = checked\n blockAttrs.config = [{ name: 'checked', value: checked, type: 'boolean' }]\n }\n\n return mkBlock(blockAttrs, interator(children, { ...ctx, listLevel: savedListLevel, ordered: node.ordered }))\n },\n ':paragraph': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock(\n { type: 'para', location: applyLineOffset(position), text: 'text', margin: '' },\n interator(children, { ...ctx }),\n )\n },\n ':linkReference': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const definition = definitionMap[attr.identifier]\n const meta = definition?.url || ''\n return mkFomattingCodeL({ meta }, interator(children, { ...ctx }))\n },\n ':definition': (writer, processor) => (node, ctx, interator) => {\n return null\n },\n ':inlineCode': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'C' }, [node.value])\n },\n ':strong': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'B' }, interator(children, { ...ctx }))\n },\n ':emphasis': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCode({ name: 'I' }, interator(children, { ...ctx }))\n },\n ':link': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeL({ meta: node.url }, interator(children, { ...ctx }))\n },\n ':html': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const markdownHtml = inlineParents.includes(htmlParents.get(node)) ? 'inline' : 'block'\n return mkBlock({ type: 'block', name: 'Html', markdownHtml, location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n },\n ':code': (writer, processor) => (node, ctx, interator) => {\n const { children, position, lang, meta, ...attr } = node\n if (lang === 'mermaid' || lang === 'diagram') {\n return mkBlock({ type: 'block', name: 'Mermaid', config: [], location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n }\n let config = []\n if (lang) {\n config.push({ name: 'lang', value: lang, type: 'string' })\n }\n if (meta) {\n config.push(...parseAttributes(meta))\n }\n return mkBlock({ type: 'block', name: 'code', config, location: applyLineOffset(position) }, [\n mkVerbatim(node.value),\n ])\n },\n ':image':\n (writer, processor) =>\n (node, ctx, interator): BlockImage => {\n const { title, alt, url, position, ...attr } = node\n let config = []\n // the title of a picture is the hint a reader shows over it, not a caption\n const image = mkImage(url, alt)\n if (typeof title === 'string') image.title = title\n return mkBlock({ type: 'block', name: 'Image', config, location: applyLineOffset(position) }, [image])\n },\n // a rule between blocks is the boundary of Podlite\n ':thematicBreak': (writer, processor) => (node, ctx, interator) => {\n const { position } = node\n return mkBlock({ type: 'block', name: 'boundary', config: [], location: applyLineOffset(position) }, [])\n },\n ':blockquote': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'nested', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n //table section\n ':table': (writer, processor) => (node, ctx, interator) => {\n const { children, position, align, ...attr } = node\n return mkBlock(\n { name: 'table', location: applyLineOffset(position), align },\n interator(children, { ...ctx, isHeaderUsed: 0 }),\n )\n },\n ':tableRow': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n const isHeaderUsed = ctx.isHeaderUsed++\n const blockAttrs: Record<string, unknown> = {\n name: 'row',\n location: applyLineOffset(position),\n }\n if (!isHeaderUsed) {\n blockAttrs.config = [{ name: 'header', value: true, type: 'boolean' }]\n }\n return mkBlock(blockAttrs, interator(children, { ...ctx }))\n },\n ':tableCell': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkBlock({ name: 'cell', location: applyLineOffset(position) }, interator(children, { ...ctx }))\n },\n ':delete': (writer, processor) => (node, ctx, interator) => {\n const { children, position, ...attr } = node\n return mkFomattingCodeO(interator(children, { ...ctx }))\n },\n // a hard line break is a line break S<> keeps\n ':break': (writer, processor) => (node, ctx, interator) => {\n return mkFomattingCode({ name: 'S' }, ['\\n'])\n },\n })\n .run(md_tree)\n // a =markdown block hands over its verbatim node: the keys are fingerprinted from the\n // text the reader parsed\n const tree = assignHeadingKeys(\n res.interator,\n typeof src === 'string' ? src : (src as { value?: string })?.value ?? '',\n )\n markSource(tree)\n return tree\n}\n\nconst inlineParents = ['paragraph', 'heading', 'tableCell', 'strong', 'emphasis', 'delete', 'link', 'linkReference']\n\n// Every block made here is marked as coming from Markdown: HTML of Markdown is a block\n// named Html as an author's =Html is, and a writer must keep the first raw.\n// The walk goes into every node, since HTML stands in paragraphs, lists and codes too.\nconst markSource = (node: unknown): void => {\n if (Array.isArray(node)) return node.forEach(markSource)\n if (!node || typeof node !== 'object') return\n const item = node as { type?: string; content?: unknown; sourceFormat?: string }\n if (item.type === 'block') item.sourceFormat = 'markdown'\n if (item.content) markSource(item.content)\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,mBAA4B;;;ACAhD,SAAS,eAAe;AACxB,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAEvB;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,eAAe;AACxB,SAAS,wBAAwB;AAI1B,IAAM,sBAAsB,CAAC,QAA0B;AAC5D,QAAM,UAAoB,CAAC;AAC3B,QAAM,OAAO,CAAC,SAA+D;AAC3E,QAAI,CAAC,QAAQ,SAAS,YAAY,EAAE,SAAS,KAAK,QAAQ,EAAE,KAAK,OAAO,KAAK,QAAQ;AACnF,cAAQ,KAAK,KAAK,GAAG;AACvB,QAAI,MAAM,QAAQ,KAAK,QAAQ,EAAG,MAAK,SAAS,QAAQ,IAAI;AAAA,EAC9D;AACA,OAAK,QAAQ,EAAE,IAAI,QAAQ,EAAE,IAAI,SAAS,EAAE,IAAI,UAAU,EAAE,MAAM,GAAG,CAAC;AACtE,SAAO;AACT;AAEO,IAAM,SAAS,CAAC,KAAa,EAAE,WAAW,IAAgB,EAAE,YAAY,EAAE,MAAe;AAtChG;AAwCE,QAAM,UAAU,QAAQ,EAAE,IAAI,QAAQ,EAAE,IAAI,SAAS,EAAE,IAAI,UAAU,EAAE,MAAM,GAAG;AAGhF,MAAI,gBAAgB,CAAC;AACrB,QAAM,kBACJ,kBAAC,WACD,CAAC,aAAiC;AAChC,UAAM,EAAE,OAAO,IAAI,IAAI;AACvB,WAAO;AAAA,MACL,O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1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podlite/markdown",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.79",
|
|
4
4
|
"description": "Bidirectional Markdown support for Podlite — parse .md files, embed Markdown blocks",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"compatibility"
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@podlite/schema": "0.0.
|
|
67
|
+
"@podlite/schema": "0.0.86",
|
|
68
68
|
"remark-gfm": "^4.0.1",
|
|
69
69
|
"remark-math": "^6.0.0",
|
|
70
70
|
"remark-parse": "^11.0.0",
|
|
71
71
|
"unified": "^11.0.5"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"esbuild": "^0.
|
|
74
|
+
"esbuild": "^0.28.2",
|
|
75
75
|
"npm-run-all": "^4.1.5"
|
|
76
76
|
},
|
|
77
77
|
"module": "./lib/index.esm.js",
|