@forgedevstack/ink 1.1.8 → 1.2.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/CHANGELOG.md +25 -1
- package/dist/common-components/Box/Box.cjs +1 -1
- package/dist/common-components/Box/Box.js +7 -6
- package/dist/common-components/Button/Button.cjs +1 -1
- package/dist/common-components/Button/Button.js +9 -8
- package/dist/common-components/Canvas/Canvas.cjs +1 -1
- package/dist/common-components/Canvas/Canvas.js +3 -2
- package/dist/common-components/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/common-components/ContextMenu/ContextMenu.js +3 -2
- package/dist/common-components/Field/Field.cjs +1 -1
- package/dist/common-components/Field/Field.js +11 -10
- package/dist/common-components/icons/GripIcon.cjs +1 -1
- package/dist/common-components/icons/GripIcon.js +3 -2
- package/dist/components/InkEditor/InkEditor.cjs +1 -1
- package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.js +1301 -1006
- package/dist/components/InkEditor/components/AiPanel/AiPanel.cjs +1 -1
- package/dist/components/InkEditor/components/AiPanel/AiPanel.js +13 -12
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.cjs +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.cjs +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.d.ts +20 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.const.js +25 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.d.ts +4 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.js +61 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.types.d.ts +11 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.cjs +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.d.ts +19 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.js +30 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.test.d.ts +2 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/AiSelectionBubble.utils.test.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/index.d.ts +4 -0
- package/dist/components/InkEditor/components/AiSelectionBubble/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.cjs +1 -1
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.js +7 -6
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.cjs +1 -1
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.d.ts +2 -0
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.d.ts.map +1 -1
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.js +16 -15
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.cjs +1 -1
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.js +14 -13
- package/dist/components/InkEditor/components/FindReplace/FindReplace.cjs +1 -1
- package/dist/components/InkEditor/components/FindReplace/FindReplace.js +21 -20
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.cjs +1 -1
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.js +17 -16
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.cjs +1 -1
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.js +3 -2
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.cjs +1 -1
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.js +7 -6
- package/dist/components/InkEditor/components/ImageFrame/ImageFrame.cjs +1 -0
- package/dist/components/InkEditor/components/ImageFrame/ImageFrame.d.ts +8 -0
- package/dist/components/InkEditor/components/ImageFrame/ImageFrame.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ImageFrame/ImageFrame.js +54 -0
- package/dist/components/InkEditor/components/ImageFrame/index.d.ts +3 -0
- package/dist/components/InkEditor/components/ImageFrame/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.cjs +1 -1
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.js +11 -10
- package/dist/components/InkEditor/components/MentionMenu/MentionMenu.cjs +1 -0
- package/dist/components/InkEditor/components/MentionMenu/MentionMenu.d.ts +16 -0
- package/dist/components/InkEditor/components/MentionMenu/MentionMenu.d.ts.map +1 -0
- package/dist/components/InkEditor/components/MentionMenu/MentionMenu.js +21 -0
- package/dist/components/InkEditor/components/MentionMenu/index.d.ts +3 -0
- package/dist/components/InkEditor/components/MentionMenu/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.cjs +1 -1
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.js +11 -10
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.cjs +1 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.cjs +1 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.d.ts +7 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.const.js +9 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.d.ts +4 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.d.ts.map +1 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.js +83 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.types.d.ts +8 -0
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/PresenceStack/index.d.ts +3 -0
- package/dist/components/InkEditor/components/PresenceStack/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.cjs +1 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.cjs +1 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.d.ts +7 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.const.js +10 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.d.ts +4 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.d.ts.map +1 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.js +66 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.types.d.ts +6 -0
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/RemoteCursors/index.d.ts +3 -0
- package/dist/components/InkEditor/components/RemoteCursors/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.cjs +1 -1
- package/dist/components/InkEditor/components/SignPad/SignPad.js +7 -6
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.cjs +1 -1
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.js +7 -6
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.cjs +1 -1
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.cjs +1 -1
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.js +8 -7
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.js +7 -6
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.cjs +1 -1
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.js +7 -6
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.cjs +1 -1
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.js +3 -2
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.js +13 -12
- package/dist/components/InkEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +9 -8
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.js +9 -8
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.js +9 -8
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.js +19 -18
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.js +6 -5
- package/dist/components/InkEditor/components/VersionHistory/VersionHistory.cjs +1 -0
- package/dist/components/InkEditor/components/VersionHistory/VersionHistory.d.ts +11 -0
- package/dist/components/InkEditor/components/VersionHistory/VersionHistory.d.ts.map +1 -0
- package/dist/components/InkEditor/components/VersionHistory/VersionHistory.js +22 -0
- package/dist/components/InkEditor/components/VersionHistory/index.d.ts +3 -0
- package/dist/components/InkEditor/components/VersionHistory/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/index.d.ts +11 -0
- package/dist/components/InkEditor/components/index.d.ts.map +1 -1
- package/dist/components/InkEditor/helpers/format.utils.cjs +3 -2
- package/dist/components/InkEditor/helpers/format.utils.d.ts +1 -0
- package/dist/components/InkEditor/helpers/format.utils.d.ts.map +1 -1
- package/dist/components/InkEditor/helpers/format.utils.js +106 -84
- package/dist/components/InkEditor/helpers/index.d.ts +1 -1
- package/dist/components/InkEditor/helpers/index.d.ts.map +1 -1
- package/dist/components/InkTabs/InkTabs.cjs +1 -0
- package/dist/components/InkTabs/InkTabs.d.ts +4 -0
- package/dist/components/InkTabs/InkTabs.d.ts.map +1 -0
- package/dist/components/InkTabs/InkTabs.js +104 -0
- package/dist/components/InkTabs/index.d.ts +2 -0
- package/dist/components/InkTabs/index.d.ts.map +1 -0
- package/dist/components/InkWorkspace/InkWorkspace.cjs +1 -0
- package/dist/components/InkWorkspace/InkWorkspace.d.ts +4 -0
- package/dist/components/InkWorkspace/InkWorkspace.d.ts.map +1 -0
- package/dist/components/InkWorkspace/InkWorkspace.js +309 -0
- package/dist/components/InkWorkspace/components/WorkspaceIcons.cjs +1 -0
- package/dist/components/InkWorkspace/components/WorkspaceIcons.d.ts +11 -0
- package/dist/components/InkWorkspace/components/WorkspaceIcons.d.ts.map +1 -0
- package/dist/components/InkWorkspace/components/WorkspaceIcons.js +39 -0
- package/dist/components/InkWorkspace/hooks/useInkWorkspace.cjs +1 -0
- package/dist/components/InkWorkspace/hooks/useInkWorkspace.d.ts +30 -0
- package/dist/components/InkWorkspace/hooks/useInkWorkspace.d.ts.map +1 -0
- package/dist/components/InkWorkspace/hooks/useInkWorkspace.js +73 -0
- package/dist/components/InkWorkspace/index.d.ts +4 -0
- package/dist/components/InkWorkspace/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/constants/collab.const.cjs +1 -0
- package/dist/constants/collab.const.d.ts +20 -0
- package/dist/constants/collab.const.d.ts.map +1 -0
- package/dist/constants/collab.const.js +54 -0
- package/dist/constants/contextMenu.const.cjs +1 -1
- package/dist/constants/contextMenu.const.d.ts +8 -0
- package/dist/constants/contextMenu.const.d.ts.map +1 -1
- package/dist/constants/contextMenu.const.js +30 -22
- package/dist/constants/defaultIcons.cjs +1 -1
- package/dist/constants/defaultIcons.js +6 -5
- package/dist/constants/defaults.const.cjs +1 -1
- package/dist/constants/defaults.const.d.ts.map +1 -1
- package/dist/constants/defaults.const.js +150 -138
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/numbers.cjs +1 -1
- package/dist/constants/numbers.js +43 -37
- package/dist/constants/toolbar.const.cjs +1 -1
- package/dist/constants/toolbar.const.d.ts +7 -0
- package/dist/constants/toolbar.const.d.ts.map +1 -1
- package/dist/constants/toolbar.const.js +16 -9
- package/dist/constants/toolbarMenu.const.cjs +1 -1
- package/dist/constants/toolbarMenu.const.d.ts.map +1 -1
- package/dist/constants/toolbarMenu.const.js +25 -11
- package/dist/constants/workspace.const.cjs +1 -0
- package/dist/constants/workspace.const.d.ts +24 -0
- package/dist/constants/workspace.const.d.ts.map +1 -0
- package/dist/constants/workspace.const.js +23 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useInkCollaboration.cjs +1 -0
- package/dist/hooks/useInkCollaboration.d.ts +4 -0
- package/dist/hooks/useInkCollaboration.d.ts.map +1 -0
- package/dist/hooks/useInkCollaboration.js +87 -0
- package/dist/hooks/useToolbarOverflow.cjs +1 -1
- package/dist/hooks/useToolbarOverflow.js +12 -11
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +151 -135
- package/dist/plugins/ai/demoProvider.cjs +1 -1
- package/dist/plugins/ai/demoProvider.js +3 -2
- package/dist/plugins/ai/index.cjs +1 -1
- package/dist/plugins/ai/index.js +25 -24
- package/dist/plugins/excel/excel.utils.cjs +1 -1
- package/dist/plugins/excel/excel.utils.js +17 -16
- package/dist/plugins/graph/graph.utils.cjs +1 -1
- package/dist/plugins/graph/graph.utils.js +7 -6
- package/dist/plugins/titles/titles.const.cjs +1 -1
- package/dist/plugins/titles/titles.const.js +9 -8
- package/dist/plugins/titles/titles.utils.cjs +1 -1
- package/dist/plugins/titles/titles.utils.js +3 -2
- package/dist/styles.css +1 -1
- package/dist/types/collab.types.d.ts +54 -0
- package/dist/types/collab.types.d.ts.map +1 -0
- package/dist/types/features.types.d.ts +1 -1
- package/dist/types/features.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +3 -1
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/types/workspace.types.d.ts +54 -0
- package/dist/types/workspace.types.d.ts.map +1 -0
- package/dist/utils/blocks.utils.cjs +1 -1
- package/dist/utils/blocks.utils.js +19 -18
- package/dist/utils/collab.utils.cjs +1 -0
- package/dist/utils/collab.utils.d.ts +5 -0
- package/dist/utils/collab.utils.d.ts.map +1 -0
- package/dist/utils/collab.utils.js +33 -0
- package/dist/utils/collab.utils.test.d.ts +2 -0
- package/dist/utils/collab.utils.test.d.ts.map +1 -0
- package/dist/utils/comments.utils.cjs +1 -1
- package/dist/utils/comments.utils.d.ts +4 -0
- package/dist/utils/comments.utils.d.ts.map +1 -1
- package/dist/utils/comments.utils.js +26 -18
- package/dist/utils/comments.utils.test.d.ts +2 -0
- package/dist/utils/comments.utils.test.d.ts.map +1 -0
- package/dist/utils/exportDocument.utils.cjs +2 -0
- package/dist/utils/exportDocument.utils.d.ts +16 -0
- package/dist/utils/exportDocument.utils.d.ts.map +1 -0
- package/dist/utils/exportDocument.utils.js +85 -0
- package/dist/utils/exportDocument.utils.test.d.ts +2 -0
- package/dist/utils/exportDocument.utils.test.d.ts.map +1 -0
- package/dist/utils/formatPainter.utils.cjs +1 -0
- package/dist/utils/formatPainter.utils.d.ts +11 -0
- package/dist/utils/formatPainter.utils.d.ts.map +1 -0
- package/dist/utils/formatPainter.utils.js +20 -0
- package/dist/utils/formatPainter.utils.test.d.ts +2 -0
- package/dist/utils/formatPainter.utils.test.d.ts.map +1 -0
- package/dist/utils/history.utils.cjs +1 -1
- package/dist/utils/history.utils.js +3 -2
- package/dist/utils/image.utils.cjs +1 -0
- package/dist/utils/image.utils.d.ts +14 -0
- package/dist/utils/image.utils.d.ts.map +1 -0
- package/dist/utils/image.utils.js +33 -0
- package/dist/utils/image.utils.test.d.ts +2 -0
- package/dist/utils/image.utils.test.d.ts.map +1 -0
- package/dist/utils/index.d.ts +12 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/ink.brand.test.d.ts +2 -0
- package/dist/utils/ink.brand.test.d.ts.map +1 -0
- package/dist/utils/license.utils.cjs +1 -1
- package/dist/utils/license.utils.js +8 -7
- package/dist/utils/markdown.utils.cjs +11 -0
- package/dist/utils/markdown.utils.d.ts +7 -0
- package/dist/utils/markdown.utils.d.ts.map +1 -0
- package/dist/utils/markdown.utils.js +87 -0
- package/dist/utils/markdown.utils.test.d.ts +2 -0
- package/dist/utils/markdown.utils.test.d.ts.map +1 -0
- package/dist/utils/mentions.utils.cjs +1 -0
- package/dist/utils/mentions.utils.d.ts +13 -0
- package/dist/utils/mentions.utils.d.ts.map +1 -0
- package/dist/utils/mentions.utils.js +23 -0
- package/dist/utils/mentions.utils.test.d.ts +2 -0
- package/dist/utils/mentions.utils.test.d.ts.map +1 -0
- package/dist/utils/outline.utils.cjs +1 -1
- package/dist/utils/outline.utils.js +9 -8
- package/dist/utils/paste.utils.cjs +1 -1
- package/dist/utils/paste.utils.d.ts +2 -0
- package/dist/utils/paste.utils.d.ts.map +1 -1
- package/dist/utils/paste.utils.js +53 -19
- package/dist/utils/paste.utils.test.d.ts +2 -0
- package/dist/utils/paste.utils.test.d.ts.map +1 -0
- package/dist/utils/premium.utils.cjs +1 -1
- package/dist/utils/premium.utils.js +12 -11
- package/dist/utils/selection.utils.cjs +1 -1
- package/dist/utils/selection.utils.js +3 -2
- package/dist/utils/slash.utils.cjs +1 -1
- package/dist/utils/slash.utils.js +10 -9
- package/dist/utils/table.utils.cjs +1 -1
- package/dist/utils/table.utils.d.ts +8 -0
- package/dist/utils/table.utils.d.ts.map +1 -1
- package/dist/utils/table.utils.js +78 -54
- package/dist/utils/toolbarStorage.utils.cjs +1 -1
- package/dist/utils/toolbarStorage.utils.js +15 -14
- package/dist/utils/trackChanges.utils.cjs +1 -1
- package/dist/utils/trackChanges.utils.js +9 -8
- package/dist/utils/typo.utils.cjs +1 -1
- package/dist/utils/typo.utils.js +8 -7
- package/dist/utils/versions.utils.cjs +1 -0
- package/dist/utils/versions.utils.d.ts +11 -0
- package/dist/utils/versions.utils.d.ts.map +1 -0
- package/dist/utils/versions.utils.js +36 -0
- package/dist/utils/versions.utils.test.d.ts +2 -0
- package/dist/utils/versions.utils.test.d.ts.map +1 -0
- package/dist/utils/words.utils.cjs +1 -1
- package/dist/utils/words.utils.js +3 -2
- package/dist/utils/workspace.utils.cjs +1 -0
- package/dist/utils/workspace.utils.d.ts +5 -0
- package/dist/utils/workspace.utils.d.ts.map +1 -0
- package/dist/utils/workspace.utils.js +26 -0
- package/dist/utils/workspace.utils.test.d.ts +2 -0
- package/dist/utils/workspace.utils.test.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,930 +1,998 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as B, useState as
|
|
3
|
-
import { INK_MIN_HEIGHT as
|
|
4
|
-
import { EMPTY_STRING as
|
|
5
|
-
import { TOOLBAR_OPTION_FONT_DROPDOWN as
|
|
6
|
-
import { TOOLBAR_SHOW_CONTROL_LABEL as
|
|
7
|
-
import { INK_DEFAULT_COLOR_MODE as
|
|
8
|
-
import { KEY_TAB as
|
|
9
|
-
import { FONT_VALUE_SYSTEM as
|
|
10
|
-
import { LIST_VALUE_BULLET as
|
|
11
|
-
import { FIND_REPLACE_FOCUS_FIND as
|
|
12
|
-
import { BLOCK_DROP_POSITION_BEFORE as
|
|
13
|
-
import { INK_PLACEHOLDER_DEFAULT as
|
|
14
|
-
import { INK_AI_DEMO_PROVIDER_ID as
|
|
1
|
+
import { jsxs as R, jsx as r, Fragment as Wl } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as B, useState as i, useEffect as M } from "react";
|
|
3
|
+
import { INK_MIN_HEIGHT as Vl, NUMBER_ZERO as O, NUMBER_ONE as yn, INK_DEFAULT_TEXT_COLOR as Yl, INK_DEFAULT_HIGHLIGHT_COLOR as zl, INK_TABLE_COL_RESIZE_EDGE_PX as Fn } from "../../constants/numbers.js";
|
|
4
|
+
import { EMPTY_STRING as P, INK_TOOLBAR_MORE_TITLE as Kn, CONTEXT_MENU_LABEL_GRAPH_BAR as $l, CONTEXT_MENU_ID_GRAPH_BAR as ql, CONTEXT_MENU_LABEL_GRAPH_LINE as jl, CONTEXT_MENU_ID_GRAPH_LINE as Ql, CONTEXT_MENU_LABEL_GRAPH_PIE as Zl, CONTEXT_MENU_ID_GRAPH_PIE as Jl, CONTEXT_MENU_LABEL_GRAPH_EDIT as ei, CONTEXT_MENU_ID_GRAPH_EDIT as ti, CONTEXT_MENU_LABEL_GRAPH_COLORS as ni, CONTEXT_MENU_ID_GRAPH_COLORS as oi, CONTEXT_MENU_LABEL_GRAPH_AI as ri, CONTEXT_MENU_ID_GRAPH_AI as li, INK_FOOTER_WORDS_LABEL as ii, INK_FOOTER_DOT as ci, INK_FOOTER_CHARS_LABEL as si, INK_FOOTER_LINE_LABEL as ai, INK_FOOTER_COL_LABEL as ui, INK_FOOTER_SYNCED_LABEL as _i, INK_FULLSCREEN_EXIT_TITLE as di, INK_FULLSCREEN_TITLE as fi, INK_OUTLINE_TOGGLE_TITLE as Ti, INK_HTML_SOURCE_TITLE as Ei, INK_HTML_SOURCE_LABEL as mi, INK_CODE_LABEL as pi, INK_AI_PILL_LABEL as mt, INK_TITLES_DEFAULT_TEXT as xn, INK_LINK_PROMPT as Oi, INK_LINK_PROMPT_DEFAULT as Li } from "../../constants/generals.const.js";
|
|
5
|
+
import { TOOLBAR_OPTION_FONT_DROPDOWN as Xn, TOOLBAR_OPTION_LIST_DROPDOWN as Gn, TOOLBAR_OPTION_CHECKLIST as Pe, TOOLBAR_OPTION_TITLES as Wn, TOOLBAR_OPTION_EXCEL as Vn, TOOLBAR_OPTION_GRAPH as Yn, TOOLBAR_OPTION_THEME as zn, TOOLBAR_OPTION_FULLSCREEN as $n, TOOLBAR_OPTION_OUTLINE as qn, TOOLBAR_OPTION_IMPORT_MARKDOWN as Ci, TOOLBAR_OPTION_EXPORT_MARKDOWN as jn, TOOLBAR_OPTION_EXPORT_DOCX as Ni, TOOLBAR_OPTION_EXPORT_PDF as Qn, TOOLBAR_OPTION_VERSIONS as Zn, TOOLBAR_OPTION_FORMAT_PAINTER as Jn, TOOLBAR_OPTION_CHANGE_CASE as Ii, TOOLBAR_OPTION_HTML_SOURCE as eo, TOOLBAR_OPTION_SIGNATURE as to, TOOLBAR_OPTION_FIND_REPLACE as no, TOOLBAR_OPTION_FIND_REPLACE_DROPDOWN as oo, TOOLBAR_OPTION_HORIZONTAL_RULE as ro } from "../../constants/toolbar.const.js";
|
|
6
|
+
import { TOOLBAR_SHOW_CONTROL_LABEL as Ai, TOOLBAR_SHOW_CONTROL_ARIA_LABEL as hi, AGENT_BAR_PLACEHOLDER as gi, CONTEXT_MENU_LABEL_SHOW_TOOLBAR as bi, CONTEXT_MENU_ID_SHOW_TOOLBAR as Ri, TOOLBAR_CONTEXT_MENU_LABEL_CUSTOMIZE as Si, TOOLBAR_CONTEXT_MENU_ID_CUSTOMIZE as Bi, TOOLBAR_CONTEXT_MENU_LABEL_HIDE as Mi, TOOLBAR_CONTEXT_MENU_ID_HIDE as Di, TOOLBAR_OPTION_HINTS as C, TOOLBAR_OPTION_DIVIDER as lo } from "../../constants/toolbarMenu.const.js";
|
|
7
|
+
import { INK_DEFAULT_COLOR_MODE as Pi, COLOR_MODE_SYSTEM as Hi } from "../../constants/colorMode.const.js";
|
|
8
|
+
import { KEY_TAB as ki, KEY_ENTER as vi, KEY_ESCAPE as Ui, KEY_K as wi, KEY_Z as yi } from "../../constants/keyboard.const.js";
|
|
9
|
+
import { FONT_VALUE_SYSTEM as Fi, INK_FONT_OPTIONS as Ki, FONT_DROPDOWN_TITLE as xi } from "../../constants/fonts.const.js";
|
|
10
|
+
import { LIST_VALUE_BULLET as Xi, INK_LIST_OPTIONS as Gi, LIST_DROPDOWN_TITLE as Wi } from "../../constants/lists.const.js";
|
|
11
|
+
import { FIND_REPLACE_FOCUS_FIND as He, INK_FIND_REPLACE_OPTIONS as Vi, FIND_REPLACE_DROPDOWN_TITLE as Yi, FIND_REPLACE_FOCUS_REPLACE as zi, FIND_REPLACE_VALUE_REPLACE as $i } from "../../constants/findReplaceMenu.const.js";
|
|
12
|
+
import { BLOCK_DROP_POSITION_BEFORE as qi, DIR_LTR as ji, DIR_RTL as Qi } from "../../constants/blocks.const.js";
|
|
13
|
+
import { INK_PLACEHOLDER_DEFAULT as Zi, INK_DEFAULT_VARIANT as Ji, INK_DEFAULT_CHROME as ec, INK_DEFAULT_AUTHOR as tc, INK_TABLE_DEFAULT_ROWS as nc, INK_TABLE_DEFAULT_COLS as oc, INK_DEFAULT_FEATURES as rc, INK_CHROME_TOOLBAR as lc, INK_DEFAULT_TOOLBAR as ic, INK_VARIANT_DOCUMENT as io, INK_CLASS_TOOLBAR_SHOW as cc, INK_CLASS_TOOLBAR as sc, INK_CLASS_TOOLBAR_MEASURE as ac, INK_CLASS_TOOLBAR_ROW as uc, INK_ATTR_MORE as _c, INK_CLASS_TOOLBAR_OVERFLOW as dc, INK_CLASS_TOOLBAR_HINT as fc, INK_CLASS_SHELL as Tc, INK_CLASS_BODY as Ec, INK_CLASS_CONTENT as co, INK_CLASS_CONTENT_HIDDEN as mc, INK_CLASS_FOOTER as pc, INK_CLASS_FOOTER_META as Oc, INK_CLASS_TABLE_RESIZE as pe, INK_CLASS_DIVIDER as Lc, INK_HEADING_OPTIONS as Cc, INK_CLASS_BUTTON_WIDE as so, INK_CLASS_BUTTON_LABEL as ao, INK_BUTTON_CONFIG as pt, INK_CLASS_AI_PILL as uo, INK_CLASS_AI_PILL_INSTALLED as Nc, INK_CLASS_AI_PILL_DOT as Ic, INK_ATTR_GRAPH as Ac, INK_CLASS_BLOCK_ACTIVE as hc, INK_ATTR_GRAPH_POINTS as _o, INK_ATTR_GRAPH_COLORS as gc, INK_CHECKLIST_HTML as fo, INK_CALLOUT_HTML as bc, INK_FORMAT_BLOCK_PRE as Rc, INK_FORMAT_BLOCK_QUOTE as Sc, INK_FORMAT_BLOCK_P as Bc, INK_FORMAT_BLOCK_H3 as Mc, INK_FORMAT_BLOCK_H2 as Dc, INK_FORMAT_BLOCK_H1 as Pc, INK_CLASS_ROOT as Hc } from "../../constants/defaults.const.js";
|
|
14
|
+
import { INK_AI_DEMO_PROVIDER_ID as To } from "../../constants/aiModels.const.js";
|
|
15
15
|
import "../../constants/openai.const.js";
|
|
16
|
-
import { INK_DEFAULT_ICONS as
|
|
17
|
-
import { CONTEXT_MENU_LABEL_TABLE_ROW_ABOVE as
|
|
18
|
-
import { TABLE_CELL_SELECTOR as
|
|
19
|
-
import { cn as
|
|
20
|
-
import { applyTypoAutoFix as
|
|
21
|
-
import { createInkId as
|
|
22
|
-
import { getColumnResizeIndex as
|
|
23
|
-
import { getBlockElement as
|
|
24
|
-
import { createTrackChange as
|
|
25
|
-
import {
|
|
26
|
-
import { InkHistoryStack as
|
|
27
|
-
import { extractSlashQuery as
|
|
28
|
-
import { countWords as
|
|
29
|
-
import { collectOutlineItems as
|
|
30
|
-
import { resolveInkPremium as
|
|
31
|
-
import { extractClipboardHtml as
|
|
32
|
-
import { readInkMemory as
|
|
33
|
-
import { replaceInHtml as
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
16
|
+
import { INK_DEFAULT_ICONS as Eo } from "../../constants/defaultIcons.js";
|
|
17
|
+
import { CONTEXT_MENU_LABEL_TABLE_ROW_ABOVE as kc, CONTEXT_MENU_ID_TABLE_ROW_ABOVE as vc, CONTEXT_MENU_LABEL_TABLE_ROW_BELOW as Uc, CONTEXT_MENU_ID_TABLE_ROW_BELOW as wc, CONTEXT_MENU_LABEL_TABLE_COL_LEFT as yc, CONTEXT_MENU_ID_TABLE_COL_LEFT as Fc, CONTEXT_MENU_LABEL_TABLE_COL_RIGHT as Kc, CONTEXT_MENU_ID_TABLE_COL_RIGHT as xc, CONTEXT_MENU_LABEL_TABLE_DELETE_ROW as Xc, CONTEXT_MENU_ID_TABLE_DELETE_ROW as Gc, CONTEXT_MENU_LABEL_TABLE_DELETE_COL as Wc, CONTEXT_MENU_ID_TABLE_DELETE_COL as Vc, CONTEXT_MENU_LABEL_TABLE_HEADER as Yc, CONTEXT_MENU_ID_TABLE_HEADER as zc, CONTEXT_MENU_LABEL_TABLE_MERGE as $c, CONTEXT_MENU_ID_TABLE_MERGE as qc, CONTEXT_MENU_LABEL_TABLE_SPLIT as jc, CONTEXT_MENU_ID_TABLE_SPLIT as Qc, CONTEXT_MENU_LABEL_TABLE_BACKGROUND as Zc, CONTEXT_MENU_ID_TABLE_BACKGROUND as Jc, CONTEXT_MENU_LABEL_TABLE_VALIGN as es, CONTEXT_MENU_ID_TABLE_VALIGN as ts, CONTEXT_MENU_LABEL_BOLD as ns, CONTEXT_MENU_ID_BOLD as os, CONTEXT_MENU_LABEL_ITALIC as rs, CONTEXT_MENU_ID_ITALIC as ls, CONTEXT_MENU_LABEL_UNDERLINE as is, CONTEXT_MENU_ID_UNDERLINE as cs, CONTEXT_MENU_LABEL_STRIKE as ss, CONTEXT_MENU_ID_STRIKE as as, CONTEXT_MENU_LABEL_HEADING as us, CONTEXT_MENU_ID_HEADING as _s, CONTEXT_MENU_LABEL_BULLET as ds, CONTEXT_MENU_ID_BULLET as fs, CONTEXT_MENU_LABEL_ORDERED as Ts, CONTEXT_MENU_ID_ORDERED as Es, CONTEXT_MENU_LABEL_LINK as ms, CONTEXT_MENU_ID_LINK as ps, CONTEXT_MENU_LABEL_CLEAR as Os, CONTEXT_MENU_ID_CLEAR as Ls, CONTEXT_MENU_LABEL_FIND as Cs, CONTEXT_MENU_ID_FIND as Ns, CONTEXT_MENU_LABEL_SIGNATURE as Is, CONTEXT_MENU_ID_SIGNATURE as As, CONTEXT_MENU_LABEL_COMMENT as hs, CONTEXT_MENU_ID_COMMENT as gs } from "../../constants/contextMenu.const.js";
|
|
18
|
+
import { TABLE_CELL_SELECTOR as mo, TABLE_TAG as Ot } from "../../constants/table.const.js";
|
|
19
|
+
import { cn as bs } from "../../utils/cn.utils.js";
|
|
20
|
+
import { applyTypoAutoFix as Rs } from "../../utils/typo.utils.js";
|
|
21
|
+
import { createInkId as po } from "../../utils/id.utils.js";
|
|
22
|
+
import { getColumnResizeIndex as Oo, getTableCellFromSelection as Lo, setTableColumnWidth as Ss, buildTableHtml as Bs, insertTableRow as Co, insertTableColumn as No, deleteTableRow as Ms, deleteTableColumn as Ds, toggleTableHeaderRow as Ps, mergeTableCellRight as Hs, splitTableCell as ks, setTableCellBackground as vs, setTableCellVerticalAlign as Us } from "../../utils/table.utils.js";
|
|
23
|
+
import { getBlockElement as Oe, clearBlockDragClasses as Lt, markActiveBlock as Io, markDraggingBlock as ws, moveBlock as ys, resolveDropPosition as Ao, reorderBlockBefore as Fs, reorderBlockAfter as Ks, markDropTarget as ho } from "../../utils/blocks.utils.js";
|
|
24
|
+
import { createTrackChange as Ct, rejectTrackChangeInHtml as xs, acceptTrackChangeInHtml as Xs, wrapInsertHtml as go, wrapDeleteHtml as Gs } from "../../utils/trackChanges.utils.js";
|
|
25
|
+
import { setCommentResolvedMark as bo, scrollToComment as Ws, wrapSelectionAsComment as Vs, createCommentThread as Ys } from "../../utils/comments.utils.js";
|
|
26
|
+
import { InkHistoryStack as Nt } from "../../utils/history.utils.js";
|
|
27
|
+
import { extractSlashQuery as zs, filterSlashCommands as $s } from "../../utils/slash.utils.js";
|
|
28
|
+
import { countWords as qs } from "../../utils/words.utils.js";
|
|
29
|
+
import { collectOutlineItems as ne, scrollOutlineHeading as js, getCaretLineCol as Ro } from "../../utils/outline.utils.js";
|
|
30
|
+
import { resolveInkPremium as Qs, hasInkPremiumFeature as Le, themeTokensToStyle as Zs } from "../../utils/premium.utils.js";
|
|
31
|
+
import { extractClipboardHtml as Js, isOfficeHtml as ea, sanitizePastedHtml as ta, extractClipboardText as na } from "../../utils/paste.utils.js";
|
|
32
|
+
import { readInkMemory as oa, writeInkMemory as ra } from "../../utils/memory.utils.js";
|
|
33
|
+
import { replaceInHtml as la } from "../../utils/findReplace.utils.js";
|
|
34
|
+
import { listVersions as It, saveVersion as ia } from "../../utils/versions.utils.js";
|
|
35
|
+
import { MARKDOWN_ACCEPT as ca, markdownToHtml as sa, downloadTextFile as aa, htmlToMarkdown as ua, MARKDOWN_EXPORT_FILENAME as _a, MARKDOWN_MIME as da } from "../../utils/markdown.utils.js";
|
|
36
|
+
import { printHtmlDocument as fa, downloadBytes as Ta, buildDocx as Ea, DOCX_FILENAME as ma, DOCX_MIME as pa } from "../../utils/exportDocument.utils.js";
|
|
37
|
+
import { deleteMentionQuery as Oa, buildMentionHtml as La, filterMentionPeople as Ca, extractMentionQuery as Na } from "../../utils/mentions.utils.js";
|
|
38
|
+
import { applyPaintedFormat as Ia, applyCaseToSelection as At, readPaintedFormat as Aa } from "../../utils/formatPainter.utils.js";
|
|
39
|
+
import { withPreservedSelection as ht, captureSelectionInRoot as ha, restoreSelectionInRoot as ga } from "../../utils/selection.utils.js";
|
|
40
|
+
import { readToolbarItems as ba, readToolbarHidden as Ra, listCustomizableToolbarOptions as Sa, writeToolbarHidden as Ba, buildVisibleToolbarItems as Ma, writeToolbarItems as Da } from "../../utils/toolbarStorage.utils.js";
|
|
41
|
+
import { TITLE_STYLE_DEFAULT as Pa } from "../../plugins/titles/titles.const.js";
|
|
42
|
+
import { buildTitleHtml as So } from "../../plugins/titles/titles.utils.js";
|
|
43
|
+
import { excelGridToTableHtml as Ha, createEmptyExcelGrid as ka } from "../../plugins/excel/excel.utils.js";
|
|
44
|
+
import { GRAPH_SAMPLE as ke, GRAPH_KIND_DEFAULT as Bo } from "../../plugins/graph/graph.const.js";
|
|
45
|
+
import { parseGraphColors as Mo, replaceGraphBlock as Do, getGraphBlock as va, buildGraphHtml as Ua, parseGraphPoints as Po } from "../../plugins/graph/graph.utils.js";
|
|
46
|
+
import { THEME_DEFAULT as wa } from "../../plugins/theme/theme.const.js";
|
|
47
|
+
import { applyInkTheme as ya } from "../../plugins/theme/inkTheme.js";
|
|
48
|
+
import { inkPlugins as Ce } from "../../plugins/host/inkPlugins.js";
|
|
49
|
+
import { useToolbarOverflow as Fa } from "../../hooks/useToolbarOverflow.js";
|
|
50
|
+
import { Button as Ka } from "../../common-components/Button/Button.js";
|
|
51
|
+
import { ContextMenu as Ho } from "../../common-components/ContextMenu/ContextMenu.js";
|
|
52
|
+
import { insertImage as gt, insertHTML as I, setTextColor as xa, setHighlightColor as Xa, tryConvertMarkdownBlockPrefix as Ga, tryConvertMarkdownListPrefix as Wa, getActiveFormats as Va, queryCommandValue as Ya, detectListType as za, execCommand as g, insertLink as $a, applyFontFamily as qa, applyListType as ja, clearFormatDeep as Qa, setBlockDirection as ko, fileToDataUrl as Za } from "./helpers/format.utils.js";
|
|
53
|
+
import { inkAi as vo } from "../../plugins/ai/aiPlugin.js";
|
|
49
54
|
import { ToolbarButton as N } from "./components/ToolbarButton/ToolbarButton.js";
|
|
50
|
-
import { ToolbarDropdown as
|
|
51
|
-
import { ToolbarColorPicker as
|
|
52
|
-
import { CommentsPanel as
|
|
53
|
-
import { AiPanel as
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
55
|
+
import { ToolbarDropdown as ve } from "./components/ToolbarDropdown/ToolbarDropdown.js";
|
|
56
|
+
import { ToolbarColorPicker as Uo } from "./components/ToolbarColorPicker/ToolbarColorPicker.js";
|
|
57
|
+
import { CommentsPanel as Ja } from "./components/CommentsPanel/CommentsPanel.js";
|
|
58
|
+
import { AiPanel as eu } from "./components/AiPanel/AiPanel.js";
|
|
59
|
+
import { AiSelectionBubble as tu } from "./components/AiSelectionBubble/AiSelectionBubble.js";
|
|
60
|
+
import { capabilityForSelectionAction as nu, optionsForSelectionAction as ou, htmlFromAiResponse as ru, placeAiSelectionBubble as lu } from "./components/AiSelectionBubble/AiSelectionBubble.utils.js";
|
|
61
|
+
import { AiAutocomplete as iu } from "./components/AiAutocomplete/AiAutocomplete.js";
|
|
62
|
+
import { AI_AUTOCOMPLETE_DEBOUNCE_MS as cu, AI_AUTOCOMPLETE_COMMAND_INSERT_TEXT as su } from "./components/AiAutocomplete/AiAutocomplete.const.js";
|
|
63
|
+
import { getTextBeforeCaret as wo, getCaretPositionInRoot as bt } from "./components/AiAutocomplete/AiAutocomplete.utils.js";
|
|
64
|
+
import { BlockHandles as au } from "./components/BlockHandles/BlockHandles.js";
|
|
65
|
+
import { BLOCK_HANDLES_DRAG_MIME as uu, BLOCK_HANDLES_DRAG_PAYLOAD as _u, BLOCK_HANDLES_DRAG_EFFECT_MOVE as yo } from "./components/BlockHandles/BlockHandles.const.js";
|
|
66
|
+
import { InlineToolbar as du } from "./components/InlineToolbar/InlineToolbar.js";
|
|
67
|
+
import { INLINE_TOOLBAR_EDGE_PADDING_PX as fu, INLINE_TOOLBAR_ESTIMATED_WIDTH_PX as Tu, INLINE_TOOLBAR_ESTIMATED_HEIGHT_PX as Eu, INLINE_TOOLBAR_GAP_PX as mu } from "./components/InlineToolbar/InlineToolbar.const.js";
|
|
68
|
+
import { selectionIsInsideElement as pu, clampInlineToolbarPosition as Ou } from "./components/InlineToolbar/InlineToolbar.utils.js";
|
|
69
|
+
import { SlashMenu as Lu } from "./components/SlashMenu/SlashMenu.js";
|
|
70
|
+
import { OutlineRail as Cu } from "./components/OutlineRail/OutlineRail.js";
|
|
71
|
+
import { TrackChangesBar as Nu } from "./components/TrackChangesBar/TrackChangesBar.js";
|
|
72
|
+
import { VersionHistory as Iu } from "./components/VersionHistory/VersionHistory.js";
|
|
73
|
+
import { MentionMenu as Au } from "./components/MentionMenu/MentionMenu.js";
|
|
74
|
+
import { ImageFrame as hu } from "./components/ImageFrame/ImageFrame.js";
|
|
75
|
+
import { SignPad as gu } from "./components/SignPad/SignPad.js";
|
|
76
|
+
import { FindReplace as bu } from "./components/FindReplace/FindReplace.js";
|
|
77
|
+
import { ToolbarCustomize as Ru } from "./components/ToolbarCustomize/ToolbarCustomize.js";
|
|
78
|
+
import { HtmlSourcePanel as Su } from "./components/HtmlSourcePanel/HtmlSourcePanel.js";
|
|
79
|
+
import { TableSizePicker as Bu } from "./components/TableSizePicker/TableSizePicker.js";
|
|
80
|
+
import { TitleGallery as Mu } from "./components/TitleGallery/TitleGallery.js";
|
|
81
|
+
import { ExcelSheetPanel as Du } from "./components/ExcelSheetPanel/ExcelSheetPanel.js";
|
|
82
|
+
import { GraphPicker as Pu } from "./components/GraphPicker/GraphPicker.js";
|
|
83
|
+
import { GraphEditModal as Hu } from "./components/GraphEditModal/GraphEditModal.js";
|
|
84
|
+
import { ThemePicker as ku } from "./components/ThemePicker/ThemePicker.js";
|
|
85
|
+
import { PresenceStack as vu } from "./components/PresenceStack/PresenceStack.js";
|
|
86
|
+
import { RemoteCursors as Uu } from "./components/RemoteCursors/RemoteCursors.js";
|
|
87
|
+
const Rt = () => {
|
|
88
|
+
const v = window.getSelection();
|
|
89
|
+
if (!v || v.rangeCount === O) return "";
|
|
90
|
+
const b = v.getRangeAt(O), U = document.createElement("div");
|
|
91
|
+
return U.appendChild(b.cloneContents()), U.innerHTML;
|
|
92
|
+
}, A = (v) => {
|
|
93
|
+
v == null || v.focus({ preventScroll: !0 });
|
|
94
|
+
}, md = (v) => {
|
|
95
|
+
var Un;
|
|
84
96
|
const {
|
|
85
|
-
value:
|
|
86
|
-
defaultValue:
|
|
87
|
-
onChange:
|
|
88
|
-
placeholder:
|
|
89
|
-
disabled:
|
|
90
|
-
readOnly:
|
|
91
|
-
minHeight:
|
|
92
|
-
maxHeight:
|
|
93
|
-
toolbar:
|
|
94
|
-
className:
|
|
95
|
-
testId:
|
|
96
|
-
allowImagePaste:
|
|
97
|
-
showCharCount:
|
|
98
|
-
charCountMax:
|
|
99
|
-
typoAutoFix:
|
|
100
|
-
variant:
|
|
101
|
-
chrome:
|
|
102
|
-
colorMode:
|
|
103
|
-
features:
|
|
104
|
-
author:
|
|
105
|
-
trackChanges:
|
|
106
|
-
onTrackChangesChange:
|
|
107
|
-
trackChangesEnabled:
|
|
108
|
-
onTrackChangesEnabledChange:
|
|
109
|
-
comments:
|
|
110
|
-
onCommentsChange:
|
|
111
|
-
showCommentsPanel:
|
|
112
|
-
onShowCommentsPanelChange:
|
|
97
|
+
value: b,
|
|
98
|
+
defaultValue: U = "",
|
|
99
|
+
onChange: w,
|
|
100
|
+
placeholder: St = Zi,
|
|
101
|
+
disabled: c = !1,
|
|
102
|
+
readOnly: u = !1,
|
|
103
|
+
minHeight: Ue = Vl,
|
|
104
|
+
maxHeight: we,
|
|
105
|
+
toolbar: Fo,
|
|
106
|
+
className: Ko = "",
|
|
107
|
+
testId: xo,
|
|
108
|
+
allowImagePaste: Bt = !0,
|
|
109
|
+
showCharCount: Mt = !1,
|
|
110
|
+
charCountMax: Dt,
|
|
111
|
+
typoAutoFix: Xo = !0,
|
|
112
|
+
variant: Ne = Ji,
|
|
113
|
+
chrome: Go = ec,
|
|
114
|
+
colorMode: Pt = Pi,
|
|
115
|
+
features: Wo,
|
|
116
|
+
author: K = tc,
|
|
117
|
+
trackChanges: oe,
|
|
118
|
+
onTrackChangesChange: ye,
|
|
119
|
+
trackChangesEnabled: Ie,
|
|
120
|
+
onTrackChangesEnabledChange: Fe,
|
|
121
|
+
comments: re,
|
|
122
|
+
onCommentsChange: Ke,
|
|
123
|
+
showCommentsPanel: le,
|
|
124
|
+
onShowCommentsPanelChange: xe,
|
|
113
125
|
ai: E,
|
|
114
|
-
slashCommands:
|
|
115
|
-
tableRows:
|
|
116
|
-
tableCols:
|
|
117
|
-
premium:
|
|
118
|
-
theme:
|
|
119
|
-
icons:
|
|
120
|
-
pasteMode:
|
|
121
|
-
onImageUpload:
|
|
122
|
-
wysiwyg:
|
|
123
|
-
keepInMemory:
|
|
124
|
-
memoryKey:
|
|
125
|
-
onToolbarChange:
|
|
126
|
-
toolbarHidden:
|
|
127
|
-
onToolbarHiddenChange:
|
|
128
|
-
showOutline:
|
|
129
|
-
onOutlineChange:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
slashCommands: Vo,
|
|
127
|
+
tableRows: Yo = nc,
|
|
128
|
+
tableCols: zo = oc,
|
|
129
|
+
premium: $o,
|
|
130
|
+
theme: qo,
|
|
131
|
+
icons: Ht,
|
|
132
|
+
pasteMode: jo = "plain",
|
|
133
|
+
onImageUpload: kt,
|
|
134
|
+
wysiwyg: Qo = !1,
|
|
135
|
+
keepInMemory: Y = !1,
|
|
136
|
+
memoryKey: H,
|
|
137
|
+
onToolbarChange: Xe,
|
|
138
|
+
toolbarHidden: z,
|
|
139
|
+
onToolbarHiddenChange: Ge,
|
|
140
|
+
showOutline: Zo,
|
|
141
|
+
onOutlineChange: We,
|
|
142
|
+
collaboration: h,
|
|
143
|
+
style: Jo,
|
|
144
|
+
...er
|
|
145
|
+
} = v, Ae = Fo ?? (Ne === io ? lc : ic), s = { ...rc, ...Wo }, $ = Qs($o), tr = Le($, "icons"), nr = Le($, "theme"), or = Le($, "richPaste"), rr = Le($, "imageUpload"), lr = Le($, "wysiwyg") && Qo, L = tr && Ht ? { ...Eo, ...Ht } : Eo, ir = nr ? Zs(qo) : {}, cr = or && jo === "rich", o = B(null), vt = B(null), he = B(null), ie = B(new Nt(b ?? U)), q = B(null), W = B(null), ge = B(P), [Ve, sr] = i(/* @__PURE__ */ new Set()), [ar, Ut] = i("p"), [ur, _r] = i(O), [dr, fr] = i(O), [Tr, wt] = i(yn), [Er, yt] = i(yn), [mr, j] = i([]), [pr, Or] = i(O), [Lr, Ye] = i(P), [Cr, Nr] = i(Yl), [Ir, Ar] = i(zl), [Q, Ft] = i(Ie ?? !1), [hr, Kt] = i(oe ?? []), [gr, xt] = i(re ?? []), [br, Xt] = i(le ?? !1), [Gt, ce] = i(!!(E != null && E.enabled && E.openOnInit)), [be, Rr] = i(!1), Wt = B(!1), [x, se] = i({
|
|
133
146
|
visible: !1,
|
|
134
147
|
suggestion: "",
|
|
135
|
-
top:
|
|
136
|
-
left:
|
|
137
|
-
}),
|
|
148
|
+
top: O,
|
|
149
|
+
left: O
|
|
150
|
+
}), ae = B(null), Z = B(O), [ue, Sr] = i(""), [Br, Mr] = i(0), [Dr, Vt] = i(!1), [Pr, Re] = i([]), [Yt, Hr] = i({ top: 0, left: 0 }), [zt, ze] = i(!1), [$e, Se] = i(!1), [_e, $t] = i(!1), [qt, jt] = i(!1), [kr, Qt] = i(() => It(H)), [Zt, qe] = i(""), [de, je] = i(null), [Jt, vr] = i({ top: O, left: O }), [en, tn] = i(null), [Be, nn] = i(null), [on, Ur] = i(!1), [rn, ln] = i(P), [wr, yr] = i(He), [Fr, Kr] = i(Fi), [xr, cn] = i(Xi), [Xr, Gr] = i(He), [Qe, Ze] = i({ open: !1, x: O, y: O }), [Wr, sn] = i(!1), [Je, et] = i({
|
|
138
151
|
open: !1,
|
|
139
|
-
x:
|
|
140
|
-
y:
|
|
141
|
-
}), [
|
|
152
|
+
x: O,
|
|
153
|
+
y: O
|
|
154
|
+
}), [Me, J] = i({
|
|
142
155
|
open: !1,
|
|
143
|
-
top:
|
|
144
|
-
left:
|
|
145
|
-
}), [
|
|
146
|
-
() =>
|
|
147
|
-
), [
|
|
148
|
-
() =>
|
|
149
|
-
), [
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
(e) => e.visible || e.suggestion ? { visible: !1, suggestion: "", top:
|
|
156
|
+
top: O,
|
|
157
|
+
left: O
|
|
158
|
+
}), [Vr, an] = i(!1), [tt, fe] = i(""), [un, Yr] = i({ top: O, left: O }), [ee, _n] = i(
|
|
159
|
+
() => ba(Y, H) ?? Ae
|
|
160
|
+
), [zr, dn] = i(() => z !== void 0 ? z : Ra(Y, H) ?? !1), [$r, fn] = i(!1), Tn = B(!0), qr = Ae.join(","), X = oe ?? hr, G = re ?? gr, nt = le ?? br, En = Vo ?? s.slash, [ot, jr] = i(
|
|
161
|
+
() => Zo ?? Ne === io
|
|
162
|
+
), [mn, p] = i(P), [Qr, Zr] = i(!1), te = B(null), [Jr, rt] = i(!1), [el, tl] = i("values"), [nl, ol] = i(ke), [rl, ll] = i(() => Mo(null)), [il, cl] = i(wa), [pn, sl] = i(!1), al = !!(s.outline && ot), V = Fa(ee.length), On = z ?? zr, Ln = Ae, ul = Sa(Ln), lt = Pt === Hi ? void 0 : Pt, it = !!(s.ai && (E != null && E.enabled) && E.autocomplete !== !1 && !c && !u), ct = () => {
|
|
163
|
+
ae.current !== null && (window.clearTimeout(ae.current), ae.current = null);
|
|
164
|
+
}, y = () => {
|
|
165
|
+
ct(), Z.current += 1, se(
|
|
166
|
+
(e) => e.visible || e.suggestion ? { visible: !1, suggestion: "", top: O, left: O } : e
|
|
154
167
|
);
|
|
155
|
-
},
|
|
156
|
-
if (!
|
|
157
|
-
|
|
168
|
+
}, _l = () => {
|
|
169
|
+
if (!it || be || !o.current) {
|
|
170
|
+
y();
|
|
158
171
|
return;
|
|
159
172
|
}
|
|
160
173
|
const e = window.getSelection();
|
|
161
174
|
if (!e || !e.isCollapsed) {
|
|
162
|
-
|
|
175
|
+
y();
|
|
163
176
|
return;
|
|
164
177
|
}
|
|
165
|
-
|
|
178
|
+
ct(), se(
|
|
166
179
|
(n) => n.visible || n.suggestion ? { ...n, visible: !1, suggestion: "" } : n
|
|
167
180
|
);
|
|
168
|
-
const t = (E == null ? void 0 : E.providerId) ||
|
|
169
|
-
|
|
170
|
-
if (
|
|
181
|
+
const t = (E == null ? void 0 : E.providerId) || To;
|
|
182
|
+
ae.current = window.setTimeout(() => {
|
|
183
|
+
if (ae.current = null, !o.current || Wt.current) return;
|
|
171
184
|
const n = window.getSelection();
|
|
172
185
|
if (!n || !n.isCollapsed) return;
|
|
173
|
-
const l =
|
|
174
|
-
if (!l.trim() || !
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
|
|
186
|
+
const l = wo(o.current), T = bt(o.current);
|
|
187
|
+
if (!l.trim() || !T) return;
|
|
188
|
+
const d = Z.current + 1;
|
|
189
|
+
Z.current = d;
|
|
190
|
+
const f = o.current.innerHTML;
|
|
191
|
+
vo.runProvider(t, {
|
|
179
192
|
capability: "autocomplete",
|
|
180
|
-
html:
|
|
193
|
+
html: f,
|
|
181
194
|
prompt: l,
|
|
182
195
|
modelId: E == null ? void 0 : E.modelId
|
|
183
|
-
}).then((
|
|
184
|
-
var
|
|
185
|
-
if (
|
|
186
|
-
const
|
|
187
|
-
if (!
|
|
188
|
-
|
|
196
|
+
}).then((a) => {
|
|
197
|
+
var me;
|
|
198
|
+
if (d !== Z.current) return;
|
|
199
|
+
const m = ((me = a.text) == null ? void 0 : me.trim()) || "";
|
|
200
|
+
if (!m) {
|
|
201
|
+
se({
|
|
189
202
|
visible: !1,
|
|
190
203
|
suggestion: "",
|
|
191
|
-
top:
|
|
192
|
-
left:
|
|
204
|
+
top: O,
|
|
205
|
+
left: O
|
|
193
206
|
});
|
|
194
207
|
return;
|
|
195
208
|
}
|
|
196
|
-
const
|
|
197
|
-
|
|
209
|
+
const k = o.current && bt(o.current) || T;
|
|
210
|
+
se({
|
|
198
211
|
visible: !0,
|
|
199
|
-
suggestion:
|
|
200
|
-
top:
|
|
201
|
-
left:
|
|
212
|
+
suggestion: m,
|
|
213
|
+
top: k.top,
|
|
214
|
+
left: k.left
|
|
202
215
|
});
|
|
203
216
|
}).catch(() => {
|
|
204
|
-
|
|
217
|
+
d === Z.current && se({
|
|
205
218
|
visible: !1,
|
|
206
219
|
suggestion: "",
|
|
207
|
-
top:
|
|
208
|
-
left:
|
|
220
|
+
top: O,
|
|
221
|
+
left: O
|
|
209
222
|
});
|
|
210
223
|
});
|
|
211
|
-
},
|
|
224
|
+
}, cu);
|
|
212
225
|
};
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}, []),
|
|
216
|
-
|
|
217
|
-
}, [
|
|
218
|
-
|
|
219
|
-
}, [
|
|
220
|
-
|
|
221
|
-
}, [
|
|
222
|
-
|
|
223
|
-
}, [
|
|
224
|
-
|
|
225
|
-
}, [
|
|
226
|
-
|
|
227
|
-
}, [
|
|
228
|
-
if (
|
|
229
|
-
|
|
226
|
+
M(() => () => {
|
|
227
|
+
ct(), Z.current += 1;
|
|
228
|
+
}, []), M(() => {
|
|
229
|
+
Wt.current = be, be && y();
|
|
230
|
+
}, [be]), M(() => {
|
|
231
|
+
Ie !== void 0 && Ft(Ie);
|
|
232
|
+
}, [Ie]), M(() => {
|
|
233
|
+
oe && Kt(oe);
|
|
234
|
+
}, [oe]), M(() => {
|
|
235
|
+
re && xt(re);
|
|
236
|
+
}, [re]), M(() => {
|
|
237
|
+
le !== void 0 && Xt(le);
|
|
238
|
+
}, [le]), M(() => {
|
|
239
|
+
z !== void 0 && dn(z);
|
|
240
|
+
}, [z]), M(() => {
|
|
241
|
+
if (Tn.current) {
|
|
242
|
+
Tn.current = !1;
|
|
230
243
|
return;
|
|
231
244
|
}
|
|
232
|
-
|
|
233
|
-
}, [
|
|
234
|
-
if (!o.current ||
|
|
235
|
-
if (o.current.innerHTML ===
|
|
236
|
-
|
|
245
|
+
_n(Ae);
|
|
246
|
+
}, [qr]), M(() => {
|
|
247
|
+
if (!o.current || b === void 0 || b === q.current) return;
|
|
248
|
+
if (o.current.innerHTML === b) {
|
|
249
|
+
q.current = b;
|
|
237
250
|
return;
|
|
238
251
|
}
|
|
239
252
|
const e = document.activeElement === o.current;
|
|
240
|
-
|
|
241
|
-
o.current && (o.current.innerHTML =
|
|
242
|
-
}),
|
|
243
|
-
}, [
|
|
253
|
+
ht(e ? o.current : null, () => {
|
|
254
|
+
o.current && (o.current.innerHTML = b);
|
|
255
|
+
}), q.current = b;
|
|
256
|
+
}, [b]), M(() => {
|
|
244
257
|
if (!o.current) return;
|
|
245
|
-
const e =
|
|
258
|
+
const e = Y ? oa(H) : "";
|
|
246
259
|
if (e) {
|
|
247
|
-
o.current.innerHTML = e,
|
|
260
|
+
o.current.innerHTML = e, q.current = e, ie.current = new Nt(e), w == null || w(e), s.outline && j(ne(o.current));
|
|
248
261
|
return;
|
|
249
262
|
}
|
|
250
|
-
if (
|
|
251
|
-
|
|
263
|
+
if (b !== void 0) {
|
|
264
|
+
s.outline && j(ne(o.current));
|
|
252
265
|
return;
|
|
253
266
|
}
|
|
254
|
-
|
|
255
|
-
}, []),
|
|
267
|
+
U && (o.current.innerHTML = U, q.current = U, ie.current = new Nt(U), w == null || w(U), s.outline && j(ne(o.current)));
|
|
268
|
+
}, []), M(() => {
|
|
256
269
|
const e = () => {
|
|
257
|
-
|
|
270
|
+
sl(document.fullscreenElement === he.current);
|
|
258
271
|
};
|
|
259
272
|
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
260
273
|
}, []);
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
263
|
-
const n = o.current.textContent ??
|
|
264
|
-
|
|
274
|
+
const st = (e) => {
|
|
275
|
+
if (ie.current.push(e), q.current = e, w == null || w(e), Y && ra(e, H), Mt && o.current) {
|
|
276
|
+
const n = o.current.textContent ?? P;
|
|
277
|
+
_r(n.length), fr(qs(n));
|
|
265
278
|
}
|
|
266
|
-
|
|
267
|
-
const t =
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
o.current && (
|
|
279
|
+
s.outline && j(ne(o.current));
|
|
280
|
+
const t = Ro(o.current);
|
|
281
|
+
wt(t.line), yt(t.col);
|
|
282
|
+
}, F = (e) => {
|
|
283
|
+
o.current && (ht(o.current, () => {
|
|
271
284
|
o.current && (o.current.innerHTML = e);
|
|
272
|
-
}),
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
if (e ===
|
|
285
|
+
}), st(e));
|
|
286
|
+
}, at = (e) => {
|
|
287
|
+
dn(e), Ge == null || Ge(e), Ba(e, Y, H);
|
|
288
|
+
}, dl = (e) => {
|
|
289
|
+
_n(e), Xe == null || Xe(e), Da(e, Y, H);
|
|
290
|
+
}, fl = (e, t) => {
|
|
291
|
+
if (e === lo) return;
|
|
279
292
|
const n = new Set(
|
|
280
|
-
|
|
293
|
+
ee.filter((l) => l !== lo)
|
|
281
294
|
);
|
|
282
|
-
t ? n.add(e) : n.delete(e),
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
},
|
|
292
|
-
if (
|
|
293
|
-
|
|
295
|
+
t ? n.add(e) : n.delete(e), dl(Ma(Ln, n));
|
|
296
|
+
}, Te = (e) => {
|
|
297
|
+
Kt(e), ye == null || ye(e);
|
|
298
|
+
}, De = (e) => {
|
|
299
|
+
xt(e), Ke == null || Ke(e);
|
|
300
|
+
}, ut = (e) => {
|
|
301
|
+
Xt(e), xe == null || xe(e);
|
|
302
|
+
}, Tl = (e) => {
|
|
303
|
+
Ft(e), Fe == null || Fe(e);
|
|
304
|
+
}, El = () => {
|
|
305
|
+
if (c || u) {
|
|
306
|
+
J((f) => f.open ? { ...f, open: !1 } : f);
|
|
294
307
|
return;
|
|
295
308
|
}
|
|
296
309
|
const e = window.getSelection();
|
|
297
|
-
if (!e || e.isCollapsed || e.rangeCount === 0 || !
|
|
298
|
-
|
|
310
|
+
if (!e || e.isCollapsed || e.rangeCount === 0 || !pu(e, o.current)) {
|
|
311
|
+
J((f) => f.open ? { ...f, open: !1 } : f);
|
|
299
312
|
return;
|
|
300
313
|
}
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
314
|
+
const t = e.getRangeAt(0), l = Array.from(t.getClientRects()).filter(
|
|
315
|
+
(f) => f.width > 0 || f.height > 0
|
|
316
|
+
)[0] ?? t.getBoundingClientRect();
|
|
317
|
+
if (l.width === 0 && l.height === 0) {
|
|
318
|
+
J((f) => f.open ? { ...f, open: !1 } : f);
|
|
304
319
|
return;
|
|
305
320
|
}
|
|
306
|
-
const
|
|
307
|
-
selectionRect:
|
|
308
|
-
toolbarWidth:
|
|
309
|
-
toolbarHeight:
|
|
310
|
-
viewport:
|
|
311
|
-
gap:
|
|
312
|
-
edgePadding:
|
|
321
|
+
const T = { width: window.innerWidth, height: window.innerHeight }, d = Ou({
|
|
322
|
+
selectionRect: l,
|
|
323
|
+
toolbarWidth: Tu,
|
|
324
|
+
toolbarHeight: Eu,
|
|
325
|
+
viewport: T,
|
|
326
|
+
gap: mu,
|
|
327
|
+
edgePadding: fu
|
|
313
328
|
});
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
329
|
+
J({ open: !0, top: d.top, left: d.left }), Yr(
|
|
330
|
+
lu(
|
|
331
|
+
{ top: l.top, left: l.left, bottom: l.bottom, width: l.width },
|
|
332
|
+
T
|
|
333
|
+
)
|
|
334
|
+
);
|
|
335
|
+
}, Ee = () => {
|
|
336
|
+
var f;
|
|
337
|
+
sr(Va());
|
|
338
|
+
const e = Ya("formatBlock");
|
|
339
|
+
if (e && Ut(e.toLowerCase().replace(/[<>]/g, "")), cn(za()), Sr(Rt()), s.mentions && o.current) {
|
|
340
|
+
const a = Na(wo(o.current));
|
|
341
|
+
if (je(a), a !== null) {
|
|
342
|
+
const m = bt(o.current);
|
|
343
|
+
m && vr({ top: m.top, left: m.left });
|
|
344
|
+
}
|
|
345
|
+
} else de !== null && je(null);
|
|
346
|
+
const t = (f = window.getSelection()) == null ? void 0 : f.toString().trim();
|
|
347
|
+
t && (ge.current = t), El();
|
|
348
|
+
const n = Ro(o.current);
|
|
349
|
+
if (wt(n.line), yt(n.col), s.outline && j(ne(o.current)), !o.current || !s.blocks) return;
|
|
350
|
+
const l = window.getSelection(), T = (l == null ? void 0 : l.anchorNode) ?? null, d = Oe(T, o.current);
|
|
351
|
+
if (Io(o.current, d), d) {
|
|
352
|
+
const a = o.current.getBoundingClientRect(), m = d.getBoundingClientRect();
|
|
353
|
+
Mr(m.top - a.top + o.current.scrollTop), Vt(!0);
|
|
328
354
|
} else
|
|
329
|
-
|
|
355
|
+
Vt(!1);
|
|
330
356
|
}, _ = () => {
|
|
331
357
|
var t, n, l;
|
|
332
358
|
if (!o.current) return;
|
|
333
359
|
let e = o.current.innerHTML;
|
|
334
|
-
if (
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
|
|
360
|
+
if (Q && s.trackChanges) {
|
|
361
|
+
const T = window.getSelection();
|
|
362
|
+
if (T && !T.isCollapsed) {
|
|
363
|
+
const d = Rt();
|
|
364
|
+
if (d) {
|
|
365
|
+
const f = Ct("delete", d, K);
|
|
366
|
+
Te([...X, f]), ml(f.id), e = o.current.innerHTML;
|
|
341
367
|
}
|
|
342
368
|
}
|
|
343
369
|
}
|
|
344
|
-
if (
|
|
345
|
-
const
|
|
346
|
-
if (
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
top:
|
|
353
|
-
left:
|
|
370
|
+
if (st(e), Ee(), En && o.current) {
|
|
371
|
+
const T = ((n = (t = window.getSelection()) == null ? void 0 : t.anchorNode) == null ? void 0 : n.textContent) ?? "", d = zs(T);
|
|
372
|
+
if (d !== null) {
|
|
373
|
+
Ye(d), Re($s(d));
|
|
374
|
+
const f = (l = window.getSelection()) == null ? void 0 : l.getRangeAt(0);
|
|
375
|
+
if (f && o.current) {
|
|
376
|
+
const a = f.getBoundingClientRect(), m = o.current.getBoundingClientRect();
|
|
377
|
+
Hr({
|
|
378
|
+
top: a.bottom - m.top + 8,
|
|
379
|
+
left: a.left - m.left
|
|
354
380
|
});
|
|
355
381
|
}
|
|
356
382
|
} else
|
|
357
|
-
|
|
383
|
+
Ye(P), Re([]);
|
|
358
384
|
}
|
|
359
|
-
|
|
385
|
+
it ? _l() : y();
|
|
360
386
|
};
|
|
361
|
-
|
|
387
|
+
M(() => {
|
|
362
388
|
const e = o.current;
|
|
363
|
-
if (!e ||
|
|
389
|
+
if (!e || c || u || !s.table) return;
|
|
364
390
|
const t = (l) => {
|
|
365
|
-
const
|
|
366
|
-
if (!(
|
|
367
|
-
const
|
|
368
|
-
if (!
|
|
369
|
-
const
|
|
370
|
-
if (!
|
|
371
|
-
const
|
|
372
|
-
if (
|
|
391
|
+
const T = l.target;
|
|
392
|
+
if (!(T instanceof Element)) return;
|
|
393
|
+
const d = T.closest(mo);
|
|
394
|
+
if (!d || !e.contains(d)) return;
|
|
395
|
+
const f = d.closest(Ot);
|
|
396
|
+
if (!f) return;
|
|
397
|
+
const a = Oo(l.clientX, d, Fn);
|
|
398
|
+
if (a === null) return;
|
|
373
399
|
l.preventDefault();
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
},
|
|
379
|
-
|
|
400
|
+
const m = l.clientX, k = d.getBoundingClientRect().width;
|
|
401
|
+
f.classList.add(pe);
|
|
402
|
+
const me = (Gl) => {
|
|
403
|
+
Ss(f, a, k + (Gl.clientX - m));
|
|
404
|
+
}, wn = () => {
|
|
405
|
+
f.classList.remove(pe), document.removeEventListener("pointermove", me), document.removeEventListener("pointerup", wn), _();
|
|
380
406
|
};
|
|
381
|
-
document.addEventListener("pointermove",
|
|
407
|
+
document.addEventListener("pointermove", me), document.addEventListener("pointerup", wn);
|
|
382
408
|
}, n = (l) => {
|
|
383
|
-
const
|
|
384
|
-
if (!(
|
|
385
|
-
const
|
|
386
|
-
if (e.querySelectorAll(
|
|
387
|
-
|
|
388
|
-
}), !
|
|
389
|
-
const
|
|
390
|
-
|
|
409
|
+
const T = l.target;
|
|
410
|
+
if (!(T instanceof Element)) return;
|
|
411
|
+
const d = T.closest(mo);
|
|
412
|
+
if (e.querySelectorAll(Ot).forEach((m) => {
|
|
413
|
+
m.classList.contains(pe) || m.classList.remove(pe);
|
|
414
|
+
}), !d || !e.contains(d)) return;
|
|
415
|
+
const a = d.closest(Ot);
|
|
416
|
+
a && Oo(l.clientX, d, Fn) !== null && a.classList.add(pe);
|
|
391
417
|
};
|
|
392
418
|
return e.addEventListener("pointerdown", t), e.addEventListener("pointermove", n), () => {
|
|
393
419
|
e.removeEventListener("pointerdown", t), e.removeEventListener("pointermove", n);
|
|
394
420
|
};
|
|
395
|
-
}, [
|
|
396
|
-
const
|
|
397
|
-
const e =
|
|
421
|
+
}, [c, u, s.table]);
|
|
422
|
+
const Cn = () => {
|
|
423
|
+
const e = x.suggestion;
|
|
398
424
|
if (!e) {
|
|
399
|
-
|
|
425
|
+
y();
|
|
400
426
|
return;
|
|
401
427
|
}
|
|
402
|
-
|
|
403
|
-
},
|
|
428
|
+
A(o.current), g(su, e), y(), _();
|
|
429
|
+
}, ml = (e) => {
|
|
404
430
|
const t = window.getSelection();
|
|
405
431
|
if (!t || t.rangeCount === 0) return;
|
|
406
|
-
const n =
|
|
407
|
-
n &&
|
|
408
|
-
},
|
|
409
|
-
if (!o.current || !
|
|
410
|
-
const e = o.current.innerHTML, t =
|
|
411
|
-
t.html !== e && (
|
|
432
|
+
const n = Rt();
|
|
433
|
+
n && I(Gs(n, e));
|
|
434
|
+
}, pl = () => {
|
|
435
|
+
if (!o.current || !Xo || !s.typoAutoFix || c || u) return;
|
|
436
|
+
const e = o.current.innerHTML, t = Rs(e);
|
|
437
|
+
t.html !== e && (ht(o.current, () => {
|
|
412
438
|
o.current && (o.current.innerHTML = t.html);
|
|
413
|
-
}),
|
|
414
|
-
},
|
|
415
|
-
if (
|
|
416
|
-
if (
|
|
417
|
-
|
|
439
|
+
}), st(t.html));
|
|
440
|
+
}, S = (e) => {
|
|
441
|
+
if (c || u) return;
|
|
442
|
+
if (A(o.current), e === "clearFormat") {
|
|
443
|
+
Qa(), _();
|
|
418
444
|
return;
|
|
419
445
|
}
|
|
420
446
|
if (e === "directionLtr" && o.current) {
|
|
421
|
-
|
|
447
|
+
ko(o.current, ji), _();
|
|
422
448
|
return;
|
|
423
449
|
}
|
|
424
450
|
if (e === "directionRtl" && o.current) {
|
|
425
|
-
|
|
451
|
+
ko(o.current, Qi), _();
|
|
426
452
|
return;
|
|
427
453
|
}
|
|
428
|
-
if (e ===
|
|
429
|
-
|
|
454
|
+
if (e === Pe) {
|
|
455
|
+
I(fo), _();
|
|
430
456
|
return;
|
|
431
457
|
}
|
|
432
|
-
const t =
|
|
433
|
-
t && (t.value ?
|
|
434
|
-
},
|
|
435
|
-
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
},
|
|
441
|
-
|
|
442
|
-
},
|
|
443
|
-
if (
|
|
444
|
-
|
|
445
|
-
},
|
|
458
|
+
const t = pt[e];
|
|
459
|
+
t && (t.value ? g(t.command, t.value) : g(t.command), _());
|
|
460
|
+
}, Ol = (e) => {
|
|
461
|
+
c || u || (A(o.current), g("formatBlock", e), Ut(e), _());
|
|
462
|
+
}, Ll = (e) => {
|
|
463
|
+
c || u || (A(o.current), qa(e), Kr(e), _());
|
|
464
|
+
}, Cl = (e) => {
|
|
465
|
+
c || u || (A(o.current), ja(e), cn(e), _());
|
|
466
|
+
}, Nn = (e) => {
|
|
467
|
+
yr(e), Gr(e), Se(!0);
|
|
468
|
+
}, Nl = (e) => {
|
|
469
|
+
if (c || u) return;
|
|
470
|
+
Nn(e === $i ? zi : He);
|
|
471
|
+
}, _t = () => {
|
|
446
472
|
var l;
|
|
447
|
-
if (
|
|
448
|
-
const e =
|
|
449
|
-
n && (
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
},
|
|
473
|
+
if (c || u) return;
|
|
474
|
+
const e = ha(o.current), t = ((l = window.getSelection()) == null ? void 0 : l.toString().trim()) || ge.current, n = window.prompt(Oi, Li);
|
|
475
|
+
n && (A(o.current), ga(o.current, e), $a(n, t), _());
|
|
476
|
+
}, dt = (e) => {
|
|
477
|
+
c || u || (A(o.current), I(e), _());
|
|
478
|
+
}, Il = (e) => {
|
|
453
479
|
var n;
|
|
454
|
-
const t = ((n = window.getSelection()) == null ? void 0 : n.toString().trim()) ||
|
|
455
|
-
|
|
456
|
-
},
|
|
457
|
-
if (
|
|
480
|
+
const t = ((n = window.getSelection()) == null ? void 0 : n.toString().trim()) || ge.current;
|
|
481
|
+
dt(So(e, t || xn));
|
|
482
|
+
}, In = async (e) => rr && kt ? kt(e) : Za(e), An = async () => {
|
|
483
|
+
if (c || u) return;
|
|
458
484
|
const e = document.createElement("input");
|
|
459
485
|
e.type = "file", e.accept = "image/*", e.onchange = async () => {
|
|
460
486
|
var l;
|
|
461
487
|
const t = (l = e.files) == null ? void 0 : l[0];
|
|
462
488
|
if (!t) return;
|
|
463
|
-
const n = await
|
|
464
|
-
|
|
489
|
+
const n = await In(t);
|
|
490
|
+
A(o.current), gt(n, t.name), _();
|
|
465
491
|
}, e.click();
|
|
466
|
-
},
|
|
467
|
-
if (
|
|
468
|
-
|
|
469
|
-
const n =
|
|
470
|
-
if (
|
|
471
|
-
const l =
|
|
472
|
-
|
|
492
|
+
}, hn = (e = Yo, t = zo) => {
|
|
493
|
+
if (c || u || !s.table) return;
|
|
494
|
+
A(o.current);
|
|
495
|
+
const n = Bs(e, t);
|
|
496
|
+
if (Q && s.trackChanges) {
|
|
497
|
+
const l = Ct("insert", n, K);
|
|
498
|
+
Te([...X, l]), I(go(n, l.id));
|
|
473
499
|
} else
|
|
474
|
-
|
|
500
|
+
I(n);
|
|
475
501
|
_();
|
|
476
|
-
},
|
|
477
|
-
const e =
|
|
502
|
+
}, gn = () => {
|
|
503
|
+
const e = ie.current.undo();
|
|
478
504
|
if (e === null || !o.current) {
|
|
479
|
-
|
|
505
|
+
g("undo"), _();
|
|
480
506
|
return;
|
|
481
507
|
}
|
|
482
|
-
|
|
483
|
-
},
|
|
484
|
-
const e =
|
|
508
|
+
F(e);
|
|
509
|
+
}, bn = () => {
|
|
510
|
+
const e = ie.current.redo();
|
|
485
511
|
if (e === null || !o.current) {
|
|
486
|
-
|
|
512
|
+
g("redo"), _();
|
|
487
513
|
return;
|
|
488
514
|
}
|
|
489
|
-
|
|
490
|
-
},
|
|
491
|
-
if (
|
|
492
|
-
e.preventDefault(),
|
|
493
|
-
const t =
|
|
494
|
-
|
|
495
|
-
},
|
|
496
|
-
const t =
|
|
515
|
+
F(e);
|
|
516
|
+
}, Al = (e) => {
|
|
517
|
+
if (c || u) return;
|
|
518
|
+
e.preventDefault(), et((n) => n.open ? { ...n, open: !1 } : n);
|
|
519
|
+
const t = s.graph ? va(e.target) : null;
|
|
520
|
+
te.current = t, Zr(!!t), sn(!!(s.table && Lo())), Ze({ open: !0, x: e.clientX, y: e.clientY });
|
|
521
|
+
}, ft = (e) => {
|
|
522
|
+
const t = te.current;
|
|
497
523
|
if (!t) return;
|
|
498
|
-
const n =
|
|
499
|
-
|
|
500
|
-
},
|
|
501
|
-
const t =
|
|
524
|
+
const n = Po(t.getAttribute(_o));
|
|
525
|
+
Do(t, e, n.length ? n : ke), te.current = null, _();
|
|
526
|
+
}, Rn = (e) => {
|
|
527
|
+
const t = te.current;
|
|
502
528
|
if (!t) return;
|
|
503
|
-
const n =
|
|
504
|
-
|
|
505
|
-
},
|
|
506
|
-
const n =
|
|
529
|
+
const n = Po(t.getAttribute(_o));
|
|
530
|
+
ol(n.length ? n : ke), ll(Mo(t.getAttribute(gc))), tl(e), rt(!0);
|
|
531
|
+
}, hl = (e, t) => {
|
|
532
|
+
const n = te.current;
|
|
507
533
|
if (!n) return;
|
|
508
|
-
const l = n.getAttribute(
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
const e =
|
|
512
|
-
if (!(!e || !
|
|
534
|
+
const l = n.getAttribute(Ac) ?? Bo;
|
|
535
|
+
Do(n, l, e, t), rt(!1), _();
|
|
536
|
+
}, Sn = () => {
|
|
537
|
+
const e = he.current;
|
|
538
|
+
if (!(!e || !s.fullscreen)) {
|
|
513
539
|
if (document.fullscreenElement) {
|
|
514
540
|
document.exitFullscreen();
|
|
515
541
|
return;
|
|
516
542
|
}
|
|
517
543
|
e.requestFullscreen();
|
|
518
544
|
}
|
|
519
|
-
},
|
|
520
|
-
const e =
|
|
545
|
+
}, gl = () => {
|
|
546
|
+
const e = te.current;
|
|
521
547
|
if (e) {
|
|
522
548
|
const t = document.createRange();
|
|
523
549
|
t.selectNodeContents(e);
|
|
524
550
|
const n = window.getSelection();
|
|
525
551
|
n == null || n.removeAllRanges(), n == null || n.addRange(t);
|
|
526
552
|
}
|
|
527
|
-
|
|
528
|
-
},
|
|
529
|
-
const e =
|
|
530
|
-
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
},
|
|
534
|
-
if (
|
|
553
|
+
ce(!0);
|
|
554
|
+
}, Bn = () => {
|
|
555
|
+
const e = !ot;
|
|
556
|
+
jr(e), e && o.current && j(ne(o.current)), We == null || We(e);
|
|
557
|
+
}, bl = (e) => {
|
|
558
|
+
c || u || (e.preventDefault(), Ze((t) => t.open ? { ...t, open: !1 } : t), et({ open: !0, x: e.clientX, y: e.clientY }));
|
|
559
|
+
}, Mn = () => {
|
|
560
|
+
if (c || u || !s.comments) return;
|
|
535
561
|
const e = window.prompt("Comment:");
|
|
536
562
|
if (!(e != null && e.trim())) return;
|
|
537
|
-
const t =
|
|
538
|
-
if (
|
|
539
|
-
const l =
|
|
540
|
-
|
|
541
|
-
},
|
|
563
|
+
const t = po("hl");
|
|
564
|
+
if (A(o.current), !Vs(t)) return;
|
|
565
|
+
const l = Ys(K, e.trim(), t);
|
|
566
|
+
De([l, ...G]), ut(!0), _();
|
|
567
|
+
}, Rl = [
|
|
542
568
|
{
|
|
543
|
-
id:
|
|
544
|
-
label:
|
|
545
|
-
onSelect: () =>
|
|
569
|
+
id: Bi,
|
|
570
|
+
label: Si,
|
|
571
|
+
onSelect: () => fn(!0)
|
|
546
572
|
},
|
|
547
573
|
{
|
|
548
|
-
id:
|
|
549
|
-
label:
|
|
550
|
-
onSelect: () =>
|
|
574
|
+
id: Di,
|
|
575
|
+
label: Mi,
|
|
576
|
+
onSelect: () => at(!0)
|
|
551
577
|
}
|
|
552
|
-
],
|
|
553
|
-
const t =
|
|
554
|
-
!t || !
|
|
555
|
-
},
|
|
578
|
+
], D = (e) => {
|
|
579
|
+
const t = Lo();
|
|
580
|
+
!t || !s.table || e(t) && _();
|
|
581
|
+
}, Sl = s.table && Wr ? [
|
|
582
|
+
{
|
|
583
|
+
id: vc,
|
|
584
|
+
label: kc,
|
|
585
|
+
onSelect: () => D((e) => Co(e, "before"))
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
id: wc,
|
|
589
|
+
label: Uc,
|
|
590
|
+
onSelect: () => D((e) => Co(e, "after"))
|
|
591
|
+
},
|
|
556
592
|
{
|
|
557
|
-
id:
|
|
558
|
-
label:
|
|
559
|
-
onSelect: () =>
|
|
593
|
+
id: Fc,
|
|
594
|
+
label: yc,
|
|
595
|
+
onSelect: () => D((e) => No(e, "before"))
|
|
560
596
|
},
|
|
561
597
|
{
|
|
562
|
-
id:
|
|
563
|
-
label:
|
|
564
|
-
onSelect: () =>
|
|
598
|
+
id: xc,
|
|
599
|
+
label: Kc,
|
|
600
|
+
onSelect: () => D((e) => No(e, "after"))
|
|
565
601
|
},
|
|
566
602
|
{
|
|
567
|
-
id:
|
|
568
|
-
label:
|
|
569
|
-
onSelect: () =>
|
|
603
|
+
id: Gc,
|
|
604
|
+
label: Xc,
|
|
605
|
+
onSelect: () => D((e) => Ms(e))
|
|
570
606
|
},
|
|
571
607
|
{
|
|
572
|
-
id:
|
|
573
|
-
label:
|
|
574
|
-
onSelect: () =>
|
|
608
|
+
id: Vc,
|
|
609
|
+
label: Wc,
|
|
610
|
+
onSelect: () => D((e) => Ds(e))
|
|
575
611
|
},
|
|
576
612
|
{
|
|
577
|
-
id:
|
|
578
|
-
label:
|
|
579
|
-
onSelect: () =>
|
|
613
|
+
id: zc,
|
|
614
|
+
label: Yc,
|
|
615
|
+
onSelect: () => D((e) => Ps(e))
|
|
580
616
|
},
|
|
581
617
|
{
|
|
582
|
-
id:
|
|
583
|
-
label:
|
|
584
|
-
onSelect: () =>
|
|
618
|
+
id: qc,
|
|
619
|
+
label: $c,
|
|
620
|
+
onSelect: () => D((e) => Hs(e))
|
|
585
621
|
},
|
|
586
622
|
{
|
|
587
|
-
id:
|
|
588
|
-
label:
|
|
589
|
-
onSelect: () =>
|
|
623
|
+
id: Qc,
|
|
624
|
+
label: jc,
|
|
625
|
+
onSelect: () => D((e) => ks(e))
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
id: Jc,
|
|
629
|
+
label: Zc,
|
|
630
|
+
onSelect: () => D((e) => vs(e))
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
id: ts,
|
|
634
|
+
label: es,
|
|
635
|
+
onSelect: () => D((e) => Us(e))
|
|
590
636
|
}
|
|
591
|
-
] : [],
|
|
592
|
-
...
|
|
637
|
+
] : [], Bl = [
|
|
638
|
+
...s.graph && Qr ? [
|
|
593
639
|
{
|
|
594
|
-
id:
|
|
595
|
-
label:
|
|
596
|
-
onSelect: () =>
|
|
640
|
+
id: ql,
|
|
641
|
+
label: $l,
|
|
642
|
+
onSelect: () => ft("bar")
|
|
597
643
|
},
|
|
598
644
|
{
|
|
599
|
-
id:
|
|
600
|
-
label:
|
|
601
|
-
onSelect: () =>
|
|
645
|
+
id: Ql,
|
|
646
|
+
label: jl,
|
|
647
|
+
onSelect: () => ft("line")
|
|
602
648
|
},
|
|
603
649
|
{
|
|
604
|
-
id:
|
|
605
|
-
label:
|
|
606
|
-
onSelect: () =>
|
|
650
|
+
id: Jl,
|
|
651
|
+
label: Zl,
|
|
652
|
+
onSelect: () => ft("pie")
|
|
607
653
|
},
|
|
608
654
|
{
|
|
609
|
-
id:
|
|
610
|
-
label:
|
|
611
|
-
onSelect: () =>
|
|
655
|
+
id: ti,
|
|
656
|
+
label: ei,
|
|
657
|
+
onSelect: () => Rn("values")
|
|
612
658
|
},
|
|
613
659
|
{
|
|
614
|
-
id:
|
|
615
|
-
label:
|
|
616
|
-
onSelect: () =>
|
|
660
|
+
id: oi,
|
|
661
|
+
label: ni,
|
|
662
|
+
onSelect: () => Rn("colors")
|
|
617
663
|
},
|
|
618
664
|
{
|
|
619
|
-
id:
|
|
620
|
-
label:
|
|
621
|
-
onSelect:
|
|
665
|
+
id: li,
|
|
666
|
+
label: ri,
|
|
667
|
+
onSelect: gl
|
|
622
668
|
}
|
|
623
669
|
] : [],
|
|
624
|
-
|
|
670
|
+
...Sl,
|
|
625
671
|
{
|
|
626
|
-
id:
|
|
627
|
-
label:
|
|
628
|
-
onSelect: () =>
|
|
672
|
+
id: os,
|
|
673
|
+
label: ns,
|
|
674
|
+
onSelect: () => S("bold")
|
|
629
675
|
},
|
|
630
676
|
{
|
|
631
|
-
id:
|
|
632
|
-
label:
|
|
633
|
-
onSelect: () =>
|
|
677
|
+
id: ls,
|
|
678
|
+
label: rs,
|
|
679
|
+
onSelect: () => S("italic")
|
|
634
680
|
},
|
|
635
681
|
{
|
|
636
|
-
id:
|
|
637
|
-
label:
|
|
638
|
-
onSelect: () =>
|
|
682
|
+
id: cs,
|
|
683
|
+
label: is,
|
|
684
|
+
onSelect: () => S("underline")
|
|
639
685
|
},
|
|
640
686
|
{
|
|
641
|
-
id:
|
|
642
|
-
label:
|
|
643
|
-
onSelect: () =>
|
|
687
|
+
id: as,
|
|
688
|
+
label: ss,
|
|
689
|
+
onSelect: () => S("strikethrough")
|
|
644
690
|
},
|
|
645
691
|
{
|
|
646
|
-
id:
|
|
647
|
-
label:
|
|
648
|
-
onSelect: () =>
|
|
692
|
+
id: _s,
|
|
693
|
+
label: us,
|
|
694
|
+
onSelect: () => S("heading2")
|
|
649
695
|
},
|
|
650
696
|
{
|
|
651
|
-
id:
|
|
652
|
-
label:
|
|
653
|
-
onSelect: () =>
|
|
697
|
+
id: fs,
|
|
698
|
+
label: ds,
|
|
699
|
+
onSelect: () => S("bulletList")
|
|
654
700
|
},
|
|
655
701
|
{
|
|
656
|
-
id:
|
|
657
|
-
label:
|
|
658
|
-
onSelect: () =>
|
|
702
|
+
id: Es,
|
|
703
|
+
label: Ts,
|
|
704
|
+
onSelect: () => S("orderedList")
|
|
659
705
|
},
|
|
660
706
|
{
|
|
661
|
-
id:
|
|
662
|
-
label:
|
|
663
|
-
onSelect: () =>
|
|
707
|
+
id: ps,
|
|
708
|
+
label: ms,
|
|
709
|
+
onSelect: () => _t()
|
|
664
710
|
},
|
|
665
711
|
{
|
|
666
|
-
id:
|
|
667
|
-
label:
|
|
668
|
-
onSelect: () =>
|
|
712
|
+
id: Ls,
|
|
713
|
+
label: Os,
|
|
714
|
+
onSelect: () => S("clearFormat")
|
|
669
715
|
},
|
|
670
716
|
{
|
|
671
|
-
id:
|
|
672
|
-
label:
|
|
673
|
-
disabled: !
|
|
674
|
-
onSelect: () =>
|
|
717
|
+
id: Ns,
|
|
718
|
+
label: Cs,
|
|
719
|
+
disabled: !s.findReplace,
|
|
720
|
+
onSelect: () => Se(!0)
|
|
675
721
|
},
|
|
676
722
|
{
|
|
677
|
-
id:
|
|
678
|
-
label:
|
|
679
|
-
disabled: !
|
|
680
|
-
onSelect: () =>
|
|
723
|
+
id: As,
|
|
724
|
+
label: Is,
|
|
725
|
+
disabled: !s.signature,
|
|
726
|
+
onSelect: () => ze(!0)
|
|
681
727
|
},
|
|
682
728
|
{
|
|
683
|
-
id:
|
|
684
|
-
label:
|
|
685
|
-
disabled: !
|
|
686
|
-
onSelect: () =>
|
|
729
|
+
id: gs,
|
|
730
|
+
label: hs,
|
|
731
|
+
disabled: !s.comments,
|
|
732
|
+
onSelect: () => Mn()
|
|
687
733
|
},
|
|
688
|
-
...
|
|
734
|
+
...On ? [
|
|
689
735
|
{
|
|
690
|
-
id:
|
|
691
|
-
label:
|
|
692
|
-
onSelect: () =>
|
|
736
|
+
id: Ri,
|
|
737
|
+
label: bi,
|
|
738
|
+
onSelect: () => at(!1)
|
|
693
739
|
}
|
|
694
740
|
] : []
|
|
695
|
-
],
|
|
741
|
+
], Dn = (e) => {
|
|
696
742
|
if (!o.current) return;
|
|
697
|
-
const t =
|
|
698
|
-
|
|
699
|
-
|
|
743
|
+
const t = Xs(o.current.innerHTML, e);
|
|
744
|
+
F(t), Te(
|
|
745
|
+
X.map((n) => n.id === e ? { ...n, accepted: !0 } : n)
|
|
700
746
|
);
|
|
701
|
-
},
|
|
747
|
+
}, Pn = (e) => {
|
|
702
748
|
if (!o.current) return;
|
|
703
|
-
const t =
|
|
704
|
-
|
|
705
|
-
|
|
749
|
+
const t = xs(o.current.innerHTML, e);
|
|
750
|
+
F(t), Te(
|
|
751
|
+
X.map((n) => n.id === e ? { ...n, rejected: !0 } : n)
|
|
706
752
|
);
|
|
707
|
-
},
|
|
708
|
-
const t = await
|
|
709
|
-
if (
|
|
710
|
-
const l =
|
|
711
|
-
|
|
753
|
+
}, Hn = async (e) => {
|
|
754
|
+
const t = await In(e), n = `<img src="${t}" alt="" style="max-width:100%;height:auto;" />`;
|
|
755
|
+
if (Q && s.trackChanges) {
|
|
756
|
+
const l = Ct("insert", n, K);
|
|
757
|
+
Te([...X, l]), I(go(n, l.id));
|
|
712
758
|
} else
|
|
713
|
-
|
|
759
|
+
gt(t);
|
|
714
760
|
_();
|
|
715
|
-
},
|
|
716
|
-
if (
|
|
761
|
+
}, Ml = async (e) => {
|
|
762
|
+
if (c || u) return;
|
|
717
763
|
const t = e.clipboardData;
|
|
718
764
|
if (!t) return;
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
765
|
+
const n = Js(t);
|
|
766
|
+
if (cr || ea(n)) {
|
|
767
|
+
const T = n;
|
|
768
|
+
if (T) {
|
|
722
769
|
e.preventDefault();
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
if (
|
|
727
|
-
for (const
|
|
728
|
-
if (!
|
|
729
|
-
const
|
|
730
|
-
|
|
770
|
+
const f = ta(T);
|
|
771
|
+
f && (I(f), _());
|
|
772
|
+
const a = t.items;
|
|
773
|
+
if (Bt && a)
|
|
774
|
+
for (const m of Array.from(a)) {
|
|
775
|
+
if (!m.type.startsWith("image/")) continue;
|
|
776
|
+
const k = m.getAsFile();
|
|
777
|
+
k && await Hn(k);
|
|
731
778
|
}
|
|
732
779
|
return;
|
|
733
780
|
}
|
|
734
|
-
const
|
|
735
|
-
if (
|
|
736
|
-
e.preventDefault(),
|
|
781
|
+
const d = na(t);
|
|
782
|
+
if (d) {
|
|
783
|
+
e.preventDefault(), I(d.replace(/\n/g, "<br />")), _();
|
|
737
784
|
return;
|
|
738
785
|
}
|
|
739
786
|
}
|
|
740
|
-
if (!
|
|
741
|
-
const
|
|
742
|
-
if (
|
|
743
|
-
for (const
|
|
744
|
-
if (!
|
|
787
|
+
if (!Bt) return;
|
|
788
|
+
const l = t.items;
|
|
789
|
+
if (l)
|
|
790
|
+
for (const T of Array.from(l)) {
|
|
791
|
+
if (!T.type.startsWith("image/")) continue;
|
|
745
792
|
e.preventDefault();
|
|
746
|
-
const
|
|
747
|
-
|
|
793
|
+
const d = T.getAsFile();
|
|
794
|
+
d && await Hn(d);
|
|
748
795
|
}
|
|
749
|
-
},
|
|
750
|
-
|
|
751
|
-
},
|
|
752
|
-
|
|
753
|
-
|
|
796
|
+
}, Dl = (e) => {
|
|
797
|
+
S(e);
|
|
798
|
+
}, Pl = async (e) => {
|
|
799
|
+
const t = nu(e);
|
|
800
|
+
if (!(!t || !o.current || !ue)) {
|
|
801
|
+
an(!0), fe("");
|
|
802
|
+
try {
|
|
803
|
+
const n = await vo.runProvider((E == null ? void 0 : E.providerId) || To, {
|
|
804
|
+
capability: t,
|
|
805
|
+
html: o.current.innerHTML,
|
|
806
|
+
selectionHtml: ue,
|
|
807
|
+
options: ou(e),
|
|
808
|
+
modelId: E == null ? void 0 : E.modelId
|
|
809
|
+
});
|
|
810
|
+
fe(ru(n));
|
|
811
|
+
} catch {
|
|
812
|
+
fe("");
|
|
813
|
+
} finally {
|
|
814
|
+
an(!1);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}, Hl = () => {
|
|
818
|
+
tt && (A(o.current), I(tt), fe(""), _());
|
|
819
|
+
}, kl = (e) => {
|
|
820
|
+
if (e.key === ki && x.visible && x.suggestion) {
|
|
821
|
+
e.preventDefault(), Cn();
|
|
754
822
|
return;
|
|
755
823
|
}
|
|
756
|
-
if (e.key ===
|
|
757
|
-
|
|
824
|
+
if (e.key === vi) {
|
|
825
|
+
y();
|
|
758
826
|
return;
|
|
759
827
|
}
|
|
760
|
-
if (
|
|
828
|
+
if (Ga(e.nativeEvent) || Wa(e.nativeEvent)) {
|
|
761
829
|
_();
|
|
762
830
|
return;
|
|
763
831
|
}
|
|
764
|
-
if (e.key ===
|
|
765
|
-
if (
|
|
766
|
-
e.preventDefault(),
|
|
832
|
+
if (e.key === Ui) {
|
|
833
|
+
if (x.visible) {
|
|
834
|
+
e.preventDefault(), y();
|
|
767
835
|
return;
|
|
768
836
|
}
|
|
769
|
-
|
|
837
|
+
Re([]), J((t) => t.open ? { ...t, open: !1 } : t);
|
|
770
838
|
}
|
|
771
|
-
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() ===
|
|
772
|
-
e.preventDefault(),
|
|
839
|
+
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === wi) {
|
|
840
|
+
e.preventDefault(), s.ai && (E != null && E.enabled) && ce(!0);
|
|
773
841
|
return;
|
|
774
842
|
}
|
|
775
|
-
(e.metaKey || e.ctrlKey) && e.key ===
|
|
776
|
-
},
|
|
843
|
+
(e.metaKey || e.ctrlKey) && e.key === yi && (e.preventDefault(), e.shiftKey ? bn() : gn());
|
|
844
|
+
}, vl = (e) => {
|
|
777
845
|
var n;
|
|
778
|
-
|
|
846
|
+
A(o.current);
|
|
779
847
|
const t = window.getSelection();
|
|
780
848
|
if ((n = t == null ? void 0 : t.anchorNode) != null && n.textContent) {
|
|
781
|
-
const
|
|
782
|
-
t.anchorNode.nodeType === Node.TEXT_NODE && (t.anchorNode.textContent =
|
|
849
|
+
const T = t.anchorNode.textContent.replace(/(?:^|\s)\/[^\s]*$/, " ");
|
|
850
|
+
t.anchorNode.nodeType === Node.TEXT_NODE && (t.anchorNode.textContent = T);
|
|
783
851
|
}
|
|
784
|
-
switch (
|
|
852
|
+
switch (Ye(P), Re([]), e.insert) {
|
|
785
853
|
case "heading1":
|
|
786
|
-
|
|
854
|
+
g("formatBlock", Pc);
|
|
787
855
|
break;
|
|
788
856
|
case "heading2":
|
|
789
|
-
|
|
857
|
+
g("formatBlock", Dc);
|
|
790
858
|
break;
|
|
791
859
|
case "heading3":
|
|
792
|
-
|
|
860
|
+
g("formatBlock", Mc);
|
|
793
861
|
break;
|
|
794
862
|
case "paragraph":
|
|
795
|
-
|
|
863
|
+
g("formatBlock", Bc);
|
|
796
864
|
break;
|
|
797
865
|
case "bulletList":
|
|
798
|
-
|
|
866
|
+
g("insertUnorderedList");
|
|
799
867
|
break;
|
|
800
868
|
case "orderedList":
|
|
801
|
-
|
|
869
|
+
g("insertOrderedList");
|
|
802
870
|
break;
|
|
803
871
|
case "checklist":
|
|
804
|
-
|
|
872
|
+
I(fo);
|
|
805
873
|
break;
|
|
806
874
|
case "quote":
|
|
807
|
-
|
|
875
|
+
g("formatBlock", Sc);
|
|
808
876
|
break;
|
|
809
877
|
case "code":
|
|
810
|
-
|
|
878
|
+
g("formatBlock", Rc);
|
|
811
879
|
break;
|
|
812
880
|
case "callout":
|
|
813
|
-
|
|
881
|
+
I(bc);
|
|
814
882
|
break;
|
|
815
883
|
case "table":
|
|
816
|
-
|
|
884
|
+
hn();
|
|
817
885
|
return;
|
|
818
886
|
case "image":
|
|
819
|
-
|
|
887
|
+
An();
|
|
820
888
|
return;
|
|
821
889
|
case "ai":
|
|
822
|
-
|
|
890
|
+
ce(!0);
|
|
823
891
|
break;
|
|
824
892
|
case "titles":
|
|
825
|
-
|
|
893
|
+
I(So(Pa, ge.current || xn));
|
|
826
894
|
break;
|
|
827
895
|
case "excel":
|
|
828
|
-
|
|
896
|
+
I(Ha(ka()));
|
|
829
897
|
break;
|
|
830
898
|
case "graph":
|
|
831
|
-
|
|
899
|
+
I(Ua(Bo, ke));
|
|
832
900
|
break;
|
|
833
901
|
}
|
|
834
902
|
_();
|
|
835
|
-
},
|
|
903
|
+
}, kn = (e) => {
|
|
836
904
|
if (!o.current) return;
|
|
837
|
-
const t = window.getSelection(), n =
|
|
838
|
-
n &&
|
|
839
|
-
},
|
|
905
|
+
const t = window.getSelection(), n = Oe((t == null ? void 0 : t.anchorNode) ?? null, o.current);
|
|
906
|
+
n && ys(n, e) && (_(), Ee());
|
|
907
|
+
}, Ul = (e) => {
|
|
840
908
|
if (!o.current) return;
|
|
841
|
-
const t = window.getSelection(), n =
|
|
842
|
-
if (!
|
|
909
|
+
const t = window.getSelection(), n = Oe((t == null ? void 0 : t.anchorNode) ?? null, o.current), l = o.current.querySelector(`.${hc}`), T = n ?? (l instanceof HTMLElement ? l : null);
|
|
910
|
+
if (!T) {
|
|
843
911
|
e.preventDefault();
|
|
844
912
|
return;
|
|
845
913
|
}
|
|
846
|
-
|
|
847
|
-
},
|
|
848
|
-
if (!o.current || !
|
|
849
|
-
e.preventDefault(), e.dataTransfer.dropEffect =
|
|
850
|
-
const t =
|
|
851
|
-
if (!t || t ===
|
|
852
|
-
|
|
914
|
+
W.current = T, Lt(o.current), Io(o.current, T), ws(T), e.dataTransfer.setData(uu, _u), e.dataTransfer.effectAllowed = yo;
|
|
915
|
+
}, wl = (e) => {
|
|
916
|
+
if (!o.current || !W.current) return;
|
|
917
|
+
e.preventDefault(), e.dataTransfer.dropEffect = yo;
|
|
918
|
+
const t = Oe(e.target, o.current);
|
|
919
|
+
if (!t || t === W.current) {
|
|
920
|
+
ho(o.current, null, null);
|
|
853
921
|
return;
|
|
854
922
|
}
|
|
855
|
-
const n =
|
|
856
|
-
|
|
857
|
-
},
|
|
858
|
-
if (!o.current || !
|
|
923
|
+
const n = Ao(e.clientY, t);
|
|
924
|
+
ho(o.current, t, n);
|
|
925
|
+
}, yl = (e) => {
|
|
926
|
+
if (!o.current || !W.current) return;
|
|
859
927
|
e.preventDefault();
|
|
860
|
-
const t =
|
|
861
|
-
t && t !== n && (
|
|
862
|
-
},
|
|
863
|
-
o.current &&
|
|
864
|
-
},
|
|
865
|
-
var l,
|
|
928
|
+
const t = Oe(e.target, o.current), n = W.current;
|
|
929
|
+
t && t !== n && (Ao(e.clientY, t) === qi ? Fs(n, t) : Ks(n, t)) && (_(), Ee()), Lt(o.current), W.current = null;
|
|
930
|
+
}, Fl = () => {
|
|
931
|
+
o.current && Lt(o.current), W.current = null;
|
|
932
|
+
}, Tt = (e, t) => {
|
|
933
|
+
var l, T, d, f;
|
|
866
934
|
if (e === "divider")
|
|
867
|
-
return /* @__PURE__ */ r("span", { className:
|
|
935
|
+
return /* @__PURE__ */ r("span", { className: Lc }, `divider-${t}`);
|
|
868
936
|
if (e === "headingDropdown")
|
|
869
937
|
return /* @__PURE__ */ r(
|
|
870
|
-
|
|
938
|
+
ve,
|
|
871
939
|
{
|
|
872
940
|
title: "Heading",
|
|
873
|
-
options:
|
|
874
|
-
value:
|
|
875
|
-
disabled:
|
|
876
|
-
onChange:
|
|
941
|
+
options: Cc,
|
|
942
|
+
value: ar || "p",
|
|
943
|
+
disabled: c || u,
|
|
944
|
+
onChange: Ol
|
|
877
945
|
},
|
|
878
946
|
"heading"
|
|
879
947
|
);
|
|
880
|
-
if (e ===
|
|
948
|
+
if (e === Xn)
|
|
881
949
|
return /* @__PURE__ */ r(
|
|
882
|
-
|
|
950
|
+
ve,
|
|
883
951
|
{
|
|
884
|
-
title:
|
|
885
|
-
options:
|
|
886
|
-
value:
|
|
887
|
-
disabled:
|
|
888
|
-
onChange:
|
|
952
|
+
title: xi,
|
|
953
|
+
options: Ki,
|
|
954
|
+
value: Fr,
|
|
955
|
+
disabled: c || u,
|
|
956
|
+
onChange: Ll
|
|
889
957
|
},
|
|
890
|
-
|
|
958
|
+
Xn
|
|
891
959
|
);
|
|
892
|
-
if (e ===
|
|
960
|
+
if (e === Gn)
|
|
893
961
|
return /* @__PURE__ */ r(
|
|
894
|
-
|
|
962
|
+
ve,
|
|
895
963
|
{
|
|
896
|
-
title:
|
|
897
|
-
options:
|
|
898
|
-
value:
|
|
899
|
-
disabled:
|
|
900
|
-
onChange:
|
|
964
|
+
title: Wi,
|
|
965
|
+
options: Gi,
|
|
966
|
+
value: xr,
|
|
967
|
+
disabled: c || u,
|
|
968
|
+
onChange: Cl
|
|
901
969
|
},
|
|
902
|
-
|
|
970
|
+
Gn
|
|
903
971
|
);
|
|
904
972
|
if (e === "textColor")
|
|
905
973
|
return /* @__PURE__ */ r(
|
|
906
|
-
|
|
974
|
+
Uo,
|
|
907
975
|
{
|
|
908
976
|
title: "Text color",
|
|
909
977
|
type: "text",
|
|
910
|
-
value:
|
|
911
|
-
disabled:
|
|
912
|
-
onChange: (
|
|
913
|
-
|
|
978
|
+
value: Cr,
|
|
979
|
+
disabled: c || u,
|
|
980
|
+
onChange: (a) => {
|
|
981
|
+
A(o.current), xa(a), Nr(a), _();
|
|
914
982
|
}
|
|
915
983
|
},
|
|
916
984
|
"textColor"
|
|
917
985
|
);
|
|
918
986
|
if (e === "highlightColor")
|
|
919
987
|
return /* @__PURE__ */ r(
|
|
920
|
-
|
|
988
|
+
Uo,
|
|
921
989
|
{
|
|
922
990
|
title: "Highlight color",
|
|
923
991
|
type: "highlight",
|
|
924
|
-
value:
|
|
925
|
-
disabled:
|
|
926
|
-
onChange: (
|
|
927
|
-
|
|
992
|
+
value: Ir,
|
|
993
|
+
disabled: c || u,
|
|
994
|
+
onChange: (a) => {
|
|
995
|
+
A(o.current), Xa(a), Ar(a), _();
|
|
928
996
|
}
|
|
929
997
|
},
|
|
930
998
|
"highlightColor"
|
|
@@ -933,12 +1001,12 @@ const mt = () => {
|
|
|
933
1001
|
return /* @__PURE__ */ r(
|
|
934
1002
|
N,
|
|
935
1003
|
{
|
|
936
|
-
icon:
|
|
1004
|
+
icon: L.link,
|
|
937
1005
|
title: "Insert link",
|
|
938
|
-
hint:
|
|
939
|
-
onHint:
|
|
940
|
-
disabled:
|
|
941
|
-
onClick:
|
|
1006
|
+
hint: C.link,
|
|
1007
|
+
onHint: p,
|
|
1008
|
+
disabled: c || u,
|
|
1009
|
+
onClick: _t
|
|
942
1010
|
},
|
|
943
1011
|
"link"
|
|
944
1012
|
);
|
|
@@ -946,212 +1014,303 @@ const mt = () => {
|
|
|
946
1014
|
return /* @__PURE__ */ r(
|
|
947
1015
|
N,
|
|
948
1016
|
{
|
|
949
|
-
hint:
|
|
950
|
-
onHint:
|
|
951
|
-
icon:
|
|
1017
|
+
hint: C.image,
|
|
1018
|
+
onHint: p,
|
|
1019
|
+
icon: L.image,
|
|
952
1020
|
title: "Insert image",
|
|
953
|
-
disabled:
|
|
1021
|
+
disabled: c || u,
|
|
954
1022
|
onClick: () => {
|
|
955
|
-
|
|
1023
|
+
An();
|
|
956
1024
|
}
|
|
957
1025
|
},
|
|
958
1026
|
"image"
|
|
959
1027
|
);
|
|
960
|
-
if (e ===
|
|
1028
|
+
if (e === Pe)
|
|
961
1029
|
return /* @__PURE__ */ r(
|
|
962
1030
|
N,
|
|
963
1031
|
{
|
|
964
|
-
icon:
|
|
1032
|
+
icon: L.checklist,
|
|
965
1033
|
title: "Checklist",
|
|
966
|
-
hint:
|
|
967
|
-
onHint:
|
|
968
|
-
disabled:
|
|
969
|
-
onClick: () =>
|
|
1034
|
+
hint: C.checklist,
|
|
1035
|
+
onHint: p,
|
|
1036
|
+
disabled: c || u,
|
|
1037
|
+
onClick: () => S(Pe)
|
|
970
1038
|
},
|
|
971
|
-
|
|
1039
|
+
Pe
|
|
972
1040
|
);
|
|
973
1041
|
if (e === "table")
|
|
974
|
-
return
|
|
975
|
-
|
|
1042
|
+
return s.table ? /* @__PURE__ */ r(
|
|
1043
|
+
Bu,
|
|
976
1044
|
{
|
|
977
|
-
icon:
|
|
978
|
-
disabled:
|
|
979
|
-
onSelect:
|
|
1045
|
+
icon: L.table,
|
|
1046
|
+
disabled: c || u,
|
|
1047
|
+
onSelect: hn
|
|
980
1048
|
},
|
|
981
1049
|
"table"
|
|
982
1050
|
) : null;
|
|
983
|
-
if (e ===
|
|
984
|
-
return
|
|
985
|
-
|
|
1051
|
+
if (e === Wn)
|
|
1052
|
+
return s.titles ? /* @__PURE__ */ r(
|
|
1053
|
+
Mu,
|
|
986
1054
|
{
|
|
987
|
-
icon:
|
|
988
|
-
disabled:
|
|
989
|
-
pluginColor: (l =
|
|
990
|
-
hint:
|
|
991
|
-
onHint:
|
|
992
|
-
onSelect:
|
|
1055
|
+
icon: L.titles,
|
|
1056
|
+
disabled: c || u,
|
|
1057
|
+
pluginColor: (l = Ce.get("titles")) == null ? void 0 : l.color,
|
|
1058
|
+
hint: C.titles,
|
|
1059
|
+
onHint: p,
|
|
1060
|
+
onSelect: Il
|
|
993
1061
|
},
|
|
994
|
-
|
|
1062
|
+
Wn
|
|
995
1063
|
) : null;
|
|
996
|
-
if (e ===
|
|
997
|
-
return
|
|
998
|
-
|
|
1064
|
+
if (e === Vn)
|
|
1065
|
+
return s.excel ? /* @__PURE__ */ r(
|
|
1066
|
+
Du,
|
|
999
1067
|
{
|
|
1000
|
-
icon:
|
|
1001
|
-
disabled:
|
|
1002
|
-
pluginColor: (
|
|
1003
|
-
hint:
|
|
1004
|
-
onHint:
|
|
1005
|
-
onInsert:
|
|
1068
|
+
icon: L.excel,
|
|
1069
|
+
disabled: c || u,
|
|
1070
|
+
pluginColor: (T = Ce.get("excel")) == null ? void 0 : T.color,
|
|
1071
|
+
hint: C.excel,
|
|
1072
|
+
onHint: p,
|
|
1073
|
+
onInsert: dt
|
|
1006
1074
|
},
|
|
1007
|
-
|
|
1075
|
+
Vn
|
|
1008
1076
|
) : null;
|
|
1009
|
-
if (e ===
|
|
1010
|
-
return
|
|
1011
|
-
|
|
1077
|
+
if (e === Yn)
|
|
1078
|
+
return s.graph ? /* @__PURE__ */ r(
|
|
1079
|
+
Pu,
|
|
1012
1080
|
{
|
|
1013
|
-
icon:
|
|
1014
|
-
disabled:
|
|
1015
|
-
pluginColor: (
|
|
1016
|
-
hint:
|
|
1017
|
-
onHint:
|
|
1018
|
-
onInsert:
|
|
1081
|
+
icon: L.graph,
|
|
1082
|
+
disabled: c || u,
|
|
1083
|
+
pluginColor: (d = Ce.get("graph")) == null ? void 0 : d.color,
|
|
1084
|
+
hint: C.graph,
|
|
1085
|
+
onHint: p,
|
|
1086
|
+
onInsert: dt
|
|
1019
1087
|
},
|
|
1020
|
-
|
|
1088
|
+
Yn
|
|
1021
1089
|
) : null;
|
|
1022
|
-
if (e ===
|
|
1023
|
-
return
|
|
1024
|
-
|
|
1090
|
+
if (e === zn)
|
|
1091
|
+
return s.theme ? /* @__PURE__ */ r(
|
|
1092
|
+
ku,
|
|
1025
1093
|
{
|
|
1026
|
-
icon:
|
|
1027
|
-
disabled:
|
|
1028
|
-
pluginColor: (
|
|
1029
|
-
hint:
|
|
1030
|
-
onHint:
|
|
1031
|
-
value:
|
|
1032
|
-
onChange: (
|
|
1033
|
-
|
|
1094
|
+
icon: L.theme,
|
|
1095
|
+
disabled: c,
|
|
1096
|
+
pluginColor: (f = Ce.get("theme")) == null ? void 0 : f.color,
|
|
1097
|
+
hint: C.theme,
|
|
1098
|
+
onHint: p,
|
|
1099
|
+
value: il,
|
|
1100
|
+
onChange: (a) => {
|
|
1101
|
+
cl(a), ya(he.current, a);
|
|
1034
1102
|
}
|
|
1035
1103
|
},
|
|
1036
|
-
|
|
1104
|
+
zn
|
|
1037
1105
|
) : null;
|
|
1038
|
-
if (e ===
|
|
1039
|
-
return
|
|
1106
|
+
if (e === $n)
|
|
1107
|
+
return s.fullscreen ? /* @__PURE__ */ r(
|
|
1040
1108
|
N,
|
|
1041
1109
|
{
|
|
1042
|
-
icon:
|
|
1043
|
-
title:
|
|
1044
|
-
hint:
|
|
1045
|
-
onHint:
|
|
1046
|
-
active:
|
|
1047
|
-
disabled:
|
|
1048
|
-
onClick:
|
|
1110
|
+
icon: L.fullscreen,
|
|
1111
|
+
title: pn ? di : fi,
|
|
1112
|
+
hint: C.fullscreen,
|
|
1113
|
+
onHint: p,
|
|
1114
|
+
active: pn,
|
|
1115
|
+
disabled: c,
|
|
1116
|
+
onClick: Sn
|
|
1049
1117
|
},
|
|
1050
|
-
|
|
1118
|
+
$n
|
|
1051
1119
|
) : null;
|
|
1052
|
-
if (e ===
|
|
1053
|
-
return
|
|
1120
|
+
if (e === qn)
|
|
1121
|
+
return s.outline ? /* @__PURE__ */ r(
|
|
1054
1122
|
N,
|
|
1055
1123
|
{
|
|
1056
|
-
icon:
|
|
1057
|
-
title:
|
|
1058
|
-
hint:
|
|
1059
|
-
onHint:
|
|
1060
|
-
active:
|
|
1061
|
-
disabled:
|
|
1062
|
-
onClick:
|
|
1124
|
+
icon: L.outline,
|
|
1125
|
+
title: Ti,
|
|
1126
|
+
hint: C.outline,
|
|
1127
|
+
onHint: p,
|
|
1128
|
+
active: ot,
|
|
1129
|
+
disabled: c,
|
|
1130
|
+
onClick: Bn
|
|
1063
1131
|
},
|
|
1064
|
-
|
|
1132
|
+
qn
|
|
1065
1133
|
) : null;
|
|
1066
|
-
if (e ===
|
|
1067
|
-
|
|
1134
|
+
if (e === Ci || e === jn) {
|
|
1135
|
+
if (!s.markdown) return null;
|
|
1136
|
+
const a = e === jn;
|
|
1137
|
+
return /* @__PURE__ */ r(
|
|
1138
|
+
N,
|
|
1139
|
+
{
|
|
1140
|
+
icon: a ? "Md" : "In",
|
|
1141
|
+
title: a ? "Export Markdown" : "Import Markdown",
|
|
1142
|
+
hint: C[e],
|
|
1143
|
+
onHint: p,
|
|
1144
|
+
disabled: c || (a ? !1 : u),
|
|
1145
|
+
onClick: () => {
|
|
1146
|
+
var m;
|
|
1147
|
+
if (a) {
|
|
1148
|
+
if (!o.current) return;
|
|
1149
|
+
aa(
|
|
1150
|
+
_a,
|
|
1151
|
+
ua(o.current.innerHTML),
|
|
1152
|
+
da
|
|
1153
|
+
);
|
|
1154
|
+
return;
|
|
1155
|
+
}
|
|
1156
|
+
(m = vt.current) == null || m.click();
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
e
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
if (e === Ni || e === Qn) {
|
|
1163
|
+
if (!s.export) return null;
|
|
1164
|
+
const a = e === Qn;
|
|
1165
|
+
return /* @__PURE__ */ r(
|
|
1068
1166
|
N,
|
|
1069
1167
|
{
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
active: ce,
|
|
1076
|
-
disabled: i,
|
|
1168
|
+
icon: a ? "PDF" : "W",
|
|
1169
|
+
title: a ? "Export PDF" : "Export Word",
|
|
1170
|
+
hint: C[e],
|
|
1171
|
+
onHint: p,
|
|
1172
|
+
disabled: c,
|
|
1077
1173
|
onClick: () => {
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1080
|
-
|
|
1174
|
+
var k;
|
|
1175
|
+
const m = ((k = o.current) == null ? void 0 : k.innerHTML) ?? "";
|
|
1176
|
+
if (a) {
|
|
1177
|
+
fa(m);
|
|
1081
1178
|
return;
|
|
1082
1179
|
}
|
|
1083
|
-
|
|
1180
|
+
Ta(ma, Ea(m), pa);
|
|
1084
1181
|
}
|
|
1085
1182
|
},
|
|
1086
|
-
|
|
1183
|
+
e
|
|
1184
|
+
);
|
|
1185
|
+
}
|
|
1186
|
+
if (e === Zn)
|
|
1187
|
+
return s.versionHistory ? /* @__PURE__ */ r(
|
|
1188
|
+
N,
|
|
1189
|
+
{
|
|
1190
|
+
icon: "V",
|
|
1191
|
+
title: "Version history",
|
|
1192
|
+
hint: C.versions,
|
|
1193
|
+
onHint: p,
|
|
1194
|
+
active: qt,
|
|
1195
|
+
disabled: c,
|
|
1196
|
+
onClick: () => {
|
|
1197
|
+
Qt(It(H)), jt((a) => !a);
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
Zn
|
|
1087
1201
|
) : null;
|
|
1088
|
-
if (e ===
|
|
1089
|
-
|
|
1202
|
+
if (e === Jn || e === Ii) {
|
|
1203
|
+
if (!s.formatPainter) return null;
|
|
1204
|
+
const a = e === Jn;
|
|
1205
|
+
return /* @__PURE__ */ r(
|
|
1090
1206
|
N,
|
|
1091
1207
|
{
|
|
1092
|
-
icon:
|
|
1208
|
+
icon: a ? "P" : "Aa",
|
|
1209
|
+
title: a ? "Format painter" : "Change case",
|
|
1210
|
+
hint: C[e],
|
|
1211
|
+
onHint: p,
|
|
1212
|
+
active: a ? !!Be : on,
|
|
1213
|
+
disabled: c || u,
|
|
1214
|
+
onClick: () => {
|
|
1215
|
+
if (a) {
|
|
1216
|
+
nn(Be ? null : Aa());
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1219
|
+
Ur((m) => !m);
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
e
|
|
1223
|
+
);
|
|
1224
|
+
}
|
|
1225
|
+
if (e === eo)
|
|
1226
|
+
return s.htmlSource ? /* @__PURE__ */ r(
|
|
1227
|
+
N,
|
|
1228
|
+
{
|
|
1229
|
+
className: so,
|
|
1230
|
+
icon: /* @__PURE__ */ r("span", { className: ao, children: mi }),
|
|
1231
|
+
title: Ei,
|
|
1232
|
+
hint: C.htmlSource,
|
|
1233
|
+
onHint: p,
|
|
1234
|
+
active: _e,
|
|
1235
|
+
disabled: c,
|
|
1236
|
+
onClick: () => {
|
|
1237
|
+
var a;
|
|
1238
|
+
if (_e) {
|
|
1239
|
+
u || F(rn), $t(!1);
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
ln(((a = o.current) == null ? void 0 : a.innerHTML) ?? b ?? P), $t(!0);
|
|
1243
|
+
}
|
|
1244
|
+
},
|
|
1245
|
+
eo
|
|
1246
|
+
) : null;
|
|
1247
|
+
if (e === to)
|
|
1248
|
+
return s.signature ? /* @__PURE__ */ r(
|
|
1249
|
+
N,
|
|
1250
|
+
{
|
|
1251
|
+
icon: L.signature,
|
|
1093
1252
|
title: "Sign pad",
|
|
1094
|
-
hint:
|
|
1095
|
-
onHint:
|
|
1096
|
-
active:
|
|
1097
|
-
disabled:
|
|
1098
|
-
onClick: () =>
|
|
1253
|
+
hint: C.signature,
|
|
1254
|
+
onHint: p,
|
|
1255
|
+
active: zt,
|
|
1256
|
+
disabled: c || u,
|
|
1257
|
+
onClick: () => ze(!0)
|
|
1099
1258
|
},
|
|
1100
|
-
|
|
1259
|
+
to
|
|
1101
1260
|
) : null;
|
|
1102
|
-
if (e ===
|
|
1103
|
-
return
|
|
1261
|
+
if (e === no)
|
|
1262
|
+
return s.findReplace ? /* @__PURE__ */ r(
|
|
1104
1263
|
N,
|
|
1105
1264
|
{
|
|
1106
|
-
icon:
|
|
1265
|
+
icon: L.findReplace,
|
|
1107
1266
|
title: "Find and replace",
|
|
1108
|
-
hint:
|
|
1109
|
-
onHint:
|
|
1110
|
-
active:
|
|
1111
|
-
disabled:
|
|
1267
|
+
hint: C.findReplace,
|
|
1268
|
+
onHint: p,
|
|
1269
|
+
active: $e,
|
|
1270
|
+
disabled: c || u,
|
|
1112
1271
|
onClick: () => {
|
|
1113
|
-
|
|
1272
|
+
$e ? Se(!1) : Nn(He);
|
|
1114
1273
|
}
|
|
1115
1274
|
},
|
|
1116
|
-
|
|
1275
|
+
no
|
|
1117
1276
|
) : null;
|
|
1118
|
-
if (e ===
|
|
1119
|
-
return
|
|
1120
|
-
|
|
1277
|
+
if (e === oo)
|
|
1278
|
+
return s.findReplace ? /* @__PURE__ */ r(
|
|
1279
|
+
ve,
|
|
1121
1280
|
{
|
|
1122
|
-
title:
|
|
1123
|
-
options:
|
|
1124
|
-
value:
|
|
1125
|
-
disabled:
|
|
1126
|
-
onChange:
|
|
1281
|
+
title: Yi,
|
|
1282
|
+
options: Vi,
|
|
1283
|
+
value: Xr,
|
|
1284
|
+
disabled: c || u,
|
|
1285
|
+
onChange: Nl
|
|
1127
1286
|
},
|
|
1128
|
-
|
|
1287
|
+
oo
|
|
1129
1288
|
) : null;
|
|
1130
|
-
if (e ===
|
|
1131
|
-
return
|
|
1289
|
+
if (e === ro)
|
|
1290
|
+
return s.horizontalRule ? /* @__PURE__ */ r(
|
|
1132
1291
|
N,
|
|
1133
1292
|
{
|
|
1134
|
-
icon:
|
|
1293
|
+
icon: L.horizontalRule,
|
|
1135
1294
|
title: "Horizontal rule",
|
|
1136
|
-
hint:
|
|
1137
|
-
onHint:
|
|
1138
|
-
disabled:
|
|
1295
|
+
hint: C.horizontalRule,
|
|
1296
|
+
onHint: p,
|
|
1297
|
+
disabled: c || u,
|
|
1139
1298
|
onClick: () => {
|
|
1140
|
-
|
|
1299
|
+
A(o.current), I("<hr />"), _();
|
|
1141
1300
|
}
|
|
1142
1301
|
},
|
|
1143
|
-
|
|
1302
|
+
ro
|
|
1144
1303
|
) : null;
|
|
1145
1304
|
if (e === "undo")
|
|
1146
1305
|
return /* @__PURE__ */ r(
|
|
1147
1306
|
N,
|
|
1148
1307
|
{
|
|
1149
|
-
icon:
|
|
1308
|
+
icon: L.undo,
|
|
1150
1309
|
title: "Undo",
|
|
1151
|
-
hint:
|
|
1152
|
-
onHint:
|
|
1153
|
-
disabled:
|
|
1154
|
-
onClick:
|
|
1310
|
+
hint: C.undo,
|
|
1311
|
+
onHint: p,
|
|
1312
|
+
disabled: c || u,
|
|
1313
|
+
onClick: gn
|
|
1155
1314
|
},
|
|
1156
1315
|
"undo"
|
|
1157
1316
|
);
|
|
@@ -1159,370 +1318,506 @@ const mt = () => {
|
|
|
1159
1318
|
return /* @__PURE__ */ r(
|
|
1160
1319
|
N,
|
|
1161
1320
|
{
|
|
1162
|
-
icon:
|
|
1321
|
+
icon: L.redo,
|
|
1163
1322
|
title: "Redo",
|
|
1164
|
-
hint:
|
|
1165
|
-
onHint:
|
|
1166
|
-
disabled:
|
|
1167
|
-
onClick:
|
|
1323
|
+
hint: C.redo,
|
|
1324
|
+
onHint: p,
|
|
1325
|
+
disabled: c || u,
|
|
1326
|
+
onClick: bn
|
|
1168
1327
|
},
|
|
1169
1328
|
"redo"
|
|
1170
1329
|
);
|
|
1171
1330
|
if (e === "trackChanges")
|
|
1172
|
-
return
|
|
1331
|
+
return s.trackChanges ? /* @__PURE__ */ r(
|
|
1173
1332
|
N,
|
|
1174
1333
|
{
|
|
1175
|
-
icon:
|
|
1334
|
+
icon: L.trackChanges,
|
|
1176
1335
|
title: "Track changes",
|
|
1177
|
-
hint:
|
|
1178
|
-
onHint:
|
|
1179
|
-
active:
|
|
1180
|
-
disabled:
|
|
1181
|
-
onClick: () =>
|
|
1336
|
+
hint: C.trackChanges,
|
|
1337
|
+
onHint: p,
|
|
1338
|
+
active: Q,
|
|
1339
|
+
disabled: c || u,
|
|
1340
|
+
onClick: () => Tl(!Q)
|
|
1182
1341
|
},
|
|
1183
1342
|
"trackChanges"
|
|
1184
1343
|
) : null;
|
|
1185
1344
|
if (e === "comments")
|
|
1186
|
-
return
|
|
1345
|
+
return s.comments ? /* @__PURE__ */ r(
|
|
1187
1346
|
N,
|
|
1188
1347
|
{
|
|
1189
|
-
icon:
|
|
1348
|
+
icon: L.comments,
|
|
1190
1349
|
title: "Comments",
|
|
1191
|
-
hint:
|
|
1192
|
-
onHint:
|
|
1193
|
-
active:
|
|
1194
|
-
disabled:
|
|
1350
|
+
hint: C.comments,
|
|
1351
|
+
onHint: p,
|
|
1352
|
+
active: nt,
|
|
1353
|
+
disabled: c || u,
|
|
1195
1354
|
onClick: () => {
|
|
1196
|
-
|
|
1355
|
+
nt ? ut(!1) : Mn();
|
|
1197
1356
|
}
|
|
1198
1357
|
},
|
|
1199
1358
|
"comments"
|
|
1200
1359
|
) : null;
|
|
1201
1360
|
if (e === "code") {
|
|
1202
|
-
const
|
|
1361
|
+
const a = pt.code;
|
|
1203
1362
|
return /* @__PURE__ */ r(
|
|
1204
1363
|
N,
|
|
1205
1364
|
{
|
|
1206
|
-
className:
|
|
1207
|
-
icon: /* @__PURE__ */
|
|
1208
|
-
|
|
1209
|
-
/* @__PURE__ */ r("span", { className:
|
|
1365
|
+
className: so,
|
|
1366
|
+
icon: /* @__PURE__ */ R(Wl, { children: [
|
|
1367
|
+
L.code,
|
|
1368
|
+
/* @__PURE__ */ r("span", { className: ao, children: pi })
|
|
1210
1369
|
] }),
|
|
1211
|
-
title:
|
|
1212
|
-
hint:
|
|
1213
|
-
onHint:
|
|
1214
|
-
active:
|
|
1215
|
-
disabled:
|
|
1216
|
-
onClick: () =>
|
|
1370
|
+
title: a.title,
|
|
1371
|
+
hint: C.code,
|
|
1372
|
+
onHint: p,
|
|
1373
|
+
active: Ve.has(e),
|
|
1374
|
+
disabled: c || u,
|
|
1375
|
+
onClick: () => S(e)
|
|
1217
1376
|
},
|
|
1218
1377
|
"code"
|
|
1219
1378
|
);
|
|
1220
1379
|
}
|
|
1221
1380
|
if (e === "ai") {
|
|
1222
|
-
if (!
|
|
1223
|
-
const
|
|
1224
|
-
return /* @__PURE__ */
|
|
1381
|
+
if (!s.ai || !(E != null && E.enabled)) return null;
|
|
1382
|
+
const a = Ce.get("ai");
|
|
1383
|
+
return /* @__PURE__ */ R(
|
|
1225
1384
|
"button",
|
|
1226
1385
|
{
|
|
1227
1386
|
type: "button",
|
|
1228
|
-
className:
|
|
1229
|
-
title:
|
|
1230
|
-
style:
|
|
1231
|
-
"aria-label":
|
|
1232
|
-
"aria-pressed":
|
|
1233
|
-
disabled:
|
|
1234
|
-
onMouseEnter: () =>
|
|
1235
|
-
onMouseLeave: () =>
|
|
1236
|
-
onMouseDown: (
|
|
1237
|
-
|
|
1387
|
+
className: a ? `${uo} ${Nc}` : uo,
|
|
1388
|
+
title: mt,
|
|
1389
|
+
style: a ? { "--ink-plugin-color": a.color } : void 0,
|
|
1390
|
+
"aria-label": mt,
|
|
1391
|
+
"aria-pressed": Gt,
|
|
1392
|
+
disabled: c || u,
|
|
1393
|
+
onMouseEnter: () => p(C.ai),
|
|
1394
|
+
onMouseLeave: () => p(P),
|
|
1395
|
+
onMouseDown: (m) => {
|
|
1396
|
+
m.preventDefault();
|
|
1238
1397
|
},
|
|
1239
|
-
onClick: () =>
|
|
1398
|
+
onClick: () => ce((m) => !m),
|
|
1240
1399
|
children: [
|
|
1241
|
-
/* @__PURE__ */ r("span", { className:
|
|
1242
|
-
|
|
1400
|
+
/* @__PURE__ */ r("span", { className: Ic, "aria-hidden": "true" }),
|
|
1401
|
+
mt
|
|
1243
1402
|
]
|
|
1244
1403
|
},
|
|
1245
1404
|
"ai"
|
|
1246
1405
|
);
|
|
1247
1406
|
}
|
|
1248
|
-
const n =
|
|
1407
|
+
const n = pt[e];
|
|
1249
1408
|
return n ? /* @__PURE__ */ r(
|
|
1250
1409
|
N,
|
|
1251
1410
|
{
|
|
1252
|
-
icon:
|
|
1411
|
+
icon: L[e] ?? e.slice(0, 1).toUpperCase(),
|
|
1253
1412
|
title: n.title,
|
|
1254
|
-
hint:
|
|
1255
|
-
onHint:
|
|
1256
|
-
active:
|
|
1257
|
-
disabled:
|
|
1258
|
-
onClick: () =>
|
|
1413
|
+
hint: C[e],
|
|
1414
|
+
onHint: p,
|
|
1415
|
+
active: Ve.has(e),
|
|
1416
|
+
disabled: c || u,
|
|
1417
|
+
onClick: () => S(e)
|
|
1259
1418
|
},
|
|
1260
1419
|
e
|
|
1261
1420
|
) : null;
|
|
1262
|
-
},
|
|
1263
|
-
return /* @__PURE__ */
|
|
1421
|
+
}, vn = typeof Ue == "number" ? `${Ue}px` : Ue, Kl = typeof we == "number" ? `${we}px` : we, xl = !!(E != null && E.enabled && Gt), Xl = ee.slice(O, V.fitCount), Et = ee.slice(V.fitCount);
|
|
1422
|
+
return /* @__PURE__ */ R(
|
|
1264
1423
|
"div",
|
|
1265
1424
|
{
|
|
1266
|
-
ref:
|
|
1267
|
-
className:
|
|
1268
|
-
"data-testid":
|
|
1269
|
-
"data-disabled":
|
|
1270
|
-
"data-variant":
|
|
1271
|
-
"data-chrome":
|
|
1272
|
-
"data-color-mode":
|
|
1273
|
-
"data-premium":
|
|
1274
|
-
"data-wysiwyg":
|
|
1275
|
-
style: { ...
|
|
1276
|
-
...
|
|
1425
|
+
ref: he,
|
|
1426
|
+
className: bs(Hc, Ko),
|
|
1427
|
+
"data-testid": xo,
|
|
1428
|
+
"data-disabled": c || void 0,
|
|
1429
|
+
"data-variant": Ne,
|
|
1430
|
+
"data-chrome": Go,
|
|
1431
|
+
"data-color-mode": lt,
|
|
1432
|
+
"data-premium": $.active || void 0,
|
|
1433
|
+
"data-wysiwyg": lr || void 0,
|
|
1434
|
+
style: { ...ir, ...Jo },
|
|
1435
|
+
...er,
|
|
1277
1436
|
children: [
|
|
1278
|
-
|
|
1279
|
-
|
|
1437
|
+
On ? /* @__PURE__ */ r("div", { className: cc, children: /* @__PURE__ */ r(
|
|
1438
|
+
Ka,
|
|
1280
1439
|
{
|
|
1281
1440
|
type: "button",
|
|
1282
|
-
"aria-label":
|
|
1283
|
-
onClick: () =>
|
|
1284
|
-
children:
|
|
1441
|
+
"aria-label": hi,
|
|
1442
|
+
onClick: () => at(!1),
|
|
1443
|
+
children: Ai
|
|
1285
1444
|
}
|
|
1286
|
-
) }) : /* @__PURE__ */
|
|
1445
|
+
) }) : /* @__PURE__ */ R(
|
|
1287
1446
|
"div",
|
|
1288
1447
|
{
|
|
1289
|
-
className:
|
|
1448
|
+
className: sc,
|
|
1290
1449
|
role: "toolbar",
|
|
1291
1450
|
"aria-label": "Ink formatting toolbar",
|
|
1292
|
-
onContextMenu:
|
|
1293
|
-
onDoubleClick:
|
|
1451
|
+
onContextMenu: bl,
|
|
1452
|
+
onDoubleClick: Sn,
|
|
1294
1453
|
onMouseOver: (e) => {
|
|
1295
1454
|
const t = e.target.closest("button");
|
|
1296
1455
|
if (!(t instanceof HTMLElement)) return;
|
|
1297
|
-
const n = t.getAttribute("title") || t.getAttribute("aria-label") ||
|
|
1298
|
-
n &&
|
|
1456
|
+
const n = t.getAttribute("title") || t.getAttribute("aria-label") || P;
|
|
1457
|
+
n && p(n);
|
|
1299
1458
|
},
|
|
1300
|
-
onMouseLeave: () =>
|
|
1459
|
+
onMouseLeave: () => p(P),
|
|
1301
1460
|
children: [
|
|
1302
|
-
/* @__PURE__ */ r("div", { className:
|
|
1303
|
-
/* @__PURE__ */
|
|
1304
|
-
|
|
1305
|
-
|
|
1461
|
+
/* @__PURE__ */ r("div", { className: ac, ref: V.measureRef, "aria-hidden": !0, children: ee.map(Tt) }),
|
|
1462
|
+
/* @__PURE__ */ R("div", { className: uc, ref: V.rowRef, children: [
|
|
1463
|
+
Xl.map(Tt),
|
|
1464
|
+
h != null && h.collaborators && h.showPresenceStack !== !1 ? /* @__PURE__ */ r(
|
|
1465
|
+
vu,
|
|
1466
|
+
{
|
|
1467
|
+
collaborators: h.collaborators,
|
|
1468
|
+
maxAvatars: h.maxAvatars || 4
|
|
1469
|
+
}
|
|
1470
|
+
) : null,
|
|
1471
|
+
Et.length > O ? /* @__PURE__ */ r("span", { [_c]: "", children: /* @__PURE__ */ r(
|
|
1306
1472
|
N,
|
|
1307
1473
|
{
|
|
1308
1474
|
icon: "⋯",
|
|
1309
|
-
title:
|
|
1310
|
-
hint:
|
|
1311
|
-
onHint:
|
|
1312
|
-
active:
|
|
1313
|
-
disabled:
|
|
1314
|
-
onClick: () =>
|
|
1475
|
+
title: Kn,
|
|
1476
|
+
hint: Kn,
|
|
1477
|
+
onHint: p,
|
|
1478
|
+
active: V.overflowOpen,
|
|
1479
|
+
disabled: c,
|
|
1480
|
+
onClick: () => V.setOverflowOpen((e) => !e)
|
|
1315
1481
|
}
|
|
1316
1482
|
) }) : null
|
|
1317
1483
|
] }),
|
|
1318
|
-
|
|
1319
|
-
|
|
1484
|
+
V.overflowOpen && Et.length > O ? /* @__PURE__ */ r("div", { className: dc, children: Et.map(Tt) }) : null,
|
|
1485
|
+
mn ? /* @__PURE__ */ r("p", { className: fc, children: mn }) : null
|
|
1320
1486
|
]
|
|
1321
1487
|
}
|
|
1322
1488
|
),
|
|
1323
1489
|
/* @__PURE__ */ r(
|
|
1324
|
-
|
|
1490
|
+
Ru,
|
|
1325
1491
|
{
|
|
1326
|
-
open:
|
|
1327
|
-
options:
|
|
1328
|
-
visibleItems:
|
|
1329
|
-
onToggle:
|
|
1330
|
-
onClose: () =>
|
|
1492
|
+
open: $r,
|
|
1493
|
+
options: ul,
|
|
1494
|
+
visibleItems: ee,
|
|
1495
|
+
onToggle: fl,
|
|
1496
|
+
onClose: () => fn(!1)
|
|
1331
1497
|
}
|
|
1332
1498
|
),
|
|
1333
1499
|
/* @__PURE__ */ r(
|
|
1334
|
-
|
|
1500
|
+
Hu,
|
|
1335
1501
|
{
|
|
1336
|
-
open:
|
|
1337
|
-
mode:
|
|
1338
|
-
points:
|
|
1339
|
-
colors:
|
|
1340
|
-
onClose: () =>
|
|
1341
|
-
onApply:
|
|
1502
|
+
open: Jr,
|
|
1503
|
+
mode: el,
|
|
1504
|
+
points: nl,
|
|
1505
|
+
colors: rl,
|
|
1506
|
+
onClose: () => rt(!1),
|
|
1507
|
+
onApply: hl
|
|
1342
1508
|
}
|
|
1343
1509
|
),
|
|
1344
1510
|
/* @__PURE__ */ r(
|
|
1345
|
-
|
|
1511
|
+
gu,
|
|
1346
1512
|
{
|
|
1347
|
-
open:
|
|
1348
|
-
onClose: () =>
|
|
1513
|
+
open: zt,
|
|
1514
|
+
onClose: () => ze(!1),
|
|
1349
1515
|
onConfirm: (e) => {
|
|
1350
|
-
|
|
1516
|
+
A(o.current), gt(e), _();
|
|
1351
1517
|
}
|
|
1352
1518
|
}
|
|
1353
1519
|
),
|
|
1354
1520
|
/* @__PURE__ */ r(
|
|
1355
|
-
|
|
1521
|
+
bu,
|
|
1356
1522
|
{
|
|
1357
|
-
open:
|
|
1358
|
-
focusField:
|
|
1359
|
-
onClose: () =>
|
|
1523
|
+
open: $e,
|
|
1524
|
+
focusField: wr,
|
|
1525
|
+
onClose: () => Se(!1),
|
|
1360
1526
|
onReplace: (e, t, n) => {
|
|
1361
1527
|
if (!o.current) return;
|
|
1362
|
-
const l =
|
|
1363
|
-
|
|
1528
|
+
const l = la(o.current.innerHTML, e, t, n);
|
|
1529
|
+
F(l);
|
|
1364
1530
|
}
|
|
1365
1531
|
}
|
|
1366
1532
|
),
|
|
1367
|
-
|
|
1368
|
-
|
|
1533
|
+
Q && s.trackChanges ? /* @__PURE__ */ r(
|
|
1534
|
+
Nu,
|
|
1369
1535
|
{
|
|
1370
|
-
changes:
|
|
1371
|
-
onAccept:
|
|
1372
|
-
onReject:
|
|
1373
|
-
onAcceptAll: () =>
|
|
1374
|
-
onRejectAll: () =>
|
|
1536
|
+
changes: X,
|
|
1537
|
+
onAccept: Dn,
|
|
1538
|
+
onReject: Pn,
|
|
1539
|
+
onAcceptAll: () => X.forEach((e) => Dn(e.id)),
|
|
1540
|
+
onRejectAll: () => X.forEach((e) => Pn(e.id))
|
|
1375
1541
|
}
|
|
1376
1542
|
) : null,
|
|
1377
|
-
|
|
1378
|
-
/* @__PURE__ */
|
|
1379
|
-
|
|
1380
|
-
|
|
1543
|
+
Ne === "agent" ? /* @__PURE__ */ r("div", { className: "Ink-Editor__agent-bar", role: "status", children: gi }) : null,
|
|
1544
|
+
/* @__PURE__ */ R("div", { className: Tc, children: [
|
|
1545
|
+
al ? /* @__PURE__ */ r(
|
|
1546
|
+
Cu,
|
|
1381
1547
|
{
|
|
1382
|
-
items:
|
|
1383
|
-
activeIndex:
|
|
1384
|
-
onHide:
|
|
1548
|
+
items: mr,
|
|
1549
|
+
activeIndex: pr,
|
|
1550
|
+
onHide: Bn,
|
|
1385
1551
|
onSelect: (e) => {
|
|
1386
|
-
o.current && (
|
|
1552
|
+
o.current && (js(o.current, e), Or(e));
|
|
1387
1553
|
}
|
|
1388
1554
|
}
|
|
1389
1555
|
) : null,
|
|
1390
|
-
/* @__PURE__ */
|
|
1391
|
-
|
|
1392
|
-
|
|
1556
|
+
/* @__PURE__ */ R("div", { className: Ec, children: [
|
|
1557
|
+
s.blocks ? /* @__PURE__ */ r(
|
|
1558
|
+
au,
|
|
1393
1559
|
{
|
|
1394
|
-
visible:
|
|
1395
|
-
top:
|
|
1396
|
-
onMoveUp: () =>
|
|
1397
|
-
onMoveDown: () =>
|
|
1398
|
-
onDragStart:
|
|
1560
|
+
visible: Dr && !c && !u,
|
|
1561
|
+
top: Br,
|
|
1562
|
+
onMoveUp: () => kn("up"),
|
|
1563
|
+
onMoveDown: () => kn("down"),
|
|
1564
|
+
onDragStart: Ul
|
|
1399
1565
|
}
|
|
1400
1566
|
) : null,
|
|
1567
|
+
h != null && h.collaborators && h.showRemoteCursors !== !1 ? /* @__PURE__ */ r(Uu, { collaborators: h.collaborators }) : null,
|
|
1568
|
+
/* @__PURE__ */ r(
|
|
1569
|
+
"input",
|
|
1570
|
+
{
|
|
1571
|
+
ref: vt,
|
|
1572
|
+
type: "file",
|
|
1573
|
+
accept: ca,
|
|
1574
|
+
hidden: !0,
|
|
1575
|
+
onChange: (e) => {
|
|
1576
|
+
var n;
|
|
1577
|
+
const t = (n = e.target.files) == null ? void 0 : n[0];
|
|
1578
|
+
e.target.value = "", t && t.text().then((l) => {
|
|
1579
|
+
F(sa(l));
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
),
|
|
1584
|
+
Zt ? /* @__PURE__ */ R("div", { className: "Ink-Versions__compare", "aria-label": "Previous version", children: [
|
|
1585
|
+
/* @__PURE__ */ r("button", { type: "button", className: "Ink-Editor__button", onClick: () => qe(""), children: "Close compare" }),
|
|
1586
|
+
/* @__PURE__ */ r("div", { dangerouslySetInnerHTML: { __html: Zt } })
|
|
1587
|
+
] }) : null,
|
|
1401
1588
|
/* @__PURE__ */ r(
|
|
1402
1589
|
"div",
|
|
1403
1590
|
{
|
|
1404
1591
|
ref: o,
|
|
1405
|
-
className:
|
|
1406
|
-
contentEditable: !
|
|
1592
|
+
className: _e ? `${co} ${mc}` : co,
|
|
1593
|
+
contentEditable: !c && !u && !_e,
|
|
1407
1594
|
role: "textbox",
|
|
1408
1595
|
"aria-multiline": "true",
|
|
1409
|
-
"aria-placeholder":
|
|
1410
|
-
"data-placeholder":
|
|
1596
|
+
"aria-placeholder": St,
|
|
1597
|
+
"data-placeholder": St,
|
|
1411
1598
|
suppressContentEditableWarning: !0,
|
|
1412
|
-
style: { minHeight:
|
|
1599
|
+
style: { minHeight: vn, maxHeight: Kl },
|
|
1413
1600
|
onInput: _,
|
|
1414
|
-
onBlur:
|
|
1415
|
-
onKeyUp:
|
|
1416
|
-
onKeyDown:
|
|
1417
|
-
onMouseUp:
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1601
|
+
onBlur: pl,
|
|
1602
|
+
onKeyUp: Ee,
|
|
1603
|
+
onKeyDown: kl,
|
|
1604
|
+
onMouseUp: () => {
|
|
1605
|
+
Be && (Ia(Be), nn(null), _()), Ee();
|
|
1606
|
+
},
|
|
1607
|
+
onContextMenu: Al,
|
|
1608
|
+
onDragOver: wl,
|
|
1609
|
+
onDrop: yl,
|
|
1610
|
+
onDragEnd: Fl,
|
|
1611
|
+
onClick: (e) => {
|
|
1612
|
+
const t = e.target;
|
|
1613
|
+
tn(t instanceof HTMLImageElement ? t : null);
|
|
1614
|
+
},
|
|
1422
1615
|
onPaste: (e) => {
|
|
1423
|
-
|
|
1616
|
+
Ml(e);
|
|
1424
1617
|
}
|
|
1425
1618
|
}
|
|
1426
1619
|
),
|
|
1427
|
-
|
|
1428
|
-
|
|
1620
|
+
_e ? /* @__PURE__ */ r(
|
|
1621
|
+
Su,
|
|
1429
1622
|
{
|
|
1430
|
-
value:
|
|
1431
|
-
onChange:
|
|
1432
|
-
disabled:
|
|
1433
|
-
minHeight:
|
|
1623
|
+
value: rn,
|
|
1624
|
+
onChange: ln,
|
|
1625
|
+
disabled: c || u,
|
|
1626
|
+
minHeight: vn
|
|
1434
1627
|
}
|
|
1435
1628
|
) : null,
|
|
1436
|
-
|
|
1437
|
-
|
|
1629
|
+
s.mentions ? /* @__PURE__ */ r(
|
|
1630
|
+
Au,
|
|
1438
1631
|
{
|
|
1439
|
-
|
|
1440
|
-
top:
|
|
1441
|
-
left:
|
|
1442
|
-
|
|
1443
|
-
|
|
1632
|
+
open: de !== null,
|
|
1633
|
+
top: Jt.top,
|
|
1634
|
+
left: Jt.left,
|
|
1635
|
+
people: Ca(
|
|
1636
|
+
h != null && h.collaborators && h.collaborators.length > 0 ? h.collaborators.map((e) => ({ id: e.id, label: e.name })) : [{ id: K, label: K }],
|
|
1637
|
+
de ?? ""
|
|
1638
|
+
),
|
|
1639
|
+
onSelect: (e) => {
|
|
1640
|
+
de !== null && (Oa(de), I(La(e.id, e.label)), je(null), _());
|
|
1641
|
+
}
|
|
1444
1642
|
}
|
|
1445
1643
|
) : null,
|
|
1446
|
-
|
|
1447
|
-
|
|
1644
|
+
en ? /* @__PURE__ */ r(
|
|
1645
|
+
hu,
|
|
1448
1646
|
{
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1647
|
+
image: en,
|
|
1648
|
+
onChange: _,
|
|
1649
|
+
onClose: () => tn(null)
|
|
1650
|
+
}
|
|
1651
|
+
) : null,
|
|
1652
|
+
on ? /* @__PURE__ */ R("div", { className: "Ink-CaseMenu", role: "menu", "aria-label": "Change case", children: [
|
|
1653
|
+
/* @__PURE__ */ r(
|
|
1654
|
+
"button",
|
|
1655
|
+
{
|
|
1656
|
+
type: "button",
|
|
1657
|
+
className: "Ink-Editor__button",
|
|
1658
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1659
|
+
onClick: () => {
|
|
1660
|
+
At("upper"), _();
|
|
1661
|
+
},
|
|
1662
|
+
children: "UPPER"
|
|
1663
|
+
}
|
|
1664
|
+
),
|
|
1665
|
+
/* @__PURE__ */ r(
|
|
1666
|
+
"button",
|
|
1667
|
+
{
|
|
1668
|
+
type: "button",
|
|
1669
|
+
className: "Ink-Editor__button",
|
|
1670
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1671
|
+
onClick: () => {
|
|
1672
|
+
At("lower"), _();
|
|
1673
|
+
},
|
|
1674
|
+
children: "lower"
|
|
1675
|
+
}
|
|
1676
|
+
),
|
|
1677
|
+
/* @__PURE__ */ r(
|
|
1678
|
+
"button",
|
|
1679
|
+
{
|
|
1680
|
+
type: "button",
|
|
1681
|
+
className: "Ink-Editor__button",
|
|
1682
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1683
|
+
onClick: () => {
|
|
1684
|
+
At("title"), _();
|
|
1685
|
+
},
|
|
1686
|
+
children: "Title Case"
|
|
1687
|
+
}
|
|
1688
|
+
)
|
|
1689
|
+
] }) : null,
|
|
1690
|
+
En ? /* @__PURE__ */ r(
|
|
1691
|
+
Lu,
|
|
1692
|
+
{
|
|
1693
|
+
items: Pr,
|
|
1694
|
+
top: Yt.top,
|
|
1695
|
+
left: Yt.left,
|
|
1696
|
+
query: Lr,
|
|
1697
|
+
onSelect: vl
|
|
1698
|
+
}
|
|
1699
|
+
) : null,
|
|
1700
|
+
it ? /* @__PURE__ */ r(
|
|
1701
|
+
iu,
|
|
1702
|
+
{
|
|
1703
|
+
suggestion: x.suggestion,
|
|
1704
|
+
position: { top: x.top, left: x.left },
|
|
1705
|
+
visible: x.visible,
|
|
1706
|
+
onAccept: Cn,
|
|
1707
|
+
onDismiss: y
|
|
1454
1708
|
}
|
|
1455
1709
|
) : null,
|
|
1456
1710
|
/* @__PURE__ */ r(
|
|
1457
|
-
|
|
1711
|
+
du,
|
|
1458
1712
|
{
|
|
1459
|
-
open:
|
|
1460
|
-
top:
|
|
1461
|
-
left:
|
|
1713
|
+
open: Me.open,
|
|
1714
|
+
top: Me.top,
|
|
1715
|
+
left: Me.left,
|
|
1462
1716
|
icons: {
|
|
1463
|
-
bold:
|
|
1464
|
-
italic:
|
|
1465
|
-
underline:
|
|
1466
|
-
code:
|
|
1467
|
-
link:
|
|
1468
|
-
clearFormat:
|
|
1717
|
+
bold: L.bold,
|
|
1718
|
+
italic: L.italic,
|
|
1719
|
+
underline: L.underline,
|
|
1720
|
+
code: L.code,
|
|
1721
|
+
link: L.link,
|
|
1722
|
+
clearFormat: L.clearFormat
|
|
1469
1723
|
},
|
|
1470
|
-
activeFormats:
|
|
1471
|
-
disabled:
|
|
1472
|
-
onFormat:
|
|
1473
|
-
onLink:
|
|
1474
|
-
onClose: () =>
|
|
1724
|
+
activeFormats: Ve,
|
|
1725
|
+
disabled: c || u,
|
|
1726
|
+
onFormat: Dl,
|
|
1727
|
+
onLink: _t,
|
|
1728
|
+
onClose: () => J((e) => ({ ...e, open: !1 }))
|
|
1475
1729
|
}
|
|
1476
1730
|
),
|
|
1731
|
+
s.ai && (E != null && E.enabled) ? /* @__PURE__ */ r(
|
|
1732
|
+
tu,
|
|
1733
|
+
{
|
|
1734
|
+
open: Me.open && !!ue,
|
|
1735
|
+
top: un.top,
|
|
1736
|
+
left: un.left,
|
|
1737
|
+
busy: Vr,
|
|
1738
|
+
preview: tt,
|
|
1739
|
+
onAction: (e) => {
|
|
1740
|
+
Pl(e);
|
|
1741
|
+
},
|
|
1742
|
+
onApply: Hl,
|
|
1743
|
+
onDismiss: () => fe("")
|
|
1744
|
+
}
|
|
1745
|
+
) : null,
|
|
1477
1746
|
/* @__PURE__ */ r(
|
|
1478
|
-
|
|
1747
|
+
Ho,
|
|
1479
1748
|
{
|
|
1480
|
-
open:
|
|
1481
|
-
x:
|
|
1482
|
-
y:
|
|
1483
|
-
items:
|
|
1484
|
-
colorMode:
|
|
1749
|
+
open: Qe.open,
|
|
1750
|
+
x: Qe.x,
|
|
1751
|
+
y: Qe.y,
|
|
1752
|
+
items: Bl,
|
|
1753
|
+
colorMode: lt,
|
|
1485
1754
|
onClose: () => {
|
|
1486
|
-
|
|
1755
|
+
sn(!1), Ze((e) => ({ ...e, open: !1 }));
|
|
1487
1756
|
}
|
|
1488
1757
|
}
|
|
1489
1758
|
),
|
|
1490
1759
|
/* @__PURE__ */ r(
|
|
1491
|
-
|
|
1760
|
+
Ho,
|
|
1492
1761
|
{
|
|
1493
|
-
open:
|
|
1494
|
-
x:
|
|
1495
|
-
y:
|
|
1496
|
-
items:
|
|
1497
|
-
colorMode:
|
|
1498
|
-
onClose: () =>
|
|
1762
|
+
open: Je.open,
|
|
1763
|
+
x: Je.x,
|
|
1764
|
+
y: Je.y,
|
|
1765
|
+
items: Rl,
|
|
1766
|
+
colorMode: lt,
|
|
1767
|
+
onClose: () => et((e) => ({ ...e, open: !1 }))
|
|
1499
1768
|
}
|
|
1500
1769
|
)
|
|
1501
1770
|
] }),
|
|
1502
|
-
|
|
1503
|
-
|
|
1771
|
+
qt && s.versionHistory ? /* @__PURE__ */ r(
|
|
1772
|
+
Iu,
|
|
1773
|
+
{
|
|
1774
|
+
versions: kr,
|
|
1775
|
+
onClose: () => jt(!1),
|
|
1776
|
+
onSave: () => {
|
|
1777
|
+
o.current && (ia(H, o.current.innerHTML), Qt(It(H)));
|
|
1778
|
+
},
|
|
1779
|
+
onRestore: (e) => {
|
|
1780
|
+
F(e.html), qe("");
|
|
1781
|
+
},
|
|
1782
|
+
onCompare: (e) => qe(e.html)
|
|
1783
|
+
}
|
|
1784
|
+
) : null,
|
|
1785
|
+
nt && s.comments ? /* @__PURE__ */ r(
|
|
1786
|
+
Ja,
|
|
1504
1787
|
{
|
|
1505
|
-
comments:
|
|
1506
|
-
author:
|
|
1507
|
-
onClose: () =>
|
|
1788
|
+
comments: G,
|
|
1789
|
+
author: K,
|
|
1790
|
+
onClose: () => ut(!1),
|
|
1791
|
+
onFocus: (e) => {
|
|
1792
|
+
const t = G.find((n) => n.id === e);
|
|
1793
|
+
t && o.current && Ws(o.current, t.highlightId);
|
|
1794
|
+
},
|
|
1795
|
+
onReopen: (e) => {
|
|
1796
|
+
const t = G.find((n) => n.id === e);
|
|
1797
|
+
De(
|
|
1798
|
+
G.map(
|
|
1799
|
+
(n) => n.id === e ? { ...n, resolved: !1 } : n
|
|
1800
|
+
)
|
|
1801
|
+
), t && o.current && (bo(o.current, t.highlightId, !1), _());
|
|
1802
|
+
},
|
|
1508
1803
|
onResolve: (e) => {
|
|
1509
|
-
const t =
|
|
1510
|
-
|
|
1511
|
-
|
|
1804
|
+
const t = G.find((n) => n.id === e);
|
|
1805
|
+
De(
|
|
1806
|
+
G.map(
|
|
1512
1807
|
(n) => n.id === e ? { ...n, resolved: !0 } : n
|
|
1513
1808
|
)
|
|
1514
|
-
), t && o.current &&
|
|
1809
|
+
), t && o.current && (bo(o.current, t.highlightId, !0), _());
|
|
1515
1810
|
},
|
|
1516
1811
|
onAddReply: (e, t) => {
|
|
1517
|
-
|
|
1518
|
-
|
|
1812
|
+
De(
|
|
1813
|
+
G.map(
|
|
1519
1814
|
(n) => n.id === e ? {
|
|
1520
1815
|
...n,
|
|
1521
1816
|
replies: [
|
|
1522
1817
|
...n.replies,
|
|
1523
1818
|
{
|
|
1524
|
-
id:
|
|
1525
|
-
author:
|
|
1819
|
+
id: po("reply"),
|
|
1820
|
+
author: K,
|
|
1526
1821
|
body: t,
|
|
1527
1822
|
timestamp: Date.now()
|
|
1528
1823
|
}
|
|
@@ -1533,19 +1828,19 @@ const mt = () => {
|
|
|
1533
1828
|
}
|
|
1534
1829
|
}
|
|
1535
1830
|
) : null,
|
|
1536
|
-
|
|
1537
|
-
|
|
1831
|
+
xl && E ? /* @__PURE__ */ r(
|
|
1832
|
+
eu,
|
|
1538
1833
|
{
|
|
1539
1834
|
config: E,
|
|
1540
|
-
documentHtml: ((
|
|
1541
|
-
selectionHtml:
|
|
1542
|
-
onBusyChange:
|
|
1543
|
-
onClose: () =>
|
|
1835
|
+
documentHtml: ((Un = o.current) == null ? void 0 : Un.innerHTML) ?? b ?? "",
|
|
1836
|
+
selectionHtml: ue,
|
|
1837
|
+
onBusyChange: Rr,
|
|
1838
|
+
onClose: () => ce(!1),
|
|
1544
1839
|
onApplyHtml: (e) => {
|
|
1545
|
-
if (
|
|
1546
|
-
|
|
1840
|
+
if (A(o.current), ue)
|
|
1841
|
+
I(e);
|
|
1547
1842
|
else {
|
|
1548
|
-
|
|
1843
|
+
F(e);
|
|
1549
1844
|
return;
|
|
1550
1845
|
}
|
|
1551
1846
|
_();
|
|
@@ -1553,30 +1848,30 @@ const mt = () => {
|
|
|
1553
1848
|
}
|
|
1554
1849
|
) : null
|
|
1555
1850
|
] }),
|
|
1556
|
-
|
|
1557
|
-
/* @__PURE__ */
|
|
1558
|
-
|
|
1851
|
+
Mt ? /* @__PURE__ */ R("div", { className: pc, children: [
|
|
1852
|
+
/* @__PURE__ */ R("span", { children: [
|
|
1853
|
+
dr,
|
|
1559
1854
|
" ",
|
|
1560
|
-
|
|
1855
|
+
ii,
|
|
1561
1856
|
" ",
|
|
1562
|
-
|
|
1857
|
+
ci,
|
|
1563
1858
|
" ",
|
|
1564
|
-
|
|
1565
|
-
|
|
1859
|
+
ur,
|
|
1860
|
+
Dt ? ` / ${Dt}` : "",
|
|
1566
1861
|
" ",
|
|
1567
|
-
|
|
1862
|
+
si
|
|
1568
1863
|
] }),
|
|
1569
|
-
/* @__PURE__ */
|
|
1570
|
-
/* @__PURE__ */
|
|
1571
|
-
|
|
1864
|
+
/* @__PURE__ */ R("span", { className: Oc, children: [
|
|
1865
|
+
/* @__PURE__ */ R("span", { children: [
|
|
1866
|
+
ai,
|
|
1572
1867
|
" ",
|
|
1573
|
-
|
|
1868
|
+
Tr,
|
|
1574
1869
|
", ",
|
|
1575
|
-
|
|
1870
|
+
ui,
|
|
1576
1871
|
" ",
|
|
1577
|
-
|
|
1872
|
+
Er
|
|
1578
1873
|
] }),
|
|
1579
|
-
/* @__PURE__ */ r("span", { className: "Ink-Editor__footer-sync", children:
|
|
1874
|
+
/* @__PURE__ */ r("span", { className: "Ink-Editor__footer-sync", children: _i })
|
|
1580
1875
|
] })
|
|
1581
1876
|
] }) : null
|
|
1582
1877
|
]
|
|
@@ -1584,5 +1879,5 @@ const mt = () => {
|
|
|
1584
1879
|
);
|
|
1585
1880
|
};
|
|
1586
1881
|
export {
|
|
1587
|
-
|
|
1882
|
+
md as InkEditor
|
|
1588
1883
|
};
|