@andesine/converters 0.8.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.1
4
+
5
+ - MDX elements that stand alone, with nothing but other elements and whitespace on their lines,
6
+ import as blocks, e.g. one-line `<Step title="...">...</Step>`s in `<Steps>`. Their content
7
+ becomes a paragraph. Elements between text still need a custom handler.
8
+
3
9
  ## 0.8.0
4
10
 
5
11
  - Code blocks keep an optional `title`: a fence's `title="..."` meta in Markdown and MDX, a
package/README.md CHANGED
@@ -359,8 +359,9 @@ node boundaries can change without changing displayed content.
359
359
 
360
360
  MDX supports block components with static JSON-compatible properties. Expressions
361
361
  inside property values may contain literal arrays/objects, but no calls, variable
362
- references, spreads, imports, exports, or executable code. Inline JSX and JSX
363
- fragments require custom handlers. Markdoc variables/functions also require custom
362
+ references, spreads, imports, exports, or executable code. Elements that stand alone
363
+ on their lines, e.g. one-line `<Step>`s in `<Steps>`, import as blocks. JSX between
364
+ text and JSX fragments require custom handlers. Markdoc variables/functions also require custom
364
365
  handlers. No source is evaluated during conversion.
365
366
 
366
367
  Mixed bullet/task lists import as task lists with unchecked plain items. Ordered
package/dist/mdx.js CHANGED
@@ -28,6 +28,26 @@ const staticExpression = (source) => {
28
28
  //#endregion
29
29
  //#region src/mdx.ts
30
30
  const markdown = createMarkdownAdapter(remarkMDX);
31
+ const isBlank = (node) => node.type === "text" && !node.value.trim();
32
+ /**
33
+ * A paragraph of elements only, e.g. one-line `<Step>`s in `<Steps>`: the parser reads them as
34
+ * text, but nothing is around them, so they are blocks. Elements between text stay unsupported.
35
+ */
36
+ const isElementParagraph = (node) => {
37
+ return node.type === "paragraph" && node.children.some((child) => child.type === "mdxJsxTextElement") && node.children.every((child) => child.type === "mdxJsxTextElement" || isBlank(child));
38
+ };
39
+ /** The block form of a one-line element: its content becomes a paragraph. */
40
+ const toFlowElement = (node) => {
41
+ const children = node.children.filter((child) => !isBlank(child));
42
+ return {
43
+ ...node,
44
+ type: "mdxJsxFlowElement",
45
+ children: children.length ? [{
46
+ type: "paragraph",
47
+ children
48
+ }] : []
49
+ };
50
+ };
31
51
  /** MDX adapter for createConverter(), including its parser and node/mark mappings. */
32
52
  const mdxAdapter = {
33
53
  ...markdown,
@@ -54,6 +74,10 @@ const mdxAdapter = {
54
74
  };
55
75
  },
56
76
  async decode(node, context) {
77
+ if (isElementParagraph(node)) {
78
+ const elements = node.children.filter((child) => child.type === "mdxJsxTextElement");
79
+ return context.children(elements.map(toFlowElement));
80
+ }
57
81
  if (node.type !== "mdxJsxFlowElement") return markdown.decode(node, context);
58
82
  if (!node.name) throw new ConversionError("MDX fragments require a custom handler", context.path);
59
83
  const props = Object.create(null);
package/dist/mdx.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mdx.js","names":[],"sources":["../src/static-expression.ts","../src/mdx.ts"],"sourcesContent":["import { parseExpressionAt } from \"acorn\";\nimport { ConversionError } from \"./utils\";\n\ninterface Expression {\n type: string;\n end: number;\n value?: unknown;\n name?: string;\n regex?: unknown;\n bigint?: unknown;\n elements?: Array<Expression | null>;\n properties?: Expression[];\n key?: Expression;\n computed?: boolean;\n method?: boolean;\n shorthand?: boolean;\n kind?: string;\n operator?: string;\n argument?: Expression;\n}\n\nconst staticExpression = (source: string): unknown => {\n const expression = parseExpressionAt(source, 0, { ecmaVersion: \"latest\" }) as Expression;\n const read = (node: Expression): unknown => {\n if (node.type === \"Literal\" && !node.regex && !node.bigint) return node.value;\n if (node.type === \"ArrayExpression\")\n return node.elements!.map((item) => {\n if (!item) throw new ConversionError(\"Array holes are not static JSON values\");\n\n return read(item);\n });\n if (node.type === \"ObjectExpression\")\n return Object.fromEntries(\n node.properties!.map((property) => {\n if (\n property.type !== \"Property\" ||\n property.computed ||\n property.method ||\n property.shorthand ||\n property.kind !== \"init\"\n ) {\n throw new ConversionError(\"Only static object properties are supported\");\n }\n const key = property.key!;\n\n return [\n key.type === \"Identifier\" ? key.name : String(key.value),\n read(property.value as Expression)\n ];\n })\n );\n if (node.type === \"UnaryExpression\" && [\"-\", \"+\"].includes(node.operator || \"\")) {\n const value = read(node.argument!);\n\n if (typeof value === \"number\") return node.operator === \"-\" ? -value : value;\n }\n throw new ConversionError(`Unsupported dynamic expression: ${node.type}`);\n };\n\n if (source.slice(expression.end).trim())\n throw new ConversionError(\"Unexpected content after static expression\");\n\n return read(expression);\n};\n\nexport { staticExpression };\n","import remarkMDX from \"remark-mdx\";\nimport type { MdxJsxFlowElement } from \"mdast-util-mdx-jsx\";\nimport { createConverter } from \"./core\";\nimport { createMarkdownAdapter } from \"./markdown/adapter\";\nimport { element, isJSONValue, ConversionError } from \"./utils\";\nimport { staticExpression } from \"./static-expression\";\nimport type { MarkdownNode } from \"./markdown/decode\";\nimport type { ConverterOptions, FormatAdapter } from \"./types\";\n\ntype MDXNode = MarkdownNode | MdxJsxFlowElement;\ntype MDXOptions = ConverterOptions<MDXNode>;\n\nconst markdown = createMarkdownAdapter(remarkMDX);\n/** MDX adapter for createConverter(), including its parser and node/mark mappings. */\nconst mdxAdapter: FormatAdapter<MDXNode> = {\n ...markdown,\n elementName: (node) =>\n node.type === \"mdxJsxFlowElement\" || node.type === \"mdxJsxTextElement\"\n ? node.name || undefined\n : undefined,\n async encode(node, context) {\n if (node.type !== \"element\") return markdown.encode(node, context);\n\n const name = String(node.attrs?.name || \"Element\");\n const props = (node.attrs?.props || {}) as Record<string, unknown>;\n const children = await context.children(node);\n\n if (!isJSONValue(props))\n throw new ConversionError(\"MDX element properties must be static JSON values\", context.path);\n\n // Validate names and build a source form using the same static element rules.\n element(name, props, []);\n return {\n type: \"mdxJsxFlowElement\",\n name,\n attributes: Object.entries(props).map(([name, value]) => ({\n type: \"mdxJsxAttribute\",\n name,\n value:\n typeof value === \"string\"\n ? value\n : { type: \"mdxJsxAttributeValueExpression\", value: JSON.stringify(value) }\n })),\n children\n } as Extract<MarkdownNode, { type: \"mdxJsxFlowElement\" }>;\n },\n async decode(node, context) {\n if (node.type !== \"mdxJsxFlowElement\") return markdown.decode(node, context);\n if (!node.name)\n throw new ConversionError(\"MDX fragments require a custom handler\", context.path);\n\n const props: Record<string, unknown> = Object.create(null);\n\n for (const attribute of node.attributes) {\n if (attribute.type !== \"mdxJsxAttribute\")\n throw new ConversionError(\"MDX spread attributes require a custom handler\", context.path);\n\n props[attribute.name] =\n attribute.value === null || attribute.value === undefined\n ? true\n : typeof attribute.value === \"string\"\n ? attribute.value\n : staticExpression(attribute.value.value);\n }\n return element(node.name, { ...props }, await context.children(node.children));\n }\n};\n/**\n * Create a reusable async MDX converter with application-specific defaults.\n * @param options - Default mappings and handlers; per-call maps merge by key and callbacks may be async.\n * @returns String and AST import/export methods. Defaults use an H1 title, unwrap fragments, and omit properties.\n * Custom elements use static JSON properties; executable expressions require custom handlers.\n */\nconst createMDXConverter = (options?: MDXOptions) => createConverter(mdxAdapter, options);\nconst converter = createMDXConverter();\n/**\n * Export ProseMirror JSON as MDX.\n * @param document - Entry or fragment document. Fragment wrappers are removed by default.\n * @param options - Title/property/fragment mappings and async handlers; imageURL resolves images.\n * @returns Serialized MDX. Omitted metadata and unwrapped fragment boundaries are not recoverable.\n * @throws ConversionError for unsupported content, unresolved images, or invalid mappings; handler errors pass through.\n */\nconst toMDX = converter.encode;\n/**\n * Import MDX as ProseMirror JSON without saving content or uploading assets.\n * @param source - Source text to parse. Custom elements use static JSON properties; executable expressions require custom handlers.\n * @param options - Import mappings and async handlers. imageAssetID must resolve image URLs.\n * @returns An entry document; use document: \"fragment\" to omit the title and retain the first H1 as body content.\n * @throws ConversionError for unsupported content/mappings; parser and handler errors pass through.\n */\nconst fromMDX = converter.decode;\n/**\n * Export ProseMirror JSON as a MDX AST with separate frontmatter.\n * @param document - Source entry or fragment document.\n * @param options - Export mappings and async handlers, including imageURL for images.\n * @returns The format tree and metadata without string serialization.\n * @throws The same conversion errors as toMDX(), including unsupported frontmatter mappings.\n */\nconst toMDXAST = converter.toAST;\n/**\n * Import a parsed MDX AST and its frontmatter as ProseMirror JSON.\n * @param input - Tree and frontmatter object; use an empty object when metadata is absent.\n * @param options - Import mappings and async handlers, including imageAssetID for images.\n * @returns An entry document by default, or a fragment document when requested.\n * @throws The same conversion errors as fromMDX(), excluding string-parser errors.\n */\nconst fromMDXAST = converter.fromAST;\n\nexport { createMDXConverter, mdxAdapter, toMDX, fromMDX, toMDXAST, fromMDXAST };\nexport type { MDXOptions, MDXNode };\n"],"mappings":";;;;;AAqBA,MAAM,oBAAoB,WAA4B;CACpD,MAAM,aAAa,kBAAkB,QAAQ,GAAG,EAAE,aAAa,SAAS,CAAC;CACzE,MAAM,QAAQ,SAA8B;EAC1C,IAAI,KAAK,SAAS,aAAa,CAAC,KAAK,SAAS,CAAC,KAAK,QAAQ,OAAO,KAAK;EACxE,IAAI,KAAK,SAAS,mBAChB,OAAO,KAAK,SAAU,KAAK,SAAS;GAClC,IAAI,CAAC,MAAM,MAAM,IAAI,gBAAgB,wCAAwC;GAE7E,OAAO,KAAK,IAAI;EAClB,CAAC;EACH,IAAI,KAAK,SAAS,oBAChB,OAAO,OAAO,YACZ,KAAK,WAAY,KAAK,aAAa;GACjC,IACE,SAAS,SAAS,cAClB,SAAS,YACT,SAAS,UACT,SAAS,aACT,SAAS,SAAS,QAElB,MAAM,IAAI,gBAAgB,6CAA6C;GAEzE,MAAM,MAAM,SAAS;GAErB,OAAO,CACL,IAAI,SAAS,eAAe,IAAI,OAAO,OAAO,IAAI,KAAK,GACvD,KAAK,SAAS,KAAmB,CACnC;EACF,CAAC,CACH;EACF,IAAI,KAAK,SAAS,qBAAqB,CAAC,KAAK,GAAG,CAAC,CAAC,SAAS,KAAK,YAAY,EAAE,GAAG;GAC/E,MAAM,QAAQ,KAAK,KAAK,QAAS;GAEjC,IAAI,OAAO,UAAU,UAAU,OAAO,KAAK,aAAa,MAAM,CAAC,QAAQ;EACzE;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AU,UAAU,QAAQ,UAAU,UAAU,KAAA,IAC5C,OACA,OAAO,UAAU,UAAU,WACzB,UAAU,QACV,iBAAiB,UAAU,MAAM,KAAK;EAChD;EACA,OAAO,QAAQ,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,QAAQ,SAAS,KAAK,QAAQ,CAAC;CAC/E;AACF;;;;;;;AAOA,MAAM,sBAAsB,YAAyB,gBAAgB,YAAY,OAAO;AACxF,MAAM,YAAY,mBAAmB;;;;;;;;AAQrC,MAAM,QAAQ,UAAU;;;;;;;;AAQxB,MAAM,UAAU,UAAU;;;;;;;;AAQ1B,MAAM,WAAW,UAAU;;;;;;;;AAQ3B,MAAM,aAAa,UAAU"}
1
+ {"version":3,"file":"mdx.js","names":[],"sources":["../src/static-expression.ts","../src/mdx.ts"],"sourcesContent":["import { parseExpressionAt } from \"acorn\";\nimport { ConversionError } from \"./utils\";\n\ninterface Expression {\n type: string;\n end: number;\n value?: unknown;\n name?: string;\n regex?: unknown;\n bigint?: unknown;\n elements?: Array<Expression | null>;\n properties?: Expression[];\n key?: Expression;\n computed?: boolean;\n method?: boolean;\n shorthand?: boolean;\n kind?: string;\n operator?: string;\n argument?: Expression;\n}\n\nconst staticExpression = (source: string): unknown => {\n const expression = parseExpressionAt(source, 0, { ecmaVersion: \"latest\" }) as Expression;\n const read = (node: Expression): unknown => {\n if (node.type === \"Literal\" && !node.regex && !node.bigint) return node.value;\n if (node.type === \"ArrayExpression\")\n return node.elements!.map((item) => {\n if (!item) throw new ConversionError(\"Array holes are not static JSON values\");\n\n return read(item);\n });\n if (node.type === \"ObjectExpression\")\n return Object.fromEntries(\n node.properties!.map((property) => {\n if (\n property.type !== \"Property\" ||\n property.computed ||\n property.method ||\n property.shorthand ||\n property.kind !== \"init\"\n ) {\n throw new ConversionError(\"Only static object properties are supported\");\n }\n const key = property.key!;\n\n return [\n key.type === \"Identifier\" ? key.name : String(key.value),\n read(property.value as Expression)\n ];\n })\n );\n if (node.type === \"UnaryExpression\" && [\"-\", \"+\"].includes(node.operator || \"\")) {\n const value = read(node.argument!);\n\n if (typeof value === \"number\") return node.operator === \"-\" ? -value : value;\n }\n throw new ConversionError(`Unsupported dynamic expression: ${node.type}`);\n };\n\n if (source.slice(expression.end).trim())\n throw new ConversionError(\"Unexpected content after static expression\");\n\n return read(expression);\n};\n\nexport { staticExpression };\n","import remarkMDX from \"remark-mdx\";\nimport type { MdxJsxFlowElement } from \"mdast-util-mdx-jsx\";\nimport { createConverter } from \"./core\";\nimport { createMarkdownAdapter } from \"./markdown/adapter\";\nimport { element, isJSONValue, ConversionError } from \"./utils\";\nimport { staticExpression } from \"./static-expression\";\nimport type { MarkdownNode } from \"./markdown/decode\";\nimport type { ConverterOptions, FormatAdapter } from \"./types\";\n\ntype MDXNode = MarkdownNode | MdxJsxFlowElement;\ntype MDXOptions = ConverterOptions<MDXNode>;\ntype Paragraph = Extract<MarkdownNode, { type: \"paragraph\" }>;\ntype PhrasingNode = Paragraph[\"children\"][number];\ntype TextElement = Extract<PhrasingNode, { type: \"mdxJsxTextElement\" }>;\n\nconst markdown = createMarkdownAdapter(remarkMDX);\nconst isBlank = (node: PhrasingNode) => node.type === \"text\" && !node.value.trim();\n/**\n * A paragraph of elements only, e.g. one-line `<Step>`s in `<Steps>`: the parser reads them as\n * text, but nothing is around them, so they are blocks. Elements between text stay unsupported.\n */\nconst isElementParagraph = (node: MDXNode): node is Paragraph => {\n return (\n node.type === \"paragraph\" &&\n node.children.some((child) => child.type === \"mdxJsxTextElement\") &&\n node.children.every((child) => child.type === \"mdxJsxTextElement\" || isBlank(child))\n );\n};\n/** The block form of a one-line element: its content becomes a paragraph. */\nconst toFlowElement = (node: TextElement): MdxJsxFlowElement => {\n const children = node.children.filter((child) => !isBlank(child));\n\n return {\n ...node,\n type: \"mdxJsxFlowElement\",\n children: children.length ? [{ type: \"paragraph\", children }] : []\n };\n};\n/** MDX adapter for createConverter(), including its parser and node/mark mappings. */\nconst mdxAdapter: FormatAdapter<MDXNode> = {\n ...markdown,\n elementName: (node) =>\n node.type === \"mdxJsxFlowElement\" || node.type === \"mdxJsxTextElement\"\n ? node.name || undefined\n : undefined,\n async encode(node, context) {\n if (node.type !== \"element\") return markdown.encode(node, context);\n\n const name = String(node.attrs?.name || \"Element\");\n const props = (node.attrs?.props || {}) as Record<string, unknown>;\n const children = await context.children(node);\n\n if (!isJSONValue(props))\n throw new ConversionError(\"MDX element properties must be static JSON values\", context.path);\n\n // Validate names and build a source form using the same static element rules.\n element(name, props, []);\n return {\n type: \"mdxJsxFlowElement\",\n name,\n attributes: Object.entries(props).map(([name, value]) => ({\n type: \"mdxJsxAttribute\",\n name,\n value:\n typeof value === \"string\"\n ? value\n : { type: \"mdxJsxAttributeValueExpression\", value: JSON.stringify(value) }\n })),\n children\n } as Extract<MarkdownNode, { type: \"mdxJsxFlowElement\" }>;\n },\n async decode(node, context) {\n if (isElementParagraph(node)) {\n const elements = node.children.filter((child) => child.type === \"mdxJsxTextElement\");\n\n return context.children(elements.map(toFlowElement));\n }\n\n if (node.type !== \"mdxJsxFlowElement\") return markdown.decode(node, context);\n if (!node.name)\n throw new ConversionError(\"MDX fragments require a custom handler\", context.path);\n\n const props: Record<string, unknown> = Object.create(null);\n\n for (const attribute of node.attributes) {\n if (attribute.type !== \"mdxJsxAttribute\")\n throw new ConversionError(\"MDX spread attributes require a custom handler\", context.path);\n\n props[attribute.name] =\n attribute.value === null || attribute.value === undefined\n ? true\n : typeof attribute.value === \"string\"\n ? attribute.value\n : staticExpression(attribute.value.value);\n }\n return element(node.name, { ...props }, await context.children(node.children));\n }\n};\n/**\n * Create a reusable async MDX converter with application-specific defaults.\n * @param options - Default mappings and handlers; per-call maps merge by key and callbacks may be async.\n * @returns String and AST import/export methods. Defaults use an H1 title, unwrap fragments, and omit properties.\n * Custom elements use static JSON properties; executable expressions require custom handlers.\n */\nconst createMDXConverter = (options?: MDXOptions) => createConverter(mdxAdapter, options);\nconst converter = createMDXConverter();\n/**\n * Export ProseMirror JSON as MDX.\n * @param document - Entry or fragment document. Fragment wrappers are removed by default.\n * @param options - Title/property/fragment mappings and async handlers; imageURL resolves images.\n * @returns Serialized MDX. Omitted metadata and unwrapped fragment boundaries are not recoverable.\n * @throws ConversionError for unsupported content, unresolved images, or invalid mappings; handler errors pass through.\n */\nconst toMDX = converter.encode;\n/**\n * Import MDX as ProseMirror JSON without saving content or uploading assets.\n * @param source - Source text to parse. Custom elements use static JSON properties; executable expressions require custom handlers.\n * @param options - Import mappings and async handlers. imageAssetID must resolve image URLs.\n * @returns An entry document; use document: \"fragment\" to omit the title and retain the first H1 as body content.\n * @throws ConversionError for unsupported content/mappings; parser and handler errors pass through.\n */\nconst fromMDX = converter.decode;\n/**\n * Export ProseMirror JSON as a MDX AST with separate frontmatter.\n * @param document - Source entry or fragment document.\n * @param options - Export mappings and async handlers, including imageURL for images.\n * @returns The format tree and metadata without string serialization.\n * @throws The same conversion errors as toMDX(), including unsupported frontmatter mappings.\n */\nconst toMDXAST = converter.toAST;\n/**\n * Import a parsed MDX AST and its frontmatter as ProseMirror JSON.\n * @param input - Tree and frontmatter object; use an empty object when metadata is absent.\n * @param options - Import mappings and async handlers, including imageAssetID for images.\n * @returns An entry document by default, or a fragment document when requested.\n * @throws The same conversion errors as fromMDX(), excluding string-parser errors.\n */\nconst fromMDXAST = converter.fromAST;\n\nexport { createMDXConverter, mdxAdapter, toMDX, fromMDX, toMDXAST, fromMDXAST };\nexport type { MDXOptions, MDXNode };\n"],"mappings":";;;;;AAqBA,MAAM,oBAAoB,WAA4B;CACpD,MAAM,aAAa,kBAAkB,QAAQ,GAAG,EAAE,aAAa,SAAS,CAAC;CACzE,MAAM,QAAQ,SAA8B;EAC1C,IAAI,KAAK,SAAS,aAAa,CAAC,KAAK,SAAS,CAAC,KAAK,QAAQ,OAAO,KAAK;EACxE,IAAI,KAAK,SAAS,mBAChB,OAAO,KAAK,SAAU,KAAK,SAAS;GAClC,IAAI,CAAC,MAAM,MAAM,IAAI,gB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C,OACA,OAAO,UAAU,UAAU,WACzB,UAAU,QACV,iBAAiB,UAAU,MAAM,KAAK;EAChD;EACA,OAAO,QAAQ,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,QAAQ,SAAS,KAAK,QAAQ,CAAC;CAC/E;AACF;;;;;;;AAOA,MAAM,sBAAsB,YAAyB,gBAAgB,YAAY,OAAO;AACxF,MAAM,YAAY,mBAAmB;;;;;;;;AAQrC,MAAM,QAAQ,UAAU;;;;;;;;AAQxB,MAAM,UAAU,UAAU;;;;;;;;AAQ1B,MAAM,WAAW,UAAU;;;;;;;;AAQ3B,MAAM,aAAa,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andesine/converters",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "TypeScript content converters for Andesine",
5
5
  "type": "module",
6
6
  "license": "MIT",