@forgedevstack/ink 1.1.9 → 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 +16 -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 +1308 -1028
- 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.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.js +84 -97
- 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 -1
- package/dist/components/InkEditor/components/PresenceStack/PresenceStack.js +3 -2
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.cjs +1 -1
- package/dist/components/InkEditor/components/RemoteCursors/RemoteCursors.js +6 -5
- 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 +38 -38
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.cjs +1 -1
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.js +56 -39
- 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 +7 -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/InkWorkspace/InkWorkspace.cjs +1 -1
- package/dist/components/InkWorkspace/InkWorkspace.d.ts.map +1 -1
- package/dist/components/InkWorkspace/InkWorkspace.js +136 -144
- package/dist/components/InkWorkspace/hooks/useInkWorkspace.cjs +1 -1
- package/dist/components/InkWorkspace/hooks/useInkWorkspace.js +8 -7
- 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/numbers.cjs +1 -1
- package/dist/constants/numbers.js +28 -27
- 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/hooks/useInkCollaboration.cjs +1 -1
- package/dist/hooks/useInkCollaboration.js +15 -14
- package/dist/hooks/useToolbarOverflow.cjs +1 -1
- package/dist/hooks/useToolbarOverflow.js +12 -11
- package/dist/index.cjs +1 -1
- package/dist/index.js +145 -144
- 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/theme/inkTheme.cjs +1 -1
- package/dist/plugins/theme/inkTheme.js +22 -19
- 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 +0 -1
- package/dist/types/collab.types.d.ts.map +1 -1
- package/dist/types/features.types.d.ts +1 -1
- package/dist/types/features.types.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +1 -3
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/utils/blocks.utils.cjs +1 -1
- package/dist/utils/blocks.utils.js +19 -18
- package/dist/utils/collab.utils.cjs +1 -1
- package/dist/utils/collab.utils.js +7 -6
- 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 +10 -3
- package/dist/utils/index.d.ts.map +1 -1
- 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/package.json +1 -1
- package/dist/components/InkEditor/components/ThemePicker/hooks/index.d.ts +0 -3
- package/dist/components/InkEditor/components/ThemePicker/hooks/index.d.ts.map +0 -1
- package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.cjs +0 -1
- package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.d.ts +0 -13
- package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.d.ts.map +0 -1
- package/dist/components/InkEditor/components/ThemePicker/hooks/useThemePickerMenu.js +0 -39
|
@@ -1,64 +1,60 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { NUMBER_ZERO as Te, NUMBER_ONE as Ce } from "../../constants/numbers.js";
|
|
10
|
-
import { EMPTY_STRING as W } from "../../constants/generals.const.js";
|
|
2
|
+
import { InkTabs as ae } from "../InkTabs/InkTabs.js";
|
|
3
|
+
import { InkEditor as y } from "../InkEditor/InkEditor.js";
|
|
4
|
+
import { PresenceStack as ie } from "../InkEditor/components/PresenceStack/PresenceStack.js";
|
|
5
|
+
import { useInkWorkspace as ne } from "./hooks/useInkWorkspace.js";
|
|
6
|
+
import { SidebarToggleIcon as te, SingleViewIcon as le, SplitVerticalIcon as ce, SplitHorizontalIcon as oe, SaveDocIcon as re, NewFolderIcon as se, FileDocumentIcon as de, RenamePencilIcon as pe, CloseCrossIcon as ke } from "./components/WorkspaceIcons.js";
|
|
7
|
+
import { NUMBER_ZERO as me, NUMBER_ONE as Ne } from "../../constants/numbers.js";
|
|
8
|
+
import { EMPTY_STRING as D } from "../../constants/generals.const.js";
|
|
11
9
|
import "../../constants/openai.const.js";
|
|
12
|
-
import { cn as
|
|
10
|
+
import { cn as d } from "../../utils/cn.utils.js";
|
|
13
11
|
import "../../utils/paste.utils.js";
|
|
12
|
+
import "../../utils/exportDocument.utils.js";
|
|
14
13
|
import { Button as t } from "../../common-components/Button/Button.js";
|
|
14
|
+
import "react";
|
|
15
15
|
import "react-dom";
|
|
16
|
-
import { INK_WORKSPACE_HIDE_EXPLORER_TITLE as
|
|
17
|
-
const
|
|
16
|
+
import { INK_WORKSPACE_HIDE_EXPLORER_TITLE as W, INK_WORKSPACE_SHOW_EXPLORER_TITLE as g, INK_WORKSPACE_TITLE as f, INK_WORKSPACE_DOCS_SUFFIX as _e, INK_WORKSPACE_SPLIT_VIEW_LABEL as _, INK_WORKSPACE_SINGLE_VIEW_TITLE as Ee, INK_SPLIT_MODE_NONE as E, INK_WORKSPACE_SPLIT_SIDE_TITLE as Ie, INK_SPLIT_MODE_VERTICAL as F, INK_WORKSPACE_SPLIT_STACKED_TITLE as he, INK_SPLIT_MODE_HORIZONTAL as M, INK_WORKSPACE_SAVE_TITLE as B, INK_WORKSPACE_SEARCH_PLACEHOLDER as be, INK_WORKSPACE_NEW_DOC_BUTTON as I, INK_WORKSPACE_NEW_FOLDER as h, INK_WORKSPACE_CLOSE_FOLDER_BUTTON as b, INK_WORKSPACE_UNTITLED_FALLBACK as Ce, INK_WORKSPACE_RENAME_TITLE as x, INK_WORKSPACE_DELETE_TITLE as H } from "../../constants/workspace.const.js";
|
|
17
|
+
const Fe = (C) => {
|
|
18
18
|
const {
|
|
19
19
|
documents: p,
|
|
20
|
-
activeDocumentId:
|
|
21
|
-
onActiveDocumentChange:
|
|
22
|
-
onDocumentChange:
|
|
23
|
-
onDocumentDelete:
|
|
24
|
-
onDocumentRename:
|
|
25
|
-
onDocumentSave:
|
|
26
|
-
folders:
|
|
27
|
-
onFolderCreate:
|
|
28
|
-
onFolderDelete:
|
|
29
|
-
collaboration:
|
|
30
|
-
editorProps:
|
|
31
|
-
className:
|
|
32
|
-
style:
|
|
33
|
-
} =
|
|
34
|
-
sidebarOpen:
|
|
35
|
-
setSidebarOpen:
|
|
36
|
-
splitMode:
|
|
37
|
-
setSplitMode:
|
|
38
|
-
setSecondaryDocId:
|
|
39
|
-
searchQuery:
|
|
40
|
-
setSearchQuery:
|
|
41
|
-
editingDocId:
|
|
42
|
-
editTitle:
|
|
43
|
-
setEditTitle:
|
|
44
|
-
activeDocument:
|
|
20
|
+
activeDocumentId: S,
|
|
21
|
+
onActiveDocumentChange: T,
|
|
22
|
+
onDocumentChange: o,
|
|
23
|
+
onDocumentDelete: m,
|
|
24
|
+
onDocumentRename: U,
|
|
25
|
+
onDocumentSave: u,
|
|
26
|
+
folders: O = [],
|
|
27
|
+
onFolderCreate: K,
|
|
28
|
+
onFolderDelete: R,
|
|
29
|
+
collaboration: r,
|
|
30
|
+
editorProps: v = {},
|
|
31
|
+
className: V = D,
|
|
32
|
+
style: X
|
|
33
|
+
} = C, {
|
|
34
|
+
sidebarOpen: k,
|
|
35
|
+
setSidebarOpen: j,
|
|
36
|
+
splitMode: s,
|
|
37
|
+
setSplitMode: N,
|
|
38
|
+
setSecondaryDocId: G,
|
|
39
|
+
searchQuery: Q,
|
|
40
|
+
setSearchQuery: Z,
|
|
41
|
+
editingDocId: $,
|
|
42
|
+
editTitle: z,
|
|
43
|
+
setEditTitle: Y,
|
|
44
|
+
activeDocument: c,
|
|
45
45
|
secondaryDocument: l,
|
|
46
|
-
filteredDocs:
|
|
47
|
-
handleCreateDocument:
|
|
48
|
-
handleStartRename:
|
|
49
|
-
handleSaveRename:
|
|
50
|
-
handleCancelRename:
|
|
51
|
-
} =
|
|
52
|
-
var k;
|
|
53
|
-
ne(a), (k = c.onThemeChange) == null || k.call(c, a);
|
|
54
|
-
};
|
|
46
|
+
filteredDocs: q,
|
|
47
|
+
handleCreateDocument: w,
|
|
48
|
+
handleStartRename: A,
|
|
49
|
+
handleSaveRename: L,
|
|
50
|
+
handleCancelRename: J
|
|
51
|
+
} = ne(C);
|
|
55
52
|
return /* @__PURE__ */ i(
|
|
56
53
|
"div",
|
|
57
54
|
{
|
|
58
|
-
className:
|
|
59
|
-
style:
|
|
60
|
-
"data-split-mode":
|
|
61
|
-
"data-ink-theme": _,
|
|
55
|
+
className: d("ink-workspace-root", V),
|
|
56
|
+
style: X,
|
|
57
|
+
"data-split-mode": s,
|
|
62
58
|
children: [
|
|
63
59
|
/* @__PURE__ */ i("header", { className: "ink-workspace-header", children: [
|
|
64
60
|
/* @__PURE__ */ i("div", { className: "ink-workspace-header-left", children: [
|
|
@@ -67,85 +63,85 @@ const Ve = (u) => {
|
|
|
67
63
|
{
|
|
68
64
|
type: "button",
|
|
69
65
|
className: "ink-workspace-toggle-btn",
|
|
70
|
-
onClick: () =>
|
|
71
|
-
title:
|
|
72
|
-
"aria-label":
|
|
73
|
-
children: /* @__PURE__ */ e(
|
|
66
|
+
onClick: () => j(!k),
|
|
67
|
+
title: k ? W : g,
|
|
68
|
+
"aria-label": k ? W : g,
|
|
69
|
+
children: /* @__PURE__ */ e(te, {})
|
|
74
70
|
}
|
|
75
71
|
),
|
|
76
|
-
/* @__PURE__ */ e("span", { className: "ink-workspace-title", children:
|
|
72
|
+
/* @__PURE__ */ e("span", { className: "ink-workspace-title", children: f }),
|
|
77
73
|
/* @__PURE__ */ i("span", { className: "ink-workspace-count", children: [
|
|
78
74
|
"(",
|
|
79
75
|
p.length,
|
|
80
76
|
" ",
|
|
81
|
-
|
|
77
|
+
_e,
|
|
82
78
|
")"
|
|
83
79
|
] })
|
|
84
80
|
] }),
|
|
85
81
|
/* @__PURE__ */ i("div", { className: "ink-workspace-header-right", children: [
|
|
86
|
-
/* @__PURE__ */ i("div", { className: "ink-workspace-split-controls", role: "group", "aria-label":
|
|
82
|
+
/* @__PURE__ */ i("div", { className: "ink-workspace-split-controls", role: "group", "aria-label": _, children: [
|
|
87
83
|
/* @__PURE__ */ e(
|
|
88
84
|
t,
|
|
89
85
|
{
|
|
90
86
|
type: "button",
|
|
91
|
-
className:
|
|
92
|
-
onClick: () => E
|
|
93
|
-
title:
|
|
94
|
-
children: /* @__PURE__ */ e(
|
|
87
|
+
className: d("ink-workspace-icon-btn", s === E && "ink-active"),
|
|
88
|
+
onClick: () => N(E),
|
|
89
|
+
title: Ee,
|
|
90
|
+
children: /* @__PURE__ */ e(le, {})
|
|
95
91
|
}
|
|
96
92
|
),
|
|
97
93
|
/* @__PURE__ */ e(
|
|
98
94
|
t,
|
|
99
95
|
{
|
|
100
96
|
type: "button",
|
|
101
|
-
className:
|
|
102
|
-
onClick: () =>
|
|
103
|
-
title:
|
|
104
|
-
children: /* @__PURE__ */ e(
|
|
97
|
+
className: d("ink-workspace-icon-btn", s === F && "ink-active"),
|
|
98
|
+
onClick: () => N(F),
|
|
99
|
+
title: Ie,
|
|
100
|
+
children: /* @__PURE__ */ e(ce, {})
|
|
105
101
|
}
|
|
106
102
|
),
|
|
107
103
|
/* @__PURE__ */ e(
|
|
108
104
|
t,
|
|
109
105
|
{
|
|
110
106
|
type: "button",
|
|
111
|
-
className:
|
|
112
|
-
onClick: () =>
|
|
113
|
-
title:
|
|
114
|
-
children: /* @__PURE__ */ e(
|
|
107
|
+
className: d("ink-workspace-icon-btn", s === M && "ink-active"),
|
|
108
|
+
onClick: () => N(M),
|
|
109
|
+
title: he,
|
|
110
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
115
111
|
}
|
|
116
112
|
)
|
|
117
113
|
] }),
|
|
118
|
-
|
|
114
|
+
u && c && /* @__PURE__ */ e(
|
|
119
115
|
t,
|
|
120
116
|
{
|
|
121
117
|
type: "button",
|
|
122
118
|
className: "ink-workspace-icon-btn",
|
|
123
|
-
onClick: () =>
|
|
124
|
-
title:
|
|
125
|
-
"aria-label":
|
|
126
|
-
children: /* @__PURE__ */ e(
|
|
119
|
+
onClick: () => u(c.id),
|
|
120
|
+
title: B,
|
|
121
|
+
"aria-label": B,
|
|
122
|
+
children: /* @__PURE__ */ e(re, {})
|
|
127
123
|
}
|
|
128
124
|
),
|
|
129
|
-
(
|
|
130
|
-
|
|
125
|
+
(r == null ? void 0 : r.collaborators) && /* @__PURE__ */ e(
|
|
126
|
+
ie,
|
|
131
127
|
{
|
|
132
|
-
collaborators:
|
|
133
|
-
maxAvatars:
|
|
128
|
+
collaborators: r.collaborators,
|
|
129
|
+
maxAvatars: r.maxAvatars
|
|
134
130
|
}
|
|
135
131
|
)
|
|
136
132
|
] })
|
|
137
133
|
] }),
|
|
138
134
|
/* @__PURE__ */ i("div", { className: "ink-workspace-body", children: [
|
|
139
|
-
|
|
135
|
+
k && /* @__PURE__ */ i("aside", { className: "ink-workspace-sidebar", "aria-label": f, children: [
|
|
140
136
|
/* @__PURE__ */ i("div", { className: "ink-workspace-sidebar-toolbar", children: [
|
|
141
137
|
/* @__PURE__ */ e(
|
|
142
138
|
"input",
|
|
143
139
|
{
|
|
144
140
|
type: "text",
|
|
145
141
|
className: "ink-workspace-search-input",
|
|
146
|
-
placeholder:
|
|
147
|
-
value:
|
|
148
|
-
onChange: (a) =>
|
|
142
|
+
placeholder: be,
|
|
143
|
+
value: Q,
|
|
144
|
+
onChange: (a) => Z(a.target.value)
|
|
149
145
|
}
|
|
150
146
|
),
|
|
151
147
|
/* @__PURE__ */ e(
|
|
@@ -153,61 +149,61 @@ const Ve = (u) => {
|
|
|
153
149
|
{
|
|
154
150
|
type: "button",
|
|
155
151
|
className: "ink-workspace-new-doc-btn",
|
|
156
|
-
onClick:
|
|
157
|
-
title:
|
|
158
|
-
"aria-label":
|
|
159
|
-
children:
|
|
152
|
+
onClick: w,
|
|
153
|
+
title: I,
|
|
154
|
+
"aria-label": I,
|
|
155
|
+
children: I
|
|
160
156
|
}
|
|
161
157
|
),
|
|
162
|
-
|
|
158
|
+
K && /* @__PURE__ */ e(
|
|
163
159
|
t,
|
|
164
160
|
{
|
|
165
161
|
type: "button",
|
|
166
162
|
className: "ink-workspace-icon-btn",
|
|
167
|
-
onClick: () =>
|
|
168
|
-
title:
|
|
169
|
-
"aria-label":
|
|
170
|
-
children: /* @__PURE__ */ e(
|
|
163
|
+
onClick: () => K(h),
|
|
164
|
+
title: h,
|
|
165
|
+
"aria-label": h,
|
|
166
|
+
children: /* @__PURE__ */ e(se, {})
|
|
171
167
|
}
|
|
172
168
|
)
|
|
173
169
|
] }),
|
|
174
|
-
|
|
170
|
+
O.length > me && /* @__PURE__ */ e("div", { className: "ink-workspace-folders-section", children: O.map((a) => /* @__PURE__ */ i("div", { className: "ink-workspace-folder-item", children: [
|
|
175
171
|
/* @__PURE__ */ e("span", { className: "ink-doc-icon", children: "📁" }),
|
|
176
172
|
/* @__PURE__ */ e("span", { className: "ink-doc-title", children: a.name }),
|
|
177
|
-
|
|
173
|
+
R && /* @__PURE__ */ e(
|
|
178
174
|
t,
|
|
179
175
|
{
|
|
180
176
|
type: "button",
|
|
181
177
|
className: "ink-doc-action-btn ink-delete",
|
|
182
|
-
onClick: () =>
|
|
178
|
+
onClick: () => R(a.id),
|
|
183
179
|
title: b,
|
|
184
180
|
"aria-label": b,
|
|
185
181
|
children: b
|
|
186
182
|
}
|
|
187
183
|
)
|
|
188
184
|
] }, a.id)) }),
|
|
189
|
-
/* @__PURE__ */ e("div", { className: "ink-workspace-doc-list", role: "tree", children:
|
|
190
|
-
const
|
|
185
|
+
/* @__PURE__ */ e("div", { className: "ink-workspace-doc-list", role: "tree", children: q.map((a) => {
|
|
186
|
+
const P = a.id === S, ee = $ === a.id;
|
|
191
187
|
return /* @__PURE__ */ i(
|
|
192
188
|
"div",
|
|
193
189
|
{
|
|
194
190
|
role: "treeitem",
|
|
195
|
-
"aria-selected":
|
|
196
|
-
className:
|
|
197
|
-
onClick: () =>
|
|
191
|
+
"aria-selected": P,
|
|
192
|
+
className: d("ink-workspace-doc-item", P && "ink-doc-active"),
|
|
193
|
+
onClick: () => T(a.id),
|
|
198
194
|
children: [
|
|
199
|
-
/* @__PURE__ */ e("span", { className: "ink-doc-icon", children: a.icon || /* @__PURE__ */ e(
|
|
200
|
-
|
|
195
|
+
/* @__PURE__ */ e("span", { className: "ink-doc-icon", children: a.icon || /* @__PURE__ */ e(de, {}) }),
|
|
196
|
+
ee ? /* @__PURE__ */ e(
|
|
201
197
|
"input",
|
|
202
198
|
{
|
|
203
199
|
type: "text",
|
|
204
200
|
className: "ink-doc-title-input",
|
|
205
|
-
value:
|
|
201
|
+
value: z,
|
|
206
202
|
autoFocus: !0,
|
|
207
|
-
onChange: (n) =>
|
|
208
|
-
onBlur: () =>
|
|
203
|
+
onChange: (n) => Y(n.target.value),
|
|
204
|
+
onBlur: () => L(a.id),
|
|
209
205
|
onKeyDown: (n) => {
|
|
210
|
-
n.key === "Enter" &&
|
|
206
|
+
n.key === "Enter" && L(a.id), n.key === "Escape" && J();
|
|
211
207
|
},
|
|
212
208
|
onClick: (n) => n.stopPropagation()
|
|
213
209
|
}
|
|
@@ -215,8 +211,8 @@ const Ve = (u) => {
|
|
|
215
211
|
"span",
|
|
216
212
|
{
|
|
217
213
|
className: "ink-doc-title",
|
|
218
|
-
onDoubleClick: (n) =>
|
|
219
|
-
children: a.title ||
|
|
214
|
+
onDoubleClick: (n) => A(a.id, a.title, n),
|
|
215
|
+
children: a.title || Ce
|
|
220
216
|
}
|
|
221
217
|
),
|
|
222
218
|
a.isDirty && /* @__PURE__ */ e("span", { className: "ink-doc-dirty-dot" }),
|
|
@@ -226,23 +222,23 @@ const Ve = (u) => {
|
|
|
226
222
|
{
|
|
227
223
|
type: "button",
|
|
228
224
|
className: "ink-doc-action-btn",
|
|
229
|
-
onClick: (n) =>
|
|
230
|
-
title:
|
|
231
|
-
"aria-label":
|
|
232
|
-
children: /* @__PURE__ */ e(
|
|
225
|
+
onClick: (n) => A(a.id, a.title, n),
|
|
226
|
+
title: x,
|
|
227
|
+
"aria-label": x,
|
|
228
|
+
children: /* @__PURE__ */ e(pe, {})
|
|
233
229
|
}
|
|
234
230
|
),
|
|
235
|
-
p.length >
|
|
231
|
+
p.length > Ne && m && /* @__PURE__ */ e(
|
|
236
232
|
t,
|
|
237
233
|
{
|
|
238
234
|
type: "button",
|
|
239
235
|
className: "ink-doc-action-btn ink-delete",
|
|
240
236
|
onClick: (n) => {
|
|
241
|
-
n.stopPropagation(),
|
|
237
|
+
n.stopPropagation(), m(a.id);
|
|
242
238
|
},
|
|
243
|
-
title:
|
|
244
|
-
"aria-label":
|
|
245
|
-
children: /* @__PURE__ */ e(
|
|
239
|
+
title: H,
|
|
240
|
+
"aria-label": H,
|
|
241
|
+
children: /* @__PURE__ */ e(ke, {})
|
|
246
242
|
}
|
|
247
243
|
)
|
|
248
244
|
] })
|
|
@@ -252,56 +248,52 @@ const Ve = (u) => {
|
|
|
252
248
|
);
|
|
253
249
|
}) })
|
|
254
250
|
] }),
|
|
255
|
-
/* @__PURE__ */ i("main", { className:
|
|
251
|
+
/* @__PURE__ */ i("main", { className: d("ink-workspace-main-area", `ink-split-${s}`), children: [
|
|
256
252
|
/* @__PURE__ */ i("section", { className: "ink-workspace-pane ink-primary-pane", children: [
|
|
257
253
|
/* @__PURE__ */ e(
|
|
258
|
-
|
|
254
|
+
ae,
|
|
259
255
|
{
|
|
260
256
|
documents: p,
|
|
261
|
-
activeDocumentId:
|
|
262
|
-
onTabSelect:
|
|
263
|
-
onTabClose:
|
|
264
|
-
onTabAdd:
|
|
265
|
-
onTabRename:
|
|
257
|
+
activeDocumentId: S,
|
|
258
|
+
onTabSelect: T,
|
|
259
|
+
onTabClose: m,
|
|
260
|
+
onTabAdd: w,
|
|
261
|
+
onTabRename: U
|
|
266
262
|
}
|
|
267
263
|
),
|
|
268
|
-
|
|
269
|
-
|
|
264
|
+
c && /* @__PURE__ */ e("div", { className: "ink-workspace-editor-wrapper", children: /* @__PURE__ */ e(
|
|
265
|
+
y,
|
|
270
266
|
{
|
|
271
|
-
value:
|
|
272
|
-
onChange: (a) =>
|
|
273
|
-
readOnly:
|
|
274
|
-
collaboration:
|
|
275
|
-
...
|
|
276
|
-
themeId: _,
|
|
277
|
-
onThemeChange: D
|
|
267
|
+
value: c.content,
|
|
268
|
+
onChange: (a) => o == null ? void 0 : o(c.id, a),
|
|
269
|
+
readOnly: c.readOnly,
|
|
270
|
+
collaboration: r,
|
|
271
|
+
...v
|
|
278
272
|
},
|
|
279
|
-
|
|
273
|
+
c.id
|
|
280
274
|
) })
|
|
281
275
|
] }),
|
|
282
|
-
|
|
276
|
+
s !== E && /* @__PURE__ */ i("section", { className: "ink-workspace-pane ink-secondary-pane", children: [
|
|
283
277
|
/* @__PURE__ */ i("div", { className: "ink-secondary-pane-header", children: [
|
|
284
|
-
/* @__PURE__ */ e("span", { className: "ink-secondary-pane-label", children:
|
|
278
|
+
/* @__PURE__ */ e("span", { className: "ink-secondary-pane-label", children: _ }),
|
|
285
279
|
/* @__PURE__ */ e(
|
|
286
280
|
"select",
|
|
287
281
|
{
|
|
288
282
|
className: "ink-secondary-pane-select",
|
|
289
|
-
value: (l == null ? void 0 : l.id) ||
|
|
290
|
-
onChange: (a) =>
|
|
291
|
-
"aria-label":
|
|
283
|
+
value: (l == null ? void 0 : l.id) || D,
|
|
284
|
+
onChange: (a) => G(a.target.value),
|
|
285
|
+
"aria-label": _,
|
|
292
286
|
children: p.map((a) => /* @__PURE__ */ e("option", { value: a.id, children: a.title }, a.id))
|
|
293
287
|
}
|
|
294
288
|
)
|
|
295
289
|
] }),
|
|
296
290
|
l && /* @__PURE__ */ e("div", { className: "ink-workspace-editor-wrapper", children: /* @__PURE__ */ e(
|
|
297
|
-
|
|
291
|
+
y,
|
|
298
292
|
{
|
|
299
293
|
value: l.content,
|
|
300
|
-
onChange: (a) =>
|
|
294
|
+
onChange: (a) => o == null ? void 0 : o(l.id, a),
|
|
301
295
|
readOnly: l.readOnly,
|
|
302
|
-
...
|
|
303
|
-
themeId: _,
|
|
304
|
-
onThemeChange: D
|
|
296
|
+
...v
|
|
305
297
|
},
|
|
306
298
|
`sec-${l.id}`
|
|
307
299
|
) })
|
|
@@ -313,5 +305,5 @@ const Ve = (u) => {
|
|
|
313
305
|
);
|
|
314
306
|
};
|
|
315
307
|
export {
|
|
316
|
-
|
|
308
|
+
Fe as InkWorkspace
|
|
317
309
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),B=require("../../../constants/numbers.cjs"),y=require("../../../constants/generals.const.cjs");require("../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../utils/paste.utils.cjs");require("react-dom");const O=require("../../../constants/workspace.const.cjs"),Z=_=>{const{documents:n,activeDocumentId:s,onDocumentCreate:S,onDocumentRename:r,sidebarOpen:p,onSidebarOpenChange:o,splitMode:M,onSplitModeChange:c,secondaryDocumentId:k,onSecondaryDocumentChange:a}=_,[f,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),B=require("../../../constants/numbers.cjs"),y=require("../../../constants/generals.const.cjs");require("../../../constants/openai.const.cjs");require("react/jsx-runtime");require("../../../utils/paste.utils.cjs");require("../../../utils/exportDocument.utils.cjs");require("react-dom");const O=require("../../../constants/workspace.const.cjs"),Z=_=>{const{documents:n,activeDocumentId:s,onDocumentCreate:S,onDocumentRename:r,sidebarOpen:p,onSidebarOpenChange:o,splitMode:M,onSplitModeChange:c,secondaryDocumentId:k,onSecondaryDocumentChange:a}=_,[f,q]=t.useState(!0),[E,T]=t.useState(O.INK_SPLIT_MODE_NONE),[N,v]=t.useState(null),[I,R]=t.useState(y.EMPTY_STRING),[m,b]=t.useState(null),[l,C]=t.useState(y.EMPTY_STRING),L=p!==void 0?p:f,P=t.useCallback(e=>{q(e),o==null||o(e)},[o]),w=M!==void 0?M:E,g=t.useCallback(e=>{T(e),c==null||c(e)},[c]),i=k!==void 0?k:N,h=t.useCallback(e=>{v(e),a==null||a(e)},[a]),K=t.useMemo(()=>n.find(e=>e.id===s)||n[B.NUMBER_ZERO],[n,s]),W=t.useMemo(()=>i?n.find(e=>e.id===i)||null:n.find(e=>e.id!==s)||null,[n,i,s]),G=t.useMemo(()=>{const e=I.trim();if(!e)return n;const u=e.toLowerCase();return n.filter(d=>{var D;return d.title.toLowerCase().includes(u)||((D=d.tags)==null?void 0:D.some(A=>A.toLowerCase().includes(u)))})},[n,I]),Q=t.useCallback(()=>{S&&S(O.INK_WORKSPACE_UNTITLED_DOC)},[S]),U=t.useCallback((e,u,d)=>{d.stopPropagation(),b(e),C(u)},[]),Y=t.useCallback(e=>{m===e&&l.trim()&&(r==null||r(e,l.trim())),b(null)},[m,l,r]),j=t.useCallback(()=>{b(null)},[]);return{sidebarOpen:L,setSidebarOpen:P,splitMode:w,setSplitMode:g,secondaryDocId:i,setSecondaryDocId:h,searchQuery:I,setSearchQuery:R,editingDocId:m,editTitle:l,setEditTitle:C,activeDocument:K,secondaryDocument:W,filteredDocs:G,handleCreateDocument:Q,handleStartRename:U,handleSaveRename:Y,handleCancelRename:j}};exports.useInkWorkspace=Z;
|
|
@@ -4,9 +4,10 @@ import { EMPTY_STRING as N } from "../../../constants/generals.const.js";
|
|
|
4
4
|
import "../../../constants/openai.const.js";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "../../../utils/paste.utils.js";
|
|
7
|
+
import "../../../utils/exportDocument.utils.js";
|
|
7
8
|
import "react-dom";
|
|
8
9
|
import { INK_SPLIT_MODE_NONE as j, INK_WORKSPACE_UNTITLED_DOC as z } from "../../../constants/workspace.const.js";
|
|
9
|
-
const
|
|
10
|
+
const ot = (T) => {
|
|
10
11
|
const {
|
|
11
12
|
documents: e,
|
|
12
13
|
activeDocumentId: r,
|
|
@@ -30,17 +31,17 @@ const nt = (T) => {
|
|
|
30
31
|
), g = D(() => a ? e.find((t) => t.id === a) || null : e.find((t) => t.id !== r) || null, [e, a, r]), q = D(() => {
|
|
31
32
|
const t = I.trim();
|
|
32
33
|
if (!t) return e;
|
|
33
|
-
const
|
|
34
|
+
const m = t.toLowerCase();
|
|
34
35
|
return e.filter(
|
|
35
|
-
(
|
|
36
|
+
(u) => {
|
|
36
37
|
var _;
|
|
37
|
-
return
|
|
38
|
+
return u.title.toLowerCase().includes(m) || ((_ = u.tags) == null ? void 0 : _.some((Y) => Y.toLowerCase().includes(m)));
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
41
|
}, [e, I]), x = n(() => {
|
|
41
42
|
p && p(z);
|
|
42
|
-
}, [p]), A = n((t,
|
|
43
|
-
|
|
43
|
+
}, [p]), A = n((t, m, u) => {
|
|
44
|
+
u.stopPropagation(), f(t), M(m);
|
|
44
45
|
}, []), B = n((t) => {
|
|
45
46
|
S === t && l.trim() && (s == null || s(t, l.trim())), f(null);
|
|
46
47
|
}, [S, l, s]), G = n(() => {
|
|
@@ -68,5 +69,5 @@ const nt = (T) => {
|
|
|
68
69
|
};
|
|
69
70
|
};
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
ot as useInkWorkspace
|
|
72
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="bold",_="italic",T="underline",N="strikethrough",L="link",O="bulletList",C="orderedList",A="heading2",
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="bold",_="italic",T="underline",N="strikethrough",L="link",O="bulletList",C="orderedList",A="heading2",B="clearFormat",U="findReplace",M="signature",t="comment",I="tableRowAbove",X="tableRowBelow",D="tableColLeft",o="tableColRight",e="tableDeleteRow",n="tableDeleteCol",c="Bold",s="Italic",l="Underline",R="Strikethrough",r="Insert link",a="Bullet list",i="Numbered list",G="Heading",d="Clear format",b="Find and replace",g="Sign pad",S="Add comment",W="Insert row above",u="Insert row below",H="Insert column left",K="Insert column right",m="Delete row",F="Delete column",V="tableHeader",h="Toggle header row",w="tableMerge",k="Merge cell right",p="tableSplit",f="Split cell",P="tableBackground",v="Cell background",y="tableValign",j="Vertical align";exports.CONTEXT_MENU_ID_BOLD=E;exports.CONTEXT_MENU_ID_BULLET=O;exports.CONTEXT_MENU_ID_CLEAR=B;exports.CONTEXT_MENU_ID_COMMENT=t;exports.CONTEXT_MENU_ID_FIND=U;exports.CONTEXT_MENU_ID_HEADING=A;exports.CONTEXT_MENU_ID_ITALIC=_;exports.CONTEXT_MENU_ID_LINK=L;exports.CONTEXT_MENU_ID_ORDERED=C;exports.CONTEXT_MENU_ID_SIGNATURE=M;exports.CONTEXT_MENU_ID_STRIKE=N;exports.CONTEXT_MENU_ID_TABLE_BACKGROUND=P;exports.CONTEXT_MENU_ID_TABLE_COL_LEFT=D;exports.CONTEXT_MENU_ID_TABLE_COL_RIGHT=o;exports.CONTEXT_MENU_ID_TABLE_DELETE_COL=n;exports.CONTEXT_MENU_ID_TABLE_DELETE_ROW=e;exports.CONTEXT_MENU_ID_TABLE_HEADER=V;exports.CONTEXT_MENU_ID_TABLE_MERGE=w;exports.CONTEXT_MENU_ID_TABLE_ROW_ABOVE=I;exports.CONTEXT_MENU_ID_TABLE_ROW_BELOW=X;exports.CONTEXT_MENU_ID_TABLE_SPLIT=p;exports.CONTEXT_MENU_ID_TABLE_VALIGN=y;exports.CONTEXT_MENU_ID_UNDERLINE=T;exports.CONTEXT_MENU_LABEL_BOLD=c;exports.CONTEXT_MENU_LABEL_BULLET=a;exports.CONTEXT_MENU_LABEL_CLEAR=d;exports.CONTEXT_MENU_LABEL_COMMENT=S;exports.CONTEXT_MENU_LABEL_FIND=b;exports.CONTEXT_MENU_LABEL_HEADING=G;exports.CONTEXT_MENU_LABEL_ITALIC=s;exports.CONTEXT_MENU_LABEL_LINK=r;exports.CONTEXT_MENU_LABEL_ORDERED=i;exports.CONTEXT_MENU_LABEL_SIGNATURE=g;exports.CONTEXT_MENU_LABEL_STRIKE=R;exports.CONTEXT_MENU_LABEL_TABLE_BACKGROUND=v;exports.CONTEXT_MENU_LABEL_TABLE_COL_LEFT=H;exports.CONTEXT_MENU_LABEL_TABLE_COL_RIGHT=K;exports.CONTEXT_MENU_LABEL_TABLE_DELETE_COL=F;exports.CONTEXT_MENU_LABEL_TABLE_DELETE_ROW=m;exports.CONTEXT_MENU_LABEL_TABLE_HEADER=h;exports.CONTEXT_MENU_LABEL_TABLE_MERGE=k;exports.CONTEXT_MENU_LABEL_TABLE_ROW_ABOVE=W;exports.CONTEXT_MENU_LABEL_TABLE_ROW_BELOW=u;exports.CONTEXT_MENU_LABEL_TABLE_SPLIT=f;exports.CONTEXT_MENU_LABEL_TABLE_VALIGN=j;exports.CONTEXT_MENU_LABEL_UNDERLINE=l;
|
|
@@ -36,4 +36,12 @@ export declare const CONTEXT_MENU_LABEL_TABLE_DELETE_ROW = "Delete row";
|
|
|
36
36
|
export declare const CONTEXT_MENU_LABEL_TABLE_DELETE_COL = "Delete column";
|
|
37
37
|
export declare const CONTEXT_MENU_ID_TABLE_HEADER = "tableHeader";
|
|
38
38
|
export declare const CONTEXT_MENU_LABEL_TABLE_HEADER = "Toggle header row";
|
|
39
|
+
export declare const CONTEXT_MENU_ID_TABLE_MERGE = "tableMerge";
|
|
40
|
+
export declare const CONTEXT_MENU_LABEL_TABLE_MERGE = "Merge cell right";
|
|
41
|
+
export declare const CONTEXT_MENU_ID_TABLE_SPLIT = "tableSplit";
|
|
42
|
+
export declare const CONTEXT_MENU_LABEL_TABLE_SPLIT = "Split cell";
|
|
43
|
+
export declare const CONTEXT_MENU_ID_TABLE_BACKGROUND = "tableBackground";
|
|
44
|
+
export declare const CONTEXT_MENU_LABEL_TABLE_BACKGROUND = "Cell background";
|
|
45
|
+
export declare const CONTEXT_MENU_ID_TABLE_VALIGN = "tableValign";
|
|
46
|
+
export declare const CONTEXT_MENU_LABEL_TABLE_VALIGN = "Vertical align";
|
|
39
47
|
//# sourceMappingURL=contextMenu.const.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextMenu.const.d.ts","sourceRoot":"","sources":["../../src/constants/contextMenu.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAClD,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAClD,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,+BAA+B,kBAAkB,CAAC;AAC/D,eAAO,MAAM,+BAA+B,kBAAkB,CAAC;AAC/D,eAAO,MAAM,8BAA8B,iBAAiB,CAAC;AAC7D,eAAO,MAAM,+BAA+B,kBAAkB,CAAC;AAC/D,eAAO,MAAM,gCAAgC,mBAAmB,CAAC;AACjE,eAAO,MAAM,gCAAgC,mBAAmB,CAAC;AACjE,eAAO,MAAM,uBAAuB,SAAS,CAAC;AAC9C,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAClD,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AACzD,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AACvD,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAC1D,eAAO,MAAM,0BAA0B,YAAY,CAAC;AACpD,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAC1D,eAAO,MAAM,4BAA4B,aAAa,CAAC;AACvD,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AACxD,eAAO,MAAM,kCAAkC,qBAAqB,CAAC;AACrE,eAAO,MAAM,kCAAkC,qBAAqB,CAAC;AACrE,eAAO,MAAM,iCAAiC,uBAAuB,CAAC;AACtE,eAAO,MAAM,kCAAkC,wBAAwB,CAAC;AACxE,eAAO,MAAM,mCAAmC,eAAe,CAAC;AAChE,eAAO,MAAM,mCAAmC,kBAAkB,CAAC;AACnE,eAAO,MAAM,4BAA4B,gBAAgB,CAAC;AAC1D,eAAO,MAAM,+BAA+B,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"contextMenu.const.d.ts","sourceRoot":"","sources":["../../src/constants/contextMenu.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAClD,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAClD,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,+BAA+B,kBAAkB,CAAC;AAC/D,eAAO,MAAM,+BAA+B,kBAAkB,CAAC;AAC/D,eAAO,MAAM,8BAA8B,iBAAiB,CAAC;AAC7D,eAAO,MAAM,+BAA+B,kBAAkB,CAAC;AAC/D,eAAO,MAAM,gCAAgC,mBAAmB,CAAC;AACjE,eAAO,MAAM,gCAAgC,mBAAmB,CAAC;AACjE,eAAO,MAAM,uBAAuB,SAAS,CAAC;AAC9C,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAClD,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AACzD,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AACvD,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAC1D,eAAO,MAAM,0BAA0B,YAAY,CAAC;AACpD,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAC1D,eAAO,MAAM,4BAA4B,aAAa,CAAC;AACvD,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AACxD,eAAO,MAAM,kCAAkC,qBAAqB,CAAC;AACrE,eAAO,MAAM,kCAAkC,qBAAqB,CAAC;AACrE,eAAO,MAAM,iCAAiC,uBAAuB,CAAC;AACtE,eAAO,MAAM,kCAAkC,wBAAwB,CAAC;AACxE,eAAO,MAAM,mCAAmC,eAAe,CAAC;AAChE,eAAO,MAAM,mCAAmC,kBAAkB,CAAC;AACnE,eAAO,MAAM,4BAA4B,gBAAgB,CAAC;AAC1D,eAAO,MAAM,+BAA+B,sBAAsB,CAAC;AACnE,eAAO,MAAM,2BAA2B,eAAe,CAAC;AACxD,eAAO,MAAM,8BAA8B,qBAAqB,CAAC;AACjE,eAAO,MAAM,2BAA2B,eAAe,CAAC;AACxD,eAAO,MAAM,8BAA8B,eAAe,CAAC;AAC3D,eAAO,MAAM,gCAAgC,oBAAoB,CAAC;AAClE,eAAO,MAAM,mCAAmC,oBAAoB,CAAC;AACrE,eAAO,MAAM,4BAA4B,gBAAgB,CAAC;AAC1D,eAAO,MAAM,+BAA+B,mBAAmB,CAAC"}
|
|
@@ -1,41 +1,49 @@
|
|
|
1
|
-
const E = "bold", _ = "italic", T = "underline", N = "strikethrough", L = "link", t = "bulletList", o = "orderedList", n = "heading2",
|
|
1
|
+
const E = "bold", _ = "italic", T = "underline", N = "strikethrough", L = "link", t = "bulletList", o = "orderedList", n = "heading2", e = "clearFormat", O = "findReplace", C = "signature", A = "comment", c = "tableRowAbove", B = "tableRowBelow", s = "tableColLeft", U = "tableColRight", l = "tableDeleteRow", M = "tableDeleteCol", I = "Bold", D = "Italic", X = "Underline", r = "Strikethrough", a = "Insert link", R = "Bullet list", i = "Numbered list", d = "Heading", b = "Clear format", g = "Find and replace", u = "Sign pad", G = "Add comment", m = "Insert row above", S = "Insert row below", h = "Insert column left", w = "Insert column right", H = "Delete row", W = "Delete column", k = "tableHeader", p = "Toggle header row", F = "tableMerge", K = "Merge cell right", V = "tableSplit", f = "Split cell", v = "tableBackground", P = "Cell background", x = "tableValign", j = "Vertical align";
|
|
2
2
|
export {
|
|
3
3
|
E as CONTEXT_MENU_ID_BOLD,
|
|
4
4
|
t as CONTEXT_MENU_ID_BULLET,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
e as CONTEXT_MENU_ID_CLEAR,
|
|
6
|
+
A as CONTEXT_MENU_ID_COMMENT,
|
|
7
|
+
O as CONTEXT_MENU_ID_FIND,
|
|
8
8
|
n as CONTEXT_MENU_ID_HEADING,
|
|
9
9
|
_ as CONTEXT_MENU_ID_ITALIC,
|
|
10
10
|
L as CONTEXT_MENU_ID_LINK,
|
|
11
11
|
o as CONTEXT_MENU_ID_ORDERED,
|
|
12
12
|
C as CONTEXT_MENU_ID_SIGNATURE,
|
|
13
13
|
N as CONTEXT_MENU_ID_STRIKE,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
v as CONTEXT_MENU_ID_TABLE_BACKGROUND,
|
|
15
|
+
s as CONTEXT_MENU_ID_TABLE_COL_LEFT,
|
|
16
|
+
U as CONTEXT_MENU_ID_TABLE_COL_RIGHT,
|
|
16
17
|
M as CONTEXT_MENU_ID_TABLE_DELETE_COL,
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
l as CONTEXT_MENU_ID_TABLE_DELETE_ROW,
|
|
19
|
+
k as CONTEXT_MENU_ID_TABLE_HEADER,
|
|
20
|
+
F as CONTEXT_MENU_ID_TABLE_MERGE,
|
|
19
21
|
c as CONTEXT_MENU_ID_TABLE_ROW_ABOVE,
|
|
20
|
-
|
|
22
|
+
B as CONTEXT_MENU_ID_TABLE_ROW_BELOW,
|
|
23
|
+
V as CONTEXT_MENU_ID_TABLE_SPLIT,
|
|
24
|
+
x as CONTEXT_MENU_ID_TABLE_VALIGN,
|
|
21
25
|
T as CONTEXT_MENU_ID_UNDERLINE,
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
I as CONTEXT_MENU_LABEL_BOLD,
|
|
27
|
+
R as CONTEXT_MENU_LABEL_BULLET,
|
|
24
28
|
b as CONTEXT_MENU_LABEL_CLEAR,
|
|
25
|
-
|
|
29
|
+
G as CONTEXT_MENU_LABEL_COMMENT,
|
|
26
30
|
g as CONTEXT_MENU_LABEL_FIND,
|
|
27
31
|
d as CONTEXT_MENU_LABEL_HEADING,
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
D as CONTEXT_MENU_LABEL_ITALIC,
|
|
33
|
+
a as CONTEXT_MENU_LABEL_LINK,
|
|
30
34
|
i as CONTEXT_MENU_LABEL_ORDERED,
|
|
31
|
-
|
|
35
|
+
u as CONTEXT_MENU_LABEL_SIGNATURE,
|
|
32
36
|
r as CONTEXT_MENU_LABEL_STRIKE,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
P as CONTEXT_MENU_LABEL_TABLE_BACKGROUND,
|
|
38
|
+
h as CONTEXT_MENU_LABEL_TABLE_COL_LEFT,
|
|
39
|
+
w as CONTEXT_MENU_LABEL_TABLE_COL_RIGHT,
|
|
40
|
+
W as CONTEXT_MENU_LABEL_TABLE_DELETE_COL,
|
|
41
|
+
H as CONTEXT_MENU_LABEL_TABLE_DELETE_ROW,
|
|
42
|
+
p as CONTEXT_MENU_LABEL_TABLE_HEADER,
|
|
43
|
+
K as CONTEXT_MENU_LABEL_TABLE_MERGE,
|
|
44
|
+
m as CONTEXT_MENU_LABEL_TABLE_ROW_ABOVE,
|
|
45
|
+
S as CONTEXT_MENU_LABEL_TABLE_ROW_BELOW,
|
|
46
|
+
f as CONTEXT_MENU_LABEL_TABLE_SPLIT,
|
|
47
|
+
j as CONTEXT_MENU_LABEL_TABLE_VALIGN,
|
|
40
48
|
X as CONTEXT_MENU_LABEL_UNDERLINE
|
|
41
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./generals.const.cjs"),o=require("./defaults.const.cjs");require("./openai.const.cjs");require("../utils/paste.utils.cjs");require("react");require("react-dom");const r=require("../common-components/icons/UndoIcon.cjs"),s=require("../common-components/icons/RedoIcon.cjs"),t=require("../common-components/icons/BulletListIcon.cjs"),c=require("../common-components/icons/OrderedListIcon.cjs"),i=require("../common-components/icons/ChecklistIcon.cjs"),l=require("../common-components/icons/ImageToolIcon.cjs"),I=require("../common-components/icons/LinkToolIcon.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./generals.const.cjs"),o=require("./defaults.const.cjs");require("./openai.const.cjs");require("../utils/paste.utils.cjs");require("../utils/exportDocument.utils.cjs");require("react");require("react-dom");const r=require("../common-components/icons/UndoIcon.cjs"),s=require("../common-components/icons/RedoIcon.cjs"),t=require("../common-components/icons/BulletListIcon.cjs"),c=require("../common-components/icons/OrderedListIcon.cjs"),i=require("../common-components/icons/ChecklistIcon.cjs"),l=require("../common-components/icons/ImageToolIcon.cjs"),I=require("../common-components/icons/LinkToolIcon.cjs"),u=require("../common-components/icons/TableToolIcon.cjs"),L=require("../common-components/icons/QuoteIcon.cjs"),a={bold:e.jsx("span",{className:`${o.INK_CLASS_GLYPH} ${o.INK_CLASS_GLYPH_BOLD}`,children:n.INK_GLYPH_BOLD}),italic:e.jsx("span",{className:`${o.INK_CLASS_GLYPH} ${o.INK_CLASS_GLYPH_ITALIC}`,children:n.INK_GLYPH_ITALIC}),underline:e.jsx("span",{className:`${o.INK_CLASS_GLYPH} ${o.INK_CLASS_GLYPH_UNDERLINE}`,children:n.INK_GLYPH_UNDERLINE}),strikethrough:e.jsx("span",{className:`${o.INK_CLASS_GLYPH} ${o.INK_CLASS_GLYPH_STRIKE}`,children:n.INK_GLYPH_STRIKE}),bulletList:e.jsx(t.BulletListIcon,{}),orderedList:e.jsx(c.OrderedListIcon,{}),checklist:e.jsx(i.ChecklistIcon,{}),link:e.jsx(I.LinkToolIcon,{}),image:e.jsx(l.ImageToolIcon,{}),table:e.jsx(u.TableToolIcon,{}),signature:"✍",findReplace:"⌕",horizontalRule:"―",undo:e.jsx(r.UndoIcon,{}),redo:e.jsx(s.RedoIcon,{}),trackChanges:"±",comments:"💬",ai:"✦",clearFormat:"⌫",directionLtr:"LTR",directionRtl:"RTL",superscript:"x²",subscript:"x₂",alignLeft:"⫷",alignCenter:"☰",alignRight:"⫸",alignJustify:"≡",indent:"→",outdent:"←",blockquote:e.jsx(L.QuoteIcon,{}),code:"</>",htmlSource:"</>",titles:"Aa",excel:"⊞",graph:"▦",outline:"☰",fullscreen:"⛶",theme:"◐"};exports.INK_DEFAULT_ICONS=a;
|