@studiocms/mdx 0.1.0-beta.27 → 0.1.0-beta.28
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/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ function internalMDXIntegration(packageIdentifier, options) {
|
|
|
19
19
|
imports: {
|
|
20
20
|
"studiocms:mdx/renderer": `
|
|
21
21
|
import { renderMDX as _render } from '${internalRenderer}';
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
export const renderMDX = _render;
|
|
24
24
|
export default renderMDX;
|
|
25
25
|
`
|
|
@@ -35,9 +35,8 @@ function internalMDXIntegration(packageIdentifier, options) {
|
|
|
35
35
|
function studiocmsMDX(options) {
|
|
36
36
|
const { resolve } = createResolver(import.meta.url);
|
|
37
37
|
const packageIdentifier = "@studiocms/mdx";
|
|
38
|
-
const renderer = resolve("./components/
|
|
38
|
+
const renderer = resolve("./components/render.js");
|
|
39
39
|
const editor = resolve("./components/editor.astro");
|
|
40
|
-
const internalRenderer = resolve("./lib/render.js");
|
|
41
40
|
const resolvedOptions = {
|
|
42
41
|
remarkPlugins: options?.remarkPlugins || [],
|
|
43
42
|
rehypePlugins: options?.rehypePlugins || [],
|
package/dist/lib/shared.js
CHANGED
|
@@ -2,7 +2,6 @@ const symbol = Symbol.for("@studiocms/mdx");
|
|
|
2
2
|
const shared = (
|
|
3
3
|
// @ts-expect-error
|
|
4
4
|
globalThis[symbol] || // @ts-expect-error
|
|
5
|
-
// biome-ignore lint/suspicious/noAssignInExpressions: this is a valid use case for assignment in expressions.
|
|
6
5
|
(globalThis[symbol] = {
|
|
7
6
|
mdxConfig: {}
|
|
8
7
|
})
|
package/dist/virtual.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ declare module 'studiocms:mdx/renderer' {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
declare module 'virtual:studiocms/plugins/renderers' {
|
|
7
|
-
export const studiocms_mdx: typeof import('./components/
|
|
7
|
+
export const studiocms_mdx: typeof import('./components/render.js').default;
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiocms/mdx",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.28",
|
|
4
4
|
"description": "Add MDX Support to your StudioCMS project with ease!",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "withstudiocms",
|
|
@@ -56,24 +56,24 @@
|
|
|
56
56
|
"type": "module",
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@mdx-js/mdx": "^3.1.1",
|
|
59
|
-
"astro-integration-kit": "^0.19.
|
|
60
|
-
"react": "^19.
|
|
61
|
-
"react-dom": "^19.
|
|
59
|
+
"astro-integration-kit": "^0.19.1",
|
|
60
|
+
"react": "^19.2.0",
|
|
61
|
+
"react-dom": "^19.2.0",
|
|
62
62
|
"rehype-highlight": "^7.0.2",
|
|
63
63
|
"remark-gfm": "^4.0.1",
|
|
64
64
|
"unified": "^11.0.5"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/node": "^22.0.0",
|
|
68
|
-
"@types/react": "^19.
|
|
69
|
-
"@types/react-dom": "^19.
|
|
68
|
+
"@types/react": "^19.2.2",
|
|
69
|
+
"@types/react-dom": "^19.2.2"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"astro": "^5.12.9",
|
|
73
|
-
"effect": "^3.
|
|
73
|
+
"effect": "^3.18.4",
|
|
74
74
|
"vite": "^6.3.4",
|
|
75
|
-
"
|
|
76
|
-
"studiocms": "0.1.0-beta.
|
|
75
|
+
"studiocms": "0.1.0-beta.28",
|
|
76
|
+
"@studiocms/md": "0.1.0-beta.28"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "buildkit build 'src/**/*.{ts,astro,css,json,png,d.ts}'",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import renderMDX from 'studiocms:mdx/renderer';
|
|
3
|
-
import type { PluginPageTypeRendererProps } from 'studiocms/types';
|
|
4
|
-
|
|
5
|
-
interface Props extends PluginPageTypeRendererProps {}
|
|
6
|
-
|
|
7
|
-
// Get default content
|
|
8
|
-
const { defaultContent } = Astro.props.data;
|
|
9
|
-
|
|
10
|
-
// Get content to render
|
|
11
|
-
const contentToRender = defaultContent?.content || '# Error: No content found';
|
|
12
|
-
|
|
13
|
-
const renderedContent = await renderMDX(contentToRender);
|
|
14
|
-
---
|
|
15
|
-
<Fragment set:html={renderedContent} />
|