@hiai-gg/docsmint 0.5.7 → 0.5.10
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/backend/index.js +12 -5
- package/dist/frontend/{CategoryDialog-BYAFjX7E.js → CategoryDialog-CbXBMBZB.js} +3 -3
- package/dist/frontend/{Sidebar-B-zCJT9i.js → Sidebar-CzcLd6v5.js} +13 -13
- package/dist/frontend/app-shell.js +102 -46
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +974 -1033
- package/dist/frontend/components/editor/extensions.js +1 -1
- package/dist/frontend/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend/components/editor/markdown.js +1 -1
- package/dist/frontend/components/sidebar.js +1 -1
- package/dist/frontend/{editorExtensions-BMHvUbdk.js → editorExtensions-BmINh76i.js} +1373 -1294
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/{markdown-BwnyjITU.js → markdown-A5xji16P.js} +1 -1
- package/dist/frontend/search.js +3 -3
- package/dist/frontend-ssr/app-shell.js +44 -1
- package/dist/frontend-ssr/assets/{CategoryDialog-BLxVoynx.js → CategoryDialog-QHEv_9N4.js} +4 -4
- package/dist/frontend-ssr/assets/{Sidebar-CO9LZRPa.js → Sidebar-CqsMw0Hd.js} +16 -16
- package/dist/frontend-ssr/assets/{editorExtensions-DUzwndMy.js → editorExtensions-BwGeSPuX.js} +101 -2
- package/dist/frontend-ssr/assets/{markdown-CjqvGi5W.js → markdown-CB8DZ-LT.js} +1 -1
- package/dist/frontend-ssr/components/category-dialog.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +2 -79
- package/dist/frontend-ssr/components/editor/extensions.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown.js +1 -1
- package/dist/frontend-ssr/components/sidebar.js +1 -1
- package/dist/frontend-ssr/search.js +2 -2
- package/package.json +1 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/mcp-server/src/index.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.editor-settings.svelte-1eaqpj summary:where(.svelte-1eaqpj){list-style:none}.editor-settings.svelte-1eaqpj summary:where(.svelte-1eaqpj)::-webkit-details-marker{display:none}.editor-settings-chevron.svelte-1eaqpj{font-size:20px;transition:transform .18s}.editor-settings[open].svelte-1eaqpj .editor-settings-chevron:where(.svelte-1eaqpj){transform:rotate(180deg)}.profile-advanced.svelte-1eaqpj summary:where(.svelte-1eaqpj){list-style:none}.profile-advanced.svelte-1eaqpj summary:where(.svelte-1eaqpj)::-webkit-details-marker{display:none}.profile-advanced-chevron.svelte-1eaqpj{font-size:20px;transition:transform .18s}.profile-advanced[open].svelte-1eaqpj .profile-advanced-chevron:where(.svelte-1eaqpj){transform:rotate(180deg)}.preference-switch.svelte-1eaqpj{border:1px solid var(--border);background:var(--muted);cursor:pointer;border-radius:999px;flex:none;width:42px;height:24px;padding:2px;transition:background .18s,border-color .18s;position:relative}.preference-switch.svelte-1eaqpj span:where(.svelte-1eaqpj){background:var(--background);border-radius:999px;width:18px;height:18px;transition:transform .18s;display:block;box-shadow:0 1px 3px #00000038}.preference-switch.enabled.svelte-1eaqpj{border-color:var(--primary);background:var(--primary)}.preference-switch.enabled.svelte-1eaqpj span:where(.svelte-1eaqpj){transform:translate(18px)}.preference-switch.svelte-1eaqpj:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.preference-switch.svelte-1eaqpj:disabled{cursor:not-allowed;opacity:.45}[data-select-viewport],[data-combobox-viewport]{scrollbar-width:none!important;-ms-overflow-style:none!important;-webkit-overflow-scrolling:touch!important}[data-combobox-viewport]::-webkit-scrollbar{display:none!important}[data-select-viewport]::-webkit-scrollbar{display:none!important}:root{--layer-chrome:30;--layer-panel:100;--layer-popover:200;--layer-modal:1000}.link-dialog-body.svelte-1cfbs6u{flex-direction:column;gap:.5rem;padding:0 0 1rem;display:flex}.link-dialog-label.svelte-1cfbs6u{color:var(--foreground);font-size:.875rem;font-weight:500}.toolbar.svelte-vm4iq2{border-bottom:1px solid var(--border);background:var(--card);z-index:var(--layer-chrome);border-radius:7px 7px 0 0;flex-wrap:wrap;align-items:center;gap:1px;padding:6px 10px;display:flex;position:sticky;top:0}.toolbar-divider.svelte-vm4iq2{background:var(--border);width:1px;height:18px;margin:0 2px}.toolbar-btn.svelte-vm4iq2{min-width:34px;min-height:34px;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;transition:all .15s;display:inline-flex}.toolbar-btn.svelte-vm4iq2:hover:not(:disabled){background:var(--accent);color:var(--accent-foreground)}.toolbar-btn.active.svelte-vm4iq2{background:var(--primary);color:var(--primary-foreground)}.toolbar-btn.svelte-vm4iq2:disabled{opacity:.4;cursor:not-allowed}.dropdown.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.dropdown-trigger.svelte-vm4iq2{gap:2px;padding:0 6px}.dropdown-chevron{opacity:.6}.dropdown-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:2px;min-width:180px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.dropdown-item.svelte-vm4iq2{min-height:32px;color:var(--popover-foreground);cursor:pointer;text-align:left;background:0 0;border:none;border-radius:4px;align-items:center;gap:10px;padding:6px 10px;font-size:.875rem;transition:background .1s;display:inline-flex}.dropdown-item.svelte-vm4iq2:hover{background:var(--accent);color:var(--accent-foreground)}.dropdown-item.selected.svelte-vm4iq2{background:color-mix(in srgb, var(--primary) 18%, transparent);color:var(--foreground)}.highlight-picker.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.highlight-btn.svelte-vm4iq2{position:relative}.highlight-dot.svelte-vm4iq2{border:1px solid var(--border);opacity:0;pointer-events:none;border-radius:50%;width:8px;height:8px;transition:opacity .15s,transform .15s;position:absolute;bottom:6px;right:6px;transform:scale(.6)}.highlight-dot.visible.svelte-vm4iq2{opacity:1;transform:scale(1)}.highlight-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:6px;min-width:180px;padding:8px;display:flex;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.highlight-swatch-grid.svelte-vm4iq2{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.highlight-swatch.svelte-vm4iq2{border:1px solid var(--border);cursor:pointer;border-radius:6px;width:28px;height:28px;padding:0;transition:transform .1s,box-shadow .1s}.highlight-swatch.svelte-vm4iq2:hover{box-shadow:0 0 0 2px var(--ring);transform:scale(1.08)}.highlight-swatch.selected.svelte-vm4iq2{box-shadow:0 0 0 2px var(--ring)}.dark .highlight-picker.svelte-vm4iq2 .highlight-swatch:where(.svelte-vm4iq2),.dark .highlight-picker.svelte-vm4iq2 .highlight-dot:where(.svelte-vm4iq2){background-blend-mode:multiply;background-image:linear-gradient(#0000009e,#0000009e)}.highlight-clear.svelte-vm4iq2{color:var(--muted-foreground);border:1px solid var(--border);cursor:pointer;background:0 0;border-radius:4px;justify-content:center;align-items:center;padding:4px 8px;font-size:.75rem;display:inline-flex}.highlight-clear.svelte-vm4iq2:hover{background:var(--accent);color:var(--accent-foreground)}.visually-hidden-file-input.svelte-vm4iq2{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.image-btn.uploading.svelte-vm4iq2{color:var(--ring)}.image-btn.svelte-vm4iq2:disabled:not(.uploading){opacity:.4;cursor:not-allowed}@keyframes svelte-vm4iq2-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.image-btn.svelte-vm4iq2 .animate-spin{animation:1s linear infinite svelte-vm4iq2-spin}.image-error.svelte-vm4iq2{background:color-mix(in srgb, var(--destructive) 10%, transparent);color:var(--destructive);border-bottom:1px solid color-mix(in srgb, var(--destructive) 20%, transparent);justify-content:space-between;align-items:center;gap:8px;padding:6px 12px;font-size:12px;display:flex}.image-error-dismiss.svelte-vm4iq2{color:var(--destructive);cursor:pointer;background:0 0;border:none;padding:0 4px;font-size:16px;line-height:1}.emoji-picker.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.emoji-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;min-width:220px;padding:8px;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.emoji-grid.svelte-vm4iq2{grid-template-columns:repeat(5,1fr);gap:4px;display:grid}.emoji-button.svelte-vm4iq2{cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:1.25rem;line-height:1;transition:background .1s,transform .1s;display:inline-flex}.emoji-button.svelte-vm4iq2:hover{background:var(--accent);transform:scale(1.08)}.emoji-button.svelte-vm4iq2:focus-visible{outline:2px solid var(--ring);outline-offset:1px}.table-picker.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.table-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;padding:8px;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.table-grid.svelte-vm4iq2{grid-template-columns:repeat(8,18px);grid-auto-rows:18px;gap:3px;display:grid}.table-cell.svelte-vm4iq2{border:1px solid var(--border);background:var(--background);cursor:pointer;border-radius:3px;width:18px;height:18px;padding:0;transition:background 80ms,border-color 80ms}.table-cell.svelte-vm4iq2:hover{border-color:var(--primary)}.table-cell.active.svelte-vm4iq2{background:color-mix(in srgb, var(--primary) 35%, transparent);border-color:var(--primary)}.table-grid-label.svelte-vm4iq2{text-align:center;color:var(--muted-foreground);margin-top:8px;font-size:.75rem}.table-actions-popover.svelte-vm4iq2{width:min(280px,100vw - 24px);padding:6px}.table-action-group.svelte-vm4iq2{grid-template-columns:1fr;gap:2px;padding:4px 0;display:grid}.table-action-group.svelte-vm4iq2+.table-action-group:where(.svelte-vm4iq2){border-top:1px solid var(--border)}.table-action-heading.svelte-vm4iq2{letter-spacing:.04em;text-transform:uppercase;color:var(--muted-foreground);padding:4px 8px 2px;font-size:.6875rem;font-weight:600}.table-action.svelte-vm4iq2{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:5px;padding:7px 8px;font-size:.8125rem}.table-action.svelte-vm4iq2:hover:not(:disabled),.table-action.svelte-vm4iq2:focus-visible{background:var(--accent);outline:none}.table-action.svelte-vm4iq2:focus-visible{box-shadow:0 0 0 2px var(--ring)}.table-action.svelte-vm4iq2:disabled{color:var(--muted-foreground);opacity:.45;cursor:not-allowed}.table-danger-action.svelte-vm4iq2{color:var(--destructive)}.table-danger-action.svelte-vm4iq2:hover:not(:disabled){background:color-mix(in srgb, var(--destructive) 12%, transparent)}.copy-btn.copied.svelte-vm4iq2{color:var(--primary)}.snapshot-btn.svelte-vm4iq2{color:var(--muted-foreground)}.toolbar.floating-bar.svelte-vm4iq2{z-index:var(--layer-popover);background:color-mix(in srgb, var(--background) 95%, transparent);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border);box-shadow:0 10px 25px -5px #00000026, 0 8px 10px -6px #00000026, 0 0 0 1px var(--border);border-radius:12px;width:max-content;max-width:90vw;padding:10px 14px;animation:.2s ease-out svelte-vm4iq2-floatUp;position:fixed;top:auto;bottom:24px;left:50%;overflow:visible;transform:translate(-50%)}@media (width<=640px){.toolbar.floating-bar.svelte-vm4iq2{left:8px;right:8px;bottom:max(10px, env(safe-area-inset-bottom));border-radius:10px;width:auto;max-width:none;padding:8px;transform:none}.floating-toolbar-layout.svelte-vm4iq2{flex-flow:wrap;align-items:center;gap:4px;max-height:min(42vh,260px);padding-right:34px;display:flex;overflow-y:auto}.floating-toolbar-row.svelte-vm4iq2{display:contents}.floating-toolbar-spacer.svelte-vm4iq2{display:none}.floating-toolbar-close.svelte-vm4iq2{margin-left:0;position:absolute;top:6px;right:6px}.floating-toolbar-row-secondary.svelte-vm4iq2{display:contents}}.dropdown-popover.open-up.svelte-vm4iq2,.highlight-popover.open-up.svelte-vm4iq2,.emoji-popover.open-up.svelte-vm4iq2,.table-popover.open-up.svelte-vm4iq2{top:auto;bottom:calc(100% + 6px)}.dropdown-popover.open-left.svelte-vm4iq2,.highlight-popover.open-left.svelte-vm4iq2,.emoji-popover.open-left.svelte-vm4iq2,.table-popover.open-left.svelte-vm4iq2{left:auto;right:0}@keyframes svelte-vm4iq2-floatUp{0%{opacity:0;transform:translate(-50%,20px)}to{opacity:1;transform:translate(-50%)}}.editor-wrapper.svelte-9hjz5q{flex-direction:column;flex:1;min-height:0;display:flex}.editor-content.svelte-9hjz5q{flex:1;padding:24px;position:relative;overflow-y:auto}.editor-content.deferred-loading.svelte-9hjz5q{min-height:320px}.large-document-loader.svelte-9hjz5q{z-index:2;border:1px solid var(--border);background:color-mix(in srgb, var(--background) 94%, transparent);pointer-events:none;border-radius:12px;padding:20px;position:absolute;inset:24px}.large-document-loader-heading.svelte-9hjz5q{color:var(--muted-foreground);align-items:center;gap:10px;font-size:.875rem;font-weight:500;display:flex}.large-document-spinner.svelte-9hjz5q{border:2px solid var(--border);border-top-color:var(--primary);border-radius:999px;width:18px;height:18px;animation:.8s linear infinite svelte-9hjz5q-large-document-spin}.large-document-loader-lines.svelte-9hjz5q{gap:12px;margin-top:28px;display:grid}.large-document-loader-lines.svelte-9hjz5q span:where(.svelte-9hjz5q){background:linear-gradient(90deg, var(--muted) 20%, color-mix(in srgb, var(--muted) 55%, var(--background)) 50%, var(--muted) 80%);background-size:220% 100%;border-radius:999px;height:12px;animation:1.35s ease-in-out infinite svelte-9hjz5q-large-document-shimmer;display:block}@keyframes svelte-9hjz5q-large-document-spin{to{transform:rotate(360deg)}}@keyframes svelte-9hjz5q-large-document-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion:reduce){.large-document-spinner.svelte-9hjz5q,.large-document-loader-lines.svelte-9hjz5q span:where(.svelte-9hjz5q){animation:none}}.editor-content.svelte-9hjz5q .tiptap{min-height:300px;color:var(--foreground);outline:none;font-size:16px;line-height:1.7}.editor-content.svelte-9hjz5q .tiptap:focus-visible{outline:none}.editor-content.svelte-9hjz5q .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:var(--muted-foreground);pointer-events:none;height:0}.editor-content.svelte-9hjz5q .tiptap h1{letter-spacing:-.025em;margin:1.5rem 0 .75rem;font-size:2rem;font-weight:800}.editor-content.svelte-9hjz5q .tiptap h2{letter-spacing:-.02em;margin:1.25rem 0 .5rem;font-size:1.5rem;font-weight:700}.editor-content.svelte-9hjz5q .tiptap h3{margin:1rem 0 .5rem;font-size:1.25rem;font-weight:600}.editor-content.svelte-9hjz5q .tiptap p{margin:.5rem 0}.editor-content.svelte-9hjz5q .tiptap ul:not([data-type=taskList]){margin:.5rem 0;padding-left:1.5rem;list-style-type:disc}.editor-content.svelte-9hjz5q .tiptap ol{margin:.5rem 0;padding-left:1.5rem;list-style-type:decimal}.editor-content.svelte-9hjz5q .tiptap li{margin:.25rem 0;display:list-item}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList]{padding-left:.25rem;list-style:none}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li{align-items:flex-start;gap:.5rem;display:flex}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li>label{-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;height:1.7em;margin:0;display:flex}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li>div{flex:auto;min-width:0}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li>div>p{margin:0}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] input[type=checkbox]{accent-color:var(--primary);cursor:pointer}.editor-content.svelte-9hjz5q .tiptap blockquote{border-left:3px solid var(--border);color:var(--muted-foreground);margin:.75rem 0;padding-left:1rem;font-style:italic}.editor-content.svelte-9hjz5q .tiptap code{background:var(--muted);border-radius:4px;padding:.125rem .375rem;font-family:Fira Code,Consolas,monospace;font-size:.875rem}.editor-content.svelte-9hjz5q .tiptap pre{background:var(--muted);color:var(--foreground);border:1px solid var(--border);border-radius:8px;margin:.75rem 0;padding:1rem;font-family:Fira Code,Consolas,monospace;font-size:.875rem;line-height:1.6;overflow-x:auto}.editor-content.svelte-9hjz5q .tiptap pre code{font-size:inherit;color:inherit;background:0 0;border-radius:0;padding:0}.editor-content.svelte-9hjz5q .tiptap pre .hljs-keyword{color:var(--hljs-keyword)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-string{color:var(--hljs-string)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-number{color:var(--hljs-number)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-function{color:var(--hljs-function)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-title{color:var(--hljs-title)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-comment{color:var(--hljs-comment);font-style:italic}.editor-content.svelte-9hjz5q .tiptap pre .hljs-built_in{color:var(--hljs-built_in)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-type{color:var(--hljs-type)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-attr{color:var(--hljs-attr)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-variable{color:var(--hljs-variable)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-literal{color:var(--hljs-literal)}.editor-content.svelte-9hjz5q .tiptap hr{border:none;border-top:2px solid var(--border);margin:1.5rem 0}.editor-content.svelte-9hjz5q .tiptap table{border-collapse:collapse;table-layout:fixed;width:100%;margin:.75rem 0;overflow:hidden}.editor-content.svelte-9hjz5q .tiptap th,.editor-content.svelte-9hjz5q .tiptap td{border:1px solid var(--border);vertical-align:top;text-align:left;min-width:3rem;padding:.4rem .6rem}.editor-content.svelte-9hjz5q .tiptap th{background:var(--muted);font-weight:600}.editor-content.svelte-9hjz5q .tiptap .selectedCell:after{content:"";background:color-mix(in srgb, var(--primary) 16%, transparent);pointer-events:none;position:absolute;inset:0}.editor-content.svelte-9hjz5q .tiptap td,.editor-content.svelte-9hjz5q .tiptap th{position:relative}.editor-content.svelte-9hjz5q .tiptap .column-resize-handle{background:var(--primary);cursor:col-resize;width:4px;position:absolute;top:0;bottom:0;right:-2px}.editor-content.svelte-9hjz5q .tiptap .doc-link{color:var(--primary);cursor:pointer;text-decoration:underline}.editor-content.svelte-9hjz5q .tiptap [data-resize-container][data-node=image]{max-width:100%;margin:.75rem 0}.editor-content.svelte-9hjz5q .tiptap [data-resize-wrapper]>.doc-image{border-radius:.5rem;max-width:100%;height:auto;display:block}.editor-content.svelte-9hjz5q .tiptap [data-resize-wrapper]{max-width:100%}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle]{border:2px solid var(--background);background:var(--primary);width:12px;height:12px;box-shadow:0 1px 4px color-mix(in srgb, var(--foreground) 25%, transparent);opacity:0;border-radius:9999px;transition:opacity .12s}.editor-content.svelte-9hjz5q .tiptap .ProseMirror-selectednode [data-resize-handle],.editor-content.svelte-9hjz5q .tiptap [data-resize-state=true] [data-resize-handle]{opacity:1}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-left],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-right]{cursor:nwse-resize;transform:translate(50%,50%)}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-right],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-left]{cursor:nesw-resize;transform:translate(-50%,50%)}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-left],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-right]{transform:translate(var(--image-handle-x,50%), -50%)}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-right],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-right]{--image-handle-x:50%}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-left],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-left]{--image-handle-x:-50%}.editor-content.svelte-9hjz5q .tiptap mark{background-color:var(--highlight-default,#fde68a);border-radius:2px;padding:0 2px}.dark .editor-content.svelte-9hjz5q .tiptap mark{background-blend-mode:multiply;color:#fff;background-image:linear-gradient(#0000009e,#0000009e)}.editor-skeleton.svelte-9hjz5q{flex-direction:column;flex:1;display:flex}.skeleton-toolbar.svelte-9hjz5q{border-bottom:1px solid var(--border);gap:6px;padding:8px 12px;display:flex}.skeleton-icon.svelte-9hjz5q{background:var(--muted);border-radius:6px;width:32px;height:32px;animation:1.5s ease-in-out infinite svelte-9hjz5q-pulse}.skeleton-body.svelte-9hjz5q{flex-direction:column;gap:12px;padding:24px;display:flex}.skeleton-bar.svelte-9hjz5q{background:var(--muted);border-radius:4px;height:16px;animation:1.5s ease-in-out infinite svelte-9hjz5q-pulse}@keyframes svelte-9hjz5q-pulse{0%,to{opacity:1}50%{opacity:.4}}.title-input.svelte-vc365t{color:var(--foreground);background:0 0;border:none;border-bottom:2px solid #0000;outline:none;width:100%;margin-bottom:8px;padding:0 0 4px;font-size:2rem;font-weight:700;transition:border-color .15s}.title-input.svelte-vc365t::placeholder{color:var(--muted-foreground)}.title-input.focused.svelte-vc365t{border-bottom-color:var(--ring)}.title-input.svelte-vc365t:hover:not(.focused){border-bottom-color:var(--border)}.markdown-toggle.svelte-1k98zvf{flex-direction:column;flex:1;width:100%;min-height:0;display:flex;position:relative}.copy-btn.svelte-1k98zvf{z-index:10;border:1px solid var(--border);background:color-mix(in srgb, var(--card) 85%, transparent);color:var(--muted-foreground);-webkit-backdrop-filter:blur(8px);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:6px 12px;font-size:12px;font-weight:500;transition:all .2s;display:inline-flex;position:absolute;top:12px;right:24px;box-shadow:0 2px 8px #0000000d}.copy-btn.svelte-1k98zvf:hover{background:var(--accent);color:var(--accent-foreground);border-color:var(--accent)}.copy-btn.svelte-1k98zvf:active{transform:scale(.96)}.markdown-textarea.svelte-1k98zvf{box-sizing:border-box;resize:vertical;width:100%;height:100%;min-height:0;color:var(--foreground);background:var(--muted);tab-size:4;border:none;border-radius:8px;outline:none;flex:none;padding:56px 24px 24px;font-family:Fira Code,Consolas,Courier New,monospace;font-size:14px;line-height:1.7;transition:background .15s;display:block;overflow-y:hidden}.markdown-textarea.svelte-1k98zvf::placeholder{color:var(--muted-foreground)}.markdown-textarea.svelte-1k98zvf:focus{background:var(--background)}.datepicker.svelte-zmry26{position:relative}.dp-trigger.svelte-zmry26{border:1px solid var(--input);width:100%;height:2.25rem;color:var(--foreground);cursor:pointer;text-align:left;background:0 0;border-radius:6px;align-items:center;gap:6px;padding:0 .625rem;font-size:.875rem;display:inline-flex}.dp-trigger.svelte-zmry26:focus-visible{box-shadow:0 0 0 1px var(--ring);outline:none}.dp-placeholder.svelte-zmry26{color:var(--muted-foreground)}.dp-popover.svelte-zmry26{z-index:var(--layer-popover);background:var(--popover);width:16rem;color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;padding:8px;position:absolute;top:calc(100% + 4px);left:0;box-shadow:0 4px 16px #0000002e}.dp-header.svelte-zmry26{justify-content:space-between;align-items:center;margin-bottom:6px;display:flex}.dp-title.svelte-zmry26{font-size:.8125rem;font-weight:600}.dp-nav.svelte-zmry26{width:1.75rem;height:1.75rem;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.dp-nav.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dp-weekdays.svelte-zmry26,.dp-grid.svelte-zmry26{grid-template-columns:repeat(7,1fr);gap:2px;display:grid}.dp-weekday.svelte-zmry26{text-align:center;color:var(--muted-foreground);padding:2px 0;font-size:.6875rem}.dp-empty.svelte-zmry26{aspect-ratio:1}.dp-day.svelte-zmry26{aspect-ratio:1;color:var(--foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:.8125rem;display:inline-flex}.dp-day.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dp-day.today.svelte-zmry26{box-shadow:inset 0 0 0 1px var(--ring)}.dp-day.selected.svelte-zmry26,.dp-day.selected.svelte-zmry26:hover{background:var(--primary);color:var(--primary-foreground)}.dp-clear.svelte-zmry26{width:100%;color:var(--muted-foreground);border:1px solid var(--border);cursor:pointer;background:0 0;border-radius:6px;margin-top:6px;padding:4px 0;font-size:.75rem}.dp-clear.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dashboard-shell.svelte-e61um3{position:relative}@media (width<=767px){.dashboard-header.svelte-e61um3{min-height:44px}.dashboard-header-actions.svelte-e61um3{top:calc(.75rem + env(safe-area-inset-top));z-index:10;position:absolute;right:.75rem}.dashboard-context-identity.svelte-e61um3{min-width:0;margin-left:56px}}@media (width<=520px){.dashboard-header-actions.svelte-e61um3 button{width:40px;height:40px;padding:0}.dashboard-action-label.svelte-e61um3{display:none}}@media (width<=449px){.dashboard-context-identity.svelte-e61um3{margin-left:52px}.dashboard-context-identity.svelte-e61um3 p:where(.svelte-e61um3){display:none}.dashboard-context-identity.svelte-e61um3 h1:where(.svelte-e61um3){font-size:1.25rem}}@media (width<=767px){.search-form.svelte-itf76n{margin-left:56px}}@media (width<=420px){.search-form.svelte-itf76n{margin-left:52px}}
|
|
1
|
+
.editor-settings.svelte-1eaqpj summary:where(.svelte-1eaqpj){list-style:none}.editor-settings.svelte-1eaqpj summary:where(.svelte-1eaqpj)::-webkit-details-marker{display:none}.editor-settings-chevron.svelte-1eaqpj{font-size:20px;transition:transform .18s}.editor-settings[open].svelte-1eaqpj .editor-settings-chevron:where(.svelte-1eaqpj){transform:rotate(180deg)}.profile-advanced.svelte-1eaqpj summary:where(.svelte-1eaqpj){list-style:none}.profile-advanced.svelte-1eaqpj summary:where(.svelte-1eaqpj)::-webkit-details-marker{display:none}.profile-advanced-chevron.svelte-1eaqpj{font-size:20px;transition:transform .18s}.profile-advanced[open].svelte-1eaqpj .profile-advanced-chevron:where(.svelte-1eaqpj){transform:rotate(180deg)}.preference-switch.svelte-1eaqpj{border:1px solid var(--border);background:var(--muted);cursor:pointer;border-radius:999px;flex:none;width:42px;height:24px;padding:2px;transition:background .18s,border-color .18s;position:relative}.preference-switch.svelte-1eaqpj span:where(.svelte-1eaqpj){background:var(--background);border-radius:999px;width:18px;height:18px;transition:transform .18s;display:block;box-shadow:0 1px 3px #00000038}.preference-switch.enabled.svelte-1eaqpj{border-color:var(--primary);background:var(--primary)}.preference-switch.enabled.svelte-1eaqpj span:where(.svelte-1eaqpj){transform:translate(18px)}.preference-switch.svelte-1eaqpj:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.preference-switch.svelte-1eaqpj:disabled{cursor:not-allowed;opacity:.45}[data-select-viewport],[data-combobox-viewport]{scrollbar-width:none!important;-ms-overflow-style:none!important;-webkit-overflow-scrolling:touch!important}[data-combobox-viewport]::-webkit-scrollbar{display:none!important}[data-select-viewport]::-webkit-scrollbar{display:none!important}@media (pointer:coarse){.sidebar-touch-action.svelte-1nshngr,.sidebar-touch-action.svelte-1uwxs9f{opacity:1;min-width:36px;min-height:36px}}:root{--layer-chrome:30;--layer-panel:100;--layer-popover:200;--layer-modal:1000}.link-dialog-body.svelte-1cfbs6u{flex-direction:column;gap:.5rem;padding:0 0 1rem;display:flex}.link-dialog-label.svelte-1cfbs6u{color:var(--foreground);font-size:.875rem;font-weight:500}.toolbar.svelte-vm4iq2{border-bottom:1px solid var(--border);background:var(--card);z-index:var(--layer-chrome);border-radius:7px 7px 0 0;flex-wrap:wrap;align-items:center;gap:1px;padding:6px 10px;display:flex;position:sticky;top:0}.toolbar-divider.svelte-vm4iq2{background:var(--border);width:1px;height:18px;margin:0 2px}.toolbar-btn.svelte-vm4iq2{min-width:34px;min-height:34px;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;transition:all .15s;display:inline-flex}.toolbar-btn.svelte-vm4iq2:hover:not(:disabled){background:var(--accent);color:var(--accent-foreground)}.toolbar-btn.active.svelte-vm4iq2{background:var(--primary);color:var(--primary-foreground)}.toolbar-btn.svelte-vm4iq2:disabled{opacity:.4;cursor:not-allowed}.dropdown.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.dropdown-trigger.svelte-vm4iq2{gap:2px;padding:0 6px}.dropdown-chevron{opacity:.6}.dropdown-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:2px;min-width:180px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.dropdown-item.svelte-vm4iq2{min-height:32px;color:var(--popover-foreground);cursor:pointer;text-align:left;background:0 0;border:none;border-radius:4px;align-items:center;gap:10px;padding:6px 10px;font-size:.875rem;transition:background .1s;display:inline-flex}.dropdown-item.svelte-vm4iq2:hover{background:var(--accent);color:var(--accent-foreground)}.dropdown-item.selected.svelte-vm4iq2{background:color-mix(in srgb, var(--primary) 18%, transparent);color:var(--foreground)}.highlight-picker.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.highlight-btn.svelte-vm4iq2{position:relative}.highlight-dot.svelte-vm4iq2{border:1px solid var(--border);opacity:0;pointer-events:none;border-radius:50%;width:8px;height:8px;transition:opacity .15s,transform .15s;position:absolute;bottom:6px;right:6px;transform:scale(.6)}.highlight-dot.visible.svelte-vm4iq2{opacity:1;transform:scale(1)}.highlight-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:6px;min-width:180px;padding:8px;display:flex;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.highlight-swatch-grid.svelte-vm4iq2{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.highlight-swatch.svelte-vm4iq2{border:1px solid var(--border);cursor:pointer;border-radius:6px;width:28px;height:28px;padding:0;transition:transform .1s,box-shadow .1s}.highlight-swatch.svelte-vm4iq2:hover{box-shadow:0 0 0 2px var(--ring);transform:scale(1.08)}.highlight-swatch.selected.svelte-vm4iq2{box-shadow:0 0 0 2px var(--ring)}.dark .highlight-picker.svelte-vm4iq2 .highlight-swatch:where(.svelte-vm4iq2),.dark .highlight-picker.svelte-vm4iq2 .highlight-dot:where(.svelte-vm4iq2){background-blend-mode:multiply;background-image:linear-gradient(#0000009e,#0000009e)}.highlight-clear.svelte-vm4iq2{color:var(--muted-foreground);border:1px solid var(--border);cursor:pointer;background:0 0;border-radius:4px;justify-content:center;align-items:center;padding:4px 8px;font-size:.75rem;display:inline-flex}.highlight-clear.svelte-vm4iq2:hover{background:var(--accent);color:var(--accent-foreground)}.visually-hidden-file-input.svelte-vm4iq2{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.image-btn.uploading.svelte-vm4iq2{color:var(--ring)}.image-btn.svelte-vm4iq2:disabled:not(.uploading){opacity:.4;cursor:not-allowed}@keyframes svelte-vm4iq2-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.image-btn.svelte-vm4iq2 .animate-spin{animation:1s linear infinite svelte-vm4iq2-spin}.image-error.svelte-vm4iq2{background:color-mix(in srgb, var(--destructive) 10%, transparent);color:var(--destructive);border-bottom:1px solid color-mix(in srgb, var(--destructive) 20%, transparent);justify-content:space-between;align-items:center;gap:8px;padding:6px 12px;font-size:12px;display:flex}.image-error-dismiss.svelte-vm4iq2{color:var(--destructive);cursor:pointer;background:0 0;border:none;padding:0 4px;font-size:16px;line-height:1}.emoji-picker.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.emoji-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;min-width:220px;padding:8px;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.emoji-grid.svelte-vm4iq2{grid-template-columns:repeat(5,1fr);gap:4px;display:grid}.emoji-button.svelte-vm4iq2{cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:1.25rem;line-height:1;transition:background .1s,transform .1s;display:inline-flex}.emoji-button.svelte-vm4iq2:hover{background:var(--accent);transform:scale(1.08)}.emoji-button.svelte-vm4iq2:focus-visible{outline:2px solid var(--ring);outline-offset:1px}.table-picker.svelte-vm4iq2{justify-content:center;align-items:center;display:inline-flex;position:relative}.table-popover.svelte-vm4iq2{z-index:var(--layer-popover);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;padding:8px;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 4px 12px #0000001a}.table-grid.svelte-vm4iq2{grid-template-columns:repeat(8,18px);grid-auto-rows:18px;gap:3px;display:grid}.table-cell.svelte-vm4iq2{border:1px solid var(--border);background:var(--background);cursor:pointer;border-radius:3px;width:18px;height:18px;padding:0;transition:background 80ms,border-color 80ms}.table-cell.svelte-vm4iq2:hover{border-color:var(--primary)}.table-cell.active.svelte-vm4iq2{background:color-mix(in srgb, var(--primary) 35%, transparent);border-color:var(--primary)}.table-grid-label.svelte-vm4iq2{text-align:center;color:var(--muted-foreground);margin-top:8px;font-size:.75rem}.table-actions-popover.svelte-vm4iq2{width:min(280px,100vw - 24px);padding:6px}.table-action-group.svelte-vm4iq2{grid-template-columns:1fr;gap:2px;padding:4px 0;display:grid}.table-action-group.svelte-vm4iq2+.table-action-group:where(.svelte-vm4iq2){border-top:1px solid var(--border)}.table-action-heading.svelte-vm4iq2{letter-spacing:.04em;text-transform:uppercase;color:var(--muted-foreground);padding:4px 8px 2px;font-size:.6875rem;font-weight:600}.table-action.svelte-vm4iq2{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:5px;padding:7px 8px;font-size:.8125rem}.table-action.svelte-vm4iq2:hover:not(:disabled),.table-action.svelte-vm4iq2:focus-visible{background:var(--accent);outline:none}.table-action.svelte-vm4iq2:focus-visible{box-shadow:0 0 0 2px var(--ring)}.table-action.svelte-vm4iq2:disabled{color:var(--muted-foreground);opacity:.45;cursor:not-allowed}.table-danger-action.svelte-vm4iq2{color:var(--destructive)}.table-danger-action.svelte-vm4iq2:hover:not(:disabled){background:color-mix(in srgb, var(--destructive) 12%, transparent)}.copy-btn.copied.svelte-vm4iq2{color:var(--primary)}.snapshot-btn.svelte-vm4iq2{color:var(--muted-foreground)}.toolbar.floating-bar.svelte-vm4iq2{z-index:var(--layer-popover);background:color-mix(in srgb, var(--background) 95%, transparent);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border);box-shadow:0 10px 25px -5px #00000026, 0 8px 10px -6px #00000026, 0 0 0 1px var(--border);border-radius:12px;width:max-content;max-width:90vw;padding:10px 14px;animation:.2s ease-out svelte-vm4iq2-floatUp;position:fixed;top:auto;bottom:24px;left:50%;overflow:visible;transform:translate(-50%)}@media (width<=640px){.toolbar.floating-bar.svelte-vm4iq2{left:8px;right:8px;bottom:max(10px, env(safe-area-inset-bottom));border-radius:10px;width:auto;max-width:none;padding:8px;transform:none}.floating-toolbar-layout.svelte-vm4iq2{flex-flow:wrap;align-items:center;gap:4px;max-height:none;padding-right:34px;display:flex;overflow:visible}.floating-toolbar-row.svelte-vm4iq2{display:contents}.floating-toolbar-spacer.svelte-vm4iq2{display:none}.floating-toolbar-close.svelte-vm4iq2{margin-left:0;position:absolute;top:6px;right:6px}.floating-toolbar-row-secondary.svelte-vm4iq2{display:contents}.toolbar.floating-bar.svelte-vm4iq2 .dropdown-popover:where(.svelte-vm4iq2),.toolbar.floating-bar.svelte-vm4iq2 .highlight-popover:where(.svelte-vm4iq2),.toolbar.floating-bar.svelte-vm4iq2 .emoji-popover:where(.svelte-vm4iq2),.toolbar.floating-bar.svelte-vm4iq2 .table-popover:where(.svelte-vm4iq2){overscroll-behavior:contain;max-width:calc(100vw - 16px);max-height:min(60dvh,360px);top:auto;bottom:calc(100% + 8px);overflow-y:auto}}.dropdown-popover.open-up.svelte-vm4iq2,.highlight-popover.open-up.svelte-vm4iq2,.emoji-popover.open-up.svelte-vm4iq2,.table-popover.open-up.svelte-vm4iq2{top:auto;bottom:calc(100% + 6px)}.dropdown-popover.open-left.svelte-vm4iq2,.highlight-popover.open-left.svelte-vm4iq2,.emoji-popover.open-left.svelte-vm4iq2,.table-popover.open-left.svelte-vm4iq2{left:auto;right:0}@keyframes svelte-vm4iq2-floatUp{0%{opacity:0;transform:translate(-50%,20px)}to{opacity:1;transform:translate(-50%)}}.editor-wrapper.svelte-9hjz5q{flex-direction:column;flex:1;min-height:0;display:flex}.editor-content.svelte-9hjz5q{flex:1;padding:24px;position:relative;overflow-y:auto}.editor-content.deferred-loading.svelte-9hjz5q{min-height:320px}.large-document-loader.svelte-9hjz5q{z-index:2;border:1px solid var(--border);background:color-mix(in srgb, var(--background) 94%, transparent);pointer-events:none;border-radius:12px;padding:20px;position:absolute;inset:24px}.large-document-loader-heading.svelte-9hjz5q{color:var(--muted-foreground);align-items:center;gap:10px;font-size:.875rem;font-weight:500;display:flex}.large-document-spinner.svelte-9hjz5q{border:2px solid var(--border);border-top-color:var(--primary);border-radius:999px;width:18px;height:18px;animation:.8s linear infinite svelte-9hjz5q-large-document-spin}.large-document-loader-lines.svelte-9hjz5q{gap:12px;margin-top:28px;display:grid}.large-document-loader-lines.svelte-9hjz5q span:where(.svelte-9hjz5q){background:linear-gradient(90deg, var(--muted) 20%, color-mix(in srgb, var(--muted) 55%, var(--background)) 50%, var(--muted) 80%);background-size:220% 100%;border-radius:999px;height:12px;animation:1.35s ease-in-out infinite svelte-9hjz5q-large-document-shimmer;display:block}@keyframes svelte-9hjz5q-large-document-spin{to{transform:rotate(360deg)}}@keyframes svelte-9hjz5q-large-document-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion:reduce){.large-document-spinner.svelte-9hjz5q,.large-document-loader-lines.svelte-9hjz5q span:where(.svelte-9hjz5q){animation:none}}.editor-content.svelte-9hjz5q .tiptap{min-height:300px;color:var(--foreground);outline:none;font-size:16px;line-height:1.7}.editor-content.svelte-9hjz5q .tiptap:focus-visible{outline:none}.editor-content.svelte-9hjz5q .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:var(--muted-foreground);pointer-events:none;height:0}.editor-content.svelte-9hjz5q .tiptap h1{letter-spacing:-.025em;margin:1.5rem 0 .75rem;font-size:2rem;font-weight:800}.editor-content.svelte-9hjz5q .tiptap h2{letter-spacing:-.02em;margin:1.25rem 0 .5rem;font-size:1.5rem;font-weight:700}.editor-content.svelte-9hjz5q .tiptap h3{margin:1rem 0 .5rem;font-size:1.25rem;font-weight:600}.editor-content.svelte-9hjz5q .tiptap p{margin:.5rem 0}.editor-content.svelte-9hjz5q .tiptap ul:not([data-type=taskList]){margin:.5rem 0;padding-left:1.5rem;list-style-type:disc}.editor-content.svelte-9hjz5q .tiptap ol{margin:.5rem 0;padding-left:1.5rem;list-style-type:decimal}.editor-content.svelte-9hjz5q .tiptap li{margin:.25rem 0;display:list-item}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList]{padding-left:.25rem;list-style:none}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li{align-items:flex-start;gap:.5rem;display:flex}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li>label{-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;height:1.7em;margin:0;display:flex}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li>div{flex:auto;min-width:0}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] li>div>p{margin:0}.editor-content.svelte-9hjz5q .tiptap ul[data-type=taskList] input[type=checkbox]{accent-color:var(--primary);cursor:pointer}.editor-content.svelte-9hjz5q .tiptap blockquote{border-left:3px solid var(--border);color:var(--muted-foreground);margin:.75rem 0;padding-left:1rem;font-style:italic}.editor-content.svelte-9hjz5q .tiptap code{background:var(--muted);border-radius:4px;padding:.125rem .375rem;font-family:Fira Code,Consolas,monospace;font-size:.875rem}.editor-content.svelte-9hjz5q .tiptap pre{background:var(--muted);color:var(--foreground);border:1px solid var(--border);border-radius:8px;margin:.75rem 0;padding:1rem;font-family:Fira Code,Consolas,monospace;font-size:.875rem;line-height:1.6;overflow-x:auto}.editor-content.svelte-9hjz5q .tiptap pre code{font-size:inherit;color:inherit;background:0 0;border-radius:0;padding:0}.editor-content.svelte-9hjz5q .tiptap pre .hljs-keyword{color:var(--hljs-keyword)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-string{color:var(--hljs-string)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-number{color:var(--hljs-number)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-function{color:var(--hljs-function)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-title{color:var(--hljs-title)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-comment{color:var(--hljs-comment);font-style:italic}.editor-content.svelte-9hjz5q .tiptap pre .hljs-built_in{color:var(--hljs-built_in)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-type{color:var(--hljs-type)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-attr{color:var(--hljs-attr)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-variable{color:var(--hljs-variable)}.editor-content.svelte-9hjz5q .tiptap pre .hljs-literal{color:var(--hljs-literal)}.editor-content.svelte-9hjz5q .tiptap hr{border:none;border-top:2px solid var(--border);margin:1.5rem 0}.editor-content.svelte-9hjz5q .tiptap table{border-collapse:collapse;table-layout:fixed;width:100%;margin:.75rem 0;overflow:hidden}.editor-content.svelte-9hjz5q .tiptap th,.editor-content.svelte-9hjz5q .tiptap td{border:1px solid var(--border);vertical-align:top;text-align:left;min-width:3rem;padding:.4rem .6rem}.editor-content.svelte-9hjz5q .tiptap th{background:var(--muted);font-weight:600}.editor-content.svelte-9hjz5q .tiptap .selectedCell:after{content:"";background:color-mix(in srgb, var(--primary) 16%, transparent);pointer-events:none;position:absolute;inset:0}.editor-content.svelte-9hjz5q .tiptap td,.editor-content.svelte-9hjz5q .tiptap th{position:relative}.editor-content.svelte-9hjz5q .tiptap .column-resize-handle{background:var(--primary);cursor:col-resize;width:4px;position:absolute;top:0;bottom:0;right:-2px}.editor-content.svelte-9hjz5q .tiptap .doc-link{color:var(--primary);cursor:pointer;text-decoration:underline}.editor-content.svelte-9hjz5q .tiptap [data-resize-container][data-node=image]{max-width:100%;margin:.75rem 0}.editor-content.svelte-9hjz5q .tiptap [data-resize-wrapper]>.doc-image{border-radius:.5rem;max-width:100%;height:auto;display:block}.editor-content.svelte-9hjz5q .tiptap [data-resize-wrapper]{max-width:100%}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle]{border:2px solid var(--background);background:var(--primary);width:12px;height:12px;box-shadow:0 1px 4px color-mix(in srgb, var(--foreground) 25%, transparent);opacity:0;border-radius:9999px;transition:opacity .12s}.editor-content.svelte-9hjz5q .tiptap .ProseMirror-selectednode [data-resize-handle],.editor-content.svelte-9hjz5q .tiptap [data-resize-state=true] [data-resize-handle]{opacity:1}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-left],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-right]{cursor:nwse-resize;transform:translate(50%,50%)}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-right],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-left]{cursor:nesw-resize;transform:translate(-50%,50%)}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-left],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-right]{transform:translate(var(--image-handle-x,50%), -50%)}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-right],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-right]{--image-handle-x:50%}.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=top-left],.editor-content.svelte-9hjz5q .tiptap [data-resize-handle=bottom-left]{--image-handle-x:-50%}.editor-content.svelte-9hjz5q .tiptap mark{background-color:var(--highlight-default,#fde68a);border-radius:2px;padding:0 2px}.dark .editor-content.svelte-9hjz5q .tiptap mark{background-blend-mode:multiply;color:#fff;background-image:linear-gradient(#0000009e,#0000009e)}.editor-skeleton.svelte-9hjz5q{flex-direction:column;flex:1;display:flex}.skeleton-toolbar.svelte-9hjz5q{border-bottom:1px solid var(--border);gap:6px;padding:8px 12px;display:flex}.skeleton-icon.svelte-9hjz5q{background:var(--muted);border-radius:6px;width:32px;height:32px;animation:1.5s ease-in-out infinite svelte-9hjz5q-pulse}.skeleton-body.svelte-9hjz5q{flex-direction:column;gap:12px;padding:24px;display:flex}.skeleton-bar.svelte-9hjz5q{background:var(--muted);border-radius:4px;height:16px;animation:1.5s ease-in-out infinite svelte-9hjz5q-pulse}@keyframes svelte-9hjz5q-pulse{0%,to{opacity:1}50%{opacity:.4}}.title-input.svelte-vc365t{color:var(--foreground);background:0 0;border:none;border-bottom:2px solid #0000;outline:none;width:100%;margin-bottom:8px;padding:0 0 4px;font-size:2rem;font-weight:700;transition:border-color .15s}.title-input.svelte-vc365t::placeholder{color:var(--muted-foreground)}.title-input.focused.svelte-vc365t{border-bottom-color:var(--ring)}.title-input.svelte-vc365t:hover:not(.focused){border-bottom-color:var(--border)}.markdown-toggle.svelte-1k98zvf{flex-direction:column;flex:1;width:100%;min-height:0;display:flex;position:relative}.copy-btn.svelte-1k98zvf{z-index:10;border:1px solid var(--border);background:color-mix(in srgb, var(--card) 85%, transparent);color:var(--muted-foreground);-webkit-backdrop-filter:blur(8px);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:6px 12px;font-size:12px;font-weight:500;transition:all .2s;display:inline-flex;position:absolute;top:12px;right:24px;box-shadow:0 2px 8px #0000000d}.copy-btn.svelte-1k98zvf:hover{background:var(--accent);color:var(--accent-foreground);border-color:var(--accent)}.copy-btn.svelte-1k98zvf:active{transform:scale(.96)}.markdown-textarea.svelte-1k98zvf{box-sizing:border-box;resize:vertical;width:100%;height:100%;min-height:0;color:var(--foreground);background:var(--muted);tab-size:4;border:none;border-radius:8px;outline:none;flex:none;padding:56px 24px 24px;font-family:Fira Code,Consolas,Courier New,monospace;font-size:14px;line-height:1.7;transition:background .15s;display:block;overflow-y:hidden}.markdown-textarea.svelte-1k98zvf::placeholder{color:var(--muted-foreground)}.markdown-textarea.svelte-1k98zvf:focus{background:var(--background)}.datepicker.svelte-zmry26{position:relative}.dp-trigger.svelte-zmry26{border:1px solid var(--input);width:100%;height:2.25rem;color:var(--foreground);cursor:pointer;text-align:left;background:0 0;border-radius:6px;align-items:center;gap:6px;padding:0 .625rem;font-size:.875rem;display:inline-flex}.dp-trigger.svelte-zmry26:focus-visible{box-shadow:0 0 0 1px var(--ring);outline:none}.dp-placeholder.svelte-zmry26{color:var(--muted-foreground)}.dp-popover.svelte-zmry26{z-index:var(--layer-popover);background:var(--popover);width:16rem;color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;padding:8px;position:absolute;top:calc(100% + 4px);left:0;box-shadow:0 4px 16px #0000002e}.dp-header.svelte-zmry26{justify-content:space-between;align-items:center;margin-bottom:6px;display:flex}.dp-title.svelte-zmry26{font-size:.8125rem;font-weight:600}.dp-nav.svelte-zmry26{width:1.75rem;height:1.75rem;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.dp-nav.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dp-weekdays.svelte-zmry26,.dp-grid.svelte-zmry26{grid-template-columns:repeat(7,1fr);gap:2px;display:grid}.dp-weekday.svelte-zmry26{text-align:center;color:var(--muted-foreground);padding:2px 0;font-size:.6875rem}.dp-empty.svelte-zmry26{aspect-ratio:1}.dp-day.svelte-zmry26{aspect-ratio:1;color:var(--foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:.8125rem;display:inline-flex}.dp-day.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dp-day.today.svelte-zmry26{box-shadow:inset 0 0 0 1px var(--ring)}.dp-day.selected.svelte-zmry26,.dp-day.selected.svelte-zmry26:hover{background:var(--primary);color:var(--primary-foreground)}.dp-clear.svelte-zmry26{width:100%;color:var(--muted-foreground);border:1px solid var(--border);cursor:pointer;background:0 0;border-radius:6px;margin-top:6px;padding:4px 0;font-size:.75rem}.dp-clear.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dashboard-shell.svelte-e61um3{position:relative}@media (width<=767px){.dashboard-header.svelte-e61um3{min-height:44px}.dashboard-header-actions.svelte-e61um3{top:calc(.75rem + env(safe-area-inset-top));z-index:10;position:absolute;right:.75rem}.dashboard-context-identity.svelte-e61um3{min-width:0;margin-left:56px}}@media (width<=520px){.dashboard-header-actions.svelte-e61um3 button{width:40px;height:40px;padding:0}.dashboard-action-label.svelte-e61um3{display:none}}@media (width<=449px){.dashboard-context-identity.svelte-e61um3{margin-left:52px}.dashboard-context-identity.svelte-e61um3 p:where(.svelte-e61um3){display:none}.dashboard-context-identity.svelte-e61um3 h1:where(.svelte-e61um3){font-size:1.25rem}}@media (width<=767px){.search-form.svelte-itf76n{margin-left:56px}}@media (width<=420px){.search-form.svelte-itf76n{margin-left:52px}}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/frontend/search.js
CHANGED
|
@@ -810,9 +810,9 @@ function H(e, o) {
|
|
|
810
810
|
Item: Fe,
|
|
811
811
|
Trigger: Pe,
|
|
812
812
|
Value: Ie
|
|
813
|
-
}, je = M.prop(o, "extensionContext", 19, () => ({ pathname: "/search" })), We = ke(), N = De(), P = Te(), F = M.state(""), I = M.state(""), L = M.state(M.proxy([])), R = M.state(""), z = M.state(""), B = M.state(""), V = M.state(1), H = M.state(
|
|
813
|
+
}, je = M.prop(o, "extensionContext", 19, () => ({ pathname: "/search" })), We = ke(), N = De(), P = Te(), F = M.state(""), I = M.state(""), L = M.state(M.proxy([])), R = M.state(""), z = M.state(""), B = M.state(""), V = M.state(1), H = M.state(10), U = M.state("relevance"), W = M.state(!0), G = M.state(!0), Tt = M.state(M.proxy([])), K = M.state(M.proxy([])), Et = M.state(M.proxy([]));
|
|
814
814
|
M.user_effect(() => {
|
|
815
|
-
M.set(F, o.data.query ?? "", !0), M.set(I, o.data.filters?.folder ?? "", !0), M.set(L, o.data.filters?.tags ?? [], !0), M.set(R, o.data.filters?.category ?? "", !0), M.set(z, o.data.filters?.dateFrom ?? "", !0), M.set(B, o.data.filters?.dateTo ?? "", !0), M.set(V, o.data.page ?? 1, !0), M.set(H, o.data.limit ??
|
|
815
|
+
M.set(F, o.data.query ?? "", !0), M.set(I, o.data.filters?.folder ?? "", !0), M.set(L, o.data.filters?.tags ?? [], !0), M.set(R, o.data.filters?.category ?? "", !0), M.set(z, o.data.filters?.dateFrom ?? "", !0), M.set(B, o.data.filters?.dateTo ?? "", !0), M.set(V, o.data.page ?? 1, !0), M.set(H, o.data.limit ?? 10, !0);
|
|
816
816
|
});
|
|
817
817
|
let q = M.state(null), J = M.state(!1), Y = 0, Dt = M.state(0), X = M.state(!1), Ot = M.state(M.proxy([])), kt = M.state(M.proxy([])), At = M.state(M.proxy([])), jt = M.derived(() => Ae(We.searchWidgets, je())), Z = M.derived(() => M.get(q) ? Math.ceil(M.get(q).total / M.get(H)) : 0), Mt = M.derived(() => M.get(I) !== "" || M.get(L).length > 0 || M.get(R) !== "" || M.get(z) !== "" || M.get(B) !== "");
|
|
818
818
|
M.user_effect(() => {
|
|
@@ -855,7 +855,7 @@ function H(e, o) {
|
|
|
855
855
|
});
|
|
856
856
|
function $(e) {
|
|
857
857
|
let t = new URLSearchParams(), n = "q" in e ? e.q : M.get(F), r = "folder" in e ? e.folder : M.get(I), i = "tags" in e ? e.tags : M.get(L).join(","), a = "category" in e ? e.category : M.get(R), o = "dateFrom" in e ? e.dateFrom : M.get(z), s = "dateTo" in e ? e.dateTo : M.get(B), c = "page" in e ? e.page : String(M.get(V)), l = "limit" in e ? e.limit : String(M.get(H));
|
|
858
|
-
return n && t.set("q", n), r && t.set("folder", r), i && t.set("tags", i), a && t.set("category", a), o && t.set("dateFrom", o), s && t.set("dateTo", s), c && c !== "1" && t.set("page", c), l && l !== "
|
|
858
|
+
return n && t.set("q", n), r && t.set("folder", r), i && t.set("tags", i), a && t.set("category", a), o && t.set("dateFrom", o), s && t.set("dateTo", s), c && c !== "1" && t.set("page", c), l && l !== "10" && t.set("limit", l), `/search?${t.toString()}`;
|
|
859
859
|
}
|
|
860
860
|
function Rt(e) {
|
|
861
861
|
e.preventDefault();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as scroll_to_top_aria } from "./assets/messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./assets/Icon-QwirKi9Y.js";
|
|
3
3
|
import { n as searchPreferences, r as editorPreferences } from "./assets/SettingsDialog-DVp0OxPO.js";
|
|
4
|
-
import { t as Sidebar } from "./assets/Sidebar-
|
|
4
|
+
import { t as Sidebar } from "./assets/Sidebar-CqsMw0Hd.js";
|
|
5
5
|
import { o as provideDocsmintRequestAdapter, r as provideDocsmintRouteAdapter } from "./assets/route-context-BPRerEtZ.js";
|
|
6
6
|
import { d as refreshFolders } from "./assets/subfolders-refresh-store.svelte-CXHxQWKh.js";
|
|
7
7
|
import { n as refreshDocs, r as refreshTags } from "./assets/tag-store.svelte-BM1lUI_P.js";
|
|
@@ -213,6 +213,46 @@ function ScrollToTop($$renderer, $$props) {
|
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
//#endregion
|
|
216
|
+
//#region src/lib/stores/mobile-sidebar-gesture.ts
|
|
217
|
+
function createEdgeSwipeTracker(options = {}) {
|
|
218
|
+
const edgeWidth = options.edgeWidth ?? 36;
|
|
219
|
+
const openDistance = options.openDistance ?? 40;
|
|
220
|
+
const scrollTolerance = options.scrollTolerance ?? 12;
|
|
221
|
+
let startPoint = null;
|
|
222
|
+
let cancelled = false;
|
|
223
|
+
return {
|
|
224
|
+
start(point) {
|
|
225
|
+
startPoint = point.x <= edgeWidth ? point : null;
|
|
226
|
+
cancelled = false;
|
|
227
|
+
return startPoint ? "tracking" : "idle";
|
|
228
|
+
},
|
|
229
|
+
move(point) {
|
|
230
|
+
if (!startPoint || cancelled) return cancelled ? "cancelled" : "idle";
|
|
231
|
+
const deltaX = point.x - startPoint.x;
|
|
232
|
+
const deltaY = Math.abs(point.y - startPoint.y);
|
|
233
|
+
if (deltaY > scrollTolerance && deltaY > Math.abs(deltaX)) {
|
|
234
|
+
cancelled = true;
|
|
235
|
+
return "cancelled";
|
|
236
|
+
}
|
|
237
|
+
if (deltaX >= openDistance && deltaY <= Math.max(scrollTolerance * 2, deltaX)) {
|
|
238
|
+
startPoint = null;
|
|
239
|
+
return "open";
|
|
240
|
+
}
|
|
241
|
+
return "tracking";
|
|
242
|
+
},
|
|
243
|
+
end(point) {
|
|
244
|
+
const result = this.move(point);
|
|
245
|
+
startPoint = null;
|
|
246
|
+
cancelled = false;
|
|
247
|
+
return result === "open" ? "open" : "idle";
|
|
248
|
+
},
|
|
249
|
+
cancel() {
|
|
250
|
+
startPoint = null;
|
|
251
|
+
cancelled = false;
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
216
256
|
//#region src/lib/hosts/mutation-refresh.ts
|
|
217
257
|
var noImpact = {
|
|
218
258
|
documents: false,
|
|
@@ -300,6 +340,7 @@ function DocsmintAppShellHost($$renderer, $$props) {
|
|
|
300
340
|
let sidebarElement = null;
|
|
301
341
|
let toggleButton = null;
|
|
302
342
|
let isMobile = false;
|
|
343
|
+
createEdgeSwipeTracker();
|
|
303
344
|
[
|
|
304
345
|
"a[href]",
|
|
305
346
|
"button:not([disabled])",
|
|
@@ -340,6 +381,8 @@ function DocsmintAppShellHost($$renderer, $$props) {
|
|
|
340
381
|
});
|
|
341
382
|
$$renderer.push(`<!----> `);
|
|
342
383
|
$$renderer.push("<!--[-1-->");
|
|
384
|
+
$$renderer.push(`<!--]--> `);
|
|
385
|
+
$$renderer.push("<!--[-1-->");
|
|
343
386
|
$$renderer.push(`<!--]-->`);
|
|
344
387
|
},
|
|
345
388
|
$$slots: { default: true }
|
|
@@ -241,7 +241,7 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
241
241
|
Dialog_description($$renderer, {
|
|
242
242
|
children: ($$renderer) => {
|
|
243
243
|
$$renderer.push(`<!---->Delete <span class="font-medium text-foreground">“${$.escape(category?.name ?? "Category")}”</span>?
|
|
244
|
-
|
|
244
|
+
${$.escape(categories_delete_description())}`);
|
|
245
245
|
},
|
|
246
246
|
$$slots: { default: true }
|
|
247
247
|
});
|
|
@@ -294,7 +294,7 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
294
294
|
$$renderer.push(`<!--]--></div>`);
|
|
295
295
|
} else if (!isDeleteMode()) {
|
|
296
296
|
$$renderer.push("<!--[2-->");
|
|
297
|
-
$$renderer.push(`<form class="space-y-4"><div class="space-y-2">`);
|
|
297
|
+
$$renderer.push(`<form data-category-dialog-scroll="" class="max-h-[calc(100dvh-12rem)] space-y-4 overflow-y-auto overscroll-contain pr-1"><div class="space-y-2">`);
|
|
298
298
|
Label($$renderer, {
|
|
299
299
|
for: "category-dialog-name",
|
|
300
300
|
children: ($$renderer) => {
|
|
@@ -477,14 +477,14 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
477
477
|
$$renderer.push(`<!--]--> `);
|
|
478
478
|
if (mode === "edit" && apiMode === "category" && category?.id) {
|
|
479
479
|
$$renderer.push("<!--[0-->");
|
|
480
|
-
$$renderer.push(`<div class="space-y-3 rounded-md border border-border/70 p-3"><div class="flex items-center justify-between gap-2"><div>`);
|
|
480
|
+
$$renderer.push(`<div class="space-y-3 rounded-md border border-border/70 p-3"><div class="flex items-center justify-between gap-2 max-sm:flex-col max-sm:items-stretch"><div>`);
|
|
481
481
|
Label($$renderer, {
|
|
482
482
|
children: ($$renderer) => {
|
|
483
483
|
$$renderer.push(`<!---->Category API keys`);
|
|
484
484
|
},
|
|
485
485
|
$$slots: { default: true }
|
|
486
486
|
});
|
|
487
|
-
$$renderer.push(
|
|
487
|
+
$$renderer.push(`<!----> <p class="text-xs text-muted-foreground">The current permissions are saved before the key is issued.</p></div> `);
|
|
488
488
|
Button($$renderer, {
|
|
489
489
|
type: "button",
|
|
490
490
|
size: "sm",
|
|
@@ -24,7 +24,7 @@ import { c as updateDocument, r as deleteDocument, s as listDocuments, t as clea
|
|
|
24
24
|
import { c as updateFolder, r as deleteFolder, s as listFolders, t as createFolder } from "./folders-BX30gHv6.js";
|
|
25
25
|
import { t as DeleteDialog } from "./DeleteDialog-DG9Lm38J.js";
|
|
26
26
|
import { t as ShareDialog } from "./ShareDialog-BZd28sg-.js";
|
|
27
|
-
import { t as CategoryDialog } from "./CategoryDialog-
|
|
27
|
+
import { t as CategoryDialog } from "./CategoryDialog-QHEv_9N4.js";
|
|
28
28
|
import { n as createDocumentPlacementWriter, t as createDocumentDropCoordinator } from "./document-drop-coordinator-CEaYACsC.js";
|
|
29
29
|
import { a as getFolderFromRegistry, c as getPendingDocumentPlacement, d as refreshFolders, f as registerDocument, n as bumpSubfoldersRefresh, p as registerFolder, r as getDocumentFromRegistry, t as acknowledgeDocumentPlacement, u as publishDocumentPlacement } from "./subfolders-refresh-store.svelte-CXHxQWKh.js";
|
|
30
30
|
import { t as FolderNode } from "./FolderNode-kmilhDjO.js";
|
|
@@ -295,7 +295,7 @@ function SearchBar($$renderer, $$props) {
|
|
|
295
295
|
//#endregion
|
|
296
296
|
//#region src/lib/components/sidebar/FolderTree.svelte
|
|
297
297
|
function docRowInner($$renderer, doc) {
|
|
298
|
-
$$renderer.push(`<a${$.attr("href", `/docs/${doc.id}`)} data-sveltekit-noscroll=""${$.attr_class($.clsx(cn("flex w-full min-w-0 items-center gap-1.5 rounded-md px-2 py-1 text-sm transition-colors hover:bg-accent hover:text-accent-foreground", page.params.id === doc.id && "bg-accent text-accent-foreground font-medium")))}><span class="w-3.5 shrink-0"></span> `);
|
|
298
|
+
$$renderer.push(`<a${$.attr("href", `/docs/${doc.id}`)} data-sveltekit-noscroll=""${$.attr_class($.clsx(cn("flex w-full min-w-0 items-center gap-1.5 rounded-md px-2 py-1 text-sm transition-colors hover:bg-accent hover:text-accent-foreground", page.params.id === doc.id && "bg-accent text-accent-foreground font-medium")), "svelte-1nshngr")}><span class="w-3.5 shrink-0"></span> `);
|
|
299
299
|
File_text($$renderer, { class: "size-4 shrink-0 text-muted-foreground" });
|
|
300
300
|
$$renderer.push(`<!----> <span class="min-w-0 truncate">${$.escape(doc.title)}</span></a>`);
|
|
301
301
|
}
|
|
@@ -949,10 +949,10 @@ function FolderTree($$renderer, $$props) {
|
|
|
949
949
|
$$renderer.push(`<button${$.attributes({
|
|
950
950
|
...props,
|
|
951
951
|
type: "button",
|
|
952
|
-
class: "inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
952
|
+
class: "sidebar-touch-action inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
953
953
|
"aria-label": editor_more_options(),
|
|
954
954
|
title: editor_more_options()
|
|
955
|
-
})}>`);
|
|
955
|
+
}, "svelte-1nshngr")}>`);
|
|
956
956
|
Ellipsis_vertical($$renderer, { class: "size-3.5" });
|
|
957
957
|
$$renderer.push(`<!----></button>`);
|
|
958
958
|
}
|
|
@@ -999,7 +999,7 @@ function FolderTree($$renderer, $$props) {
|
|
|
999
999
|
});
|
|
1000
1000
|
}
|
|
1001
1001
|
function copyButton($$renderer, doc) {
|
|
1002
|
-
$$renderer.push(`<button type="button"${$.attr_class(`inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${copiedDocId === doc.id || copyLoadingDocId === doc.id ? "opacity-100" : ""}
|
|
1002
|
+
$$renderer.push(`<button type="button"${$.attr_class(`sidebar-touch-action inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${copiedDocId === doc.id || copyLoadingDocId === doc.id ? "opacity-100" : ""}`, "svelte-1nshngr")}${$.attr("aria-label", action_copy_content())}${$.attr("title", action_copy_content())}${$.attr("disabled", copyLoadingDocId === doc.id, true)}>`);
|
|
1003
1003
|
if (copyLoadingDocId === doc.id) {
|
|
1004
1004
|
$$renderer.push("<!--[0-->");
|
|
1005
1005
|
Loader_circle($$renderer, { class: "size-3.5 animate-spin" });
|
|
@@ -1061,7 +1061,7 @@ function FolderTree($$renderer, $$props) {
|
|
|
1061
1061
|
for (let $$index_2 = 0, $$length = each_array.length; $$index_2 < $$length; $$index_2++) {
|
|
1062
1062
|
let bucket = each_array[$$index_2];
|
|
1063
1063
|
const isBucketExpanded = expandedCategoryIds.has(bucket.id);
|
|
1064
|
-
$$renderer.push(`<div class="group/bucket"${$.attr("data-is-dnd-shadow-item-hint", bucket[SHADOW_ITEM_MARKER_PROPERTY_NAME])}><div class="flex w-full min-w-0 items-center gap-0.5"><button type="button"${$.attr("aria-expanded", isBucketExpanded)}${$.attr_class($.clsx(cn("flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground", draggedDocId && "hover:bg-accent/40 border border-dashed border-primary/30")))}>`);
|
|
1064
|
+
$$renderer.push(`<div class="group/bucket"${$.attr("data-is-dnd-shadow-item-hint", bucket[SHADOW_ITEM_MARKER_PROPERTY_NAME])}><div class="flex w-full min-w-0 items-center gap-0.5"><button type="button"${$.attr("aria-expanded", isBucketExpanded)}${$.attr_class($.clsx(cn("flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground", draggedDocId && "hover:bg-accent/40 border border-dashed border-primary/30")), "svelte-1nshngr")}>`);
|
|
1065
1065
|
if (isBucketExpanded) {
|
|
1066
1066
|
$$renderer.push("<!--[0-->");
|
|
1067
1067
|
Chevron_down($$renderer, { class: "size-3.5 shrink-0" });
|
|
@@ -1080,7 +1080,7 @@ function FolderTree($$renderer, $$props) {
|
|
|
1080
1080
|
class: "inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/bucket:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1081
1081
|
"aria-label": editor_more_options(),
|
|
1082
1082
|
title: editor_more_options()
|
|
1083
|
-
})}>`);
|
|
1083
|
+
}, "svelte-1nshngr")}>`);
|
|
1084
1084
|
Ellipsis_vertical($$renderer, { class: "size-3.5" });
|
|
1085
1085
|
$$renderer.push(`<!----></button>`);
|
|
1086
1086
|
}
|
|
@@ -1154,7 +1154,7 @@ function FolderTree($$renderer, $$props) {
|
|
|
1154
1154
|
$$renderer.push("<!--[0-->");
|
|
1155
1155
|
const zoneItems = bucketFoldersMap[bucket.id] ?? [];
|
|
1156
1156
|
const rootDocs = categoryRootDocsMap[bucket.id] ?? [];
|
|
1157
|
-
$$renderer.push(`<div class="ml-0.5 space-y-0.5 border-l border-border pl-0.5"><div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingFolder && zoneItems.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")))}><!--[-->`);
|
|
1157
|
+
$$renderer.push(`<div class="ml-0.5 space-y-0.5 border-l border-border pl-0.5"><div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingFolder && zoneItems.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")), "svelte-1nshngr")}><!--[-->`);
|
|
1158
1158
|
const each_array_1 = $.ensure_array_like(zoneItems);
|
|
1159
1159
|
for (let $$index = 0, $$length = each_array_1.length; $$index < $$length; $$index++) {
|
|
1160
1160
|
let folder = each_array_1[$$index];
|
|
@@ -1162,7 +1162,7 @@ function FolderTree($$renderer, $$props) {
|
|
|
1162
1162
|
folderBlock($$renderer, folder);
|
|
1163
1163
|
$$renderer.push(`<!----></div>`);
|
|
1164
1164
|
}
|
|
1165
|
-
$$renderer.push(`<!--]--></div> <div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingDoc && rootDocs.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")))}><!--[-->`);
|
|
1165
|
+
$$renderer.push(`<!--]--></div> <div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingDoc && rootDocs.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")), "svelte-1nshngr")}><!--[-->`);
|
|
1166
1166
|
const each_array_2 = $.ensure_array_like(rootDocs);
|
|
1167
1167
|
for (let $$index_1 = 0, $$length = each_array_2.length; $$index_1 < $$length; $$index_1++) {
|
|
1168
1168
|
let doc = each_array_2[$$index_1];
|
|
@@ -1181,14 +1181,14 @@ function FolderTree($$renderer, $$props) {
|
|
|
1181
1181
|
$$renderer.push(`<!--]--></div> `);
|
|
1182
1182
|
if (uncatBucket()) {
|
|
1183
1183
|
$$renderer.push("<!--[0-->");
|
|
1184
|
-
$$renderer.push(`<div class="group/bucket"><div class="flex w-full min-w-0 items-center gap-0.5"><button type="button"${$.attr("aria-expanded", uncategorizedExpanded)}${$.attr_class($.clsx(cn("flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground", draggedDocId && "hover:bg-accent/40 border border-dashed border-primary/30")))}>`);
|
|
1184
|
+
$$renderer.push(`<div class="group/bucket"><div class="flex w-full min-w-0 items-center gap-0.5"><button type="button"${$.attr("aria-expanded", uncategorizedExpanded)}${$.attr_class($.clsx(cn("flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground", draggedDocId && "hover:bg-accent/40 border border-dashed border-primary/30")), "svelte-1nshngr")}>`);
|
|
1185
1185
|
$$renderer.push("<!--[0-->");
|
|
1186
1186
|
Chevron_down($$renderer, { class: "size-3.5 shrink-0" });
|
|
1187
1187
|
$$renderer.push(`<!--]--> <span class="min-w-0 truncate">${$.escape(sidebar_uncategorized())}</span></button></div> `);
|
|
1188
1188
|
{
|
|
1189
1189
|
$$renderer.push("<!--[0-->");
|
|
1190
1190
|
const zoneItems = bucketFoldersMap[UNCATEGORIZED_KEY] ?? [];
|
|
1191
|
-
$$renderer.push(`<div class="ml-0.5 space-y-0.5 border-l border-border pl-0.5"><div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingFolder && zoneItems.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")))}><!--[-->`);
|
|
1191
|
+
$$renderer.push(`<div class="ml-0.5 space-y-0.5 border-l border-border pl-0.5"><div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingFolder && zoneItems.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")), "svelte-1nshngr")}><!--[-->`);
|
|
1192
1192
|
const each_array_3 = $.ensure_array_like(zoneItems);
|
|
1193
1193
|
for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
|
|
1194
1194
|
let folder = each_array_3[$$index_3];
|
|
@@ -1196,7 +1196,7 @@ function FolderTree($$renderer, $$props) {
|
|
|
1196
1196
|
folderBlock($$renderer, folder);
|
|
1197
1197
|
$$renderer.push(`<!----></div>`);
|
|
1198
1198
|
}
|
|
1199
|
-
$$renderer.push(`<!--]--></div> <div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingDoc && rootItems.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")))}><!--[-->`);
|
|
1199
|
+
$$renderer.push(`<!--]--></div> <div${$.attr_class($.clsx(cn("min-h-[8px] space-y-0.5 transition-all duration-150", isDraggingDoc && rootItems.length === 0 && "min-h-[36px] bg-accent/20 rounded border border-dashed border-muted-foreground/20")), "svelte-1nshngr")}><!--[-->`);
|
|
1200
1200
|
const each_array_4 = $.ensure_array_like(rootItems);
|
|
1201
1201
|
for (let $$index_4 = 0, $$length = each_array_4.length; $$index_4 < $$length; $$index_4++) {
|
|
1202
1202
|
let doc = each_array_4[$$index_4];
|
|
@@ -1510,9 +1510,9 @@ function RecentDocs($$renderer, $$props) {
|
|
|
1510
1510
|
const each_array = $.ensure_array_like(recentDocs);
|
|
1511
1511
|
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
1512
1512
|
let doc = each_array[$$index];
|
|
1513
|
-
$$renderer.push(`<div class="group/doc flex min-w-0 items-center gap-1"><a${$.attr("href", `/docs/${doc.id}`)}${$.attr_class($.clsx(cn("flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-accent hover:text-accent-foreground", activeId === doc.id && "bg-accent text-accent-foreground")))}>`);
|
|
1513
|
+
$$renderer.push(`<div class="group/doc flex min-w-0 items-center gap-1"><a${$.attr("href", `/docs/${doc.id}`)}${$.attr_class($.clsx(cn("flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-accent hover:text-accent-foreground", activeId === doc.id && "bg-accent text-accent-foreground")), "svelte-1uwxs9f")}>`);
|
|
1514
1514
|
File_text($$renderer, { class: "size-4 shrink-0 text-muted-foreground" });
|
|
1515
|
-
$$renderer.push(`<!----> <div class="min-w-0 flex-1"><p class="truncate min-w-0">${$.escape(doc.title)}</p> <p class="text-xs text-muted-foreground">${$.escape(doc.updatedAt)}</p></div></a> <button type="button"${$.attr_class(`inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${copiedDocId === doc.id || copyLoadingDocId === doc.id ? "opacity-100" : ""}
|
|
1515
|
+
$$renderer.push(`<!----> <div class="min-w-0 flex-1"><p class="truncate min-w-0">${$.escape(doc.title)}</p> <p class="text-xs text-muted-foreground">${$.escape(doc.updatedAt)}</p></div></a> <button type="button"${$.attr_class(`sidebar-touch-action inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${copiedDocId === doc.id || copyLoadingDocId === doc.id ? "opacity-100" : ""}`, "svelte-1uwxs9f")}${$.attr("aria-label", action_copy_content())}${$.attr("title", action_copy_content())}${$.attr("disabled", copyLoadingDocId === doc.id, true)}>`);
|
|
1516
1516
|
if (copyLoadingDocId === doc.id) {
|
|
1517
1517
|
$$renderer.push("<!--[0-->");
|
|
1518
1518
|
Loader_circle($$renderer, { class: "size-3.5 animate-spin" });
|
|
@@ -1531,10 +1531,10 @@ function RecentDocs($$renderer, $$props) {
|
|
|
1531
1531
|
$$renderer.push(`<button${$.attributes({
|
|
1532
1532
|
...props,
|
|
1533
1533
|
type: "button",
|
|
1534
|
-
class: "inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1534
|
+
class: "sidebar-touch-action inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground group-hover/doc:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1535
1535
|
"aria-label": editor_more_options(),
|
|
1536
1536
|
title: editor_more_options()
|
|
1537
|
-
})}>`);
|
|
1537
|
+
}, "svelte-1uwxs9f")}>`);
|
|
1538
1538
|
Ellipsis_vertical($$renderer, { class: "size-3.5" });
|
|
1539
1539
|
$$renderer.push(`<!----></button>`);
|
|
1540
1540
|
}
|
package/dist/frontend-ssr/assets/{editorExtensions-DUzwndMy.js → editorExtensions-BwGeSPuX.js}
RENAMED
|
@@ -9,8 +9,107 @@ import TextAlign from "@tiptap/extension-text-align";
|
|
|
9
9
|
import { Markdown } from "@tiptap/markdown";
|
|
10
10
|
import StarterKit from "@tiptap/starter-kit";
|
|
11
11
|
import { common, createLowlight } from "lowlight";
|
|
12
|
+
//#region src/lib/components/editor/editor-content-sanitizer.ts
|
|
13
|
+
var ATTACHMENT_RAW_URL = /^\/api\/attachments\/[0-9a-f-]+\/raw$/i;
|
|
14
|
+
function isAttachmentImage(node) {
|
|
15
|
+
return node.type === "image" && typeof node.attrs?.src === "string" && ATTACHMENT_RAW_URL.test(node.attrs.src);
|
|
16
|
+
}
|
|
17
|
+
function isSafeEditorImageSource(value) {
|
|
18
|
+
if (typeof value !== "string") return false;
|
|
19
|
+
const src = value.trim();
|
|
20
|
+
return ATTACHMENT_RAW_URL.test(src) || /^https?:\/\//i.test(src) || /^blob:/i.test(src) || /^data:image\//i.test(src);
|
|
21
|
+
}
|
|
22
|
+
function isLoadableImage(node) {
|
|
23
|
+
if (node.type !== "image") return true;
|
|
24
|
+
return isSafeEditorImageSource(node.attrs?.src);
|
|
25
|
+
}
|
|
26
|
+
function sanitizeNode(node) {
|
|
27
|
+
if (!isLoadableImage(node)) return [];
|
|
28
|
+
if (!node.content) return [node];
|
|
29
|
+
const children = node.content.flatMap((child) => sanitizeNode(child));
|
|
30
|
+
if (node.type === "paragraph") {
|
|
31
|
+
const normalized = [];
|
|
32
|
+
let inline = [];
|
|
33
|
+
const flushInline = () => {
|
|
34
|
+
if (inline.length === 0) return;
|
|
35
|
+
normalized.push({
|
|
36
|
+
...node,
|
|
37
|
+
content: inline
|
|
38
|
+
});
|
|
39
|
+
inline = [];
|
|
40
|
+
};
|
|
41
|
+
for (const child of children) if (child.type === "image") {
|
|
42
|
+
flushInline();
|
|
43
|
+
normalized.push(child);
|
|
44
|
+
} else inline.push(child);
|
|
45
|
+
flushInline();
|
|
46
|
+
return normalized.length > 0 ? normalized : [{
|
|
47
|
+
...node,
|
|
48
|
+
content: []
|
|
49
|
+
}];
|
|
50
|
+
}
|
|
51
|
+
return [{
|
|
52
|
+
...node,
|
|
53
|
+
content: children
|
|
54
|
+
}];
|
|
55
|
+
}
|
|
56
|
+
function sanitizeEditorContent(value) {
|
|
57
|
+
return sanitizeNode(value)[0] ?? {
|
|
58
|
+
type: "doc",
|
|
59
|
+
content: [{ type: "paragraph" }]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
async function removeUnavailableAttachmentImages(value, fetchImpl = fetch) {
|
|
63
|
+
const root = sanitizeEditorContent(value);
|
|
64
|
+
const urls = /* @__PURE__ */ new Set();
|
|
65
|
+
const collect = (node) => {
|
|
66
|
+
if (isAttachmentImage(node)) urls.add(node.attrs?.src);
|
|
67
|
+
for (const child of node.content ?? []) collect(child);
|
|
68
|
+
};
|
|
69
|
+
collect(root);
|
|
70
|
+
const unavailable = /* @__PURE__ */ new Set();
|
|
71
|
+
await Promise.all(Array.from(urls, async (url) => {
|
|
72
|
+
try {
|
|
73
|
+
if (!(await fetchImpl(url, { credentials: "include" })).ok) unavailable.add(url);
|
|
74
|
+
} catch {
|
|
75
|
+
unavailable.add(url);
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
let removed = 0;
|
|
79
|
+
const remove = (node) => {
|
|
80
|
+
if (isAttachmentImage(node) && unavailable.has(node.attrs?.src)) {
|
|
81
|
+
removed += 1;
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
if (!node.content) return node;
|
|
85
|
+
return {
|
|
86
|
+
...node,
|
|
87
|
+
content: node.content.map(remove).filter((child) => child !== null)
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
return {
|
|
91
|
+
content: remove(root) ?? {
|
|
92
|
+
type: "doc",
|
|
93
|
+
content: []
|
|
94
|
+
},
|
|
95
|
+
removed
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
12
99
|
//#region src/lib/components/editor/editorExtensions.ts
|
|
13
100
|
var lowlight = createLowlight(common);
|
|
101
|
+
var SafeImage = Image.extend({ addAttributes() {
|
|
102
|
+
return {
|
|
103
|
+
src: {
|
|
104
|
+
default: null,
|
|
105
|
+
renderHTML: (attributes) => ({ src: isSafeEditorImageSource(attributes.src) ? attributes.src : null })
|
|
106
|
+
},
|
|
107
|
+
alt: { default: null },
|
|
108
|
+
title: { default: null },
|
|
109
|
+
width: { default: null },
|
|
110
|
+
height: { default: null }
|
|
111
|
+
};
|
|
112
|
+
} });
|
|
14
113
|
var EMPTY_PARAGRAPH_MARKDOWN = " ";
|
|
15
114
|
var NBSP_CHAR = "\xA0";
|
|
16
115
|
var TEXT_ALIGNMENTS = [
|
|
@@ -158,7 +257,7 @@ var editorExtensions = [
|
|
|
158
257
|
openOnClick: false,
|
|
159
258
|
HTMLAttributes: { class: "doc-link" }
|
|
160
259
|
}),
|
|
161
|
-
|
|
260
|
+
SafeImage.configure({
|
|
162
261
|
inline: false,
|
|
163
262
|
allowBase64: false,
|
|
164
263
|
HTMLAttributes: { class: "doc-image" },
|
|
@@ -183,4 +282,4 @@ var editorExtensions = [
|
|
|
183
282
|
TaskItem.configure({ nested: true })
|
|
184
283
|
];
|
|
185
284
|
//#endregion
|
|
186
|
-
export { TextAlignParagraph as n, editorExtensions as r, TextAlignHeading as t };
|
|
285
|
+
export { sanitizeEditorContent as a, removeUnavailableAttachmentImages as i, TextAlignParagraph as n, editorExtensions as r, TextAlignHeading as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as editorExtensions } from "./editorExtensions-
|
|
1
|
+
import { r as editorExtensions } from "./editorExtensions-BwGeSPuX.js";
|
|
2
2
|
import { MarkdownManager } from "@tiptap/markdown";
|
|
3
3
|
//#region src/lib/components/editor/markdown.ts
|
|
4
4
|
var managerSingleton = null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CategoryDialog } from "../assets/CategoryDialog-
|
|
1
|
+
import { t as CategoryDialog } from "../assets/CategoryDialog-QHEv_9N4.js";
|
|
2
2
|
export { CategoryDialog };
|
|
@@ -10,8 +10,8 @@ import { a as resolveOfflineIdentity } from "../../assets/identity-B3uHoDtf.js";
|
|
|
10
10
|
import { n as getOfflineDB } from "../../assets/db-CnxeO66n.js";
|
|
11
11
|
import { h as unregisterShortcut, u as registerShortcut } from "../../assets/keyboard.svelte-BgF47N3L.js";
|
|
12
12
|
import { t as CreateSnapshotDialog } from "../../assets/CreateSnapshotDialog-CI8vXXcN.js";
|
|
13
|
-
import { r as editorExtensions } from "../../assets/editorExtensions-
|
|
14
|
-
import { t as markdownToJson } from "../../assets/markdown-
|
|
13
|
+
import { a as sanitizeEditorContent, i as removeUnavailableAttachmentImages, r as editorExtensions } from "../../assets/editorExtensions-BwGeSPuX.js";
|
|
14
|
+
import { t as markdownToJson } from "../../assets/markdown-CB8DZ-LT.js";
|
|
15
15
|
import * as $ from "svelte/internal/server";
|
|
16
16
|
import { onDestroy, onMount, tick } from "svelte";
|
|
17
17
|
import "svelte/reactivity";
|
|
@@ -2145,83 +2145,6 @@ function EditorToolbar($$renderer, $$props) {
|
|
|
2145
2145
|
});
|
|
2146
2146
|
}
|
|
2147
2147
|
//#endregion
|
|
2148
|
-
//#region src/lib/components/editor/editor-content-sanitizer.ts
|
|
2149
|
-
var ATTACHMENT_RAW_URL = /^\/api\/attachments\/[0-9a-f-]+\/raw$/i;
|
|
2150
|
-
function isAttachmentImage(node) {
|
|
2151
|
-
return node.type === "image" && typeof node.attrs?.src === "string" && ATTACHMENT_RAW_URL.test(node.attrs.src);
|
|
2152
|
-
}
|
|
2153
|
-
function sanitizeNode(node) {
|
|
2154
|
-
if (!node.content) return [node];
|
|
2155
|
-
const children = node.content.flatMap((child) => sanitizeNode(child));
|
|
2156
|
-
if (node.type === "paragraph") {
|
|
2157
|
-
const normalized = [];
|
|
2158
|
-
let inline = [];
|
|
2159
|
-
const flushInline = () => {
|
|
2160
|
-
if (inline.length === 0) return;
|
|
2161
|
-
normalized.push({
|
|
2162
|
-
...node,
|
|
2163
|
-
content: inline
|
|
2164
|
-
});
|
|
2165
|
-
inline = [];
|
|
2166
|
-
};
|
|
2167
|
-
for (const child of children) if (child.type === "image") {
|
|
2168
|
-
flushInline();
|
|
2169
|
-
normalized.push(child);
|
|
2170
|
-
} else inline.push(child);
|
|
2171
|
-
flushInline();
|
|
2172
|
-
return normalized.length > 0 ? normalized : [{
|
|
2173
|
-
...node,
|
|
2174
|
-
content: []
|
|
2175
|
-
}];
|
|
2176
|
-
}
|
|
2177
|
-
return [{
|
|
2178
|
-
...node,
|
|
2179
|
-
content: children
|
|
2180
|
-
}];
|
|
2181
|
-
}
|
|
2182
|
-
function sanitizeEditorContent(value) {
|
|
2183
|
-
return sanitizeNode(value)[0] ?? {
|
|
2184
|
-
type: "doc",
|
|
2185
|
-
content: [{ type: "paragraph" }]
|
|
2186
|
-
};
|
|
2187
|
-
}
|
|
2188
|
-
async function removeUnavailableAttachmentImages(value, fetchImpl = fetch) {
|
|
2189
|
-
const root = sanitizeEditorContent(value);
|
|
2190
|
-
const urls = /* @__PURE__ */ new Set();
|
|
2191
|
-
const collect = (node) => {
|
|
2192
|
-
if (isAttachmentImage(node)) urls.add(node.attrs?.src);
|
|
2193
|
-
for (const child of node.content ?? []) collect(child);
|
|
2194
|
-
};
|
|
2195
|
-
collect(root);
|
|
2196
|
-
const unavailable = /* @__PURE__ */ new Set();
|
|
2197
|
-
await Promise.all(Array.from(urls, async (url) => {
|
|
2198
|
-
try {
|
|
2199
|
-
if (!(await fetchImpl(url, { credentials: "include" })).ok) unavailable.add(url);
|
|
2200
|
-
} catch {
|
|
2201
|
-
unavailable.add(url);
|
|
2202
|
-
}
|
|
2203
|
-
}));
|
|
2204
|
-
let removed = 0;
|
|
2205
|
-
const remove = (node) => {
|
|
2206
|
-
if (isAttachmentImage(node) && unavailable.has(node.attrs?.src)) {
|
|
2207
|
-
removed += 1;
|
|
2208
|
-
return null;
|
|
2209
|
-
}
|
|
2210
|
-
if (!node.content) return node;
|
|
2211
|
-
return {
|
|
2212
|
-
...node,
|
|
2213
|
-
content: node.content.map(remove).filter((child) => child !== null)
|
|
2214
|
-
};
|
|
2215
|
-
};
|
|
2216
|
-
return {
|
|
2217
|
-
content: remove(root) ?? {
|
|
2218
|
-
type: "doc",
|
|
2219
|
-
content: []
|
|
2220
|
-
},
|
|
2221
|
-
removed
|
|
2222
|
-
};
|
|
2223
|
-
}
|
|
2224
|
-
//#endregion
|
|
2225
2148
|
//#region src/lib/components/editor/large-markdown.ts
|
|
2226
2149
|
var LARGE_MARKDOWN_THRESHOLD = 25e4;
|
|
2227
2150
|
function shouldDeferMarkdownParsing(markdown) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TextAlignParagraph, r as editorExtensions, t as TextAlignHeading } from "../../assets/editorExtensions-
|
|
1
|
+
import { n as TextAlignParagraph, r as editorExtensions, t as TextAlignHeading } from "../../assets/editorExtensions-BwGeSPuX.js";
|
|
2
2
|
export { TextAlignHeading, TextAlignParagraph, editorExtensions };
|