@w100n/documents 0.15.1 → 0.16.1
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/Compare-M57FG4R3.js +96 -0
- package/dist/Compare-M57FG4R3.js.map +1 -0
- package/dist/{SheetView-RPQS43XY.js → SheetView-FVLKQR7J.js} +6 -4
- package/dist/{SheetView-RPQS43XY.js.map → SheetView-FVLKQR7J.js.map} +1 -1
- package/dist/{TextEditor-D6QH2B7O.js → TextEditor-BF6HCNHL.js} +500 -369
- package/dist/TextEditor-BF6HCNHL.js.map +1 -0
- package/dist/chunk-EQLBYW42.js +458 -0
- package/dist/chunk-EQLBYW42.js.map +1 -0
- package/dist/{chunk-BGH36LAR.js → chunk-GN3ZOD36.js} +87 -411
- package/dist/chunk-GN3ZOD36.js.map +1 -0
- package/dist/chunk-LZYITB56.js +1032 -0
- package/dist/chunk-LZYITB56.js.map +1 -0
- package/dist/{chunk-XR42B3F5.js → chunk-NPVH2YDI.js} +2 -2
- package/dist/{chunk-CAPICJ6B.js → chunk-ZAVXCH7V.js} +51 -1032
- package/dist/chunk-ZAVXCH7V.js.map +1 -0
- package/dist/collab.cjs +367 -200
- 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 +4 -2
- package/dist/index.cjs +1680 -1230
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +187 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +70 -15
- 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 +25 -2
- package/dist/memory.cjs.map +1 -1
- package/dist/memory.d.cts +3 -2
- package/dist/memory.d.ts +3 -2
- package/dist/memory.js +25 -2
- package/dist/memory.js.map +1 -1
- package/dist/{types-BTsVooZw.d.cts → types-DNcaU6SK.d.cts} +9 -0
- package/dist/{types-BTsVooZw.d.ts → types-DNcaU6SK.d.ts} +9 -0
- package/package.json +1 -1
- package/dist/TextEditor-D6QH2B7O.js.map +0 -1
- package/dist/chunk-BGH36LAR.js.map +0 -1
- package/dist/chunk-CAPICJ6B.js.map +0 -1
- /package/dist/{chunk-XR42B3F5.js.map → chunk-NPVH2YDI.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-DNcaU6SK.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-DNcaU6SK.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';
|
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-DNcaU6SK.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-DNcaU6SK.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';
|
package/dist/index.js
CHANGED
|
@@ -12,12 +12,14 @@ import {
|
|
|
12
12
|
rove,
|
|
13
13
|
useRestore
|
|
14
14
|
} from "./chunk-TDP6OJET.js";
|
|
15
|
+
import {
|
|
16
|
+
texts
|
|
17
|
+
} from "./chunk-LZYITB56.js";
|
|
15
18
|
import {
|
|
16
19
|
escape,
|
|
17
20
|
readDocx,
|
|
18
|
-
texts,
|
|
19
21
|
writeDocx
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZAVXCH7V.js";
|
|
21
23
|
|
|
22
24
|
// src/DocumentOverlay.tsx
|
|
23
25
|
import { Download, ExternalLink, FileSpreadsheet, FileText, FileType, Files, Presentation, X as X4 } from "lucide-react";
|
|
@@ -2407,8 +2409,8 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
|
|
|
2407
2409
|
|
|
2408
2410
|
// src/DocumentOverlay.tsx
|
|
2409
2411
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2410
|
-
var TextEditor = lazy(() => import("./TextEditor-
|
|
2411
|
-
var SheetView = lazy(() => import("./SheetView-
|
|
2412
|
+
var TextEditor = lazy(() => import("./TextEditor-BF6HCNHL.js"));
|
|
2413
|
+
var SheetView = lazy(() => import("./SheetView-FVLKQR7J.js"));
|
|
2412
2414
|
var icons = { docx: FileText, markdown: FileType, pdf: Files, sheet: FileSpreadsheet, slides: Presentation };
|
|
2413
2415
|
var read = { view: true, comment: false, edit: false };
|
|
2414
2416
|
var quiet = () => {
|
|
@@ -2519,6 +2521,7 @@ import {
|
|
|
2519
2521
|
Check as Check2,
|
|
2520
2522
|
ChevronDown as ChevronDown2,
|
|
2521
2523
|
ChevronRight as ChevronRight2,
|
|
2524
|
+
FileDiff,
|
|
2522
2525
|
FileDown,
|
|
2523
2526
|
FilePlus,
|
|
2524
2527
|
FileSpreadsheet as FileSpreadsheet3,
|
|
@@ -2678,14 +2681,20 @@ function NewDocument({ host, t, onClose, onMade }) {
|
|
|
2678
2681
|
const [kind, setKind] = useState6("docx");
|
|
2679
2682
|
const [template, setTemplate] = useState6("blank");
|
|
2680
2683
|
const [name, setName] = useState6("");
|
|
2684
|
+
const [team, setTeam] = useState6(null);
|
|
2685
|
+
const shared = useLoad((signal) => host.templates ? host.templates({ signal }) : Promise.resolve([]), [host]);
|
|
2686
|
+
const ours = (shared.data ?? []).filter((item) => item.kind === kind);
|
|
2687
|
+
const stem = (file) => file.replace(/\.[^.]+$/, "");
|
|
2681
2688
|
const [state, setState] = useState6("idle");
|
|
2682
2689
|
useRestore(true);
|
|
2683
2690
|
const choices = kind === "docx" || kind === "markdown" ? shaped : ["blank"];
|
|
2684
2691
|
const make2 = async () => {
|
|
2685
|
-
const title = name.trim() || (template === "blank" ? t.untitled : t.templates[template]);
|
|
2692
|
+
const title = name.trim() || (team ? stem(team.name) : template === "blank" ? t.untitled : t.templates[template]);
|
|
2686
2693
|
setState("busy");
|
|
2687
2694
|
try {
|
|
2688
|
-
|
|
2695
|
+
const ext = team ? team.name.split(".").pop() : extensions[kind];
|
|
2696
|
+
const bytes = team ? await host.content(team.id) : blank2(kind, title, template);
|
|
2697
|
+
onMade(await host.create({ name: `${title.replace(/[\\/:*?"<>|\s]+/g, " ").trim()}.${ext}`, bytes, mimeType: mimes[kind] }));
|
|
2689
2698
|
} catch {
|
|
2690
2699
|
setState("failed");
|
|
2691
2700
|
}
|
|
@@ -2708,6 +2717,7 @@ function NewDocument({ host, t, onClose, onMade }) {
|
|
|
2708
2717
|
const Icon = icons2[item];
|
|
2709
2718
|
return /* @__PURE__ */ jsxs6("button", { type: "button", role: "radio", "aria-checked": kind === item, "data-kind": item, onClick: () => {
|
|
2710
2719
|
setKind(item);
|
|
2720
|
+
setTeam(null);
|
|
2711
2721
|
if (item === "sheet" || item === "slides") setTemplate("blank");
|
|
2712
2722
|
}, children: [
|
|
2713
2723
|
/* @__PURE__ */ jsx6("span", { className: "w100n-docs-tile", "data-kind": item, children: /* @__PURE__ */ jsx6(Icon, { "aria-hidden": true }) }),
|
|
@@ -2718,7 +2728,10 @@ function NewDocument({ host, t, onClose, onMade }) {
|
|
|
2718
2728
|
] }, item);
|
|
2719
2729
|
}) }),
|
|
2720
2730
|
/* @__PURE__ */ jsx6("p", { className: "w100n-docs-caption", children: t.startFrom }),
|
|
2721
|
-
/* @__PURE__ */ jsx6("div", { role: "radiogroup", "aria-label": t.startFrom, className: "w100n-new-templates", children: choices.map((item) => /* @__PURE__ */ jsxs6("button", { type: "button", role: "radio", "aria-checked": template === item, onClick: () =>
|
|
2731
|
+
/* @__PURE__ */ jsx6("div", { role: "radiogroup", "aria-label": t.startFrom, className: "w100n-new-templates", children: choices.map((item) => /* @__PURE__ */ jsxs6("button", { type: "button", role: "radio", "aria-checked": !team && template === item, onClick: () => {
|
|
2732
|
+
setTeam(null);
|
|
2733
|
+
setTemplate(item);
|
|
2734
|
+
}, children: [
|
|
2722
2735
|
/* @__PURE__ */ jsx6("span", { className: "w100n-new-sheet", "data-blank": item === "blank", children: item === "blank" ? /* @__PURE__ */ jsx6(Plus2, { "aria-hidden": true }) : /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
2723
2736
|
/* @__PURE__ */ jsx6("i", { "data-head": true }),
|
|
2724
2737
|
/* @__PURE__ */ jsx6("i", {}),
|
|
@@ -2729,10 +2742,23 @@ function NewDocument({ host, t, onClose, onMade }) {
|
|
|
2729
2742
|
] }) }),
|
|
2730
2743
|
/* @__PURE__ */ jsx6("span", { children: t.templates[item] })
|
|
2731
2744
|
] }, item)) }),
|
|
2745
|
+
ours.length > 0 && /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
2746
|
+
/* @__PURE__ */ jsx6("p", { className: "w100n-docs-caption", children: t.teamTemplates }),
|
|
2747
|
+
/* @__PURE__ */ jsx6("div", { role: "radiogroup", "aria-label": t.teamTemplates, className: "w100n-new-templates", children: ours.map((item) => /* @__PURE__ */ jsxs6("button", { type: "button", role: "radio", "aria-checked": team?.id === item.id, onClick: () => setTeam(item), children: [
|
|
2748
|
+
/* @__PURE__ */ jsxs6("span", { className: "w100n-new-sheet", children: [
|
|
2749
|
+
/* @__PURE__ */ jsx6("i", { "data-head": true }),
|
|
2750
|
+
/* @__PURE__ */ jsx6("i", {}),
|
|
2751
|
+
/* @__PURE__ */ jsx6("i", { "data-accent": true }),
|
|
2752
|
+
/* @__PURE__ */ jsx6("i", {}),
|
|
2753
|
+
/* @__PURE__ */ jsx6("i", {})
|
|
2754
|
+
] }),
|
|
2755
|
+
/* @__PURE__ */ jsx6("span", { title: item.name, children: stem(item.name) })
|
|
2756
|
+
] }, item.id)) })
|
|
2757
|
+
] }),
|
|
2732
2758
|
/* @__PURE__ */ jsxs6("div", { className: "w100n-new-fields", children: [
|
|
2733
2759
|
/* @__PURE__ */ jsxs6("label", { children: [
|
|
2734
2760
|
/* @__PURE__ */ jsx6("span", { className: "w100n-docs-caption", children: t.name }),
|
|
2735
|
-
/* @__PURE__ */ jsx6("input", { className: "w100n-docs-field", autoFocus: true, value: name, onChange: (e) => setName(e.target.value), placeholder: template === "blank" ? t.untitled : t.templates[template] })
|
|
2761
|
+
/* @__PURE__ */ jsx6("input", { className: "w100n-docs-field", autoFocus: true, value: name, onChange: (e) => setName(e.target.value), placeholder: team ? stem(team.name) : template === "blank" ? t.untitled : t.templates[template] })
|
|
2736
2762
|
] }),
|
|
2737
2763
|
host.createIn && /* @__PURE__ */ jsxs6("div", { children: [
|
|
2738
2764
|
/* @__PURE__ */ jsx6("span", { className: "w100n-docs-caption", children: t.savesTo }),
|
|
@@ -3097,8 +3123,9 @@ function Thumb({ host, item, label }) {
|
|
|
3097
3123
|
|
|
3098
3124
|
// src/DocumentsWorkspace.tsx
|
|
3099
3125
|
import { Fragment as Fragment8, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3100
|
-
var TextEditor2 = lazy2(() => import("./TextEditor-
|
|
3101
|
-
var SheetView2 = lazy2(() => import("./SheetView-
|
|
3126
|
+
var TextEditor2 = lazy2(() => import("./TextEditor-BF6HCNHL.js"));
|
|
3127
|
+
var SheetView2 = lazy2(() => import("./SheetView-FVLKQR7J.js"));
|
|
3128
|
+
var Compare = lazy2(() => import("./Compare-M57FG4R3.js"));
|
|
3102
3129
|
var icons3 = { docx: FileText3, markdown: FileType3, pdf: Files2, sheet: FileSpreadsheet3, slides: Presentation3 };
|
|
3103
3130
|
function DocumentsWorkspace({ host, language = "en", theme = "light", place, onPlace, start, end, aside, actions }) {
|
|
3104
3131
|
const t = texts[language];
|
|
@@ -3175,9 +3202,11 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3175
3202
|
const [fold, setFold] = useState9({});
|
|
3176
3203
|
const [version, setVersion] = useState9({ documentId: null, id: null });
|
|
3177
3204
|
const versionId = version.documentId === here.documentId ? version.id : null;
|
|
3205
|
+
const [comparing, setComparing] = useState9(false);
|
|
3178
3206
|
const [restoring, setRestoring] = useState9("idle");
|
|
3179
3207
|
const [exporting, setExporting] = useState9("idle");
|
|
3180
3208
|
const [copying, setCopying] = useState9("idle");
|
|
3209
|
+
const [kept, setKept] = useState9(null);
|
|
3181
3210
|
const [box, setBox] = useState9(null);
|
|
3182
3211
|
const [making, setMaking] = useState9(false);
|
|
3183
3212
|
const [sending, setSending] = useState9("idle");
|
|
@@ -3215,7 +3244,14 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3215
3244
|
const docbar = text && !versionId && !narrow;
|
|
3216
3245
|
const signatures = useLoad((signal) => here.documentId && pdf && host.signatures ? host.signatures(here.documentId, { signal }) : Promise.resolve([]), [host, here.documentId, pdf]);
|
|
3217
3246
|
const all = list.data ?? [];
|
|
3218
|
-
const
|
|
3247
|
+
const deep = useLoad(async (signal) => {
|
|
3248
|
+
const text2 = query.trim();
|
|
3249
|
+
if (!host.search || text2.length < 2) return [];
|
|
3250
|
+
await new Promise((done) => setTimeout(done, 300));
|
|
3251
|
+
return signal.aborted ? [] : host.search(text2, { signal });
|
|
3252
|
+
}, [host, query]);
|
|
3253
|
+
const inside = new Map((deep.data ?? []).map((hit2) => [hit2.id, hit2.excerpt]));
|
|
3254
|
+
const shown = all.filter((item) => matches(item, query, picked) || inside.has(item.id) && matches(item, "", picked));
|
|
3219
3255
|
const present = kinds.filter((item) => all.some((doc2) => doc2.kind === item));
|
|
3220
3256
|
const folders = spaceId ? [.../* @__PURE__ */ new Set(["", ...shown.map((item) => item.folder ?? "")])].filter((folder2) => shown.some((item) => (item.folder ?? "") === folder2)) : [""];
|
|
3221
3257
|
const names2 = new Map((spaces.data ?? []).map((item) => [item.id, item.name]));
|
|
@@ -3271,6 +3307,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3271
3307
|
if (id === versionId) return;
|
|
3272
3308
|
ask(() => {
|
|
3273
3309
|
setRestoring("idle");
|
|
3310
|
+
setComparing(false);
|
|
3274
3311
|
setVersion({ documentId: here.documentId, id });
|
|
3275
3312
|
});
|
|
3276
3313
|
};
|
|
@@ -3324,6 +3361,15 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3324
3361
|
setCopying("failed");
|
|
3325
3362
|
}
|
|
3326
3363
|
};
|
|
3364
|
+
const keep = async (file) => {
|
|
3365
|
+
setKept({ id: file.id, state: "busy" });
|
|
3366
|
+
try {
|
|
3367
|
+
await host.saveTemplate(file.id);
|
|
3368
|
+
setKept({ id: file.id, state: "done" });
|
|
3369
|
+
} catch {
|
|
3370
|
+
setKept({ id: file.id, state: "failed" });
|
|
3371
|
+
}
|
|
3372
|
+
};
|
|
3327
3373
|
const rename = async (file, draft) => {
|
|
3328
3374
|
setRenaming(null);
|
|
3329
3375
|
const ext = /\.[^.]+$/.exec(file.name)?.[0] ?? "";
|
|
@@ -3362,6 +3408,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3362
3408
|
content.retry();
|
|
3363
3409
|
});
|
|
3364
3410
|
else if (!doc.data || !content.data) stage = /* @__PURE__ */ jsx9("div", { className: "w100n-docs-empty", children: t.loading });
|
|
3411
|
+
else if (comparing && versionId && (doc.data.kind === "markdown" || doc.data.kind === "docx")) stage = /* @__PURE__ */ jsx9(Suspense2, { fallback: /* @__PURE__ */ jsx9("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ jsx9(Compare, { host, documentId: doc.data.id, kind: doc.data.kind, older: content.data, t }, versionId) });
|
|
3365
3412
|
else if (doc.data.kind === "markdown" || doc.data.kind === "docx") stage = /* @__PURE__ */ jsx9(Suspense2, { fallback: /* @__PURE__ */ jsx9("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ jsx9(
|
|
3366
3413
|
TextEditor2,
|
|
3367
3414
|
{
|
|
@@ -3387,7 +3434,8 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3387
3434
|
formats: host.exportAs ? doc.data.exports ?? [] : [],
|
|
3388
3435
|
download: (f) => void exportAs(doc.data, f),
|
|
3389
3436
|
copy: host.create ? () => void copy(doc.data) : void 0,
|
|
3390
|
-
rename: host.rename && doc.data.rights.edit ? () => setRenaming(doc.data.name.replace(/\.[^.]+$/, "")) : void 0
|
|
3437
|
+
rename: host.rename && doc.data.rights.edit ? () => setRenaming(doc.data.name.replace(/\.[^.]+$/, "")) : void 0,
|
|
3438
|
+
template: host.saveTemplate && doc.data.rights.edit ? () => void keep(doc.data) : void 0
|
|
3391
3439
|
},
|
|
3392
3440
|
onSaved: () => {
|
|
3393
3441
|
versions.retry();
|
|
@@ -3550,6 +3598,10 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3550
3598
|
] }, i)) }) : /* @__PURE__ */ jsx9("span", { className: "w100n-docs-hint", children: t.hint })
|
|
3551
3599
|
] }),
|
|
3552
3600
|
versionId && /* @__PURE__ */ jsx9("span", { className: "w100n-docs-badge", children: versions.data?.find((v) => v.id === versionId) && date(versions.data.find((v) => v.id === versionId).createdAt) }),
|
|
3601
|
+
versionId && text && /* @__PURE__ */ jsxs9("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", "aria-pressed": comparing, onClick: () => setComparing(!comparing), children: [
|
|
3602
|
+
/* @__PURE__ */ jsx9(FileDiff, { "aria-hidden": true }),
|
|
3603
|
+
comparing ? t.hideChanges : t.showChanges
|
|
3604
|
+
] }),
|
|
3553
3605
|
versionId && here.documentId && host.restore && doc.data?.rights.edit && /* @__PURE__ */ jsxs9("button", { type: "button", className: "w100n-docs-action", disabled: restoring === "busy", onClick: () => void restore(here.documentId, versionId), children: [
|
|
3554
3606
|
/* @__PURE__ */ jsx9(RotateCcw2, { "aria-hidden": true }),
|
|
3555
3607
|
t.restore
|
|
@@ -3560,6 +3612,8 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3560
3612
|
t.copyAs
|
|
3561
3613
|
] }),
|
|
3562
3614
|
copying === "failed" && /* @__PURE__ */ jsx9("span", { className: "w100n-docs-muted", children: t.copyFailed }),
|
|
3615
|
+
kept?.id === here.documentId && kept.state === "done" && /* @__PURE__ */ jsx9("span", { className: "w100n-docs-muted", role: "status", children: t.templateSaved }),
|
|
3616
|
+
kept?.id === here.documentId && kept.state === "failed" && /* @__PURE__ */ jsx9("span", { className: "w100n-docs-muted", role: "alert", children: t.templateFailed }),
|
|
3563
3617
|
renamed === "failed" && /* @__PURE__ */ jsx9("span", { className: "w100n-docs-muted", children: t.renameFailed }),
|
|
3564
3618
|
docbar && /* @__PURE__ */ jsx9("span", { ref: setStatusAt, className: "w100n-docs-status" }),
|
|
3565
3619
|
sharing && /* @__PURE__ */ jsxs9("button", { type: "button", className: "w100n-docs-action", "aria-label": t.share, title: t.share, onClick: () => {
|
|
@@ -3697,7 +3751,8 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3697
3751
|
/* @__PURE__ */ jsx9(Thumb, { host, item, label: t.kinds[item.kind] }),
|
|
3698
3752
|
/* @__PURE__ */ jsxs9("span", { className: "w100n-docs-card-text", children: [
|
|
3699
3753
|
/* @__PURE__ */ jsx9("b", { children: item.name }),
|
|
3700
|
-
/* @__PURE__ */ jsx9("small", { children: [!spaceId && names2.get(item.spaceId), ago(item.updatedAt)].filter(Boolean).join(" \xB7 ") })
|
|
3754
|
+
/* @__PURE__ */ jsx9("small", { children: [!spaceId && names2.get(item.spaceId), ago(item.updatedAt)].filter(Boolean).join(" \xB7 ") }),
|
|
3755
|
+
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) })
|
|
3701
3756
|
] })
|
|
3702
3757
|
] }, item.id)) })
|
|
3703
3758
|
] }, folder2))
|
|
@@ -3876,8 +3931,8 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place, onP
|
|
|
3876
3931
|
import { lazy as lazy3, Suspense as Suspense3, useRef as useRef7, useState as useState10 } from "react";
|
|
3877
3932
|
import { Ban as Ban2, Download as Download3, 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";
|
|
3878
3933
|
import { Fragment as Fragment9, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3879
|
-
var TextEditor3 = lazy3(() => import("./TextEditor-
|
|
3880
|
-
var SheetView3 = lazy3(() => import("./SheetView-
|
|
3934
|
+
var TextEditor3 = lazy3(() => import("./TextEditor-BF6HCNHL.js"));
|
|
3935
|
+
var SheetView3 = lazy3(() => import("./SheetView-FVLKQR7J.js"));
|
|
3881
3936
|
var icons4 = { docx: FileText4, markdown: FileType4, pdf: Files3, sheet: FileSpreadsheet4, slides: Presentation4 };
|
|
3882
3937
|
var GuestRefused = class extends Error {
|
|
3883
3938
|
constructor(reason, file = "", sharedBy = "") {
|