@object-ui/plugin-markdown 3.1.2 → 3.1.4

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.
@@ -1,306 +0,0 @@
1
- import D, { Suspense as te } from "react";
2
- import { ComponentRegistry as ne } from "@object-ui/core";
3
- import { Skeleton as ae } from "@object-ui/components";
4
- var b = { exports: {} }, d = {};
5
- var $;
6
- function oe() {
7
- if ($) return d;
8
- $ = 1;
9
- var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), _ = /* @__PURE__ */ Symbol.for("react.fragment");
10
- function c(i, o, l) {
11
- var f = null;
12
- if (l !== void 0 && (f = "" + l), o.key !== void 0 && (f = "" + o.key), "key" in o) {
13
- l = {};
14
- for (var m in o)
15
- m !== "key" && (l[m] = o[m]);
16
- } else l = o;
17
- return o = l.ref, {
18
- $$typeof: s,
19
- type: i,
20
- key: f,
21
- ref: o !== void 0 ? o : null,
22
- props: l
23
- };
24
- }
25
- return d.Fragment = _, d.jsx = c, d.jsxs = c, d;
26
- }
27
- var p = {};
28
- var M;
29
- function se() {
30
- return M || (M = 1, process.env.NODE_ENV !== "production" && (function() {
31
- function s(e) {
32
- if (e == null) return null;
33
- if (typeof e == "function")
34
- return e.$$typeof === K ? null : e.displayName || e.name || null;
35
- if (typeof e == "string") return e;
36
- switch (e) {
37
- case v:
38
- return "Fragment";
39
- case J:
40
- return "Profiler";
41
- case z:
42
- return "StrictMode";
43
- case H:
44
- return "Suspense";
45
- case B:
46
- return "SuspenseList";
47
- case Q:
48
- return "Activity";
49
- }
50
- if (typeof e == "object")
51
- switch (typeof e.tag == "number" && console.error(
52
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
53
- ), e.$$typeof) {
54
- case q:
55
- return "Portal";
56
- case G:
57
- return e.displayName || "Context";
58
- case V:
59
- return (e._context.displayName || "Context") + ".Consumer";
60
- case X:
61
- var r = e.render;
62
- return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
63
- case Z:
64
- return r = e.displayName || null, r !== null ? r : s(e.type) || "Memo";
65
- case T:
66
- r = e._payload, e = e._init;
67
- try {
68
- return s(e(r));
69
- } catch {
70
- }
71
- }
72
- return null;
73
- }
74
- function _(e) {
75
- return "" + e;
76
- }
77
- function c(e) {
78
- try {
79
- _(e);
80
- var r = !1;
81
- } catch {
82
- r = !0;
83
- }
84
- if (r) {
85
- r = console;
86
- var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
87
- return t.call(
88
- r,
89
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
- n
91
- ), _(e);
92
- }
93
- }
94
- function i(e) {
95
- if (e === v) return "<>";
96
- if (typeof e == "object" && e !== null && e.$$typeof === T)
97
- return "<...>";
98
- try {
99
- var r = s(e);
100
- return r ? "<" + r + ">" : "<...>";
101
- } catch {
102
- return "<...>";
103
- }
104
- }
105
- function o() {
106
- var e = k.A;
107
- return e === null ? null : e.getOwner();
108
- }
109
- function l() {
110
- return Error("react-stack-top-frame");
111
- }
112
- function f(e) {
113
- if (j.call(e, "key")) {
114
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
115
- if (r && r.isReactWarning) return !1;
116
- }
117
- return e.key !== void 0;
118
- }
119
- function m(e, r) {
120
- function t() {
121
- h || (h = !0, console.error(
122
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
123
- r
124
- ));
125
- }
126
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
127
- get: t,
128
- configurable: !0
129
- });
130
- }
131
- function W() {
132
- var e = s(this.type);
133
- return N[e] || (N[e] = !0, console.error(
134
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
135
- )), e = this.props.ref, e !== void 0 ? e : null;
136
- }
137
- function U(e, r, t, n, R, y) {
138
- var a = t.ref;
139
- return e = {
140
- $$typeof: P,
141
- type: e,
142
- key: r,
143
- props: t,
144
- _owner: n
145
- }, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
146
- enumerable: !1,
147
- get: W
148
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
149
- configurable: !1,
150
- enumerable: !1,
151
- writable: !0,
152
- value: 0
153
- }), Object.defineProperty(e, "_debugInfo", {
154
- configurable: !1,
155
- enumerable: !1,
156
- writable: !0,
157
- value: null
158
- }), Object.defineProperty(e, "_debugStack", {
159
- configurable: !1,
160
- enumerable: !1,
161
- writable: !0,
162
- value: R
163
- }), Object.defineProperty(e, "_debugTask", {
164
- configurable: !1,
165
- enumerable: !1,
166
- writable: !0,
167
- value: y
168
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
169
- }
170
- function g(e, r, t, n, R, y) {
171
- var a = r.children;
172
- if (a !== void 0)
173
- if (n)
174
- if (ee(a)) {
175
- for (n = 0; n < a.length; n++)
176
- x(a[n]);
177
- Object.freeze && Object.freeze(a);
178
- } else
179
- console.error(
180
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
181
- );
182
- else x(a);
183
- if (j.call(r, "key")) {
184
- a = s(e);
185
- var u = Object.keys(r).filter(function(re) {
186
- return re !== "key";
187
- });
188
- n = 0 < u.length ? "{key: someKey, " + u.join(": ..., ") + ": ...}" : "{key: someKey}", I[a + n] || (u = 0 < u.length ? "{" + u.join(": ..., ") + ": ...}" : "{}", console.error(
189
- `A props object containing a "key" prop is being spread into JSX:
190
- let props = %s;
191
- <%s {...props} />
192
- React keys must be passed directly to JSX without using spread:
193
- let props = %s;
194
- <%s key={someKey} {...props} />`,
195
- n,
196
- a,
197
- u,
198
- a
199
- ), I[a + n] = !0);
200
- }
201
- if (a = null, t !== void 0 && (c(t), a = "" + t), f(r) && (c(r.key), a = "" + r.key), "key" in r) {
202
- t = {};
203
- for (var S in r)
204
- S !== "key" && (t[S] = r[S]);
205
- } else t = r;
206
- return a && m(
207
- t,
208
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
209
- ), U(
210
- e,
211
- a,
212
- t,
213
- o(),
214
- R,
215
- y
216
- );
217
- }
218
- function x(e) {
219
- A(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? A(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
220
- }
221
- function A(e) {
222
- return typeof e == "object" && e !== null && e.$$typeof === P;
223
- }
224
- var E = D, P = /* @__PURE__ */ Symbol.for("react.transitional.element"), q = /* @__PURE__ */ Symbol.for("react.portal"), v = /* @__PURE__ */ Symbol.for("react.fragment"), z = /* @__PURE__ */ Symbol.for("react.strict_mode"), J = /* @__PURE__ */ Symbol.for("react.profiler"), V = /* @__PURE__ */ Symbol.for("react.consumer"), G = /* @__PURE__ */ Symbol.for("react.context"), X = /* @__PURE__ */ Symbol.for("react.forward_ref"), H = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), Z = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), Q = /* @__PURE__ */ Symbol.for("react.activity"), K = /* @__PURE__ */ Symbol.for("react.client.reference"), k = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, ee = Array.isArray, w = console.createTask ? console.createTask : function() {
225
- return null;
226
- };
227
- E = {
228
- react_stack_bottom_frame: function(e) {
229
- return e();
230
- }
231
- };
232
- var h, N = {}, C = E.react_stack_bottom_frame.bind(
233
- E,
234
- l
235
- )(), Y = w(i(l)), I = {};
236
- p.Fragment = v, p.jsx = function(e, r, t) {
237
- var n = 1e4 > k.recentlyCreatedOwnerStacks++;
238
- return g(
239
- e,
240
- r,
241
- t,
242
- !1,
243
- n ? Error("react-stack-top-frame") : C,
244
- n ? w(i(e)) : Y
245
- );
246
- }, p.jsxs = function(e, r, t) {
247
- var n = 1e4 > k.recentlyCreatedOwnerStacks++;
248
- return g(
249
- e,
250
- r,
251
- t,
252
- !0,
253
- n ? Error("react-stack-top-frame") : C,
254
- n ? w(i(e)) : Y
255
- );
256
- };
257
- })()), p;
258
- }
259
- var F;
260
- function le() {
261
- return F || (F = 1, process.env.NODE_ENV === "production" ? b.exports = oe() : b.exports = se()), b.exports;
262
- }
263
- var O = le();
264
- const ue = D.lazy(() => import("./MarkdownImpl-E6vCIsNj.js")), L = ({ schema: s }) => /* @__PURE__ */ O.jsx(te, { fallback: /* @__PURE__ */ O.jsx(ae, { className: "w-full h-[200px]" }), children: /* @__PURE__ */ O.jsx(
265
- ue,
266
- {
267
- content: s.content || "",
268
- className: s.className
269
- }
270
- ) });
271
- ne.register(
272
- "markdown",
273
- L,
274
- {
275
- namespace: "plugin-markdown",
276
- label: "Markdown",
277
- category: "plugin",
278
- inputs: [
279
- {
280
- name: "content",
281
- type: "string",
282
- label: "Markdown Content",
283
- required: !0,
284
- inputType: "textarea"
285
- },
286
- { name: "className", type: "string", label: "CSS Class" }
287
- ],
288
- defaultProps: {
289
- content: `# Hello World
290
-
291
- This is a **markdown** component with *formatting* support.
292
-
293
- - Item 1
294
- - Item 2
295
- - Item 3`
296
- }
297
- }
298
- );
299
- const me = {
300
- markdown: L
301
- };
302
- export {
303
- L as M,
304
- O as j,
305
- me as m
306
- };