@object-ui/plugin-markdown 0.3.1 → 2.0.0
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/.turbo/turbo-build.log +18 -0
- package/CHANGELOG.md +14 -0
- package/dist/{MarkdownImpl-BRkYjVWf.js → MarkdownImpl-DufQ-eRU.js} +2 -6
- package/dist/{index-D_CdfEXQ.js → index-CrmE78vF.js} +2 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/package.json +7 -7
- package/src/index.test.ts +1 -1
- package/src/index.tsx +1 -0
- package/vite.config.ts +13 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
> @object-ui/plugin-markdown@2.0.0 build /home/runner/work/objectui/objectui/packages/plugin-markdown
|
|
3
|
+
> vite build
|
|
4
|
+
|
|
5
|
+
[36mvite v7.3.1 [32mbuilding client environment for production...[36m[39m
|
|
6
|
+
transforming...
|
|
7
|
+
[32m✓[39m 268 modules transformed.
|
|
8
|
+
rendering chunks...
|
|
9
|
+
[32m
|
|
10
|
+
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
11
|
+
computing gzip size...
|
|
12
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 0.19 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
13
|
+
[2mdist/[22m[36mindex-CrmE78vF.js [39m[1m[2m 9.86 kB[22m[1m[22m[2m │ gzip: 3.22 kB[22m
|
|
14
|
+
[2mdist/[22m[36mMarkdownImpl-DufQ-eRU.js [39m[1m[2m262.84 kB[22m[1m[22m[2m │ gzip: 66.08 kB[22m
|
|
15
|
+
[32m[36m[vite:dts][32m Declaration files built in 19104ms.
|
|
16
|
+
[39m
|
|
17
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[2m170.20 kB[22m[1m[22m[2m │ gzip: 52.58 kB[22m
|
|
18
|
+
[32m✓ built in 29.01s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @object-ui/plugin-markdown
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- b859617: Release v1.0.0 — unify all package versions to 1.0.0
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [b859617]
|
|
12
|
+
- @object-ui/types@2.0.0
|
|
13
|
+
- @object-ui/core@2.0.0
|
|
14
|
+
- @object-ui/react@2.0.0
|
|
15
|
+
- @object-ui/components@2.0.0
|
|
16
|
+
|
|
3
17
|
## 0.3.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as Ve } from "./index-
|
|
1
|
+
import { j as Ve } from "./index-CrmE78vF.js";
|
|
2
2
|
import "react";
|
|
3
3
|
function lr(e) {
|
|
4
4
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -1788,11 +1788,7 @@ function Kn(e) {
|
|
|
1788
1788
|
const t = "&" + e + ";";
|
|
1789
1789
|
Et.innerHTML = t;
|
|
1790
1790
|
const n = Et.textContent;
|
|
1791
|
-
return (
|
|
1792
|
-
// @ts-expect-error: TypeScript is wrong that `textContent` on elements can
|
|
1793
|
-
// yield `null`.
|
|
1794
|
-
n.charCodeAt(n.length - 1) === 59 && e !== "semi" || n === t ? !1 : n
|
|
1795
|
-
);
|
|
1791
|
+
return n.charCodeAt(n.length - 1) === 59 && e !== "semi" || n === t ? !1 : n;
|
|
1796
1792
|
}
|
|
1797
1793
|
function re(e, t, n, r) {
|
|
1798
1794
|
const i = e.length;
|
|
@@ -261,7 +261,7 @@ function le() {
|
|
|
261
261
|
return F || (F = 1, process.env.NODE_ENV === "production" ? b.exports = oe() : b.exports = se()), b.exports;
|
|
262
262
|
}
|
|
263
263
|
var O = le();
|
|
264
|
-
const ue = D.lazy(() => import("./MarkdownImpl-
|
|
264
|
+
const ue = D.lazy(() => import("./MarkdownImpl-DufQ-eRU.js")), L = ({ schema: s }) => /* @__PURE__ */ O.jsx(te, { fallback: /* @__PURE__ */ O.jsx(ae, { className: "w-full h-[200px]" }), children: /* @__PURE__ */ O.jsx(
|
|
265
265
|
ue,
|
|
266
266
|
{
|
|
267
267
|
content: s.content || "",
|
|
@@ -272,6 +272,7 @@ ne.register(
|
|
|
272
272
|
"markdown",
|
|
273
273
|
L,
|
|
274
274
|
{
|
|
275
|
+
namespace: "plugin-markdown",
|
|
275
276
|
label: "Markdown",
|
|
276
277
|
category: "plugin",
|
|
277
278
|
inputs: [
|
package/dist/index.js
CHANGED
package/dist/index.umd.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,W,Q,re,Q),d[Q+W]=!0)}if(Q=null,m!==void 0&&(n(m),Q=""+m),l(z)&&(n(z.key),Q=""+z.key),"key"in z){m={};for(var ke in z)ke!=="key"&&(m[ke]=z[ke])}else m=z;return Q&&a(m,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,Q,m,i(),pe,K)}function c(w){h(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===B&&(w._payload.status==="fulfilled"?h(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function h(w){return typeof w=="object"&&w!==null&&w.$$typeof===g}var p=Ae,g=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),L=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),_=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,R=Array.isArray,v=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(w){return w()}};var V,J={},oe=p.react_stack_bottom_frame.bind(p,o)(),fe=v(r(o)),d={};Ue.Fragment=C,Ue.jsx=function(w,z,m){var W=1e4>_.recentlyCreatedOwnerStacks++;return f(w,z,m,!1,W?Error("react-stack-top-frame"):oe,W?v(r(w)):fe)},Ue.jsxs=function(w,z,m){var W=1e4>_.recentlyCreatedOwnerStacks++;return f(w,z,m,!0,W?Error("react-stack-top-frame"):oe,W?v(r(w)):fe)}})()),Ue}var yt;function Ai(){return yt||(yt=1,process.env.NODE_ENV==="production"?on.exports=Ti():on.exports=Ii()),on.exports}var Se=Ai();const vi=Ae.lazy(()=>Promise.resolve().then(()=>tf)),wn=({schema:e})=>Se.jsx(Ae.Suspense,{fallback:Se.jsx(Ei.Skeleton,{className:"w-full h-[200px]"}),children:Se.jsx(vi,{content:e.content||"",className:e.className})});Ci.ComponentRegistry.register("markdown",wn,{label:"Markdown",category:"plugin",inputs:[{name:"content",type:"string",label:"Markdown Content",required:!0,inputType:"textarea"},{name:"className",type:"string",label:"CSS Class"}],defaultProps:{content:`# Hello World
|
|
6
|
+
<%s key={someKey} {...props} />`,W,Q,re,Q),d[Q+W]=!0)}if(Q=null,m!==void 0&&(n(m),Q=""+m),l(z)&&(n(z.key),Q=""+z.key),"key"in z){m={};for(var ke in z)ke!=="key"&&(m[ke]=z[ke])}else m=z;return Q&&a(m,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,Q,m,i(),pe,K)}function c(w){h(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===B&&(w._payload.status==="fulfilled"?h(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function h(w){return typeof w=="object"&&w!==null&&w.$$typeof===g}var p=Ae,g=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),L=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),_=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,R=Array.isArray,v=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(w){return w()}};var V,J={},oe=p.react_stack_bottom_frame.bind(p,o)(),fe=v(r(o)),d={};Ue.Fragment=C,Ue.jsx=function(w,z,m){var W=1e4>_.recentlyCreatedOwnerStacks++;return f(w,z,m,!1,W?Error("react-stack-top-frame"):oe,W?v(r(w)):fe)},Ue.jsxs=function(w,z,m){var W=1e4>_.recentlyCreatedOwnerStacks++;return f(w,z,m,!0,W?Error("react-stack-top-frame"):oe,W?v(r(w)):fe)}})()),Ue}var yt;function Ai(){return yt||(yt=1,process.env.NODE_ENV==="production"?on.exports=Ti():on.exports=Ii()),on.exports}var Se=Ai();const vi=Ae.lazy(()=>Promise.resolve().then(()=>tf)),wn=({schema:e})=>Se.jsx(Ae.Suspense,{fallback:Se.jsx(Ei.Skeleton,{className:"w-full h-[200px]"}),children:Se.jsx(vi,{content:e.content||"",className:e.className})});Ci.ComponentRegistry.register("markdown",wn,{namespace:"plugin-markdown",label:"Markdown",category:"plugin",inputs:[{name:"content",type:"string",label:"Markdown Content",required:!0,inputType:"textarea"},{name:"className",type:"string",label:"CSS Class"}],defaultProps:{content:`# Hello World
|
|
7
7
|
|
|
8
8
|
This is a **markdown** component with *formatting* support.
|
|
9
9
|
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAS5D,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAS5D,CAAC;AA2BF,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
|
package/dist/src/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-markdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Markdown rendering plugin for Object UI, powered by react-markdown",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"react-markdown": "^10.1.0",
|
|
28
28
|
"remark-gfm": "^4.0.1",
|
|
29
29
|
"rehype-sanitize": "^6.0.0",
|
|
30
|
-
"@object-ui/components": "0.
|
|
31
|
-
"@object-ui/core": "0.
|
|
32
|
-
"@object-ui/react": "0.
|
|
33
|
-
"@object-ui/types": "0.
|
|
30
|
+
"@object-ui/components": "2.0.0",
|
|
31
|
+
"@object-ui/core": "2.0.0",
|
|
32
|
+
"@object-ui/react": "2.0.0",
|
|
33
|
+
"@object-ui/types": "2.0.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^18.0.0 || ^19.0.0",
|
|
37
37
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/react": "^19.2.
|
|
40
|
+
"@types/react": "^19.2.13",
|
|
41
41
|
"@types/react-dom": "^19.2.3",
|
|
42
|
-
"@vitejs/plugin-react": "^
|
|
42
|
+
"@vitejs/plugin-react": "^5.1.3",
|
|
43
43
|
"typescript": "^5.9.3",
|
|
44
44
|
"vite": "^7.3.1",
|
|
45
45
|
"vite-plugin-dts": "^4.5.4"
|
package/src/index.test.ts
CHANGED
|
@@ -13,7 +13,7 @@ describe('Plugin Markdown', () => {
|
|
|
13
13
|
// Import all renderers to register them
|
|
14
14
|
beforeAll(async () => {
|
|
15
15
|
await import('./index');
|
|
16
|
-
});
|
|
16
|
+
}, 15000); // Increase timeout to 15 seconds for async import
|
|
17
17
|
|
|
18
18
|
describe('markdown component', () => {
|
|
19
19
|
it('should be registered in ComponentRegistry', () => {
|
package/src/index.tsx
CHANGED
package/vite.config.ts
CHANGED
|
@@ -22,6 +22,13 @@ export default defineConfig({
|
|
|
22
22
|
resolve: {
|
|
23
23
|
alias: {
|
|
24
24
|
'@': resolve(__dirname, './src'),
|
|
25
|
+
'@object-ui/core': resolve(__dirname, '../core/src'),
|
|
26
|
+
'@object-ui/types': resolve(__dirname, '../types/src'),
|
|
27
|
+
'@object-ui/react': resolve(__dirname, '../react/src'),
|
|
28
|
+
'@object-ui/components': resolve(__dirname, '../components/src'),
|
|
29
|
+
'@object-ui/fields': resolve(__dirname, '../fields/src'),
|
|
30
|
+
'@object-ui/plugin-dashboard': resolve(__dirname, '../plugin-dashboard/src'),
|
|
31
|
+
'@object-ui/plugin-grid': resolve(__dirname, '../plugin-grid/src'),
|
|
25
32
|
},
|
|
26
33
|
},
|
|
27
34
|
build: {
|
|
@@ -43,4 +50,10 @@ export default defineConfig({
|
|
|
43
50
|
},
|
|
44
51
|
},
|
|
45
52
|
},
|
|
53
|
+
test: {
|
|
54
|
+
globals: true,
|
|
55
|
+
environment: 'happy-dom',
|
|
56
|
+
setupFiles: ['../../vitest.setup.tsx'],
|
|
57
|
+
passWithNoTests: true,
|
|
58
|
+
},
|
|
46
59
|
});
|