@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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),o=require("../../../../constants/generals.const.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),o=require("../../../../constants/generals.const.cjs"),r=require("../../../../constants/findReplaceMenu.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");const a=require("../../../../common-components/Button/Button.cjs"),u=require("../../../../common-components/Field/Field.cjs");require("react-dom");const e=require("./FindReplace.const.cjs"),p=L=>{const{open:F,onClose:C,onReplace:A,findLabel:D=e.FIND_REPLACE_DEFAULT_FIND,replaceLabel:N=e.FIND_REPLACE_DEFAULT_REPLACE,replaceOneLabel:R=e.FIND_REPLACE_DEFAULT_ONE,replaceAllLabel:d=e.FIND_REPLACE_DEFAULT_ALL,closeLabel:I=e.FIND_REPLACE_DEFAULT_CLOSE,title:c=e.FIND_REPLACE_DEFAULT_TITLE,focusField:s=r.FIND_REPLACE_FOCUS_FIND}=L,[l,S]=i.useState(o.EMPTY_STRING),[E,P]=i.useState(o.EMPTY_STRING);if(!F)return null;const _=(n,b)=>{n.preventDefault(),l&&A(l,E,b)};return t.jsxs("form",{className:e.FIND_REPLACE_CLASS,"aria-label":c,onSubmit:n=>_(n,!1),children:[t.jsx("p",{className:e.FIND_REPLACE_TITLE_CLASS,children:c}),t.jsx(u.Field,{className:e.FIND_REPLACE_FIELD_CLASS,label:D,value:l,onChange:S,autoFocus:s===r.FIND_REPLACE_FOCUS_FIND}),t.jsx(u.Field,{className:e.FIND_REPLACE_FIELD_CLASS,label:N,value:E,onChange:P,autoFocus:s===r.FIND_REPLACE_FOCUS_REPLACE}),t.jsxs("div",{className:e.FIND_REPLACE_ACTIONS_CLASS,children:[t.jsx(a.Button,{type:"button",onClick:C,children:I}),t.jsx(a.Button,{type:"submit",disabled:!l,children:R}),t.jsx(a.Button,{type:"button",active:!0,disabled:!l,onClick:n=>_(n,!0),children:d})]})]},s)};exports.FindReplace=p;
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as L } from "react";
|
|
3
3
|
import { EMPTY_STRING as n } from "../../../../constants/generals.const.js";
|
|
4
4
|
import { FIND_REPLACE_FOCUS_FIND as s, FIND_REPLACE_FOCUS_REPLACE as P } from "../../../../constants/findReplaceMenu.const.js";
|
|
5
5
|
import "../../../../constants/openai.const.js";
|
|
6
6
|
import "../../../../utils/paste.utils.js";
|
|
7
|
-
import
|
|
7
|
+
import "../../../../utils/exportDocument.utils.js";
|
|
8
|
+
import { Button as r } from "../../../../common-components/Button/Button.js";
|
|
8
9
|
import { Field as c } from "../../../../common-components/Field/Field.js";
|
|
9
10
|
import "react-dom";
|
|
10
11
|
import { FIND_REPLACE_DEFAULT_FIND as S, FIND_REPLACE_DEFAULT_REPLACE as T, FIND_REPLACE_DEFAULT_ONE as h, FIND_REPLACE_DEFAULT_ALL as U, FIND_REPLACE_DEFAULT_CLOSE as O, FIND_REPLACE_DEFAULT_TITLE as v, FIND_REPLACE_CLASS as x, FIND_REPLACE_TITLE_CLASS as y, FIND_REPLACE_FIELD_CLASS as F, FIND_REPLACE_ACTIONS_CLASS as g } from "./FindReplace.const.js";
|
|
11
|
-
const
|
|
12
|
+
const K = (m) => {
|
|
12
13
|
const {
|
|
13
|
-
open:
|
|
14
|
-
onClose:
|
|
14
|
+
open: A,
|
|
15
|
+
onClose: C,
|
|
15
16
|
onReplace: p,
|
|
16
17
|
findLabel: D = S,
|
|
17
18
|
replaceLabel: N = T,
|
|
18
19
|
replaceOneLabel: u = h,
|
|
19
20
|
replaceAllLabel: I = U,
|
|
20
21
|
closeLabel: R = O,
|
|
21
|
-
title:
|
|
22
|
+
title: E = v,
|
|
22
23
|
focusField: o = s
|
|
23
|
-
} =
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
t.preventDefault(), l && p(l,
|
|
24
|
+
} = m, [l, d] = L(n), [a, b] = L(n);
|
|
25
|
+
if (!A) return null;
|
|
26
|
+
const i = (t, f) => {
|
|
27
|
+
t.preventDefault(), l && p(l, a, f);
|
|
27
28
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ _(
|
|
29
30
|
"form",
|
|
30
31
|
{
|
|
31
32
|
className: x,
|
|
32
|
-
"aria-label":
|
|
33
|
-
onSubmit: (t) =>
|
|
33
|
+
"aria-label": E,
|
|
34
|
+
onSubmit: (t) => i(t, !1),
|
|
34
35
|
children: [
|
|
35
|
-
/* @__PURE__ */ e("p", { className: y, children:
|
|
36
|
+
/* @__PURE__ */ e("p", { className: y, children: E }),
|
|
36
37
|
/* @__PURE__ */ e(
|
|
37
38
|
c,
|
|
38
39
|
{
|
|
@@ -48,15 +49,15 @@ const J = (A) => {
|
|
|
48
49
|
{
|
|
49
50
|
className: F,
|
|
50
51
|
label: N,
|
|
51
|
-
value:
|
|
52
|
+
value: a,
|
|
52
53
|
onChange: b,
|
|
53
54
|
autoFocus: o === P
|
|
54
55
|
}
|
|
55
56
|
),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */ e(
|
|
58
|
-
/* @__PURE__ */ e(
|
|
59
|
-
/* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ _("div", { className: g, children: [
|
|
58
|
+
/* @__PURE__ */ e(r, { type: "button", onClick: C, children: R }),
|
|
59
|
+
/* @__PURE__ */ e(r, { type: "submit", disabled: !l, children: u }),
|
|
60
|
+
/* @__PURE__ */ e(r, { type: "button", active: !0, disabled: !l, onClick: (t) => i(t, !0), children: I })
|
|
60
61
|
] })
|
|
61
62
|
]
|
|
62
63
|
},
|
|
@@ -64,5 +65,5 @@ const J = (A) => {
|
|
|
64
65
|
);
|
|
65
66
|
};
|
|
66
67
|
export {
|
|
67
|
-
|
|
68
|
+
K as FindReplace
|
|
68
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),N=require("@forgedevstack/bear"),s=require("../../../../constants/numbers.cjs"),l=require("../../../../constants/generals.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("react-dom");const O=require("../../../../plugins/graph/graph.const.cjs"),C=()=>({label:"•",value:s.NUMBER_ONE}),G=j=>{const{open:p,mode:E,points:d,colors:n,onClose:R,onApply:P}=j,[m,_]=h.useState(d),[v,M]=h.useState(n.length>s.NUMBER_ZERO?n:[...O.GRAPH_COLORS]);h.useEffect(()=>{p&&(_(d),M(n.length>s.NUMBER_ZERO?n:[...O.GRAPH_COLORS]))},[p,d,n]);const b=E==="colors"?l.INK_GRAPH_COLORS_TITLE:l.INK_GRAPH_VALUES_TITLE;return e.jsx(N.Modal,{isOpen:p,onClose:R,title:b,size:"md",footer:e.jsxs(e.Fragment,{children:[e.jsx(N.Button,{variant:"outline",onClick:R,children:l.INK_GRAPH_CANCEL}),e.jsx(N.Button,{variant:"primary",onClick:()=>P(m,v),children:l.INK_GRAPH_APPLY})]}),children:E==="values"?e.jsxs("div",{className:"Ink-GraphModal",children:[m.map((r,a)=>e.jsxs("div",{className:"Ink-GraphModal__row",children:[e.jsx("input",{value:r.label,"aria-label":`Label ${a+s.NUMBER_ONE}`,onChange:o=>{const i=o.target.value;_(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),N=require("@forgedevstack/bear"),s=require("../../../../constants/numbers.cjs"),l=require("../../../../constants/generals.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");require("react-dom");const O=require("../../../../plugins/graph/graph.const.cjs"),C=()=>({label:"•",value:s.NUMBER_ONE}),G=j=>{const{open:p,mode:E,points:d,colors:n,onClose:R,onApply:P}=j,[m,_]=h.useState(d),[v,M]=h.useState(n.length>s.NUMBER_ZERO?n:[...O.GRAPH_COLORS]);h.useEffect(()=>{p&&(_(d),M(n.length>s.NUMBER_ZERO?n:[...O.GRAPH_COLORS]))},[p,d,n]);const b=E==="colors"?l.INK_GRAPH_COLORS_TITLE:l.INK_GRAPH_VALUES_TITLE;return e.jsx(N.Modal,{isOpen:p,onClose:R,title:b,size:"md",footer:e.jsxs(e.Fragment,{children:[e.jsx(N.Button,{variant:"outline",onClick:R,children:l.INK_GRAPH_CANCEL}),e.jsx(N.Button,{variant:"primary",onClick:()=>P(m,v),children:l.INK_GRAPH_APPLY})]}),children:E==="values"?e.jsxs("div",{className:"Ink-GraphModal",children:[m.map((r,a)=>e.jsxs("div",{className:"Ink-GraphModal__row",children:[e.jsx("input",{value:r.label,"aria-label":`Label ${a+s.NUMBER_ONE}`,onChange:o=>{const i=o.target.value;_(u=>u.map((t,c)=>c===a?{...t,label:i}:t))}}),e.jsx("input",{type:"number",value:r.value,"aria-label":`Value ${a+s.NUMBER_ONE}`,onChange:o=>{const i=Number(o.target.value)||s.NUMBER_ZERO;_(u=>u.map((t,c)=>c===a?{...t,value:i}:t))}})]},`${r.label}-${a}`)),e.jsx(N.Button,{variant:"outline",size:"sm",onClick:()=>_(r=>[...r,C()]),children:l.INK_GRAPH_ADD_POINT})]}):e.jsx("div",{className:"Ink-GraphModal",children:v.map((r,a)=>e.jsxs("label",{className:"Ink-GraphModal__row",children:[e.jsx("span",{children:a+s.NUMBER_ONE}),e.jsx("input",{type:"color",value:r,onChange:o=>{const i=o.target.value||l.EMPTY_STRING;M(u=>u.map((t,c)=>c===a?i:t))}})]},`${r}-${a}`))})})};exports.GraphEditModal=G;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
1
|
+
import { jsx as l, jsxs as m, Fragment as E } from "react/jsx-runtime";
|
|
2
2
|
import { useState as P, useEffect as b } from "react";
|
|
3
3
|
import { Modal as g, Button as h } from "@forgedevstack/bear";
|
|
4
|
-
import { NUMBER_ZERO as d, NUMBER_ONE as
|
|
4
|
+
import { NUMBER_ZERO as d, NUMBER_ONE as c } from "../../../../constants/numbers.js";
|
|
5
5
|
import { INK_GRAPH_COLORS_TITLE as M, INK_GRAPH_VALUES_TITLE as L, INK_GRAPH_ADD_POINT as O, EMPTY_STRING as k, INK_GRAPH_CANCEL as T, INK_GRAPH_APPLY as H } from "../../../../constants/generals.const.js";
|
|
6
6
|
import "../../../../constants/openai.const.js";
|
|
7
7
|
import "../../../../utils/paste.utils.js";
|
|
8
|
+
import "../../../../utils/exportDocument.utils.js";
|
|
8
9
|
import "react-dom";
|
|
9
10
|
import { GRAPH_COLORS as G } from "../../../../plugins/graph/graph.const.js";
|
|
10
|
-
const $ = () => ({ label: "•", value:
|
|
11
|
+
const $ = () => ({ label: "•", value: c }), F = (R) => {
|
|
11
12
|
const { open: u, mode: v, points: _, colors: r, onClose: N, onApply: A } = R, [f, p] = P(_), [C, I] = P(
|
|
12
13
|
r.length > d ? r : [...G]
|
|
13
14
|
);
|
|
@@ -20,22 +21,22 @@ const $ = () => ({ label: "•", value: m }), Y = (R) => {
|
|
|
20
21
|
onClose: N,
|
|
21
22
|
title: v === "colors" ? M : L,
|
|
22
23
|
size: "md",
|
|
23
|
-
footer: /* @__PURE__ */
|
|
24
|
+
footer: /* @__PURE__ */ m(E, { children: [
|
|
24
25
|
/* @__PURE__ */ l(h, { variant: "outline", onClick: N, children: T }),
|
|
25
26
|
/* @__PURE__ */ l(h, { variant: "primary", onClick: () => A(f, C), children: H })
|
|
26
27
|
] }),
|
|
27
|
-
children: v === "values" ? /* @__PURE__ */
|
|
28
|
-
f.map((e, a) => /* @__PURE__ */
|
|
28
|
+
children: v === "values" ? /* @__PURE__ */ m("div", { className: "Ink-GraphModal", children: [
|
|
29
|
+
f.map((e, a) => /* @__PURE__ */ m("div", { className: "Ink-GraphModal__row", children: [
|
|
29
30
|
/* @__PURE__ */ l(
|
|
30
31
|
"input",
|
|
31
32
|
{
|
|
32
33
|
value: e.label,
|
|
33
|
-
"aria-label": `Label ${a +
|
|
34
|
+
"aria-label": `Label ${a + c}`,
|
|
34
35
|
onChange: (t) => {
|
|
35
36
|
const n = t.target.value;
|
|
36
37
|
p(
|
|
37
|
-
(
|
|
38
|
-
(o,
|
|
38
|
+
(i) => i.map(
|
|
39
|
+
(o, s) => s === a ? { ...o, label: n } : o
|
|
39
40
|
)
|
|
40
41
|
);
|
|
41
42
|
}
|
|
@@ -46,12 +47,12 @@ const $ = () => ({ label: "•", value: m }), Y = (R) => {
|
|
|
46
47
|
{
|
|
47
48
|
type: "number",
|
|
48
49
|
value: e.value,
|
|
49
|
-
"aria-label": `Value ${a +
|
|
50
|
+
"aria-label": `Value ${a + c}`,
|
|
50
51
|
onChange: (t) => {
|
|
51
52
|
const n = Number(t.target.value) || d;
|
|
52
53
|
p(
|
|
53
|
-
(
|
|
54
|
-
(o,
|
|
54
|
+
(i) => i.map(
|
|
55
|
+
(o, s) => s === a ? { ...o, value: n } : o
|
|
55
56
|
)
|
|
56
57
|
);
|
|
57
58
|
}
|
|
@@ -67,8 +68,8 @@ const $ = () => ({ label: "•", value: m }), Y = (R) => {
|
|
|
67
68
|
children: O
|
|
68
69
|
}
|
|
69
70
|
)
|
|
70
|
-
] }) : /* @__PURE__ */ l("div", { className: "Ink-GraphModal", children: C.map((e, a) => /* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */ l("span", { children: a +
|
|
71
|
+
] }) : /* @__PURE__ */ l("div", { className: "Ink-GraphModal", children: C.map((e, a) => /* @__PURE__ */ m("label", { className: "Ink-GraphModal__row", children: [
|
|
72
|
+
/* @__PURE__ */ l("span", { children: a + c }),
|
|
72
73
|
/* @__PURE__ */ l(
|
|
73
74
|
"input",
|
|
74
75
|
{
|
|
@@ -77,7 +78,7 @@ const $ = () => ({ label: "•", value: m }), Y = (R) => {
|
|
|
77
78
|
onChange: (t) => {
|
|
78
79
|
const n = t.target.value || k;
|
|
79
80
|
I(
|
|
80
|
-
(
|
|
81
|
+
(i) => i.map((o, s) => s === a ? n : o)
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -87,5 +88,5 @@ const $ = () => ({ label: "•", value: m }), Y = (R) => {
|
|
|
87
88
|
);
|
|
88
89
|
};
|
|
89
90
|
export {
|
|
90
|
-
|
|
91
|
+
F as GraphEditModal
|
|
91
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),K=require("react-dom"),A=require("../../../../constants/numbers.cjs"),a=require("../../../../constants/generals.const.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),K=require("react-dom"),A=require("../../../../constants/numbers.cjs"),a=require("../../../../constants/generals.const.cjs"),q=require("../../../../constants/colorMode.const.cjs"),D=require("../../../../constants/keyboard.const.cjs"),o=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");const s=require("../../../../plugins/graph/graph.const.cjs"),p=require("../../../../plugins/graph/graph.utils.cjs"),M=require("../ToolbarDropdown/ToolbarDropdown.utils.cjs"),h=require("../ToolbarButton/ToolbarButton.cjs"),g=N=>{const{icon:v,disabled:d=!1,hint:I,onHint:T,pluginColor:b,onInsert:w}=N,[c,i]=n.useState(!1),[l,G]=n.useState(s.GRAPH_KIND_DEFAULT),[_,H]=n.useState({top:A.NUMBER_ZERO,left:A.NUMBER_ZERO}),E=n.useRef(null),L=n.useRef(null),S=n.useRef(null);return n.useEffect(()=>{if(!c)return;const e=()=>{const r=M.getToolbarDropdownMenuPosition(L.current);H({top:r.top,left:r.left})};e();const u=r=>{var m,P;const R=r.target;(m=E.current)!=null&&m.contains(R)||(P=S.current)!=null&&P.contains(R)||i(!1)},f=r=>{r.key===D.KEY_ESCAPE&&i(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",f),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",f),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[c]),t.jsxs("div",{className:o.INK_CLASS_STYLE_DD,ref:E,children:[t.jsx("div",{ref:L,children:t.jsx(h.ToolbarButton,{icon:v,title:a.INK_GRAPH_TITLE,hint:I,onHint:T,pluginColor:b,disabled:d,onClick:()=>{d||i(e=>!e)}})}),c?K.createPortal(t.jsxs("div",{ref:S,className:`${o.INK_CLASS_STYLE_MENU} ${o.INK_CLASS_STYLE_MENU_PORTAL} ${o.INK_CLASS_STYLE_MENU_FORCED} ${o.INK_CLASS_GRAPH_PANEL}`,"data-color-mode":q.COLOR_MODE_LIGHT,role:"dialog","aria-label":a.INK_GRAPH_TITLE,style:{top:_.top,left:_.left},children:[t.jsx("div",{className:o.INK_CLASS_GRAPH_TYPES,children:s.GRAPH_KINDS.map(e=>t.jsx("button",{type:"button","aria-pressed":e===l,onMouseDown:u=>{u.preventDefault(),G(e)},children:s.GRAPH_KIND_LABELS[e]},e))}),t.jsx("div",{className:o.INK_CLASS_GRAPH_PREVIEW,dangerouslySetInnerHTML:{__html:p.buildGraphHtml(l,s.GRAPH_SAMPLE)}}),t.jsx("button",{type:"button",onMouseDown:e=>{e.preventDefault(),w(p.buildGraphHtml(l,s.GRAPH_SAMPLE)),i(!1)},children:a.INK_GRAPH_INSERT})]}),document.body):null]})};exports.GraphPicker=g;
|
|
@@ -8,11 +8,12 @@ import { KEY_ESCAPE as y } from "../../../../constants/keyboard.const.js";
|
|
|
8
8
|
import { INK_CLASS_STYLE_DD as g, INK_CLASS_STYLE_MENU as O, INK_CLASS_STYLE_MENU_PORTAL as k, INK_CLASS_STYLE_MENU_FORCED as Y, INK_CLASS_GRAPH_PANEL as U, INK_CLASS_GRAPH_TYPES as $, INK_CLASS_GRAPH_PREVIEW as B } from "../../../../constants/defaults.const.js";
|
|
9
9
|
import "../../../../constants/openai.const.js";
|
|
10
10
|
import "../../../../utils/paste.utils.js";
|
|
11
|
+
import "../../../../utils/exportDocument.utils.js";
|
|
11
12
|
import { GRAPH_KIND_DEFAULT as j, GRAPH_KINDS as z, GRAPH_KIND_LABELS as F, GRAPH_SAMPLE as P } from "../../../../plugins/graph/graph.const.js";
|
|
12
13
|
import { buildGraphHtml as v } from "../../../../plugins/graph/graph.utils.js";
|
|
13
14
|
import { getToolbarDropdownMenuPosition as x } from "../ToolbarDropdown/ToolbarDropdown.utils.js";
|
|
14
15
|
import { ToolbarButton as V } from "../ToolbarButton/ToolbarButton.js";
|
|
15
|
-
const
|
|
16
|
+
const de = (R) => {
|
|
16
17
|
const { icon: I, disabled: d = !1, hint: w, onHint: K, pluginColor: T, onInsert: D } = R, [i, n] = l(!1), [s, H] = l(j), [a, C] = l({ top: A, left: A }), c = m(null), u = m(null), _ = m(null);
|
|
17
18
|
return G(() => {
|
|
18
19
|
if (!i) return;
|
|
@@ -94,5 +95,5 @@ const me = (R) => {
|
|
|
94
95
|
] });
|
|
95
96
|
};
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
de as GraphPicker
|
|
98
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),i=require("../../../../constants/generals.const.cjs"),o=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");require("react");require("react-dom");const c=e=>{const{value:r,onChange:t,disabled:a=!1,minHeight:n}=e,l=s=>{t(s.target.value)};return u.jsx("textarea",{className:o.INK_CLASS_SOURCE,"aria-label":i.INK_HTML_SOURCE_TITLE,value:r,disabled:a,spellCheck:!1,style:{minHeight:n},onChange:l})};exports.HtmlSourcePanel=c;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { INK_HTML_SOURCE_TITLE as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { INK_HTML_SOURCE_TITLE as n } from "../../../../constants/generals.const.js";
|
|
3
3
|
import { INK_CLASS_SOURCE as i } from "../../../../constants/defaults.const.js";
|
|
4
4
|
import "../../../../constants/openai.const.js";
|
|
5
5
|
import "../../../../utils/paste.utils.js";
|
|
6
|
+
import "../../../../utils/exportDocument.utils.js";
|
|
6
7
|
import "react";
|
|
7
8
|
import "react-dom";
|
|
8
|
-
const
|
|
9
|
+
const d = (e) => {
|
|
9
10
|
const { value: a, onChange: t, disabled: o = !1, minHeight: r } = e;
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ m(
|
|
11
12
|
"textarea",
|
|
12
13
|
{
|
|
13
14
|
className: i,
|
|
14
|
-
"aria-label":
|
|
15
|
+
"aria-label": n,
|
|
15
16
|
value: a,
|
|
16
17
|
disabled: o,
|
|
17
18
|
spellCheck: !1,
|
|
@@ -23,5 +24,5 @@ const _ = (e) => {
|
|
|
23
24
|
);
|
|
24
25
|
};
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
+
d as HtmlSourcePanel
|
|
27
28
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../../../utils/image.utils.cjs"),c=u=>{var i,r;const{image:a,onChange:l,onClose:s}=u,o=n=>{t.setImageAlign(a,n),l()};return e.jsxs("div",{className:"Ink-ImageFrame",role:"toolbar","aria-label":"Image",children:[e.jsxs("label",{children:["Width",e.jsx("input",{type:"range",min:t.IMAGE_WIDTH_MIN,max:t.IMAGE_WIDTH_MAX,defaultValue:a.clientWidth||t.IMAGE_WIDTH_DEFAULT,onChange:n=>{t.setImageWidth(a,Number(n.target.value)),l()}})]}),e.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:()=>o(t.IMAGE_ALIGN_LEFT),children:"Left"}),e.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:()=>o(t.IMAGE_ALIGN_CENTER),children:"Center"}),e.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:()=>o(t.IMAGE_ALIGN_RIGHT),children:"Right"}),e.jsx("input",{"aria-label":"Alt text",defaultValue:a.alt,placeholder:"Alt text",onBlur:n=>{t.setImageAlt(a,n.target.value),l()}}),e.jsx("input",{"aria-label":"Caption",defaultValue:((r=(i=a.parentElement)==null?void 0:i.querySelector("figcaption"))==null?void 0:r.textContent)??"",placeholder:"Caption",onBlur:n=>{t.setImageCaption(a,n.target.value),l()}}),e.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:s,children:"Done"})]})};exports.ImageFrame=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageFrame.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/ImageFrame/ImageFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAqD1C,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { IMAGE_WIDTH_DEFAULT as c, IMAGE_WIDTH_MAX as m, IMAGE_WIDTH_MIN as s, setImageWidth as p, setImageAlt as _, setImageCaption as d, setImageAlign as b, IMAGE_ALIGN_LEFT as g, IMAGE_ALIGN_CENTER as A, IMAGE_ALIGN_RIGHT as E } from "../../../../utils/image.utils.js";
|
|
3
|
+
const N = (u) => {
|
|
4
|
+
var o, i;
|
|
5
|
+
const { image: t, onChange: n, onClose: I } = u, l = (e) => {
|
|
6
|
+
b(t, e), n();
|
|
7
|
+
};
|
|
8
|
+
return /* @__PURE__ */ r("div", { className: "Ink-ImageFrame", role: "toolbar", "aria-label": "Image", children: [
|
|
9
|
+
/* @__PURE__ */ r("label", { children: [
|
|
10
|
+
"Width",
|
|
11
|
+
/* @__PURE__ */ a(
|
|
12
|
+
"input",
|
|
13
|
+
{
|
|
14
|
+
type: "range",
|
|
15
|
+
min: s,
|
|
16
|
+
max: m,
|
|
17
|
+
defaultValue: t.clientWidth || c,
|
|
18
|
+
onChange: (e) => {
|
|
19
|
+
p(t, Number(e.target.value)), n();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ a("button", { type: "button", className: "Ink-Editor__button", onClick: () => l(g), children: "Left" }),
|
|
25
|
+
/* @__PURE__ */ a("button", { type: "button", className: "Ink-Editor__button", onClick: () => l(A), children: "Center" }),
|
|
26
|
+
/* @__PURE__ */ a("button", { type: "button", className: "Ink-Editor__button", onClick: () => l(E), children: "Right" }),
|
|
27
|
+
/* @__PURE__ */ a(
|
|
28
|
+
"input",
|
|
29
|
+
{
|
|
30
|
+
"aria-label": "Alt text",
|
|
31
|
+
defaultValue: t.alt,
|
|
32
|
+
placeholder: "Alt text",
|
|
33
|
+
onBlur: (e) => {
|
|
34
|
+
_(t, e.target.value), n();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ a(
|
|
39
|
+
"input",
|
|
40
|
+
{
|
|
41
|
+
"aria-label": "Caption",
|
|
42
|
+
defaultValue: ((i = (o = t.parentElement) == null ? void 0 : o.querySelector("figcaption")) == null ? void 0 : i.textContent) ?? "",
|
|
43
|
+
placeholder: "Caption",
|
|
44
|
+
onBlur: (e) => {
|
|
45
|
+
d(t, e.target.value), n();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ a("button", { type: "button", className: "Ink-Editor__button", onClick: I, children: "Done" })
|
|
50
|
+
] });
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
N as ImageFrame
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/ImageFrame/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),a=require("react");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");const E=require("../../../../common-components/Button/Button.cjs");require("react-dom");const I=require("./InlineToolbar.const.cjs"),d=R=>{const{open:A,top:B,left:C,icons:e,activeFormats:L,disabled:O=!1,onFormat:u,onLink:c,onClose:o}=R,r=a.useRef(null);if(a.useEffect(()=>{if(!A)return;const N=l=>{var t;const i=l.target;if(!(i instanceof Node)){o();return}(t=r.current)!=null&&t.contains(i)||o()},s=l=>{l.key===I.INLINE_TOOLBAR_KEY_ESCAPE&&o()};return window.addEventListener(I.INLINE_TOOLBAR_EVENT_POINTER_DOWN,N),window.addEventListener(I.INLINE_TOOLBAR_EVENT_KEY_DOWN,s),()=>{window.removeEventListener(I.INLINE_TOOLBAR_EVENT_POINTER_DOWN,N),window.removeEventListener(I.INLINE_TOOLBAR_EVENT_KEY_DOWN,s)}},[A,o]),!A)return null;const n=N=>{N.preventDefault()},T=N=>{u(N)};return _.jsxs("div",{ref:r,className:I.INLINE_TOOLBAR_CLASS,role:I.INLINE_TOOLBAR_ROLE,"aria-label":I.INLINE_TOOLBAR_ARIA_LABEL,style:{top:B,left:C},onPointerDown:N=>N.stopPropagation(),children:[_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_BOLD,"aria-label":I.INLINE_TOOLBAR_TITLE_BOLD,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_BOLD),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_BOLD),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_BOLD),children:e.bold}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_ITALIC,"aria-label":I.INLINE_TOOLBAR_TITLE_ITALIC,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_ITALIC),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_ITALIC),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_ITALIC),children:e.italic}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_UNDERLINE,"aria-label":I.INLINE_TOOLBAR_TITLE_UNDERLINE,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_UNDERLINE),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_UNDERLINE),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_UNDERLINE),children:e.underline}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_CODE,"aria-label":I.INLINE_TOOLBAR_TITLE_CODE,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_CODE),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_CODE),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_CODE),children:e.code}),_.jsx("span",{className:I.INLINE_TOOLBAR_DIVIDER_CLASS,"aria-hidden":"true"}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_LINK,"aria-label":I.INLINE_TOOLBAR_TITLE_LINK,disabled:O,"data-action":I.INLINE_TOOLBAR_LINK_ID,onMouseDown:n,onClick:c,children:e.link}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_CLEAR,"aria-label":I.INLINE_TOOLBAR_TITLE_CLEAR,disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_CLEAR),children:e.clearFormat})]})};exports.InlineToolbar=d;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),a=require("react");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");const E=require("../../../../common-components/Button/Button.cjs");require("react-dom");const I=require("./InlineToolbar.const.cjs"),d=R=>{const{open:A,top:B,left:C,icons:e,activeFormats:L,disabled:O=!1,onFormat:u,onLink:c,onClose:o}=R,r=a.useRef(null);if(a.useEffect(()=>{if(!A)return;const N=l=>{var t;const i=l.target;if(!(i instanceof Node)){o();return}(t=r.current)!=null&&t.contains(i)||o()},s=l=>{l.key===I.INLINE_TOOLBAR_KEY_ESCAPE&&o()};return window.addEventListener(I.INLINE_TOOLBAR_EVENT_POINTER_DOWN,N),window.addEventListener(I.INLINE_TOOLBAR_EVENT_KEY_DOWN,s),()=>{window.removeEventListener(I.INLINE_TOOLBAR_EVENT_POINTER_DOWN,N),window.removeEventListener(I.INLINE_TOOLBAR_EVENT_KEY_DOWN,s)}},[A,o]),!A)return null;const n=N=>{N.preventDefault()},T=N=>{u(N)};return _.jsxs("div",{ref:r,className:I.INLINE_TOOLBAR_CLASS,role:I.INLINE_TOOLBAR_ROLE,"aria-label":I.INLINE_TOOLBAR_ARIA_LABEL,style:{top:B,left:C},onPointerDown:N=>N.stopPropagation(),children:[_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_BOLD,"aria-label":I.INLINE_TOOLBAR_TITLE_BOLD,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_BOLD),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_BOLD),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_BOLD),children:e.bold}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_ITALIC,"aria-label":I.INLINE_TOOLBAR_TITLE_ITALIC,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_ITALIC),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_ITALIC),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_ITALIC),children:e.italic}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_UNDERLINE,"aria-label":I.INLINE_TOOLBAR_TITLE_UNDERLINE,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_UNDERLINE),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_UNDERLINE),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_UNDERLINE),children:e.underline}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_CODE,"aria-label":I.INLINE_TOOLBAR_TITLE_CODE,"aria-pressed":L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_CODE),active:L==null?void 0:L.has(I.INLINE_TOOLBAR_ACTION_CODE),disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_CODE),children:e.code}),_.jsx("span",{className:I.INLINE_TOOLBAR_DIVIDER_CLASS,"aria-hidden":"true"}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_LINK,"aria-label":I.INLINE_TOOLBAR_TITLE_LINK,disabled:O,"data-action":I.INLINE_TOOLBAR_LINK_ID,onMouseDown:n,onClick:c,children:e.link}),_.jsx(E.Button,{className:I.INLINE_TOOLBAR_ITEM_CLASS,title:I.INLINE_TOOLBAR_TITLE_CLEAR,"aria-label":I.INLINE_TOOLBAR_TITLE_CLEAR,disabled:O,onMouseDown:n,onClick:()=>T(I.INLINE_TOOLBAR_ACTION_CLEAR),children:e.clearFormat})]})};exports.InlineToolbar=d;
|
|
@@ -2,14 +2,15 @@ import { jsxs as K, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as P, useEffect as g } from "react";
|
|
3
3
|
import "../../../../constants/openai.const.js";
|
|
4
4
|
import "../../../../utils/paste.utils.js";
|
|
5
|
+
import "../../../../utils/exportDocument.utils.js";
|
|
5
6
|
import { Button as l } from "../../../../common-components/Button/Button.js";
|
|
6
7
|
import "react-dom";
|
|
7
|
-
import { INLINE_TOOLBAR_EVENT_POINTER_DOWN as B, INLINE_TOOLBAR_EVENT_KEY_DOWN as u, INLINE_TOOLBAR_ARIA_LABEL as x, INLINE_TOOLBAR_ROLE as y, INLINE_TOOLBAR_CLASS as V, INLINE_TOOLBAR_TITLE_BOLD as C, INLINE_TOOLBAR_ITEM_CLASS as _, INLINE_TOOLBAR_ACTION_BOLD as E, INLINE_TOOLBAR_TITLE_ITALIC as
|
|
8
|
-
const
|
|
8
|
+
import { INLINE_TOOLBAR_EVENT_POINTER_DOWN as B, INLINE_TOOLBAR_EVENT_KEY_DOWN as u, INLINE_TOOLBAR_ARIA_LABEL as x, INLINE_TOOLBAR_ROLE as y, INLINE_TOOLBAR_CLASS as V, INLINE_TOOLBAR_TITLE_BOLD as C, INLINE_TOOLBAR_ITEM_CLASS as _, INLINE_TOOLBAR_ACTION_BOLD as E, INLINE_TOOLBAR_TITLE_ITALIC as p, INLINE_TOOLBAR_ACTION_ITALIC as s, INLINE_TOOLBAR_TITLE_UNDERLINE as D, INLINE_TOOLBAR_ACTION_UNDERLINE as t, INLINE_TOOLBAR_TITLE_CODE as f, INLINE_TOOLBAR_ACTION_CODE as T, INLINE_TOOLBAR_DIVIDER_CLASS as j, INLINE_TOOLBAR_LINK_ID as U, INLINE_TOOLBAR_TITLE_LINK as h, INLINE_TOOLBAR_TITLE_CLEAR as w, INLINE_TOOLBAR_KEY_ESCAPE as W, INLINE_TOOLBAR_ACTION_CLEAR as Y } from "./InlineToolbar.const.js";
|
|
9
|
+
const $ = (b) => {
|
|
9
10
|
const {
|
|
10
11
|
open: O,
|
|
11
|
-
top:
|
|
12
|
-
left:
|
|
12
|
+
top: m,
|
|
13
|
+
left: k,
|
|
13
14
|
icons: L,
|
|
14
15
|
activeFormats: e,
|
|
15
16
|
disabled: I = !1,
|
|
@@ -46,7 +47,7 @@ const Z = (b) => {
|
|
|
46
47
|
className: V,
|
|
47
48
|
role: y,
|
|
48
49
|
"aria-label": x,
|
|
49
|
-
style: { top:
|
|
50
|
+
style: { top: m, left: k },
|
|
50
51
|
onPointerDown: (n) => n.stopPropagation(),
|
|
51
52
|
children: [
|
|
52
53
|
/* @__PURE__ */ o(
|
|
@@ -67,8 +68,8 @@ const Z = (b) => {
|
|
|
67
68
|
l,
|
|
68
69
|
{
|
|
69
70
|
className: _,
|
|
70
|
-
title:
|
|
71
|
-
"aria-label":
|
|
71
|
+
title: p,
|
|
72
|
+
"aria-label": p,
|
|
72
73
|
"aria-pressed": e == null ? void 0 : e.has(s),
|
|
73
74
|
active: e == null ? void 0 : e.has(s),
|
|
74
75
|
disabled: I,
|
|
@@ -81,8 +82,8 @@ const Z = (b) => {
|
|
|
81
82
|
l,
|
|
82
83
|
{
|
|
83
84
|
className: _,
|
|
84
|
-
title:
|
|
85
|
-
"aria-label":
|
|
85
|
+
title: D,
|
|
86
|
+
"aria-label": D,
|
|
86
87
|
"aria-pressed": e == null ? void 0 : e.has(t),
|
|
87
88
|
active: e == null ? void 0 : e.has(t),
|
|
88
89
|
disabled: I,
|
|
@@ -136,5 +137,5 @@ const Z = (b) => {
|
|
|
136
137
|
);
|
|
137
138
|
};
|
|
138
139
|
export {
|
|
139
|
-
|
|
140
|
+
$ as InlineToolbar
|
|
140
141
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=o=>{const{open:l,top:i,left:s,people:n,onSelect:u}=o;return!l||n.length===0?null:t.jsx("div",{className:"Ink-Mentions",style:{top:i,left:s},role:"listbox","aria-label":"Mention someone",children:n.map(e=>t.jsxs("button",{type:"button",className:"Ink-Mentions__item",onMouseDown:r=>r.preventDefault(),onClick:()=>u(e),children:["@",e.label]},e.id))})};exports.MentionMenu=a;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface MentionMenuProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
people: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
onSelect: (person: {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const MentionMenu: FC<MentionMenuProps>;
|
|
16
|
+
//# sourceMappingURL=MentionMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MentionMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/MentionMenu/MentionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC3D;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAkB5C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
const m = (t) => {
|
|
3
|
+
const { open: o, top: l, left: i, people: n, onSelect: s } = t;
|
|
4
|
+
return !o || n.length === 0 ? null : /* @__PURE__ */ r("div", { className: "Ink-Mentions", style: { top: l, left: i }, role: "listbox", "aria-label": "Mention someone", children: n.map((e) => /* @__PURE__ */ c(
|
|
5
|
+
"button",
|
|
6
|
+
{
|
|
7
|
+
type: "button",
|
|
8
|
+
className: "Ink-Mentions__item",
|
|
9
|
+
onMouseDown: (a) => a.preventDefault(),
|
|
10
|
+
onClick: () => s(e),
|
|
11
|
+
children: [
|
|
12
|
+
"@",
|
|
13
|
+
e.label
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
e.id
|
|
17
|
+
)) });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
m as MentionMenu
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/MentionMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),N=require("../../../../constants/numbers.cjs"),e=require("../../../../constants/defaults.const.cjs");require("../../../../constants/openai.const.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");require("react");require("react-dom");const L=r=>{const{items:_,activeIndex:t,onSelect:I,onHide:l}=r;return s.jsxs("aside",{className:e.INK_CLASS_OUTLINE,"aria-label":e.INK_OUTLINE_LABEL,children:[s.jsxs("div",{className:e.INK_CLASS_OUTLINE_LABEL,children:[e.INK_OUTLINE_LABEL,l?s.jsx("button",{type:"button",className:e.INK_CLASS_OUTLINE_TOGGLE,onClick:l,children:e.INK_OUTLINE_HIDE}):null]}),_.length===N.NUMBER_ZERO?s.jsx("p",{className:e.INK_CLASS_OUTLINE_ITEM,children:e.INK_OUTLINE_EMPTY}):null,_.map(n=>{const i=n.index===t;return s.jsxs("button",{type:"button",className:`${e.INK_CLASS_OUTLINE_ITEM} ${e.INK_CLASS_OUTLINE_ITEM}--h${n.level}${i?` ${e.INK_CLASS_OUTLINE_ITEM_ACTIVE}`:""}`,onClick:()=>I(n.index),children:[s.jsx("span",{className:`${e.INK_CLASS_OUTLINE_ITEM}-dot`,"aria-hidden":"true"}),n.text]},`${n.level}-${n.index}`)})]})};exports.OutlineRail=L;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { NUMBER_ZERO as I } from "../../../../constants/numbers.js";
|
|
3
|
-
import { INK_OUTLINE_LABEL as r, INK_CLASS_OUTLINE as c, INK_CLASS_OUTLINE_LABEL as E, INK_OUTLINE_HIDE as L, INK_CLASS_OUTLINE_TOGGLE as d, INK_OUTLINE_EMPTY as m, INK_CLASS_OUTLINE_ITEM as
|
|
3
|
+
import { INK_OUTLINE_LABEL as r, INK_CLASS_OUTLINE as c, INK_CLASS_OUTLINE_LABEL as E, INK_OUTLINE_HIDE as L, INK_CLASS_OUTLINE_TOGGLE as d, INK_OUTLINE_EMPTY as m, INK_CLASS_OUTLINE_ITEM as t, INK_CLASS_OUTLINE_ITEM_ACTIVE as p } from "../../../../constants/defaults.const.js";
|
|
4
4
|
import "../../../../constants/openai.const.js";
|
|
5
5
|
import "../../../../utils/paste.utils.js";
|
|
6
|
+
import "../../../../utils/exportDocument.utils.js";
|
|
6
7
|
import "react";
|
|
7
8
|
import "react-dom";
|
|
8
|
-
const
|
|
9
|
+
const C = (N) => {
|
|
9
10
|
const { items: i, activeIndex: a, onSelect: s, onHide: o } = N;
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ n("aside", { className: c, "aria-label": r, children: [
|
|
12
|
+
/* @__PURE__ */ n("div", { className: E, children: [
|
|
12
13
|
r,
|
|
13
14
|
o ? /* @__PURE__ */ l("button", { type: "button", className: d, onClick: o, children: L }) : null
|
|
14
15
|
] }),
|
|
15
|
-
i.length === I ? /* @__PURE__ */ l("p", { className:
|
|
16
|
+
i.length === I ? /* @__PURE__ */ l("p", { className: t, children: m }) : null,
|
|
16
17
|
i.map((e) => {
|
|
17
18
|
const _ = e.index === a;
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ n(
|
|
19
20
|
"button",
|
|
20
21
|
{
|
|
21
22
|
type: "button",
|
|
22
|
-
className: `${
|
|
23
|
+
className: `${t} ${t}--h${e.level}${_ ? ` ${p}` : ""}`,
|
|
23
24
|
onClick: () => s(e.index),
|
|
24
25
|
children: [
|
|
25
|
-
/* @__PURE__ */ l("span", { className: `${
|
|
26
|
+
/* @__PURE__ */ l("span", { className: `${t}-dot`, "aria-hidden": "true" }),
|
|
26
27
|
e.text
|
|
27
28
|
]
|
|
28
29
|
},
|
|
@@ -32,5 +33,5 @@ const x = (N) => {
|
|
|
32
33
|
] });
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
C as OutlineRail
|
|
36
37
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./PresenceStack.const.cjs"),t=require("../../../../constants/numbers.cjs"),c=require("../../../../constants/generals.const.cjs");require("../../../../constants/openai.const.cjs");const o=require("../../../../utils/cn.utils.cjs");require("../../../../utils/paste.utils.cjs");require("../../../../utils/exportDocument.utils.cjs");const S=require("../../../../utils/collab.utils.cjs"),A=require("../../../../common-components/Button/Button.cjs");require("react");require("react-dom");const E=require("../../../../constants/collab.const.cjs"),k=n=>n.avatarUrl?s.jsx("img",{src:n.avatarUrl,alt:n.name,className:"ink-presence-avatar-img"}):s.jsx("span",{className:"ink-presence-initials",children:S.getCollaboratorInitials(n.name)}),v=n=>{const{collaborators:i,maxAvatars:u=a.INK_PRESENCE_DEFAULT_MAX_AVATARS,onFollow:l,className:N=c.EMPTY_STRING}=n;if(!i||i.length===t.NUMBER_ZERO)return null;const R=i.slice(t.NUMBER_ZERO,u),r=Math.max(t.NUMBER_ZERO,i.length-u);return s.jsx("div",{className:o.cn("ink-presence-stack",N),role:"region","aria-label":a.COLLAB_ARIA_REGION,children:s.jsxs("div",{className:"ink-presence-avatars",children:[R.map(e=>{const _=e.status===E.INK_STATUS_IDLE,m=e.role||E.INK_ROLE_EDITOR,d=_?a.IDLE_LABEL_SUFFIX:c.EMPTY_STRING,I=`${e.name} (${m})${d}`;return s.jsxs(A.Button,{type:"button",className:"ink-presence-avatar-btn",style:{backgroundColor:e.color},title:I,onClick:()=>l==null?void 0:l(e),"aria-label":`${a.COLLAB_ARIA_LABEL_PREFIX}${e.name}`,children:[k(e),s.jsx("span",{className:o.cn("ink-presence-status-dot",_?"ink-presence-idle":"ink-presence-active")})]},e.id)}),r>t.NUMBER_ZERO&&s.jsxs("div",{className:"ink-presence-avatar-overflow",title:`${r} more collaborator${r>t.NUMBER_ONE?"s":c.EMPTY_STRING}`,"aria-label":`${r} more collaborator${r>t.NUMBER_ONE?"s":c.EMPTY_STRING}`,children:[a.PLUS_SIGN,r]})]})})};exports.PresenceStack=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../../../../constants/numbers.cjs"),_=A.NUMBER_FOUR,L="+",E=" - Idle",I="Active collaborators",o="Collaborator ";exports.COLLAB_ARIA_LABEL_PREFIX=o;exports.COLLAB_ARIA_REGION=I;exports.IDLE_LABEL_SUFFIX=E;exports.INK_PRESENCE_DEFAULT_MAX_AVATARS=_;exports.PLUS_SIGN=L;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const INK_PRESENCE_DEFAULT_MAX_AVATARS = 4;
|
|
2
|
+
export declare const PLUS_SIGN = "+";
|
|
3
|
+
export declare const DEFAULT_INITIAL = "?";
|
|
4
|
+
export declare const IDLE_LABEL_SUFFIX = " - Idle";
|
|
5
|
+
export declare const COLLAB_ARIA_REGION = "Active collaborators";
|
|
6
|
+
export declare const COLLAB_ARIA_LABEL_PREFIX = "Collaborator ";
|
|
7
|
+
//# sourceMappingURL=PresenceStack.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresenceStack.const.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/PresenceStack/PresenceStack.const.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gCAAgC,IAAc,CAAC;AAC5D,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,wBAAwB,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NUMBER_FOUR as o } from "../../../../constants/numbers.js";
|
|
2
|
+
const _ = o, L = "+", t = " - Idle", E = "Active collaborators", I = "Collaborator ";
|
|
3
|
+
export {
|
|
4
|
+
I as COLLAB_ARIA_LABEL_PREFIX,
|
|
5
|
+
E as COLLAB_ARIA_REGION,
|
|
6
|
+
t as IDLE_LABEL_SUFFIX,
|
|
7
|
+
_ as INK_PRESENCE_DEFAULT_MAX_AVATARS,
|
|
8
|
+
L as PLUS_SIGN
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresenceStack.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/PresenceStack/PresenceStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAoChE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8DtD,CAAC"}
|