@w100n/documents 0.16.2 → 0.16.4
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/{SheetView-S5AFXKPA.js → SheetView-OEKOHMKW.js} +7 -5
- package/dist/SheetView-OEKOHMKW.js.map +1 -0
- package/dist/{TextEditor-7WQJFUUU.js → TextEditor-5S7FSLIZ.js} +4 -4
- package/dist/{chunk-JC4DLTMI.js → chunk-3D2G5NBI.js} +2 -2
- package/dist/{chunk-KGAQT5M3.js → chunk-AKJGYZME.js} +3 -3
- package/dist/{chunk-KGAQT5M3.js.map → chunk-AKJGYZME.js.map} +1 -1
- package/dist/{chunk-LZYITB56.js → chunk-VNXZVOPN.js} +37 -1
- package/dist/chunk-VNXZVOPN.js.map +1 -0
- package/dist/collab.cjs +37 -1
- package/dist/collab.cjs.map +1 -1
- package/dist/collab.d.cts +1 -1
- package/dist/collab.d.ts +1 -1
- package/dist/collab.js +2 -2
- package/dist/{grid-AZLMNS7K.js → grid-IR5YFFSF.js} +20 -2
- package/dist/grid-IR5YFFSF.js.map +1 -0
- package/dist/index.cjs +346 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +75 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +281 -56
- package/dist/index.js.map +1 -1
- package/dist/kinds.d.cts +1 -1
- package/dist/kinds.d.ts +1 -1
- package/dist/memory.cjs +6 -0
- package/dist/memory.cjs.map +1 -1
- package/dist/memory.d.cts +1 -1
- package/dist/memory.d.ts +1 -1
- package/dist/memory.js +6 -0
- package/dist/memory.js.map +1 -1
- package/dist/{types-DNcaU6SK.d.cts → types-BUO0OzOl.d.cts} +5 -0
- package/dist/{types-DNcaU6SK.d.ts → types-BUO0OzOl.d.ts} +5 -0
- package/package.json +1 -1
- package/dist/SheetView-S5AFXKPA.js.map +0 -1
- package/dist/chunk-LZYITB56.js.map +0 -1
- package/dist/grid-AZLMNS7K.js.map +0 -1
- /package/dist/{TextEditor-7WQJFUUU.js.map → TextEditor-5S7FSLIZ.js.map} +0 -0
- /package/dist/{chunk-JC4DLTMI.js.map → chunk-3D2G5NBI.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { L as Language, D as DocumentsHost, P as Place, a as DocumentFile, G as GuestHost, R as Rights } from './types-
|
|
4
|
-
export { C as Comment, b as DocumentKind, c as DocumentSummary, d as DocumentVersion, F as Fetch, e as GuestFile, f as GuestLink, g as LinkEntry, h as Person, S as Signature, i as SignatureMethod, j as Space } from './types-
|
|
3
|
+
import { L as Language, D as DocumentsHost, P as Place, a as DocumentFile, G as GuestHost, R as Rights } from './types-BUO0OzOl.cjs';
|
|
4
|
+
export { C as Comment, b as DocumentKind, c as DocumentSummary, d as DocumentVersion, F as Fetch, e as GuestFile, f as GuestLink, g as LinkEntry, h as Person, S as Signature, i as SignatureMethod, j as Space } from './types-BUO0OzOl.cjs';
|
|
5
5
|
import { JSONContent } from '@tiptap/core';
|
|
6
6
|
import { I as Img, S as Setup } from './write-BCI8yool.cjs';
|
|
7
7
|
export { kindOf, kinds, matches, readable } from './kinds.cjs';
|
|
@@ -56,6 +56,15 @@ declare function DocumentsWorkspace({ host, language, theme, place, onPlace, sta
|
|
|
56
56
|
actions?: (doc: DocumentFile) => ReactNode;
|
|
57
57
|
}): react.JSX.Element;
|
|
58
58
|
|
|
59
|
+
declare function FilePreview({ url, name, mimeType, size, bytes, pdfWorker }: {
|
|
60
|
+
url: string;
|
|
61
|
+
name: string;
|
|
62
|
+
mimeType?: string;
|
|
63
|
+
size?: number;
|
|
64
|
+
bytes?: (url: string) => Promise<ArrayBuffer>;
|
|
65
|
+
pdfWorker?: () => Worker;
|
|
66
|
+
}): react.JSX.Element | null;
|
|
67
|
+
|
|
59
68
|
type GuestRefusal = 'missing' | 'ended' | 'password' | 'wrong' | 'name' | 'busy';
|
|
60
69
|
declare class GuestRefused extends Error {
|
|
61
70
|
readonly reason: GuestRefusal;
|
|
@@ -160,4 +169,4 @@ declare function SlidesView({ html, name, rights, language, theme, baseUrl, scri
|
|
|
160
169
|
guard?: Guard;
|
|
161
170
|
}): react.JSX.Element;
|
|
162
171
|
|
|
163
|
-
export { type Deck, type DeckKind, DocumentFile, DocumentOverlay, DocumentsHost, DocumentsWorkspace, type DocxModel, GuestDocument, GuestHost, type GuestRefusal, GuestRefused, Language, Place, Rights, type Slide, SlidesView, readDeck, readDocx, writeDeck, writeDocx };
|
|
172
|
+
export { type Deck, type DeckKind, DocumentFile, DocumentOverlay, DocumentsHost, DocumentsWorkspace, type DocxModel, FilePreview, GuestDocument, GuestHost, type GuestRefusal, GuestRefused, Language, Place, Rights, type Slide, SlidesView, readDeck, readDocx, writeDeck, writeDocx };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { L as Language, D as DocumentsHost, P as Place, a as DocumentFile, G as GuestHost, R as Rights } from './types-
|
|
4
|
-
export { C as Comment, b as DocumentKind, c as DocumentSummary, d as DocumentVersion, F as Fetch, e as GuestFile, f as GuestLink, g as LinkEntry, h as Person, S as Signature, i as SignatureMethod, j as Space } from './types-
|
|
3
|
+
import { L as Language, D as DocumentsHost, P as Place, a as DocumentFile, G as GuestHost, R as Rights } from './types-BUO0OzOl.js';
|
|
4
|
+
export { C as Comment, b as DocumentKind, c as DocumentSummary, d as DocumentVersion, F as Fetch, e as GuestFile, f as GuestLink, g as LinkEntry, h as Person, S as Signature, i as SignatureMethod, j as Space } from './types-BUO0OzOl.js';
|
|
5
5
|
import { JSONContent } from '@tiptap/core';
|
|
6
6
|
import { I as Img, S as Setup } from './write-BCI8yool.js';
|
|
7
7
|
export { kindOf, kinds, matches, readable } from './kinds.js';
|
|
@@ -56,6 +56,15 @@ declare function DocumentsWorkspace({ host, language, theme, place, onPlace, sta
|
|
|
56
56
|
actions?: (doc: DocumentFile) => ReactNode;
|
|
57
57
|
}): react.JSX.Element;
|
|
58
58
|
|
|
59
|
+
declare function FilePreview({ url, name, mimeType, size, bytes, pdfWorker }: {
|
|
60
|
+
url: string;
|
|
61
|
+
name: string;
|
|
62
|
+
mimeType?: string;
|
|
63
|
+
size?: number;
|
|
64
|
+
bytes?: (url: string) => Promise<ArrayBuffer>;
|
|
65
|
+
pdfWorker?: () => Worker;
|
|
66
|
+
}): react.JSX.Element | null;
|
|
67
|
+
|
|
59
68
|
type GuestRefusal = 'missing' | 'ended' | 'password' | 'wrong' | 'name' | 'busy';
|
|
60
69
|
declare class GuestRefused extends Error {
|
|
61
70
|
readonly reason: GuestRefusal;
|
|
@@ -160,4 +169,4 @@ declare function SlidesView({ html, name, rights, language, theme, baseUrl, scri
|
|
|
160
169
|
guard?: Guard;
|
|
161
170
|
}): react.JSX.Element;
|
|
162
171
|
|
|
163
|
-
export { type Deck, type DeckKind, DocumentFile, DocumentOverlay, DocumentsHost, DocumentsWorkspace, type DocxModel, GuestDocument, GuestHost, type GuestRefusal, GuestRefused, Language, Place, Rights, type Slide, SlidesView, readDeck, readDocx, writeDeck, writeDocx };
|
|
172
|
+
export { type Deck, type DeckKind, DocumentFile, DocumentOverlay, DocumentsHost, DocumentsWorkspace, type DocxModel, FilePreview, GuestDocument, GuestHost, type GuestRefusal, GuestRefused, Language, Place, Rights, type Slide, SlidesView, readDeck, readDocx, writeDeck, writeDocx };
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-TDP6OJET.js";
|
|
15
15
|
import {
|
|
16
16
|
texts
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VNXZVOPN.js";
|
|
18
18
|
import {
|
|
19
19
|
escape,
|
|
20
20
|
readDocx,
|
|
@@ -2409,8 +2409,8 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
|
|
|
2409
2409
|
|
|
2410
2410
|
// src/DocumentOverlay.tsx
|
|
2411
2411
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2412
|
-
var TextEditor = lazy(() => import("./TextEditor-
|
|
2413
|
-
var SheetView = lazy(() => import("./SheetView-
|
|
2412
|
+
var TextEditor = lazy(() => import("./TextEditor-5S7FSLIZ.js"));
|
|
2413
|
+
var SheetView = lazy(() => import("./SheetView-OEKOHMKW.js"));
|
|
2414
2414
|
var icons = { docx: FileText, markdown: FileType, pdf: Files, sheet: FileSpreadsheet, slides: Presentation };
|
|
2415
2415
|
var read = { view: true, comment: false, edit: false };
|
|
2416
2416
|
var quiet = () => {
|
|
@@ -2521,8 +2521,15 @@ import {
|
|
|
2521
2521
|
Check as Check2,
|
|
2522
2522
|
ChevronDown as ChevronDown2,
|
|
2523
2523
|
ChevronRight as ChevronRight2,
|
|
2524
|
+
Copy as Copy3,
|
|
2525
|
+
Download as Download3,
|
|
2526
|
+
ExternalLink as ExternalLink2,
|
|
2524
2527
|
FileDiff,
|
|
2525
2528
|
FileDown,
|
|
2529
|
+
Link as Link2,
|
|
2530
|
+
Pencil,
|
|
2531
|
+
Send,
|
|
2532
|
+
Trash2 as Trash24,
|
|
2526
2533
|
FilePlus,
|
|
2527
2534
|
FileSpreadsheet as FileSpreadsheet3,
|
|
2528
2535
|
FileText as FileText3,
|
|
@@ -3117,14 +3124,14 @@ function Thumb({ host, item, label }) {
|
|
|
3117
3124
|
/* @__PURE__ */ jsx8("i", {}),
|
|
3118
3125
|
/* @__PURE__ */ jsx8("i", {})
|
|
3119
3126
|
] }) }),
|
|
3120
|
-
/* @__PURE__ */ jsx8("span", { className: "w100n-docs-kind", "data-kind": item.kind, children: label })
|
|
3127
|
+
label && /* @__PURE__ */ jsx8("span", { className: "w100n-docs-kind", "data-kind": item.kind, children: label })
|
|
3121
3128
|
] });
|
|
3122
3129
|
}
|
|
3123
3130
|
|
|
3124
3131
|
// src/DocumentsWorkspace.tsx
|
|
3125
3132
|
import { Fragment as Fragment8, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3126
|
-
var TextEditor2 = lazy2(() => import("./TextEditor-
|
|
3127
|
-
var SheetView2 = lazy2(() => import("./SheetView-
|
|
3133
|
+
var TextEditor2 = lazy2(() => import("./TextEditor-5S7FSLIZ.js"));
|
|
3134
|
+
var SheetView2 = lazy2(() => import("./SheetView-OEKOHMKW.js"));
|
|
3128
3135
|
var Compare = lazy2(() => import("./Compare-M57FG4R3.js"));
|
|
3129
3136
|
var icons3 = { docx: FileText3, markdown: FileType3, pdf: Files2, sheet: FileSpreadsheet3, slides: Presentation3 };
|
|
3130
3137
|
function DocumentsWorkspace({ host, language = "en", theme = "light", place, onPlace, start, end, aside, actions }) {
|
|
@@ -3195,6 +3202,27 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3195
3202
|
document.addEventListener("pointerdown", close);
|
|
3196
3203
|
return () => document.removeEventListener("pointerdown", close);
|
|
3197
3204
|
}, [picking]);
|
|
3205
|
+
const [menu, setMenu] = useState9(null);
|
|
3206
|
+
const [naming, setNaming] = useState9(null);
|
|
3207
|
+
const [notice, setNotice] = useState9(null);
|
|
3208
|
+
const early = useRef6(/* @__PURE__ */ new Map());
|
|
3209
|
+
const hover = useRef6(0);
|
|
3210
|
+
useEffect6(() => {
|
|
3211
|
+
if (!menu) return;
|
|
3212
|
+
const close = (e) => {
|
|
3213
|
+
if (e.type === "pointerdown" && e.target.closest(".w100n-docs-context")) return;
|
|
3214
|
+
if (e.type === "keydown" && e.key !== "Escape") return;
|
|
3215
|
+
setMenu(null);
|
|
3216
|
+
};
|
|
3217
|
+
document.addEventListener("pointerdown", close);
|
|
3218
|
+
window.addEventListener("keydown", close);
|
|
3219
|
+
window.addEventListener("scroll", close, true);
|
|
3220
|
+
return () => {
|
|
3221
|
+
document.removeEventListener("pointerdown", close);
|
|
3222
|
+
window.removeEventListener("keydown", close);
|
|
3223
|
+
window.removeEventListener("scroll", close, true);
|
|
3224
|
+
};
|
|
3225
|
+
}, [menu]);
|
|
3198
3226
|
const [tab, setTab] = useState9("outline");
|
|
3199
3227
|
const [outline, setOutline] = useState9([]);
|
|
3200
3228
|
const [reading, setReading] = useState9(null);
|
|
@@ -3236,9 +3264,15 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3236
3264
|
document.removeEventListener("visibilitychange", sync);
|
|
3237
3265
|
};
|
|
3238
3266
|
}, []);
|
|
3239
|
-
const
|
|
3267
|
+
const take = (id, key) => {
|
|
3268
|
+
const kept2 = early.current.get(id);
|
|
3269
|
+
const found = kept2 && Date.now() - kept2.at < 15e3 ? kept2[key] : void 0;
|
|
3270
|
+
if (kept2) delete kept2[key];
|
|
3271
|
+
return found;
|
|
3272
|
+
};
|
|
3273
|
+
const doc = useLoad((signal) => here.documentId ? take(here.documentId, "doc") ?? host.document(here.documentId, { signal }) : Promise.resolve(null), [host, here.documentId]);
|
|
3240
3274
|
const versions = useLoad((signal) => here.documentId ? host.versions(here.documentId, { signal }) : Promise.resolve([]), [host, here.documentId]);
|
|
3241
|
-
const content = useLoad((signal) => here.documentId ? host.content(here.documentId, versionId, { signal }) : Promise.resolve(null), [host, here.documentId, versionId]);
|
|
3275
|
+
const content = useLoad((signal) => here.documentId ? !versionId && take(here.documentId, "bytes") || host.content(here.documentId, versionId, { signal }) : Promise.resolve(null), [host, here.documentId, versionId]);
|
|
3242
3276
|
const pdf = doc.data?.kind === "pdf";
|
|
3243
3277
|
const text = doc.data?.kind === "markdown" || doc.data?.kind === "docx";
|
|
3244
3278
|
const docbar = text && !versionId && !narrow;
|
|
@@ -3370,6 +3404,52 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3370
3404
|
setKept({ id: file.id, state: "failed" });
|
|
3371
3405
|
}
|
|
3372
3406
|
};
|
|
3407
|
+
const warm = (item) => {
|
|
3408
|
+
clearTimeout(hover.current);
|
|
3409
|
+
hover.current = window.setTimeout(() => {
|
|
3410
|
+
if (item.id === here.documentId) return;
|
|
3411
|
+
if (item.kind === "docx" || item.kind === "markdown") void import("./TextEditor-5S7FSLIZ.js");
|
|
3412
|
+
if (item.kind === "sheet") void import("./SheetView-OEKOHMKW.js");
|
|
3413
|
+
const kept2 = early.current.get(item.id);
|
|
3414
|
+
if (kept2 && Date.now() - kept2.at < 15e3 || item.size > 5e6) return;
|
|
3415
|
+
const next = { at: Date.now(), doc: host.document(item.id), bytes: host.content(item.id, null) };
|
|
3416
|
+
next.doc.catch(() => {
|
|
3417
|
+
});
|
|
3418
|
+
next.bytes.catch(() => {
|
|
3419
|
+
});
|
|
3420
|
+
early.current.set(item.id, next);
|
|
3421
|
+
}, 150);
|
|
3422
|
+
};
|
|
3423
|
+
const act = async (run2, done) => {
|
|
3424
|
+
setMenu(null);
|
|
3425
|
+
setNotice(null);
|
|
3426
|
+
try {
|
|
3427
|
+
await run2();
|
|
3428
|
+
if (done) setNotice(done);
|
|
3429
|
+
} catch {
|
|
3430
|
+
setNotice(t.actionFailed);
|
|
3431
|
+
}
|
|
3432
|
+
};
|
|
3433
|
+
const fetchFile = async (item) => {
|
|
3434
|
+
const url = URL.createObjectURL(new Blob([await host.content(item.id)]));
|
|
3435
|
+
const link = Object.assign(document.createElement("a"), { href: url, download: item.name });
|
|
3436
|
+
link.click();
|
|
3437
|
+
setTimeout(() => URL.revokeObjectURL(url), 1e3);
|
|
3438
|
+
};
|
|
3439
|
+
const retitle = async (item, draft) => {
|
|
3440
|
+
setNaming(null);
|
|
3441
|
+
const ext = /\.[^.]+$/.exec(item.name)?.[0] ?? "";
|
|
3442
|
+
const name = draft.trim() && (/\.[^.\s]+$/.test(draft.trim()) ? draft.trim() : draft.trim() + ext);
|
|
3443
|
+
if (!name || name === item.name) return;
|
|
3444
|
+
await act(() => host.rename(item.id, name));
|
|
3445
|
+
list.retry();
|
|
3446
|
+
if (item.id === here.documentId) doc.retry();
|
|
3447
|
+
};
|
|
3448
|
+
const drop2 = async (item) => {
|
|
3449
|
+
await act(() => host.remove(item.id), t.trashed);
|
|
3450
|
+
list.retry();
|
|
3451
|
+
if (item.id === here.documentId) go({ spaceId: here.spaceId, documentId: null });
|
|
3452
|
+
};
|
|
3373
3453
|
const rename = async (file, draft) => {
|
|
3374
3454
|
setRenaming(null);
|
|
3375
3455
|
const ext = /\.[^.]+$/.exec(file.name)?.[0] ?? "";
|
|
@@ -3616,6 +3696,21 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3616
3696
|
kept?.id === here.documentId && kept.state === "failed" && /* @__PURE__ */ jsx9("span", { className: "w100n-docs-muted", role: "alert", children: t.templateFailed }),
|
|
3617
3697
|
renamed === "failed" && /* @__PURE__ */ jsx9("span", { className: "w100n-docs-muted", children: t.renameFailed }),
|
|
3618
3698
|
docbar && /* @__PURE__ */ jsx9("span", { ref: setStatusAt, className: "w100n-docs-status" }),
|
|
3699
|
+
host.send && doc.data && !versionId && !doc.data.id.includes(":") && /* @__PURE__ */ jsxs9(
|
|
3700
|
+
"button",
|
|
3701
|
+
{
|
|
3702
|
+
type: "button",
|
|
3703
|
+
className: "w100n-docs-action",
|
|
3704
|
+
"data-tone": "blue",
|
|
3705
|
+
"aria-label": t.sendChat,
|
|
3706
|
+
title: t.sendChat,
|
|
3707
|
+
onClick: () => host.send(doc.data.id),
|
|
3708
|
+
children: [
|
|
3709
|
+
/* @__PURE__ */ jsx9(Send, { "aria-hidden": true }),
|
|
3710
|
+
/* @__PURE__ */ jsx9("span", { children: t.sendChat })
|
|
3711
|
+
]
|
|
3712
|
+
}
|
|
3713
|
+
),
|
|
3619
3714
|
sharing && /* @__PURE__ */ jsxs9("button", { type: "button", className: "w100n-docs-action", "aria-label": t.share, title: t.share, onClick: () => {
|
|
3620
3715
|
setTab("sharing");
|
|
3621
3716
|
side("panel", true);
|
|
@@ -3744,17 +3839,56 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3744
3839
|
sending === "failed" && /* @__PURE__ */ jsx9("p", { className: "w100n-docs-muted", role: "alert", children: t.uploadFailed }),
|
|
3745
3840
|
list.error && failed(list.retry),
|
|
3746
3841
|
list.loading && !list.data && /* @__PURE__ */ jsx9("p", { className: "w100n-docs-muted", children: t.loading }),
|
|
3842
|
+
notice && /* @__PURE__ */ jsx9("p", { className: "w100n-docs-muted", role: "status", children: notice }),
|
|
3747
3843
|
list.data && !shown.length && /* @__PURE__ */ jsx9("p", { className: "w100n-docs-muted", children: all.length ? t.nothing : t.empty }),
|
|
3748
3844
|
folders.map((folder2) => /* @__PURE__ */ jsxs9("div", { className: "w100n-docs-folder", role: "group", "aria-label": folder2 || t.loose, children: [
|
|
3749
3845
|
folders.length > 1 && /* @__PURE__ */ jsx9("p", { className: "w100n-docs-group", children: folder2 || t.loose }),
|
|
3750
|
-
/* @__PURE__ */ jsx9("div", { className: "w100n-docs-grid", children: shown.filter((item) => !spaceId || (item.folder ?? "") === folder2).map((item) => /* @__PURE__ */ jsxs9("
|
|
3846
|
+
/* @__PURE__ */ jsx9("div", { className: "w100n-docs-grid", children: shown.filter((item) => !spaceId || (item.folder ?? "") === folder2).map((item) => naming?.id === item.id ? /* @__PURE__ */ jsxs9("div", { className: "w100n-docs-card", children: [
|
|
3751
3847
|
/* @__PURE__ */ jsx9(Thumb, { host, item, label: t.kinds[item.kind] }),
|
|
3752
|
-
/* @__PURE__ */
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3848
|
+
/* @__PURE__ */ jsx9("span", { className: "w100n-docs-card-text", children: /* @__PURE__ */ jsx9(
|
|
3849
|
+
"input",
|
|
3850
|
+
{
|
|
3851
|
+
className: "w100n-docs-field",
|
|
3852
|
+
autoFocus: true,
|
|
3853
|
+
value: naming.text,
|
|
3854
|
+
"aria-label": t.rename,
|
|
3855
|
+
onFocus: (e) => e.currentTarget.select(),
|
|
3856
|
+
onChange: (e) => setNaming({ ...naming, text: e.target.value }),
|
|
3857
|
+
onBlur: () => void retitle(item, naming.text),
|
|
3858
|
+
onKeyDown: (e) => {
|
|
3859
|
+
if (e.key === "Enter") e.currentTarget.blur();
|
|
3860
|
+
if (e.key === "Escape") {
|
|
3861
|
+
e.stopPropagation();
|
|
3862
|
+
setNaming(null);
|
|
3863
|
+
}
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
) })
|
|
3867
|
+
] }, item.id) : /* @__PURE__ */ jsxs9(
|
|
3868
|
+
"button",
|
|
3869
|
+
{
|
|
3870
|
+
type: "button",
|
|
3871
|
+
className: "w100n-docs-card",
|
|
3872
|
+
"aria-current": item.id === here.documentId,
|
|
3873
|
+
onClick: () => open(item),
|
|
3874
|
+
title: item.name,
|
|
3875
|
+
onPointerEnter: () => warm(item),
|
|
3876
|
+
onPointerLeave: () => clearTimeout(hover.current),
|
|
3877
|
+
onContextMenu: (e) => {
|
|
3878
|
+
e.preventDefault();
|
|
3879
|
+
setMenu({ item, x: Math.min(e.clientX, innerWidth - 290), y: Math.min(e.clientY, innerHeight - 440), sure: false });
|
|
3880
|
+
},
|
|
3881
|
+
children: [
|
|
3882
|
+
/* @__PURE__ */ jsx9(Thumb, { host, item, label: t.kinds[item.kind] }),
|
|
3883
|
+
/* @__PURE__ */ jsxs9("span", { className: "w100n-docs-card-text", children: [
|
|
3884
|
+
/* @__PURE__ */ jsx9("b", { children: item.name }),
|
|
3885
|
+
/* @__PURE__ */ jsx9("small", { children: [!spaceId && names2.get(item.spaceId), ago(item.updatedAt)].filter(Boolean).join(" \xB7 ") }),
|
|
3886
|
+
inside.get(item.id) && /* @__PURE__ */ jsx9("small", { className: "w100n-docs-hit", children: inside.get(item.id).split(/[«»]/).map((part, i) => i % 2 ? /* @__PURE__ */ jsx9("mark", { children: part }, i) : part) })
|
|
3887
|
+
] })
|
|
3888
|
+
]
|
|
3889
|
+
},
|
|
3890
|
+
item.id
|
|
3891
|
+
)) })
|
|
3758
3892
|
] }, folder2))
|
|
3759
3893
|
] })
|
|
3760
3894
|
] }),
|
|
@@ -3923,16 +4057,106 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3923
4057
|
setMaking(false);
|
|
3924
4058
|
opened(made);
|
|
3925
4059
|
} }),
|
|
4060
|
+
menu && /* @__PURE__ */ jsxs9("div", { className: "w100n-docs-menu w100n-docs-context", role: "menu", "aria-label": t.fileActions, style: { left: menu.x, top: menu.y }, children: [
|
|
4061
|
+
/* @__PURE__ */ jsxs9("div", { className: "w100n-docs-context-head", children: [
|
|
4062
|
+
/* @__PURE__ */ jsx9("b", { children: menu.item.name }),
|
|
4063
|
+
/* @__PURE__ */ jsx9("small", { children: [t.kinds[menu.item.kind], size(menu.item.size), names2.get(menu.item.spaceId), menu.item.folder].filter(Boolean).join(" \xB7 ") }),
|
|
4064
|
+
menu.item.createdAt && /* @__PURE__ */ jsx9("small", { children: [t.createdOn.replace("{when}", date(menu.item.createdAt)), menu.item.createdBy?.name].filter(Boolean).join(" \xB7 ") }),
|
|
4065
|
+
/* @__PURE__ */ jsx9("small", { children: [t.updatedOn.replace("{when}", ago(menu.item.updatedAt)), menu.item.updatedBy?.name].filter(Boolean).join(" \xB7 ") })
|
|
4066
|
+
] }),
|
|
4067
|
+
menu.sure ? /* @__PURE__ */ jsxs9("div", { className: "w100n-docs-context-ask", children: [
|
|
4068
|
+
/* @__PURE__ */ jsx9("p", { children: t.trashAsk.replace("{name}", menu.item.name) }),
|
|
4069
|
+
/* @__PURE__ */ jsxs9("span", { className: "w100n-pdf-dialog-end", children: [
|
|
4070
|
+
/* @__PURE__ */ jsx9("button", { type: "button", className: "w100n-pdf-link", onClick: () => setMenu({ ...menu, sure: false }), children: t.cancel }),
|
|
4071
|
+
/* @__PURE__ */ jsxs9("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => void drop2(menu.item), children: [
|
|
4072
|
+
/* @__PURE__ */ jsx9(Trash24, { "aria-hidden": true }),
|
|
4073
|
+
t.trash
|
|
4074
|
+
] })
|
|
4075
|
+
] })
|
|
4076
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment8, { children: [
|
|
4077
|
+
/* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => {
|
|
4078
|
+
setMenu(null);
|
|
4079
|
+
open(menu.item);
|
|
4080
|
+
}, children: [
|
|
4081
|
+
/* @__PURE__ */ jsx9(FileText3, { "aria-hidden": true }),
|
|
4082
|
+
t.openFile
|
|
4083
|
+
] }),
|
|
4084
|
+
host.href && /* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => {
|
|
4085
|
+
setMenu(null);
|
|
4086
|
+
window.open(host.href(menu.item.id), "_blank", "noopener");
|
|
4087
|
+
}, children: [
|
|
4088
|
+
/* @__PURE__ */ jsx9(ExternalLink2, { "aria-hidden": true }),
|
|
4089
|
+
t.openTab
|
|
4090
|
+
] }),
|
|
4091
|
+
host.href && /* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => void act(() => navigator.clipboard.writeText(host.href(menu.item.id)), t.linkCopied), children: [
|
|
4092
|
+
/* @__PURE__ */ jsx9(Link2, { "aria-hidden": true }),
|
|
4093
|
+
t.copyLink
|
|
4094
|
+
] }),
|
|
4095
|
+
host.send && /* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => {
|
|
4096
|
+
setMenu(null);
|
|
4097
|
+
host.send(menu.item.id);
|
|
4098
|
+
}, children: [
|
|
4099
|
+
/* @__PURE__ */ jsx9(Send, { "aria-hidden": true }),
|
|
4100
|
+
t.sendChat
|
|
4101
|
+
] }),
|
|
4102
|
+
/* @__PURE__ */ jsx9("hr", {}),
|
|
4103
|
+
host.rename && /* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => {
|
|
4104
|
+
setMenu(null);
|
|
4105
|
+
setNaming({ id: menu.item.id, text: menu.item.name.replace(/\.[^.]+$/, "") });
|
|
4106
|
+
}, children: [
|
|
4107
|
+
/* @__PURE__ */ jsx9(Pencil, { "aria-hidden": true }),
|
|
4108
|
+
t.rename
|
|
4109
|
+
] }),
|
|
4110
|
+
host.create && /* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => void act(async () => copy(await host.document(menu.item.id))), children: [
|
|
4111
|
+
/* @__PURE__ */ jsx9(Copy3, { "aria-hidden": true }),
|
|
4112
|
+
t.makeCopy
|
|
4113
|
+
] }),
|
|
4114
|
+
/* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => void act(() => fetchFile(menu.item)), children: [
|
|
4115
|
+
/* @__PURE__ */ jsx9(Download3, { "aria-hidden": true }),
|
|
4116
|
+
t.download
|
|
4117
|
+
] }),
|
|
4118
|
+
host.saveTemplate && /* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => void act(() => host.saveTemplate(menu.item.id), t.templateSaved), children: [
|
|
4119
|
+
/* @__PURE__ */ jsx9(Bookmark, { "aria-hidden": true }),
|
|
4120
|
+
t.saveTemplate
|
|
4121
|
+
] }),
|
|
4122
|
+
/* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", onClick: () => {
|
|
4123
|
+
setMenu(null);
|
|
4124
|
+
open(menu.item);
|
|
4125
|
+
setTab("details");
|
|
4126
|
+
side("panel", true);
|
|
4127
|
+
}, children: [
|
|
4128
|
+
/* @__PURE__ */ jsx9(Info, { "aria-hidden": true }),
|
|
4129
|
+
t.details
|
|
4130
|
+
] }),
|
|
4131
|
+
host.remove && /* @__PURE__ */ jsxs9(Fragment8, { children: [
|
|
4132
|
+
/* @__PURE__ */ jsx9("hr", {}),
|
|
4133
|
+
/* @__PURE__ */ jsxs9("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setMenu({ ...menu, sure: true }), children: [
|
|
4134
|
+
/* @__PURE__ */ jsx9(Trash24, { "aria-hidden": true }),
|
|
4135
|
+
t.trash
|
|
4136
|
+
] })
|
|
4137
|
+
] })
|
|
4138
|
+
] })
|
|
4139
|
+
] }),
|
|
3926
4140
|
dialog
|
|
3927
4141
|
] });
|
|
3928
4142
|
}
|
|
3929
4143
|
|
|
4144
|
+
// src/FilePreview.tsx
|
|
4145
|
+
import { useState as useState10 } from "react";
|
|
4146
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4147
|
+
function FilePreview({ url, name, mimeType, size = 0, bytes, pdfWorker }) {
|
|
4148
|
+
const [source] = useState10(() => ({ pdfWorker, content: () => bytes ? bytes(url) : fetch(url, { credentials: "include" }).then((res) => res.ok ? res.arrayBuffer() : Promise.reject(new Error(String(res.status)))) }));
|
|
4149
|
+
const kind = kindOf(name, mimeType);
|
|
4150
|
+
if (!kind) return null;
|
|
4151
|
+
return /* @__PURE__ */ jsx10("span", { className: "w100n-preview", children: /* @__PURE__ */ jsx10(Thumb, { host: source, item: { id: url.split("?")[0], spaceId: "", name, kind, size, updatedAt: "" } }) });
|
|
4152
|
+
}
|
|
4153
|
+
|
|
3930
4154
|
// src/GuestDocument.tsx
|
|
3931
|
-
import { lazy as lazy3, Suspense as Suspense3, useRef as useRef7, useState as
|
|
3932
|
-
import { Ban as Ban2, Download as
|
|
3933
|
-
import { Fragment as Fragment9, jsx as
|
|
3934
|
-
var TextEditor3 = lazy3(() => import("./TextEditor-
|
|
3935
|
-
var SheetView3 = lazy3(() => import("./SheetView-
|
|
4155
|
+
import { lazy as lazy3, Suspense as Suspense3, useRef as useRef7, useState as useState11 } from "react";
|
|
4156
|
+
import { Ban as Ban2, Download as Download4, Eye as Eye2, FileDown as FileDown2, FileSpreadsheet as FileSpreadsheet4, FileText as FileText4, FileType as FileType4, Files as Files3, Lock as Lock2, Presentation as Presentation4, UserRound } from "lucide-react";
|
|
4157
|
+
import { Fragment as Fragment9, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4158
|
+
var TextEditor3 = lazy3(() => import("./TextEditor-5S7FSLIZ.js"));
|
|
4159
|
+
var SheetView3 = lazy3(() => import("./SheetView-OEKOHMKW.js"));
|
|
3936
4160
|
var icons4 = { docx: FileText4, markdown: FileType4, pdf: Files3, sheet: FileSpreadsheet4, slides: Presentation4 };
|
|
3937
4161
|
var GuestRefused = class extends Error {
|
|
3938
4162
|
constructor(reason, file = "", sharedBy = "") {
|
|
@@ -3958,14 +4182,14 @@ var remember = (name) => {
|
|
|
3958
4182
|
};
|
|
3959
4183
|
function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
3960
4184
|
const t = texts[language];
|
|
3961
|
-
const [ask, setAsk] =
|
|
3962
|
-
const [typed, setTyped] =
|
|
3963
|
-
const [name, setName] =
|
|
4185
|
+
const [ask, setAsk] = useState11(() => ({ name: remembered() || void 0 }));
|
|
4186
|
+
const [typed, setTyped] = useState11("");
|
|
4187
|
+
const [name, setName] = useState11(remembered);
|
|
3964
4188
|
const named = useRef7(name);
|
|
3965
|
-
const [slot, setSlot] =
|
|
3966
|
-
const [saving, setSaving] =
|
|
4189
|
+
const [slot, setSlot] = useState11(null);
|
|
4190
|
+
const [saving, setSaving] = useState11("idle");
|
|
3967
4191
|
const opened = useLoad((signal) => host.open(ask, { signal }), [host, ask]);
|
|
3968
|
-
const [notes] =
|
|
4192
|
+
const [notes] = useState11(() => ({
|
|
3969
4193
|
me: { id: "", name: "" },
|
|
3970
4194
|
spaces: async () => [],
|
|
3971
4195
|
documents: async () => [],
|
|
@@ -3993,14 +4217,14 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
|
3993
4217
|
const kind2 = file2 ? kindOf(file2.name, file2.mimeType) : null;
|
|
3994
4218
|
const Kind = kind2 ? icons4[kind2] : FileText4;
|
|
3995
4219
|
return /* @__PURE__ */ jsxs10("header", { className: "w100n-docs-bar w100n-guest-bar", children: [
|
|
3996
|
-
brand && /* @__PURE__ */
|
|
4220
|
+
brand && /* @__PURE__ */ jsx11("span", { className: "w100n-guest-brand", children: brand }),
|
|
3997
4221
|
file2 && /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
3998
|
-
/* @__PURE__ */
|
|
4222
|
+
/* @__PURE__ */ jsx11("span", { className: "w100n-docs-tile", "data-kind": kind2, children: /* @__PURE__ */ jsx11(Kind, { "aria-hidden": true }) }),
|
|
3999
4223
|
/* @__PURE__ */ jsxs10("div", { className: "w100n-docs-heading", children: [
|
|
4000
|
-
/* @__PURE__ */
|
|
4001
|
-
file2.sharedBy && /* @__PURE__ */
|
|
4224
|
+
/* @__PURE__ */ jsx11("strong", { className: "w100n-docs-title", children: file2.name }),
|
|
4225
|
+
file2.sharedBy && /* @__PURE__ */ jsx11("span", { className: "w100n-docs-crumbs", children: t.sharedBy.replace("{name}", file2.sharedBy) })
|
|
4002
4226
|
] }),
|
|
4003
|
-
badge && /* @__PURE__ */
|
|
4227
|
+
badge && /* @__PURE__ */ jsx11("span", { className: "w100n-docs-badge", "data-kind": kind2, children: badge }),
|
|
4004
4228
|
file2.download && /* @__PURE__ */ jsxs10("div", { className: "w100n-docs-end", children: [
|
|
4005
4229
|
(kind2 === "docx" || kind2 === "markdown" || kind2 === "sheet" || kind2 === "slides") && /* @__PURE__ */ jsxs10(
|
|
4006
4230
|
"button",
|
|
@@ -4013,14 +4237,14 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
|
4013
4237
|
"aria-label": t.pdfCopy,
|
|
4014
4238
|
title: t.pdfCopy,
|
|
4015
4239
|
children: [
|
|
4016
|
-
/* @__PURE__ */
|
|
4017
|
-
/* @__PURE__ */
|
|
4240
|
+
/* @__PURE__ */ jsx11(FileDown2, { "aria-hidden": true }),
|
|
4241
|
+
/* @__PURE__ */ jsx11("span", { children: t.pdfCopy })
|
|
4018
4242
|
]
|
|
4019
4243
|
}
|
|
4020
4244
|
),
|
|
4021
4245
|
/* @__PURE__ */ jsxs10("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", disabled: saving === "busy", onClick: () => void download("file"), "aria-label": t.download, title: t.download, children: [
|
|
4022
|
-
/* @__PURE__ */
|
|
4023
|
-
/* @__PURE__ */
|
|
4246
|
+
/* @__PURE__ */ jsx11(Download4, { "aria-hidden": true }),
|
|
4247
|
+
/* @__PURE__ */ jsx11("span", { children: t.download })
|
|
4024
4248
|
] })
|
|
4025
4249
|
] })
|
|
4026
4250
|
] })
|
|
@@ -4028,10 +4252,10 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
|
4028
4252
|
};
|
|
4029
4253
|
const gate = (tone, Icon, title, body, form) => /* @__PURE__ */ jsxs10("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
|
|
4030
4254
|
top(null, null),
|
|
4031
|
-
/* @__PURE__ */
|
|
4032
|
-
/* @__PURE__ */
|
|
4033
|
-
/* @__PURE__ */
|
|
4034
|
-
/* @__PURE__ */
|
|
4255
|
+
/* @__PURE__ */ jsx11("div", { className: "w100n-guest-gate", children: /* @__PURE__ */ jsxs10("div", { className: "w100n-guest-card", children: [
|
|
4256
|
+
/* @__PURE__ */ jsx11("span", { className: "w100n-share-tile", "data-tone": tone, children: /* @__PURE__ */ jsx11(Icon, { "aria-hidden": true }) }),
|
|
4257
|
+
/* @__PURE__ */ jsx11("h2", { children: title }),
|
|
4258
|
+
/* @__PURE__ */ jsx11("p", { children: body }),
|
|
4035
4259
|
form
|
|
4036
4260
|
] }) })
|
|
4037
4261
|
] });
|
|
@@ -4057,7 +4281,7 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
|
4057
4281
|
}
|
|
4058
4282
|
setTyped("");
|
|
4059
4283
|
}, children: [
|
|
4060
|
-
/* @__PURE__ */
|
|
4284
|
+
/* @__PURE__ */ jsx11(
|
|
4061
4285
|
"input",
|
|
4062
4286
|
{
|
|
4063
4287
|
className: "w100n-share-input",
|
|
@@ -4070,21 +4294,21 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
|
4070
4294
|
onChange: (e) => setTyped(e.target.value)
|
|
4071
4295
|
}
|
|
4072
4296
|
),
|
|
4073
|
-
refused.reason === "wrong" && /* @__PURE__ */
|
|
4297
|
+
refused.reason === "wrong" && /* @__PURE__ */ jsx11("p", { className: "w100n-docs-muted", role: "alert", children: t.wrongPassword }),
|
|
4074
4298
|
/* @__PURE__ */ jsxs10("button", { type: "submit", className: "w100n-docs-action", disabled: !typed.trim(), children: [
|
|
4075
|
-
/* @__PURE__ */
|
|
4299
|
+
/* @__PURE__ */ jsx11(Eye2, { "aria-hidden": true }),
|
|
4076
4300
|
t.openDoc
|
|
4077
4301
|
] })
|
|
4078
4302
|
] })
|
|
4079
4303
|
);
|
|
4080
4304
|
}
|
|
4081
4305
|
if (refused?.reason === "busy") return gate("slate", Ban2, t.failed, t.tooMany);
|
|
4082
|
-
return gate("slate", Ban2, t.failed, "", /* @__PURE__ */
|
|
4306
|
+
return gate("slate", Ban2, t.failed, "", /* @__PURE__ */ jsx11("button", { type: "button", className: "w100n-docs-action", onClick: opened.retry, children: t.retry }));
|
|
4083
4307
|
}
|
|
4084
4308
|
const file = opened.data;
|
|
4085
4309
|
if (!file) return /* @__PURE__ */ jsxs10("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
|
|
4086
4310
|
top(null, null),
|
|
4087
|
-
/* @__PURE__ */
|
|
4311
|
+
/* @__PURE__ */ jsx11("div", { className: "w100n-docs-empty", children: t.loading })
|
|
4088
4312
|
] });
|
|
4089
4313
|
const kind = kindOf(file.name, file.mimeType);
|
|
4090
4314
|
const text = kind === "docx" || kind === "markdown";
|
|
@@ -4092,23 +4316,23 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
|
4092
4316
|
const rights = { view: true, comment: talk, edit: false };
|
|
4093
4317
|
const quiet2 = () => {
|
|
4094
4318
|
};
|
|
4095
|
-
let stage = /* @__PURE__ */
|
|
4096
|
-
if (text) stage = /* @__PURE__ */
|
|
4097
|
-
else if (kind === "pdf") stage = /* @__PURE__ */
|
|
4098
|
-
else if (kind === "slides") stage = /* @__PURE__ */
|
|
4099
|
-
else if (kind === "sheet") stage = /* @__PURE__ */
|
|
4319
|
+
let stage = /* @__PURE__ */ jsx11("div", { className: "w100n-docs-empty", children: t.unsupported });
|
|
4320
|
+
if (text) stage = /* @__PURE__ */ jsx11(Suspense3, { fallback: /* @__PURE__ */ jsx11("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ jsx11(TextEditor3, { kind, bytes: file.bytes, t, language, rights, host: talk ? notes : void 0, documentId: file.id, onOutline: quiet2, slot: talk ? slot : null }) });
|
|
4321
|
+
else if (kind === "pdf") stage = /* @__PURE__ */ jsx11(PdfView, { bytes: file.bytes, t, language, worker: host.pdfWorker, rights, documentId: file.id, onOutline: quiet2 });
|
|
4322
|
+
else if (kind === "slides") stage = /* @__PURE__ */ jsx11(SlidesView, { html: new TextDecoder().decode(file.bytes), name: file.name, rights, language, theme, onOutline: quiet2 });
|
|
4323
|
+
else if (kind === "sheet") stage = /* @__PURE__ */ jsx11(Suspense3, { fallback: /* @__PURE__ */ jsx11("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ jsx11(SheetView3, { bytes: file.bytes, name: file.name, kind: /\.csv$/i.test(file.name) || file.mimeType === "text/csv" ? "csv" : "xlsx", rights, language, theme, documentId: file.id }) });
|
|
4100
4324
|
return /* @__PURE__ */ jsxs10("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
|
|
4101
4325
|
top(file, talk ? t.badgeComment : t.badgeRead),
|
|
4102
|
-
saving === "failed" && /* @__PURE__ */
|
|
4326
|
+
saving === "failed" && /* @__PURE__ */ jsx11("p", { className: "w100n-docs-muted w100n-guest-note", role: "alert", children: t.exportFailed }),
|
|
4103
4327
|
/* @__PURE__ */ jsxs10("div", { className: "w100n-docs-body w100n-guest-body", children: [
|
|
4104
|
-
/* @__PURE__ */
|
|
4105
|
-
talk && /* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ jsx11("main", { className: "w100n-docs-stage", children: /* @__PURE__ */ jsx11("div", { className: "w100n-docs-bare", children: stage }) }),
|
|
4329
|
+
talk && /* @__PURE__ */ jsx11("aside", { className: "w100n-docs-side w100n-docs-panel w100n-guest-panel", "aria-label": t.comments, children: /* @__PURE__ */ jsxs10("div", { className: "w100n-docs-panel-body", children: [
|
|
4106
4330
|
/* @__PURE__ */ jsxs10("label", { className: "w100n-share-field", children: [
|
|
4107
|
-
/* @__PURE__ */
|
|
4108
|
-
/* @__PURE__ */
|
|
4331
|
+
/* @__PURE__ */ jsx11("span", { children: t.yourName }),
|
|
4332
|
+
/* @__PURE__ */ jsx11("input", { className: "w100n-share-input", value: name, autoComplete: "name", placeholder: t.yourName, onChange: (e) => typeName(e.target.value) })
|
|
4109
4333
|
] }),
|
|
4110
|
-
/* @__PURE__ */
|
|
4111
|
-
/* @__PURE__ */
|
|
4334
|
+
/* @__PURE__ */ jsx11("p", { className: "w100n-docs-muted", children: name.trim() ? t.nameHint : t.nameNeeded }),
|
|
4335
|
+
/* @__PURE__ */ jsx11("div", { ref: setSlot })
|
|
4112
4336
|
] }) })
|
|
4113
4337
|
] })
|
|
4114
4338
|
] });
|
|
@@ -4116,6 +4340,7 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
|
|
|
4116
4340
|
export {
|
|
4117
4341
|
DocumentOverlay,
|
|
4118
4342
|
DocumentsWorkspace,
|
|
4343
|
+
FilePreview,
|
|
4119
4344
|
GuestDocument,
|
|
4120
4345
|
GuestRefused,
|
|
4121
4346
|
SlidesView,
|