@w100n/documents 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/collab.js CHANGED
@@ -11,8 +11,8 @@ import {
11
11
  pending,
12
12
  save,
13
13
  seed
14
- } from "./chunk-EM4U6OC5.js";
15
- import "./chunk-TNSN4ZQ5.js";
14
+ } from "./chunk-UWASFTDF.js";
15
+ import "./chunk-BKUFGMEA.js";
16
16
  import "./chunk-ISOOUYLI.js";
17
17
  export {
18
18
  Refusal,
package/dist/index.cjs CHANGED
@@ -68,6 +68,7 @@ var init_text = __esm({
68
68
  "use strict";
69
69
  en2 = {
70
70
  documents: "Documents",
71
+ hint: "Files of your projects: read, edit and comment in one place",
71
72
  loose: "Without a folder",
72
73
  search: "Search documents",
73
74
  all: "All",
@@ -313,6 +314,7 @@ var init_text = __esm({
313
314
  };
314
315
  pl2 = {
315
316
  documents: "Dokumenty",
317
+ hint: "Pliki Twoich projekt\xF3w: czytaj, edytuj i komentuj w jednym miejscu",
316
318
  loose: "Bez folderu",
317
319
  search: "Szukaj dokument\xF3w",
318
320
  all: "Wszystkie",
@@ -558,6 +560,7 @@ var init_text = __esm({
558
560
  };
559
561
  uk2 = {
560
562
  documents: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0438",
563
+ hint: "\u0424\u0430\u0439\u043B\u0438 \u0432\u0430\u0448\u0438\u0445 \u043F\u0440\u043E\u0454\u043A\u0442\u0456\u0432: \u0447\u0438\u0442\u0430\u0439\u0442\u0435, \u0440\u0435\u0434\u0430\u0433\u0443\u0439\u0442\u0435 \u0439 \u043A\u043E\u043C\u0435\u043D\u0442\u0443\u0439\u0442\u0435 \u0432 \u043E\u0434\u043D\u043E\u043C\u0443 \u043C\u0456\u0441\u0446\u0456",
561
564
  loose: "\u0411\u0435\u0437 \u0442\u0435\u043A\u0438",
562
565
  search: "\u041F\u043E\u0448\u0443\u043A \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0456\u0432",
563
566
  all: "\u0423\u0441\u0456",
@@ -3152,7 +3155,7 @@ function DocxView({ bytes, onOutline, failed }) {
3152
3155
  const watch = new ResizeObserver(fit);
3153
3156
  root.replaceChildren();
3154
3157
  setError(false);
3155
- import("docx-preview").then(({ renderAsync }) => renderAsync(bytes, root, void 0, { inWrapper: true, className: "w100n-docx", ignoreLastRenderedPageBreak: true })).then(() => {
3158
+ import("docx-preview").then(({ renderAsync }) => renderAsync(bytes, root, void 0, { inWrapper: true, className: "w100n-docx", ignoreLastRenderedPageBreak: true, renderAltChunks: false })).then(() => {
3156
3159
  if (!live) return;
3157
3160
  width = Math.max(0, ...[...root.querySelectorAll("section.w100n-docx")].map((page) => page.offsetWidth));
3158
3161
  fit();
@@ -3761,7 +3764,7 @@ var init_extensions = __esm({
3761
3764
  var version;
3762
3765
  var init_package = __esm({
3763
3766
  "package.json"() {
3764
- version = "0.11.0";
3767
+ version = "0.12.1";
3765
3768
  }
3766
3769
  });
3767
3770
 
@@ -11605,7 +11608,7 @@ async function make(host, doc) {
11605
11608
  if (doc.kind === "docx") {
11606
11609
  const { renderAsync } = await import("docx-preview");
11607
11610
  const box2 = document.createElement("div");
11608
- await renderAsync(bytes, box2, void 0, { inWrapper: false, ignoreLastRenderedPageBreak: true });
11611
+ await renderAsync(bytes, box2, void 0, { inWrapper: false, ignoreLastRenderedPageBreak: true, renderAltChunks: false });
11609
11612
  return { text: [...box2.querySelectorAll("p, h1, h2, h3, li")].map((node) => node.textContent?.trim()).filter(Boolean).join("\n").slice(0, 800) };
11610
11613
  }
11611
11614
  const pdfjs = await import("pdfjs-dist");
@@ -11990,15 +11993,15 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
11990
11993
  );
11991
11994
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w100n-docs", "data-theme": theme, children: [
11992
11995
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: "w100n-docs-bar", children: [
11993
- slot(start),
11996
+ start && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w100n-docs-start w100n-docs-slot", children: slot(start) }),
11994
11997
  narrow && listToggle,
11995
11998
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w100n-docs-tile", "data-kind": doc.data?.kind, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Kind, { "aria-hidden": true }) }),
11996
11999
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w100n-docs-heading", children: [
11997
12000
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { className: "w100n-docs-title", children: doc.data?.name ?? t.documents }),
11998
- crumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w100n-docs-crumbs", children: crumbs.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
12001
+ crumbs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w100n-docs-crumbs", children: crumbs.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
11999
12002
  i > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react9.ChevronRight, { "aria-hidden": true }),
12000
12003
  item
12001
- ] }, i)) })
12004
+ ] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w100n-docs-hint", children: t.hint })
12002
12005
  ] }),
12003
12006
  doc.data && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w100n-docs-badge", "data-kind": doc.data.kind, children: t.kinds[doc.data.kind] }),
12004
12007
  versionId && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w100n-docs-badge", children: versions.data?.find((v) => v.id === versionId) && date(versions.data.find((v) => v.id === versionId).createdAt) }),
@@ -12021,7 +12024,7 @@ function DocumentsWorkspace({ host, language = "en", theme = "light", place: pla
12021
12024
  ] }),
12022
12025
  doc.data && !versionId && actions?.(doc.data),
12023
12026
  narrow && panelToggle,
12024
- end && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w100n-docs-end", children: slot(end) })
12027
+ end && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w100n-docs-end w100n-docs-slot", children: slot(end) })
12025
12028
  ] }),
12026
12029
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { ref: body, className: "w100n-docs-body", children: [
12027
12030
  listOpen && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("aside", { className: "w100n-docs-side w100n-docs-list", "aria-label": t.documents, children: [