reactjs-tiptap-editor 1.0.12 → 1.0.13
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-CPPHERbq.cjs → ActionMenuButton-DNj0f_A4.cjs} +1 -1
- package/lib/{ActionMenuButton-BKqin6Kz.js → ActionMenuButton-l5rSmAO_.js} +11 -11
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +6 -6
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +4 -4
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +4 -4
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +4 -4
- package/lib/Callout.cjs +1 -0
- package/lib/Callout.js +230 -0
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +3 -3
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +4 -4
- package/lib/CodeBlock.cjs +20 -20
- package/lib/CodeBlock.js +90 -89
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +4 -4
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +6 -6
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +4 -4
- package/lib/{Drawer-DUPsBE0H.js → Drawer-Cbi_MURj.js} +16 -16
- package/lib/{Drawer-fplzqNI6.cjs → Drawer-DKU32YW_.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +16 -16
- package/lib/{Excalidraw-BEzpvRLx.js → Excalidraw-CWrVL5hs.js} +30 -30
- package/lib/{Excalidraw-qjnQspLq.cjs → Excalidraw-Kb-TRcWY.cjs} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +2 -2
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +4 -4
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +4 -4
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +6 -6
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +6 -6
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +14 -14
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +6 -6
- package/lib/History.cjs +1 -1
- package/lib/History.js +13 -13
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +4 -4
- package/lib/{Icon-ONE1AwKo.js → Icon-Ctva8VeB.js} +2 -2
- package/lib/{Icon-CiR8RqdQ.cjs → Icon-yqCglrdK.cjs} +1 -1
- package/lib/{Iframe-DsUNJ2n2.cjs → Iframe-BczF8Hex.cjs} +1 -1
- package/lib/{Iframe-CBTnv2mk.js → Iframe-C942bNjs.js} +12 -12
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +48 -48
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +15 -15
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.js +9 -9
- package/lib/{Indent-B00o0P0M.js → Indent-C_O5WdyR.js} +4 -4
- package/lib/{Indent-CaGP0qTp.cjs → Indent-CkEC7x36.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +4 -4
- package/lib/{Katex-x370CSXZ.js → Katex-D3PEWimM.js} +24 -24
- package/lib/{Katex-XsfpKgJU.cjs → Katex-DW_HjgNM.cjs} +2 -2
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +14 -14
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-xt88G5fb.cjs → LinkEditBlock-DL1e2ILk.cjs} +2 -2
- package/lib/{LinkEditBlock-C_ipl3EA.js → LinkEditBlock-h5054QDo.js} +31 -31
- package/lib/Mention.js +3 -3
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +28 -29
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +14 -14
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +4 -4
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +17 -17
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +6 -6
- package/lib/{SlashCommandNodeView-BT5ystah.cjs → SlashCommandNodeView-BqrmHCpu.cjs} +1 -1
- package/lib/{SlashCommandNodeView-DX6axvLs.js → SlashCommandNodeView-DXUqkx82.js} +12 -12
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +4 -4
- package/lib/{Table-DidusYID.js → Table-DdrY4jcM.js} +7 -7
- package/lib/{Table-DSRSwtXx.cjs → Table-kY0nbqJo.cjs} +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +4 -4
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +16 -16
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +16 -16
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +4 -4
- package/lib/{Twitter-D58T0Zt3.js → Twitter-B-JQ3ZJ1.js} +18 -18
- package/lib/{Twitter-CBuVBQM1.cjs → Twitter-DjZcVa3l.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +24 -24
- package/lib/bubble.cjs +4 -4
- package/lib/bubble.js +2083 -1950
- package/lib/button-BS3n6_Aq.cjs +1 -0
- package/lib/{button-9_8t7ca7.js → button-Uv01FNnd.js} +7 -7
- package/lib/{checkbox-BQRKTXXr.cjs → checkbox-C8ByRi7-.cjs} +1 -1
- package/lib/{checkbox-DnkkV6qo.js → checkbox-DEFNwGwb.js} +1 -1
- package/lib/{clsx-DmuN0U_8.js → clsx-BWSGDJNJ.js} +13 -13
- package/lib/components/Bubble/RichTextBubbleCallout.d.ts +1 -0
- package/lib/components/Bubble/index.d.ts +1 -0
- package/lib/components/ui/index.d.ts +1 -0
- package/lib/{dialog-BS3zm-T9.cjs → dialog-Bt5zwGYB.cjs} +1 -1
- package/lib/{dialog-DhayAPvV.js → dialog-DwTMZSt6.js} +1 -1
- package/lib/{dropdown-menu-DQqKeZcx.js → dropdown-menu-BetI14G6.js} +1 -1
- package/lib/{dropdown-menu-CxwWX0yj.cjs → dropdown-menu-Bo68IEOT.cjs} +1 -1
- package/lib/extensions/Callout/Callout.d.ts +18 -0
- package/lib/extensions/Callout/components/NodeViewCallout/NodeViewCallout.d.ts +1 -0
- package/lib/extensions/Callout/components/RichTextCallout.d.ts +1 -0
- package/lib/extensions/Callout/index.d.ts +1 -0
- package/lib/{index-D1jd7elj.js → index-BDKHXe7R.js} +1 -1
- package/lib/{index-CKmT9KAQ.js → index-CHKWG6E8.js} +1 -1
- package/lib/{index-EAK64CCA.js → index-CcoWj0mF.js} +131 -130
- package/lib/index-D3RLYf-J.cjs +1 -0
- package/lib/{index-D9JOHlso.js → index-DF5ZPtWM.js} +369 -482
- package/lib/{index-DdEmgiAA.js → index-DJbmnBzK.js} +1 -1
- package/lib/index-Doks9cbR.cjs +1 -0
- package/lib/{index-BDX1uE62.js → index-Dujzr6bY.js} +135 -39
- package/lib/{index-CBFmXCcU.cjs → index-VhKd73hZ.cjs} +1 -1
- package/lib/{index-DvvwJvau.js → index-mR8PNv5P.js} +23 -23
- package/lib/index.cjs +1 -1
- package/lib/index.js +3 -3
- package/lib/{input-YoheBL2D.js → input-DUBdJD3L.js} +5 -5
- package/lib/{input-BJ7ihMq-.cjs → input-Dt_BA_9B.cjs} +1 -1
- package/lib/{isNumber-DmQXlKp3.js → isNumber-CIgubz2e.js} +1 -1
- package/lib/{label-Y7_hvqf2.cjs → label-JNOksCA-.cjs} +1 -1
- package/lib/{label-C8PLcjFI.js → label-topD46-u.js} +2 -2
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +1 -1
- package/lib/locales/en.d.ts +16 -0
- package/lib/locales/fi.d.ts +16 -0
- package/lib/locales/hu.d.ts +16 -0
- package/lib/locales/index.d.ts +96 -0
- package/lib/locales/pt-br.d.ts +16 -0
- package/lib/locales/vi.d.ts +16 -0
- package/lib/locales/zh-cn.d.ts +16 -0
- package/lib/{popover-CWmTzHSy.js → popover-LfNBhRyz.js} +1 -1
- package/lib/{popover-BiSrlM4j.cjs → popover-mL-2sX5r.cjs} +1 -1
- package/lib/select-CwGYPsPq.cjs +1 -0
- package/lib/select-DctYuHLH.js +117 -0
- package/lib/{separator-C-DKMYmg.js → separator-Ddfrhn4D.js} +18 -18
- package/lib/{separator-CJ_adziN.cjs → separator-NoH_SLRW.cjs} +1 -1
- package/lib/{store-BKMaw1AW.cjs → store-CkjKIgjQ.cjs} +1 -1
- package/lib/{store-DG7cMfET.js → store-DNpS8vXA.js} +1 -1
- package/lib/style.css +1 -1
- package/lib/{tabs-DxlKKM-N.js → tabs-BT3AeqQQ.js} +1 -1
- package/lib/{tabs-DpHSMyF_.cjs → tabs-DRSwUeKP.cjs} +1 -1
- package/lib/{textarea-DU9RMi6u.cjs → textarea-BDO6XQoF.cjs} +1 -1
- package/lib/{textarea-D7m-apUh.js → textarea-DZzMEDfZ.js} +1 -1
- package/lib/{throttle-BRtichEP.js → throttle-IERhwcLa.js} +1 -1
- package/lib/{toggle-BYvLnjCL.cjs → toggle-BQHMh_Q-.cjs} +1 -1
- package/lib/{toggle-Bxwwb_Kp.js → toggle-DKHg5sLm.js} +10 -10
- package/lib/{tooltip-COvf4_R-.cjs → tooltip-BYtGp6FM.cjs} +1 -1
- package/lib/{tooltip-BTy5CRrN.js → tooltip-DNKq7zgN.js} +1 -1
- package/lib/{updatePosition-CUukgu-Q.js → updatePosition-Bie75EFq.js} +2 -2
- package/lib/{useButtonProps-CydzndG1.cjs → useButtonProps-DBJkNDS2.cjs} +1 -1
- package/lib/{useButtonProps-CfYtuEnd.js → useButtonProps-DVP4s_ER.js} +3 -3
- package/package.json +1 -1
- package/lib/button-Cs9TroWr.cjs +0 -1
- package/lib/index-CVFzP1Dc.cjs +0 -1
- package/lib/index-CX4pNJlH.cjs +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-select";
|
|
4
|
+
import { ChevronDown as x, ChevronUp as m, Check as p } from "lucide-react";
|
|
5
|
+
import { c as a } from "./index-DF5ZPtWM.js";
|
|
6
|
+
const v = t.Root, R = t.Value, f = o.forwardRef(({ className: i, children: c, ...r }, s) => /* @__PURE__ */ h(
|
|
7
|
+
t.Trigger,
|
|
8
|
+
{
|
|
9
|
+
ref: s,
|
|
10
|
+
className: a(
|
|
11
|
+
"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",
|
|
12
|
+
i
|
|
13
|
+
),
|
|
14
|
+
...r,
|
|
15
|
+
children: [
|
|
16
|
+
c,
|
|
17
|
+
/* @__PURE__ */ e(t.Icon, { asChild: !0, children: /* @__PURE__ */ e(x, { className: "richtext-size-4 richtext-opacity-50" }) })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
f.displayName = t.Trigger.displayName;
|
|
22
|
+
const l = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
|
|
23
|
+
t.ScrollUpButton,
|
|
24
|
+
{
|
|
25
|
+
ref: r,
|
|
26
|
+
className: a(
|
|
27
|
+
"richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
|
|
28
|
+
i
|
|
29
|
+
),
|
|
30
|
+
...c,
|
|
31
|
+
children: /* @__PURE__ */ e(m, { className: "richtext-size-4" })
|
|
32
|
+
}
|
|
33
|
+
));
|
|
34
|
+
l.displayName = t.ScrollUpButton.displayName;
|
|
35
|
+
const d = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
|
|
36
|
+
t.ScrollDownButton,
|
|
37
|
+
{
|
|
38
|
+
ref: r,
|
|
39
|
+
className: a(
|
|
40
|
+
"richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
|
|
41
|
+
i
|
|
42
|
+
),
|
|
43
|
+
...c,
|
|
44
|
+
children: /* @__PURE__ */ e(x, { className: "richtext-size-4" })
|
|
45
|
+
}
|
|
46
|
+
));
|
|
47
|
+
d.displayName = t.ScrollDownButton.displayName;
|
|
48
|
+
const u = o.forwardRef(({ className: i, children: c, position: r = "popper", ...s }, n) => /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ h(
|
|
49
|
+
t.Content,
|
|
50
|
+
{
|
|
51
|
+
"data-richtext-portal": !0,
|
|
52
|
+
position: r,
|
|
53
|
+
ref: n,
|
|
54
|
+
className: a(
|
|
55
|
+
"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",
|
|
56
|
+
r === "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",
|
|
57
|
+
i
|
|
58
|
+
),
|
|
59
|
+
...s,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ e(l, {}),
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
t.Viewport,
|
|
64
|
+
{
|
|
65
|
+
className: a(
|
|
66
|
+
"richtext-p-1",
|
|
67
|
+
r === "popper" && "richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"
|
|
68
|
+
),
|
|
69
|
+
children: c
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ e(d, {})
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
) }));
|
|
76
|
+
u.displayName = t.Content.displayName;
|
|
77
|
+
const y = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
|
|
78
|
+
t.Label,
|
|
79
|
+
{
|
|
80
|
+
className: a("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold", i),
|
|
81
|
+
ref: r,
|
|
82
|
+
...c
|
|
83
|
+
}
|
|
84
|
+
));
|
|
85
|
+
y.displayName = t.Label.displayName;
|
|
86
|
+
const g = o.forwardRef(({ className: i, children: c, ...r }, s) => /* @__PURE__ */ h(
|
|
87
|
+
t.Item,
|
|
88
|
+
{
|
|
89
|
+
ref: s,
|
|
90
|
+
className: a(
|
|
91
|
+
"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",
|
|
92
|
+
i
|
|
93
|
+
),
|
|
94
|
+
...r,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ e("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ e(t.ItemIndicator, { children: /* @__PURE__ */ e(p, { className: "richtext-size-4" }) }) }),
|
|
97
|
+
/* @__PURE__ */ e(t.ItemText, { children: c })
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
));
|
|
101
|
+
g.displayName = t.Item.displayName;
|
|
102
|
+
const N = o.forwardRef(({ className: i, ...c }, r) => /* @__PURE__ */ e(
|
|
103
|
+
t.Separator,
|
|
104
|
+
{
|
|
105
|
+
className: a("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", i),
|
|
106
|
+
ref: r,
|
|
107
|
+
...c
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
N.displayName = t.Separator.displayName;
|
|
111
|
+
export {
|
|
112
|
+
v as S,
|
|
113
|
+
f as a,
|
|
114
|
+
R as b,
|
|
115
|
+
u as c,
|
|
116
|
+
g as d
|
|
117
|
+
};
|
|
@@ -3,13 +3,13 @@ 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
4
|
import { Plus as I } from "lucide-react";
|
|
5
5
|
import { HexColorPicker as B } from "react-colorful";
|
|
6
|
-
import { c as F } from "./index-
|
|
6
|
+
import { c as F } from "./index-DF5ZPtWM.js";
|
|
7
7
|
import "./theme.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import * as
|
|
12
|
-
import {
|
|
8
|
+
import { u as N, C as _ } from "./index-Dujzr6bY.js";
|
|
9
|
+
import { P as z, a as E, b as y } from "./popover-LfNBhRyz.js";
|
|
10
|
+
import { I as T } from "./input-DUBdJD3L.js";
|
|
11
|
+
import * as R from "@radix-ui/react-separator";
|
|
12
|
+
import { B as j } from "./button-Uv01FNnd.js";
|
|
13
13
|
function D() {
|
|
14
14
|
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
15
|
}
|
|
@@ -101,11 +101,11 @@ function J(e, r, c = {}) {
|
|
|
101
101
|
return S("storage", v), S("local-storage", v), [h, b, g];
|
|
102
102
|
}
|
|
103
103
|
function V(e) {
|
|
104
|
-
const { t: r } =
|
|
104
|
+
const { t: r } = N(), {
|
|
105
105
|
disabled: c = !1,
|
|
106
106
|
value: d,
|
|
107
107
|
onChange: n,
|
|
108
|
-
colors: u =
|
|
108
|
+
colors: u = _,
|
|
109
109
|
highlight: a
|
|
110
110
|
} = e, [h, f] = w(!1), b = M(() => {
|
|
111
111
|
const i = u, l = [];
|
|
@@ -124,14 +124,14 @@ function V(e) {
|
|
|
124
124
|
/^#([\da-f]{3}){1,2}$/i.test(i) && (n == null || n(i), o(i), f(!1));
|
|
125
125
|
}
|
|
126
126
|
return /* @__PURE__ */ p(
|
|
127
|
-
|
|
127
|
+
z,
|
|
128
128
|
{
|
|
129
129
|
modal: !0,
|
|
130
130
|
onOpenChange: f,
|
|
131
131
|
open: h,
|
|
132
132
|
children: [
|
|
133
133
|
/* @__PURE__ */ t(
|
|
134
|
-
|
|
134
|
+
E,
|
|
135
135
|
{
|
|
136
136
|
asChild: !0,
|
|
137
137
|
className: "!richtext-p-0",
|
|
@@ -140,7 +140,7 @@ function V(e) {
|
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
142
|
/* @__PURE__ */ t(
|
|
143
|
-
|
|
143
|
+
y,
|
|
144
144
|
{
|
|
145
145
|
align: "start",
|
|
146
146
|
className: "richtext-size-full !richtext-p-2",
|
|
@@ -245,19 +245,19 @@ function V(e) {
|
|
|
245
245
|
);
|
|
246
246
|
}
|
|
247
247
|
function Z({ setColor: e }) {
|
|
248
|
-
const { t: r } =
|
|
248
|
+
const { t: r } = N(), [c, d] = w(!1), [n, u] = w("#000000"), a = m(
|
|
249
249
|
(h) => {
|
|
250
250
|
u(h);
|
|
251
251
|
},
|
|
252
252
|
[]
|
|
253
253
|
);
|
|
254
254
|
return /* @__PURE__ */ p(
|
|
255
|
-
|
|
255
|
+
z,
|
|
256
256
|
{
|
|
257
257
|
onOpenChange: d,
|
|
258
258
|
open: c,
|
|
259
259
|
children: [
|
|
260
|
-
/* @__PURE__ */ t(
|
|
260
|
+
/* @__PURE__ */ t(E, { asChild: !0, children: /* @__PURE__ */ p(
|
|
261
261
|
"div",
|
|
262
262
|
{
|
|
263
263
|
className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",
|
|
@@ -267,7 +267,7 @@ function Z({ setColor: e }) {
|
|
|
267
267
|
]
|
|
268
268
|
}
|
|
269
269
|
) }),
|
|
270
|
-
/* @__PURE__ */ p(
|
|
270
|
+
/* @__PURE__ */ p(y, { children: [
|
|
271
271
|
/* @__PURE__ */ p("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
|
|
272
272
|
/* @__PURE__ */ t(
|
|
273
273
|
B,
|
|
@@ -292,7 +292,7 @@ function Z({ setColor: e }) {
|
|
|
292
292
|
] }),
|
|
293
293
|
/* @__PURE__ */ t(O, { className: "richtext-my-[10px]" }),
|
|
294
294
|
/* @__PURE__ */ t(
|
|
295
|
-
|
|
295
|
+
j,
|
|
296
296
|
{
|
|
297
297
|
className: "richtext-w-full",
|
|
298
298
|
onClick: (h) => {
|
|
@@ -308,7 +308,7 @@ function Z({ setColor: e }) {
|
|
|
308
308
|
}
|
|
309
309
|
const O = k.forwardRef(
|
|
310
310
|
({ className: e, orientation: r = "horizontal", decorative: c = !0, ...d }, n) => /* @__PURE__ */ t(
|
|
311
|
-
|
|
311
|
+
R.Root,
|
|
312
312
|
{
|
|
313
313
|
ref: n,
|
|
314
314
|
decorative: c,
|
|
@@ -322,7 +322,7 @@ const O = k.forwardRef(
|
|
|
322
322
|
}
|
|
323
323
|
)
|
|
324
324
|
);
|
|
325
|
-
O.displayName =
|
|
325
|
+
O.displayName = R.Root.displayName;
|
|
326
326
|
export {
|
|
327
327
|
V as C,
|
|
328
328
|
O as S
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),n=require("react"),k=require("lucide-react"),E=require("react-colorful"),P=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),n=require("react"),k=require("lucide-react"),E=require("react-colorful"),P=require("./index-D3RLYf-J.cjs");require("./theme.cjs");const j=require("./index-Doks9cbR.cjs"),v=require("./popover-mL-2sX5r.cjs"),O=require("./input-Dt_BA_9B.cjs"),y=require("@radix-ui/react-separator"),R=require("./button-BS3n6_Aq.cjs");function L(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 q=L(n),N=L(y);function _(){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 S(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 S("storage",m),S("local-storage",m),[d,b,g]}function M(t){const{t:r}=j.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=j.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(_,{}),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,z)=>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-${z}`))},`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(T,{setColor:l})]})})]})}function T({setColor:t}){const{t:r}=j.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(E.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(O.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(C,{className:"richtext-my-[10px]"}),e.jsx(R.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(k.Plus,{size:16})})]})]})}const C=q.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(N.Root,{ref:i,decorative:c,orientation:r,className:P.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));C.displayName=N.Root.displayName;exports.ColorPicker=M;exports.Separator=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./index-
|
|
1
|
+
"use strict";require("./index-D3RLYf-J.cjs");const e=require("./events.constant-Dq21NPdV.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
|