@w100n/documents 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.19.0";
4996
+ version = "0.20.0";
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,12 +8364,62 @@ 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, {
8361
8420
  default: () => TextEditor
8362
8421
  });
8363
- function TextEditor({ kind, bytes, t, language, rights, host, together, documentId, onSaved, onOutline, onReading, onPanel, slot, head: head2, file, guard, wiki }) {
8422
+ function TextEditor({ kind, bytes, t, language, rights, host, together, documentId, onSaved, onOutline, onReading, onSpot, onPanel, slot, head: head2, file, guard, wiki }) {
8364
8423
  const docx2 = kind === "docx";
8365
8424
  const can = { edit: !!host?.save && !!rights?.edit, comment: !!host?.comment && !!rights && (rights.comment || rights.edit) };
8366
8425
  const source = useLoad(async () => {
@@ -8428,6 +8487,10 @@ function TextEditor({ kind, bytes, t, language, rights, host, together, document
8428
8487
  transformPastedHTML: cleanPaste,
8429
8488
  handleKeyDown: (view, event) => !!wikiAsk.getState(view.state) && !!wikiKeys.current?.(event.key)
8430
8489
  },
8490
+ onSelectionUpdate: ({ editor: e }) => {
8491
+ const { from, to, empty } = e.state.selection;
8492
+ onSpot?.(empty ? null : { quote: e.state.doc.textBetween(from, to, " ").slice(0, 300) });
8493
+ },
8431
8494
  onCreate: ({ editor: made2 }) => {
8432
8495
  if (source.data && !live) baseline.current = { bytes, doc: made2.state.doc, base: source.data.md && track(source.data.md, made2.state.doc) };
8433
8496
  }
@@ -8690,8 +8753,8 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8690
8753
  (0, import_react11.useEffect)(() => {
8691
8754
  if (editor && !editor.isDestroyed) editor.view.dispatch(editor.state.tr.setMeta("wiki", true));
8692
8755
  }, [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 });
8756
+ 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 });
8757
+ 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
8758
  const save2 = async (auto = false) => {
8696
8759
  if (live) {
8697
8760
  if (!can.edit || !live.ready || !live.online || !live.pending || saving === "busy") return false;
@@ -8866,11 +8929,11 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8866
8929
  };
8867
8930
  const tool = (icon, label, run3, pressed, disabled) => {
8868
8931
  const Icon = icon;
8869
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": label, title: label, "aria-pressed": pressed, disabled, onClick: () => {
8932
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": label, title: label, "aria-pressed": pressed, disabled, onClick: () => {
8870
8933
  run3();
8871
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { "aria-hidden": true }) });
8934
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { "aria-hidden": true }) });
8872
8935
  };
8873
- const gap = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-pdf-gap" });
8936
+ const gap = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-pdf-gap" });
8874
8937
  const known = source.data.styles;
8875
8938
  const named3 = (test) => {
8876
8939
  const name = known.find(test)?.name;
@@ -8889,28 +8952,28 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8889
8952
  ];
8890
8953
  const margins = [[t.marginsNormal, [96, 96, 96, 96]], [t.marginsNarrow, [48, 48, 48, 48]], [t.marginsWide, [96, 192, 96, 192]]];
8891
8954
  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: [
8955
+ const person = (c) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { children: [
8956
+ 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() }),
8957
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-who", children: [
8958
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { children: [
8896
8959
  c.author.name,
8897
- c.author.id.startsWith("guest:") && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "w100n-docs-badge", children: t.guest })
8960
+ c.author.id.startsWith("guest:") && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-badge", children: t.guest })
8898
8961
  ] }),
8899
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: when(c.createdAt) })
8962
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: when(c.createdAt) })
8900
8963
  ] }),
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: () => {
8964
+ drops(c) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-own", onClick: (e) => e.stopPropagation(), children: [
8965
+ mine(c) && host.editComment && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": t.editComment, title: t.editComment, onClick: () => {
8903
8966
  setDropping(null);
8904
8967
  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: () => {
8968
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Pencil, { "aria-hidden": true }) }),
8969
+ host.deleteComment && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-tone": "red", "aria-label": t.delete, title: t.delete, onClick: () => {
8907
8970
  setEditing(null);
8908
8971
  setDropping(c.id);
8909
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Trash2, { "aria-hidden": true }) })
8972
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Trash2, { "aria-hidden": true }) })
8910
8973
  ] })
8911
8974
  ] });
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)(
8975
+ 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: [
8976
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8914
8977
  "textarea",
8915
8978
  {
8916
8979
  autoFocus: true,
@@ -8922,33 +8985,33 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8922
8985
  }
8923
8986
  }
8924
8987
  ),
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 }),
8988
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
8989
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setEditing(null), children: t.cancel }),
8990
+ /* @__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: [
8991
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Save, { "aria-hidden": true }),
8929
8992
  t.save
8930
8993
  ] })
8931
8994
  ] })
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 }),
8995
+ ] }) : 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: [
8996
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: c.replyTo || !all.some((r) => r.replyTo === c.id) ? t.deleteAsk : t.deleteThread }),
8997
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
8998
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", autoFocus: true, onClick: () => setDropping(null), children: t.cancel }),
8999
+ /* @__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: [
9000
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Trash2, { "aria-hidden": true }),
8938
9001
  t.delete
8939
9002
  ] })
8940
9003
  ] })
8941
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: c.body });
9004
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: c.body });
8942
9005
  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: () => {
9006
+ const swatches = (list, current, set, none) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-swatches", role: "group", children: [
9007
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-text-none", onClick: () => {
8945
9008
  set(null);
8946
9009
  setPop(null);
8947
9010
  }, children: none }),
8948
- list.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": c, "aria-pressed": current === c, onClick: () => {
9011
+ list.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "aria-label": c, "aria-pressed": current === c, onClick: () => {
8949
9012
  set(c);
8950
9013
  setPop(null);
8951
- }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("i", { style: { background: c } }) }, i))
9014
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { style: { background: c } }) }, i))
8952
9015
  ] });
8953
9016
  const mod = /Mac|iPhone|iPad/.test(navigator.platform) ? "\u2318" : "Ctrl+";
8954
9017
  const item = (label, run3, more2 = {}) => ({ label, run: run3, ...more2 });
@@ -8957,7 +9020,7 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
8957
9020
  editor.chain().focus().insertContentAt(at2, { type: "toc", attrs: { entries: JSON.stringify(entries(editor.state.doc, !docx2, at2 - 1)) } }).run();
8958
9021
  };
8959
9022
  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"]];
9023
+ 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
9024
  const lines2 = [[1, t.single], [1.15, "1.15"], [1.5, "1.5"], [2, t.double]];
8962
9025
  const menus = [
8963
9026
  ["file", t.menuFile, [
@@ -9074,17 +9137,17 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9074
9137
  item(t.deleteColumn, () => editor.chain().focus().deleteColumn().run())
9075
9138
  ] : []
9076
9139
  ];
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: () => {
9140
+ 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
9141
  setPop(null);
9079
9142
  x.run();
9080
9143
  }, 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 })
9144
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9145
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: x.label }),
9146
+ x.keys && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("kbd", { children: x.keys })
9084
9147
  ] }, 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) })
9148
+ const menu = ([key2, label, list]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9149
+ /* @__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 }),
9150
+ 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
9151
  ] }, key2);
9089
9152
  const seek = (next) => {
9090
9153
  editor.view.dispatch(editor.state.tr.setMeta(searching, next));
@@ -9096,11 +9159,11 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9096
9159
  }
9097
9160
  };
9098
9161
  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)(
9162
+ const finder = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9163
+ /* @__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 }) }),
9164
+ pop === "find" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-find", role: "search", "aria-label": t.findReplace, children: [
9165
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9166
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9104
9167
  "input",
9105
9168
  {
9106
9169
  autoFocus: true,
@@ -9120,27 +9183,27 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9120
9183
  }
9121
9184
  }
9122
9185
  ),
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 }) })
9186
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-find-end", children: [
9187
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { "aria-live": "polite", children: query ? found?.hits.length ? `${(found.at ?? 0) + 1} / ${found.hits.length}` : t.noHits : "" }),
9188
+ /* @__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 }) }),
9189
+ /* @__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
9190
  ] })
9128
9191
  ] }),
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: () => {
9192
+ can.edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9193
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { value: swap, placeholder: t.replaceWith, "aria-label": t.replaceWith, onChange: (e) => setSwap(e.target.value) }),
9194
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-find-end", children: [
9195
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", disabled: !found?.hits.length, onClick: () => {
9133
9196
  replace(editor, swap, false);
9134
9197
  seek({});
9135
9198
  }, children: t.replaceOne }),
9136
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-docs-action", disabled: !found?.hits.length, onClick: () => {
9199
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-action", disabled: !found?.hits.length, onClick: () => {
9137
9200
  replace(editor, swap, true);
9138
9201
  seek({});
9139
9202
  }, children: t.replaceAll })
9140
9203
  ] })
9141
9204
  ] }),
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) => {
9205
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-check", children: [
9206
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", checked: matchCase, onChange: (e) => {
9144
9207
  setMatchCase(e.target.checked);
9145
9208
  seek({ matchCase: e.target.checked, at: 0 });
9146
9209
  } }),
@@ -9165,47 +9228,47 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9165
9228
  spacing(editor, { line: paint2.block.line, after: paint2.block.after });
9166
9229
  if (!paint2.keep) setPaint(null);
9167
9230
  };
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 })
9231
+ const fontPicker = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9232
+ /* @__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: [
9233
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontFamily: state.font ?? void 0 }, children: state.font ?? t.defaultFont }),
9234
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9172
9235
  ] }),
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: () => {
9236
+ pop === "font" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.font, children: [
9237
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": !state.font, onClick: () => {
9175
9238
  editor.chain().focus().unsetFontFamily().run();
9176
9239
  setPop(null);
9177
9240
  }, 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: () => {
9241
+ faces.map((f) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": state.font === f, style: { fontFamily: f }, onClick: () => {
9179
9242
  editor.chain().focus().setFontFamily(f).run();
9180
9243
  setPop(null);
9181
9244
  }, children: f }, f))
9182
9245
  ] })
9183
9246
  ] });
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: [
9247
+ const sizePicker = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9248
+ /* @__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
9249
  state.size ? parseFloat(state.size) : t.defaultFont,
9187
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true })
9250
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9188
9251
  ] }),
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: () => {
9252
+ pop === "size" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.fontSize, children: [
9253
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": !state.size, onClick: () => {
9191
9254
  editor.chain().focus().unsetFontSize().run();
9192
9255
  setPop(null);
9193
9256
  }, 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: () => {
9257
+ 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
9258
  editor.chain().focus().setFontSize(`${n}pt`).run();
9196
9259
  setPop(null);
9197
9260
  }, children: n }, n))
9198
9261
  ] })
9199
9262
  ] });
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: () => {
9263
+ const spacer = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9264
+ /* @__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 }) }),
9265
+ pop === "spacing" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.lineSpacing, children: [
9266
+ lines2.map(([v, label]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": state.line === v, onClick: () => {
9204
9267
  spacing(editor, { line: v });
9205
9268
  setPop(null);
9206
9269
  }, 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: () => {
9270
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", {}),
9271
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": false, onClick: () => {
9209
9272
  spacing(editor, { after: state.after === 0 ? 8 : 0 });
9210
9273
  setPop(null);
9211
9274
  }, children: state.after === 0 ? t.spaceAfter : t.noSpaceAfter })
@@ -9228,18 +9291,18 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9228
9291
  setDraft2(null);
9229
9292
  };
9230
9293
  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: [
9294
+ const zoomer = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9295
+ /* @__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
9296
  percent,
9234
9297
  "%",
9235
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true })
9298
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9236
9299
  ] }),
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: () => {
9300
+ pop === "zoom" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-styles", role: "listbox", "aria-label": t.zoom, children: [
9301
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", role: "option", "aria-selected": zoom === null, onClick: () => {
9239
9302
  setZoom(null);
9240
9303
  setPop(null);
9241
9304
  }, children: t.fitWidth }),
9242
- zooms.map((z) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", role: "option", "aria-selected": zoom === z, onClick: () => {
9305
+ zooms.map((z) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", role: "option", "aria-selected": zoom === z, onClick: () => {
9243
9306
  setZoom(z);
9244
9307
  setPop(null);
9245
9308
  }, children: [
@@ -9248,10 +9311,10 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9248
9311
  ] }, z))
9249
9312
  ] })
9250
9313
  ] });
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, () => {
9314
+ const Aligned = aligns.find(([, , value3]) => value3 === state.align)?.[0] ?? import_lucide_react6.AlignLeft;
9315
+ const aligner = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9316
+ /* @__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 }) }),
9317
+ 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
9318
  align2(editor, value3);
9256
9319
  setPop(null);
9257
9320
  }, state.align === value3) }, i)) }) })
@@ -9260,13 +9323,13 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9260
9323
  localStorage.setItem("w100n-docs-more", more ? "" : "1");
9261
9324
  setMore(!more);
9262
9325
  };
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: [
9326
+ const main = can.edit ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9327
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9328
+ /* @__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
9329
  styles2.find(([key2]) => key2 === state.style)?.[1] ?? t.normal,
9267
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true })
9330
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronDown, { "aria-hidden": true })
9268
9331
  ] }),
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)(
9332
+ 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
9333
  "button",
9271
9334
  {
9272
9335
  type: "button",
@@ -9283,52 +9346,58 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9283
9346
  )) })
9284
9347
  ] }),
9285
9348
  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" } })
9349
+ tool(import_lucide_react6.Bold, t.bold, () => editor.chain().focus().toggleBold().run(), state.bold),
9350
+ tool(import_lucide_react6.Italic, t.italic, () => editor.chain().focus().toggleItalic().run(), state.italic),
9351
+ 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),
9352
+ !docx2 && tool(import_lucide_react6.Code, t.code, () => editor.chain().focus().toggleCode().run(), state.code),
9353
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9354
+ /* @__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: [
9355
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Baseline, { "aria-hidden": true }),
9356
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { className: "w100n-text-bar", style: { background: state.color ?? "currentColor" } })
9294
9357
  ] }),
9295
- pop === "color" && swatches(inks, state.color, (c) => c ? editor.chain().focus().setColor(c).run() : editor.chain().focus().unsetColor().run(), t.automatic)
9358
+ 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) => {
9359
+ editor.chain().focus().setColor(c).run();
9360
+ setPop(null);
9361
+ }, onNone: () => {
9362
+ editor.chain().focus().unsetColor().run();
9363
+ setPop(null);
9364
+ } }) })
9296
9365
  ] }),
9297
9366
  gap,
9298
9367
  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),
9368
+ tool(import_lucide_react6.List, t.bullets, () => editor.chain().focus().toggleBulletList().run(), state.bullets),
9369
+ tool(import_lucide_react6.ListOrdered, t.numbers, () => editor.chain().focus().toggleOrderedList().run(), state.numbers),
9370
+ !docx2 && tool(import_lucide_react6.ListChecks, t.tasks, () => editor.chain().focus().toggleTaskList().run(), state.tasks),
9302
9371
  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) => {
9372
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9373
+ /* @__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 }) }),
9374
+ pop === "link" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-form", children: [
9375
+ /* @__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
9376
  if (e.key === "Enter") putLink();
9308
9377
  } }),
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: () => {
9378
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9379
+ state.link && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
9311
9380
  editor.chain().focus().extendMarkRange("link").unsetLink().run();
9312
9381
  setPop(null);
9313
9382
  }, children: [
9314
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Link2Off, { "aria-hidden": true }),
9383
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Link2Off, { "aria-hidden": true }),
9315
9384
  t.unlink
9316
9385
  ] }),
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 }),
9386
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !href.trim(), onClick: putLink, children: [
9387
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Link, { "aria-hidden": true }),
9319
9388
  t.apply
9320
9389
  ] })
9321
9390
  ] })
9322
9391
  ] })
9323
9392
  ] }),
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: () => {
9393
+ can.comment && tool(import_lucide_react6.MessageSquarePlus, t.addComment, begin, void 0, state.empty),
9394
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9395
+ /* @__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
9396
  setHref("");
9328
9397
  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)(
9398
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ImagePlus, { "aria-hidden": true }) }),
9399
+ pop === "image" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-pop w100n-text-form", children: [
9400
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9332
9401
  "input",
9333
9402
  {
9334
9403
  autoFocus: true,
@@ -9344,10 +9413,10 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9344
9413
  }
9345
9414
  }
9346
9415
  ),
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: [
9416
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-docs-row", children: [
9417
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-pdf-link", children: [
9349
9418
  t.chooseFile,
9350
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "file", accept: "image/png,image/jpeg,image/gif", hidden: true, onChange: (e) => {
9419
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "file", accept: "image/png,image/jpeg,image/gif", hidden: true, onChange: (e) => {
9351
9420
  const file2 = e.target.files?.[0];
9352
9421
  if (!file2) return;
9353
9422
  const reader = new FileReader();
@@ -9358,23 +9427,23 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9358
9427
  reader.readAsDataURL(file2);
9359
9428
  } })
9360
9429
  ] }),
9361
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !href.trim(), onClick: () => {
9430
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !href.trim(), onClick: () => {
9362
9431
  editor.chain().focus().setImage({ src: href.trim() }).run();
9363
9432
  setPop(null);
9364
9433
  }, children: [
9365
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ImagePlus, { "aria-hidden": true }),
9434
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ImagePlus, { "aria-hidden": true }),
9366
9435
  t.put
9367
9436
  ] })
9368
9437
  ] })
9369
9438
  ] })
9370
9439
  ] }),
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) => {
9440
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9441
+ /* @__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 }) }),
9442
+ 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: [
9443
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: Array.from({ length: 48 }, (_, i) => {
9375
9444
  const rows2 = Math.floor(i / 8) + 1;
9376
9445
  const cols = i % 8 + 1;
9377
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9446
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9378
9447
  "button",
9379
9448
  {
9380
9449
  type: "button",
@@ -9389,89 +9458,95 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9389
9458
  i
9390
9459
  );
9391
9460
  }) }),
9392
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { children: grid3.rows ? `${grid3.rows} \xD7 ${grid3.cols}` : t.table })
9461
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: grid3.rows ? `${grid3.rows} \xD7 ${grid3.cols}` : t.table })
9393
9462
  ] })
9394
9463
  ] }),
9395
9464
  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 }),
9465
+ /* @__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 }) })
9466
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9467
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-word", onClick: () => onPanel?.("outline"), children: [
9468
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ListTree, { "aria-hidden": true }),
9400
9469
  t.outline
9401
9470
  ] }),
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 }),
9471
+ can.comment && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9472
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-grow" }),
9473
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: state.empty, onClick: begin, children: [
9474
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessageSquarePlus, { "aria-hidden": true }),
9406
9475
  t.addComment
9407
9476
  ] })
9408
9477
  ] }),
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 }),
9478
+ !!host?.comments && (can.comment || open.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-text-word", onClick: () => onPanel?.("comments"), children: [
9479
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessagesSquare, { "aria-hidden": true }),
9411
9480
  t.comments,
9412
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { children: open.length })
9481
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: open.length })
9413
9482
  ] })
9414
9483
  ] });
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: [
9484
+ const extra = can.edit && more && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9485
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9417
9486
  fontPicker,
9418
9487
  sizePicker,
9419
9488
  gap
9420
9489
  ] }),
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 }) }),
9490
+ docx2 && tool(import_lucide_react6.Strikethrough, t.strike, () => editor.chain().focus().toggleStrike().run(), state.strike),
9491
+ docx2 && tool(import_lucide_react6.Superscript, t.superscript, () => editor.chain().focus().toggleMark("superscript").run(), state.sup),
9492
+ docx2 && tool(import_lucide_react6.Subscript, t.subscript, () => editor.chain().focus().toggleMark("subscript").run(), state.sub),
9493
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9494
+ /* @__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
9495
  pop === "mark" && swatches(glows, null, (c) => c ? editor.chain().focus().setHighlight({ color: c }).run() : editor.chain().focus().unsetHighlight().run(), t.noColour)
9427
9496
  ] }),
9428
- docx2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
9497
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9429
9498
  gap,
9430
9499
  spacer
9431
9500
  ] }),
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),
9501
+ tool(import_lucide_react6.ListIndentDecrease, t.outdent, () => indent(editor, -1)),
9502
+ tool(import_lucide_react6.ListIndentIncrease, t.indent, () => indent(editor, 1)),
9503
+ docx2 && tool(import_lucide_react6.ListChecks, t.tasks, () => editor.chain().focus().toggleTaskList().run(), state.tasks),
9435
9504
  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: [
9505
+ /* @__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 }) }),
9506
+ tool(import_lucide_react6.RemoveFormatting, t.clearFormat, () => clear(editor)),
9507
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9439
9508
  gap,
9440
- tool(import_lucide_react5.FilePenLine, t.suggest, suggest2, state.suggest)
9509
+ tool(import_lucide_react6.FilePenLine, t.suggest, suggest2, state.suggest)
9441
9510
  ] })
9442
9511
  ] });
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" } })
9512
+ const context = can.edit && (state.table ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9513
+ tool(import_lucide_react6.BetweenHorizontalStart, t.rowAbove, () => editor.chain().focus().addRowBefore().run()),
9514
+ tool(import_lucide_react6.BetweenHorizontalEnd, t.rowBelow, () => editor.chain().focus().addRowAfter().run()),
9515
+ tool(import_lucide_react6.BetweenVerticalStart, t.columnLeft, () => editor.chain().focus().addColumnBefore().run()),
9516
+ tool(import_lucide_react6.BetweenVerticalEnd, t.columnRight, () => editor.chain().focus().addColumnAfter().run()),
9517
+ tool(import_lucide_react6.PanelTop, t.headerRow, () => editor.chain().focus().toggleHeaderRow().run()),
9518
+ docx2 && tool(import_lucide_react6.TableCellsMerge, t.mergeCells, () => editor.chain().focus().mergeOrSplit().run()),
9519
+ docx2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-anchor", children: [
9520
+ /* @__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: [
9521
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.PaintBucket, { "aria-hidden": true }),
9522
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { className: "w100n-text-bar", style: { background: state.fill ?? "transparent" } })
9454
9523
  ] }),
9455
- pop === "fill" && swatches(glows, state.fill, (c) => editor.chain().focus().setCellAttribute("background", c).run(), t.noColour)
9524
+ 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) => {
9525
+ editor.chain().focus().setCellAttribute("background", c).run();
9526
+ setPop(null);
9527
+ }, onNone: () => {
9528
+ editor.chain().focus().setCellAttribute("background", null).run();
9529
+ setPop(null);
9530
+ } }) })
9456
9531
  ] }),
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 }),
9532
+ docx2 && tool(import_lucide_react6.Grid3x3, t.tableBorders, () => editor.chain().focus().updateAttributes("table", { borders: state.bare ? null : "none" }).run(), !state.bare),
9533
+ tool(import_lucide_react6.TableRowsSplit, t.deleteRow, () => editor.chain().focus().deleteRow().run()),
9534
+ tool(import_lucide_react6.TableColumnsSplit, t.deleteColumn, () => editor.chain().focus().deleteColumn().run()),
9535
+ tool(import_lucide_react6.Trash2, t.deleteTable, () => editor.chain().focus().deleteTable().run())
9536
+ ] }) : 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)) }));
9537
+ const status = (can.edit || live) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-end", children: [
9538
+ 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: [
9539
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.WifiOff, { "aria-hidden": true }),
9465
9540
  live.denied ? t.liveOff : t.offline
9466
9541
  ] }),
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 })
9542
+ state.suggest && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-badge", children: t.suggesting }),
9543
+ 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: [
9544
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.CloudAlert, { "aria-hidden": true }),
9545
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t.saveFailed })
9471
9546
  ] }),
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)) })
9547
+ 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
9548
  ] });
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) });
9549
+ 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
9550
  const keep = (e) => {
9476
9551
  if (e.target.closest("button")) e.preventDefault();
9477
9552
  };
@@ -9509,15 +9584,15 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9509
9584
  if (note) return wiki.open(note.id);
9510
9585
  if (wiki.create) void wiki.create(wikiName(target)).then((id) => id && wiki.open(id));
9511
9586
  };
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: [
9587
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { ref: root, className: "w100n-text", "data-kind": kind, "data-docs-find": true, onKeyDown: keys2, children: [
9588
+ head2 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9589
+ 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),
9590
+ 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)
9591
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-ribbon w100n-text-top", onKeyDown: rove, onPointerDown: keep, children: [
9517
9592
  menubar,
9518
9593
  status
9519
9594
  ] }),
9520
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref: scroller, className: "w100n-text-scroll", "data-paint": !!paint2, onMouseUp: lay, onPointerDown: (e) => {
9595
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: scroller, className: "w100n-text-scroll", "data-paint": !!paint2, onMouseUp: lay, onPointerDown: (e) => {
9521
9596
  touch.current = e.pointerType === "touch";
9522
9597
  }, onContextMenu: (e) => {
9523
9598
  if (touch.current || e.shiftKey || pop === "context" || !e.target.closest(".ProseMirror")) return setPop(null);
@@ -9542,8 +9617,8 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9542
9617
  if (!id) return;
9543
9618
  setActive(id);
9544
9619
  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)(
9620
+ }, 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 }) }) }) }),
9621
+ askSpot && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
9547
9622
  "span",
9548
9623
  {
9549
9624
  className: "w100n-text-pop w100n-text-menu w100n-wiki-ask",
@@ -9552,61 +9627,61 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9552
9627
  style: { left: Math.min(askSpot.left, innerWidth - 340), top: askSpot.bottom + 6 },
9553
9628
  onPointerDown: (e) => e.preventDefault(),
9554
9629
  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 })
9630
+ 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: [
9631
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.FileText, { "aria-hidden": true }),
9632
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: option.note.name.replace(/\.(md|markdown)$/i, "") }),
9633
+ option.note.folder && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: option.note.folder })
9634
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9635
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Plus, { "aria-hidden": true }),
9636
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: t.wikiCreate.replace("{name}", option.make) }),
9637
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: t.wikiNew })
9563
9638
  ] }) }, "note" in option ? option.note.id : "make")),
9564
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { className: "w100n-text-hint", children: t.wikiKeys })
9639
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { className: "w100n-text-hint", children: t.wikiKeys })
9565
9640
  ]
9566
9641
  }
9567
9642
  ),
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: [
9643
+ 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
9644
  rows(near),
9570
- spell && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { className: "w100n-text-hint", children: t.spellHint })
9645
+ spell && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { className: "w100n-text-hint", children: t.spellHint })
9571
9646
  ] }),
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)),
9647
+ /* @__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: [
9648
+ tool(import_lucide_react6.Minus, t.zoomOut, () => zoomBy(-10)),
9574
9649
  zoomer,
9575
- tool(import_lucide_react5.Plus, t.zoomIn, () => zoomBy(10))
9650
+ tool(import_lucide_react6.Plus, t.zoomIn, () => zoomBy(10))
9576
9651
  ] }) }),
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 })
9652
+ /* @__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: [
9653
+ context && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": state.table ? t.table : t.image, children: context }),
9654
+ extra && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.moreTools, children: extra }),
9655
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-text-tools", role: "group", "aria-label": t.textTools, children: main })
9581
9656
  ] }),
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),
9657
+ /* @__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: [
9658
+ can.edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9659
+ tool(import_lucide_react6.Undo2, t.undo, () => editor.chain().focus().undo().run(), void 0, !state.undo),
9660
+ tool(import_lucide_react6.Redo2, t.redo, () => editor.chain().focus().redo().run(), void 0, !state.redo),
9586
9661
  gap
9587
9662
  ] }),
9588
9663
  finder
9589
9664
  ] }) }),
9590
- dialog && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9665
+ dialog && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9591
9666
  if (e.key === "Escape") {
9592
9667
  e.stopPropagation();
9593
9668
  setDialog(null);
9594
9669
  }
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 }) })
9670
+ }, 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: [
9671
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9672
+ /* @__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 }) }),
9673
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.symbols }),
9674
+ /* @__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
9675
  ] }),
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 }) })
9676
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
9677
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Search, { "aria-hidden": true }),
9678
+ /* @__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
9679
  ] }),
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: () => {
9680
+ /* @__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
9681
  editor.chain().focus().insertContent(ch).run();
9607
9682
  setDialog(null);
9608
9683
  }, 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) => {
9684
+ ] }) : 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
9685
  e.preventDefault();
9611
9686
  const latex = dialog.latex.trim();
9612
9687
  if (!latex) return;
@@ -9617,13 +9692,13 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9617
9692
  else editor.chain().focus().insertContent({ type: "math", attrs: { latex } }).run();
9618
9693
  setDialog(null);
9619
9694
  }, 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 }) })
9695
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9696
+ /* @__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 }) }),
9697
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.formula }),
9698
+ /* @__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
9699
  ] }),
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: () => {
9700
+ /* @__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 }) }),
9701
+ /* @__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
9702
  const el = field.current;
9628
9703
  const at2 = el.selectionStart ?? dialog.latex.length;
9629
9704
  const latex = dialog.latex.slice(0, at2) + code + dialog.latex.slice(el.selectionEnd ?? at2);
@@ -9634,15 +9709,15 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9634
9709
  el.setSelectionRange(caret, caret);
9635
9710
  });
9636
9711
  }, 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 }),
9712
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-insert-preview", "aria-live": "polite", dangerouslySetInnerHTML: { __html: dialog.latex.trim() ? mathml(dialog.latex) : "" } }),
9713
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9714
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDialog(null), children: t.cancel }),
9715
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !dialog.latex.trim(), children: [
9716
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9642
9717
  dialog.at !== null ? t.update : t.put
9643
9718
  ] })
9644
9719
  ] })
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) => {
9720
+ ] }) : /* @__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
9721
  e.preventDefault();
9647
9722
  const text = dialog.text.trim();
9648
9723
  if (!text) return;
@@ -9659,12 +9734,12 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9659
9734
  }
9660
9735
  setDialog(null);
9661
9736
  }, 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 }) })
9737
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9738
+ /* @__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 }) }),
9739
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.footnote }),
9740
+ /* @__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
9741
  ] }),
9667
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9742
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9668
9743
  "textarea",
9669
9744
  {
9670
9745
  autoFocus: true,
@@ -9678,40 +9753,40 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9678
9753
  }
9679
9754
  }
9680
9755
  ),
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: () => {
9756
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9757
+ dialog.at !== null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
9683
9758
  editor.chain().focus().deleteRange({ from: dialog.at, to: dialog.at + 1 }).run();
9684
9759
  setDialog(null);
9685
9760
  }, 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 }),
9761
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDialog(null), children: t.cancel }),
9762
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !dialog.text.trim(), children: [
9763
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9689
9764
  dialog.at !== null ? t.update : t.put
9690
9765
  ] })
9691
9766
  ] })
9692
9767
  ] }) }),
9693
- draft2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9768
+ draft2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
9694
9769
  if (e.key === "Escape") {
9695
9770
  e.stopPropagation();
9696
9771
  setDraft2(null);
9697
9772
  }
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) => {
9773
+ }, 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
9774
  e.preventDefault();
9700
9775
  applySetup();
9701
9776
  }, 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 }) })
9777
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-new-head", children: [
9778
+ /* @__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 }) }),
9779
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { className: "w100n-pdf-dialog-title", children: t.pageSetup }),
9780
+ /* @__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
9781
  ] }),
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]) => {
9782
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-caption", children: t.pageSize }),
9783
+ /* @__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
9784
  const land = draft2.width > draft2.height;
9710
9785
  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);
9786
+ 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
9787
  }) }),
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)(
9788
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-caption", children: t.orientation }),
9789
+ /* @__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
9790
  "button",
9716
9791
  {
9717
9792
  type: "button",
@@ -9723,11 +9798,11 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9723
9798
  },
9724
9799
  label
9725
9800
  )) }),
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)(
9801
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-caption", children: t.marginsCm }),
9802
+ /* @__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)) }),
9803
+ /* @__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: [
9804
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label }),
9805
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
9731
9806
  "input",
9732
9807
  {
9733
9808
  className: "w100n-docs-field",
@@ -9740,111 +9815,111 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9740
9815
  }
9741
9816
  )
9742
9817
  ] }, 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 }) })
9818
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-line", children: [
9819
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t.headerText }),
9820
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { className: "w100n-docs-field", value: draft2.header, onChange: (e) => setDraft2({ ...draft2, header: e.target.value }) })
9746
9821
  ] }),
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 }) })
9822
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-line", children: [
9823
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t.footerText }),
9824
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { className: "w100n-docs-field", value: draft2.footer, onChange: (e) => setDraft2({ ...draft2, footer: e.target.value }) })
9750
9825
  ] }),
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 }) }),
9826
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-check", children: [
9827
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", checked: draft2.numbers, onChange: (e) => setDraft2({ ...draft2, numbers: e.target.checked }) }),
9753
9828
  t.pageNumbers
9754
9829
  ] }),
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 }),
9830
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-pdf-dialog-end", children: [
9831
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setDraft2(null), children: t.cancel }),
9832
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: applySetup, children: [
9833
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9759
9834
  t.apply
9760
9835
  ] })
9761
9836
  ] })
9762
9837
  ] }) }),
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 }) }),
9838
+ slot && (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-notes", children: [
9839
+ draft && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-card w100n-text-draft", children: [
9840
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("blockquote", { children: draft.quote }),
9841
+ /* @__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() }),
9842
+ tagged(draft.body, people).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "w100n-setup-check", children: [
9843
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", checked: draft.give, onChange: (e) => setDraft({ ...draft, give: e.target.checked }) }),
9769
9844
  t.assignTo.replace("{name}", tagged(draft.body, people)[0].name)
9770
9845
  ] }),
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 }),
9846
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9847
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: drop2, children: t.cancel }),
9848
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !draft.body.trim() || posting === "busy", onClick: () => void post(), children: [
9849
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessageSquarePlus, { "aria-hidden": true }),
9775
9850
  t.post
9776
9851
  ] })
9777
9852
  ] })
9778
9853
  ] }),
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 }),
9854
+ suggested.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
9855
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "w100n-docs-caption", children: [
9856
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.FilePenLine, { "aria-hidden": true }),
9782
9857
  t.suggestions,
9783
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: suggested.length })
9858
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: suggested.length })
9784
9859
  ] }),
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) })
9860
+ 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: [
9861
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { children: [
9862
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: (c.author || "?").slice(0, 1).toUpperCase() }),
9863
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-who", children: [
9864
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: c.author || t.someone }),
9865
+ c.date && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: when(c.date) })
9791
9866
  ] })
9792
9867
  ] }),
9793
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { children: [
9868
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { children: [
9794
9869
  c.kind === "insertion" ? t.added : t.removed,
9795
9870
  " ",
9796
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("q", { children: c.text })
9871
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("q", { children: c.text })
9797
9872
  ] }),
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 }),
9873
+ can.edit && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-actions", onClick: (e) => e.stopPropagation(), children: [
9874
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", onClick: () => decide(editor, true, c.id), children: [
9875
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Check, { "aria-hidden": true }),
9801
9876
  t.accept
9802
9877
  ] }),
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 }),
9878
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => decide(editor, false, c.id), children: [
9879
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.X, { "aria-hidden": true }),
9805
9880
  t.reject
9806
9881
  ] })
9807
9882
  ] })
9808
9883
  ] }, i))
9809
9884
  ] }),
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 }),
9885
+ posting === "failed" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.commentFailed }),
9886
+ failed && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.changeFailed }),
9887
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-docs-row", children: [
9888
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "w100n-docs-caption", children: [
9889
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.MessagesSquare, { "aria-hidden": true }),
9815
9890
  t.comments,
9816
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: open.length })
9891
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: open.length })
9817
9892
  ] }),
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 }) })
9893
+ /* @__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
9894
  ] }),
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: [
9895
+ !threads.length && !draft && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "w100n-docs-muted", children: can.comment ? t.commentHint : t.noComments }),
9896
+ 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
9897
  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 }),
9898
+ 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) }),
9899
+ c.quote && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("blockquote", { children: c.quote }),
9825
9900
  words3(c),
9826
- all.filter((r) => r.replyTo === c.id).map((r) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w100n-text-reply", children: [
9901
+ all.filter((r) => r.replyTo === c.id).map((r) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-reply", children: [
9827
9902
  person(r),
9828
9903
  words3(r)
9829
9904
  ] }, 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 }),
9905
+ reply?.id === c.id && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w100n-text-reply", onClick: (e) => e.stopPropagation(), children: [
9906
+ /* @__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) }),
9907
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
9908
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setReply(null), children: t.cancel }),
9909
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !reply.body.trim() || posting === "busy", onClick: () => void answer(c), children: [
9910
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Reply, { "aria-hidden": true }),
9836
9911
  t.reply
9837
9912
  ] })
9838
9913
  ] })
9839
9914
  ] }),
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 }),
9915
+ can.comment && reply?.id !== c.id && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "w100n-text-actions", onClick: (e) => e.stopPropagation(), children: [
9916
+ c.resolved && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-docs-badge", children: t.resolved }),
9917
+ !c.resolved && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: () => setReply({ id: c.id, body: "" }), children: [
9918
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Reply, { "aria-hidden": true }),
9844
9919
  t.reply
9845
9920
  ] }),
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 }),
9921
+ host?.resolveComment && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", onClick: () => void settle2(c), children: [
9922
+ 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
9923
  c.resolved ? t.reopen : t.resolve
9849
9924
  ] })
9850
9925
  ] })
@@ -9852,12 +9927,12 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
9852
9927
  ] }), slot)
9853
9928
  ] });
9854
9929
  }
9855
- var import_react10, import_lucide_react5, import_react11, import_react_dom2, import_jsx_runtime7, legal, symbols, helpers, cm, inks, glows, faces, sizes, uid2;
9930
+ var import_react10, import_lucide_react6, import_react11, import_react_dom2, import_jsx_runtime8, legal, symbols, helpers, cm, glows, faces, sizes, uid2;
9856
9931
  var init_TextEditor = __esm({
9857
9932
  "src/editor/TextEditor.tsx"() {
9858
9933
  "use strict";
9859
9934
  import_react10 = require("@tiptap/react");
9860
- import_lucide_react5 = require("lucide-react");
9935
+ import_lucide_react6 = require("lucide-react");
9861
9936
  import_react11 = require("react");
9862
9937
  import_react_dom2 = require("react-dom");
9863
9938
  init_docx();
@@ -9871,7 +9946,8 @@ var init_TextEditor = __esm({
9871
9946
  init_math();
9872
9947
  init_Mentions();
9873
9948
  init_pager();
9874
- import_jsx_runtime7 = require("react/jsx-runtime");
9949
+ init_Swatches();
9950
+ import_jsx_runtime8 = require("react/jsx-runtime");
9875
9951
  legal = { width: 816, height: 1344 };
9876
9952
  symbols = [
9877
9953
  ["\xA9", "copyright"],
@@ -9927,7 +10003,6 @@ var init_TextEditor = __esm({
9927
10003
  ];
9928
10004
  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
10005
  cm = (px2) => Math.round(px2 / 96 * 254) / 100;
9930
- inks = ["#0f172a", "#475569", "#dc2626", "#ea580c", "#ca8a04", "#16a34a", "#0891b2", "#2563eb", "#7c3aed", "#db2777"];
9931
10006
  glows = ["#fef08a", "#bbf7d0", "#bfdbfe", "#fbcfe8", "#fed7aa", "#ddd6fe"];
9932
10007
  faces = ["Arial", "Calibri", "Cambria", "Courier New", "Georgia", "Inter", "Roboto", "Times New Roman", "Verdana"];
9933
10008
  sizes = [8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48, 72];
@@ -10088,7 +10163,7 @@ function bind(api, injector, doc, model, edit) {
10088
10163
  if (canon(now) === canon(empty)) m.delete(name);
10089
10164
  else m.set(name, now);
10090
10165
  };
10091
- const fit = (list, now) => {
10166
+ const fit2 = (list, now) => {
10092
10167
  if (list.length > now.length) list.delete(now.length, list.length - now.length);
10093
10168
  else if (list.length < now.length) list.push(now.slice(list.length));
10094
10169
  };
@@ -10171,10 +10246,10 @@ function bind(api, injector, doc, model, edit) {
10171
10246
  return shift(cols, p.sourceRange.startColumn, count(p.sourceRange, false), p.targetRange.startColumn);
10172
10247
  case "sheet.mutation.set-worksheet-row-count":
10173
10248
  at2.delete(sid);
10174
- return fit(rows, l.rows);
10249
+ return fit2(rows, l.rows);
10175
10250
  case "sheet.mutation.set-worksheet-column-count":
10176
10251
  at2.delete(sid);
10177
- return fit(cols, l.cols);
10252
+ return fit2(cols, l.cols);
10178
10253
  case "sheet.mutation.set-worksheet-row-height":
10179
10254
  case "sheet.mutation.set-worksheet-row-is-auto-height":
10180
10255
  case "sheet.mutation.set-row-hidden":
@@ -10460,6 +10535,7 @@ var init_calm = __esm({
10460
10535
  var grid_exports = {};
10461
10536
  __export(grid_exports, {
10462
10537
  bolder: () => bolder,
10538
+ fit: () => fit,
10463
10539
  grid: () => grid2,
10464
10540
  marks: () => marks
10465
10541
  });
@@ -10478,7 +10554,7 @@ function grid2(container, language, edit) {
10478
10554
  toolbar: false,
10479
10555
  formulaBar: true,
10480
10556
  contextMenu: true,
10481
- disableAutoFocus: true,
10557
+ disableAutoFocus: matchMedia("(pointer: coarse)").matches,
10482
10558
  footer: { sheetBar: true, statisticBar: true, menus: edit, zoomSlider: true, addSheetButtonConfig: { show: edit } },
10483
10559
  formula: { initialFormulaComputing: import_preset_sheets_core.CalculationMode.WHEN_EMPTY }
10484
10560
  }),
@@ -10490,6 +10566,29 @@ function grid2(container, language, edit) {
10490
10566
  ]
10491
10567
  });
10492
10568
  }
10569
+ function fit(injector, unitId) {
10570
+ const book = injector.get(import_core6.IUniverInstanceService).getUnit(unitId);
10571
+ const skeletons = injector.get(import_preset_sheets_core.IRenderManagerService).getRenderUnitById(unitId)?.with(import_preset_sheets_core.SheetSkeletonManagerService);
10572
+ if (!book || !skeletons) return;
10573
+ const commands = injector.get(import_core6.ICommandService);
10574
+ for (const sheet2 of book.getSheets()) {
10575
+ const rows = /* @__PURE__ */ new Set();
10576
+ sheet2.getCellMatrix().forValue((r, _, cell2) => {
10577
+ if (book.getStyles().getStyleByCell(cell2)?.tb === import_core6.WrapStrategy.WRAP) rows.add(r);
10578
+ });
10579
+ if (!rows.size) continue;
10580
+ const subUnitId = sheet2.getSheetId(), last2 = sheet2.getMaxColumns() - 1, all = [...rows];
10581
+ const line = (r) => ({ startRow: r, endRow: r, startColumn: 0, endColumn: last2 });
10582
+ const was = Object.fromEntries(all.map((r) => [r, sheet2.getConfig().rowData[r]?.ia ?? null]));
10583
+ const stored2 = Object.fromEntries(all.map((r) => [r, sheet2.getRowHeight(r)]));
10584
+ const auto = (list, info) => commands.syncExecuteCommand(import_preset_sheets_core.SetWorksheetRowIsAutoHeightMutation.id, { unitId, subUnitId, ranges: list.map(line), autoHeightInfo: info }, { onlyLocal: true });
10585
+ auto(all, 1);
10586
+ const grow2 = (skeletons.ensureSkeleton(subUnitId)?.calculateAutoHeightInRange(all.map(line)) ?? []).filter((x) => (x.autoHeight ?? 0) > stored2[x.row]);
10587
+ const keep = all.filter((r) => !grow2.some((x) => x.row === r));
10588
+ if (keep.length) auto(keep, was);
10589
+ if (grow2.length) commands.syncExecuteCommand(import_preset_sheets_core.SetWorksheetRowAutoHeightMutation.id, { unitId, subUnitId, rowsAutoHeightInfo: grow2 }, { onlyLocal: true });
10590
+ }
10591
+ }
10493
10592
  function marks({ univer, univerAPI: api }) {
10494
10593
  const service = univer.__getInjector().get(import_preset_sheets_core.IMarkSelectionService);
10495
10594
  let list = [];
@@ -10515,7 +10614,7 @@ function marks({ univer, univerAPI: api }) {
10515
10614
  }
10516
10615
  };
10517
10616
  }
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;
10617
+ 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
10618
  var init_grid = __esm({
10520
10619
  "src/sheets/grid.ts"() {
10521
10620
  "use strict";
@@ -10526,6 +10625,7 @@ var init_grid = __esm({
10526
10625
  import_lib5 = require("@univerjs/preset-sheets-data-validation/lib/index.css");
10527
10626
  import_lib6 = require("@univerjs/preset-sheets-note/lib/index.css");
10528
10627
  import_presets = require("@univerjs/presets");
10628
+ import_core6 = require("@univerjs/core");
10529
10629
  import_preset_sheets_core = require("@univerjs/preset-sheets-core");
10530
10630
  import_preset_sheets_data_validation = require("@univerjs/preset-sheets-data-validation");
10531
10631
  import_preset_sheets_filter = require("@univerjs/preset-sheets-filter");
@@ -10561,6 +10661,7 @@ __export(SheetView_exports, {
10561
10661
  decimals: () => decimals,
10562
10662
  default: () => SheetView_default,
10563
10663
  readSheet: () => readSheet,
10664
+ sized: () => sized,
10564
10665
  writeSheet: () => writeSheet
10565
10666
  });
10566
10667
  function autoSum(r, numeric2) {
@@ -10577,7 +10678,7 @@ function autoSum(r, numeric2) {
10577
10678
  while (left > 0 && numeric2(r.startRow, left - 1)) left--;
10578
10679
  return left < r.startColumn ? [{ row: r.startRow, col: r.startColumn, f: `=SUM(${letters2(left)}${r.startRow + 1}:${letters2(r.startColumn - 1)}${r.startRow + 1})` }] : [];
10579
10680
  }
10580
- function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSaveRequest, guard, host, together, documentId = "", onSaved }) {
10681
+ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSaveRequest, guard, host, together, documentId = "", onSaved, onSpot }) {
10581
10682
  const t = sheetTexts[language];
10582
10683
  const box2 = (0, import_react12.useRef)(null);
10583
10684
  const live = (0, import_react12.useRef)(null);
@@ -10591,6 +10692,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10591
10692
  const [refusal, setRefusal] = (0, import_react12.useState)(null);
10592
10693
  const [pop, setPop] = (0, import_react12.useState)(null);
10593
10694
  const [look, setLook] = (0, import_react12.useState)(null);
10695
+ const [size2, setSize] = (0, import_react12.useState)(null);
10594
10696
  const edit = rights.edit && !!onSaveRequest && (!room || !!shared && !room.readonly);
10595
10697
  const notes3 = !edit && rights.comment && !!onSaveRequest && !room;
10596
10698
  (0, import_react12.useEffect)(() => {
@@ -10614,7 +10716,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10614
10716
  setDirty(false);
10615
10717
  const families = new Set([model.book.defaultStyle, ...Object.values(model.book.styles)].map((s) => typeof s === "object" ? s?.ff : null).filter(Boolean));
10616
10718
  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 }]) => {
10719
+ Promise.all([Promise.resolve().then(() => (init_grid(), grid_exports)), fonts]).then(([{ bolder: bolder2, fit: fit2, grid: grid3, marks: marks2 }]) => {
10618
10720
  if (gone) return;
10619
10721
  shared?.doc.off("update", change);
10620
10722
  if (shared && moved) model = extras(shared.doc, build(shared.doc));
@@ -10627,6 +10729,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10627
10729
  const unbold = bolder2(univer.__getInjector());
10628
10730
  if (model.active) wb.setActiveSheet(model.active);
10629
10731
  if (!edit) wb.setEditable(false);
10732
+ const fitting = setTimeout(() => fit2(univer.__getInjector(), wb.getId()));
10630
10733
  const state = { api: api2, model, original: bytes, changes: 0 };
10631
10734
  const untrack = track2(api2, model, { view: true, comment: notes3, edit }, () => {
10632
10735
  state.changes++;
@@ -10644,6 +10747,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10644
10747
  }
10645
10748
  let frame = 0;
10646
10749
  let last2 = "";
10750
+ let told = "";
10647
10751
  const refresh = () => {
10648
10752
  frame = 0;
10649
10753
  const range2 = api2.getActiveWorkbook()?.getActiveRange();
@@ -10654,7 +10758,12 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10654
10758
  last2 = JSON.stringify(here);
10655
10759
  people.setLocalStateField("selection", here);
10656
10760
  }
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 ?? "" });
10761
+ const spot3 = { sheet: api2.getActiveWorkbook()?.getActiveSheet().getSheetName() ?? "", range: here.range };
10762
+ if (JSON.stringify(spot3) !== told) {
10763
+ told = JSON.stringify(spot3);
10764
+ onSpot?.(spot3);
10765
+ }
10766
+ 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
10767
  };
10659
10768
  const later = () => {
10660
10769
  if (!frame) frame = requestAnimationFrame(refresh);
@@ -10670,6 +10779,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10670
10779
  selection.dispose();
10671
10780
  commands.dispose();
10672
10781
  cancelAnimationFrame(frame);
10782
+ clearTimeout(fitting);
10673
10783
  host2.hidden = true;
10674
10784
  setTimeout(() => {
10675
10785
  univer.dispose();
@@ -10763,15 +10873,15 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10763
10873
  setPop(null);
10764
10874
  }
10765
10875
  };
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: [
10876
+ 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 }) });
10877
+ const gap = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-gap" });
10878
+ const anchor = (key2, trigger, body) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-anchor", children: [
10769
10879
  trigger,
10770
- pop === key2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-sheet-pop", role: "dialog", children: body })
10880
+ pop === key2 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-pop", role: "dialog", children: body })
10771
10881
  ] });
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" } })
10882
+ 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: [
10883
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { "aria-hidden": true }),
10884
+ bar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "w100n-sheet-bar", style: { background: bar || "currentColor" } })
10775
10885
  ] });
10776
10886
  const currency = language === "pl" ? '#,##0.00 "z\u0142"' : language === "uk" ? '#,##0.00 "\u20B4"' : '"$"#,##0.00';
10777
10887
  const formats = [
@@ -10788,7 +10898,7 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10788
10898
  const sum = () => {
10789
10899
  const r = range()?.getRange();
10790
10900
  const ws = sheet2();
10791
- const numeric2 = (row2, c) => ws?.getRange(row2, c).getCellData()?.t === import_core6.CellValueType.NUMBER;
10901
+ const numeric2 = (row2, c) => ws?.getRange(row2, c).getCellData()?.t === import_core7.CellValueType.NUMBER;
10792
10902
  if (r && ws) for (const x of autoSum(r, numeric2)) ws.getRange(x.row, x.col).setValue({ f: x.f });
10793
10903
  };
10794
10904
  const shown = formats.find(([, p]) => p === look?.n)?.[0] ?? (look && look.n !== "General" ? look.n : t.general);
@@ -10803,22 +10913,18 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10803
10913
  if (rows) ws.deleteRows(r.startRow, r.endRow - r.startRow + 1);
10804
10914
  else ws.deleteColumns(r.startColumn, r.endColumn - r.startColumn + 1);
10805
10915
  };
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) => {
10916
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet", "data-theme": theme, onKeyDownCapture: keys2, children: [
10917
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet-ribbon", role: "toolbar", "aria-label": t.tools, onKeyDown: rove, onPointerDown: (e) => {
10812
10918
  if (e.target.closest("button")) e.preventDefault();
10813
10919
  }, 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()),
10920
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet-tools", children: [
10921
+ edit && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
10922
+ tool(import_lucide_react7.Undo2, t.undo, () => void api()?.undo()),
10923
+ tool(import_lucide_react7.Redo2, t.redo, () => void api()?.redo()),
10818
10924
  gap,
10819
10925
  anchor(
10820
10926
  "format",
10821
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
10927
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
10822
10928
  "button",
10823
10929
  {
10824
10930
  type: "button",
@@ -10829,12 +10935,12 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10829
10935
  disabled: phase !== "ready",
10830
10936
  onClick: () => setPop(pop === "format" ? null : "format"),
10831
10937
  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 })
10938
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: shown }),
10939
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.ChevronDown, { "aria-hidden": true })
10834
10940
  ]
10835
10941
  }
10836
10942
  ),
10837
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "w100n-sheet-list", children: formats.map(([label, pattern], i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
10943
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-sheet-list", children: formats.map(([label, pattern], i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
10838
10944
  "button",
10839
10945
  {
10840
10946
  type: "button",
@@ -10845,123 +10951,158 @@ function SheetView({ bytes, name, kind, rights, language, theme, onChange, onSav
10845
10951
  },
10846
10952
  children: [
10847
10953
  label,
10848
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { children: pattern === "General" ? "" : pattern })
10954
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("small", { children: pattern === "General" ? "" : pattern })
10849
10955
  ]
10850
10956
  },
10851
10957
  i
10852
10958
  )) })
10853
10959
  ),
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)),
10960
+ tool(import_lucide_react7.Euro, t.asCurrency, () => range()?.setNumberFormat('#,##0.00 "\u20AC"'), look?.n === '#,##0.00 "\u20AC"'),
10961
+ tool(import_lucide_react7.Percent, t.asPercent, () => range()?.setNumberFormat("0.00%"), look?.n === "0.00%"),
10962
+ tool(import_lucide_react7.DecimalsArrowLeft, t.fewerDecimals, () => places(-1)),
10963
+ tool(import_lucide_react7.DecimalsArrowRight, t.moreDecimals, () => places(1)),
10858
10964
  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),
10965
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-size", role: "group", "aria-label": t.fontSize, children: [
10966
+ tool(import_lucide_react7.Minus, t.smaller, () => run3("sheet.command.set-range-fontsize", { value: sized((look?.fs ?? 11) - 1) })),
10967
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
10968
+ "input",
10969
+ {
10970
+ "aria-label": t.fontSize,
10971
+ inputMode: "numeric",
10972
+ disabled: phase !== "ready",
10973
+ value: size2 ?? look?.fs ?? 11,
10974
+ onFocus: (e) => e.currentTarget.select(),
10975
+ onChange: (e) => setSize(e.target.value.replace(/\D/g, "").slice(0, 3)),
10976
+ onBlur: () => {
10977
+ const n = Number(size2);
10978
+ if (size2 !== null && n) run3("sheet.command.set-range-fontsize", { value: sized(n) });
10979
+ setSize(null);
10980
+ },
10981
+ onKeyDown: (e) => {
10982
+ if (e.key === "Enter") e.currentTarget.blur();
10983
+ if (e.key === "Escape") {
10984
+ setSize(null);
10985
+ e.currentTarget.blur();
10986
+ }
10987
+ }
10988
+ }
10989
+ ),
10990
+ tool(import_lucide_react7.Plus, t.bigger, () => run3("sheet.command.set-range-fontsize", { value: sized((look?.fs ?? 11) + 1) }))
10991
+ ] }),
10992
+ gap,
10993
+ tool(import_lucide_react7.Bold, t.bold, () => run3("sheet.command.set-range-bold"), look?.bl),
10994
+ tool(import_lucide_react7.Italic, t.italic, () => run3("sheet.command.set-range-italic"), look?.it),
10995
+ tool(import_lucide_react7.Underline, t.underline, () => run3("sheet.command.set-range-underline"), look?.ul),
10996
+ tool(import_lucide_react7.Strikethrough, t.strike, () => run3("sheet.command.set-range-stroke"), look?.st),
10863
10997
  anchor(
10864
10998
  "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
- )
10999
+ opener("text", import_lucide_react7.Baseline, t.textColour, look?.cl ?? ""),
11000
+ /* @__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
11001
  ),
10874
11002
  anchor(
10875
11003
  "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
- )
11004
+ opener("fill", import_lucide_react7.PaintBucket, t.fill, look?.bg ?? ""),
11005
+ /* @__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
11006
  ),
10885
11007
  anchor(
10886
11008
  "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 }),
11009
+ opener("border", import_lucide_react7.Grid2x2, t.borders),
11010
+ /* @__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: [
11011
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { "aria-hidden": true }),
10890
11012
  label
10891
11013
  ] }, type)) })
10892
11014
  ),
10893
11015
  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")),
11016
+ tool(import_lucide_react7.TextAlignStart, t.alignLeft, () => run3("sheet.command.set-horizontal-text-align", { value: 1 }), look?.ht === 1),
11017
+ tool(import_lucide_react7.TextAlignCenter, t.alignCenter, () => run3("sheet.command.set-horizontal-text-align", { value: 2 }), look?.ht === 2),
11018
+ tool(import_lucide_react7.TextAlignEnd, t.alignRight, () => run3("sheet.command.set-horizontal-text-align", { value: 3 }), look?.ht === 3),
11019
+ tool(import_lucide_react7.TextWrap, t.wrap, () => run3("sheet.command.set-text-wrap", { value: look?.tb ? 1 : 3 }), look?.tb),
11020
+ 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
11021
  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)),
11022
+ tool(import_lucide_react7.BetweenHorizontalStart, t.rowAbove, () => run3("sheet.command.insert-row-before")),
11023
+ tool(import_lucide_react7.BetweenHorizontalEnd, t.rowBelow, () => run3("sheet.command.insert-row-after")),
11024
+ tool(import_lucide_react7.BetweenVerticalStart, t.columnLeft, () => run3("sheet.command.insert-col-before")),
11025
+ tool(import_lucide_react7.BetweenVerticalEnd, t.columnRight, () => run3("sheet.command.insert-col-after")),
11026
+ tool(import_lucide_react7.TableRowsSplit, t.deleteRows, () => lines2(true)),
11027
+ tool(import_lucide_react7.TableColumnsSplit, t.deleteColumns, () => lines2(false)),
10906
11028
  anchor(
10907
11029
  "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: () => {
11030
+ opener("freeze", import_lucide_react7.Snowflake, t.freeze),
11031
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-list", children: [
11032
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
10911
11033
  sheet2()?.setFrozenRows(1);
10912
11034
  setPop(null);
10913
11035
  }, children: t.freezeRow }),
10914
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", onClick: () => {
11036
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
10915
11037
  sheet2()?.setFrozenColumns(1);
10916
11038
  setPop(null);
10917
11039
  }, 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: () => {
11040
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => run3("sheet.command.set-selection-frozen"), children: t.freezeHere }),
11041
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
10920
11042
  sheet2()?.cancelFreeze();
10921
11043
  setPop(null);
10922
11044
  }, children: t.freezeNone })
10923
11045
  ] })
10924
11046
  ),
10925
11047
  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")),
11048
+ tool(import_lucide_react7.Sigma, t.sum, sum),
11049
+ tool(import_lucide_react7.ArrowDownAZ, t.sortUp, () => run3("sheet.command.sort-range-asc")),
11050
+ tool(import_lucide_react7.ArrowDownZA, t.sortDown, () => run3("sheet.command.sort-range-desc")),
11051
+ !room && tool(import_lucide_react7.Funnel, t.filter, () => run3("sheet.command.smart-toggle-filter")),
10930
11052
  gap
10931
11053
  ] }),
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"))
11054
+ (edit || notes3) && tool(import_lucide_react7.StickyNote, t.note, () => run3("sheet.operation.add-note-popup")),
11055
+ tool(import_lucide_react7.Search, t.find, () => run3("ui.operation.open-find-dialog"))
10934
11056
  ] }),
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 }),
11057
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "w100n-sheet-end", children: [
11058
+ 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: [
11059
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.WifiOff, { "aria-hidden": true }),
10938
11060
  room.denied ? t.liveOff : t.offline
10939
11061
  ] }),
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 }),
11062
+ 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)) }),
11063
+ room?.people.filter((p) => !p.me && p.selection).map((p) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
11064
+ "button",
11065
+ {
11066
+ type: "button",
11067
+ className: "w100n-sheet-where",
11068
+ style: { "--face": p.color },
11069
+ onClick: () => {
11070
+ const ws = live.current?.api.getActiveWorkbook()?.getSheetBySheetId(p.selection.sheet);
11071
+ ws?.activate();
11072
+ ws?.getRange(p.selection.range).activate();
11073
+ },
11074
+ children: [
11075
+ p.name,
11076
+ " \xB7 ",
11077
+ p.selection.range
11078
+ ]
11079
+ },
11080
+ p.id
11081
+ )),
11082
+ !edit && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-docs-badge", children: notes3 ? t.notesOnly : t.viewOnly }),
11083
+ 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 }),
11084
+ (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: [
11085
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Save, { "aria-hidden": true }),
10945
11086
  saving === "busy" ? t.saving : !pending2 && saving === "done" ? t.saved : t.save
10946
11087
  ] })
10947
11088
  ] })
10948
11089
  ] }),
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: [
11090
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-sheet-stage", onPointerDown: () => setPop(null), children: [
11091
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: box2, className: "w100n-sheet-grid" }),
11092
+ 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
11093
  t.failed,
10953
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "w100n-docs-action", onClick: () => setAttempt((n) => n + 1), children: t.retry })
11094
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", className: "w100n-docs-action", onClick: () => setAttempt((n) => n + 1), children: t.retry })
10954
11095
  ] }) })
10955
11096
  ] })
10956
11097
  ] });
10957
11098
  }
10958
- var import_react12, import_lucide_react6, import_core6, import_jsx_runtime8, decimals, letters2, SheetView_default;
11099
+ var import_react12, import_lucide_react7, import_core7, import_jsx_runtime9, sized, decimals, letters2, SheetView_default;
10959
11100
  var init_SheetView = __esm({
10960
11101
  "src/sheets/SheetView.tsx"() {
10961
11102
  "use strict";
10962
11103
  import_react12 = require("react");
10963
- import_lucide_react6 = require("lucide-react");
10964
- import_core6 = require("@univerjs/core");
11104
+ import_lucide_react7 = require("lucide-react");
11105
+ import_core7 = require("@univerjs/core");
10965
11106
  init_live();
10966
11107
  init_focus();
10967
11108
  init_bind();
@@ -10972,8 +11113,10 @@ var init_SheetView = __esm({
10972
11113
  init_shared();
10973
11114
  init_text2();
10974
11115
  init_xlsx();
11116
+ init_Swatches();
10975
11117
  init_sheets();
10976
- import_jsx_runtime8 = require("react/jsx-runtime");
11118
+ import_jsx_runtime9 = require("react/jsx-runtime");
11119
+ sized = (n) => Math.min(96, Math.max(6, Math.round(n)));
10977
11120
  decimals = (pattern, step) => {
10978
11121
  const p = pattern === "General" ? "0" : pattern;
10979
11122
  const next = Math.max(0, (/0(?:\.(0+))?/.exec(p)?.[1]?.length ?? 0) + step);
@@ -11058,15 +11201,15 @@ function changes2(before, after) {
11058
11201
  }
11059
11202
  function Compare({ host, documentId, kind, older, t }) {
11060
11203
  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_runtime17.jsx)("div", { className: "w100n-docs-empty", children: t.failed });
11062
- if (!rows.data) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
11204
+ if (rows.error) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.failed });
11205
+ if (!rows.data) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
11063
11206
  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_runtime17.jsx)("div", { className: "w100n-docs-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w100n-docs-page w100n-compare", children: [
11065
- /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsx)("p", { "data-op": r.op, children: r.parts.map((p, k) => p.op === "=" ? p.text : p.op === "+" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ins", { children: p.text }, k) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("del", { children: p.text }, k)) }, i))
11207
+ 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: [
11208
+ /* @__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 }),
11209
+ 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
11210
  ] }) });
11068
11211
  }
11069
- var import_jsx_runtime17, words2, alike;
11212
+ var import_jsx_runtime18, words2, alike;
11070
11213
  var init_Compare = __esm({
11071
11214
  "src/Compare.tsx"() {
11072
11215
  "use strict";
@@ -11074,7 +11217,7 @@ var init_Compare = __esm({
11074
11217
  init_diff();
11075
11218
  init_markdown();
11076
11219
  init_useLoad();
11077
- import_jsx_runtime17 = require("react/jsx-runtime");
11220
+ import_jsx_runtime18 = require("react/jsx-runtime");
11078
11221
  words2 = (text) => text.split(/(\s+)/).filter(Boolean);
11079
11222
  alike = (a, b) => {
11080
11223
  const x = a.split(/\s+/).filter(Boolean), y = b.split(/\s+/).filter(Boolean);
@@ -11105,7 +11248,7 @@ __export(index_exports, {
11105
11248
  module.exports = __toCommonJS(index_exports);
11106
11249
 
11107
11250
  // src/DocumentOverlay.tsx
11108
- var import_lucide_react7 = require("lucide-react");
11251
+ var import_lucide_react8 = require("lucide-react");
11109
11252
  var import_react13 = require("react");
11110
11253
  var import_react_dom3 = require("react-dom");
11111
11254
  init_focus();
@@ -11989,7 +12132,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
11989
12132
  pages.current.set(id, page);
11990
12133
  return page;
11991
12134
  };
11992
- 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;
12135
+ 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;
11993
12136
  const byKey = (a, b) => deck.slides[a].key < deck.slides[b].key ? -1 : 1;
11994
12137
  const around3 = (i) => [i - 1, i, i + 1].filter((k) => k >= 0 && k < count).sort(byKey);
11995
12138
  const caption = (i) => `${t.slide} ${i + 1}${deck.slides[i].title ? `: ${deck.slides[i].title}` : ""}`;
@@ -12332,7 +12475,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
12332
12475
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w100n-slides-main", children: [
12333
12476
  /* @__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) => {
12334
12477
  const id = `m:${deck.slides[i].key}:${epoch}`;
12335
- return frame(id, frozen2(deck.slides[i], id, "edit"), fit(stageBox, 32), caption(i), i !== index);
12478
+ return frame(id, frozen2(deck.slides[i], id, "edit"), fit2(stageBox, 32), caption(i), i !== index);
12336
12479
  }) }),
12337
12480
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "w100n-slides-notes", "aria-label": t.notes, children: [
12338
12481
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { children: [
@@ -12359,7 +12502,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
12359
12502
  children: [
12360
12503
  around3(nav.at).map((i) => {
12361
12504
  const id = `p:${deck.slides[i].key}:${epoch}`;
12362
- return frame(id, frozen2(deck.slides[i], id, "present"), fit(showBox), caption(i), i !== nav.at, true);
12505
+ return frame(id, frozen2(deck.slides[i], id, "present"), fit2(showBox), caption(i), i !== nav.at, true);
12363
12506
  }),
12364
12507
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "w100n-slides-count", children: [
12365
12508
  nav.at + 1,
@@ -12406,7 +12549,7 @@ function SlidesView({ html, name, rights, language = "en", theme = "light", base
12406
12549
  ] })
12407
12550
  ] }),
12408
12551
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w100n-slides-desk", children: [
12409
- /* @__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) }),
12552
+ /* @__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) }),
12410
12553
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", { className: "w100n-slides-side", children: [
12411
12554
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "w100n-docs-caption", children: t.upNext }),
12412
12555
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: nextRef, className: "w100n-slides-next", children: nav.at < count - 1 ? frame(
@@ -12846,7 +12989,7 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
12846
12989
  const [box2, setBox] = (0, import_react6.useState)({ w: 0, h: 0 });
12847
12990
  const [top, setTop] = (0, import_react6.useState)(0);
12848
12991
  const [railTop, setRailTop] = (0, import_react6.useState)(0);
12849
- const [fit, setFit] = (0, import_react6.useState)("auto");
12992
+ const [fit2, setFit] = (0, import_react6.useState)("auto");
12850
12993
  const [zoom, setZoom] = (0, import_react6.useState)(100);
12851
12994
  const [rail, setRail] = (0, import_react6.useState)(false);
12852
12995
  const [typed, setTyped] = (0, import_react6.useState)(null);
@@ -12954,7 +13097,7 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
12954
13097
  const widest = Math.max(1, ...sizes2.map((s) => s.w));
12955
13098
  const tallest = Math.max(1, ...sizes2.map((s) => s.h));
12956
13099
  const room = { w: Math.max(120, box2.w - 32), h: Math.max(120, box2.h - 32) };
12957
- 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;
13100
+ 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;
12958
13101
  const percent = Math.round(scale * 75);
12959
13102
  const tops = [];
12960
13103
  let end = 16;
@@ -13302,8 +13445,8 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
13302
13445
  "%"
13303
13446
  ] }) },
13304
13447
  { key: "in", at: 2, Icon: import_lucide_react4.Plus, label: t.zoomIn, run: () => zoomBy(1), stay: true },
13305
- { key: "width", at: 1, Icon: import_lucide_react4.MoveHorizontal, label: t.fitWidth, run: () => setFit("width"), pressed: fit === "width" },
13306
- { key: "fit", at: 1, Icon: import_lucide_react4.Maximize, label: t.fitPage, run: () => setFit("page"), pressed: fit === "page" },
13448
+ { key: "width", at: 1, Icon: import_lucide_react4.MoveHorizontal, label: t.fitWidth, run: () => setFit("width"), pressed: fit2 === "width" },
13449
+ { key: "fit", at: 1, Icon: import_lucide_react4.Maximize, label: t.fitPage, run: () => setFit("page"), pressed: fit2 === "page" },
13307
13450
  { key: "g2", at: 2, node: gap },
13308
13451
  { key: "find", at: 0, Icon: import_lucide_react4.Search, label: t.find, run: () => setQuery(query === null ? "" : null), pressed: query !== null },
13309
13452
  ...can.mark ? [
@@ -13513,10 +13656,10 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
13513
13656
  }
13514
13657
 
13515
13658
  // src/DocumentOverlay.tsx
13516
- var import_jsx_runtime9 = require("react/jsx-runtime");
13659
+ var import_jsx_runtime10 = require("react/jsx-runtime");
13517
13660
  var TextEditor2 = (0, import_react13.lazy)(() => Promise.resolve().then(() => (init_TextEditor(), TextEditor_exports)));
13518
13661
  var SheetView2 = (0, import_react13.lazy)(() => Promise.resolve().then(() => (init_SheetView(), SheetView_exports)));
13519
- 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 };
13662
+ 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 };
13520
13663
  var read = { view: true, comment: false, edit: false };
13521
13664
  var quiet2 = () => {
13522
13665
  };
@@ -13565,10 +13708,10 @@ function DocumentOverlay({ source, name, mimeType, info, download, actions, onCl
13565
13708
  setTimeout(() => URL.revokeObjectURL(url), 1e3);
13566
13709
  };
13567
13710
  const sheet2 = readable(name, mimeType) !== "sheet" ? null : /\.csv$/i.test(name) || mimeType === "text/csv" ? "csv" : "xlsx";
13568
- const wait = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
13711
+ const wait = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
13569
13712
  let stage = null;
13570
13713
  if (bytes && !doc.loading) {
13571
- if (kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
13714
+ if (kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
13572
13715
  PdfView,
13573
13716
  {
13574
13717
  bytes,
@@ -13582,37 +13725,37 @@ function DocumentOverlay({ source, name, mimeType, info, download, actions, onCl
13582
13725
  guard
13583
13726
  }
13584
13727
  );
13585
- 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 }) });
13586
- else if (kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SlidesView, { html: new TextDecoder().decode(bytes), name, rights: read, language, theme, onOutline: quiet2 });
13587
- 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 }) });
13588
- else stage = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
13589
- }
13590
- 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: [
13591
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("header", { className: "w100n-docs-bar", children: [
13592
- /* @__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 }) }),
13593
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-docs-heading", children: [
13594
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { className: "w100n-docs-title", children: name }),
13595
- info && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "w100n-docs-crumbs", children: info })
13728
+ 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 }) });
13729
+ else if (kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SlidesView, { html: new TextDecoder().decode(bytes), name, rights: read, language, theme, onOutline: quiet2 });
13730
+ 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 }) });
13731
+ else stage = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
13732
+ }
13733
+ 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: [
13734
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("header", { className: "w100n-docs-bar", children: [
13735
+ /* @__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 }) }),
13736
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w100n-docs-heading", children: [
13737
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { className: "w100n-docs-title", children: name }),
13738
+ info && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "w100n-docs-crumbs", children: info })
13596
13739
  ] }),
13597
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w100n-docs-end", children: [
13740
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w100n-docs-end", children: [
13598
13741
  actions,
13599
- 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: [
13600
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Download, { "aria-hidden": true }),
13601
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: t.download })
13602
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: save2, "aria-label": t.download, children: [
13603
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Download, { "aria-hidden": true }),
13604
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: t.download })
13742
+ 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: [
13743
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.Download, { "aria-hidden": true }),
13744
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: t.download })
13745
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: save2, "aria-label": t.download, children: [
13746
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.Download, { "aria-hidden": true }),
13747
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: t.download })
13605
13748
  ] }),
13606
- onOpen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: () => ask(onOpen), "aria-label": t.openInDocuments, children: [
13607
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.ExternalLink, { "aria-hidden": true }),
13608
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: t.openInDocuments })
13749
+ onOpen && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("button", { type: "button", className: "w100n-docs-action", onClick: () => ask(onOpen), "aria-label": t.openInDocuments, children: [
13750
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.ExternalLink, { "aria-hidden": true }),
13751
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: t.openInDocuments })
13609
13752
  ] }),
13610
- /* @__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 }) })
13753
+ /* @__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 }) })
13611
13754
  ] })
13612
13755
  ] }),
13613
- /* @__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: [
13756
+ /* @__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: [
13614
13757
  t.failed,
13615
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: loaded.retry, children: t.retry })
13758
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: loaded.retry, children: t.retry })
13616
13759
  ] }) : stage ?? wait }) }),
13617
13760
  dialog
13618
13761
  ] }), document.body);
@@ -13621,13 +13764,13 @@ function DocumentOverlay({ source, name, mimeType, info, download, actions, onCl
13621
13764
  // src/DocumentsWorkspace.tsx
13622
13765
  var import_react19 = require("react");
13623
13766
  var import_react_dom4 = require("react-dom");
13624
- var import_lucide_react13 = require("lucide-react");
13767
+ var import_lucide_react14 = require("lucide-react");
13625
13768
 
13626
13769
  // src/Backlinks.tsx
13627
- var import_lucide_react8 = require("lucide-react");
13770
+ var import_lucide_react9 = require("lucide-react");
13628
13771
  init_wiki();
13629
13772
  init_useLoad();
13630
- var import_jsx_runtime10 = require("react/jsx-runtime");
13773
+ var import_jsx_runtime11 = require("react/jsx-runtime");
13631
13774
  var wikis = /\[\[([^[\]\n|]+?)(?:\|([^[\]\n]+?))?\]\]/g;
13632
13775
  var around2 = (text, from, to) => ({
13633
13776
  before: text.slice(Math.max(0, from - 70), from).replace(/^\S*\s/, "").replace(/\s+/g, " "),
@@ -13676,33 +13819,33 @@ function Backlinks({ host, current, notes: notes3, t, onOpen }) {
13676
13819
  }));
13677
13820
  return mentions(current, notes3, texts2);
13678
13821
  }, [host, current.id, current.name, others.map((item) => `${item.id}:${item.updatedAt}`).join()]);
13679
- if (found.loading && !found.data) return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "w100n-docs-muted", children: t.loading });
13680
- if (found.error) return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "w100n-docs-muted", children: t.failed });
13822
+ if (found.loading && !found.data) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.loading });
13823
+ if (found.error) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.failed });
13681
13824
  const { linked, unlinked } = found.data;
13682
- const card = (m) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("button", { type: "button", className: "w100n-links-card", onClick: () => onOpen(m.item), children: [
13683
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("b", { children: [
13684
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.FileType, { "aria-hidden": true }),
13825
+ const card = (m) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", className: "w100n-links-card", onClick: () => onOpen(m.item), children: [
13826
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("b", { children: [
13827
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.FileType, { "aria-hidden": true }),
13685
13828
  m.item.name.replace(/\.(md|markdown)$/i, "")
13686
13829
  ] }),
13687
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("small", { children: [
13830
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("small", { children: [
13688
13831
  "\u2026",
13689
13832
  m.before,
13690
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("mark", { children: m.hit }),
13833
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("mark", { children: m.hit }),
13691
13834
  m.after,
13692
13835
  "\u2026"
13693
13836
  ] }),
13694
- m.item.folder && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("small", { className: "w100n-links-folder", children: m.item.folder })
13837
+ m.item.folder && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("small", { className: "w100n-links-folder", children: m.item.folder })
13695
13838
  ] }, m.item.id);
13696
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w100n-links", children: [
13697
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "w100n-docs-caption", children: [
13839
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w100n-links", children: [
13840
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "w100n-docs-caption", children: [
13698
13841
  t.linked,
13699
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: linked.length })
13842
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: linked.length })
13700
13843
  ] }),
13701
- linked.length ? linked.map(card) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "w100n-docs-muted", children: t.noBacklinks }),
13702
- unlinked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
13703
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "w100n-docs-caption", children: [
13844
+ linked.length ? linked.map(card) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.noBacklinks }),
13845
+ unlinked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
13846
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "w100n-docs-caption", children: [
13704
13847
  t.unlinked,
13705
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: unlinked.length })
13848
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: unlinked.length })
13706
13849
  ] }),
13707
13850
  unlinked.map(card)
13708
13851
  ] })
@@ -13714,8 +13857,8 @@ init_focus();
13714
13857
 
13715
13858
  // src/Jump.tsx
13716
13859
  var import_react14 = require("react");
13717
- var import_lucide_react9 = require("lucide-react");
13718
- var import_jsx_runtime11 = require("react/jsx-runtime");
13860
+ var import_lucide_react10 = require("lucide-react");
13861
+ var import_jsx_runtime12 = require("react/jsx-runtime");
13719
13862
  var bare3 = (name) => name.replace(/\.(md|markdown)$/i, "");
13720
13863
  function rank(item, q) {
13721
13864
  const name = bare3(item.name).toLowerCase();
@@ -13732,9 +13875,9 @@ function rank(item, q) {
13732
13875
  }
13733
13876
  var lit = (text, q) => {
13734
13877
  const at2 = q ? text.toLowerCase().indexOf(q) : -1;
13735
- return at2 < 0 ? text : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
13878
+ return at2 < 0 ? text : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
13736
13879
  text.slice(0, at2),
13737
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("mark", { children: text.slice(at2, at2 + q.length) }),
13880
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("mark", { children: text.slice(at2, at2 + q.length) }),
13738
13881
  text.slice(at2 + q.length)
13739
13882
  ] });
13740
13883
  };
@@ -13753,12 +13896,12 @@ function Jump({ mode, items, actions, t, place: place2, onOpen, onCreate, onClos
13753
13896
  else if (mode === "run") doing[i]?.run();
13754
13897
  else if (make2) onCreate(query.trim());
13755
13898
  };
13756
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w100n-jump-back", onPointerDown: (e) => {
13899
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w100n-jump-back", onPointerDown: (e) => {
13757
13900
  if (e.target === e.currentTarget) onClose();
13758
- }, 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: [
13759
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "w100n-jump-field", children: [
13760
- 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 }),
13761
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
13901
+ }, 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: [
13902
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "w100n-jump-field", children: [
13903
+ 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 }),
13904
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
13762
13905
  "input",
13763
13906
  {
13764
13907
  autoFocus: true,
@@ -13784,29 +13927,29 @@ function Jump({ mode, items, actions, t, place: place2, onOpen, onCreate, onClos
13784
13927
  }
13785
13928
  )
13786
13929
  ] }),
13787
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w100n-jump-list", role: "listbox", "aria-label": mode === "open" ? t.openNote : t.commands, children: [
13788
- 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: [
13789
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.FileType, { "aria-hidden": true }),
13790
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: lit(bare3(item.name), q) }),
13791
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("small", { children: place2(item) })
13930
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-jump-list", role: "listbox", "aria-label": mode === "open" ? t.openNote : t.commands, children: [
13931
+ 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: [
13932
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.FileType, { "aria-hidden": true }),
13933
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: lit(bare3(item.name), q) }),
13934
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: place2(item) })
13792
13935
  ] }, item.id)),
13793
- 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: [
13794
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(a.icon, { "aria-hidden": true }),
13795
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: lit(a.label, q) }),
13796
- a.keys && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("kbd", { children: a.keys })
13936
+ 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: [
13937
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(a.icon, { "aria-hidden": true }),
13938
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: lit(a.label, q) }),
13939
+ a.keys && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("kbd", { children: a.keys })
13797
13940
  ] }, a.id)),
13798
- 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: [
13799
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.Plus, { "aria-hidden": true }),
13800
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: t.createNote.replace("{name}", query.trim()) })
13941
+ 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: [
13942
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Plus, { "aria-hidden": true }),
13943
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: t.createNote.replace("{name}", query.trim()) })
13801
13944
  ] }),
13802
- !total && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-docs-muted", children: t.noNote })
13945
+ !total && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-muted", children: t.noNote })
13803
13946
  ] }),
13804
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "w100n-jump-keys", children: mode === "open" ? t.keysOpen : t.keysRun })
13947
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-jump-keys", children: mode === "open" ? t.keysOpen : t.keysRun })
13805
13948
  ] }) });
13806
13949
  }
13807
13950
 
13808
13951
  // src/NewDocument.tsx
13809
- var import_lucide_react10 = require("lucide-react");
13952
+ var import_lucide_react11 = require("lucide-react");
13810
13953
  var import_react15 = require("react");
13811
13954
 
13812
13955
  // src/blank.ts
@@ -13933,8 +14076,8 @@ function blank4(kind, name, template = "blank") {
13933
14076
  // src/NewDocument.tsx
13934
14077
  init_focus();
13935
14078
  init_useLoad();
13936
- var import_jsx_runtime12 = require("react/jsx-runtime");
13937
- var icons2 = { docx: import_lucide_react10.FileText, markdown: import_lucide_react10.FileType, sheet: import_lucide_react10.FileSpreadsheet, slides: import_lucide_react10.Presentation };
14079
+ var import_jsx_runtime13 = require("react/jsx-runtime");
14080
+ var icons2 = { docx: import_lucide_react11.FileText, markdown: import_lucide_react11.FileType, sheet: import_lucide_react11.FileSpreadsheet, slides: import_lucide_react11.Presentation };
13938
14081
  var shaped = ["blank", "letter", "contract", "notes", "invoice", "report"];
13939
14082
  function NewDocument({ host, t, onClose, onMade }) {
13940
14083
  const id = (0, import_react15.useId)();
@@ -13959,77 +14102,77 @@ function NewDocument({ host, t, onClose, onMade }) {
13959
14102
  setState("failed");
13960
14103
  }
13961
14104
  };
13962
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
14105
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w100n-pdf-back", onKeyDown: (e) => {
13963
14106
  if (e.key === "Escape") {
13964
14107
  e.stopPropagation();
13965
14108
  onClose();
13966
14109
  }
13967
- }, 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) => {
14110
+ }, 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) => {
13968
14111
  e.preventDefault();
13969
14112
  void make2();
13970
14113
  }, children: [
13971
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-new-head", children: [
13972
- /* @__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 }) }),
13973
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("b", { id: `${id}t`, className: "w100n-pdf-dialog-title", children: t.newTitle }),
13974
- /* @__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 }) })
14114
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-new-head", children: [
14115
+ /* @__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 }) }),
14116
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { id: `${id}t`, className: "w100n-pdf-dialog-title", children: t.newTitle }),
14117
+ /* @__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 }) })
13975
14118
  ] }),
13976
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { role: "radiogroup", "aria-label": t.kind, className: "w100n-new-kinds", children: Object.keys(icons2).map((item) => {
14119
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { role: "radiogroup", "aria-label": t.kind, className: "w100n-new-kinds", children: Object.keys(icons2).map((item) => {
13977
14120
  const Icon = icons2[item];
13978
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", role: "radio", "aria-checked": kind === item, "data-kind": item, onClick: () => {
14121
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", role: "radio", "aria-checked": kind === item, "data-kind": item, onClick: () => {
13979
14122
  setKind(item);
13980
14123
  setTeam(null);
13981
14124
  if (item === "sheet" || item === "slides") setTemplate("blank");
13982
14125
  }, children: [
13983
- /* @__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 }) }),
13984
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
13985
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("b", { children: t.newKinds[item] }),
13986
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: t.kindHints[item] })
14126
+ /* @__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 }) }),
14127
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14128
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.newKinds[item] }),
14129
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.kindHints[item] })
13987
14130
  ] })
13988
14131
  ] }, item);
13989
14132
  }) }),
13990
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-caption", children: t.startFrom }),
13991
- /* @__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: () => {
14133
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-caption", children: t.startFrom }),
14134
+ /* @__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: () => {
13992
14135
  setTeam(null);
13993
14136
  setTemplate(item);
13994
14137
  }, children: [
13995
- /* @__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: [
13996
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-head": true }),
13997
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
13998
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
13999
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-accent": true }),
14000
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
14001
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {})
14138
+ /* @__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: [
14139
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-head": true }),
14140
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14141
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14142
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-accent": true }),
14143
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14144
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {})
14002
14145
  ] }) }),
14003
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: t.templates[item] })
14146
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: t.templates[item] })
14004
14147
  ] }, item)) }),
14005
- ours2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
14006
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-caption", children: t.teamTemplates }),
14007
- /* @__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: [
14008
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "w100n-new-sheet", children: [
14009
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-head": true }),
14010
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
14011
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { "data-accent": true }),
14012
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
14013
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {})
14148
+ ours2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
14149
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-caption", children: t.teamTemplates }),
14150
+ /* @__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: [
14151
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "w100n-new-sheet", children: [
14152
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-head": true }),
14153
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14154
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { "data-accent": true }),
14155
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
14156
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {})
14014
14157
  ] }),
14015
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { title: item.name, children: stem(item.name) })
14158
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { title: item.name, children: stem(item.name) })
14016
14159
  ] }, item.id)) })
14017
14160
  ] }),
14018
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-new-fields", children: [
14019
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
14020
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-docs-caption", children: t.name }),
14021
- /* @__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] })
14161
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-new-fields", children: [
14162
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
14163
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-docs-caption", children: t.name }),
14164
+ /* @__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] })
14022
14165
  ] }),
14023
- host.createIn && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
14024
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-docs-caption", children: t.savesTo }),
14025
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w100n-docs-field w100n-new-place", children: host.createIn })
14166
+ host.createIn && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
14167
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-docs-caption", children: t.savesTo }),
14168
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-docs-field w100n-new-place", children: host.createIn })
14026
14169
  ] })
14027
14170
  ] }),
14028
- state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.makeFailed }),
14029
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w100n-pdf-dialog-end", children: [
14030
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: onClose, children: t.cancel }),
14031
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: state === "busy", children: [
14032
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react10.Check, { "aria-hidden": true }),
14171
+ state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.makeFailed }),
14172
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-pdf-dialog-end", children: [
14173
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: onClose, children: t.cancel }),
14174
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: state === "busy", children: [
14175
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Check, { "aria-hidden": true }),
14033
14176
  state === "busy" ? t.making : t.make
14034
14177
  ] })
14035
14178
  ] })
@@ -14038,9 +14181,9 @@ function NewDocument({ host, t, onClose, onMade }) {
14038
14181
 
14039
14182
  // src/Sharing.tsx
14040
14183
  var import_react16 = require("react");
14041
- var import_lucide_react11 = require("lucide-react");
14184
+ var import_lucide_react12 = require("lucide-react");
14042
14185
  init_useLoad();
14043
- var import_jsx_runtime13 = require("react/jsx-runtime");
14186
+ var import_jsx_runtime14 = require("react/jsx-runtime");
14044
14187
  var blank5 = { id: null, comment: false, download: false, askName: true, works: "30", day: "", password: false, secret: "", had: false };
14045
14188
  var local = (iso) => {
14046
14189
  const at2 = new Date(iso);
@@ -14112,31 +14255,31 @@ function Sharing({ host, doc, t, language, team }) {
14112
14255
  setCopied(null);
14113
14256
  }
14114
14257
  };
14115
- if (form) return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share", children: [
14116
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "w100n-docs-caption", children: [
14117
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Link, { "aria-hidden": true }),
14258
+ if (form) return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share", children: [
14259
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "w100n-docs-caption", children: [
14260
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Link, { "aria-hidden": true }),
14118
14261
  form.id ? t.changeLink : t.newLink
14119
14262
  ] }),
14120
- text && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-field", children: [
14121
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: t.guestsCan }),
14122
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-docs-chips", children: [
14123
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", "aria-pressed": !form.comment, onClick: () => setForm({ ...form, comment: false }), children: [
14124
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Eye, { "aria-hidden": true }),
14263
+ text && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-field", children: [
14264
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: t.guestsCan }),
14265
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-docs-chips", children: [
14266
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", "aria-pressed": !form.comment, onClick: () => setForm({ ...form, comment: false }), children: [
14267
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Eye, { "aria-hidden": true }),
14125
14268
  t.canRead
14126
14269
  ] }),
14127
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", "aria-pressed": form.comment, onClick: () => setForm({ ...form, comment: true }), children: [
14128
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.MessageSquarePlus, { "aria-hidden": true }),
14270
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", "aria-pressed": form.comment, onClick: () => setForm({ ...form, comment: true }), children: [
14271
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.MessageSquarePlus, { "aria-hidden": true }),
14129
14272
  t.canComment
14130
14273
  ] })
14131
14274
  ] })
14132
14275
  ] }),
14133
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-field", children: [
14134
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: t.linkWorks }),
14135
- /* @__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: [
14136
- key2 === "day" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.CalendarDays, { "aria-hidden": true }),
14276
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-field", children: [
14277
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: t.linkWorks }),
14278
+ /* @__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: [
14279
+ key2 === "day" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.CalendarDays, { "aria-hidden": true }),
14137
14280
  label
14138
14281
  ] }, key2)) }),
14139
- form.works === "day" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14282
+ form.works === "day" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14140
14283
  "input",
14141
14284
  {
14142
14285
  type: "date",
@@ -14148,14 +14291,14 @@ function Sharing({ host, doc, t, language, team }) {
14148
14291
  }
14149
14292
  )
14150
14293
  ] }),
14151
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "w100n-share-toggle", children: [
14152
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "checkbox", checked: form.password, onChange: (e) => setForm({ ...form, password: e.target.checked }) }),
14153
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14154
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.passwordOn }),
14155
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.passwordHint })
14294
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "w100n-share-toggle", children: [
14295
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "checkbox", checked: form.password, onChange: (e) => setForm({ ...form, password: e.target.checked }) }),
14296
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14297
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.passwordOn }),
14298
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.passwordHint })
14156
14299
  ] })
14157
14300
  ] }),
14158
- form.password && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14301
+ form.password && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14159
14302
  "input",
14160
14303
  {
14161
14304
  type: "password",
@@ -14167,120 +14310,120 @@ function Sharing({ host, doc, t, language, team }) {
14167
14310
  onChange: (e) => setForm({ ...form, secret: e.target.value })
14168
14311
  }
14169
14312
  ),
14170
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "w100n-share-toggle", children: [
14171
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "checkbox", checked: form.download, onChange: (e) => setForm({ ...form, download: e.target.checked }) }),
14172
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14173
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.downloadFile }),
14174
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.downloadHint })
14313
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "w100n-share-toggle", children: [
14314
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "checkbox", checked: form.download, onChange: (e) => setForm({ ...form, download: e.target.checked }) }),
14315
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14316
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.downloadFile }),
14317
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.downloadHint })
14175
14318
  ] })
14176
14319
  ] }),
14177
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "w100n-share-toggle", children: [
14178
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "checkbox", checked: form.askName, onChange: (e) => setForm({ ...form, askName: e.target.checked }) }),
14179
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14180
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.askName }),
14181
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.askNameHint })
14320
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "w100n-share-toggle", children: [
14321
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "checkbox", checked: form.askName, onChange: (e) => setForm({ ...form, askName: e.target.checked }) }),
14322
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14323
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.askName }),
14324
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.askNameHint })
14182
14325
  ] })
14183
14326
  ] }),
14184
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", children: t.lastSaved }),
14185
- state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14186
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
14187
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
14327
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", children: t.lastSaved }),
14328
+ state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14329
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
14330
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
14188
14331
  setForm(null);
14189
14332
  setState("idle");
14190
14333
  }, children: t.cancel }),
14191
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !ready || state === "busy", onClick: () => void submit(), children: [
14192
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Link, { "aria-hidden": true }),
14334
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: !ready || state === "busy", onClick: () => void submit(), children: [
14335
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Link, { "aria-hidden": true }),
14193
14336
  form.id ? t.saveLink : t.makeLink
14194
14337
  ] })
14195
14338
  ] })
14196
14339
  ] });
14197
14340
  const on2 = links.data ?? [];
14198
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share", children: [
14199
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "w100n-docs-caption", children: [
14200
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Link, { "aria-hidden": true }),
14341
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share", children: [
14342
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "w100n-docs-caption", children: [
14343
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Link, { "aria-hidden": true }),
14201
14344
  t.guestLinks,
14202
- on2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: on2.filter((l) => !l.ended).length })
14345
+ on2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: on2.filter((l) => !l.ended).length })
14203
14346
  ] }),
14204
- links.error && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-docs-note", children: [
14347
+ links.error && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-docs-note", children: [
14205
14348
  t.failed,
14206
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: links.retry, children: t.retry })
14349
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: links.retry, children: t.retry })
14207
14350
  ] }),
14208
- links.data && !on2.length && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", children: t.noLinks }),
14209
- state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14210
- on2.map((l) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("article", { className: "w100n-share-link", "data-ended": l.ended, children: [
14211
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { children: [
14212
- /* @__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 }) }),
14213
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14214
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: l.comment ? t.commentLink : t.viewLink }),
14215
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
14351
+ links.data && !on2.length && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", children: t.noLinks }),
14352
+ state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.shareFailed }),
14353
+ on2.map((l) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("article", { className: "w100n-share-link", "data-ended": l.ended, children: [
14354
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { children: [
14355
+ /* @__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 }) }),
14356
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14357
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: l.comment ? t.commentLink : t.viewLink }),
14358
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
14216
14359
  t.madeBy.replace("{name}", l.createdBy.name),
14217
14360
  " \xB7 ",
14218
14361
  day(l.createdAt)
14219
14362
  ] })
14220
14363
  ] })
14221
14364
  ] }),
14222
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-chips", children: [
14223
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14224
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Clock, { "aria-hidden": true }),
14365
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-chips", children: [
14366
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14367
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Clock, { "aria-hidden": true }),
14225
14368
  l.ended ? t.linkEnded : l.endsAt ? t.endsOn.replace("{date}", day(l.endsAt)) : t.untilOff
14226
14369
  ] }),
14227
- l.download && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14228
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Download, { "aria-hidden": true }),
14370
+ l.download && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14371
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Download, { "aria-hidden": true }),
14229
14372
  t.downloadOn
14230
14373
  ] }),
14231
- l.password && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14232
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Lock, { "aria-hidden": true }),
14374
+ l.password && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14375
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Lock, { "aria-hidden": true }),
14233
14376
  t.passwordOn
14234
14377
  ] }),
14235
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14236
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Eye, { "aria-hidden": true }),
14378
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14379
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Eye, { "aria-hidden": true }),
14237
14380
  count(l.guests.reduce((n, g) => n + g.opens, 0), t.openForms)
14238
14381
  ] })
14239
14382
  ] }),
14240
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-url", children: [
14241
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: l.url.replace(/^https?:\/\//, "") }),
14242
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", onClick: () => void copy2(l), children: [
14243
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Copy, { "aria-hidden": true }),
14383
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-url", children: [
14384
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: l.url.replace(/^https?:\/\//, "") }),
14385
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", onClick: () => void copy2(l), children: [
14386
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Copy, { "aria-hidden": true }),
14244
14387
  copied === l.id ? t.copied : t.copy
14245
14388
  ] })
14246
14389
  ] }),
14247
- 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: [
14248
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: (g.name || "?").slice(0, 1).toUpperCase() }),
14249
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: g.name || t.unnamed }),
14250
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
14390
+ 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: [
14391
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w100n-text-face", "aria-hidden": true, children: (g.name || "?").slice(0, 1).toUpperCase() }),
14392
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: g.name || t.unnamed }),
14393
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
14251
14394
  g.comments ? count(g.comments, t.commentForms) : count(g.opens, t.openForms),
14252
14395
  " \xB7 ",
14253
14396
  ago(g.lastAt)
14254
14397
  ] })
14255
14398
  ] }, i)) }),
14256
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-tools", children: [
14257
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "slate", disabled: state === "busy", onClick: () => edit(l), children: [
14258
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Clock, { "aria-hidden": true }),
14399
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-tools", children: [
14400
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "slate", disabled: state === "busy", onClick: () => edit(l), children: [
14401
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Clock, { "aria-hidden": true }),
14259
14402
  t.changeLink
14260
14403
  ] }),
14261
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", disabled: state === "busy", onClick: () => void off(l), children: [
14262
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Ban, { "aria-hidden": true }),
14404
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", disabled: state === "busy", onClick: () => void off(l), children: [
14405
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Ban, { "aria-hidden": true }),
14263
14406
  t.turnOff
14264
14407
  ] })
14265
14408
  ] })
14266
14409
  ] }, l.id)),
14267
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "w100n-docs-action w100n-share-new", onClick: () => {
14410
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "w100n-docs-action w100n-share-new", onClick: () => {
14268
14411
  setState("idle");
14269
14412
  setForm(blank5);
14270
14413
  }, children: [
14271
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Plus, { "aria-hidden": true }),
14414
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Plus, { "aria-hidden": true }),
14272
14415
  t.newLink
14273
14416
  ] }),
14274
- team && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
14275
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "w100n-docs-caption", children: [
14276
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react11.Users, { "aria-hidden": true }),
14417
+ team && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
14418
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "w100n-docs-caption", children: [
14419
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react12.Users, { "aria-hidden": true }),
14277
14420
  t.inTeam
14278
14421
  ] }),
14279
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w100n-share-team", children: [
14280
- /* @__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 }) }),
14281
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14282
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: t.peopleOf.replace("{space}", team) }),
14283
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: t.teamHint })
14422
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-share-team", children: [
14423
+ /* @__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 }) }),
14424
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
14425
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: t.peopleOf.replace("{space}", team) }),
14426
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: t.teamHint })
14284
14427
  ] })
14285
14428
  ] })
14286
14429
  ] })
@@ -14291,15 +14434,15 @@ function Sharing({ host, doc, t, language, team }) {
14291
14434
  init_text();
14292
14435
 
14293
14436
  // src/PreviewCard.tsx
14294
- var import_jsx_runtime14 = require("react/jsx-runtime");
14437
+ var import_jsx_runtime15 = require("react/jsx-runtime");
14295
14438
  function PreviewCard({ thumb, icon, title, lines: lines2 }) {
14296
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-card", children: [
14297
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w100n-card-thumb", children: thumb }),
14298
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w100n-card-title", children: [
14439
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "w100n-card", children: [
14440
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w100n-card-thumb", children: thumb }),
14441
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "w100n-card-title", children: [
14299
14442
  icon,
14300
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: title })
14443
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("b", { children: title })
14301
14444
  ] }),
14302
- lines2.filter(Boolean).map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: line }, i))
14445
+ lines2.filter(Boolean).map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: line }, i))
14303
14446
  ] });
14304
14447
  }
14305
14448
 
@@ -14357,7 +14500,7 @@ function preview(host, doc) {
14357
14500
  }
14358
14501
 
14359
14502
  // src/Thumb.tsx
14360
- var import_jsx_runtime15 = require("react/jsx-runtime");
14503
+ var import_jsx_runtime16 = require("react/jsx-runtime");
14361
14504
  function Thumb({ host, item, label }) {
14362
14505
  const box2 = (0, import_react17.useRef)(null);
14363
14506
  const [seen2, setSeen] = (0, import_react17.useState)(false);
@@ -14383,26 +14526,26 @@ function Thumb({ host, item, label }) {
14383
14526
  const text = item.excerpt ?? shot?.text ?? "";
14384
14527
  const lines2 = text.split("\n").filter((line) => !line.trim().startsWith("```")).map((line) => line.replace(/^#+\s*/, "").replace(/[*_`>|]/g, "").trim()).filter(Boolean);
14385
14528
  const image = item.thumbnailUrl ?? shot?.image;
14386
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { ref: box2, className: "w100n-docs-thumb", "data-kind": item.kind, children: [
14387
- image ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { src: image, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "w100n-docs-paper", "aria-hidden": true, children: lines2.length ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
14388
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("b", { children: lines2[0] }),
14529
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { ref: box2, className: "w100n-docs-thumb", "data-kind": item.kind, children: [
14530
+ 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: [
14531
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("b", { children: lines2[0] }),
14389
14532
  lines2.slice(1, 14).join(" ")
14390
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
14391
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {}),
14392
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {}),
14393
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {}),
14394
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {}),
14395
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {})
14533
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
14534
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14535
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14536
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14537
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
14538
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {})
14396
14539
  ] }) }),
14397
- label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "w100n-docs-kind", "data-kind": item.kind, children: label })
14540
+ label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "w100n-docs-kind", "data-kind": item.kind, children: label })
14398
14541
  ] });
14399
14542
  }
14400
14543
 
14401
14544
  // src/Tree.tsx
14402
14545
  var import_react18 = require("react");
14403
- var import_lucide_react12 = require("lucide-react");
14404
- var import_jsx_runtime16 = require("react/jsx-runtime");
14405
- var icons3 = { docx: import_lucide_react12.FileText, markdown: import_lucide_react12.FileType, pdf: import_lucide_react12.File, sheet: import_lucide_react12.FileSpreadsheet, slides: import_lucide_react12.Presentation };
14546
+ var import_lucide_react13 = require("lucide-react");
14547
+ var import_jsx_runtime17 = require("react/jsx-runtime");
14548
+ 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 };
14406
14549
  var dragged = "application/x-w100n-document";
14407
14550
  function grow(items, folders, names2, spaceId, other) {
14408
14551
  const root = { key: "", name: "", at: spaceId ? { spaceId, folder: "" } : null, folders: [], files: [], count: 0 };
@@ -14452,7 +14595,7 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits,
14452
14595
  setClosed(next);
14453
14596
  localStorage.setItem("w100n-docs-closed", JSON.stringify([...next]));
14454
14597
  };
14455
- const field = (pad, label) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14598
+ const field = (pad, label) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14456
14599
  "input",
14457
14600
  {
14458
14601
  className: "w100n-tree-row w100n-tree-input",
@@ -14489,12 +14632,12 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits,
14489
14632
  onMove(id, b.at);
14490
14633
  }
14491
14634
  } : {};
14492
- const branch = (b, depth) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
14635
+ const branch = (b, depth) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
14493
14636
  edit?.key === `new:${b.key}` && field(24 + depth * 16, t.folderName),
14494
14637
  b.folders.map((f) => {
14495
14638
  const open = !closed2.has(f.key) || edit?.key === `new:${f.key}`;
14496
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { role: "group", "aria-label": f.name, "data-over": over === f.key || void 0, ...target(f), children: [
14497
- edit?.key === `dir:${f.key}` ? field(24 + depth * 16, t.renameFolder) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
14639
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { role: "group", "aria-label": f.name, "data-over": over === f.key || void 0, ...target(f), children: [
14640
+ edit?.key === `dir:${f.key}` ? field(24 + depth * 16, t.renameFolder) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14498
14641
  "button",
14499
14642
  {
14500
14643
  type: "button",
@@ -14508,10 +14651,10 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits,
14508
14651
  onFolderMenu(f.at, f.key, e);
14509
14652
  } : void 0,
14510
14653
  children: [
14511
- open ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react12.ChevronDown, { "aria-hidden": true, className: "w100n-tree-fold" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react12.ChevronRight, { "aria-hidden": true, className: "w100n-tree-fold" }),
14512
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react12.Folder, { "aria-hidden": true }),
14513
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: f.name }),
14514
- f.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { children: f.count })
14654
+ 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" }),
14655
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react13.Folder, { "aria-hidden": true }),
14656
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: f.name }),
14657
+ f.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: f.count })
14515
14658
  ]
14516
14659
  }
14517
14660
  ),
@@ -14520,9 +14663,9 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits,
14520
14663
  }),
14521
14664
  b.files.map((item) => {
14522
14665
  const Icon = icons3[item.kind];
14523
- if (edit?.key === `file:${item.id}`) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: field(24 + depth * 16, t.rename) }, item.id);
14666
+ if (edit?.key === `file:${item.id}`) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: field(24 + depth * 16, t.rename) }, item.id);
14524
14667
  const hit = hits?.get(item.id);
14525
- const row2 = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
14668
+ const row2 = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14526
14669
  "button",
14527
14670
  {
14528
14671
  type: "button",
@@ -14536,7 +14679,7 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits,
14536
14679
  e.dataTransfer.effectAllowed = "move";
14537
14680
  },
14538
14681
  onClick: () => onOpen(item),
14539
- onPointerEnter: (e) => onWarm(item, e.pointerType === "mouse" ? e.currentTarget.getBoundingClientRect() : void 0),
14682
+ onPointerEnter: () => onWarm(item),
14540
14683
  onPointerLeave: () => onWarm(null),
14541
14684
  onContextMenu: (e) => {
14542
14685
  e.preventDefault();
@@ -14544,21 +14687,21 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits,
14544
14687
  onMenu(item, e);
14545
14688
  },
14546
14689
  children: [
14547
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { "aria-hidden": true, "data-kind": item.kind }),
14548
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: item.name.replace(/\.[^.]+$/, "") }),
14549
- item.kind !== "markdown" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { className: "w100n-tree-kind", children: t.kinds[item.kind] })
14690
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { "aria-hidden": true, "data-kind": item.kind }),
14691
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: item.name.replace(/\.[^.]+$/, "") }),
14692
+ item.kind !== "markdown" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { className: "w100n-tree-kind", children: t.kinds[item.kind] })
14550
14693
  ]
14551
14694
  },
14552
14695
  item.id
14553
14696
  );
14554
- return hit ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
14697
+ return hit ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
14555
14698
  row2,
14556
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { className: "w100n-tree-hit", style: { paddingLeft: 46 + depth * 16 }, children: hit.split(/[«»]/).map((part, i) => i % 2 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("mark", { children: part }, i) : part) })
14699
+ /* @__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) })
14557
14700
  ] }, item.id) : row2;
14558
14701
  })
14559
14702
  ] });
14560
14703
  const root = grow(items, folders, names2, spaceId, t.elsewhere);
14561
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14704
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14562
14705
  "nav",
14563
14706
  {
14564
14707
  className: "w100n-tree",
@@ -14576,11 +14719,11 @@ function Tree({ items, folders, names: names2, spaceId, current, t, edit, hits,
14576
14719
 
14577
14720
  // src/DocumentsWorkspace.tsx
14578
14721
  init_useLoad();
14579
- var import_jsx_runtime18 = require("react/jsx-runtime");
14722
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14580
14723
  var TextEditor3 = (0, import_react19.lazy)(() => Promise.resolve().then(() => (init_TextEditor(), TextEditor_exports)));
14581
14724
  var SheetView3 = (0, import_react19.lazy)(() => Promise.resolve().then(() => (init_SheetView(), SheetView_exports)));
14582
14725
  var Compare2 = (0, import_react19.lazy)(() => Promise.resolve().then(() => (init_Compare(), Compare_exports)));
14583
- function DocumentsWorkspace({ host, language = "en", theme = "light", place: place2, onPlace, start, end, aside, actions }) {
14726
+ function DocumentsWorkspace({ host, language = "en", theme = "light", place: place2, onPlace, start, end, aside, actions, tabs }) {
14584
14727
  const t = texts[language];
14585
14728
  const [own, setOwn] = (0, import_react19.useState)({ spaceId: null, documentId: null });
14586
14729
  const here = place2 ?? own;
@@ -14664,8 +14807,6 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14664
14807
  const [notice, setNotice] = (0, import_react19.useState)(null);
14665
14808
  const early = (0, import_react19.useRef)(/* @__PURE__ */ new Map());
14666
14809
  const hover = (0, import_react19.useRef)(0);
14667
- const peeking = (0, import_react19.useRef)(0);
14668
- const [peek, setPeek] = (0, import_react19.useState)(null);
14669
14810
  (0, import_react19.useEffect)(() => {
14670
14811
  if (!menu && !spot3) return;
14671
14812
  const close = (e) => {
@@ -14684,6 +14825,8 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14684
14825
  };
14685
14826
  }, [menu, spot3]);
14686
14827
  const [tab, setTab] = (0, import_react19.useState)("outline");
14828
+ const [heard, setHeard] = (0, import_react19.useState)(0);
14829
+ const [aim, setAim] = (0, import_react19.useState)(null);
14687
14830
  const [outline2, setOutline] = (0, import_react19.useState)([]);
14688
14831
  const [reading, setReading] = (0, import_react19.useState)(null);
14689
14832
  const [hunt, setHunt] = (0, import_react19.useState)("");
@@ -14767,9 +14910,9 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14767
14910
  return new Intl.DateTimeFormat(language, { day: "numeric", month: "short", year: "numeric" }).format(new Date(iso));
14768
14911
  };
14769
14912
  const size2 = (bytes) => bytes < 1024 ? `${bytes} B` : bytes < 1048576 ? `${(bytes / 1024).toFixed(0)} KB` : `${(bytes / 1048576).toFixed(1)} MB`;
14770
- const failed = (retry) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-note", children: [
14913
+ const failed = (retry) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-note", children: [
14771
14914
  t.failed,
14772
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: retry, children: t.retry })
14915
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: retry, children: t.retry })
14773
14916
  ] });
14774
14917
  const { ask, dialog } = useUnsaved(guard, t);
14775
14918
  const side2 = (which, open2) => {
@@ -14800,6 +14943,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14800
14943
  setHunt("");
14801
14944
  setFold({});
14802
14945
  setTab("outline");
14946
+ setAim(null);
14803
14947
  go({ spaceId: here.spaceId, documentId: item.id });
14804
14948
  if (narrow) setListOpen(false);
14805
14949
  });
@@ -14878,9 +15022,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14878
15022
  setKept({ id: file.id, state: "failed" });
14879
15023
  }
14880
15024
  };
14881
- const warm = (item, at2) => {
14882
- clearTimeout(peeking.current);
14883
- if (at2) peeking.current = window.setTimeout(() => setPeek({ item, x: Math.min(at2.right + 8, innerWidth - 300), y: Math.min(at2.top, innerHeight - 300) }), 500);
15025
+ const warm = (item) => {
14884
15026
  clearTimeout(hover.current);
14885
15027
  hover.current = window.setTimeout(() => {
14886
15028
  if (item.id === here.documentId) return;
@@ -14898,11 +15040,11 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
14898
15040
  };
14899
15041
  const card = (item) => {
14900
15042
  const Icon = icons3[item.kind];
14901
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PreviewCard, { thumb: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Thumb, { host, item, label: t.kinds[item.kind] }), icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { "aria-hidden": true, "data-kind": item.kind }), title: item.name, lines: [
15043
+ 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: [
14902
15044
  [t.kinds[item.kind], size2(item.size), names2.get(item.spaceId), item.folder].filter(Boolean).join(" \xB7 "),
14903
15045
  item.createdAt && [t.createdOn.replace("{when}", date(item.createdAt)), item.createdBy?.name].filter(Boolean).join(" \xB7 "),
14904
15046
  [t.updatedOn.replace("{when}", ago(item.updatedAt)), item.updatedBy?.name].filter(Boolean).join(" \xB7 "),
14905
- inside2.get(item.id)?.split(/[«»]/).map((part, i) => i % 2 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("mark", { children: part }, i) : part)
15047
+ inside2.get(item.id)?.split(/[«»]/).map((part, i) => i % 2 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("mark", { children: part }, i) : part)
14906
15048
  ] });
14907
15049
  };
14908
15050
  const act = async (run3, done) => {
@@ -15004,20 +15146,20 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15004
15146
  };
15005
15147
  const current = doc.data && all.find((item) => item.id === doc.data.id);
15006
15148
  const commands = [
15007
- ...host.create ? [{ id: "new", label: t.newNote, icon: import_lucide_react13.FilePlus, keys: "\u2318N", run: () => void note(t.untitled, true) }] : [],
15008
- { id: "open", label: t.openNote, icon: import_lucide_react13.Search, keys: "\u2318O", run: () => setJump("open") },
15009
- { id: "search", label: t.searchAll, icon: import_lucide_react13.Search, run: () => {
15149
+ ...host.create ? [{ id: "new", label: t.newNote, icon: import_lucide_react14.FilePlus, keys: "\u2318N", run: () => void note(t.untitled, true) }] : [],
15150
+ { id: "open", label: t.openNote, icon: import_lucide_react14.Search, keys: "\u2318O", run: () => setJump("open") },
15151
+ { id: "search", label: t.searchAll, icon: import_lucide_react14.Search, run: () => {
15010
15152
  side2("list", true);
15011
15153
  requestAnimationFrame(() => finder.current?.focus());
15012
15154
  } },
15013
15155
  ...doc.data ? [
15014
- { id: "outline", label: t.showOutline, icon: import_lucide_react13.ListTree, run: () => panelOn("outline") },
15015
- ...doc.data.kind === "markdown" ? [{ id: "links", label: t.showLinks, icon: import_lucide_react13.Link2, run: () => panelOn("links") }] : [],
15016
- { id: "versions", label: t.showVersions, icon: import_lucide_react13.History, run: () => panelOn("versions") },
15017
- ...text && host.comments ? [{ id: "comments", label: t.showComments, icon: import_lucide_react13.MessagesSquare, run: () => panelOn("comments") }] : [],
15018
- ...host.send && !doc.data.id.includes(":") ? [{ id: "send", label: t.sendChat, icon: import_lucide_react13.Send, run: () => host.send(doc.data.id) }] : [],
15019
- ...host.rename && doc.data.rights.edit ? [{ id: "rename", label: t.rename, icon: import_lucide_react13.Pencil, run: () => setRenaming(doc.data.name.replace(/\.[^.]+$/, "")) }] : [],
15020
- ...host.remove && current ? [{ id: "trash", label: t.trash, icon: import_lucide_react13.Trash2, run: () => void drop2(current) }] : []
15156
+ { id: "outline", label: t.showOutline, icon: import_lucide_react14.ListTree, run: () => panelOn("outline") },
15157
+ ...doc.data.kind === "markdown" ? [{ id: "links", label: t.showLinks, icon: import_lucide_react14.Link2, run: () => panelOn("links") }] : [],
15158
+ { id: "versions", label: t.showVersions, icon: import_lucide_react14.History, run: () => panelOn("versions") },
15159
+ ...text && host.comments ? [{ id: "comments", label: t.showComments, icon: import_lucide_react14.MessagesSquare, run: () => panelOn("comments") }] : [],
15160
+ ...host.send && !doc.data.id.includes(":") ? [{ id: "send", label: t.sendChat, icon: import_lucide_react14.Send, run: () => host.send(doc.data.id) }] : [],
15161
+ ...host.rename && doc.data.rights.edit ? [{ id: "rename", label: t.rename, icon: import_lucide_react14.Pencil, run: () => setRenaming(doc.data.name.replace(/\.[^.]+$/, "")) }] : [],
15162
+ ...host.remove && current ? [{ id: "trash", label: t.trash, icon: import_lucide_react14.Trash2, run: () => void drop2(current) }] : []
15021
15163
  ] : []
15022
15164
  ];
15023
15165
  (0, import_react19.useEffect)(() => {
@@ -15034,8 +15176,8 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15034
15176
  window.addEventListener("keydown", press, true);
15035
15177
  return () => window.removeEventListener("keydown", press, true);
15036
15178
  });
15037
- let stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-empty", children: [
15038
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FileText, { "aria-hidden": true }),
15179
+ let stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-empty", children: [
15180
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileText, { "aria-hidden": true }),
15039
15181
  t.pick
15040
15182
  ] });
15041
15183
  if (here.documentId) {
@@ -15043,9 +15185,9 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15043
15185
  doc.retry();
15044
15186
  content.retry();
15045
15187
  });
15046
- else if (!doc.data || !content.data) stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
15047
- else if (comparing && versionId && (doc.data.kind === "markdown" || doc.data.kind === "docx")) stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Compare2, { host, documentId: doc.data.id, kind: doc.data.kind, older: content.data, t }, versionId) });
15048
- else if (doc.data.kind === "markdown" || doc.data.kind === "docx") stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15188
+ else if (!doc.data || !content.data) stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.loading });
15189
+ 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) });
15190
+ 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)(
15049
15191
  TextEditor3,
15050
15192
  {
15051
15193
  kind: doc.data.kind,
@@ -15058,6 +15200,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15058
15200
  documentId: doc.data.id,
15059
15201
  onOutline: setOutline,
15060
15202
  onReading: setReading,
15203
+ onSpot: setAim,
15061
15204
  onPanel: (next) => {
15062
15205
  setPanelOpen(true);
15063
15206
  setTab(next);
@@ -15082,7 +15225,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15082
15225
  },
15083
15226
  doc.data.id
15084
15227
  ) });
15085
- else if (doc.data.kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15228
+ else if (doc.data.kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15086
15229
  PdfView,
15087
15230
  {
15088
15231
  bytes: content.data,
@@ -15104,7 +15247,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15104
15247
  },
15105
15248
  `${doc.data.id}:${versionId ?? ""}`
15106
15249
  );
15107
- else if (doc.data.kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15250
+ else if (doc.data.kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15108
15251
  SlidesView,
15109
15252
  {
15110
15253
  html: new TextDecoder().decode(content.data),
@@ -15123,7 +15266,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15123
15266
  },
15124
15267
  doc.data.id
15125
15268
  );
15126
- else if (doc.data.kind === "sheet") stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15269
+ 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)(
15127
15270
  SheetView3,
15128
15271
  {
15129
15272
  bytes: content.data,
@@ -15136,6 +15279,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15136
15279
  host: versionId ? void 0 : host,
15137
15280
  together: doc.data.live,
15138
15281
  documentId: doc.data.id,
15282
+ onSpot: setAim,
15139
15283
  onSaved: () => {
15140
15284
  versions.retry();
15141
15285
  doc.retry();
@@ -15150,9 +15294,9 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15150
15294
  },
15151
15295
  `${doc.data.id}:${versionId ?? ""}`
15152
15296
  ) });
15153
- else stage = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
15297
+ else stage = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
15154
15298
  }
15155
- const Kind = doc.data ? icons3[doc.data.kind] : import_lucide_react13.FileText;
15299
+ const Kind = doc.data ? icons3[doc.data.kind] : import_lucide_react14.FileText;
15156
15300
  const top = Math.min(...outline2.map((h) => h.level));
15157
15301
  const chapters = outline2.reduce((all2, h) => {
15158
15302
  if (h.level === top || !all2.length) all2.push({ head: h, subs: [] });
@@ -15166,16 +15310,26 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15166
15310
  const reach = (h) => h.go ? h.go() : document.getElementById(h.id)?.scrollIntoView({ behavior: "smooth", block: "start" });
15167
15311
  const crumbs = doc.data ? [names2.get(doc.data.spaceId), doc.data.folder].filter(Boolean) : space ? [space.name] : [];
15168
15312
  const panelTabs = [
15169
- ["outline", import_lucide_react13.ListTree, t.outline],
15170
- ...doc.data?.kind === "markdown" ? [["links", import_lucide_react13.Link2, t.links]] : [],
15171
- ["versions", import_lucide_react13.History, t.versions],
15172
- ["details", import_lucide_react13.Info, t.details]
15313
+ ["outline", import_lucide_react14.ListTree, t.outline],
15314
+ ...doc.data?.kind === "markdown" ? [["links", import_lucide_react14.Link2, t.links]] : [],
15315
+ ["versions", import_lucide_react14.History, t.versions],
15316
+ ["details", import_lucide_react14.Info, t.details]
15173
15317
  ];
15174
- if (pdf && host.signatures) panelTabs.push(["signatures", import_lucide_react13.Signature, t.signatures]);
15175
- if (text && host.comments && !versionId) panelTabs.push(["comments", import_lucide_react13.MessagesSquare, t.comments]);
15318
+ if (pdf && host.signatures) panelTabs.push(["signatures", import_lucide_react14.Signature, t.signatures]);
15319
+ if (text && host.comments && !versionId) panelTabs.push(["comments", import_lucide_react14.MessagesSquare, t.comments]);
15176
15320
  const sharing = !!host.links && !!doc.data?.rights.edit && !versionId;
15177
- if (sharing) panelTabs.push(["sharing", import_lucide_react13.Share2, t.sharing]);
15178
- const listToggle = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15321
+ if (sharing) panelTabs.push(["sharing", import_lucide_react14.Share2, t.sharing]);
15322
+ const extra = doc.data ? tabs?.(doc.data, aim) ?? [] : [];
15323
+ const waiting2 = extra.find((x) => x.count);
15324
+ const pending2 = extra.reduce((n, x) => n + (x.count ?? 0), 0);
15325
+ if (pending2 !== heard) {
15326
+ setHeard(pending2);
15327
+ if (waiting2 && pending2 > heard) {
15328
+ setTab(`host:${waiting2.id}`);
15329
+ setPanelOpen(true);
15330
+ }
15331
+ }
15332
+ const listToggle = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15179
15333
  "button",
15180
15334
  {
15181
15335
  ref: listButton,
@@ -15185,10 +15339,10 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15185
15339
  onClick: () => side2("list", !listOpen),
15186
15340
  "aria-label": listOpen ? t.closeList : t.openList,
15187
15341
  title: listOpen ? t.closeList : t.openList,
15188
- children: listOpen ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.PanelLeftClose, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.PanelLeftOpen, { "aria-hidden": true })
15342
+ 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 })
15189
15343
  }
15190
15344
  );
15191
- const panelToggle = doc.data && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15345
+ const panelToggle = doc.data && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15192
15346
  "button",
15193
15347
  {
15194
15348
  ref: panelButton,
@@ -15198,16 +15352,16 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15198
15352
  onClick: () => side2("panel", !panelOpen),
15199
15353
  "aria-label": panelOpen ? t.closePanel : t.openPanel,
15200
15354
  title: panelOpen ? t.closePanel : t.openPanel,
15201
- children: panelOpen ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.PanelRightClose, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.PanelRightOpen, { "aria-hidden": true })
15355
+ 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 })
15202
15356
  }
15203
15357
  );
15204
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs", "data-theme": theme, children: [
15205
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("header", { className: "w100n-docs-bar", children: [
15206
- start && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-start w100n-docs-slot", children: slot(start) }),
15358
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs", "data-theme": theme, children: [
15359
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "w100n-docs-bar", children: [
15360
+ start && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-start w100n-docs-slot", children: slot(start) }),
15207
15361
  narrow && listToggle,
15208
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-tile", "data-kind": doc.data?.kind, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Kind, { "aria-hidden": true }) }),
15209
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-heading", children: [
15210
- renaming !== null && doc.data ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15362
+ /* @__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 }) }),
15363
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-heading", children: [
15364
+ renaming !== null && doc.data ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15211
15365
  "input",
15212
15366
  {
15213
15367
  className: "w100n-docs-title w100n-docs-rename",
@@ -15225,7 +15379,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15225
15379
  }
15226
15380
  }
15227
15381
  }
15228
- ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15382
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15229
15383
  "strong",
15230
15384
  {
15231
15385
  className: "w100n-docs-title",
@@ -15234,31 +15388,31 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15234
15388
  children: doc.data?.name ?? t.documents
15235
15389
  }
15236
15390
  ),
15237
- docbar ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref: setMenusAt, className: "w100n-docs-menus" }) : crumbs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-crumbs", children: crumbs.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
15238
- i > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ChevronRight, { "aria-hidden": true }),
15391
+ 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: [
15392
+ i > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronRight, { "aria-hidden": true }),
15239
15393
  item
15240
- ] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-hint", children: t.hint })
15394
+ ] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-hint", children: t.hint })
15241
15395
  ] }),
15242
- versionId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-badge", children: versions.data?.find((v) => v.id === versionId) && date(versions.data.find((v) => v.id === versionId).createdAt) }),
15243
- versionId && text && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "blue", "aria-pressed": comparing, onClick: () => setComparing(!comparing), children: [
15244
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FileDiff, { "aria-hidden": true }),
15396
+ 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) }),
15397
+ 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: [
15398
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileDiff, { "aria-hidden": true }),
15245
15399
  comparing ? t.hideChanges : t.showChanges
15246
15400
  ] }),
15247
- versionId && here.documentId && host.restore && doc.data?.rights.edit && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-action", disabled: restoring === "busy", onClick: () => void restore(here.documentId, versionId), children: [
15248
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.RotateCcw, { "aria-hidden": true }),
15401
+ 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: [
15402
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.RotateCcw, { "aria-hidden": true }),
15249
15403
  t.restore
15250
15404
  ] }),
15251
- restoring === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-muted", children: t.restoreFailed }),
15252
- doc.data?.convert && host.copyAs && !versionId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "green", disabled: copying === "busy", onClick: () => void copyAs(doc.data), children: [
15253
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FileSpreadsheet, { "aria-hidden": true }),
15405
+ restoring === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", children: t.restoreFailed }),
15406
+ 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: [
15407
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileSpreadsheet, { "aria-hidden": true }),
15254
15408
  t.copyAs
15255
15409
  ] }),
15256
- copying === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-muted", children: t.copyFailed }),
15257
- kept?.id === here.documentId && kept.state === "done" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-muted", role: "status", children: t.templateSaved }),
15258
- kept?.id === here.documentId && kept.state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-muted", role: "alert", children: t.templateFailed }),
15259
- renamed2 === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-muted", children: t.renameFailed }),
15260
- docbar && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { ref: setStatusAt, className: "w100n-docs-status" }),
15261
- host.send && doc.data && !versionId && !doc.data.id.includes(":") && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15410
+ copying === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", children: t.copyFailed }),
15411
+ kept?.id === here.documentId && kept.state === "done" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", role: "status", children: t.templateSaved }),
15412
+ kept?.id === here.documentId && kept.state === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", role: "alert", children: t.templateFailed }),
15413
+ renamed2 === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-muted", children: t.renameFailed }),
15414
+ docbar && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { ref: setStatusAt, className: "w100n-docs-status" }),
15415
+ host.send && doc.data && !versionId && !doc.data.id.includes(":") && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15262
15416
  "button",
15263
15417
  {
15264
15418
  type: "button",
@@ -15267,138 +15421,138 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15267
15421
  "aria-label": t.sendChat,
15268
15422
  title: t.sendChat,
15269
15423
  onClick: () => host.send(doc.data.id),
15270
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Send, { "aria-hidden": true })
15424
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Send, { "aria-hidden": true })
15271
15425
  }
15272
15426
  ),
15273
- sharing && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "w100n-docs-action w100n-docs-square", "aria-label": t.share, title: t.share, onClick: () => {
15427
+ 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: () => {
15274
15428
  setTab("sharing");
15275
15429
  side2("panel", true);
15276
- }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Share2, { "aria-hidden": true }) }),
15430
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Share2, { "aria-hidden": true }) }),
15277
15431
  doc.data && !versionId && actions?.(doc.data),
15278
15432
  narrow && panelToggle,
15279
- end && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-end w100n-docs-slot", children: slot(end) })
15433
+ end && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-end w100n-docs-slot", children: slot(end) })
15280
15434
  ] }),
15281
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { ref: body, className: "w100n-docs-body", children: [
15282
- listOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { className: "w100n-docs-side w100n-docs-list", "aria-label": t.documents, children: [
15283
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-head", children: [
15284
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-row", children: [
15285
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "w100n-docs-caption", children: [
15286
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Files, { "aria-hidden": true }),
15435
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: body, className: "w100n-docs-body", children: [
15436
+ listOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("aside", { className: "w100n-docs-side w100n-docs-list", "aria-label": t.documents, children: [
15437
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-head", children: [
15438
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-row", children: [
15439
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "w100n-docs-caption", children: [
15440
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Files, { "aria-hidden": true }),
15287
15441
  t.documents,
15288
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: all.length })
15442
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: all.length })
15289
15443
  ] }),
15290
- host.create && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-new", onKeyDown: (e) => {
15444
+ host.create && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-new", onKeyDown: (e) => {
15291
15445
  if (e.key === "Escape" && adding) {
15292
15446
  e.stopPropagation();
15293
15447
  setAdding(false);
15294
15448
  }
15295
15449
  }, children: [
15296
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-action", "aria-haspopup": "menu", "aria-expanded": adding, disabled: sending === "busy", onClick: () => setAdding(!adding), children: [
15297
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Plus, { "aria-hidden": true }),
15298
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: sending === "busy" ? t.uploading : t.create }),
15299
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true })
15450
+ /* @__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: [
15451
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Plus, { "aria-hidden": true }),
15452
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: sending === "busy" ? t.uploading : t.create }),
15453
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronDown, { "aria-hidden": true })
15300
15454
  ] }),
15301
- adding && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { role: "menu", className: "w100n-docs-menu", children: [
15302
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15455
+ adding && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "menu", className: "w100n-docs-menu", children: [
15456
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15303
15457
  setAdding(false);
15304
15458
  setMaking(true);
15305
15459
  }, children: [
15306
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FilePlus, { "aria-hidden": true }) }),
15307
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: t.newTitle })
15460
+ /* @__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 }) }),
15461
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.newTitle })
15308
15462
  ] }),
15309
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15463
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15310
15464
  setAdding(false);
15311
15465
  upload.current.click();
15312
15466
  }, children: [
15313
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Upload, { "aria-hidden": true }) }),
15314
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: t.uploadFile })
15467
+ /* @__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 }) }),
15468
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.uploadFile })
15315
15469
  ] })
15316
15470
  ] }),
15317
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { ref: upload, type: "file", hidden: true, "aria-label": t.uploadFile, accept: ".docx,.md,.markdown,.pdf,.xlsx,.csv,.html,.htm", onChange: (e) => {
15471
+ /* @__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) => {
15318
15472
  const file = e.target.files?.[0];
15319
15473
  e.target.value = "";
15320
15474
  if (file) void send(file);
15321
15475
  } })
15322
15476
  ] }),
15323
- /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)(import_lucide_react13.X, { "aria-hidden": true }) })
15477
+ /* @__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 }) })
15324
15478
  ] }),
15325
- (spaces.data?.length ?? 0) > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-picker", onKeyDown: (e) => {
15479
+ (spaces.data?.length ?? 0) > 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-picker", onKeyDown: (e) => {
15326
15480
  if (e.key !== "Escape" || !picking) return;
15327
15481
  e.stopPropagation();
15328
15482
  setPicking(false);
15329
15483
  e.currentTarget.querySelector("button").focus();
15330
15484
  }, children: [
15331
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-field", "aria-haspopup": "listbox", "aria-expanded": picking, onClick: () => setPicking(!picking), children: [
15332
- space ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-dot", style: { background: space.color ?? void 0 } }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.LayoutGrid, { "aria-hidden": true }) }),
15333
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: space?.name ?? t.allProjects }),
15334
- !space && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-count", children: all.length }),
15335
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true })
15485
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-field", "aria-haspopup": "listbox", "aria-expanded": picking, onClick: () => setPicking(!picking), children: [
15486
+ 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 }) }),
15487
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: space?.name ?? t.allProjects }),
15488
+ !space && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-count", children: all.length }),
15489
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronDown, { "aria-hidden": true })
15336
15490
  ] }),
15337
- picking && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { role: "listbox", className: "w100n-docs-menu", children: [
15338
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "option", "aria-selected": !spaceId, onClick: () => pick(null), children: [
15339
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-all", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.LayoutGrid, { "aria-hidden": true }) }),
15340
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: t.allProjects }),
15341
- !spaceId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Check, { "aria-hidden": true })
15491
+ picking && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "listbox", className: "w100n-docs-menu", children: [
15492
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "option", "aria-selected": !spaceId, onClick: () => pick(null), children: [
15493
+ /* @__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 }) }),
15494
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.allProjects }),
15495
+ !spaceId && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Check, { "aria-hidden": true })
15342
15496
  ] }),
15343
- groups2.map((group) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { role: "group", "aria-label": group || void 0, children: [
15344
- group && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-menu-caption", children: group }),
15345
- (spaces.data ?? []).filter((item) => (item.group ?? "") === group).map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "option", "aria-selected": item.id === spaceId, onClick: () => pick(item.id), children: [
15346
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-dot", style: { background: item.color ?? void 0 } }),
15347
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: item.name }),
15348
- !spaceId && counts.get(item.id) ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-count", children: counts.get(item.id) }) : null,
15349
- item.id === spaceId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Check, { "aria-hidden": true })
15497
+ groups2.map((group) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "group", "aria-label": group || void 0, children: [
15498
+ group && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-menu-caption", children: group }),
15499
+ (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: [
15500
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-dot", style: { background: item.color ?? void 0 } }),
15501
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: item.name }),
15502
+ !spaceId && counts.get(item.id) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-count", children: counts.get(item.id) }) : null,
15503
+ item.id === spaceId && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Check, { "aria-hidden": true })
15350
15504
  ] }, item.id))
15351
15505
  ] }, group))
15352
15506
  ] })
15353
15507
  ] }),
15354
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-filters", children: [
15355
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15356
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Search, { "aria-hidden": true }),
15357
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { ref: finder, value: query, onChange: (event) => setQuery(event.target.value), placeholder: t.search, "aria-label": t.search }),
15358
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("kbd", { children: "\u2318O" })
15508
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-filters", children: [
15509
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15510
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Search, { "aria-hidden": true }),
15511
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { ref: finder, value: query, onChange: (event) => setQuery(event.target.value), placeholder: t.search, "aria-label": t.search }),
15512
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("kbd", { children: "\u2318O" })
15359
15513
  ] }),
15360
- present.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-types", onKeyDown: (e) => {
15514
+ present.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-types", onKeyDown: (e) => {
15361
15515
  if (e.key !== "Escape" || !typing) return;
15362
15516
  e.stopPropagation();
15363
15517
  setTyping(false);
15364
15518
  e.currentTarget.querySelector("button").focus();
15365
15519
  }, children: [
15366
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-field", "aria-haspopup": "listbox", "aria-expanded": typing, "data-on": picked.length > 0, onClick: () => setTyping(!typing), children: [
15367
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ListFilter, { "aria-hidden": true }),
15368
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: t.typeFilter }),
15369
- picked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-badge", children: picked.length }),
15370
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true })
15520
+ /* @__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: [
15521
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ListFilter, { "aria-hidden": true }),
15522
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.typeFilter }),
15523
+ picked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-badge", children: picked.length }),
15524
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ChevronDown, { "aria-hidden": true })
15371
15525
  ] }),
15372
- typing && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { role: "listbox", "aria-multiselectable": true, "aria-label": t.kind, className: "w100n-docs-menu", children: [
15526
+ typing && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "listbox", "aria-multiselectable": true, "aria-label": t.kind, className: "w100n-docs-menu", children: [
15373
15527
  present.map((item) => {
15374
15528
  const Icon = icons3[item];
15375
15529
  const on2 = picked.includes(item);
15376
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "option", "aria-selected": on2, onClick: () => setPicked(on2 ? picked.filter((k) => k !== item) : [...picked, item]), children: [
15377
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-box", children: on2 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Check, { "aria-hidden": true }) }),
15378
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-tile", "data-kind": item, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { "aria-hidden": true }) }),
15379
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: t.kinds[item] }),
15380
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-count", children: all.filter((doc2) => doc2.kind === item).length })
15530
+ 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: [
15531
+ /* @__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 }) }),
15532
+ /* @__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 }) }),
15533
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: t.kinds[item] }),
15534
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-count", children: all.filter((doc2) => doc2.kind === item).length })
15381
15535
  ] }, item);
15382
15536
  }),
15383
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-menu-foot", children: [
15384
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setPicked(present), children: t.selectAll }),
15385
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", onClick: () => setPicked([]), children: t.clearPick })
15537
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-menu-foot", children: [
15538
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setPicked(present), children: t.selectAll }),
15539
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setPicked([]), children: t.clearPick })
15386
15540
  ] })
15387
15541
  ] })
15388
15542
  ] })
15389
15543
  ] }),
15390
- picked.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-chips", role: "group", "aria-label": t.kind, children: picked.map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", "aria-pressed": true, "aria-label": `${t.clearPick}: ${t.kinds[item]}`, onClick: () => setPicked(picked.filter((k) => k !== item)), children: [
15544
+ 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: [
15391
15545
  t.kinds[item],
15392
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.X, { "aria-hidden": true })
15546
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.X, { "aria-hidden": true })
15393
15547
  ] }, item)) })
15394
15548
  ] }),
15395
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-cards", children: [
15396
- sending === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.uploadFailed }),
15549
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-cards", children: [
15550
+ sending === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.uploadFailed }),
15397
15551
  list.error && failed(list.retry),
15398
- list.loading && !list.data && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-muted", children: t.loading }),
15399
- notice && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-muted", role: "status", children: notice }),
15400
- list.data && !shown.length && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-muted", children: all.length ? t.nothing : t.empty }),
15401
- list.data && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15552
+ list.loading && !list.data && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.loading }),
15553
+ notice && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", role: "status", children: notice }),
15554
+ list.data && !shown.length && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: all.length ? t.nothing : t.empty }),
15555
+ list.data && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15402
15556
  Tree,
15403
15557
  {
15404
15558
  items: shown,
@@ -15414,7 +15568,6 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15414
15568
  onOpen: open,
15415
15569
  onMenu: (item, e) => {
15416
15570
  setSpot(null);
15417
- setPeek(null);
15418
15571
  setMenu({ item, x: Math.min(e.clientX, innerWidth - 290), y: Math.min(e.clientY, innerHeight - 440), sure: false });
15419
15572
  },
15420
15573
  onFolderMenu: host.create || host.makeFolder ? (at2, key2, e) => {
@@ -15425,43 +15578,45 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15425
15578
  const item = all.find((x) => x.id === id);
15426
15579
  if (item) moveTo(item, to);
15427
15580
  } : void 0,
15428
- onWarm: (item, at2) => {
15429
- if (item) warm(item, at2);
15430
- else {
15431
- clearTimeout(hover.current);
15432
- setPeek(null);
15433
- }
15434
- }
15581
+ onWarm: (item) => item ? warm(item) : clearTimeout(hover.current)
15435
15582
  }
15436
15583
  )
15437
15584
  ] })
15438
15585
  ] }),
15439
15586
  !narrow && !listOpen && listToggle,
15440
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("main", { className: "w100n-docs-stage", children: [
15587
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { className: "w100n-docs-stage", children: [
15441
15588
  !narrow && !panelOpen && panelToggle,
15442
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-bare", children: stage })
15589
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-bare", children: stage })
15443
15590
  ] }),
15444
- doc.data && panelOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { ref: panel, className: "w100n-docs-side w100n-docs-panel", "aria-label": t.details, children: [
15445
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-head", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-row", children: [
15446
- /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsxs)("button", { type: "button", role: "tab", "aria-selected": tab === key2, tabIndex: tab === key2 ? 0 : -1, "aria-label": label, title: label, onClick: () => setTab(key2), children: [
15447
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { "aria-hidden": true }),
15448
- (panelTabs.length < 4 || tab === key2 && panelTabs.length < 5) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: label })
15449
- ] }, key2)) }),
15450
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "w100n-docs-close", onClick: () => side2("panel", false), "aria-label": t.closePanel, title: t.closePanel, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.X, { "aria-hidden": true }) })
15451
- ] }) }),
15452
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-panel-body", role: "tabpanel", "aria-label": panelTabs.find(([key2]) => key2 === tab)?.[2], children: [
15453
- tab === "outline" && (outline2.length ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("nav", { className: "w100n-docs-outline", "aria-label": t.outline, children: [
15454
- now && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-reading", children: [
15455
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("i", { style: { width: `${Math.round(now.progress * 100)}%` } }) }),
15456
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("small", { children: [
15591
+ doc.data && panelOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("aside", { ref: panel, className: "w100n-docs-side w100n-docs-panel", "data-wide": !!extra.find((x) => `host:${x.id}` === tab)?.wide, "aria-label": t.details, children: [
15592
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-head", children: [
15593
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-row", children: [
15594
+ /* @__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, count]) => /* @__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: [
15595
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { "aria-hidden": true }),
15596
+ (panelTabs.length < 4 || tab === key2 && panelTabs.length < 5) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: label }),
15597
+ !!count && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { className: "w100n-docs-count", children: count })
15598
+ ] }, key2)) }),
15599
+ /* @__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 }) })
15600
+ ] }),
15601
+ !!extra.length && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-hosttabs", role: "tablist", "aria-label": t.details, children: extra.map((x) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "tab", "aria-selected": tab === `host:${x.id}`, onClick: () => setTab(`host:${x.id}`), children: [
15602
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(x.icon, { "aria-hidden": true }),
15603
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: x.label }),
15604
+ !!x.count && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { className: "w100n-docs-count", children: x.count })
15605
+ ] }, x.id)) })
15606
+ ] }),
15607
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-panel-body", role: "tabpanel", "aria-label": panelTabs.find(([key2]) => key2 === tab)?.[2] ?? extra.find((x) => `host:${x.id}` === tab)?.label, children: [
15608
+ tab === "outline" && (outline2.length ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "w100n-docs-outline", "aria-label": t.outline, children: [
15609
+ now && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-reading", children: [
15610
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { style: { width: `${Math.round(now.progress * 100)}%` } }) }),
15611
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
15457
15612
  Math.round(now.progress * 100),
15458
15613
  "% ",
15459
15614
  t.read
15460
15615
  ] })
15461
15616
  ] }),
15462
- outline2.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15463
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Search, { "aria-hidden": true }),
15464
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { value: hunt, onChange: (e) => setHunt(e.target.value), placeholder: t.findHeading, "aria-label": t.findHeading })
15617
+ outline2.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "w100n-docs-field w100n-docs-search", children: [
15618
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Search, { "aria-hidden": true }),
15619
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { value: hunt, onChange: (e) => setHunt(e.target.value), placeholder: t.findHeading, "aria-label": t.findHeading })
15465
15620
  ] }),
15466
15621
  chapters.map((c, i) => {
15467
15622
  const subs = words3.length ? c.subs.filter(hit) : c.subs;
@@ -15469,13 +15624,13 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15469
15624
  const opened3 = words3.length > 0 || (fold[c.head.id] ?? i === reached);
15470
15625
  const named3 = /^(\d+)[.)]?\s+(.+)$/.exec(c.head.text);
15471
15626
  const mark = c.subs.findIndex((s) => s.id === now?.id);
15472
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-chapter", "data-state": reached < 0 ? void 0 : i < reached ? "done" : i === reached ? "now" : void 0, children: [
15473
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-chapter-row", children: [
15474
- /* @__PURE__ */ (0, import_jsx_runtime18.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: [
15475
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-chapter-num", children: named3 ? named3[1] : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Bookmark, { "aria-hidden": true }) }),
15476
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: named3 ? named3[2] : c.head.text })
15627
+ 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: [
15628
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-chapter-row", children: [
15629
+ /* @__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: [
15630
+ /* @__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 }) }),
15631
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: named3 ? named3[2] : c.head.text })
15477
15632
  ] }),
15478
- c.subs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15633
+ c.subs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15479
15634
  "button",
15480
15635
  {
15481
15636
  type: "button",
@@ -15485,13 +15640,13 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15485
15640
  title: opened3 ? t.hideSections : t.showSections,
15486
15641
  onClick: () => setFold({ ...fold, [c.head.id]: !opened3 }),
15487
15642
  children: [
15488
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: c.subs.length }),
15489
- opened3 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ChevronDown, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ChevronRight, { "aria-hidden": true })
15643
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: c.subs.length }),
15644
+ 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 })
15490
15645
  ]
15491
15646
  }
15492
15647
  )
15493
15648
  ] }),
15494
- opened3 && subs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-sections", children: subs.map((s) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15649
+ 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)(
15495
15650
  "button",
15496
15651
  {
15497
15652
  type: "button",
@@ -15500,7 +15655,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15500
15655
  "data-state": i < reached || i === reached && c.subs.indexOf(s) < mark ? "done" : void 0,
15501
15656
  "aria-current": now?.id === s.id ? "location" : void 0,
15502
15657
  children: [
15503
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("i", { "aria-hidden": true }),
15658
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { "aria-hidden": true }),
15504
15659
  s.text
15505
15660
  ]
15506
15661
  },
@@ -15508,47 +15663,47 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15508
15663
  )) })
15509
15664
  ] }, c.head.id);
15510
15665
  })
15511
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-muted", children: t.noOutline })),
15512
- tab === "links" && doc.data.kind === "markdown" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Backlinks, { host, current: doc.data, notes: notes3, t, onOpen: open }),
15513
- tab === "versions" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-versions", children: [
15666
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.noOutline })),
15667
+ tab === "links" && doc.data.kind === "markdown" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Backlinks, { host, current: doc.data, notes: notes3, t, onOpen: open }),
15668
+ tab === "versions" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-versions", children: [
15514
15669
  versions.error && failed(versions.retry),
15515
- (versions.data ?? []).map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15670
+ (versions.data ?? []).map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15516
15671
  "button",
15517
15672
  {
15518
15673
  type: "button",
15519
15674
  "aria-pressed": (versionId ?? "current") === item.id || !versionId && item.current,
15520
15675
  onClick: () => view(item.current ? null : item.id),
15521
15676
  children: [
15522
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("b", { children: [
15677
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("b", { children: [
15523
15678
  date(item.createdAt),
15524
- item.current && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "w100n-docs-badge", children: t.current })
15679
+ item.current && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-docs-badge", children: t.current })
15525
15680
  ] }),
15526
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: [item.author?.name, size2(item.size), item.note].filter(Boolean).join(" \xB7 ") })
15681
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: [item.author?.name, size2(item.size), item.note].filter(Boolean).join(" \xB7 ") })
15527
15682
  ]
15528
15683
  },
15529
15684
  item.id
15530
15685
  ))
15531
15686
  ] }),
15532
- tab === "details" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("dl", { className: "w100n-docs-details", children: [
15533
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.kind }),
15534
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: t.kinds[doc.data.kind] }),
15535
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.size }),
15536
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: size2(doc.data.size) }),
15537
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.updated }),
15538
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: date(doc.data.updatedAt) }),
15539
- doc.data.updatedBy && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
15540
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.by }),
15541
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: doc.data.updatedBy.name })
15687
+ tab === "details" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("dl", { className: "w100n-docs-details", children: [
15688
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.kind }),
15689
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: t.kinds[doc.data.kind] }),
15690
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.size }),
15691
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: size2(doc.data.size) }),
15692
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.updated }),
15693
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: date(doc.data.updatedAt) }),
15694
+ doc.data.updatedBy && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15695
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.by }),
15696
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { children: doc.data.updatedBy.name })
15542
15697
  ] }),
15543
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { children: t.rights }),
15544
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { children: [doc.data.rights.view && t.view, doc.data.rights.comment && t.comment, doc.data.rights.edit && t.edit].filter(Boolean).join(", ") })
15698
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { children: t.rights }),
15699
+ /* @__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(", ") })
15545
15700
  ] }),
15546
- tab === "details" && host.exportAs && !!doc.data.exports?.length && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-about", children: [
15547
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "w100n-docs-caption", children: [
15548
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FileDown, { "aria-hidden": true }),
15701
+ tab === "details" && host.exportAs && !!doc.data.exports?.length && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-about", children: [
15702
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "w100n-docs-caption", children: [
15703
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileDown, { "aria-hidden": true }),
15549
15704
  t.exportAs
15550
15705
  ] }),
15551
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-chips", children: doc.data.exports.map((format) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15706
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-chips", children: doc.data.exports.map((format) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15552
15707
  "button",
15553
15708
  {
15554
15709
  type: "button",
@@ -15556,22 +15711,22 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15556
15711
  disabled: exporting === "busy",
15557
15712
  onClick: () => void exportAs(doc.data, format),
15558
15713
  children: [
15559
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FileDown, { "aria-hidden": true }),
15714
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileDown, { "aria-hidden": true }),
15560
15715
  format.toUpperCase()
15561
15716
  ]
15562
15717
  },
15563
15718
  format
15564
15719
  )) }),
15565
- exporting === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-muted", children: t.exportFailed })
15720
+ exporting === "failed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.exportFailed })
15566
15721
  ] }),
15567
- tab === "comments" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref: setBox }),
15568
- tab === "sharing" && sharing && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Sharing, { host, doc: doc.data, t, language, team: names2.get(doc.data.spaceId) }),
15569
- tab === "signatures" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-versions", children: [
15722
+ tab === "comments" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref: setBox }),
15723
+ tab === "sharing" && sharing && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sharing, { host, doc: doc.data, t, language, team: names2.get(doc.data.spaceId) }),
15724
+ tab === "signatures" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-versions", children: [
15570
15725
  signatures.error && failed(signatures.retry),
15571
- signatures.data?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "w100n-docs-muted", children: t.noSignatures }),
15726
+ signatures.data?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "w100n-docs-muted", children: t.noSignatures }),
15572
15727
  (signatures.data ?? []).map((entry2) => {
15573
15728
  const signed = versions.data?.find((v) => v.id === entry2.versionId);
15574
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15729
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15575
15730
  "button",
15576
15731
  {
15577
15732
  type: "button",
@@ -15579,26 +15734,27 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15579
15734
  "aria-pressed": !!signed && (versionId ?? versions.data?.find((v) => v.current)?.id) === signed.id,
15580
15735
  onClick: () => view(signed.current ? null : signed.id),
15581
15736
  children: [
15582
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("b", { children: [
15737
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("b", { children: [
15583
15738
  entry2.signer.name,
15584
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "w100n-docs-badge", children: [
15739
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "w100n-docs-badge", children: [
15585
15740
  t.page,
15586
15741
  " ",
15587
15742
  entry2.page
15588
15743
  ] })
15589
15744
  ] }),
15590
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: [date(entry2.signedAt), t.methods[entry2.method], signed && (signed.current ? t.current : `${t.version} ${date(signed.createdAt)}`)].filter(Boolean).join(" \xB7 ") })
15745
+ /* @__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 ") })
15591
15746
  ]
15592
15747
  },
15593
15748
  entry2.id
15594
15749
  );
15595
15750
  })
15596
15751
  ] }),
15752
+ extra.find((x) => `host:${x.id}` === tab)?.body,
15597
15753
  aside?.(doc.data)
15598
15754
  ] })
15599
15755
  ] })
15600
15756
  ] }),
15601
- jump && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15757
+ jump && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15602
15758
  Jump,
15603
15759
  {
15604
15760
  mode: jump,
@@ -15611,14 +15767,13 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15611
15767
  place: (item) => [!spaceId && names2.get(item.spaceId), item.folder].filter(Boolean).join(" / ")
15612
15768
  }
15613
15769
  ),
15614
- making && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(NewDocument, { host, t, onClose: () => setMaking(false), onMade: (made2) => {
15770
+ making && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(NewDocument, { host, t, onClose: () => setMaking(false), onMade: (made2) => {
15615
15771
  setMaking(false);
15616
15772
  opened2(made2);
15617
15773
  } }),
15618
- peek && !menu && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-peek", role: "tooltip", style: { left: peek.x, top: peek.y }, children: card(peek.item) }),
15619
- menu && /* @__PURE__ */ (0, import_jsx_runtime18.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: [
15620
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-context-head", children: card(menu.item) }),
15621
- menu.moving ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w100n-docs-context-list", children: ["", ...dirs.data.get(menu.item.spaceId)].map((folder2) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15774
+ 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: [
15775
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w100n-docs-context-head", children: card(menu.item) }),
15776
+ 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)(
15622
15777
  "button",
15623
15778
  {
15624
15779
  type: "button",
@@ -15627,99 +15782,99 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15627
15782
  onClick: () => moveTo(menu.item, { spaceId: menu.item.spaceId, folder: folder2 }),
15628
15783
  style: { paddingLeft: 10 + 14 * (folder2 ? folder2.split("/").length : 0) },
15629
15784
  children: [
15630
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Folder, { "aria-hidden": true }),
15785
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Folder, { "aria-hidden": true }),
15631
15786
  folder2 ? folder2.split("/").pop() : names2.get(menu.item.spaceId) ?? t.topLevel
15632
15787
  ]
15633
15788
  },
15634
15789
  folder2
15635
- )) }) : menu.sure ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15636
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: t.trashAsk.replace("{name}", menu.item.name) }),
15637
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15638
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setMenu({ ...menu, sure: false }), children: t.cancel }),
15639
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => void drop2(menu.item), children: [
15640
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15790
+ )) }) : menu.sure ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15791
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: t.trashAsk.replace("{name}", menu.item.name) }),
15792
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15793
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setMenu({ ...menu, sure: false }), children: t.cancel }),
15794
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => void drop2(menu.item), children: [
15795
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15641
15796
  t.trash
15642
15797
  ] })
15643
15798
  ] })
15644
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
15645
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15799
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15800
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15646
15801
  setMenu(null);
15647
15802
  open(menu.item);
15648
15803
  }, children: [
15649
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FileText, { "aria-hidden": true }),
15804
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FileText, { "aria-hidden": true }),
15650
15805
  t.openFile
15651
15806
  ] }),
15652
- host.href && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15807
+ host.href && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15653
15808
  setMenu(null);
15654
15809
  window.open(host.href(menu.item.id), "_blank", "noopener");
15655
15810
  }, children: [
15656
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ExternalLink, { "aria-hidden": true }),
15811
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ExternalLink, { "aria-hidden": true }),
15657
15812
  t.openTab
15658
15813
  ] }),
15659
- host.href && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => navigator.clipboard.writeText(host.href(menu.item.id)), t.linkCopied), children: [
15660
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Link, { "aria-hidden": true }),
15814
+ 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: [
15815
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Link, { "aria-hidden": true }),
15661
15816
  t.copyLink
15662
15817
  ] }),
15663
- host.send && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15818
+ host.send && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15664
15819
  setMenu(null);
15665
15820
  host.send(menu.item.id);
15666
15821
  }, children: [
15667
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Send, { "aria-hidden": true }),
15822
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Send, { "aria-hidden": true }),
15668
15823
  t.sendChat
15669
15824
  ] }),
15670
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", {}),
15671
- host.rename && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15825
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15826
+ host.rename && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15672
15827
  const item = menu.item;
15673
15828
  setMenu(null);
15674
15829
  setEdit({ key: `file:${item.id}`, text: item.name.replace(/\.[^.]+$/, ""), run: (text2) => retitle(item, text2) });
15675
15830
  }, children: [
15676
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Pencil, { "aria-hidden": true }),
15831
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Pencil, { "aria-hidden": true }),
15677
15832
  t.rename
15678
15833
  ] }),
15679
- host.move && dirs.data?.has(menu.item.spaceId) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", "aria-haspopup": "menu", onClick: () => setMenu({ ...menu, moving: true }), children: [
15680
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FolderInput, { "aria-hidden": true }),
15834
+ 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: [
15835
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FolderInput, { "aria-hidden": true }),
15681
15836
  t.moveTo
15682
15837
  ] }),
15683
- host.create && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(async () => copy2(await host.document(menu.item.id))), children: [
15684
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Copy, { "aria-hidden": true }),
15838
+ 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: [
15839
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Copy, { "aria-hidden": true }),
15685
15840
  t.makeCopy
15686
15841
  ] }),
15687
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => fetchFile(menu.item)), children: [
15688
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Download, { "aria-hidden": true }),
15842
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => fetchFile(menu.item)), children: [
15843
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Download, { "aria-hidden": true }),
15689
15844
  t.download
15690
15845
  ] }),
15691
- host.saveTemplate && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => host.saveTemplate(menu.item.id), t.templateSaved), children: [
15692
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Bookmark, { "aria-hidden": true }),
15846
+ host.saveTemplate && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => void act(() => host.saveTemplate(menu.item.id), t.templateSaved), children: [
15847
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Bookmark, { "aria-hidden": true }),
15693
15848
  t.saveTemplate
15694
15849
  ] }),
15695
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15850
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15696
15851
  setMenu(null);
15697
15852
  open(menu.item);
15698
15853
  setTab("details");
15699
15854
  side2("panel", true);
15700
15855
  }, children: [
15701
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Info, { "aria-hidden": true }),
15856
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Info, { "aria-hidden": true }),
15702
15857
  t.details
15703
15858
  ] }),
15704
- host.remove && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
15705
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", {}),
15706
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setMenu({ ...menu, sure: true }), children: [
15707
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15859
+ host.remove && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15860
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15861
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setMenu({ ...menu, sure: true }), children: [
15862
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15708
15863
  t.trash
15709
15864
  ] })
15710
15865
  ] })
15711
15866
  ] })
15712
15867
  ] }),
15713
- spot3 && /* @__PURE__ */ (0, import_jsx_runtime18.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: [
15714
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-context-head", children: [
15715
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("b", { children: folderNamed(spot3.at) }),
15716
- spot3.at.folder && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: [names2.get(spot3.at.spaceId), ...spot3.at.folder.split("/").slice(0, -1)].filter(Boolean).join(" / ") })
15868
+ 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: [
15869
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-context-head", children: [
15870
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: folderNamed(spot3.at) }),
15871
+ 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(" / ") })
15717
15872
  ] }),
15718
- spot3.sure ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15719
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: t.folderTrashAsk.replace("{name}", folderNamed(spot3.at)) }),
15720
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15721
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setSpot({ ...spot3, sure: false }), children: t.cancel }),
15722
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => {
15873
+ spot3.sure ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w100n-docs-context-ask", children: [
15874
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: t.folderTrashAsk.replace("{name}", folderNamed(spot3.at)) }),
15875
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "w100n-pdf-dialog-end", children: [
15876
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => setSpot({ ...spot3, sure: false }), children: t.cancel }),
15877
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "w100n-docs-action", "data-tone": "red", onClick: () => {
15723
15878
  const at2 = spot3.at;
15724
15879
  const inside3 = doc.data && doc.data.spaceId === at2.spaceId && `${doc.data.folder ?? ""}/`.startsWith(`${at2.folder}/`);
15725
15880
  void act(() => host.removeFolder(at2), t.trashed).then(() => {
@@ -15727,42 +15882,42 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15727
15882
  if (inside3) go({ spaceId: here.spaceId, documentId: null });
15728
15883
  });
15729
15884
  }, children: [
15730
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15885
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15731
15886
  t.trash
15732
15887
  ] })
15733
15888
  ] })
15734
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
15735
- host.create && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15889
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15890
+ host.create && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15736
15891
  const at2 = spot3.at;
15737
15892
  setSpot(null);
15738
15893
  void note(t.untitled, true, at2);
15739
15894
  }, children: [
15740
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FilePlus, { "aria-hidden": true }),
15895
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FilePlus, { "aria-hidden": true }),
15741
15896
  t.newNoteHere
15742
15897
  ] }),
15743
- host.makeFolder && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15898
+ host.makeFolder && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15744
15899
  const at2 = spot3.at;
15745
15900
  setSpot(null);
15746
15901
  setEdit({ key: `new:${spot3.key}`, text: t.newFolder, run: (name) => act(() => host.makeFolder(at2, name)).then(refresh) });
15747
15902
  }, children: [
15748
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.FolderPlus, { "aria-hidden": true }),
15903
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.FolderPlus, { "aria-hidden": true }),
15749
15904
  t.newFolder
15750
15905
  ] }),
15751
- spot3.at.folder && host.renameFolder && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
15752
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", {}),
15753
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15906
+ spot3.at.folder && host.renameFolder && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15907
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15908
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", onClick: () => {
15754
15909
  const at2 = spot3.at;
15755
15910
  setSpot(null);
15756
15911
  setEdit({ key: `dir:${spot3.key}`, text: folderNamed(at2), run: (name) => name === folderNamed(at2) ? Promise.resolve() : act(() => host.renameFolder(at2, name)).then(refresh) });
15757
15912
  }, children: [
15758
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Pencil, { "aria-hidden": true }),
15913
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Pencil, { "aria-hidden": true }),
15759
15914
  t.renameFolder
15760
15915
  ] })
15761
15916
  ] }),
15762
- spot3.at.folder && host.removeFolder && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
15763
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", {}),
15764
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setSpot({ ...spot3, sure: true }), children: [
15765
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Trash2, { "aria-hidden": true }),
15917
+ spot3.at.folder && host.removeFolder && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
15918
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", {}),
15919
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "menuitem", "data-tone": "red", onClick: () => setSpot({ ...spot3, sure: true }), children: [
15920
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Trash2, { "aria-hidden": true }),
15766
15921
  t.trashFolder
15767
15922
  ] })
15768
15923
  ] })
@@ -15774,23 +15929,23 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
15774
15929
 
15775
15930
  // src/FilePreview.tsx
15776
15931
  var import_react20 = require("react");
15777
- var import_jsx_runtime19 = require("react/jsx-runtime");
15932
+ var import_jsx_runtime20 = require("react/jsx-runtime");
15778
15933
  function FilePreview({ url, name, mimeType, size: size2 = 0, bytes, pdfWorker }) {
15779
15934
  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)))) }));
15780
15935
  const kind = kindOf(name, mimeType);
15781
15936
  if (!kind) return null;
15782
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w100n-preview", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Thumb, { host: source, item: { id: url.split("?")[0], spaceId: "", name, kind, size: size2, updatedAt: "" } }) });
15937
+ 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: "" } }) });
15783
15938
  }
15784
15939
 
15785
15940
  // src/GuestDocument.tsx
15786
15941
  var import_react21 = require("react");
15787
- var import_lucide_react14 = require("lucide-react");
15942
+ var import_lucide_react15 = require("lucide-react");
15788
15943
  init_text();
15789
15944
  init_useLoad();
15790
- var import_jsx_runtime20 = require("react/jsx-runtime");
15945
+ var import_jsx_runtime21 = require("react/jsx-runtime");
15791
15946
  var TextEditor4 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_TextEditor(), TextEditor_exports)));
15792
15947
  var SheetView4 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_SheetView(), SheetView_exports)));
15793
- var icons4 = { 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 };
15948
+ 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 };
15794
15949
  var GuestRefused = class extends Error {
15795
15950
  constructor(reason, file = "", sharedBy = "") {
15796
15951
  super(reason);
@@ -15848,18 +16003,18 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15848
16003
  };
15849
16004
  const top = (file2, badge) => {
15850
16005
  const kind2 = file2 ? kindOf(file2.name, file2.mimeType) : null;
15851
- const Kind = kind2 ? icons4[kind2] : import_lucide_react14.FileText;
15852
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { className: "w100n-docs-bar w100n-guest-bar", children: [
15853
- brand && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w100n-guest-brand", children: brand }),
15854
- file2 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
15855
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w100n-docs-tile", "data-kind": kind2, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Kind, { "aria-hidden": true }) }),
15856
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-docs-heading", children: [
15857
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { className: "w100n-docs-title", children: file2.name }),
15858
- file2.sharedBy && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w100n-docs-crumbs", children: t.sharedBy.replace("{name}", file2.sharedBy) })
16006
+ const Kind = kind2 ? icons4[kind2] : import_lucide_react15.FileText;
16007
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("header", { className: "w100n-docs-bar w100n-guest-bar", children: [
16008
+ brand && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-guest-brand", children: brand }),
16009
+ file2 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
16010
+ /* @__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 }) }),
16011
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs-heading", children: [
16012
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { className: "w100n-docs-title", children: file2.name }),
16013
+ file2.sharedBy && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-docs-crumbs", children: t.sharedBy.replace("{name}", file2.sharedBy) })
15859
16014
  ] }),
15860
- badge && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w100n-docs-badge", "data-kind": kind2, children: badge }),
15861
- file2.download && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-docs-end", children: [
15862
- (kind2 === "docx" || kind2 === "markdown" || kind2 === "sheet" || kind2 === "slides") && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
16015
+ badge && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w100n-docs-badge", "data-kind": kind2, children: badge }),
16016
+ file2.download && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs-end", children: [
16017
+ (kind2 === "docx" || kind2 === "markdown" || kind2 === "sheet" || kind2 === "slides") && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15863
16018
  "button",
15864
16019
  {
15865
16020
  type: "button",
@@ -15870,41 +16025,41 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15870
16025
  "aria-label": t.pdfCopy,
15871
16026
  title: t.pdfCopy,
15872
16027
  children: [
15873
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react14.FileDown, { "aria-hidden": true }),
15874
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: t.pdfCopy })
16028
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react15.FileDown, { "aria-hidden": true }),
16029
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.pdfCopy })
15875
16030
  ]
15876
16031
  }
15877
16032
  ),
15878
- /* @__PURE__ */ (0, import_jsx_runtime20.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: [
15879
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react14.Download, { "aria-hidden": true }),
15880
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: t.download })
16033
+ /* @__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: [
16034
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react15.Download, { "aria-hidden": true }),
16035
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.download })
15881
16036
  ] })
15882
16037
  ] })
15883
16038
  ] })
15884
16039
  ] });
15885
16040
  };
15886
- const gate = (tone, Icon, title, body, form) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
16041
+ const gate = (tone, Icon, title, body, form) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
15887
16042
  top(null, null),
15888
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w100n-guest-gate", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-guest-card", children: [
15889
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w100n-share-tile", "data-tone": tone, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { "aria-hidden": true }) }),
15890
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { children: title }),
15891
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: body }),
16043
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-guest-gate", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-guest-card", children: [
16044
+ /* @__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 }) }),
16045
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { children: title }),
16046
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: body }),
15892
16047
  form
15893
16048
  ] }) })
15894
16049
  ] });
15895
16050
  if (opened2.error) {
15896
16051
  const refused = opened2.error instanceof GuestRefused ? opened2.error : null;
15897
- if (refused?.reason === "ended") return gate("slate", import_lucide_react14.Ban, t.endedTitle, t.endedText);
15898
- if (refused?.reason === "missing") return gate("slate", import_lucide_react14.Ban, t.missingTitle, t.missingText);
16052
+ if (refused?.reason === "ended") return gate("slate", import_lucide_react15.Ban, t.endedTitle, t.endedText);
16053
+ if (refused?.reason === "missing") return gate("slate", import_lucide_react15.Ban, t.missingTitle, t.missingText);
15899
16054
  if (refused?.reason === "password" || refused?.reason === "wrong" || refused?.reason === "name") {
15900
16055
  const password = refused.reason !== "name";
15901
16056
  const shared = refused.sharedBy ? `${t.sharedBy.replace("{name}", refused.sharedBy)}. ` : "";
15902
16057
  return gate(
15903
16058
  "violet",
15904
- password ? import_lucide_react14.Lock : import_lucide_react14.UserRound,
16059
+ password ? import_lucide_react15.Lock : import_lucide_react15.UserRound,
15905
16060
  refused.file || t.documents,
15906
16061
  shared + (password ? t.passwordAsk : t.nameAsk),
15907
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", { className: "w100n-guest-form", onSubmit: (e) => {
16062
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("form", { className: "w100n-guest-form", onSubmit: (e) => {
15908
16063
  e.preventDefault();
15909
16064
  if (!typed.trim()) return;
15910
16065
  if (password) setAsk({ ...ask, password: typed });
@@ -15914,7 +16069,7 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15914
16069
  }
15915
16070
  setTyped("");
15916
16071
  }, children: [
15917
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
16072
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15918
16073
  "input",
15919
16074
  {
15920
16075
  className: "w100n-share-input",
@@ -15927,21 +16082,21 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15927
16082
  onChange: (e) => setTyped(e.target.value)
15928
16083
  }
15929
16084
  ),
15930
- refused.reason === "wrong" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.wrongPassword }),
15931
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !typed.trim(), children: [
15932
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react14.Eye, { "aria-hidden": true }),
16085
+ refused.reason === "wrong" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "w100n-docs-muted", role: "alert", children: t.wrongPassword }),
16086
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { type: "submit", className: "w100n-docs-action", disabled: !typed.trim(), children: [
16087
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react15.Eye, { "aria-hidden": true }),
15933
16088
  t.openDoc
15934
16089
  ] })
15935
16090
  ] })
15936
16091
  );
15937
16092
  }
15938
- if (refused?.reason === "busy") return gate("slate", import_lucide_react14.Ban, t.failed, t.tooMany);
15939
- return gate("slate", import_lucide_react14.Ban, t.failed, "", /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "w100n-docs-action", onClick: opened2.retry, children: t.retry }));
16093
+ if (refused?.reason === "busy") return gate("slate", import_lucide_react15.Ban, t.failed, t.tooMany);
16094
+ 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 }));
15940
16095
  }
15941
16096
  const file = opened2.data;
15942
- if (!file) return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
16097
+ if (!file) return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
15943
16098
  top(null, null),
15944
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w100n-docs-empty", children: t.loading })
16099
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-docs-empty", children: t.loading })
15945
16100
  ] });
15946
16101
  const kind = kindOf(file.name, file.mimeType);
15947
16102
  const text = kind === "docx" || kind === "markdown";
@@ -15949,23 +16104,23 @@ function GuestDocument({ host, language = "en", theme = "light", brand }) {
15949
16104
  const rights = { view: true, comment: talk, edit: false };
15950
16105
  const quiet3 = () => {
15951
16106
  };
15952
- let stage = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
15953
- if (text) stage = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextEditor4, { kind, bytes: file.bytes, t, language, rights, host: talk ? notes3 : void 0, documentId: file.id, onOutline: quiet3, slot: talk ? slot : null }) });
15954
- else if (kind === "pdf") stage = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PdfView, { bytes: file.bytes, t, language, worker: host.pdfWorker, rights, documentId: file.id, onOutline: quiet3 });
15955
- else if (kind === "slides") stage = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SlidesView, { html: new TextDecoder().decode(file.bytes), name: file.name, rights, language, theme, onOutline: quiet3 });
15956
- else if (kind === "sheet") stage = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w100n-docs-empty", children: t.loading }), children: /* @__PURE__ */ (0, import_jsx_runtime20.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 }) });
15957
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
16107
+ let stage = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w100n-docs-empty", children: t.unsupported });
16108
+ 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 }) });
16109
+ 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 });
16110
+ 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 });
16111
+ 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 }) });
16112
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs w100n-guest", "data-theme": theme, children: [
15958
16113
  top(file, talk ? t.badgeComment : t.badgeRead),
15959
- saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "w100n-docs-muted w100n-guest-note", role: "alert", children: t.exportFailed }),
15960
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-docs-body w100n-guest-body", children: [
15961
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("main", { className: "w100n-docs-stage", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "w100n-docs-bare", children: stage }) }),
15962
- talk && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("aside", { className: "w100n-docs-side w100n-docs-panel w100n-guest-panel", "aria-label": t.comments, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w100n-docs-panel-body", children: [
15963
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "w100n-share-field", children: [
15964
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: t.yourName }),
15965
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { className: "w100n-share-input", value: name, autoComplete: "name", placeholder: t.yourName, onChange: (e) => typeName(e.target.value) })
16114
+ saving === "failed" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "w100n-docs-muted w100n-guest-note", role: "alert", children: t.exportFailed }),
16115
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w100n-docs-body w100n-guest-body", children: [
16116
+ /* @__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 }) }),
16117
+ 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: [
16118
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: "w100n-share-field", children: [
16119
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.yourName }),
16120
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { className: "w100n-share-input", value: name, autoComplete: "name", placeholder: t.yourName, onChange: (e) => typeName(e.target.value) })
15966
16121
  ] }),
15967
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "w100n-docs-muted", children: name.trim() ? t.nameHint : t.nameNeeded }),
15968
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref: setSlot })
16122
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "w100n-docs-muted", children: name.trim() ? t.nameHint : t.nameNeeded }),
16123
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref: setSlot })
15969
16124
  ] }) })
15970
16125
  ] })
15971
16126
  ] });