@object-ui/plugin-markdown 4.0.4 → 4.0.5
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 +31 -0
- package/dist/index.js +36 -6
- package/package.json +5 -5
- package/dist/MarkdownImpl-CRaznBrb.js +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @object-ui/plugin-markdown
|
|
2
2
|
|
|
3
|
+
## 4.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1dc6061: fix(build): inline dynamic imports in library outputs
|
|
8
|
+
|
|
9
|
+
Library `vite build --lib` outputs were emitting separate code-split chunks
|
|
10
|
+
(`rolldown-runtime-*.js`, `LookupField-*.js`, etc.) when source files used
|
|
11
|
+
`React.lazy()` / dynamic `import()`. When consumer apps re-bundled these
|
|
12
|
+
multi-file dists, the library's per-chunk rolldown-runtime collided with the
|
|
13
|
+
consumer's own runtime, causing "TypeError: i is not a function" at runtime
|
|
14
|
+
when lazy components tried to register themselves (e.g. TextField in
|
|
15
|
+
`@object-ui/fields` after 4.0.4).
|
|
16
|
+
|
|
17
|
+
Adding `output.inlineDynamicImports: true` to all `@object-ui/*` library vite
|
|
18
|
+
configs forces a single `dist/index.js` per package, which lets consumer
|
|
19
|
+
bundlers handle the library as an opaque ESM module without identifier
|
|
20
|
+
mismatches across chunks.
|
|
21
|
+
|
|
22
|
+
Affected packages: components, fields, layout, plugin-aggrid, plugin-ai,
|
|
23
|
+
plugin-calendar, plugin-charts, plugin-chatbot, plugin-dashboard,
|
|
24
|
+
plugin-designer, plugin-detail, plugin-editor, plugin-form, plugin-gantt,
|
|
25
|
+
plugin-grid, plugin-kanban, plugin-list, plugin-map, plugin-markdown,
|
|
26
|
+
plugin-report, plugin-timeline, plugin-view, plugin-workflow.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [1dc6061]
|
|
29
|
+
- @object-ui/components@4.0.5
|
|
30
|
+
- @object-ui/types@4.0.5
|
|
31
|
+
- @object-ui/core@4.0.5
|
|
32
|
+
- @object-ui/react@4.0.5
|
|
33
|
+
|
|
3
34
|
## 4.0.4
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2,15 +2,45 @@ import e, { Suspense as t } from "react";
|
|
|
2
2
|
import { ComponentRegistry as n } from "@object-ui/core";
|
|
3
3
|
import { Skeleton as r } from "@object-ui/components";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import a from "react-markdown";
|
|
6
|
+
import o from "remark-gfm";
|
|
7
|
+
import s from "rehype-sanitize";
|
|
8
|
+
//#region \0rolldown/runtime.js
|
|
9
|
+
var c = Object.defineProperty, l = (e, t) => () => (e && (t = e(e = 0)), t), u = /* @__PURE__ */ ((e, t) => {
|
|
10
|
+
let n = {};
|
|
11
|
+
for (var r in e) c(n, r, {
|
|
12
|
+
get: e[r],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
return t || c(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
16
|
+
})({ default: () => d });
|
|
17
|
+
function d({ content: e, className: t }) {
|
|
18
|
+
return /* @__PURE__ */ i("div", {
|
|
19
|
+
"data-slot": "markdown",
|
|
20
|
+
className: ((...e) => e.filter(Boolean).join(" "))("prose prose-sm dark:prose-invert max-w-none", "prose-headings:font-semibold prose-headings:tracking-tight", "prose-h1:text-3xl prose-h2:text-2xl prose-h3:text-xl", "prose-p:leading-relaxed prose-p:text-foreground", "prose-a:text-primary prose-a:no-underline hover:prose-a:underline", "prose-code:text-foreground prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none", "prose-pre:bg-muted prose-pre:text-foreground prose-pre:border", "prose-blockquote:border-l-primary prose-blockquote:text-muted-foreground", "prose-strong:text-foreground prose-strong:font-semibold", "prose-ul:list-disc prose-ol:list-decimal", "prose-li:text-foreground prose-li:marker:text-muted-foreground", "prose-table:border prose-th:border prose-th:bg-muted prose-td:border", "prose-img:rounded-md prose-img:border", t),
|
|
21
|
+
children: /* @__PURE__ */ i(a, {
|
|
22
|
+
remarkPlugins: [o],
|
|
23
|
+
rehypePlugins: [s],
|
|
24
|
+
disallowedElements: [
|
|
25
|
+
"script",
|
|
26
|
+
"style",
|
|
27
|
+
"iframe",
|
|
28
|
+
"object",
|
|
29
|
+
"embed"
|
|
30
|
+
],
|
|
31
|
+
unwrapDisallowed: !0,
|
|
32
|
+
children: e
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
var f = l((() => {})), p = e.lazy(() => Promise.resolve().then(() => (f(), u))), m = ({ schema: e }) => /* @__PURE__ */ i(t, {
|
|
7
37
|
fallback: /* @__PURE__ */ i(r, { className: "w-full h-[200px]" }),
|
|
8
|
-
children: /* @__PURE__ */ i(
|
|
38
|
+
children: /* @__PURE__ */ i(p, {
|
|
9
39
|
content: e.content || "",
|
|
10
40
|
className: e.className
|
|
11
41
|
})
|
|
12
42
|
});
|
|
13
|
-
n.register("markdown",
|
|
43
|
+
n.register("markdown", m, {
|
|
14
44
|
namespace: "plugin-markdown",
|
|
15
45
|
label: "Markdown",
|
|
16
46
|
category: "plugin",
|
|
@@ -27,6 +57,6 @@ n.register("markdown", o, {
|
|
|
27
57
|
}],
|
|
28
58
|
defaultProps: { content: "# Hello World\n\nThis is a **markdown** component with *formatting* support.\n\n- Item 1\n- Item 2\n- Item 3" }
|
|
29
59
|
});
|
|
30
|
-
var
|
|
60
|
+
var h = { markdown: m };
|
|
31
61
|
//#endregion
|
|
32
|
-
export {
|
|
62
|
+
export { m as MarkdownRenderer, h as markdownComponents };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-markdown",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Markdown rendering plugin for Object UI, powered by react-markdown",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"react-markdown": "^10.1.0",
|
|
28
28
|
"rehype-sanitize": "^6.0.0",
|
|
29
29
|
"remark-gfm": "^4.0.1",
|
|
30
|
-
"@object-ui/components": "4.0.
|
|
31
|
-
"@object-ui/core": "4.0.
|
|
32
|
-
"@object-ui/react": "4.0.
|
|
33
|
-
"@object-ui/types": "4.0.
|
|
30
|
+
"@object-ui/components": "4.0.5",
|
|
31
|
+
"@object-ui/core": "4.0.5",
|
|
32
|
+
"@object-ui/react": "4.0.5",
|
|
33
|
+
"@object-ui/types": "4.0.5"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import t from "react-markdown";
|
|
4
|
-
import n from "remark-gfm";
|
|
5
|
-
import r from "rehype-sanitize";
|
|
6
|
-
//#region src/MarkdownImpl.tsx
|
|
7
|
-
function i({ content: i, className: a }) {
|
|
8
|
-
return /* @__PURE__ */ e("div", {
|
|
9
|
-
"data-slot": "markdown",
|
|
10
|
-
className: ((...e) => e.filter(Boolean).join(" "))("prose prose-sm dark:prose-invert max-w-none", "prose-headings:font-semibold prose-headings:tracking-tight", "prose-h1:text-3xl prose-h2:text-2xl prose-h3:text-xl", "prose-p:leading-relaxed prose-p:text-foreground", "prose-a:text-primary prose-a:no-underline hover:prose-a:underline", "prose-code:text-foreground prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none", "prose-pre:bg-muted prose-pre:text-foreground prose-pre:border", "prose-blockquote:border-l-primary prose-blockquote:text-muted-foreground", "prose-strong:text-foreground prose-strong:font-semibold", "prose-ul:list-disc prose-ol:list-decimal", "prose-li:text-foreground prose-li:marker:text-muted-foreground", "prose-table:border prose-th:border prose-th:bg-muted prose-td:border", "prose-img:rounded-md prose-img:border", a),
|
|
11
|
-
children: /* @__PURE__ */ e(t, {
|
|
12
|
-
remarkPlugins: [n],
|
|
13
|
-
rehypePlugins: [r],
|
|
14
|
-
disallowedElements: [
|
|
15
|
-
"script",
|
|
16
|
-
"style",
|
|
17
|
-
"iframe",
|
|
18
|
-
"object",
|
|
19
|
-
"embed"
|
|
20
|
-
],
|
|
21
|
-
unwrapDisallowed: !0,
|
|
22
|
-
children: i
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { i as default };
|