@hachej/boring-workspace 0.1.23 → 0.1.26
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/dist/{FileTree-D8Rmj8Bo.js → FileTree-BZGu5Ap6.js} +114 -104
- package/dist/{MarkdownEditor-DKC4gNT4.js → MarkdownEditor-DshmttZM.js} +9 -9
- package/dist/{WorkspaceLoadingState-hKrnYCL3.js → WorkspaceLoadingState-DVCLcOQu.js} +167 -146
- package/dist/WorkspaceProvider-DQ-325Qs.js +6367 -0
- package/dist/app-front.d.ts +114 -2
- package/dist/app-front.js +787 -333
- package/dist/app-server.d.ts +10 -3
- package/dist/app-server.js +744 -579
- package/dist/createInMemoryBridge--ZFPAgXy.d.ts +161 -0
- package/dist/events.d.ts +3 -0
- package/dist/{manifest-CyNNdfYz.d.ts → manifest-C2vVgH_e.d.ts} +2 -0
- package/dist/plugin.d.ts +8 -3
- package/dist/plugin.js +3 -2
- package/dist/server.d.ts +50 -70
- package/dist/server.js +192 -44
- package/dist/shared.d.ts +2 -2
- package/dist/{surface-COYagY2m.d.ts → surface-CEEkd81D.d.ts} +1 -0
- package/dist/testing.d.ts +1 -0
- package/dist/testing.js +409 -404
- package/dist/{ui-bridge-CT18yqwN.d.ts → ui-bridge-Bdgl2hR8.d.ts} +2 -0
- package/dist/workspace.css +73 -0
- package/dist/workspace.d.ts +228 -6
- package/dist/workspace.js +188 -179
- package/docs/INTERFACES.md +6 -0
- package/docs/plans/FULL_PAGE_PANEL_ROUTE_SPEC.md +633 -0
- package/package.json +6 -6
- package/dist/WorkspaceProvider-Cn0sPgaB.js +0 -5976
- package/dist/createInMemoryBridge-CYNW1h_o.d.ts +0 -61
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Tree as
|
|
4
|
-
import { FolderOpenIcon as
|
|
5
|
-
import {
|
|
6
|
-
import { Input as
|
|
7
|
-
import { c as
|
|
8
|
-
import { createDragDropManager as
|
|
9
|
-
import { HTML5Backend as
|
|
10
|
-
const
|
|
11
|
-
function
|
|
1
|
+
import { jsx as u, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as I, useEffect as y, useMemo as A, useCallback as k, createContext as _, useContext as z } from "react";
|
|
3
|
+
import { Tree as K } from "react-arborist";
|
|
4
|
+
import { FolderOpenIcon as S, FolderIcon as J, ChevronRightIcon as Q, Loader2Icon as U } from "lucide-react";
|
|
5
|
+
import { K as X } from "./WorkspaceProvider-DQ-325Qs.js";
|
|
6
|
+
import { Input as Y } from "@hachej/boring-ui-kit";
|
|
7
|
+
import { c as x } from "./utils-B6yFEsav.js";
|
|
8
|
+
import { createDragDropManager as Z } from "dnd-core";
|
|
9
|
+
import { HTML5Backend as $ } from "react-dnd-html5-backend";
|
|
10
|
+
const F = Symbol.for("@hachej/boring-workspace/file-tree-dnd-manager");
|
|
11
|
+
function E() {
|
|
12
12
|
const r = globalThis;
|
|
13
|
-
return r[
|
|
14
|
-
|
|
13
|
+
return r[F] ?? (r[F] = Z(
|
|
14
|
+
$,
|
|
15
15
|
typeof window > "u" ? void 0 : window
|
|
16
|
-
)), r[
|
|
16
|
+
)), r[F];
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const M = /* @__PURE__ */ new Set(), P = _({
|
|
19
19
|
onContextMenu: void 0,
|
|
20
20
|
editing: null,
|
|
21
|
-
pendingPaths:
|
|
21
|
+
pendingPaths: M,
|
|
22
22
|
onSubmitEdit: void 0,
|
|
23
23
|
onCancelEdit: void 0
|
|
24
24
|
});
|
|
25
|
-
function
|
|
25
|
+
function G({
|
|
26
26
|
initialValue: r,
|
|
27
27
|
onSubmit: p,
|
|
28
28
|
onCancel: h,
|
|
29
|
-
isDraft:
|
|
29
|
+
isDraft: f
|
|
30
30
|
}) {
|
|
31
|
-
const t =
|
|
32
|
-
|
|
31
|
+
const t = I(null), i = I(!1);
|
|
32
|
+
y(() => {
|
|
33
33
|
const e = t.current;
|
|
34
34
|
if (e)
|
|
35
|
-
if (e.focus(), !
|
|
35
|
+
if (e.focus(), !f && r.includes(".")) {
|
|
36
36
|
const o = r.lastIndexOf(".");
|
|
37
37
|
e.setSelectionRange(0, o);
|
|
38
38
|
} else
|
|
39
39
|
e.select();
|
|
40
|
-
}, [r,
|
|
40
|
+
}, [r, f]);
|
|
41
41
|
const d = () => {
|
|
42
42
|
var o;
|
|
43
|
-
if (
|
|
44
|
-
|
|
43
|
+
if (i.current) return;
|
|
44
|
+
i.current = !0;
|
|
45
45
|
const e = ((o = t.current) == null ? void 0 : o.value.trim()) ?? "";
|
|
46
46
|
!e || e === r ? h() : p(e);
|
|
47
47
|
};
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
|
|
48
|
+
return /* @__PURE__ */ u(
|
|
49
|
+
Y,
|
|
50
50
|
{
|
|
51
51
|
ref: t,
|
|
52
52
|
type: "text",
|
|
53
53
|
defaultValue: r,
|
|
54
54
|
"data-testid": "file-tree-edit-input",
|
|
55
|
-
"aria-label":
|
|
55
|
+
"aria-label": f ? "Name" : "Rename",
|
|
56
56
|
onPointerDown: (e) => e.stopPropagation(),
|
|
57
57
|
onClick: (e) => e.stopPropagation(),
|
|
58
58
|
onKeyDown: (e) => {
|
|
59
|
-
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), d()) : e.key === "Escape" && (e.preventDefault(),
|
|
59
|
+
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), d()) : e.key === "Escape" && (e.preventDefault(), i.current = !0, h());
|
|
60
60
|
},
|
|
61
61
|
onBlur: d,
|
|
62
62
|
className: "h-5 min-w-0 flex-1 rounded-sm border-[color:var(--accent)]/60 px-1 text-[13px] leading-[1.2] focus-visible:ring-[color:var(--accent)]"
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const { onContextMenu:
|
|
68
|
-
return /* @__PURE__ */
|
|
66
|
+
function H({ node: r, style: p, dragHandle: h }) {
|
|
67
|
+
const { onContextMenu: f, editing: t, pendingPaths: i, onSubmitEdit: d, onCancelEdit: e } = z(P), o = r.data, m = o.kind === "dir", l = (t == null ? void 0 : t.path) === o.path, b = i.has(o.path), w = m ? r.isOpen ? S : J : X(o.name || "untitled");
|
|
68
|
+
return /* @__PURE__ */ C(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
71
|
ref: h,
|
|
72
72
|
style: p,
|
|
73
|
-
className:
|
|
73
|
+
className: x(
|
|
74
74
|
"group relative mx-1 flex items-center gap-1.5 rounded-md px-2 py-0.5 text-[13px] leading-[1.4] cursor-pointer select-none text-foreground",
|
|
75
75
|
"transition-colors duration-150 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
76
76
|
!l && "hover:bg-foreground/[0.04]",
|
|
@@ -78,52 +78,52 @@ function E({ node: r, style: p, dragHandle: h }) {
|
|
|
78
78
|
r.willReceiveDrop && "bg-foreground/5 outline outline-1 outline-border"
|
|
79
79
|
),
|
|
80
80
|
onClick: (s) => {
|
|
81
|
-
l || (s.stopPropagation(),
|
|
81
|
+
l || (s.stopPropagation(), m ? r.toggle() : (r.select(), r.activate()));
|
|
82
82
|
},
|
|
83
83
|
onContextMenu: (s) => {
|
|
84
|
-
l || o.isDraft || (s.preventDefault(), s.stopPropagation(),
|
|
84
|
+
l || o.isDraft || (s.preventDefault(), s.stopPropagation(), f == null || f(s, o));
|
|
85
85
|
},
|
|
86
86
|
children: [
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
m ? /* @__PURE__ */ u(
|
|
88
|
+
Q,
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
90
|
+
className: x(
|
|
91
91
|
"h-3 w-3 shrink-0 text-muted-foreground/70 transition-transform duration-150 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
92
92
|
r.isOpen && "rotate-90"
|
|
93
93
|
),
|
|
94
94
|
strokeWidth: 2
|
|
95
95
|
}
|
|
96
|
-
) : /* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
96
|
+
) : /* @__PURE__ */ u("span", { className: "w-3 shrink-0" }),
|
|
97
|
+
/* @__PURE__ */ u(
|
|
98
|
+
w,
|
|
99
99
|
{
|
|
100
|
-
className:
|
|
100
|
+
className: x(
|
|
101
101
|
"h-4 w-4 shrink-0",
|
|
102
102
|
r.isSelected ? "text-[color:var(--accent)]" : "text-muted-foreground/80"
|
|
103
103
|
),
|
|
104
104
|
strokeWidth: 1.5
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
|
-
l ? /* @__PURE__ */
|
|
108
|
-
|
|
107
|
+
l ? /* @__PURE__ */ u(
|
|
108
|
+
G,
|
|
109
109
|
{
|
|
110
110
|
initialValue: (t == null ? void 0 : t.initialValue) ?? o.name ?? "",
|
|
111
111
|
isDraft: !!(t != null && t.isDraft),
|
|
112
112
|
onSubmit: (s) => d == null ? void 0 : d(o.path, s),
|
|
113
113
|
onCancel: () => e == null ? void 0 : e()
|
|
114
114
|
}
|
|
115
|
-
) : /* @__PURE__ */
|
|
115
|
+
) : /* @__PURE__ */ u(
|
|
116
116
|
"span",
|
|
117
117
|
{
|
|
118
|
-
className:
|
|
118
|
+
className: x(
|
|
119
119
|
"truncate",
|
|
120
|
-
|
|
120
|
+
b && "text-muted-foreground italic"
|
|
121
121
|
),
|
|
122
122
|
children: o.name
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
b && !l && /* @__PURE__ */ u(
|
|
126
|
+
U,
|
|
127
127
|
{
|
|
128
128
|
"data-testid": "file-tree-pending-spinner",
|
|
129
129
|
"aria-label": "Pending",
|
|
@@ -135,67 +135,77 @@ function E({ node: r, style: p, dragHandle: h }) {
|
|
|
135
135
|
}
|
|
136
136
|
);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function ce({
|
|
139
139
|
files: r,
|
|
140
140
|
selectedPath: p,
|
|
141
141
|
searchQuery: h,
|
|
142
|
-
height:
|
|
142
|
+
height: f = 400,
|
|
143
143
|
editing: t,
|
|
144
|
-
revealPath:
|
|
144
|
+
revealPath: i,
|
|
145
145
|
pendingPaths: d,
|
|
146
146
|
onSelect: e,
|
|
147
147
|
onExpand: o,
|
|
148
|
-
onCollapse:
|
|
148
|
+
onCollapse: m,
|
|
149
149
|
onContextMenu: l,
|
|
150
|
-
onSubmitEdit:
|
|
151
|
-
onCancelEdit:
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
onSubmitEdit: b,
|
|
151
|
+
onCancelEdit: w,
|
|
152
|
+
onRevealHandled: s,
|
|
153
|
+
onDragDrop: T,
|
|
154
|
+
className: D
|
|
154
155
|
}) {
|
|
155
|
-
const
|
|
156
|
-
|
|
156
|
+
const v = I(null);
|
|
157
|
+
y(() => {
|
|
157
158
|
if (!(t != null && t.isDraft)) return;
|
|
158
159
|
const n = requestAnimationFrame(() => {
|
|
159
160
|
var a;
|
|
160
|
-
(a =
|
|
161
|
+
(a = v.current) == null || a.scrollTo(t.path);
|
|
161
162
|
});
|
|
162
163
|
return () => cancelAnimationFrame(n);
|
|
163
|
-
}, [t == null ? void 0 : t.isDraft, t == null ? void 0 : t.path]),
|
|
164
|
-
if (!
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
}, [t == null ? void 0 : t.isDraft, t == null ? void 0 : t.path]), y(() => {
|
|
165
|
+
if (!i) return;
|
|
166
|
+
let n = 0;
|
|
167
|
+
const a = requestAnimationFrame(() => {
|
|
168
|
+
const c = v.current;
|
|
169
|
+
if (!c) return;
|
|
170
|
+
c.openParents(i);
|
|
171
|
+
const N = c.get(i);
|
|
172
|
+
N && (N.isInternal && N.open(), n = requestAnimationFrame(() => {
|
|
173
|
+
var g;
|
|
174
|
+
(g = v.current) == null || g.scrollTo(i), s == null || s(i);
|
|
175
|
+
}));
|
|
168
176
|
});
|
|
169
|
-
return () =>
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
return () => {
|
|
178
|
+
cancelAnimationFrame(a), cancelAnimationFrame(n);
|
|
179
|
+
};
|
|
180
|
+
}, [r, s, i]);
|
|
181
|
+
const O = A(
|
|
172
182
|
() => p || void 0,
|
|
173
183
|
[p]
|
|
174
|
-
),
|
|
184
|
+
), R = k(
|
|
175
185
|
(n) => {
|
|
176
186
|
n.data.kind === "file" && (e == null || e(n.data.path));
|
|
177
187
|
},
|
|
178
188
|
[e]
|
|
179
|
-
),
|
|
189
|
+
), W = k(
|
|
180
190
|
(n) => {
|
|
181
|
-
var
|
|
182
|
-
const a = (
|
|
183
|
-
a && (a.isOpen ? o == null || o(a.data.path) :
|
|
191
|
+
var c;
|
|
192
|
+
const a = (c = v.current) == null ? void 0 : c.get(n);
|
|
193
|
+
a && (a.isOpen ? o == null || o(a.data.path) : m == null || m(a.data.path));
|
|
184
194
|
},
|
|
185
|
-
[o,
|
|
186
|
-
),
|
|
195
|
+
[o, m]
|
|
196
|
+
), j = k(
|
|
187
197
|
(n) => {
|
|
188
|
-
if (!
|
|
189
|
-
const a = !n.parentNode || n.parentNode.isRoot,
|
|
198
|
+
if (!T) return;
|
|
199
|
+
const a = !n.parentNode || n.parentNode.isRoot, c = a ? "." : n.parentNode.data.path;
|
|
190
200
|
if (!(!a && n.parentNode.data.kind !== "dir"))
|
|
191
|
-
for (const
|
|
192
|
-
const
|
|
193
|
-
if (
|
|
194
|
-
|
|
201
|
+
for (const N of n.dragNodes) {
|
|
202
|
+
const g = N.data.path;
|
|
203
|
+
if (c === g || c !== "." && c.startsWith(g + "/")) return;
|
|
204
|
+
T(g, c);
|
|
195
205
|
}
|
|
196
206
|
},
|
|
197
|
-
[
|
|
198
|
-
),
|
|
207
|
+
[T]
|
|
208
|
+
), L = k(
|
|
199
209
|
(n) => {
|
|
200
210
|
if (!n.parentNode || n.parentNode.isRoot) return !1;
|
|
201
211
|
if (n.parentNode.data.kind !== "dir") return !0;
|
|
@@ -204,53 +214,53 @@ function ie({
|
|
|
204
214
|
return !1;
|
|
205
215
|
},
|
|
206
216
|
[]
|
|
207
|
-
),
|
|
217
|
+
), q = k(
|
|
208
218
|
(n, a) => n.data.name.toLowerCase().includes(a.toLowerCase()),
|
|
209
219
|
[]
|
|
210
|
-
),
|
|
220
|
+
), B = A(
|
|
211
221
|
() => ({
|
|
212
222
|
onContextMenu: l,
|
|
213
223
|
editing: t ?? null,
|
|
214
|
-
pendingPaths: d ??
|
|
215
|
-
onSubmitEdit:
|
|
216
|
-
onCancelEdit:
|
|
224
|
+
pendingPaths: d ?? M,
|
|
225
|
+
onSubmitEdit: b,
|
|
226
|
+
onCancelEdit: w
|
|
217
227
|
}),
|
|
218
|
-
[l, t, d,
|
|
228
|
+
[l, t, d, b, w]
|
|
219
229
|
);
|
|
220
|
-
return r.length === 0 ? /* @__PURE__ */
|
|
230
|
+
return r.length === 0 ? /* @__PURE__ */ u(
|
|
221
231
|
"div",
|
|
222
232
|
{
|
|
223
|
-
className:
|
|
233
|
+
className: x(
|
|
224
234
|
"flex h-full items-center justify-center text-sm text-muted-foreground",
|
|
225
|
-
|
|
235
|
+
D
|
|
226
236
|
),
|
|
227
237
|
children: "No files"
|
|
228
238
|
}
|
|
229
|
-
) : /* @__PURE__ */
|
|
230
|
-
|
|
239
|
+
) : /* @__PURE__ */ u(P.Provider, { value: B, children: /* @__PURE__ */ u("div", { "data-boring-workspace-part": "file-tree", className: x("file-tree", D), children: /* @__PURE__ */ u(
|
|
240
|
+
K,
|
|
231
241
|
{
|
|
232
|
-
ref:
|
|
242
|
+
ref: v,
|
|
233
243
|
data: r,
|
|
234
244
|
idAccessor: "path",
|
|
235
245
|
childrenAccessor: "children",
|
|
236
246
|
openByDefault: !1,
|
|
237
247
|
width: "100%",
|
|
238
|
-
height:
|
|
248
|
+
height: f,
|
|
239
249
|
rowHeight: 26,
|
|
240
250
|
indent: 14,
|
|
241
|
-
selection:
|
|
251
|
+
selection: O,
|
|
242
252
|
searchTerm: h ?? "",
|
|
243
|
-
searchMatch:
|
|
244
|
-
onActivate:
|
|
245
|
-
onToggle:
|
|
246
|
-
onMove:
|
|
247
|
-
disableDrop:
|
|
253
|
+
searchMatch: q,
|
|
254
|
+
onActivate: R,
|
|
255
|
+
onToggle: W,
|
|
256
|
+
onMove: j,
|
|
257
|
+
disableDrop: L,
|
|
248
258
|
disableEdit: !0,
|
|
249
|
-
dndManager:
|
|
250
|
-
children:
|
|
259
|
+
dndManager: E(),
|
|
260
|
+
children: H
|
|
251
261
|
}
|
|
252
262
|
) }) });
|
|
253
263
|
}
|
|
254
264
|
export {
|
|
255
|
-
|
|
265
|
+
ce as FileTree
|
|
256
266
|
};
|
|
@@ -4,7 +4,7 @@ import { ReactNodeViewRenderer as Z, NodeViewWrapper as G, useEditor as J, Edito
|
|
|
4
4
|
import et from "@tiptap/starter-kit";
|
|
5
5
|
import rt from "@tiptap/extension-underline";
|
|
6
6
|
import it from "@tiptap/extension-link";
|
|
7
|
-
import
|
|
7
|
+
import q from "@tiptap/extension-placeholder";
|
|
8
8
|
import nt from "@tiptap/extension-task-list";
|
|
9
9
|
import at from "@tiptap/extension-task-item";
|
|
10
10
|
import ot from "@tiptap/extension-text-align";
|
|
@@ -15,15 +15,15 @@ import { TableHeader as ut } from "@tiptap/extension-table-header";
|
|
|
15
15
|
import { TableCell as gt } from "@tiptap/extension-table-cell";
|
|
16
16
|
import dt from "@tiptap/extension-image";
|
|
17
17
|
import { c as U } from "./utils-B6yFEsav.js";
|
|
18
|
-
import {
|
|
18
|
+
import { _ as j, aq as _ } from "./WorkspaceProvider-DQ-325Qs.js";
|
|
19
19
|
import { uploadFile as ft } from "@hachej/boring-agent/front";
|
|
20
20
|
import mt from "@tiptap/extension-code-block-lowlight";
|
|
21
21
|
import { createLowlight as pt, common as ht } from "lowlight";
|
|
22
22
|
import { Markdown as wt } from "@tiptap/markdown";
|
|
23
23
|
import { BoldIcon as kt, ItalicIcon as vt, UnderlineIcon as bt, StrikethroughIcon as It, Heading1Icon as At, Heading2Icon as yt, Heading3Icon as Lt, ListIcon as xt, ListOrderedIcon as Nt, ListChecksIcon as Ct, QuoteIcon as Tt, CodeIcon as Mt, LinkIcon as Rt, ImageIcon as Ht, HighlighterIcon as Ut, AlignLeftIcon as St, AlignCenterIcon as $t, AlignRightIcon as Bt, MinusIcon as Dt, Loader2Icon as Et } from "lucide-react";
|
|
24
24
|
import { Toolbar as Ft, Input as zt, ToolbarButton as Wt, ToolbarSeparator as Pt } from "@hachej/boring-ui-kit";
|
|
25
|
-
function
|
|
26
|
-
const r =
|
|
25
|
+
function qt(t) {
|
|
26
|
+
const r = j(), i = _(), [a, s] = E(0);
|
|
27
27
|
return { upload: K(
|
|
28
28
|
async (g, o) => {
|
|
29
29
|
s((p) => p + 1);
|
|
@@ -42,7 +42,7 @@ function jt(t) {
|
|
|
42
42
|
), uploading: a > 0 };
|
|
43
43
|
}
|
|
44
44
|
const F = 64, z = 2e3;
|
|
45
|
-
function
|
|
45
|
+
function jt(t) {
|
|
46
46
|
return t.replace(/\\/g, "\\\\").replace(/]/g, "\\]");
|
|
47
47
|
}
|
|
48
48
|
function B(t) {
|
|
@@ -75,7 +75,7 @@ const O = dt.extend({
|
|
|
75
75
|
var y, b, A, n, c, k, I;
|
|
76
76
|
const r = typeof ((y = t.attrs) == null ? void 0 : y.src) == "string" ? t.attrs.src : "", i = typeof ((b = t.attrs) == null ? void 0 : b.alt) == "string" ? t.attrs.alt : "", a = typeof ((A = t.attrs) == null ? void 0 : A.title) == "string" ? t.attrs.title : "", s = W((n = t.attrs) == null ? void 0 : n.width), l = W((c = t.attrs) == null ? void 0 : c.height), g = ((k = t.attrs) == null ? void 0 : k.align) === "center" || ((I = t.attrs) == null ? void 0 : I.align) === "right" ? t.attrs.align : "left";
|
|
77
77
|
if (!s && !l && g === "left") {
|
|
78
|
-
const h =
|
|
78
|
+
const h = jt(i);
|
|
79
79
|
return a ? `}")` : ``;
|
|
80
80
|
}
|
|
81
81
|
const p = `<img ${[
|
|
@@ -235,7 +235,7 @@ const Gt = [
|
|
|
235
235
|
defaultProtocol: "https",
|
|
236
236
|
HTMLAttributes: { rel: "noopener noreferrer nofollow", target: "_blank" }
|
|
237
237
|
}),
|
|
238
|
-
|
|
238
|
+
q.configure({
|
|
239
239
|
placeholder: "Start writing..."
|
|
240
240
|
}),
|
|
241
241
|
nt,
|
|
@@ -436,7 +436,7 @@ function xe({
|
|
|
436
436
|
className: s,
|
|
437
437
|
documentPath: l
|
|
438
438
|
}) {
|
|
439
|
-
const g =
|
|
439
|
+
const g = j(), o = _(), { upload: p, uploading: y } = qt(), [b, A] = E(!1), n = Q(() => {
|
|
440
440
|
const d = O.configure({
|
|
441
441
|
inline: !1,
|
|
442
442
|
allowBase64: !0,
|
|
@@ -444,7 +444,7 @@ function xe({
|
|
|
444
444
|
}), m = Gt.map((w) => w.name === "image" ? d : w);
|
|
445
445
|
return a ? [
|
|
446
446
|
...m.filter((w) => w.name !== "placeholder"),
|
|
447
|
-
|
|
447
|
+
q.configure({ placeholder: a })
|
|
448
448
|
] : m;
|
|
449
449
|
}, [g, l, a, o]), c = L(r);
|
|
450
450
|
c.current = r;
|