@hiai-gg/docsmint 0.3.6 → 0.3.8
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/backend/src/lib/logger.ts +45 -15
- package/dist/backend/index.js +238 -150
- package/dist/frontend/CategoryDialog-DphkZqIB.js +611 -0
- package/dist/frontend/ConfirmDialog-BLF3x_hr.js +214 -0
- package/dist/frontend/CreateSnapshotDialog-D5vPvFTL.js +216 -0
- package/dist/frontend/DatePicker-CLNTdvTk.js +259 -0
- package/dist/frontend/DeleteDialog-DxYFJivN.js +174 -0
- package/dist/frontend/FolderDialog-CRVZM2Oi.js +250 -0
- package/dist/frontend/FolderNode-C2zG7uii.js +298 -0
- package/dist/frontend/FolderTreeSelector-CyB8y2Sm.js +103 -0
- package/dist/frontend/Icon-CooFj4Ee.js +64 -0
- package/dist/frontend/SettingsDialog-DCM4-N6_.js +1016 -0
- package/dist/frontend/ShareDialog-DYu3RKQu.js +165 -0
- package/dist/frontend/TagCreateDialog-DXQs2bL9.js +260 -0
- package/dist/frontend/api/attachments.d.ts +6 -0
- package/dist/frontend/api/attachments.js +2 -0
- package/dist/frontend/api/categories.js +1 -1
- package/dist/frontend/api/documents.js +1 -1
- package/dist/frontend/api/folders.js +1 -1
- package/dist/frontend/api/settings.js +1 -1
- package/dist/frontend/api/share.d.ts +5 -0
- package/dist/frontend/api/share.js +2 -0
- package/dist/frontend/api/tags.js +1 -1
- package/dist/frontend/api-keys-CpkrA8rD.js +35 -0
- package/dist/frontend/attachments-BuILSs56.js +50 -0
- package/dist/frontend/{settings-PCrOtied.js → auth-client-Cygmp1I2.js} +205 -265
- package/dist/frontend/awareness-snQ3RD9f.js +3714 -0
- package/dist/frontend/camera-iKXDOOWT.js +29 -0
- package/dist/frontend/{categories-BE6ZpZl8.js → categories-izQovv2w.js} +1 -1
- package/dist/frontend/check-D-UuvBuh.js +25 -0
- package/dist/frontend/chevron-down-CiPtYyFh.js +25 -0
- package/dist/frontend/circle-check-tSPE1V6t.js +29 -0
- package/dist/frontend/{client-B9hzI0W8.js → client-GbtOH90i.js} +1 -1
- package/dist/frontend/clipboard-Cgzxc0_R.js +16 -0
- package/dist/frontend/clock-DJHbHZb8.js +29 -0
- package/dist/frontend/clsx-C7bIvsDS.js +1738 -0
- package/dist/frontend/collaboration.d.ts +6 -0
- package/dist/frontend/collaboration.js +182 -0
- package/dist/frontend/components/category-dialog.d.ts +2 -0
- package/dist/frontend/components/category-dialog.js +2 -0
- package/dist/frontend/components/create-snapshot-dialog.d.ts +2 -0
- package/dist/frontend/components/create-snapshot-dialog.js +2 -0
- package/dist/frontend/components/delete-dialog.d.ts +2 -0
- package/dist/frontend/components/delete-dialog.js +2 -0
- package/dist/frontend/components/editor/document-editor.d.ts +3 -0
- package/dist/frontend/components/editor/document-editor.js +3032 -0
- package/dist/frontend/components/editor/document-title.d.ts +2 -0
- package/dist/frontend/components/editor/document-title.js +31 -0
- package/dist/frontend/components/editor/docx-serializer.d.ts +2 -0
- package/dist/frontend/components/editor/docx-serializer.js +14600 -0
- package/dist/frontend/components/editor/extensions.d.ts +2 -0
- package/dist/frontend/components/editor/extensions.js +2 -0
- package/dist/frontend/components/editor/markdown-toggle.d.ts +2 -0
- package/dist/frontend/components/editor/markdown-toggle.js +72 -0
- package/dist/frontend/components/editor/markdown.d.ts +1 -0
- package/dist/frontend/components/editor/markdown.js +2 -0
- package/dist/frontend/components/folder-node.d.ts +3 -0
- package/dist/frontend/components/folder-node.js +2 -0
- package/dist/frontend/components/folder-tree-selector.d.ts +2 -0
- package/dist/frontend/components/folder-tree-selector.js +2 -0
- package/dist/frontend/components/save-as-dialog.d.ts +2 -0
- package/dist/frontend/components/save-as-dialog.js +272 -0
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/share-dialog.d.ts +2 -0
- package/dist/frontend/components/share-dialog.js +2 -0
- package/dist/frontend/components/sidebar.js +1145 -3693
- package/dist/frontend/components/tag-create-dialog.d.ts +2 -0
- package/dist/frontend/components/tag-create-dialog.js +2 -0
- package/dist/frontend/components/version-history.d.ts +2 -0
- package/dist/frontend/components/version-history.js +294 -0
- package/dist/frontend/{context-DbnW5yib.js → context-BMD6XTPe.js} +0 -3
- package/dist/frontend/copy-GppwRMjX.js +32 -0
- package/dist/frontend/dashboard.js +1113 -1157
- package/dist/frontend/{SettingsDialog-D4pgFD0D.js → db-ByrlYfaI.js} +923 -2002
- package/dist/frontend/dialog-D6NxYVmy.js +213 -0
- package/dist/frontend/dndzone-BzsOINtP.js +1199 -0
- package/dist/frontend/doc-tabs.d.ts +7 -0
- package/dist/frontend/doc-tabs.js +14 -0
- package/dist/frontend/document-drop-coordinator-C4xHMjwC.js +68 -0
- package/dist/frontend/document-drop-coordinator.d.ts +2 -0
- package/dist/frontend/document-drop-coordinator.js +2 -0
- package/dist/frontend/{documents-DFVS9SsL.js → documents-BsDkvzCm.js} +1 -1
- package/dist/frontend/editorExtensions-BMHvUbdk.js +27021 -0
- package/dist/frontend/ellipsis-vertical-P9MHvCps.js +530 -0
- package/dist/frontend/extension.js +8 -7
- package/dist/frontend/floating-layer-anchor-CPwucTfd.js +4515 -0
- package/dist/frontend/folder-DeWhnD7O.js +45 -0
- package/dist/frontend/folder-refresh.d.ts +8 -0
- package/dist/frontend/folder-refresh.js +2 -0
- package/dist/frontend/{folders-CGe9diAG.js → folders-CTuV_JtU.js} +1 -1
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/i18n.js +1 -1
- package/dist/frontend/identity-DyWeNzu_.js +69 -0
- package/dist/frontend/input-B5Rak-5G.js +23 -0
- package/dist/frontend/keyboard.d.ts +14 -0
- package/dist/frontend/keyboard.js +2 -0
- package/dist/frontend/keyboard.svelte-CApmX0vl.js +133 -0
- package/dist/frontend/label-CW9rxoAb.js +30 -0
- package/dist/frontend/loader-circle-BA6aLO71.js +268 -0
- package/dist/frontend/markdown-BwnyjITU.js +11 -0
- package/dist/frontend/messages-BpYaLbzE.js +1091 -0
- package/dist/frontend/offline/identity.d.ts +6 -0
- package/dist/frontend/offline/identity.js +2 -0
- package/dist/frontend/resolve-BG4HgzpN.js +19 -0
- package/dist/frontend/rolldown-runtime-CWhphoD1.js +23 -0
- package/dist/frontend/rotate-ccw-B4Q7brmV.js +25 -0
- package/dist/frontend/search.js +637 -602
- package/dist/frontend/select-value-sF86Geyh.js +1446 -0
- package/dist/frontend/settings-blyobazp.js +62 -0
- package/dist/frontend/share-Cu7SSJuJ.js +28 -0
- package/dist/frontend/shared-document.js +94 -93
- package/dist/frontend/subfolders-refresh-store.svelte-B2dKVmgz.js +65 -0
- package/dist/frontend/tag-HxRazVN_.js +54 -0
- package/dist/frontend/tag-store.svelte-CqrUXo0o.js +29 -0
- package/dist/frontend/{tags-DVXTut0p.js → tags-CtCV0Djo.js} +1 -1
- package/dist/frontend/textarea-i1720bE7.js +23 -0
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/theme.svelte-DKfCy12k.js +49 -0
- package/dist/frontend/types.d.ts +6 -0
- package/dist/frontend/types.js +0 -0
- package/dist/frontend/utils/clipboard.d.ts +1 -0
- package/dist/frontend/utils/clipboard.js +2 -0
- package/dist/frontend/utils/dndzone.d.ts +4 -0
- package/dist/frontend/utils/dndzone.js +2 -0
- package/dist/frontend/utils-CffiyuTo.js +19 -0
- package/dist/frontend/utils-hzdMVeCv.js +7 -0
- package/dist/frontend/utils.d.ts +4 -0
- package/dist/frontend/utils.js +2 -0
- package/dist/frontend/x-CzBsnJ2x.js +25 -0
- package/dist/frontend-ssr/api/attachments.js +2 -0
- package/dist/frontend-ssr/api/categories.js +2 -0
- package/dist/frontend-ssr/api/documents.js +2 -0
- package/dist/frontend-ssr/api/folders.js +2 -0
- package/dist/frontend-ssr/api/settings.js +2 -0
- package/dist/frontend-ssr/api/share.js +2 -0
- package/dist/frontend-ssr/api/tags.js +2 -0
- package/dist/frontend-ssr/assets/CategoryDialog-C2xaZKHq.js +584 -0
- package/dist/frontend-ssr/assets/ConfirmDialog-DjMFKc0V.js +420 -0
- package/dist/frontend-ssr/assets/CreateSnapshotDialog-BRw1xJW1.js +214 -0
- package/dist/frontend-ssr/assets/DatePicker-DnXniwlZ.js +312 -0
- package/dist/frontend-ssr/assets/DeleteDialog-BCfZy3Zn.js +154 -0
- package/dist/frontend-ssr/assets/FolderDialog-Dq7I2cKZ.js +429 -0
- package/dist/frontend-ssr/assets/FolderNode-DRfBfpft.js +171 -0
- package/dist/frontend-ssr/assets/FolderTreeSelector-DZNZ2oI6.js +147 -0
- package/dist/frontend-ssr/assets/Icon-B0Zqppjo.js +231 -0
- package/dist/frontend-ssr/assets/SettingsDialog-CX8Noa8A.js +1107 -0
- package/dist/frontend-ssr/assets/ShareDialog-Cge49ZdJ.js +54 -0
- package/dist/frontend-ssr/assets/TagCreateDialog-EAChgBF-.js +264 -0
- package/dist/frontend-ssr/assets/api-keys-DFqX39MT.js +35 -0
- package/dist/frontend-ssr/assets/attachments-CWBxE3Vz.js +85 -0
- package/dist/frontend-ssr/assets/auth-client-x26kqY8Z.js +1286 -0
- package/dist/frontend-ssr/assets/camera-CdxscTw-.js +84 -0
- package/dist/frontend-ssr/assets/categories-AOqgcsn4.js +75 -0
- package/dist/frontend-ssr/assets/chevron-down-CSSNGNh_.js +80 -0
- package/dist/frontend-ssr/assets/chevron-right-B4p7Sk6X.js +80 -0
- package/dist/frontend-ssr/assets/circle-check-CI1v4vYh.js +84 -0
- package/dist/frontend-ssr/assets/client-DZMkDkDn.js +129 -0
- package/dist/frontend-ssr/assets/clipboard-CXOaoz2W.js +30 -0
- package/dist/frontend-ssr/assets/clock-IL-eX2di.js +84 -0
- package/dist/frontend-ssr/assets/context-jz1GGEUi.js +45 -0
- package/dist/frontend-ssr/assets/copy-CjV57nGQ.js +87 -0
- package/dist/frontend-ssr/assets/db-CnxeO66n.js +65 -0
- package/dist/frontend-ssr/assets/dialog-BOV1u6zP.js +157 -0
- package/dist/frontend-ssr/assets/dndzone-DMvTO_Jz.js +2114 -0
- package/dist/frontend-ssr/assets/document-drop-coordinator-CEaYACsC.js +109 -0
- package/dist/frontend-ssr/assets/documents-BnOTRdTY.js +108 -0
- package/dist/frontend-ssr/assets/editorExtensions-DUzwndMy.js +186 -0
- package/dist/frontend-ssr/assets/ellipsis-vertical-C-0hgkZn.js +555 -0
- package/dist/frontend-ssr/assets/floating-layer-anchor-uzw9K8qN.js +6114 -0
- package/dist/frontend-ssr/assets/folder-DChhG7qN.js +80 -0
- package/dist/frontend-ssr/assets/folders-CTfbS24J.js +127 -0
- package/dist/frontend-ssr/assets/identity-B3uHoDtf.js +99 -0
- package/dist/frontend-ssr/assets/input-DezGsU3y.js +19 -0
- package/dist/frontend-ssr/assets/keyboard.svelte-BgF47N3L.js +174 -0
- package/dist/frontend-ssr/assets/label-Bj8-TfFN.js +21 -0
- package/dist/frontend-ssr/assets/loader-circle-DZsrZ-er.js +80 -0
- package/dist/frontend-ssr/assets/markdown-CjqvGi5W.js +20 -0
- package/dist/frontend-ssr/assets/messages-DhXqlcJI.js +11125 -0
- package/dist/frontend-ssr/assets/resolve-BqHozBXl.js +32 -0
- package/dist/frontend-ssr/assets/rotate-ccw-BlgWwaiq.js +80 -0
- package/dist/frontend-ssr/assets/select-value-DngdSmLI.js +1526 -0
- package/dist/frontend-ssr/assets/settings-E6qSAWM2.js +64 -0
- package/dist/frontend-ssr/assets/share-BTBJelxA.js +30 -0
- package/dist/frontend-ssr/assets/subfolders-refresh-store.svelte-DAh4gT16.js +77 -0
- package/dist/frontend-ssr/assets/tag-GZEuGWk1.js +166 -0
- package/dist/frontend-ssr/assets/tag-store.svelte-DPodKj6Z.js +21 -0
- package/dist/frontend-ssr/assets/tags-BId2wdYd.js +49 -0
- package/dist/frontend-ssr/assets/textarea-Dev-qSEc.js +21 -0
- package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +67 -0
- package/dist/frontend-ssr/assets/utils-DtlPPXpJ.js +9 -0
- package/dist/frontend-ssr/assets/utils-DvZnctjz.js +23 -0
- package/dist/frontend-ssr/collaboration.js +39 -0
- package/dist/frontend-ssr/components/category-dialog.js +2 -0
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +2 -0
- package/dist/frontend-ssr/components/delete-dialog.js +2 -0
- package/dist/frontend-ssr/components/editor/document-editor.js +2499 -0
- package/dist/frontend-ssr/components/editor/document-title.js +11 -0
- package/dist/frontend-ssr/components/editor/docx-serializer.js +186 -0
- package/dist/frontend-ssr/components/editor/extensions.js +2 -0
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +20 -0
- package/dist/frontend-ssr/components/editor/markdown.js +2 -0
- package/dist/frontend-ssr/components/folder-node.js +2 -0
- package/dist/frontend-ssr/components/folder-tree-selector.js +2 -0
- package/dist/frontend-ssr/components/save-as-dialog.js +280 -0
- package/dist/frontend-ssr/components/settings.js +2 -0
- package/dist/frontend-ssr/components/share-dialog.js +2 -0
- package/dist/frontend-ssr/components/sidebar.js +2033 -0
- package/dist/frontend-ssr/components/tag-create-dialog.js +2 -0
- package/dist/frontend-ssr/components/version-history.js +370 -0
- package/dist/frontend-ssr/dashboard.js +2542 -0
- package/dist/frontend-ssr/doc-tabs.js +23 -0
- package/dist/frontend-ssr/document-drop-coordinator.js +2 -0
- package/dist/frontend-ssr/extension.js +13 -0
- package/dist/frontend-ssr/folder-refresh.js +2 -0
- package/dist/frontend-ssr/i18n.js +10 -0
- package/dist/frontend-ssr/keyboard.js +2 -0
- package/dist/frontend-ssr/offline/identity.js +2 -0
- package/dist/frontend-ssr/search.js +332 -0
- package/dist/frontend-ssr/shared-document.js +273 -0
- package/dist/frontend-ssr/theme.js +9 -0
- package/dist/frontend-ssr/types.js +1 -0
- package/dist/frontend-ssr/utils/clipboard.js +2 -0
- package/dist/frontend-ssr/utils/dndzone.js +2 -0
- package/dist/frontend-ssr/utils.js +2 -0
- package/package.json +130 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +3 -0
- package/packages/mcp-server/src/index.ts +1 -1
- package/dist/frontend/DatePicker-BcMD49PV.js +0 -275
- package/dist/frontend/ShareDialog-Dzh7rV7J.js +0 -1317
- package/dist/frontend/client-C6QQGb0e.js +0 -2766
- package/dist/frontend/input-ieWIt8I7.js +0 -257
- package/dist/frontend/messages-CTGAsqFu.js +0 -1106
- package/dist/frontend/resolve-Bl6xmJl_.js +0 -2068
- package/dist/frontend/tag-C5xrg-bb.js +0 -53
- package/dist/frontend/tag-store.svelte-B3839FYq.js +0 -6152
- package/dist/frontend/theme.svelte-ei0QxXa8.js +0 -49
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { t as getFrontendExtensions } from "./assets/context-jz1GGEUi.js";
|
|
2
|
+
import * as $ from "svelte/internal/server";
|
|
3
|
+
//#region src/lib/components/editor/shared-document.ts
|
|
4
|
+
var ATTACHMENT_PATH = /^\/api\/attachments\/[0-9a-f-]+\/raw$/i;
|
|
5
|
+
var SAFE_LINK_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
6
|
+
"http:",
|
|
7
|
+
"https:",
|
|
8
|
+
"mailto:"
|
|
9
|
+
]);
|
|
10
|
+
function escapeHtml(value) {
|
|
11
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
12
|
+
}
|
|
13
|
+
function wrapMark(mark, html) {
|
|
14
|
+
switch (mark.type) {
|
|
15
|
+
case "bold": return `<strong>${html}</strong>`;
|
|
16
|
+
case "italic": return `<em>${html}</em>`;
|
|
17
|
+
case "strike":
|
|
18
|
+
case "strikethrough": return `<s>${html}</s>`;
|
|
19
|
+
case "underline": return `<u>${html}</u>`;
|
|
20
|
+
case "code": return `<code>${html}</code>`;
|
|
21
|
+
case "link": return `<a href="${escapeHtml(safeLinkHref(mark.attrs?.href ?? "#"))}" target="_blank" rel="noopener noreferrer">${html}</a>`;
|
|
22
|
+
case "highlight": return `<mark style="background-color: ${escapeHtml(mark.attrs?.color ?? "#fde68a")}">${html}</mark>`;
|
|
23
|
+
default: return html;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function safeLinkHref(href) {
|
|
27
|
+
if (href.startsWith("#") || href.startsWith("/") || href.startsWith("./")) return href;
|
|
28
|
+
try {
|
|
29
|
+
const url = new URL(href);
|
|
30
|
+
return SAFE_LINK_PROTOCOLS.has(url.protocol) ? href : "#";
|
|
31
|
+
} catch {
|
|
32
|
+
return "#";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function alignStyle(attrs) {
|
|
36
|
+
const align = attrs?.textAlign;
|
|
37
|
+
if (align !== "left" && align !== "center" && align !== "right" && align !== "justify") return "";
|
|
38
|
+
return ` style="text-align: ${align}"`;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Render descendants as inline content. Older imported documents can contain
|
|
42
|
+
* a paragraph inside a heading. That is invalid ProseMirror/HTML, so emitting
|
|
43
|
+
* it verbatim makes browsers restructure the document unpredictably. Flatten
|
|
44
|
+
* block wrappers in inline-only parents while preserving their text/marks.
|
|
45
|
+
*/
|
|
46
|
+
function renderInline(node) {
|
|
47
|
+
if (node.type === "text") {
|
|
48
|
+
let html = escapeHtml(node.text ?? "");
|
|
49
|
+
for (const mark of node.marks ?? []) html = wrapMark(mark, html);
|
|
50
|
+
return html;
|
|
51
|
+
}
|
|
52
|
+
return (node.content ?? []).map(renderInline).join("");
|
|
53
|
+
}
|
|
54
|
+
function renderSharedDocument(doc) {
|
|
55
|
+
const renderNode = (node) => {
|
|
56
|
+
if (node.type === "text") return renderInline(node);
|
|
57
|
+
const align = alignStyle(node.attrs);
|
|
58
|
+
const inner = (node.content ?? []).map(renderNode).join("");
|
|
59
|
+
switch (node.type) {
|
|
60
|
+
case "paragraph": return `<p${align}>${inner}</p>`;
|
|
61
|
+
case "heading": {
|
|
62
|
+
const level = Math.min(Math.max(Number(node.attrs?.level ?? 1), 1), 6);
|
|
63
|
+
return `<h${level}${align}>${(node.content ?? []).map(renderInline).join("")}</h${level}>`;
|
|
64
|
+
}
|
|
65
|
+
case "bulletList": return `<ul${align}>${inner}</ul>`;
|
|
66
|
+
case "orderedList": {
|
|
67
|
+
const rawStart = Number(node.attrs?.start ?? 1);
|
|
68
|
+
return `<ol${Number.isSafeInteger(rawStart) && rawStart > 1 ? ` start="${rawStart}"` : ""}${align}>${inner}</ol>`;
|
|
69
|
+
}
|
|
70
|
+
case "listItem": return `<li${align}>${inner}</li>`;
|
|
71
|
+
case "taskList": return `<ul data-type="taskList">${inner}</ul>`;
|
|
72
|
+
case "taskItem": {
|
|
73
|
+
const checked = node.attrs?.checked === true || node.attrs?.checked === "true";
|
|
74
|
+
return `<li data-type="taskItem"${checked ? " data-checked=\"true\"" : ""}><label><input type="checkbox" disabled${checked ? " checked" : ""} /></label><div>${inner}</div></li>`;
|
|
75
|
+
}
|
|
76
|
+
case "blockquote": return `<blockquote${align}>${inner}</blockquote>`;
|
|
77
|
+
case "table": return `<table><tbody>${inner}</tbody></table>`;
|
|
78
|
+
case "tableRow": return `<tr>${inner}</tr>`;
|
|
79
|
+
case "tableHeader": return `<th${align}>${inner}</th>`;
|
|
80
|
+
case "tableCell": return `<td${align}>${inner}</td>`;
|
|
81
|
+
case "codeBlock": {
|
|
82
|
+
const lang = node.attrs?.language ?? "";
|
|
83
|
+
return `<pre><code${lang ? ` class="language-${escapeHtml(lang)}"` : ""}>${inner}</code></pre>`;
|
|
84
|
+
}
|
|
85
|
+
case "horizontalRule": return "<hr />";
|
|
86
|
+
case "hardBreak": return "<br />";
|
|
87
|
+
case "image": {
|
|
88
|
+
const src = node.attrs?.src ?? "";
|
|
89
|
+
const alt = node.attrs?.alt ?? "";
|
|
90
|
+
const width = Number(node.attrs?.width);
|
|
91
|
+
const height = Number(node.attrs?.height);
|
|
92
|
+
const dimensions = `${Number.isFinite(width) && width > 0 ? ` width="${Math.round(width)}"` : ""}${Number.isFinite(height) && height > 0 ? ` height="${Math.round(height)}"` : ""}`;
|
|
93
|
+
if (ATTACHMENT_PATH.test(src)) return `<img data-shared-attachment-src="${escapeHtml(src)}" alt="${escapeHtml(alt)}"${dimensions} />`;
|
|
94
|
+
return `<img src="${escapeHtml(src)}" alt="${escapeHtml(alt)}"${dimensions} />`;
|
|
95
|
+
}
|
|
96
|
+
default: return inner;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return (doc.content ?? []).map(renderNode).join("");
|
|
100
|
+
}
|
|
101
|
+
/** Mark Markdown task items so print/PDF CSS can suppress the regular bullet. */
|
|
102
|
+
function markMarkdownTaskItems(html) {
|
|
103
|
+
return html.replace(/<li>(\s*<input\b[^>]*type=["']checkbox["'][^>]*>)/gi, "<li class=\"task-list-item\">$1");
|
|
104
|
+
}
|
|
105
|
+
function sharedAttachmentHeaders(token, password = "") {
|
|
106
|
+
return {
|
|
107
|
+
"x-share-token": token,
|
|
108
|
+
...password ? { "x-share-password": password } : {}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/** Replace protected attachment placeholders with authenticated blob URLs. */
|
|
112
|
+
async function hydrateSharedAttachmentImages(root, token, password = "") {
|
|
113
|
+
const objectUrls = [];
|
|
114
|
+
const images = root.querySelectorAll("img[data-shared-attachment-src]");
|
|
115
|
+
await Promise.all(Array.from(images, async (image) => {
|
|
116
|
+
const src = image.dataset.sharedAttachmentSrc;
|
|
117
|
+
if (!src) return;
|
|
118
|
+
try {
|
|
119
|
+
const response = await fetch(src, { headers: sharedAttachmentHeaders(token, password) });
|
|
120
|
+
if (!response.ok) {
|
|
121
|
+
image.dataset.sharedAttachmentError = String(response.status);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const objectUrl = URL.createObjectURL(await response.blob());
|
|
125
|
+
objectUrls.push(objectUrl);
|
|
126
|
+
image.src = objectUrl;
|
|
127
|
+
image.removeAttribute("data-shared-attachment-src");
|
|
128
|
+
} catch {
|
|
129
|
+
image.dataset.sharedAttachmentError = "network";
|
|
130
|
+
}
|
|
131
|
+
}));
|
|
132
|
+
return objectUrls;
|
|
133
|
+
}
|
|
134
|
+
/** Wait until every image in a print/export subtree has finished loading. */
|
|
135
|
+
async function waitForSharedDocumentImages(root) {
|
|
136
|
+
const images = Array.from(root.querySelectorAll("img"));
|
|
137
|
+
await Promise.all(images.map(async (image) => {
|
|
138
|
+
if (image.complete) return;
|
|
139
|
+
if (typeof image.decode === "function") {
|
|
140
|
+
await image.decode().catch(() => void 0);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
await new Promise((resolve) => {
|
|
144
|
+
image.addEventListener("load", () => resolve(), { once: true });
|
|
145
|
+
image.addEventListener("error", () => resolve(), { once: true });
|
|
146
|
+
});
|
|
147
|
+
}));
|
|
148
|
+
}
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/lib/extensions/shared-document-context.ts
|
|
151
|
+
var sensitiveKeys = /* @__PURE__ */ new Set([
|
|
152
|
+
"shareToken",
|
|
153
|
+
"password",
|
|
154
|
+
"passwordHash",
|
|
155
|
+
"workspaceAssertion",
|
|
156
|
+
"authorization",
|
|
157
|
+
"cookie",
|
|
158
|
+
"signingSecret"
|
|
159
|
+
]);
|
|
160
|
+
function capability(value) {
|
|
161
|
+
if (!value.id.trim() || !value.expiresAt.trim()) throw new TypeError("Shared extension capability must include a non-empty id and expiry");
|
|
162
|
+
return Object.freeze({
|
|
163
|
+
id: value.id,
|
|
164
|
+
expiresAt: value.expiresAt
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Drops undeclared properties before an extension component receives context.
|
|
169
|
+
* This is deliberately a runtime boundary, not only a declaration contract.
|
|
170
|
+
*/
|
|
171
|
+
function sanitizeSharedDocumentExtensionContext(value) {
|
|
172
|
+
for (const key of Object.keys(value)) if (sensitiveKeys.has(key)) throw new TypeError(`Sensitive ${key} must not be provided to a shared extension`);
|
|
173
|
+
return Object.freeze({
|
|
174
|
+
documentId: value.documentId,
|
|
175
|
+
title: value.title,
|
|
176
|
+
content: value.content,
|
|
177
|
+
...value.contentJson === void 0 ? {} : { contentJson: value.contentJson },
|
|
178
|
+
role: value.role,
|
|
179
|
+
capability: capability(value.capability),
|
|
180
|
+
permissions: Object.freeze({
|
|
181
|
+
read: true,
|
|
182
|
+
annotate: value.permissions.annotate,
|
|
183
|
+
edit: value.permissions.edit,
|
|
184
|
+
export: value.permissions.export
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/lib/hosts/DocsmintSharedDocumentHost.svelte
|
|
190
|
+
function DocsmintSharedDocumentHost($$renderer, $$props) {
|
|
191
|
+
$$renderer.component(($$renderer) => {
|
|
192
|
+
const { context, children } = $$props;
|
|
193
|
+
const extensions = getFrontendExtensions();
|
|
194
|
+
const safeContext = $.derived(() => sanitizeSharedDocumentExtensionContext(context));
|
|
195
|
+
function permitted(extension) {
|
|
196
|
+
return extension.permission === "annotate" ? safeContext().permissions.annotate : safeContext().permissions.edit;
|
|
197
|
+
}
|
|
198
|
+
function visible(items) {
|
|
199
|
+
const seen = /* @__PURE__ */ new Set();
|
|
200
|
+
return items.filter((extension) => {
|
|
201
|
+
if (seen.has(extension.id) || !permitted(extension)) return false;
|
|
202
|
+
seen.add(extension.id);
|
|
203
|
+
try {
|
|
204
|
+
return extension.visible?.(safeContext()) ?? true;
|
|
205
|
+
} catch {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}).sort((a, b) => (a.order ?? 0) - (b.order ?? 0) || a.id.localeCompare(b.id));
|
|
209
|
+
}
|
|
210
|
+
$$renderer.push(`<div data-docsmint-shared-document-host=""><div data-extension-zone="shared-header-actions"><!--[-->`);
|
|
211
|
+
const each_array = $.ensure_array_like(visible(extensions.sharedDocumentHeaderActions));
|
|
212
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
213
|
+
let extension = each_array[$$index];
|
|
214
|
+
if (extension.component) {
|
|
215
|
+
$$renderer.push("<!--[-->");
|
|
216
|
+
extension.component($$renderer, { context: safeContext() });
|
|
217
|
+
$$renderer.push("<!--]-->");
|
|
218
|
+
} else {
|
|
219
|
+
$$renderer.push("<!--[!-->");
|
|
220
|
+
$$renderer.push("<!--]-->");
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
$$renderer.push(`<!--]--></div> `);
|
|
224
|
+
children($$renderer);
|
|
225
|
+
$$renderer.push(`<!----> <div data-extension-zone="shared-document-tabs"><!--[-->`);
|
|
226
|
+
const each_array_1 = $.ensure_array_like(visible(extensions.sharedDocumentTabs));
|
|
227
|
+
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
|
|
228
|
+
let extension = each_array_1[$$index_1];
|
|
229
|
+
if (extension.component) {
|
|
230
|
+
$$renderer.push("<!--[-->");
|
|
231
|
+
extension.component($$renderer, { context: safeContext() });
|
|
232
|
+
$$renderer.push("<!--]-->");
|
|
233
|
+
} else {
|
|
234
|
+
$$renderer.push("<!--[!-->");
|
|
235
|
+
$$renderer.push("<!--]-->");
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
$$renderer.push(`<!--]--></div> <div data-extension-zone="shared-document-notes"><!--[-->`);
|
|
239
|
+
const each_array_2 = $.ensure_array_like(visible(extensions.sharedDocumentNotesModes));
|
|
240
|
+
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
|
|
241
|
+
let extension = each_array_2[$$index_2];
|
|
242
|
+
if (extension.component) {
|
|
243
|
+
$$renderer.push("<!--[-->");
|
|
244
|
+
extension.component($$renderer, { context: safeContext() });
|
|
245
|
+
$$renderer.push("<!--]-->");
|
|
246
|
+
} else {
|
|
247
|
+
$$renderer.push("<!--[!-->");
|
|
248
|
+
$$renderer.push("<!--]-->");
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
$$renderer.push(`<!--]--></div> <div data-extension-zone="shared-document-editor">`);
|
|
252
|
+
if (safeContext().permissions.edit) {
|
|
253
|
+
$$renderer.push("<!--[0-->");
|
|
254
|
+
$$renderer.push(`<!--[-->`);
|
|
255
|
+
const each_array_3 = $.ensure_array_like(visible(extensions.sharedDocumentEditorModes));
|
|
256
|
+
for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
|
|
257
|
+
let extension = each_array_3[$$index_3];
|
|
258
|
+
if (extension.component) {
|
|
259
|
+
$$renderer.push("<!--[-->");
|
|
260
|
+
extension.component($$renderer, { context: safeContext() });
|
|
261
|
+
$$renderer.push("<!--]-->");
|
|
262
|
+
} else {
|
|
263
|
+
$$renderer.push("<!--[!-->");
|
|
264
|
+
$$renderer.push("<!--]-->");
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
$$renderer.push(`<!--]-->`);
|
|
268
|
+
} else $$renderer.push("<!--[-1-->");
|
|
269
|
+
$$renderer.push(`<!--]--></div></div>`);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
export { DocsmintSharedDocumentHost, hydrateSharedAttachmentImages, markMarkdownTaskItems, renderSharedDocument, sharedAttachmentHeaders, waitForSharedDocumentImages };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { t as themeStore } from "./assets/theme.svelte-Co0-ssaD.js";
|
|
2
|
+
//#region ../packages/sdk/frontend-entries/theme.ts
|
|
3
|
+
var theme = themeStore;
|
|
4
|
+
var setTheme = themeStore.set;
|
|
5
|
+
function toggleTheme() {
|
|
6
|
+
setTheme(theme.value === "dark" ? "light" : "dark");
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { setTheme, theme, toggleTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiai-gg/docsmint",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"browser": {
|
|
6
6
|
"./dist/backend-launcher.js": false,
|
|
@@ -75,18 +75,22 @@
|
|
|
75
75
|
"types": "./dist/storage-quota.d.ts"
|
|
76
76
|
},
|
|
77
77
|
"./frontend/dashboard": {
|
|
78
|
+
"node": "./dist/frontend-ssr/dashboard.js",
|
|
78
79
|
"import": "./dist/frontend/dashboard.js",
|
|
79
80
|
"types": "./dist/frontend/dashboard.d.ts"
|
|
80
81
|
},
|
|
81
82
|
"./frontend/search": {
|
|
83
|
+
"node": "./dist/frontend-ssr/search.js",
|
|
82
84
|
"import": "./dist/frontend/search.js",
|
|
83
85
|
"types": "./dist/frontend/search.d.ts"
|
|
84
86
|
},
|
|
85
87
|
"./frontend/shared-document": {
|
|
88
|
+
"node": "./dist/frontend-ssr/shared-document.js",
|
|
86
89
|
"import": "./dist/frontend/shared-document.js",
|
|
87
90
|
"types": "./dist/frontend/shared-document.d.ts"
|
|
88
91
|
},
|
|
89
92
|
"./frontend/extension": {
|
|
93
|
+
"node": "./dist/frontend-ssr/extension.js",
|
|
90
94
|
"import": "./dist/frontend/extension.js",
|
|
91
95
|
"types": "./dist/frontend/extension.d.ts"
|
|
92
96
|
},
|
|
@@ -110,14 +114,139 @@
|
|
|
110
114
|
"import": "./dist/frontend/api/settings.js",
|
|
111
115
|
"types": "./dist/frontend/api/settings.d.ts"
|
|
112
116
|
},
|
|
117
|
+
"./frontend/api/attachments": {
|
|
118
|
+
"import": "./dist/frontend/api/attachments.js",
|
|
119
|
+
"types": "./dist/frontend/api/attachments.d.ts"
|
|
120
|
+
},
|
|
121
|
+
"./frontend/collaboration": {
|
|
122
|
+
"import": "./dist/frontend/collaboration.js",
|
|
123
|
+
"types": "./dist/frontend/collaboration.d.ts"
|
|
124
|
+
},
|
|
125
|
+
"./frontend/components/create-snapshot-dialog": {
|
|
126
|
+
"node": "./dist/frontend-ssr/components/create-snapshot-dialog.js",
|
|
127
|
+
"import": "./dist/frontend/components/create-snapshot-dialog.js",
|
|
128
|
+
"types": "./dist/frontend/components/create-snapshot-dialog.d.ts"
|
|
129
|
+
},
|
|
130
|
+
"./frontend/components/delete-dialog": {
|
|
131
|
+
"node": "./dist/frontend-ssr/components/delete-dialog.js",
|
|
132
|
+
"import": "./dist/frontend/components/delete-dialog.js",
|
|
133
|
+
"types": "./dist/frontend/components/delete-dialog.d.ts"
|
|
134
|
+
},
|
|
135
|
+
"./frontend/components/category-dialog": {
|
|
136
|
+
"node": "./dist/frontend-ssr/components/category-dialog.js",
|
|
137
|
+
"import": "./dist/frontend/components/category-dialog.js",
|
|
138
|
+
"types": "./dist/frontend/components/category-dialog.d.ts"
|
|
139
|
+
},
|
|
140
|
+
"./frontend/components/folder-node": {
|
|
141
|
+
"node": "./dist/frontend-ssr/components/folder-node.js",
|
|
142
|
+
"import": "./dist/frontend/components/folder-node.js",
|
|
143
|
+
"types": "./dist/frontend/components/folder-node.d.ts"
|
|
144
|
+
},
|
|
145
|
+
"./frontend/document-drop-coordinator": {
|
|
146
|
+
"import": "./dist/frontend/document-drop-coordinator.js",
|
|
147
|
+
"types": "./dist/frontend/document-drop-coordinator.d.ts"
|
|
148
|
+
},
|
|
149
|
+
"./frontend/offline/identity": {
|
|
150
|
+
"import": "./dist/frontend/offline/identity.js",
|
|
151
|
+
"types": "./dist/frontend/offline/identity.d.ts"
|
|
152
|
+
},
|
|
153
|
+
"./frontend/doc-tabs": {
|
|
154
|
+
"import": "./dist/frontend/doc-tabs.js",
|
|
155
|
+
"types": "./dist/frontend/doc-tabs.d.ts"
|
|
156
|
+
},
|
|
157
|
+
"./frontend/components/editor/document-editor": {
|
|
158
|
+
"node": "./dist/frontend-ssr/components/editor/document-editor.js",
|
|
159
|
+
"import": "./dist/frontend/components/editor/document-editor.js",
|
|
160
|
+
"types": "./dist/frontend/components/editor/document-editor.d.ts"
|
|
161
|
+
},
|
|
162
|
+
"./frontend/components/folder-tree-selector": {
|
|
163
|
+
"node": "./dist/frontend-ssr/components/folder-tree-selector.js",
|
|
164
|
+
"import": "./dist/frontend/components/folder-tree-selector.js",
|
|
165
|
+
"types": "./dist/frontend/components/folder-tree-selector.d.ts"
|
|
166
|
+
},
|
|
167
|
+
"./frontend/components/save-as-dialog": {
|
|
168
|
+
"node": "./dist/frontend-ssr/components/save-as-dialog.js",
|
|
169
|
+
"import": "./dist/frontend/components/save-as-dialog.js",
|
|
170
|
+
"types": "./dist/frontend/components/save-as-dialog.d.ts"
|
|
171
|
+
},
|
|
172
|
+
"./frontend/components/share-dialog": {
|
|
173
|
+
"node": "./dist/frontend-ssr/components/share-dialog.js",
|
|
174
|
+
"import": "./dist/frontend/components/share-dialog.js",
|
|
175
|
+
"types": "./dist/frontend/components/share-dialog.d.ts"
|
|
176
|
+
},
|
|
177
|
+
"./frontend/components/tag-create-dialog": {
|
|
178
|
+
"node": "./dist/frontend-ssr/components/tag-create-dialog.js",
|
|
179
|
+
"import": "./dist/frontend/components/tag-create-dialog.js",
|
|
180
|
+
"types": "./dist/frontend/components/tag-create-dialog.d.ts"
|
|
181
|
+
},
|
|
182
|
+
"./frontend/components/version-history": {
|
|
183
|
+
"node": "./dist/frontend-ssr/components/version-history.js",
|
|
184
|
+
"import": "./dist/frontend/components/version-history.js",
|
|
185
|
+
"types": "./dist/frontend/components/version-history.d.ts"
|
|
186
|
+
},
|
|
187
|
+
"./frontend/components/editor/document-title": {
|
|
188
|
+
"node": "./dist/frontend-ssr/components/editor/document-title.js",
|
|
189
|
+
"import": "./dist/frontend/components/editor/document-title.js",
|
|
190
|
+
"types": "./dist/frontend/components/editor/document-title.d.ts"
|
|
191
|
+
},
|
|
192
|
+
"./frontend/components/editor/markdown-toggle": {
|
|
193
|
+
"node": "./dist/frontend-ssr/components/editor/markdown-toggle.js",
|
|
194
|
+
"import": "./dist/frontend/components/editor/markdown-toggle.js",
|
|
195
|
+
"types": "./dist/frontend/components/editor/markdown-toggle.d.ts"
|
|
196
|
+
},
|
|
197
|
+
"./frontend/components/editor/extensions": {
|
|
198
|
+
"node": "./dist/frontend-ssr/components/editor/extensions.js",
|
|
199
|
+
"import": "./dist/frontend/components/editor/extensions.js",
|
|
200
|
+
"types": "./dist/frontend/components/editor/extensions.d.ts"
|
|
201
|
+
},
|
|
202
|
+
"./frontend/components/editor/markdown": {
|
|
203
|
+
"node": "./dist/frontend-ssr/components/editor/markdown.js",
|
|
204
|
+
"import": "./dist/frontend/components/editor/markdown.js",
|
|
205
|
+
"types": "./dist/frontend/components/editor/markdown.d.ts"
|
|
206
|
+
},
|
|
207
|
+
"./frontend/components/editor/docx-serializer": {
|
|
208
|
+
"node": "./dist/frontend-ssr/components/editor/docx-serializer.js",
|
|
209
|
+
"import": "./dist/frontend/components/editor/docx-serializer.js",
|
|
210
|
+
"types": "./dist/frontend/components/editor/docx-serializer.d.ts"
|
|
211
|
+
},
|
|
113
212
|
"./frontend/components/sidebar": {
|
|
213
|
+
"node": "./dist/frontend-ssr/components/sidebar.js",
|
|
114
214
|
"import": "./dist/frontend/components/sidebar.js",
|
|
115
215
|
"types": "./dist/frontend/components/sidebar.d.ts"
|
|
116
216
|
},
|
|
117
217
|
"./frontend/components/settings": {
|
|
218
|
+
"node": "./dist/frontend-ssr/components/settings.js",
|
|
118
219
|
"import": "./dist/frontend/components/settings.js",
|
|
119
220
|
"types": "./dist/frontend/components/settings.d.ts"
|
|
120
221
|
},
|
|
222
|
+
"./frontend/types": {
|
|
223
|
+
"import": "./dist/frontend/types.js",
|
|
224
|
+
"types": "./dist/frontend/types.d.ts"
|
|
225
|
+
},
|
|
226
|
+
"./frontend/keyboard": {
|
|
227
|
+
"import": "./dist/frontend/keyboard.js",
|
|
228
|
+
"types": "./dist/frontend/keyboard.d.ts"
|
|
229
|
+
},
|
|
230
|
+
"./frontend/folder-refresh": {
|
|
231
|
+
"import": "./dist/frontend/folder-refresh.js",
|
|
232
|
+
"types": "./dist/frontend/folder-refresh.d.ts"
|
|
233
|
+
},
|
|
234
|
+
"./frontend/utils": {
|
|
235
|
+
"import": "./dist/frontend/utils.js",
|
|
236
|
+
"types": "./dist/frontend/utils.d.ts"
|
|
237
|
+
},
|
|
238
|
+
"./frontend/utils/clipboard": {
|
|
239
|
+
"import": "./dist/frontend/utils/clipboard.js",
|
|
240
|
+
"types": "./dist/frontend/utils/clipboard.d.ts"
|
|
241
|
+
},
|
|
242
|
+
"./frontend/utils/dndzone": {
|
|
243
|
+
"import": "./dist/frontend/utils/dndzone.js",
|
|
244
|
+
"types": "./dist/frontend/utils/dndzone.d.ts"
|
|
245
|
+
},
|
|
246
|
+
"./frontend/api/share": {
|
|
247
|
+
"import": "./dist/frontend/api/share.js",
|
|
248
|
+
"types": "./dist/frontend/api/share.d.ts"
|
|
249
|
+
},
|
|
121
250
|
"./frontend/theme": {
|
|
122
251
|
"import": "./dist/frontend/theme.js",
|
|
123
252
|
"types": "./dist/frontend/theme.d.ts"
|
|
@@ -24,7 +24,7 @@ import { registerSearch } from "./commands/search.js";
|
|
|
24
24
|
import { registerSnapshot } from "./commands/snapshot.js";
|
|
25
25
|
import { registerUpdate } from "./commands/update.js";
|
|
26
26
|
|
|
27
|
-
const VERSION = "0.3.
|
|
27
|
+
const VERSION = "0.3.8";
|
|
28
28
|
|
|
29
29
|
const program = new Command();
|
|
30
30
|
program
|
|
@@ -226,6 +226,8 @@ export const documents = pgTable(
|
|
|
226
226
|
embeddingProfile: text("embedding_profile"),
|
|
227
227
|
embeddingErrorCode: text("embedding_error_code"),
|
|
228
228
|
embeddingUpdatedAt: timestamp("embedding_updated_at"),
|
|
229
|
+
/** Soft-delete marker. Trashed documents remain tenant-scoped until purge. */
|
|
230
|
+
deletedAt: timestamp("deleted_at"),
|
|
229
231
|
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
230
232
|
updatedAt: timestamp("updated_at").defaultNow().notNull(),
|
|
231
233
|
},
|
|
@@ -237,6 +239,7 @@ export const documents = pgTable(
|
|
|
237
239
|
index("idx_documents_search_vector").using("gin", table.searchVector),
|
|
238
240
|
index("idx_documents_search_vector_simple").using("gin", table.searchVectorSimple),
|
|
239
241
|
index("documents_embedding_status_idx").on(table.embeddingStatus),
|
|
242
|
+
index("documents_workspace_deleted_at_idx").on(table.workspaceId, table.deletedAt),
|
|
240
243
|
index("idx_documents_title_trgm").using(
|
|
241
244
|
"gin",
|
|
242
245
|
sql`${table.title} gin_trgm_ops`
|