@remarkablejames/editor 0.0.7 → 0.0.8
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-DI9_8wC0.cjs +1 -0
- package/lib/{ActionMenuButton-nxV91Fqo.js → ActionMenuButton-DL05l66z.js} +9 -10
- package/lib/Attachment.cjs +1 -19
- package/lib/Attachment.js +7 -270
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +13 -12
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +11 -10
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +9 -8
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +41 -45
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +13 -14
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +6 -5
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +30 -31
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +9 -8
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +18 -19
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +9 -8
- package/lib/Drawer-DEzhWKwY.cjs +2 -0
- package/lib/{Drawer-CF6Z_IA2.js → Drawer-DhM1qM6R.js} +41 -47
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +14 -15
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +28 -33
- package/lib/ExportPdf.cjs +3 -3
- package/lib/ExportPdf.js +14 -13
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +6 -6
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +7 -6
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +15 -14
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +26 -26
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +22 -23
- package/lib/History.cjs +1 -1
- package/lib/History.js +11 -11
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +10 -9
- package/lib/Iframe-DbYJ82AI.cjs +1 -0
- package/lib/{Iframe-Dfd3LI7b.js → Iframe-yDX_zHls.js} +11 -14
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +4 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +83 -86
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +26 -28
- package/lib/{Indent-CDVF9DWN.js → Indent-CA46zsbb.js} +31 -30
- package/lib/Indent-CYaCq_Mv.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 +12 -11
- package/lib/Katex-Dh-kTBjf.cjs +4 -0
- package/lib/{Katex-DqhWWAA-.js → Katex-g3ZS3zUf.js} +19 -22
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +19 -20
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/LinkEditBlock-ClqpI1FH.cjs +5 -0
- package/lib/{LinkEditBlock-xP0pGVhB.js → LinkEditBlock-qE5KHPQs.js} +19 -24
- package/lib/Mention.js +3 -3
- package/lib/Mermaid-BmUChJSB.cjs +2 -0
- package/lib/{Mermaid-BJ6ryVdY.js → Mermaid-CefRECZY.js} +45 -48
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +26 -28
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +11 -10
- package/lib/PaywallSeparator.cjs +1 -1
- package/lib/PaywallSeparator.js +9 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +37 -42
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +5 -5
- package/lib/{SlashCommandNodeView-DS9FqMiY.js → SlashCommandNodeView-BsIrWlhS.js} +19 -21
- package/lib/SlashCommandNodeView-DpXsfGmo.cjs +1 -0
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +12 -11
- package/lib/Table-B-0TePQ3.cjs +5 -0
- package/lib/{Table-CcG-JNtV.js → Table-CG0nisk4.js} +46 -46
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +12 -11
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +26 -27
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +18 -19
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +9 -8
- package/lib/{Twitter-BIL3o833.js → Twitter-DlGSWdh7.js} +18 -22
- package/lib/Twitter-DvMmVNMF.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +4 -5
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +77 -86
- package/lib/{clsx-m_C5j3RU.js → clsx-BUPZHhq3.js} +24 -24
- package/lib/{dropdown-menu-DWt_xj4h.js → dropdown-menu-D-mNjyKn.js} +1 -1
- package/lib/{dropdown-menu-tUP872Zv.cjs → dropdown-menu-gOopBX-L.cjs} +1 -1
- package/lib/index-CUnpdrCy.cjs +28 -0
- package/lib/index-CelRl0mr.js +5447 -0
- package/lib/{index-C8FjP66D.js → index-D4M4hrH4.js} +1 -1
- package/lib/{index-s3l5RdyW.js → index-DZj2z9_1.js} +1 -1
- package/lib/{index-C1KQsOcg.js → index-Dl3OjzmR.js} +1 -1
- package/lib/{index-B3Ijnbxs.js → index-RkKGy5oa.js} +1 -1
- package/lib/index.cjs +4 -4
- package/lib/index.js +151 -464
- package/lib/{popover-C3A6zzNV.cjs → popover-DEMkixfo.cjs} +1 -1
- package/lib/{popover-BC7FRr8B.js → popover-SMtif0E1.js} +1 -1
- package/lib/{renderNodeView-C_hPIdEs.js → renderNodeView-dj6AaFSX.js} +2 -2
- package/lib/{select-B8HIWDXf.cjs → select-BqlizSg4.cjs} +1 -1
- package/lib/{select-DSKqhVGR.js → select-Dc3RkAhQ.js} +1 -1
- package/lib/{separator-BJWSNjvr.js → separator-DWLSmuSh.js} +12 -13
- package/lib/separator-DuP4NoiV.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/{textarea-CtVdqwSM.cjs → textarea-C89l2GRG.cjs} +1 -1
- package/lib/{textarea-Ch5w3PiI.js → textarea-DvciwVxS.js} +1 -1
- package/lib/theme.cjs +1 -1
- package/lib/theme.js +18 -18
- package/lib/{updatePosition-DvfTZHcH.js → updatePosition-C294Pixi.js} +2 -2
- package/package.json +1 -1
- package/lib/ActionMenuButton-D9o3Kwmv.cjs +0 -1
- package/lib/Drawer-Bh-y5bs8.cjs +0 -2
- package/lib/Icon-BvGyfX2j.js +0 -15
- package/lib/Icon-wjwoRc9F.cjs +0 -1
- package/lib/Iframe-BbfZKbPY.cjs +0 -1
- package/lib/ImageCropper-CY1ETEjC.cjs +0 -10
- package/lib/ImageCropper-DrSdjo9x.js +0 -979
- package/lib/Indent-Q1VuhSM2.cjs +0 -1
- package/lib/Katex-K1QU2SB2.cjs +0 -4
- package/lib/LinkEditBlock-CBYGLs3J.cjs +0 -5
- package/lib/Mermaid-D3_nLeOW.cjs +0 -2
- package/lib/SlashCommandNodeView-CUJrDQS7.cjs +0 -1
- package/lib/Table-CV6pUoVf.cjs +0 -5
- package/lib/Twitter-BfSTqPDh.cjs +0 -1
- package/lib/Video-DAKr90QL.js +0 -231
- package/lib/Video-HAinT0w6.cjs +0 -1
- package/lib/button-090-I3tp.js +0 -35
- package/lib/button-B4Sz2ZhW.cjs +0 -1
- package/lib/checkbox-BCPsu7yR.cjs +0 -1
- package/lib/checkbox-DiXWHAI0.js +0 -29
- package/lib/dialog-C8J59d2J.cjs +0 -1
- package/lib/dialog-bDkDW-C_.js +0 -95
- package/lib/dom-dataset-BqoJhJXt.cjs +0 -1
- package/lib/dom-dataset-CIEeltF6.js +0 -47
- package/lib/events.constant-Bke62qxm.cjs +0 -1
- package/lib/events.constant-CSWD3-ho.js +0 -72
- package/lib/file-i7e4nQY2.cjs +0 -1
- package/lib/file-jDdkhyj7.js +0 -43
- package/lib/index-BXh8X1ch.cjs +0 -1
- package/lib/index-jMN4V2hr.js +0 -2763
- package/lib/input-C_J-pfTx.js +0 -21
- package/lib/input-DwLo4r7V.cjs +0 -1
- package/lib/isNumber-BTYSVlKo.cjs +0 -1
- package/lib/isNumber-WaBzl_0s.js +0 -15
- package/lib/label-BgIVynq3.cjs +0 -1
- package/lib/label-ClsOg9Hr.js +0 -11
- package/lib/separator-D6ruF682.cjs +0 -1
- package/lib/tabs-D1J1iB7B.js +0 -46
- package/lib/tabs-IEbMQmNX.cjs +0 -1
- package/lib/throttle-CRNq0z-O.js +0 -249
- package/lib/throttle-gTTvqDTW.cjs +0 -1
- package/lib/toggle-C9tcMm1r.cjs +0 -1
- package/lib/toggle-CaSwYCk4.js +0 -89
- package/lib/use-toast-C6zPo25l.cjs +0 -1
- package/lib/use-toast-CEOqhXfx.js +0 -97
- package/lib/useButtonProps-D-ruygH7.js +0 -165
- package/lib/useButtonProps-D9ndBdmA.cjs +0 -1
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
-
import * as d from "@radix-ui/react-tooltip";
|
|
3
|
-
import * as x from "react";
|
|
4
|
-
import { useState as h, useEffect as b, useMemo as u } from "react";
|
|
5
|
-
import { c as C } from "./index-jMN4V2hr.js";
|
|
6
|
-
import { y as T, b as M, S as N } from "./index-BG0kQamI.js";
|
|
7
|
-
import { $ as w, a0 as D } from "./clsx-m_C5j3RU.js";
|
|
8
|
-
import { u as P } from "./index-BGd2HiwP.js";
|
|
9
|
-
let m;
|
|
10
|
-
function p() {
|
|
11
|
-
return m === void 0 && (m = navigator.platform.includes("Mac")), m;
|
|
12
|
-
}
|
|
13
|
-
function U(t) {
|
|
14
|
-
return `${t}`.toLowerCase() === "mod" ? p() ? "⌘" : "Ctrl" : `${t}`.toLowerCase() === "alt" ? p() ? "⌥" : "Alt" : `${t}`.toLowerCase() === "shift" ? p() ? "⇧" : "Shift" : t;
|
|
15
|
-
}
|
|
16
|
-
function q(t) {
|
|
17
|
-
return t.map(U).join(" ");
|
|
18
|
-
}
|
|
19
|
-
const v = d.Provider, G = d.Root, H = d.Trigger, $ = x.forwardRef(({ className: t, sideOffset: e = 4, ...n }, o) => /* @__PURE__ */ y(
|
|
20
|
-
d.Content,
|
|
21
|
-
{
|
|
22
|
-
"data-richtext-portal": !0,
|
|
23
|
-
ref: o,
|
|
24
|
-
sideOffset: e,
|
|
25
|
-
className: C(
|
|
26
|
-
"richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border-none richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 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",
|
|
27
|
-
t
|
|
28
|
-
),
|
|
29
|
-
...n
|
|
30
|
-
}
|
|
31
|
-
));
|
|
32
|
-
$.displayName = d.Content.displayName;
|
|
33
|
-
function L(t) {
|
|
34
|
-
const { editor: e } = w(), n = x.useMemo(
|
|
35
|
-
() => e,
|
|
36
|
-
[t, e]
|
|
37
|
-
);
|
|
38
|
-
return D({
|
|
39
|
-
editor: n,
|
|
40
|
-
selector(r) {
|
|
41
|
-
return r.editor ? {
|
|
42
|
-
editor: r.editor,
|
|
43
|
-
editorState: r.editor.state,
|
|
44
|
-
canCommand: r.editor.can
|
|
45
|
-
} : {
|
|
46
|
-
editor: null,
|
|
47
|
-
editorState: void 0,
|
|
48
|
-
canCommand: void 0
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
}) || { editor: null };
|
|
52
|
-
}
|
|
53
|
-
function f() {
|
|
54
|
-
return L().editor;
|
|
55
|
-
}
|
|
56
|
-
const g = T(!1);
|
|
57
|
-
function S() {
|
|
58
|
-
return M(g);
|
|
59
|
-
}
|
|
60
|
-
function J() {
|
|
61
|
-
return N(g);
|
|
62
|
-
}
|
|
63
|
-
const E = () => !1;
|
|
64
|
-
function Q(t = E) {
|
|
65
|
-
const e = S(), [n, o] = h(() => {
|
|
66
|
-
const i = t();
|
|
67
|
-
return typeof i == "boolean" ? !i : i;
|
|
68
|
-
}), r = f();
|
|
69
|
-
b(() => {
|
|
70
|
-
if (!r || !t) return;
|
|
71
|
-
const i = () => {
|
|
72
|
-
const c = t();
|
|
73
|
-
o(typeof c == "boolean" ? !c : c);
|
|
74
|
-
};
|
|
75
|
-
return i(), r.on("selectionUpdate", i), r.on("transaction", i), () => {
|
|
76
|
-
r.off("selectionUpdate", i), r.off("transaction", i);
|
|
77
|
-
};
|
|
78
|
-
}, [r, t]);
|
|
79
|
-
const a = u(() => !e || !r ? !0 : typeof n == "boolean" ? n : !1, [e, r, n]), s = u(() => !e || !r, [e, r]);
|
|
80
|
-
return {
|
|
81
|
-
disabled: a,
|
|
82
|
-
// can not action, opacity < 1
|
|
83
|
-
dataState: n,
|
|
84
|
-
// true => show background, false => no background
|
|
85
|
-
editorDisabled: s
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
function X(t = E) {
|
|
89
|
-
const e = S(), [n, o] = h({}), [r, a] = h(t()), s = f();
|
|
90
|
-
b(() => {
|
|
91
|
-
if (!s || !t) return;
|
|
92
|
-
const l = () => {
|
|
93
|
-
a(t());
|
|
94
|
-
};
|
|
95
|
-
return l(), s.on("selectionUpdate", l), () => {
|
|
96
|
-
s.off("selectionUpdate", l);
|
|
97
|
-
};
|
|
98
|
-
}, [n, s, t]);
|
|
99
|
-
const i = u(() => !e || !s, [e, s]), c = u(() => !e || !s, [e, s]);
|
|
100
|
-
return {
|
|
101
|
-
disabled: i,
|
|
102
|
-
// can not action, opacity < 1
|
|
103
|
-
dataState: r,
|
|
104
|
-
// true => show background, false => no background
|
|
105
|
-
editorDisabled: c,
|
|
106
|
-
update: () => o({})
|
|
107
|
-
// force update
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function R(t) {
|
|
111
|
-
const e = f();
|
|
112
|
-
return u(() => e ? e.extensionManager.extensions.find(
|
|
113
|
-
(o) => o.name === t
|
|
114
|
-
) : null, [e, t]);
|
|
115
|
-
}
|
|
116
|
-
function Y(t, e, n) {
|
|
117
|
-
return t < e ? e : t > n ? n : t;
|
|
118
|
-
}
|
|
119
|
-
const j = (t) => typeof t == "number", z = (t) => typeof t == "string", F = (t) => typeof t == "function";
|
|
120
|
-
function Z(t, e = "px") {
|
|
121
|
-
if (!t) return t;
|
|
122
|
-
const n = j(t) ? String(t) : t, o = Number.parseFloat(n), r = n.match(/[%a-z]+$/i), a = r ? r[0] : e;
|
|
123
|
-
return Number.isNaN(o) ? t : o + a;
|
|
124
|
-
}
|
|
125
|
-
function _(t, e) {
|
|
126
|
-
if (!t)
|
|
127
|
-
return !1;
|
|
128
|
-
const { extensions: n = [] } = (t == null ? void 0 : t.extensionManager) ?? {};
|
|
129
|
-
return !!n.find((r) => r.name === e);
|
|
130
|
-
}
|
|
131
|
-
function k(t) {
|
|
132
|
-
return t.map((e) => z(e) ? { value: e, name: e } : e);
|
|
133
|
-
}
|
|
134
|
-
function A(t) {
|
|
135
|
-
const e = f(), n = R(t), { t: o } = P();
|
|
136
|
-
return u(() => {
|
|
137
|
-
if (!e || !n || !o)
|
|
138
|
-
return null;
|
|
139
|
-
const { button: r } = n.options;
|
|
140
|
-
return !r || !F(r) ? null : r({
|
|
141
|
-
editor: e,
|
|
142
|
-
extension: n,
|
|
143
|
-
t: o
|
|
144
|
-
});
|
|
145
|
-
}, [e, n, o]);
|
|
146
|
-
}
|
|
147
|
-
export {
|
|
148
|
-
G as T,
|
|
149
|
-
H as a,
|
|
150
|
-
$ as b,
|
|
151
|
-
X as c,
|
|
152
|
-
Q as d,
|
|
153
|
-
k as e,
|
|
154
|
-
f,
|
|
155
|
-
q as g,
|
|
156
|
-
U as h,
|
|
157
|
-
R as i,
|
|
158
|
-
_ as j,
|
|
159
|
-
Z as k,
|
|
160
|
-
S as l,
|
|
161
|
-
Y as m,
|
|
162
|
-
J as n,
|
|
163
|
-
v as o,
|
|
164
|
-
A as u
|
|
165
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const P=require("react/jsx-runtime"),N=require("@radix-ui/react-tooltip"),i=require("react"),D=require("./index-BXh8X1ch.cjs"),h=require("./index-NsYff_Ni.cjs"),g=require("./clsx-CXbNJWDD.cjs"),j=require("./index-DgOXAdKt.cjs");function b(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const d=b(N),S=b(i);let p;function m(){return p===void 0&&(p=navigator.platform.includes("Mac")),p}function E(t){return`${t}`.toLowerCase()==="mod"?m()?"⌘":"Ctrl":`${t}`.toLowerCase()==="alt"?m()?"⌥":"Alt":`${t}`.toLowerCase()==="shift"?m()?"⇧":"Shift":t}function q(t){return t.map(E).join(" ")}const w=d.Provider,O=d.Root,U=d.Trigger,T=S.forwardRef(({className:t,sideOffset:e=4,...n},o)=>P.jsx(d.Content,{"data-richtext-portal":!0,ref:o,sideOffset:e,className:D.cn("richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border-none richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 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",t),...n}));T.displayName=d.Content.displayName;function R(t){const{editor:e}=g.useCurrentEditor(),n=S.useMemo(()=>e,[t,e]);return g.useEditorState({editor:n,selector(r){return r.editor?{editor:r.editor,editorState:r.editor.state,canCommand:r.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}}})||{editor:null}}function f(){return R().editor}const y=h.y(!1);function x(){return h.b(y)}function $(){return h.S(y)}const M=()=>!1;function v(t=M){const e=x(),[n,o]=i.useState(()=>{const s=t();return typeof s=="boolean"?!s:s}),r=f();i.useEffect(()=>{if(!r||!t)return;const s=()=>{const c=t();o(typeof c=="boolean"?!c:c)};return s(),r.on("selectionUpdate",s),r.on("transaction",s),()=>{r.off("selectionUpdate",s),r.off("transaction",s)}},[r,t]);const a=i.useMemo(()=>!e||!r?!0:typeof n=="boolean"?n:!1,[e,r,n]),u=i.useMemo(()=>!e||!r,[e,r]);return{disabled:a,dataState:n,editorDisabled:u}}function _(t=M){const e=x(),[n,o]=i.useState({}),[r,a]=i.useState(t()),u=f();i.useEffect(()=>{if(!u||!t)return;const l=()=>{a(t())};return l(),u.on("selectionUpdate",l),()=>{u.off("selectionUpdate",l)}},[n,u,t]);const s=i.useMemo(()=>!e||!u,[e,u]),c=i.useMemo(()=>!e||!u,[e,u]);return{disabled:s,dataState:r,editorDisabled:c,update:()=>o({})}}function C(t){const e=f();return i.useMemo(()=>e?e.extensionManager.extensions.find(o=>o.name===t):null,[e,t])}function z(t,e,n){return t<e?e:t>n?n:t}const K=t=>typeof t=="number",L=t=>typeof t=="string",V=t=>typeof t=="function";function B(t,e="px"){if(!t)return t;const n=K(t)?String(t):t,o=Number.parseFloat(n),r=n.match(/[%a-z]+$/i),a=r?r[0]:e;return Number.isNaN(o)?t:o+a}function F(t,e){if(!t)return!1;const{extensions:n=[]}=(t==null?void 0:t.extensionManager)??{};return!!n.find(r=>r.name===e)}function I(t){return t.map(e=>L(e)?{value:e,name:e}:e)}function W(t){const e=f(),n=C(t),{t:o}=j.useLocale();return i.useMemo(()=>{if(!e||!n||!o)return null;const{button:r}=n.options;return!r||!V(r)?null:r({editor:e,extension:n,t:o})},[e,n,o])}exports.Tooltip=O;exports.TooltipContent=T;exports.TooltipProvider=w;exports.TooltipTrigger=U;exports.clamp=z;exports.ensureNameValueOptions=I;exports.getCssUnitWithDefault=B;exports.getShortcutKey=E;exports.getShortcutKeys=q;exports.hasExtension=F;exports.useActive=v;exports.useButtonProps=W;exports.useEditableEditor=x;exports.useEditorInstance=f;exports.useExtension=C;exports.useStoreEditableEditor=$;exports.useToggleActive=_;
|