@timpel/forumkit-sdk-web 0.1.0

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.
@@ -0,0 +1,217 @@
1
+ import {
2
+ BulletListIcon,
3
+ CodeBlockIcon,
4
+ IMAGE_ACCEPT,
5
+ ImageIcon,
6
+ LinkIcon,
7
+ NumberedListIcon,
8
+ SpoilerIcon,
9
+ TableIcon,
10
+ ToolbarButton,
11
+ VideoIcon,
12
+ editorExtensions,
13
+ uploadInline
14
+ } from "./chunk-YICVG5QM.js";
15
+
16
+ // src/views/components/composer/rich-text-editor.tsx
17
+ import { useRef } from "react";
18
+ import { useEditor, EditorContent } from "@tiptap/react";
19
+ import { jsx, jsxs } from "react/jsx-runtime";
20
+ function RichTextEditor({ content, onChange, forumId, sessionToken, onInlineUpload }) {
21
+ const imageInputRef = useRef(null);
22
+ const videoInputRef = useRef(null);
23
+ const editor = useEditor({
24
+ extensions: editorExtensions,
25
+ content,
26
+ // Re-renders on every selection/transaction change so toolbar buttons can
27
+ // reflect the format active at the cursor (Tiptap v3 defaults this off).
28
+ shouldRerenderOnTransaction: true,
29
+ onUpdate({ editor: editor2 }) {
30
+ onChange(editor2.storage.markdown.getMarkdown());
31
+ }
32
+ });
33
+ if (!editor) return null;
34
+ function run(fn) {
35
+ if (editor) fn(editor);
36
+ }
37
+ function handleSetLink() {
38
+ const previousUrl = editor?.getAttributes("link").href;
39
+ const url = window.prompt("Link URL", previousUrl ?? "https://");
40
+ if (url === null) return;
41
+ if (url === "") {
42
+ run((e) => e.chain().focus().extendMarkRange("link").unsetLink().run());
43
+ return;
44
+ }
45
+ run((e) => e.chain().focus().extendMarkRange("link").setLink({ href: url }).run());
46
+ }
47
+ async function handleFileSelected(kind, file) {
48
+ if (!file) return;
49
+ try {
50
+ const { url, attachmentId } = await uploadInline(forumId, sessionToken, file);
51
+ onInlineUpload(attachmentId);
52
+ if (kind === "image") {
53
+ run((e) => e.chain().focus().setImage({ src: url }).run());
54
+ } else {
55
+ run((e) => e.chain().focus().setVideo({ src: url }).run());
56
+ }
57
+ } catch {
58
+ window.alert("Upload failed. Please try again.");
59
+ }
60
+ }
61
+ return /* @__PURE__ */ jsxs("div", { className: "fk-rte", children: [
62
+ /* @__PURE__ */ jsxs("div", { className: "fk-rte-toolbar", children: [
63
+ /* @__PURE__ */ jsx(
64
+ ToolbarButton,
65
+ {
66
+ label: "Bold",
67
+ active: editor.isActive("bold"),
68
+ style: { fontWeight: 800, fontSize: 15 },
69
+ onClick: () => run((e) => e.chain().focus().toggleBold().run()),
70
+ children: "B"
71
+ }
72
+ ),
73
+ /* @__PURE__ */ jsx(
74
+ ToolbarButton,
75
+ {
76
+ label: "Italic",
77
+ active: editor.isActive("italic"),
78
+ style: { fontStyle: "italic", fontSize: 15 },
79
+ onClick: () => run((e) => e.chain().focus().toggleItalic().run()),
80
+ children: "i"
81
+ }
82
+ ),
83
+ /* @__PURE__ */ jsx(
84
+ ToolbarButton,
85
+ {
86
+ label: "Strikethrough",
87
+ active: editor.isActive("strike"),
88
+ style: { textDecoration: "line-through", fontSize: 15 },
89
+ onClick: () => run((e) => e.chain().focus().toggleStrike().run()),
90
+ children: "S"
91
+ }
92
+ ),
93
+ /* @__PURE__ */ jsx(
94
+ ToolbarButton,
95
+ {
96
+ label: "Superscript",
97
+ active: editor.isActive("superscript"),
98
+ style: { fontSize: 14 },
99
+ onClick: () => run((e) => e.chain().focus().toggleSuperscript().run()),
100
+ children: "x\xB2"
101
+ }
102
+ ),
103
+ /* @__PURE__ */ jsx(
104
+ ToolbarButton,
105
+ {
106
+ label: "Heading",
107
+ active: editor.isActive("heading", { level: 2 }),
108
+ style: { fontSize: 16, fontWeight: 700 },
109
+ onClick: () => run((e) => e.chain().focus().toggleHeading({ level: 2 }).run()),
110
+ children: "T"
111
+ }
112
+ ),
113
+ /* @__PURE__ */ jsx("span", { className: "fk-rte-divider" }),
114
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Link", active: editor.isActive("link"), onClick: handleSetLink, children: /* @__PURE__ */ jsx(LinkIcon, {}) }),
115
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Image", onClick: () => imageInputRef.current?.click(), children: /* @__PURE__ */ jsx(ImageIcon, {}) }),
116
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Video", onClick: () => videoInputRef.current?.click(), children: /* @__PURE__ */ jsx(VideoIcon, {}) }),
117
+ /* @__PURE__ */ jsx(
118
+ ToolbarButton,
119
+ {
120
+ label: "Bullet list",
121
+ active: editor.isActive("bulletList"),
122
+ onClick: () => run((e) => e.chain().focus().toggleBulletList().run()),
123
+ children: /* @__PURE__ */ jsx(BulletListIcon, {})
124
+ }
125
+ ),
126
+ /* @__PURE__ */ jsx(
127
+ ToolbarButton,
128
+ {
129
+ label: "Numbered list",
130
+ active: editor.isActive("orderedList"),
131
+ onClick: () => run((e) => e.chain().focus().toggleOrderedList().run()),
132
+ children: /* @__PURE__ */ jsx(NumberedListIcon, {})
133
+ }
134
+ ),
135
+ /* @__PURE__ */ jsx("span", { className: "fk-rte-divider" }),
136
+ /* @__PURE__ */ jsx(
137
+ ToolbarButton,
138
+ {
139
+ label: "Quote",
140
+ active: editor.isActive("blockquote"),
141
+ style: { fontWeight: 800, fontSize: 14 },
142
+ onClick: () => run((e) => e.chain().focus().toggleBlockquote().run()),
143
+ children: '"'
144
+ }
145
+ ),
146
+ /* @__PURE__ */ jsx(
147
+ ToolbarButton,
148
+ {
149
+ label: "Spoiler",
150
+ active: editor.isActive("spoiler"),
151
+ onClick: () => run((e) => e.chain().focus().toggleSpoiler().run()),
152
+ children: /* @__PURE__ */ jsx(SpoilerIcon, {})
153
+ }
154
+ ),
155
+ /* @__PURE__ */ jsx(
156
+ ToolbarButton,
157
+ {
158
+ label: "Inline code",
159
+ active: editor.isActive("code"),
160
+ style: { fontFamily: "monospace", fontSize: 13 },
161
+ onClick: () => run((e) => e.chain().focus().toggleCode().run()),
162
+ children: "</>"
163
+ }
164
+ ),
165
+ /* @__PURE__ */ jsx(
166
+ ToolbarButton,
167
+ {
168
+ label: "Code block",
169
+ active: editor.isActive("codeBlock"),
170
+ onClick: () => run((e) => e.chain().focus().toggleCodeBlock().run()),
171
+ children: /* @__PURE__ */ jsx(CodeBlockIcon, {})
172
+ }
173
+ ),
174
+ /* @__PURE__ */ jsx(
175
+ ToolbarButton,
176
+ {
177
+ label: "Table",
178
+ active: editor.isActive("table"),
179
+ onClick: () => run((e) => e.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run()),
180
+ children: /* @__PURE__ */ jsx(TableIcon, {})
181
+ }
182
+ ),
183
+ /* @__PURE__ */ jsx("div", { className: "fk-rte-spacer" })
184
+ ] }),
185
+ /* @__PURE__ */ jsx(EditorContent, { editor, className: "fk-rte-content" }),
186
+ /* @__PURE__ */ jsx(
187
+ "input",
188
+ {
189
+ ref: imageInputRef,
190
+ type: "file",
191
+ accept: IMAGE_ACCEPT,
192
+ style: { display: "none" },
193
+ onChange: (e) => {
194
+ void handleFileSelected("image", e.target.files?.[0]);
195
+ e.target.value = "";
196
+ }
197
+ }
198
+ ),
199
+ /* @__PURE__ */ jsx(
200
+ "input",
201
+ {
202
+ ref: videoInputRef,
203
+ type: "file",
204
+ accept: "video/*",
205
+ style: { display: "none" },
206
+ onChange: (e) => {
207
+ void handleFileSelected("video", e.target.files?.[0]);
208
+ e.target.value = "";
209
+ }
210
+ }
211
+ )
212
+ ] });
213
+ }
214
+ export {
215
+ RichTextEditor as default
216
+ };
217
+ //# sourceMappingURL=rich-text-editor-T54NZOYU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/views/components/composer/rich-text-editor.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { useEditor, EditorContent, type Editor } from '@tiptap/react';\nimport { editorExtensions } from './editor/extensions';\nimport {\n ToolbarButton, LinkIcon, ImageIcon, VideoIcon, BulletListIcon, NumberedListIcon, SpoilerIcon, CodeBlockIcon, TableIcon,\n} from './editor/toolbar-buttons';\nimport { uploadInline } from './editor/upload-inline';\nimport { IMAGE_ACCEPT } from '../../lib/accepted-media-types';\nimport './rich-text-toolbar.css';\nimport './rich-text-editor.css';\n\ntype RichTextEditorProps = {\n content: string;\n onChange: (markdown: string) => void;\n forumId: string;\n sessionToken?: string | undefined;\n // Reports the attachmentId of every image/video uploaded via the toolbar\n // buttons below, so the caller can clean up orphaned uploads if the post\n // never gets submitted — these are embedded straight into the body\n // markdown, not tracked anywhere else.\n onInlineUpload: (attachmentId: string) => void;\n};\n\nexport default function RichTextEditor({ content, onChange, forumId, sessionToken, onInlineUpload }: RichTextEditorProps) {\n const imageInputRef = useRef<HTMLInputElement>(null);\n const videoInputRef = useRef<HTMLInputElement>(null);\n\n const editor = useEditor({\n extensions: editorExtensions,\n content,\n // Re-renders on every selection/transaction change so toolbar buttons can\n // reflect the format active at the cursor (Tiptap v3 defaults this off).\n shouldRerenderOnTransaction: true,\n onUpdate({ editor }) {\n onChange((editor.storage as unknown as { markdown: { getMarkdown: () => string } }).markdown.getMarkdown());\n },\n });\n\n if (!editor) return null;\n\n function run(fn: (editor: Editor) => void) {\n if (editor) fn(editor);\n }\n\n function handleSetLink() {\n const previousUrl = editor?.getAttributes('link').href as string | undefined;\n const url = window.prompt('Link URL', previousUrl ?? 'https://');\n if (url === null) return;\n if (url === '') {\n run(e => e.chain().focus().extendMarkRange('link').unsetLink().run());\n return;\n }\n run(e => e.chain().focus().extendMarkRange('link').setLink({ href: url }).run());\n }\n\n async function handleFileSelected(kind: 'image' | 'video', file: File | undefined) {\n if (!file) return;\n try {\n const { url, attachmentId } = await uploadInline(forumId, sessionToken, file);\n onInlineUpload(attachmentId);\n if (kind === 'image') {\n run(e => e.chain().focus().setImage({ src: url }).run());\n } else {\n run(e => e.chain().focus().setVideo({ src: url }).run());\n }\n } catch {\n window.alert('Upload failed. Please try again.');\n }\n }\n\n return (\n <div className=\"fk-rte\">\n <div className=\"fk-rte-toolbar\">\n <ToolbarButton label=\"Bold\" active={editor.isActive('bold')} style={{ fontWeight: 800, fontSize: 15 }}\n onClick={() => run(e => e.chain().focus().toggleBold().run())}>B</ToolbarButton>\n <ToolbarButton label=\"Italic\" active={editor.isActive('italic')} style={{ fontStyle: 'italic', fontSize: 15 }}\n onClick={() => run(e => e.chain().focus().toggleItalic().run())}>i</ToolbarButton>\n <ToolbarButton label=\"Strikethrough\" active={editor.isActive('strike')} style={{ textDecoration: 'line-through', fontSize: 15 }}\n onClick={() => run(e => e.chain().focus().toggleStrike().run())}>S</ToolbarButton>\n <ToolbarButton label=\"Superscript\" active={editor.isActive('superscript')} style={{ fontSize: 14 }}\n onClick={() => run(e => e.chain().focus().toggleSuperscript().run())}>x²</ToolbarButton>\n <ToolbarButton label=\"Heading\" active={editor.isActive('heading', { level: 2 })} style={{ fontSize: 16, fontWeight: 700 }}\n onClick={() => run(e => e.chain().focus().toggleHeading({ level: 2 }).run())}>T</ToolbarButton>\n\n <span className=\"fk-rte-divider\" />\n\n <ToolbarButton label=\"Link\" active={editor.isActive('link')} onClick={handleSetLink}><LinkIcon /></ToolbarButton>\n <ToolbarButton label=\"Image\" onClick={() => imageInputRef.current?.click()}><ImageIcon /></ToolbarButton>\n <ToolbarButton label=\"Video\" onClick={() => videoInputRef.current?.click()}><VideoIcon /></ToolbarButton>\n <ToolbarButton label=\"Bullet list\" active={editor.isActive('bulletList')}\n onClick={() => run(e => e.chain().focus().toggleBulletList().run())}><BulletListIcon /></ToolbarButton>\n <ToolbarButton label=\"Numbered list\" active={editor.isActive('orderedList')}\n onClick={() => run(e => e.chain().focus().toggleOrderedList().run())}><NumberedListIcon /></ToolbarButton>\n\n <span className=\"fk-rte-divider\" />\n\n <ToolbarButton label=\"Quote\" active={editor.isActive('blockquote')} style={{ fontWeight: 800, fontSize: 14 }}\n onClick={() => run(e => e.chain().focus().toggleBlockquote().run())}>&quot;</ToolbarButton>\n <ToolbarButton label=\"Spoiler\" active={editor.isActive('spoiler')}\n onClick={() => run(e => e.chain().focus().toggleSpoiler().run())}><SpoilerIcon /></ToolbarButton>\n <ToolbarButton label=\"Inline code\" active={editor.isActive('code')} style={{ fontFamily: 'monospace', fontSize: 13 }}\n onClick={() => run(e => e.chain().focus().toggleCode().run())}>&lt;/&gt;</ToolbarButton>\n <ToolbarButton label=\"Code block\" active={editor.isActive('codeBlock')}\n onClick={() => run(e => e.chain().focus().toggleCodeBlock().run())}><CodeBlockIcon /></ToolbarButton>\n <ToolbarButton label=\"Table\" active={editor.isActive('table')}\n onClick={() => run(e => e.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run())}><TableIcon /></ToolbarButton>\n\n <div className=\"fk-rte-spacer\" />\n </div>\n\n <EditorContent editor={editor} className=\"fk-rte-content\" />\n\n <input\n ref={imageInputRef}\n type=\"file\"\n accept={IMAGE_ACCEPT}\n style={{ display: 'none' }}\n onChange={e => { void handleFileSelected('image', e.target.files?.[0]); e.target.value = ''; }}\n />\n <input\n ref={videoInputRef}\n type=\"file\"\n accept=\"video/*\"\n style={{ display: 'none' }}\n onChange={e => { void handleFileSelected('video', e.target.files?.[0]); e.target.value = ''; }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,cAAc;AACvB,SAAS,WAAW,qBAAkC;AAuEhD,SACE,KADF;AAjDS,SAAR,eAAgC,EAAE,SAAS,UAAU,SAAS,cAAc,eAAe,GAAwB;AACxH,QAAM,gBAAgB,OAAyB,IAAI;AACnD,QAAM,gBAAgB,OAAyB,IAAI;AAEnD,QAAM,SAAS,UAAU;AAAA,IACvB,YAAY;AAAA,IACZ;AAAA;AAAA;AAAA,IAGA,6BAA6B;AAAA,IAC7B,SAAS,EAAE,QAAAA,QAAO,GAAG;AACnB,eAAUA,QAAO,QAAmE,SAAS,YAAY,CAAC;AAAA,IAC5G;AAAA,EACF,CAAC;AAED,MAAI,CAAC,OAAQ,QAAO;AAEpB,WAAS,IAAI,IAA8B;AACzC,QAAI,OAAQ,IAAG,MAAM;A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