@w100n/documents 0.18.1 → 0.19.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/index.cjs CHANGED
@@ -3905,21 +3905,21 @@ var init_write = __esm({
3905
3905
  head2 = `<w:tbl>${tblPr}<w:tblGrid>${`<w:gridCol w:w="${Math.floor(this.textWidth() / cols)}"/>`.repeat(cols)}</w:tblGrid>`;
3906
3906
  }
3907
3907
  const width = Math.floor(this.textWidth() / cols);
3908
- const sized = [];
3908
+ const sized2 = [];
3909
3909
  for (const r of layout2) for (const sl of r) {
3910
3910
  const own2 = sl.cell && value("colwidth", sl.cell.attrs?.colwidth);
3911
3911
  if (own2 && own2.length === sl.span) own2.forEach((w, k) => {
3912
3912
  var _a;
3913
- return sized[_a = sl.col + k] ?? (sized[_a] = w);
3913
+ return sized2[_a = sl.col + k] ?? (sized2[_a] = w);
3914
3914
  });
3915
3915
  }
3916
- const known = sized.length === cols && sized.every(Boolean);
3916
+ const known = sized2.length === cols && sized2.every(Boolean);
3917
3917
  const had = [...head2.matchAll(/<w:gridCol\b[^>]*\bw:w="(\d+)"/g)].map((m) => Math.floor(+m[1] / 15));
3918
- if (known && had.join() !== sized.join()) {
3919
- const list = sized.map((w) => `<w:gridCol w:w="${Math.round(w * 15)}"/>`).join("");
3918
+ if (known && had.join() !== sized2.join()) {
3919
+ const list = sized2.map((w) => `<w:gridCol w:w="${Math.round(w * 15)}"/>`).join("");
3920
3920
  head2 = head2.replace(/(<w:tblGrid\b[^>]*>)[\s\S]*?(<\/w:tblGrid>)/, `$1${list}$2`);
3921
3921
  }
3922
- const own = (col, span2) => known ? sized.slice(col, col + span2) : null;
3922
+ const own = (col, span2) => known ? sized2.slice(col, col + span2) : null;
3923
3923
  const borders = value("borders", o.node.attrs?.borders);
3924
3924
  if (borders !== value("borders", b?.node.attrs?.borders)) {
3925
3925
  const line = (side2) => `<w:${side2} w:val="${borders === "none" ? "none" : "single"}" w:sz="4" w:space="0" w:color="${borders === "none" ? "auto" : "94A3B8"}"/>`;
@@ -3986,15 +3986,15 @@ var init_write = __esm({
3986
3986
  const el = src && kid(src.el, "w:tcPr");
3987
3987
  const xml = el ? s.slice(el.start, el.end) : "";
3988
3988
  const tcW = el && kid(el, "w:tcW");
3989
- const sized = own ? Math.round(own.reduce((a, w) => a + w, 0) * 15) : null;
3990
- const resized = sized !== null && !(tcW && attr(s, tcW, "w:type") === "dxa" && Math.abs(+(attr(s, tcW, "w:w") ?? 0) - sized) < 15);
3989
+ const sized2 = own ? Math.round(own.reduce((a, w) => a + w, 0) * 15) : null;
3990
+ const resized = sized2 !== null && !(tcW && attr(s, tcW, "w:type") === "dxa" && Math.abs(+(attr(s, tcW, "w:w") ?? 0) - sized2) < 15);
3991
3991
  const was = src?.node ? value("background", src.node.attrs?.background) : null;
3992
3992
  const painted = fill3 !== void 0 && fill3 !== was;
3993
3993
  if (!clone && src && src.span === span2 && src.vm === vm && !resized && !painted) return xml;
3994
3994
  const set = { "w:gridSpan": span2 > 1 ? `<w:gridSpan w:val="${span2}"/>` : null, "w:vMerge": vm === "restart" ? '<w:vMerge w:val="restart"/>' : vm ? "<w:vMerge/>" : null, "w:hMerge": null };
3995
3995
  if (clone) Object.assign(set, { "w:cellIns": null, "w:cellDel": null, "w:cellMerge": null, "w:tcPrChange": null });
3996
3996
  if (painted) set["w:shd"] = fill3 ? `<w:shd w:val="clear" w:color="auto" w:fill="${fill3.slice(1).toUpperCase()}"/>` : null;
3997
- if (resized) set["w:tcW"] = `<w:tcW w:w="${sized}" w:type="dxa"/>`;
3997
+ if (resized) set["w:tcW"] = `<w:tcW w:w="${sized2}" w:type="dxa"/>`;
3998
3998
  else if (!tcW && !src) set["w:tcW"] = `<w:tcW w:w="${width * span2}" w:type="dxa"/>`;
3999
3999
  else if (tcW && src && src.span !== span2 && attr(xml, tcW, "w:type") === "dxa") set["w:tcW"] = `<w:tcW w:w="${Math.round(+(attr(xml, tcW, "w:w") ?? 0) * span2 / src.span)}" w:type="dxa"/>`;
4000
4000
  return rebuild(xml, "w:tcPr", TC, set);
@@ -4067,17 +4067,17 @@ function DocxView({ bytes, onOutline, failed }) {
4067
4067
  let live = true;
4068
4068
  let width = 0;
4069
4069
  const root = box2.current;
4070
- const fit = () => {
4070
+ const fit2 = () => {
4071
4071
  const wrapper = root.querySelector(".w100n-docx-wrapper");
4072
4072
  if (wrapper && width) wrapper.style.zoom = String(Math.min(1, root.clientWidth / width));
4073
4073
  };
4074
- const watch = new ResizeObserver(fit);
4074
+ const watch = new ResizeObserver(fit2);
4075
4075
  root.replaceChildren();
4076
4076
  setError(false);
4077
4077
  import("docx-preview").then(({ renderAsync }) => renderAsync(bytes, root, void 0, { inWrapper: true, className: "w100n-docx", ignoreLastRenderedPageBreak: true, renderAltChunks: false })).then(() => {
4078
4078
  if (!live) return;
4079
4079
  width = Math.max(0, ...[...root.querySelectorAll("section.w100n-docx")].map((page) => page.offsetWidth));
4080
- fit();
4080
+ fit2();
4081
4081
  watch.observe(root);
4082
4082
  onOutline(collect(root, '[class*="heading"]', (el) => Number(/heading(\d)/i.exec(el.className)?.[1] ?? 1)));
4083
4083
  }).catch(() => {
@@ -4993,7 +4993,7 @@ var init_wiki = __esm({
4993
4993
  var version;
4994
4994
  var init_package = __esm({
4995
4995
  "package.json"() {
4996
- version = "0.18.1";
4996
+ version = "0.19.1";
4997
4997
  }
4998
4998
  });
4999
4999
 
@@ -7746,6 +7746,9 @@ var init_text2 = __esm({
7746
7746
  loading: "Opening the sheet",
7747
7747
  failed: "This sheet could not be opened",
7748
7748
  retry: "Try again",
7749
+ fontSize: "Font size",
7750
+ smaller: "Smaller text",
7751
+ bigger: "Bigger text",
7749
7752
  undo: "Undo",
7750
7753
  redo: "Redo",
7751
7754
  bold: "Bold",
@@ -7819,6 +7822,9 @@ var init_text2 = __esm({
7819
7822
  loading: "Otwieranie arkusza",
7820
7823
  failed: "Nie uda\u0142o si\u0119 otworzy\u0107 tego arkusza",
7821
7824
  retry: "Spr\xF3buj ponownie",
7825
+ fontSize: "Rozmiar czcionki",
7826
+ smaller: "Mniejszy tekst",
7827
+ bigger: "Wi\u0119kszy tekst",
7822
7828
  undo: "Cofnij",
7823
7829
  redo: "Pon\xF3w",
7824
7830
  bold: "Pogrubienie",
@@ -7892,6 +7898,9 @@ var init_text2 = __esm({
7892
7898
  loading: "\u0412\u0456\u0434\u043A\u0440\u0438\u0432\u0430\u0454\u043C\u043E \u0442\u0430\u0431\u043B\u0438\u0446\u044E",
7893
7899
  failed: "\u041D\u0435 \u0432\u0434\u0430\u043B\u043E\u0441\u044F \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0446\u044E \u0442\u0430\u0431\u043B\u0438\u0446\u044E",
7894
7900
  retry: "\u0421\u043F\u0440\u043E\u0431\u0443\u0432\u0430\u0442\u0438 \u0449\u0435",
7901
+ fontSize: "\u0420\u043E\u0437\u043C\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0443",
7902
+ smaller: "\u041C\u0435\u043D\u0448\u0438\u0439 \u0442\u0435\u043A\u0441\u0442",
7903
+ bigger: "\u0411\u0456\u043B\u044C\u0448\u0438\u0439 \u0442\u0435\u043A\u0441\u0442",
7895
7904
  undo: "\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",
7896
7905
  redo: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",
7897
7906
  bold: "\u0416\u0438\u0440\u043D\u0438\u0439",
@@ -8355,6 +8364,56 @@ var init_Mentions = __esm({
8355
8364
  }
8356
8365
  });
8357
8366
 
8367
+ // src/Swatches.tsx
8368
+ function Swatches({ current, none, onPick, onNone }) {
8369
+ const chosen = current?.toLowerCase() ?? null;
8370
+ const swatch = (c) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8371
+ "button",
8372
+ {
8373
+ type: "button",
8374
+ className: "w100n-swatch",
8375
+ "aria-label": c,
8376
+ "aria-pressed": chosen === c,
8377
+ "data-light": light(c) || void 0,
8378
+ style: { background: c },
8379
+ onClick: () => onPick(c),
8380
+ children: chosen === c && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Check, { "aria-hidden": true })
8381
+ },
8382
+ c
8383
+ );
8384
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-swatches", role: "group", children: [
8385
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-swatches-none", "aria-pressed": !chosen, onClick: onNone, children: none }),
8386
+ neutrals.map(swatch),
8387
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-swatches-gap" }),
8388
+ [0, 1, 2].flatMap((tone) => hues.map((h) => swatch(h[tone])))
8389
+ ] });
8390
+ }
8391
+ var import_lucide_react5, import_jsx_runtime7, neutrals, hues, light;
8392
+ var init_Swatches = __esm({
8393
+ "src/Swatches.tsx"() {
8394
+ "use strict";
8395
+ import_lucide_react5 = require("lucide-react");
8396
+ import_jsx_runtime7 = require("react/jsx-runtime");
8397
+ neutrals = ["#000000", "#475569", "#94a3b8", "#e2e8f0", "#ffffff"];
8398
+ hues = [
8399
+ ["#fecaca", "#dc2626", "#991b1b"],
8400
+ ["#fed7aa", "#ea580c", "#9a3412"],
8401
+ ["#fde68a", "#d97706", "#92400e"],
8402
+ ["#fef08a", "#ca8a04", "#854d0e"],
8403
+ ["#bbf7d0", "#16a34a", "#166534"],
8404
+ ["#99f6e4", "#0d9488", "#115e59"],
8405
+ ["#bae6fd", "#0284c7", "#075985"],
8406
+ ["#bfdbfe", "#2563eb", "#1e40af"],
8407
+ ["#ddd6fe", "#7c3aed", "#5b21b6"],
8408
+ ["#fbcfe8", "#db2777", "#9d174d"]
8409
+ ];
8410
+ light = (hex2) => {
8411
+ const n = parseInt(hex2.slice(1), 16);
8412
+ return ((n >> 16) * 299 + (n >> 8 & 255) * 587 + (n & 255) * 114) / 1e3 > 150;
8413
+ };
8414
+ }
8415
+ });
8416
+
8358
8417
  // src/editor/TextEditor.tsx
8359
8418
  var TextEditor_exports = {};
8360
8419
  __export(TextEditor_exports, {
@@ -8690,8 +8749,8 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8690
8749
  (0, import_react11.useEffect)(() => {
8691
8750
  if (editor && !editor.isDestroyed) editor.view.dispatch(editor.state.tr.setMeta("wiki", true));
8692
8751
  }, [editor, roster]);
8693
- if (source.error) return docx2 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-docs-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DocxView, { bytes, onOutline, failed: t.failed }) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-docs-empty", children: t.failed });
8694
- if (!source.data || !editor || !state || live && !live.ready && !live.late && !live.denied) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
8752
+ if (source.error) return docx2 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-docs-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DocxView, { bytes, onOutline, failed: t.failed }) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-docs-empty", children: t.failed });
8753
+ if (!source.data || !editor || !state || live && !live.ready && !live.late && !live.denied) return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
8695
8754
  const save2 = async (auto = false) => {
8696
8755
  if (live) {
8697
8756
  if (!can.edit || !live.ready || !live.online || !live.pending || saving === "busy") return false;
@@ -8866,11 +8925,11 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8866
8925
  };
8867
8926
  const tool = (icon, label, run3, pressed, disabled) => {
8868
8927
  const Icon = icon;
8869
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": label, title: label, "aria-pressed": pressed, disabled, onClick: () => {
8928
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": label, title: label, "aria-pressed": pressed, disabled, onClick: () => {
8870
8929
  run3();
8871
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { "aria-hidden": true }) });
8930
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { "aria-hidden": true }) });
8872
8931
  };
8873
- const gap = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-pdf-gap" });
8932
+ const gap = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-pdf-gap" });
8874
8933
  const known = source.data.styles;
8875
8934
  const named3 = (test) => {
8876
8935
  const name = known.find(test)?.name;
@@ -8889,28 +8948,28 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8889
8948
  ];
8890
8949
  const margins = [[t.marginsNormal, [96, 96, 96, 96]], [t.marginsNarrow, [48, 48, 48, 48]], [t.marginsWide, [96, 192, 96, 192]]];
8891
8950
  const when = (iso) => new Intl.DateTimeFormat(language, { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }).format(new Date(iso));
8892
- const person = (c) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { children: [
8893
- c.author.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { className: "w100n-text-face", src: c.author.avatarUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: c.author.name.slice(0, 1).toUpperCase() }),
8894
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-who", children: [
8895
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("b", { children: [
8951
+ const person = (c) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { children: [
8952
+ c.author.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { className: "w100n-text-face", src: c.author.avatarUrl, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: c.author.name.slice(0, 1).toUpperCase() }),
8953
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-who", children: [
8954
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { children: [
8896
8955
  c.author.name,
8897
- c.author.id.startsWith("guest:") && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-docs-badge", children: t.guest })
8956
+ c.author.id.startsWith("guest:") && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-badge", children: t.guest })
8898
8957
  ] }),
8899
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: when(c.createdAt) })
8958
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: when(c.createdAt) })
8900
8959
  ] }),
8901
- drops(c) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-own", onClick: (e) => e.stopPropagation(), children: [
8902
- mine(c) && host.editComment && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": t.editComment, title: t.editComment, onClick: () => {
8960
+ drops(c) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-own", onClick: (e) => e.stopPropagation(), children: [
8961
+ mine(c) && host.editComment && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": t.editComment, title: t.editComment, onClick: () => {
8903
8962
  setDropping(null);
8904
8963
  setEditing({ id: c.id, body: c.body });
8905
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Pencil, { "aria-hidden": true }) }),
8906
- host.deleteComment && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-tone": "red", "aria-label": t.delete, title: t.delete, onClick: () => {
8964
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Pencil, { "aria-hidden": true }) }),
8965
+ host.deleteComment && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-tone": "red", "aria-label": t.delete, title: t.delete, onClick: () => {
8907
8966
  setEditing(null);
8908
8967
  setDropping(c.id);
8909
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Trash2, { "aria-hidden": true }) })
8968
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Trash2, { "aria-hidden": true }) })
8910
8969
  ] })
8911
8970
  ] });
8912
- const words3 = (c) => editing?.id === c.id ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-reply w100n-text-edit", onClick: (e) => e.stopPropagation(), children: [
8913
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8971
+ const words3 = (c) => editing?.id === c.id ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-reply w100n-text-edit", onClick: (e) => e.stopPropagation(), children: [
8972
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8914
8973
  "textarea",
8915
8974
  {
8916
8975
  autoFocus: true,
@@ -8922,33 +8981,33 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8922
8981
  }
8923
8982
  }
8924
8983
  ),
8925
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
8926
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setEditing(null), children: t.cancel }),
8927
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !editing.body.trim() || editing.body.trim() === c.body || posting === "busy", onClick: () => void change(c.id, editing.body.trim()), children: [
8928
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Save, { "aria-hidden": true }),
8984
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
8985
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setEditing(null), children: t.cancel }),
8986
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !editing.body.trim() || editing.body.trim() === c.body || posting === "busy", onClick: () => void change(c.id, editing.body.trim()), children: [
8987
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Save, { "aria-hidden": true }),
8929
8988
  t.save
8930
8989
  ] })
8931
8990
  ] })
8932
- ] }) : dropping === c.id ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-confirm", role: "group", "aria-label": t.delete, onClick: (e) => e.stopPropagation(), children: [
8933
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: c.replyTo || !all.some((r) => r.replyTo === c.id) ? t.deleteAsk : t.deleteThread }),
8934
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
8935
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", autoFocus: true, onClick: () => setDropping(null), children: t.cancel }),
8936
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", disabled: posting === "busy", onClick: () => void change(c.id, null), children: [
8937
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Trash2, { "aria-hidden": true }),
8991
+ ] }) : dropping === c.id ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-confirm", role: "group", "aria-label": t.delete, onClick: (e) => e.stopPropagation(), children: [
8992
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: c.replyTo || !all.some((r) => r.replyTo === c.id) ? t.deleteAsk : t.deleteThread }),
8993
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
8994
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", autoFocus: true, onClick: () => setDropping(null), children: t.cancel }),
8995
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", disabled: posting === "busy", onClick: () => void change(c.id, null), children: [
8996
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Trash2, { "aria-hidden": true }),
8938
8997
  t.delete
8939
8998
  ] })
8940
8999
  ] })
8941
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: c.body });
9000
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: c.body });
8942
9001
  const pick = (next) => setPop(pop === next ? null : next);
8943
- const swatches = (list, current, set, none) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-swatches", role: "group", children: [
8944
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-text-none", onClick: () => {
9002
+ const swatches = (list, current, set, none) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-swatches", role: "group", children: [
9003
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-text-none", onClick: () => {
8945
9004
  set(null);
8946
9005
  setPop(null);
8947
9006
  }, children: none }),
8948
- list.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": c, "aria-pressed": current === c, onClick: () => {
9007
+ list.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": c, "aria-pressed": current === c, onClick: () => {
8949
9008
  set(c);
8950
9009
  setPop(null);
8951
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("i", { style: { background: c } }) }, i))
9010
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { style: { background: c } }) }, i))
8952
9011
  ] });
8953
9012
  const mod = /Mac|iPhone|iPad/.test(navigator.platform) ? "\u2318" : "Ctrl+";
8954
9013
  const item = (label, run3, more2 = {}) => ({ label, run: run3, ...more2 });
@@ -8957,7 +9016,7 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8957
9016
  editor.chain().focus().insertContentAt(at2, { type: "toc", attrs: { entries: JSON.stringify(entries(editor.state.doc, !docx2, at2 - 1)) } }).run();
8958
9017
  };
8959
9018
  const suggest2 = () => editor.view.dispatch(editor.state.tr.setMeta(suggesting, { on: !state.suggest, me: host?.me.name ?? "" }));
8960
- const aligns = [[import_lucide_react5.AlignLeft, t.alignLeft, "left"], [import_lucide_react5.AlignCenter, t.alignCenter, "center"], [import_lucide_react5.AlignRight, t.alignRight, "right"], [import_lucide_react5.AlignJustify, t.justify, "justify"]];
9019
+ const aligns = [[import_lucide_react6.AlignLeft, t.alignLeft, "left"], [import_lucide_react6.AlignCenter, t.alignCenter, "center"], [import_lucide_react6.AlignRight, t.alignRight, "right"], [import_lucide_react6.AlignJustify, t.justify, "justify"]];
8961
9020
  const lines2 = [[1, t.single], [1.15, "1.15"], [1.5, "1.5"], [2, t.double]];
8962
9021
  const menus = [
8963
9022
  ["file", t.menuFile, [
@@ -9074,17 +9133,17 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9074
9133
  item(t.deleteColumn, () => editor.chain().focus().deleteColumn().run())
9075
9134
  ] : []
9076
9135
  ];
9077
- const rows = (list) => list.filter((x) => x !== false).filter((x, i, all2) => x !== "-" || i > 0 && all2[i - 1] !== "-" && i < all2.length - 1).map((x, i) => x === "-" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("hr", {}, i) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", role: x.on === void 0 ? "menuitem" : "menuitemcheckbox", "aria-checked": x.on, disabled: x.off, onClick: () => {
9136
+ const rows = (list) => list.filter((x) => x !== false).filter((x, i, all2) => x !== "-" || i > 0 && all2[i - 1] !== "-" && i < all2.length - 1).map((x, i) => x === "-" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", {}, i) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", role: x.on === void 0 ? "menuitem" : "menuitemcheckbox", "aria-checked": x.on, disabled: x.off, onClick: () => {
9078
9137
  setPop(null);
9079
9138
  x.run();
9080
9139
  }, children: [
9081
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Check, { "aria-hidden": true }),
9082
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: x.label }),
9083
- x.keys && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("kbd", { children: x.keys })
9140
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9141
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: x.label }),
9142
+ x.keys && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("kbd", { children: x.keys })
9084
9143
  ] }, i));
9085
- const menu = ([key2, label, list]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9086
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-text-menu-button", "data-pop": true, "aria-haspopup": "menu", "aria-expanded": pop === key2, onClick: () => pick(key2), children: label }),
9087
- pop === key2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-pop w100n-text-menu", role: "menu", "aria-label": label, children: rows(list) })
9144
+ const menu = ([key2, label, list]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9145
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-text-menu-button", "data-pop": true, "aria-haspopup": "menu", "aria-expanded": pop === key2, onClick: () => pick(key2), children: label }),
9146
+ pop === key2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-pop w100n-text-menu", role: "menu", "aria-label": label, children: rows(list) })
9088
9147
  ] }, key2);
9089
9148
  const seek = (next) => {
9090
9149
  editor.view.dispatch(editor.state.tr.setMeta(searching, next));
@@ -9096,11 +9155,11 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9096
9155
  }
9097
9156
  };
9098
9157
  const found = searching.getState(editor.state);
9099
- const finder = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9100
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "find", "aria-label": t.findReplace, title: t.findReplace, onClick: () => pick("find"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Search, { "aria-hidden": true }) }),
9101
- pop === "find" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-find", role: "search", "aria-label": t.findReplace, children: [
9102
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-docs-row", children: [
9103
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9158
+ const finder = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9159
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "find", "aria-label": t.findReplace, title: t.findReplace, onClick: () => pick("find"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Search, { "aria-hidden": true }) }),
9160
+ pop === "find" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-find", role: "search", "aria-label": t.findReplace, children: [
9161
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9162
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9104
9163
  "input",
9105
9164
  {
9106
9165
  autoFocus: true,
@@ -9120,27 +9179,27 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9120
9179
  }
9121
9180
  }
9122
9181
  ),
9123
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-find-end", children: [
9124
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { "aria-live": "polite", children: query ? found?.hits.length ? `${(found.at ?? 0) + 1} / ${found.hits.length}` : t.noHits : "" }),
9125
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": t.previous, title: t.previous, disabled: !found?.hits.length, onClick: () => seek({ at: found.at - 1 }), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronUp, { "aria-hidden": true }) }),
9126
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": t.next, title: t.next, disabled: !found?.hits.length, onClick: () => seek({ at: found.at + 1 }), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true }) })
9182
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-find-end", children: [
9183
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { "aria-live": "polite", children: query ? found?.hits.length ? `${(found.at ?? 0) + 1} / ${found.hits.length}` : t.noHits : "" }),
9184
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": t.previous, title: t.previous, disabled: !found?.hits.length, onClick: () => seek({ at: found.at - 1 }), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronUp, { "aria-hidden": true }) }),
9185
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": t.next, title: t.next, disabled: !found?.hits.length, onClick: () => seek({ at: found.at + 1 }), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true }) })
9127
9186
  ] })
9128
9187
  ] }),
9129
- can.edit && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-docs-row", children: [
9130
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { value: swap, placeholder: t.replaceWith, "aria-label": t.replaceWith, onChange: (e) => setSwap(e.target.value) }),
9131
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-find-end", children: [
9132
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", disabled: !found?.hits.length, onClick: () => {
9188
+ can.edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9189
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { value: swap, placeholder: t.replaceWith, "aria-label": t.replaceWith, onChange: (e) => setSwap(e.target.value) }),
9190
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-find-end", children: [
9191
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", disabled: !found?.hits.length, onClick: () => {
9133
9192
  replace(editor, swap, false);
9134
9193
  seek({});
9135
9194
  }, children: t.replaceOne }),
9136
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-docs-action", disabled: !found?.hits.length, onClick: () => {
9195
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-action", disabled: !found?.hits.length, onClick: () => {
9137
9196
  replace(editor, swap, true);
9138
9197
  seek({});
9139
9198
  }, children: t.replaceAll })
9140
9199
  ] })
9141
9200
  ] }),
9142
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-setup-check", children: [
9143
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "checkbox", checked: matchCase, onChange: (e) => {
9201
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-check", children: [
9202
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", checked: matchCase, onChange: (e) => {
9144
9203
  setMatchCase(e.target.checked);
9145
9204
  seek({ matchCase: e.target.checked, at: 0 });
9146
9205
  } }),
@@ -9165,47 +9224,47 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9165
9224
  spacing(editor, { line: paint2.block.line, after: paint2.block.after });
9166
9225
  if (!paint2.keep) setPaint(null);
9167
9226
  };
9168
- const fontPicker = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9169
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "mid", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "font", "aria-label": t.font, title: t.font, onClick: () => pick("font"), children: [
9170
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { style: { fontFamily: state.font ?? void 0 }, children: state.font ?? t.defaultFont }),
9171
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true })
9227
+ const fontPicker = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9228
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "mid", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "font", "aria-label": t.font, title: t.font, onClick: () => pick("font"), children: [
9229
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontFamily: state.font ?? void 0 }, children: state.font ?? t.defaultFont }),
9230
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9172
9231
  ] }),
9173
- pop === "font" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.font, children: [
9174
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": !state.font, onClick: () => {
9232
+ pop === "font" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.font, children: [
9233
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": !state.font, onClick: () => {
9175
9234
  editor.chain().focus().unsetFontFamily().run();
9176
9235
  setPop(null);
9177
9236
  }, children: t.defaultFont }),
9178
- faces.map((f) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": state.font === f, style: { fontFamily: f }, onClick: () => {
9237
+ faces.map((f) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": state.font === f, style: { fontFamily: f }, onClick: () => {
9179
9238
  editor.chain().focus().setFontFamily(f).run();
9180
9239
  setPop(null);
9181
9240
  }, children: f }, f))
9182
9241
  ] })
9183
9242
  ] });
9184
- const sizePicker = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9185
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "small", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "size", "aria-label": t.fontSize, title: t.fontSize, onClick: () => pick("size"), children: [
9243
+ const sizePicker = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9244
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "small", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "size", "aria-label": t.fontSize, title: t.fontSize, onClick: () => pick("size"), children: [
9186
9245
  state.size ? parseFloat(state.size) : t.defaultFont,
9187
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true })
9246
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9188
9247
  ] }),
9189
- pop === "size" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.fontSize, children: [
9190
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": !state.size, onClick: () => {
9248
+ pop === "size" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.fontSize, children: [
9249
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": !state.size, onClick: () => {
9191
9250
  editor.chain().focus().unsetFontSize().run();
9192
9251
  setPop(null);
9193
9252
  }, children: t.defaultFont }),
9194
- sizes.map((n) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": state.size !== null && parseFloat(state.size) === n, onClick: () => {
9253
+ sizes.map((n) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": state.size !== null && parseFloat(state.size) === n, onClick: () => {
9195
9254
  editor.chain().focus().setFontSize(`${n}pt`).run();
9196
9255
  setPop(null);
9197
9256
  }, children: n }, n))
9198
9257
  ] })
9199
9258
  ] });
9200
- const spacer = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9201
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "spacing", "aria-label": t.lineSpacing, title: t.lineSpacing, onClick: () => pick("spacing"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.UnfoldVertical, { "aria-hidden": true }) }),
9202
- pop === "spacing" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.lineSpacing, children: [
9203
- lines2.map(([v, label]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": state.line === v, onClick: () => {
9259
+ const spacer = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9260
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "spacing", "aria-label": t.lineSpacing, title: t.lineSpacing, onClick: () => pick("spacing"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.UnfoldVertical, { "aria-hidden": true }) }),
9261
+ pop === "spacing" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.lineSpacing, children: [
9262
+ lines2.map(([v, label]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": state.line === v, onClick: () => {
9204
9263
  spacing(editor, { line: v });
9205
9264
  setPop(null);
9206
9265
  }, children: label }, v)),
9207
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("hr", {}),
9208
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": false, onClick: () => {
9266
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", {}),
9267
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": false, onClick: () => {
9209
9268
  spacing(editor, { after: state.after === 0 ? 8 : 0 });
9210
9269
  setPop(null);
9211
9270
  }, children: state.after === 0 ? t.spaceAfter : t.noSpaceAfter })
@@ -9228,18 +9287,18 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9228
9287
  setDraft2(null);
9229
9288
  };
9230
9289
  const zooms = [50, 75, 90, 100, 125, 150, 200];
9231
- const zoomer = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9232
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "small", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "zoom", "aria-label": t.zoom, title: t.zoom, onClick: () => pick("zoom"), children: [
9290
+ const zoomer = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9291
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "small", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "zoom", "aria-label": t.zoom, title: t.zoom, onClick: () => pick("zoom"), children: [
9233
9292
  percent,
9234
9293
  "%",
9235
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true })
9294
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9236
9295
  ] }),
9237
- pop === "zoom" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.zoom, children: [
9238
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": zoom === null, onClick: () => {
9296
+ pop === "zoom" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.zoom, children: [
9297
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": zoom === null, onClick: () => {
9239
9298
  setZoom(null);
9240
9299
  setPop(null);
9241
9300
  }, children: t.fitWidth }),
9242
- zooms.map((z) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", role: "option", "aria-selected": zoom === z, onClick: () => {
9301
+ zooms.map((z) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", role: "option", "aria-selected": zoom === z, onClick: () => {
9243
9302
  setZoom(z);
9244
9303
  setPop(null);
9245
9304
  }, children: [
@@ -9248,10 +9307,10 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9248
9307
  ] }, z))
9249
9308
  ] })
9250
9309
  ] });
9251
- const Aligned = aligns.find(([, , value3]) => value3 === state.align)?.[0] ?? import_lucide_react5.AlignLeft;
9252
- const aligner = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9253
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "align", "aria-label": t.align, title: t.align, onClick: () => pick("align"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Aligned, { "aria-hidden": true }) }),
9254
- pop === "align" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-pop", role: "group", "aria-label": t.align, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-tools", children: aligns.map(([icon, label, value3], i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Fragment, { children: tool(icon, label, () => {
9310
+ const Aligned = aligns.find(([, , value3]) => value3 === state.align)?.[0] ?? import_lucide_react6.AlignLeft;
9311
+ const aligner = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9312
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "align", "aria-label": t.align, title: t.align, onClick: () => pick("align"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Aligned, { "aria-hidden": true }) }),
9313
+ pop === "align" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-pop", role: "group", "aria-label": t.align, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-tools", children: aligns.map(([icon, label, value3], i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react11.Fragment, { children: tool(icon, label, () => {
9255
9314
  align2(editor, value3);
9256
9315
  setPop(null);
9257
9316
  }, state.align === value3) }, i)) }) })
@@ -9260,13 +9319,13 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9260
9319
  localStorage.setItem("w100n-docs-more", more ? "" : "1");
9261
9320
  setMore(!more);
9262
9321
  };
9263
- const main = can.edit ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9264
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9265
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "mid", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "style", "aria-label": t.paragraphStyle, title: t.paragraphStyle, onClick: () => pick("style"), children: [
9322
+ const main = can.edit ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9323
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9324
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-picker", "data-size": "mid", "data-pop": true, "aria-haspopup": "listbox", "aria-expanded": pop === "style", "aria-label": t.paragraphStyle, title: t.paragraphStyle, onClick: () => pick("style"), children: [
9266
9325
  styles2.find(([key2]) => key2 === state.style)?.[1] ?? t.normal,
9267
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true })
9326
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9268
9327
  ] }),
9269
- pop === "style" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.paragraphStyle, children: styles2.map(([key2, label, run3]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9328
+ pop === "style" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.paragraphStyle, children: styles2.map(([key2, label, run3]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9270
9329
  "button",
9271
9330
  {
9272
9331
  type: "button",
@@ -9283,52 +9342,58 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9283
9342
  )) })
9284
9343
  ] }),
9285
9344
  gap,
9286
- tool(import_lucide_react5.Bold, t.bold, () => editor.chain().focus().toggleBold().run(), state.bold),
9287
- tool(import_lucide_react5.Italic, t.italic, () => editor.chain().focus().toggleItalic().run(), state.italic),
9288
- docx2 ? tool(import_lucide_react5.Underline, t.underline, () => editor.chain().focus().toggleUnderline().run(), state.underline) : tool(import_lucide_react5.Strikethrough, t.strike, () => editor.chain().focus().toggleStrike().run(), state.strike),
9289
- !docx2 && tool(import_lucide_react5.Code, t.code, () => editor.chain().focus().toggleCode().run(), state.code),
9290
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9291
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "color", "aria-label": t.textColour, title: t.textColour, onClick: () => pick("color"), children: [
9292
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Baseline, { "aria-hidden": true }),
9293
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("i", { className: "w100n-text-bar", style: { background: state.color ?? "currentColor" } })
9345
+ tool(import_lucide_react6.Bold, t.bold, () => editor.chain().focus().toggleBold().run(), state.bold),
9346
+ tool(import_lucide_react6.Italic, t.italic, () => editor.chain().focus().toggleItalic().run(), state.italic),
9347
+ docx2 ? tool(import_lucide_react6.Underline, t.underline, () => editor.chain().focus().toggleUnderline().run(), state.underline) : tool(import_lucide_react6.Strikethrough, t.strike, () => editor.chain().focus().toggleStrike().run(), state.strike),
9348
+ !docx2 && tool(import_lucide_react6.Code, t.code, () => editor.chain().focus().toggleCode().run(), state.code),
9349
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9350
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "color", "aria-label": t.textColour, title: t.textColour, onClick: () => pick("color"), children: [
9351
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Baseline, { "aria-hidden": true }),
9352
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { className: "w100n-text-bar", style: { background: state.color ?? "currentColor" } })
9294
9353
  ] }),
9295
- pop === "color" && swatches(inks, state.color, (c) => c ? editor.chain().focus().setColor(c).run() : editor.chain().focus().unsetColor().run(), t.automatic)
9354
+ pop === "color" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-pop", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Swatches, { current: state.color, none: t.automatic, onPick: (c) => {
9355
+ editor.chain().focus().setColor(c).run();
9356
+ setPop(null);
9357
+ }, onNone: () => {
9358
+ editor.chain().focus().unsetColor().run();
9359
+ setPop(null);
9360
+ } }) })
9296
9361
  ] }),
9297
9362
  gap,
9298
9363
  aligner,
9299
- tool(import_lucide_react5.List, t.bullets, () => editor.chain().focus().toggleBulletList().run(), state.bullets),
9300
- tool(import_lucide_react5.ListOrdered, t.numbers, () => editor.chain().focus().toggleOrderedList().run(), state.numbers),
9301
- !docx2 && tool(import_lucide_react5.ListChecks, t.tasks, () => editor.chain().focus().toggleTaskList().run(), state.tasks),
9364
+ tool(import_lucide_react6.List, t.bullets, () => editor.chain().focus().toggleBulletList().run(), state.bullets),
9365
+ tool(import_lucide_react6.ListOrdered, t.numbers, () => editor.chain().focus().toggleOrderedList().run(), state.numbers),
9366
+ !docx2 && tool(import_lucide_react6.ListChecks, t.tasks, () => editor.chain().focus().toggleTaskList().run(), state.tasks),
9302
9367
  gap,
9303
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9304
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "link", "aria-pressed": state.link, "aria-label": t.link, title: t.link, onClick: () => pop === "link" ? setPop(null) : linkUp(), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Link, { "aria-hidden": true }) }),
9305
- pop === "link" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-form", children: [
9306
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { autoFocus: true, value: href, placeholder: t.linkAddress, "aria-label": t.linkAddress, onChange: (e) => setHref(e.target.value), onKeyDown: (e) => {
9368
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9369
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "link", "aria-pressed": state.link, "aria-label": t.link, title: t.link, onClick: () => pop === "link" ? setPop(null) : linkUp(), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Link, { "aria-hidden": true }) }),
9370
+ pop === "link" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-form", children: [
9371
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { autoFocus: true, value: href, placeholder: t.linkAddress, "aria-label": t.linkAddress, onChange: (e) => setHref(e.target.value), onKeyDown: (e) => {
9307
9372
  if (e.key === "Enter") putLink();
9308
9373
  } }),
9309
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-docs-row", children: [
9310
- state.link && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
9374
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9375
+ state.link && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
9311
9376
  editor.chain().focus().extendMarkRange("link").unsetLink().run();
9312
9377
  setPop(null);
9313
9378
  }, children: [
9314
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Link2Off, { "aria-hidden": true }),
9379
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Link2Off, { "aria-hidden": true }),
9315
9380
  t.unlink
9316
9381
  ] }),
9317
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !href.trim(), onClick: putLink, children: [
9318
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Link, { "aria-hidden": true }),
9382
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !href.trim(), onClick: putLink, children: [
9383
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Link, { "aria-hidden": true }),
9319
9384
  t.apply
9320
9385
  ] })
9321
9386
  ] })
9322
9387
  ] })
9323
9388
  ] }),
9324
- can.comment && tool(import_lucide_react5.MessageSquarePlus, t.addComment, begin, void 0, state.empty),
9325
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9326
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "image", "aria-label": t.image, title: t.image, onClick: () => {
9389
+ can.comment && tool(import_lucide_react6.MessageSquarePlus, t.addComment, begin, void 0, state.empty),
9390
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9391
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "image", "aria-label": t.image, title: t.image, onClick: () => {
9327
9392
  setHref("");
9328
9393
  pick("image");
9329
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ImagePlus, { "aria-hidden": true }) }),
9330
- pop === "image" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-form", children: [
9331
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9394
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ImagePlus, { "aria-hidden": true }) }),
9395
+ pop === "image" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-form", children: [
9396
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9332
9397
  "input",
9333
9398
  {
9334
9399
  autoFocus: true,
@@ -9344,10 +9409,10 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9344
9409
  }
9345
9410
  }
9346
9411
  ),
9347
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-docs-row", children: [
9348
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-pdf-link", children: [
9412
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9413
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-pdf-link", children: [
9349
9414
  t.chooseFile,
9350
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "file", accept: "image/png,image/jpeg,image/gif", hidden: true, onChange: (e) => {
9415
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "file", accept: "image/png,image/jpeg,image/gif", hidden: true, onChange: (e) => {
9351
9416
  const file2 = e.target.files?.[0];
9352
9417
  if (!file2) return;
9353
9418
  const reader = new FileReader();
@@ -9358,23 +9423,23 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9358
9423
  reader.readAsDataURL(file2);
9359
9424
  } })
9360
9425
  ] }),
9361
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !href.trim(), onClick: () => {
9426
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !href.trim(), onClick: () => {
9362
9427
  editor.chain().focus().setImage({ src: href.trim() }).run();
9363
9428
  setPop(null);
9364
9429
  }, children: [
9365
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ImagePlus, { "aria-hidden": true }),
9430
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ImagePlus, { "aria-hidden": true }),
9366
9431
  t.put
9367
9432
  ] })
9368
9433
  ] })
9369
9434
  ] })
9370
9435
  ] }),
9371
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9372
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "table", "aria-label": t.table, title: t.table, onClick: () => pick("table"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Table, { "aria-hidden": true }) }),
9373
- pop === "table" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-grid", role: "group", "aria-label": t.table, onPointerLeave: () => setGrid({ rows: 0, cols: 0 }), children: [
9374
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: Array.from({ length: 48 }, (_, i) => {
9436
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9437
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "table", "aria-label": t.table, title: t.table, onClick: () => pick("table"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Table, { "aria-hidden": true }) }),
9438
+ pop === "table" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-grid", role: "group", "aria-label": t.table, onPointerLeave: () => setGrid({ rows: 0, cols: 0 }), children: [
9439
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: Array.from({ length: 48 }, (_, i) => {
9375
9440
  const rows2 = Math.floor(i / 8) + 1;
9376
9441
  const cols = i % 8 + 1;
9377
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9442
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9378
9443
  "button",
9379
9444
  {
9380
9445
  type: "button",
@@ -9389,89 +9454,95 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9389
9454
  i
9390
9455
  );
9391
9456
  }) }),
9392
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: grid3.rows ? `${grid3.rows} \xD7 ${grid3.cols}` : t.table })
9457
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: grid3.rows ? `${grid3.rows} \xD7 ${grid3.cols}` : t.table })
9393
9458
  ] })
9394
9459
  ] }),
9395
9460
  gap,
9396
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-expanded": more, "aria-label": more ? t.fewerTools : t.moreTools, title: more ? t.fewerTools : t.moreTools, onClick: widen, children: more ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronUp, { "aria-hidden": true }) })
9397
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9398
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-text-word", onClick: () => onPanel?.("outline"), children: [
9399
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ListTree, { "aria-hidden": true }),
9461
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-expanded": more, "aria-label": more ? t.fewerTools : t.moreTools, title: more ? t.fewerTools : t.moreTools, onClick: widen, children: more ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronUp, { "aria-hidden": true }) })
9462
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9463
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-word", onClick: () => onPanel?.("outline"), children: [
9464
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ListTree, { "aria-hidden": true }),
9400
9465
  t.outline
9401
9466
  ] }),
9402
- can.comment && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9403
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-grow" }),
9404
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: state.empty, onClick: begin, children: [
9405
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.MessageSquarePlus, { "aria-hidden": true }),
9467
+ can.comment && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9468
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-grow" }),
9469
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: state.empty, onClick: begin, children: [
9470
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessageSquarePlus, { "aria-hidden": true }),
9406
9471
  t.addComment
9407
9472
  ] })
9408
9473
  ] }),
9409
- !!host?.comments && (can.comment || open.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-text-word", onClick: () => onPanel?.("comments"), children: [
9410
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.MessagesSquare, { "aria-hidden": true }),
9474
+ !!host?.comments && (can.comment || open.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-word", onClick: () => onPanel?.("comments"), children: [
9475
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessagesSquare, { "aria-hidden": true }),
9411
9476
  t.comments,
9412
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { children: open.length })
9477
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: open.length })
9413
9478
  ] })
9414
9479
  ] });
9415
- const extra = can.edit && more && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9416
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9480
+ const extra = can.edit && more && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9481
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9417
9482
  fontPicker,
9418
9483
  sizePicker,
9419
9484
  gap
9420
9485
  ] }),
9421
- docx2 && tool(import_lucide_react5.Strikethrough, t.strike, () => editor.chain().focus().toggleStrike().run(), state.strike),
9422
- docx2 && tool(import_lucide_react5.Superscript, t.superscript, () => editor.chain().focus().toggleMark("superscript").run(), state.sup),
9423
- docx2 && tool(import_lucide_react5.Subscript, t.subscript, () => editor.chain().focus().toggleMark("subscript").run(), state.sub),
9424
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9425
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "mark", "aria-pressed": state.glow, "aria-label": t.highlight, title: t.highlight, onClick: () => pick("mark"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Highlighter, { "aria-hidden": true }) }),
9486
+ docx2 && tool(import_lucide_react6.Strikethrough, t.strike, () => editor.chain().focus().toggleStrike().run(), state.strike),
9487
+ docx2 && tool(import_lucide_react6.Superscript, t.superscript, () => editor.chain().focus().toggleMark("superscript").run(), state.sup),
9488
+ docx2 && tool(import_lucide_react6.Subscript, t.subscript, () => editor.chain().focus().toggleMark("subscript").run(), state.sub),
9489
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9490
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "mark", "aria-pressed": state.glow, "aria-label": t.highlight, title: t.highlight, onClick: () => pick("mark"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Highlighter, { "aria-hidden": true }) }),
9426
9491
  pop === "mark" && swatches(glows, null, (c) => c ? editor.chain().focus().setHighlight({ color: c }).run() : editor.chain().focus().unsetHighlight().run(), t.noColour)
9427
9492
  ] }),
9428
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9493
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9429
9494
  gap,
9430
9495
  spacer
9431
9496
  ] }),
9432
- tool(import_lucide_react5.ListIndentDecrease, t.outdent, () => indent(editor, -1)),
9433
- tool(import_lucide_react5.ListIndentIncrease, t.indent, () => indent(editor, 1)),
9434
- docx2 && tool(import_lucide_react5.ListChecks, t.tasks, () => editor.chain().focus().toggleTaskList().run(), state.tasks),
9497
+ tool(import_lucide_react6.ListIndentDecrease, t.outdent, () => indent(editor, -1)),
9498
+ tool(import_lucide_react6.ListIndentIncrease, t.indent, () => indent(editor, 1)),
9499
+ docx2 && tool(import_lucide_react6.ListChecks, t.tasks, () => editor.chain().focus().toggleTaskList().run(), state.tasks),
9435
9500
  gap,
9436
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": t.painter, title: paint2 ? t.painterHint : t.painter, "aria-pressed": !!paint2, onClick: () => take(false), onDoubleClick: () => take(true), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.PaintRoller, { "aria-hidden": true }) }),
9437
- tool(import_lucide_react5.RemoveFormatting, t.clearFormat, () => clear(editor)),
9438
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9501
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": t.painter, title: paint2 ? t.painterHint : t.painter, "aria-pressed": !!paint2, onClick: () => take(false), onDoubleClick: () => take(true), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.PaintRoller, { "aria-hidden": true }) }),
9502
+ tool(import_lucide_react6.RemoveFormatting, t.clearFormat, () => clear(editor)),
9503
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9439
9504
  gap,
9440
- tool(import_lucide_react5.FilePenLine, t.suggest, suggest2, state.suggest)
9505
+ tool(import_lucide_react6.FilePenLine, t.suggest, suggest2, state.suggest)
9441
9506
  ] })
9442
9507
  ] });
9443
- const context = can.edit && (state.table ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9444
- tool(import_lucide_react5.BetweenHorizontalStart, t.rowAbove, () => editor.chain().focus().addRowBefore().run()),
9445
- tool(import_lucide_react5.BetweenHorizontalEnd, t.rowBelow, () => editor.chain().focus().addRowAfter().run()),
9446
- tool(import_lucide_react5.BetweenVerticalStart, t.columnLeft, () => editor.chain().focus().addColumnBefore().run()),
9447
- tool(import_lucide_react5.BetweenVerticalEnd, t.columnRight, () => editor.chain().focus().addColumnAfter().run()),
9448
- tool(import_lucide_react5.PanelTop, t.headerRow, () => editor.chain().focus().toggleHeaderRow().run()),
9449
- docx2 && tool(import_lucide_react5.TableCellsMerge, t.mergeCells, () => editor.chain().focus().mergeOrSplit().run()),
9450
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-anchor", children: [
9451
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "fill", "aria-label": t.cellFill, title: t.cellFill, onClick: () => pick("fill"), children: [
9452
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.PaintBucket, { "aria-hidden": true }),
9453
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("i", { className: "w100n-text-bar", style: { background: state.fill ?? "transparent" } })
9508
+ const context = can.edit && (state.table ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9509
+ tool(import_lucide_react6.BetweenHorizontalStart, t.rowAbove, () => editor.chain().focus().addRowBefore().run()),
9510
+ tool(import_lucide_react6.BetweenHorizontalEnd, t.rowBelow, () => editor.chain().focus().addRowAfter().run()),
9511
+ tool(import_lucide_react6.BetweenVerticalStart, t.columnLeft, () => editor.chain().focus().addColumnBefore().run()),
9512
+ tool(import_lucide_react6.BetweenVerticalEnd, t.columnRight, () => editor.chain().focus().addColumnAfter().run()),
9513
+ tool(import_lucide_react6.PanelTop, t.headerRow, () => editor.chain().focus().toggleHeaderRow().run()),
9514
+ docx2 && tool(import_lucide_react6.TableCellsMerge, t.mergeCells, () => editor.chain().focus().mergeOrSplit().run()),
9515
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9516
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", "data-pop": true, "aria-expanded": pop === "fill", "aria-label": t.cellFill, title: t.cellFill, onClick: () => pick("fill"), children: [
9517
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.PaintBucket, { "aria-hidden": true }),
9518
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { className: "w100n-text-bar", style: { background: state.fill ?? "transparent" } })
9454
9519
  ] }),
9455
- pop === "fill" && swatches(glows, state.fill, (c) => editor.chain().focus().setCellAttribute("background", c).run(), t.noColour)
9520
+ pop === "fill" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-pop", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Swatches, { current: state.fill, none: t.noColour, onPick: (c) => {
9521
+ editor.chain().focus().setCellAttribute("background", c).run();
9522
+ setPop(null);
9523
+ }, onNone: () => {
9524
+ editor.chain().focus().setCellAttribute("background", null).run();
9525
+ setPop(null);
9526
+ } }) })
9456
9527
  ] }),
9457
- docx2 && tool(import_lucide_react5.Grid3x3, t.tableBorders, () => editor.chain().focus().updateAttributes("table", { borders: state.bare ? null : "none" }).run(), !state.bare),
9458
- tool(import_lucide_react5.TableRowsSplit, t.deleteRow, () => editor.chain().focus().deleteRow().run()),
9459
- tool(import_lucide_react5.TableColumnsSplit, t.deleteColumn, () => editor.chain().focus().deleteColumn().run()),
9460
- tool(import_lucide_react5.Trash2, t.deleteTable, () => editor.chain().focus().deleteTable().run())
9461
- ] }) : state.img && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: [[import_lucide_react5.Image, t.wrapInline, "inline"], [import_lucide_react5.PanelLeft, t.wrapLeft, "left"], [import_lucide_react5.PanelRight, t.wrapRight, "right"]].map(([icon, label, value3]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Fragment, { children: tool(icon, label, () => editor.chain().focus().updateAttributes("image", { wrap: value3 === "inline" ? null : value3 }).run(), state.img === value3) }, value3)) }));
9462
- const status = (can.edit || live) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-end", children: [
9463
- live && (live.ready ? !live.online : live.late || live.denied) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-live", title: live.denied ? void 0 : t.offlineHint, children: [
9464
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.WifiOff, { "aria-hidden": true }),
9528
+ docx2 && tool(import_lucide_react6.Grid3x3, t.tableBorders, () => editor.chain().focus().updateAttributes("table", { borders: state.bare ? null : "none" }).run(), !state.bare),
9529
+ tool(import_lucide_react6.TableRowsSplit, t.deleteRow, () => editor.chain().focus().deleteRow().run()),
9530
+ tool(import_lucide_react6.TableColumnsSplit, t.deleteColumn, () => editor.chain().focus().deleteColumn().run()),
9531
+ tool(import_lucide_react6.Trash2, t.deleteTable, () => editor.chain().focus().deleteTable().run())
9532
+ ] }) : state.img && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: [[import_lucide_react6.Image, t.wrapInline, "inline"], [import_lucide_react6.PanelLeft, t.wrapLeft, "left"], [import_lucide_react6.PanelRight, t.wrapRight, "right"]].map(([icon, label, value3]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react11.Fragment, { children: tool(icon, label, () => editor.chain().focus().updateAttributes("image", { wrap: value3 === "inline" ? null : value3 }).run(), state.img === value3) }, value3)) }));
9533
+ const status = (can.edit || live) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-end", children: [
9534
+ live && (live.ready ? !live.online : live.late || live.denied) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-live", title: live.denied ? void 0 : t.offlineHint, children: [
9535
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.WifiOff, { "aria-hidden": true }),
9465
9536
  live.denied ? t.liveOff : t.offline
9466
9537
  ] }),
9467
- state.suggest && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-docs-badge", children: t.suggesting }),
9468
- can.edit && saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-text-saved", title: `${t.save} (${mod}S)`, onClick: () => void save2(), children: [
9469
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.CloudAlert, { "aria-hidden": true }),
9470
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: t.saveFailed })
9538
+ state.suggest && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-badge", children: t.suggesting }),
9539
+ can.edit && saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-saved", title: `${t.save} (${mod}S)`, onClick: () => void save2(), children: [
9540
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.CloudAlert, { "aria-hidden": true }),
9541
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t.saveFailed })
9471
9542
  ] }),
9472
- live && live.people.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-people", role: "group", "aria-label": t.people, children: live.people.map((p) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-face", title: p.me ? `${p.name} (${t.you})` : p.name, style: { "--face": p.color }, children: p.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: p.avatarUrl, alt: "" }) : p.name.split(/\s+/).map((w) => w[0]).join("").slice(0, 2).toUpperCase() }, p.id)) })
9543
+ live && live.people.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-people", role: "group", "aria-label": t.people, children: live.people.map((p) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-face", title: p.me ? `${p.name} (${t.you})` : p.name, style: { "--face": p.color }, children: p.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: p.avatarUrl, alt: "" }) : p.name.split(/\s+/).map((w) => w[0]).join("").slice(0, 2).toUpperCase() }, p.id)) })
9473
9544
  ] });
9474
- const menubar = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-menus", role: "menubar", "aria-label": t.textTools, children: menus.filter(([, , list]) => list.some((x) => x && x !== "-")).map(menu) });
9545
+ const menubar = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-menus", role: "menubar", "aria-label": t.textTools, children: menus.filter(([, , list]) => list.some((x) => x && x !== "-")).map(menu) });
9475
9546
  const keep = (e) => {
9476
9547
  if (e.target.closest("button")) e.preventDefault();
9477
9548
  };
@@ -9509,15 +9580,15 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9509
9580
  if (note) return wiki.open(note.id);
9510
9581
  if (wiki.create) void wiki.create(wikiName(target)).then((id) => id && wiki.open(id));
9511
9582
  };
9512
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref: root, className: "w100n-text", "data-kind": kind, "data-docs-find": true, onKeyDown: keys2, children: [
9513
- head2 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9514
- head2.menus && (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-ribbon w100n-text-docbar", onKeyDown: rove, onPointerDown: keep, children: menubar }), head2.menus),
9515
- head2.status && status && (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-ribbon w100n-text-docbar", onPointerDown: keep, children: status }), head2.status)
9516
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-ribbon w100n-text-top", onKeyDown: rove, onPointerDown: keep, children: [
9583
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { ref: root, className: "w100n-text", "data-kind": kind, "data-docs-find": true, onKeyDown: keys2, children: [
9584
+ head2 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9585
+ head2.menus && (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-ribbon w100n-text-docbar", onKeyDown: rove, onPointerDown: keep, children: menubar }), head2.menus),
9586
+ head2.status && status && (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-ribbon w100n-text-docbar", onPointerDown: keep, children: status }), head2.status)
9587
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-ribbon w100n-text-top", onKeyDown: rove, onPointerDown: keep, children: [
9517
9588
  menubar,
9518
9589
  status
9519
9590
  ] }),
9520
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref: scroller, className: "w100n-text-scroll", "data-paint": !!paint2, onMouseUp: lay, onPointerDown: (e) => {
9591
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: scroller, className: "w100n-text-scroll", "data-paint": !!paint2, onMouseUp: lay, onPointerDown: (e) => {
9521
9592
  touch.current = e.pointerType === "touch";
9522
9593
  }, onContextMenu: (e) => {
9523
9594
  if (touch.current || e.shiftKey || pop === "context" || !e.target.closest(".ProseMirror")) return setPop(null);
@@ -9542,8 +9613,8 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9542
9613
  if (!id) return;
9543
9614
  setActive(id);
9544
9615
  onPanel?.("comments");
9545
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-zoomed", style: { zoom: percent / 100 }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: docx2 ? `w100n-text-sheet${flow ? " is-flow" : ""}` : "w100n-docs-page w100n-text-column", style: sheet2, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.EditorContent, { editor }) }) }) }),
9546
- askSpot && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
9616
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-zoomed", style: { zoom: percent / 100 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: docx2 ? `w100n-text-sheet${flow ? " is-flow" : ""}` : "w100n-docs-page w100n-text-column", style: sheet2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react10.EditorContent, { editor }) }) }) }),
9617
+ askSpot && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
9547
9618
  "span",
9548
9619
  {
9549
9620
  className: "w100n-text-pop w100n-text-menu w100n-wiki-ask",
@@ -9552,61 +9623,61 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9552
9623
  style: { left: Math.min(askSpot.left, innerWidth - 340), top: askSpot.bottom + 6 },
9553
9624
  onPointerDown: (e) => e.preventDefault(),
9554
9625
  children: [
9555
- options.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", role: "option", "aria-selected": i === Math.min(askAt, options.length - 1), onClick: () => void choose(option), children: "note" in option ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9556
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.FileText, { "aria-hidden": true }),
9557
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { children: option.note.name.replace(/\.(md|markdown)$/i, "") }),
9558
- option.note.folder && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: option.note.folder })
9559
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9560
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Plus, { "aria-hidden": true }),
9561
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { children: t.wikiCreate.replace("{name}", option.make) }),
9562
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: t.wikiNew })
9626
+ options.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": i === Math.min(askAt, options.length - 1), onClick: () => void choose(option), children: "note" in option ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9627
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.FileText, { "aria-hidden": true }),
9628
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: option.note.name.replace(/\.(md|markdown)$/i, "") }),
9629
+ option.note.folder && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: option.note.folder })
9630
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9631
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Plus, { "aria-hidden": true }),
9632
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: t.wikiCreate.replace("{name}", option.make) }),
9633
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: t.wikiNew })
9563
9634
  ] }) }, "note" in option ? option.note.id : "make")),
9564
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { className: "w100n-text-hint", children: t.wikiKeys })
9635
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { className: "w100n-text-hint", children: t.wikiKeys })
9565
9636
  ]
9566
9637
  }
9567
9638
  ),
9568
- pop === "context" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-pop w100n-text-menu w100n-text-context", role: "menu", "aria-label": t.textTools, style: { left: spot3.x, top: spot3.y }, onPointerDown: keep, children: [
9639
+ pop === "context" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-menu w100n-text-context", role: "menu", "aria-label": t.textTools, style: { left: spot3.x, top: spot3.y }, onPointerDown: keep, children: [
9569
9640
  rows(near),
9570
- spell && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { className: "w100n-text-hint", children: t.spellHint })
9641
+ spell && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { className: "w100n-text-hint", children: t.spellHint })
9571
9642
  ] }),
9572
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-ribbon w100n-text-corner", "data-side": "left", onPointerDown: keep, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.zoom, children: [
9573
- tool(import_lucide_react5.Minus, t.zoomOut, () => zoomBy(-10)),
9643
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-ribbon w100n-text-corner", "data-side": "left", onPointerDown: keep, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.zoom, children: [
9644
+ tool(import_lucide_react6.Minus, t.zoomOut, () => zoomBy(-10)),
9574
9645
  zoomer,
9575
- tool(import_lucide_react5.Plus, t.zoomIn, () => zoomBy(10))
9646
+ tool(import_lucide_react6.Plus, t.zoomIn, () => zoomBy(10))
9576
9647
  ] }) }),
9577
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-ribbon w100n-text-island", role: "toolbar", "aria-label": t.textTools, onKeyDown: rove, onPointerDown: keep, children: [
9578
- context && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": state.table ? t.table : t.image, children: context }),
9579
- extra && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.moreTools, children: extra }),
9580
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.textTools, children: main })
9648
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-ribbon w100n-text-island", role: "toolbar", "aria-label": t.textTools, onKeyDown: rove, onPointerDown: keep, children: [
9649
+ context && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": state.table ? t.table : t.image, children: context }),
9650
+ extra && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.moreTools, children: extra }),
9651
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.textTools, children: main })
9581
9652
  ] }),
9582
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-text-ribbon w100n-text-corner", "data-side": "right", onPointerDown: keep, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.findReplace, children: [
9583
- can.edit && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9584
- tool(import_lucide_react5.Undo2, t.undo, () => editor.chain().focus().undo().run(), void 0, !state.undo),
9585
- tool(import_lucide_react5.Redo2, t.redo, () => editor.chain().focus().redo().run(), void 0, !state.redo),
9653
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-ribbon w100n-text-corner", "data-side": "right", onPointerDown: keep, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.findReplace, children: [
9654
+ can.edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9655
+ tool(import_lucide_react6.Undo2, t.undo, () => editor.chain().focus().undo().run(), void 0, !state.undo),
9656
+ tool(import_lucide_react6.Redo2, t.redo, () => editor.chain().focus().redo().run(), void 0, !state.redo),
9586
9657
  gap
9587
9658
  ] }),
9588
9659
  finder
9589
9660
  ] }) }),
9590
- dialog && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9661
+ dialog && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9591
9662
  if (e.key === "Escape") {
9592
9663
  e.stopPropagation();
9593
9664
  setDialog(null);
9594
9665
  }
9595
- }, children: dialog.kind === "symbol" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-pdf-dialog w100n-insert", role: "dialog", "aria-modal": true, "aria-label": t.symbols, children: [
9596
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-new-head", children: [
9597
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-new-tile", "data-tone": "pink", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Omega, { "aria-hidden": true }) }),
9598
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.symbols }),
9599
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDialog(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.X, { "aria-hidden": true }) })
9666
+ }, children: dialog.kind === "symbol" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-pdf-dialog w100n-insert", role: "dialog", "aria-modal": true, "aria-label": t.symbols, children: [
9667
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9668
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-new-tile", "data-tone": "pink", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Omega, { "aria-hidden": true }) }),
9669
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.symbols }),
9670
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDialog(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.X, { "aria-hidden": true }) })
9600
9671
  ] }),
9601
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
9602
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Search, { "aria-hidden": true }),
9603
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { autoFocus: true, value: dialog.query, placeholder: t.symbolSearch, "aria-label": t.symbolSearch, onChange: (e) => setDialog({ kind: "symbol", query: e.target.value }) })
9672
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
9673
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Search, { "aria-hidden": true }),
9674
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { autoFocus: true, value: dialog.query, placeholder: t.symbolSearch, "aria-label": t.symbolSearch, onChange: (e) => setDialog({ kind: "symbol", query: e.target.value }) })
9604
9675
  ] }),
9605
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-insert-grid", role: "group", "aria-label": t.symbols, children: symbols.filter(([ch, name]) => !dialog.query.trim() || name.includes(dialog.query.trim().toLowerCase()) || ch === dialog.query.trim()).map(([ch, name]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": name, title: name, onClick: () => {
9676
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-insert-grid", role: "group", "aria-label": t.symbols, children: symbols.filter(([ch, name]) => !dialog.query.trim() || name.includes(dialog.query.trim().toLowerCase()) || ch === dialog.query.trim()).map(([ch, name]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": name, title: name, onClick: () => {
9606
9677
  editor.chain().focus().insertContent(ch).run();
9607
9678
  setDialog(null);
9608
9679
  }, children: ch }, ch)) })
9609
- ] }) : dialog.kind === "formula" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { className: "w100n-pdf-dialog w100n-insert", role: "dialog", "aria-modal": true, "aria-label": t.formula, onSubmit: (e) => {
9680
+ ] }) : dialog.kind === "formula" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("form", { className: "w100n-pdf-dialog w100n-insert", role: "dialog", "aria-modal": true, "aria-label": t.formula, onSubmit: (e) => {
9610
9681
  e.preventDefault();
9611
9682
  const latex = dialog.latex.trim();
9612
9683
  if (!latex) return;
@@ -9617,13 +9688,13 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9617
9688
  else editor.chain().focus().insertContent({ type: "math", attrs: { latex } }).run();
9618
9689
  setDialog(null);
9619
9690
  }, children: [
9620
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-new-head", children: [
9621
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-new-tile", "data-tone": "blue", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Sigma, { "aria-hidden": true }) }),
9622
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.formula }),
9623
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDialog(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.X, { "aria-hidden": true }) })
9691
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9692
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-new-tile", "data-tone": "blue", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Sigma, { "aria-hidden": true }) }),
9693
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.formula }),
9694
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDialog(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.X, { "aria-hidden": true }) })
9624
9695
  ] }),
9625
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { ref: field, autoFocus: true, className: "w100n-insert-latex", value: dialog.latex, "aria-label": t.formula, placeholder: "F = 900 + 12 \\\\cdot n", onChange: (e) => setDialog({ ...dialog, latex: e.target.value }) }),
9626
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-insert-tools", role: "group", "aria-label": t.formula, children: helpers.map(([label, code]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", onClick: () => {
9696
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { ref: field, autoFocus: true, className: "w100n-insert-latex", value: dialog.latex, "aria-label": t.formula, placeholder: "F = 900 + 12 \\\\cdot n", onChange: (e) => setDialog({ ...dialog, latex: e.target.value }) }),
9697
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-insert-tools", role: "group", "aria-label": t.formula, children: helpers.map(([label, code]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => {
9627
9698
  const el = field.current;
9628
9699
  const at2 = el.selectionStart ?? dialog.latex.length;
9629
9700
  const latex = dialog.latex.slice(0, at2) + code + dialog.latex.slice(el.selectionEnd ?? at2);
@@ -9634,15 +9705,15 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9634
9705
  el.setSelectionRange(caret, caret);
9635
9706
  });
9636
9707
  }, children: label }, label)) }),
9637
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-insert-preview", "aria-live": "polite", dangerouslySetInnerHTML: { __html: dialog.latex.trim() ? mathml(dialog.latex) : "" } }),
9638
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9639
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDialog(null), children: t.cancel }),
9640
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !dialog.latex.trim(), children: [
9641
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Check, { "aria-hidden": true }),
9708
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-insert-preview", "aria-live": "polite", dangerouslySetInnerHTML: { __html: dialog.latex.trim() ? mathml(dialog.latex) : "" } }),
9709
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9710
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDialog(null), children: t.cancel }),
9711
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !dialog.latex.trim(), children: [
9712
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9642
9713
  dialog.at !== null ? t.update : t.put
9643
9714
  ] })
9644
9715
  ] })
9645
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { className: "w100n-pdf-dialog w100n-insert", role: "dialog", "aria-modal": true, "aria-label": t.footnote, onSubmit: (e) => {
9716
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("form", { className: "w100n-pdf-dialog w100n-insert", role: "dialog", "aria-modal": true, "aria-label": t.footnote, onSubmit: (e) => {
9646
9717
  e.preventDefault();
9647
9718
  const text = dialog.text.trim();
9648
9719
  if (!text) return;
@@ -9659,12 +9730,12 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9659
9730
  }
9660
9731
  setDialog(null);
9661
9732
  }, children: [
9662
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-new-head", children: [
9663
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-new-tile", "data-tone": "violet", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Superscript, { "aria-hidden": true }) }),
9664
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.footnote }),
9665
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDialog(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.X, { "aria-hidden": true }) })
9733
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9734
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-new-tile", "data-tone": "violet", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Superscript, { "aria-hidden": true }) }),
9735
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.footnote }),
9736
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDialog(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.X, { "aria-hidden": true }) })
9666
9737
  ] }),
9667
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9738
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9668
9739
  "textarea",
9669
9740
  {
9670
9741
  autoFocus: true,
@@ -9678,40 +9749,40 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9678
9749
  }
9679
9750
  }
9680
9751
  ),
9681
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9682
- dialog.at !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
9752
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9753
+ dialog.at !== null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
9683
9754
  editor.chain().focus().deleteRange({ from: dialog.at, to: dialog.at + 1 }).run();
9684
9755
  setDialog(null);
9685
9756
  }, children: t.removeFootnote }),
9686
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDialog(null), children: t.cancel }),
9687
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !dialog.text.trim(), children: [
9688
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Check, { "aria-hidden": true }),
9757
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDialog(null), children: t.cancel }),
9758
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !dialog.text.trim(), children: [
9759
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9689
9760
  dialog.at !== null ? t.update : t.put
9690
9761
  ] })
9691
9762
  ] })
9692
9763
  ] }) }),
9693
- draft2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9764
+ draft2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9694
9765
  if (e.key === "Escape") {
9695
9766
  e.stopPropagation();
9696
9767
  setDraft2(null);
9697
9768
  }
9698
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { className: "w100n-pdf-dialog w100n-setup", role: "dialog", "aria-modal": true, "aria-label": t.pageSetup, onSubmit: (e) => {
9769
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("form", { className: "w100n-pdf-dialog w100n-setup", role: "dialog", "aria-modal": true, "aria-label": t.pageSetup, onSubmit: (e) => {
9699
9770
  e.preventDefault();
9700
9771
  applySetup();
9701
9772
  }, children: [
9702
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-new-head", children: [
9703
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-new-tile", "data-tone": "blue", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Ruler, { "aria-hidden": true }) }),
9704
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.pageSetup }),
9705
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDraft2(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.X, { "aria-hidden": true }) })
9773
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9774
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-new-tile", "data-tone": "blue", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Ruler, { "aria-hidden": true }) }),
9775
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.pageSetup }),
9776
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => setDraft2(null), "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.X, { "aria-hidden": true }) })
9706
9777
  ] }),
9707
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "w100n-docs-caption", children: t.pageSize }),
9708
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.pageSize, children: [["A4", a4], ["Letter", letter], ["Legal", legal]].map(([label, size2]) => {
9778
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-caption", children: t.pageSize }),
9779
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.pageSize, children: [["A4", a4], ["Letter", letter], ["Legal", legal]].map(([label, size2]) => {
9709
9780
  const land = draft2.width > draft2.height;
9710
9781
  const on2 = Math.abs(Math.min(draft2.width, draft2.height) - size2.width) < 2 && Math.abs(Math.max(draft2.width, draft2.height) - size2.height) < 2;
9711
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-pressed": on2, onClick: () => setDraft2({ ...draft2, width: land ? size2.height : size2.width, height: land ? size2.width : size2.height }), children: label }, label);
9782
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-pressed": on2, onClick: () => setDraft2({ ...draft2, width: land ? size2.height : size2.width, height: land ? size2.width : size2.height }), children: label }, label);
9712
9783
  }) }),
9713
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "w100n-docs-caption", children: t.orientation }),
9714
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.orientation, children: [[false, t.portrait], [true, t.landscape]].map(([land, label]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9784
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-caption", children: t.orientation }),
9785
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.orientation, children: [[false, t.portrait], [true, t.landscape]].map(([land, label]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9715
9786
  "button",
9716
9787
  {
9717
9788
  type: "button",
@@ -9723,11 +9794,11 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9723
9794
  },
9724
9795
  label
9725
9796
  )) }),
9726
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "w100n-docs-caption", children: t.marginsCm }),
9727
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.margins, children: margins.map(([label, values]) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-pressed": values.every((v, n) => Math.abs(cm(v) - draft2.margins[n]) < 0.05), onClick: () => setDraft2({ ...draft2, margins: values.map(cm) }), children: label }, label)) }),
9728
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-setup-grid", children: [t.mTop, t.mRight, t.mBottom, t.mLeft].map((label, n) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { children: [
9729
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: label }),
9730
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9797
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-caption", children: t.marginsCm }),
9798
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.margins, children: margins.map(([label, values]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-pressed": values.every((v, n) => Math.abs(cm(v) - draft2.margins[n]) < 0.05), onClick: () => setDraft2({ ...draft2, margins: values.map(cm) }), children: label }, label)) }),
9799
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-setup-grid", children: [t.mTop, t.mRight, t.mBottom, t.mLeft].map((label, n) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
9800
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label }),
9801
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9731
9802
  "input",
9732
9803
  {
9733
9804
  className: "w100n-docs-field",
@@ -9740,111 +9811,111 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9740
9811
  }
9741
9812
  )
9742
9813
  ] }, n)) }),
9743
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-setup-line", children: [
9744
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: t.headerText }),
9745
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { className: "w100n-docs-field", value: draft2.header, onChange: (e) => setDraft2({ ...draft2, header: e.target.value }) })
9814
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-line", children: [
9815
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t.headerText }),
9816
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { className: "w100n-docs-field", value: draft2.header, onChange: (e) => setDraft2({ ...draft2, header: e.target.value }) })
9746
9817
  ] }),
9747
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-setup-line", children: [
9748
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: t.footerText }),
9749
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { className: "w100n-docs-field", value: draft2.footer, onChange: (e) => setDraft2({ ...draft2, footer: e.target.value }) })
9818
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-line", children: [
9819
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t.footerText }),
9820
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { className: "w100n-docs-field", value: draft2.footer, onChange: (e) => setDraft2({ ...draft2, footer: e.target.value }) })
9750
9821
  ] }),
9751
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-setup-check", children: [
9752
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "checkbox", checked: draft2.numbers, onChange: (e) => setDraft2({ ...draft2, numbers: e.target.checked }) }),
9822
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-check", children: [
9823
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", checked: draft2.numbers, onChange: (e) => setDraft2({ ...draft2, numbers: e.target.checked }) }),
9753
9824
  t.pageNumbers
9754
9825
  ] }),
9755
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-pdf-dialog-end", children: [
9756
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDraft2(null), children: t.cancel }),
9757
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: applySetup, children: [
9758
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Check, { "aria-hidden": true }),
9826
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-pdf-dialog-end", children: [
9827
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDraft2(null), children: t.cancel }),
9828
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: applySetup, children: [
9829
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9759
9830
  t.apply
9760
9831
  ] })
9761
9832
  ] })
9762
9833
  ] }) }),
9763
- slot && (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-notes", children: [
9764
- draft && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-card w100n-text-draft", children: [
9765
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("blockquote", { children: draft.quote }),
9766
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Mentions, { autoFocus: true, value: draft.body, placeholder: t.writeComment, label: t.writeComment, people, onChange: (body) => setDraft({ ...draft, body }), onSend: () => void post() }),
9767
- tagged(draft.body, people).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-setup-check", children: [
9768
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "checkbox", checked: draft.give, onChange: (e) => setDraft({ ...draft, give: e.target.checked }) }),
9834
+ slot && (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-notes", children: [
9835
+ draft && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-card w100n-text-draft", children: [
9836
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("blockquote", { children: draft.quote }),
9837
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Mentions, { autoFocus: true, value: draft.body, placeholder: t.writeComment, label: t.writeComment, people, onChange: (body) => setDraft({ ...draft, body }), onSend: () => void post() }),
9838
+ tagged(draft.body, people).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-check", children: [
9839
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", checked: draft.give, onChange: (e) => setDraft({ ...draft, give: e.target.checked }) }),
9769
9840
  t.assignTo.replace("{name}", tagged(draft.body, people)[0].name)
9770
9841
  ] }),
9771
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9772
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: drop2, children: t.cancel }),
9773
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !draft.body.trim() || posting === "busy", onClick: () => void post(), children: [
9774
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.MessageSquarePlus, { "aria-hidden": true }),
9842
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9843
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: drop2, children: t.cancel }),
9844
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !draft.body.trim() || posting === "busy", onClick: () => void post(), children: [
9845
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessageSquarePlus, { "aria-hidden": true }),
9775
9846
  t.post
9776
9847
  ] })
9777
9848
  ] })
9778
9849
  ] }),
9779
- suggested.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9780
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "w100n-docs-caption", children: [
9781
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.FilePenLine, { "aria-hidden": true }),
9850
+ suggested.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9851
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "w100n-docs-caption", children: [
9852
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.FilePenLine, { "aria-hidden": true }),
9782
9853
  t.suggestions,
9783
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: suggested.length })
9854
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: suggested.length })
9784
9855
  ] }),
9785
- suggested.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("article", { className: "w100n-text-card w100n-text-change", "data-kind": c.kind, onClick: () => jump(c.from), children: [
9786
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { children: [
9787
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: (c.author || "?").slice(0, 1).toUpperCase() }),
9788
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-who", children: [
9789
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { children: c.author || t.someone }),
9790
- c.date && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: when(c.date) })
9856
+ suggested.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("article", { className: "w100n-text-card w100n-text-change", "data-kind": c.kind, onClick: () => jump(c.from), children: [
9857
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { children: [
9858
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: (c.author || "?").slice(0, 1).toUpperCase() }),
9859
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-who", children: [
9860
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: c.author || t.someone }),
9861
+ c.date && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: when(c.date) })
9791
9862
  ] })
9792
9863
  ] }),
9793
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { children: [
9864
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { children: [
9794
9865
  c.kind === "insertion" ? t.added : t.removed,
9795
9866
  " ",
9796
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("q", { children: c.text })
9867
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("q", { children: c.text })
9797
9868
  ] }),
9798
- can.edit && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-actions", onClick: (e) => e.stopPropagation(), children: [
9799
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", onClick: () => decide(editor, true, c.id), children: [
9800
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Check, { "aria-hidden": true }),
9869
+ can.edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-actions", onClick: (e) => e.stopPropagation(), children: [
9870
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", onClick: () => decide(editor, true, c.id), children: [
9871
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9801
9872
  t.accept
9802
9873
  ] }),
9803
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => decide(editor, false, c.id), children: [
9804
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.X, { "aria-hidden": true }),
9874
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => decide(editor, false, c.id), children: [
9875
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.X, { "aria-hidden": true }),
9805
9876
  t.reject
9806
9877
  ] })
9807
9878
  ] })
9808
9879
  ] }, i))
9809
9880
  ] }),
9810
- posting === "failed" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.commentFailed }),
9811
- failed && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.changeFailed }),
9812
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-docs-row", children: [
9813
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "w100n-docs-caption", children: [
9814
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.MessagesSquare, { "aria-hidden": true }),
9881
+ posting === "failed" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.commentFailed }),
9882
+ failed && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.changeFailed }),
9883
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-docs-row", children: [
9884
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "w100n-docs-caption", children: [
9885
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessagesSquare, { "aria-hidden": true }),
9815
9886
  t.comments,
9816
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: open.length })
9887
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: open.length })
9817
9888
  ] }),
9818
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-docs-chips", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-pressed": resolved, onClick: () => setResolved(!resolved), children: t.showResolved }) })
9889
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-chips", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-pressed": resolved, onClick: () => setResolved(!resolved), children: t.showResolved }) })
9819
9890
  ] }),
9820
- !threads.length && !draft && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "w100n-docs-muted", children: can.comment ? t.commentHint : t.noComments }),
9821
- threads.map((c) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("article", { className: "w100n-text-card", "aria-current": active === c.id, "data-resolved": c.resolved, onClick: () => show(c), children: [
9891
+ !threads.length && !draft && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-muted", children: can.comment ? t.commentHint : t.noComments }),
9892
+ threads.map((c) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("article", { className: "w100n-text-card", "aria-current": active === c.id, "data-resolved": c.resolved, onClick: () => show(c), children: [
9822
9893
  person(c),
9823
- c.assignee && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-text-given", "data-me": c.assignee.id === host?.me.id, children: c.assignee.id === host?.me.id ? t.assignedYou : t.assignedTo.replace("{name}", c.assignee.name) }),
9824
- c.quote && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("blockquote", { children: c.quote }),
9894
+ c.assignee && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-given", "data-me": c.assignee.id === host?.me.id, children: c.assignee.id === host?.me.id ? t.assignedYou : t.assignedTo.replace("{name}", c.assignee.name) }),
9895
+ c.quote && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("blockquote", { children: c.quote }),
9825
9896
  words3(c),
9826
- all.filter((r) => r.replyTo === c.id).map((r) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-reply", children: [
9897
+ all.filter((r) => r.replyTo === c.id).map((r) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-reply", children: [
9827
9898
  person(r),
9828
9899
  words3(r)
9829
9900
  ] }, r.id)),
9830
- reply?.id === c.id && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-reply", onClick: (e) => e.stopPropagation(), children: [
9831
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Mentions, { autoFocus: true, value: reply.body, placeholder: t.writeComment, label: t.reply, people, onChange: (body) => setReply({ ...reply, body }), onSend: () => void answer(c) }),
9832
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9833
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setReply(null), children: t.cancel }),
9834
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !reply.body.trim() || posting === "busy", onClick: () => void answer(c), children: [
9835
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Reply, { "aria-hidden": true }),
9901
+ reply?.id === c.id && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-reply", onClick: (e) => e.stopPropagation(), children: [
9902
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Mentions, { autoFocus: true, value: reply.body, placeholder: t.writeComment, label: t.reply, people, onChange: (body) => setReply({ ...reply, body }), onSend: () => void answer(c) }),
9903
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9904
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setReply(null), children: t.cancel }),
9905
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !reply.body.trim() || posting === "busy", onClick: () => void answer(c), children: [
9906
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Reply, { "aria-hidden": true }),
9836
9907
  t.reply
9837
9908
  ] })
9838
9909
  ] })
9839
9910
  ] }),
9840
- can.comment && reply?.id !== c.id && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-actions", onClick: (e) => e.stopPropagation(), children: [
9841
- c.resolved && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-docs-badge", children: t.resolved }),
9842
- !c.resolved && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: () => setReply({ id: c.id, body: "" }), children: [
9843
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Reply, { "aria-hidden": true }),
9911
+ can.comment && reply?.id !== c.id && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-actions", onClick: (e) => e.stopPropagation(), children: [
9912
+ c.resolved && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-badge", children: t.resolved }),
9913
+ !c.resolved && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: () => setReply({ id: c.id, body: "" }), children: [
9914
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Reply, { "aria-hidden": true }),
9844
9915
  t.reply
9845
9916
  ] }),
9846
- host?.resolveComment && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", onClick: () => void settle2(c), children: [
9847
- c.resolved ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.RotateCcw, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Check, { "aria-hidden": true }),
9917
+ host?.resolveComment && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", onClick: () => void settle2(c), children: [
9918
+ c.resolved ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.RotateCcw, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9848
9919
  c.resolved ? t.reopen : t.resolve
9849
9920
  ] })
9850
9921
  ] })
@@ -9852,12 +9923,12 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9852
9923
  ] }), slot)
9853
9924
  ] });
9854
9925
  }
9855
- var import_react10, import_lucide_react5, import_react11, import_react_dom2, import_jsx_runtime7, legal, symbols, helpers, cm, inks, glows, faces, sizes, uid2;
9926
+ var import_react10, import_lucide_react6, import_react11, import_react_dom2, import_jsx_runtime8, legal, symbols, helpers, cm, glows, faces, sizes, uid2;
9856
9927
  var init_TextEditor = __esm({
9857
9928
  "src/editor/TextEditor.tsx"() {
9858
9929
  "use strict";
9859
9930
  import_react10 = require("@tiptap/react");
9860
- import_lucide_react5 = require("lucide-react");
9931
+ import_lucide_react6 = require("lucide-react");
9861
9932
  import_react11 = require("react");
9862
9933
  import_react_dom2 = require("react-dom");
9863
9934
  init_docx();
@@ -9871,7 +9942,8 @@ var init_TextEditor = __esm({
9871
9942
  init_math();
9872
9943
  init_Mentions();
9873
9944
  init_pager();
9874
- import_jsx_runtime7 = require("react/jsx-runtime");
9945
+ init_Swatches();
9946
+ import_jsx_runtime8 = require("react/jsx-runtime");
9875
9947
  legal = { width: 816, height: 1344 };
9876
9948
  symbols = [
9877
9949
  ["\xA9", "copyright"],
@@ -9927,7 +9999,6 @@ var init_TextEditor = __esm({
9927
9999
  ];
9928
10000
  helpers = [["x\xB2", "^{2}"], ["x\u2099", "_{n}"], ["\u221Ax", "\\sqrt{}"], ["a/b", "\\frac{}{}"], ["\u2211", "\\sum_{}^{}"], ["\u222B", "\\int "], ["\u03C0", "\\pi "], ["\u2264", "\\le "], ["\u2265", "\\ge "], ["\u2260", "\\ne "], ["\xB1", "\\pm "], ["\xB7", "\\cdot "]];
9929
10001
  cm = (px2) => Math.round(px2 / 96 * 254) / 100;
9930
- inks = ["#0f172a", "#475569", "#dc2626", "#ea580c", "#ca8a04", "#16a34a", "#0891b2", "#2563eb", "#7c3aed", "#db2777"];
9931
10002
  glows = ["#fef08a", "#bbf7d0", "#bfdbfe", "#fbcfe8", "#fed7aa", "#ddd6fe"];
9932
10003
  faces = ["Arial", "Calibri", "Cambria", "Courier New", "Georgia", "Inter", "Roboto", "Times New Roman", "Verdana"];
9933
10004
  sizes = [8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48, 72];
@@ -10088,7 +10159,7 @@ function bind(api, injector, doc, model, edit) {
10088
10159
  if (canon(now) === canon(empty)) m.delete(name);
10089
10160
  else m.set(name, now);
10090
10161
  };
10091
- const fit = (list, now) => {
10162
+ const fit2 = (list, now) => {
10092
10163
  if (list.length > now.length) list.delete(now.length, list.length - now.length);
10093
10164
  else if (list.length < now.length) list.push(now.slice(list.length));
10094
10165
  };
@@ -10171,10 +10242,10 @@ function bind(api, injector, doc, model, edit) {
10171
10242
  return shift(cols, p.sourceRange.startColumn, count(p.sourceRange, false), p.targetRange.startColumn);
10172
10243
  case "sheet.mutation.set-worksheet-row-count":
10173
10244
  at2.delete(sid);
10174
- return fit(rows, l.rows);
10245
+ return fit2(rows, l.rows);
10175
10246
  case "sheet.mutation.set-worksheet-column-count":
10176
10247
  at2.delete(sid);
10177
- return fit(cols, l.cols);
10248
+ return fit2(cols, l.cols);
10178
10249
  case "sheet.mutation.set-worksheet-row-height":
10179
10250
  case "sheet.mutation.set-worksheet-row-is-auto-height":
10180
10251
  case "sheet.mutation.set-row-hidden":
@@ -10460,6 +10531,7 @@ var init_calm = __esm({
10460
10531
  var grid_exports = {};
10461
10532
  __export(grid_exports, {
10462
10533
  bolder: () => bolder,
10534
+ fit: () => fit,
10463
10535
  grid: () => grid2,
10464
10536
  marks: () => marks
10465
10537
  });
@@ -10490,6 +10562,29 @@ function grid2(container, language, edit) {
10490
10562
  ]
10491
10563
  });
10492
10564
  }
10565
+ function fit(injector, unitId) {
10566
+ const book = injector.get(import_core6.IUniverInstanceService).getUnit(unitId);
10567
+ const skeletons = injector.get(import_preset_sheets_core.IRenderManagerService).getRenderUnitById(unitId)?.with(import_preset_sheets_core.SheetSkeletonManagerService);
10568
+ if (!book || !skeletons) return;
10569
+ const commands = injector.get(import_core6.ICommandService);
10570
+ for (const sheet2 of book.getSheets()) {
10571
+ const rows = /* @__PURE__ */ new Set();
10572
+ sheet2.getCellMatrix().forValue((r, _, cell2) => {
10573
+ if (book.getStyles().getStyleByCell(cell2)?.tb === import_core6.WrapStrategy.WRAP) rows.add(r);
10574
+ });
10575
+ if (!rows.size) continue;
10576
+ const subUnitId = sheet2.getSheetId(), last2 = sheet2.getMaxColumns() - 1, all = [...rows];
10577
+ const line = (r) => ({ startRow: r, endRow: r, startColumn: 0, endColumn: last2 });
10578
+ const was = Object.fromEntries(all.map((r) => [r, sheet2.getConfig().rowData[r]?.ia ?? null]));
10579
+ const stored2 = Object.fromEntries(all.map((r) => [r, sheet2.getRowHeight(r)]));
10580
+ const auto = (list, info) => commands.syncExecuteCommand(import_preset_sheets_core.SetWorksheetRowIsAutoHeightMutation.id, { unitId, subUnitId, ranges: list.map(line), autoHeightInfo: info }, { onlyLocal: true });
10581
+ auto(all, 1);
10582
+ const grow2 = (skeletons.ensureSkeleton(subUnitId)?.calculateAutoHeightInRange(all.map(line)) ?? []).filter((x) => (x.autoHeight ?? 0) > stored2[x.row]);
10583
+ const keep = all.filter((r) => !grow2.some((x) => x.row === r));
10584
+ if (keep.length) auto(keep, was);
10585
+ if (grow2.length) commands.syncExecuteCommand(import_preset_sheets_core.SetWorksheetRowAutoHeightMutation.id, { unitId, subUnitId, rowsAutoHeightInfo: grow2 }, { onlyLocal: true });
10586
+ }
10587
+ }
10493
10588
  function marks({ univer, univerAPI: api }) {
10494
10589
  const service = univer.__getInjector().get(import_preset_sheets_core.IMarkSelectionService);
10495
10590
  let list = [];
@@ -10515,7 +10610,7 @@ function marks({ univer, univerAPI: api }) {
10515
10610
  }
10516
10611
  };
10517
10612
  }
10518
- var import_lib, import_lib2, import_lib3, import_lib4, import_lib5, import_lib6, import_presets, import_preset_sheets_core, import_preset_sheets_data_validation, import_preset_sheets_filter, import_preset_sheets_find_replace, import_preset_sheets_note, import_preset_sheets_sort, import_en_US, import_pl_PL, import_en_US2, import_pl_PL2, import_en_US3, import_pl_PL3, import_en_US4, import_pl_PL4, import_en_US5, import_pl_PL5, import_en_US6, import_pl_PL6, draw;
10613
+ var import_lib, import_lib2, import_lib3, import_lib4, import_lib5, import_lib6, import_presets, import_core6, import_preset_sheets_core, import_preset_sheets_data_validation, import_preset_sheets_filter, import_preset_sheets_find_replace, import_preset_sheets_note, import_preset_sheets_sort, import_en_US, import_pl_PL, import_en_US2, import_pl_PL2, import_en_US3, import_pl_PL3, import_en_US4, import_pl_PL4, import_en_US5, import_pl_PL5, import_en_US6, import_pl_PL6, draw;
10519
10614
  var init_grid = __esm({
10520
10615
  "src/sheets/grid.ts"() {
10521
10616
  "use strict";
@@ -10526,6 +10621,7 @@ var init_grid = __esm({
10526
10621
  import_lib5 = require("@univerjs/preset-sheets-data-validation/lib/index.css");
10527
10622
  import_lib6 = require("@univerjs/preset-sheets-note/lib/index.css");
10528
10623
  import_presets = require("@univerjs/presets");
10624
+ import_core6 = require("@univerjs/core");
10529
10625
  import_preset_sheets_core = require("@univerjs/preset-sheets-core");
10530
10626
  import_preset_sheets_data_validation = require("@univerjs/preset-sheets-data-validation");
10531
10627
  import_preset_sheets_filter = require("@univerjs/preset-sheets-filter");
@@ -10561,6 +10657,7 @@ __export(SheetView_exports, {
10561
10657
  decimals: () => decimals,
10562
10658
  default: () => SheetView_default,
10563
10659
  readSheet: () => readSheet,
10660
+ sized: () => sized,
10564
10661
  writeSheet: () => writeSheet
10565
10662
  });
10566
10663
  function autoSum(r, numeric2) {
@@ -10591,6 +10688,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10591
10688
  const [refusal, setRefusal] = (0, import_react12.useState)(null);
10592
10689
  const [pop, setPop] = (0, import_react12.useState)(null);
10593
10690
  const [look, setLook] = (0, import_react12.useState)(null);
10691
+ const [size2, setSize] = (0, import_react12.useState)(null);
10594
10692
  const edit = rights.edit && !!onSaveRequest && (!room || !!shared && !room.readonly);
10595
10693
  const notes3 = !edit && rights.comment && !!onSaveRequest && !room;
10596
10694
  (0, import_react12.useEffect)(() => {
@@ -10614,7 +10712,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10614
10712
  setDirty(false);
10615
10713
  const families = new Set([model.book.defaultStyle, ...Object.values(model.book.styles)].map((s) => typeof s === "object" ? s?.ff : null).filter(Boolean));
10616
10714
  const fonts = Promise.race([Promise.all([...families].flatMap((f) => ["", "bold ", "italic "].map((w) => document.fonts.load(`${w}11pt "${f}"`).catch(() => [])))), new Promise((r) => setTimeout(r, 800))]);
10617
- Promise.all([Promise.resolve().then(() => (init_grid(), grid_exports)), fonts]).then(([{ bolder: bolder2, grid: grid3, marks: marks2 }]) => {
10715
+ Promise.all([Promise.resolve().then(() => (init_grid(), grid_exports)), fonts]).then(([{ bolder: bolder2, fit: fit2, grid: grid3, marks: marks2 }]) => {
10618
10716
  if (gone) return;
10619
10717
  shared?.doc.off("update", change);
10620
10718
  if (shared && moved) model = extras(shared.doc, build(shared.doc));
@@ -10627,6 +10725,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10627
10725
  const unbold = bolder2(univer.__getInjector());
10628
10726
  if (model.active) wb.setActiveSheet(model.active);
10629
10727
  if (!edit) wb.setEditable(false);
10728
+ const fitting = setTimeout(() => fit2(univer.__getInjector(), wb.getId()));
10630
10729
  const state = { api: api2, model, original: bytes, changes: 0 };
10631
10730
  const untrack = track2(api2, model, { view: true, comment: notes3, edit }, () => {
10632
10731
  state.changes++;
@@ -10654,7 +10753,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10654
10753
  last2 = JSON.stringify(here);
10655
10754
  people.setLocalStateField("selection", here);
10656
10755
  }
10657
- setLook({ bl: s.bl === 1, it: s.it === 1, ul: !!s.ul?.s, st: !!s.st?.s, ht: s.ht ?? 0, tb: s.tb === 3, merged: range2.isMerged() || range2.isPartOfMerge(), n: s.n?.pattern ?? "General", cl: s.cl?.rgb ?? "", bg: s.bg?.rgb ?? "" });
10756
+ setLook({ bl: s.bl === 1, it: s.it === 1, ul: !!s.ul?.s, st: !!s.st?.s, fs: s.fs ?? 11, ht: s.ht ?? 0, tb: s.tb === 3, merged: range2.isMerged() || range2.isPartOfMerge(), n: s.n?.pattern ?? "General", cl: s.cl?.rgb ?? "", bg: s.bg?.rgb ?? "" });
10658
10757
  };
10659
10758
  const later = () => {
10660
10759
  if (!frame) frame = requestAnimationFrame(refresh);
@@ -10670,6 +10769,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10670
10769
  selection.dispose();
10671
10770
  commands.dispose();
10672
10771
  cancelAnimationFrame(frame);
10772
+ clearTimeout(fitting);
10673
10773
  host2.hidden = true;
10674
10774
  setTimeout(() => {
10675
10775
  univer.dispose();
@@ -10763,15 +10863,15 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10763
10863
  setPop(null);
10764
10864
  }
10765
10865
  };
10766
- const tool = (Icon, label, onClick, pressed) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": label, title: label, "aria-pressed": pressed, disabled: phase !== "ready", onClick, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { "aria-hidden": true }) });
10767
- const gap = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-sheet-gap" });
10768
- const anchor = (key2, trigger, body) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-sheet-anchor", children: [
10866
+ const tool = (Icon, label, onClick, pressed) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", "aria-label": label, title: label, "aria-pressed": pressed, disabled: phase !== "ready", onClick, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { "aria-hidden": true }) });
10867
+ const gap = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-gap" });
10868
+ const anchor = (key2, trigger, body) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-anchor", children: [
10769
10869
  trigger,
10770
- pop === key2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-sheet-pop", role: "dialog", children: body })
10870
+ pop === key2 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-pop", role: "dialog", children: body })
10771
10871
  ] });
10772
- const opener = (key2, Icon, label, bar) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", "aria-label": label, title: label, "aria-expanded": pop === key2, disabled: phase !== "ready", onClick: () => setPop(pop === key2 ? null : key2), children: [
10773
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { "aria-hidden": true }),
10774
- bar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { className: "w100n-sheet-bar", style: { background: bar || "currentColor" } })
10872
+ const opener = (key2, Icon, label, bar) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", "aria-label": label, title: label, "aria-expanded": pop === key2, disabled: phase !== "ready", onClick: () => setPop(pop === key2 ? null : key2), children: [
10873
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { "aria-hidden": true }),
10874
+ bar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "w100n-sheet-bar", style: { background: bar || "currentColor" } })
10775
10875
  ] });
10776
10876
  const currency = language === "pl" ? '#,##0.00 "z\u0142"' : language === "uk" ? '#,##0.00 "\u20B4"' : '"$"#,##0.00';
10777
10877
  const formats = [
@@ -10788,7 +10888,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10788
10888
  const sum = () => {
10789
10889
  const r = range()?.getRange();
10790
10890
  const ws = sheet2();
10791
- const numeric2 = (row2, c) => ws?.getRange(row2, c).getCellData()?.t === import_core6.CellValueType.NUMBER;
10891
+ const numeric2 = (row2, c) => ws?.getRange(row2, c).getCellData()?.t === import_core7.CellValueType.NUMBER;
10792
10892
  if (r && ws) for (const x of autoSum(r, numeric2)) ws.getRange(x.row, x.col).setValue({ f: x.f });
10793
10893
  };
10794
10894
  const shown = formats.find(([, p]) => p === look?.n)?.[0] ?? (look && look.n !== "General" ? look.n : t.general);
@@ -10803,22 +10903,18 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10803
10903
  if (rows) ws.deleteRows(r.startRow, r.endRow - r.startRow + 1);
10804
10904
  else ws.deleteColumns(r.startColumn, r.endColumn - r.startColumn + 1);
10805
10905
  };
10806
- const swatches = (list, pick, none, reset, current) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-sheet-swatches", children: [
10807
- list.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": c, "aria-pressed": current.toLowerCase() === c, onClick: () => pick(c), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { style: { background: c } }) }, i)),
10808
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-sheet-none", onClick: reset, children: none })
10809
- ] });
10810
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-sheet", "data-theme": theme, onKeyDownCapture: keys2, children: [
10811
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-sheet-ribbon", role: "toolbar", "aria-label": t.tools, onKeyDown: rove, onPointerDown: (e) => {
10906
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet", "data-theme": theme, onKeyDownCapture: keys2, children: [
10907
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet-ribbon", role: "toolbar", "aria-label": t.tools, onKeyDown: rove, onPointerDown: (e) => {
10812
10908
  if (e.target.closest("button")) e.preventDefault();
10813
10909
  }, children: [
10814
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-sheet-tools", children: [
10815
- edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
10816
- tool(import_lucide_react6.Undo2, t.undo, () => void api()?.undo()),
10817
- tool(import_lucide_react6.Redo2, t.redo, () => void api()?.redo()),
10910
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet-tools", children: [
10911
+ edit && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
10912
+ tool(import_lucide_react7.Undo2, t.undo, () => void api()?.undo()),
10913
+ tool(import_lucide_react7.Redo2, t.redo, () => void api()?.redo()),
10818
10914
  gap,
10819
10915
  anchor(
10820
10916
  "format",
10821
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
10917
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
10822
10918
  "button",
10823
10919
  {
10824
10920
  type: "button",
@@ -10829,12 +10925,12 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10829
10925
  disabled: phase !== "ready",
10830
10926
  onClick: () => setPop(pop === "format" ? null : "format"),
10831
10927
  children: [
10832
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: shown }),
10833
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
10928
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: shown }),
10929
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.ChevronDown, { "aria-hidden": true })
10834
10930
  ]
10835
10931
  }
10836
10932
  ),
10837
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-sheet-list", children: formats.map(([label, pattern], i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
10933
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-list", children: formats.map(([label, pattern], i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
10838
10934
  "button",
10839
10935
  {
10840
10936
  type: "button",
@@ -10845,123 +10941,139 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10845
10941
  },
10846
10942
  children: [
10847
10943
  label,
10848
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: pattern === "General" ? "" : pattern })
10944
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("small", { children: pattern === "General" ? "" : pattern })
10849
10945
  ]
10850
10946
  },
10851
10947
  i
10852
10948
  )) })
10853
10949
  ),
10854
- tool(import_lucide_react6.Euro, t.asCurrency, () => range()?.setNumberFormat('#,##0.00 "\u20AC"'), look?.n === '#,##0.00 "\u20AC"'),
10855
- tool(import_lucide_react6.Percent, t.asPercent, () => range()?.setNumberFormat("0.00%"), look?.n === "0.00%"),
10856
- tool(import_lucide_react6.DecimalsArrowLeft, t.fewerDecimals, () => places(-1)),
10857
- tool(import_lucide_react6.DecimalsArrowRight, t.moreDecimals, () => places(1)),
10950
+ tool(import_lucide_react7.Euro, t.asCurrency, () => range()?.setNumberFormat('#,##0.00 "\u20AC"'), look?.n === '#,##0.00 "\u20AC"'),
10951
+ tool(import_lucide_react7.Percent, t.asPercent, () => range()?.setNumberFormat("0.00%"), look?.n === "0.00%"),
10952
+ tool(import_lucide_react7.DecimalsArrowLeft, t.fewerDecimals, () => places(-1)),
10953
+ tool(import_lucide_react7.DecimalsArrowRight, t.moreDecimals, () => places(1)),
10858
10954
  gap,
10859
- tool(import_lucide_react6.Bold, t.bold, () => run3("sheet.command.set-range-bold"), look?.bl),
10860
- tool(import_lucide_react6.Italic, t.italic, () => run3("sheet.command.set-range-italic"), look?.it),
10861
- tool(import_lucide_react6.Underline, t.underline, () => run3("sheet.command.set-range-underline"), look?.ul),
10862
- tool(import_lucide_react6.Strikethrough, t.strike, () => run3("sheet.command.set-range-stroke"), look?.st),
10955
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-size", role: "group", "aria-label": t.fontSize, children: [
10956
+ tool(import_lucide_react7.Minus, t.smaller, () => run3("sheet.command.set-range-fontsize", { value: sized((look?.fs ?? 11) - 1) })),
10957
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
10958
+ "input",
10959
+ {
10960
+ "aria-label": t.fontSize,
10961
+ inputMode: "numeric",
10962
+ disabled: phase !== "ready",
10963
+ value: size2 ?? look?.fs ?? 11,
10964
+ onFocus: (e) => e.currentTarget.select(),
10965
+ onChange: (e) => setSize(e.target.value.replace(/\D/g, "").slice(0, 3)),
10966
+ onBlur: () => {
10967
+ const n = Number(size2);
10968
+ if (size2 !== null && n) run3("sheet.command.set-range-fontsize", { value: sized(n) });
10969
+ setSize(null);
10970
+ },
10971
+ onKeyDown: (e) => {
10972
+ if (e.key === "Enter") e.currentTarget.blur();
10973
+ if (e.key === "Escape") {
10974
+ setSize(null);
10975
+ e.currentTarget.blur();
10976
+ }
10977
+ }
10978
+ }
10979
+ ),
10980
+ tool(import_lucide_react7.Plus, t.bigger, () => run3("sheet.command.set-range-fontsize", { value: sized((look?.fs ?? 11) + 1) }))
10981
+ ] }),
10982
+ gap,
10983
+ tool(import_lucide_react7.Bold, t.bold, () => run3("sheet.command.set-range-bold"), look?.bl),
10984
+ tool(import_lucide_react7.Italic, t.italic, () => run3("sheet.command.set-range-italic"), look?.it),
10985
+ tool(import_lucide_react7.Underline, t.underline, () => run3("sheet.command.set-range-underline"), look?.ul),
10986
+ tool(import_lucide_react7.Strikethrough, t.strike, () => run3("sheet.command.set-range-stroke"), look?.st),
10863
10987
  anchor(
10864
10988
  "text",
10865
- opener("text", import_lucide_react6.Baseline, t.textColour, look?.cl ?? ""),
10866
- swatches(
10867
- ["#0f172a", "#475569", "#dc2626", "#ea580c", "#ca8a04", "#16a34a", "#0891b2", "#2563eb", "#7c3aed", "#db2777"],
10868
- (c) => run3("sheet.command.set-range-text-color", { value: c }),
10869
- t.automatic,
10870
- () => run3("sheet.command.reset-range-text-color"),
10871
- look?.cl ?? ""
10872
- )
10989
+ opener("text", import_lucide_react7.Baseline, t.textColour, look?.cl ?? ""),
10990
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Swatches, { current: look?.cl ?? null, none: t.automatic, onPick: (c) => run3("sheet.command.set-range-text-color", { value: c }), onNone: () => run3("sheet.command.reset-range-text-color") })
10873
10991
  ),
10874
10992
  anchor(
10875
10993
  "fill",
10876
- opener("fill", import_lucide_react6.PaintBucket, t.fill, look?.bg ?? ""),
10877
- swatches(
10878
- ["#fee2e2", "#ffedd5", "#fef9c3", "#dcfce7", "#cffafe", "#dbeafe", "#ede9fe", "#fce7f3", "#f1f5f9", "#cbd5e1"],
10879
- (c) => run3("sheet.command.set-background-color", { value: c }),
10880
- t.noFill,
10881
- () => run3("sheet.command.reset-background-color"),
10882
- look?.bg ?? ""
10883
- )
10994
+ opener("fill", import_lucide_react7.PaintBucket, t.fill, look?.bg ?? ""),
10995
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Swatches, { current: look?.bg ?? null, none: t.noFill, onPick: (c) => run3("sheet.command.set-background-color", { value: c }), onNone: () => run3("sheet.command.reset-background-color") })
10884
10996
  ),
10885
10997
  anchor(
10886
10998
  "border",
10887
- opener("border", import_lucide_react6.Grid2x2, t.borders),
10888
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-sheet-list", children: [[import_lucide_react6.Grid2x2, t.borderAll, "all"], [import_lucide_react6.Square, t.borderOuter, "outside"], [import_lucide_react6.PanelBottom, t.borderBottom, "bottom"], [import_lucide_react6.SquareDashed, t.borderNone, "none"]].map(([Icon, label, type]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", onClick: () => border(type), children: [
10889
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { "aria-hidden": true }),
10999
+ opener("border", import_lucide_react7.Grid2x2, t.borders),
11000
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-list", children: [[import_lucide_react7.Grid2x2, t.borderAll, "all"], [import_lucide_react7.Square, t.borderOuter, "outside"], [import_lucide_react7.PanelBottom, t.borderBottom, "bottom"], [import_lucide_react7.SquareDashed, t.borderNone, "none"]].map(([Icon, label, type]) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", onClick: () => border(type), children: [
11001
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { "aria-hidden": true }),
10890
11002
  label
10891
11003
  ] }, type)) })
10892
11004
  ),
10893
11005
  gap,
10894
- tool(import_lucide_react6.TextAlignStart, t.alignLeft, () => run3("sheet.command.set-horizontal-text-align", { value: 1 }), look?.ht === 1),
10895
- tool(import_lucide_react6.TextAlignCenter, t.alignCenter, () => run3("sheet.command.set-horizontal-text-align", { value: 2 }), look?.ht === 2),
10896
- tool(import_lucide_react6.TextAlignEnd, t.alignRight, () => run3("sheet.command.set-horizontal-text-align", { value: 3 }), look?.ht === 3),
10897
- tool(import_lucide_react6.TextWrap, t.wrap, () => run3("sheet.command.set-text-wrap", { value: look?.tb ? 1 : 3 }), look?.tb),
10898
- look?.merged ? tool(import_lucide_react6.TableCellsSplit, t.unmerge, () => run3("sheet.command.remove-worksheet-merge"), true) : tool(import_lucide_react6.TableCellsMerge, t.merge, () => run3("sheet.command.add-worksheet-merge-all")),
11006
+ tool(import_lucide_react7.TextAlignStart, t.alignLeft, () => run3("sheet.command.set-horizontal-text-align", { value: 1 }), look?.ht === 1),
11007
+ tool(import_lucide_react7.TextAlignCenter, t.alignCenter, () => run3("sheet.command.set-horizontal-text-align", { value: 2 }), look?.ht === 2),
11008
+ tool(import_lucide_react7.TextAlignEnd, t.alignRight, () => run3("sheet.command.set-horizontal-text-align", { value: 3 }), look?.ht === 3),
11009
+ tool(import_lucide_react7.TextWrap, t.wrap, () => run3("sheet.command.set-text-wrap", { value: look?.tb ? 1 : 3 }), look?.tb),
11010
+ look?.merged ? tool(import_lucide_react7.TableCellsSplit, t.unmerge, () => run3("sheet.command.remove-worksheet-merge"), true) : tool(import_lucide_react7.TableCellsMerge, t.merge, () => run3("sheet.command.add-worksheet-merge-all")),
10899
11011
  gap,
10900
- tool(import_lucide_react6.BetweenHorizontalStart, t.rowAbove, () => run3("sheet.command.insert-row-before")),
10901
- tool(import_lucide_react6.BetweenHorizontalEnd, t.rowBelow, () => run3("sheet.command.insert-row-after")),
10902
- tool(import_lucide_react6.BetweenVerticalStart, t.columnLeft, () => run3("sheet.command.insert-col-before")),
10903
- tool(import_lucide_react6.BetweenVerticalEnd, t.columnRight, () => run3("sheet.command.insert-col-after")),
10904
- tool(import_lucide_react6.TableRowsSplit, t.deleteRows, () => lines2(true)),
10905
- tool(import_lucide_react6.TableColumnsSplit, t.deleteColumns, () => lines2(false)),
11012
+ tool(import_lucide_react7.BetweenHorizontalStart, t.rowAbove, () => run3("sheet.command.insert-row-before")),
11013
+ tool(import_lucide_react7.BetweenHorizontalEnd, t.rowBelow, () => run3("sheet.command.insert-row-after")),
11014
+ tool(import_lucide_react7.BetweenVerticalStart, t.columnLeft, () => run3("sheet.command.insert-col-before")),
11015
+ tool(import_lucide_react7.BetweenVerticalEnd, t.columnRight, () => run3("sheet.command.insert-col-after")),
11016
+ tool(import_lucide_react7.TableRowsSplit, t.deleteRows, () => lines2(true)),
11017
+ tool(import_lucide_react7.TableColumnsSplit, t.deleteColumns, () => lines2(false)),
10906
11018
  anchor(
10907
11019
  "freeze",
10908
- opener("freeze", import_lucide_react6.Snowflake, t.freeze),
10909
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-sheet-list", children: [
10910
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => {
11020
+ opener("freeze", import_lucide_react7.Snowflake, t.freeze),
11021
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-list", children: [
11022
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
10911
11023
  sheet2()?.setFrozenRows(1);
10912
11024
  setPop(null);
10913
11025
  }, children: t.freezeRow }),
10914
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => {
11026
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
10915
11027
  sheet2()?.setFrozenColumns(1);
10916
11028
  setPop(null);
10917
11029
  }, children: t.freezeColumn }),
10918
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => run3("sheet.command.set-selection-frozen"), children: t.freezeHere }),
10919
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => {
11030
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => run3("sheet.command.set-selection-frozen"), children: t.freezeHere }),
11031
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
10920
11032
  sheet2()?.cancelFreeze();
10921
11033
  setPop(null);
10922
11034
  }, children: t.freezeNone })
10923
11035
  ] })
10924
11036
  ),
10925
11037
  gap,
10926
- tool(import_lucide_react6.Sigma, t.sum, sum),
10927
- tool(import_lucide_react6.ArrowDownAZ, t.sortUp, () => run3("sheet.command.sort-range-asc")),
10928
- tool(import_lucide_react6.ArrowDownZA, t.sortDown, () => run3("sheet.command.sort-range-desc")),
10929
- !room && tool(import_lucide_react6.Funnel, t.filter, () => run3("sheet.command.smart-toggle-filter")),
11038
+ tool(import_lucide_react7.Sigma, t.sum, sum),
11039
+ tool(import_lucide_react7.ArrowDownAZ, t.sortUp, () => run3("sheet.command.sort-range-asc")),
11040
+ tool(import_lucide_react7.ArrowDownZA, t.sortDown, () => run3("sheet.command.sort-range-desc")),
11041
+ !room && tool(import_lucide_react7.Funnel, t.filter, () => run3("sheet.command.smart-toggle-filter")),
10930
11042
  gap
10931
11043
  ] }),
10932
- (edit || notes3) && tool(import_lucide_react6.StickyNote, t.note, () => run3("sheet.operation.add-note-popup")),
10933
- tool(import_lucide_react6.Search, t.find, () => run3("ui.operation.open-find-dialog"))
11044
+ (edit || notes3) && tool(import_lucide_react7.StickyNote, t.note, () => run3("sheet.operation.add-note-popup")),
11045
+ tool(import_lucide_react7.Search, t.find, () => run3("ui.operation.open-find-dialog"))
10934
11046
  ] }),
10935
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-sheet-end", children: [
10936
- room && (room.ready ? !room.online : room.late || room.denied) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-live", title: room.denied ? void 0 : t.offlineHint, children: [
10937
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.WifiOff, { "aria-hidden": true }),
11047
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-end", children: [
11048
+ room && (room.ready ? !room.online : room.late || room.denied) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-text-live", title: room.denied ? void 0 : t.offlineHint, children: [
11049
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.WifiOff, { "aria-hidden": true }),
10938
11050
  room.denied ? t.liveOff : t.offline
10939
11051
  ] }),
10940
- room && room.people.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-people", role: "group", "aria-label": t.people, children: room.people.map((p) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-face", title: p.me ? `${p.name} (${t.you})` : p.name, style: { "--face": p.color }, children: p.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: p.avatarUrl, alt: "" }) : p.name.split(/\s+/).map((w) => w[0]).join("").slice(0, 2).toUpperCase() }, p.id)) }),
10941
- !edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-badge", children: notes3 ? t.notesOnly : t.viewOnly }),
10942
- saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-sheet-muted", role: "alert", children: refusal ? t.refused[refusal.code].replace("{sheet}", refusal.sheet) : t.saveFailed }),
10943
- (edit || notes3) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !pending2 || saving === "busy" || phase !== "ready" || !!room && !room.online, onClick: () => void save2(), children: [
10944
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Save, { "aria-hidden": true }),
11052
+ room && room.people.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-text-people", role: "group", "aria-label": t.people, children: room.people.map((p) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-text-face", title: p.me ? `${p.name} (${t.you})` : p.name, style: { "--face": p.color }, children: p.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("img", { src: p.avatarUrl, alt: "" }) : p.name.split(/\s+/).map((w) => w[0]).join("").slice(0, 2).toUpperCase() }, p.id)) }),
11053
+ !edit && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-docs-badge", children: notes3 ? t.notesOnly : t.viewOnly }),
11054
+ saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-muted", role: "alert", children: refusal ? t.refused[refusal.code].replace("{sheet}", refusal.sheet) : t.saveFailed }),
11055
+ (edit || notes3) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !pending2 || saving === "busy" || phase !== "ready" || !!room && !room.online, onClick: () => void save2(), children: [
11056
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Save, { "aria-hidden": true }),
10945
11057
  saving === "busy" ? t.saving : !pending2 && saving === "done" ? t.saved : t.save
10946
11058
  ] })
10947
11059
  ] })
10948
11060
  ] }),
10949
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-sheet-stage", onPointerDown: () => setPop(null), children: [
10950
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: box2, className: "w100n-sheet-grid" }),
10951
- phase !== "ready" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-sheet-cover", children: phase === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t.loading }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
11061
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet-stage", onPointerDown: () => setPop(null), children: [
11062
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: box2, className: "w100n-sheet-grid" }),
11063
+ phase !== "ready" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w100n-sheet-cover", children: phase === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: t.loading }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { children: [
10952
11064
  t.failed,
10953
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-action", onClick: () => setAttempt((n) => n + 1), children: t.retry })
11065
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", className: "w100n-docs-action", onClick: () => setAttempt((n) => n + 1), children: t.retry })
10954
11066
  ] }) })
10955
11067
  ] })
10956
11068
  ] });
10957
11069
  }
10958
- var import_react12, import_lucide_react6, import_core6, import_jsx_runtime8, decimals, letters2, SheetView_default;
11070
+ var import_react12, import_lucide_react7, import_core7, import_jsx_runtime9, sized, decimals, letters2, SheetView_default;
10959
11071
  var init_SheetView = __esm({
10960
11072
  "src/sheets/SheetView.tsx"() {
10961
11073
  "use strict";
10962
11074
  import_react12 = require("react");
10963
- import_lucide_react6 = require("lucide-react");
10964
- import_core6 = require("@univerjs/core");
11075
+ import_lucide_react7 = require("lucide-react");
11076
+ import_core7 = require("@univerjs/core");
10965
11077
  init_live();
10966
11078
  init_focus();
10967
11079
  init_bind();
@@ -10972,8 +11084,10 @@ var init_SheetView = __esm({
10972
11084
  init_shared();
10973
11085
  init_text2();
10974
11086
  init_xlsx();
11087
+ init_Swatches();
10975
11088
  init_sheets();
10976
- import_jsx_runtime8 = require("react/jsx-runtime");
11089
+ import_jsx_runtime9 = require("react/jsx-runtime");
11090
+ sized = (n) => Math.min(96, Math.max(6, Math.round(n)));
10977
11091
  decimals = (pattern, step) => {
10978
11092
  const p = pattern === "General" ? "0" : pattern;
10979
11093
  const next = Math.max(0, (/0(?:\.(0+))?/.exec(p)?.[1]?.length ?? 0) + step);
@@ -11058,15 +11172,15 @@ function changes2(before, after) {
11058
11172
  }
11059
11173
  function Compare({ host, documentId, kind, older, t }) {
11060
11174
  const rows = useLoad(async (signal) => changes2(await textOf2(kind, older), await textOf2(kind, await host.content(documentId, null, { signal }))), [host, documentId, older]);
11061
- if (rows.error) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w100n-docs-empty", children: t.failed });
11062
- if (!rows.data) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
11175
+ if (rows.error) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.failed });
11176
+ if (!rows.data) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
11063
11177
  const added = rows.data.filter((r) => r.op === "+").length, removed = rows.data.filter((r) => r.op === "-").length, edited = rows.data.filter((r) => r.op === "~").length;
11064
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w100n-docs-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "w100n-docs-page w100n-compare", children: [
11065
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "w100n-compare-sum", children: added + removed + edited ? t.changeCount.replace("{added}", String(added)).replace("{edited}", String(edited)).replace("{removed}", String(removed)) : t.noChanges }),
11066
- rows.data.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { "data-op": r.op, children: r.parts.map((p, k) => p.op === "=" ? p.text : p.op === "+" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ins", { children: p.text }, k) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("del", { children: p.text }, k)) }, i))
11178
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-page w100n-compare", children: [
11179
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-compare-sum", children: added + removed + edited ? t.changeCount.replace("{added}", String(added)).replace("{edited}", String(edited)).replace("{removed}", String(removed)) : t.noChanges }),
11180
+ rows.data.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { "data-op": r.op, children: r.parts.map((p, k) => p.op === "=" ? p.text : p.op === "+" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ins", { children: p.text }, k) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("del", { children: p.text }, k)) }, i))
11067
11181
  ] }) });
11068
11182
  }
11069
- var import_jsx_runtime16, words2, alike;
11183
+ var import_jsx_runtime18, words2, alike;
11070
11184
  var init_Compare = __esm({
11071
11185
  "src/Compare.tsx"() {
11072
11186
  "use strict";
@@ -11074,7 +11188,7 @@ var init_Compare = __esm({
11074
11188
  init_diff();
11075
11189
  init_markdown();
11076
11190
  init_useLoad();
11077
- import_jsx_runtime16 = require("react/jsx-runtime");
11191
+ import_jsx_runtime18 = require("react/jsx-runtime");
11078
11192
  words2 = (text) => text.split(/(\s+)/).filter(Boolean);
11079
11193
  alike = (a, b) => {
11080
11194
  const x = a.split(/\s+/).filter(Boolean), y = b.split(/\s+/).filter(Boolean);
@@ -11091,6 +11205,7 @@ __export(index_exports, {
11091
11205
  FilePreview: () => FilePreview,
11092
11206
  GuestDocument: () => GuestDocument,
11093
11207
  GuestRefused: () => GuestRefused,
11208
+ PreviewCard: () => PreviewCard,
11094
11209
  SlidesView: () => SlidesView,
11095
11210
  kindOf: () => kindOf,
11096
11211
  kinds: () => kinds,
@@ -11104,7 +11219,7 @@ __export(index_exports, {
11104
11219
  module.exports = __toCommonJS(index_exports);
11105
11220
 
11106
11221
  // src/DocumentOverlay.tsx
11107
- var import_lucide_react7 = require("lucide-react");
11222
+ var import_lucide_react8 = require("lucide-react");
11108
11223
  var import_react13 = require("react");
11109
11224
  var import_react_dom3 = require("react-dom");
11110
11225
  init_focus();
@@ -11988,7 +12103,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
11988
12103
  pages.current.set(id, page);
11989
12104
  return page;
11990
12105
  };
11991
- const fit = (box2, pad = 0) => box2.w > pad && box2.h > pad ? Math.min((box2.w - pad) / deck.width, (box2.h - pad) / deck.height) : 0.5;
12106
+ const fit2 = (box2, pad = 0) => box2.w > pad && box2.h > pad ? Math.min((box2.w - pad) / deck.width, (box2.h - pad) / deck.height) : 0.5;
11992
12107
  const byKey = (a, b) => deck.slides[a].key < deck.slides[b].key ? -1 : 1;
11993
12108
  const around3 = (i) => [i - 1, i, i + 1].filter((k) => k >= 0 && k < count).sort(byKey);
11994
12109
  const caption = (i) => `${t.slide} ${i + 1}${deck.slides[i].title ? `: ${deck.slides[i].title}` : ""}`;
@@ -12331,7 +12446,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
12331
12446
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w100n-slides-main", children: [
12332
12447
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: stageRef, className: "w100n-slides-stage", style: { "--w100n-ratio": `${deck.width} / ${deck.height}` }, children: around3(index).map((i) => {
12333
12448
  const id = `m:${deck.slides[i].key}:${epoch}`;
12334
- return frame(id, frozen2(deck.slides[i], id, "edit"), fit(stageBox, 32), caption(i), i !== index);
12449
+ return frame(id, frozen2(deck.slides[i], id, "edit"), fit2(stageBox, 32), caption(i), i !== index);
12335
12450
  }) }),
12336
12451
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "w100n-slides-notes", "aria-label": t.notes, children: [
12337
12452
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { children: [
@@ -12358,7 +12473,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
12358
12473
  children: [
12359
12474
  around3(nav.at).map((i) => {
12360
12475
  const id = `p:${deck.slides[i].key}:${epoch}`;
12361
- return frame(id, frozen2(deck.slides[i], id, "present"), fit(showBox), caption(i), i !== nav.at, true);
12476
+ return frame(id, frozen2(deck.slides[i], id, "present"), fit2(showBox), caption(i), i !== nav.at, true);
12362
12477
  }),
12363
12478
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "w100n-slides-count", children: [
12364
12479
  nav.at + 1,
@@ -12405,7 +12520,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
12405
12520
  ] })
12406
12521
  ] }),
12407
12522
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w100n-slides-desk", children: [
12408
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: nowRef, className: "w100n-slides-now", children: frame(`q:${shown.key}:${epoch}`, frozen2(shown, `q:${shown.key}:${epoch}`, "present"), fit(nowBox, 16), caption(nav.at), false, true) }),
12523
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: nowRef, className: "w100n-slides-now", children: frame(`q:${shown.key}:${epoch}`, frozen2(shown, `q:${shown.key}:${epoch}`, "present"), fit2(nowBox, 16), caption(nav.at), false, true) }),
12409
12524
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", { className: "w100n-slides-side", children: [
12410
12525
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "w100n-docs-caption", children: t.upNext }),
12411
12526
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: nextRef, className: "w100n-slides-next", children: nav.at < count - 1 ? frame(
@@ -12845,7 +12960,7 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
12845
12960
  const [box2, setBox] = (0, import_react6.useState)({ w: 0, h: 0 });
12846
12961
  const [top, setTop] = (0, import_react6.useState)(0);
12847
12962
  const [railTop, setRailTop] = (0, import_react6.useState)(0);
12848
- const [fit, setFit] = (0, import_react6.useState)("auto");
12963
+ const [fit2, setFit] = (0, import_react6.useState)("auto");
12849
12964
  const [zoom, setZoom] = (0, import_react6.useState)(100);
12850
12965
  const [rail, setRail] = (0, import_react6.useState)(false);
12851
12966
  const [typed, setTyped] = (0, import_react6.useState)(null);
@@ -12953,7 +13068,7 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
12953
13068
  const widest = Math.max(1, ...sizes2.map((s) => s.w));
12954
13069
  const tallest = Math.max(1, ...sizes2.map((s) => s.h));
12955
13070
  const room = { w: Math.max(120, box2.w - 32), h: Math.max(120, box2.h - 32) };
12956
- const scale = fit === "auto" ? Math.min(room.w / widest, 5 / 3) : fit === "width" ? room.w / widest : fit === "page" ? Math.min(room.w / widest, room.h / tallest) : zoom / 75;
13071
+ const scale = fit2 === "auto" ? Math.min(room.w / widest, 5 / 3) : fit2 === "width" ? room.w / widest : fit2 === "page" ? Math.min(room.w / widest, room.h / tallest) : zoom / 75;
12957
13072
  const percent = Math.round(scale * 75);
12958
13073
  const tops = [];
12959
13074
  let end = 16;
@@ -13301,8 +13416,8 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
13301
13416
  "%"
13302
13417
  ] }) },
13303
13418
  { key: "in", at: 2, Icon: import_lucide_react4.Plus, label: t.zoomIn, run: () => zoomBy(1), stay: true },
13304
- { key: "width", at: 1, Icon: import_lucide_react4.MoveHorizontal, label: t.fitWidth, run: () => setFit("width"), pressed: fit === "width" },
13305
- { key: "fit", at: 1, Icon: import_lucide_react4.Maximize, label: t.fitPage, run: () => setFit("page"), pressed: fit === "page" },
13419
+ { key: "width", at: 1, Icon: import_lucide_react4.MoveHorizontal, label: t.fitWidth, run: () => setFit("width"), pressed: fit2 === "width" },
13420
+ { key: "fit", at: 1, Icon: import_lucide_react4.Maximize, label: t.fitPage, run: () => setFit("page"), pressed: fit2 === "page" },
13306
13421
  { key: "g2", at: 2, node: gap },
13307
13422
  { key: "find", at: 0, Icon: import_lucide_react4.Search, label: t.find, run: () => setQuery(query === null ? "" : null), pressed: query !== null },
13308
13423
  ...can.mark ? [
@@ -13512,10 +13627,10 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
13512
13627
  }
13513
13628
 
13514
13629
  // src/DocumentOverlay.tsx
13515
- var import_jsx_runtime9 = require("react/jsx-runtime");
13630
+ var import_jsx_runtime10 = require("react/jsx-runtime");
13516
13631
  var TextEditor2 = (0, import_react13.lazy)(() => Promise.resolve().then(() => (init_TextEditor(), TextEditor_exports)));
13517
13632
  var SheetView2 = (0, import_react13.lazy)(() => Promise.resolve().then(() => (init_SheetView(), SheetView_exports)));
13518
- var icons = { docx: import_lucide_react7.FileText, markdown: import_lucide_react7.FileType, pdf: import_lucide_react7.Files, sheet: import_lucide_react7.FileSpreadsheet, slides: import_lucide_react7.Presentation };
13633
+ var icons = { docx: import_lucide_react8.FileText, markdown: import_lucide_react8.FileType, pdf: import_lucide_react8.Files, sheet: import_lucide_react8.FileSpreadsheet, slides: import_lucide_react8.Presentation };
13519
13634
  var read = { view: true, comment: false, edit: false };
13520
13635
  var quiet2 = () => {
13521
13636
  };
@@ -13564,10 +13679,10 @@ function DocumentOverlay({ source, name, mimeType, info, download, actions, onCl
13564
13679
  setTimeout(() => URL.revokeObjectURL(url), 1e3);
13565
13680
  };
13566
13681
  const sheet2 = readable(name, mimeType) !== "sheet" ? null : /\.csv$/i.test(name) || mimeType === "text/csv" ? "csv" : "xlsx";
13567
- const wait = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
13682
+ const wait = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
13568
13683
  let stage = null;
13569
13684
  if (bytes && !doc.loading) {
13570
- if (kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
13685
+ if (kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
13571
13686
  PdfView,
13572
13687
  {
13573
13688
  bytes,
@@ -13581,37 +13696,37 @@ function DocumentOverlay({ source, name, mimeType, info, download, actions, onCl
13581
13696
  guard
13582
13697
  }
13583
13698
  );
13584
- else if (kind === "docx" || kind === "markdown") stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react13.Suspense, { fallback: wait, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TextEditor2, { kind, bytes, t, language, rights: read, documentId: documentId ?? name, onOutline: quiet2, slot: null }) });
13585
- else if (kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SlidesView, { html: new TextDecoder().decode(bytes), name, rights: read, language, theme, onOutline: quiet2 });
13586
- else if (sheet2) stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react13.Suspense, { fallback: wait, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SheetView2, { bytes, name, kind: sheet2, rights: read, language, theme, documentId: documentId ?? name }) });
13587
- else stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
13588
- }
13589
- return (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { ref: box2, className: "w100n-docs w100n-docs-overlay", "data-theme": theme, role: "dialog", "aria-modal": true, "aria-label": name, tabIndex: -1, children: [
13590
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("header", { className: "w100n-docs-bar", children: [
13591
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-docs-tile", "data-kind": kind, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Kind, { "aria-hidden": true }) }),
13592
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-docs-heading", children: [
13593
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { className: "w100n-docs-title", children: name }),
13594
- info && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-docs-crumbs", children: info })
13699
+ else if (kind === "docx" || kind === "markdown") stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react13.Suspense, { fallback: wait, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TextEditor2, { kind, bytes, t, language, rights: read, documentId: documentId ?? name, onOutline: quiet2, slot: null }) });
13700
+ else if (kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SlidesView, { html: new TextDecoder().decode(bytes), name, rights: read, language, theme, onOutline: quiet2 });
13701
+ else if (sheet2) stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react13.Suspense, { fallback: wait, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SheetView2, { bytes, name, kind: sheet2, rights: read, language, theme, documentId: documentId ?? name }) });
13702
+ else stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
13703
+ }
13704
+ return (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { ref: box2, className: "w100n-docs w100n-docs-overlay", "data-theme": theme, role: "dialog", "aria-modal": true, "aria-label": name, tabIndex: -1, children: [
13705
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("header", { className: "w100n-docs-bar", children: [
13706
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "w100n-docs-tile", "data-kind": kind, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Kind, { "aria-hidden": true }) }),
13707
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w100n-docs-heading", children: [
13708
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { className: "w100n-docs-title", children: name }),
13709
+ info && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "w100n-docs-crumbs", children: info })
13595
13710
  ] }),
13596
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-docs-end", children: [
13711
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w100n-docs-end", children: [
13597
13712
  actions,
13598
- download && !saved || !bytes ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("a", { className: "w100n-docs-action", href: download ?? (typeof source === "string" ? source : void 0), download: name, "aria-label": t.download, children: [
13599
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Download, { "aria-hidden": true }),
13600
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: t.download })
13601
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: save2, "aria-label": t.download, children: [
13602
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Download, { "aria-hidden": true }),
13603
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: t.download })
13713
+ download && !saved || !bytes ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("a", { className: "w100n-docs-action", href: download ?? (typeof source === "string" ? source : void 0), download: name, "aria-label": t.download, children: [
13714
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.Download, { "aria-hidden": true }),
13715
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: t.download })
13716
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: save2, "aria-label": t.download, children: [
13717
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.Download, { "aria-hidden": true }),
13718
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: t.download })
13604
13719
  ] }),
13605
- onOpen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: () => ask(onOpen), "aria-label": t.openInDocuments, children: [
13606
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.ExternalLink, { "aria-hidden": true }),
13607
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: t.openInDocuments })
13720
+ onOpen && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: () => ask(onOpen), "aria-label": t.openInDocuments, children: [
13721
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.ExternalLink, { "aria-hidden": true }),
13722
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: t.openInDocuments })
13608
13723
  ] }),
13609
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: close, "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.X, { "aria-hidden": true }) })
13724
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: close, "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.X, { "aria-hidden": true }) })
13610
13725
  ] })
13611
13726
  ] }),
13612
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w100n-docs-body", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("main", { className: "w100n-docs-stage", children: loaded.error ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-docs-empty", children: [
13727
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w100n-docs-body", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("main", { className: "w100n-docs-stage", children: loaded.error ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w100n-docs-empty", children: [
13613
13728
  t.failed,
13614
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: loaded.retry, children: t.retry })
13729
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: loaded.retry, children: t.retry })
13615
13730
  ] }) : stage ?? wait }) }),
13616
13731
  dialog
13617
13732
  ] }), document.body);
@@ -13620,13 +13735,13 @@ function DocumentOverlay({ source, name, mimeType, info, download, actions, onCl
13620
13735
  // src/DocumentsWorkspace.tsx
13621
13736
  var import_react19 = require("react");
13622
13737
  var import_react_dom4 = require("react-dom");
13623
- var import_lucide_react13 = require("lucide-react");
13738
+ var import_lucide_react14 = require("lucide-react");
13624
13739
 
13625
13740
  // src/Backlinks.tsx
13626
- var import_lucide_react8 = require("lucide-react");
13741
+ var import_lucide_react9 = require("lucide-react");
13627
13742
  init_wiki();
13628
13743
  init_useLoad();
13629
- var import_jsx_runtime10 = require("react/jsx-runtime");
13744
+ var import_jsx_runtime11 = require("react/jsx-runtime");
13630
13745
  var wikis = /\[\[([^[\]\n|]+?)(?:\|([^[\]\n]+?))?\]\]/g;
13631
13746
  var around2 = (text, from, to) => ({
13632
13747
  before: text.slice(Math.max(0, from - 70), from).replace(/^\S*\s/, "").replace(/\s+/g, " "),
@@ -13675,33 +13790,33 @@ function Backlinks({ host, current, notes: notes3, t, onOpen }) {
13675
13790
  }));
13676
13791
  return mentions(current, notes3, texts2);
13677
13792
  }, [host, current.id, current.name, others.map((item) => `${item.id}:${item.updatedAt}`).join()]);
13678
- if (found.loading && !found.data) return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "w100n-docs-muted", children: t.loading });
13679
- if (found.error) return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "w100n-docs-muted", children: t.failed });
13793
+ if (found.loading && !found.data) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.loading });
13794
+ if (found.error) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.failed });
13680
13795
  const { linked, unlinked } = found.data;
13681
- const card = (m) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("button", { type: "button", className: "w100n-links-card", onClick: () => onOpen(m.item), children: [
13682
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("b", { children: [
13683
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.FileType, { "aria-hidden": true }),
13796
+ const card = (m) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", className: "w100n-links-card", onClick: () => onOpen(m.item), children: [
13797
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("b", { children: [
13798
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.FileType, { "aria-hidden": true }),
13684
13799
  m.item.name.replace(/\.(md|markdown)$/i, "")
13685
13800
  ] }),
13686
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("small", { children: [
13801
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("small", { children: [
13687
13802
  "\u2026",
13688
13803
  m.before,
13689
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("mark", { children: m.hit }),
13804
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("mark", { children: m.hit }),
13690
13805
  m.after,
13691
13806
  "\u2026"
13692
13807
  ] }),
13693
- m.item.folder && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("small", { className: "w100n-links-folder", children: m.item.folder })
13808
+ m.item.folder && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("small", { className: "w100n-links-folder", children: m.item.folder })
13694
13809
  ] }, m.item.id);
13695
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w100n-links", children: [
13696
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "w100n-docs-caption", children: [
13810
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w100n-links", children: [
13811
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "w100n-docs-caption", children: [
13697
13812
  t.linked,
13698
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: linked.length })
13813
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: linked.length })
13699
13814
  ] }),
13700
- linked.length ? linked.map(card) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "w100n-docs-muted", children: t.noBacklinks }),
13701
- unlinked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
13702
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "w100n-docs-caption", children: [
13815
+ linked.length ? linked.map(card) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.noBacklinks }),
13816
+ unlinked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
13817
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "w100n-docs-caption", children: [
13703
13818
  t.unlinked,
13704
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: unlinked.length })
13819
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: unlinked.length })
13705
13820
  ] }),
13706
13821
  unlinked.map(card)
13707
13822
  ] })
@@ -13713,8 +13828,8 @@ init_focus();
13713
13828
 
13714
13829
  // src/Jump.tsx
13715
13830
  var import_react14 = require("react");
13716
- var import_lucide_react9 = require("lucide-react");
13717
- var import_jsx_runtime11 = require("react/jsx-runtime");
13831
+ var import_lucide_react10 = require("lucide-react");
13832
+ var import_jsx_runtime12 = require("react/jsx-runtime");
13718
13833
  var bare3 = (name) => name.replace(/\.(md|markdown)$/i, "");
13719
13834
  function rank(item, q) {
13720
13835
  const name = bare3(item.name).toLowerCase();
@@ -13731,9 +13846,9 @@ function rank(item, q) {
13731
13846
  }
13732
13847
  var lit = (text, q) => {
13733
13848
  const at2 = q ? text.toLowerCase().indexOf(q) : -1;
13734
- return at2 < 0 ? text : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
13849
+ return at2 < 0 ? text : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
13735
13850
  text.slice(0, at2),
13736
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("mark", { children: text.slice(at2, at2 + q.length) }),
13851
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("mark", { children: text.slice(at2, at2 + q.length) }),
13737
13852
  text.slice(at2 + q.length)
13738
13853
  ] });
13739
13854
  };
@@ -13752,12 +13867,12 @@ function Jump({ mode, items, actions, t, place: place2, onOpen, onCreate, onClos
13752
13867
  else if (mode === "run") doing[i]?.run();
13753
13868
  else if (make2) onCreate(query.trim());
13754
13869
  };
13755
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w100n-jump-back", onPointerDown: (e) => {
13870
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w100n-jump-back", onPointerDown: (e) => {
13756
13871
  if (e.target === e.currentTarget) onClose();
13757
- }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w100n-jump", role: "dialog", "aria-modal": true, "aria-label": mode === "open" ? t.openNote : t.commands, children: [
13758
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "w100n-jump-field", children: [
13759
- mode === "open" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.Search, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.Command, { "aria-hidden": true }),
13760
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
13872
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-jump", role: "dialog", "aria-modal": true, "aria-label": mode === "open" ? t.openNote : t.commands, children: [
13873
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "w100n-jump-field", children: [
13874
+ mode === "open" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Search, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Command, { "aria-hidden": true }),
13875
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
13761
13876
  "input",
13762
13877
  {
13763
13878
  autoFocus: true,
@@ -13783,29 +13898,29 @@ function Jump({ mode, items, actions, t, place: place2, onOpen, onCreate, onClos
13783
13898
  }
13784
13899
  )
13785
13900
  ] }),
13786
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w100n-jump-list", role: "listbox", "aria-label": mode === "open" ? t.openNote : t.commands, children: [
13787
- found.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", role: "option", "aria-selected": i === pick, onPointerMove: () => setAt(i), onClick: () => go(i), children: [
13788
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.FileType, { "aria-hidden": true }),
13789
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: lit(bare3(item.name), q) }),
13790
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("small", { children: place2(item) })
13901
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-jump-list", role: "listbox", "aria-label": mode === "open" ? t.openNote : t.commands, children: [
13902
+ found.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", role: "option", "aria-selected": i === pick, onPointerMove: () => setAt(i), onClick: () => go(i), children: [
13903
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.FileType, { "aria-hidden": true }),
13904
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: lit(bare3(item.name), q) }),
13905
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: place2(item) })
13791
13906
  ] }, item.id)),
13792
- doing.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", role: "option", "aria-selected": i === pick, onPointerMove: () => setAt(i), onClick: () => go(i), children: [
13793
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(a.icon, { "aria-hidden": true }),
13794
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: lit(a.label, q) }),
13795
- a.keys && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("kbd", { children: a.keys })
13907
+ doing.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", role: "option", "aria-selected": i === pick, onPointerMove: () => setAt(i), onClick: () => go(i), children: [
13908
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(a.icon, { "aria-hidden": true }),
13909
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: lit(a.label, q) }),
13910
+ a.keys && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("kbd", { children: a.keys })
13796
13911
  ] }, a.id)),
13797
- make2 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", role: "option", "aria-selected": pick === found.length, onPointerMove: () => setAt(found.length), onClick: () => go(found.length), children: [
13798
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.Plus, { "aria-hidden": true }),
13799
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: t.createNote.replace("{name}", query.trim()) })
13912
+ make2 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", role: "option", "aria-selected": pick === found.length, onPointerMove: () => setAt(found.length), onClick: () => go(found.length), children: [
13913
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Plus, { "aria-hidden": true }),
13914
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: t.createNote.replace("{name}", query.trim()) })
13800
13915
  ] }),
13801
- !total && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.noNote })
13916
+ !total && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-muted", children: t.noNote })
13802
13917
  ] }),
13803
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-jump-keys", children: mode === "open" ? t.keysOpen : t.keysRun })
13918
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-jump-keys", children: mode === "open" ? t.keysOpen : t.keysRun })
13804
13919
  ] }) });
13805
13920
  }
13806
13921
 
13807
13922
  // src/NewDocument.tsx
13808
- var import_lucide_react10 = require("lucide-react");
13923
+ var import_lucide_react11 = require("lucide-react");
13809
13924
  var import_react15 = require("react");
13810
13925
 
13811
13926
  // src/blank.ts
@@ -13932,8 +14047,8 @@ function blank4(kind, name, template = "blank") {
13932
14047
  // src/NewDocument.tsx
13933
14048
  init_focus();
13934
14049
  init_useLoad();
13935
- var import_jsx_runtime12 = require("react/jsx-runtime");
13936
- var icons2 = { docx: import_lucide_react10.FileText, markdown: import_lucide_react10.FileType, sheet: import_lucide_react10.FileSpreadsheet, slides: import_lucide_react10.Presentation };
14050
+ var import_jsx_runtime13 = require("react/jsx-runtime");
14051
+ var icons2 = { docx: import_lucide_react11.FileText, markdown: import_lucide_react11.FileType, sheet: import_lucide_react11.FileSpreadsheet, slides: import_lucide_react11.Presentation };
13937
14052
  var shaped = ["blank", "letter", "contract", "notes", "invoice", "report"];
13938
14053
  function NewDocument({ host, t, onClose, onMade }) {
13939
14054
  const id = (0, import_react15.useId)();
@@ -13958,77 +14073,77 @@ function NewDocument({ host, t, onClose, onMade }) {
13958
14073
  setState("failed");
13959
14074
  }
13960
14075
  };
13961
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
14076
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
13962
14077
  if (e.key === "Escape") {
13963
14078
  e.stopPropagation();
13964
14079
  onClose();
13965
14080
  }
13966
- }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("form", { className: "w100n-pdf-dialog w100n-new", role: "dialog", "aria-modal": true, "aria-labelledby": `${id}t`, onSubmit: (e) => {
14081
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("form", { className: "w100n-pdf-dialog w100n-new", role: "dialog", "aria-modal": true, "aria-labelledby": `${id}t`, onSubmit: (e) => {
13967
14082
  e.preventDefault();
13968
14083
  void make2();
13969
14084
  }, children: [
13970
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-new-head", children: [
13971
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-new-tile", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Plus, { "aria-hidden": true }) }),
13972
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("b", { id: `${id}t`, className: "w100n-pdf-dialog-title", children: t.newTitle }),
13973
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: onClose, "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.X, { "aria-hidden": true }) })
14085
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-new-head", children: [
14086
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-new-tile", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Plus, { "aria-hidden": true }) }),
14087
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { id: `${id}t`, className: "w100n-pdf-dialog-title", children: t.newTitle }),
14088
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: onClose, "aria-label": t.close, title: t.close, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.X, { "aria-hidden": true }) })
13974
14089
  ] }),
13975
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { role: "radiogroup", "aria-label": t.kind, className: "w100n-new-kinds", children: Object.keys(icons2).map((item) => {
14090
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { role: "radiogroup", "aria-label": t.kind, className: "w100n-new-kinds", children: Object.keys(icons2).map((item) => {
13976
14091
  const Icon = icons2[item];
13977
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", role: "radio", "aria-checked": kind === item, "data-kind": item, onClick: () => {
14092
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", role: "radio", "aria-checked": kind === item, "data-kind": item, onClick: () => {
13978
14093
  setKind(item);
13979
14094
  setTeam(null);
13980
14095
  if (item === "sheet" || item === "slides") setTemplate("blank");
13981
14096
  }, children: [
13982
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-docs-tile", "data-kind": item, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { "aria-hidden": true }) }),
13983
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
13984
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("b", { children: t.newKinds[item] }),
13985
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: t.kindHints[item] })
14097
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-docs-tile", "data-kind": item, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { "aria-hidden": true }) }),
14098
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14099
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.newKinds[item] }),
14100
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.kindHints[item] })
13986
14101
  ] })
13987
14102
  ] }, item);
13988
14103
  }) }),
13989
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-caption", children: t.startFrom }),
13990
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { role: "radiogroup", "aria-label": t.startFrom, className: "w100n-new-templates", children: choices.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", role: "radio", "aria-checked": !team && template === item, onClick: () => {
14104
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-caption", children: t.startFrom }),
14105
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { role: "radiogroup", "aria-label": t.startFrom, className: "w100n-new-templates", children: choices.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", role: "radio", "aria-checked": !team && template === item, onClick: () => {
13991
14106
  setTeam(null);
13992
14107
  setTemplate(item);
13993
14108
  }, children: [
13994
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-new-sheet", "data-blank": item === "blank", children: item === "blank" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Plus, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
13995
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-head": true }),
13996
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
13997
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
13998
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-accent": true }),
13999
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
14000
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {})
14109
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-new-sheet", "data-blank": item === "blank", children: item === "blank" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Plus, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
14110
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-head": true }),
14111
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14112
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14113
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-accent": true }),
14114
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14115
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {})
14001
14116
  ] }) }),
14002
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: t.templates[item] })
14117
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: t.templates[item] })
14003
14118
  ] }, item)) }),
14004
- ours2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
14005
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-caption", children: t.teamTemplates }),
14006
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { role: "radiogroup", "aria-label": t.teamTemplates, className: "w100n-new-templates", children: ours2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", role: "radio", "aria-checked": team?.id === item.id, onClick: () => setTeam(item), children: [
14007
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "w100n-new-sheet", children: [
14008
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-head": true }),
14009
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
14010
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-accent": true }),
14011
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
14012
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {})
14119
+ ours2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
14120
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-caption", children: t.teamTemplates }),
14121
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { role: "radiogroup", "aria-label": t.teamTemplates, className: "w100n-new-templates", children: ours2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", role: "radio", "aria-checked": team?.id === item.id, onClick: () => setTeam(item), children: [
14122
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "w100n-new-sheet", children: [
14123
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-head": true }),
14124
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14125
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-accent": true }),
14126
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14127
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {})
14013
14128
  ] }),
14014
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { title: item.name, children: stem(item.name) })
14129
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { title: item.name, children: stem(item.name) })
14015
14130
  ] }, item.id)) })
14016
14131
  ] }),
14017
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-new-fields", children: [
14018
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
14019
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-docs-caption", children: t.name }),
14020
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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] })
14132
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-new-fields", children: [
14133
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
14134
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-docs-caption", children: t.name }),
14135
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("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] })
14021
14136
  ] }),
14022
- host.createIn && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
14023
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-docs-caption", children: t.savesTo }),
14024
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-docs-field w100n-new-place", children: host.createIn })
14137
+ host.createIn && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
14138
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-docs-caption", children: t.savesTo }),
14139
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-docs-field w100n-new-place", children: host.createIn })
14025
14140
  ] })
14026
14141
  ] }),
14027
- state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.makeFailed }),
14028
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-pdf-dialog-end", children: [
14029
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: onClose, children: t.cancel }),
14030
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: state === "busy", children: [
14031
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Check, { "aria-hidden": true }),
14142
+ state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.makeFailed }),
14143
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-pdf-dialog-end", children: [
14144
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: onClose, children: t.cancel }),
14145
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: state === "busy", children: [
14146
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Check, { "aria-hidden": true }),
14032
14147
  state === "busy" ? t.making : t.make
14033
14148
  ] })
14034
14149
  ] })
@@ -14037,9 +14152,9 @@ function NewDocument({ host, t, onClose, onMade }) {
14037
14152
 
14038
14153
  // src/Sharing.tsx
14039
14154
  var import_react16 = require("react");
14040
- var import_lucide_react11 = require("lucide-react");
14155
+ var import_lucide_react12 = require("lucide-react");
14041
14156
  init_useLoad();
14042
- var import_jsx_runtime13 = require("react/jsx-runtime");
14157
+ var import_jsx_runtime14 = require("react/jsx-runtime");
14043
14158
  var blank5 = { id: null, comment: false, download: false, askName: true, works: "30", day: "", password: false, secret: "", had: false };
14044
14159
  var local = (iso) => {
14045
14160
  const at2 = new Date(iso);
@@ -14111,31 +14226,31 @@ function Sharing({ host, doc, t, language, team }) {
14111
14226
  setCopied(null);
14112
14227
  }
14113
14228
  };
14114
- if (form) return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share", children: [
14115
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "w100n-docs-caption", children: [
14116
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Link, { "aria-hidden": true }),
14229
+ if (form) return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share", children: [
14230
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "w100n-docs-caption", children: [
14231
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Link, { "aria-hidden": true }),
14117
14232
  form.id ? t.changeLink : t.newLink
14118
14233
  ] }),
14119
- text && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-field", children: [
14120
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: t.guestsCan }),
14121
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-docs-chips", children: [
14122
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", "aria-pressed": !form.comment, onClick: () => setForm({ ...form, comment: false }), children: [
14123
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Eye, { "aria-hidden": true }),
14234
+ text && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-field", children: [
14235
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: t.guestsCan }),
14236
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-docs-chips", children: [
14237
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", "aria-pressed": !form.comment, onClick: () => setForm({ ...form, comment: false }), children: [
14238
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Eye, { "aria-hidden": true }),
14124
14239
  t.canRead
14125
14240
  ] }),
14126
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", "aria-pressed": form.comment, onClick: () => setForm({ ...form, comment: true }), children: [
14127
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.MessageSquarePlus, { "aria-hidden": true }),
14241
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", "aria-pressed": form.comment, onClick: () => setForm({ ...form, comment: true }), children: [
14242
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.MessageSquarePlus, { "aria-hidden": true }),
14128
14243
  t.canComment
14129
14244
  ] })
14130
14245
  ] })
14131
14246
  ] }),
14132
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-field", children: [
14133
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: t.linkWorks }),
14134
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w100n-docs-chips", children: [["7", t.days7], ["30", t.days30], ["off", t.untilTurnOff], ["day", t.pickDay]].map(([key2, label]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", "aria-pressed": form.works === key2, onClick: () => setForm({ ...form, works: key2 }), children: [
14135
- key2 === "day" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.CalendarDays, { "aria-hidden": true }),
14247
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-field", children: [
14248
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: t.linkWorks }),
14249
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w100n-docs-chips", children: [["7", t.days7], ["30", t.days30], ["off", t.untilTurnOff], ["day", t.pickDay]].map(([key2, label]) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", "aria-pressed": form.works === key2, onClick: () => setForm({ ...form, works: key2 }), children: [
14250
+ key2 === "day" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.CalendarDays, { "aria-hidden": true }),
14136
14251
  label
14137
14252
  ] }, key2)) }),
14138
- form.works === "day" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14253
+ form.works === "day" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14139
14254
  "input",
14140
14255
  {
14141
14256
  type: "date",
@@ -14147,14 +14262,14 @@ function Sharing({ host, doc, t, language, team }) {
14147
14262
  }
14148
14263
  )
14149
14264
  ] }),
14150
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "w100n-share-toggle", children: [
14151
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "checkbox", checked: form.password, onChange: (e) => setForm({ ...form, password: e.target.checked }) }),
14152
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14153
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.passwordOn }),
14154
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.passwordHint })
14265
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "w100n-share-toggle", children: [
14266
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "checkbox", checked: form.password, onChange: (e) => setForm({ ...form, password: e.target.checked }) }),
14267
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14268
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.passwordOn }),
14269
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.passwordHint })
14155
14270
  ] })
14156
14271
  ] }),
14157
- form.password && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14272
+ form.password && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14158
14273
  "input",
14159
14274
  {
14160
14275
  type: "password",
@@ -14166,120 +14281,120 @@ function Sharing({ host, doc, t, language, team }) {
14166
14281
  onChange: (e) => setForm({ ...form, secret: e.target.value })
14167
14282
  }
14168
14283
  ),
14169
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "w100n-share-toggle", children: [
14170
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "checkbox", checked: form.download, onChange: (e) => setForm({ ...form, download: e.target.checked }) }),
14171
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14172
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.downloadFile }),
14173
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.downloadHint })
14284
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "w100n-share-toggle", children: [
14285
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "checkbox", checked: form.download, onChange: (e) => setForm({ ...form, download: e.target.checked }) }),
14286
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14287
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.downloadFile }),
14288
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.downloadHint })
14174
14289
  ] })
14175
14290
  ] }),
14176
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "w100n-share-toggle", children: [
14177
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "checkbox", checked: form.askName, onChange: (e) => setForm({ ...form, askName: e.target.checked }) }),
14178
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14179
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.askName }),
14180
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.askNameHint })
14291
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "w100n-share-toggle", children: [
14292
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "checkbox", checked: form.askName, onChange: (e) => setForm({ ...form, askName: e.target.checked }) }),
14293
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14294
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.askName }),
14295
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.askNameHint })
14181
14296
  ] })
14182
14297
  ] }),
14183
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", children: t.lastSaved }),
14184
- state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14185
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
14186
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
14298
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", children: t.lastSaved }),
14299
+ state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14300
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
14301
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
14187
14302
  setForm(null);
14188
14303
  setState("idle");
14189
14304
  }, children: t.cancel }),
14190
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !ready || state === "busy", onClick: () => void submit(), children: [
14191
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Link, { "aria-hidden": true }),
14305
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !ready || state === "busy", onClick: () => void submit(), children: [
14306
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Link, { "aria-hidden": true }),
14192
14307
  form.id ? t.saveLink : t.makeLink
14193
14308
  ] })
14194
14309
  ] })
14195
14310
  ] });
14196
14311
  const on2 = links.data ?? [];
14197
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share", children: [
14198
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "w100n-docs-caption", children: [
14199
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Link, { "aria-hidden": true }),
14312
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share", children: [
14313
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "w100n-docs-caption", children: [
14314
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Link, { "aria-hidden": true }),
14200
14315
  t.guestLinks,
14201
- on2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: on2.filter((l) => !l.ended).length })
14316
+ on2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: on2.filter((l) => !l.ended).length })
14202
14317
  ] }),
14203
- links.error && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-docs-note", children: [
14318
+ links.error && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-docs-note", children: [
14204
14319
  t.failed,
14205
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: links.retry, children: t.retry })
14320
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: links.retry, children: t.retry })
14206
14321
  ] }),
14207
- links.data && !on2.length && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", children: t.noLinks }),
14208
- state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14209
- on2.map((l) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("article", { className: "w100n-share-link", "data-ended": l.ended, children: [
14210
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { children: [
14211
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-share-tile", "data-tone": l.comment ? "amber" : "blue", children: l.comment ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.MessageSquarePlus, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Eye, { "aria-hidden": true }) }),
14212
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14213
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: l.comment ? t.commentLink : t.viewLink }),
14214
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
14322
+ links.data && !on2.length && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", children: t.noLinks }),
14323
+ state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14324
+ on2.map((l) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("article", { className: "w100n-share-link", "data-ended": l.ended, children: [
14325
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { children: [
14326
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w100n-share-tile", "data-tone": l.comment ? "amber" : "blue", children: l.comment ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.MessageSquarePlus, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Eye, { "aria-hidden": true }) }),
14327
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14328
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: l.comment ? t.commentLink : t.viewLink }),
14329
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
14215
14330
  t.madeBy.replace("{name}", l.createdBy.name),
14216
14331
  " \xB7 ",
14217
14332
  day(l.createdAt)
14218
14333
  ] })
14219
14334
  ] })
14220
14335
  ] }),
14221
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-chips", children: [
14222
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14223
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Clock, { "aria-hidden": true }),
14336
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-chips", children: [
14337
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14338
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Clock, { "aria-hidden": true }),
14224
14339
  l.ended ? t.linkEnded : l.endsAt ? t.endsOn.replace("{date}", day(l.endsAt)) : t.untilOff
14225
14340
  ] }),
14226
- l.download && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14227
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Download, { "aria-hidden": true }),
14341
+ l.download && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14342
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Download, { "aria-hidden": true }),
14228
14343
  t.downloadOn
14229
14344
  ] }),
14230
- l.password && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14231
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Lock, { "aria-hidden": true }),
14345
+ l.password && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14346
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Lock, { "aria-hidden": true }),
14232
14347
  t.passwordOn
14233
14348
  ] }),
14234
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14235
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Eye, { "aria-hidden": true }),
14349
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14350
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Eye, { "aria-hidden": true }),
14236
14351
  count(l.guests.reduce((n, g) => n + g.opens, 0), t.openForms)
14237
14352
  ] })
14238
14353
  ] }),
14239
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-url", children: [
14240
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: l.url.replace(/^https?:\/\//, "") }),
14241
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", onClick: () => void copy2(l), children: [
14242
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Copy, { "aria-hidden": true }),
14354
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-url", children: [
14355
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: l.url.replace(/^https?:\/\//, "") }),
14356
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", onClick: () => void copy2(l), children: [
14357
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Copy, { "aria-hidden": true }),
14243
14358
  copied === l.id ? t.copied : t.copy
14244
14359
  ] })
14245
14360
  ] }),
14246
- l.guests.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w100n-share-who", children: l.guests.map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
14247
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: (g.name || "?").slice(0, 1).toUpperCase() }),
14248
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: g.name || t.unnamed }),
14249
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
14361
+ l.guests.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w100n-share-who", children: l.guests.map((g, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
14362
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: (g.name || "?").slice(0, 1).toUpperCase() }),
14363
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: g.name || t.unnamed }),
14364
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
14250
14365
  g.comments ? count(g.comments, t.commentForms) : count(g.opens, t.openForms),
14251
14366
  " \xB7 ",
14252
14367
  ago(g.lastAt)
14253
14368
  ] })
14254
14369
  ] }, i)) }),
14255
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-tools", children: [
14256
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "slate", disabled: state === "busy", onClick: () => edit(l), children: [
14257
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Clock, { "aria-hidden": true }),
14370
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-tools", children: [
14371
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "slate", disabled: state === "busy", onClick: () => edit(l), children: [
14372
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Clock, { "aria-hidden": true }),
14258
14373
  t.changeLink
14259
14374
  ] }),
14260
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", disabled: state === "busy", onClick: () => void off(l), children: [
14261
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Ban, { "aria-hidden": true }),
14375
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", disabled: state === "busy", onClick: () => void off(l), children: [
14376
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Ban, { "aria-hidden": true }),
14262
14377
  t.turnOff
14263
14378
  ] })
14264
14379
  ] })
14265
14380
  ] }, l.id)),
14266
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action w100n-share-new", onClick: () => {
14381
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action w100n-share-new", onClick: () => {
14267
14382
  setState("idle");
14268
14383
  setForm(blank5);
14269
14384
  }, children: [
14270
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Plus, { "aria-hidden": true }),
14385
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Plus, { "aria-hidden": true }),
14271
14386
  t.newLink
14272
14387
  ] }),
14273
- team && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
14274
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "w100n-docs-caption", children: [
14275
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Users, { "aria-hidden": true }),
14388
+ team && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
14389
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "w100n-docs-caption", children: [
14390
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Users, { "aria-hidden": true }),
14276
14391
  t.inTeam
14277
14392
  ] }),
14278
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-team", children: [
14279
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-share-tile", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Users, { "aria-hidden": true }) }),
14280
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14281
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.peopleOf.replace("{space}", team) }),
14282
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.teamHint })
14393
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-team", children: [
14394
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w100n-share-tile", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Users, { "aria-hidden": true }) }),
14395
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14396
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.peopleOf.replace("{space}", team) }),
14397
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.teamHint })
14283
14398
  ] })
14284
14399
  ] })
14285
14400
  ] })
@@ -14289,6 +14404,19 @@ function Sharing({ host, doc, t, language, team }) {
14289
14404
  // src/DocumentsWorkspace.tsx
14290
14405
  init_text();
14291
14406
 
14407
+ // src/PreviewCard.tsx
14408
+ var import_jsx_runtime15 = require("react/jsx-runtime");
14409
+ function PreviewCard({ thumb, icon, title, lines: lines2 }) {
14410
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "w100n-card", children: [
14411
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w100n-card-thumb", children: thumb }),
14412
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "w100n-card-title", children: [
14413
+ icon,
14414
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("b", { children: title })
14415
+ ] }),
14416
+ lines2.filter(Boolean).map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: line }, i))
14417
+ ] });
14418
+ }
14419
+
14292
14420
  // src/Thumb.tsx
14293
14421
  var import_react17 = require("react");
14294
14422
 
@@ -14343,7 +14471,7 @@ function preview(host, doc) {
14343
14471
  }
14344
14472
 
14345
14473
  // src/Thumb.tsx
14346
- var import_jsx_runtime14 = require("react/jsx-runtime");
14474
+ var import_jsx_runtime16 = require("react/jsx-runtime");
14347
14475
  function Thumb({ host, item, label }) {
14348
14476
  const box2 = (0, import_react17.useRef)(null);
14349
14477
  const [seen2, setSeen] = (0, import_react17.useState)(false);
@@ -14369,26 +14497,26 @@ function Thumb({ host, item, label }) {
14369
14497
  const text = item.excerpt ?? shot?.text ?? "";
14370
14498
  const lines2 = text.split("\n").filter((line) => !line.trim().startsWith("```")).map((line) => line.replace(/^#+\s*/, "").replace(/[*_`>|]/g, "").trim()).filter(Boolean);
14371
14499
  const image = item.thumbnailUrl ?? shot?.image;
14372
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { ref: box2, className: "w100n-docs-thumb", "data-kind": item.kind, children: [
14373
- image ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: image, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w100n-docs-paper", "aria-hidden": true, children: lines2.length ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
14374
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: lines2[0] }),
14500
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { ref: box2, className: "w100n-docs-thumb", "data-kind": item.kind, children: [
14501
+ image ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: image, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "w100n-docs-paper", "aria-hidden": true, children: lines2.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
14502
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("b", { children: lines2[0] }),
14375
14503
  lines2.slice(1, 14).join(" ")
14376
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
14377
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {}),
14378
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {}),
14379
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {}),
14380
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {}),
14381
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {})
14504
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
14505
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14506
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14507
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14508
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14509
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {})
14382
14510
  ] }) }),
14383
- label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w100n-docs-kind", "data-kind": item.kind, children: label })
14511
+ label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "w100n-docs-kind", "data-kind": item.kind, children: label })
14384
14512
  ] });
14385
14513
  }
14386
14514
 
14387
14515
  // src/Tree.tsx
14388
14516
  var import_react18 = require("react");
14389
- var import_lucide_react12 = require("lucide-react");
14390
- var import_jsx_runtime15 = require("react/jsx-runtime");
14391
- var icons3 = { docx: import_lucide_react12.FileText, markdown: import_lucide_react12.FileType, pdf: import_lucide_react12.Files, sheet: import_lucide_react12.FileSpreadsheet, slides: import_lucide_react12.Presentation };
14517
+ var import_lucide_react13 = require("lucide-react");
14518
+ var import_jsx_runtime17 = require("react/jsx-runtime");
14519
+ var icons3 = { docx: import_lucide_react13.FileText, markdown: import_lucide_react13.FileType, pdf: import_lucide_react13.File, sheet: import_lucide_react13.FileSpreadsheet, slides: import_lucide_react13.Presentation };
14392
14520
  var dragged = "application/x-w100n-document";
14393
14521
  function grow(items, folders, names2, spaceId, other) {
14394
14522
  const root = { key: "", name: "", at: spaceId ? { spaceId, folder: "" } : null, folders: [], files: [], count: 0 };
@@ -14429,7 +14557,7 @@ var remembered = () => {
14429
14557
  return /* @__PURE__ */ new Set();
14430
14558
  }
14431
14559
  };
14432
- function Tree({ items, folders, names: names2, spaceId, current, t, edit, onOpen, onMenu, onFolderMenu, onMove, onEdit, onEditDone, onWarm }) {
14560
+ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits, onOpen, onMenu, onFolderMenu, onMove, onEdit, onEditDone, onWarm }) {
14433
14561
  const [closed2, setClosed] = (0, import_react18.useState)(remembered);
14434
14562
  const [over, setOver] = (0, import_react18.useState)(null);
14435
14563
  const flip = (key2) => {
@@ -14438,7 +14566,7 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, onOpen
14438
14566
  setClosed(next);
14439
14567
  localStorage.setItem("w100n-docs-closed", JSON.stringify([...next]));
14440
14568
  };
14441
- const field = (pad, label) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14569
+ const field = (pad, label) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14442
14570
  "input",
14443
14571
  {
14444
14572
  className: "w100n-tree-row w100n-tree-input",
@@ -14475,12 +14603,12 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, onOpen
14475
14603
  onMove(id, b.at);
14476
14604
  }
14477
14605
  } : {};
14478
- const branch = (b, depth) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
14606
+ const branch = (b, depth) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
14479
14607
  edit?.key === `new:${b.key}` && field(24 + depth * 16, t.folderName),
14480
14608
  b.folders.map((f) => {
14481
14609
  const open = !closed2.has(f.key) || edit?.key === `new:${f.key}`;
14482
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { role: "group", "aria-label": f.name, "data-over": over === f.key || void 0, ...target(f), children: [
14483
- edit?.key === `dir:${f.key}` ? field(24 + depth * 16, t.renameFolder) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14610
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { role: "group", "aria-label": f.name, "data-over": over === f.key || void 0, ...target(f), children: [
14611
+ edit?.key === `dir:${f.key}` ? field(24 + depth * 16, t.renameFolder) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14484
14612
  "button",
14485
14613
  {
14486
14614
  type: "button",
@@ -14494,10 +14622,10 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, onOpen
14494
14622
  onFolderMenu(f.at, f.key, e);
14495
14623
  } : void 0,
14496
14624
  children: [
14497
- open ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.ChevronDown, { "aria-hidden": true, className: "w100n-tree-fold" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.ChevronRight, { "aria-hidden": true, className: "w100n-tree-fold" }),
14498
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.Folder, { "aria-hidden": true }),
14499
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: f.name }),
14500
- f.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: f.count })
14625
+ open ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true, className: "w100n-tree-fold" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronRight, { "aria-hidden": true, className: "w100n-tree-fold" }),
14626
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Folder, { "aria-hidden": true }),
14627
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: f.name }),
14628
+ f.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: f.count })
14501
14629
  ]
14502
14630
  }
14503
14631
  ),
@@ -14506,8 +14634,9 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, onOpen
14506
14634
  }),
14507
14635
  b.files.map((item) => {
14508
14636
  const Icon = icons3[item.kind];
14509
- if (edit?.key === `file:${item.id}`) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: field(24 + depth * 16, t.rename) }, item.id);
14510
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14637
+ if (edit?.key === `file:${item.id}`) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: field(24 + depth * 16, t.rename) }, item.id);
14638
+ const hit = hits?.get(item.id);
14639
+ const row2 = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14511
14640
  "button",
14512
14641
  {
14513
14642
  type: "button",
@@ -14529,17 +14658,21 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, onOpen
14529
14658
  onMenu(item, e);
14530
14659
  },
14531
14660
  children: [
14532
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { "aria-hidden": true }),
14533
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: item.name.replace(/\.[^.]+$/, "") }),
14534
- item.kind !== "markdown" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { className: "w100n-tree-kind", children: t.kinds[item.kind] })
14661
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { "aria-hidden": true, "data-kind": item.kind }),
14662
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: item.name.replace(/\.[^.]+$/, "") }),
14663
+ item.kind !== "markdown" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { className: "w100n-tree-kind", children: t.kinds[item.kind] })
14535
14664
  ]
14536
14665
  },
14537
14666
  item.id
14538
14667
  );
14668
+ return hit ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
14669
+ row2,
14670
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { className: "w100n-tree-hit", style: { paddingLeft: 46 + depth * 16 }, children: hit.split(/[«»]/).map((part, i) => i % 2 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("mark", { children: part }, i) : part) })
14671
+ ] }, item.id) : row2;
14539
14672
  })
14540
14673
  ] });
14541
14674
  const root = grow(items, folders, names2, spaceId, t.elsewhere);
14542
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14675
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14543
14676
  "nav",
14544
14677
  {
14545
14678
  className: "w100n-tree",
@@ -14557,11 +14690,10 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, onOpen
14557
14690
 
14558
14691
  // src/DocumentsWorkspace.tsx
14559
14692
  init_useLoad();
14560
- var import_jsx_runtime17 = require("react/jsx-runtime");
14693
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14561
14694
  var TextEditor3 = (0, import_react19.lazy)(() => Promise.resolve().then(() => (init_TextEditor(), TextEditor_exports)));
14562
14695
  var SheetView3 = (0, import_react19.lazy)(() => Promise.resolve().then(() => (init_SheetView(), SheetView_exports)));
14563
14696
  var Compare2 = (0, import_react19.lazy)(() => Promise.resolve().then(() => (init_Compare(), Compare_exports)));
14564
- var icons4 = { docx: import_lucide_react13.FileText, markdown: import_lucide_react13.FileType, pdf: import_lucide_react13.Files, sheet: import_lucide_react13.FileSpreadsheet, slides: import_lucide_react13.Presentation };
14565
14697
  function DocumentsWorkspace({ host, language = "en", theme = "light", place: place2, onPlace, start, end, aside, actions }) {
14566
14698
  const t = texts[language];
14567
14699
  const [own, setOwn] = (0, import_react19.useState)({ spaceId: null, documentId: null });
@@ -14578,7 +14710,6 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14578
14710
  const [renamed2, setRenamed] = (0, import_react19.useState)("idle");
14579
14711
  const [statusAt, setStatusAt] = (0, import_react19.useState)(null);
14580
14712
  const [listOpen, setListOpen] = (0, import_react19.useState)(true);
14581
- const [shape3, setShape] = (0, import_react19.useState)(() => typeof localStorage !== "undefined" && localStorage.getItem("w100n-docs-view") === "tree" ? "tree" : "cards");
14582
14713
  const [jump, setJump] = (0, import_react19.useState)(null);
14583
14714
  const finder = (0, import_react19.useRef)(null);
14584
14715
  const [panelOpen, setPanelOpen] = (0, import_react19.useState)(true);
@@ -14644,7 +14775,6 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14644
14775
  el.style.top = `${Math.max(8, Math.min(at2.y, innerHeight - el.offsetHeight - 8))}px`;
14645
14776
  el.style.left = `${Math.max(8, Math.min(at2.x, innerWidth - el.offsetWidth - 8))}px`;
14646
14777
  }, [menu, spot3]);
14647
- const [naming, setNaming] = (0, import_react19.useState)(null);
14648
14778
  const [notice, setNotice] = (0, import_react19.useState)(null);
14649
14779
  const early = (0, import_react19.useRef)(/* @__PURE__ */ new Map());
14650
14780
  const hover = (0, import_react19.useRef)(0);
@@ -14735,7 +14865,6 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14735
14865
  const inside2 = new Map((deep.data ?? []).map((hit2) => [hit2.id, hit2.excerpt]));
14736
14866
  const shown = all.filter((item) => matches(item, query, picked) || inside2.has(item.id) && matches(item, "", picked));
14737
14867
  const present = kinds.filter((item) => all.some((doc2) => doc2.kind === item));
14738
- const folders = spaceId ? [.../* @__PURE__ */ new Set(["", ...shown.map((item) => item.folder ?? "")])].filter((folder2) => shown.some((item) => (item.folder ?? "") === folder2)) : [""];
14739
14868
  const names2 = new Map((spaces.data ?? []).map((item) => [item.id, item.name]));
14740
14869
  const counts = /* @__PURE__ */ new Map();
14741
14870
  for (const item of all) counts.set(item.spaceId, (counts.get(item.spaceId) ?? 0) + 1);
@@ -14750,9 +14879,9 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14750
14879
  return new Intl.DateTimeFormat(language, { day: "numeric", month: "short", year: "numeric" }).format(new Date(iso));
14751
14880
  };
14752
14881
  const size2 = (bytes) => bytes < 1024 ? `${bytes} B` : bytes < 1048576 ? `${(bytes / 1024).toFixed(0)} KB` : `${(bytes / 1048576).toFixed(1)} MB`;
14753
- const failed = (retry) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-note", children: [
14882
+ const failed = (retry) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-note", children: [
14754
14883
  t.failed,
14755
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", onClick: retry, children: t.retry })
14884
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: retry, children: t.retry })
14756
14885
  ] });
14757
14886
  const { ask, dialog } = useUnsaved(guard, t);
14758
14887
  const side2 = (which, open2) => {
@@ -14877,6 +15006,15 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14877
15006
  early.current.set(item.id, next);
14878
15007
  }, 150);
14879
15008
  };
15009
+ const card = (item) => {
15010
+ const Icon = icons3[item.kind];
15011
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PreviewCard, { thumb: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Thumb, { host, item, label: t.kinds[item.kind] }), icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { "aria-hidden": true, "data-kind": item.kind }), title: item.name, lines: [
15012
+ [t.kinds[item.kind], size2(item.size), names2.get(item.spaceId), item.folder].filter(Boolean).join(" \xB7 "),
15013
+ item.createdAt && [t.createdOn.replace("{when}", date(item.createdAt)), item.createdBy?.name].filter(Boolean).join(" \xB7 "),
15014
+ [t.updatedOn.replace("{when}", ago(item.updatedAt)), item.updatedBy?.name].filter(Boolean).join(" \xB7 "),
15015
+ inside2.get(item.id)?.split(/[«»]/).map((part, i) => i % 2 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("mark", { children: part }, i) : part)
15016
+ ] });
15017
+ };
14880
15018
  const act = async (run3, done) => {
14881
15019
  setMenu(null);
14882
15020
  setSpot(null);
@@ -14895,7 +15033,6 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14895
15033
  setTimeout(() => URL.revokeObjectURL(url), 1e3);
14896
15034
  };
14897
15035
  const retitle = async (item, draft) => {
14898
- setNaming(null);
14899
15036
  const ext = /\.[^.]+$/.exec(item.name)?.[0] ?? "";
14900
15037
  const name = draft.trim() && (/\.[^.\s]+$/.test(draft.trim()) ? draft.trim() : draft.trim() + ext);
14901
15038
  if (!name || name === item.name) return;
@@ -14977,20 +15114,20 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14977
15114
  };
14978
15115
  const current = doc.data && all.find((item) => item.id === doc.data.id);
14979
15116
  const commands = [
14980
- ...host.create ? [{ id: "new", label: t.newNote, icon: import_lucide_react13.FilePlus, keys: "\u2318N", run: () => void note(t.untitled, true) }] : [],
14981
- { id: "open", label: t.openNote, icon: import_lucide_react13.Search, keys: "\u2318O", run: () => setJump("open") },
14982
- { id: "search", label: t.searchAll, icon: import_lucide_react13.Search, run: () => {
15117
+ ...host.create ? [{ id: "new", label: t.newNote, icon: import_lucide_react14.FilePlus, keys: "\u2318N", run: () => void note(t.untitled, true) }] : [],
15118
+ { id: "open", label: t.openNote, icon: import_lucide_react14.Search, keys: "\u2318O", run: () => setJump("open") },
15119
+ { id: "search", label: t.searchAll, icon: import_lucide_react14.Search, run: () => {
14983
15120
  side2("list", true);
14984
15121
  requestAnimationFrame(() => finder.current?.focus());
14985
15122
  } },
14986
15123
  ...doc.data ? [
14987
- { id: "outline", label: t.showOutline, icon: import_lucide_react13.ListTree, run: () => panelOn("outline") },
14988
- ...doc.data.kind === "markdown" ? [{ id: "links", label: t.showLinks, icon: import_lucide_react13.Link2, run: () => panelOn("links") }] : [],
14989
- { id: "versions", label: t.showVersions, icon: import_lucide_react13.History, run: () => panelOn("versions") },
14990
- ...text && host.comments ? [{ id: "comments", label: t.showComments, icon: import_lucide_react13.MessagesSquare, run: () => panelOn("comments") }] : [],
14991
- ...host.send && !doc.data.id.includes(":") ? [{ id: "send", label: t.sendChat, icon: import_lucide_react13.Send, run: () => host.send(doc.data.id) }] : [],
14992
- ...host.rename && doc.data.rights.edit ? [{ id: "rename", label: t.rename, icon: import_lucide_react13.Pencil, run: () => setRenaming(doc.data.name.replace(/\.[^.]+$/, "")) }] : [],
14993
- ...host.remove && current ? [{ id: "trash", label: t.trash, icon: import_lucide_react13.Trash2, run: () => void drop2(current) }] : []
15124
+ { id: "outline", label: t.showOutline, icon: import_lucide_react14.ListTree, run: () => panelOn("outline") },
15125
+ ...doc.data.kind === "markdown" ? [{ id: "links", label: t.showLinks, icon: import_lucide_react14.Link2, run: () => panelOn("links") }] : [],
15126
+ { id: "versions", label: t.showVersions, icon: import_lucide_react14.History, run: () => panelOn("versions") },
15127
+ ...text && host.comments ? [{ id: "comments", label: t.showComments, icon: import_lucide_react14.MessagesSquare, run: () => panelOn("comments") }] : [],
15128
+ ...host.send && !doc.data.id.includes(":") ? [{ id: "send", label: t.sendChat, icon: import_lucide_react14.Send, run: () => host.send(doc.data.id) }] : [],
15129
+ ...host.rename && doc.data.rights.edit ? [{ id: "rename", label: t.rename, icon: import_lucide_react14.Pencil, run: () => setRenaming(doc.data.name.replace(/\.[^.]+$/, "")) }] : [],
15130
+ ...host.remove && current ? [{ id: "trash", label: t.trash, icon: import_lucide_react14.Trash2, run: () => void drop2(current) }] : []
14994
15131
  ] : []
14995
15132
  ];
14996
15133
  (0, import_react19.useEffect)(() => {
@@ -15007,8 +15144,8 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15007
15144
  window.addEventListener("keydown", press, true);
15008
15145
  return () => window.removeEventListener("keydown", press, true);
15009
15146
  });
15010
- let stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-empty", children: [
15011
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FileText, { "aria-hidden": true }),
15147
+ let stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-empty", children: [
15148
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileText, { "aria-hidden": true }),
15012
15149
  t.pick
15013
15150
  ] });
15014
15151
  if (here.documentId) {
@@ -15016,9 +15153,9 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15016
15153
  doc.retry();
15017
15154
  content.retry();
15018
15155
  });
15019
- else if (!doc.data || !content.data) stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
15020
- else if (comparing && versionId && (doc.data.kind === "markdown" || doc.data.kind === "docx")) stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Compare2, { host, documentId: doc.data.id, kind: doc.data.kind, older: content.data, t }, versionId) });
15021
- else if (doc.data.kind === "markdown" || doc.data.kind === "docx") stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15156
+ else if (!doc.data || !content.data) stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
15157
+ else if (comparing && versionId && (doc.data.kind === "markdown" || doc.data.kind === "docx")) stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Compare2, { host, documentId: doc.data.id, kind: doc.data.kind, older: content.data, t }, versionId) });
15158
+ else if (doc.data.kind === "markdown" || doc.data.kind === "docx") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15022
15159
  TextEditor3,
15023
15160
  {
15024
15161
  kind: doc.data.kind,
@@ -15055,7 +15192,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15055
15192
  },
15056
15193
  doc.data.id
15057
15194
  ) });
15058
- else if (doc.data.kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15195
+ else if (doc.data.kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15059
15196
  PdfView,
15060
15197
  {
15061
15198
  bytes: content.data,
@@ -15077,7 +15214,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15077
15214
  },
15078
15215
  `${doc.data.id}:${versionId ?? ""}`
15079
15216
  );
15080
- else if (doc.data.kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15217
+ else if (doc.data.kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15081
15218
  SlidesView,
15082
15219
  {
15083
15220
  html: new TextDecoder().decode(content.data),
@@ -15096,7 +15233,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15096
15233
  },
15097
15234
  doc.data.id
15098
15235
  );
15099
- else if (doc.data.kind === "sheet") stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15236
+ else if (doc.data.kind === "sheet") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15100
15237
  SheetView3,
15101
15238
  {
15102
15239
  bytes: content.data,
@@ -15123,9 +15260,9 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15123
15260
  },
15124
15261
  `${doc.data.id}:${versionId ?? ""}`
15125
15262
  ) });
15126
- else stage = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
15263
+ else stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
15127
15264
  }
15128
- const Kind = doc.data ? icons4[doc.data.kind] : import_lucide_react13.FileText;
15265
+ const Kind = doc.data ? icons3[doc.data.kind] : import_lucide_react14.FileText;
15129
15266
  const top = Math.min(...outline2.map((h) => h.level));
15130
15267
  const chapters = outline2.reduce((all2, h) => {
15131
15268
  if (h.level === top || !all2.length) all2.push({ head: h, subs: [] });
@@ -15139,16 +15276,16 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15139
15276
  const reach = (h) => h.go ? h.go() : document.getElementById(h.id)?.scrollIntoView({ behavior: "smooth", block: "start" });
15140
15277
  const crumbs = doc.data ? [names2.get(doc.data.spaceId), doc.data.folder].filter(Boolean) : space ? [space.name] : [];
15141
15278
  const panelTabs = [
15142
- ["outline", import_lucide_react13.ListTree, t.outline],
15143
- ...doc.data?.kind === "markdown" ? [["links", import_lucide_react13.Link2, t.links]] : [],
15144
- ["versions", import_lucide_react13.History, t.versions],
15145
- ["details", import_lucide_react13.Info, t.details]
15279
+ ["outline", import_lucide_react14.ListTree, t.outline],
15280
+ ...doc.data?.kind === "markdown" ? [["links", import_lucide_react14.Link2, t.links]] : [],
15281
+ ["versions", import_lucide_react14.History, t.versions],
15282
+ ["details", import_lucide_react14.Info, t.details]
15146
15283
  ];
15147
- if (pdf && host.signatures) panelTabs.push(["signatures", import_lucide_react13.Signature, t.signatures]);
15148
- if (text && host.comments && !versionId) panelTabs.push(["comments", import_lucide_react13.MessagesSquare, t.comments]);
15284
+ if (pdf && host.signatures) panelTabs.push(["signatures", import_lucide_react14.Signature, t.signatures]);
15285
+ if (text && host.comments && !versionId) panelTabs.push(["comments", import_lucide_react14.MessagesSquare, t.comments]);
15149
15286
  const sharing = !!host.links && !!doc.data?.rights.edit && !versionId;
15150
- if (sharing) panelTabs.push(["sharing", import_lucide_react13.Share2, t.sharing]);
15151
- const listToggle = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15287
+ if (sharing) panelTabs.push(["sharing", import_lucide_react14.Share2, t.sharing]);
15288
+ const listToggle = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15152
15289
  "button",
15153
15290
  {
15154
15291
  ref: listButton,
@@ -15158,10 +15295,10 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15158
15295
  onClick: () => side2("list", !listOpen),
15159
15296
  "aria-label": listOpen ? t.closeList : t.openList,
15160
15297
  title: listOpen ? t.closeList : t.openList,
15161
- children: listOpen ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.PanelLeftClose, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.PanelLeftOpen, { "aria-hidden": true })
15298
+ children: listOpen ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.PanelLeftClose, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.PanelLeftOpen, { "aria-hidden": true })
15162
15299
  }
15163
15300
  );
15164
- const panelToggle = doc.data && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15301
+ const panelToggle = doc.data && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15165
15302
  "button",
15166
15303
  {
15167
15304
  ref: panelButton,
@@ -15171,16 +15308,16 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15171
15308
  onClick: () => side2("panel", !panelOpen),
15172
15309
  "aria-label": panelOpen ? t.closePanel : t.openPanel,
15173
15310
  title: panelOpen ? t.closePanel : t.openPanel,
15174
- children: panelOpen ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.PanelRightClose, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.PanelRightOpen, { "aria-hidden": true })
15311
+ children: panelOpen ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.PanelRightClose, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.PanelRightOpen, { "aria-hidden": true })
15175
15312
  }
15176
15313
  );
15177
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs", "data-theme": theme, children: [
15178
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "w100n-docs-bar", children: [
15179
- start && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-start w100n-docs-slot", children: slot(start) }),
15314
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs", "data-theme": theme, children: [
15315
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "w100n-docs-bar", children: [
15316
+ start && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-start w100n-docs-slot", children: slot(start) }),
15180
15317
  narrow && listToggle,
15181
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-tile", "data-kind": doc.data?.kind, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Kind, { "aria-hidden": true }) }),
15182
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-heading", children: [
15183
- renaming !== null && doc.data ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15318
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-tile", "data-kind": doc.data?.kind, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Kind, { "aria-hidden": true }) }),
15319
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-heading", children: [
15320
+ renaming !== null && doc.data ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15184
15321
  "input",
15185
15322
  {
15186
15323
  className: "w100n-docs-title w100n-docs-rename",
@@ -15198,7 +15335,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15198
15335
  }
15199
15336
  }
15200
15337
  }
15201
- ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15338
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15202
15339
  "strong",
15203
15340
  {
15204
15341
  className: "w100n-docs-title",
@@ -15207,31 +15344,31 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15207
15344
  children: doc.data?.name ?? t.documents
15208
15345
  }
15209
15346
  ),
15210
- docbar ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { ref: setMenusAt, className: "w100n-docs-menus" }) : crumbs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-crumbs", children: crumbs.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
15211
- i > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronRight, { "aria-hidden": true }),
15347
+ docbar ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref: setMenusAt, className: "w100n-docs-menus" }) : crumbs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-crumbs", children: crumbs.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
15348
+ i > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronRight, { "aria-hidden": true }),
15212
15349
  item
15213
- ] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-hint", children: t.hint })
15350
+ ] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-hint", children: t.hint })
15214
15351
  ] }),
15215
- versionId && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-badge", children: versions.data?.find((v) => v.id === versionId) && date(versions.data.find((v) => v.id === versionId).createdAt) }),
15216
- versionId && text && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", "aria-pressed": comparing, onClick: () => setComparing(!comparing), children: [
15217
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FileDiff, { "aria-hidden": true }),
15352
+ versionId && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-badge", children: versions.data?.find((v) => v.id === versionId) && date(versions.data.find((v) => v.id === versionId).createdAt) }),
15353
+ versionId && text && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", "aria-pressed": comparing, onClick: () => setComparing(!comparing), children: [
15354
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileDiff, { "aria-hidden": true }),
15218
15355
  comparing ? t.hideChanges : t.showChanges
15219
15356
  ] }),
15220
- versionId && here.documentId && host.restore && doc.data?.rights.edit && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: restoring === "busy", onClick: () => void restore(here.documentId, versionId), children: [
15221
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.RotateCcw, { "aria-hidden": true }),
15357
+ versionId && here.documentId && host.restore && doc.data?.rights.edit && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: restoring === "busy", onClick: () => void restore(here.documentId, versionId), children: [
15358
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.RotateCcw, { "aria-hidden": true }),
15222
15359
  t.restore
15223
15360
  ] }),
15224
- restoring === "failed" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-muted", children: t.restoreFailed }),
15225
- doc.data?.convert && host.copyAs && !versionId && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", disabled: copying === "busy", onClick: () => void copyAs(doc.data), children: [
15226
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FileSpreadsheet, { "aria-hidden": true }),
15361
+ restoring === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", children: t.restoreFailed }),
15362
+ doc.data?.convert && host.copyAs && !versionId && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", disabled: copying === "busy", onClick: () => void copyAs(doc.data), children: [
15363
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileSpreadsheet, { "aria-hidden": true }),
15227
15364
  t.copyAs
15228
15365
  ] }),
15229
- copying === "failed" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-muted", children: t.copyFailed }),
15230
- kept?.id === here.documentId && kept.state === "done" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-muted", role: "status", children: t.templateSaved }),
15231
- kept?.id === here.documentId && kept.state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-muted", role: "alert", children: t.templateFailed }),
15232
- renamed2 === "failed" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-muted", children: t.renameFailed }),
15233
- docbar && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { ref: setStatusAt, className: "w100n-docs-status" }),
15234
- host.send && doc.data && !versionId && !doc.data.id.includes(":") && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15366
+ copying === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", children: t.copyFailed }),
15367
+ kept?.id === here.documentId && kept.state === "done" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", role: "status", children: t.templateSaved }),
15368
+ kept?.id === here.documentId && kept.state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", role: "alert", children: t.templateFailed }),
15369
+ renamed2 === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", children: t.renameFailed }),
15370
+ docbar && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { ref: setStatusAt, className: "w100n-docs-status" }),
15371
+ host.send && doc.data && !versionId && !doc.data.id.includes(":") && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15235
15372
  "button",
15236
15373
  {
15237
15374
  type: "button",
@@ -15240,145 +15377,138 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15240
15377
  "aria-label": t.sendChat,
15241
15378
  title: t.sendChat,
15242
15379
  onClick: () => host.send(doc.data.id),
15243
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Send, { "aria-hidden": true })
15380
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Send, { "aria-hidden": true })
15244
15381
  }
15245
15382
  ),
15246
- sharing && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "w100n-docs-action w100n-docs-square", "aria-label": t.share, title: t.share, onClick: () => {
15383
+ sharing && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "w100n-docs-action w100n-docs-square", "aria-label": t.share, title: t.share, onClick: () => {
15247
15384
  setTab("sharing");
15248
15385
  side2("panel", true);
15249
- }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Share2, { "aria-hidden": true }) }),
15386
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Share2, { "aria-hidden": true }) }),
15250
15387
  doc.data && !versionId && actions?.(doc.data),
15251
15388
  narrow && panelToggle,
15252
- end && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-end w100n-docs-slot", children: slot(end) })
15389
+ end && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-end w100n-docs-slot", children: slot(end) })
15253
15390
  ] }),
15254
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: body, className: "w100n-docs-body", children: [
15255
- listOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("aside", { className: "w100n-docs-side w100n-docs-list", "aria-label": t.documents, children: [
15256
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-head", children: [
15257
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-row", children: [
15258
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "w100n-docs-caption", children: [
15259
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Files, { "aria-hidden": true }),
15391
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: body, className: "w100n-docs-body", children: [
15392
+ listOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("aside", { className: "w100n-docs-side w100n-docs-list", "aria-label": t.documents, children: [
15393
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-head", children: [
15394
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-row", children: [
15395
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "w100n-docs-caption", children: [
15396
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Files, { "aria-hidden": true }),
15260
15397
  t.documents,
15261
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: all.length })
15398
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: all.length })
15262
15399
  ] }),
15263
- host.create && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-new", onKeyDown: (e) => {
15400
+ host.create && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-new", onKeyDown: (e) => {
15264
15401
  if (e.key === "Escape" && adding) {
15265
15402
  e.stopPropagation();
15266
15403
  setAdding(false);
15267
15404
  }
15268
15405
  }, children: [
15269
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-action", "aria-haspopup": "menu", "aria-expanded": adding, disabled: sending === "busy", onClick: () => setAdding(!adding), children: [
15270
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Plus, { "aria-hidden": true }),
15271
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: sending === "busy" ? t.uploading : t.create }),
15272
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true })
15406
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", "aria-haspopup": "menu", "aria-expanded": adding, disabled: sending === "busy", onClick: () => setAdding(!adding), children: [
15407
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Plus, { "aria-hidden": true }),
15408
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: sending === "busy" ? t.uploading : t.create }),
15409
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronDown, { "aria-hidden": true })
15273
15410
  ] }),
15274
- adding && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { role: "menu", className: "w100n-docs-menu", children: [
15275
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15411
+ adding && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "menu", className: "w100n-docs-menu", children: [
15412
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15276
15413
  setAdding(false);
15277
15414
  setMaking(true);
15278
15415
  }, children: [
15279
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FilePlus, { "aria-hidden": true }) }),
15280
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: t.newTitle })
15416
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FilePlus, { "aria-hidden": true }) }),
15417
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.newTitle })
15281
15418
  ] }),
15282
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15419
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15283
15420
  setAdding(false);
15284
15421
  upload.current.click();
15285
15422
  }, children: [
15286
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Upload, { "aria-hidden": true }) }),
15287
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: t.uploadFile })
15423
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Upload, { "aria-hidden": true }) }),
15424
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.uploadFile })
15288
15425
  ] })
15289
15426
  ] }),
15290
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { ref: upload, type: "file", hidden: true, "aria-label": t.uploadFile, accept: ".docx,.md,.markdown,.pdf,.xlsx,.csv,.html,.htm", onChange: (e) => {
15427
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { ref: upload, type: "file", hidden: true, "aria-label": t.uploadFile, accept: ".docx,.md,.markdown,.pdf,.xlsx,.csv,.html,.htm", onChange: (e) => {
15291
15428
  const file = e.target.files?.[0];
15292
15429
  e.target.value = "";
15293
15430
  if (file) void send(file);
15294
15431
  } })
15295
15432
  ] }),
15296
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { ref: listClose, type: "button", className: "w100n-docs-close", onClick: () => side2("list", false), "aria-label": t.closeList, title: t.closeList, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.X, { "aria-hidden": true }) })
15433
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { ref: listClose, type: "button", className: "w100n-docs-close", onClick: () => side2("list", false), "aria-label": t.closeList, title: t.closeList, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.X, { "aria-hidden": true }) })
15297
15434
  ] }),
15298
- (spaces.data?.length ?? 0) > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-picker", onKeyDown: (e) => {
15435
+ (spaces.data?.length ?? 0) > 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-picker", onKeyDown: (e) => {
15299
15436
  if (e.key !== "Escape" || !picking) return;
15300
15437
  e.stopPropagation();
15301
15438
  setPicking(false);
15302
15439
  e.currentTarget.querySelector("button").focus();
15303
15440
  }, children: [
15304
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-field", "aria-haspopup": "listbox", "aria-expanded": picking, onClick: () => setPicking(!picking), children: [
15305
- space ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-dot", style: { background: space.color ?? void 0 } }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.LayoutGrid, { "aria-hidden": true }) }),
15306
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: space?.name ?? t.allProjects }),
15307
- !space && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-count", children: all.length }),
15308
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true })
15441
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-field", "aria-haspopup": "listbox", "aria-expanded": picking, onClick: () => setPicking(!picking), children: [
15442
+ space ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-dot", style: { background: space.color ?? void 0 } }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.LayoutGrid, { "aria-hidden": true }) }),
15443
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: space?.name ?? t.allProjects }),
15444
+ !space && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-count", children: all.length }),
15445
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronDown, { "aria-hidden": true })
15309
15446
  ] }),
15310
- picking && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { role: "listbox", className: "w100n-docs-menu", children: [
15311
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "option", "aria-selected": !spaceId, onClick: () => pick(null), children: [
15312
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.LayoutGrid, { "aria-hidden": true }) }),
15313
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: t.allProjects }),
15314
- !spaceId && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Check, { "aria-hidden": true })
15447
+ picking && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "listbox", className: "w100n-docs-menu", children: [
15448
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "option", "aria-selected": !spaceId, onClick: () => pick(null), children: [
15449
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.LayoutGrid, { "aria-hidden": true }) }),
15450
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.allProjects }),
15451
+ !spaceId && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Check, { "aria-hidden": true })
15315
15452
  ] }),
15316
- groups2.map((group) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { role: "group", "aria-label": group || void 0, children: [
15317
- group && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-menu-caption", children: group }),
15318
- (spaces.data ?? []).filter((item) => (item.group ?? "") === group).map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "option", "aria-selected": item.id === spaceId, onClick: () => pick(item.id), children: [
15319
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-dot", style: { background: item.color ?? void 0 } }),
15320
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: item.name }),
15321
- !spaceId && counts.get(item.id) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-count", children: counts.get(item.id) }) : null,
15322
- item.id === spaceId && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Check, { "aria-hidden": true })
15453
+ groups2.map((group) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "group", "aria-label": group || void 0, children: [
15454
+ group && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-menu-caption", children: group }),
15455
+ (spaces.data ?? []).filter((item) => (item.group ?? "") === group).map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "option", "aria-selected": item.id === spaceId, onClick: () => pick(item.id), children: [
15456
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-dot", style: { background: item.color ?? void 0 } }),
15457
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: item.name }),
15458
+ !spaceId && counts.get(item.id) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-count", children: counts.get(item.id) }) : null,
15459
+ item.id === spaceId && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Check, { "aria-hidden": true })
15323
15460
  ] }, item.id))
15324
15461
  ] }, group))
15325
15462
  ] })
15326
15463
  ] }),
15327
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-filters", children: [
15328
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15329
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Search, { "aria-hidden": true }),
15330
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { ref: finder, value: query, onChange: (event) => setQuery(event.target.value), placeholder: t.search, "aria-label": t.search }),
15331
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("kbd", { children: "\u2318O" })
15464
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-filters", children: [
15465
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15466
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Search, { "aria-hidden": true }),
15467
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { ref: finder, value: query, onChange: (event) => setQuery(event.target.value), placeholder: t.search, "aria-label": t.search }),
15468
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("kbd", { children: "\u2318O" })
15332
15469
  ] }),
15333
- present.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-types", onKeyDown: (e) => {
15470
+ present.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-types", onKeyDown: (e) => {
15334
15471
  if (e.key !== "Escape" || !typing) return;
15335
15472
  e.stopPropagation();
15336
15473
  setTyping(false);
15337
15474
  e.currentTarget.querySelector("button").focus();
15338
15475
  }, children: [
15339
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-field", "aria-haspopup": "listbox", "aria-expanded": typing, "data-on": picked.length > 0, onClick: () => setTyping(!typing), children: [
15340
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ListFilter, { "aria-hidden": true }),
15341
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: t.typeFilter }),
15342
- picked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-badge", children: picked.length }),
15343
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true })
15476
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-field", "aria-haspopup": "listbox", "aria-expanded": typing, "data-on": picked.length > 0, onClick: () => setTyping(!typing), children: [
15477
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ListFilter, { "aria-hidden": true }),
15478
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.typeFilter }),
15479
+ picked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-badge", children: picked.length }),
15480
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronDown, { "aria-hidden": true })
15344
15481
  ] }),
15345
- typing && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { role: "listbox", "aria-multiselectable": true, "aria-label": t.kind, className: "w100n-docs-menu", children: [
15482
+ typing && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "listbox", "aria-multiselectable": true, "aria-label": t.kind, className: "w100n-docs-menu", children: [
15346
15483
  present.map((item) => {
15347
- const Icon = icons4[item];
15484
+ const Icon = icons3[item];
15348
15485
  const on2 = picked.includes(item);
15349
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "option", "aria-selected": on2, onClick: () => setPicked(on2 ? picked.filter((k) => k !== item) : [...picked, item]), children: [
15350
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-box", children: on2 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Check, { "aria-hidden": true }) }),
15351
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-tile", "data-kind": item, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { "aria-hidden": true }) }),
15352
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: t.kinds[item] }),
15353
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-count", children: all.filter((doc2) => doc2.kind === item).length })
15486
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "option", "aria-selected": on2, onClick: () => setPicked(on2 ? picked.filter((k) => k !== item) : [...picked, item]), children: [
15487
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-box", children: on2 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Check, { "aria-hidden": true }) }),
15488
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-tile", "data-kind": item, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { "aria-hidden": true }) }),
15489
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.kinds[item] }),
15490
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-count", children: all.filter((doc2) => doc2.kind === item).length })
15354
15491
  ] }, item);
15355
15492
  }),
15356
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-menu-foot", children: [
15357
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", onClick: () => setPicked(present), children: t.selectAll }),
15358
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", onClick: () => setPicked([]), children: t.clearPick })
15493
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-menu-foot", children: [
15494
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setPicked(present), children: t.selectAll }),
15495
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setPicked([]), children: t.clearPick })
15359
15496
  ] })
15360
15497
  ] })
15361
15498
  ] })
15362
15499
  ] }),
15363
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-shape", role: "radiogroup", "aria-label": t.tree, children: [["tree", import_lucide_react13.FolderTree, t.tree], ["cards", import_lucide_react13.LayoutGrid, t.cards]].map(([key2, Icon, label]) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "radio", "aria-checked": shape3 === key2, onClick: () => {
15364
- setShape(key2);
15365
- localStorage.setItem("w100n-docs-view", key2);
15366
- }, children: [
15367
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { "aria-hidden": true }),
15368
- label
15369
- ] }, key2)) }),
15370
- picked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.kind, children: picked.map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", "aria-pressed": true, "aria-label": `${t.clearPick}: ${t.kinds[item]}`, onClick: () => setPicked(picked.filter((k) => k !== item)), children: [
15500
+ picked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.kind, children: picked.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", "aria-pressed": true, "aria-label": `${t.clearPick}: ${t.kinds[item]}`, onClick: () => setPicked(picked.filter((k) => k !== item)), children: [
15371
15501
  t.kinds[item],
15372
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.X, { "aria-hidden": true })
15502
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.X, { "aria-hidden": true })
15373
15503
  ] }, item)) })
15374
15504
  ] }),
15375
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-cards", children: [
15376
- sending === "failed" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.uploadFailed }),
15505
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-cards", children: [
15506
+ sending === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.uploadFailed }),
15377
15507
  list.error && failed(list.retry),
15378
- list.loading && !list.data && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-muted", children: t.loading }),
15379
- notice && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-muted", role: "status", children: notice }),
15380
- list.data && !shown.length && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-muted", children: all.length ? t.nothing : t.empty }),
15381
- shape3 === "tree" && list.data && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15508
+ list.loading && !list.data && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.loading }),
15509
+ notice && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", role: "status", children: notice }),
15510
+ list.data && !shown.length && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: all.length ? t.nothing : t.empty }),
15511
+ list.data && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15382
15512
  Tree,
15383
15513
  {
15384
15514
  items: shown,
@@ -15388,6 +15518,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15388
15518
  current: here.documentId,
15389
15519
  t,
15390
15520
  edit,
15521
+ hits: query.trim() ? inside2 : void 0,
15391
15522
  onEdit: (text2) => setEdit(text2 === null ? null : edit && { ...edit, text: text2 }),
15392
15523
  onEditDone: commit,
15393
15524
  onOpen: open,
@@ -15405,84 +15536,35 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15405
15536
  } : void 0,
15406
15537
  onWarm: (item) => item ? warm(item) : clearTimeout(hover.current)
15407
15538
  }
15408
- ),
15409
- shape3 === "cards" && folders.map((folder2) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-folder", role: "group", "aria-label": folder2 || t.loose, children: [
15410
- folders.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-group", children: folder2 || t.loose }),
15411
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-grid", children: shown.filter((item) => !spaceId || (item.folder ?? "") === folder2).map((item) => naming?.id === item.id ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-card", children: [
15412
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Thumb, { host, item, label: t.kinds[item.kind] }),
15413
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-card-text", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15414
- "input",
15415
- {
15416
- className: "w100n-docs-field",
15417
- autoFocus: true,
15418
- value: naming.text,
15419
- "aria-label": t.rename,
15420
- onFocus: (e) => e.currentTarget.select(),
15421
- onChange: (e) => setNaming({ ...naming, text: e.target.value }),
15422
- onBlur: () => void retitle(item, naming.text),
15423
- onKeyDown: (e) => {
15424
- if (e.key === "Enter") e.currentTarget.blur();
15425
- if (e.key === "Escape") {
15426
- e.stopPropagation();
15427
- setNaming(null);
15428
- }
15429
- }
15430
- }
15431
- ) })
15432
- ] }, item.id) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15433
- "button",
15434
- {
15435
- type: "button",
15436
- className: "w100n-docs-card",
15437
- "aria-current": item.id === here.documentId,
15438
- onClick: () => open(item),
15439
- title: item.name,
15440
- onPointerEnter: () => warm(item),
15441
- onPointerLeave: () => clearTimeout(hover.current),
15442
- onContextMenu: (e) => {
15443
- e.preventDefault();
15444
- setMenu({ item, x: Math.min(e.clientX, innerWidth - 290), y: Math.min(e.clientY, innerHeight - 440), sure: false });
15445
- },
15446
- children: [
15447
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Thumb, { host, item, label: t.kinds[item.kind] }),
15448
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "w100n-docs-card-text", children: [
15449
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: item.name }),
15450
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: [!spaceId && names2.get(item.spaceId), ago(item.updatedAt)].filter(Boolean).join(" \xB7 ") }),
15451
- inside2.get(item.id) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { className: "w100n-docs-hit", children: inside2.get(item.id).split(/[«»]/).map((part, i) => i % 2 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("mark", { children: part }, i) : part) })
15452
- ] })
15453
- ]
15454
- },
15455
- item.id
15456
- )) })
15457
- ] }, folder2))
15539
+ )
15458
15540
  ] })
15459
15541
  ] }),
15460
15542
  !narrow && !listOpen && listToggle,
15461
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("main", { className: "w100n-docs-stage", children: [
15543
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { className: "w100n-docs-stage", children: [
15462
15544
  !narrow && !panelOpen && panelToggle,
15463
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-bare", children: stage })
15545
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-bare", children: stage })
15464
15546
  ] }),
15465
- doc.data && panelOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("aside", { ref: panel, className: "w100n-docs-side w100n-docs-panel", "aria-label": t.details, children: [
15466
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-head", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-row", children: [
15467
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-tabs", role: "tablist", "aria-label": t.details, "data-compact": panelTabs.length > 3, onKeyDown: rove, children: panelTabs.map(([key2, Icon, label]) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "tab", "aria-selected": tab === key2, tabIndex: tab === key2 ? 0 : -1, "aria-label": label, title: label, onClick: () => setTab(key2), children: [
15468
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { "aria-hidden": true }),
15469
- (panelTabs.length < 4 || tab === key2 && panelTabs.length < 5) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: label })
15547
+ doc.data && panelOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("aside", { ref: panel, className: "w100n-docs-side w100n-docs-panel", "aria-label": t.details, children: [
15548
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-head", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-row", children: [
15549
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-tabs", role: "tablist", "aria-label": t.details, "data-compact": panelTabs.length > 3, onKeyDown: rove, children: panelTabs.map(([key2, Icon, label]) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "tab", "aria-selected": tab === key2, tabIndex: tab === key2 ? 0 : -1, "aria-label": label, title: label, onClick: () => setTab(key2), children: [
15550
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { "aria-hidden": true }),
15551
+ (panelTabs.length < 4 || tab === key2 && panelTabs.length < 5) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: label })
15470
15552
  ] }, key2)) }),
15471
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => side2("panel", false), "aria-label": t.closePanel, title: t.closePanel, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.X, { "aria-hidden": true }) })
15553
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => side2("panel", false), "aria-label": t.closePanel, title: t.closePanel, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.X, { "aria-hidden": true }) })
15472
15554
  ] }) }),
15473
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-panel-body", role: "tabpanel", "aria-label": panelTabs.find(([key2]) => key2 === tab)?.[2], children: [
15474
- tab === "outline" && (outline2.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("nav", { className: "w100n-docs-outline", "aria-label": t.outline, children: [
15475
- now && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-reading", children: [
15476
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", { style: { width: `${Math.round(now.progress * 100)}%` } }) }),
15477
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("small", { children: [
15555
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-panel-body", role: "tabpanel", "aria-label": panelTabs.find(([key2]) => key2 === tab)?.[2], children: [
15556
+ tab === "outline" && (outline2.length ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "w100n-docs-outline", "aria-label": t.outline, children: [
15557
+ now && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-reading", children: [
15558
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { style: { width: `${Math.round(now.progress * 100)}%` } }) }),
15559
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
15478
15560
  Math.round(now.progress * 100),
15479
15561
  "% ",
15480
15562
  t.read
15481
15563
  ] })
15482
15564
  ] }),
15483
- outline2.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15484
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Search, { "aria-hidden": true }),
15485
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { value: hunt, onChange: (e) => setHunt(e.target.value), placeholder: t.findHeading, "aria-label": t.findHeading })
15565
+ outline2.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15566
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Search, { "aria-hidden": true }),
15567
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { value: hunt, onChange: (e) => setHunt(e.target.value), placeholder: t.findHeading, "aria-label": t.findHeading })
15486
15568
  ] }),
15487
15569
  chapters.map((c, i) => {
15488
15570
  const subs = words3.length ? c.subs.filter(hit) : c.subs;
@@ -15490,13 +15572,13 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15490
15572
  const opened3 = words3.length > 0 || (fold[c.head.id] ?? i === reached);
15491
15573
  const named3 = /^(\d+)[.)]?\s+(.+)$/.exec(c.head.text);
15492
15574
  const mark = c.subs.findIndex((s) => s.id === now?.id);
15493
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-chapter", "data-state": reached < 0 ? void 0 : i < reached ? "done" : i === reached ? "now" : void 0, children: [
15494
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-chapter-row", children: [
15495
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-chapter-go", "aria-label": c.head.text, "aria-current": now?.id === c.head.id ? "location" : void 0, onClick: () => reach(c.head), children: [
15496
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-chapter-num", children: named3 ? named3[1] : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Bookmark, { "aria-hidden": true }) }),
15497
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: named3 ? named3[2] : c.head.text })
15575
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-chapter", "data-state": reached < 0 ? void 0 : i < reached ? "done" : i === reached ? "now" : void 0, children: [
15576
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-chapter-row", children: [
15577
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-chapter-go", "aria-label": c.head.text, "aria-current": now?.id === c.head.id ? "location" : void 0, onClick: () => reach(c.head), children: [
15578
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-chapter-num", children: named3 ? named3[1] : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Bookmark, { "aria-hidden": true }) }),
15579
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: named3 ? named3[2] : c.head.text })
15498
15580
  ] }),
15499
- c.subs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15581
+ c.subs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15500
15582
  "button",
15501
15583
  {
15502
15584
  type: "button",
@@ -15506,13 +15588,13 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15506
15588
  title: opened3 ? t.hideSections : t.showSections,
15507
15589
  onClick: () => setFold({ ...fold, [c.head.id]: !opened3 }),
15508
15590
  children: [
15509
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: c.subs.length }),
15510
- opened3 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ChevronRight, { "aria-hidden": true })
15591
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: c.subs.length }),
15592
+ opened3 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronDown, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronRight, { "aria-hidden": true })
15511
15593
  ]
15512
15594
  }
15513
15595
  )
15514
15596
  ] }),
15515
- opened3 && subs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-sections", children: subs.map((s) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15597
+ opened3 && subs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-sections", children: subs.map((s) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15516
15598
  "button",
15517
15599
  {
15518
15600
  type: "button",
@@ -15521,7 +15603,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15521
15603
  "data-state": i < reached || i === reached && c.subs.indexOf(s) < mark ? "done" : void 0,
15522
15604
  "aria-current": now?.id === s.id ? "location" : void 0,
15523
15605
  children: [
15524
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", { "aria-hidden": true }),
15606
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { "aria-hidden": true }),
15525
15607
  s.text
15526
15608
  ]
15527
15609
  },
@@ -15529,47 +15611,47 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15529
15611
  )) })
15530
15612
  ] }, c.head.id);
15531
15613
  })
15532
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-muted", children: t.noOutline })),
15533
- tab === "links" && doc.data.kind === "markdown" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Backlinks, { host, current: doc.data, notes: notes3, t, onOpen: open }),
15534
- tab === "versions" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-versions", children: [
15614
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.noOutline })),
15615
+ tab === "links" && doc.data.kind === "markdown" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Backlinks, { host, current: doc.data, notes: notes3, t, onOpen: open }),
15616
+ tab === "versions" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-versions", children: [
15535
15617
  versions.error && failed(versions.retry),
15536
- (versions.data ?? []).map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15618
+ (versions.data ?? []).map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15537
15619
  "button",
15538
15620
  {
15539
15621
  type: "button",
15540
15622
  "aria-pressed": (versionId ?? "current") === item.id || !versionId && item.current,
15541
15623
  onClick: () => view(item.current ? null : item.id),
15542
15624
  children: [
15543
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("b", { children: [
15625
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("b", { children: [
15544
15626
  date(item.createdAt),
15545
- item.current && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w100n-docs-badge", children: t.current })
15627
+ item.current && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-badge", children: t.current })
15546
15628
  ] }),
15547
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: [item.author?.name, size2(item.size), item.note].filter(Boolean).join(" \xB7 ") })
15629
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: [item.author?.name, size2(item.size), item.note].filter(Boolean).join(" \xB7 ") })
15548
15630
  ]
15549
15631
  },
15550
15632
  item.id
15551
15633
  ))
15552
15634
  ] }),
15553
- tab === "details" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("dl", { className: "w100n-docs-details", children: [
15554
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dt", { children: t.kind }),
15555
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dd", { children: t.kinds[doc.data.kind] }),
15556
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dt", { children: t.size }),
15557
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dd", { children: size2(doc.data.size) }),
15558
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dt", { children: t.updated }),
15559
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dd", { children: date(doc.data.updatedAt) }),
15560
- doc.data.updatedBy && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
15561
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dt", { children: t.by }),
15562
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dd", { children: doc.data.updatedBy.name })
15635
+ tab === "details" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("dl", { className: "w100n-docs-details", children: [
15636
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.kind }),
15637
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: t.kinds[doc.data.kind] }),
15638
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.size }),
15639
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: size2(doc.data.size) }),
15640
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.updated }),
15641
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: date(doc.data.updatedAt) }),
15642
+ doc.data.updatedBy && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15643
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.by }),
15644
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: doc.data.updatedBy.name })
15563
15645
  ] }),
15564
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dt", { children: t.rights }),
15565
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dd", { children: [doc.data.rights.view && t.view, doc.data.rights.comment && t.comment, doc.data.rights.edit && t.edit].filter(Boolean).join(", ") })
15646
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.rights }),
15647
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: [doc.data.rights.view && t.view, doc.data.rights.comment && t.comment, doc.data.rights.edit && t.edit].filter(Boolean).join(", ") })
15566
15648
  ] }),
15567
- tab === "details" && host.exportAs && !!doc.data.exports?.length && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-about", children: [
15568
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "w100n-docs-caption", children: [
15569
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FileDown, { "aria-hidden": true }),
15649
+ tab === "details" && host.exportAs && !!doc.data.exports?.length && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-about", children: [
15650
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "w100n-docs-caption", children: [
15651
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileDown, { "aria-hidden": true }),
15570
15652
  t.exportAs
15571
15653
  ] }),
15572
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-chips", children: doc.data.exports.map((format) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15654
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-chips", children: doc.data.exports.map((format) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15573
15655
  "button",
15574
15656
  {
15575
15657
  type: "button",
@@ -15577,22 +15659,22 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15577
15659
  disabled: exporting === "busy",
15578
15660
  onClick: () => void exportAs(doc.data, format),
15579
15661
  children: [
15580
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FileDown, { "aria-hidden": true }),
15662
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileDown, { "aria-hidden": true }),
15581
15663
  format.toUpperCase()
15582
15664
  ]
15583
15665
  },
15584
15666
  format
15585
15667
  )) }),
15586
- exporting === "failed" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-muted", children: t.exportFailed })
15668
+ exporting === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.exportFailed })
15587
15669
  ] }),
15588
- tab === "comments" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { ref: setBox }),
15589
- tab === "sharing" && sharing && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Sharing, { host, doc: doc.data, t, language, team: names2.get(doc.data.spaceId) }),
15590
- tab === "signatures" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-versions", children: [
15670
+ tab === "comments" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref: setBox }),
15671
+ tab === "sharing" && sharing && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sharing, { host, doc: doc.data, t, language, team: names2.get(doc.data.spaceId) }),
15672
+ tab === "signatures" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-versions", children: [
15591
15673
  signatures.error && failed(signatures.retry),
15592
- signatures.data?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "w100n-docs-muted", children: t.noSignatures }),
15674
+ signatures.data?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.noSignatures }),
15593
15675
  (signatures.data ?? []).map((entry2) => {
15594
15676
  const signed = versions.data?.find((v) => v.id === entry2.versionId);
15595
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15677
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15596
15678
  "button",
15597
15679
  {
15598
15680
  type: "button",
@@ -15600,15 +15682,15 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15600
15682
  "aria-pressed": !!signed && (versionId ?? versions.data?.find((v) => v.current)?.id) === signed.id,
15601
15683
  onClick: () => view(signed.current ? null : signed.id),
15602
15684
  children: [
15603
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("b", { children: [
15685
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("b", { children: [
15604
15686
  entry2.signer.name,
15605
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "w100n-docs-badge", children: [
15687
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "w100n-docs-badge", children: [
15606
15688
  t.page,
15607
15689
  " ",
15608
15690
  entry2.page
15609
15691
  ] })
15610
15692
  ] }),
15611
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: [date(entry2.signedAt), t.methods[entry2.method], signed && (signed.current ? t.current : `${t.version} ${date(signed.createdAt)}`)].filter(Boolean).join(" \xB7 ") })
15693
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: [date(entry2.signedAt), t.methods[entry2.method], signed && (signed.current ? t.current : `${t.version} ${date(signed.createdAt)}`)].filter(Boolean).join(" \xB7 ") })
15612
15694
  ]
15613
15695
  },
15614
15696
  entry2.id
@@ -15619,7 +15701,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15619
15701
  ] })
15620
15702
  ] })
15621
15703
  ] }),
15622
- jump && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
15704
+ jump && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15623
15705
  Jump,
15624
15706
  {
15625
15707
  mode: jump,
@@ -15632,18 +15714,13 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15632
15714
  place: (item) => [!spaceId && names2.get(item.spaceId), item.folder].filter(Boolean).join(" / ")
15633
15715
  }
15634
15716
  ),
15635
- making && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NewDocument, { host, t, onClose: () => setMaking(false), onMade: (made2) => {
15717
+ making && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(NewDocument, { host, t, onClose: () => setMaking(false), onMade: (made2) => {
15636
15718
  setMaking(false);
15637
15719
  opened2(made2);
15638
15720
  } }),
15639
- menu && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: popup, className: "w100n-docs-menu w100n-docs-context", role: "menu", "aria-label": t.fileActions, style: { left: menu.x, top: menu.y }, children: [
15640
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-context-head", children: [
15641
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: menu.item.name }),
15642
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: [t.kinds[menu.item.kind], size2(menu.item.size), names2.get(menu.item.spaceId), menu.item.folder].filter(Boolean).join(" \xB7 ") }),
15643
- menu.item.createdAt && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: [t.createdOn.replace("{when}", date(menu.item.createdAt)), menu.item.createdBy?.name].filter(Boolean).join(" \xB7 ") }),
15644
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: [t.updatedOn.replace("{when}", ago(menu.item.updatedAt)), menu.item.updatedBy?.name].filter(Boolean).join(" \xB7 ") })
15645
- ] }),
15646
- menu.moving ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-context-list", children: ["", ...dirs.data.get(menu.item.spaceId)].map((folder2) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
15721
+ menu && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: popup, className: "w100n-docs-menu w100n-docs-context", role: "menu", "aria-label": t.fileActions, style: { left: menu.x, top: menu.y }, children: [
15722
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-context-head", children: card(menu.item) }),
15723
+ menu.moving ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-context-list", children: ["", ...dirs.data.get(menu.item.spaceId)].map((folder2) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15647
15724
  "button",
15648
15725
  {
15649
15726
  type: "button",
@@ -15652,100 +15729,99 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15652
15729
  onClick: () => moveTo(menu.item, { spaceId: menu.item.spaceId, folder: folder2 }),
15653
15730
  style: { paddingLeft: 10 + 14 * (folder2 ? folder2.split("/").length : 0) },
15654
15731
  children: [
15655
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Folder, { "aria-hidden": true }),
15732
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Folder, { "aria-hidden": true }),
15656
15733
  folder2 ? folder2.split("/").pop() : names2.get(menu.item.spaceId) ?? t.topLevel
15657
15734
  ]
15658
15735
  },
15659
15736
  folder2
15660
- )) }) : menu.sure ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15661
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: t.trashAsk.replace("{name}", menu.item.name) }),
15662
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15663
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setMenu({ ...menu, sure: false }), children: t.cancel }),
15664
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => void drop2(menu.item), children: [
15665
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15737
+ )) }) : menu.sure ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15738
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: t.trashAsk.replace("{name}", menu.item.name) }),
15739
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15740
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setMenu({ ...menu, sure: false }), children: t.cancel }),
15741
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => void drop2(menu.item), children: [
15742
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15666
15743
  t.trash
15667
15744
  ] })
15668
15745
  ] })
15669
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
15670
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15746
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15747
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15671
15748
  setMenu(null);
15672
15749
  open(menu.item);
15673
15750
  }, children: [
15674
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FileText, { "aria-hidden": true }),
15751
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileText, { "aria-hidden": true }),
15675
15752
  t.openFile
15676
15753
  ] }),
15677
- host.href && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15754
+ host.href && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15678
15755
  setMenu(null);
15679
15756
  window.open(host.href(menu.item.id), "_blank", "noopener");
15680
15757
  }, children: [
15681
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.ExternalLink, { "aria-hidden": true }),
15758
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ExternalLink, { "aria-hidden": true }),
15682
15759
  t.openTab
15683
15760
  ] }),
15684
- host.href && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => navigator.clipboard.writeText(host.href(menu.item.id)), t.linkCopied), children: [
15685
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Link, { "aria-hidden": true }),
15761
+ host.href && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => navigator.clipboard.writeText(host.href(menu.item.id)), t.linkCopied), children: [
15762
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Link, { "aria-hidden": true }),
15686
15763
  t.copyLink
15687
15764
  ] }),
15688
- host.send && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15765
+ host.send && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15689
15766
  setMenu(null);
15690
15767
  host.send(menu.item.id);
15691
15768
  }, children: [
15692
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Send, { "aria-hidden": true }),
15769
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Send, { "aria-hidden": true }),
15693
15770
  t.sendChat
15694
15771
  ] }),
15695
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("hr", {}),
15696
- host.rename && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15772
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15773
+ host.rename && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15697
15774
  const item = menu.item;
15698
15775
  setMenu(null);
15699
- if (shape3 === "tree") setEdit({ key: `file:${item.id}`, text: item.name.replace(/\.[^.]+$/, ""), run: (text2) => retitle(item, text2) });
15700
- else setNaming({ id: item.id, text: item.name.replace(/\.[^.]+$/, "") });
15776
+ setEdit({ key: `file:${item.id}`, text: item.name.replace(/\.[^.]+$/, ""), run: (text2) => retitle(item, text2) });
15701
15777
  }, children: [
15702
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Pencil, { "aria-hidden": true }),
15778
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Pencil, { "aria-hidden": true }),
15703
15779
  t.rename
15704
15780
  ] }),
15705
- host.move && dirs.data?.has(menu.item.spaceId) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", "aria-haspopup": "menu", onClick: () => setMenu({ ...menu, moving: true }), children: [
15706
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FolderInput, { "aria-hidden": true }),
15781
+ host.move && dirs.data?.has(menu.item.spaceId) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", "aria-haspopup": "menu", onClick: () => setMenu({ ...menu, moving: true }), children: [
15782
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FolderInput, { "aria-hidden": true }),
15707
15783
  t.moveTo
15708
15784
  ] }),
15709
- host.create && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(async () => copy2(await host.document(menu.item.id))), children: [
15710
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Copy, { "aria-hidden": true }),
15785
+ host.create && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(async () => copy2(await host.document(menu.item.id))), children: [
15786
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Copy, { "aria-hidden": true }),
15711
15787
  t.makeCopy
15712
15788
  ] }),
15713
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => fetchFile(menu.item)), children: [
15714
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Download, { "aria-hidden": true }),
15789
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => fetchFile(menu.item)), children: [
15790
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Download, { "aria-hidden": true }),
15715
15791
  t.download
15716
15792
  ] }),
15717
- host.saveTemplate && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => host.saveTemplate(menu.item.id), t.templateSaved), children: [
15718
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Bookmark, { "aria-hidden": true }),
15793
+ host.saveTemplate && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => host.saveTemplate(menu.item.id), t.templateSaved), children: [
15794
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Bookmark, { "aria-hidden": true }),
15719
15795
  t.saveTemplate
15720
15796
  ] }),
15721
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15797
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15722
15798
  setMenu(null);
15723
15799
  open(menu.item);
15724
15800
  setTab("details");
15725
15801
  side2("panel", true);
15726
15802
  }, children: [
15727
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Info, { "aria-hidden": true }),
15803
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Info, { "aria-hidden": true }),
15728
15804
  t.details
15729
15805
  ] }),
15730
- host.remove && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
15731
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("hr", {}),
15732
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setMenu({ ...menu, sure: true }), children: [
15733
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15806
+ host.remove && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15807
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15808
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setMenu({ ...menu, sure: true }), children: [
15809
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15734
15810
  t.trash
15735
15811
  ] })
15736
15812
  ] })
15737
15813
  ] })
15738
15814
  ] }),
15739
- spot3 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: popup, className: "w100n-docs-menu w100n-docs-context", role: "menu", "aria-label": t.folderActions, style: { left: spot3.x, top: spot3.y }, children: [
15740
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-context-head", children: [
15741
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: folderNamed(spot3.at) }),
15742
- spot3.at.folder && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: [names2.get(spot3.at.spaceId), ...spot3.at.folder.split("/").slice(0, -1)].filter(Boolean).join(" / ") })
15815
+ spot3 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: popup, className: "w100n-docs-menu w100n-docs-context", role: "menu", "aria-label": t.folderActions, style: { left: spot3.x, top: spot3.y }, children: [
15816
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-context-head", children: [
15817
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: folderNamed(spot3.at) }),
15818
+ spot3.at.folder && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: [names2.get(spot3.at.spaceId), ...spot3.at.folder.split("/").slice(0, -1)].filter(Boolean).join(" / ") })
15743
15819
  ] }),
15744
- spot3.sure ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15745
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: t.folderTrashAsk.replace("{name}", folderNamed(spot3.at)) }),
15746
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15747
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setSpot({ ...spot3, sure: false }), children: t.cancel }),
15748
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => {
15820
+ spot3.sure ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15821
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: t.folderTrashAsk.replace("{name}", folderNamed(spot3.at)) }),
15822
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15823
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setSpot({ ...spot3, sure: false }), children: t.cancel }),
15824
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => {
15749
15825
  const at2 = spot3.at;
15750
15826
  const inside3 = doc.data && doc.data.spaceId === at2.spaceId && `${doc.data.folder ?? ""}/`.startsWith(`${at2.folder}/`);
15751
15827
  void act(() => host.removeFolder(at2), t.trashed).then(() => {
@@ -15753,42 +15829,42 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15753
15829
  if (inside3) go({ spaceId: here.spaceId, documentId: null });
15754
15830
  });
15755
15831
  }, children: [
15756
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15832
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15757
15833
  t.trash
15758
15834
  ] })
15759
15835
  ] })
15760
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
15761
- host.create && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15836
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15837
+ host.create && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15762
15838
  const at2 = spot3.at;
15763
15839
  setSpot(null);
15764
15840
  void note(t.untitled, true, at2);
15765
15841
  }, children: [
15766
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FilePlus, { "aria-hidden": true }),
15842
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FilePlus, { "aria-hidden": true }),
15767
15843
  t.newNoteHere
15768
15844
  ] }),
15769
- host.makeFolder && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15845
+ host.makeFolder && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15770
15846
  const at2 = spot3.at;
15771
15847
  setSpot(null);
15772
15848
  setEdit({ key: `new:${spot3.key}`, text: t.newFolder, run: (name) => act(() => host.makeFolder(at2, name)).then(refresh) });
15773
15849
  }, children: [
15774
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.FolderPlus, { "aria-hidden": true }),
15850
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FolderPlus, { "aria-hidden": true }),
15775
15851
  t.newFolder
15776
15852
  ] }),
15777
- spot3.at.folder && host.renameFolder && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
15778
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("hr", {}),
15779
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15853
+ spot3.at.folder && host.renameFolder && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15854
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15855
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15780
15856
  const at2 = spot3.at;
15781
15857
  setSpot(null);
15782
15858
  setEdit({ key: `dir:${spot3.key}`, text: folderNamed(at2), run: (name) => name === folderNamed(at2) ? Promise.resolve() : act(() => host.renameFolder(at2, name)).then(refresh) });
15783
15859
  }, children: [
15784
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Pencil, { "aria-hidden": true }),
15860
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Pencil, { "aria-hidden": true }),
15785
15861
  t.renameFolder
15786
15862
  ] })
15787
15863
  ] }),
15788
- spot3.at.folder && host.removeFolder && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
15789
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("hr", {}),
15790
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setSpot({ ...spot3, sure: true }), children: [
15791
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15864
+ spot3.at.folder && host.removeFolder && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15865
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15866
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setSpot({ ...spot3, sure: true }), children: [
15867
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15792
15868
  t.trashFolder
15793
15869
  ] })
15794
15870
  ] })
@@ -15800,23 +15876,23 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15800
15876
 
15801
15877
  // src/FilePreview.tsx
15802
15878
  var import_react20 = require("react");
15803
- var import_jsx_runtime18 = require("react/jsx-runtime");
15879
+ var import_jsx_runtime20 = require("react/jsx-runtime");
15804
15880
  function FilePreview({ url, name, mimeType, size: size2 = 0, bytes, pdfWorker }) {
15805
15881
  const [source] = (0, import_react20.useState)(() => ({ pdfWorker, content: () => bytes ? bytes(url) : fetch(url, { credentials: "include" }).then((res) => res.ok ? res.arrayBuffer() : Promise.reject(new Error(String(res.status)))) }));
15806
15882
  const kind = kindOf(name, mimeType);
15807
15883
  if (!kind) return null;
15808
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-preview", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Thumb, { host: source, item: { id: url.split("?")[0], spaceId: "", name, kind, size: size2, updatedAt: "" } }) });
15884
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w100n-preview", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Thumb, { host: source, item: { id: url.split("?")[0], spaceId: "", name, kind, size: size2, updatedAt: "" } }) });
15809
15885
  }
15810
15886
 
15811
15887
  // src/GuestDocument.tsx
15812
15888
  var import_react21 = require("react");
15813
- var import_lucide_react14 = require("lucide-react");
15889
+ var import_lucide_react15 = require("lucide-react");
15814
15890
  init_text();
15815
15891
  init_useLoad();
15816
- var import_jsx_runtime19 = require("react/jsx-runtime");
15892
+ var import_jsx_runtime21 = require("react/jsx-runtime");
15817
15893
  var TextEditor4 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_TextEditor(), TextEditor_exports)));
15818
15894
  var SheetView4 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_SheetView(), SheetView_exports)));
15819
- var icons5 = { docx: import_lucide_react14.FileText, markdown: import_lucide_react14.FileType, pdf: import_lucide_react14.Files, sheet: import_lucide_react14.FileSpreadsheet, slides: import_lucide_react14.Presentation };
15895
+ var icons4 = { docx: import_lucide_react15.FileText, markdown: import_lucide_react15.FileType, pdf: import_lucide_react15.Files, sheet: import_lucide_react15.FileSpreadsheet, slides: import_lucide_react15.Presentation };
15820
15896
  var GuestRefused = class extends Error {
15821
15897
  constructor(reason, file = "", sharedBy = "") {
15822
15898
  super(reason);
@@ -15874,18 +15950,18 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15874
15950
  };
15875
15951
  const top = (file2, badge) => {
15876
15952
  const kind2 = file2 ? kindOf(file2.name, file2.mimeType) : null;
15877
- const Kind = kind2 ? icons5[kind2] : import_lucide_react14.FileText;
15878
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "w100n-docs-bar w100n-guest-bar", children: [
15879
- brand && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-guest-brand", children: brand }),
15880
- file2 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15881
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-tile", "data-kind": kind2, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Kind, { "aria-hidden": true }) }),
15882
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-heading", children: [
15883
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { className: "w100n-docs-title", children: file2.name }),
15884
- file2.sharedBy && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-crumbs", children: t.sharedBy.replace("{name}", file2.sharedBy) })
15953
+ const Kind = kind2 ? icons4[kind2] : import_lucide_react15.FileText;
15954
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("header", { className: "w100n-docs-bar w100n-guest-bar", children: [
15955
+ brand && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-guest-brand", children: brand }),
15956
+ file2 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
15957
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-docs-tile", "data-kind": kind2, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Kind, { "aria-hidden": true }) }),
15958
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs-heading", children: [
15959
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { className: "w100n-docs-title", children: file2.name }),
15960
+ file2.sharedBy && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-docs-crumbs", children: t.sharedBy.replace("{name}", file2.sharedBy) })
15885
15961
  ] }),
15886
- badge && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-badge", "data-kind": kind2, children: badge }),
15887
- file2.download && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-end", children: [
15888
- (kind2 === "docx" || kind2 === "markdown" || kind2 === "sheet" || kind2 === "slides") && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15962
+ badge && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-docs-badge", "data-kind": kind2, children: badge }),
15963
+ file2.download && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs-end", children: [
15964
+ (kind2 === "docx" || kind2 === "markdown" || kind2 === "sheet" || kind2 === "slides") && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15889
15965
  "button",
15890
15966
  {
15891
15967
  type: "button",
@@ -15896,41 +15972,41 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15896
15972
  "aria-label": t.pdfCopy,
15897
15973
  title: t.pdfCopy,
15898
15974
  children: [
15899
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileDown, { "aria-hidden": true }),
15900
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t.pdfCopy })
15975
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react15.FileDown, { "aria-hidden": true }),
15976
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.pdfCopy })
15901
15977
  ]
15902
15978
  }
15903
15979
  ),
15904
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("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: [
15905
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Download, { "aria-hidden": true }),
15906
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t.download })
15980
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("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: [
15981
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react15.Download, { "aria-hidden": true }),
15982
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.download })
15907
15983
  ] })
15908
15984
  ] })
15909
15985
  ] })
15910
15986
  ] });
15911
15987
  };
15912
- const gate = (tone, Icon, title, body, form) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
15988
+ const gate = (tone, Icon, title, body, form) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
15913
15989
  top(null, null),
15914
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-guest-gate", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-guest-card", children: [
15915
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-share-tile", "data-tone": tone, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { "aria-hidden": true }) }),
15916
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { children: title }),
15917
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: body }),
15990
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-guest-gate", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-guest-card", children: [
15991
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-share-tile", "data-tone": tone, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { "aria-hidden": true }) }),
15992
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { children: title }),
15993
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: body }),
15918
15994
  form
15919
15995
  ] }) })
15920
15996
  ] });
15921
15997
  if (opened2.error) {
15922
15998
  const refused = opened2.error instanceof GuestRefused ? opened2.error : null;
15923
- if (refused?.reason === "ended") return gate("slate", import_lucide_react14.Ban, t.endedTitle, t.endedText);
15924
- if (refused?.reason === "missing") return gate("slate", import_lucide_react14.Ban, t.missingTitle, t.missingText);
15999
+ if (refused?.reason === "ended") return gate("slate", import_lucide_react15.Ban, t.endedTitle, t.endedText);
16000
+ if (refused?.reason === "missing") return gate("slate", import_lucide_react15.Ban, t.missingTitle, t.missingText);
15925
16001
  if (refused?.reason === "password" || refused?.reason === "wrong" || refused?.reason === "name") {
15926
16002
  const password = refused.reason !== "name";
15927
16003
  const shared = refused.sharedBy ? `${t.sharedBy.replace("{name}", refused.sharedBy)}. ` : "";
15928
16004
  return gate(
15929
16005
  "violet",
15930
- password ? import_lucide_react14.Lock : import_lucide_react14.UserRound,
16006
+ password ? import_lucide_react15.Lock : import_lucide_react15.UserRound,
15931
16007
  refused.file || t.documents,
15932
16008
  shared + (password ? t.passwordAsk : t.nameAsk),
15933
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("form", { className: "w100n-guest-form", onSubmit: (e) => {
16009
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("form", { className: "w100n-guest-form", onSubmit: (e) => {
15934
16010
  e.preventDefault();
15935
16011
  if (!typed.trim()) return;
15936
16012
  if (password) setAsk({ ...ask, password: typed });
@@ -15940,7 +16016,7 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15940
16016
  }
15941
16017
  setTyped("");
15942
16018
  }, children: [
15943
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
16019
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15944
16020
  "input",
15945
16021
  {
15946
16022
  className: "w100n-share-input",
@@ -15953,21 +16029,21 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15953
16029
  onChange: (e) => setTyped(e.target.value)
15954
16030
  }
15955
16031
  ),
15956
- refused.reason === "wrong" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.wrongPassword }),
15957
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !typed.trim(), children: [
15958
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Eye, { "aria-hidden": true }),
16032
+ refused.reason === "wrong" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.wrongPassword }),
16033
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !typed.trim(), children: [
16034
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react15.Eye, { "aria-hidden": true }),
15959
16035
  t.openDoc
15960
16036
  ] })
15961
16037
  ] })
15962
16038
  );
15963
16039
  }
15964
- if (refused?.reason === "busy") return gate("slate", import_lucide_react14.Ban, t.failed, t.tooMany);
15965
- return gate("slate", import_lucide_react14.Ban, t.failed, "", /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "w100n-docs-action", onClick: opened2.retry, children: t.retry }));
16040
+ if (refused?.reason === "busy") return gate("slate", import_lucide_react15.Ban, t.failed, t.tooMany);
16041
+ return gate("slate", import_lucide_react15.Ban, t.failed, "", /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { type: "button", className: "w100n-docs-action", onClick: opened2.retry, children: t.retry }));
15966
16042
  }
15967
16043
  const file = opened2.data;
15968
- if (!file) return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
16044
+ if (!file) return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
15969
16045
  top(null, null),
15970
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading })
16046
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-docs-empty", children: t.loading })
15971
16047
  ] });
15972
16048
  const kind = kindOf(file.name, file.mimeType);
15973
16049
  const text = kind === "docx" || kind === "markdown";
@@ -15975,23 +16051,23 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15975
16051
  const rights = { view: true, comment: talk, edit: false };
15976
16052
  const quiet3 = () => {
15977
16053
  };
15978
- let stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
15979
- if (text) stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TextEditor4, { kind, bytes: file.bytes, t, language, rights, host: talk ? notes3 : void 0, documentId: file.id, onOutline: quiet3, slot: talk ? slot : null }) });
15980
- else if (kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PdfView, { bytes: file.bytes, t, language, worker: host.pdfWorker, rights, documentId: file.id, onOutline: quiet3 });
15981
- else if (kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SlidesView, { html: new TextDecoder().decode(file.bytes), name: file.name, rights, language, theme, onOutline: quiet3 });
15982
- else if (kind === "sheet") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SheetView4, { bytes: file.bytes, name: file.name, kind: /\.csv$/i.test(file.name) || file.mimeType === "text/csv" ? "csv" : "xlsx", rights, language, theme, documentId: file.id }) });
15983
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
16054
+ let stage = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
16055
+ if (text) stage = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TextEditor4, { kind, bytes: file.bytes, t, language, rights, host: talk ? notes3 : void 0, documentId: file.id, onOutline: quiet3, slot: talk ? slot : null }) });
16056
+ else if (kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PdfView, { bytes: file.bytes, t, language, worker: host.pdfWorker, rights, documentId: file.id, onOutline: quiet3 });
16057
+ else if (kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SlidesView, { html: new TextDecoder().decode(file.bytes), name: file.name, rights, language, theme, onOutline: quiet3 });
16058
+ else if (kind === "sheet") stage = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SheetView4, { bytes: file.bytes, name: file.name, kind: /\.csv$/i.test(file.name) || file.mimeType === "text/csv" ? "csv" : "xlsx", rights, language, theme, documentId: file.id }) });
16059
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
15984
16060
  top(file, talk ? t.badgeComment : t.badgeRead),
15985
- saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted w100n-guest-note", role: "alert", children: t.exportFailed }),
15986
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-body w100n-guest-body", children: [
15987
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("main", { className: "w100n-docs-stage", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-bare", children: stage }) }),
15988
- talk && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("aside", { className: "w100n-docs-side w100n-docs-panel w100n-guest-panel", "aria-label": t.comments, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-panel-body", children: [
15989
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "w100n-share-field", children: [
15990
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t.yourName }),
15991
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { className: "w100n-share-input", value: name, autoComplete: "name", placeholder: t.yourName, onChange: (e) => typeName(e.target.value) })
16061
+ saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "w100n-docs-muted w100n-guest-note", role: "alert", children: t.exportFailed }),
16062
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs-body w100n-guest-body", children: [
16063
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("main", { className: "w100n-docs-stage", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-docs-bare", children: stage }) }),
16064
+ talk && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("aside", { className: "w100n-docs-side w100n-docs-panel w100n-guest-panel", "aria-label": t.comments, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs-panel-body", children: [
16065
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: "w100n-share-field", children: [
16066
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.yourName }),
16067
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { className: "w100n-share-input", value: name, autoComplete: "name", placeholder: t.yourName, onChange: (e) => typeName(e.target.value) })
15992
16068
  ] }),
15993
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: name.trim() ? t.nameHint : t.nameNeeded }),
15994
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref: setSlot })
16069
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "w100n-docs-muted", children: name.trim() ? t.nameHint : t.nameNeeded }),
16070
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref: setSlot })
15995
16071
  ] }) })
15996
16072
  ] })
15997
16073
  ] });
@@ -16006,6 +16082,7 @@ init_docx();
16006
16082
  FilePreview,
16007
16083
  GuestDocument,
16008
16084
  GuestRefused,
16085
+ PreviewCard,
16009
16086
  SlidesView,
16010
16087
  kindOf,
16011
16088
  kinds,