@vizel/react 0.0.1-alpha.1 → 0.0.1-alpha.6

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.
Files changed (51) hide show
  1. package/dist/index.js +66 -58
  2. package/dist/index10.js +54 -4
  3. package/dist/index11.js +44 -171
  4. package/dist/index12.js +25 -21
  5. package/dist/index13.js +58 -74
  6. package/dist/index14.js +88 -8
  7. package/dist/index15.js +4 -78
  8. package/dist/index16.js +168 -107
  9. package/dist/index17.js +23 -35
  10. package/dist/index18.js +21 -5
  11. package/dist/index19.js +73 -65
  12. package/dist/index2.js +77 -24
  13. package/dist/index20.js +8 -91
  14. package/dist/index21.js +10 -4
  15. package/dist/index22.js +77 -35
  16. package/dist/index23.js +113 -31
  17. package/dist/index24.js +32 -47
  18. package/dist/index25.js +5 -29
  19. package/dist/index26.js +68 -7
  20. package/dist/index27.js +89 -50
  21. package/dist/index28.js +4 -11
  22. package/dist/index29.js +37 -3
  23. package/dist/index3.js +52 -11
  24. package/dist/index30.js +53 -20
  25. package/dist/index31.js +34 -2
  26. package/dist/index32.js +47 -9738
  27. package/dist/index33.js +29 -17015
  28. package/dist/index34.js +8 -2
  29. package/dist/index35.js +52 -7
  30. package/dist/index36.js +12 -2
  31. package/dist/index37.js +15 -2
  32. package/dist/index38.js +3 -222
  33. package/dist/index39.js +20 -224
  34. package/dist/index4.js +238 -54
  35. package/dist/index40.js +2 -2
  36. package/dist/index41.js +9742 -2
  37. package/dist/index42.js +17018 -0
  38. package/dist/index43.js +4 -0
  39. package/dist/index44.js +10 -0
  40. package/dist/index45.js +4 -0
  41. package/dist/index46.js +4 -0
  42. package/dist/index47.js +224 -0
  43. package/dist/index48.js +227 -0
  44. package/dist/index49.js +4 -0
  45. package/dist/index5.js +82 -55
  46. package/dist/index50.js +4 -0
  47. package/dist/index6.js +71 -46
  48. package/dist/index7.js +64 -26
  49. package/dist/index8.js +58 -59
  50. package/dist/index9.js +2 -91
  51. package/package.json +25 -31
package/dist/index14.js CHANGED
@@ -1,11 +1,91 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { Icon as s } from "@iconify/react";
3
- import { vizelDefaultIconIds as I } from "@vizel/core";
4
- import { useVizelIconContext as m } from "./index3.js";
5
- function x({ name: o, customIcons: t, style: n, ...c }) {
6
- const { customIcons: r } = m(), e = t?.[o] ?? r?.[o] ?? I[o];
7
- return /* @__PURE__ */ i(s, { icon: e, style: { pointerEvents: "none", ...n }, ...c });
1
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
+ import { useState as a } from "react";
3
+ import { useVizelState as m } from "./index36.js";
4
+ import { VizelBubbleMenuButton as t } from "./index12.js";
5
+ import { VizelBubbleMenuColorPicker as o } from "./index13.js";
6
+ import { VizelIcon as l } from "./index20.js";
7
+ import { VizelLinkEditor as h } from "./index22.js";
8
+ import { VizelNodeSelector as k } from "./index23.js";
9
+ function z({
10
+ editor: i,
11
+ className: r,
12
+ enableEmbed: n
13
+ }) {
14
+ m(() => i);
15
+ const [s, c] = a(!1);
16
+ return s ? /* @__PURE__ */ e(
17
+ h,
18
+ {
19
+ editor: i,
20
+ onClose: () => c(!1),
21
+ ...n ? { enableEmbed: n } : {}
22
+ }
23
+ ) : /* @__PURE__ */ u("div", { className: `vizel-bubble-menu-toolbar ${r ?? ""}`, children: [
24
+ /* @__PURE__ */ e(k, { editor: i }),
25
+ /* @__PURE__ */ e(
26
+ t,
27
+ {
28
+ action: "bold",
29
+ onClick: () => i.chain().focus().toggleBold().run(),
30
+ isActive: i.isActive("bold"),
31
+ title: "Bold (Cmd+B)",
32
+ children: /* @__PURE__ */ e(l, { name: "bold" })
33
+ }
34
+ ),
35
+ /* @__PURE__ */ e(
36
+ t,
37
+ {
38
+ action: "italic",
39
+ onClick: () => i.chain().focus().toggleItalic().run(),
40
+ isActive: i.isActive("italic"),
41
+ title: "Italic (Cmd+I)",
42
+ children: /* @__PURE__ */ e(l, { name: "italic" })
43
+ }
44
+ ),
45
+ /* @__PURE__ */ e(
46
+ t,
47
+ {
48
+ action: "strike",
49
+ onClick: () => i.chain().focus().toggleStrike().run(),
50
+ isActive: i.isActive("strike"),
51
+ title: "Strikethrough",
52
+ children: /* @__PURE__ */ e(l, { name: "strikethrough" })
53
+ }
54
+ ),
55
+ /* @__PURE__ */ e(
56
+ t,
57
+ {
58
+ action: "underline",
59
+ onClick: () => i.chain().focus().toggleUnderline().run(),
60
+ isActive: i.isActive("underline"),
61
+ title: "Underline (Cmd+U)",
62
+ children: /* @__PURE__ */ e(l, { name: "underline" })
63
+ }
64
+ ),
65
+ /* @__PURE__ */ e(
66
+ t,
67
+ {
68
+ action: "code",
69
+ onClick: () => i.chain().focus().toggleCode().run(),
70
+ isActive: i.isActive("code"),
71
+ title: "Code (Cmd+E)",
72
+ children: /* @__PURE__ */ e(l, { name: "code" })
73
+ }
74
+ ),
75
+ /* @__PURE__ */ e(
76
+ t,
77
+ {
78
+ action: "link",
79
+ onClick: () => c(!0),
80
+ isActive: i.isActive("link"),
81
+ title: "Link (Cmd+K)",
82
+ children: /* @__PURE__ */ e(l, { name: "link" })
83
+ }
84
+ ),
85
+ /* @__PURE__ */ e(o, { editor: i, type: "textColor" }),
86
+ /* @__PURE__ */ e(o, { editor: i, type: "highlight" })
87
+ ] });
8
88
  }
9
89
  export {
10
- x as VizelIcon
90
+ z as VizelBubbleMenuDefault
11
91
  };
package/dist/index15.js CHANGED
@@ -1,81 +1,7 @@
1
- import { jsxs as a, jsx as i } from "react/jsx-runtime";
2
- import { detectVizelEmbedProvider as R } from "@vizel/core";
3
- import { useState as h, useRef as k, useMemo as v, useEffect as b, useCallback as p } from "react";
4
- import { VizelIcon as g } from "./index14.js";
5
- function P({
6
- editor: e,
7
- onClose: n,
8
- className: E,
9
- enableEmbed: m = !1
10
- }) {
11
- const d = e.getAttributes("link").href || "", [s, z] = h(d), [l, L] = h(!1), u = k(null), f = k(null), o = v(() => m ? e.extensionManager.extensions.some((r) => r.name === "embed") : !1, [e, m]), x = v(() => s.trim() ? R(s.trim()) !== null : !1, [s]);
12
- b(() => {
13
- f.current?.focus();
14
- }, []), b(() => {
15
- const t = (c) => {
16
- u.current && !u.current.contains(c.target) && n();
17
- }, r = (c) => {
18
- c.key === "Escape" && (c.preventDefault(), c.stopImmediatePropagation(), n());
19
- }, N = setTimeout(() => {
20
- document.addEventListener("mousedown", t);
21
- }, 0);
22
- return document.addEventListener("keydown", r, !0), () => {
23
- clearTimeout(N), document.removeEventListener("mousedown", t), document.removeEventListener("keydown", r, !0);
24
- };
25
- }, [n]);
26
- const y = p(
27
- (t) => {
28
- t.preventDefault();
29
- const r = s.trim();
30
- if (!r) {
31
- e.chain().focus().unsetLink().run(), n();
32
- return;
33
- }
34
- l && o ? e.chain().focus().unsetLink().setEmbed({ url: r }).run() : e.chain().focus().setLink({ href: r }).run(), n();
35
- },
36
- [e, s, l, o, n]
37
- ), w = p(() => {
38
- e.chain().focus().unsetLink().run(), n();
39
- }, [e, n]);
40
- return /* @__PURE__ */ a("form", { ref: u, onSubmit: y, className: `vizel-link-editor ${E ?? ""}`, children: [
41
- /* @__PURE__ */ a("div", { className: "vizel-link-editor-row", children: [
42
- /* @__PURE__ */ i(
43
- "input",
44
- {
45
- ref: f,
46
- type: "url",
47
- value: s,
48
- onChange: (t) => z(t.target.value),
49
- placeholder: "Enter URL...",
50
- className: "vizel-link-input"
51
- }
52
- ),
53
- /* @__PURE__ */ i("button", { type: "submit", className: "vizel-link-button", title: "Apply", children: /* @__PURE__ */ i(g, { name: "check" }) }),
54
- d && /* @__PURE__ */ i(
55
- "button",
56
- {
57
- type: "button",
58
- onClick: w,
59
- className: "vizel-link-button vizel-link-remove",
60
- title: "Remove link",
61
- children: /* @__PURE__ */ i(g, { name: "x" })
62
- }
63
- )
64
- ] }),
65
- o && x && /* @__PURE__ */ a("div", { className: "vizel-link-editor-embed-toggle", children: [
66
- /* @__PURE__ */ i(
67
- "input",
68
- {
69
- type: "checkbox",
70
- id: "vizel-embed-toggle",
71
- checked: l,
72
- onChange: (t) => L(t.target.checked)
73
- }
74
- ),
75
- /* @__PURE__ */ i("label", { htmlFor: "vizel-embed-toggle", children: "Embed as rich content" })
76
- ] })
77
- ] });
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ function n({ className: e }) {
3
+ return /* @__PURE__ */ i("span", { className: `vizel-bubble-menu-divider ${e ?? ""}` });
78
4
  }
79
5
  export {
80
- P as VizelLinkEditor
6
+ n as VizelBubbleMenuDivider
81
7
  };
package/dist/index16.js CHANGED
@@ -1,118 +1,179 @@
1
- import { jsxs as p, jsx as n } from "react/jsx-runtime";
2
- import { getVizelActiveNodeType as x, vizelDefaultNodeTypes as E } from "@vizel/core";
3
- import { useState as z, useRef as N, useEffect as w } from "react";
4
- import { useVizelState as y } from "./index28.js";
5
- import { VizelIcon as s } from "./index14.js";
6
- function $({
7
- editor: c,
8
- nodeTypes: r = E,
9
- className: D
1
+ import { jsxs as z, jsx as l } from "react/jsx-runtime";
2
+ import { normalizeVizelHexColor as N, isVizelValidHexColor as I } from "@vizel/core";
3
+ import { useState as K, useRef as L, useMemo as $, useEffect as y, useCallback as b } from "react";
4
+ import { VizelIcon as w } from "./index20.js";
5
+ const S = 4, j = ["transparent", "inherit"];
6
+ function q({
7
+ colors: f,
8
+ value: a,
9
+ onChange: m,
10
+ label: M = "Color palette",
11
+ className: O,
12
+ allowCustomColor: U = !0,
13
+ recentColors: s = [],
14
+ showRecentColors: h = !0,
15
+ noneValues: g = j
10
16
  }) {
11
- y(() => c);
12
- const [o, l] = z(!1), [f, a] = z(0), i = N(null), d = N(null), m = x(c, r), h = m?.label ?? "Text", g = m?.icon ?? "paragraph";
13
- w(() => {
14
- if (!o) return;
15
- const e = (t) => {
16
- i.current && !i.current.contains(t.target) && l(!1);
17
- };
18
- return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
19
- }, [o]), w(() => {
20
- o && d.current && d.current.focus();
21
- }, [o]);
22
- const b = (e) => {
23
- if (!o) {
24
- (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), l(!0), a(0));
25
- return;
26
- }
27
- switch (e.key) {
28
- case "Escape":
29
- e.preventDefault(), l(!1);
30
- break;
31
- case "ArrowDown":
32
- e.preventDefault(), a((t) => (t + 1) % r.length);
33
- break;
34
- case "ArrowUp":
35
- e.preventDefault(), a((t) => (t - 1 + r.length) % r.length);
36
- break;
37
- case "Enter":
38
- case " ": {
39
- e.preventDefault();
40
- const t = r[f];
41
- t && v(t);
42
- break;
17
+ const [p, d] = K(""), [x, v] = K(-1), u = L([]), D = L(null), i = $(
18
+ () => [...h ? s : [], ...f.map((e) => e.color)],
19
+ [h, s, f]
20
+ );
21
+ y(() => {
22
+ u.current.length > i.length && (u.current.length = i.length);
23
+ }, [i.length]);
24
+ const H = h ? s.length : 0, o = b(
25
+ (e) => g.includes(e),
26
+ [g]
27
+ ), k = b(
28
+ (e) => {
29
+ m(e), d("");
30
+ },
31
+ [m]
32
+ ), V = b(() => {
33
+ const e = N(p);
34
+ I(e) && (m(e), d(""));
35
+ }, [p, m]), R = (e) => {
36
+ e.key === "Enter" && (e.preventDefault(), V());
37
+ }, A = b(
38
+ (e, r) => {
39
+ const t = i.length;
40
+ if (t === 0) return;
41
+ let n = r, c = !1;
42
+ switch (e.key) {
43
+ case "ArrowRight":
44
+ n = (r + 1) % t, c = !0;
45
+ break;
46
+ case "ArrowLeft":
47
+ n = (r - 1 + t) % t, c = !0;
48
+ break;
49
+ case "ArrowDown":
50
+ n = Math.min(r + S, t - 1), c = !0;
51
+ break;
52
+ case "ArrowUp":
53
+ n = Math.max(r - S, 0), c = !0;
54
+ break;
55
+ case "Home":
56
+ n = 0, c = !0;
57
+ break;
58
+ case "End":
59
+ n = t - 1, c = !0;
60
+ break;
61
+ case "Enter":
62
+ case " ": {
63
+ e.preventDefault();
64
+ const E = i[r];
65
+ E && k(E);
66
+ return;
67
+ }
43
68
  }
44
- case "Home":
45
- e.preventDefault(), a(0);
46
- break;
47
- case "End":
48
- e.preventDefault(), a(r.length - 1);
49
- break;
50
- }
51
- }, v = (e) => {
52
- e.command(c), l(!1);
53
- };
54
- return /* @__PURE__ */ p(
69
+ c && (e.preventDefault(), v(n), u.current[n]?.focus());
70
+ },
71
+ [i, k]
72
+ );
73
+ y(() => {
74
+ a && !o(a) ? d(a) : d("");
75
+ }, [a, o]), y(() => {
76
+ const e = a ? i.indexOf(a) : -1;
77
+ e >= 0 ? v(e) : i.length > 0 && v(0);
78
+ }, [i, a]);
79
+ const C = I(N(p)), _ = C ? N(p) : void 0;
80
+ return /* @__PURE__ */ z(
55
81
  "div",
56
82
  {
57
- ref: i,
58
- className: `vizel-node-selector ${D ?? ""}`,
59
- "data-vizel-node-selector": !0,
83
+ className: `vizel-color-picker-content ${O ?? ""}`,
84
+ role: "listbox",
85
+ "aria-label": M,
60
86
  children: [
61
- /* @__PURE__ */ p(
62
- "button",
63
- {
64
- type: "button",
65
- className: "vizel-node-selector-trigger",
66
- onClick: () => l(!o),
67
- onKeyDown: b,
68
- "aria-haspopup": "listbox",
69
- "aria-expanded": o,
70
- "aria-label": `Current block type: ${h}`,
71
- title: "Change block type",
72
- children: [
73
- /* @__PURE__ */ n("span", { className: "vizel-node-selector-icon", children: /* @__PURE__ */ n(s, { name: g }) }),
74
- /* @__PURE__ */ n("span", { className: "vizel-node-selector-label", children: h }),
75
- /* @__PURE__ */ n("span", { className: "vizel-node-selector-chevron", "aria-hidden": "true", children: /* @__PURE__ */ n(s, { name: "chevronDown" }) })
76
- ]
77
- }
78
- ),
79
- o && /* @__PURE__ */ n(
80
- "div",
81
- {
82
- ref: d,
83
- className: "vizel-node-selector-dropdown",
84
- role: "listbox",
85
- "aria-label": "Block types",
86
- "data-vizel-node-selector-dropdown": !0,
87
- tabIndex: -1,
88
- onKeyDown: b,
89
- children: r.map((e, t) => {
90
- const u = e.isActive(c), k = t === f;
91
- return /* @__PURE__ */ p(
92
- "button",
93
- {
94
- type: "button",
95
- role: "option",
96
- "aria-selected": u,
97
- className: `vizel-node-selector-option ${u ? "is-active" : ""} ${k ? "is-focused" : ""}`,
98
- onClick: () => v(e),
99
- onMouseEnter: () => a(t),
100
- tabIndex: k ? 0 : -1,
101
- children: [
102
- /* @__PURE__ */ n("span", { className: "vizel-node-selector-option-icon", children: /* @__PURE__ */ n(s, { name: e.icon }) }),
103
- /* @__PURE__ */ n("span", { className: "vizel-node-selector-option-label", children: e.label }),
104
- u && /* @__PURE__ */ n("span", { className: "vizel-node-selector-check", "aria-hidden": "true", children: /* @__PURE__ */ n(s, { name: "check" }) })
105
- ]
106
- },
107
- e.name
108
- );
109
- })
110
- }
111
- )
87
+ h && s.length > 0 && /* @__PURE__ */ z("div", { className: "vizel-color-picker-section", children: [
88
+ /* @__PURE__ */ l("div", { className: "vizel-color-picker-label", children: "Recent" }),
89
+ /* @__PURE__ */ l("div", { className: "vizel-color-picker-recent", children: s.map((e, r) => /* @__PURE__ */ l(
90
+ "button",
91
+ {
92
+ ref: (t) => {
93
+ u.current[r] = t;
94
+ },
95
+ type: "button",
96
+ role: "option",
97
+ "aria-selected": a === e,
98
+ "aria-label": e,
99
+ tabIndex: x === r ? 0 : -1,
100
+ className: `vizel-color-picker-swatch ${a === e ? "is-active" : ""}`,
101
+ onClick: () => k(e),
102
+ onKeyDown: (t) => A(t, r),
103
+ style: {
104
+ backgroundColor: o(e) ? "transparent" : e
105
+ },
106
+ "data-color": e,
107
+ children: o(e) ? /* @__PURE__ */ l("span", { className: "vizel-color-picker-none", children: /* @__PURE__ */ l(w, { name: "x" }) }) : null
108
+ },
109
+ e
110
+ )) })
111
+ ] }),
112
+ /* @__PURE__ */ l("div", { className: "vizel-color-picker-section", children: /* @__PURE__ */ l("div", { className: "vizel-color-picker-grid", children: f.map((e, r) => {
113
+ const t = H + r;
114
+ return /* @__PURE__ */ l(
115
+ "button",
116
+ {
117
+ ref: (n) => {
118
+ u.current[t] = n;
119
+ },
120
+ type: "button",
121
+ role: "option",
122
+ "aria-selected": a === e.color,
123
+ "aria-label": e.name,
124
+ tabIndex: x === t ? 0 : -1,
125
+ className: `vizel-color-picker-swatch ${a === e.color ? "is-active" : ""}`,
126
+ onClick: () => k(e.color),
127
+ onKeyDown: (n) => A(n, t),
128
+ style: {
129
+ backgroundColor: o(e.color) ? "transparent" : e.color
130
+ },
131
+ "data-color": e.color,
132
+ children: o(e.color) ? /* @__PURE__ */ l("span", { className: "vizel-color-picker-none", children: /* @__PURE__ */ l(w, { name: "x" }) }) : null
133
+ },
134
+ e.color
135
+ );
136
+ }) }) }),
137
+ U && /* @__PURE__ */ z("div", { className: "vizel-color-picker-input-row", children: [
138
+ /* @__PURE__ */ l(
139
+ "span",
140
+ {
141
+ className: "vizel-color-picker-preview",
142
+ style: { backgroundColor: _ || "transparent" },
143
+ "aria-hidden": "true"
144
+ }
145
+ ),
146
+ /* @__PURE__ */ l(
147
+ "input",
148
+ {
149
+ ref: D,
150
+ type: "text",
151
+ className: "vizel-color-picker-input",
152
+ placeholder: "#000000",
153
+ value: p,
154
+ onChange: (e) => d(e.target.value),
155
+ onKeyDown: R,
156
+ maxLength: 7,
157
+ "aria-label": "Custom color hex value"
158
+ }
159
+ ),
160
+ /* @__PURE__ */ l(
161
+ "button",
162
+ {
163
+ type: "button",
164
+ className: "vizel-color-picker-apply",
165
+ onClick: V,
166
+ disabled: !C,
167
+ title: "Apply",
168
+ "aria-label": "Apply custom color",
169
+ children: /* @__PURE__ */ l(w, { name: "check" })
170
+ }
171
+ )
172
+ ] })
112
173
  ]
113
174
  }
114
175
  );
115
176
  }
116
177
  export {
117
- $ as VizelNodeSelector
178
+ q as VizelColorPicker
118
179
  };
package/dist/index17.js CHANGED
@@ -1,38 +1,26 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { getVizelPortalContainer as s, VIZEL_PORTAL_Z_INDEX as f } from "@vizel/core";
3
- import { useState as m, useEffect as p } from "react";
4
- import { createPortal as u } from "react-dom";
5
- function d({
6
- children: t,
7
- layer: o = "dropdown",
8
- className: e,
9
- disabled: r = !1
10
- }) {
11
- const [a, i] = m(!1);
12
- if (p(() => {
13
- i(!0);
14
- }, []), !a || r)
15
- return t;
16
- const l = s();
17
- return u(
18
- /* @__PURE__ */ n(
19
- "div",
20
- {
21
- "data-vizel-portal-layer": o,
22
- className: e,
23
- style: {
24
- position: "absolute",
25
- top: 0,
26
- left: 0,
27
- zIndex: f[o]
28
- },
29
- children: t
30
- }
31
- ),
32
- l
33
- );
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { createContext as i, useContext as r } from "react";
3
+ const t = i(null);
4
+ function x({ editor: e, children: n }) {
5
+ return /* @__PURE__ */ o(t.Provider, { value: { editor: e }, children: n });
6
+ }
7
+ function z() {
8
+ const e = r(t);
9
+ if (e === null)
10
+ throw new Error(
11
+ `[Vizel] useVizelContext must be used within <VizelProvider> or <Vizel>.
12
+ Example:
13
+ <VizelProvider editor={editor}>
14
+ <YourComponent />
15
+ </VizelProvider>`
16
+ );
17
+ return e;
18
+ }
19
+ function V() {
20
+ return r(t);
34
21
  }
35
- d.displayName = "VizelPortal";
36
22
  export {
37
- d as VizelPortal
23
+ x as VizelInternalProvider,
24
+ z as useVizelContext,
25
+ V as useVizelContextSafe
38
26
  };
package/dist/index18.js CHANGED
@@ -1,8 +1,24 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { VizelInternalProvider as t } from "./index2.js";
3
- function l({ editor: i, children: o, className: e }) {
4
- return /* @__PURE__ */ r(t, { editor: i, children: /* @__PURE__ */ r("div", { className: e, "data-vizel-root": "", children: o }) });
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { useRef as a, useImperativeHandle as c, useEffect as l } from "react";
3
+ import { useVizelContextSafe as s } from "./index17.js";
4
+ function v({ ref: i, editor: o, className: n }) {
5
+ const d = s(), e = o ?? d?.editor, r = a(null);
6
+ return c(
7
+ i,
8
+ () => ({
9
+ container: r.current
10
+ }),
11
+ []
12
+ ), l(() => {
13
+ const t = r.current;
14
+ if (e && t)
15
+ return t.appendChild(e.view.dom), e.view.setProps({
16
+ editable: () => e?.isEditable ?? !1
17
+ }), () => {
18
+ e.view.dom.parentNode === t && t.removeChild(e.view.dom);
19
+ };
20
+ }, [e]), e ? /* @__PURE__ */ f("div", { ref: r, className: n, "data-vizel-content": "" }) : null;
5
21
  }
6
22
  export {
7
- l as VizelProvider
23
+ v as VizelEditor
8
24
  };