wendang-react 0.0.0-stage → 0.5.6
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/LICENSE +21 -0
- package/NOTICE.md +381 -0
- package/README.md +478 -2
- package/dist/bindings/yjs.js +5 -0
- package/dist/chunks/AnchoredPanel-D3nte06T.js +68 -0
- package/dist/chunks/MindMapCanvas-D5XwjVH1.js +2072 -0
- package/dist/chunks/MindMapViewer-CQTQAgNq.js +180 -0
- package/dist/chunks/SpreadsheetViewer-DN_QQGud.js +157 -0
- package/dist/chunks/code-highlight-BmaqTe1m.js +30 -0
- package/dist/chunks/code-highlight-engine-BFDzDPzy.js +40 -0
- package/dist/chunks/comment-hint-DN7LKJAn.js +296 -0
- package/dist/chunks/composition-state-Bl-U1R_2.js +40 -0
- package/dist/chunks/extensions-B-CVVQhp.js +4210 -0
- package/dist/chunks/fuzzy-match-DYQR-4w2.js +89 -0
- package/dist/chunks/hooks-C53Dp0pr.js +35 -0
- package/dist/chunks/host-C-V688Rq.js +197 -0
- package/dist/chunks/index-Ii536CFG.js +720 -0
- package/dist/chunks/katex-WjrodtTU.js +71 -0
- package/dist/chunks/mind-map-controller-B6SxK3GZ.js +479 -0
- package/dist/chunks/mind-map-delete-CVsxdXfs.js +31 -0
- package/dist/chunks/mind-map-input-CEWRz_t6.js +43 -0
- package/dist/chunks/mind-topic-text-BBNTbFSe.js +446 -0
- package/dist/chunks/nodes-iKqTGr_N.js +291 -0
- package/dist/chunks/popover-placement-D3xVYdkt.js +47 -0
- package/dist/chunks/worksheet-engine-TJ54m0KC.js +125 -0
- package/dist/chunks/worksheet-preview-DsDVWxIM.js +129 -0
- package/dist/document/viewer.js +287 -0
- package/dist/document.js +3620 -0
- package/dist/index.js +8 -0
- package/dist/mindmap/viewer.js +6 -0
- package/dist/mindmap.js +123 -0
- package/dist/shared.js +52 -0
- package/dist/spreadsheet/viewer.js +5 -0
- package/dist/spreadsheet/xlsx.js +299 -0
- package/dist/spreadsheet.js +120 -0
- package/dist/styles/callout.css +34 -0
- package/dist/styles/code-block.css +58 -0
- package/dist/styles/content-style.css +619 -0
- package/dist/styles/editor-interaction.css +621 -0
- package/dist/styles/file-video.css +12 -0
- package/dist/styles/image-preview.css +103 -0
- package/dist/styles/mind-map-block.css +14 -0
- package/dist/styles/mind-map-canvas.css +80 -0
- package/dist/styles/mind-map-comments.css +93 -0
- package/dist/styles/mind-map-details.css +7 -0
- package/dist/styles/mind-map-preview.css +7 -0
- package/dist/styles/mind-map-topic.css +112 -0
- package/dist/styles/page-picker.css +47 -0
- package/dist/styles/renderer.css +45 -0
- package/dist/styles/spreadsheet-editor.css +3 -0
- package/dist/styles/tokens.css +154 -0
- package/dist/styles/video-dialog.css +41 -0
- package/dist/styles/video-embed.css +35 -0
- package/dist/styles.css +2615 -0
- package/dist/types/bindings/yjs.d.ts +3 -0
- package/dist/types/document/viewer.d.ts +3 -0
- package/dist/types/document.d.ts +7 -0
- package/dist/types/editor/BlockAffordance.d.ts +47 -0
- package/dist/types/editor/CalloutView.d.ts +2 -0
- package/dist/types/editor/CodeBlockView.d.ts +9 -0
- package/dist/types/editor/DocumentColorPanel.d.ts +8 -0
- package/dist/types/editor/DocumentEditor.d.ts +71 -0
- package/dist/types/editor/ImagePreview.d.ts +10 -0
- package/dist/types/editor/LinkPopover.d.ts +21 -0
- package/dist/types/editor/PagePicker.d.ts +7 -0
- package/dist/types/editor/SelectionToolbar.d.ts +11 -0
- package/dist/types/editor/SlashMenu.d.ts +30 -0
- package/dist/types/editor/TableControls.d.ts +9 -0
- package/dist/types/editor/VideoEmbedDialog.d.ts +6 -0
- package/dist/types/editor/document-gestures.d.ts +13 -0
- package/dist/types/editor/extensions.d.ts +29 -0
- package/dist/types/editor/nodes.d.ts +20 -0
- package/dist/types/editor/same-document.d.ts +2 -0
- package/dist/types/engine/collab/presence.d.ts +1 -0
- package/dist/types/engine/editor/block-commands.d.ts +35 -0
- package/dist/types/engine/editor/block-conversion.d.ts +12 -0
- package/dist/types/engine/editor/block-drag.d.ts +16 -0
- package/dist/types/engine/editor/block-menu-placement.d.ts +16 -0
- package/dist/types/engine/editor/callout-commands.d.ts +4 -0
- package/dist/types/engine/editor/collab-change-origin.d.ts +2 -0
- package/dist/types/engine/editor/delete-block.d.ts +2 -0
- package/dist/types/engine/editor/extensions/block-format.d.ts +19 -0
- package/dist/types/engine/editor/extensions/block-handle.d.ts +17 -0
- package/dist/types/engine/editor/extensions/block-menu-highlight.d.ts +4 -0
- package/dist/types/engine/editor/extensions/block-selection.d.ts +117 -0
- package/dist/types/engine/editor/extensions/code-highlight.d.ts +2 -0
- package/dist/types/engine/editor/extensions/collab-cursor.d.ts +13 -0
- package/dist/types/engine/editor/extensions/ime-guard.d.ts +8 -0
- package/dist/types/engine/editor/extensions/inline-comments.d.ts +15 -0
- package/dist/types/engine/editor/extensions/paste-sanitizer.d.ts +4 -0
- package/dist/types/engine/editor/extensions/slash.d.ts +16 -0
- package/dist/types/engine/editor/extensions/table-interaction.d.ts +9 -0
- package/dist/types/engine/editor/extensions/upload-placeholder.d.ts +48 -0
- package/dist/types/engine/editor/image-preview-gesture.d.ts +3 -0
- package/dist/types/engine/editor/ime/composition-state.d.ts +9 -0
- package/dist/types/engine/editor/insert-block.d.ts +6 -0
- package/dist/types/engine/editor/insert-picker-logic.d.ts +13 -0
- package/dist/types/engine/editor/link-edit.d.ts +10 -0
- package/dist/types/engine/editor/mind-map-controller.d.ts +63 -0
- package/dist/types/engine/editor/mind-map-delete.d.ts +7 -0
- package/dist/types/engine/editor/mind-map-drag.d.ts +16 -0
- package/dist/types/engine/editor/mind-map-input.d.ts +16 -0
- package/dist/types/engine/editor/mind-map-selection.d.ts +11 -0
- package/dist/types/engine/editor/nodes/columns.d.ts +6 -0
- package/dist/types/engine/editor/nodes/file-nodeview.d.ts +4 -0
- package/dist/types/engine/editor/nodes/file.d.ts +2 -0
- package/dist/types/engine/editor/nodes/image-gallery.d.ts +2 -0
- package/dist/types/engine/editor/nodes/image-nodeview.d.ts +4 -0
- package/dist/types/engine/editor/nodes/image.d.ts +1 -0
- package/dist/types/engine/editor/nodes/inline-style.d.ts +4 -0
- package/dist/types/engine/editor/nodes/math-nodeview.d.ts +2 -0
- package/dist/types/engine/editor/nodes/math.d.ts +3 -0
- package/dist/types/engine/editor/nodes/mention.d.ts +2 -0
- package/dist/types/engine/editor/nodes/mind-map-schema.d.ts +6 -0
- package/dist/types/engine/editor/nodes/page-link.d.ts +2 -0
- package/dist/types/engine/editor/nodes/table-cell.d.ts +4 -0
- package/dist/types/engine/editor/nodes/video-embed-schema.d.ts +2 -0
- package/dist/types/engine/editor/popover-placement.d.ts +35 -0
- package/dist/types/engine/editor/table-clipboard.d.ts +3 -0
- package/dist/types/engine/editor/table-commands.d.ts +20 -0
- package/dist/types/engine/editor/table-geometry.d.ts +34 -0
- package/dist/types/engine/editor/table-menu-placement.d.ts +30 -0
- package/dist/types/engine/editor/tracked-target.d.ts +8 -0
- package/dist/types/engine/editor/trailing-paragraph.d.ts +2 -0
- package/dist/types/engine/host.d.ts +2 -0
- package/dist/types/engine/renderer/attachments.d.ts +11 -0
- package/dist/types/engine/renderer/katex.d.ts +7 -0
- package/dist/types/engine/renderer/lazy-visible.d.ts +11 -0
- package/dist/types/engine/shared/callout.d.ts +1 -0
- package/dist/types/engine/shared/code-block.d.ts +1 -0
- package/dist/types/engine/shared/code-highlight-engine.d.ts +2 -0
- package/dist/types/engine/shared/code-highlight.d.ts +8 -0
- package/dist/types/engine/shared/comment-hint-position.d.ts +20 -0
- package/dist/types/engine/shared/comment-hint.d.ts +2 -0
- package/dist/types/engine/shared/document-colors.d.ts +1 -0
- package/dist/types/engine/shared/fuzzy-match.d.ts +13 -0
- package/dist/types/engine/shared/image-gallery.d.ts +1 -0
- package/dist/types/engine/shared/inline-comments.d.ts +1 -0
- package/dist/types/engine/shared/mind-map-phase2.d.ts +1 -0
- package/dist/types/engine/shared/mind-map.d.ts +1 -0
- package/dist/types/engine/shared/mind-topic-text.d.ts +1 -0
- package/dist/types/engine/shared/modal-stack.d.ts +6 -0
- package/dist/types/engine/shared/page-candidates.d.ts +6 -0
- package/dist/types/engine/shared/pinyin.d.ts +6 -0
- package/dist/types/engine/shared/preview-items.d.ts +10 -0
- package/dist/types/engine/shared/safe-href.d.ts +1 -0
- package/dist/types/engine/shared/table-cell-format.d.ts +1 -0
- package/dist/types/engine/shared/table-layout.d.ts +1 -0
- package/dist/types/engine/shared/video-embed.d.ts +1 -0
- package/dist/types/engine/shared/video-feedback.d.ts +1 -0
- package/dist/types/engine/shared/workbook.d.ts +1 -0
- package/dist/types/engine/worksheets/worksheet-engine.d.ts +16 -0
- package/dist/types/engine/worksheets/worksheet-format.d.ts +20 -0
- package/dist/types/engine/worksheets/worksheet-preview.d.ts +17 -0
- package/dist/types/engine/worksheets/worksheet-xlsx.d.ts +21 -0
- package/dist/types/engine/wui/core/dialog.d.ts +5 -0
- package/dist/types/engine/wui/core/listbox.d.ts +8 -0
- package/dist/types/engine/wui/core/placement.d.ts +40 -0
- package/dist/types/hooks.d.ts +7 -0
- package/dist/types/host-types.d.ts +58 -0
- package/dist/types/host.d.ts +24 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/mindmap/Comments.d.ts +9 -0
- package/dist/types/mindmap/Details.d.ts +13 -0
- package/dist/types/mindmap/Field.d.ts +10 -0
- package/dist/types/mindmap/MindMapCanvas.d.ts +19 -0
- package/dist/types/mindmap/MindMapEditor.d.ts +30 -0
- package/dist/types/mindmap/MindMapViewer.d.ts +23 -0
- package/dist/types/mindmap/TopicLabel.d.ts +4 -0
- package/dist/types/mindmap/viewer.d.ts +2 -0
- package/dist/types/mindmap.d.ts +4 -0
- package/dist/types/renderer/CodeToolbar.d.ts +10 -0
- package/dist/types/renderer/DocumentViewer.d.ts +23 -0
- package/dist/types/renderer/media.d.ts +33 -0
- package/dist/types/shared.d.ts +12 -0
- package/dist/types/spreadsheet/SpreadsheetEditor.d.ts +23 -0
- package/dist/types/spreadsheet/SpreadsheetViewer.d.ts +13 -0
- package/dist/types/spreadsheet/viewer.d.ts +2 -0
- package/dist/types/spreadsheet/xlsx.d.ts +2 -0
- package/dist/types/spreadsheet.d.ts +3 -0
- package/dist/types/wui/AnchoredPanel.d.ts +14 -0
- package/dist/types/wui/Dropdown.d.ts +18 -0
- package/dist/types/wui/Icon.d.ts +7 -0
- package/dist/types/wui/Tooltip.d.ts +5 -0
- package/dist/types/wui/index.d.ts +69 -0
- package/package.json +122 -3
- package/third-party-notices/@fast-csv__format@4.3.5-LICENSE.txt +21 -0
- package/third-party-notices/@fast-csv__parse@4.3.6-LICENSE.txt +21 -0
- package/third-party-notices/@flatten-js__interval-tree@1.1.3-LICENSE.txt +21 -0
- package/third-party-notices/@floating-ui__core@1.8.0-LICENSE.txt +20 -0
- package/third-party-notices/@floating-ui__dom@1.8.0-LICENSE.txt +20 -0
- package/third-party-notices/@floating-ui__react-dom@2.1.9-LICENSE.txt +20 -0
- package/third-party-notices/@floating-ui__utils@0.2.12-LICENSE.txt +20 -0
- package/third-party-notices/@grpc__grpc-js@1.14.6-LICENSE.txt +201 -0
- package/third-party-notices/@grpc__proto-loader@0.8.1-LICENSE.txt +201 -0
- package/third-party-notices/@js-sdsl__ordered-map@4.4.2-LICENSE.txt +21 -0
- package/third-party-notices/@protobufjs__aspromise@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__base64@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__codegen@2.0.5-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__eventemitter@1.1.1-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__fetch@1.1.1-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__float@1.0.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__path@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__pool@1.1.0-LICENSE.txt +26 -0
- package/third-party-notices/@protobufjs__utf8@1.1.2-LICENSE.txt +26 -0
- package/third-party-notices/@radix-ui__primitive@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-arrow@1.1.17-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-collection@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-compose-refs@1.1.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-context@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-dialog@1.3.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-direction@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-dismissable-layer@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-dropdown-menu@2.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-focus-guards@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-focus-scope@1.3.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-hover-card@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-id@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-menu@2.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-popover@1.3.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-popper@1.4.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-portal@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-presence@1.1.11-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-primitive@2.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-roving-focus@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-separator@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-slot@1.5.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-callback-ref@1.1.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-controllable-state@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-effect-event@0.0.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-is-hydrated@0.1.3-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-layout-effect@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-rect@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__react-use-size@1.1.5-LICENSE.txt +21 -0
- package/third-party-notices/@radix-ui__rect@1.1.3-LICENSE.txt +21 -0
- package/third-party-notices/@tiptap__core@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-blockquote@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-bold@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-bullet-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-code-block@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-code@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-collaboration@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-document@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-dropcursor@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-gapcursor@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-hard-break@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-heading@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-horizontal-rule@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-image@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-italic@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-link@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-list-item@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-list-keymap@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-ordered-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-paragraph@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-placeholder@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-strike@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table-cell@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table-header@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table-row@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-table@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-task-item@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-task-list@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-text@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extension-underline@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__extensions@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__pm@3.31.4-LICENSE.txt +21 -0
- package/third-party-notices/@tiptap__starter-kit@3.31.4-LICENSE.md.txt +21 -0
- package/third-party-notices/@tiptap__y-tiptap@3.0.7-LICENSE.txt +22 -0
- package/third-party-notices/@types__hast@3.0.5-LICENSE.txt +21 -0
- package/third-party-notices/@types__node@14.18.63-LICENSE.txt +21 -0
- package/third-party-notices/@types__node@26.6.2-LICENSE.txt +21 -0
- package/third-party-notices/@types__react-dom@19.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@types__react@19.3.0-LICENSE.txt +21 -0
- package/third-party-notices/@types__unist@3.0.3-LICENSE.txt +21 -0
- package/third-party-notices/@univerjs__core@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__design@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__docs-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__docs@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__drawing@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__engine-formula@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__engine-render@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__icons@1.46.0-LICENSE.txt +21 -0
- package/third-party-notices/@univerjs__network@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__preset-sheets-core@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__preset-sheets-filter@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__preset-sheets-sort@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__presets@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__rpc@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-filter-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-filter@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-formula-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-formula@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-numfmt-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-numfmt@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-sort-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-sort@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets-ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__sheets@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__telemetry@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__themes@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@univerjs__ui@1.1.0-LICENSE.txt +176 -0
- package/third-party-notices/@wendellhu__redi@1.1.3-LICENSE.txt +7 -0
- package/third-party-notices/ansi-regex@5.0.1-license.txt +9 -0
- package/third-party-notices/ansi-styles@4.3.0-license.txt +9 -0
- package/third-party-notices/archiver-utils@2.1.0-LICENSE.txt +22 -0
- package/third-party-notices/archiver-utils@3.0.4-LICENSE.txt +22 -0
- package/third-party-notices/archiver@5.3.2-LICENSE.txt +22 -0
- package/third-party-notices/aria-hidden@1.2.6-LICENSE.txt +21 -0
- package/third-party-notices/array-buffer-byte-length@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/arraybuffer.prototype.slice@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/async-function@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/async-lock@1.4.1-LICENSE.txt +22 -0
- package/third-party-notices/async@3.2.6-LICENSE.txt +19 -0
- package/third-party-notices/available-typed-arrays@1.0.7-LICENSE.txt +21 -0
- package/third-party-notices/balanced-match@1.0.2-LICENSE.md.txt +21 -0
- package/third-party-notices/base64-js@1.5.1-LICENSE.txt +21 -0
- package/third-party-notices/big-integer@1.6.52-LICENSE.txt +24 -0
- package/third-party-notices/bl@4.1.0-LICENSE.md.txt +13 -0
- package/third-party-notices/bluebird@3.4.7-LICENSE.txt +21 -0
- package/third-party-notices/brace-expansion@1.1.21-LICENSE.txt +21 -0
- package/third-party-notices/brace-expansion@2.1.7-LICENSE.txt +21 -0
- package/third-party-notices/buffer-crc32@0.2.13-LICENSE.txt +19 -0
- package/third-party-notices/buffer-indexof-polyfill@1.0.2-LICENSE.txt +22 -0
- package/third-party-notices/buffer@5.7.1-LICENSE.txt +21 -0
- package/third-party-notices/call-bind-apply-helpers@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/call-bind@1.0.9-LICENSE.txt +21 -0
- package/third-party-notices/call-bound@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/class-variance-authority@0.7.1-LICENSE.txt +190 -0
- package/third-party-notices/cliui@8.0.1-LICENSE.txt.txt +14 -0
- package/third-party-notices/clsx@2.1.1-license.txt +9 -0
- package/third-party-notices/cmdk@1.1.1-LICENSE.md.txt +21 -0
- package/third-party-notices/collapse-white-space@2.1.0-license.txt +22 -0
- package/third-party-notices/color-convert@2.0.1-LICENSE.txt +21 -0
- package/third-party-notices/color-name@1.1.4-LICENSE.txt +8 -0
- package/third-party-notices/commander@15.0.0-LICENSE.txt +22 -0
- package/third-party-notices/compress-commons@4.1.2-LICENSE.txt +22 -0
- package/third-party-notices/concat-map@0.0.1-LICENSE.txt +18 -0
- package/third-party-notices/core-util-is@1.0.3-LICENSE.txt +19 -0
- package/third-party-notices/crc-32@1.2.2-LICENSE.txt +201 -0
- package/third-party-notices/crc32-stream@4.0.3-LICENSE.txt +22 -0
- package/third-party-notices/csstype@3.2.3-LICENSE.txt +19 -0
- package/third-party-notices/data-view-buffer@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/data-view-byte-length@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/data-view-byte-offset@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/dayjs@1.11.23-LICENSE.txt +21 -0
- package/third-party-notices/decimal.js@10.6.0-LICENCE.md.txt +23 -0
- package/third-party-notices/define-data-property@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/define-properties@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/dequal@2.0.3-license.txt +21 -0
- package/third-party-notices/detect-node-es@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/devlop@1.1.0-license.txt +22 -0
- package/third-party-notices/dunder-proto@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/duplexer2@0.1.4-LICENSE.md.txt +26 -0
- package/third-party-notices/end-of-stream@1.4.5-LICENSE.txt +21 -0
- package/third-party-notices/es-abstract-get@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/es-abstract@1.24.2-LICENSE.txt +21 -0
- package/third-party-notices/es-define-property@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/es-errors@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/es-object-atoms@1.1.2-LICENSE.txt +21 -0
- package/third-party-notices/es-set-tostringtag@2.1.0-LICENSE.txt +21 -0
- package/third-party-notices/es-to-primitive@1.3.4-LICENSE.txt +22 -0
- package/third-party-notices/escalade@3.2.0-license.txt +9 -0
- package/third-party-notices/exceljs@4.4.0-LICENSE.txt +22 -0
- package/third-party-notices/fast-csv@4.3.6-LICENSE.txt +21 -0
- package/third-party-notices/fast-diff@1.3.0-LICENSE.txt +201 -0
- package/third-party-notices/for-each@0.3.5-LICENSE.txt +22 -0
- package/third-party-notices/fs-constants@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/fs.realpath@1.0.0-LICENSE.txt +43 -0
- package/third-party-notices/fstream@1.0.12-LICENSE.txt +15 -0
- package/third-party-notices/function-bind@1.1.2-LICENSE.txt +20 -0
- package/third-party-notices/function.prototype.name@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/functions-have-names@1.2.3-LICENSE.txt +21 -0
- package/third-party-notices/generator-function@2.0.1-LICENSE.md.txt +7 -0
- package/third-party-notices/get-caller-file@2.0.5-LICENSE.md.txt +6 -0
- package/third-party-notices/get-intrinsic@1.3.0-LICENSE.txt +21 -0
- package/third-party-notices/get-nonce@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/get-proto@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/get-symbol-description@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/glob@7.2.3-LICENSE.txt +21 -0
- package/third-party-notices/globalthis@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/gopd@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/graceful-fs@4.2.11-LICENSE.txt +15 -0
- package/third-party-notices/has-bigints@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/has-property-descriptors@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/has-proto@1.2.0-LICENSE.txt +21 -0
- package/third-party-notices/has-symbols@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/has-tostringtag@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/hasown@2.0.4-LICENSE.txt +21 -0
- package/third-party-notices/highlight.js@11.11.2-LICENSE.txt +29 -0
- package/third-party-notices/ieee754@1.2.1-LICENSE.txt +11 -0
- package/third-party-notices/immediate@3.0.6-LICENSE.txt.txt +20 -0
- package/third-party-notices/inflight@1.0.6-LICENSE.txt +15 -0
- package/third-party-notices/inherits@2.0.4-LICENSE.txt +16 -0
- package/third-party-notices/internal-slot@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/is-array-buffer@3.0.5-LICENSE.txt +21 -0
- package/third-party-notices/is-async-function@2.1.1-LICENSE.txt +20 -0
- package/third-party-notices/is-bigint@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/is-boolean-object@1.2.2-LICENSE.txt +22 -0
- package/third-party-notices/is-callable@1.2.7-LICENSE.txt +22 -0
- package/third-party-notices/is-data-view@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/is-date-object@1.1.0-LICENSE.txt +22 -0
- package/third-party-notices/is-document.all@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/is-finalizationregistry@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/is-fullwidth-code-point@3.0.0-license.txt +9 -0
- package/third-party-notices/is-generator-function@1.1.2-LICENSE.txt +20 -0
- package/third-party-notices/is-map@2.0.3-LICENSE.txt +21 -0
- package/third-party-notices/is-negative-zero@2.0.3-LICENSE.txt +20 -0
- package/third-party-notices/is-number-object@1.1.1-LICENSE.txt +22 -0
- package/third-party-notices/is-regex@1.2.1-LICENSE.txt +20 -0
- package/third-party-notices/is-set@2.0.3-LICENSE.txt +21 -0
- package/third-party-notices/is-shared-array-buffer@1.0.4-LICENSE.txt +21 -0
- package/third-party-notices/is-string@1.1.1-LICENSE.txt +22 -0
- package/third-party-notices/is-symbol@1.1.1-LICENSE.txt +22 -0
- package/third-party-notices/is-typed-array@1.1.15-LICENSE.txt +22 -0
- package/third-party-notices/is-weakmap@2.0.2-LICENSE.txt +21 -0
- package/third-party-notices/is-weakref@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/is-weakset@2.0.4-LICENSE.txt +21 -0
- package/third-party-notices/isarray@2.0.5-LICENSE.txt +21 -0
- package/third-party-notices/isomorphic.js@0.2.5-LICENSE.txt +21 -0
- package/third-party-notices/jszip@3.10.2-LICENSE.markdown.txt +651 -0
- package/third-party-notices/katex@0.18.9-LICENSE.txt +21 -0
- package/third-party-notices/kdbush@4.1.0-LICENSE.txt +15 -0
- package/third-party-notices/lazystream@1.0.1-LICENSE.txt +23 -0
- package/third-party-notices/lib0@0.2.119-LICENSE.txt +21 -0
- package/third-party-notices/lie@3.3.0-license.md.txt +7 -0
- package/third-party-notices/linkifyjs@4.3.3-LICENSE.txt +19 -0
- package/third-party-notices/listenercount@1.0.1-LICENSE.md.txt +5 -0
- package/third-party-notices/lodash-es@4.18.1-LICENSE.txt +47 -0
- package/third-party-notices/lodash.camelcase@4.3.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.defaults@4.2.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.difference@4.5.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.escaperegexp@4.1.2-LICENSE.txt +47 -0
- package/third-party-notices/lodash.flatten@4.4.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.groupby@4.6.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isboolean@3.0.3-LICENSE.txt +22 -0
- package/third-party-notices/lodash.isequal@4.5.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isfunction@3.0.9-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isnil@4.0.0-LICENSE.txt +22 -0
- package/third-party-notices/lodash.isplainobject@4.0.6-LICENSE.txt +47 -0
- package/third-party-notices/lodash.isundefined@3.0.1-LICENSE.txt.txt +22 -0
- package/third-party-notices/lodash.union@4.6.0-LICENSE.txt +47 -0
- package/third-party-notices/lodash.uniq@4.5.0-LICENSE.txt +47 -0
- package/third-party-notices/long@5.3.2-LICENSE.txt +202 -0
- package/third-party-notices/lowlight@3.3.0-license.txt +22 -0
- package/third-party-notices/math-intrinsics@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/minimatch@3.1.5-LICENSE.txt +15 -0
- package/third-party-notices/minimatch@5.1.9-LICENSE.txt +15 -0
- package/third-party-notices/minimist@1.2.8-LICENSE.txt +18 -0
- package/third-party-notices/mkdirp@0.5.6-LICENSE.txt +21 -0
- package/third-party-notices/n-gram@2.0.2-license.txt +22 -0
- package/third-party-notices/normalize-path@3.0.0-LICENSE.txt +21 -0
- package/third-party-notices/numfmt@4.0.1-LICENSE.txt +19 -0
- package/third-party-notices/object-inspect@1.13.4-LICENSE.txt +21 -0
- package/third-party-notices/object-keys@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/object.assign@4.1.7-LICENSE.txt +21 -0
- package/third-party-notices/once@1.4.0-LICENSE.txt +15 -0
- package/third-party-notices/orderedmap@2.1.1-LICENSE.txt +19 -0
- package/third-party-notices/own-keys@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/pako@1.0.11-LICENSE.txt +21 -0
- package/third-party-notices/path-is-absolute@1.0.1-license.txt +21 -0
- package/third-party-notices/possible-typed-array-names@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/process-nextick-args@2.0.1-license.md.txt +19 -0
- package/third-party-notices/prosemirror-changeset@2.4.4-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-commands@1.7.2-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-dropcursor@1.8.4-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-gapcursor@1.4.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-history@1.5.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-inputrules@1.5.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-keymap@1.2.3-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-model@1.25.12-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-schema-list@1.5.1-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-state@1.4.4-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-tables@1.8.5-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-transform@1.12.2-LICENSE.txt +19 -0
- package/third-party-notices/prosemirror-view@1.42.6-LICENSE.txt +19 -0
- package/third-party-notices/protobufjs@7.6.6-LICENSE.txt +39 -0
- package/third-party-notices/quickselect@3.0.0-LICENSE.txt +15 -0
- package/third-party-notices/rbush@4.0.1-LICENSE.txt +21 -0
- package/third-party-notices/react-dom@19.3.1-LICENSE.txt +21 -0
- package/third-party-notices/react-remove-scroll@2.7.2-LICENSE.txt +21 -0
- package/third-party-notices/react-style-singleton@2.2.3-LICENSE.txt +21 -0
- package/third-party-notices/react@19.3.1-LICENSE.txt +21 -0
- package/third-party-notices/readable-stream@2.3.8-LICENSE.txt +47 -0
- package/third-party-notices/readable-stream@3.6.2-LICENSE.txt +47 -0
- package/third-party-notices/readdir-glob@1.1.3-LICENSE.txt +201 -0
- package/third-party-notices/reflect.getprototypeof@1.0.10-LICENSE.txt +21 -0
- package/third-party-notices/regexp.prototype.flags@1.5.4-LICENSE.txt +22 -0
- package/third-party-notices/require-directory@2.1.1-LICENSE.txt +22 -0
- package/third-party-notices/rimraf@2.7.1-LICENSE.txt +15 -0
- package/third-party-notices/rope-sequence@1.3.4-LICENSE.txt +19 -0
- package/third-party-notices/rxjs@7.8.2-LICENSE.txt.txt +202 -0
- package/third-party-notices/safe-array-concat@1.1.4-LICENSE.txt +21 -0
- package/third-party-notices/safe-buffer@5.1.2-LICENSE.txt +21 -0
- package/third-party-notices/safe-buffer@5.2.1-LICENSE.txt +21 -0
- package/third-party-notices/safe-push-apply@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/safe-regex-test@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/scheduler@0.28.0-LICENSE.txt +21 -0
- package/third-party-notices/set-function-length@1.2.2-LICENSE.txt +21 -0
- package/third-party-notices/set-function-name@2.0.2-LICENSE.txt +21 -0
- package/third-party-notices/set-proto@1.0.0-LICENSE.txt +21 -0
- package/third-party-notices/setimmediate@1.0.5-LICENSE.txt.txt +20 -0
- package/third-party-notices/side-channel-list@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/side-channel-map@1.0.1-LICENSE.txt +21 -0
- package/third-party-notices/side-channel-weakmap@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/side-channel@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/sonner@2.0.8-LICENSE.md.txt +21 -0
- package/third-party-notices/stop-iteration-iterator@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/string-width@4.2.3-license.txt +9 -0
- package/third-party-notices/string.prototype.trim@1.2.11-LICENSE.txt +21 -0
- package/third-party-notices/string.prototype.trimend@1.0.10-LICENSE.txt +21 -0
- package/third-party-notices/string.prototype.trimstart@1.0.8-LICENSE.txt +21 -0
- package/third-party-notices/string_decoder@1.1.1-LICENSE.txt +48 -0
- package/third-party-notices/string_decoder@1.3.0-LICENSE.txt +48 -0
- package/third-party-notices/strip-ansi@6.0.1-license.txt +9 -0
- package/third-party-notices/tar-stream@2.2.0-LICENSE.txt +21 -0
- package/third-party-notices/tiny-pinyin@1.3.2-LICENSE.txt +21 -0
- package/third-party-notices/tmp@0.2.7-LICENSE.txt +21 -0
- package/third-party-notices/traverse@0.3.10-LICENSE.txt +21 -0
- package/third-party-notices/trigram-utils@2.0.1-license.txt +22 -0
- package/third-party-notices/tslib@2.8.1-LICENSE.txt.txt +12 -0
- package/third-party-notices/typed-array-buffer@1.0.3-LICENSE.txt +21 -0
- package/third-party-notices/typed-array-byte-length@1.0.3-LICENSE.txt +21 -0
- package/third-party-notices/typed-array-byte-offset@1.0.5-LICENSE.txt +21 -0
- package/third-party-notices/typed-array-length@1.0.8-LICENSE.txt +21 -0
- package/third-party-notices/typedarray.prototype.slice@1.0.6-LICENSE.txt +21 -0
- package/third-party-notices/unbox-primitive@1.1.0-LICENSE.txt +21 -0
- package/third-party-notices/undici-types@8.9.0-LICENSE.txt +21 -0
- package/third-party-notices/unzipper@0.10.14-LICENSE.txt +25 -0
- package/third-party-notices/use-callback-ref@1.3.3-LICENSE.txt +21 -0
- package/third-party-notices/use-sidecar@1.1.3-LICENSE.txt +21 -0
- package/third-party-notices/util-deprecate@1.0.2-LICENSE.txt +24 -0
- package/third-party-notices/uuid@8.3.2-LICENSE.md.txt +9 -0
- package/third-party-notices/w3c-keyname@2.2.8-LICENSE.txt +19 -0
- package/third-party-notices/which-boxed-primitive@1.1.1-LICENSE.txt +21 -0
- package/third-party-notices/which-builtin-type@1.2.1-LICENSE.txt +21 -0
- package/third-party-notices/which-collection@1.0.2-LICENSE.txt +21 -0
- package/third-party-notices/which-typed-array@1.1.24-LICENSE.txt +22 -0
- package/third-party-notices/wrap-ansi@7.0.0-license.txt +9 -0
- package/third-party-notices/wrappy@1.0.2-LICENSE.txt +15 -0
- package/third-party-notices/xmlchars@2.2.0-LICENSE.txt +18 -0
- package/third-party-notices/y-protocols@1.0.7-LICENSE.txt +21 -0
- package/third-party-notices/y18n@5.0.8-LICENSE.txt +13 -0
- package/third-party-notices/yargs-parser@21.1.1-LICENSE.txt.txt +14 -0
- package/third-party-notices/yargs@17.7.3-LICENSE.txt +21 -0
- package/third-party-notices/yjs@13.6.33-LICENSE.txt +23 -0
- package/third-party-notices/zip-stream@4.1.1-LICENSE.txt +22 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1,2615 @@
|
|
|
1
|
+
.wendang {
|
|
2
|
+
--color-bg: #f6f8fc; --color-surface: #fff; --color-surface-subtle: #f5f7fa;
|
|
3
|
+
--color-text: #1f2937; --color-text-muted: #667085; --color-text-faint: #7c8798;
|
|
4
|
+
--color-border: #dce2eb; --color-border-strong: #b9c3d2;
|
|
5
|
+
--color-accent: var(--wendang-accent, #2f6feb); --color-accent-soft: #eaf1ff;
|
|
6
|
+
--color-danger: #cf3d48; --color-success: #21814b; --color-warning: #ad6b12;
|
|
7
|
+
/*
|
|
8
|
+
* 行内评论标记色:**同一黄色系的三档**,不引入第二种色相。
|
|
9
|
+
*
|
|
10
|
+
* 早先"有回复"的评论用蓝色区分,用户反馈蓝色与黄色差别太大、容易误读成
|
|
11
|
+
* 两类不同的东西("可以搞多色,但是不要影响用户心智")。现在三档都在黄色
|
|
12
|
+
* 家族里,靠**深浅**表达强弱:
|
|
13
|
+
* - 普通评论:亮黄底 + 深琥珀下划线;
|
|
14
|
+
* - 有回复:底色加深一档(表示这里更"热");
|
|
15
|
+
* - 当前激活:再深一档。
|
|
16
|
+
* 下划线取深琥珀(#d48806)而不是亮黄:底色变亮后,浅色下划线在浅蓝/白
|
|
17
|
+
* 背景上都看不清(用户反馈"这个看不清,底部和背景色")。
|
|
18
|
+
*/
|
|
19
|
+
--comment-mark-bg: #ffe58f; --comment-mark-line: #d48806;
|
|
20
|
+
--comment-mark-bg-reply: #ffd66688; --comment-mark-line-reply: #ff9900;
|
|
21
|
+
--comment-mark-bg-active: #ffc53d; --comment-mark-line-active: #ad6800;
|
|
22
|
+
--content-font-size: 16px; --content-line-height: 1.75; --content-text-color: var(--color-text);
|
|
23
|
+
--content-width: 100%; --shadow-pop: 0 10px 32px #14284a20;
|
|
24
|
+
/*
|
|
25
|
+
* 内容排版 token(表格、标题、间距、媒体)。
|
|
26
|
+
*
|
|
27
|
+
* 这些变量原先只存在于 YWiki 的 web/src/styles/global.css,抽成 SDK 时
|
|
28
|
+
* 消费方(shared/content-style.css)留下了、定义方漏掉了。CSS 变量取到
|
|
29
|
+
* 无效值会让整条声明在计算值阶段失效,于是表格边框变成 none、表头背景
|
|
30
|
+
* 变透明、段落与标题的间距塌成 0。颜色用绝对值,间距跟随 --content-font-size。
|
|
31
|
+
*/
|
|
32
|
+
--content-heading-color: #101828;
|
|
33
|
+
--content-table-header-bg: #edf3fc;
|
|
34
|
+
--content-table-grid-color: #d5dfed;
|
|
35
|
+
--content-table-font-size: calc(var(--content-font-size) * 13 / 14);
|
|
36
|
+
--content-table-line-height: 1.5;
|
|
37
|
+
--content-media-radius: 8px;
|
|
38
|
+
--content-scroll-offset: 80px;
|
|
39
|
+
/**
|
|
40
|
+
* 块间距(段落之间)。
|
|
41
|
+
*
|
|
42
|
+
* 从 `3/7`(16px 字号下 6.86px)调到 `5/7`(11.43px)。原因有两个:
|
|
43
|
+
* 1. 6.86px 对中文正文偏紧,段与段之间读起来粘连(用户反馈"行间距处理下");
|
|
44
|
+
* 2. 块选中时会沿块上下各外扩一段做高亮带,而外扩必须给相邻块之间保留
|
|
45
|
+
* 可见的白缝——间距太小时这段预算不够,两个块的底色会糊成一整块
|
|
46
|
+
* (用户实测:"带了选中背景后上下间距没了")。
|
|
47
|
+
*/
|
|
48
|
+
--space-block: calc(var(--content-font-size) * 5 / 7);
|
|
49
|
+
--space-module: calc(var(--content-font-size) * 9 / 7);
|
|
50
|
+
--space-heading-top: calc(var(--content-font-size) * 2);
|
|
51
|
+
--space-heading-bottom: calc(var(--content-font-size) * 5 / 7);
|
|
52
|
+
--space-list-item: calc(var(--content-font-size) * 0.25);
|
|
53
|
+
--space-list-block: calc(var(--content-font-size) * 0.5);
|
|
54
|
+
--space-divider: calc(var(--content-font-size) * 2);
|
|
55
|
+
--color-code-bg: #f1f5fa;
|
|
56
|
+
color: var(--color-text); background: var(--color-surface);
|
|
57
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
|
|
58
|
+
min-width: 0; min-height: 0;
|
|
59
|
+
}
|
|
60
|
+
.wendang[data-wendang-theme="dark"] {
|
|
61
|
+
--color-bg: #17191e; --color-surface: #202329; --color-surface-subtle: #292d35;
|
|
62
|
+
--color-text: #e5e9f0; --color-text-muted: #b2bdcd; --color-text-faint: #8f9cb0;
|
|
63
|
+
--color-border: #3b4350; --color-border-strong: #606c7e; --color-accent-soft: #243653;
|
|
64
|
+
--content-text-color: #e8e8ec;
|
|
65
|
+
--content-heading-color: #f0f0f3;
|
|
66
|
+
--content-table-header-bg: #2a2e38;
|
|
67
|
+
--content-table-grid-color: #424753;
|
|
68
|
+
--color-code-bg: #20242c;
|
|
69
|
+
/* 深色底上用低明度琥珀底 + 高明度下划线,保持同一黄色系的三档深浅 */
|
|
70
|
+
--comment-mark-bg: #4a3a12; --comment-mark-line: #e8b923;
|
|
71
|
+
--comment-mark-bg-reply: #5c4813; --comment-mark-line-reply: #ffc53d;
|
|
72
|
+
--comment-mark-bg-active: #6b5416; --comment-mark-line-active: #ffc53d;
|
|
73
|
+
}
|
|
74
|
+
.wendang-root { min-height: 0; min-width: 0; height: 100%; }
|
|
75
|
+
/**
|
|
76
|
+
* 浮层挂载根。必须建层叠上下文:正文 `.tiptap` 自己是 `position: relative`,
|
|
77
|
+
* 若 portal 没有 z-index,它会被正文里的图片等元素盖住——实测拖拽插入线
|
|
78
|
+
* 就因此完全看不见(mouse 命中的是图片)。
|
|
79
|
+
*/
|
|
80
|
+
.wendang-portal {
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: 1000;
|
|
83
|
+
}
|
|
84
|
+
/*
|
|
85
|
+
* 基础元素样式同时作用于 `.wendang` 正文与 `.wendang-popup-scope` 弹层内容。
|
|
86
|
+
*
|
|
87
|
+
* 弹层(对话框、右键菜单)teleport 到 body 后不在 `.wendang` 内,只带了一份
|
|
88
|
+
* token 副本;如果这些规则只写在 `.wendang` 下,弹层里的 input 会退回浏览器
|
|
89
|
+
* 默认样式、`.muted`/`.small`/`.error-banner` 全部失效。用 `:is()` 让两处共用
|
|
90
|
+
* 同一组声明,避免再复制一遍。
|
|
91
|
+
*/
|
|
92
|
+
/* Inline topic editors own their font metrics and appearance in both canvas hosts. */
|
|
93
|
+
:is(.wendang, .wendang-popup-scope) :where(button, input, textarea):not(:where(.mind-topic-input)) { font: inherit; box-sizing: border-box; }
|
|
94
|
+
:is(.wendang, .wendang-popup-scope) :where(a) { color: var(--color-accent); }
|
|
95
|
+
:is(.wendang, .wendang-popup-scope) :where(button) { cursor: pointer; }
|
|
96
|
+
:is(.wendang, .wendang-popup-scope) .muted { color: var(--color-text-muted); }
|
|
97
|
+
:is(.wendang, .wendang-popup-scope) .small { font-size: 12px; }
|
|
98
|
+
:is(.wendang, .wendang-popup-scope) :where(input:not([type=checkbox]):not([type=radio]), textarea):not(.worksheet-grid *):not(:where(.mind-topic-input)) {
|
|
99
|
+
background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border);
|
|
100
|
+
border-radius: 6px; padding: 6px 8px;
|
|
101
|
+
}
|
|
102
|
+
:is(.wendang, .wendang-popup-scope) :where(.error-banner, .error) { color: var(--color-danger); }
|
|
103
|
+
:is(.wendang, .wendang-popup-scope) :where(.notice) { color: var(--color-text-muted); }
|
|
104
|
+
|
|
105
|
+
/* 文档调色板:与存储值分开,切换主题不会改写正文或触发保存。 */
|
|
106
|
+
.wendang {
|
|
107
|
+
--doc-text-gray: #646a73;
|
|
108
|
+
--doc-text-red: #d92c2c;
|
|
109
|
+
--doc-text-orange: #b95d0b;
|
|
110
|
+
--doc-text-yellow: #8a6c0a;
|
|
111
|
+
--doc-text-green: #237b35;
|
|
112
|
+
--doc-text-blue: #1971c2;
|
|
113
|
+
--doc-text-purple: #7048e8;
|
|
114
|
+
--doc-highlight-gray-soft: #f1f3f5;
|
|
115
|
+
--doc-highlight-red: #ffe3e3;
|
|
116
|
+
--doc-highlight-orange: #fff0db;
|
|
117
|
+
--doc-highlight-yellow: #fff3bf;
|
|
118
|
+
--doc-highlight-green: #d3f9d8;
|
|
119
|
+
--doc-highlight-blue: #d0ebff;
|
|
120
|
+
--doc-highlight-purple: #e5dbff;
|
|
121
|
+
--doc-highlight-gray: #dee2e6;
|
|
122
|
+
--doc-highlight-gray-strong: #ced4da;
|
|
123
|
+
--doc-highlight-red-strong: #ffc9c9;
|
|
124
|
+
--doc-highlight-orange-strong: #ffd8a8;
|
|
125
|
+
--doc-highlight-yellow-strong: #ffec99;
|
|
126
|
+
--doc-highlight-green-strong: #b2f2bb;
|
|
127
|
+
--doc-highlight-blue-strong: #a5d8ff;
|
|
128
|
+
--doc-highlight-purple-strong: #d0bfff;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.wendang[data-wendang-theme='dark'] {
|
|
132
|
+
--doc-text-gray: #b8beca;
|
|
133
|
+
--doc-text-red: #ff9b9b;
|
|
134
|
+
--doc-text-orange: #ffc078;
|
|
135
|
+
--doc-text-yellow: #f6d37a;
|
|
136
|
+
--doc-text-green: #8ce99a;
|
|
137
|
+
--doc-text-blue: #91caff;
|
|
138
|
+
--doc-text-purple: #d0bfff;
|
|
139
|
+
--doc-highlight-gray-soft: #32353d;
|
|
140
|
+
--doc-highlight-red: #563138;
|
|
141
|
+
--doc-highlight-orange: #523a2a;
|
|
142
|
+
--doc-highlight-yellow: #4a4226;
|
|
143
|
+
--doc-highlight-green: #294737;
|
|
144
|
+
--doc-highlight-blue: #293f5b;
|
|
145
|
+
--doc-highlight-purple: #42335b;
|
|
146
|
+
--doc-highlight-gray: #424650;
|
|
147
|
+
--doc-highlight-gray-strong: #555b66;
|
|
148
|
+
--doc-highlight-red-strong: #713f47;
|
|
149
|
+
--doc-highlight-orange-strong: #6a4b31;
|
|
150
|
+
--doc-highlight-yellow-strong: #635732;
|
|
151
|
+
--doc-highlight-green-strong: #355c44;
|
|
152
|
+
--doc-highlight-blue-strong: #355476;
|
|
153
|
+
--doc-highlight-purple-strong: #554273;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* 只读渲染器**专属**样式。
|
|
157
|
+
*
|
|
158
|
+
* 说明:内容排版(标题/列表/表格/代码/引用/高亮块/行内元素……)已收敛到
|
|
159
|
+
* `@/shared/content-style.css` 的单一真源,编辑端与只读端共用;本文件只保留
|
|
160
|
+
* **只有只读端才有**的东西:图片懒加载占位、公式占位/错误、附件卡片。
|
|
161
|
+
*
|
|
162
|
+
* 历史教训:曾因渲染器从 .vue 迁为 .ts 而丢失整个样式文件,排版静默退回浏览器
|
|
163
|
+
* 默认——结构正常、观感没生效,是很容易漏掉的回归。因此这里显式 import。
|
|
164
|
+
*/
|
|
165
|
+
/* One shell for the editor node view and the read-only renderer. */
|
|
166
|
+
.ywiki-content .ywiki-code-panel {
|
|
167
|
+
--code-bg:#ffffff;--code-header:#f7f8fa;--code-border:#e2e5e9;--code-text:#303640;--code-muted:#8a9099;
|
|
168
|
+
--code-keyword:#d13b52;--code-string:#2e8764;--code-number:#a66e12;--code-title:#8250b5;--code-property:#476f9c;--code-comment:#8a9099;--code-tag:#bf3c51;
|
|
169
|
+
position:relative;min-width:0;max-width:100%;border:1px solid var(--code-border);border-radius:7px;
|
|
170
|
+
background:var(--code-bg);color:var(--code-text);isolation:isolate;
|
|
171
|
+
}
|
|
172
|
+
.ywiki-content .ywiki-code-panel.code-theme-soft {
|
|
173
|
+
--code-bg:#f5f8fc;--code-header:#edf2f8;--code-border:#dce4ef;--code-text:#34445b;--code-muted:#8492a7;
|
|
174
|
+
--code-keyword:#3478bd;--code-string:#318b6d;--code-number:#9b7a1e;--code-title:#9851c4;--code-property:#516c9f;--code-comment:#8492a7;--code-tag:#b14c6c;
|
|
175
|
+
}
|
|
176
|
+
[data-wendang-theme='dark'] .ywiki-content .ywiki-code-panel.code-theme-auto,
|
|
177
|
+
.ywiki-content .ywiki-code-panel.code-theme-night {
|
|
178
|
+
--code-bg:#20242c;--code-header:#272c35;--code-border:#373e49;--code-text:#d7dde7;--code-muted:#929cac;
|
|
179
|
+
--code-keyword:#f58196;--code-string:#a5cf8b;--code-number:#efbc82;--code-title:#c6a0ee;--code-property:#89b9ee;--code-comment:#919cab;--code-tag:#f08a9d;
|
|
180
|
+
}
|
|
181
|
+
.code-toolbar {display:flex;align-items:center;gap:7px;min-height:38px;padding:4px 9px;background:var(--code-header);border-bottom:1px solid var(--code-border);border-radius:6px 6px 0 0;font:12px/1.5 var(--font-sans,system-ui,sans-serif);color:var(--code-muted);user-select:none;}
|
|
182
|
+
.code-toolbar-host {position:relative;z-index:2;}
|
|
183
|
+
.code-toolbar-actions {display:flex;align-items:center;gap:7px;margin-left:auto;min-width:0;}
|
|
184
|
+
.code-toolbar-summary {font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap;}
|
|
185
|
+
/*
|
|
186
|
+
* 语言选择器在代码块的深色标题栏里,必须把 wui 的语义变量改指向代码块色板,
|
|
187
|
+
* 否则会是一块白底控件。面板本身渲染在 portal 根(正文之外),不继承这些
|
|
188
|
+
* 变量,因此下拉列表仍是普通的浅色菜单 —— 与其它菜单一致。
|
|
189
|
+
*/
|
|
190
|
+
.code-language-select {width:146px;font-size:12px;--w-surface:var(--code-header);--w-text:var(--code-text);--w-text-faint:var(--code-muted);--w-border-strong:var(--code-border);--w-border:var(--code-border);--w-surface-subtle:color-mix(in srgb,var(--code-text) 10%,transparent);}
|
|
191
|
+
.code-language-label {max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;}
|
|
192
|
+
.code-toolbar-divider {height:15px;border-left:1px solid var(--code-border);margin:0 2px;}
|
|
193
|
+
.code-toolbar .code-copy-button,.code-toolbar .code-settings-button,.code-toolbar .code-fold-button {color:var(--code-muted);background:transparent;}
|
|
194
|
+
.code-toolbar .code-copy-button {min-width:86px;}
|
|
195
|
+
.code-toolbar .code-copy-button:hover,.code-toolbar .code-settings-button:hover,.code-toolbar .code-fold-button:hover {color:var(--code-text);background:color-mix(in srgb,var(--code-text) 6%,transparent);}
|
|
196
|
+
.code-copy-button svg {vertical-align:middle;}
|
|
197
|
+
.code-copy-announcement {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
|
|
198
|
+
.code-option-check {float:right;margin-left:24px;}
|
|
199
|
+
.code-theme-swatch {display:inline-block;width:13px;height:13px;vertical-align:-2px;margin-right:8px;border:1px solid #c7ccd4;border-radius:3px;background:#fff;}
|
|
200
|
+
.code-theme-swatch[data-code-swatch='auto'] {background:linear-gradient(90deg,#fff 50%,#303743 50%);}
|
|
201
|
+
.code-theme-swatch[data-code-swatch='soft'] {background:#e6effa;}
|
|
202
|
+
.code-theme-swatch[data-code-swatch='night'] {background:#272c35;}
|
|
203
|
+
.ywiki-content .ywiki-code-panel .code-scroll {display:flex;align-items:stretch;position:relative;overflow:auto;max-height:464px;border-radius:0 0 6px 6px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--code-muted) 45%,transparent) transparent;background:var(--code-bg);}
|
|
204
|
+
.ywiki-content .ywiki-code-panel .code-scroll[hidden] {display:none;}
|
|
205
|
+
.ywiki-content .ywiki-code-panel.is-unlimited .code-scroll {max-height:none;}
|
|
206
|
+
.ywiki-content .ywiki-code-panel .code-line-numbers,
|
|
207
|
+
.ywiki-content .ywiki-code-panel pre.doc-code {font:13px/22px ui-monospace,SFMono-Regular,Menlo,Consolas,'Liberation Mono',monospace;font-variant-ligatures:none;tab-size:2;white-space:pre;}
|
|
208
|
+
.ywiki-content .ywiki-code-panel .code-line-numbers {position:sticky;left:0;z-index:1;align-self:stretch;flex:0 0 auto;min-width:42px;box-sizing:border-box;padding:12px 10px 12px 12px;text-align:right;color:var(--code-muted);background:var(--code-bg);border-right:1px solid color-mix(in srgb,var(--code-border) 65%,transparent);user-select:none;pointer-events:none;}
|
|
209
|
+
.ywiki-content .ywiki-code-panel pre.doc-code {flex:1 0 auto;min-width:0;max-width:none;margin:0!important;padding:12px 16px;border:0;border-radius:0;background:var(--code-bg);color:var(--code-text);overflow:visible;}
|
|
210
|
+
.ywiki-content .ywiki-code-panel pre.doc-code code {display:block;margin:0;padding:0;border:0;background:none;color:var(--code-text);font:inherit;white-space:inherit;tab-size:inherit;border-radius:0;}
|
|
211
|
+
.ywiki-content .ywiki-code-panel.is-collapsed .code-toolbar {border-bottom:0;border-radius:6px;}
|
|
212
|
+
.ywiki-content .ywiki-code-panel:focus-within {border-color:color-mix(in srgb,var(--color-accent) 45%,var(--code-border));}
|
|
213
|
+
.ywiki-content .ywiki-code-panel .code-scroll:focus-visible {outline:2px solid var(--color-accent);outline-offset:-2px;}
|
|
214
|
+
.ywiki-content .ywiki-code-panel :where(.hljs-keyword,.hljs-selector-tag,.hljs-literal,.hljs-meta) {color:var(--code-keyword);}
|
|
215
|
+
.ywiki-content .ywiki-code-panel :where(.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute) {color:var(--code-string);}
|
|
216
|
+
.ywiki-content .ywiki-code-panel :where(.hljs-number,.hljs-symbol,.hljs-bullet,.hljs-variable,.hljs-template-variable) {color:var(--code-number);}
|
|
217
|
+
.ywiki-content .ywiki-code-panel :where(.hljs-title,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-type) {color:var(--code-title);}
|
|
218
|
+
.ywiki-content .ywiki-code-panel :where(.hljs-built_in,.hljs-attr,.hljs-property) {color:var(--code-property);}
|
|
219
|
+
.ywiki-content .ywiki-code-panel :where(.hljs-comment,.hljs-quote) {color:var(--code-comment);font-style:normal;}
|
|
220
|
+
.ywiki-content .ywiki-code-panel :where(.hljs-tag,.hljs-name,.hljs-deletion) {color:var(--code-tag);}
|
|
221
|
+
@media(max-width:600px){.code-toolbar{gap:4px;padding-inline:6px}.code-toolbar-actions{gap:4px}.code-language-select{width:108px}.code-toolbar-summary{display:none}.code-toolbar-divider{margin:0}.code-language-label{max-width:100px}.code-copy-button{min-width:72px!important}}
|
|
222
|
+
@media print{.ywiki-content .ywiki-code-panel .code-scroll{max-height:none!important;overflow:visible!important;display:flex!important}.code-toolbar-actions,.code-fold-button{display:none!important}.ywiki-content .ywiki-code-panel{break-inside:avoid}.ywiki-content .ywiki-code-panel pre.doc-code{white-space:pre-wrap;overflow-wrap:anywhere;flex-shrink:1}}
|
|
223
|
+
/* Tokens are document presentation; saved attributes never contain free CSS values. */
|
|
224
|
+
[data-wendang-theme] {
|
|
225
|
+
--callout-border-gray:#c7cbd1;--callout-border-red:#f0a2a2;--callout-border-orange:#ffc078;--callout-border-yellow:#e3ca71;
|
|
226
|
+
--callout-border-green:#91d4a0;--callout-border-blue:#9ac5ef;--callout-border-purple:#c0a4ed;
|
|
227
|
+
}
|
|
228
|
+
[data-wendang-theme='dark'] {
|
|
229
|
+
--callout-border-gray:#697181;--callout-border-red:#a7606b;--callout-border-orange:#a97843;--callout-border-yellow:#97844a;
|
|
230
|
+
--callout-border-green:#5c8b6c;--callout-border-blue:#587fa9;--callout-border-purple:#8667af;
|
|
231
|
+
}
|
|
232
|
+
.ywiki-content .doc-callout {
|
|
233
|
+
--callout-first-line-height:calc(var(--content-font-size) * var(--content-line-height));
|
|
234
|
+
position:relative;display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:12px;align-items:start;
|
|
235
|
+
border:1px solid var(--callout-border,var(--callout-border-blue));border-radius:9px;
|
|
236
|
+
background:var(--callout-fill,var(--doc-highlight-blue));color:var(--callout-text,var(--content-text-color));
|
|
237
|
+
padding:16px 18px;
|
|
238
|
+
}
|
|
239
|
+
.ywiki-content .doc-callout[data-icon-hidden='true'] {grid-template-columns:minmax(0,1fr);}
|
|
240
|
+
.callout-controls-host {display:contents;}
|
|
241
|
+
.ywiki-content .doc-callout-content {grid-column:2;grid-row:1;min-width:0;color:inherit;}
|
|
242
|
+
.ywiki-content .doc-callout[data-icon-hidden='true']>.doc-callout-content {grid-column:1;}
|
|
243
|
+
.ywiki-content .doc-callout .callout-icon {
|
|
244
|
+
grid-column:1;grid-row:1;align-self:start;display:inline-flex;align-items:center;justify-content:center;
|
|
245
|
+
width:30px;min-width:30px;height:var(--callout-first-line-height);min-height:0;padding:0;
|
|
246
|
+
font-size:22px;line-height:1;user-select:none;color:inherit;
|
|
247
|
+
}
|
|
248
|
+
/* A heading on the first line has its own size and leading; later paragraphs do not move the icon. */
|
|
249
|
+
.ywiki-content .doc-callout:has(>.doc-callout-content>h1:first-child){--callout-first-line-height:calc(var(--content-font-size) * 1.625 * 1.3);}
|
|
250
|
+
.ywiki-content .doc-callout:has(>.doc-callout-content>h2:first-child){--callout-first-line-height:calc(var(--content-font-size) * 1.375 * 1.3);}
|
|
251
|
+
.ywiki-content .doc-callout:has(>.doc-callout-content>h3:first-child){--callout-first-line-height:calc(var(--content-font-size) * 1.125 * 1.3);}
|
|
252
|
+
.ywiki-content .doc-callout:has(>.doc-callout-content>:is(h4,h5,h6):first-child){--callout-first-line-height:calc(var(--content-font-size) * 1.3);}
|
|
253
|
+
.ywiki-content .doc-callout>.doc-callout-content>:first-child {margin-top:0;}
|
|
254
|
+
.ywiki-content .doc-callout>.doc-callout-content>:last-child {margin-bottom:0;}
|
|
255
|
+
.ywiki-content .doc-callout-content :where(h1,h2,h3,h4,h5,h6) {color:inherit;}
|
|
256
|
+
@media(max-width:600px){.ywiki-content .doc-callout{padding:12px;column-gap:9px;}}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* 内容排版**单一真源**。
|
|
260
|
+
*
|
|
261
|
+
* 为什么单独一个文件(对齐《Wiki好用技术方案》1.1 的「单一 schema 真源」):
|
|
262
|
+
* 正文的观感必须在**编辑态与只读态完全一致**。此前编辑端样式写在
|
|
263
|
+
* `EditorPane.vue` 的 `.ywiki-prose`、只读端写在 `renderer/renderer.css`
|
|
264
|
+
* 的 `.doc-renderer`,两份各改各的——实测已经漂移(标题上间距 1.2em vs 1.6em、
|
|
265
|
+
* h5/h6 两端都没定义)。这里收敛为一份,两端只在根元素上带同一个类
|
|
266
|
+
* `ywiki-content`:
|
|
267
|
+
* - 编辑端:`editorProps.attributes.class = 'ywiki-prose ywiki-content'`
|
|
268
|
+
* - 只读端:`DocRenderer` 根节点 `class="doc-renderer ywiki-content"`
|
|
269
|
+
*
|
|
270
|
+
* 只保留「只有一端才有」的规则在各自文件里(如编辑端的块手柄、只读端的
|
|
271
|
+
* 图片懒加载占位)。凡是两端都会渲染的元素,样式只写在这里。
|
|
272
|
+
*
|
|
273
|
+
* 尺度以 docs/Wiki内容区域规范.md 为准;数值是 YWiki 的产品基线。
|
|
274
|
+
* 块间距由文件末尾的 flow 规则统一处理,容器结构使用 :where(),确保编辑根
|
|
275
|
+
* 与阅读根以及兼容 .doc-body 容器的选择器优先级相同。元素规则不再各自声明纵向 margin。
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
/* ---------------------------------------------------------------- 根与节奏 */
|
|
279
|
+
.ywiki-content {
|
|
280
|
+
min-width: 0;
|
|
281
|
+
container-type: inline-size;
|
|
282
|
+
container-name: wiki-content;
|
|
283
|
+
font-size: var(--content-font-size);
|
|
284
|
+
line-height: var(--content-line-height);
|
|
285
|
+
color: var(--content-text-color);
|
|
286
|
+
/* 标点空白裁剪(支持的浏览器生效);不修改正文中的中英文空格。 */
|
|
287
|
+
text-spacing-trim: space-all;
|
|
288
|
+
overflow-wrap: anywhere;
|
|
289
|
+
word-break: normal;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* reset 与 flow 都只有 .ywiki-content 的一份 class 权重。
|
|
293
|
+
避免 p/ul/pre 的 margin: 0 压过编辑端的相邻块间距。 */
|
|
294
|
+
.ywiki-content :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, pre, table, hr, img) {
|
|
295
|
+
margin-block: 0;
|
|
296
|
+
}
|
|
297
|
+
/* 用户输入的空段落也必须在阅读端保留一行,不能只在编辑端占高度。 */
|
|
298
|
+
.ywiki-content p:empty {
|
|
299
|
+
min-height: calc(1em * var(--content-line-height));
|
|
300
|
+
}
|
|
301
|
+
.ywiki-content :where(h1, h2, h3, h4, h5, h6):empty {
|
|
302
|
+
min-height: 1.3em;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* ---------------------------------------------------------------- 标题层级
|
|
306
|
+
标题字号随正文 token 等比缩放。
|
|
307
|
+
字重统一 600(原 650 偏重),标题带轻微负字距更像正文排版而非 UI 文本。 */
|
|
308
|
+
.ywiki-content h1,
|
|
309
|
+
.ywiki-content h2,
|
|
310
|
+
.ywiki-content h3,
|
|
311
|
+
.ywiki-content h4,
|
|
312
|
+
.ywiki-content h5,
|
|
313
|
+
.ywiki-content h6 {
|
|
314
|
+
font-weight: 600;
|
|
315
|
+
color: var(--content-heading-color);
|
|
316
|
+
line-height: 1.3;
|
|
317
|
+
letter-spacing: -0.01em;
|
|
318
|
+
/* 目录跳转时留出顶部空间,避免标题被页头挡住 */
|
|
319
|
+
scroll-margin-top: var(--content-scroll-offset);
|
|
320
|
+
}
|
|
321
|
+
.ywiki-content h1 { font-size: calc(var(--content-font-size) * 1.625); }
|
|
322
|
+
.ywiki-content h2 { font-size: calc(var(--content-font-size) * 1.375); }
|
|
323
|
+
.ywiki-content h3 { font-size: calc(var(--content-font-size) * 1.125); }
|
|
324
|
+
.ywiki-content h4 { font-size: var(--content-font-size); }
|
|
325
|
+
.ywiki-content h5 { font-size: var(--content-font-size); }
|
|
326
|
+
.ywiki-content h6 {
|
|
327
|
+
font-size: var(--content-font-size);
|
|
328
|
+
color: var(--color-text-muted);
|
|
329
|
+
letter-spacing: 0;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* ---------------------------------------------------------------- 列表 */
|
|
333
|
+
.ywiki-content ul,
|
|
334
|
+
.ywiki-content ol {
|
|
335
|
+
padding-left: 1.5em;
|
|
336
|
+
}
|
|
337
|
+
.ywiki-content ul { list-style: disc; }
|
|
338
|
+
.ywiki-content ol { list-style: decimal; }
|
|
339
|
+
/* 层级用不同符号区分,长嵌套下更容易看清层级。 */
|
|
340
|
+
.ywiki-content ul ul { list-style: circle; }
|
|
341
|
+
.ywiki-content ul ul ul { list-style: square; }
|
|
342
|
+
.ywiki-content li + li { margin-top: var(--space-list-item); }
|
|
343
|
+
.ywiki-content li::marker { color: var(--color-text-muted); }
|
|
344
|
+
/* 列表项段落的 reset 与内部间距同样由 flow 规则提供。 */
|
|
345
|
+
|
|
346
|
+
/* 待办列表:编辑端是 ul[data-type='taskList'],只读端是 ul.doc-task-list。
|
|
347
|
+
勾选框与正文左缘齐平、且与首行文字垂直居中(此前水平缩进 4px、垂直偏低约 5px,
|
|
348
|
+
用户反馈"不对齐")。刻意不用普通列表的 1.5em 缩进——待办项希望勾选框与
|
|
349
|
+
上方段落左对齐,读起来是一条直线。 */
|
|
350
|
+
.ywiki-content ul.doc-task-list,
|
|
351
|
+
.ywiki-content ul[data-type='taskList'] {
|
|
352
|
+
list-style: none;
|
|
353
|
+
padding-left: 0;
|
|
354
|
+
}
|
|
355
|
+
.ywiki-content li.doc-task-item,
|
|
356
|
+
.ywiki-content ul[data-type='taskList'] > li {
|
|
357
|
+
display: flex;
|
|
358
|
+
gap: 0.5em;
|
|
359
|
+
align-items: flex-start;
|
|
360
|
+
line-height: var(--content-line-height);
|
|
361
|
+
}
|
|
362
|
+
.ywiki-content li.doc-task-item > input[type='checkbox'],
|
|
363
|
+
.ywiki-content ul[data-type='taskList'] > li > label > input[type='checkbox'] {
|
|
364
|
+
flex: none;
|
|
365
|
+
font: inherit;
|
|
366
|
+
width: 1em;
|
|
367
|
+
height: 1em;
|
|
368
|
+
margin: 0;
|
|
369
|
+
accent-color: var(--color-accent);
|
|
370
|
+
}
|
|
371
|
+
/* 阅读端的 input 直接参与任务项布局,用上边距对齐首行。
|
|
372
|
+
编辑端由首行等高的 label 居中,不能再给 input 叠加这段偏移。 */
|
|
373
|
+
.ywiki-content li.doc-task-item > input[type='checkbox'] {
|
|
374
|
+
margin-top: calc((var(--content-line-height) - 1) * 0.5em);
|
|
375
|
+
}
|
|
376
|
+
.ywiki-content li.doc-task-item > span,
|
|
377
|
+
.ywiki-content ul[data-type='taskList'] > li > div {
|
|
378
|
+
min-width: 0;
|
|
379
|
+
flex: 1;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/* ---------------------------------------------------------------- 引用 */
|
|
383
|
+
.ywiki-content blockquote {
|
|
384
|
+
border-left: 3px solid var(--color-border-strong);
|
|
385
|
+
padding: 0.1em 0 0.1em 1em;
|
|
386
|
+
color: var(--color-text-muted);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/* 代码块外观由 code-block.css 统一;裸 pre 用于兼容内容。 */
|
|
390
|
+
.ywiki-content pre { overflow:auto; padding:12px 16px; border:1px solid var(--color-border); border-radius:6px; background:var(--color-code-bg); font:13px/22px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
|
|
391
|
+
.ywiki-content code { background:var(--color-surface-subtle);border:1px solid var(--color-border);border-radius:4px;padding:.1em .35em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.875em; }
|
|
392
|
+
|
|
393
|
+
/* ---------------- 编辑端:公式就地编辑(nodeView) ---------------- */
|
|
394
|
+
.math-node { cursor: pointer; }
|
|
395
|
+
/* 渲染结果就位后,把它包在带淡底的容器里,提示"这是一段可点击编辑的公式" */
|
|
396
|
+
.math-node .math-render { border-radius: 4px; }
|
|
397
|
+
.math-node:hover .math-render {
|
|
398
|
+
background: color-mix(in srgb, var(--color-accent) 10%, transparent);
|
|
399
|
+
}
|
|
400
|
+
.math-node.is-editing .math-render { display: none; }
|
|
401
|
+
.math-latex-input {
|
|
402
|
+
width: 100%;
|
|
403
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
404
|
+
font-size: 0.875em;
|
|
405
|
+
padding: 2px 6px;
|
|
406
|
+
border: 1px solid var(--color-accent);
|
|
407
|
+
border-radius: 4px;
|
|
408
|
+
background: var(--color-surface);
|
|
409
|
+
color: var(--color-text);
|
|
410
|
+
}
|
|
411
|
+
/* ---------------------------------------------------------------- 表格
|
|
412
|
+
文档网格:白色内容区、浅色表头、圆角外框;读写端共用。 */
|
|
413
|
+
.ywiki-content table,
|
|
414
|
+
.ywiki-content .doc-table {
|
|
415
|
+
--table-grid-color: var(--content-table-grid-color);
|
|
416
|
+
--table-header-bg: var(--content-table-header-bg);
|
|
417
|
+
border-collapse: separate;
|
|
418
|
+
border-spacing: 0;
|
|
419
|
+
/* 无显式列宽时按内容分配,避免说明列与短标签列被强制等分。
|
|
420
|
+
有 colwidth 的表格仍通过两端共同的 colgroup + 表宽保留作者尺寸。 */
|
|
421
|
+
table-layout: auto;
|
|
422
|
+
width: 100%;
|
|
423
|
+
font-size: var(--content-table-font-size);
|
|
424
|
+
background: var(--color-surface);
|
|
425
|
+
border: 1px solid var(--table-grid-color);
|
|
426
|
+
border-radius: 6px;
|
|
427
|
+
overflow: hidden;
|
|
428
|
+
}
|
|
429
|
+
.ywiki-content :where(.doc-table-wrap, .tableWrapper) {
|
|
430
|
+
overflow-x: auto;
|
|
431
|
+
scrollbar-width: thin;
|
|
432
|
+
scrollbar-color: var(--color-border-strong) transparent;
|
|
433
|
+
}
|
|
434
|
+
.ywiki-content th,
|
|
435
|
+
.ywiki-content td {
|
|
436
|
+
border: none;
|
|
437
|
+
border-right: 1px solid var(--table-grid-color);
|
|
438
|
+
border-bottom: 1px solid var(--table-grid-color);
|
|
439
|
+
padding: 6px 8px;
|
|
440
|
+
line-height: var(--content-table-line-height);
|
|
441
|
+
min-width: 60px;
|
|
442
|
+
text-align: left;
|
|
443
|
+
vertical-align: top;
|
|
444
|
+
overflow-wrap: anywhere;
|
|
445
|
+
}
|
|
446
|
+
.ywiki-content th {
|
|
447
|
+
background: var(--table-header-bg);
|
|
448
|
+
color: var(--content-heading-color);
|
|
449
|
+
font-weight: 600;
|
|
450
|
+
}
|
|
451
|
+
.ywiki-content tr:last-child > :where(td, th) { border-bottom: none; }
|
|
452
|
+
.ywiki-content tr > :where(td, th):last-child { border-right: none; }
|
|
453
|
+
.ywiki-content tr:first-child > :where(td, th):first-child { border-top-left-radius: 5px; }
|
|
454
|
+
.ywiki-content tr:first-child > :where(td, th):last-child { border-top-right-radius: 5px; }
|
|
455
|
+
.ywiki-content tr:last-child > :where(td, th):first-child { border-bottom-left-radius: 5px; }
|
|
456
|
+
.ywiki-content tr:last-child > :where(td, th):last-child { border-bottom-right-radius: 5px; }
|
|
457
|
+
|
|
458
|
+
/* ---------------------------------------------------------------- 分割线 */
|
|
459
|
+
.ywiki-content hr {
|
|
460
|
+
border: none;
|
|
461
|
+
border-top: 1px solid var(--color-border);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* ---------------------------------------------------------------- 图片 */
|
|
465
|
+
/* 图注(阅读端由 DocRenderer 渲染在图片下方) */
|
|
466
|
+
.ywiki-content .doc-image-caption {
|
|
467
|
+
margin-top: 6px;
|
|
468
|
+
color: var(--color-text-muted);
|
|
469
|
+
font-size: 12px;
|
|
470
|
+
line-height: 1.5;
|
|
471
|
+
text-align: center;
|
|
472
|
+
overflow: hidden;
|
|
473
|
+
text-overflow: ellipsis;
|
|
474
|
+
white-space: nowrap;
|
|
475
|
+
}
|
|
476
|
+
.ywiki-content .doc-image-gallery {
|
|
477
|
+
display: flex;
|
|
478
|
+
flex-wrap: wrap;
|
|
479
|
+
align-items: flex-start;
|
|
480
|
+
gap: 8px;
|
|
481
|
+
width: 100%;
|
|
482
|
+
}
|
|
483
|
+
.ywiki-content .doc-image-gallery > .doc-image[data-sized] {
|
|
484
|
+
/* 图库内的图由容器统一排布,忽略作者对单图设置的宽度。 */
|
|
485
|
+
margin-inline: 0;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* 图片行:按比例铺满整行(与编辑态同一口径)。
|
|
489
|
+
*
|
|
490
|
+
* 列宽由 `flex-grow: 比例` 分配,高度由 `aspect-ratio` 自动产生,
|
|
491
|
+
* 因此同行几乎等高、右侧没有空白。
|
|
492
|
+
*/
|
|
493
|
+
.ywiki-content .doc-image-gallery {
|
|
494
|
+
gap: 12px;
|
|
495
|
+
align-items: flex-start;
|
|
496
|
+
}
|
|
497
|
+
.ywiki-content .doc-image-gallery > .doc-image {
|
|
498
|
+
flex: 1 1 0;
|
|
499
|
+
min-width: 0;
|
|
500
|
+
width: auto;
|
|
501
|
+
height: auto;
|
|
502
|
+
max-width: none;
|
|
503
|
+
margin: 0;
|
|
504
|
+
aspect-ratio: var(--doc-image-aspect-ratio, 1.3333);
|
|
505
|
+
object-fit: contain;
|
|
506
|
+
/* 权重 = 原始比例 × 用户拖角设定的相对缩放 */
|
|
507
|
+
flex-grow: calc(var(--doc-image-aspect-ratio, 1) * var(--doc-image-weight, 1));
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* 带图注的图片在图片行里被一层 `<figure>` 包住,因此 **figure 才是 flex 子项**。
|
|
511
|
+
*
|
|
512
|
+
* 缺了这条规则时 figure 用默认 `flex: 0 1 auto`,按内部图片的固有宽度占位,
|
|
513
|
+
* 整行被挤成多行(实测两张 4:3 图变成上下两行、右侧留白),与"按比例铺满"
|
|
514
|
+
* 的口径不一致。变量由渲染器同时写到 figure 上(见 DocRenderer 的 galleryVars)。
|
|
515
|
+
*/
|
|
516
|
+
.ywiki-content .doc-image-gallery > .doc-image-figure {
|
|
517
|
+
flex: 1 1 0;
|
|
518
|
+
min-width: 0;
|
|
519
|
+
margin: 0;
|
|
520
|
+
flex-grow: calc(var(--doc-image-aspect-ratio, 1) * var(--doc-image-weight, 1));
|
|
521
|
+
}
|
|
522
|
+
.ywiki-content .doc-image-gallery > .doc-image-figure > .doc-image {
|
|
523
|
+
/* 图注容器已按比例分到列宽,图片铺满容器即可。 */
|
|
524
|
+
width: 100%;
|
|
525
|
+
max-width: 100%;
|
|
526
|
+
margin: 0;
|
|
527
|
+
}
|
|
528
|
+
.ywiki-content .doc-image-gallery > .doc-image-figure > .doc-image-caption {
|
|
529
|
+
/* 行内已有 12px 列间距,图注不再额外缩进,跟随图片列宽。 */
|
|
530
|
+
margin-inline: 0;
|
|
531
|
+
}
|
|
532
|
+
.ywiki-content img,
|
|
533
|
+
.ywiki-content .doc-image {
|
|
534
|
+
display: block;
|
|
535
|
+
margin-inline: auto;
|
|
536
|
+
max-width: 100%;
|
|
537
|
+
height: auto;
|
|
538
|
+
border-radius: var(--content-media-radius);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* 图片读取中:**渐变沿边框流动**的加载指示。
|
|
543
|
+
*
|
|
544
|
+
* ## 为什么不再用"整块灰底 + 微光"
|
|
545
|
+
*
|
|
546
|
+
* 静态灰块在浅色页面上几乎看不出是在加载,看起来更像"图丢了"或"这里是一块
|
|
547
|
+
* 空白"(用户多轮反馈)。改成一条沿边框奔跑的渐变——像贪吃蛇那样顺着圆角
|
|
548
|
+
* 绕圈,既明确表达"正在取",又不会往图片区域里填任何东西。
|
|
549
|
+
*
|
|
550
|
+
* ## 实现要点
|
|
551
|
+
*
|
|
552
|
+
* 1. **conic-gradient + 遮罩挖空**:整块铺一个锥形渐变,再用
|
|
553
|
+
* `mask-composite: exclude` 把中间挖掉,只留 2px 的一圈。
|
|
554
|
+
* `<img>` 是替换元素、`::before` 不渲染,所以不能像普通元素那样做双层。
|
|
555
|
+
* 2. **旋转靠 `@property` 注册角度变量**:conic-gradient 的 `from` 角度是离散值,
|
|
556
|
+
* 只有注册成 `<angle>` 类型才能被 `@keyframes` 平滑插值。不支持 `@property`
|
|
557
|
+
* 的浏览器会停在静态渐变上(仍有边框,只是不转)。
|
|
558
|
+
* 3. **加载完成时 `data-loading` 消失** → 遮罩一并移除,图片正常显示,
|
|
559
|
+
* 不会因为残留的 mask 把图片裁掉。
|
|
560
|
+
*/
|
|
561
|
+
@property --ywiki-image-flow-angle {
|
|
562
|
+
syntax: '<angle>';
|
|
563
|
+
initial-value: 0deg;
|
|
564
|
+
inherits: false;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.ywiki-content .doc-image[data-loading] {
|
|
568
|
+
box-sizing: border-box;
|
|
569
|
+
/* 这 3px 就是"边框"的厚度:遮罩只保留它,中间透明 */
|
|
570
|
+
padding: 3px;
|
|
571
|
+
border-radius: var(--content-media-radius);
|
|
572
|
+
background-image: conic-gradient(
|
|
573
|
+
from var(--ywiki-image-flow-angle),
|
|
574
|
+
color-mix(in srgb, var(--color-accent) 14%, var(--color-surface-subtle)) 0turn 55%,
|
|
575
|
+
color-mix(in srgb, var(--color-accent) 55%, transparent) 78%,
|
|
576
|
+
var(--color-accent) 92%,
|
|
577
|
+
color-mix(in srgb, var(--color-accent) 14%, var(--color-surface-subtle)) 100%
|
|
578
|
+
);
|
|
579
|
+
-webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
|
|
580
|
+
-webkit-mask-clip: content-box, border-box;
|
|
581
|
+
-webkit-mask-composite: xor;
|
|
582
|
+
mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
|
|
583
|
+
mask-clip: content-box, border-box;
|
|
584
|
+
mask-composite: exclude;
|
|
585
|
+
animation: ywiki-image-flow 1.4s linear infinite;
|
|
586
|
+
/* 独立图片没有 aspect-ratio 可撑高:给一个最小高度,否则框不可见 */
|
|
587
|
+
min-height: 120px;
|
|
588
|
+
}
|
|
589
|
+
/* 图片行内的高度由 aspect-ratio 决定,不要再叠加最小高度(会把行撑高) */
|
|
590
|
+
.ywiki-content .doc-image-gallery > .doc-image[data-loading] {
|
|
591
|
+
min-height: 0;
|
|
592
|
+
}
|
|
593
|
+
@keyframes ywiki-image-flow {
|
|
594
|
+
to { --ywiki-image-flow-angle: 360deg; }
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* 加载失败:一条很淡的实线边框 + 极浅底色,**不流动**。
|
|
598
|
+
*
|
|
599
|
+
* 与"加载中"靠"有没有在转"区分:正在转 = 还在取,静止 = 取不到。不需要图标
|
|
600
|
+
* 或文字(它们在大块图片里比图片本身还抢眼,用户实测反馈更丑)。
|
|
601
|
+
* 不用虚线:虚线在缩略图上会碎成一段段,看起来像边框画错了。
|
|
602
|
+
*/
|
|
603
|
+
.ywiki-content .doc-image[data-image-error] {
|
|
604
|
+
box-sizing: border-box;
|
|
605
|
+
min-height: 72px;
|
|
606
|
+
background-color: color-mix(in srgb, var(--color-surface-subtle) 70%, var(--color-border));
|
|
607
|
+
border-radius: var(--content-media-radius);
|
|
608
|
+
outline: 1px solid color-mix(in srgb, var(--color-border-strong) 55%, transparent);
|
|
609
|
+
outline-offset: -1px;
|
|
610
|
+
/*
|
|
611
|
+
* 破图图标不在这里处理:组件在失败时给 `<img>` 换上透明像素(见
|
|
612
|
+
* `LazyAttachmentImage` 的 `TRANSPARENT_PIXEL`)。CSS 侧的 `content: ''`、
|
|
613
|
+
* `text-indent`、`font-size: 0` 都盖不住浏览器为失败图片绘制的那个图标。
|
|
614
|
+
*/
|
|
615
|
+
}
|
|
616
|
+
.ywiki-content .doc-image-gallery > .doc-image[data-image-error] {
|
|
617
|
+
min-height: 0;
|
|
618
|
+
}
|
|
619
|
+
@media (prefers-reduced-motion: reduce) {
|
|
620
|
+
/* 减少动效:保留渐变的光段,只是不再旋转 */
|
|
621
|
+
.ywiki-content .doc-image[data-loading] {
|
|
622
|
+
animation: none;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/*
|
|
627
|
+
* 作者显式缩放过的图片(data-sized):**左对齐**,宽度即作者设定值。
|
|
628
|
+
* 与编辑端同一口径(EditorPane 的 .ywiki-image-frame[data-sized]):
|
|
629
|
+
* 缩放锚点固定在左缘,编辑端与阅读端观感一致;未缩放的图仍居中。
|
|
630
|
+
*/
|
|
631
|
+
.ywiki-content .doc-image[data-sized] {
|
|
632
|
+
margin-left: 0;
|
|
633
|
+
margin-right: auto;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/*
|
|
637
|
+
* 图片工具条设置的显式对齐(data-align)优先于上面的默认规则。
|
|
638
|
+
* 三端共用同一语义:编辑端用 flex 对齐容器,阅读端用 margin 对齐图片。
|
|
639
|
+
*/
|
|
640
|
+
.ywiki-content .doc-image[data-align='left'] { margin-left: 0; margin-right: auto; }
|
|
641
|
+
.ywiki-content .doc-image[data-align='center'] { margin-left: auto; margin-right: auto; }
|
|
642
|
+
.ywiki-content .doc-image[data-align='right'] { margin-left: auto; margin-right: 0; }
|
|
643
|
+
|
|
644
|
+
/* ---------------------------------------------------------------- 链接与行内 chip */
|
|
645
|
+
.ywiki-content a,
|
|
646
|
+
.ywiki-content .doc-link {
|
|
647
|
+
color: var(--color-accent);
|
|
648
|
+
text-decoration: none;
|
|
649
|
+
}
|
|
650
|
+
.ywiki-content a:hover,
|
|
651
|
+
.ywiki-content .doc-link:hover { text-decoration: underline; }
|
|
652
|
+
|
|
653
|
+
/* 页面引用:蓝色文字 + 淡下划线。 */
|
|
654
|
+
.ywiki-content .doc-page-link {
|
|
655
|
+
color: var(--color-accent);
|
|
656
|
+
text-decoration: none;
|
|
657
|
+
border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
|
|
658
|
+
}
|
|
659
|
+
.ywiki-content .doc-page-link:hover {
|
|
660
|
+
border-bottom-color: var(--color-accent);
|
|
661
|
+
text-decoration: none;
|
|
662
|
+
}
|
|
663
|
+
.ywiki-content .doc-page-link-plain { color: var(--color-text); }
|
|
664
|
+
|
|
665
|
+
/* @提及:蓝色药丸 */
|
|
666
|
+
.ywiki-content .doc-mention {
|
|
667
|
+
color: var(--color-accent);
|
|
668
|
+
background: var(--color-accent-soft);
|
|
669
|
+
border-radius: 4px;
|
|
670
|
+
padding: 0.05em 0.35em;
|
|
671
|
+
font-size: 0.95em;
|
|
672
|
+
font-weight: 500;
|
|
673
|
+
white-space: nowrap;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/* 文字高亮:无自定义颜色时的默认底色(自定义色走内联 style 覆盖) */
|
|
677
|
+
.ywiki-content mark,
|
|
678
|
+
.ywiki-content .doc-mark-highlight {
|
|
679
|
+
background: color-mix(in srgb, var(--color-warning) 30%, transparent);
|
|
680
|
+
border-radius: 2px;
|
|
681
|
+
padding: 0.05em 0.1em;
|
|
682
|
+
color: inherit;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/* ---------------------------------------------------------------- 分栏 */
|
|
686
|
+
.ywiki-content .doc-columns {
|
|
687
|
+
display: flex;
|
|
688
|
+
gap: 16px;
|
|
689
|
+
align-items: flex-start;
|
|
690
|
+
}
|
|
691
|
+
.ywiki-content .doc-column { flex: 1 1 0; min-width: 0; }
|
|
692
|
+
.ywiki-content .doc-column > *:first-child { margin-top: 0; }
|
|
693
|
+
@media (max-width: 560px) {
|
|
694
|
+
.ywiki-content .doc-columns { flex-direction: column; gap: 10px; }
|
|
695
|
+
}
|
|
696
|
+
@container wiki-content (max-width: 560px) {
|
|
697
|
+
.ywiki-content .doc-columns { flex-direction: column; gap: 10px; }
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/* ---------------------------------------------------------------- 公式 */
|
|
701
|
+
.ywiki-content .doc-math-inline { display: inline-block; vertical-align: middle; }
|
|
702
|
+
.ywiki-content .doc-math-block {
|
|
703
|
+
display: block;
|
|
704
|
+
overflow-x: auto;
|
|
705
|
+
padding: 8px 0;
|
|
706
|
+
text-align: center;
|
|
707
|
+
}
|
|
708
|
+
.doc-math-pending {
|
|
709
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
710
|
+
font-size: 0.875em;
|
|
711
|
+
color: var(--color-text-muted);
|
|
712
|
+
}
|
|
713
|
+
.doc-math-error {
|
|
714
|
+
border: 1px dashed color-mix(in srgb, var(--color-danger) 50%, transparent);
|
|
715
|
+
border-radius: 4px;
|
|
716
|
+
padding: 0 4px;
|
|
717
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
718
|
+
font-size: 0.875em;
|
|
719
|
+
color: var(--color-danger);
|
|
720
|
+
}
|
|
721
|
+
.doc-math-error-hint { margin-left: 6px; font-size: 0.85em; opacity: 0.8; }
|
|
722
|
+
|
|
723
|
+
/* ---------------------------------------------------------------- 文件与媒体
|
|
724
|
+
编辑 NodeView 与阅读卡片的结构类不同,盒模型与正文均由这一份样式提供。 */
|
|
725
|
+
.ywiki-content :where(.doc-file, .doc-file-attachment) {
|
|
726
|
+
border: 1px solid var(--color-border);
|
|
727
|
+
border-radius: 8px;
|
|
728
|
+
padding: 10px 12px;
|
|
729
|
+
background: var(--color-surface-subtle);
|
|
730
|
+
font-size: 14px;
|
|
731
|
+
color: var(--color-text-muted);
|
|
732
|
+
}
|
|
733
|
+
.ywiki-content .doc-file-head { display: flex; align-items: center; gap: 8px; }
|
|
734
|
+
.ywiki-content .doc-file-icon { flex: none; }
|
|
735
|
+
.ywiki-content .doc-file-name {
|
|
736
|
+
flex: 1;
|
|
737
|
+
min-width: 0;
|
|
738
|
+
overflow: hidden;
|
|
739
|
+
text-overflow: ellipsis;
|
|
740
|
+
white-space: nowrap;
|
|
741
|
+
}
|
|
742
|
+
.ywiki-content .doc-file-size { flex: none; font-size: 12px; color: var(--color-text-faint); }
|
|
743
|
+
.ywiki-content .doc-file-action {
|
|
744
|
+
flex: none;
|
|
745
|
+
border: 1px solid var(--color-border);
|
|
746
|
+
background: var(--color-surface);
|
|
747
|
+
border-radius: 6px;
|
|
748
|
+
padding: 2px 10px;
|
|
749
|
+
font-size: 12px;
|
|
750
|
+
color: var(--color-text-muted);
|
|
751
|
+
cursor: pointer;
|
|
752
|
+
}
|
|
753
|
+
.ywiki-content .doc-file-action:hover { color: var(--color-accent); border-color: var(--color-accent); }
|
|
754
|
+
.ywiki-content video.doc-file-video {
|
|
755
|
+
display: block;
|
|
756
|
+
width: 100%;
|
|
757
|
+
max-height: 420px;
|
|
758
|
+
margin-top: 8px;
|
|
759
|
+
border-radius: 6px;
|
|
760
|
+
background: #000;
|
|
761
|
+
}
|
|
762
|
+
.ywiki-content img.doc-file-image {
|
|
763
|
+
display: block;
|
|
764
|
+
max-width: 100%;
|
|
765
|
+
margin: 8px 0 0;
|
|
766
|
+
border-radius: 6px;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/* ---------------------------------------------------------------- 行内评论高亮
|
|
770
|
+
编辑端与只读端共用同一套观感。
|
|
771
|
+
|
|
772
|
+
## 同一黄色系三档,靠深浅表达强弱
|
|
773
|
+
|
|
774
|
+
早先用 `--color-warning`(偏橙棕)叠 22%,是脏橘色、与正文高亮分不清;
|
|
775
|
+
后来改淡米黄又太浅("看不到评论的选中区");再后来"有回复"用蓝色区分,
|
|
776
|
+
用户反馈与黄色差别太大、容易误读成两类东西("可以搞多色,但是不要影响
|
|
777
|
+
用户心智")。
|
|
778
|
+
|
|
779
|
+
现在三档都在黄色家族里:普通评论亮黄底 + 深琥珀下划线,有回复加深一档,
|
|
780
|
+
激活再深一档。下划线用深琥珀而不是亮黄——底色变亮后,浅色下划线在浅蓝
|
|
781
|
+
或白色背景上都看不清(用户反馈"这个看不清,底部和背景色")。
|
|
782
|
+
|
|
783
|
+
## 方角,不用圆角
|
|
784
|
+
|
|
785
|
+
`border-radius: 0`(用户明确要求)。标记是"文字底下的一条色带",
|
|
786
|
+
圆角会让它在行内显得像按钮。
|
|
787
|
+
|
|
788
|
+
## 提示不用原生 title
|
|
789
|
+
|
|
790
|
+
`title` 由浏览器绘制、样式不可控,这里由 `shared/comment-hint.ts` 自绘。 */
|
|
791
|
+
.ywiki-content .doc-inline-comment {
|
|
792
|
+
background: var(--comment-mark-bg, #ffe58f);
|
|
793
|
+
border-bottom: 2px solid var(--comment-mark-line, #d48806);
|
|
794
|
+
border-radius: 0;
|
|
795
|
+
/* 让底色与文字之间留一点空隙,读起来像"标记"而不是"文字被染色" */
|
|
796
|
+
padding-bottom: 1px;
|
|
797
|
+
cursor: pointer;
|
|
798
|
+
}
|
|
799
|
+
.ywiki-content .doc-inline-comment.has-replies {
|
|
800
|
+
background: var(--comment-mark-bg-reply, #ffd666);
|
|
801
|
+
border-bottom-color: var(--comment-mark-line-reply, #ad6800);
|
|
802
|
+
}
|
|
803
|
+
.ywiki-content .doc-inline-comment.is-active {
|
|
804
|
+
background: var(--comment-mark-bg-active, #ffc53d);
|
|
805
|
+
border-bottom-color: var(--comment-mark-line-active, #ad6800);
|
|
806
|
+
/* 激活项加一圈同色细边:与"有评论"区分开,一眼看出当前在看哪条 */
|
|
807
|
+
outline: 1px solid var(--comment-mark-line-active, #ad6800);
|
|
808
|
+
outline-offset: 1px;
|
|
809
|
+
}
|
|
810
|
+
/* 原文被改动:零宽落点用左侧竖线标记,避免伪装成正常高亮 */
|
|
811
|
+
.ywiki-content .doc-inline-comment.is-shifted {
|
|
812
|
+
border-left: 2px solid var(--color-danger);
|
|
813
|
+
padding-left: 1px;
|
|
814
|
+
background: transparent;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/* ---------------------------------------------------------------- 块流
|
|
818
|
+
两端的结构路径放进 :where(),统一为 (0,1,0) 权重。规则放在元素 reset 之后,
|
|
819
|
+
不以 !important 或逐个给 h/p 添加 class 来补偿 DOM 包装差异。
|
|
820
|
+
引用、高亮块、分栏、单元格内部使用同一节奏,首尾不产生额外空白。 */
|
|
821
|
+
.ywiki-content > * + *,
|
|
822
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column, td, th) > * + * {
|
|
823
|
+
margin-top: var(--space-block);
|
|
824
|
+
}
|
|
825
|
+
.ywiki-content > :where(h1, h2, h3, h4, h5, h6),
|
|
826
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column, td, th) > :where(h1, h2, h3, h4, h5, h6) {
|
|
827
|
+
margin-top: var(--space-heading-top);
|
|
828
|
+
}
|
|
829
|
+
/* 标题与其后的内容是一组,连续标题也保持紧凑。 */
|
|
830
|
+
.ywiki-content > :where(h1, h2, h3, h4, h5, h6) + *,
|
|
831
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column, td, th) > :where(h1, h2, h3, h4, h5, h6) + * {
|
|
832
|
+
margin-top: var(--space-heading-bottom);
|
|
833
|
+
}
|
|
834
|
+
/* 待办项的 label 和内容容器横向排列,不在二者之间加纵向块间距。 */
|
|
835
|
+
/* TaskItem 的编辑 node view 没有 data-type,必须根据父 taskList 识别。 */
|
|
836
|
+
.ywiki-content :where(li:not(.doc-task-item):not(ul[data-type='taskList'] > li), li > div, li > span) > * + * {
|
|
837
|
+
margin-top: var(--space-list-block);
|
|
838
|
+
}
|
|
839
|
+
/* 结构模块与普通段落分开:两边都留模块间距,不能由短段距挤在一起。
|
|
840
|
+
编辑 nodeView 与阅读包装分别列明,单元格最后再按其内部紧凑规则覆盖。 */
|
|
841
|
+
.ywiki-content > :where(ul, ol, blockquote, pre, table, img, .tableWrapper, .doc-table-wrap, .code-block-wrap, .doc-code-wrap, .ywiki-image-frame, .doc-image, .doc-callout, .doc-columns, .doc-file-attachment, .doc-file-video, .doc-video-embed, [data-video-embed], .doc-math-block, .math-block) ,
|
|
842
|
+
.ywiki-content > :where(ul, ol, blockquote, pre, table, img, .tableWrapper, .doc-table-wrap, .code-block-wrap, .doc-code-wrap, .ywiki-image-frame, .doc-image, .doc-callout, .doc-columns, .doc-file-attachment, .doc-file-video, .doc-video-embed, [data-video-embed], .doc-math-block, .math-block) + *,
|
|
843
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column) > :where(ul, ol, blockquote, pre, table, img, .tableWrapper, .doc-table-wrap, .code-block-wrap, .doc-code-wrap, .ywiki-image-frame, .doc-image, .doc-callout, .doc-columns, .doc-file-attachment, .doc-file-video, .doc-video-embed, [data-video-embed], .doc-math-block, .math-block),
|
|
844
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column) > :where(ul, ol, blockquote, pre, table, img, .tableWrapper, .doc-table-wrap, .code-block-wrap, .doc-code-wrap, .ywiki-image-frame, .doc-image, .doc-callout, .doc-columns, .doc-file-attachment, .doc-file-video, .doc-video-embed, [data-video-embed], .doc-math-block, .math-block) + * {
|
|
845
|
+
margin-top: var(--space-module);
|
|
846
|
+
}
|
|
847
|
+
/* 标题是章节边界;即使前面是表格、代码或媒体,也保留足够章节留白。 */
|
|
848
|
+
.ywiki-content > :where(h1, h2, h3, h4, h5, h6),
|
|
849
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column) > :where(h1, h2, h3, h4, h5, h6) {
|
|
850
|
+
margin-top: var(--space-heading-top);
|
|
851
|
+
}
|
|
852
|
+
.ywiki-content > :where(h1, h2, h3, h4, h5, h6) + *,
|
|
853
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column) > :where(h1, h2, h3, h4, h5, h6) + * {
|
|
854
|
+
margin-top: var(--space-heading-bottom);
|
|
855
|
+
}
|
|
856
|
+
.ywiki-content > hr,
|
|
857
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column, td, th) > hr {
|
|
858
|
+
margin-block: var(--space-divider);
|
|
859
|
+
}
|
|
860
|
+
.ywiki-content > :first-child,
|
|
861
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column, td, th, li, li > div, li > span) > :first-child {
|
|
862
|
+
margin-top: 0;
|
|
863
|
+
}
|
|
864
|
+
.ywiki-content > :last-child,
|
|
865
|
+
.ywiki-content :where(.doc-body, blockquote, .doc-callout-content, .doc-column, td, th, li, li > div, li > span) > :last-child {
|
|
866
|
+
margin-bottom: 0;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/* 文档表格有自己的紧凑节奏,仍保留作者输入的空段落与显式加粗。 */
|
|
870
|
+
.ywiki-content :where(td, th) > * + * { margin-top: 0.25em; }
|
|
871
|
+
.ywiki-content :where(td, th) > :first-child { margin-top: 0; }
|
|
872
|
+
.ywiki-content :where(td, th) > :where(p, ul, ol) { font-weight: inherit; }
|
|
873
|
+
.ywiki-content :where(td, th) > p:empty { min-height: calc(1em * var(--content-table-line-height)); }
|
|
874
|
+
|
|
875
|
+
/* 阅读端内容宽度交给 token(外观菜单可调) */
|
|
876
|
+
.doc-renderer {
|
|
877
|
+
width: 100%;
|
|
878
|
+
max-width: var(--content-width);
|
|
879
|
+
margin-inline: auto;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/* ---------------------------------------------------------------- 图片懒加载占位
|
|
883
|
+
还没取到字节(接近视口时才取,见 LazyAttachmentImage):
|
|
884
|
+
给一个最小占位高度,避免图片陆续到达时正文不断被顶下去。 */
|
|
885
|
+
.doc-image {
|
|
886
|
+
cursor: zoom-in;
|
|
887
|
+
}
|
|
888
|
+
.doc-image[data-loading] {
|
|
889
|
+
min-width: 160px;
|
|
890
|
+
min-height: 60px;
|
|
891
|
+
background: var(--color-surface-subtle);
|
|
892
|
+
border-radius: 8px;
|
|
893
|
+
}
|
|
894
|
+
.doc-image-loading,
|
|
895
|
+
.doc-image-missing,
|
|
896
|
+
.doc-unknown {
|
|
897
|
+
color: var(--color-text-muted);
|
|
898
|
+
font-size: 0.9em;
|
|
899
|
+
}
|
|
900
|
+
.doc-unknown {
|
|
901
|
+
border: 1px dashed var(--color-border-strong);
|
|
902
|
+
border-radius: 6px;
|
|
903
|
+
padding: 8px 10px;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/* 文件卡片的共同样式在 shared/content-style.css。 */
|
|
907
|
+
.doc-file.is-missing { color: var(--color-text-faint); }
|
|
908
|
+
/* 编辑态图片:src 由 node view 按 attachmentId 解析而来(正文不存存储地址)。
|
|
909
|
+
给个最小样式,避免加载中/缺失时排版跳动。 */
|
|
910
|
+
.ywiki-prose img.ywiki-image {
|
|
911
|
+
max-width: 100%;
|
|
912
|
+
border-radius: var(--content-media-radius);
|
|
913
|
+
display: block;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* 图片容器(node view)的**三层结构**:
|
|
917
|
+
* frame(块级、占满整行)→ 水平对齐(flex justify-content)
|
|
918
|
+
* inner(贴合图片尺寸)→ 选中框 / 四角手柄 / 块选中高亮
|
|
919
|
+
* img
|
|
920
|
+
*
|
|
921
|
+
* 选中框必须画在 **inner** 上(用户反馈"编辑图片大小时外框没有跟随图片
|
|
922
|
+
* 大小变化"):frame 占满整行,蓝框会横跨整行、右边空出一大片,看起来
|
|
923
|
+
* 像框没跟着图片走。
|
|
924
|
+
*/
|
|
925
|
+
.ywiki-prose .ywiki-image-frame {
|
|
926
|
+
display: flex;
|
|
927
|
+
justify-content: center;
|
|
928
|
+
/* 图注在图片下方:纵向排列,图片仍按 justify-content 水平对齐 */
|
|
929
|
+
flex-direction: column;
|
|
930
|
+
align-items: center;
|
|
931
|
+
}
|
|
932
|
+
/* 有图注时,图片与图注各自成行;图片的水平对齐交给内层 */
|
|
933
|
+
.ywiki-prose .ywiki-image-frame.has-caption > .ywiki-image-inner { align-self: center; }
|
|
934
|
+
/* 图注:一行灰色小字,超出省略(完整内容见 title) */
|
|
935
|
+
.ywiki-prose .ywiki-image-caption {
|
|
936
|
+
max-width: 100%;
|
|
937
|
+
margin-top: 6px;
|
|
938
|
+
padding: 0 2px;
|
|
939
|
+
color: var(--color-text-muted);
|
|
940
|
+
font-size: 12px;
|
|
941
|
+
line-height: 1.5;
|
|
942
|
+
text-align: center;
|
|
943
|
+
overflow: hidden;
|
|
944
|
+
text-overflow: ellipsis;
|
|
945
|
+
white-space: nowrap;
|
|
946
|
+
user-select: text;
|
|
947
|
+
}
|
|
948
|
+
.ywiki-prose .ywiki-image-gallery {
|
|
949
|
+
display: flex;
|
|
950
|
+
flex-wrap: wrap;
|
|
951
|
+
align-items: flex-start;
|
|
952
|
+
gap: 8px;
|
|
953
|
+
width: 100%;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* 图片行**整行选中**:给整行加一圈描边。
|
|
957
|
+
*
|
|
958
|
+
* 只给每张图铺底色是不够的——图片之间的间隙、行首行尾的留白都没有任何
|
|
959
|
+
* 选中信号,整行看起来和未选中几乎一样(用户实测反馈:"一行全选中也要有
|
|
960
|
+
* 选中效果")。
|
|
961
|
+
*
|
|
962
|
+
* 不能用普通块的 `::before` 蓝带:图片行是 flex 容器,绝对定位的伪元素
|
|
963
|
+
* 会参与 flex 布局计算,外扩的 6px 也容易被行高吃掉。改为与其它自带外观
|
|
964
|
+
* 的块一致的实色描边;圆角取 6px,与表格的选中框对齐。
|
|
965
|
+
*/
|
|
966
|
+
.ywiki-prose .ywiki-image-gallery.is-block-selected {
|
|
967
|
+
outline: 2px solid var(--color-accent);
|
|
968
|
+
outline-offset: 2px;
|
|
969
|
+
border-radius: 6px;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* 单张图片(独立图片块)被**整块选中**:给图片本身加一圈描边。
|
|
973
|
+
*
|
|
974
|
+
* 图片块没有自带外观,走的是"普通块铺蓝带"分支,结果只有一条半透明底色
|
|
975
|
+
* 与图片上的淡色覆盖,**没有边框**——与表格、高亮块、文件卡片的选中观感
|
|
976
|
+
* 不一致(用户实测反馈:"只有一张图的选中没有边框")。
|
|
977
|
+
*
|
|
978
|
+
* 只作用于独立图片(图片行内的子图不带 `is-block-selected`,整行选中时
|
|
979
|
+
* 描边画在行容器上),因此不会与图片行的整行框重叠。
|
|
980
|
+
*/
|
|
981
|
+
.ywiki-prose .ywiki-image-frame.is-block-selected .ywiki-image-inner {
|
|
982
|
+
outline: 2px solid var(--color-accent);
|
|
983
|
+
outline-offset: 2px;
|
|
984
|
+
border-radius: 6px;
|
|
985
|
+
}
|
|
986
|
+
.ywiki-prose .ywiki-image-gallery > .ywiki-image-frame.is-in-gallery .ywiki-image-inner {
|
|
987
|
+
/* 图片行里不显示四角缩放手柄(等高排布,单图改宽会破坏对齐)。 */
|
|
988
|
+
cursor: default;
|
|
989
|
+
}
|
|
990
|
+
.ywiki-prose .ywiki-image-gallery {
|
|
991
|
+
position: relative;
|
|
992
|
+
}
|
|
993
|
+
/* 图片行内的框选矩形(挂在 portal 上,视口坐标定位) */
|
|
994
|
+
.ywiki-gallery-marquee {
|
|
995
|
+
position: fixed;
|
|
996
|
+
z-index: 69;
|
|
997
|
+
border: 1px solid color-mix(in srgb, var(--color-accent) 70%, transparent);
|
|
998
|
+
background: color-mix(in srgb, var(--color-accent) 12%, transparent);
|
|
999
|
+
border-radius: 2px;
|
|
1000
|
+
pointer-events: none;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* 图片上的选中覆盖层:**只有一个 `::after`,强度固定 16%**。
|
|
1004
|
+
*
|
|
1005
|
+
* ## 为什么必须合并到一个选择器(用户实测:"为什么还有蓝色区域")
|
|
1006
|
+
*
|
|
1007
|
+
* 这里曾经有两处独立规则写同一个 `::after`:
|
|
1008
|
+
* - 框选命中(`.is-multi-picked`)16%;
|
|
1009
|
+
* - 整块选中(`.ywiki-image-frame.is-block-selected`)18%。
|
|
1010
|
+
*
|
|
1011
|
+
* 两者可以同时命中(框选后松手会转成块选区),于是同一个伪元素被两条规则
|
|
1012
|
+
* 分别赋值——后者胜出,颜色却与整页带(16%)不一致,图上出现一块更深的矩形。
|
|
1013
|
+
* 更早还叠过一层 frame 的 16% 背景,合计接近 50%。
|
|
1014
|
+
*
|
|
1015
|
+
* 现在统一为一条规则、一个强度:图片区域与非图片区域的选中底色完全相同。
|
|
1016
|
+
*
|
|
1017
|
+
* `outline` 仍按状态区分(框选中是实线、块选中不描边)——那表达的是"这是
|
|
1018
|
+
* 框选出来的"与"这块在选区里"的差别,不影响底色。
|
|
1019
|
+
*/
|
|
1020
|
+
.ywiki-prose .ywiki-image-frame.is-multi-picked .ywiki-image-inner,
|
|
1021
|
+
.ywiki-prose .ywiki-image-frame.is-block-selected-image .ywiki-image-inner,
|
|
1022
|
+
.wendang-portal .ywiki-image-frame.is-multi-picked .ywiki-image-inner {
|
|
1023
|
+
/**
|
|
1024
|
+
* 圆角与表格/其他块的选中描边统一为 6px(用户反馈:"图片选中的圆角
|
|
1025
|
+
* 和表格选中的差不多,现在有点不一致")。早先是 3px/4px,混在一起时
|
|
1026
|
+
* 图片的框明显更方。
|
|
1027
|
+
*/
|
|
1028
|
+
outline: 2px solid var(--color-accent);
|
|
1029
|
+
outline-offset: 2px;
|
|
1030
|
+
border-radius: 6px;
|
|
1031
|
+
}
|
|
1032
|
+
.ywiki-prose .is-block-selected .ywiki-image-inner::after,
|
|
1033
|
+
.ywiki-prose .ywiki-image-frame.is-multi-picked .ywiki-image-inner::after,
|
|
1034
|
+
.ywiki-prose .ywiki-image-frame.is-block-selected-image .ywiki-image-inner::after,
|
|
1035
|
+
.wendang-portal .ywiki-image-frame.is-multi-picked .ywiki-image-inner::after {
|
|
1036
|
+
content: '';
|
|
1037
|
+
position: absolute;
|
|
1038
|
+
inset: 0;
|
|
1039
|
+
border-radius: var(--content-media-radius, 4px);
|
|
1040
|
+
background: color-mix(in srgb, var(--color-accent) 16%, transparent);
|
|
1041
|
+
pointer-events: none;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* 跨图片拖拽:**落点提示**。
|
|
1045
|
+
*
|
|
1046
|
+
* ## 从"虚线框"改为"柔和的整体高亮"(用户反馈:虚线框看起来比较生硬)
|
|
1047
|
+
*
|
|
1048
|
+
* 原先落在目标图上画 2px dashed outline。虚线在照片这类复杂底图上会碎成
|
|
1049
|
+
* 一段段,而且"框住整张图"的观感太抢眼——它表达的是"我要插到这里",不是
|
|
1050
|
+
* "这张图被选中了",用户的原话是"看怎么处理更好看点"。
|
|
1051
|
+
*
|
|
1052
|
+
* 现在改成两层柔和的信号:
|
|
1053
|
+
* 1. 图片本身叠一层淡强调色(和块选中同一套语言,`::after` 已存在,复用);
|
|
1054
|
+
* 2. 外加一圈 2px 实线 + 3px 留白的描边,颜色是强调色但带透明度。
|
|
1055
|
+
*
|
|
1056
|
+
* 不用虚线、不用发光:拖拽是高频操作,提示需要"看得见但不吵"。
|
|
1057
|
+
*/
|
|
1058
|
+
.ywiki-prose .ywiki-image-frame.is-image-drop-target .ywiki-image-inner {
|
|
1059
|
+
outline: 2px solid color-mix(in srgb, var(--color-accent) 70%, transparent);
|
|
1060
|
+
outline-offset: 3px;
|
|
1061
|
+
border-radius: var(--content-media-radius, 6px);
|
|
1062
|
+
}
|
|
1063
|
+
/* 落点图上再叠一层淡色,明确"松手就并到这里" */
|
|
1064
|
+
.ywiki-prose .ywiki-image-frame.is-image-drop-target .ywiki-image-inner::after {
|
|
1065
|
+
content: '';
|
|
1066
|
+
position: absolute;
|
|
1067
|
+
inset: 0;
|
|
1068
|
+
border-radius: var(--content-media-radius, 6px);
|
|
1069
|
+
background: color-mix(in srgb, var(--color-accent) 14%, transparent);
|
|
1070
|
+
pointer-events: none;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* 插入指示线:一条**细长的圆头光带**,插在将要落入的位置。
|
|
1075
|
+
*
|
|
1076
|
+
* 几何与颜色都由脚本内联(挂在 portal / body 上取不到主题变量),这里只给
|
|
1077
|
+
* 形状与层级。圆头 + 柔和外发光让它看起来像"一根发光的针",比纯色方块轻。
|
|
1078
|
+
*/
|
|
1079
|
+
.ywiki-image-drop-line,
|
|
1080
|
+
.ywiki-gallery-drop-line {
|
|
1081
|
+
position: fixed;
|
|
1082
|
+
border-radius: 999px;
|
|
1083
|
+
pointer-events: none;
|
|
1084
|
+
/* 必须高于图片行内容,否则会被图片盖住、看起来"拖拽没有反馈" */
|
|
1085
|
+
z-index: 70;
|
|
1086
|
+
}
|
|
1087
|
+
.ywiki-image-drop-line { z-index: 60; }
|
|
1088
|
+
/**
|
|
1089
|
+
* 指示线两端的小圆点:把"针"的两端收圆,视觉上更像刻度而不是一条色块。
|
|
1090
|
+
* 用伪元素而不是额外 DOM,避免拖拽期间频繁创建节点。
|
|
1091
|
+
*/
|
|
1092
|
+
.ywiki-image-drop-line::before,
|
|
1093
|
+
.ywiki-image-drop-line::after,
|
|
1094
|
+
.ywiki-gallery-drop-line::before,
|
|
1095
|
+
.ywiki-gallery-drop-line::after {
|
|
1096
|
+
content: '';
|
|
1097
|
+
position: absolute;
|
|
1098
|
+
left: 50%;
|
|
1099
|
+
width: 7px;
|
|
1100
|
+
height: 7px;
|
|
1101
|
+
margin-left: -3.5px;
|
|
1102
|
+
border-radius: 50%;
|
|
1103
|
+
background: inherit;
|
|
1104
|
+
}
|
|
1105
|
+
.ywiki-image-drop-line::before,
|
|
1106
|
+
.ywiki-gallery-drop-line::before { top: -3px; }
|
|
1107
|
+
.ywiki-image-drop-line::after,
|
|
1108
|
+
.ywiki-gallery-drop-line::after { bottom: -3px; }
|
|
1109
|
+
.wendang-portal .ywiki-gallery-drop-line,
|
|
1110
|
+
.wendang-portal .ywiki-image-drop-line { position: fixed; }
|
|
1111
|
+
.ywiki-prose .ywiki-image-frame.is-gallery-dragging {
|
|
1112
|
+
opacity: 0.55;
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* 图片行(飞书口径):**按比例铺满整行**,高度由比例自然产生。
|
|
1116
|
+
*
|
|
1117
|
+
* 为什么不用固定行高:固定行高在图片少时右侧留一大片空白(实测两图并排只占
|
|
1118
|
+
* 一半宽度)。飞书改成「各列按 比例/比例和 分宽度」——列宽加起来正好铺满,
|
|
1119
|
+
* 高度 = 可用宽 / 比例和,因此同行几乎等高且无空白。
|
|
1120
|
+
*
|
|
1121
|
+
* `--ywiki-image-ratio` 由 node view 按原图宽高比写入,`flex-basis` 用比例
|
|
1122
|
+
* 作为权重,`flex-grow` 让它们把剩余空间按权重分掉。
|
|
1123
|
+
*/
|
|
1124
|
+
.ywiki-prose .ywiki-image-gallery {
|
|
1125
|
+
/* 12px 间距与飞书的 column-gap 实测一致 */
|
|
1126
|
+
gap: 12px;
|
|
1127
|
+
align-items: flex-start;
|
|
1128
|
+
}
|
|
1129
|
+
.ywiki-prose .ywiki-image-gallery > .ywiki-image-frame {
|
|
1130
|
+
flex: 1 1 0;
|
|
1131
|
+
/* 基础宽度置零,完全由 flex-grow 按比例分配,避免比例小的图先占位 */
|
|
1132
|
+
min-width: 0;
|
|
1133
|
+
width: auto;
|
|
1134
|
+
height: auto;
|
|
1135
|
+
max-width: none;
|
|
1136
|
+
justify-content: flex-start;
|
|
1137
|
+
}
|
|
1138
|
+
/* 分配权重 = 原始比例 × 用户拖角设定的相对缩放(`--ywiki-image-weight`) */
|
|
1139
|
+
.ywiki-prose .ywiki-image-gallery > .ywiki-image-frame {
|
|
1140
|
+
flex-grow: calc(var(--ywiki-image-ratio, 1) * var(--ywiki-image-weight, 1));
|
|
1141
|
+
}
|
|
1142
|
+
.ywiki-prose .ywiki-image-gallery > .ywiki-image-frame .ywiki-image-inner {
|
|
1143
|
+
width: 100%;
|
|
1144
|
+
max-width: none;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* 图库内图片高度由比例与列宽共同决定:
|
|
1148
|
+
* `width:100%` + `aspect-ratio` 让高度自动算出来,不用固定行高。
|
|
1149
|
+
* 没有 aspect-ratio(历史图片)时退回 4:3,等补算比例后再自动校正。
|
|
1150
|
+
*/
|
|
1151
|
+
.ywiki-prose .ywiki-image-gallery > .ywiki-image-frame img.ywiki-image {
|
|
1152
|
+
width: 100%;
|
|
1153
|
+
height: auto;
|
|
1154
|
+
max-width: none;
|
|
1155
|
+
aspect-ratio: var(--ywiki-image-ratio, 1.3333);
|
|
1156
|
+
object-fit: contain;
|
|
1157
|
+
border-radius: var(--content-media-radius);
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* 图片**加载中**:渐变沿边框流动的指示(与阅读端同一口径)。
|
|
1161
|
+
*
|
|
1162
|
+
* 不再用"整块灰底 + 微光"——静态灰块在浅色页面上看不出在加载,更像"图丢了"。
|
|
1163
|
+
* 现在是一条沿圆角绕圈的渐变,像贪吃蛇一样顺着边框跑,图片区域本身保持透明。
|
|
1164
|
+
*
|
|
1165
|
+
* 实现同阅读端:conic-gradient + `mask-composite: exclude` 挖空中间,只留 2px
|
|
1166
|
+
* 边框;旋转靠 `@property` 注册的角度变量插值(定义在 content-style.css,
|
|
1167
|
+
* 该文件也被编辑器引入)。加载完成后 `data-image-loading` 移除,遮罩随之消失。
|
|
1168
|
+
*/
|
|
1169
|
+
.ywiki-prose .ywiki-image-frame img.ywiki-image[data-image-loading] {
|
|
1170
|
+
box-sizing: border-box;
|
|
1171
|
+
padding: 3px;
|
|
1172
|
+
border-radius: var(--content-media-radius);
|
|
1173
|
+
background-image: conic-gradient(
|
|
1174
|
+
from var(--ywiki-image-flow-angle),
|
|
1175
|
+
color-mix(in srgb, var(--color-accent) 14%, var(--color-surface-subtle)) 0turn 55%,
|
|
1176
|
+
color-mix(in srgb, var(--color-accent) 55%, transparent) 78%,
|
|
1177
|
+
var(--color-accent) 92%,
|
|
1178
|
+
color-mix(in srgb, var(--color-accent) 14%, var(--color-surface-subtle)) 100%
|
|
1179
|
+
);
|
|
1180
|
+
-webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
|
|
1181
|
+
-webkit-mask-clip: content-box, border-box;
|
|
1182
|
+
-webkit-mask-composite: xor;
|
|
1183
|
+
mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
|
|
1184
|
+
mask-clip: content-box, border-box;
|
|
1185
|
+
mask-composite: exclude;
|
|
1186
|
+
animation: ywiki-image-flow 1.4s linear infinite;
|
|
1187
|
+
/* 独立图片没有 aspect-ratio 撑高,需要最小高度才看得见框 */
|
|
1188
|
+
min-height: 120px;
|
|
1189
|
+
}
|
|
1190
|
+
/* 图片行内的高度由 aspect-ratio 与列宽决定,不叠加最小高度(否则整行被撑高) */
|
|
1191
|
+
.ywiki-prose .ywiki-image-gallery > .ywiki-image-frame img.ywiki-image[data-image-loading] {
|
|
1192
|
+
min-height: 0;
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* 加载失败:淡底 + 细实线边框,**不流动**。
|
|
1196
|
+
*
|
|
1197
|
+
* "在转 = 还在取 / 静止 = 取不到",靠动效区分,不需要图标或文字。
|
|
1198
|
+
* 不用虚线:缩略图尺寸下虚线会碎成一段段,看起来像边框画错了。
|
|
1199
|
+
*/
|
|
1200
|
+
.ywiki-prose .ywiki-image-frame img.ywiki-image[data-image-error] {
|
|
1201
|
+
box-sizing: border-box;
|
|
1202
|
+
min-height: 72px;
|
|
1203
|
+
background-color: color-mix(in srgb, var(--color-surface-subtle) 70%, var(--color-border));
|
|
1204
|
+
border-radius: var(--content-media-radius);
|
|
1205
|
+
outline: 1px solid color-mix(in srgb, var(--color-border-strong) 55%, transparent);
|
|
1206
|
+
outline-offset: -1px;
|
|
1207
|
+
}
|
|
1208
|
+
.ywiki-prose .ywiki-image-gallery > .ywiki-image-frame img.ywiki-image[data-image-error] {
|
|
1209
|
+
min-height: 0;
|
|
1210
|
+
}
|
|
1211
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1212
|
+
.ywiki-prose .ywiki-image-frame img.ywiki-image[data-image-loading] {
|
|
1213
|
+
animation: none;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
/* 显式缩放过(data-sized)的图默认靠左:缩放锚点在左缘,拖动位置稳定 */
|
|
1218
|
+
.ywiki-prose .ywiki-image-frame[data-sized] {
|
|
1219
|
+
justify-content: flex-start;
|
|
1220
|
+
}
|
|
1221
|
+
/* 显式对齐(图片工具条的左/中/右)优先于上面的默认规则 */
|
|
1222
|
+
.ywiki-prose .ywiki-image-frame[data-align='left'] { justify-content: flex-start; }
|
|
1223
|
+
.ywiki-prose .ywiki-image-frame[data-align='center'] { justify-content: center; }
|
|
1224
|
+
.ywiki-prose .ywiki-image-frame[data-align='right'] { justify-content: flex-end; }
|
|
1225
|
+
|
|
1226
|
+
/* inner 贴合图片:选中框/手柄相对它定位,才随图片尺寸变化 */
|
|
1227
|
+
.ywiki-prose .ywiki-image-inner {
|
|
1228
|
+
position: relative;
|
|
1229
|
+
display: inline-block;
|
|
1230
|
+
max-width: 100%;
|
|
1231
|
+
line-height: 0;
|
|
1232
|
+
}
|
|
1233
|
+
/* 缩放期间禁止选中文本:跟手拖动时若触发文字选区会打断手感 */
|
|
1234
|
+
.ywiki-prose .ywiki-image-frame.is-resizing {
|
|
1235
|
+
user-select: none;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* 选中态(对齐飞书截图):蓝框 + 四角圆点手柄,拖动等比缩放。
|
|
1240
|
+
* 手柄只在"用户点过这张图"时显示(见 `.img-pick-active` 门控说明),
|
|
1241
|
+
* 未选中时 display:none,既不拦截点击也不产生视觉噪声。
|
|
1242
|
+
*/
|
|
1243
|
+
/**
|
|
1244
|
+
* 四角手柄的尺寸与观感对齐飞书(实测飞书是 20×20 的命中区)。
|
|
1245
|
+
*
|
|
1246
|
+
* 早前是 10px 的小圆点:在 380px 宽的缩略图上几乎看不见,用户反馈
|
|
1247
|
+
* "选中了但看不清是不是选中了"(实测飞书明显更醒目)。这里放大到 14px
|
|
1248
|
+
* 的实心圆 + 2px 蓝描边 + 白色打底,并给整块加一圈白色外发光,
|
|
1249
|
+
* 保证在深色/蓝色图片上也能分辨。
|
|
1250
|
+
*/
|
|
1251
|
+
.ywiki-prose .ywiki-image-handle {
|
|
1252
|
+
display: none;
|
|
1253
|
+
position: absolute;
|
|
1254
|
+
width: 14px;
|
|
1255
|
+
height: 14px;
|
|
1256
|
+
box-sizing: border-box;
|
|
1257
|
+
border: 2px solid var(--color-accent);
|
|
1258
|
+
border-radius: 50%;
|
|
1259
|
+
background: #fff;
|
|
1260
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
|
|
1261
|
+
z-index: 3;
|
|
1262
|
+
}
|
|
1263
|
+
/*
|
|
1264
|
+
* 选中外观需**同时**满足:node view 处于选中态,且用户点过这张图
|
|
1265
|
+
* (`.img-pick-active`)。只看前者会被 PM 的默认选区骗到——文档以图片
|
|
1266
|
+
* 开头时一打开页面就是 NodeSelection,不门控就会出现"没点过却带蓝框"。
|
|
1267
|
+
*/
|
|
1268
|
+
.editor-shell.img-pick-active .ywiki-prose .ywiki-image-frame.is-selected .ywiki-image-inner {
|
|
1269
|
+
/**
|
|
1270
|
+
* 双层描边:内层蓝色实线 + 外层白色细线。
|
|
1271
|
+
*
|
|
1272
|
+
* 单用蓝色在蓝底图片上几乎看不出边界(用户反馈"看不清有没有选中");
|
|
1273
|
+
* 白色隔离带让边框在任何底图上都有对比,与飞书的观感一致。
|
|
1274
|
+
*
|
|
1275
|
+
* 圆角与表格/其它块的选中框统一为 6px(用户反馈"图片选中的圆角和表格
|
|
1276
|
+
* 选中的差不多,现在有点不一致"):早先这里是 4px,图片行的框是 3px,
|
|
1277
|
+
* 与表格的 6px 摆在一起时能明显看出差别。
|
|
1278
|
+
*/
|
|
1279
|
+
outline: 2px solid var(--color-accent);
|
|
1280
|
+
outline-offset: 3px;
|
|
1281
|
+
border-radius: 6px;
|
|
1282
|
+
box-shadow: 0 0 0 5px #fff, 0 0 0 6px color-mix(in srgb, var(--color-accent) 28%, transparent);
|
|
1283
|
+
}
|
|
1284
|
+
.editor-shell.img-pick-active .ywiki-prose .ywiki-image-frame.is-selected .ywiki-image-handle {
|
|
1285
|
+
display: block;
|
|
1286
|
+
}
|
|
1287
|
+
/*
|
|
1288
|
+
* 图片行内**显示**四角手柄(对齐飞书):拖角调整该图的相对权重,
|
|
1289
|
+
* 整行按新权重重算,因此仍然铺满、仍然等高。
|
|
1290
|
+
* 唯一的例外是「整行处于块选区」时——那时拖动语义是移动整行,
|
|
1291
|
+
* 由行内重排逻辑让位给整块拖拽(见 image-nodeview 的 mousedown 判定)。
|
|
1292
|
+
*/
|
|
1293
|
+
.editor-shell.img-pick-active .ywiki-prose .ywiki-image-frame.is-selected.is-in-gallery .ywiki-image-handle {
|
|
1294
|
+
display: block;
|
|
1295
|
+
}
|
|
1296
|
+
/* 图片行内仍画选中蓝框,但只包住被选中的那一张(inner 贴合图片) */
|
|
1297
|
+
.editor-shell.img-pick-active .ywiki-prose .ywiki-image-frame.is-selected.is-in-gallery .ywiki-image-inner {
|
|
1298
|
+
outline: 2px solid var(--color-accent);
|
|
1299
|
+
outline-offset: 3px;
|
|
1300
|
+
/* 与其它块/图片的选中框同一圆角 */
|
|
1301
|
+
border-radius: 6px;
|
|
1302
|
+
}
|
|
1303
|
+
/* 四个角:手柄中心骑在蓝框上(outline-offset 3px + 手柄半宽 7px = -10px) */
|
|
1304
|
+
.ywiki-prose .ywiki-image-handle.handle-nw { left: -10px; top: -10px; cursor: nwse-resize; }
|
|
1305
|
+
.ywiki-prose .ywiki-image-handle.handle-ne { right: -10px; top: -10px; cursor: nesw-resize; }
|
|
1306
|
+
.ywiki-prose .ywiki-image-handle.handle-sw { left: -10px; bottom: -10px; cursor: nesw-resize; }
|
|
1307
|
+
.ywiki-prose .ywiki-image-handle.handle-se { right: -10px; bottom: -10px; cursor: nwse-resize; }
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* 已选中的图片:放大镜光标(点击再次 = 打开大图预览)。
|
|
1311
|
+
* 拖拽缩放期间必须让位给缩放光标——否则指针拖离手柄、落在图片上时
|
|
1312
|
+
* 会突然变成放大镜(用户实测反馈)。
|
|
1313
|
+
*/
|
|
1314
|
+
.editor-shell.img-pick-active .ywiki-prose .ywiki-image-frame.is-selected:not(.is-resizing) img.ywiki-image {
|
|
1315
|
+
cursor: zoom-in;
|
|
1316
|
+
}
|
|
1317
|
+
.ywiki-prose img.ywiki-image[data-image-missing] {
|
|
1318
|
+
min-width: 120px;
|
|
1319
|
+
min-height: 40px;
|
|
1320
|
+
border: 1px dashed var(--color-border-strong);
|
|
1321
|
+
background: var(--color-surface-subtle);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* 块级选中:普通块铺蓝底,**自带视觉身份的块只加外圈**。
|
|
1326
|
+
*
|
|
1327
|
+
* ## 两种画法,按块是否有自己的「脸」来分
|
|
1328
|
+
*
|
|
1329
|
+
* 飞书的做法(用户提供了对照截图)是一套区分得很清楚的规则:
|
|
1330
|
+
*
|
|
1331
|
+
* - **普通块**(段落、标题、列表、引用、图片…)——本来没有底色,选中时铺一条
|
|
1332
|
+
* 半透明蓝带,一眼能看出"这一段被选中了";
|
|
1333
|
+
* - **自带视觉身份的块**(高亮块、表格、代码块)——它们本来就有底色或边框,
|
|
1334
|
+
* 再往里铺一层蓝会把内容染色、把表格单元格弄脏。这些块只在**外围加一圈
|
|
1335
|
+
* 描边**,表达"这块在选区里",内容配色完全不动。
|
|
1336
|
+
*
|
|
1337
|
+
* 早先我一度把两类统一成蓝底,结果表格单元格被整片染蓝、高亮块的黄绿底色
|
|
1338
|
+
* 也被改掉——用户明确纠正:"像这类(高亮、表格等等)都可以有个外圈,不用蓝色
|
|
1339
|
+
* 背景"。
|
|
1340
|
+
*
|
|
1341
|
+
* ## 宽度只到正文列,不能铺到整页
|
|
1342
|
+
*
|
|
1343
|
+
* 曾经把带子向两侧溢出到"页面横带"边缘,那是把**可起手区域**和**高亮宽度**
|
|
1344
|
+
* 混为一谈了:起手区可以宽(用户在页面空白处按下就能拖选),但高亮必须只覆盖
|
|
1345
|
+
* 正文,否则左侧目录、右侧大纲栏也被染蓝(用户原话:"我内容区域在红框区域,
|
|
1346
|
+
* 为啥选中后有个这么宽的蓝色背景?不合理啊!")。
|
|
1347
|
+
*
|
|
1348
|
+
* ## 为什么普通块用伪元素而不是直接改 `background`
|
|
1349
|
+
*
|
|
1350
|
+
* 直接改背景会与块自身可能存在的底色冲突;伪元素能叠一层半透明,原底色仍透出。
|
|
1351
|
+
* 不能用 `z-index: -1`:那会让底色跑到祖先背景之后(`.tiptap` 是
|
|
1352
|
+
* `position: relative`),一旦宿主给正文加了底色,高亮就整块消失。
|
|
1353
|
+
*/
|
|
1354
|
+
.ywiki-prose .is-block-selected {
|
|
1355
|
+
position: relative;
|
|
1356
|
+
border-radius: 6px;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* 普通块:铺半透明蓝带。
|
|
1361
|
+
*
|
|
1362
|
+
* 排除自带视觉身份的块(见下方外圈分支)——这是两类画法的唯一分界。
|
|
1363
|
+
* 用 `[data-block-chrome]` 声明式判断,而不是硬枚举类名:新增块时只在自己的
|
|
1364
|
+
* 渲染代码里加属性即可,不必回来改这里(思维导图就曾因为漏改而错误地变成蓝底)。
|
|
1365
|
+
*/
|
|
1366
|
+
.ywiki-prose .is-block-selected:not([data-block-chrome]):not(.doc-callout):not(.tableWrapper):not(.code-block-wrap):not(.ywiki-image-gallery)::before {
|
|
1367
|
+
content: '';
|
|
1368
|
+
position: absolute;
|
|
1369
|
+
/**
|
|
1370
|
+
* 四周比块本身**外扩**,让选中色不要紧贴文字(用户反馈"文字选中区域
|
|
1371
|
+
* 往外扩一下")。块盒子就是文字行盒,贴着它画会让文字看起来被框死。
|
|
1372
|
+
*
|
|
1373
|
+
* 纵向外扩量由 `measureBlocksPadding` 按**实测块间距**逐块写入:
|
|
1374
|
+
* - 相邻两个都选中:各溢出间隙的一半 → 两块拼成连续一条,且不重叠
|
|
1375
|
+
* (间隙实测 6.86px 到 21px 不等,写死一个值必然要么留白缝要么叠出深线);
|
|
1376
|
+
* - 开边一侧(首块上方 / 末块下方):用 `SELECT_PAD_Y` 给文字留呼吸空间。
|
|
1377
|
+
*
|
|
1378
|
+
* 横向用 `SELECT_PAD_X`:再宽就会溢出正文列(用户此前明确反对底色超出版心)。
|
|
1379
|
+
* 两侧同时外扩,因此带子比正文列宽 2×6px,仍落在阅读区留白内。
|
|
1380
|
+
*/
|
|
1381
|
+
top: calc(-1 * var(--block-select-pad-top, 5px));
|
|
1382
|
+
bottom: calc(-1 * var(--block-select-pad-bottom, 5px));
|
|
1383
|
+
left: calc(-1 * var(--block-select-pad-x, 6px));
|
|
1384
|
+
right: calc(-1 * var(--block-select-pad-x, 6px));
|
|
1385
|
+
background: color-mix(in srgb, var(--color-accent) 16%, transparent);
|
|
1386
|
+
/* 6px 圆角:外扩后的矩形边角更明显,需要圆角才不生硬 */
|
|
1387
|
+
border-radius: 6px;
|
|
1388
|
+
pointer-events: none;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* 自带视觉身份的块:**只加外圈,不铺蓝底**。
|
|
1393
|
+
*
|
|
1394
|
+
* ## 哪些块算"自带视觉身份"
|
|
1395
|
+
*
|
|
1396
|
+
* 判据是「它本身已经有可见的边框、底色或独立画布」。这类块再往里铺一层蓝,
|
|
1397
|
+
* 会把内容染色或把画布弄脏;只在外围加圈,既表达"在选区里",又不改内容观感:
|
|
1398
|
+
*
|
|
1399
|
+
* - 高亮块(浅色底 + 边框)
|
|
1400
|
+
* - 表格(网格线)
|
|
1401
|
+
* - 代码块(深色底)
|
|
1402
|
+
* - 思维导图(独立画布;用户实测:"为啥思维导图没有框而是蓝色")
|
|
1403
|
+
* - 文件卡片 / 视频嵌入(自带卡片外观)
|
|
1404
|
+
* - 分栏(多列结构,铺底色会把两栏之间的空隙也染上)
|
|
1405
|
+
*
|
|
1406
|
+
* 其余块(段落、标题、列表、引用、图片…)没有自己的外观,走蓝底分支。
|
|
1407
|
+
*
|
|
1408
|
+
* ## 为什么用 `[data-block-chrome]` 而不是继续堆类名选择器
|
|
1409
|
+
*
|
|
1410
|
+
* 之前是 `:is(.doc-callout, .tableWrapper, .code-block-wrap)` 硬枚举。每新增
|
|
1411
|
+
* 一种块都要改两处(`:not()` 与 `:is()`),漏一处就会退化成"这个块又变蓝了"——
|
|
1412
|
+
* 思维导图就是这么漏掉的。改为让节点自己在根元素上声明 `data-block-chrome`,
|
|
1413
|
+
* 新增块时只在自己的渲染代码里加一个属性,不必再来碰这里。
|
|
1414
|
+
*
|
|
1415
|
+
* `outline` 而不是 `border`:border 会参与盒模型,给一个已经撑满正文列宽度的
|
|
1416
|
+
* 表格加上 2px 边框会让它溢出或挤压内容;outline 不占布局,`outline-offset`
|
|
1417
|
+
* 还能让它落在块的外侧,正好是"外圈"的观感。
|
|
1418
|
+
*
|
|
1419
|
+
* 用 55% 而非更浅的透明度:高亮块是浅蓝底、代码块是深底、表格有网格线,
|
|
1420
|
+
* 太淡的圈在这些底色上都看不清边界。
|
|
1421
|
+
*/
|
|
1422
|
+
.ywiki-prose :is([data-block-chrome], .doc-callout, .tableWrapper, .code-block-wrap).is-block-selected {
|
|
1423
|
+
/**
|
|
1424
|
+
* 描边圆角跟着**块自己的圆角**走,而不是写死 6px。
|
|
1425
|
+
*
|
|
1426
|
+
* 各块自带外观的圆角并不统一(高亮块 9px、文件卡片 8px、思维导图 12px),
|
|
1427
|
+
* 写死一个值就会出现"框的角比块本身的角更方"的错位观感(用户实测反馈:
|
|
1428
|
+
* "思维导图的选中圆角最好和选中带边框的圆角一致")。用变量按块类型覆盖,
|
|
1429
|
+
* 默认 6px 与表格一致。
|
|
1430
|
+
*/
|
|
1431
|
+
--block-select-radius: 6px;
|
|
1432
|
+
/**
|
|
1433
|
+
* 实色而不是 55% 半透明:高亮块自带浅色底与彩色边框,半透明蓝圈叠在
|
|
1434
|
+
* 这些底色上几乎看不出来(用户反馈"高亮没有被选中、没有边框")。与图片
|
|
1435
|
+
* 选中的描边用同一个强度,所有块的"被选中"一眼可辨且观感一致。
|
|
1436
|
+
*/
|
|
1437
|
+
outline: 2px solid var(--color-accent);
|
|
1438
|
+
outline-offset: 2px;
|
|
1439
|
+
/* 与铺色分支同一圆角,两种选中画的观感才统一 */
|
|
1440
|
+
border-radius: var(--block-select-radius);
|
|
1441
|
+
}
|
|
1442
|
+
/* 各块按自身外观的圆角覆盖描边圆角(值取自它们各自的 border-radius) */
|
|
1443
|
+
.ywiki-prose .doc-callout.is-block-selected { --block-select-radius: 9px; }
|
|
1444
|
+
.ywiki-prose .doc-file-attachment.is-block-selected { --block-select-radius: 8px; }
|
|
1445
|
+
.ywiki-prose [data-mind-map-node].is-block-selected { --block-select-radius: 12px; }
|
|
1446
|
+
|
|
1447
|
+
/* 块级拖拽期间:屏蔽浏览器原生的字形级选中高亮。
|
|
1448
|
+
块级选择本质上是一个覆盖整块文字的文本选区(复制/删除需要它),
|
|
1449
|
+
但浏览器会为它画字形级蓝底,与"整块底色"叠在一起很乱。
|
|
1450
|
+
这里只影响绘制,不影响选区模型与复制行为。 */
|
|
1451
|
+
.ywiki-prose.is-block-selecting ::selection,
|
|
1452
|
+
.ywiki-prose.is-block-selecting *::selection {
|
|
1453
|
+
background: transparent;
|
|
1454
|
+
color: inherit;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* 拖拽选择框(飞书式的矩形,跟随鼠标)。
|
|
1459
|
+
*
|
|
1460
|
+
* ## 必须**填充**,不能只描边(用户对比飞书截图后指出)
|
|
1461
|
+
*
|
|
1462
|
+
* 此前这里刻意只画边框、不铺底色,理由是"填充会盖住高亮块/表格的颜色"。
|
|
1463
|
+
* 但飞书的拖拽框本身就是一块**半透明蓝色矩形**,用户一眼就能判断"我现在框住
|
|
1464
|
+
* 了哪些内容、范围有多大";只有边框时,框内的内容看起来和框外没区别,
|
|
1465
|
+
* 拖动过程中几乎无法判断落点,这正是用户反馈的差异。
|
|
1466
|
+
*
|
|
1467
|
+
* 用极低的透明度(12%)解决当初的顾虑:底色仍然透得出来,不会把高亮色
|
|
1468
|
+
* 染成另一种颜色;框的边界由 1px 实线 + 白描边交代清楚。
|
|
1469
|
+
*/
|
|
1470
|
+
.block-marquee {
|
|
1471
|
+
position: absolute;
|
|
1472
|
+
z-index: 33;
|
|
1473
|
+
pointer-events: none;
|
|
1474
|
+
/**
|
|
1475
|
+
* 宽高由插件按「按下点 → 当前指针」的拖拽矩形写入,边框必须算在尺寸内——
|
|
1476
|
+
* 否则 1px 边框会让框比鼠标实际划出的范围多出 2px(用户实测:左边贴合、
|
|
1477
|
+
* 右边多出一截)。
|
|
1478
|
+
*/
|
|
1479
|
+
box-sizing: border-box;
|
|
1480
|
+
background: color-mix(in srgb, var(--color-accent) 12%, transparent);
|
|
1481
|
+
border: 1px solid color-mix(in srgb, var(--color-accent) 65%, transparent);
|
|
1482
|
+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-surface) 60%, transparent);
|
|
1483
|
+
border-radius: 2px;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
/* ---------------------------------------------------------------- 表格交互样式 */
|
|
1487
|
+
/* 这几条此前完全缺失:resizable 生效但没有任何可视反馈,选中态也没有高亮,
|
|
1488
|
+
导致"能拖列宽但看不出在哪拖、选中了格子也不知道"。 */
|
|
1489
|
+
/**
|
|
1490
|
+
* 列宽拖拽手柄。
|
|
1491
|
+
*
|
|
1492
|
+
* prosemirror-tables 为**每一行**各插一个 4px 宽的 widget,默认样式是强调色 +
|
|
1493
|
+
* 60% 透明度:鼠标经过列边界时它会在表格上竖着亮起一条分段蓝线,既没有
|
|
1494
|
+
* 拖拽反馈,也不像任何已知控件(用户反馈"表格里这个蓝色是什么?没什么用吧")。
|
|
1495
|
+
*
|
|
1496
|
+
* 改为两级语义:
|
|
1497
|
+
* - 悬停边界:中性色细线,连续贯穿整列(`top/bottom: -1px` 补齐行间缝隙),
|
|
1498
|
+
* 配合 `col-resize` 光标表达"这里可以拖";
|
|
1499
|
+
* - 真正拖拽中(单元格带 `column-resize-dragging`):才使用强调色。
|
|
1500
|
+
*/
|
|
1501
|
+
.ywiki-prose .column-resize-handle {
|
|
1502
|
+
position: absolute;
|
|
1503
|
+
right: -2px;
|
|
1504
|
+
top: -4px;
|
|
1505
|
+
bottom: -4px;
|
|
1506
|
+
width: 3px;
|
|
1507
|
+
border-radius: 2px;
|
|
1508
|
+
background-color: var(--color-border-strong, #b9c3d2);
|
|
1509
|
+
pointer-events: none;
|
|
1510
|
+
}
|
|
1511
|
+
.ywiki-prose .column-resize-dragging .column-resize-handle {
|
|
1512
|
+
background-color: var(--color-accent, #2f6feb);
|
|
1513
|
+
box-shadow: 0 0 0 1px var(--color-surface, #fff);
|
|
1514
|
+
}
|
|
1515
|
+
.ywiki-prose.resize-cursor, .ywiki-prose .resize-cursor { cursor: col-resize; }
|
|
1516
|
+
/* 矩形选中的单元格 */
|
|
1517
|
+
.ywiki-prose .selectedCell:after {
|
|
1518
|
+
content: '';
|
|
1519
|
+
position: absolute;
|
|
1520
|
+
inset: 0;
|
|
1521
|
+
background: color-mix(in srgb, var(--color-accent) 8%, transparent);
|
|
1522
|
+
pointer-events: none;
|
|
1523
|
+
z-index: 2;
|
|
1524
|
+
}
|
|
1525
|
+
.ywiki-prose td,
|
|
1526
|
+
.ywiki-prose th {
|
|
1527
|
+
position: relative;
|
|
1528
|
+
}
|
|
1529
|
+
.img-preview-mask {
|
|
1530
|
+
position: fixed;
|
|
1531
|
+
inset: 0;
|
|
1532
|
+
z-index: 1300;
|
|
1533
|
+
display: flex;
|
|
1534
|
+
flex-direction: column;
|
|
1535
|
+
align-items: center;
|
|
1536
|
+
justify-content: center;
|
|
1537
|
+
background: color-mix(in srgb, #0b1220 84%, transparent);
|
|
1538
|
+
overflow: hidden;
|
|
1539
|
+
user-select: none;
|
|
1540
|
+
}
|
|
1541
|
+
.img-preview-stage {
|
|
1542
|
+
display: flex;
|
|
1543
|
+
align-items: center;
|
|
1544
|
+
justify-content: center;
|
|
1545
|
+
width: 100%;
|
|
1546
|
+
flex: 1;
|
|
1547
|
+
min-height: 0;
|
|
1548
|
+
padding: 32px;
|
|
1549
|
+
outline: none;
|
|
1550
|
+
}
|
|
1551
|
+
.img-preview-image {
|
|
1552
|
+
max-width: 100%;
|
|
1553
|
+
max-height: 100%;
|
|
1554
|
+
object-fit: contain;
|
|
1555
|
+
cursor: grab;
|
|
1556
|
+
transition: transform 0.12s ease-out;
|
|
1557
|
+
will-change: transform;
|
|
1558
|
+
}
|
|
1559
|
+
.img-preview-image.is-dragging { cursor: grabbing; transition: none; }
|
|
1560
|
+
.img-preview-toolbar {
|
|
1561
|
+
display: flex;
|
|
1562
|
+
align-items: center;
|
|
1563
|
+
gap: 4px;
|
|
1564
|
+
flex: none;
|
|
1565
|
+
margin-bottom: 24px;
|
|
1566
|
+
padding: 6px 8px;
|
|
1567
|
+
border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
|
|
1568
|
+
border-radius: 8px;
|
|
1569
|
+
background: color-mix(in srgb, #101828 72%, transparent);
|
|
1570
|
+
color: #f2f5fa;
|
|
1571
|
+
backdrop-filter: blur(8px);
|
|
1572
|
+
}
|
|
1573
|
+
.img-preview-toolbar button {
|
|
1574
|
+
min-width: 32px;
|
|
1575
|
+
height: 30px;
|
|
1576
|
+
padding: 0 8px;
|
|
1577
|
+
border: none;
|
|
1578
|
+
border-radius: 5px;
|
|
1579
|
+
background: transparent;
|
|
1580
|
+
color: inherit;
|
|
1581
|
+
font-family: inherit;
|
|
1582
|
+
font-size: 13px;
|
|
1583
|
+
cursor: pointer;
|
|
1584
|
+
}
|
|
1585
|
+
.img-preview-toolbar button:hover { background: color-mix(in srgb, #ffffff 16%, transparent); }
|
|
1586
|
+
.img-preview-toolbar button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
|
|
1587
|
+
.img-preview-scale { min-width: 48px; text-align: center; font-size: 12px; opacity: 0.85; }
|
|
1588
|
+
.img-preview-count {
|
|
1589
|
+
min-width: 52px;
|
|
1590
|
+
padding: 0 6px;
|
|
1591
|
+
text-align: center;
|
|
1592
|
+
font-size: 12px;
|
|
1593
|
+
font-variant-numeric: tabular-nums;
|
|
1594
|
+
opacity: 0.85;
|
|
1595
|
+
}
|
|
1596
|
+
.img-preview-divider { width: 1px; height: 16px; margin: 0 4px; background: color-mix(in srgb, #ffffff 26%, transparent); }
|
|
1597
|
+
|
|
1598
|
+
/* 翻页按钮:两侧垂直居中,避开工具条;深色半透明底保证在任何图片上都可见 */
|
|
1599
|
+
.img-preview-nav {
|
|
1600
|
+
position: absolute;
|
|
1601
|
+
inset: 0;
|
|
1602
|
+
pointer-events: none;
|
|
1603
|
+
display: flex;
|
|
1604
|
+
align-items: center;
|
|
1605
|
+
justify-content: space-between;
|
|
1606
|
+
padding: 0 18px;
|
|
1607
|
+
}
|
|
1608
|
+
.img-preview-nav-btn {
|
|
1609
|
+
pointer-events: auto;
|
|
1610
|
+
display: flex;
|
|
1611
|
+
align-items: center;
|
|
1612
|
+
justify-content: center;
|
|
1613
|
+
width: 44px;
|
|
1614
|
+
height: 44px;
|
|
1615
|
+
padding: 0;
|
|
1616
|
+
border: 1px solid color-mix(in srgb, #ffffff 20%, transparent);
|
|
1617
|
+
border-radius: 50%;
|
|
1618
|
+
background: color-mix(in srgb, #101828 66%, transparent);
|
|
1619
|
+
color: #f2f5fa;
|
|
1620
|
+
cursor: pointer;
|
|
1621
|
+
backdrop-filter: blur(8px);
|
|
1622
|
+
transition: background 0.12s, opacity 0.12s;
|
|
1623
|
+
}
|
|
1624
|
+
.img-preview-nav-btn:hover:not(:disabled) { background: color-mix(in srgb, #101828 84%, transparent); }
|
|
1625
|
+
.img-preview-nav-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
|
|
1626
|
+
/* 到头的一侧保留占位(避免另一侧按钮跳动),只降到很低的可见度 */
|
|
1627
|
+
.img-preview-nav-btn:disabled { opacity: 0.22; cursor: default; }
|
|
1628
|
+
|
|
1629
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1630
|
+
.img-preview-image { transition: none; }
|
|
1631
|
+
}
|
|
1632
|
+
.w-select { display: inline-flex; min-width: 0; }
|
|
1633
|
+
.w-select__trigger {
|
|
1634
|
+
display: inline-flex;
|
|
1635
|
+
align-items: center;
|
|
1636
|
+
justify-content: space-between;
|
|
1637
|
+
gap: 6px;
|
|
1638
|
+
width: 100%;
|
|
1639
|
+
min-width: 0;
|
|
1640
|
+
border: 1px solid var(--w-border-strong, var(--color-border-strong, #b9c3d2));
|
|
1641
|
+
border-radius: var(--w-radius-sm, 4px);
|
|
1642
|
+
background: var(--w-surface, var(--color-surface, #fff));
|
|
1643
|
+
color: var(--w-text, var(--color-text, #1f2937));
|
|
1644
|
+
font-family: var(--w-font-sans, inherit);
|
|
1645
|
+
cursor: pointer;
|
|
1646
|
+
transition: border-color var(--w-duration-fast, 0.12s);
|
|
1647
|
+
}
|
|
1648
|
+
.w-select--mini .w-select__trigger { height: var(--w-control-mini, 24px); padding: 0 6px; font-size: var(--w-font-size-mini, 12px); }
|
|
1649
|
+
.w-select--small .w-select__trigger { height: var(--w-control-small, 28px); padding: 0 8px; font-size: var(--w-font-size-small, 13px); }
|
|
1650
|
+
.w-select--medium .w-select__trigger { height: var(--w-control-medium, 32px); padding: 0 10px; font-size: var(--w-font-size-medium, 14px); }
|
|
1651
|
+
.w-select__trigger:hover { border-color: var(--w-accent, var(--color-accent, #2f6feb)); }
|
|
1652
|
+
.w-select__trigger:focus-visible { outline: 2px solid var(--w-accent, var(--color-accent, #2f6feb)); outline-offset: 1px; }
|
|
1653
|
+
.w-select__trigger:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
1654
|
+
.w-select__label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
1655
|
+
.w-select__label.is-placeholder { color: var(--w-text-faint, var(--color-text-faint, #7c8798)); }
|
|
1656
|
+
.w-select__caret { flex: none; opacity: 0.65; }
|
|
1657
|
+
|
|
1658
|
+
.w-select-panel { display: flex; flex-direction: column; min-width: 160px; max-width: min(320px, calc(100vw - 24px)); padding: 4px; }
|
|
1659
|
+
.w-select-panel .w-select-search {
|
|
1660
|
+
width: 100%;
|
|
1661
|
+
margin-bottom: 4px;
|
|
1662
|
+
padding: 5px 8px;
|
|
1663
|
+
border: 1px solid var(--w-border, var(--color-border, #dce2eb));
|
|
1664
|
+
border-radius: var(--w-radius-sm, 4px);
|
|
1665
|
+
background: var(--w-surface, var(--color-surface, #fff));
|
|
1666
|
+
color: var(--w-text, var(--color-text, #1f2937));
|
|
1667
|
+
font-size: var(--w-font-size-small, 13px);
|
|
1668
|
+
}
|
|
1669
|
+
.w-select-panel .w-select-search:focus { outline: 2px solid var(--w-accent, #2f6feb); outline-offset: -1px; }
|
|
1670
|
+
.w-select-list {
|
|
1671
|
+
display: flex;
|
|
1672
|
+
flex-direction: column;
|
|
1673
|
+
max-height: min(50vh, 320px);
|
|
1674
|
+
overflow-y: auto;
|
|
1675
|
+
overscroll-behavior: contain;
|
|
1676
|
+
scrollbar-width: thin;
|
|
1677
|
+
}
|
|
1678
|
+
.w-select-option {
|
|
1679
|
+
display: flex;
|
|
1680
|
+
align-items: center;
|
|
1681
|
+
box-sizing: border-box;
|
|
1682
|
+
min-height: 30px;
|
|
1683
|
+
padding: 6px 9px;
|
|
1684
|
+
border: none;
|
|
1685
|
+
border-radius: var(--w-radius-md, 6px);
|
|
1686
|
+
background: transparent;
|
|
1687
|
+
color: var(--w-text, var(--color-text, #1f2937));
|
|
1688
|
+
font-family: inherit;
|
|
1689
|
+
font-size: var(--w-font-size-small, 13px);
|
|
1690
|
+
text-align: left;
|
|
1691
|
+
cursor: pointer;
|
|
1692
|
+
}
|
|
1693
|
+
.w-select-option.is-active { background: var(--w-surface-subtle, var(--color-surface-subtle, #f5f7fa)); }
|
|
1694
|
+
.w-select-option.is-selected { color: var(--w-accent, var(--color-accent, #2f6feb)); background: var(--w-accent-soft, var(--color-accent-soft, #eaf1ff)); }
|
|
1695
|
+
.w-select-option:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
1696
|
+
.w-select-empty { padding: 8px 9px; color: var(--w-text-faint, #7c8798); font-size: var(--w-font-size-small, 13px); }
|
|
1697
|
+
.w-dropdown {
|
|
1698
|
+
min-width: 160px;
|
|
1699
|
+
max-width: min(320px, calc(100vw - 24px));
|
|
1700
|
+
max-height: min(70vh, 520px);
|
|
1701
|
+
overflow-y: auto;
|
|
1702
|
+
overscroll-behavior: contain;
|
|
1703
|
+
padding: 4px;
|
|
1704
|
+
scrollbar-width: thin;
|
|
1705
|
+
scrollbar-color: color-mix(in srgb, var(--w-text-faint, #7c8798) 40%, transparent) transparent;
|
|
1706
|
+
}
|
|
1707
|
+
.w-dropdown::-webkit-scrollbar { width: 8px; }
|
|
1708
|
+
.w-dropdown::-webkit-scrollbar-thumb {
|
|
1709
|
+
border: 2px solid transparent;
|
|
1710
|
+
border-radius: 999px;
|
|
1711
|
+
background-clip: content-box;
|
|
1712
|
+
background-color: color-mix(in srgb, var(--w-text-faint, #7c8798) 36%, transparent);
|
|
1713
|
+
}
|
|
1714
|
+
.w-dropdown-option {
|
|
1715
|
+
display: flex;
|
|
1716
|
+
align-items: center;
|
|
1717
|
+
gap: 6px;
|
|
1718
|
+
box-sizing: border-box;
|
|
1719
|
+
min-height: 30px;
|
|
1720
|
+
padding: 6px 9px;
|
|
1721
|
+
border-radius: var(--w-radius-md, 6px);
|
|
1722
|
+
color: var(--w-text, var(--color-text, #1f2937));
|
|
1723
|
+
font-size: var(--w-font-size-small, 13px);
|
|
1724
|
+
line-height: 1.5;
|
|
1725
|
+
cursor: pointer;
|
|
1726
|
+
user-select: none;
|
|
1727
|
+
}
|
|
1728
|
+
.w-dropdown-option:hover,
|
|
1729
|
+
.w-dropdown-option:focus-visible {
|
|
1730
|
+
background: var(--w-surface-subtle, var(--color-surface-subtle, #f5f7fa));
|
|
1731
|
+
outline: none;
|
|
1732
|
+
}
|
|
1733
|
+
.w-dropdown-option.is-selected {
|
|
1734
|
+
color: var(--w-accent, var(--color-accent, #2f6feb));
|
|
1735
|
+
background: var(--w-accent-soft, var(--color-accent-soft, #eaf1ff));
|
|
1736
|
+
}
|
|
1737
|
+
.w-dropdown-option.is-disabled {
|
|
1738
|
+
opacity: 0.45;
|
|
1739
|
+
cursor: not-allowed;
|
|
1740
|
+
background: transparent;
|
|
1741
|
+
}
|
|
1742
|
+
.w-dropdown-group__title {
|
|
1743
|
+
padding: 6px 9px 3px;
|
|
1744
|
+
color: var(--w-text-faint, var(--color-text-faint, #7c8798));
|
|
1745
|
+
font-size: 11px;
|
|
1746
|
+
line-height: 1.5;
|
|
1747
|
+
}
|
|
1748
|
+
.w-dropdown-group + .w-dropdown-group {
|
|
1749
|
+
margin-top: 2px;
|
|
1750
|
+
padding-top: 3px;
|
|
1751
|
+
border-top: 1px solid var(--w-border, var(--color-border, #dce2eb));
|
|
1752
|
+
}
|
|
1753
|
+
.w-tooltip {
|
|
1754
|
+
padding: 5px 9px;
|
|
1755
|
+
border: 1px solid var(--w-border, var(--color-border, #dce2eb));
|
|
1756
|
+
border-radius: var(--w-radius-sm, 4px);
|
|
1757
|
+
background: var(--w-surface, var(--color-surface, #fff));
|
|
1758
|
+
color: var(--w-text, var(--color-text, #1f2937));
|
|
1759
|
+
font-size: var(--w-font-size-mini, 12px);
|
|
1760
|
+
line-height: 1.55;
|
|
1761
|
+
white-space: nowrap;
|
|
1762
|
+
box-shadow: var(--w-shadow-pop, 0 10px 32px #14284a20);
|
|
1763
|
+
}
|
|
1764
|
+
.wd-dialog-mask {
|
|
1765
|
+
position: fixed;
|
|
1766
|
+
inset: 0;
|
|
1767
|
+
z-index: 1100;
|
|
1768
|
+
display: flex;
|
|
1769
|
+
align-items: flex-start;
|
|
1770
|
+
justify-content: center;
|
|
1771
|
+
padding: 10vh 16px 24px;
|
|
1772
|
+
background: color-mix(in srgb, #101828 42%, transparent);
|
|
1773
|
+
overflow-y: auto;
|
|
1774
|
+
overscroll-behavior: contain;
|
|
1775
|
+
}
|
|
1776
|
+
.wd-dialog-mask.is-fullscreen { padding: 0; overflow: hidden; }
|
|
1777
|
+
|
|
1778
|
+
.wd-dialog {
|
|
1779
|
+
position: relative;
|
|
1780
|
+
display: flex;
|
|
1781
|
+
flex-direction: column;
|
|
1782
|
+
max-width: calc(100vw - 32px);
|
|
1783
|
+
max-height: calc(100dvh - 14vh);
|
|
1784
|
+
border: 1px solid var(--w-border, var(--color-border, #dce2eb));
|
|
1785
|
+
border-radius: var(--w-radius-lg, 8px);
|
|
1786
|
+
background: var(--w-surface, var(--color-surface, #fff));
|
|
1787
|
+
color: var(--w-text, var(--color-text, #1f2937));
|
|
1788
|
+
box-shadow: 0 24px 64px #10182833;
|
|
1789
|
+
outline: none;
|
|
1790
|
+
}
|
|
1791
|
+
.wd-dialog.is-fullscreen {
|
|
1792
|
+
width: 100vw;
|
|
1793
|
+
max-width: none;
|
|
1794
|
+
height: 100dvh;
|
|
1795
|
+
max-height: none;
|
|
1796
|
+
border: 0;
|
|
1797
|
+
border-radius: 0;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
.wd-dialog__header {
|
|
1801
|
+
display: flex;
|
|
1802
|
+
align-items: center;
|
|
1803
|
+
gap: 12px;
|
|
1804
|
+
flex: none;
|
|
1805
|
+
padding: 14px 18px;
|
|
1806
|
+
border-bottom: 1px solid var(--w-border, var(--color-border, #dce2eb));
|
|
1807
|
+
}
|
|
1808
|
+
.wd-dialog__title {
|
|
1809
|
+
flex: 1;
|
|
1810
|
+
min-width: 0;
|
|
1811
|
+
font-size: 16px;
|
|
1812
|
+
font-weight: 600;
|
|
1813
|
+
line-height: 1.4;
|
|
1814
|
+
}
|
|
1815
|
+
.wd-dialog__close {
|
|
1816
|
+
display: flex;
|
|
1817
|
+
align-items: center;
|
|
1818
|
+
justify-content: center;
|
|
1819
|
+
flex: none;
|
|
1820
|
+
width: 28px;
|
|
1821
|
+
height: 28px;
|
|
1822
|
+
padding: 0;
|
|
1823
|
+
border: none;
|
|
1824
|
+
border-radius: var(--w-radius-sm, 4px);
|
|
1825
|
+
background: transparent;
|
|
1826
|
+
color: var(--w-text-muted, var(--color-text-muted, #667085));
|
|
1827
|
+
cursor: pointer;
|
|
1828
|
+
}
|
|
1829
|
+
.wd-dialog__close:hover { background: var(--w-surface-subtle, #f5f7fa); color: var(--w-text, #1f2937); }
|
|
1830
|
+
.wd-dialog__close:focus-visible { outline: 2px solid var(--w-accent, #2f6feb); outline-offset: -2px; }
|
|
1831
|
+
|
|
1832
|
+
.wd-dialog__body {
|
|
1833
|
+
flex: 1;
|
|
1834
|
+
min-height: 0;
|
|
1835
|
+
overflow-y: auto;
|
|
1836
|
+
padding: 4px 25px 24px;
|
|
1837
|
+
line-height: 1.7;
|
|
1838
|
+
}
|
|
1839
|
+
.wd-dialog.is-fullscreen .wd-dialog__body {
|
|
1840
|
+
display: flex;
|
|
1841
|
+
flex-direction: column;
|
|
1842
|
+
overflow: hidden;
|
|
1843
|
+
padding: 0;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
.wd-dialog__footer {
|
|
1847
|
+
display: flex;
|
|
1848
|
+
justify-content: flex-end;
|
|
1849
|
+
align-items: center;
|
|
1850
|
+
gap: 8px;
|
|
1851
|
+
flex: none;
|
|
1852
|
+
padding: 0 25px 20px;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
@media (max-width: 520px) {
|
|
1856
|
+
.wd-dialog__body { padding: 4px 18px 20px; }
|
|
1857
|
+
.wd-dialog__footer { padding: 0 18px 16px; }
|
|
1858
|
+
}
|
|
1859
|
+
.mind-inline { height:100%; min-height:380px; }
|
|
1860
|
+
.mind-inline .mind-map-workspace { height:100%; padding:0; }
|
|
1861
|
+
.mind-canvas-title { display: inline-flex; align-items: center; gap: 14px; max-width: calc(100vw - 110px); }
|
|
1862
|
+
.mind-canvas-title > span { font-size: 13px; font-weight: 400; color: var(--color-text-muted); max-width: 65vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1863
|
+
/**
|
|
1864
|
+
* 全屏弹层的工作区。
|
|
1865
|
+
*
|
|
1866
|
+
* ## 为什么是 `height:100%` 而不是 `calc(100dvh - 110px)`
|
|
1867
|
+
*
|
|
1868
|
+
* 弹层里 `.wd-dialog__body` 已经是"header 以下的全部高度"(flex 列、无内边距),
|
|
1869
|
+
* 再把 header 高度写死成 110px 去减就是重复扣减:实际 header 只有 57px,
|
|
1870
|
+
* 于是画布底部多出 53px 空白,看起来"没到底"(用户实测:"底部可以进一点")。
|
|
1871
|
+
* 交给父容器决定高度,画布就能填满。
|
|
1872
|
+
*
|
|
1873
|
+
* ## 为什么四周要留内边距
|
|
1874
|
+
*
|
|
1875
|
+
* 全屏时 body 的内边距是 0,工具栏会紧贴 header 的下边线、画布也贴着窗口
|
|
1876
|
+
* 左右边缘(用户实测:"边框距离太近")。这里按工具栏在上、画布在下的顺序
|
|
1877
|
+
* 给一圈呼吸空间;inline(正文内嵌)形态不需要,单独复位为 0。
|
|
1878
|
+
*/
|
|
1879
|
+
.mind-map-workspace { display: flex; flex-direction: column; height: 100%; min-height: 300px; box-sizing: border-box; padding: 16px 20px 20px; color: var(--color-text); }
|
|
1880
|
+
.mind-save-hint { margin-bottom: 10px; }
|
|
1881
|
+
.mind-canvas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 10px; flex-wrap: wrap; }
|
|
1882
|
+
.mind-canvas-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
|
|
1883
|
+
.mind-canvas-options { justify-content: flex-end; margin-left: auto; }
|
|
1884
|
+
.mind-canvas-status { font-size: 12px; color: var(--color-text-muted); max-width: 32vw; }
|
|
1885
|
+
.mind-canvas-body { display: flex; flex: 1; min-height: 0; border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; }
|
|
1886
|
+
.mind-canvas-stage { position: relative; flex: 1; min-width: 0; overflow: hidden; outline: none; background: radial-gradient(var(--color-border) 1px, transparent 1px) 0 0 / 22px 22px var(--color-surface); }
|
|
1887
|
+
.mind-canvas-stage.mind-grid-hidden { background-image:none; }
|
|
1888
|
+
.mind-canvas-surface { width:100%;height:100%; }
|
|
1889
|
+
.mind-canvas-stage .vue-flow__pane { cursor:default; }
|
|
1890
|
+
.mind-canvas-stage .vue-flow__selection,.mind-marquee { background:color-mix(in srgb,var(--mind-color) 8%,transparent);border:1px solid var(--mind-color);box-sizing:border-box;pointer-events:none; }
|
|
1891
|
+
.mind-marquee {position:absolute;z-index:4;}
|
|
1892
|
+
.mind-canvas-stage.mind-space-pan .vue-flow__pane,
|
|
1893
|
+
.mind-canvas-stage.mind-space-pan .vue-flow__node { cursor:grab; }
|
|
1894
|
+
.mind-canvas-stage .vue-flow__pane.dragging { cursor:grabbing; }
|
|
1895
|
+
.mind-selection-summary {position:absolute;left:16px;top:16px;display:flex;align-items:center;gap:10px;padding:6px 12px;border:1px solid var(--color-border);border-radius:9px;background:var(--color-surface);font-size:12px;}
|
|
1896
|
+
.mind-menu-key {margin-left:22px;float:right;color:var(--color-text-faint);font-size:11px;}
|
|
1897
|
+
.mind-canvas-outline { flex: 0 0 235px; overflow: auto; border-right: 1px solid var(--color-border); padding: 12px 4px; }
|
|
1898
|
+
.mind-canvas-outline button { display: block; border: 0; background: transparent; border-radius: 5px; width: 100%; text-align: left; padding: 7px 10px; color: var(--color-text-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
1899
|
+
.mind-canvas-outline button.current { color: var(--mind-color); background: var(--color-surface-subtle); }
|
|
1900
|
+
.mind-node-actions { position: absolute; left: 16px; top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; border: 1px solid var(--color-border); padding: 6px; background: var(--color-surface); border-radius: 10px; box-shadow: 0 4px 20px #00000008; }
|
|
1901
|
+
.mind-canvas-bottom { position: absolute; bottom: 16px; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: end; gap: 10px; pointer-events: none; }
|
|
1902
|
+
.mind-canvas-hint { font-size: 11px; color: var(--color-text-faint); padding: 6px 0; }
|
|
1903
|
+
.mind-canvas-viewport { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); pointer-events: auto; white-space: nowrap; }
|
|
1904
|
+
.mind-viewport-divider { height:20px;border-left:1px solid var(--color-border);margin:0 2px; }
|
|
1905
|
+
.mind-zoom-percent { min-width:52px;font-variant-numeric:tabular-nums; }
|
|
1906
|
+
.mind-viewport-tip { display:flex;align-items:center;flex-wrap:wrap;gap:7px;max-width:min(480px,calc(100vw - 40px));font-size:12px;line-height:1.6; }
|
|
1907
|
+
.mind-viewport-tip kbd { padding:2px 6px;border-radius:4px;background:#ffffff20;font:inherit;white-space:nowrap; }
|
|
1908
|
+
.mind-canvas-notice { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); padding: 8px 14px; margin: 0; border-radius: 7px; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 12px; pointer-events: none; max-width: 90%; }
|
|
1909
|
+
.mind-canvas-stage .mind-drop-child { outline: 3px solid var(--mind-color); border-radius: 10px; }
|
|
1910
|
+
.mind-canvas-stage .mind-drop-left { box-shadow:-6px 0 0 0 var(--mind-color);border-radius:9px; }
|
|
1911
|
+
.mind-canvas-stage .mind-drop-right { box-shadow:6px 0 0 0 var(--mind-color);border-radius:9px; }
|
|
1912
|
+
.mind-canvas-stage .mind-drag-branch { opacity:.35; }
|
|
1913
|
+
.mind-canvas-stage .mind-drag-branch-edge { opacity:.12; }
|
|
1914
|
+
.mind-side-preview {position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;}
|
|
1915
|
+
.mind-side-preview path {fill:none;stroke:var(--mind-color);stroke-width:2;stroke-dasharray:6 4;}
|
|
1916
|
+
.mind-side-preview rect {fill:var(--color-surface);stroke:var(--mind-color);stroke-width:2;stroke-dasharray:5 3;}
|
|
1917
|
+
.mind-side-preview text {fill:var(--color-text);font-size:14px;}
|
|
1918
|
+
.mind-canvas-stage .mind-drop-before::before, .mind-canvas-stage .mind-drop-after::after { content: ''; position: absolute; left: -10px; right: -10px; height: 3px; background: var(--mind-color); }
|
|
1919
|
+
.mind-canvas-stage .mind-drop-before::before { top: -7px; }
|
|
1920
|
+
.mind-canvas-stage .mind-drop-after::after { bottom: -7px; }
|
|
1921
|
+
.mind-canvas-stage .vue-flow__edge-path { stroke: var(--mind-color); }
|
|
1922
|
+
@media (max-width: 760px) { .mind-canvas-outline { flex-basis: 170px; } .mind-canvas-hint { display: none; } .mind-canvas-toolbar { gap: 8px; } .mind-canvas-options { justify-content: flex-start; margin-left: 0; } .mind-node-actions { left: 8px; right: 8px; top: 8px; } .mind-canvas-status { max-width: 60vw; } }
|
|
1923
|
+
.mind-inline { height:100%; min-height:380px; }
|
|
1924
|
+
.mind-inline .mind-map-workspace { height:100%; }
|
|
1925
|
+
.mind-search { display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:6px 0 10px;font-size:12px; }
|
|
1926
|
+
.mind-search input {width:180px;font-size:12px;}
|
|
1927
|
+
.mind-outline-row {display:flex;align-items:center;margin:3px 0;}.mind-outline-row input {min-width:0;width:100%;border:0;background:transparent;font:12px/22px inherit;color:var(--color-text);padding:5px;}.mind-outline-row.current {background:var(--color-surface-subtle);}.mind-outline-row>button:last-child {width:24px;flex-shrink:0;padding:2px;}
|
|
1928
|
+
.mind-canvas-outline .mind-outline-row textarea{min-width:0;width:100%;border:0;background:transparent;font-size:12px;line-height:22px;color:var(--color-text);padding:5px;resize:none;border-radius:4px;}
|
|
1929
|
+
.mind-inline { height:100%; min-height:380px; }
|
|
1930
|
+
.mind-inline .mind-map-workspace { height:100%; }.mind-settings-menu{width:310px;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px;font-size:12px;}.mind-settings-menu label{width:100%;display:flex;gap:8px;align-items:center;}.mind-settings-menu input{width:auto;}
|
|
1931
|
+
.mind-canvas-fullscreen {
|
|
1932
|
+
position: fixed !important;
|
|
1933
|
+
top: 0 !important;
|
|
1934
|
+
left: 0 !important;
|
|
1935
|
+
width: 100vw !important;
|
|
1936
|
+
height: 100dvh !important;
|
|
1937
|
+
max-width: none !important;
|
|
1938
|
+
}
|
|
1939
|
+
.mind-topic-shell { position: relative; width: 100%; height: 100%; }
|
|
1940
|
+
.mind-topic { position: relative; border-radius: 9px; background: var(--color-surface); color: var(--color-text); border: 1px solid color-mix(in srgb, var(--mind-color) 38%, var(--color-border)); padding: 10px 16px; font-family: inherit; font-size: 14px; line-height: 22px; display: grid; place-items: center; box-sizing: border-box; }
|
|
1941
|
+
.mind-topic.root { background: var(--mind-color); border-color: var(--mind-color); color: white; font-weight: 600; }
|
|
1942
|
+
.mind-topic.active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mind-color) 22%, transparent); }
|
|
1943
|
+
.mind-topic-label { width:100%;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all;text-align:center;line-height:var(--mind-topic-line-height,22px); }
|
|
1944
|
+
.mind-topic-input { box-sizing:border-box;display:block;border:0;border-radius:4px;outline:0;padding:0;margin:0;width:100%;min-width:0;min-height:var(--mind-topic-line-height,22px);max-width:none;resize:none;overflow:hidden;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;background:transparent;color:inherit;font:inherit;line-height:var(--mind-topic-line-height,22px);text-align:inherit; }
|
|
1945
|
+
.mind-topic-input:focus { box-shadow: none; outline: 0; }
|
|
1946
|
+
.mind-topic-fold {
|
|
1947
|
+
position:absolute;left:calc(100% + 20px);top:calc(50% - 12px);width:24px;min-width:24px;height:24px;padding:0;
|
|
1948
|
+
display:grid;place-items:center;z-index:2;border-radius:50%;border:1px solid var(--mind-color);color:var(--mind-color);background:var(--color-surface);
|
|
1949
|
+
font:11px/1 sans-serif;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s ease;
|
|
1950
|
+
}
|
|
1951
|
+
.mind-topic-shell:hover>.mind-topic-fold,.mind-topic-shell.is-selected>.mind-topic-fold,
|
|
1952
|
+
.mind-topic-shell:focus-within>.mind-topic-fold,.mind-topic-shell.is-collapsed>.mind-topic-fold {
|
|
1953
|
+
opacity:1;pointer-events:auto;
|
|
1954
|
+
}
|
|
1955
|
+
.mind-topic-fold:hover {background:color-mix(in srgb,var(--mind-color) 10%,var(--color-surface));}
|
|
1956
|
+
.mind-topic-fold:focus-visible {outline:2px solid var(--mind-color);outline-offset:3px;}
|
|
1957
|
+
.mind-fold-count {font-variant-numeric:tabular-nums;font-weight:600;}
|
|
1958
|
+
/* Keep the node and its connector in one hover region while moving toward the button. */
|
|
1959
|
+
.mind-topic-shell.has-children:not(.root)::before {content:'';position:absolute;left:100%;top:0;width:64px;height:100%;}
|
|
1960
|
+
.mind-topic-handle { opacity: 0; pointer-events: none; }
|
|
1961
|
+
.mind-topic-shell.grows-left .mind-topic-add { left: auto; right: calc(100% - 12px); }
|
|
1962
|
+
.mind-topic-shell .mind-topic-add.root-left {left:auto;right:calc(100% - 12px);}
|
|
1963
|
+
.mind-topic-shell .mind-topic-add.root-right {right:auto;left:calc(100% - 12px);}
|
|
1964
|
+
.mind-topic-shell.grows-left .mind-topic-fold {left:auto;right:calc(100% + 20px);}
|
|
1965
|
+
.mind-topic-shell.grows-left .mind-fold-chevron {transform:rotate(180deg);}
|
|
1966
|
+
.mind-topic-shell.grows-left.has-children:not(.root)::before {left:auto;right:100%;}
|
|
1967
|
+
.mind-topic-shell.grows-down .mind-topic-add { left: calc(50% - 12px); top: calc(100% - 12px); }
|
|
1968
|
+
.mind-topic-shell.grows-down .mind-topic-fold {right:auto;left:calc(50% - 12px);top:calc(100% + 18px);}
|
|
1969
|
+
.mind-topic-shell.grows-down .mind-fold-chevron {transform:rotate(90deg);}
|
|
1970
|
+
.mind-topic-shell.grows-down.has-children:not(.root)::before {left:0;right:auto;top:100%;width:100%;height:60px;}
|
|
1971
|
+
@media(hover:none){.mind-topic-fold{opacity:1;pointer-events:auto;}}
|
|
1972
|
+
.mind-topic-sibling {
|
|
1973
|
+
position: absolute; width: 24px; min-width: 24px; height: 24px; padding: 0;
|
|
1974
|
+
left: calc(50% - 12px); display: grid; place-items: center;
|
|
1975
|
+
border: 0; border-radius: 50%; background: transparent; color: white;
|
|
1976
|
+
cursor: pointer; z-index: 1;
|
|
1977
|
+
}
|
|
1978
|
+
.mind-topic-sibling.before { top: -22px; }
|
|
1979
|
+
.mind-topic-sibling.after { bottom: -22px; }
|
|
1980
|
+
.mind-topic-sibling > span {
|
|
1981
|
+
display: grid; place-items: center; width: 9px; height: 9px; border-radius: 50%;
|
|
1982
|
+
background: color-mix(in srgb, var(--mind-color) 36%, var(--color-surface)); font: 0/1 sans-serif;
|
|
1983
|
+
}
|
|
1984
|
+
.mind-topic-sibling:hover, .mind-topic-sibling:focus-visible { background: transparent; }
|
|
1985
|
+
.mind-topic-sibling:hover > span, .mind-topic-sibling:focus-visible > span {
|
|
1986
|
+
width: 20px; height: 20px; background: var(--mind-color); font-size: 16px;
|
|
1987
|
+
}
|
|
1988
|
+
.mind-topic-sibling:focus-visible { outline: 2px solid var(--mind-color); outline-offset: 1px; }
|
|
1989
|
+
.mind-topic-shell.grows-down .mind-topic-sibling { top: calc(50% - 12px); bottom: auto; }
|
|
1990
|
+
.mind-topic-shell.grows-down .mind-topic-sibling.before { left: -22px; }
|
|
1991
|
+
.mind-topic-shell.grows-down .mind-topic-sibling.after { left: auto; right: -22px; }
|
|
1992
|
+
.mind-topic-description { font-size:12px;line-height:18px;white-space:pre-wrap;color:var(--color-text-muted);width:100%;min-width:0;word-break:break-all;overflow-wrap:anywhere;margin-top:6px; }
|
|
1993
|
+
.root .mind-topic-description { color:#e7f4ff; }.mind-topic-image { width:100%;height:96px;overflow:hidden;margin-top:8px; }
|
|
1994
|
+
.mind-topic-image img {width:100%!important;height:96px!important;object-fit:contain;max-height:96px!important;margin:0!important;}
|
|
1995
|
+
.mind-topic-note { font-size:10px;line-height:14px;margin-top:6px;opacity:.7;cursor:pointer; }
|
|
1996
|
+
/**
|
|
1997
|
+
* 「添加子主题」按钮:骑在节点右缘(或左缘)上的圆形按钮。
|
|
1998
|
+
*
|
|
1999
|
+
* ## 为什么必须显式给全样式(用户实测:"按钮+太怪异了")
|
|
2000
|
+
*
|
|
2001
|
+
* 这里原来只写了尺寸与圆角,**没有背景、边框、字色**。`<button>` 的默认样式
|
|
2002
|
+
* 因此生效:浅灰方块底 + 深灰描边 + 系统字体,压在蓝色根节点上像一块补丁,
|
|
2003
|
+
* 与画布其余部分(圆角卡片、细线连接)完全不是一个语言。
|
|
2004
|
+
*
|
|
2005
|
+
* 现在按参考样式统一为:圆形、白底、细描边、居中「+」,悬停时染色并略微放大。
|
|
2006
|
+
* 用 `display:grid` 而不是 `line-height` 居中——后者在 24px 圆里对不齐。
|
|
2007
|
+
*/
|
|
2008
|
+
.mind-topic-add {
|
|
2009
|
+
position: absolute;
|
|
2010
|
+
left: calc(100% - 12px);
|
|
2011
|
+
top: calc(50% - 12px);
|
|
2012
|
+
width: 24px;
|
|
2013
|
+
height: 24px;
|
|
2014
|
+
padding: 0;
|
|
2015
|
+
box-sizing: border-box;
|
|
2016
|
+
display: grid;
|
|
2017
|
+
place-items: center;
|
|
2018
|
+
border-radius: 50%;
|
|
2019
|
+
border: 1px solid color-mix(in srgb, var(--mind-color) 45%, var(--color-border));
|
|
2020
|
+
background: var(--color-surface);
|
|
2021
|
+
color: color-mix(in srgb, var(--mind-color) 82%, var(--color-text));
|
|
2022
|
+
font: 15px/1 system-ui, sans-serif;
|
|
2023
|
+
font-weight: 500;
|
|
2024
|
+
cursor: pointer;
|
|
2025
|
+
z-index: 3;
|
|
2026
|
+
box-shadow: 0 1px 3px rgb(15 23 42 / 12%);
|
|
2027
|
+
transition: background .12s ease, border-color .12s ease, transform .12s ease, box-shadow .12s ease;
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* 悬停/聚焦:底色换成主题色的淡染,边界加深,轻微放大。
|
|
2031
|
+
*
|
|
2032
|
+
* 只改颜色而不改尺寸(除 transform)是关键:按钮骑在节点边缘,改 width/height
|
|
2033
|
+
* 会让它相对节点跳动;`transform: scale` 不参与布局,视觉放大而位置不动。
|
|
2034
|
+
*/
|
|
2035
|
+
.mind-topic-add:hover,
|
|
2036
|
+
.mind-topic-add:focus-visible {
|
|
2037
|
+
background: color-mix(in srgb, var(--mind-color) 14%, var(--color-surface));
|
|
2038
|
+
border-color: var(--mind-color);
|
|
2039
|
+
color: var(--mind-color);
|
|
2040
|
+
transform: scale(1.12);
|
|
2041
|
+
box-shadow: 0 2px 6px rgb(15 23 42 / 18%);
|
|
2042
|
+
}
|
|
2043
|
+
.mind-topic-add:focus-visible { outline: 2px solid var(--mind-color); outline-offset: 2px; }
|
|
2044
|
+
.mind-topic-add:active { transform: scale(0.98); }
|
|
2045
|
+
/* 深色节点(根主题)上按钮是白底压在深蓝上:描边改用白色系,避免与底色混在一起 */
|
|
2046
|
+
.mind-topic-add.root-left,
|
|
2047
|
+
.mind-topic-add.root-right {
|
|
2048
|
+
border-color: color-mix(in srgb, var(--color-surface) 70%, transparent);
|
|
2049
|
+
}
|
|
2050
|
+
.mind-topic-icon { font-size:16px;line-height:20px; }.mind-topic[style*="border: 0"] { background:transparent; }
|
|
2051
|
+
.mind-preview-wrap {display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:240px;}
|
|
2052
|
+
.mind-preview-sized {position:relative;flex-shrink:0;}.mind-preview-scene {position:relative;transform-origin:top left;}.mind-preview-lines {position:absolute;inset:0;}
|
|
2053
|
+
.mind-preview-topic {position:absolute;box-sizing:border-box;border:1px solid color-mix(in srgb,var(--mind-color) 35%,var(--color-border));border-radius:9px;background:var(--color-surface-subtle);color:var(--color-text);padding:10px 16px;display:flex;flex-direction:column;justify-content:center;line-height:22px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all;}
|
|
2054
|
+
.mind-preview-title{display:block;width:100%;min-width:0;}.mind-preview-icon{font-size:16px;line-height:20px;}
|
|
2055
|
+
.mind-preview-topic.root {background:var(--mind-color);color:white;font-weight:600;}.mind-preview-topic.text {border:0;background:transparent;}
|
|
2056
|
+
.mind-preview-description {font-size:12px;font-weight:400;line-height:18px;margin-top:6px;opacity:.72;}.mind-preview-note{font-size:10px;line-height:14px;margin-top:6px;opacity:.65;}
|
|
2057
|
+
.mind-preview-image{width:100%;height:96px;margin-top:8px;overflow:hidden;}.mind-preview-image img{width:100%!important;height:96px!important;object-fit:contain;margin:0!important;}
|
|
2058
|
+
.mind-map-block { margin: 20px 0; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); overflow: hidden; }
|
|
2059
|
+
.mind-map-block-header { min-height: 45px; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 12px; }
|
|
2060
|
+
.mind-map-block-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--color-text-muted); }
|
|
2061
|
+
.mind-map-block-label > span:first-child { color: var(--mind-color); font-size: 18px; }
|
|
2062
|
+
.mind-map-topic-count { font-size: 11px; color: var(--color-text-faint); }
|
|
2063
|
+
.mind-map-block-actions { display: flex; flex-shrink: 0; gap: 4px; }
|
|
2064
|
+
.mind-map-preview { width: 100%; display: block; min-height: 240px; cursor: zoom-in; }
|
|
2065
|
+
.mind-map-preview rect { fill: var(--color-surface-subtle); stroke: var(--mind-color); stroke-opacity: .3; }
|
|
2066
|
+
.mind-map-preview text { fill: var(--color-text); font-family: inherit; }
|
|
2067
|
+
.mind-map-preview .mind-map-root rect { fill: var(--mind-color); stroke: none; }
|
|
2068
|
+
.mind-map-preview .mind-map-root text { fill: white; }
|
|
2069
|
+
.mind-map-preview-outline { overflow: auto; padding: 16px 24px 24px; font-size: 14px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
2070
|
+
.mind-map-invalid { padding: 20px; color: var(--color-text-muted); }
|
|
2071
|
+
@media (max-width: 600px) { .mind-map-topic-count { display: none; } }
|
|
2072
|
+
.mind-details { flex: 0 0 280px; padding: 14px; border-left: 1px solid var(--color-border); overflow: auto; background: var(--color-surface); font-size: 12px; }
|
|
2073
|
+
.mind-details > header { display: flex; justify-content: space-between; align-items: center; }.mind-details-title { color: var(--color-text-muted); overflow-wrap:anywhere; }
|
|
2074
|
+
.mind-details fieldset { border: 0; border-top: 1px solid var(--color-border); padding: 12px 0; margin: 8px 0; display: flex; flex-direction:column; gap:8px; }
|
|
2075
|
+
.mind-details legend { font-weight:600; padding:0 8px 0 0; } .mind-details label { display:grid; grid-template-columns:70px minmax(0,1fr);align-items:center;gap:8px; }
|
|
2076
|
+
.mind-details input,.mind-details textarea { width:100%;font:inherit;box-sizing:border-box; } .mind-details textarea { resize:vertical; }.mind-format-buttons { display:flex;gap:6px; }
|
|
2077
|
+
.mind-relation-item { display:flex;align-items:center;gap:8px; }.mind-relation-item span { flex:1;overflow-wrap:anywhere; }
|
|
2078
|
+
.mind-color-grid {display:grid;grid-template-columns:repeat(8,24px);gap:4px;}.mind-color-grid>*{width:24px;min-width:24px;height:24px;padding:0;}
|
|
2079
|
+
.mind-comments {
|
|
2080
|
+
flex: 0 0 340px;
|
|
2081
|
+
display: flex;
|
|
2082
|
+
flex-direction: column;
|
|
2083
|
+
gap: 12px;
|
|
2084
|
+
min-height: 0;
|
|
2085
|
+
padding: 16px;
|
|
2086
|
+
overflow: auto;
|
|
2087
|
+
border-left: 1px solid var(--color-border);
|
|
2088
|
+
background: var(--color-surface, #fff);
|
|
2089
|
+
font-size: 13px;
|
|
2090
|
+
}
|
|
2091
|
+
.mind-comments__head {
|
|
2092
|
+
display: flex;
|
|
2093
|
+
align-items: flex-start;
|
|
2094
|
+
justify-content: space-between;
|
|
2095
|
+
gap: 8px;
|
|
2096
|
+
}
|
|
2097
|
+
.mind-comments__intro strong { font-size: 14px; }
|
|
2098
|
+
.mind-comments__intro p {
|
|
2099
|
+
margin: 4px 0 0;
|
|
2100
|
+
color: var(--color-text-muted);
|
|
2101
|
+
font-size: 12px;
|
|
2102
|
+
line-height: 1.6;
|
|
2103
|
+
}
|
|
2104
|
+
.mind-comments__head-actions { display: flex; flex: none; gap: 4px; }
|
|
2105
|
+
.mind-comments__error {
|
|
2106
|
+
margin: 0;
|
|
2107
|
+
padding: 8px 10px;
|
|
2108
|
+
border-radius: 6px;
|
|
2109
|
+
background: #fdecec;
|
|
2110
|
+
color: #b42b36;
|
|
2111
|
+
font-size: 12px;
|
|
2112
|
+
}
|
|
2113
|
+
.mind-comments__list { display: grid; gap: 10px; }
|
|
2114
|
+
.mind-comment {
|
|
2115
|
+
display: grid;
|
|
2116
|
+
gap: 8px;
|
|
2117
|
+
padding: 10px 12px;
|
|
2118
|
+
border: 1px solid var(--color-border);
|
|
2119
|
+
border-radius: 8px;
|
|
2120
|
+
}
|
|
2121
|
+
.mind-comment__head {
|
|
2122
|
+
display: flex;
|
|
2123
|
+
align-items: baseline;
|
|
2124
|
+
justify-content: space-between;
|
|
2125
|
+
gap: 8px;
|
|
2126
|
+
}
|
|
2127
|
+
.mind-comment__head span { color: var(--color-text-muted); font-size: 11px; }
|
|
2128
|
+
.mind-comment__body {
|
|
2129
|
+
margin: 0;
|
|
2130
|
+
white-space: pre-wrap;
|
|
2131
|
+
overflow-wrap: anywhere;
|
|
2132
|
+
line-height: 1.7;
|
|
2133
|
+
}
|
|
2134
|
+
.mind-comment__actions { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
2135
|
+
.mind-comment__reply {
|
|
2136
|
+
display: grid;
|
|
2137
|
+
gap: 6px;
|
|
2138
|
+
margin-left: 12px;
|
|
2139
|
+
padding-left: 10px;
|
|
2140
|
+
border-left: 2px solid var(--color-border);
|
|
2141
|
+
}
|
|
2142
|
+
.mind-comment__label {
|
|
2143
|
+
color: var(--color-text-muted);
|
|
2144
|
+
font-size: 11px;
|
|
2145
|
+
font-weight: 600;
|
|
2146
|
+
}
|
|
2147
|
+
.mind-comment__compose { display: grid; gap: 6px; }
|
|
2148
|
+
.mind-comments__compose {
|
|
2149
|
+
display: grid;
|
|
2150
|
+
gap: 6px;
|
|
2151
|
+
padding-top: 12px;
|
|
2152
|
+
border-top: 1px solid var(--color-border);
|
|
2153
|
+
}
|
|
2154
|
+
.mind-comments__empty {
|
|
2155
|
+
margin: 0;
|
|
2156
|
+
color: var(--color-text-muted);
|
|
2157
|
+
font-size: 12px;
|
|
2158
|
+
line-height: 1.7;
|
|
2159
|
+
}
|
|
2160
|
+
.mind-comments textarea {
|
|
2161
|
+
width: 100%;
|
|
2162
|
+
padding: 8px 10px;
|
|
2163
|
+
border: 1px solid var(--color-border);
|
|
2164
|
+
border-radius: 6px;
|
|
2165
|
+
background: var(--color-surface, #fff);
|
|
2166
|
+
color: inherit;
|
|
2167
|
+
font: inherit;
|
|
2168
|
+
line-height: 1.6;
|
|
2169
|
+
box-sizing: border-box;
|
|
2170
|
+
resize: vertical;
|
|
2171
|
+
}
|
|
2172
|
+
.picker-backdrop {
|
|
2173
|
+
position: fixed;
|
|
2174
|
+
inset: 0;
|
|
2175
|
+
z-index: 1100;
|
|
2176
|
+
background: color-mix(in srgb, #000 45%, transparent);
|
|
2177
|
+
display: flex;
|
|
2178
|
+
align-items: flex-start;
|
|
2179
|
+
justify-content: center;
|
|
2180
|
+
padding-top: 12vh;
|
|
2181
|
+
}
|
|
2182
|
+
.picker-backdrop .picker {
|
|
2183
|
+
width: 420px;
|
|
2184
|
+
max-width: calc(100vw - 32px);
|
|
2185
|
+
background: var(--color-surface);
|
|
2186
|
+
border: 1px solid var(--color-border);
|
|
2187
|
+
border-radius: 10px;
|
|
2188
|
+
box-shadow: var(--shadow-pop);
|
|
2189
|
+
padding: 8px;
|
|
2190
|
+
}
|
|
2191
|
+
.picker-backdrop .picker .picker-input {
|
|
2192
|
+
width: 100%;
|
|
2193
|
+
box-sizing: border-box;
|
|
2194
|
+
border: 1px solid var(--color-border);
|
|
2195
|
+
border-radius: 6px;
|
|
2196
|
+
padding: 8px 10px;
|
|
2197
|
+
font-size: 14px;
|
|
2198
|
+
background: var(--color-surface-subtle);
|
|
2199
|
+
color: var(--color-text);
|
|
2200
|
+
}
|
|
2201
|
+
.picker-backdrop .picker-input:focus { outline: none; border-color: var(--color-accent); }
|
|
2202
|
+
.picker-backdrop .picker-list {
|
|
2203
|
+
list-style: none;
|
|
2204
|
+
margin: 6px 0 0;
|
|
2205
|
+
padding: 0;
|
|
2206
|
+
max-height: 320px;
|
|
2207
|
+
overflow-y: auto;
|
|
2208
|
+
}
|
|
2209
|
+
.picker-backdrop .picker-list li {
|
|
2210
|
+
padding: 7px 10px;
|
|
2211
|
+
border-radius: 6px;
|
|
2212
|
+
cursor: pointer;
|
|
2213
|
+
font-size: 14px;
|
|
2214
|
+
color: var(--color-text);
|
|
2215
|
+
}
|
|
2216
|
+
.picker-backdrop .picker-list li.active { background: var(--color-accent-soft); color: var(--color-accent); }
|
|
2217
|
+
.picker-backdrop .picker-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2218
|
+
.picker-backdrop .picker-empty { color: var(--color-text-faint); font-size: 13px; text-align: center; padding: 14px 0; margin: 0; }
|
|
2219
|
+
/*
|
|
2220
|
+
* 垂直节奏:字段内部 8px,字段之间 16px,最后一段之外留出 dialog body 的
|
|
2221
|
+
* 底部内边距。之前的提示文字紧贴输入框、又贴着按钮行,看起来像被截断。
|
|
2222
|
+
*/
|
|
2223
|
+
.video-form { display: flex; flex-direction: column; gap: 16px; }
|
|
2224
|
+
.video-field { display: flex; flex-direction: column; gap: 8px; }
|
|
2225
|
+
.video-field label { font-size: 13px; font-weight: 600; color: var(--color-text); }
|
|
2226
|
+
.video-field input { width: 100%; }
|
|
2227
|
+
.video-hint {
|
|
2228
|
+
margin: 0;
|
|
2229
|
+
font-size: 12px;
|
|
2230
|
+
line-height: 1.7;
|
|
2231
|
+
color: var(--color-text-muted);
|
|
2232
|
+
}
|
|
2233
|
+
.video-status {
|
|
2234
|
+
margin: 0;
|
|
2235
|
+
padding: 8px 10px;
|
|
2236
|
+
border-radius: 6px;
|
|
2237
|
+
font-size: 12px;
|
|
2238
|
+
line-height: 1.7;
|
|
2239
|
+
}
|
|
2240
|
+
.video-status--ok {
|
|
2241
|
+
color: var(--color-text);
|
|
2242
|
+
background: var(--color-accent-soft);
|
|
2243
|
+
}
|
|
2244
|
+
.video-status--error {
|
|
2245
|
+
color: var(--color-danger);
|
|
2246
|
+
background: color-mix(in srgb, var(--color-danger) 8%, transparent);
|
|
2247
|
+
}
|
|
2248
|
+
.video-status-meta {
|
|
2249
|
+
margin-left: 4px;
|
|
2250
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
2251
|
+
color: var(--color-text-muted);
|
|
2252
|
+
}
|
|
2253
|
+
.video-source {
|
|
2254
|
+
margin: 0;
|
|
2255
|
+
font-size: 12px;
|
|
2256
|
+
line-height: 1.6;
|
|
2257
|
+
color: var(--color-text-muted);
|
|
2258
|
+
overflow-wrap: anywhere;
|
|
2259
|
+
}
|
|
2260
|
+
/*
|
|
2261
|
+
* `--color-hover` 从来没有被定义过:占位区背景整条声明在计算值阶段失效,
|
|
2262
|
+
* 只剩正文白底,看起来像一块空白矩形。改用确定存在的 `--color-surface-subtle`
|
|
2263
|
+
* 并给出绝对色兜底,非 SDK 宿主也能正常着色。
|
|
2264
|
+
*/
|
|
2265
|
+
.doc-video-embed { width: 100%; min-width: 0; border: 1px solid var(--color-border, #dce2eb); border-radius: 8px; overflow: hidden; background: var(--color-surface, #fff); }
|
|
2266
|
+
.doc-video-embed .video-placeholder {
|
|
2267
|
+
min-height: 220px; padding: 28px 24px;
|
|
2268
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
|
|
2269
|
+
background: var(--color-surface-subtle, #f5f7fa);
|
|
2270
|
+
}
|
|
2271
|
+
.doc-video-embed .video-play-icon {
|
|
2272
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
2273
|
+
width: 46px; height: 46px; margin-bottom: 2px; border-radius: 50%;
|
|
2274
|
+
color: var(--color-accent, #2f6feb);
|
|
2275
|
+
background: var(--color-accent-soft, #eaf1ff);
|
|
2276
|
+
font-size: 18px; line-height: 1; text-indent: 2px;
|
|
2277
|
+
}
|
|
2278
|
+
.doc-video-embed .video-placeholder strong { font-size: 14px; font-weight: 600; color: var(--color-text, #1f2937); }
|
|
2279
|
+
.doc-video-embed .video-id { font-size: 12px; color: var(--color-text-muted, #667085); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
2280
|
+
.doc-video-embed .video-load {
|
|
2281
|
+
margin-top: 4px; padding: 7px 20px;
|
|
2282
|
+
color: var(--color-accent, #2f6feb); background: var(--color-accent-soft, #eaf1ff);
|
|
2283
|
+
border: 0; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px;
|
|
2284
|
+
}
|
|
2285
|
+
.doc-video-embed .video-load:hover { background: color-mix(in srgb, var(--color-accent, #2f6feb) 16%, transparent); }
|
|
2286
|
+
.doc-video-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 0; background: #111; }
|
|
2287
|
+
.doc-video-embed .video-footer {
|
|
2288
|
+
display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
|
|
2289
|
+
padding: 10px 14px; font-size: 12px;
|
|
2290
|
+
border-top: 1px solid var(--color-border, #dce2eb);
|
|
2291
|
+
background: var(--color-surface, #fff);
|
|
2292
|
+
}
|
|
2293
|
+
.doc-video-embed .video-footer a { color: var(--color-accent, #2f6feb); }
|
|
2294
|
+
.doc-video-embed button:focus-visible, .doc-video-embed a:focus-visible { outline: 2px solid var(--color-accent, #2f6feb); outline-offset: 2px; }
|
|
2295
|
+
.doc-file-video { margin-top: 8px; }
|
|
2296
|
+
.doc-file-video video {
|
|
2297
|
+
width: 100%;
|
|
2298
|
+
max-height: 420px;
|
|
2299
|
+
border-radius: 6px;
|
|
2300
|
+
background: #000;
|
|
2301
|
+
}
|
|
2302
|
+
.doc-file-video-fallback {
|
|
2303
|
+
margin: 0;
|
|
2304
|
+
font-size: 13px;
|
|
2305
|
+
color: var(--color-text-faint);
|
|
2306
|
+
}
|
|
2307
|
+
.wendang-spreadsheet { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 300px; min-width: 0; flex: 1; }
|
|
2308
|
+
.worksheet-grid { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
|
|
2309
|
+
.wendang-spreadsheet > p { position: absolute; top: 8px; left: 12px; z-index: 2; }
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* wui 设计令牌与 Vue 版 `wui/styles/tokens.css` 同源:组件自己的变量用 `--w-*`,
|
|
2313
|
+
* 颜色两级 fallback(宿主覆盖 → 主题变量 → 绝对色),因此深色模式无需第二套定义。
|
|
2314
|
+
*/
|
|
2315
|
+
.wendang, .wendang-portal {
|
|
2316
|
+
--w-font-sans: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif);
|
|
2317
|
+
--w-text: var(--color-text, #1f2937);
|
|
2318
|
+
--w-text-muted: var(--color-text-muted, #667085);
|
|
2319
|
+
--w-text-faint: var(--color-text-faint, #7c8798);
|
|
2320
|
+
--w-surface: var(--color-surface, #fff);
|
|
2321
|
+
--w-surface-subtle: var(--color-surface-subtle, #f5f7fa);
|
|
2322
|
+
--w-border: var(--color-border, #dce2eb);
|
|
2323
|
+
--w-border-strong: var(--color-border-strong, #b9c3d2);
|
|
2324
|
+
--w-accent: var(--color-accent, #2f6feb);
|
|
2325
|
+
--w-accent-soft: var(--color-accent-soft, #eaf1ff);
|
|
2326
|
+
--w-danger: var(--color-danger, #cf3d48);
|
|
2327
|
+
--w-success: var(--color-success, #238353);
|
|
2328
|
+
--w-warning: var(--color-warning, #b76e00);
|
|
2329
|
+
--w-shadow-pop: var(--shadow-pop, 0 10px 32px #14284a20);
|
|
2330
|
+
--w-font-size-mini: 12px; --w-font-size-small: 13px; --w-font-size-medium: 14px;
|
|
2331
|
+
--w-control-mini: 24px; --w-control-small: 28px; --w-control-medium: 32px;
|
|
2332
|
+
--w-radius-sm: 4px; --w-radius-md: 6px; --w-radius-lg: 8px;
|
|
2333
|
+
--w-duration-fast: .12s;
|
|
2334
|
+
}
|
|
2335
|
+
/* ---------------------------------------------------------------- WButton */
|
|
2336
|
+
.w-button {
|
|
2337
|
+
display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:none;box-sizing:border-box;margin:0;
|
|
2338
|
+
border:1px solid transparent;border-radius:var(--w-radius-sm,4px);
|
|
2339
|
+
font-family:var(--w-font-sans,inherit);font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;
|
|
2340
|
+
transition:background-color var(--w-duration-fast,.12s),border-color var(--w-duration-fast,.12s),color var(--w-duration-fast,.12s);
|
|
2341
|
+
}
|
|
2342
|
+
.w-button--mini { height:var(--w-control-mini,24px);padding:0 8px;font-size:var(--w-font-size-mini,12px); }
|
|
2343
|
+
.w-button--small { height:var(--w-control-small,28px);padding:0 10px;font-size:var(--w-font-size-small,13px); }
|
|
2344
|
+
.w-button--medium { height:var(--w-control-medium,32px);padding:0 12px;font-size:var(--w-font-size-medium,14px); }
|
|
2345
|
+
.w-button--narrow { padding-inline:0; }.w-button--block { display:flex;width:100%; }
|
|
2346
|
+
.w-button--default { background:var(--w-surface-subtle,var(--color-surface-subtle,#f5f7fa));border-color:var(--w-border-strong,var(--color-border-strong,#b9c3d2));color:var(--w-text,var(--color-text,#1f2937)); }
|
|
2347
|
+
.w-button--default:not(:disabled):hover { background:color-mix(in srgb,var(--w-accent,#2f6feb) 7%,var(--w-surface-subtle,#f5f7fa));border-color:var(--w-accent,var(--color-accent,#2f6feb));color:var(--w-accent,var(--color-accent,#2f6feb)); }
|
|
2348
|
+
.w-button--text { background:transparent;border-color:transparent;color:var(--w-text,var(--color-text,#1f2937)); }
|
|
2349
|
+
.w-button--text:not(:disabled):hover { background:color-mix(in srgb,currentColor 10%,transparent);color:var(--w-text,var(--color-text,#1f2937)); }
|
|
2350
|
+
.w-button--primary { background:var(--w-accent,var(--color-accent,#2f6feb));border-color:var(--w-accent,var(--color-accent,#2f6feb));color:#fff; }
|
|
2351
|
+
.w-button--primary:not(:disabled):hover { background:color-mix(in srgb,var(--w-accent,#2f6feb) 88%,#000);border-color:color-mix(in srgb,var(--w-accent,#2f6feb) 88%,#000); }
|
|
2352
|
+
.w-button--outline { background:transparent;border-color:var(--w-border,var(--color-border,#dce2eb));color:var(--w-text,var(--color-text,#1f2937)); }
|
|
2353
|
+
.w-button--outline:not(:disabled):hover { border-color:var(--w-accent,var(--color-accent,#2f6feb));color:var(--w-accent,var(--color-accent,#2f6feb)); }
|
|
2354
|
+
.w-button:disabled { opacity:.5;cursor:not-allowed; }.w-button.is-loading { cursor:progress;opacity:.75; }
|
|
2355
|
+
.w-button[aria-pressed=true] { background:var(--w-accent-soft,var(--color-accent-soft,#eaf1ff));border-color:var(--w-accent,var(--color-accent,#2f6feb));color:var(--w-accent,var(--color-accent,#2f6feb)); }
|
|
2356
|
+
.w-button__icon,.w-button__spinner { display:inline-flex;align-items:center;justify-content:center;flex:none; }
|
|
2357
|
+
.w-button__label { display:inline-flex;align-items:center;gap:4px; }.w-button__label > svg,.w-button__label > .wr-icon { flex:none; }
|
|
2358
|
+
.w-button__spinner svg { animation:w-button-spin .8s linear infinite; }
|
|
2359
|
+
@keyframes w-button-spin { to { transform:rotate(360deg); } }
|
|
2360
|
+
.w-button:focus-visible { outline:2px solid var(--w-accent,var(--color-accent,#2f6feb));outline-offset:1px; }
|
|
2361
|
+
/* ---------------------------------------------------------------- WAlert */
|
|
2362
|
+
.w-alert { display:flex;align-items:flex-start;gap:10px;padding:7px 10px;border:1px solid var(--w-border,var(--color-border));border-radius:var(--w-radius-md,6px);background:var(--w-accent-soft,var(--color-accent-soft));color:var(--w-text,var(--color-text));font-size:12px;margin-bottom:10px;flex:none;line-height:1.5; }
|
|
2363
|
+
.w-alert__icon { flex:none;line-height:1.5; }.w-alert__body { flex:1;min-width:0; }
|
|
2364
|
+
.w-alert--warning { background:color-mix(in srgb,var(--w-warning,#b76e00) 12%,var(--w-surface,#fff));border-color:color-mix(in srgb,var(--w-warning,#b76e00) 35%,var(--w-border,#dce2eb)); }
|
|
2365
|
+
.w-alert--danger { background:color-mix(in srgb,var(--w-danger,#cf3d48) 10%,var(--w-surface,#fff));border-color:color-mix(in srgb,var(--w-danger,#cf3d48) 32%,var(--w-border,#dce2eb)); }
|
|
2366
|
+
.w-alert--success { background:color-mix(in srgb,var(--w-success,#238353) 10%,var(--w-surface,#fff));border-color:color-mix(in srgb,var(--w-success,#238353) 32%,var(--w-border,#dce2eb)); }
|
|
2367
|
+
/* ---------------------------------------------------------------- WPopover */
|
|
2368
|
+
.w-popover { position:fixed;z-index:1400;max-width:min(320px,calc(100vw - 24px));max-height:min(70vh,520px);overflow:auto;min-width:160px;padding:4px;display:flex;flex-direction:column;gap:4px;background:var(--w-surface,var(--color-surface,#fff));border:1px solid var(--w-border,var(--color-border));border-radius:var(--w-radius-lg,8px);box-shadow:var(--w-shadow-pop);color:var(--w-text,var(--color-text)); }
|
|
2369
|
+
.w-popover .w-button { justify-content:flex-start;text-align:left;width:100%; }
|
|
2370
|
+
/* 内容自带内边距的面板(高亮块图标/颜色)不再叠加外层 padding。 */
|
|
2371
|
+
.w-popover--flush { padding:0; }
|
|
2372
|
+
.w-popover .wr-settings .w-button { width:auto; }
|
|
2373
|
+
.w-popover-group { padding:6px 8px 2px; font-size:11px; color:var(--color-text-faint); }
|
|
2374
|
+
/* ---------------------------------------------------------------- WDialog */
|
|
2375
|
+
.w-dialog-mask { position:fixed;inset:0;z-index:1100;display:flex;align-items:flex-start;justify-content:center;padding:10vh 16px 24px;background:color-mix(in srgb,#101828 42%,transparent);overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box; }
|
|
2376
|
+
.w-dialog-mask.is-fullscreen { padding:0;overflow:hidden; }
|
|
2377
|
+
.w-dialog { position:relative;display:flex;flex-direction:column;width:520px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 14vh);border:1px solid var(--w-border,var(--color-border,#dce2eb));border-radius:var(--w-radius-lg,8px);background:var(--w-surface,var(--color-surface,#fff));color:var(--w-text,var(--color-text,#1f2937));box-shadow:0 24px 64px #10182833;outline:none;box-sizing:border-box; }
|
|
2378
|
+
.w-dialog.is-fullscreen { width:100vw;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0; }
|
|
2379
|
+
.w-dialog__header { display:flex;align-items:center;gap:12px;flex:none;padding:14px 18px 10px; }
|
|
2380
|
+
.w-dialog__title { flex:1;min-width:0;font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
|
|
2381
|
+
.w-dialog__close { flex:none;display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:var(--w-radius-md,6px);background:transparent;color:var(--w-text-muted,var(--color-text-muted));cursor:pointer; }
|
|
2382
|
+
.w-dialog__close:hover { background:var(--w-surface-subtle,#f5f7fa);color:var(--w-text,#1f2937); }
|
|
2383
|
+
.w-dialog__body { flex:1;min-height:0;padding:4px 18px 18px;overflow:auto;display:flex;flex-direction:column;gap:12px; }
|
|
2384
|
+
.w-dialog.is-fullscreen .w-dialog__body { padding:0;overflow:hidden; }
|
|
2385
|
+
.w-dialog__footer { flex:none;display:flex;justify-content:flex-end;gap:8px;padding:0 18px 16px; }
|
|
2386
|
+
.video-dialog {width:min(520px,calc(100vw - 32px));}
|
|
2387
|
+
.w-dialog label,.wr-mind-panel label { display:flex;flex-direction:column;gap:6px;font-size:13px;margin-bottom:10px; }
|
|
2388
|
+
.w-dialog input,.w-dialog textarea,.wr-mind-panel textarea { width:100%;box-sizing:border-box; }
|
|
2389
|
+
.wr-toolbar { display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
|
|
2390
|
+
.wr-icon { display:block;flex:none; }
|
|
2391
|
+
/**
|
|
2392
|
+
* 编辑端外壳:**不加边框、不留左侧 padding**。
|
|
2393
|
+
*
|
|
2394
|
+
* 块快捷条、「+」和表格入口画在正文左缘之外,需要约 56px 留白;但这段留白
|
|
2395
|
+
* 必须由宿主提供(页面栏宽、文档容器 padding 等)。SDK 自己加 padding 会把
|
|
2396
|
+
* 正文整体右移,而宿主的页头/目录不会跟着动,整篇内容看起来就是歪的。
|
|
2397
|
+
* 宿主没留够时,`blockAffordanceStyle` 会把控件夹进视口作为兜底。
|
|
2398
|
+
*/
|
|
2399
|
+
.wr-document { position:relative;min-height:160px; }
|
|
2400
|
+
.wr-document-mount { min-width:0; }
|
|
2401
|
+
.wr-document .editor-canvas { outline:none;width:100%;max-width:var(--content-width);min-height:60vh;margin-inline:auto;padding-bottom:calc(var(--content-font-size,16px) * var(--content-line-height,1.75) + var(--space-block,12px)); }
|
|
2402
|
+
.wr-document-toolbar { margin-bottom:10px; }
|
|
2403
|
+
/* 块左侧入口:与 Vue 版共用一条 8px 间距的竖轨。 */
|
|
2404
|
+
/* 块左侧入口:与 Vue 的 EditorPane / BlockHandleMenu 同一套类名与尺寸。 */
|
|
2405
|
+
.block-plus { position:absolute; z-index:31; width:28px; height:28px; display:flex; align-items:center; justify-content:center; border:1px solid var(--color-border); border-radius:5px; background:var(--color-surface); color:var(--color-text-muted); cursor:pointer; padding:0; transition:background .12s,border-color .12s; }
|
|
2406
|
+
.block-plus:hover { color:var(--color-accent); border-color:var(--color-accent); background:var(--color-accent-soft); }
|
|
2407
|
+
.block-chip { position:absolute; z-index:31; display:flex; align-items:center; width:48px; height:28px; box-sizing:border-box; padding:1px; border:1px solid var(--color-border); border-radius:6px; background:var(--color-surface); transition:border-color .12s; }
|
|
2408
|
+
.block-chip:hover { border-color:var(--color-accent); }
|
|
2409
|
+
.chip-btn { width:22px; height:24px; display:flex; align-items:center; justify-content:center; border:none; background:transparent; color:var(--color-accent); cursor:pointer; padding:0; border-radius:3px; }
|
|
2410
|
+
.chip-btn:hover { color:var(--color-accent); background:var(--color-accent-soft); }
|
|
2411
|
+
.chip-grip { cursor:grab; color:var(--color-text-faint); }
|
|
2412
|
+
.chip-grip:active { cursor:grabbing; }
|
|
2413
|
+
/* 块菜单:主清单 + 右侧子菜单(结构、宽度、间距与 Vue 的 BlockHandleMenu 一致)。 */
|
|
2414
|
+
.block-anchor { position:absolute; z-index:45; overflow-anchor:none; display:flex; align-items:flex-start; gap:4px; pointer-events:auto; }
|
|
2415
|
+
.block-menu { width:208px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); padding:4px; }
|
|
2416
|
+
.bm-item { display:flex; align-items:center; gap:8px; width:100%; padding:6px 8px; border:0; border-radius:6px; background:transparent; cursor:pointer; font-size:13px; font-family:inherit; color:var(--color-text); text-align:left; }
|
|
2417
|
+
.bm-item:hover { background:var(--color-surface-subtle); }
|
|
2418
|
+
.bm-item:focus-visible { outline:2px solid var(--color-accent); outline-offset:-2px; }
|
|
2419
|
+
.bm-item.active { color:var(--color-accent); }
|
|
2420
|
+
.bm-item.disabled { opacity:.45; pointer-events:none; }
|
|
2421
|
+
.bm-item.danger { color:var(--color-danger); }
|
|
2422
|
+
.bm-item span:first-of-type { flex:1; }
|
|
2423
|
+
.bm-chevron { margin-left:auto; opacity:.5; }
|
|
2424
|
+
.bm-sep { height:1px; background:var(--color-border); margin:4px 6px; }
|
|
2425
|
+
.block-submenu { position:relative; width:208px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); padding:4px; max-height:calc(60vh - 10px); overflow:auto; }
|
|
2426
|
+
.block-submenu-color { width:max-content; padding:12px; }
|
|
2427
|
+
/* 文档颜色面板(块菜单与文字工具栏共用同一套版式)。 */
|
|
2428
|
+
.document-color-panel { width:220px; display:flex; flex-direction:column; gap:12px; }
|
|
2429
|
+
.color-section { display:flex; flex-direction:column; gap:6px; }
|
|
2430
|
+
.color-label { color:var(--color-text-muted); font-size:12px; line-height:1.5; }
|
|
2431
|
+
.color-grid { display:grid; grid-template-columns:repeat(8,24px); gap:4px; }
|
|
2432
|
+
.color-choice { width:24px; min-width:24px; height:24px; padding:0; border:1px solid var(--color-border); border-radius:3px; background:var(--color-surface); cursor:pointer; display:flex; align-items:center; justify-content:center; }
|
|
2433
|
+
.color-choice.selected { border-color:var(--color-accent); outline:1px solid var(--color-accent); outline-offset:-1px; }
|
|
2434
|
+
.font-sample { font-size:16px; font-weight:500; line-height:1; }
|
|
2435
|
+
.background-choice { position:relative; }
|
|
2436
|
+
.clear-stroke { display:block; width:27px; height:1px; background:var(--color-border-strong); transform:rotate(-45deg); }
|
|
2437
|
+
/* 图片工具条:与 Vue 的 EditorPane 同尺寸、同布局。 */
|
|
2438
|
+
.img-toolbar { position:absolute; z-index:50; display:flex; align-items:center; gap:2px; padding:3px 4px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); transform:translateX(-50%); }
|
|
2439
|
+
.it-btn { display:flex; align-items:center; justify-content:center; min-width:28px; height:28px; border:0; border-radius:5px; background:transparent; color:var(--color-text); cursor:pointer; padding:0 5px; }
|
|
2440
|
+
.it-btn:hover { background:var(--color-surface-subtle); }
|
|
2441
|
+
.it-btn.on { background:var(--color-accent-soft); color:var(--color-accent); }
|
|
2442
|
+
.it-btn.danger { color:var(--color-danger); }
|
|
2443
|
+
.it-btn.danger:hover { background:color-mix(in srgb,var(--color-danger) 12%,transparent); }
|
|
2444
|
+
.it-sep { width:1px; height:18px; background:var(--color-border); margin:0 3px; }
|
|
2445
|
+
/* 插入菜单:与 Vue 的 SlashMenu.vue / InsertPicker.vue 同一套类名与几何。 */
|
|
2446
|
+
.slash-anchor { position:absolute; z-index:40; display:flex; align-items:flex-start; gap:6px; }
|
|
2447
|
+
.slash-menu { width:268px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); padding:4px; }
|
|
2448
|
+
.slash-content { padding:0 0 4px; max-height:min(560px,calc(100dvh - 26px)); overflow-y:auto; overscroll-behavior:contain; }
|
|
2449
|
+
.slash-group { font-size:11px; color:var(--color-text-faint); padding:7px 8px 3px; }
|
|
2450
|
+
.slash-menu ul { list-style:none; margin:0; padding:0; }
|
|
2451
|
+
.slash-menu li { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; cursor:pointer; font-size:14px; color:var(--color-text); }
|
|
2452
|
+
.slash-menu li.active { background:var(--color-accent-soft); }
|
|
2453
|
+
.slash-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
2454
|
+
.slash-hint { color:var(--color-text-faint); font-size:12px; flex:none; }
|
|
2455
|
+
.slash-chevron { color:var(--color-text-faint); flex:none; }
|
|
2456
|
+
.slash-empty { color:var(--color-text-faint); font-size:13px; text-align:center; padding:10px; }
|
|
2457
|
+
.insert-picker { position:absolute; z-index:46; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); padding:10px; }
|
|
2458
|
+
.ip-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; font-size:12px; color:var(--color-text-muted); margin-bottom:8px; }
|
|
2459
|
+
.ip-dim { color:var(--color-text-faint); flex:none; }
|
|
2460
|
+
.ip-grid { display:grid; grid-template-columns:repeat(8,18px); grid-auto-rows:18px; gap:3px; }
|
|
2461
|
+
.ip-cell { width:18px; height:18px; padding:0; border:1px solid var(--color-border); border-radius:3px; background:var(--color-surface-subtle); cursor:pointer; }
|
|
2462
|
+
.ip-cell.on { background:var(--color-accent-soft); border-color:var(--color-accent); }
|
|
2463
|
+
.ip-counts { display:flex; gap:6px; }
|
|
2464
|
+
.ip-count { display:flex; flex-direction:column; align-items:center; gap:4px; padding:4px 6px; border:1px solid transparent; border-radius:6px; background:transparent; cursor:pointer; }
|
|
2465
|
+
.ip-count:hover { background:var(--color-surface-subtle); }
|
|
2466
|
+
.ip-count.on { border-color:var(--color-accent); background:var(--color-accent-soft); }
|
|
2467
|
+
.ip-count-box { display:flex; gap:2px; width:34px; height:22px; padding:3px; border:1px solid var(--color-border-strong); border-radius:3px; background:var(--color-surface-subtle); box-sizing:border-box; }
|
|
2468
|
+
.ip-count-bar { flex:1 1 0; min-width:0; background:var(--color-border-strong); border-radius:1px; }
|
|
2469
|
+
.ip-count.on .ip-count-bar { background:var(--color-accent); }
|
|
2470
|
+
.ip-count-num { font-size:11px; color:var(--color-text-muted); }
|
|
2471
|
+
.ip-close { position:absolute; right:4px; top:4px; padding:2px; border:0; background:transparent; color:var(--color-text-faint); cursor:pointer; }
|
|
2472
|
+
/* 表格控件:与 Vue 的 TableHandles.vue 同一套类名、尺寸与轨迹。 */
|
|
2473
|
+
.tbl-ui-host { position:absolute; left:0; top:0; width:0; height:0; pointer-events:none; z-index:30; }
|
|
2474
|
+
.tbl-ui-host > * { pointer-events:auto; }
|
|
2475
|
+
.tbl-corner { position:absolute; z-index:34; display:flex; width:44px; height:26px; padding:1px; box-sizing:border-box; border:1px solid var(--color-border); border-radius:6px; background:var(--color-surface); }
|
|
2476
|
+
.tbl-corner button { width:20px; height:22px; padding:0; display:flex; align-items:center; justify-content:center; border:none; border-radius:3px; background:transparent; color:var(--color-accent); cursor:pointer; }
|
|
2477
|
+
.tbl-corner .tbl-grip { color:var(--color-text-faint); cursor:grab; }
|
|
2478
|
+
.tbl-corner .tbl-grip:active { cursor:grabbing; }
|
|
2479
|
+
.tbl-corner button:hover { background:var(--color-accent-soft); }
|
|
2480
|
+
.tbl-axis { position:absolute; z-index:35; padding:0; border:none; border-radius:5px; background:transparent; cursor:pointer; }
|
|
2481
|
+
.tbl-axis::before { content:''; position:absolute; border-radius:3px; background:var(--color-border-strong); box-shadow:0 0 0 2px var(--color-surface); }
|
|
2482
|
+
.tbl-row-axis { width:20px; height:24px; opacity:0; }
|
|
2483
|
+
.tbl-row-axis::before { left:8px; top:4px; width:4px; height:16px; }
|
|
2484
|
+
.tbl-col-axis { width:24px; height:20px; opacity:0; }
|
|
2485
|
+
.tbl-col-axis::before { left:4px; top:8px; width:16px; height:4px; }
|
|
2486
|
+
.tbl-axis.current,.tbl-axis:hover,.tbl-axis:focus-visible,.tbl-axis.on { opacity:1; }
|
|
2487
|
+
.tbl-axis:hover::before,.tbl-axis.on::before { background:var(--color-accent); }
|
|
2488
|
+
.tbl-boundary { position:absolute; z-index:36; display:flex; justify-content:center; align-items:center; width:20px; height:20px; border:none; border-radius:50%; padding:0; background:transparent; color:transparent; cursor:pointer; }
|
|
2489
|
+
.tbl-boundary::before { content:''; position:absolute; width:4px; height:4px; border-radius:50%; background:var(--color-border-strong); }
|
|
2490
|
+
.tbl-boundary:hover,.tbl-boundary:focus-visible { color:#fff; background:var(--color-accent); }
|
|
2491
|
+
.tbl-boundary:hover::before,.tbl-boundary:focus-visible::before { display:none; }
|
|
2492
|
+
.tbl-boundary::after { content:''; position:absolute; pointer-events:none; background:var(--color-accent); display:none; }
|
|
2493
|
+
.tbl-boundary:hover::after,.tbl-boundary:focus-visible::after { display:block; }
|
|
2494
|
+
.tbl-boundary-row::after { left:14px; top:9px; width:var(--insert-length); height:2px; }
|
|
2495
|
+
.tbl-boundary-col::after { top:14px; left:9px; width:2px; height:var(--insert-length); }
|
|
2496
|
+
.tbl-boundary > svg,.tbl-boundary > .wr-icon { position:relative; z-index:1; }
|
|
2497
|
+
.tbl-selection-more { position:absolute; z-index:38; width:32px; height:20px; padding:0; line-height:12px; border:none; border-radius:6px; background:var(--color-accent); color:#fff; cursor:pointer; font-size:20px; }
|
|
2498
|
+
.tbl-ui-host > .tbl-selection { position:absolute; z-index:32; border:2px solid var(--color-accent); border-radius:5px; box-sizing:border-box; pointer-events:none; box-shadow:0 0 0 1px var(--color-surface); }
|
|
2499
|
+
.tbl-cellbar { position:fixed; z-index:55; box-sizing:border-box; width:max-content; max-width:calc(100vw - 24px); background:var(--color-surface); border:1px solid var(--color-border); border-radius:10px; box-shadow:var(--shadow-pop); padding:6px; }
|
|
2500
|
+
.tbl-tools { display:flex; gap:2px; align-items:center; flex-wrap:wrap; }
|
|
2501
|
+
.tool { flex:0 0 auto; display:flex; align-items:center; justify-content:center; gap:2px; min-width:32px; height:32px; padding:0 5px; border:none; border-radius:5px; background:transparent; color:var(--color-text); font-size:15px; cursor:pointer; }
|
|
2502
|
+
.tool:hover { background:var(--color-surface-subtle); }
|
|
2503
|
+
.tool.on { background:var(--color-accent-soft); color:var(--color-accent); }
|
|
2504
|
+
.tool[aria-disabled='true'] { opacity:.3; cursor:not-allowed; }
|
|
2505
|
+
.fill-icon { width:16px; height:16px; border:1px solid currentColor; border-radius:3px; background-color:transparent; }
|
|
2506
|
+
.color-tool { position:relative; padding-bottom:2px; }
|
|
2507
|
+
.color-bar { position:absolute; left:8px; right:8px; bottom:3px; height:2px; border-radius:1px; box-shadow:0 0 0 1px var(--color-surface); }
|
|
2508
|
+
.tool-sep { flex:0 0 1px; height:20px; background:var(--color-border); margin:0 4px; }
|
|
2509
|
+
.tbl-palette { z-index:60; display:flex; flex-direction:column; gap:8px; width:max-content; max-width:calc(100vw - 48px); padding:10px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); }
|
|
2510
|
+
.palette-head { display:flex; flex-direction:column; gap:2px; padding:0 2px; }
|
|
2511
|
+
.palette-title { font-size:13px; font-weight:600; color:var(--color-text); }
|
|
2512
|
+
.palette-hint { font-size:11px; line-height:1.5; color:var(--color-text-muted); max-width:282px; }
|
|
2513
|
+
.palette-grid { display:grid; grid-template-columns:repeat(8,30px); gap:6px; }
|
|
2514
|
+
.tbl-align-menu { z-index:60; width:176px; padding:6px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); }
|
|
2515
|
+
.tbl-align-menu button { display:flex; align-items:center; gap:10px; width:100%; min-height:36px; padding:6px 10px; border:none; border-radius:5px; background:transparent; color:var(--color-text); cursor:pointer; }
|
|
2516
|
+
.tbl-align-menu button span { flex:1; text-align:left; }
|
|
2517
|
+
.tbl-align-menu button:hover,.tbl-align-menu button:focus-visible { background:var(--color-surface-subtle); }
|
|
2518
|
+
.tbl-align-menu button[aria-checked='true'] { color:var(--color-accent); }
|
|
2519
|
+
.swatch { display:flex; align-items:center; justify-content:center; width:30px; height:30px; padding:4px; border:1px solid var(--color-border); border-radius:5px; background:var(--color-surface); cursor:pointer; color:var(--color-text-muted); }
|
|
2520
|
+
.swatch span { width:100%; height:100%; border-radius:2px; }
|
|
2521
|
+
.swatch .glyph { display:flex; align-items:center; justify-content:center; width:100%; height:100%; font-size:15px; font-weight:500; line-height:1; border-radius:0; }
|
|
2522
|
+
.swatch:hover { border-color:var(--color-accent); }
|
|
2523
|
+
.swatch.selected { border-color:var(--color-accent); box-shadow:0 0 0 1px var(--color-accent); }
|
|
2524
|
+
.tbl-ctx { z-index:80; padding:4px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:8px; box-shadow:var(--shadow-pop); }
|
|
2525
|
+
/* 菜单项:与 Vue 的 TableContextMenu.vue 同尺寸与间距。 */
|
|
2526
|
+
.ctx-item { display:flex; align-items:center; gap:8px; width:100%; border:none; background:transparent; min-height:32px; padding:7px 10px; border-radius:6px; color:var(--color-text); cursor:pointer; text-align:left; font:inherit; font-size:13px; }
|
|
2527
|
+
.ctx-item:hover { background:var(--color-surface-subtle); }
|
|
2528
|
+
.ctx-item:focus-visible { outline:2px solid var(--color-accent); outline-offset:-2px; }
|
|
2529
|
+
.ctx-item:disabled { opacity:.5; cursor:wait; }
|
|
2530
|
+
.ctx-chevron { margin-left:auto; }
|
|
2531
|
+
.ctx-styles { margin:2px 4px; padding-left:12px; border-left:1px solid var(--color-border); }
|
|
2532
|
+
.ctx-style-swatch { width:18px; height:14px; border:1px solid var(--color-border); border-radius:3px; }
|
|
2533
|
+
.ctx-item.danger { color:var(--color-danger); }
|
|
2534
|
+
.ctx-sep { height:1px; background:var(--color-border); margin:4px 6px; }
|
|
2535
|
+
.ctx-label { font-size:11px; color:var(--color-text-faint); padding:4px 8px 2px; }
|
|
2536
|
+
.ctx-align { display:flex; gap:4px; padding:2px 6px 6px; }
|
|
2537
|
+
.al-btn { border:1px solid var(--color-border); background:var(--color-surface); border-radius:5px; padding:3px 6px; cursor:pointer; color:var(--color-text-muted); }
|
|
2538
|
+
.al-btn.on { border-color:var(--color-accent); color:var(--color-accent); background:var(--color-accent-soft); }
|
|
2539
|
+
.ctx-width { display:flex; align-items:center; gap:6px; padding:4px 8px; }
|
|
2540
|
+
.ctx-label-inline { color:var(--color-text-muted); }
|
|
2541
|
+
.ctx-num { width:66px; padding:3px 6px; font-size:13px; border:1px solid var(--color-border); border-radius:5px; background:var(--color-surface); color:var(--color-text); }
|
|
2542
|
+
.ctx-mini { border:1px solid var(--color-border); background:var(--color-surface); border-radius:5px; padding:3px 8px; font-size:12px; cursor:pointer; }
|
|
2543
|
+
.ctx-mini.primary { background:var(--color-accent); border-color:var(--color-accent); color:#fff; }
|
|
2544
|
+
.faint { color:var(--color-text-faint); }.small { font-size:11px; }
|
|
2545
|
+
/* 图片预览。 */
|
|
2546
|
+
.wr-link-popover { position:fixed;z-index:1450;padding:8px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);box-shadow:var(--shadow-pop);max-width:calc(100vw - 16px);font-size:13px; }.wr-link-popover input { min-width:250px; }.wr-link-popover a { max-width:350px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
|
|
2547
|
+
/* 高亮块控件:图标常显,工具条在悬停 / 聚焦时出现。 */
|
|
2548
|
+
.callout-controls { display:contents; }
|
|
2549
|
+
.callout-icon-button { justify-self:start;background:transparent;border-color:transparent;margin:0;cursor:default; }
|
|
2550
|
+
.callout-icon-button:not(:disabled) { cursor:pointer; }
|
|
2551
|
+
.callout-toolbar { position:absolute;bottom:calc(100% + 4px);right:0;z-index:25;display:flex;align-items:center;gap:4px;padding:4px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;box-shadow:var(--shadow-pop);opacity:0;visibility:hidden;transition:opacity .1s; }
|
|
2552
|
+
.doc-callout:hover > .callout-controls-host .callout-toolbar,.doc-callout:focus-within > .callout-controls-host .callout-toolbar,.callout-toolbar.is-open { opacity:1;visibility:visible; }
|
|
2553
|
+
.callout-toolbar-button,.callout-preset { min-height:32px;padding:0 8px;border:0;border-radius:5px;background:transparent;color:var(--color-text);font:inherit;font-size:13px;cursor:pointer; }
|
|
2554
|
+
.callout-toolbar-button:hover,.callout-preset:hover { background:var(--color-surface-subtle); }
|
|
2555
|
+
.callout-toolbar-divider { height:16px;border-left:1px solid var(--color-border);margin:0 3px; }
|
|
2556
|
+
.callout-color-panel { width:max-content;display:flex;flex-direction:column;gap:12px;padding:2px; }
|
|
2557
|
+
.callout-color-label { font-size:12px;margin-bottom:6px;color:var(--color-text-muted); }
|
|
2558
|
+
.callout-color-grid { display:grid;grid-template-columns:repeat(8,26px);gap:5px; }
|
|
2559
|
+
.callout-color-choice { position:relative;width:26px;height:26px;padding:0;border:1px solid var(--color-border);border-radius:4px;background:var(--color-surface);cursor:pointer;overflow:hidden;font-size:12px;color:var(--color-text-muted); }
|
|
2560
|
+
.callout-color-choice.is-selected { outline:2px solid var(--color-accent);outline-offset:1px; }
|
|
2561
|
+
.callout-color-choice.is-none::after { content:'';position:absolute;left:-5px;top:12px;width:36px;height:1px;background:var(--color-border-strong);transform:rotate(-45deg); }
|
|
2562
|
+
.callout-font-sample { font-size:16px;line-height:1;color:inherit; }
|
|
2563
|
+
.callout-icon-picker { width:254px;box-sizing:border-box;padding:8px 10px 6px; }
|
|
2564
|
+
.callout-icon-grid { display:grid;grid-template-columns:repeat(6,34px);gap:6px; }
|
|
2565
|
+
.callout-icon-choice { width:34px;height:34px;padding:0;border:0;border-radius:5px;background:transparent;font-size:20px;cursor:pointer; }
|
|
2566
|
+
.callout-icon-choice:hover,.callout-icon-choice[aria-pressed='true'] { background:var(--color-accent-soft); }
|
|
2567
|
+
.callout-icon-footer { display:flex;gap:8px;margin-top:10px;padding-top:8px;border-top:1px solid var(--color-border); }
|
|
2568
|
+
.callout-icon-footer .w-button { flex:1;justify-content:center; }
|
|
2569
|
+
.wr-block-drop-line { position:fixed;z-index:1300;height:3px;pointer-events:none;background:var(--color-accent);border:1px solid #fff;border-radius:999px;box-shadow:0 1px 6px #0003;transform:translateY(-1px); }
|
|
2570
|
+
.wr-block-handle { position:absolute;left:0;z-index:25; }
|
|
2571
|
+
.wr-block-menu,.wr-insert-menu { position:sticky;bottom:10px;z-index:40;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;padding:10px;box-shadow:var(--shadow-pop);max-height:360px;overflow:auto; }
|
|
2572
|
+
.wr-insert-menu { display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:5px; }
|
|
2573
|
+
.wr-insert-menu header { display:flex;justify-content:space-between;grid-column:1/-1; }
|
|
2574
|
+
.wr-image { max-width:100%;height:auto;cursor:zoom-in; }.wr-image-preview { max-width:100%;max-height:70vh;object-fit:contain; }
|
|
2575
|
+
.wr-media-placeholder { display:inline-flex;min-height:100px;align-items:center;justify-content:center;background:var(--color-surface-subtle); }
|
|
2576
|
+
.wr-code>header { display:flex;justify-content:space-between;background:var(--color-surface-subtle);padding:6px 10px;font-size:12px; }
|
|
2577
|
+
.wr-video iframe { width:100%;height:350px;border:0; }.doc-file-card video { max-width:100%; }
|
|
2578
|
+
.wr-spreadsheet { height:100%;min-height:360px;position:relative;display:flex;flex-direction:column; }.wr-sheet-engine { flex:1;min-height:300px; }
|
|
2579
|
+
/* 工作表只读预览:与 Vue 的 WorksheetPreview.vue 同一套类名与排版。 */
|
|
2580
|
+
.worksheet-preview { border:1px solid var(--color-border); border-radius:8px; overflow:hidden; background:var(--color-surface); }
|
|
2581
|
+
.worksheet-preview-standalone { display:flex;flex-direction:column;flex:1;min-height:0;border:0;border-radius:0; }
|
|
2582
|
+
.worksheet-preview-standalone .sheet-table { flex:1;min-height:0;max-height:none; }
|
|
2583
|
+
.sheet-tabs { display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding:8px; font-size:12px; }
|
|
2584
|
+
.sheet-note { color:var(--color-text-muted); }
|
|
2585
|
+
.sheet-table { overflow:auto; max-height:600px; outline:none; }
|
|
2586
|
+
.sheet-table table { border-collapse:collapse; table-layout:fixed; width:max-content; font-size:13px; }
|
|
2587
|
+
.sheet-table th,.sheet-table td { border:1px solid var(--color-border); padding:3px 6px; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; vertical-align:top; }
|
|
2588
|
+
.sheet-table th { background:var(--color-surface-subtle); font-weight:500; color:var(--color-text-muted); }
|
|
2589
|
+
.sheet-table thead { position:sticky; top:0; z-index:1; }
|
|
2590
|
+
.sheet-table tr > th:first-child { min-width:40px; text-align:center; }
|
|
2591
|
+
.sheet-paging { display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding:8px; font-size:12px; color:var(--color-text-faint); }
|
|
2592
|
+
.sheet-paging > span { flex:1; }
|
|
2593
|
+
.sheet-view-note { flex:none; margin:0; padding:6px 8px; font-size:12px; color:var(--color-text-muted); background:var(--color-surface-subtle); }
|
|
2594
|
+
/* The Canvas and topic visuals come from the canonical Vue style files. */
|
|
2595
|
+
.wr-mind-editor {height:100%;min-height:380px;min-width:0;}
|
|
2596
|
+
.mind-canvas-layers {position:absolute;left:0;top:0;transform-origin:0 0;}
|
|
2597
|
+
.mind-canvas-edges {position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none;}
|
|
2598
|
+
.mind-canvas-stage {touch-action:none;}
|
|
2599
|
+
.mind-canvas-surface {position:absolute;inset:0;}
|
|
2600
|
+
.mind-node-actions,.mind-selection-summary,.mind-canvas-bottom {z-index:5;}
|
|
2601
|
+
.mind-canvas-notice {z-index:6;}
|
|
2602
|
+
.mind-context-menu {position:fixed;z-index:1400;padding:0;min-width:160px;max-height:calc(100vh - 16px);overflow:auto;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;box-shadow:var(--shadow-pop);}
|
|
2603
|
+
.mind-side-projection {pointer-events:none;}
|
|
2604
|
+
.mind-canvas-fullscreen .wd-dialog__body {overflow:hidden;}
|
|
2605
|
+
.w-popover .mind-settings-menu .w-button {width:auto;}
|
|
2606
|
+
.mind-space-pan,.mind-space-pan .mind-topic {cursor:grab;}
|
|
2607
|
+
.mind-peer-badge {position:absolute;right:4px;top:4px;padding:1px 5px;border-radius:9px;background:var(--color-accent);color:white;font-size:10px;line-height:14px;pointer-events:none;}
|
|
2608
|
+
.wr-settings { display:flex;flex-direction:column;gap:8px; }
|
|
2609
|
+
@media(max-width:760px) { .wr-mind-hint { display:none; }.wr-mind-panel { flex-basis:210px; } }
|
|
2610
|
+
|
|
2611
|
+
/* Vue WPopover shell around the shared Select / Dropdown content. */
|
|
2612
|
+
.w-popover.w-select-popup,.w-popover.code-settings-popup,.w-popover.code-tooltip-popup,.w-popover.mind-dropdown-popup {
|
|
2613
|
+
box-sizing:border-box;min-width:0;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);
|
|
2614
|
+
padding:0;display:block;overflow:visible;gap:0;overflow-anchor:none;
|
|
2615
|
+
}
|