@ecopages/mdx 0.2.0-alpha.15 → 0.2.0-alpha.17

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
@@ -13,11 +13,16 @@ All notable changes to `@ecopages/mdx` are documented here.
13
13
  ### Bug Fixes
14
14
 
15
15
  - Fixed loader registration, Node `source-map` interop, and renderer-owned mixed-boundary rendering for standalone MDX routes.
16
+ - Fixed standalone MDX boundary payload compatibility coverage and removed the plugin/renderer integration-name import cycle.
16
17
 
17
18
  ### Documentation
18
19
 
19
20
  - Updated the README for standalone non-React MDX usage, `.md` opt-in handling, and compiler configuration.
20
21
 
22
+ ### Tests
23
+
24
+ - Added renderer-level coverage for the boundary payload compatibility contract.
25
+
21
26
  ### Refactoring
22
27
 
23
28
  - Replaced the standalone MDX renderer factory with explicit renderer-owned compiler configuration and collected shared MDX plugin and renderer types into a dedicated module.
package/README.md CHANGED
@@ -65,6 +65,16 @@ mdxPlugin({
65
65
  > [!WARNING]
66
66
  > React runtimes are intentionally rejected by this standalone plugin.
67
67
 
68
+ ## Mixed Rendering
69
+
70
+ Standalone MDX can own the page shell or nested MDX component boundaries in a mixed-renderer app. When another integration reaches an MDX-owned boundary, Ecopages hands that boundary back to the MDX renderer so the MDX runtime can finish serialization before the outer renderer resumes.
71
+
72
+ Important:
73
+
74
+ - Components that may render foreign children must declare those children in `config.dependencies.components`.
75
+ - Ecopages validates mixed-renderer ownership from declared dependencies during render preparation rather than inferring every boundary from rendered HTML alone.
76
+ - Standalone MDX keeps its own page normalization and non-React JSX runtime behavior.
77
+
68
78
  ## Using MDX with React
69
79
 
70
80
  If you are using `@ecopages/react` and building a full React application, **do not** use this standalone MDX plugin. Instead, enable MDX directly within the React plugin configuration to ensure unified hydration, client-side routing, and HMR:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecopages/mdx",
3
- "version": "0.2.0-alpha.15",
3
+ "version": "0.2.0-alpha.17",
4
4
  "description": "MDX plugin for Ecopages",
5
5
  "keywords": [
6
6
  "ecopages",
@@ -37,7 +37,7 @@
37
37
  "directory": "packages/integrations/mdx"
38
38
  },
39
39
  "peerDependencies": {
40
- "@ecopages/core": "0.2.0-alpha.15",
40
+ "@ecopages/core": "0.2.0-alpha.17",
41
41
  "@kitajs/html": "^4.1.0",
42
42
  "@mdx-js/mdx": "^3.1.0"
43
43
  },
@@ -1,9 +1,9 @@
1
1
  import { IntegrationRenderer } from "@ecopages/core/route-renderer/integration-renderer";
2
2
  import { invariant } from "@ecopages/core/utils/invariant";
3
- import { PLUGIN_NAME } from "./mdx.plugin.js";
3
+ import { MDX_PLUGIN_NAME } from "./mdx.constants.js";
4
4
  import { rapidhash } from "@ecopages/core/hash";
5
5
  class MDXRenderer extends IntegrationRenderer {
6
- name = PLUGIN_NAME;
6
+ name = MDX_PLUGIN_NAME;
7
7
  compilerOptions;
8
8
  constructor({ mdxConfig, ...options }) {
9
9
  super(options);
@@ -0,0 +1 @@
1
+ export declare const MDX_PLUGIN_NAME = "MDX";
@@ -0,0 +1,4 @@
1
+ const MDX_PLUGIN_NAME = "MDX";
2
+ export {
3
+ MDX_PLUGIN_NAME
4
+ };
package/src/mdx.plugin.js CHANGED
@@ -2,9 +2,10 @@ import { IntegrationPlugin } from "@ecopages/core/plugins/integration-plugin";
2
2
  import { deepMerge } from "@ecopages/core/utils/deep-merge";
3
3
  import { Logger } from "@ecopages/logger";
4
4
  import { createMdxLoaderPlugin } from "./mdx-loader-plugin.js";
5
+ import { MDX_PLUGIN_NAME } from "./mdx.constants.js";
5
6
  import { MDXRenderer } from "./mdx-renderer.js";
6
7
  const appLogger = new Logger("[MDXPlugin]");
7
- const PLUGIN_NAME = "MDX";
8
+ const PLUGIN_NAME = MDX_PLUGIN_NAME;
8
9
  const defaultOptions = {
9
10
  format: "detect",
10
11
  outputFormat: "program",