reactjs-tiptap-editor 1.0.22 → 1.0.23
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-B1067mIC.js → ActionMenuButton-C53IYt_R.js} +1 -1
- package/lib/{ActionMenuButton-BBDqKvKg.cjs → ActionMenuButton-Da0H9Beu.cjs} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +2 -2
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +1 -1
- package/lib/{Callout-lBlBlK_w.cjs → Callout-CdXbDkZ6.cjs} +1 -1
- package/lib/{Callout-V2mO6s2Y.js → Callout-igc-a1lj.js} +2 -2
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +2 -2
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +2 -2
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +1 -1
- package/lib/{Drawer-BeYo9jAG.cjs → Drawer-CrMuQNbZ.cjs} +1 -1
- package/lib/{Drawer-Cyv27orn.js → Drawer-DzroBQds.js} +2 -2
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +3 -3
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +4 -4
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +8 -8
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +4 -4
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +2 -2
- package/lib/History.cjs +1 -1
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +1 -1
- package/lib/{Iframe-Bx-VDxSB.cjs → Iframe-DVLx3H0m.cjs} +1 -1
- package/lib/{Iframe-D9JVKzO0.js → Iframe-Dt2Styg8.js} +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +45 -45
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +2 -2
- package/lib/{Indent-B5tQ5Wfg.js → Indent-BCZFJKcN.js} +1 -1
- package/lib/{Indent-CCLO0KpG.cjs → Indent-CQCn1r9U.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +1 -1
- package/lib/{Katex-w_c6vAMd.js → Katex--VT0zcjU.js} +3 -3
- package/lib/{Katex-rtfVV2pl.cjs → Katex-By61XteD.cjs} +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +1 -1
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +3 -3
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +1 -1
- package/lib/{LinkEditBlock-_41zgSyl.cjs → LinkEditBlock-BLkA2CYZ.cjs} +1 -1
- package/lib/{LinkEditBlock-CTlU8YnO.js → LinkEditBlock-C_F9zWEj.js} +3 -3
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +10 -10
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +1 -1
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +3 -3
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +3 -3
- package/lib/{SlashCommandNodeView-CVKjpS6r.cjs → SlashCommandNodeView-Aqc77oRC.cjs} +1 -1
- package/lib/{SlashCommandNodeView-DNkpJuM3.js → SlashCommandNodeView-DxlBPKPV.js} +2 -2
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +1 -1
- package/lib/{Table-BFiU40iW.cjs → Table-DqXkwJAY.cjs} +1 -1
- package/lib/{Table-yZtD5Qo1.js → Table-r09L4PvT.js} +3 -3
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +2 -2
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +2 -2
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +1 -1
- package/lib/{Twitter-CKm0M53B.js → Twitter-DP_9V0zb.js} +3 -3
- package/lib/{Twitter-BJjt8vv_.cjs → Twitter-f-oMDZuV.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +2 -2
- package/lib/bubble.cjs +1 -1
- package/lib/bubble.js +15 -15
- package/lib/{dropdown-menu-Dre693DD.cjs → dropdown-menu-DeBV2h9-.cjs} +1 -1
- package/lib/{dropdown-menu-AhMKS9PQ.js → dropdown-menu-uIj8M0jD.js} +1 -1
- package/lib/{index-BfHAqkoX.js → index-BVtsbzV8.js} +1 -1
- package/lib/{index-C4aGVY2E.cjs → index-CWw4s87s.cjs} +1 -1
- package/lib/{index-83hp1lZH.cjs → index-ezTXvA7H.cjs} +1 -1
- package/lib/{index-DtVRewGA.js → index-oj858lQO.js} +229 -31
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +7 -6
- package/lib/locales/index.d.ts +199 -1
- package/lib/locales/ja.d.ts +198 -0
- package/lib/{popover-D7w_FVSV.cjs → popover-Cq1iLY7i.cjs} +1 -1
- package/lib/{popover-B1ptDngu.js → popover-mlZeH-7I.js} +1 -1
- package/lib/{separator-CDoF4Z4Z.js → separator-Bh_ttGZg.js} +3 -3
- package/lib/{separator-C_7KkuoG.cjs → separator-DvAvl5_5.cjs} +1 -1
- package/lib/{textarea-CEtXap1b.cjs → textarea-CKXzGwId.cjs} +1 -1
- package/lib/{textarea-CNzZnjjW.js → textarea-MU5imD7D.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'editor.remove': string;
|
|
3
|
+
'editor.copy': string;
|
|
4
|
+
'editor.words': string;
|
|
5
|
+
'editor.characters': string;
|
|
6
|
+
'editor.default': string;
|
|
7
|
+
'editor.recent': string;
|
|
8
|
+
'editor.nofill': string;
|
|
9
|
+
'editor.format': string;
|
|
10
|
+
'editor.delete': string;
|
|
11
|
+
'editor.edit': string;
|
|
12
|
+
'editor.settings': string;
|
|
13
|
+
'editor.table_of_content': string;
|
|
14
|
+
'editor.draghandle.tooltip': string;
|
|
15
|
+
'editor.draghandle.insertBlock': string;
|
|
16
|
+
'editor.draghandle.grip': string;
|
|
17
|
+
'editor.copyToClipboard': string;
|
|
18
|
+
'editor.slash': string;
|
|
19
|
+
'editor.slash.empty': string;
|
|
20
|
+
'editor.slash.format': string;
|
|
21
|
+
'editor.slash.insert': string;
|
|
22
|
+
'editor.slash.embed': string;
|
|
23
|
+
'editor.content': string;
|
|
24
|
+
'editor.fontFamily.tooltip': string;
|
|
25
|
+
'editor.fontFamily.default.tooltip': string;
|
|
26
|
+
'editor.moremark': string;
|
|
27
|
+
'editor.size.small.tooltip': string;
|
|
28
|
+
'editor.size.medium.tooltip': string;
|
|
29
|
+
'editor.size.large.tooltip': string;
|
|
30
|
+
'editor.bold.tooltip': string;
|
|
31
|
+
'editor.italic.tooltip': string;
|
|
32
|
+
'editor.underline.tooltip': string;
|
|
33
|
+
'editor.strike.tooltip': string;
|
|
34
|
+
'editor.color.tooltip': string;
|
|
35
|
+
'editor.color.more': string;
|
|
36
|
+
'editor.highlight.tooltip': string;
|
|
37
|
+
'editor.lineheight.tooltip': string;
|
|
38
|
+
'editor.heading.tooltip': string;
|
|
39
|
+
'editor.heading.h1.tooltip': string;
|
|
40
|
+
'editor.heading.h2.tooltip': string;
|
|
41
|
+
'editor.heading.h3.tooltip': string;
|
|
42
|
+
'editor.heading.h4.tooltip': string;
|
|
43
|
+
'editor.heading.h5.tooltip': string;
|
|
44
|
+
'editor.heading.h6.tooltip': string;
|
|
45
|
+
'editor.paragraph.tooltip': string;
|
|
46
|
+
'editor.textalign.tooltip': string;
|
|
47
|
+
'editor.textalign.left.tooltip': string;
|
|
48
|
+
'editor.textalign.center.tooltip': string;
|
|
49
|
+
'editor.textalign.right.tooltip': string;
|
|
50
|
+
'editor.textalign.justify.tooltip': string;
|
|
51
|
+
'editor.indent': string;
|
|
52
|
+
'editor.indent.indent': string;
|
|
53
|
+
'editor.indent.outdent': string;
|
|
54
|
+
'editor.fontSize.tooltip': string;
|
|
55
|
+
'editor.fontSize.default.tooltip': string;
|
|
56
|
+
'editor.superscript.tooltip': string;
|
|
57
|
+
'editor.subscript.tooltip': string;
|
|
58
|
+
'editor.bulletlist.tooltip': string;
|
|
59
|
+
'editor.orderedlist.tooltip': string;
|
|
60
|
+
'editor.tasklist.tooltip': string;
|
|
61
|
+
'editor.indent.tooltip': string;
|
|
62
|
+
'editor.outdent.tooltip': string;
|
|
63
|
+
'editor.columns.tooltip': string;
|
|
64
|
+
'editor.link.tooltip': string;
|
|
65
|
+
'editor.link.unlink.tooltip': string;
|
|
66
|
+
'editor.link.open.tooltip': string;
|
|
67
|
+
'editor.link.edit.tooltip': string;
|
|
68
|
+
'editor.link.dialog.title': string;
|
|
69
|
+
'editor.link.dialog.link': string;
|
|
70
|
+
'editor.link.dialog.text': string;
|
|
71
|
+
'editor.link.dialog.openInNewTab': string;
|
|
72
|
+
'editor.link.dialog.link.placeholder': string;
|
|
73
|
+
'editor.link.dialog.text.placeholder': string;
|
|
74
|
+
'editor.link.dialog.button.apply': string;
|
|
75
|
+
'editor.link.dialog.button.cancel': string;
|
|
76
|
+
'editor.image.tooltip': string;
|
|
77
|
+
'editor.image.dragger.tooltip': string;
|
|
78
|
+
'editor.image.float.left.tooltip': string;
|
|
79
|
+
'editor.image.float.none.tooltip': string;
|
|
80
|
+
'editor.image.float.right.tooltip': string;
|
|
81
|
+
'editor.image.dialog.title': string;
|
|
82
|
+
'editor.image.dialog.tab.url': string;
|
|
83
|
+
'editor.image.dialog.tab.upload': string;
|
|
84
|
+
'editor.image.dialog.tab.uploadCrop': string;
|
|
85
|
+
'editor.image.dialog.uploading': string;
|
|
86
|
+
'editor.link.dialog.inline': string;
|
|
87
|
+
'editor.image.dialog.form.link': string;
|
|
88
|
+
'editor.image.dialog.placeholder': string;
|
|
89
|
+
'editor.image.dialog.form.alt': string;
|
|
90
|
+
'editor.image.dialog.form.aspectRatio': string;
|
|
91
|
+
'editor.image.dialog.form.file': string;
|
|
92
|
+
'editor.image.dialog.button.apply': string;
|
|
93
|
+
'editor.video.tooltip': string;
|
|
94
|
+
'editor.video.dialog.tab.upload': string;
|
|
95
|
+
'editor.video.dialog.uploading': string;
|
|
96
|
+
'editor.video.dialog.title': string;
|
|
97
|
+
'editor.video.dialog.link': string;
|
|
98
|
+
'editor.video.dialog.placeholder': string;
|
|
99
|
+
'editor.video.dialog.button.apply': string;
|
|
100
|
+
'editor.table.tooltip': string;
|
|
101
|
+
'editor.table.menu.insert_table': string;
|
|
102
|
+
'editor.table.menu.insert_table.with_header_row': string;
|
|
103
|
+
'editor.table.menu.add_column_before': string;
|
|
104
|
+
'editor.table.menu.add_column_after': string;
|
|
105
|
+
'editor.table.menu.delete_column': string;
|
|
106
|
+
'editor.table.menu.add_row_before': string;
|
|
107
|
+
'editor.table.menu.add_row_after': string;
|
|
108
|
+
'editor.table.menu.delete_row': string;
|
|
109
|
+
'editor.table.menu.merge_or_split_cells': string;
|
|
110
|
+
'editor.table.menu.delete_table': string;
|
|
111
|
+
'editor.blockquote.tooltip': string;
|
|
112
|
+
'editor.horizontalrule.tooltip': string;
|
|
113
|
+
'editor.code.tooltip': string;
|
|
114
|
+
'editor.codeblock.tooltip': string;
|
|
115
|
+
'editor.clear.tooltip': string;
|
|
116
|
+
'editor.undo.tooltip': string;
|
|
117
|
+
'editor.redo.tooltip': string;
|
|
118
|
+
'editor.fullscreen.tooltip.fullscreen': string;
|
|
119
|
+
'editor.fullscreen.tooltip.exit': string;
|
|
120
|
+
'editor.imageUpload.cancel': string;
|
|
121
|
+
'editor.imageUpload.crop': string;
|
|
122
|
+
'editor.imageUpload.uploading': string;
|
|
123
|
+
'editor.imageUpload.alt': string;
|
|
124
|
+
'editor.imageUpload.fileTypeNotSupported': string;
|
|
125
|
+
'editor.imageUpload.fileSizeTooBig': string;
|
|
126
|
+
'editor.table.menu.insertColumnBefore': string;
|
|
127
|
+
'editor.table.menu.insertColumnAfter': string;
|
|
128
|
+
'editor.table.menu.deleteColumn': string;
|
|
129
|
+
'editor.table.menu.insertRowAbove': string;
|
|
130
|
+
'editor.table.menu.insertRowBelow': string;
|
|
131
|
+
'editor.table.menu.deleteRow': string;
|
|
132
|
+
'editor.table.menu.mergeCells': string;
|
|
133
|
+
'editor.table.menu.splitCells': string;
|
|
134
|
+
'editor.table.menu.deleteTable': string;
|
|
135
|
+
'editor.table.menu.setCellsBgColor': string;
|
|
136
|
+
'editor.emoji.tooltip': string;
|
|
137
|
+
'editor.iframe.tooltip': string;
|
|
138
|
+
'editor.searchAndReplace.tooltip': string;
|
|
139
|
+
'editor.search.dialog.text': string;
|
|
140
|
+
'editor.replace.dialog.text': string;
|
|
141
|
+
'editor.replaceAll.dialog.text': string;
|
|
142
|
+
'editor.previous.dialog.text': string;
|
|
143
|
+
'editor.next.dialog.text': string;
|
|
144
|
+
no_result_found: string;
|
|
145
|
+
'Smileys & People': string;
|
|
146
|
+
'Animals & Nature': string;
|
|
147
|
+
'Food & Drink': string;
|
|
148
|
+
Activity: string;
|
|
149
|
+
'Travel & Places': string;
|
|
150
|
+
Object: string;
|
|
151
|
+
Symbol: string;
|
|
152
|
+
Flags: string;
|
|
153
|
+
'Frequently used': string;
|
|
154
|
+
'editor.formula.dialog.text': string;
|
|
155
|
+
'editor.katex.tooltip': string;
|
|
156
|
+
'editor.exportPdf.tooltip': string;
|
|
157
|
+
'editor.exportWord.tooltip': string;
|
|
158
|
+
'editor.importWord.tooltip': string;
|
|
159
|
+
'editor.importWord.limitSize': string;
|
|
160
|
+
'editor.importWord.converting': string;
|
|
161
|
+
'editor.importWord.convertError': string;
|
|
162
|
+
'editor.importWord.importError': string;
|
|
163
|
+
'editor.textDirection.tooltip': string;
|
|
164
|
+
'editor.textDirection.auto.tooltip': string;
|
|
165
|
+
'editor.textDirection.ltr.tooltip': string;
|
|
166
|
+
'editor.textDirection.rtl.tooltip': string;
|
|
167
|
+
'editor.textDirection.unset.tooltip': string;
|
|
168
|
+
'editor.attachment.tooltip': string;
|
|
169
|
+
'editor.attachment.uploading': string;
|
|
170
|
+
'editor.attachment.please_upload': string;
|
|
171
|
+
'editor.imageGif.tooltip': string;
|
|
172
|
+
'editor.replace.caseSensitive': string;
|
|
173
|
+
'editor.mermaid.tooltip': string;
|
|
174
|
+
'editor.twitter.tooltip': string;
|
|
175
|
+
'editor.codeView.tooltip': string;
|
|
176
|
+
'editor.tooltip.flipX': string;
|
|
177
|
+
'editor.tooltip.flipY': string;
|
|
178
|
+
'editor.upload.fileTypeNotSupported': string;
|
|
179
|
+
'editor.upload.fileSizeTooBig': string;
|
|
180
|
+
'editor.upload.error': string;
|
|
181
|
+
'editor.callout.tooltip': string;
|
|
182
|
+
'editor.callout.dialog.title': string;
|
|
183
|
+
'editor.callout.dialog.type': string;
|
|
184
|
+
'editor.callout.dialog.type.placeholder': string;
|
|
185
|
+
'editor.callout.dialog.title.label': string;
|
|
186
|
+
'editor.callout.dialog.title.placeholder': string;
|
|
187
|
+
'editor.callout.dialog.body.label': string;
|
|
188
|
+
'editor.callout.dialog.body.placeholder': string;
|
|
189
|
+
'editor.callout.dialog.button.apply': string;
|
|
190
|
+
'editor.callout.dialog.button.cancel': string;
|
|
191
|
+
'editor.callout.edit.title': string;
|
|
192
|
+
'editor.callout.type.note': string;
|
|
193
|
+
'editor.callout.type.tip': string;
|
|
194
|
+
'editor.callout.type.important': string;
|
|
195
|
+
'editor.callout.type.warning': string;
|
|
196
|
+
'editor.callout.type.caution': string;
|
|
197
|
+
};
|
|
198
|
+
export default locale;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),d=require("@radix-ui/react-popover"),p=require("react"),h=require("./index-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),d=require("@radix-ui/react-popover"),p=require("react"),h=require("./index-ezTXvA7H.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 o=n(d),l=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-border-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",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=x;exports.PopoverContent=c;exports.PopoverTrigger=m;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "@radix-ui/react-popover";
|
|
3
3
|
import * as c from "react";
|
|
4
|
-
import { c as s } from "./index-
|
|
4
|
+
import { c as s } from "./index-BVtsbzV8.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
|
{
|
|
@@ -3,10 +3,10 @@ import { Plus as k } from "lucide-react";
|
|
|
3
3
|
import * as $ from "react";
|
|
4
4
|
import { useCallback as m, useState as w, useEffect as L, useRef as M, useMemo as B } from "react";
|
|
5
5
|
import { HexColorPicker as F } from "react-colorful";
|
|
6
|
-
import { j as I, B as _, c as T } from "./index-
|
|
6
|
+
import { j as I, B as _, c as T } from "./index-BVtsbzV8.js";
|
|
7
7
|
import "./theme.js";
|
|
8
|
-
import { u as N, C as j } from "./index-
|
|
9
|
-
import { P as z, a as E, b as y } from "./popover-
|
|
8
|
+
import { u as N, C as j } from "./index-oj858lQO.js";
|
|
9
|
+
import { P as z, a as E, b as y } from "./popover-mlZeH-7I.js";
|
|
10
10
|
import * as R from "@radix-ui/react-separator";
|
|
11
11
|
function D() {
|
|
12
12
|
return /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ t(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),E=require("lucide-react"),n=require("react"),P=require("react-colorful"),j=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),E=require("lucide-react"),n=require("react"),P=require("react-colorful"),j=require("./index-ezTXvA7H.cjs");require("./theme.cjs");const C=require("./index-CWw4s87s.cjs"),v=require("./popover-Cq1iLY7i.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 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-ezTXvA7H.cjs");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const x=s(o),c=x.forwardRef(({className:e,...r},t)=>n.jsx("textarea",{ref:t,className:a.cn("richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),...r}));c.displayName="Textarea";exports.Textarea=c;
|