reactjs-tiptap-editor 1.0.16 → 1.0.17
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/lib/ActionMenuButton-B_E2mbAW.cjs +1 -0
- package/lib/{ActionMenuButton-a8LhmHXe.js → ActionMenuButton-lsIBc9sU.js} +12 -16
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +28 -32
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +11 -13
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +13 -15
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +15 -17
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +56 -62
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +12 -13
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +8 -10
- package/lib/CodeBlock.cjs +29 -29
- package/lib/CodeBlock.js +11 -14
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +9 -11
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +26 -29
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +7 -9
- package/lib/{Drawer-CbOJ1Igo.js → Drawer-DQ4CxBwG.js} +23 -29
- package/lib/Drawer-FUeUKshi.cjs +1 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +13 -15
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +276 -5
- package/lib/ExportPdf.cjs +2 -2
- package/lib/ExportPdf.js +19 -21
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +8 -10
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +9 -10
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +19 -20
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +27 -28
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +24 -27
- package/lib/History.cjs +1 -1
- package/lib/History.js +25 -28
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +8 -10
- package/lib/{Iframe-CmjbQQcz.js → Iframe-CTajPyzs.js} +34 -38
- package/lib/Iframe-EVWXCqe4.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +4 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +109 -114
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +15 -18
- package/lib/{Indent-BoG-vpIE.js → Indent-BGEHlRx_.js} +24 -26
- package/lib/Indent-q9cEWAa_.cjs +1 -0
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +11 -13
- package/lib/Katex-ClqcEnN_.cjs +4 -0
- package/lib/{Katex-ByL9snce.js → Katex-tMh4bfBb.js} +19 -24
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +17 -20
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-Ckih17pU.js → LinkEditBlock-CA5NhP-m.js} +19 -26
- package/lib/LinkEditBlock-DZXk4ln_.cjs +5 -0
- package/lib/Mention.js +3 -3
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +31 -36
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +25 -29
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +13 -15
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +62 -69
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +5 -5
- package/lib/SlashCommandNodeView-CZoM3ZlS.cjs +1 -0
- package/lib/{SlashCommandNodeView-B2g1MbgN.js → SlashCommandNodeView-DLuqbX2o.js} +64 -69
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +12 -14
- package/lib/{Table-BEwrZVup.js → Table-BC4Lbqzn.js} +27 -29
- package/lib/Table-BmDopO43.cjs +9 -0
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +18 -20
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +29 -33
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +16 -20
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +7 -9
- package/lib/Twitter-BbMD3Ybp.cjs +1 -0
- package/lib/{Twitter-4U_ZBhpv.js → Twitter-D8Cbgl7g.js} +17 -23
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +5 -270
- package/lib/bubble.cjs +4 -4
- package/lib/bubble.js +543 -552
- package/lib/{clsx-DSzxBzvL.js → clsx-DaPvp9ji.js} +23 -23
- package/lib/components/ReactBus.d.ts +11 -0
- package/lib/components/SlashDialogTrigger/RenderDialogUploadImage.d.ts +1 -0
- package/lib/components/SlashDialogTrigger/RenderDialogUploadVideo.d.ts +1 -0
- package/lib/components/SlashDialogTrigger/SlashDialogTrigger.d.ts +5 -0
- package/lib/{dropdown-menu-eUeBXQeA.cjs → dropdown-menu-C_F7LEy5.cjs} +1 -1
- package/lib/{dropdown-menu-CW3Kthwy.js → dropdown-menu-q6RL_fkA.js} +1 -1
- package/lib/{index-4bHF5ovf.js → index-BDYJ8Ph2.js} +1 -1
- package/lib/index-BnVcq33n.cjs +1 -0
- package/lib/{index-DR5tIdL7.js → index-Do_dsOGB.js} +1 -1
- package/lib/{index-CpTykZBR.js → index-DqruLhsu.js} +1 -1
- package/lib/{index-D8li6EQ4.js → index-Qcl3BG94.js} +1 -1
- package/lib/index-RcSPeQHn.js +4941 -0
- package/lib/index.cjs +3 -3
- package/lib/index.js +45 -49
- package/lib/{popover-CeY3RbI5.js → popover-CtinPbiy.js} +1 -1
- package/lib/{popover-C6Cya3Cz.cjs → popover-DIMT3pae.cjs} +1 -1
- package/lib/{renderNodeView-CSazLrKF.js → renderNodeView-BEkECnnY.js} +2 -2
- package/lib/{select-Doa_-jkZ.cjs → select-CYyIeImH.cjs} +1 -1
- package/lib/{select-F0ZZ3VZB.js → select-CmV5uTXr.js} +1 -1
- package/lib/separator-BLp6xpSY.cjs +1 -0
- package/lib/{separator-Cjn4YH8a.js → separator-C7luvaG8.js} +13 -15
- package/lib/store/store.d.ts +2 -22
- package/lib/style.css +1 -1
- package/lib/{textarea-tOsPnxHf.js → textarea-CkVKMPqK.js} +1 -1
- package/lib/{textarea-BAolHF_W.cjs → textarea-Cn75Cm2n.cjs} +1 -1
- package/lib/{updatePosition-CDK7OR0i.js → updatePosition-DRmKQBGm.js} +2 -2
- package/lib/utils/checkIsVideoUrl.d.ts +1 -0
- package/lib/utils/customEvents/events.constant.d.ts +1 -0
- package/lib/utils/mitt.d.ts +6 -3
- package/package.json +1 -1
- package/lib/ActionMenuButton-BYu0NyVo.cjs +0 -1
- package/lib/Drawer-DNaDMoAk.cjs +0 -1
- package/lib/Excalidraw-DnHTVOj8.js +0 -355
- package/lib/Excalidraw-DxfO1lQ_.cjs +0 -1
- package/lib/Icon-C0TJMAOm.js +0 -12
- package/lib/Icon-DzK0_ztP.cjs +0 -1
- package/lib/Iframe-BSNCsofW.cjs +0 -1
- package/lib/Image-BZEFuS0P.js +0 -925
- package/lib/Image-iKsGKjvg.cjs +0 -1
- package/lib/Indent-Bou16OcB.cjs +0 -1
- package/lib/Katex-BqDocr3a.cjs +0 -4
- package/lib/LinkEditBlock-B0I0EUrt.cjs +0 -5
- package/lib/SlashCommandNodeView-BEJhEzba.cjs +0 -1
- package/lib/Table-BclWwp6P.cjs +0 -9
- package/lib/Twitter-Dtq6PEMC.cjs +0 -1
- package/lib/button-Bwn6gUuS.js +0 -43
- package/lib/button-CqJztfH2.cjs +0 -1
- package/lib/checkbox-BAzbZY2Y.cjs +0 -1
- package/lib/checkbox-B_rpz5Xq.js +0 -27
- package/lib/dialog-CJvpoeMm.js +0 -101
- package/lib/dialog-CWYTvz5J.cjs +0 -1
- package/lib/events.constant-Dq21NPdV.cjs +0 -1
- package/lib/events.constant-do95b767.js +0 -21
- package/lib/extensions/Image/store.d.ts +0 -4
- package/lib/extensions/Video/store.d.ts +0 -4
- package/lib/file-BLas99n7.js +0 -43
- package/lib/file-i7e4nQY2.cjs +0 -1
- package/lib/index-CL7JP-Xz.js +0 -426
- package/lib/index-Cn-t3Zxw.cjs +0 -1
- package/lib/index-DoiuU6VA.js +0 -2315
- package/lib/index-VhKd73hZ.cjs +0 -1
- package/lib/input-B1egKb-t.js +0 -21
- package/lib/input-ZGRt7lWR.cjs +0 -1
- package/lib/isNumber-BTYSVlKo.cjs +0 -1
- package/lib/isNumber-ClwLypY2.js +0 -15
- package/lib/label-Cjrzc5H2.js +0 -19
- package/lib/label-tzSPdqui.cjs +0 -1
- package/lib/separator-CUh5Y7Rh.cjs +0 -1
- package/lib/store/fast-context.d.ts +0 -7
- package/lib/store-BsJz5QRC.js +0 -10
- package/lib/store-DjkMIIEN.cjs +0 -1
- package/lib/tabs-BP8ypR_m.cjs +0 -1
- package/lib/tabs-CBDjOLl_.js +0 -46
- package/lib/throttle-D040PfWL.js +0 -249
- package/lib/throttle-gTTvqDTW.cjs +0 -1
- package/lib/toggle-C_SSvDRy.cjs +0 -1
- package/lib/toggle-DEerYRil.js +0 -99
- package/lib/tooltip-BJIvosho.js +0 -24
- package/lib/tooltip-FS1rsvd3.cjs +0 -1
- package/lib/useButtonProps-CtZCbMQu.js +0 -136
- package/lib/useButtonProps-Cz4W5dC8.cjs +0 -1
- package/lib/utils/_event.d.ts +0 -13
- package/lib/utils/customEvents/customEvents.d.ts +0 -3
package/lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("react"),C=require("./clsx-CXbNJWDD.cjs"),d=require("./index-BnVcq33n.cjs"),f=require("./theme.cjs"),M=`
|
|
2
2
|
.reactjs-tiptap-editor {
|
|
3
3
|
button,
|
|
4
4
|
input:where([type=button]),
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
height: auto;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
`;function
|
|
108
|
+
`;function N({editor:e}){const n=d.useStoreEditableEditor();l.useEffect(()=>{n(e==null?void 0:e.isEditable)},[e==null?void 0:e.isEditable]);const t=()=>{n(e==null?void 0:e.isEditable)};return l.useEffect(()=>(e&&e.on("update",t),()=>{e&&e.off("update",t)}),[e]),o.jsx(o.Fragment,{})}const m="data-rc-order",x="data-rc-priority",P="rc-util-key",h=new Map;function A(e,n){if(!e)return!1;if(e.contains)return e.contains(n);let t=n;for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function E({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:P}function p(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function $(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function v(e){return[...(h.get(e)||e).children].filter(n=>n.tagName==="STYLE")}function j(e,n={}){const{csp:t,prepend:a,priority:r=0}=n,c=$(a),s=c==="prependQueue",i=document.createElement("style");i.setAttribute(m,c),s&&r&&i.setAttribute(x,`${r}`),t!=null&&t.nonce&&(i.nonce=t==null?void 0:t.nonce),i.innerHTML=e;const u=p(n),{firstChild:T}=u;if(a){if(s){const b=v(u).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(m)))return!1;const w=Number(g.getAttribute(x)||0);return r>=w});if(b.length>0)return u.insertBefore(i,b.at(-1).nextSibling),i}T.before(i)}else u.append(i);return i}function y(e,n={}){const t=p(n);return v(t).find(a=>a.getAttribute(E(n))===e)}function S(e,n={}){const t=y(e,n);t&&t.remove()}function q(e,n){const t=h.get(e);if(!t||!A(document,t)){const a=j("",n),{parentNode:r}=a;h.set(e,r),a.remove()}}function R(e,n,t={}){var s,i,u;const a=p(t);q(a,t);const r=y(n,t);if(r)return(s=t.csp)!=null&&s.nonce&&r.nonce!==((i=t.csp)==null?void 0:i.nonce)&&(r.nonce=(u=t.csp)==null?void 0:u.nonce),r.innerHTML!==e&&(r.innerHTML=e),r;const c=j(e,t);return c.setAttribute(E(t),n),c}function O(){const{theme:e,color:n,borderRadius:t}=f.useTheme();return l.useEffect(()=>{const a=e||"light",r=n||"default";let c=f.THEME[a][r];if(!c){c=f.THEME.light.default;return}return R(`
|
|
109
109
|
.reactjs-tiptap-editor, .reactjs-tiptap-editor *,
|
|
110
110
|
.reactjs-tiptap-editor-theme, .reactjs-tiptap-editor-theme *,
|
|
111
111
|
div[data-richtext-portal], div[data-richtext-portal] * {
|
|
112
112
|
${Object.entries(c).map(([s,i])=>typeof t=="string"&&s==="radius"?`--${s}: ${t};`:`--${s}: ${i};`).join(`
|
|
113
113
|
`)}
|
|
114
114
|
}
|
|
115
|
-
`,"richtext-theme",{priority:50}),()=>{
|
|
115
|
+
`,"richtext-theme",{priority:50}),()=>{S("richtext-theme")}},[e,n,t]),o.jsx(o.Fragment,{})}function H({editor:e,children:n}){const t=l.useId();return l.useEffect(()=>(R(M,"react-tiptap-reset"),()=>{S("react-tiptap-reset")}),[]),l.useEffect(()=>{e&&(e.id=t)},[t,e]),e?o.jsx("div",{className:"reactjs-tiptap-editor",children:o.jsx(d.ReactBusProvider,{children:o.jsxs(C.EditorContext.Provider,{value:{editor:e},children:[o.jsx(d.TooltipProvider,{delayDuration:0,disableHoverableContent:!0,children:n}),o.jsx(N,{editor:e}),o.jsx(d.SlashDialogTrigger,{}),o.jsx(O,{})]})})}):o.jsx(o.Fragment,{})}exports.RichTextProvider=H;
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as l, useId as
|
|
3
|
-
import { C as M } from "./clsx-
|
|
4
|
-
import {
|
|
5
|
-
import { useTheme as
|
|
6
|
-
|
|
7
|
-
const O = `
|
|
1
|
+
import { jsx as s, Fragment as f, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as l, useId as j } from "react";
|
|
3
|
+
import { C as M } from "./clsx-DaPvp9ji.js";
|
|
4
|
+
import { N as P, R as A, O, S as $ } from "./index-RcSPeQHn.js";
|
|
5
|
+
import { useTheme as D, THEME as m } from "./theme.js";
|
|
6
|
+
const H = `
|
|
8
7
|
.reactjs-tiptap-editor {
|
|
9
8
|
button,
|
|
10
9
|
input:where([type=button]),
|
|
@@ -112,24 +111,20 @@ const O = `
|
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
`;
|
|
115
|
-
function
|
|
114
|
+
function L({ editor: e }) {
|
|
116
115
|
const n = P();
|
|
117
116
|
l(() => {
|
|
118
|
-
n(
|
|
119
|
-
value: e == null ? void 0 : e.isEditable
|
|
120
|
-
});
|
|
117
|
+
n(e == null ? void 0 : e.isEditable);
|
|
121
118
|
}, [e == null ? void 0 : e.isEditable]);
|
|
122
119
|
const t = () => {
|
|
123
|
-
n(
|
|
124
|
-
value: e == null ? void 0 : e.isEditable
|
|
125
|
-
});
|
|
120
|
+
n(e == null ? void 0 : e.isEditable);
|
|
126
121
|
};
|
|
127
122
|
return l(() => (e && e.on("update", t), () => {
|
|
128
123
|
e && e.off("update", t);
|
|
129
|
-
}), [e]), /* @__PURE__ */
|
|
124
|
+
}), [e]), /* @__PURE__ */ s(f, {});
|
|
130
125
|
}
|
|
131
|
-
const g = "data-rc-order", v = "data-rc-priority",
|
|
132
|
-
function
|
|
126
|
+
const g = "data-rc-order", v = "data-rc-priority", z = "rc-util-key", d = /* @__PURE__ */ new Map();
|
|
127
|
+
function Q(e, n) {
|
|
133
128
|
if (!e)
|
|
134
129
|
return !1;
|
|
135
130
|
if (e.contains)
|
|
@@ -143,66 +138,66 @@ function z(e, n) {
|
|
|
143
138
|
return !1;
|
|
144
139
|
}
|
|
145
140
|
function E({ mark: e } = {}) {
|
|
146
|
-
return e ? e.startsWith("data-") ? e : `data-${e}` :
|
|
141
|
+
return e ? e.startsWith("data-") ? e : `data-${e}` : z;
|
|
147
142
|
}
|
|
148
|
-
function
|
|
143
|
+
function h(e) {
|
|
149
144
|
return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
|
|
150
145
|
}
|
|
151
|
-
function
|
|
146
|
+
function _(e) {
|
|
152
147
|
return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
|
|
153
148
|
}
|
|
154
149
|
function x(e) {
|
|
155
|
-
return [...(
|
|
150
|
+
return [...(d.get(e) || e).children].filter(
|
|
156
151
|
(n) => n.tagName === "STYLE"
|
|
157
152
|
);
|
|
158
153
|
}
|
|
159
154
|
function y(e, n = {}) {
|
|
160
|
-
const { csp: t, prepend: o, priority: r = 0 } = n, a =
|
|
155
|
+
const { csp: t, prepend: o, priority: r = 0 } = n, a = _(o), c = a === "prependQueue", i = document.createElement("style");
|
|
161
156
|
i.setAttribute(g, a), c && r && i.setAttribute(v, `${r}`), t != null && t.nonce && (i.nonce = t == null ? void 0 : t.nonce), i.innerHTML = e;
|
|
162
|
-
const
|
|
157
|
+
const u = h(n), { firstChild: R } = u;
|
|
163
158
|
if (o) {
|
|
164
159
|
if (c) {
|
|
165
|
-
const
|
|
160
|
+
const p = x(u).filter((b) => {
|
|
166
161
|
if (!["prepend", "prependQueue"].includes(b.getAttribute(g)))
|
|
167
162
|
return !1;
|
|
168
163
|
const N = Number(b.getAttribute(v) || 0);
|
|
169
164
|
return r >= N;
|
|
170
165
|
});
|
|
171
|
-
if (
|
|
172
|
-
return
|
|
166
|
+
if (p.length > 0)
|
|
167
|
+
return u.insertBefore(i, p.at(-1).nextSibling), i;
|
|
173
168
|
}
|
|
174
|
-
|
|
169
|
+
R.before(i);
|
|
175
170
|
} else
|
|
176
|
-
|
|
171
|
+
u.append(i);
|
|
177
172
|
return i;
|
|
178
173
|
}
|
|
179
174
|
function S(e, n = {}) {
|
|
180
|
-
const t =
|
|
175
|
+
const t = h(n);
|
|
181
176
|
return x(t).find((o) => o.getAttribute(E(n)) === e);
|
|
182
177
|
}
|
|
183
178
|
function C(e, n = {}) {
|
|
184
179
|
const t = S(e, n);
|
|
185
180
|
t && t.remove();
|
|
186
181
|
}
|
|
187
|
-
function
|
|
188
|
-
const t =
|
|
189
|
-
if (!t || !
|
|
182
|
+
function I(e, n) {
|
|
183
|
+
const t = d.get(e);
|
|
184
|
+
if (!t || !Q(document, t)) {
|
|
190
185
|
const o = y("", n), { parentNode: r } = o;
|
|
191
|
-
|
|
186
|
+
d.set(e, r), o.remove();
|
|
192
187
|
}
|
|
193
188
|
}
|
|
194
189
|
function w(e, n, t = {}) {
|
|
195
|
-
var c, i,
|
|
196
|
-
const o =
|
|
197
|
-
|
|
190
|
+
var c, i, u;
|
|
191
|
+
const o = h(t);
|
|
192
|
+
I(o, t);
|
|
198
193
|
const r = S(n, t);
|
|
199
194
|
if (r)
|
|
200
|
-
return (c = t.csp) != null && c.nonce && r.nonce !== ((i = t.csp) == null ? void 0 : i.nonce) && (r.nonce = (
|
|
195
|
+
return (c = t.csp) != null && c.nonce && r.nonce !== ((i = t.csp) == null ? void 0 : i.nonce) && (r.nonce = (u = t.csp) == null ? void 0 : u.nonce), r.innerHTML !== e && (r.innerHTML = e), r;
|
|
201
196
|
const a = y(e, t);
|
|
202
197
|
return a.setAttribute(E(t), n), a;
|
|
203
198
|
}
|
|
204
|
-
function
|
|
205
|
-
const { theme: e, color: n, borderRadius: t } =
|
|
199
|
+
function Y() {
|
|
200
|
+
const { theme: e, color: n, borderRadius: t } = D();
|
|
206
201
|
return l(() => {
|
|
207
202
|
const o = e || "light", r = n || "default";
|
|
208
203
|
let a = m[o][r];
|
|
@@ -222,31 +217,32 @@ function _() {
|
|
|
222
217
|
}), () => {
|
|
223
218
|
C("richtext-theme");
|
|
224
219
|
};
|
|
225
|
-
}, [e, n, t]), /* @__PURE__ */
|
|
220
|
+
}, [e, n, t]), /* @__PURE__ */ s(f, {});
|
|
226
221
|
}
|
|
227
222
|
function k({ editor: e, children: n }) {
|
|
228
|
-
const t =
|
|
229
|
-
return l(() => (w(
|
|
223
|
+
const t = j();
|
|
224
|
+
return l(() => (w(H, "react-tiptap-reset"), () => {
|
|
230
225
|
C("react-tiptap-reset");
|
|
231
226
|
}), []), l(() => {
|
|
232
227
|
e && (e.id = t);
|
|
233
|
-
}, [t, e]), e ? /* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
|
|
228
|
+
}, [t, e]), e ? /* @__PURE__ */ s("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ s(A, { children: /* @__PURE__ */ T(M.Provider, { value: { editor: e }, children: [
|
|
229
|
+
/* @__PURE__ */ s(
|
|
230
|
+
O,
|
|
236
231
|
{
|
|
237
232
|
delayDuration: 0,
|
|
238
233
|
disableHoverableContent: !0,
|
|
239
234
|
children: n
|
|
240
235
|
}
|
|
241
236
|
),
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
|
|
237
|
+
/* @__PURE__ */ s(
|
|
238
|
+
L,
|
|
244
239
|
{
|
|
245
240
|
editor: e
|
|
246
241
|
}
|
|
247
242
|
),
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
|
|
243
|
+
/* @__PURE__ */ s($, {}),
|
|
244
|
+
/* @__PURE__ */ s(Y, {})
|
|
245
|
+
] }) }) }) : /* @__PURE__ */ s(f, {});
|
|
250
246
|
}
|
|
251
247
|
export {
|
|
252
248
|
k as RichTextProvider
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-popover";
|
|
4
|
-
import { c as s } from "./index-
|
|
4
|
+
import { c as s } from "./index-RcSPeQHn.js";
|
|
5
5
|
const x = t.Root, p = t.Trigger, n = c.forwardRef(({ className: o, align: r = "center", sideOffset: i = 4, ...a }, d) => /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ e(
|
|
6
6
|
t.Content,
|
|
7
7
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),d=require("react"),p=require("@radix-ui/react-popover"),h=require("./index-BnVcq33n.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const l=n(d),o=n(p),x=o.Root,m=o.Trigger,c=l.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},s)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:s,sideOffset:e,className:h.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-border",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=x;exports.PopoverContent=c;exports.PopoverTrigger=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),f=require("react"),g=require("@radix-ui/react-select"),x=require("lucide-react"),s=require("./index-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),f=require("react"),g=require("@radix-ui/react-select"),x=require("lucide-react"),s=require("./index-BnVcq33n.cjs");function l(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const o=l(f),t=l(g),y=t.Root,b=t.Value,n=o.forwardRef(({className:r,children:i,...e},a)=>c.jsxs(t.Trigger,{ref:a,className:s.cn("richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1 richtext-text-foreground",r),...e,children:[i,c.jsx(t.Icon,{asChild:!0,children:c.jsx(x.ChevronDown,{className:"richtext-size-4 richtext-opacity-50"})})]}));n.displayName=t.Trigger.displayName;const h=o.forwardRef(({className:r,...i},e)=>c.jsx(t.ScrollUpButton,{ref:e,className:s.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",r),...i,children:c.jsx(x.ChevronUp,{className:"richtext-size-4"})}));h.displayName=t.ScrollUpButton.displayName;const d=o.forwardRef(({className:r,...i},e)=>c.jsx(t.ScrollDownButton,{ref:e,className:s.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",r),...i,children:c.jsx(x.ChevronDown,{className:"richtext-size-4"})}));d.displayName=t.ScrollDownButton.displayName;const m=o.forwardRef(({className:r,children:i,position:e="popper",...a},u)=>c.jsx(t.Portal,{children:c.jsxs(t.Content,{"data-richtext-portal":!0,position:e,ref:u,className:s.cn("richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",e==="popper"&&"data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",r),...a,children:[c.jsx(h,{}),c.jsx(t.Viewport,{className:s.cn("richtext-p-1",e==="popper"&&"richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"),children:i}),c.jsx(d,{})]})}));m.displayName=t.Content.displayName;const j=o.forwardRef(({className:r,...i},e)=>c.jsx(t.Label,{className:s.cn("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",r),ref:e,...i}));j.displayName=t.Label.displayName;const p=o.forwardRef(({className:r,children:i,...e},a)=>c.jsxs(t.Item,{ref:a,className:s.cn("richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",r),...e,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(t.ItemIndicator,{children:c.jsx(x.Check,{className:"richtext-size-4"})})}),c.jsx(t.ItemText,{children:i})]}));p.displayName=t.Item.displayName;const N=o.forwardRef(({className:r,...i},e)=>c.jsx(t.Separator,{className:s.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",r),ref:e,...i}));N.displayName=t.Separator.displayName;exports.Select=y;exports.SelectContent=m;exports.SelectItem=p;exports.SelectTrigger=n;exports.SelectValue=b;
|
|
@@ -2,7 +2,7 @@ import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import * as o from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-select";
|
|
4
4
|
import { ChevronDown as x, ChevronUp as m, Check as p } from "lucide-react";
|
|
5
|
-
import { c as a } from "./index-
|
|
5
|
+
import { c as a } from "./index-RcSPeQHn.js";
|
|
6
6
|
const v = t.Root, R = t.Value, f = o.forwardRef(({ className: i, children: c, ...r }, s) => /* @__PURE__ */ h(
|
|
7
7
|
t.Trigger,
|
|
8
8
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),n=require("react"),E=require("lucide-react"),P=require("react-colorful"),j=require("./index-BnVcq33n.cjs");require("./theme.cjs");const C=require("./index-BsFvo9PG.cjs"),v=require("./popover-DIMT3pae.cjs"),O=require("@radix-ui/react-separator");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const h=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(r,c,h.get?h:{enumerable:!0,get:()=>t[c]})}}return r.default=t,Object.freeze(r)}const y=N(n),z=N(O);function R(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}const w=typeof window>"u";function L(t,r,c=window){const h=n.useRef(void 0);n.useEffect(()=>{h.current=r},[r]),n.useEffect(()=>{if(!(c&&c.addEventListener))return;const f=x=>{h.current&&h.current(x)};return c.addEventListener(t,f),()=>{c.removeEventListener(t,f)}},[t,c])}function _(t,r,c={}){const{initializeWithValue:h=!0}=c,i=n.useCallback(o=>c.serializer?c.serializer(o):JSON.stringify(o),[c]),f=n.useCallback(o=>{if(c.deserializer)return c.deserializer(o);if(o==="undefined")return;const l=r instanceof Function?r():r;let s;try{s=JSON.parse(o)}catch(a){return console.error("Error parsing JSON:",a),l}return s},[c,r]),x=n.useCallback(()=>{const o=r instanceof Function?r():r;if(w)return o;try{const l=window.localStorage.getItem(t);return l?f(l):o}catch(l){return console.warn(`Error reading localStorage key “${t}”:`,l),o}},[r,t,f]),[d,p]=n.useState(()=>h?x():r instanceof Function?r():r),b=n.useCallback(o=>{w&&console.warn(`Tried setting localStorage key “${t}” even though environment is not a client`);try{const l=o instanceof Function?o(x()):o;window.localStorage.setItem(t,i(l)),p(l),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))}catch(l){console.warn(`Error setting localStorage key “${t}”:`,l)}},[t,i,x]),g=n.useCallback(()=>{w&&console.warn(`Tried removing localStorage key “${t}” even though environment is not a client`);const o=r instanceof Function?r():r;window.localStorage.removeItem(t),p(o),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))},[t,r]);n.useEffect(()=>{p(x())},[t]);const m=n.useCallback(o=>{o.key&&o.key!==t||p(x())},[t,x]);return L("storage",m),L("local-storage",m),[d,b,g]}function q(t){const{t:r}=C.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=C.COLORS_LIST,highlight:x}=t,[d,p]=n.useState(!1),b=n.useMemo(()=>{const s=f,a=[];for(let u=0;u<s.length;u+=10)a.push(s.slice(u,u+10));return a},[f]),[g,m]=_(x?"richtext-recent-highlight":"richtext-recent-colors",[]),o=s=>{const a=[...g],u=a.indexOf(s);u!==-1&&a.splice(u,1),a.unshift(s),a.length>10&&a.pop(),m(a)};function l(s){if(s===void 0){i==null||i(s),p(!1);return}/^#([\da-f]{3}){1,2}$/i.test(s)&&(i==null||i(s),o(s),p(!1))}return e.jsxs(v.Popover,{modal:!0,onOpenChange:p,open:d,children:[e.jsx(v.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:c,children:t==null?void 0:t.children}),e.jsx(v.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{l(void 0)},children:[e.jsx(R,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:r(x?"editor.nofill":"editor.default")})]}),b.map((s,a)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:s.map((u,k)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>l(u),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:u},children:u===h?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${k}`))},`color-row-${a}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:r("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:g==null?void 0:g.map((s,a)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>l(s),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:s},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${a}`))})]}),e.jsx(M,{setColor:l})]})})]})}function M({setColor:t}){const{t:r}=C.useLocale(),[c,h]=n.useState(!1),[i,f]=n.useState("#000000"),x=n.useCallback(d=>{f(d)},[]);return e.jsxs(v.Popover,{onOpenChange:h,open:c,children:[e.jsx(v.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[r("editor.color.more"),"..."]})}),e.jsxs(v.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(P.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(j.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:d=>{d.preventDefault(),d.stopPropagation(),x(`#${d.target.value}`)}})]}),e.jsx(S,{className:"richtext-my-[10px]"}),e.jsx(j.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(E.Plus,{size:16})})]})]})}const S=y.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(z.Root,{ref:i,decorative:c,orientation:r,className:j.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));S.displayName=z.Root.displayName;exports.ColorPicker=q;exports.Separator=S;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import * as k from "react";
|
|
3
3
|
import { useCallback as m, useState as w, useEffect as L, useRef as $, useMemo as M } from "react";
|
|
4
|
-
import { Plus as
|
|
5
|
-
import { HexColorPicker as
|
|
6
|
-
import { c as
|
|
4
|
+
import { Plus as B } from "lucide-react";
|
|
5
|
+
import { HexColorPicker as F } from "react-colorful";
|
|
6
|
+
import { j as I, B as _, c as T } from "./index-RcSPeQHn.js";
|
|
7
7
|
import "./theme.js";
|
|
8
|
-
import { u as N, C as
|
|
9
|
-
import { P as z, a as E, b as y } from "./popover-
|
|
10
|
-
import { I as T } from "./input-B1egKb-t.js";
|
|
8
|
+
import { u as N, C as j } from "./index-C07N8gA1.js";
|
|
9
|
+
import { P as z, a as E, b as y } from "./popover-CtinPbiy.js";
|
|
11
10
|
import * as R from "@radix-ui/react-separator";
|
|
12
|
-
import { B as j } from "./button-Bwn6gUuS.js";
|
|
13
11
|
function D() {
|
|
14
12
|
return /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
|
|
15
13
|
}
|
|
@@ -100,12 +98,12 @@ function J(e, r, c = {}) {
|
|
|
100
98
|
);
|
|
101
99
|
return S("storage", v), S("local-storage", v), [h, b, g];
|
|
102
100
|
}
|
|
103
|
-
function
|
|
101
|
+
function X(e) {
|
|
104
102
|
const { t: r } = N(), {
|
|
105
103
|
disabled: c = !1,
|
|
106
104
|
value: d,
|
|
107
105
|
onChange: n,
|
|
108
|
-
colors: u =
|
|
106
|
+
colors: u = j,
|
|
109
107
|
highlight: a
|
|
110
108
|
} = e, [h, f] = w(!1), b = M(() => {
|
|
111
109
|
const i = u, l = [];
|
|
@@ -270,7 +268,7 @@ function Z({ setColor: e }) {
|
|
|
270
268
|
/* @__PURE__ */ p(y, { children: [
|
|
271
269
|
/* @__PURE__ */ p("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
|
|
272
270
|
/* @__PURE__ */ t(
|
|
273
|
-
|
|
271
|
+
F,
|
|
274
272
|
{
|
|
275
273
|
color: n,
|
|
276
274
|
onChange: (h) => {
|
|
@@ -279,7 +277,7 @@ function Z({ setColor: e }) {
|
|
|
279
277
|
}
|
|
280
278
|
),
|
|
281
279
|
/* @__PURE__ */ t(
|
|
282
|
-
|
|
280
|
+
I,
|
|
283
281
|
{
|
|
284
282
|
className: "richtext-mt-[8px] richtext-w-full",
|
|
285
283
|
type: "text",
|
|
@@ -292,13 +290,13 @@ function Z({ setColor: e }) {
|
|
|
292
290
|
] }),
|
|
293
291
|
/* @__PURE__ */ t(O, { className: "richtext-my-[10px]" }),
|
|
294
292
|
/* @__PURE__ */ t(
|
|
295
|
-
|
|
293
|
+
_,
|
|
296
294
|
{
|
|
297
295
|
className: "richtext-w-full",
|
|
298
296
|
onClick: (h) => {
|
|
299
297
|
h.preventDefault(), h.stopPropagation(), e(n), d(!1);
|
|
300
298
|
},
|
|
301
|
-
children: /* @__PURE__ */ t(
|
|
299
|
+
children: /* @__PURE__ */ t(B, { size: 16 })
|
|
302
300
|
}
|
|
303
301
|
)
|
|
304
302
|
] })
|
|
@@ -313,7 +311,7 @@ const O = k.forwardRef(
|
|
|
313
311
|
ref: n,
|
|
314
312
|
decorative: c,
|
|
315
313
|
orientation: r,
|
|
316
|
-
className:
|
|
314
|
+
className: T(
|
|
317
315
|
"richtext-shrink-0 richtext-bg-border",
|
|
318
316
|
r === "horizontal" ? "richtext-h-[1px] richtext-w-full" : "richtext-h-full richtext-w-[1px]",
|
|
319
317
|
e
|
|
@@ -324,6 +322,6 @@ const O = k.forwardRef(
|
|
|
324
322
|
);
|
|
325
323
|
O.displayName = R.Root.displayName;
|
|
326
324
|
export {
|
|
327
|
-
|
|
325
|
+
X as C,
|
|
328
326
|
O as S
|
|
329
327
|
};
|
package/lib/store/store.d.ts
CHANGED
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
declare const ProviderUploadImage: ({ children }: {
|
|
2
|
-
children: React.ReactNode;
|
|
3
|
-
}) => import("react/jsx-runtime").JSX.Element, useStoreUploadImage: <SelectorOutput>(selector: (store: {
|
|
4
|
-
value: boolean;
|
|
5
|
-
}) => SelectorOutput) => [SelectorOutput, (value: Partial<{
|
|
6
|
-
value: boolean;
|
|
7
|
-
}>) => void];
|
|
8
|
-
declare const ProviderUploadVideo: ({ children }: {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
}) => import("react/jsx-runtime").JSX.Element, useStoreUploadVideo: <SelectorOutput>(selector: (store: {
|
|
11
|
-
value: boolean;
|
|
12
|
-
}) => SelectorOutput) => [SelectorOutput, (value: Partial<{
|
|
13
|
-
value: boolean;
|
|
14
|
-
}>) => void];
|
|
15
1
|
declare function useEditableEditor(): boolean;
|
|
16
|
-
declare function useStoreEditableEditor(): (val:
|
|
17
|
-
|
|
18
|
-
} | ((oldVal: {
|
|
19
|
-
value: boolean;
|
|
20
|
-
}) => {
|
|
21
|
-
value: boolean;
|
|
22
|
-
})) => void;
|
|
23
|
-
export { ProviderUploadImage, useStoreUploadImage, ProviderUploadVideo, useStoreUploadVideo, useStoreEditableEditor, useEditableEditor, };
|
|
2
|
+
declare function useStoreEditableEditor(): (val: boolean | ((oldVal: boolean) => boolean)) => void;
|
|
3
|
+
export { useStoreEditableEditor, useEditableEditor, };
|