@react-platform/mdx 0.0.0-stage → 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Elemental Design System
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,49 @@
1
- # Temporary Holding Version
1
+ # @react-platform/mdx
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Build-time MDX 3 compilation for renderer-independent React documents. This package owns YAML frontmatter, named metadata exports, source maps, and an optional esbuild integration. It does not own a player, slide separators, speaker notes, UI components, or any design renderer.
4
+
5
+ ```ts
6
+ import { compileMDX } from '@react-platform/mdx';
7
+ const result = await compileMDX(source, { filePath: 'article.mdx' });
8
+ // result.code: an ESM module exporting the React component and frontmatter
9
+ // result.map: a JSON source map string
10
+ // result.frontmatter: parsed, JSON-serializable YAML metadata
11
+ ```
12
+
13
+ Leading YAML is parsed with gray-matter and yaml. Nested mappings, arrays, numbers and booleans are supported; malformed YAML and non-mapping metadata fail. `frontmatter` is a reserved named export and available in authored expressions. `frontmatter: false` preserves a leading Markdown rule and exports empty metadata. `parseMDX` returns metadata plus content padded with blank lines to preserve source line numbers.
14
+
15
+ ```mdx
16
+ ---
17
+ title: Portable documents
18
+ ---
19
+
20
+ # {frontmatter.title}
21
+
22
+ A **shared** document.
23
+
24
+ ---
25
+
26
+ This is a horizontal rule, not a new slide.
27
+ ```
28
+
29
+ The output uses the automatic React JSX runtime and accepts an MDX `components` map. Native and design consumers map Markdown tags to their own primitives; imported custom components must use the selected host too. Explicit lowercase JSX bypasses the map. The compiler runs on Node at build time; bundle or precompile its output before loading it on React Native. It does not ship a runtime evaluator or a Metro transformer. Rendering authored MDX executes its expressions and imports, so use trusted source.
30
+
31
+ ## Bundling
32
+
33
+ ```ts
34
+ import { build } from 'esbuild';
35
+ import { mdx } from '@react-platform/mdx/esbuild';
36
+ await build({ entryPoints: ['article.mdx'], bundle: true, plugins: [mdx()] });
37
+ ```
38
+
39
+ The optional `/esbuild` entry loads `.md` and `.mdx`, passes through source maps, watches source files, and preserves relative import resolution. The root compiler does not import esbuild, React, DOM/native APIs or design libraries. Install esbuild only if using that entry. The host controls TSX, dependency resolution and target aliases; program output with the automatic JSX runtime is required by the bundler plugin.
40
+
41
+ `MDXCompileOptions` extends MDX's `CompileOptions`: remark/rehype plugins, JSX import source, development output and other upstream options pass through. Metadata injection runs after the caller's remark plugins. A final rehype pass removes whitespace-only block children that otherwise become unintended text nodes on native/design hosts; code and inline spaces are preserved.
42
+
43
+ ## Ownership and validation
44
+
45
+ `mdx-slides` retains top-level thematic-break splitting, shared deck imports, slide IDs/titles, notes, presentation themes/players and PDF output. Its compiler delegates document compilation to this package. React Designapp's `examples/mdx-figma` demonstrates a single MDX document using the existing `react-strict-dom-figma` host. Frame-per-slide Figma export remains a future mdx-slides feature.
46
+
47
+ Run `pnpm check` from React Platform, or build/test this package with `pnpm --filter @react-platform/mdx build` and `pnpm --filter @react-platform/mdx test`. Tests exercise YAML validation, source positions/maps, component mapping, relative TSX imports and ordinary horizontal rules. These are compiler/bundler checks, not native-device validation.
48
+
49
+ The sibling consumers use local `link:` dependencies while the package is unpublished. Build this package before invoking consumers; their provided scripts do so. A release should replace local links with matching published version ranges.
@@ -0,0 +1,5 @@
1
+ import type { Plugin } from 'esbuild';
2
+ import { type MDXCompileOptions } from './index.js';
3
+ /** Build-time only. Host aliases and TSX transformation remain the bundler's job. */
4
+ export declare function mdx(options?: MDXCompileOptions): Plugin;
5
+ //# sourceMappingURL=esbuild.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild.d.ts","sourceRoot":"","sources":["../src/esbuild.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEhE,qFAAqF;AACrF,wBAAgB,GAAG,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,CAgB3D"}
@@ -0,0 +1,22 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { dirname } from 'node:path';
3
+ import { compileMDX } from './index.js';
4
+ /** Build-time only. Host aliases and TSX transformation remain the bundler's job. */
5
+ export function mdx(options = {}) {
6
+ if (options.jsx || options.outputFormat === 'function-body') {
7
+ throw new Error('The bundler requires program output with the automatic JSX runtime');
8
+ }
9
+ return {
10
+ name: 'react-platform-mdx',
11
+ setup(api) {
12
+ api.onLoad({ filter: /\.mdx?$/ }, async (args) => {
13
+ const result = await compileMDX(await readFile(args.path, 'utf8'), {
14
+ ...options, filePath: args.path, format: args.path.endsWith('.md') ? 'md' : 'mdx',
15
+ });
16
+ const sourceMap = result.map ? `\n//# sourceMappingURL=data:application/json;base64,${Buffer.from(result.map).toString('base64')}` : '';
17
+ return { contents: result.code + sourceMap, loader: 'js', resolveDir: dirname(args.path), watchFiles: [args.path] };
18
+ });
19
+ },
20
+ };
21
+ }
22
+ //# sourceMappingURL=esbuild.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild.js","sourceRoot":"","sources":["../src/esbuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAA0B,MAAM,YAAY,CAAC;AAEhE,qFAAqF;AACrF,MAAM,UAAU,GAAG,CAAC,UAA6B,EAAE;IACjD,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,YAAY,KAAK,eAAe,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;IACxF,CAAC;IACD,OAAO;QACL,IAAI,EAAE,oBAAoB;QAC1B,KAAK,CAAC,GAAG;YACP,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,KAAK,EAAC,IAAI,EAAC,EAAE;gBAC7C,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE;oBACjE,GAAG,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;iBAClF,CAAC,CAAC;gBACH,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,uDAAuD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACxI,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACtH,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type CompileOptions } from '@mdx-js/mdx';
2
+ export type Metadata = Record<string, unknown>;
3
+ export interface MDXCompileOptions extends CompileOptions {
4
+ /** Parse leading YAML and inject a named frontmatter export. Default true. */
5
+ frontmatter?: boolean;
6
+ filePath?: string;
7
+ }
8
+ export interface ParsedMDX {
9
+ content: string;
10
+ frontmatter: Metadata;
11
+ }
12
+ export interface CompiledMDX {
13
+ code: string;
14
+ map?: string;
15
+ frontmatter: Metadata;
16
+ }
17
+ export declare function parseMDX(source: string, options?: Pick<MDXCompileOptions, 'frontmatter'>): ParsedMDX;
18
+ /** Compile a document to React JSX-runtime code without selecting a renderer. */
19
+ export declare function compileMDX(source: string, options?: MDXCompileOptions): Promise<CompiledMDX>;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAQ5E,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC/C,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,8EAA8E;IAC9E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,SAAS;IAAG,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,QAAQ,CAAA;CAAE;AACrE,MAAM,WAAW,WAAW;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,QAAQ,CAAA;CAAE;AAElF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,IAAI,CAAC,iBAAiB,EAAE,aAAa,CAAM,GAAG,SAAS,CAcxG;AAED,iFAAiF;AACjF,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,CAiBtG"}
package/dist/index.js ADDED
@@ -0,0 +1,52 @@
1
+ import { compile, createProcessor } from '@mdx-js/mdx';
2
+ import matter from 'gray-matter';
3
+ import { parseDocument } from 'yaml';
4
+ import { SourceMapGenerator } from 'source-map';
5
+ export function parseMDX(source, options = {}) {
6
+ const parsed = options.frontmatter === false ? { content: source, data: {} } : matter(source, {
7
+ engines: { yaml: (value) => {
8
+ const document = parseDocument(value, { schema: 'core', uniqueKeys: true });
9
+ if (document.errors.length)
10
+ throw document.errors[0];
11
+ return document.toJS({ maxAliasCount: 100 });
12
+ } },
13
+ });
14
+ if (parsed.data === null || typeof parsed.data !== 'object' || Array.isArray(parsed.data)) {
15
+ throw new TypeError('MDX frontmatter must be a YAML mapping');
16
+ }
17
+ const frontmatter = JSON.parse(JSON.stringify(parsed.data));
18
+ const removed = source.slice(0, source.length - parsed.content.length);
19
+ return { frontmatter, content: '\n'.repeat((removed.match(/\n/g) || []).length) + parsed.content };
20
+ }
21
+ /** Compile a document to React JSX-runtime code without selecting a renderer. */
22
+ export async function compileMDX(source, options = {}) {
23
+ const { filePath = 'document.mdx', frontmatter = true, remarkPlugins = [], rehypePlugins = [], ...rest } = options;
24
+ const parsed = parseMDX(source, { frontmatter });
25
+ const metadataNode = createProcessor().parse(`export const frontmatter = JSON.parse(${JSON.stringify(JSON.stringify(parsed.frontmatter))})`).children[0];
26
+ const injectMetadata = () => root => {
27
+ if (root.children.some(node => node.type === 'mdxjsEsm' && /\bfrontmatter\b/.test(node.value))) {
28
+ throw new Error('The frontmatter binding is reserved; use a different name in MDX imports/exports');
29
+ }
30
+ root.children.unshift(structuredClone(metadataNode));
31
+ };
32
+ const file = await compile({ value: parsed.content, path: filePath }, {
33
+ ...rest, SourceMapGenerator,
34
+ remarkPlugins: [...(remarkPlugins ?? []), injectMetadata],
35
+ rehypePlugins: [...(rehypePlugins ?? []), removeBlockWhitespace],
36
+ });
37
+ if (file.map)
38
+ file.map.sourcesContent = [source];
39
+ return { code: String(file), map: file.map ? JSON.stringify(file.map) : undefined, frontmatter: parsed.frontmatter };
40
+ }
41
+ // Whitespace between block nodes becomes unwanted Text children on native/design hosts.
42
+ const removeBlockWhitespace = () => root => {
43
+ function visit(node) {
44
+ if (node.type === 'root' || (node.type === 'element' && ['ul', 'ol', 'blockquote'].includes(node.tagName))) {
45
+ node.children = node.children.filter(child => child.type !== 'text' || child.value.trim());
46
+ }
47
+ if ('children' in node && node.tagName !== 'pre')
48
+ node.children.forEach(visit);
49
+ }
50
+ visit(root);
51
+ };
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAuB,MAAM,aAAa,CAAC;AAC5E,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAchD,MAAM,UAAU,QAAQ,CAAC,MAAc,EAAE,UAAkD,EAAE;IAC3F,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;QAC5F,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE;gBACjC,MAAM,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AS,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;AACvH,CAAC;AAED,wFAAwF;AACxF,MAAM,qBAAqB,GAAyB,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;IAC/D,SAAS,KAAK,CAAC,IAA4B;QACzC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;YAC3G,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,IAAI,UAAU,IAAI,IAAI,IAAK,IAAgB,CAAC,OAAO,KAAK,KAAK;YAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9F,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,CAAC;AACd,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@react-platform/mdx",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.1",
4
+ "description": "Renderer-independent MDX compilation, YAML metadata and bundler integration.",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "license": "MIT",
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./esbuild": {
18
+ "types": "./dist/esbuild.d.ts",
19
+ "import": "./dist/esbuild.js"
20
+ }
21
+ },
22
+ "dependencies": {
23
+ "@mdx-js/mdx": "^3.1.0",
24
+ "gray-matter": "^4.0.3",
25
+ "yaml": "^2.8.0",
26
+ "source-map": "^0.7.6",
27
+ "@types/hast": "^3.0.0",
28
+ "@types/mdast": "^4.0.0",
29
+ "unified": "^11.0.0"
30
+ },
31
+ "peerDependencies": {
32
+ "esbuild": "^0.25.0"
33
+ },
34
+ "peerDependenciesMeta": {
35
+ "esbuild": {
36
+ "optional": true
37
+ }
38
+ },
39
+ "devDependencies": {
40
+ "typescript": "5.9.3",
41
+ "@types/node": "^22.0.0",
42
+ "esbuild": "0.25.11",
43
+ "react": "19.2.0",
44
+ "react-dom": "19.2.0"
45
+ },
46
+ "scripts": {
47
+ "build": "tsc -p tsconfig.json",
48
+ "typecheck": "tsc -p tsconfig.json --noEmit",
49
+ "test": "node --test tests/*.test.mjs"
50
+ }
6
51
  }