eddyter 1.3.73 → 1.3.75
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/LICENSE +24 -24
- package/README.md +478 -478
- package/dist/EddyterIcon.svg +24 -24
- package/dist/{ImageResizer-FrE13F54.js → ImageResizer-o0eMm1Mg.js} +56 -50
- package/dist/api/ai/aiAgentService.d.ts +22 -1
- package/dist/api/config/endpoints.d.ts +3 -0
- package/dist/assets/style.css +1 -1
- package/dist/{babel-CCPWkrf4.js → babel-B9hn44Wo.js} +726 -1302
- package/dist/components/VideoView/index.d.ts +3 -1
- package/dist/constants.d.ts +2 -1
- package/dist/{estree-CxUPh9wa.js → estree-CocPn_Md.js} +529 -917
- package/dist/hooks/useBlockFormat.d.ts +1 -0
- package/dist/{html-CmniStvG.js → html-CxCicOef.js} +350 -589
- package/dist/{html2pdf.bundle-CQue4YDW.js → html2pdf.bundle-CVq-OpZt.js} +2778 -3797
- package/dist/{html2pdf.bundle.min-BEj2NT3U.js → html2pdf.bundle.min-BxzIoi3T.js} +3405 -5221
- package/dist/{index-CX3cfSUQ.js → index-CtPRZTab.js} +27 -18
- package/dist/index-Cuv9ugJL.js +381 -0
- package/dist/{index-CfRDm1jv.js → index-DxEP36zG.js} +12228 -12186
- package/dist/{index-BO5ICrpG.js → index-eRyVFO7x.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{markdown-B0mEGGfQ.js → markdown-BUjgWFLu.js} +578 -1015
- package/dist/nodes/GeneratingImageNode.d.ts +30 -0
- package/dist/nodes/VideoNode.d.ts +10 -3
- package/dist/{postcss-B0bxXf7u.js → postcss-CGIcwj_g.js} +615 -1065
- package/dist/{standalone-DmuJV5rn.js → standalone-C0qguT38.js} +350 -596
- package/dist/{typescript-DZlC_9M8.js → typescript-BM7wk6k-.js} +1114 -1806
- package/dist/ui/Icons.d.ts +2 -1
- package/package.json +149 -152
- package/dist/index-Buj5fA92.js +0 -274
package/dist/ui/Icons.d.ts
CHANGED
|
@@ -82,4 +82,5 @@ declare const WrapTextLeftIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
|
82
82
|
declare const WrapTextRightIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
83
83
|
declare const BugIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
84
84
|
declare const LockIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
|
|
85
|
+
declare const AiSparkle: () => import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
export { AddCommentIcon, AddImageIcon, AdjustToneIcon, AIChatIcon, AIIcon, AlignBottomIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignMiddleIcon, AlignRightIcon, AlignTopIcon, BoldIcon, BugIcon, BulletListIcon, ChartBarIcon, CheckBoxIcon, CheckIcon, ChevronDownIcon, CodeIcon, CompleteSentenceIcon, DisableIcon, EmojifyIcon, FaceSmileIcon, FileIcon, FixGrammarIcon, GenerateImageIcon, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, Heading6Icon, HorizontalRuleIcon, HtmlViewIcon, ImageIcon, ItalicIcon, LinkIcon, LockIcon, MagicoonIcon, MakeLongerIcon, MakeShorterIcon, MenuAltIcon, MessageEditIcon, MicrophoneIcon, NoteIcon, NumberListIcon, PauseCircleIcon, ParagraphIcon, PenLineIcon, PerspectiveIcon, PlayCircleIcon, PlusIcon, QuoteIcon, RecordingIcon, RedoIcon, SearchTextIcon, SearchTextIcon2, SendIcon, SignatureIcon, SimplifyIcon, SparkleIcon, StopCircleIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TodoIcon, TranslateIcon, TypeCapitalizeIcon, TypeLowercaseIcon, TypeUppercaseIcon, UnderlineIcon, UndoIcon, UploadIcon, TableIcon, HighlighterIcon, LightbulbIcon, ClearFormattingIcon, CrossIcon, DownloadIcon, TrashIcon, ExternalLinkIcon, WrapTextLeftIcon, WrapTextRightIcon, AiSparkle };
|
package/package.json
CHANGED
|
@@ -1,153 +1,150 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
"
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
"eslint --fix"
|
|
151
|
-
]
|
|
152
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "eddyter",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.3.75",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"rich-text-editor",
|
|
8
|
+
"text-editor",
|
|
9
|
+
"wysiwyg",
|
|
10
|
+
"editor",
|
|
11
|
+
"ai-editor",
|
|
12
|
+
"ai-writing",
|
|
13
|
+
"ai-assistant",
|
|
14
|
+
"content-editor",
|
|
15
|
+
"document-editor",
|
|
16
|
+
"web-editor",
|
|
17
|
+
"react-editor",
|
|
18
|
+
"javascript-editor",
|
|
19
|
+
"frontend-component",
|
|
20
|
+
"ui-component",
|
|
21
|
+
"saas-editor",
|
|
22
|
+
"api-key",
|
|
23
|
+
"authenticated-editor",
|
|
24
|
+
"pluggable-editor",
|
|
25
|
+
"configurable-editor",
|
|
26
|
+
"eddyter"
|
|
27
|
+
],
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"module": "dist/index.js",
|
|
30
|
+
"types": "dist/index.d.ts",
|
|
31
|
+
"style": "dist/assets/style.css",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"import": "./dist/index.js",
|
|
38
|
+
"types": "./dist/index.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"./style.css": "./dist/assets/style.css"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
44
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@aws-sdk/client-s3": "^3.744.0",
|
|
48
|
+
"@aws-sdk/s3-request-presigner": "^3.744.0",
|
|
49
|
+
"@emotion/react": "^11.10.6",
|
|
50
|
+
"@emotion/styled": "^11.10.6",
|
|
51
|
+
"@lexical/clipboard": "^0.24.0",
|
|
52
|
+
"@lexical/code": "^0.24.0",
|
|
53
|
+
"@lexical/dragon": "^0.24.0",
|
|
54
|
+
"@lexical/history": "^0.24.0",
|
|
55
|
+
"@lexical/html": "^0.24.0",
|
|
56
|
+
"@lexical/link": "^0.24.0",
|
|
57
|
+
"@lexical/list": "^0.24.0",
|
|
58
|
+
"@lexical/markdown": "0.24.0",
|
|
59
|
+
"@lexical/react": "^0.24.0",
|
|
60
|
+
"@lexical/rich-text": "^0.24.0",
|
|
61
|
+
"@lexical/selection": "^0.24.0",
|
|
62
|
+
"@lexical/table": "^0.24.0",
|
|
63
|
+
"@lexical/text": "^0.24.0",
|
|
64
|
+
"@lexical/utils": "^0.24.0",
|
|
65
|
+
"@mui/icons-material": "^5.11.9",
|
|
66
|
+
"@mui/material": "^5.11.9",
|
|
67
|
+
"@mui/styles": "^5.11.9",
|
|
68
|
+
"@radix-ui/react-avatar": "^1.1.3",
|
|
69
|
+
"@radix-ui/react-checkbox": "^1.1.4",
|
|
70
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
71
|
+
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
72
|
+
"@radix-ui/react-label": "^2.1.2",
|
|
73
|
+
"@radix-ui/react-popover": "^1.1.13",
|
|
74
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
75
|
+
"@radix-ui/react-separator": "^1.1.2",
|
|
76
|
+
"@radix-ui/react-slot": "^1.2.2",
|
|
77
|
+
"@radix-ui/react-tabs": "^1.1.3",
|
|
78
|
+
"@radix-ui/react-tooltip": "^1.1.8",
|
|
79
|
+
"@types/react-signature-canvas": "^1.0.7",
|
|
80
|
+
"axios": "^1.8.1",
|
|
81
|
+
"class-variance-authority": "^0.7.1",
|
|
82
|
+
"classnames": "^2.3.2",
|
|
83
|
+
"clsx": "^2.1.1",
|
|
84
|
+
"emoji-picker-react": "^4.12.0",
|
|
85
|
+
"framer-motion": "^12.5.0",
|
|
86
|
+
"html2pdf.js": "^0.14.0",
|
|
87
|
+
"lexical": "^0.24.0",
|
|
88
|
+
"lexical-ai-plugin": "0.0.2-alpha",
|
|
89
|
+
"lodash-es": "^4.17.21",
|
|
90
|
+
"lucide-react": "^0.344.0",
|
|
91
|
+
"marked": "^17.0.1",
|
|
92
|
+
"prettier": "^3.5.1",
|
|
93
|
+
"react-colorful": "^5.6.1",
|
|
94
|
+
"react-router-dom": "^7.2.0",
|
|
95
|
+
"react-signature-canvas": "^1.1.0-alpha.1",
|
|
96
|
+
"sass": "^1.57.1",
|
|
97
|
+
"sonner": "^2.0.3",
|
|
98
|
+
"tailwind-merge": "^3.0.2",
|
|
99
|
+
"tailwindcss": "3",
|
|
100
|
+
"tailwindcss-animate": "^1.0.7"
|
|
101
|
+
},
|
|
102
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
103
|
+
"devDependencies": {
|
|
104
|
+
"@types/he": "^1.2.3",
|
|
105
|
+
"@types/lodash-es": "^4.17.12",
|
|
106
|
+
"@types/node": "^22.13.10",
|
|
107
|
+
"@types/react": "^18.0.26",
|
|
108
|
+
"@types/react-dom": "^18.0.9",
|
|
109
|
+
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
110
|
+
"@typescript-eslint/parser": "5.62.0",
|
|
111
|
+
"@vitejs/plugin-react-swc": "^3.11.0",
|
|
112
|
+
"autoprefixer": "^10.4.18",
|
|
113
|
+
"cross-env": "^7.0.3",
|
|
114
|
+
"eslint": "8.56.0",
|
|
115
|
+
"eslint-config-prettier": "^10.1.1",
|
|
116
|
+
"eslint-import-resolver-typescript": "^3.8.5",
|
|
117
|
+
"eslint-plugin-import": "^2.31.0",
|
|
118
|
+
"eslint-plugin-react": "^7.37.4",
|
|
119
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
120
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
121
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
122
|
+
"husky": "^9.1.7",
|
|
123
|
+
"lint-staged": "^15.4.3",
|
|
124
|
+
"postcss": "^8.4.35",
|
|
125
|
+
"postcss-prefix-selector": "^2.1.1",
|
|
126
|
+
"react": "^18.2.0",
|
|
127
|
+
"react-dom": "^18.2.0",
|
|
128
|
+
"typescript": "^5.3.3",
|
|
129
|
+
"vite": "^5.4.21",
|
|
130
|
+
"vite-plugin-dts": "^4.5.3",
|
|
131
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
132
|
+
},
|
|
133
|
+
"lint-staged": {
|
|
134
|
+
"*.{js,jsx,ts,tsx}": [
|
|
135
|
+
"prettier --write",
|
|
136
|
+
"eslint --fix"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"scripts": {
|
|
140
|
+
"dev": "vite",
|
|
141
|
+
"build": "tsc && vite build --mode production",
|
|
142
|
+
"preview": "vite preview",
|
|
143
|
+
"prettier:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
144
|
+
"prettier:format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
145
|
+
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
146
|
+
"lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
147
|
+
"format": "pnpm prettier:format && pnpm lint:fix",
|
|
148
|
+
"check": "pnpm prettier:check && pnpm lint"
|
|
149
|
+
}
|
|
153
150
|
}
|
package/dist/index-Buj5fA92.js
DELETED
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
import { jsxs as S, Fragment as w, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { I as ee } from "./ImageResizer-FrE13F54.js";
|
|
3
|
-
import { CodeNode as te } from "@lexical/code";
|
|
4
|
-
import { LinkNode as oe } from "@lexical/link";
|
|
5
|
-
import { AutoFocusPlugin as re } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
6
|
-
import { useLexicalComposerContext as ie } from "@lexical/react/LexicalComposerContext";
|
|
7
|
-
import { ContentEditable as ne } from "@lexical/react/LexicalContentEditable";
|
|
8
|
-
import { LexicalErrorBoundary as se } from "@lexical/react/LexicalErrorBoundary";
|
|
9
|
-
import { HistoryPlugin as ce } from "@lexical/react/LexicalHistoryPlugin";
|
|
10
|
-
import { LexicalNestedComposer as ae } from "@lexical/react/LexicalNestedComposer";
|
|
11
|
-
import { OnChangePlugin as le } from "@lexical/react/LexicalOnChangePlugin";
|
|
12
|
-
import { RichTextPlugin as de } from "@lexical/react/LexicalRichTextPlugin";
|
|
13
|
-
import { useLexicalEditable as ue } from "@lexical/react/useLexicalEditable";
|
|
14
|
-
import { useLexicalNodeSelection as me } from "@lexical/react/useLexicalNodeSelection";
|
|
15
|
-
import { mergeRegister as fe } from "@lexical/utils";
|
|
16
|
-
import { $getSelection as M, $isNodeSelection as m, $setSelection as $, SELECTION_CHANGE_COMMAND as ge, COMMAND_PRIORITY_LOW as u, CLICK_COMMAND as pe, DRAGSTART_COMMAND as Ce, KEY_DELETE_COMMAND as Ee, KEY_BACKSPACE_COMMAND as he, KEY_ENTER_COMMAND as Ne, KEY_ESCAPE_COMMAND as be, RootNode as ve, TextNode as Re, LineBreakNode as xe, ParagraphNode as De, $getNodeByKey as _ } from "lexical";
|
|
17
|
-
import { useRef as A, useState as B, useCallback as E, useEffect as Se } from "react";
|
|
18
|
-
import { x as v, r as Me, L as _e, i as Ae } from "./index-CfRDm1jv.js";
|
|
19
|
-
function Ge({
|
|
20
|
-
src: Y,
|
|
21
|
-
nodeKey: f,
|
|
22
|
-
width: g,
|
|
23
|
-
height: R,
|
|
24
|
-
maxWidth: z,
|
|
25
|
-
resizable: I,
|
|
26
|
-
showCaption: h,
|
|
27
|
-
caption: p,
|
|
28
|
-
captionsEnabled: W,
|
|
29
|
-
controls: V = !0
|
|
30
|
-
}) {
|
|
31
|
-
const c = A(null), x = A(null), [n, a, C] = me(f), [l, L] = B(!1), [o] = ie(), [N, K] = B(null), O = A(null), H = ue(), D = E(
|
|
32
|
-
(e) => {
|
|
33
|
-
const t = M();
|
|
34
|
-
return n && m(t) && (e.preventDefault(), o.update(() => {
|
|
35
|
-
t.getNodes().forEach((s) => {
|
|
36
|
-
v(s) && s.remove();
|
|
37
|
-
});
|
|
38
|
-
})), !1;
|
|
39
|
-
},
|
|
40
|
-
[o, n]
|
|
41
|
-
), k = E(
|
|
42
|
-
(e) => {
|
|
43
|
-
const t = M(), r = x.current;
|
|
44
|
-
if (n && m(t) && t.getNodes().length === 1) {
|
|
45
|
-
if (h)
|
|
46
|
-
return $(null), e.preventDefault(), p.focus(), !0;
|
|
47
|
-
if (r !== null && r !== document.activeElement)
|
|
48
|
-
return e.preventDefault(), r.focus(), !0;
|
|
49
|
-
}
|
|
50
|
-
return !1;
|
|
51
|
-
},
|
|
52
|
-
[p, n, h]
|
|
53
|
-
), y = E(
|
|
54
|
-
(e) => O.current === p || x.current === e.target ? ($(null), o.update(() => {
|
|
55
|
-
a(!0);
|
|
56
|
-
const t = o.getRootElement();
|
|
57
|
-
t !== null && t.focus();
|
|
58
|
-
}), !0) : !1,
|
|
59
|
-
[p, o, a]
|
|
60
|
-
), P = E(
|
|
61
|
-
(e) => {
|
|
62
|
-
const t = e;
|
|
63
|
-
if (l)
|
|
64
|
-
return !0;
|
|
65
|
-
const s = t.target === c.current;
|
|
66
|
-
let d = !1;
|
|
67
|
-
if (!s && c.current) {
|
|
68
|
-
const b = c.current.getBoundingClientRect();
|
|
69
|
-
d = t.clientX >= b.left && t.clientX <= b.right && t.clientY >= b.top && t.clientY <= b.bottom;
|
|
70
|
-
}
|
|
71
|
-
return s || d ? (t.shiftKey ? a(!n) : (C(), a(!0)), !0) : !1;
|
|
72
|
-
},
|
|
73
|
-
[l, n, a, C]
|
|
74
|
-
);
|
|
75
|
-
Se(() => {
|
|
76
|
-
let e = !0;
|
|
77
|
-
const t = fe(
|
|
78
|
-
o.registerUpdateListener(({ editorState: r }) => {
|
|
79
|
-
e && K(r.read(() => M()));
|
|
80
|
-
}),
|
|
81
|
-
o.registerCommand(
|
|
82
|
-
ge,
|
|
83
|
-
(r, s) => (O.current = s, !1),
|
|
84
|
-
u
|
|
85
|
-
),
|
|
86
|
-
o.registerCommand(
|
|
87
|
-
pe,
|
|
88
|
-
P,
|
|
89
|
-
u
|
|
90
|
-
),
|
|
91
|
-
o.registerCommand(
|
|
92
|
-
Ce,
|
|
93
|
-
(r) => r.target === c.current ? (r.preventDefault(), !0) : !1,
|
|
94
|
-
u
|
|
95
|
-
),
|
|
96
|
-
o.registerCommand(
|
|
97
|
-
Ee,
|
|
98
|
-
D,
|
|
99
|
-
u
|
|
100
|
-
),
|
|
101
|
-
o.registerCommand(
|
|
102
|
-
he,
|
|
103
|
-
D,
|
|
104
|
-
u
|
|
105
|
-
),
|
|
106
|
-
o.registerCommand(Ne, k, u),
|
|
107
|
-
o.registerCommand(
|
|
108
|
-
be,
|
|
109
|
-
y,
|
|
110
|
-
u
|
|
111
|
-
)
|
|
112
|
-
);
|
|
113
|
-
return () => {
|
|
114
|
-
e = !1, t();
|
|
115
|
-
};
|
|
116
|
-
}, [
|
|
117
|
-
C,
|
|
118
|
-
o,
|
|
119
|
-
l,
|
|
120
|
-
n,
|
|
121
|
-
f,
|
|
122
|
-
D,
|
|
123
|
-
k,
|
|
124
|
-
y,
|
|
125
|
-
P,
|
|
126
|
-
a
|
|
127
|
-
]);
|
|
128
|
-
const X = () => {
|
|
129
|
-
o.update(() => {
|
|
130
|
-
const e = _(f);
|
|
131
|
-
v(e) && e.setShowCaption(!0);
|
|
132
|
-
});
|
|
133
|
-
}, j = (e, t) => {
|
|
134
|
-
setTimeout(() => {
|
|
135
|
-
L(!1);
|
|
136
|
-
}, 200), o.update(() => {
|
|
137
|
-
const r = _(f);
|
|
138
|
-
v(r) && r.setWidthAndHeight(e, t);
|
|
139
|
-
});
|
|
140
|
-
}, F = () => {
|
|
141
|
-
L(!0);
|
|
142
|
-
}, G = (e) => {
|
|
143
|
-
e.preventDefault(), e.stopPropagation(), o.update(() => {
|
|
144
|
-
const t = _(f);
|
|
145
|
-
v(t) && t.remove();
|
|
146
|
-
});
|
|
147
|
-
}, U = E(
|
|
148
|
-
(e) => {
|
|
149
|
-
if (l || e.target.closest("button"))
|
|
150
|
-
return;
|
|
151
|
-
const r = e.target === c.current;
|
|
152
|
-
let s = !1;
|
|
153
|
-
if (!r && c.current) {
|
|
154
|
-
const d = c.current.getBoundingClientRect();
|
|
155
|
-
s = e.clientX >= d.left && e.clientX <= d.right && e.clientY >= d.top && e.clientY <= d.bottom;
|
|
156
|
-
}
|
|
157
|
-
!r && !s || (e.stopPropagation(), e.shiftKey ? a(!n) : (C(), a(!0)));
|
|
158
|
-
},
|
|
159
|
-
[l, n, a, C]
|
|
160
|
-
), q = n && m(N) && !l, T = (n || l) && H, J = typeof g == "number" && typeof R == "number", Q = typeof g == "number" ? g : "auto", Z = typeof R == "number" ? R : "auto";
|
|
161
|
-
return /* @__PURE__ */ S(w, { children: [
|
|
162
|
-
/* @__PURE__ */ S(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
draggable: q,
|
|
166
|
-
style: {
|
|
167
|
-
position: "relative",
|
|
168
|
-
display: "inline-block"
|
|
169
|
-
},
|
|
170
|
-
onClick: U,
|
|
171
|
-
children: [
|
|
172
|
-
/* @__PURE__ */ i(
|
|
173
|
-
"video",
|
|
174
|
-
{
|
|
175
|
-
ref: c,
|
|
176
|
-
src: Y,
|
|
177
|
-
controls: V,
|
|
178
|
-
preload: "metadata",
|
|
179
|
-
className: T ? `focused ${m(N) ? "draggable" : ""}` : void 0,
|
|
180
|
-
style: J ? {
|
|
181
|
-
width: Q,
|
|
182
|
-
height: Z,
|
|
183
|
-
maxWidth: "100%"
|
|
184
|
-
} : {
|
|
185
|
-
maxWidth: "100%",
|
|
186
|
-
height: "auto"
|
|
187
|
-
},
|
|
188
|
-
draggable: "false"
|
|
189
|
-
}
|
|
190
|
-
),
|
|
191
|
-
n && m(N) && /* @__PURE__ */ i("div", { className: "cteditor-absolute cteditor-top-2 cteditor-right-2 cteditor-flex cteditor-gap-1 cteditor-z-10", children: /* @__PURE__ */ i(
|
|
192
|
-
"button",
|
|
193
|
-
{
|
|
194
|
-
onClick: (e) => {
|
|
195
|
-
e.stopPropagation(), G(e);
|
|
196
|
-
},
|
|
197
|
-
className: "cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-destructive hover:cteditor-text-destructive-foreground cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
|
|
198
|
-
"aria-label": "Delete video",
|
|
199
|
-
title: "Delete video",
|
|
200
|
-
children: /* @__PURE__ */ i(Me, { className: "cteditor-w-4 cteditor-h-4" })
|
|
201
|
-
}
|
|
202
|
-
) }),
|
|
203
|
-
I && m(N) && T && /* @__PURE__ */ i(
|
|
204
|
-
ee,
|
|
205
|
-
{
|
|
206
|
-
showCaption: h,
|
|
207
|
-
setShowCaption: X,
|
|
208
|
-
editor: o,
|
|
209
|
-
buttonRef: x,
|
|
210
|
-
imageRef: c,
|
|
211
|
-
maxWidth: z,
|
|
212
|
-
onResizeStart: F,
|
|
213
|
-
onResizeEnd: j,
|
|
214
|
-
captionsEnabled: W
|
|
215
|
-
}
|
|
216
|
-
)
|
|
217
|
-
]
|
|
218
|
-
}
|
|
219
|
-
),
|
|
220
|
-
h && /* @__PURE__ */ i(
|
|
221
|
-
"div",
|
|
222
|
-
{
|
|
223
|
-
className: "image-caption-container",
|
|
224
|
-
style: {
|
|
225
|
-
width: typeof g == "number" ? `${g}px` : "100%",
|
|
226
|
-
maxWidth: "100%"
|
|
227
|
-
},
|
|
228
|
-
children: /* @__PURE__ */ S(
|
|
229
|
-
ae,
|
|
230
|
-
{
|
|
231
|
-
initialEditor: p,
|
|
232
|
-
initialNodes: [
|
|
233
|
-
ve,
|
|
234
|
-
Re,
|
|
235
|
-
xe,
|
|
236
|
-
De,
|
|
237
|
-
oe,
|
|
238
|
-
te
|
|
239
|
-
],
|
|
240
|
-
children: [
|
|
241
|
-
/* @__PURE__ */ i(re, {}),
|
|
242
|
-
/* @__PURE__ */ i(
|
|
243
|
-
de,
|
|
244
|
-
{
|
|
245
|
-
contentEditable: /* @__PURE__ */ i(
|
|
246
|
-
ne,
|
|
247
|
-
{
|
|
248
|
-
"aria-placeholder": "Enter a caption...",
|
|
249
|
-
placeholder: () => /* @__PURE__ */ i("span", { className: "cteditor-text-xs", children: "Enter a caption..." }),
|
|
250
|
-
className: "ImageNode__contentEditable"
|
|
251
|
-
}
|
|
252
|
-
),
|
|
253
|
-
ErrorBoundary: se
|
|
254
|
-
}
|
|
255
|
-
),
|
|
256
|
-
/* @__PURE__ */ i(
|
|
257
|
-
le,
|
|
258
|
-
{
|
|
259
|
-
onChange: () => {
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
),
|
|
263
|
-
/* @__PURE__ */ i(ce, {}),
|
|
264
|
-
/* @__PURE__ */ i(_e, { namespace: Ae.namespace })
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
)
|
|
268
|
-
}
|
|
269
|
-
)
|
|
270
|
-
] });
|
|
271
|
-
}
|
|
272
|
-
export {
|
|
273
|
-
Ge as default
|
|
274
|
-
};
|