@particle-academy/react-fancy 5.38.0 → 5.40.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.
- package/CHANGELOG.md +76 -0
- package/dist/{index-CazpqSsk.d.ts → Composer.types-CuSPnaOt.d.cts} +1 -4
- package/dist/{index-CazpqSsk.d.cts → Composer.types-CuSPnaOt.d.ts} +1 -4
- package/dist/{chunk-Z4GO6N6N.js → chunk-2JOWGYAJ.js} +322 -408
- package/dist/chunk-2JOWGYAJ.js.map +1 -0
- package/dist/{chunk-TZHK3LEW.cjs → chunk-35TZQIIN.cjs} +17 -8
- package/dist/chunk-35TZQIIN.cjs.map +1 -0
- package/dist/{chunk-RYKPYILS.cjs → chunk-6TZPM43Q.cjs} +325 -408
- package/dist/chunk-6TZPM43Q.cjs.map +1 -0
- package/dist/chunk-BZOU7VJQ.cjs +231 -0
- package/dist/chunk-BZOU7VJQ.cjs.map +1 -0
- package/dist/{chunk-QLL7MWAU.cjs → chunk-FJ2GMQLC.cjs} +116 -26
- package/dist/chunk-FJ2GMQLC.cjs.map +1 -0
- package/dist/{chunk-YCV43A7D.js → chunk-H6WSJL2X.js} +17 -8
- package/dist/chunk-H6WSJL2X.js.map +1 -0
- package/dist/chunk-MXAVGOHW.js +229 -0
- package/dist/chunk-MXAVGOHW.js.map +1 -0
- package/dist/{chunk-WUV3XDJH.js → chunk-YLPVTEUH.js} +117 -27
- package/dist/chunk-YLPVTEUH.js.map +1 -0
- package/dist/command.cjs +4 -3
- package/dist/command.d.cts +12 -1
- package/dist/command.d.ts +12 -1
- package/dist/command.js +2 -1
- package/dist/composer.cjs +4 -3
- package/dist/composer.d.cts +7 -2
- package/dist/composer.d.ts +7 -2
- package/dist/composer.js +2 -1
- package/dist/{index-DXUAAZzE.d.ts → index-BsIBOwaK.d.cts} +46 -1
- package/dist/{index-DXUAAZzE.d.cts → index-S4FC1yFK.d.ts} +46 -1
- package/dist/index.cjs +13 -12
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -3
- package/dist/prompt-input.cjs +4 -2
- package/dist/prompt-input.d.cts +2 -1
- package/dist/prompt-input.d.ts +2 -1
- package/dist/prompt-input.js +3 -1
- package/package.json +1 -1
- package/dist/chunk-QLL7MWAU.cjs.map +0 -1
- package/dist/chunk-RYKPYILS.cjs.map +0 -1
- package/dist/chunk-TZHK3LEW.cjs.map +0 -1
- package/dist/chunk-WUV3XDJH.js.map +0 -1
- package/dist/chunk-YCV43A7D.js.map +0 -1
- package/dist/chunk-Z4GO6N6N.js.map +0 -1
|
@@ -4,9 +4,37 @@ var chunkX7H75WVP_cjs = require('./chunk-X7H75WVP.cjs');
|
|
|
4
4
|
var chunkSNHU2AI4_cjs = require('./chunk-SNHU2AI4.cjs');
|
|
5
5
|
var chunkZU5Q77OT_cjs = require('./chunk-ZU5Q77OT.cjs');
|
|
6
6
|
var react = require('react');
|
|
7
|
-
var reactDom = require('react-dom');
|
|
8
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var reactDom = require('react-dom');
|
|
9
9
|
|
|
10
|
+
// src/components/Composer/paste-markers.ts
|
|
11
|
+
var PILL_MARK = "\uFFFC";
|
|
12
|
+
var MARKER = /\uFFFC([^\uFFFC\n]+)\uFFFC/g;
|
|
13
|
+
function pasteMarker(id) {
|
|
14
|
+
return `${PILL_MARK}${id}${PILL_MARK}`;
|
|
15
|
+
}
|
|
16
|
+
function segmentValue(value, known) {
|
|
17
|
+
const out = [];
|
|
18
|
+
let last = 0;
|
|
19
|
+
for (const match of value.matchAll(MARKER)) {
|
|
20
|
+
const id = match[1];
|
|
21
|
+
if (!known.has(id)) continue;
|
|
22
|
+
const start = match.index ?? 0;
|
|
23
|
+
if (start > last) out.push({ type: "text", text: value.slice(last, start) });
|
|
24
|
+
out.push({ type: "pill", id });
|
|
25
|
+
last = start + match[0].length;
|
|
26
|
+
}
|
|
27
|
+
if (last < value.length) out.push({ type: "text", text: value.slice(last) });
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
function markedIds(value) {
|
|
31
|
+
return Array.from(value.matchAll(MARKER), (m) => m[1]);
|
|
32
|
+
}
|
|
33
|
+
function expandMarkers(value, pastes, images) {
|
|
34
|
+
const text = new Map(pastes.map((p) => [p.id, p.text]));
|
|
35
|
+
const image = new Map(images.map((i) => [i.id, `[${i.label}]`]));
|
|
36
|
+
return value.replace(MARKER, (whole, id) => text.get(id) ?? image.get(id) ?? whole);
|
|
37
|
+
}
|
|
10
38
|
function usePastePills({
|
|
11
39
|
threshold,
|
|
12
40
|
heldPastes: controlledHeldPastes,
|
|
@@ -57,34 +85,67 @@ function usePastePills({
|
|
|
57
85
|
const clear = react.useCallback(() => setHeldPastes([]), [setHeldPastes]);
|
|
58
86
|
return { heldPastes, handlePaste, hold, expand, remove, clear };
|
|
59
87
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var PILL_MARK = "\uFFFC";
|
|
63
|
-
var MARKER = /\uFFFC([^\uFFFC\n]+)\uFFFC/g;
|
|
64
|
-
function pasteMarker(id) {
|
|
65
|
-
return `${PILL_MARK}${id}${PILL_MARK}`;
|
|
88
|
+
function withSeparators(n) {
|
|
89
|
+
return String(n).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
66
90
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for (const match of value.matchAll(MARKER)) {
|
|
71
|
-
const id = match[1];
|
|
72
|
-
if (!known.has(id)) continue;
|
|
73
|
-
const start = match.index ?? 0;
|
|
74
|
-
if (start > last) out.push({ type: "text", text: value.slice(last, start) });
|
|
75
|
-
out.push({ type: "pill", id });
|
|
76
|
-
last = start + match[0].length;
|
|
77
|
-
}
|
|
78
|
-
if (last < value.length) out.push({ type: "text", text: value.slice(last) });
|
|
79
|
-
return out;
|
|
91
|
+
function endsOf(text, chars) {
|
|
92
|
+
if (text.length <= chars * 2) return text;
|
|
93
|
+
return `${text.slice(0, chars)} \u2026 ${text.slice(-chars)}`;
|
|
80
94
|
}
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
var PILL_BASE = "inline-flex select-none items-center rounded-md px-2 py-0.5 text-xs leading-5 transition-colors";
|
|
96
|
+
var TEXT_PILL = "cursor-pointer bg-zinc-100 text-zinc-700 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-200 dark:hover:bg-zinc-700";
|
|
97
|
+
var IMAGE_PILL = "bg-rose-100 font-medium text-rose-600 dark:bg-rose-500/20 dark:text-rose-300";
|
|
98
|
+
var PREVIEW_BASE = "max-w-xs whitespace-pre-wrap break-all text-xs";
|
|
99
|
+
function ImageThumb({ file }) {
|
|
100
|
+
const [url, setUrl] = react.useState(null);
|
|
101
|
+
react.useEffect(() => {
|
|
102
|
+
if (typeof URL.createObjectURL !== "function") return;
|
|
103
|
+
const made = URL.createObjectURL(file);
|
|
104
|
+
setUrl(made);
|
|
105
|
+
return () => URL.revokeObjectURL(made);
|
|
106
|
+
}, [file]);
|
|
107
|
+
return url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: url, alt: "", className: "max-h-40 max-w-[16rem] rounded" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: file.name });
|
|
83
108
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
109
|
+
function InlinePill({
|
|
110
|
+
preview,
|
|
111
|
+
previewChars,
|
|
112
|
+
renderPastePreview,
|
|
113
|
+
classNames,
|
|
114
|
+
disabled,
|
|
115
|
+
onExpand
|
|
116
|
+
}) {
|
|
117
|
+
const id = preview.kind === "text" ? preview.paste.id : preview.image.id;
|
|
118
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx("span", { "data-react-fancy-composer-paste-pill-preview": id, children: renderPastePreview?.(preview) ?? (preview.kind === "text" ? endsOf(preview.paste.text, previewChars) : /* @__PURE__ */ jsxRuntime.jsx(ImageThumb, { file: preview.image.file })) });
|
|
119
|
+
const tooltipClass = chunkZU5Q77OT_cjs.cn(PREVIEW_BASE, classNames?.preview);
|
|
120
|
+
if (preview.kind === "image") {
|
|
121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkX7H75WVP_cjs.Tooltip, { content, className: tooltipClass, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
122
|
+
"span",
|
|
123
|
+
{
|
|
124
|
+
"data-react-fancy-composer-image-pill": id,
|
|
125
|
+
role: "img",
|
|
126
|
+
"aria-label": preview.image.label,
|
|
127
|
+
className: chunkZU5Q77OT_cjs.cn(PILL_BASE, IMAGE_PILL, classNames?.pill, classNames?.imagePill),
|
|
128
|
+
children: preview.image.label
|
|
129
|
+
}
|
|
130
|
+
) });
|
|
131
|
+
}
|
|
132
|
+
const count = withSeparators(preview.paste.text.length);
|
|
133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkX7H75WVP_cjs.Tooltip, { content, className: tooltipClass, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
134
|
+
"button",
|
|
135
|
+
{
|
|
136
|
+
type: "button",
|
|
137
|
+
"data-react-fancy-composer-paste-pill": id,
|
|
138
|
+
onClick: () => onExpand(id),
|
|
139
|
+
disabled,
|
|
140
|
+
"aria-label": `Insert this pasted text, ${count} characters`,
|
|
141
|
+
className: chunkZU5Q77OT_cjs.cn(PILL_BASE, TEXT_PILL, classNames?.pill, classNames?.textPill),
|
|
142
|
+
children: [
|
|
143
|
+
"Pasted text \xB7 ",
|
|
144
|
+
count,
|
|
145
|
+
" characters"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
) });
|
|
88
149
|
}
|
|
89
150
|
var HOST_ATTR = "data-react-fancy-composer-paste-host";
|
|
90
151
|
function serialize(parent, keep) {
|
|
@@ -134,8 +195,60 @@ function placeCaretAfter(node) {
|
|
|
134
195
|
selection.removeAllRanges();
|
|
135
196
|
selection.addRange(range);
|
|
136
197
|
}
|
|
198
|
+
function placeCaretAtOffset(root, offset, keep) {
|
|
199
|
+
const selection = window.getSelection();
|
|
200
|
+
if (!selection) return;
|
|
201
|
+
const range = document.createRange();
|
|
202
|
+
let remaining = offset;
|
|
203
|
+
let placed = false;
|
|
204
|
+
for (const node of Array.from(root.childNodes)) {
|
|
205
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
206
|
+
const length = node.textContent?.length ?? 0;
|
|
207
|
+
if (remaining <= length) {
|
|
208
|
+
range.setStart(node, remaining);
|
|
209
|
+
placed = true;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
remaining -= length;
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
const id = node instanceof HTMLElement ? node.getAttribute(HOST_ATTR) : null;
|
|
216
|
+
if (id !== null && keep(id)) {
|
|
217
|
+
const length = pasteMarker(id).length;
|
|
218
|
+
if (remaining < length) {
|
|
219
|
+
range.setStartAfter(node);
|
|
220
|
+
placed = true;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
remaining -= length;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (!placed) {
|
|
227
|
+
range.selectNodeContents(root);
|
|
228
|
+
range.collapse(false);
|
|
229
|
+
const last = root.lastChild;
|
|
230
|
+
if (last instanceof HTMLElement && last.tagName === "BR") range.setStartBefore(last);
|
|
231
|
+
}
|
|
232
|
+
range.collapse(true);
|
|
233
|
+
selection.removeAllRanges();
|
|
234
|
+
selection.addRange(range);
|
|
235
|
+
}
|
|
137
236
|
var InlinePasteEditor = react.forwardRef(
|
|
138
|
-
function InlinePasteEditor2({
|
|
237
|
+
function InlinePasteEditor2({
|
|
238
|
+
value,
|
|
239
|
+
known,
|
|
240
|
+
onChange,
|
|
241
|
+
onSubmit,
|
|
242
|
+
onPaste,
|
|
243
|
+
onHostsChange,
|
|
244
|
+
placeholder,
|
|
245
|
+
disabled,
|
|
246
|
+
className,
|
|
247
|
+
submitKey = "enter",
|
|
248
|
+
onKeyDown,
|
|
249
|
+
placeholderClassName,
|
|
250
|
+
maxHeight
|
|
251
|
+
}, ref) {
|
|
139
252
|
const rootRef = react.useRef(null);
|
|
140
253
|
const lastValue = react.useRef(null);
|
|
141
254
|
const pending = react.useRef(/* @__PURE__ */ new Set());
|
|
@@ -155,17 +268,47 @@ var InlinePasteEditor = react.forwardRef(
|
|
|
155
268
|
});
|
|
156
269
|
onHostsChange(hosts);
|
|
157
270
|
}, [keep, onHostsChange]);
|
|
271
|
+
const caretOffset = react.useCallback(
|
|
272
|
+
(whole) => {
|
|
273
|
+
const root = rootRef.current;
|
|
274
|
+
const selection = window.getSelection();
|
|
275
|
+
if (!root || !selection || selection.rangeCount === 0) return whole.length;
|
|
276
|
+
const range = selection.getRangeAt(0);
|
|
277
|
+
if (!root.contains(range.endContainer)) return whole.length;
|
|
278
|
+
const head = document.createRange();
|
|
279
|
+
head.selectNodeContents(root);
|
|
280
|
+
head.setEnd(range.endContainer, range.endOffset);
|
|
281
|
+
return serialize(head.cloneContents(), keep).length;
|
|
282
|
+
},
|
|
283
|
+
[keep]
|
|
284
|
+
);
|
|
158
285
|
const emit = react.useCallback(() => {
|
|
159
286
|
const root = rootRef.current;
|
|
160
287
|
if (!root) return;
|
|
161
288
|
const next = serialize(root, keep);
|
|
162
289
|
ensureTrailingBreak(root, next);
|
|
163
290
|
reportHosts();
|
|
164
|
-
|
|
291
|
+
lastValue.current = next;
|
|
292
|
+
onChange(next, caretOffset(next));
|
|
293
|
+
}, [keep, onChange, reportHosts, caretOffset]);
|
|
294
|
+
const render = react.useCallback(
|
|
295
|
+
(next) => {
|
|
296
|
+
const root = rootRef.current;
|
|
297
|
+
if (!root) return;
|
|
298
|
+
root.replaceChildren();
|
|
299
|
+
for (const segment of segmentValue(next, knownRef.current)) {
|
|
300
|
+
if (segment.type === "text") {
|
|
301
|
+
root.append(document.createTextNode(segment.text));
|
|
302
|
+
} else {
|
|
303
|
+
root.append(makeHost(segment.id));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
ensureTrailingBreak(root, next);
|
|
165
307
|
lastValue.current = next;
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
308
|
+
reportHosts();
|
|
309
|
+
},
|
|
310
|
+
[reportHosts]
|
|
311
|
+
);
|
|
169
312
|
const caret = react.useCallback(() => {
|
|
170
313
|
const root = rootRef.current;
|
|
171
314
|
const selection = window.getSelection();
|
|
@@ -218,18 +361,8 @@ var InlinePasteEditor = react.forwardRef(
|
|
|
218
361
|
const wanted = segmentValue(value, known).flatMap((s) => s.type === "pill" ? [s.id] : []).join(PILL_MARK);
|
|
219
362
|
const onScreen = Array.from(root.querySelectorAll(`[${HOST_ATTR}]`)).map((el) => el.getAttribute(HOST_ATTR)).filter((id) => id !== null && keep(id)).join(PILL_MARK);
|
|
220
363
|
if (value === lastValue.current && wanted === onScreen) return;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (segment.type === "text") {
|
|
224
|
-
root.append(document.createTextNode(segment.text));
|
|
225
|
-
} else {
|
|
226
|
-
root.append(makeHost(segment.id));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
ensureTrailingBreak(root, value);
|
|
230
|
-
lastValue.current = value;
|
|
231
|
-
reportHosts();
|
|
232
|
-
}, [value, known, keep, reportHosts]);
|
|
364
|
+
render(value);
|
|
365
|
+
}, [value, known, keep, render]);
|
|
233
366
|
react.useImperativeHandle(
|
|
234
367
|
ref,
|
|
235
368
|
() => ({
|
|
@@ -253,9 +386,17 @@ var InlinePasteEditor = react.forwardRef(
|
|
|
253
386
|
root.focus();
|
|
254
387
|
placeCaretAfter(node);
|
|
255
388
|
emit();
|
|
389
|
+
},
|
|
390
|
+
setValue(next, offset) {
|
|
391
|
+
const root = rootRef.current;
|
|
392
|
+
if (!root) return;
|
|
393
|
+
render(next);
|
|
394
|
+
root.focus();
|
|
395
|
+
placeCaretAtOffset(root, offset, keep);
|
|
396
|
+
emit();
|
|
256
397
|
}
|
|
257
398
|
}),
|
|
258
|
-
[caret, emit]
|
|
399
|
+
[caret, emit, render, keep]
|
|
259
400
|
);
|
|
260
401
|
const handlePaste = (e) => {
|
|
261
402
|
e.preventDefault();
|
|
@@ -284,12 +425,15 @@ var InlinePasteEditor = react.forwardRef(
|
|
|
284
425
|
});
|
|
285
426
|
};
|
|
286
427
|
const handleKeyDown = (e) => {
|
|
428
|
+
onKeyDown?.(e);
|
|
429
|
+
if (e.defaultPrevented) return;
|
|
287
430
|
if (e.key !== "Enter" || e.nativeEvent.isComposing) return;
|
|
288
431
|
e.preventDefault();
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
} else {
|
|
432
|
+
const sends = submitKey === "mod-enter" ? e.ctrlKey || e.metaKey : !e.shiftKey;
|
|
433
|
+
if (sends) {
|
|
292
434
|
onSubmit();
|
|
435
|
+
} else {
|
|
436
|
+
insertText("\n");
|
|
293
437
|
}
|
|
294
438
|
};
|
|
295
439
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
@@ -297,7 +441,10 @@ var InlinePasteEditor = react.forwardRef(
|
|
|
297
441
|
"span",
|
|
298
442
|
{
|
|
299
443
|
"aria-hidden": "true",
|
|
300
|
-
className:
|
|
444
|
+
className: chunkZU5Q77OT_cjs.cn(
|
|
445
|
+
"pointer-events-none absolute left-4 top-3 text-sm text-zinc-400",
|
|
446
|
+
placeholderClassName
|
|
447
|
+
),
|
|
301
448
|
children: placeholder
|
|
302
449
|
}
|
|
303
450
|
),
|
|
@@ -315,6 +462,7 @@ var InlinePasteEditor = react.forwardRef(
|
|
|
315
462
|
onInput: emit,
|
|
316
463
|
onPaste: handlePaste,
|
|
317
464
|
onKeyDown: handleKeyDown,
|
|
465
|
+
style: maxHeight === void 0 ? void 0 : { maxHeight },
|
|
318
466
|
className: chunkZU5Q77OT_cjs.cn(
|
|
319
467
|
"max-h-72 min-h-[4.5rem] w-full overflow-y-auto whitespace-pre-wrap break-words bg-transparent px-4 pt-3 text-sm outline-none",
|
|
320
468
|
className
|
|
@@ -324,376 +472,145 @@ var InlinePasteEditor = react.forwardRef(
|
|
|
324
472
|
] });
|
|
325
473
|
}
|
|
326
474
|
);
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
function endsOf(text, chars) {
|
|
332
|
-
if (text.length <= chars * 2) return text;
|
|
333
|
-
return `${text.slice(0, chars)} \u2026 ${text.slice(-chars)}`;
|
|
334
|
-
}
|
|
335
|
-
var PILL_BASE = "inline-flex select-none items-center rounded-md px-2 py-0.5 text-xs leading-5 transition-colors";
|
|
336
|
-
var TEXT_PILL = "cursor-pointer bg-zinc-100 text-zinc-700 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-200 dark:hover:bg-zinc-700";
|
|
337
|
-
var IMAGE_PILL = "bg-rose-100 font-medium text-rose-600 dark:bg-rose-500/20 dark:text-rose-300";
|
|
338
|
-
var PREVIEW_BASE = "max-w-xs whitespace-pre-wrap break-all text-xs";
|
|
339
|
-
function ImageThumb({ file }) {
|
|
340
|
-
const [url, setUrl] = react.useState(null);
|
|
341
|
-
react.useEffect(() => {
|
|
342
|
-
if (typeof URL.createObjectURL !== "function") return;
|
|
343
|
-
const made = URL.createObjectURL(file);
|
|
344
|
-
setUrl(made);
|
|
345
|
-
return () => URL.revokeObjectURL(made);
|
|
346
|
-
}, [file]);
|
|
347
|
-
return url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: url, alt: "", className: "max-h-40 max-w-[16rem] rounded" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: file.name });
|
|
348
|
-
}
|
|
349
|
-
function InlinePill({
|
|
350
|
-
preview,
|
|
475
|
+
function useInlinePaste({
|
|
476
|
+
pasteThreshold,
|
|
477
|
+
pasteImages = false,
|
|
351
478
|
previewChars,
|
|
352
479
|
renderPastePreview,
|
|
353
480
|
classNames,
|
|
354
481
|
disabled,
|
|
355
|
-
|
|
482
|
+
heldPastes: controlledHeldPastes,
|
|
483
|
+
onHeldPastesChange,
|
|
484
|
+
heldImages: controlledHeldImages,
|
|
485
|
+
onHeldImagesChange,
|
|
486
|
+
editorRef
|
|
356
487
|
}) {
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
const tooltipClass = chunkZU5Q77OT_cjs.cn(PREVIEW_BASE, classNames?.preview);
|
|
360
|
-
if (preview.kind === "image") {
|
|
361
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkX7H75WVP_cjs.Tooltip, { content, className: tooltipClass, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
362
|
-
"span",
|
|
363
|
-
{
|
|
364
|
-
"data-react-fancy-composer-image-pill": id,
|
|
365
|
-
role: "img",
|
|
366
|
-
"aria-label": preview.image.label,
|
|
367
|
-
className: chunkZU5Q77OT_cjs.cn(PILL_BASE, IMAGE_PILL, classNames?.pill, classNames?.imagePill),
|
|
368
|
-
children: preview.image.label
|
|
369
|
-
}
|
|
370
|
-
) });
|
|
371
|
-
}
|
|
372
|
-
const count = withSeparators(preview.paste.text.length);
|
|
373
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkX7H75WVP_cjs.Tooltip, { content, className: tooltipClass, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
374
|
-
"button",
|
|
375
|
-
{
|
|
376
|
-
type: "button",
|
|
377
|
-
"data-react-fancy-composer-paste-pill": id,
|
|
378
|
-
onClick: () => onExpand(id),
|
|
379
|
-
disabled,
|
|
380
|
-
"aria-label": `Insert this pasted text, ${count} characters`,
|
|
381
|
-
className: chunkZU5Q77OT_cjs.cn(PILL_BASE, TEXT_PILL, classNames?.pill, classNames?.textPill),
|
|
382
|
-
children: [
|
|
383
|
-
"Pasted text \xB7 ",
|
|
384
|
-
count,
|
|
385
|
-
" characters"
|
|
386
|
-
]
|
|
387
|
-
}
|
|
388
|
-
) });
|
|
389
|
-
}
|
|
390
|
-
var Composer = react.forwardRef(
|
|
391
|
-
function Composer2({
|
|
392
|
-
value: controlledValue,
|
|
393
|
-
defaultValue = "",
|
|
394
|
-
onChange,
|
|
395
|
-
onSubmit,
|
|
396
|
-
placeholder = "Type a message...",
|
|
397
|
-
actions,
|
|
398
|
-
disabled = false,
|
|
399
|
-
className,
|
|
400
|
-
pasteThreshold,
|
|
401
|
-
pastePlacement = "above",
|
|
402
|
-
pasteImages = false,
|
|
403
|
-
previewChars = PREVIEW_CHARS,
|
|
404
|
-
renderPastePreview,
|
|
405
|
-
classNames,
|
|
488
|
+
const pills = usePastePills({
|
|
489
|
+
threshold: pasteThreshold,
|
|
406
490
|
heldPastes: controlledHeldPastes,
|
|
407
|
-
onHeldPastesChange
|
|
408
|
-
|
|
491
|
+
onHeldPastesChange
|
|
492
|
+
});
|
|
493
|
+
const heldPastes = pills.heldPastes;
|
|
494
|
+
const [heldImages, setHeldImages] = chunkSNHU2AI4_cjs.useControllableState(
|
|
495
|
+
controlledHeldImages,
|
|
496
|
+
[],
|
|
409
497
|
onHeldImagesChange
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
(
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
},
|
|
439
|
-
[pills]
|
|
440
|
-
);
|
|
441
|
-
const holdImage = react.useCallback(
|
|
442
|
-
(file) => {
|
|
443
|
-
let id;
|
|
444
|
-
do {
|
|
445
|
-
imageCount.current += 1;
|
|
446
|
-
id = `image-${imageCount.current}`;
|
|
447
|
-
} while (heldImages.some((i) => i.id === id));
|
|
448
|
-
const image = { id, file, label: `Pasted image ${imageCount.current}` };
|
|
449
|
-
setHeldImages((current) => [...current, image]);
|
|
450
|
-
return id;
|
|
451
|
-
},
|
|
452
|
-
[heldImages, setHeldImages]
|
|
453
|
-
);
|
|
454
|
-
const decidePaste = react.useCallback(
|
|
455
|
-
(data) => {
|
|
456
|
-
const text = data?.getData("text/plain") ?? "";
|
|
457
|
-
if (pasteImages && text === "") {
|
|
458
|
-
const files = Array.from(data?.files ?? []).filter(
|
|
459
|
-
(f) => f.type.startsWith("image/")
|
|
460
|
-
);
|
|
461
|
-
if (files.length > 0) {
|
|
462
|
-
return files.map((file) => ({ id: holdImage(file), block: false }));
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
if (pasteThreshold && pasteThreshold > 0 && text.length >= pasteThreshold) {
|
|
466
|
-
return [{ id: pills.hold(text), block: true }];
|
|
467
|
-
}
|
|
468
|
-
return null;
|
|
469
|
-
},
|
|
470
|
-
[pasteImages, pasteThreshold, holdImage, pills]
|
|
471
|
-
);
|
|
472
|
-
const handleInlineChange = react.useCallback(
|
|
473
|
-
(next) => {
|
|
474
|
-
setValue(next);
|
|
475
|
-
const present = new Set(markedIds(next));
|
|
476
|
-
for (const paste of heldPastes) if (!present.has(paste.id)) pills.remove(paste.id);
|
|
477
|
-
if (heldImages.some((i) => !present.has(i.id))) {
|
|
478
|
-
setHeldImages((current) => current.filter((i) => present.has(i.id)));
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
[setValue, heldPastes, heldImages, pills, setHeldImages]
|
|
482
|
-
);
|
|
483
|
-
const [hosts, setHosts] = react.useState(/* @__PURE__ */ new Map());
|
|
484
|
-
const handleHostsChange = react.useCallback((next) => {
|
|
485
|
-
setHosts((prev) => {
|
|
486
|
-
if (prev.size === next.size && [...next].every(([id, el]) => prev.get(id) === el)) {
|
|
487
|
-
return prev;
|
|
498
|
+
);
|
|
499
|
+
const imageCount = react.useRef(0);
|
|
500
|
+
const known = react.useMemo(
|
|
501
|
+
() => /* @__PURE__ */ new Set([...heldPastes.map((p) => p.id), ...heldImages.map((i) => i.id)]),
|
|
502
|
+
[heldPastes, heldImages]
|
|
503
|
+
);
|
|
504
|
+
const holdImage = react.useCallback(
|
|
505
|
+
(file) => {
|
|
506
|
+
let id;
|
|
507
|
+
do {
|
|
508
|
+
imageCount.current += 1;
|
|
509
|
+
id = `image-${imageCount.current}`;
|
|
510
|
+
} while (heldImages.some((i) => i.id === id));
|
|
511
|
+
const image = { id, file, label: `Pasted image ${imageCount.current}` };
|
|
512
|
+
setHeldImages((current) => [...current, image]);
|
|
513
|
+
return id;
|
|
514
|
+
},
|
|
515
|
+
[heldImages, setHeldImages]
|
|
516
|
+
);
|
|
517
|
+
const decidePaste = react.useCallback(
|
|
518
|
+
(data) => {
|
|
519
|
+
const text = data?.getData("text/plain") ?? "";
|
|
520
|
+
if (pasteImages && text === "") {
|
|
521
|
+
const files = Array.from(data?.files ?? []).filter(
|
|
522
|
+
(f) => f.type.startsWith("image/")
|
|
523
|
+
);
|
|
524
|
+
if (files.length > 0) {
|
|
525
|
+
return files.map((file) => ({ id: holdImage(file), block: false }));
|
|
488
526
|
}
|
|
489
|
-
return next;
|
|
490
|
-
});
|
|
491
|
-
}, []);
|
|
492
|
-
const composeOutgoing = react.useCallback(() => {
|
|
493
|
-
if (inline) return expandMarkers(value, heldPastes, heldImages);
|
|
494
|
-
return [value, ...heldPastes.map((p) => p.text)].filter(Boolean).join("\n\n");
|
|
495
|
-
}, [inline, value, heldPastes, heldImages]);
|
|
496
|
-
const hasContent = value.trim().length > 0 || !inline && heldPastes.length > 0;
|
|
497
|
-
const focusInput = react.useCallback(() => {
|
|
498
|
-
if (inline) editorRef.current?.focus();
|
|
499
|
-
else textareaRef.current?.focus();
|
|
500
|
-
}, [inline]);
|
|
501
|
-
const handleSubmit = react.useCallback(() => {
|
|
502
|
-
if (!hasContent || disabled) return;
|
|
503
|
-
const order = markedIds(value);
|
|
504
|
-
const images = inline ? order.flatMap((id) => heldImages.filter((i) => i.id === id)) : [];
|
|
505
|
-
onSubmit?.(composeOutgoing(), { images });
|
|
506
|
-
setValue("");
|
|
507
|
-
pills.clear();
|
|
508
|
-
setHeldImages([]);
|
|
509
|
-
focusInput();
|
|
510
|
-
}, [
|
|
511
|
-
hasContent,
|
|
512
|
-
disabled,
|
|
513
|
-
value,
|
|
514
|
-
inline,
|
|
515
|
-
heldImages,
|
|
516
|
-
onSubmit,
|
|
517
|
-
composeOutgoing,
|
|
518
|
-
setValue,
|
|
519
|
-
pills,
|
|
520
|
-
setHeldImages,
|
|
521
|
-
focusInput
|
|
522
|
-
]);
|
|
523
|
-
const handleKeyDown = (e) => {
|
|
524
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
525
|
-
e.preventDefault();
|
|
526
|
-
handleSubmit();
|
|
527
527
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
(paste) => {
|
|
531
|
-
const text = pills.expand(paste.id);
|
|
532
|
-
if (text === void 0) return;
|
|
533
|
-
setValue((current) => current ? `${current}
|
|
534
|
-
|
|
535
|
-
${text}` : text);
|
|
536
|
-
textareaRef.current?.focus();
|
|
537
|
-
},
|
|
538
|
-
[pills, setValue]
|
|
539
|
-
);
|
|
540
|
-
const expandInline = react.useCallback(
|
|
541
|
-
(id) => {
|
|
542
|
-
const text = pills.expand(id);
|
|
543
|
-
if (text === void 0) return;
|
|
544
|
-
editorRef.current?.replacePill(id, text);
|
|
545
|
-
},
|
|
546
|
-
[pills]
|
|
547
|
-
);
|
|
548
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
549
|
-
"div",
|
|
550
|
-
{
|
|
551
|
-
"data-react-fancy-composer": "",
|
|
552
|
-
ref,
|
|
553
|
-
className: chunkZU5Q77OT_cjs.cn(
|
|
554
|
-
"rounded-xl border border-zinc-200 bg-white dark:border-zinc-700 dark:bg-zinc-900",
|
|
555
|
-
disabled && "opacity-50",
|
|
556
|
-
className
|
|
557
|
-
),
|
|
558
|
-
children: [
|
|
559
|
-
!inline && heldPastes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
560
|
-
"div",
|
|
561
|
-
{
|
|
562
|
-
"data-react-fancy-composer-paste-pills": "",
|
|
563
|
-
className: "flex flex-wrap gap-1.5 px-3 pt-3",
|
|
564
|
-
children: heldPastes.map((paste) => (
|
|
565
|
-
// `group` + `group-hover` rather than hover state: the preview is
|
|
566
|
-
// presentation, and a useState for it would be one more thing an
|
|
567
|
-
// agent could desynchronise.
|
|
568
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "group relative inline-flex", children: [
|
|
569
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
570
|
-
"button",
|
|
571
|
-
{
|
|
572
|
-
type: "button",
|
|
573
|
-
"data-react-fancy-composer-paste-pill": paste.id,
|
|
574
|
-
onClick: () => insertPaste(paste),
|
|
575
|
-
disabled,
|
|
576
|
-
"aria-label": `Insert this pasted text, ${withSeparators(paste.text.length)} characters`,
|
|
577
|
-
"aria-describedby": `${paste.id}-preview`,
|
|
578
|
-
className: chunkZU5Q77OT_cjs.cn(
|
|
579
|
-
"inline-flex items-center gap-1.5 rounded-full border border-zinc-200 bg-zinc-50 py-1 pl-2.5 pr-7 text-xs text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-200 dark:hover:bg-zinc-700",
|
|
580
|
-
classNames?.pill,
|
|
581
|
-
classNames?.textPill
|
|
582
|
-
),
|
|
583
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
584
|
-
"Pasted text \xB7 ",
|
|
585
|
-
withSeparators(paste.text.length),
|
|
586
|
-
" characters"
|
|
587
|
-
] })
|
|
588
|
-
}
|
|
589
|
-
),
|
|
590
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
591
|
-
"button",
|
|
592
|
-
{
|
|
593
|
-
type: "button",
|
|
594
|
-
"data-react-fancy-composer-paste-pill-remove": paste.id,
|
|
595
|
-
onClick: () => pills.remove(paste.id),
|
|
596
|
-
disabled,
|
|
597
|
-
"aria-label": "Discard this pasted text",
|
|
598
|
-
className: chunkZU5Q77OT_cjs.cn(
|
|
599
|
-
"absolute right-1 top-1/2 -translate-y-1/2 rounded-full px-1 text-xs text-zinc-400 transition-colors hover:text-zinc-700 dark:hover:text-zinc-100",
|
|
600
|
-
classNames?.remove
|
|
601
|
-
),
|
|
602
|
-
children: "\xD7"
|
|
603
|
-
}
|
|
604
|
-
),
|
|
605
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
606
|
-
"span",
|
|
607
|
-
{
|
|
608
|
-
id: `${paste.id}-preview`,
|
|
609
|
-
"data-react-fancy-composer-paste-pill-preview": paste.id,
|
|
610
|
-
role: "tooltip",
|
|
611
|
-
className: chunkZU5Q77OT_cjs.cn(
|
|
612
|
-
"pointer-events-none absolute bottom-full left-0 z-10 mb-1 hidden max-w-xs whitespace-pre-wrap break-all rounded-md bg-zinc-900 px-2 py-1 text-xs text-white group-hover:block dark:bg-zinc-100 dark:text-zinc-900",
|
|
613
|
-
classNames?.preview
|
|
614
|
-
),
|
|
615
|
-
children: renderPastePreview?.({ kind: "text", paste }) ?? endsOf(paste.text, previewChars)
|
|
616
|
-
}
|
|
617
|
-
)
|
|
618
|
-
] }, paste.id)
|
|
619
|
-
))
|
|
620
|
-
}
|
|
621
|
-
),
|
|
622
|
-
inline ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
623
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
624
|
-
InlinePasteEditor,
|
|
625
|
-
{
|
|
626
|
-
ref: editorRef,
|
|
627
|
-
value,
|
|
628
|
-
known,
|
|
629
|
-
onChange: handleInlineChange,
|
|
630
|
-
onSubmit: handleSubmit,
|
|
631
|
-
onPaste: decidePaste,
|
|
632
|
-
onHostsChange: handleHostsChange,
|
|
633
|
-
placeholder,
|
|
634
|
-
disabled,
|
|
635
|
-
className: classNames?.input
|
|
636
|
-
}
|
|
637
|
-
),
|
|
638
|
-
Array.from(hosts, ([id, host]) => {
|
|
639
|
-
const paste = heldPastes.find((p) => p.id === id);
|
|
640
|
-
const image = paste ? void 0 : heldImages.find((i) => i.id === id);
|
|
641
|
-
const preview = paste ? { kind: "text", paste } : image ? { kind: "image", image } : null;
|
|
642
|
-
return preview ? reactDom.createPortal(
|
|
643
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
644
|
-
InlinePill,
|
|
645
|
-
{
|
|
646
|
-
preview,
|
|
647
|
-
previewChars,
|
|
648
|
-
renderPastePreview,
|
|
649
|
-
classNames,
|
|
650
|
-
disabled,
|
|
651
|
-
onExpand: expandInline
|
|
652
|
-
}
|
|
653
|
-
),
|
|
654
|
-
host,
|
|
655
|
-
id
|
|
656
|
-
) : null;
|
|
657
|
-
})
|
|
658
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
659
|
-
"textarea",
|
|
660
|
-
{
|
|
661
|
-
ref: textareaRef,
|
|
662
|
-
value,
|
|
663
|
-
onChange: (e) => setValue(e.target.value),
|
|
664
|
-
onKeyDown: handleKeyDown,
|
|
665
|
-
onPaste: handlePaste,
|
|
666
|
-
placeholder,
|
|
667
|
-
disabled,
|
|
668
|
-
rows: 3,
|
|
669
|
-
className: chunkZU5Q77OT_cjs.cn(
|
|
670
|
-
"w-full resize-none bg-transparent px-4 pt-3 text-sm outline-none placeholder:text-zinc-400",
|
|
671
|
-
classNames?.input
|
|
672
|
-
)
|
|
673
|
-
}
|
|
674
|
-
),
|
|
675
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-t border-zinc-100 px-3 py-2 dark:border-zinc-800", children: [
|
|
676
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: actions }),
|
|
677
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
678
|
-
"button",
|
|
679
|
-
{
|
|
680
|
-
type: "button",
|
|
681
|
-
onClick: handleSubmit,
|
|
682
|
-
disabled: disabled || !hasContent,
|
|
683
|
-
className: "rounded-lg bg-zinc-900 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-zinc-800 disabled:opacity-50 dark:bg-white dark:text-zinc-900 dark:hover:bg-zinc-100",
|
|
684
|
-
children: "Send"
|
|
685
|
-
}
|
|
686
|
-
)
|
|
687
|
-
] })
|
|
688
|
-
]
|
|
528
|
+
if (pasteThreshold && pasteThreshold > 0 && text.length >= pasteThreshold) {
|
|
529
|
+
return [{ id: pills.hold(text), block: true }];
|
|
689
530
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
531
|
+
return null;
|
|
532
|
+
},
|
|
533
|
+
[pasteImages, pasteThreshold, holdImage, pills]
|
|
534
|
+
);
|
|
535
|
+
const prune = react.useCallback(
|
|
536
|
+
(next) => {
|
|
537
|
+
const present = new Set(markedIds(next));
|
|
538
|
+
for (const paste of heldPastes) if (!present.has(paste.id)) pills.remove(paste.id);
|
|
539
|
+
if (heldImages.some((i) => !present.has(i.id))) {
|
|
540
|
+
setHeldImages((current) => current.filter((i) => present.has(i.id)));
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
[heldPastes, heldImages, pills, setHeldImages]
|
|
544
|
+
);
|
|
545
|
+
const [hosts, setHosts] = react.useState(/* @__PURE__ */ new Map());
|
|
546
|
+
const onHostsChange = react.useCallback((next) => {
|
|
547
|
+
setHosts((prev) => {
|
|
548
|
+
if (prev.size === next.size && [...next].every(([id, el]) => prev.get(id) === el)) {
|
|
549
|
+
return prev;
|
|
550
|
+
}
|
|
551
|
+
return next;
|
|
552
|
+
});
|
|
553
|
+
}, []);
|
|
554
|
+
const expandPill = react.useCallback(
|
|
555
|
+
(id) => {
|
|
556
|
+
const text = pills.expand(id);
|
|
557
|
+
if (text === void 0) return;
|
|
558
|
+
editorRef.current?.replacePill(id, text);
|
|
559
|
+
},
|
|
560
|
+
[pills, editorRef]
|
|
561
|
+
);
|
|
562
|
+
const expand = react.useCallback(
|
|
563
|
+
(value) => expandMarkers(value, heldPastes, heldImages),
|
|
564
|
+
[heldPastes, heldImages]
|
|
565
|
+
);
|
|
566
|
+
const imagesIn = react.useCallback(
|
|
567
|
+
(value) => markedIds(value).flatMap((id) => heldImages.filter((i) => i.id === id)),
|
|
568
|
+
[heldImages]
|
|
569
|
+
);
|
|
570
|
+
const clear = react.useCallback(() => {
|
|
571
|
+
pills.clear();
|
|
572
|
+
setHeldImages([]);
|
|
573
|
+
}, [pills, setHeldImages]);
|
|
574
|
+
const portals = Array.from(hosts, ([id, host]) => {
|
|
575
|
+
const paste = heldPastes.find((p) => p.id === id);
|
|
576
|
+
const image = paste ? void 0 : heldImages.find((i) => i.id === id);
|
|
577
|
+
const preview = paste ? { kind: "text", paste } : image ? { kind: "image", image } : null;
|
|
578
|
+
return preview ? reactDom.createPortal(
|
|
579
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
580
|
+
InlinePill,
|
|
581
|
+
{
|
|
582
|
+
preview,
|
|
583
|
+
previewChars,
|
|
584
|
+
renderPastePreview,
|
|
585
|
+
classNames,
|
|
586
|
+
disabled,
|
|
587
|
+
onExpand: expandPill
|
|
588
|
+
}
|
|
589
|
+
),
|
|
590
|
+
host,
|
|
591
|
+
id
|
|
592
|
+
) : null;
|
|
593
|
+
});
|
|
594
|
+
return {
|
|
595
|
+
pills,
|
|
596
|
+
heldPastes,
|
|
597
|
+
heldImages,
|
|
598
|
+
known,
|
|
599
|
+
decidePaste,
|
|
600
|
+
prune,
|
|
601
|
+
onHostsChange,
|
|
602
|
+
expand,
|
|
603
|
+
imagesIn,
|
|
604
|
+
clear,
|
|
605
|
+
portals
|
|
606
|
+
};
|
|
607
|
+
}
|
|
694
608
|
|
|
695
|
-
exports.
|
|
609
|
+
exports.InlinePasteEditor = InlinePasteEditor;
|
|
610
|
+
exports.endsOf = endsOf;
|
|
696
611
|
exports.pasteMarker = pasteMarker;
|
|
612
|
+
exports.useInlinePaste = useInlinePaste;
|
|
697
613
|
exports.usePastePills = usePastePills;
|
|
698
|
-
|
|
699
|
-
//# sourceMappingURL=chunk-
|
|
614
|
+
exports.withSeparators = withSeparators;
|
|
615
|
+
//# sourceMappingURL=chunk-6TZPM43Q.cjs.map
|
|
616
|
+
//# sourceMappingURL=chunk-6TZPM43Q.cjs.map
|