@4399ywkf/editor 0.10.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DocView-P72ZRRVW.js → DocView-5LI4KWEZ.js} +3 -3
- package/dist/{DocView-P72ZRRVW.js.map → DocView-5LI4KWEZ.js.map} +1 -1
- package/dist/{chunk-PCM4FATZ.js → chunk-SV3LH2TC.js} +443 -82
- package/dist/chunk-SV3LH2TC.js.map +1 -0
- package/dist/doc-standalone.js +119586 -0
- package/dist/doc-standalone.js.map +1 -0
- package/dist/doc.d.ts +41 -7
- package/dist/doc.js +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -3
- package/dist/chunk-PCM4FATZ.js.map +0 -1
package/dist/doc.d.ts
CHANGED
|
@@ -418,6 +418,8 @@ declare function resolveEditorTheme(token: AntdTokenLike, options?: {
|
|
|
418
418
|
isDarkMode?: boolean;
|
|
419
419
|
}): ResolvedEditorTheme;
|
|
420
420
|
|
|
421
|
+
type MessageSendKey = "enter" | "mod-enter";
|
|
422
|
+
|
|
421
423
|
interface NotionEditorProps {
|
|
422
424
|
room: string;
|
|
423
425
|
placeholder?: string;
|
|
@@ -426,7 +428,7 @@ interface NotionEditorProps {
|
|
|
426
428
|
* 仅在**非协同模式**(无 provider)下生效——业务方通过 HTTP 拿到文档内容后传入。
|
|
427
429
|
* 协同模式下 yjs Doc 接管内容,传入会被忽略以免跟 sync 冲突。
|
|
428
430
|
*/
|
|
429
|
-
content?: string | JSONContent;
|
|
431
|
+
content?: string | JSONContent | null;
|
|
430
432
|
/**
|
|
431
433
|
* `content` 的格式。不传时沿用旧规则:对象按 JSON、字符串按 HTML。
|
|
432
434
|
* `"markdown"` 时字符串经 Markdown 解析(支持 `::: code-group` 代码分组);
|
|
@@ -485,6 +487,21 @@ interface NotionEditorProps {
|
|
|
485
487
|
* 避免出现第二条贴在标题下方的工具条。undo/redo 快捷键不受影响。
|
|
486
488
|
*/
|
|
487
489
|
hideHeader?: boolean;
|
|
490
|
+
hideFloatingToolbar?: boolean;
|
|
491
|
+
/** 内嵌模式:去掉整页边距与目录侧栏,正文铺满宿主卡片。 */
|
|
492
|
+
embedded?: boolean;
|
|
493
|
+
/** 用可逆的白名单 HTML-in-Markdown 保存颜色、字号、对齐等富格式。 */
|
|
494
|
+
richMarkdown?: boolean;
|
|
495
|
+
/** 消息输入框的发送键;未传 `onSend` 时不改变默认编辑器行为。 */
|
|
496
|
+
sendKey?: MessageSendKey;
|
|
497
|
+
/** 消息输入框发送回调;回调收到当前公开 Editor 实例。 */
|
|
498
|
+
onSend?: (editor: Editor$1) => void;
|
|
499
|
+
/** 用户编辑文档后回调;宿主可在回调里读取 getJSON / getEditorMarkdown。 */
|
|
500
|
+
onUpdate?: (editor: Editor$1) => void;
|
|
501
|
+
/** 选区变化后回调;用于宿主同步工具栏、AI 或提及状态。 */
|
|
502
|
+
onSelectionUpdate?: (editor: Editor$1) => void;
|
|
503
|
+
/** 编辑器实例销毁前后由 Tiptap 触发的生命周期回调。 */
|
|
504
|
+
onEditorDestroy?: (editor: Editor$1) => void;
|
|
488
505
|
/**
|
|
489
506
|
* 编辑器实例就绪回调。包不感知业务 store —— 业务方拿到 editor 实例后自行接管
|
|
490
507
|
* (如写进 zustand store,发布时用 editor.getHTML()/getJSON() 取正文)。
|
|
@@ -515,7 +532,7 @@ interface EditorProviderProps {
|
|
|
515
532
|
ydoc: Doc;
|
|
516
533
|
placeholder?: string;
|
|
517
534
|
/** 本地编辑模式下的初始/同步内容,详见 NotionEditorProps.content */
|
|
518
|
-
content?: string | JSONContent;
|
|
535
|
+
content?: string | JSONContent | null;
|
|
519
536
|
/** 内容格式,详见 NotionEditorProps.contentFormat */
|
|
520
537
|
contentFormat?: ContentFormat;
|
|
521
538
|
/** 代码块高亮配置,详见 NotionEditorProps.codeBlock */
|
|
@@ -541,6 +558,13 @@ interface EditorProviderProps {
|
|
|
541
558
|
* 与 readOnly 正交:`<NotionEditor readOnly>`(编辑器内预览)仍保留整页布局 + TOC。
|
|
542
559
|
*/
|
|
543
560
|
embedded?: boolean;
|
|
561
|
+
richMarkdown?: boolean;
|
|
562
|
+
sendKey?: MessageSendKey;
|
|
563
|
+
onSend?: (editor: Editor$1) => void;
|
|
564
|
+
onUpdate?: (editor: Editor$1) => void;
|
|
565
|
+
onSelectionUpdate?: (editor: Editor$1) => void;
|
|
566
|
+
onEditorDestroy?: (editor: Editor$1) => void;
|
|
567
|
+
hideFloatingToolbar?: boolean;
|
|
544
568
|
/** editor 实例就绪回调,详见 NotionEditorProps.onEditorReady */
|
|
545
569
|
onEditorReady?: (editor: Editor$1) => void;
|
|
546
570
|
/**
|
|
@@ -563,7 +587,9 @@ declare function LoadingSpinner({ text }: {
|
|
|
563
587
|
/**
|
|
564
588
|
* EditorContent component that renders the actual editor
|
|
565
589
|
*/
|
|
566
|
-
declare function EditorContentArea(
|
|
590
|
+
declare function EditorContentArea({ hideFloatingToolbar }: {
|
|
591
|
+
hideFloatingToolbar?: boolean;
|
|
592
|
+
}): react.JSX.Element | null;
|
|
567
593
|
/**
|
|
568
594
|
* Component that creates and provides the editor instance
|
|
569
595
|
*/
|
|
@@ -571,11 +597,11 @@ declare function EditorProvider(props: EditorProviderProps): react.JSX.Element;
|
|
|
571
597
|
/**
|
|
572
598
|
* Full editor with all necessary providers, ready to use with just a room ID
|
|
573
599
|
*/
|
|
574
|
-
declare function NotionEditor({ room, placeholder, content, contentFormat, codeBlock, readOnly, hideHeader, onEditorReady, extensions, pageHeader, defaultViewMode, viewMode, onViewModeChange, defaultWidthMode, widthMode, onWidthModeChange, visualTheme, permissions, }: NotionEditorProps): react.JSX.Element;
|
|
600
|
+
declare function NotionEditor({ room, placeholder, content, contentFormat, codeBlock, readOnly, hideHeader, hideFloatingToolbar, embedded, richMarkdown, sendKey, onSend, onUpdate, onSelectionUpdate, onEditorDestroy, onEditorReady, extensions, pageHeader, defaultViewMode, viewMode, onViewModeChange, defaultWidthMode, widthMode, onWidthModeChange, visualTheme, permissions, }: NotionEditorProps): react.JSX.Element;
|
|
575
601
|
/**
|
|
576
602
|
* Internal component that handles the editor loading state
|
|
577
603
|
*/
|
|
578
|
-
declare function NotionEditorContent({ placeholder, content, contentFormat, codeBlock, readOnly, permissions, hideHeader, onEditorReady, extensions, pageHeader, defaultViewMode, viewMode, onViewModeChange, defaultWidthMode, widthMode, onWidthModeChange, }: {
|
|
604
|
+
declare function NotionEditorContent({ placeholder, content, contentFormat, codeBlock, readOnly, permissions, hideHeader, hideFloatingToolbar, embedded, richMarkdown, sendKey, onSend, onUpdate, onSelectionUpdate, onEditorDestroy, onEditorReady, extensions, pageHeader, defaultViewMode, viewMode, onViewModeChange, defaultWidthMode, widthMode, onWidthModeChange, }: {
|
|
579
605
|
pageHeader?: boolean;
|
|
580
606
|
defaultViewMode?: ViewMode;
|
|
581
607
|
viewMode?: ViewMode;
|
|
@@ -584,7 +610,7 @@ declare function NotionEditorContent({ placeholder, content, contentFormat, code
|
|
|
584
610
|
widthMode?: DocWidthMode;
|
|
585
611
|
onWidthModeChange?: (mode: DocWidthMode) => void;
|
|
586
612
|
placeholder?: string;
|
|
587
|
-
content?: string | JSONContent;
|
|
613
|
+
content?: string | JSONContent | null;
|
|
588
614
|
/** 内容格式,详见 NotionEditorProps.contentFormat */
|
|
589
615
|
contentFormat?: ContentFormat;
|
|
590
616
|
/** 代码块高亮配置,详见 NotionEditorProps.codeBlock */
|
|
@@ -592,6 +618,14 @@ declare function NotionEditorContent({ placeholder, content, contentFormat, code
|
|
|
592
618
|
readOnly?: boolean;
|
|
593
619
|
permissions?: Partial<DocPermissions>;
|
|
594
620
|
hideHeader?: boolean;
|
|
621
|
+
hideFloatingToolbar?: boolean;
|
|
622
|
+
embedded?: boolean;
|
|
623
|
+
richMarkdown?: boolean;
|
|
624
|
+
sendKey?: MessageSendKey;
|
|
625
|
+
onSend?: (editor: Editor$1) => void;
|
|
626
|
+
onUpdate?: (editor: Editor$1) => void;
|
|
627
|
+
onSelectionUpdate?: (editor: Editor$1) => void;
|
|
628
|
+
onEditorDestroy?: (editor: Editor$1) => void;
|
|
595
629
|
onEditorReady?: (editor: Editor$1) => void;
|
|
596
630
|
/**
|
|
597
631
|
* 追加的 tiptap 扩展,挂在包内置扩展集之后。
|
|
@@ -1685,4 +1719,4 @@ declare function WidthModeMenu(props?: {
|
|
|
1685
1719
|
onChange?: (mode: DocWidthMode) => void;
|
|
1686
1720
|
}): react.JSX.Element;
|
|
1687
1721
|
|
|
1688
|
-
export { type ApiParamAttrs, ApiParamExtension, ArticleViewer, type ArticleViewerProps, Audio, ButtonProps, type CalloutAttrs, CalloutExtension, type CalloutType, CodeBlockExtension, CodeBlockOptions, CodeGroupExtension, CollabContext, type CollabContextValue, CollabProvider, type CollabProviderLike, Column, type ColumnLayout, Columns, ContentFormat, DEFAULT_DOC_PERMISSIONS, DEFAULT_MAX_FILE_SIZES, DOC_WIDTHS, type DetailsAttrs, DetailsExtension, type DocPermissions, type DocWidthMode, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EditorButtonConfig, type EditorCollabConfig, type EditorConfig, EditorConfigProvider, type EditorConfigProviderProps, EditorContentArea, type EditorFileConfig, type EditorLinkConfig, type EditorMentionConfig, type EditorPollConfig, type EditorProviderProps, type EditorSurfaceToken, EditorThemeStyle, type EditorThemeStyleProps, type EditorUploadConfig, type EditorUserConfig, type EditorVisualTheme, FileAttachment, type FileAttachmentAttrs, FileInline, type FilePreviewInfo, type FileView, FloatingElement, HIDE_FLOATING_META, type LinkPreview, LoadingSpinner, MAC_SYMBOLS, MAX_FILE_SIZE, type MediaKind, type MediaKindForButton, MediaUploadButton, type MediaUploadButtonProps, MediaUploadPlaceholder, type MentionDoc, type MentionDocState, type MentionNotifyParams, type MentionUser, NotionEditor, NotionEditorContent, EditorProvider as NotionEditorInner, type NotionEditorProps, type OverflowPosition, type ParsedContent, PasteDropMedia, type PasteDropMediaOptions, type PasteDropMediaUploadFn, type PasteDropRehostProgressEvent, type PollVoter, type PollVotes, Popover, PopoverContent, PopoverTrigger, type PrintOptions, type RehostProgressEvent, type RenderHighlightedHTMLOptions, type ResolvedEditorTheme, SR_ONLY, Separator, Spacer, Toolbar, ToolbarGroup, ToolbarSeparator, UiState, UiState as UiStateType, type User, UserContext, type UserContextValue, UserProvider, VIEW_MODE_TOAST, Video, type ViewMode, ViewModeSwitch, WidthModeMenu, type WordCount, clamp, cn, countDocument, countRange, countText, defaultUiState, detectMediaKind, findNodeAtPosition, findNodePosition, findSelectionPosition, focusNextNode, formatShortcutKey, getAvatar, getDocPermissions, getEditorMarkdown, getElementOverflowPosition, getNodeDisplayName, getSelectedBlockNodes, getSelectedNodesOfType, getSelectionBoundingRect, getUrlParam, handleImageUpload, hasContentAbove, isAllowedUri, isExtensionAvailable, isMac, isMarkInSchema, isNodeInSchema, isNodeTypeSelected, isSelectionValid, isTextSelectionValid, isValidPosition, markHideFloatingOnNext, parseEditorContent, parseShortcutKeys, pickFile, printDocument, removeEmptyParagraphs, renderHighlightedHTML, resolveEditorTheme, resolveMaxSize, runMediaUpload, sanitizeUrl, selectCurrentBlockContent, selectNodeAndHideFloating, selectionWithinConvertibleTypes, serializeEditorMarkdown, updateNodesAttr, useCollab, useCollaboration, useComposedRef, useCursorVisibility, useEditorConfig, useElementRect, useFloatingElement, useFloatingToolbarVisibility, useIsBreakpoint, useIsomorphicLayoutEffect, useMenuNavigation, useOnClickOutside, useScrolling, useThrottledCallback, useTiptapEditor, useUiEditorState, useUiEditorState as useUiEditorStateDefault, useUnmount, useUser, useViewMode, useWidthMode, useWindowSize };
|
|
1722
|
+
export { type ApiParamAttrs, ApiParamExtension, ArticleViewer, type ArticleViewerProps, Audio, ButtonProps, type CalloutAttrs, CalloutExtension, type CalloutType, CodeBlockExtension, CodeBlockOptions, CodeGroupExtension, CollabContext, type CollabContextValue, CollabProvider, type CollabProviderLike, Column, type ColumnLayout, Columns, ContentFormat, DEFAULT_DOC_PERMISSIONS, DEFAULT_MAX_FILE_SIZES, DOC_WIDTHS, type DetailsAttrs, DetailsExtension, type DocPermissions, type DocWidthMode, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EditorButtonConfig, type EditorCollabConfig, type EditorConfig, EditorConfigProvider, type EditorConfigProviderProps, EditorContentArea, type EditorFileConfig, type EditorLinkConfig, type EditorMentionConfig, type EditorPollConfig, type EditorProviderProps, type EditorSurfaceToken, EditorThemeStyle, type EditorThemeStyleProps, type EditorUploadConfig, type EditorUserConfig, type EditorVisualTheme, FileAttachment, type FileAttachmentAttrs, FileInline, type FilePreviewInfo, type FileView, FloatingElement, HIDE_FLOATING_META, type LinkPreview, LoadingSpinner, MAC_SYMBOLS, MAX_FILE_SIZE, type MediaKind, type MediaKindForButton, MediaUploadButton, type MediaUploadButtonProps, MediaUploadPlaceholder, type MentionDoc, type MentionDocState, type MentionNotifyParams, type MentionUser, type MessageSendKey, NotionEditor, NotionEditorContent, EditorProvider as NotionEditorInner, type NotionEditorProps, type OverflowPosition, type ParsedContent, PasteDropMedia, type PasteDropMediaOptions, type PasteDropMediaUploadFn, type PasteDropRehostProgressEvent, type PollVoter, type PollVotes, Popover, PopoverContent, PopoverTrigger, type PrintOptions, type RehostProgressEvent, type RenderHighlightedHTMLOptions, type ResolvedEditorTheme, SR_ONLY, Separator, Spacer, Toolbar, ToolbarGroup, ToolbarSeparator, UiState, UiState as UiStateType, type User, UserContext, type UserContextValue, UserProvider, VIEW_MODE_TOAST, Video, type ViewMode, ViewModeSwitch, WidthModeMenu, type WordCount, clamp, cn, countDocument, countRange, countText, defaultUiState, detectMediaKind, findNodeAtPosition, findNodePosition, findSelectionPosition, focusNextNode, formatShortcutKey, getAvatar, getDocPermissions, getEditorMarkdown, getElementOverflowPosition, getNodeDisplayName, getSelectedBlockNodes, getSelectedNodesOfType, getSelectionBoundingRect, getUrlParam, handleImageUpload, hasContentAbove, isAllowedUri, isExtensionAvailable, isMac, isMarkInSchema, isNodeInSchema, isNodeTypeSelected, isSelectionValid, isTextSelectionValid, isValidPosition, markHideFloatingOnNext, parseEditorContent, parseShortcutKeys, pickFile, printDocument, removeEmptyParagraphs, renderHighlightedHTML, resolveEditorTheme, resolveMaxSize, runMediaUpload, sanitizeUrl, selectCurrentBlockContent, selectNodeAndHideFloating, selectionWithinConvertibleTypes, serializeEditorMarkdown, updateNodesAttr, useCollab, useCollaboration, useComposedRef, useCursorVisibility, useEditorConfig, useElementRect, useFloatingElement, useFloatingToolbarVisibility, useIsBreakpoint, useIsomorphicLayoutEffect, useMenuNavigation, useOnClickOutside, useScrolling, useThrottledCallback, useTiptapEditor, useUiEditorState, useUiEditorState as useUiEditorStateDefault, useUnmount, useUser, useViewMode, useWidthMode, useWindowSize };
|
package/dist/doc.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ApiParamExtension, ArticleViewer, Audio, CalloutExtension, CodeBlockExtension, CodeGroupExtension, CollabContext, CollabProvider, Column, Columns, DEFAULT_DOC_PERMISSIONS, DEFAULT_MAX_FILE_SIZES, DOC_WIDTHS, DetailsExtension, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditorConfigProvider, EditorContentArea, EditorThemeStyle, FileAttachment, FileInline, FloatingElement, HIDE_FLOATING_META, LoadingSpinner, MediaUploadButton, MediaUploadPlaceholder, NotionEditor, NotionEditorContent, EditorProvider as NotionEditorInner, PasteDropMedia, Separator, Spacer, Toolbar, ToolbarGroup, ToolbarSeparator, UiState, UserContext, UserProvider, VIEW_MODE_TOAST, Video, ViewModeSwitch, WidthModeMenu, countDocument, countRange, countText, defaultUiState, detectMediaKind, findSelectionPosition, getDocPermissions, getEditorMarkdown, hasContentAbove, markHideFloatingOnNext, parseEditorContent, pickFile, printDocument, renderHighlightedHTML, resolveEditorTheme, resolveMaxSize, runMediaUpload, selectNodeAndHideFloating, serializeEditorMarkdown, useCollab, useCollaboration, useComposedRef, useCursorVisibility, useEditorConfig, useElementRect, useFloatingElement, useFloatingToolbarVisibility, useIsBreakpoint, useIsomorphicLayoutEffect, useMenuNavigation, useOnClickOutside, useThrottledCallback, useUiEditorState, use_ui_editor_state_default as useUiEditorStateDefault, useUnmount, useUser, useViewMode, useWidthMode, useWindowSize } from './chunk-
|
|
1
|
+
export { ApiParamExtension, ArticleViewer, Audio, CalloutExtension, CodeBlockExtension, CodeGroupExtension, CollabContext, CollabProvider, Column, Columns, DEFAULT_DOC_PERMISSIONS, DEFAULT_MAX_FILE_SIZES, DOC_WIDTHS, DetailsExtension, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditorConfigProvider, EditorContentArea, EditorThemeStyle, FileAttachment, FileInline, FloatingElement, HIDE_FLOATING_META, LoadingSpinner, MediaUploadButton, MediaUploadPlaceholder, NotionEditor, NotionEditorContent, EditorProvider as NotionEditorInner, PasteDropMedia, Separator, Spacer, Toolbar, ToolbarGroup, ToolbarSeparator, UiState, UserContext, UserProvider, VIEW_MODE_TOAST, Video, ViewModeSwitch, WidthModeMenu, countDocument, countRange, countText, defaultUiState, detectMediaKind, findSelectionPosition, getDocPermissions, getEditorMarkdown, hasContentAbove, markHideFloatingOnNext, parseEditorContent, pickFile, printDocument, renderHighlightedHTML, resolveEditorTheme, resolveMaxSize, runMediaUpload, selectNodeAndHideFloating, serializeEditorMarkdown, useCollab, useCollaboration, useComposedRef, useCursorVisibility, useEditorConfig, useElementRect, useFloatingElement, useFloatingToolbarVisibility, useIsBreakpoint, useIsomorphicLayoutEffect, useMenuNavigation, useOnClickOutside, useThrottledCallback, useUiEditorState, use_ui_editor_state_default as useUiEditorStateDefault, useUnmount, useUser, useViewMode, useWidthMode, useWindowSize } from './chunk-SV3LH2TC.js';
|
|
2
2
|
export { Button, MAC_SYMBOLS, MAX_FILE_SIZE, Popover, PopoverContent, PopoverTrigger, SR_ONLY, clamp, cn, findNodeAtPosition, findNodePosition, focusNextNode, formatShortcutKey, getAvatar, getElementOverflowPosition, getNodeDisplayName, getSelectedBlockNodes, getSelectedNodesOfType, getSelectionBoundingRect, getUrlParam, handleImageUpload, isAllowedUri, isExtensionAvailable, isMac, isMarkInSchema, isNodeInSchema, isNodeTypeSelected, isSelectionValid, isTextSelectionValid, isValidPosition, parseShortcutKeys, removeEmptyParagraphs, sanitizeUrl, selectCurrentBlockContent, selectionWithinConvertibleTypes, updateNodesAttr, useTiptapEditor } from './chunk-MGSVKKK7.js';
|
|
3
3
|
import './chunk-UD6MDBTN.js';
|
|
4
4
|
import './chunk-ABMZOL26.js';
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ registerFormat({
|
|
|
31
31
|
importExtensions: [".docx", ".md", ".html"],
|
|
32
32
|
exportFormats: ["docx", "html", "json", "markdown"]
|
|
33
33
|
},
|
|
34
|
-
load: () => import('./DocView-
|
|
34
|
+
load: () => import('./DocView-5LI4KWEZ.js')
|
|
35
35
|
});
|
|
36
36
|
registerFormat({
|
|
37
37
|
format: "sheet",
|
package/dist/style.css
CHANGED
|
@@ -823,7 +823,7 @@ svg.react-flow__connectionline {
|
|
|
823
823
|
> .ProseMirror-trailingBreak:only-child
|
|
824
824
|
)::before{content:attr(data-placeholder);}.is-empty.with-slash[data-placeholder]:has(
|
|
825
825
|
> .ProseMirror-trailingBreak:only-child
|
|
826
|
-
)::before{content:
|
|
826
|
+
)::before{content:attr(data-placeholder);font-style:italic;}.is-empty[data-placeholder]:has(
|
|
827
827
|
> .ProseMirror-trailingBreak:only-child
|
|
828
828
|
):before{pointer-events:none;height:0;position:absolute;width:100%;text-align:inherit;left:0;right:0;}.is-empty[data-placeholder]:has(> .ProseMirror-trailingBreak):before{color:var(--placeholder-color);}.prosemirror-dropcursor-block,.prosemirror-dropcursor-inline{background:var(--tt-brand-color-400)!important;border-radius:0.25rem;margin-left:-1px;margin-right:-1px;width:100%;height:0.188rem;cursor:grabbing;}.tiptap.ProseMirror{--tt-indent-unit:24px;}.tiptap.ProseMirror [data-indent]{transition:margin-left 0.2s ease-in-out;margin-left:calc(var(--tt-indent-unit) * var(--tt-indent-level, 0));}.tt-poll-layout{display:flex;margin:8px 0;}.tt-poll{position:relative;box-sizing:border-box;width:100%;max-width:500px;margin:1px;border-radius:10px;background:#ffffff;box-shadow:0 0 0 1px rgba(28, 19, 1, 0.11);color:#2c2c2b;font-size:14px;line-height:22px;cursor:auto;}.tt-poll.is-selected{box-shadow:0 0 0 1px #1677ff;}.tt-poll__header{padding:12px 12px 14px;border-radius:8px 8px 0 0;background:#e0e9ff;color:#1456f0;}.tt-poll__header--edit{padding:12px;}.tt-poll__title-row{display:flex;align-items:flex-start;gap:8px;}.tt-poll__title{flex:1;margin-left:4px;font-size:16px;font-weight:500;word-break:break-word;}.tt-poll__title-input{box-sizing:border-box;width:100%;padding:3px 6px;border:1px solid transparent;border-radius:6px;background:#ffffff;color:#2c2c2b;font:inherit;font-size:16px;font-weight:500;}.tt-poll__title-input::placeholder{color:#9b9a97;font-weight:400;}.tt-poll__title-input:focus{outline:none;border-color:rgb(51, 109, 244);}.tt-poll__tags{margin-left:4px;line-height:0;}.tt-poll__tag{display:inline-flex;align-items:center;gap:3px;height:16px;margin:6px 6px 0 0;padding:0 4px;border-radius:6px;background:rgba(20, 86, 240, 0.11);color:#1456f0;font-size:10px;line-height:16px;}.tt-poll__content{padding:16px 16px 0;}.tt-poll__options{color:#2b2f36;}.tt-poll__adder{margin:12px 0;padding:0;border:0;background:none;color:#1456f0;font:inherit;cursor:pointer;}.tt-poll__line{margin:0 0 20px;border:0;border-top:1px solid #1f2329;opacity:0.15;}.tt-poll__config{padding:12px 12px 0;border-radius:6px;background:rgba(42, 28, 0, 0.03);}.tt-poll__button{box-sizing:border-box;height:32px;padding:0 16px;border:1px solid rgba(28, 19, 1, 0.11);border-radius:6px;background:#ffffff;color:#2c2c2b;font:inherit;cursor:pointer;}.tt-poll__button:disabled{cursor:not-allowed;opacity:0.5;}.tt-poll__button--primary{border-color:#1677ff;background:#1677ff;color:#fff;}.tt-poll__button--danger{border-color:rgb(245, 74, 69);background:rgb(245, 74, 69);color:#fff;}.tt-poll__content>.tt-poll__button{display:block;width:100%;margin:16px 0;}.tt-poll__spacer{height:16px;}.tt-poll__hint{margin:12px 0 16px;color:#9b9a97;font-size:12px;}.tt-poll__toast,.tt-poll__error{color:rgb(245, 74, 69);font-size:12px;}.tt-poll__back{margin-bottom:8px;padding:0;border:0;background:none;color:#1456f0;font:inherit;cursor:pointer;}.tt-poll__more{position:relative;}.tt-poll__more-btn{width:28px;height:22px;padding:0;border:0;border-radius:6px;background:none;color:#1456f0;font:inherit;font-weight:700;cursor:pointer;}.tt-poll__more-btn:hover{background:rgba(20, 86, 240, 0.15);}.tt-poll__menu{position:absolute;top:100%;right:0;z-index:5;display:flex;flex-direction:column;min-width:140px;padding:4px;border:1px solid transparent;border-radius:10px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);}.tt-poll__menu button{padding:6px 8px;border:0;border-radius:6px;background:none;color:#2c2c2b;font:inherit;text-align:left;white-space:nowrap;cursor:pointer;}.tt-poll__menu button:hover{background:rgba(42, 28, 0, 0.07);}.tt-poll__due{padding-bottom:12px;}.tt-poll__due input{box-sizing:border-box;width:100%;height:32px;padding:0 8px;border:1px solid rgba(28, 19, 1, 0.11);border-radius:6px;font:inherit;}.tt-poll__due input[aria-invalid="true"]{border-color:rgb(245, 74, 69);}.tt-poll-option+.tt-poll-option{margin-top:10px;}.tt-poll-option--edit{display:flex;align-items:center;gap:8px;}.tt-poll-option__mark{flex:none;width:14px;height:14px;border:1px solid #8f959e;border-radius:50%;}.tt-poll-option__mark.multiple{border-radius:3px;}.tt-poll-option__mark.is-checked{margin-top:4px;border-color:#1677ff;background:#1677ff;box-shadow:inset 0 0 0 3px #fff;}.tt-poll-option__mark.multiple.is-checked{box-shadow:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat,rgb(51, 109, 244);}.tt-poll-option__input{flex:1;box-sizing:border-box;height:32px;padding:0 11px;border:1px solid transparent;border-radius:6px;background:rgba(42, 28, 0, 0.03);color:inherit;font:inherit;}.tt-poll-option__input::placeholder{color:#9b9a97;}.tt-poll-option__input:focus{outline:none;border-color:rgb(51, 109, 244);}.tt-poll-option__delete{flex:none;width:32px;height:32px;border:0;border-radius:6px;background:none;color:#787774;font-size:18px;cursor:pointer;}.tt-poll-option__delete:hover{background:rgba(42, 28, 0, 0.07);color:#2b2f36;}.tt-poll-option__row{display:flex;align-items:flex-start;gap:12px;}.tt-poll-option__row.is-votable{cursor:pointer;}.tt-poll-option__row input{flex:none;margin:4px 0 0;accent-color:rgb(51, 109, 244);}.tt-poll-option__text{flex:1;word-break:break-word;}.tt-poll-option.is-mine .tt-poll-option__text{color:#1456f0;font-weight:700;}.tt-poll-option__result{padding-left:0;margin-top:5px;}.tt-poll-option__stats{display:flex;align-items:center;gap:8px;margin-top:4px;font-size:12px;color:#787774;}.tt-poll-option__count{display:inline-block;min-width:36px;}.tt-poll-option__voters{display:inline-flex;margin-left:auto;padding:0;border:0;background:none;cursor:pointer;}.tt-poll-option__voters .tt-poll-avatar+.tt-poll-avatar{margin-left:-4px;}.tt-poll-progress{width:100%;height:4px;border-radius:6px;background:rgba(31, 35, 41, 0.1);}.tt-poll-progress__bar{height:100%;border-radius:6px;background:#1677ff;transition:width 0.2s;}.tt-poll-avatar{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;width:20px;height:20px;border-radius:50%;box-shadow:0 0 0 2px #fff;background:#c2d4ff;color:#1456f0;font-size:10px;}.tt-poll-avatar img{width:100%;height:100%;object-fit:cover;}.tt-poll-config+.tt-poll-config{border-top:1px solid rgba(31, 35, 41, 0.15);padding-top:12px;}.tt-poll-config__row{display:flex;align-items:center;justify-content:space-between;height:32px;padding-bottom:12px;box-sizing:content-box;}.tt-poll-switch{position:relative;width:28px;height:16px;margin-left:14px;padding:0;border:0;border-radius:8px;background:#bbbfc4;cursor:pointer;transition:background 0.2s;}.tt-poll-switch__thumb{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:left 0.2s;}.tt-poll-switch[aria-checked="true"]{background:#1677ff;}.tt-poll-switch[aria-checked="true"] .tt-poll-switch__thumb{left:14px;}.tt-poll-dialog{box-sizing:border-box;width:400px;max-width:calc(100vw - 32px);padding:24px;border-radius:10px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);color:#2c2c2b;font-size:14px;line-height:22px;}.tt-poll-dialog__mask{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(31, 35, 41, 0.4);}.tt-poll-dialog__title{margin-bottom:12px;font-size:16px;font-weight:600;}.tt-poll-dialog__footer{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;}.tt-poll-voters{max-height:320px;overflow:auto;margin:0;padding:0;list-style:none;}.tt-poll-voters li{display:flex;align-items:center;gap:8px;padding:6px 0;}.tt-poll-voters__name{flex:1;}.tt-poll-voters__time{flex-shrink:0;color:#787774;font-size:12px;}.tt-reminder{padding:0.125em 0.25em 0.125em 1.125em;margin-left:0.25em;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.002 16a7.5 7.5 0 110-15 7.5 7.5 0 110 15zm0-1.5A6 6 0 102 8.5a6 6 0 006.001 6zM8.75 8h2.601c.22 0 .4.18.4.4v.7a.4.4 0 01-.4.4H7.65a.399.399 0 01-.4-.4V5.4c0-.22.18-.4.4-.4h.7c.221 0 .4.18.4.4V8zM3.47.293a.728.728 0 010 1.036l-2.147 2.12a.746.746 0 01-1.048 0 .728.728 0 010-1.035L2.42.293a.746.746 0 011.049 0zm9.055 0a.746.746 0 011.048 0l2.147 2.121a.728.728 0 010 1.036.746.746 0 01-1.049 0l-2.146-2.121a.728.728 0 010-1.036z' fill='%233370FF' fill-rule='nonzero'/%3E%3C/svg%3E");background-size:0.875em;background-position:0 56%;background-repeat:no-repeat;color:var(--tt-reminder-blue, #1456f0);cursor:pointer;word-break:keep-all;white-space:nowrap;}.tt-reminder.orange{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.002 16a7.5 7.5 0 110-15 7.5 7.5 0 110 15zm0-1.5A6 6 0 102 8.5a6 6 0 006.001 6zM8.75 8h2.601c.22 0 .4.18.4.4v.7a.4.4 0 01-.4.4H7.65a.399.399 0 01-.4-.4V5.4c0-.22.18-.4.4-.4h.7c.221 0 .4.18.4.4V8zM3.47.293a.728.728 0 010 1.036l-2.147 2.12a.746.746 0 01-1.048 0 .728.728 0 010-1.035L2.42.293a.746.746 0 011.049 0zm9.055 0a.746.746 0 011.048 0l2.147 2.121a.728.728 0 010 1.036.746.746 0 01-1.049 0l-2.146-2.121a.728.728 0 010-1.036z' fill='%23F80' fill-rule='nonzero'/%3E%3C/svg%3E");color:var(--tt-reminder-orange, #ed6d0c);}.tt-reminder.red{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.002 16a7.5 7.5 0 110-15 7.5 7.5 0 110 15zm0-1.5A6 6 0 102 8.5a6 6 0 006.001 6zM8.75 8h2.601c.22 0 .4.18.4.4v.7a.4.4 0 01-.4.4H7.65a.399.399 0 01-.4-.4V5.4c0-.22.18-.4.4-.4h.7c.221 0 .4.18.4.4V8zM3.47.293a.728.728 0 010 1.036l-2.147 2.12a.746.746 0 01-1.048 0 .728.728 0 010-1.035L2.42.293a.746.746 0 011.049 0zm9.055 0a.746.746 0 011.048 0l2.147 2.121a.728.728 0 010 1.036.746.746 0 01-1.049 0l-2.146-2.121a.728.728 0 010-1.036z' fill='%23F54A45' fill-rule='nonzero'/%3E%3C/svg%3E");color:var(--tt-reminder-red, #f54a45);}.tt-reminder.should-notify{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.002 16a7.5 7.5 0 110-15 7.5 7.5 0 110 15zM3.469.293a.728.728 0 010 1.036l-2.147 2.12a.746.746 0 01-1.048 0 .728.728 0 010-1.035L2.42.293a.746.746 0 011.049 0zm9.055 0a.746.746 0 011.048 0l2.147 2.121a.728.728 0 010 1.036.746.746 0 01-1.049 0l-2.146-2.121a.728.728 0 010-1.036zM8.75 8V5.4a.4.4 0 00-.4-.4h-.7a.4.4 0 00-.4.4v3.7a.399.399 0 00.4.4h3.701a.4.4 0 00.4-.4v-.7a.4.4 0 00-.4-.4h-2.6z' fill='%233370FF' fill-rule='nonzero'/%3E%3C/svg%3E");}.tt-reminder.should-notify.orange{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.002 16a7.5 7.5 0 110-15 7.5 7.5 0 110 15zM3.469.293a.728.728 0 010 1.036l-2.147 2.12a.746.746 0 01-1.048 0 .728.728 0 010-1.035L2.42.293a.746.746 0 011.049 0zm9.055 0a.746.746 0 011.048 0l2.147 2.121a.728.728 0 010 1.036.746.746 0 01-1.049 0l-2.146-2.121a.728.728 0 010-1.036zM8.75 8V5.4a.4.4 0 00-.4-.4h-.7a.4.4 0 00-.4.4v3.7a.399.399 0 00.4.4h3.701a.4.4 0 00.4-.4v-.7a.4.4 0 00-.4-.4h-2.6z' fill='%23F80' fill-rule='nonzero'/%3E%3C/svg%3E");}.tt-reminder.should-notify.red{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.002 16a7.5 7.5 0 110-15 7.5 7.5 0 110 15zM3.469.293a.728.728 0 010 1.036l-2.147 2.12a.746.746 0 01-1.048 0 .728.728 0 010-1.035L2.42.293a.746.746 0 011.049 0zm9.055 0a.746.746 0 011.048 0l2.147 2.121a.728.728 0 010 1.036.746.746 0 01-1.049 0l-2.146-2.121a.728.728 0 010-1.036zM8.75 8V5.4a.4.4 0 00-.4-.4h-.7a.4.4 0 00-.4.4v3.7a.399.399 0 00.4.4h3.701a.4.4 0 00.4-.4v-.7a.4.4 0 00-.4-.4h-2.6z' fill='%23F54A45' fill-rule='nonzero'/%3E%3C/svg%3E");}.tt-reminder.uneditable{cursor:auto;}td .tt-reminder,th .tt-reminder,.tt-column .tt-reminder{white-space:normal;word-break:break-word;}.tt-reminder-wrap[data-selected="true"] .tt-reminder{border-radius:2px;background-color:var(--tt-selection-color, rgba(51, 112, 255, 0.2));}.tt-reminder-popover-layer{z-index:1000;padding:5px 0 10px;}.tt-reminder-popover{box-sizing:border-box;min-width:280px;max-width:360px;padding-bottom:20px;border:1px solid transparent;border-radius:10px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);font-size:14px;color:#2c2c2b;}.tt-reminder-popover--simple{width:280px;padding-bottom:12px;}.tt-reminder-popover__date{height:48px;line-height:48px;border-bottom:1px solid rgba(42, 28, 0, 0.07);font-size:16px;text-align:center;}.tt-reminder-popover__users{display:flex;align-items:center;gap:8px;padding:12px 16px 0;font-size:12px;color:#9b9a97;}.tt-reminder-popover__options{padding:0 24px;border-top:1px solid rgba(42, 28, 0, 0.07);}.tt-reminder-popover__row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;}.tt-reminder-popover__row:first-child{margin-top:20px;}.tt-reminder-popover__check{display:flex;align-items:center;gap:8px;white-space:nowrap;cursor:pointer;}.tt-reminder-popover__select{box-sizing:border-box;min-width:174px;height:32px;padding:0 8px;border:1px solid var(--tt-border-color, #d0d3d6);border-radius:6px;font:inherit;color:inherit;background:transparent;outline:none;}.tt-reminder-popover__select:hover,.tt-reminder-popover__select:focus{border-color:#1677ff;}.tt-reminder-calendar{padding:12px 16px;}.tt-reminder-calendar__head{display:flex;align-items:center;gap:4px;margin-bottom:8px;}.tt-reminder-calendar__head button{width:24px;height:24px;padding:0;border:0;border-radius:6px;color:#787774;background:none;cursor:pointer;}.tt-reminder-calendar__head button:hover{background:rgba(42, 28, 0, 0.07);}.tt-reminder-calendar__title{flex:1;font-weight:500;text-align:center;}.tt-reminder-calendar__grid{display:grid;grid-template-columns:repeat(7, 1fr);gap:2px;text-align:center;}.tt-reminder-calendar__week{line-height:28px;font-size:12px;color:#9b9a97;}.tt-reminder-calendar__cell{height:28px;padding:0;border:0;border-radius:6px;font:inherit;color:inherit;background:none;cursor:pointer;}.tt-reminder-calendar__cell:hover{background:rgba(42, 28, 0, 0.07);}.tt-reminder-calendar__cell.is-other{color:#bbbfc4;}.tt-reminder-calendar__cell.is-today{color:#1677ff;font-weight:500;}.tt-reminder-calendar__cell.is-selected{color:#fff;background:#1677ff;}.tt-reminder-calendar__cell.is-selected.orange{background:#ff8800;}.tt-reminder-calendar__cell.is-selected.red{background:#f54a45;}.tt-reminder-time{position:relative;}.tt-reminder-time__list{position:absolute;top:36px;right:0;left:0;z-index:2061;max-height:200px;overflow-y:auto;padding:4px;border:1px solid transparent;border-radius:10px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);}.tt-reminder-time__item{display:block;width:100%;height:32px;padding:0 8px;border:0;border-radius:6px;font:inherit;color:inherit;text-align:left;background:none;cursor:pointer;}.tt-reminder-time__item:hover,.tt-reminder-time__item[aria-selected="true"]{background:rgba(42, 28, 0, 0.07);}.tt-synced-block{--tt-synced-a:20,86,240;--tt-synced-b:76,136,255;--tt-synced-c:133,216,255;position:relative;margin:0 -11.5px;padding:8px 10px;border:1.5px solid transparent;border-radius:10px;background-clip:padding-box,border-box;background-origin:border-box;background-image:linear-gradient(var(--tt-bg-color, #fff), var(--tt-bg-color, #fff)),linear-gradient(135deg, rgba(var(--tt-synced-a), 0), rgba(var(--tt-synced-b), 0), rgba(var(--tt-synced-c), 0));transition:background-image 0.15s;}.tt-synced-block.hovered{background-image:linear-gradient(var(--tt-bg-color, #fff), var(--tt-bg-color, #fff)),linear-gradient(135deg, rgba(var(--tt-synced-a), 0.5), rgba(var(--tt-synced-b), 0.7), rgba(var(--tt-synced-c), 0.7));}.tt-synced-block.active{background-image:linear-gradient(var(--tt-bg-color, #fff), var(--tt-bg-color, #fff)),linear-gradient(135deg, rgb(var(--tt-synced-a)), rgb(var(--tt-synced-b)), rgb(var(--tt-synced-c)));}.tt-synced-block.ProseMirror-selectednode,.tt-block-selected>.tt-synced-block{border-color:#245bdb;background-image:none;}.tt-synced-block__content>:first-child{margin-top:0;}.tt-synced-block__content>:last-child{margin-bottom:0;}.tt-synced-bar{position:absolute;right:11.5px;bottom:calc(100% + 4px);z-index:20;display:flex;align-items:center;gap:4px;box-sizing:border-box;height:40px;padding:0 8px 0 7px;border:1px solid transparent;border-radius:8px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);font-size:14px;color:#2c2c2b;white-space:nowrap;user-select:none;}.tt-synced-bar__count{display:flex;align-items:center;gap:4px;padding:0 4px;color:#787774;}.tt-synced-bar__divider{width:1px;height:24px;background:var(--tt-border-color, #dee0e3);}.tt-synced-bar__btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:6px;color:#2c2c2b;background:none;cursor:pointer;}.tt-synced-bar__btn:hover,.tt-synced-bar__btn[aria-expanded="true"]{background:rgba(42, 28, 0, 0.07);}.tt-synced-bar__more-wrap{position:relative;}.tt-synced-bar__menu{position:absolute;top:32px;right:0;min-width:160px;padding:4px;border:1px solid transparent;border-radius:10px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);}.tt-synced-bar__menu button{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:0 8px;border:0;border-radius:6px;font:inherit;color:inherit;text-align:left;background:none;cursor:pointer;}.tt-synced-bar__menu button:hover{background:rgba(42, 28, 0, 0.07);}.expandable-menu-button{--button-size:16px;--button-offset:-8px;--dot-size-small:8px;--dot-size-large:16px;--dot-offset-small:3px;--dot-offset-large:0;--border-radius-full:9999px;--transition-duration:0.05s;--transition-timing:ease;--icon-scale-small:0.9;--icon-scale-large:1;position:absolute;top:50%;right:var(--button-offset);transform:translateY(-50%);width:var(--button-size);height:var(--button-size);background:transparent;border-radius:var(--border-radius-full);cursor:pointer;display:flex;align-items:center;justify-content:center;pointer-events:auto;}.expandable-menu-button::before{content:"";position:absolute;top:50%;right:var(--dot-offset-small);width:var(--dot-size-small);height:var(--dot-size-small);background:var(--tt-brand-color-600);border-radius:var(--border-radius-full);transform:translateY(-50%);transition:width var(--transition-duration) var(--transition-timing),height var(--transition-duration) var(--transition-timing),right var(--transition-duration) var(--transition-timing),background var(--transition-duration) var(--transition-timing);}.expandable-menu-button svg{position:relative;z-index:1;width:var(--button-size);height:var(--button-size);color:var(--white);opacity:0;transform:scale(var(--icon-scale-small));transition:opacity var(--transition-duration) var(--transition-timing),transform var(--transition-duration) var(--transition-timing);pointer-events:none;flex-shrink:0;}@media (hover: none) and (pointer: coarse){.expandable-menu-button::before{width:var(--dot-size-large);height:var(--dot-size-large);right:var(--dot-offset-large);}.expandable-menu-button svg{opacity:1;transform:scale(var(--icon-scale-large));}}@media (hover: hover){.expandable-menu-button:hover::before,.expandable-menu-button:focus-visible::before,.expandable-menu-button.menu-opened::before{width:var(--dot-size-large);height:var(--dot-size-large);right:var(--dot-offset-large);}.expandable-menu-button:hover svg,.expandable-menu-button:focus-visible svg,.expandable-menu-button.menu-opened svg{opacity:1;transform:scale(var(--icon-scale-large));}}.expandable-menu-button:focus-visible{outline:2px solid var(--tt-brand-color-600);outline-offset:2px;}.expandable-menu-button:disabled{cursor:not-allowed;opacity:0.5;}.expandable-menu-button:disabled::before{background:var(--tt-disabled-color, #ccc);}@media (prefers-reduced-motion: reduce){.expandable-menu-button::before,.expandable-menu-button svg{transition:none;}}.tt-cell-toolbar{position:fixed;z-index:60;display:flex;align-items:center;gap:4px;padding:4px;border:1px solid transparent;border-radius:10px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);color:#2c2c2b;}.tt-cell-toolbar__wrap{position:relative;}.tt-cell-toolbar__btn{display:inline-flex;align-items:center;gap:2px;height:28px;min-width:28px;padding:0 4px;border:0;border-radius:6px;color:inherit;background:none;cursor:pointer;}.tt-cell-toolbar__btn:hover:not(:disabled),.tt-cell-toolbar__btn[aria-expanded="true"],.tt-cell-toolbar__btn[data-active="true"]{background:rgba(42, 28, 0, 0.07);}.tt-cell-toolbar__btn:disabled{color:#9b9a97;cursor:not-allowed;}.tt-cell-toolbar__icon{width:16px;height:16px;}.tt-cell-toolbar__caret{width:10px;height:10px;}.tt-cell-toolbar__menu{position:absolute;top:calc(100% + 8px);left:0;min-width:168px;padding:4px;border:1px solid transparent;border-radius:10px;background:#ffffff;box-shadow:0px 8px 12px 0px rgba(25, 25, 25, 0.027),0px 2px 6px 0px rgba(25, 25, 25, 0.027),0px 0px 0px 1px rgba(42, 28, 0, 0.07);}.tt-cell-toolbar__title{padding:4px 8px;font-size:12px;color:#9b9a97;}.tt-cell-toolbar__swatches{display:grid;grid-template-columns:repeat(8, 20px);gap:6px;padding:4px 8px 8px;}.tt-cell-toolbar__swatch{width:20px;height:20px;padding:0;border:1px solid rgba(31, 35, 41, 0.15);border-radius:4px;cursor:pointer;}.tt-cell-toolbar__item{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:0 8px;border:0;border-radius:6px;font:inherit;font-size:14px;color:inherit;background:none;cursor:pointer;white-space:nowrap;}.tt-cell-toolbar__item:hover,.tt-cell-toolbar__item[data-active="true"]{background:rgba(42, 28, 0, 0.07);}.tt-cell-toolbar__divider{height:1px;margin:4px 0;background:rgba(42, 28, 0, 0.07);}:root{--tt-table-handle-bg-color:var(--tt-gray-light-a-100);--tt-table-extend-icon-color:var(--tt-gray-light-a-400);}.tiptap-table-extend-row-column-button{border:none;display:flex;align-items:center;justify-content:center;background-color:rgba(42, 28, 0, 0.07);border-radius:var(--tt-radius-lg);}.tiptap-table-extend-row-column-button .tiptap-button-icon{width:1rem;height:1rem;flex-shrink:0;color:var(--tt-table-extend-icon-color);}.tiptap-table-extend-row-column-button.tiptap-table-row-end-add-remove{width:100%;height:0.75rem;cursor:row-resize;}.tiptap-table-extend-row-column-button.tiptap-table-column-end-add-remove{width:0.75rem;cursor:col-resize;}:root{--tt-table-handle-bg-color:var(--tt-gray-light-a-100);}.tiptap-table-handle-menu{border:none;display:flex;align-items:center;justify-content:center;background-color:rgba(42, 28, 0, 0.07);border-radius:var(--tt-radius-lg);cursor:grab;}.tiptap-table-handle-menu .tiptap-button-icon{width:1rem;height:1rem;flex-shrink:0;}.tiptap-table-handle-menu.menu-opened{background-color:var(--tt-brand-color-500);}.tiptap-table-handle-menu.menu-opened .tiptap-button-icon{color:var(--white);}.tiptap-table-handle-menu.is-dragging{cursor:grabbing;background-color:var(--tt-brand-color-500);}.tiptap-table-handle-menu.is-dragging .tiptap-button-icon{color:var(--white);}.tiptap-table-handle-menu.row{width:0.75rem;height:var(--table-handle-ref-height);}.tiptap-table-handle-menu.column{height:0.75rem;width:var(--table-handle-ref-width);}.tiptap-table-handle-menu.column .tiptap-button-icon{transform:rotate(90deg);}.tt-table-insert-zone{position:fixed;z-index:4;display:flex;align-items:center;justify-content:center;cursor:pointer;}.tt-table-insert-point{width:3px;height:3px;border-radius:50%;background:#bbbfc4;}.tt-table-add-line{position:fixed;z-index:5;pointer-events:none;background:#1677ff;}.tt-table-add-line--col{width:2px;}.tt-table-add-line--row{height:2px;}.tt-table-add-btn{position:fixed;z-index:6;display:flex;align-items:center;justify-content:center;width:22px;height:24px;padding:0;border:0;border-radius:50%;color:#fff;background:#1677ff;cursor:pointer;animation:tt-table-add-in 0.2s ease;}.tt-table-add-btn__icon{width:14px;height:14px;}.tt-table-add-btn__tip{position:absolute;bottom:calc(100% + 6px);left:50%;padding:2px 8px;border-radius:4px;transform:translateX(-50%);font-size:12px;line-height:20px;white-space:nowrap;color:#fff;background:rgba(31, 35, 41, 0.9);pointer-events:none;}@keyframes tt-table-add-in{from{transform:scale(0);}to{transform:scale(1);}}:root{--tt-bg:var(--white);--tt-selected-bg-color:var(--tt-brand-color-50);--tt-selected-border-color:var(--tt-brand-color-400);--tt-cell-bg-color:var(--tt-gray-light-50);--tt-cell-border-color:var(--tt-gray-light-200);--tt-indicator-item-border-color:var(--tt-gray-light-a-200);--tt-indicator-icon-color:var(--tt-gray-light-a-400);--tt-indicator-delimiter-color:var(--tt-gray-light-a-500);}.tiptap-table-grid{display:grid;gap:0.25rem;padding:0.25rem;grid-template-columns:repeat(var(--tt-table-columns), 1rem);}.tiptap-button[data-size="small"].tiptap-table-grid-cell{width:1rem;height:1rem;min-width:1rem;padding:0;border:1px solid var(--tt-cell-border-color);border-radius:var(--tt-radius-xs);background-color:var(--tt-cell-bg-color);cursor:pointer;transition:all 150ms ease;}.tiptap-button[data-size="small"].tiptap-table-grid-cell.selected{background-color:var(--tt-selected-bg-color);border-color:var(--tt-selected-border-color);}.tiptap-table-size-indicator{display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;margin-top:0.25rem;}.tiptap-table-size-indicator-item{display:flex;flex:1;align-items:center;justify-content:center;gap:0.75rem;min-height:2rem;padding:0.5rem;border:1px solid rgba(28, 19, 1, 0.11);border-radius:6px;background:var(--tt-bg);}.tiptap-table-size-indicator-item .tiptap-table-column-icon,.tiptap-table-size-indicator-item .tiptap-table-row-icon{width:1rem;height:1rem;color:var(--tt-indicator-icon-color);}.tiptap-table-size-indicator-text{width:1.781rem;font-size:0.875rem;font-weight:400;text-align:center;}.tiptap-table-size-indicator-delimiter{flex-shrink:0;font-size:0.75rem;font-weight:500;color:var(--tt-indicator-delimiter-color);}.tiptap.ProseMirror .node-tocNode.ProseMirror-selectednode{border-radius:var(--tt-radius-md);background-color:var(--tt-selection-color);}.tiptap.ProseMirror a.tiptap-table-of-contents-item{color:var(--tt-toc-node-text-color);text-decoration:underline var(--tt-toc-node-underline-color);text-underline-offset:4px;}.tiptap-table-of-contents-node{margin:1.5rem 0;--toc-indent:1.5rem;--toc-depth-factor:1;--tt-toc-node-text-color:var(--tt-gray-light-a-600);--tt-toc-node-text-hover-color:var(--tt-gray-light-a-800);--tt-toc-node-bg-hover-color:var(--tt-gray-light-a-100);--tt-toc-node-underline-color:var(--tt-gray-light-a-300);--tt-toc-node-underline-hover-color:var(--tt-gray-light-a-400);}.tiptap-table-of-contents-node .tiptap-table-of-contents-empty{padding:1rem;text-align:center;color:var(--tt-toc-node-text-color);font-size:0.875rem;}.tiptap-table-of-contents-node .tiptap-table-of-contents-title{font-size:0.75rem;font-weight:600;color:var(--tt-toc-node-text-hover-color);margin-bottom:0.5rem;}.tiptap-table-of-contents-node .tiptap-table-of-contents-list{margin:0;padding:0;}.tiptap-table-of-contents-node .tiptap-table-of-contents-item{display:flex;align-items:center;height:1.875rem;font-size:0.875rem;font-weight:400;border-radius:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;user-select:none;cursor:pointer;padding-inline-start:calc(
|
|
829
829
|
var(--toc-indent) * (var(--toc-depth, 1) - 1) * var(--toc-depth-factor)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4399ywkf/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "4399 多格式文档编辑器:doc(tiptap) / sheet(univer) / pdf / pptx,含 docx·xlsx·csv 双向导入导出与 AI 可驱动的结构化编辑面(./doc-runtime、./sheet-runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"types": "./dist/doc.d.ts",
|
|
15
15
|
"import": "./dist/doc.js"
|
|
16
16
|
},
|
|
17
|
+
"./doc-standalone": {
|
|
18
|
+
"types": "./dist/doc.d.ts",
|
|
19
|
+
"import": "./dist/doc-standalone.js"
|
|
20
|
+
},
|
|
17
21
|
"./sheet": {
|
|
18
22
|
"types": "./dist/sheet.d.ts",
|
|
19
23
|
"import": "./dist/sheet.js"
|
|
@@ -82,9 +86,11 @@
|
|
|
82
86
|
"@tiptap/extension-highlight": "^3.30.0",
|
|
83
87
|
"@tiptap/extension-horizontal-rule": "^3.30.0",
|
|
84
88
|
"@tiptap/extension-image": "^3.30.0",
|
|
89
|
+
"@tiptap/extension-link": "^3.30.0",
|
|
85
90
|
"@tiptap/extension-list": "^3.30.0",
|
|
86
91
|
"@tiptap/extension-mathematics": "^3.30.0",
|
|
87
92
|
"@tiptap/extension-mention": "^3.30.0",
|
|
93
|
+
"@tiptap/extension-paragraph": "^3.30.0",
|
|
88
94
|
"@tiptap/extension-strike": "^3.30.0",
|
|
89
95
|
"@tiptap/extension-subscript": "^3.30.0",
|
|
90
96
|
"@tiptap/extension-superscript": "^3.30.0",
|
|
@@ -110,6 +116,7 @@
|
|
|
110
116
|
"react-hotkeys-hook": "^5.3.2",
|
|
111
117
|
"react-textarea-autosize": "^8.5.9",
|
|
112
118
|
"shiki": "^4.4.3",
|
|
119
|
+
"use-sync-external-store": "^1.4.0",
|
|
113
120
|
"yjs": "^13.6.30",
|
|
114
121
|
"stylis": "^4.4.0"
|
|
115
122
|
},
|
|
@@ -211,9 +218,9 @@
|
|
|
211
218
|
],
|
|
212
219
|
"license": "ISC",
|
|
213
220
|
"scripts": {
|
|
214
|
-
"build": "tsup && node --experimental-strip-types scripts/build-styles.mjs",
|
|
221
|
+
"build": "tsup && tsup --config tsup.standalone.config.ts && node --experimental-strip-types scripts/build-styles.mjs",
|
|
215
222
|
"dev": "tsup --watch",
|
|
216
|
-
"test": "node --experimental-strip-types --test src/docx/*.test.ts src/doc-runtime/*.test.ts src/sheet-runtime/*.test.ts src/slide-runtime/*.test.ts src/xlsx/*.test.ts src/*.test.ts src/lib/*.test.ts src/plugins/**/*.test.ts src/components/tiptap-node/code-block-node/*.test.ts src/components/tiptap-templates/notion-like/*.test.ts src/components/tiptap-node/collapsible-node/*.test.ts src/components/tiptap-node/heading-node/*.test.ts src/components/tiptap-node/column-node/*.test.ts src/components/tiptap-node/table-node/extensions/*.test.ts src/components/tiptap-node/table-node/lib/*.test.ts src/components/tiptap-node/math-node/*.test.ts src/components/tiptap-node/image-node/*.test.ts src/components/tiptap-node/page-header-node/*.test.ts src/components/tiptap-node/embed-node/*.test.ts src/components/tiptap-ui/color-menu/*.test.ts src/components/tiptap-node/diagram-node/*.test.ts src/components/tiptap-node/bookmark-node/*.test.ts src/components/tiptap-node/file-attachment-node/*.test.ts src/components/tiptap-node/media-upload-placeholder-node/*.test.ts src/components/tiptap-node/inline-button-node/*.test.ts src/components/tiptap-node/poll-node/*.test.ts src/components/tiptap-node/reminder-node/*.test.ts src/components/tiptap-node/agenda-node/*.test.ts src/components/tiptap-node/synced-block-node/*.test.ts src/components/tiptap-node/mermaid-node/*.test.ts src/components/tiptap-node/mention-node/*.test.ts src/components/tiptap-extension/block-selection/*.test.ts src/components/tiptap-extension/feishu-keymap/*.test.ts src/components/tiptap-extension/list-fold/*.test.ts src/theme/*.test.ts src/components/tiptap-extension/read-only-guard/*.test.ts",
|
|
223
|
+
"test": "node --experimental-strip-types --test src/docx/*.test.ts src/doc-runtime/*.test.ts src/sheet-runtime/*.test.ts src/slide-runtime/*.test.ts src/xlsx/*.test.ts src/*.test.ts src/lib/*.test.ts src/plugins/**/*.test.ts src/components/tiptap-node/code-block-node/*.test.ts src/components/tiptap-templates/notion-like/*.test.ts src/components/tiptap-node/collapsible-node/*.test.ts src/components/tiptap-node/heading-node/*.test.ts src/components/tiptap-node/column-node/*.test.ts src/components/tiptap-node/table-node/extensions/*.test.ts src/components/tiptap-node/table-node/lib/*.test.ts src/components/tiptap-node/math-node/*.test.ts src/components/tiptap-node/image-node/*.test.ts src/components/tiptap-node/page-header-node/*.test.ts src/components/tiptap-node/embed-node/*.test.ts src/components/tiptap-ui/color-menu/*.test.ts src/components/tiptap-node/diagram-node/*.test.ts src/components/tiptap-node/bookmark-node/*.test.ts src/components/tiptap-node/file-attachment-node/*.test.ts src/components/tiptap-node/media-upload-placeholder-node/*.test.ts src/components/tiptap-node/inline-button-node/*.test.ts src/components/tiptap-node/poll-node/*.test.ts src/components/tiptap-node/reminder-node/*.test.ts src/components/tiptap-node/agenda-node/*.test.ts src/components/tiptap-node/synced-block-node/*.test.ts src/components/tiptap-node/mermaid-node/*.test.ts src/components/tiptap-node/mention-node/*.test.ts src/components/tiptap-extension/block-selection/*.test.ts src/components/tiptap-extension/feishu-keymap/*.test.ts src/components/tiptap-extension/list-fold/*.test.ts src/theme/*.test.ts src/components/tiptap-extension/read-only-guard/*.test.ts src/components/tiptap-extension/rich-text-markdown/*.test.ts",
|
|
217
224
|
"typecheck": "tsc --noEmit"
|
|
218
225
|
}
|
|
219
226
|
}
|