@forgedevstack/ink 1.1.3 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -1
- package/dist/common-components/Box/Box.cjs +1 -0
- package/dist/common-components/Box/Box.const.cjs +1 -0
- package/dist/common-components/Box/Box.const.d.ts +3 -0
- package/dist/common-components/Box/Box.const.d.ts.map +1 -0
- package/dist/common-components/Box/Box.const.js +5 -0
- package/dist/common-components/Box/Box.d.ts +4 -0
- package/dist/common-components/Box/Box.d.ts.map +1 -0
- package/dist/common-components/Box/Box.js +14 -0
- package/dist/common-components/Box/Box.types.d.ts +6 -0
- package/dist/common-components/Box/Box.types.d.ts.map +1 -0
- package/dist/common-components/Box/index.d.ts +3 -0
- package/dist/common-components/Box/index.d.ts.map +1 -0
- package/dist/common-components/Button/Button.cjs +1 -0
- package/dist/common-components/Button/Button.const.cjs +1 -0
- package/dist/common-components/Button/Button.const.d.ts +5 -0
- package/dist/common-components/Button/Button.const.d.ts.map +1 -0
- package/dist/common-components/Button/Button.const.js +7 -0
- package/dist/common-components/Button/Button.d.ts +4 -0
- package/dist/common-components/Button/Button.d.ts.map +1 -0
- package/dist/common-components/Button/Button.js +28 -0
- package/dist/common-components/Button/Button.types.d.ts +6 -0
- package/dist/common-components/Button/Button.types.d.ts.map +1 -0
- package/dist/common-components/Button/index.d.ts +3 -0
- package/dist/common-components/Button/index.d.ts.map +1 -0
- package/dist/common-components/Canvas/Canvas.cjs +1 -0
- package/dist/common-components/Canvas/Canvas.const.cjs +1 -0
- package/dist/common-components/Canvas/Canvas.const.d.ts +2 -0
- package/dist/common-components/Canvas/Canvas.const.d.ts.map +1 -0
- package/dist/common-components/Canvas/Canvas.const.js +4 -0
- package/dist/common-components/Canvas/Canvas.d.ts +4 -0
- package/dist/common-components/Canvas/Canvas.d.ts.map +1 -0
- package/dist/common-components/Canvas/Canvas.js +14 -0
- package/dist/common-components/Canvas/Canvas.types.d.ts +5 -0
- package/dist/common-components/Canvas/Canvas.types.d.ts.map +1 -0
- package/dist/common-components/Canvas/index.d.ts +3 -0
- package/dist/common-components/Canvas/index.d.ts.map +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.cjs +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.const.cjs +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.const.d.ts +11 -0
- package/dist/common-components/ContextMenu/ContextMenu.const.d.ts.map +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.const.js +14 -0
- package/dist/common-components/ContextMenu/ContextMenu.d.ts +4 -0
- package/dist/common-components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.js +69 -0
- package/dist/common-components/ContextMenu/ContextMenu.types.d.ts +33 -0
- package/dist/common-components/ContextMenu/ContextMenu.types.d.ts.map +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.utils.cjs +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.utils.d.ts +3 -0
- package/dist/common-components/ContextMenu/ContextMenu.utils.d.ts.map +1 -0
- package/dist/common-components/ContextMenu/ContextMenu.utils.js +11 -0
- package/dist/common-components/ContextMenu/ContextMenu.utils.test.d.ts +2 -0
- package/dist/common-components/ContextMenu/ContextMenu.utils.test.d.ts.map +1 -0
- package/dist/common-components/ContextMenu/index.d.ts +5 -0
- package/dist/common-components/ContextMenu/index.d.ts.map +1 -0
- package/dist/common-components/Field/Field.cjs +1 -0
- package/dist/common-components/Field/Field.const.cjs +1 -0
- package/dist/common-components/Field/Field.const.d.ts +3 -0
- package/dist/common-components/Field/Field.const.d.ts.map +1 -0
- package/dist/common-components/Field/Field.const.js +5 -0
- package/dist/common-components/Field/Field.d.ts +4 -0
- package/dist/common-components/Field/Field.d.ts.map +1 -0
- package/dist/common-components/Field/Field.js +26 -0
- package/dist/common-components/Field/Field.types.d.ts +10 -0
- package/dist/common-components/Field/Field.types.d.ts.map +1 -0
- package/dist/common-components/Field/index.d.ts +3 -0
- package/dist/common-components/Field/index.d.ts.map +1 -0
- package/dist/common-components/icons/GripIcon.cjs +1 -0
- package/dist/common-components/icons/GripIcon.d.ts +3 -0
- package/dist/common-components/icons/GripIcon.d.ts.map +1 -0
- package/dist/common-components/icons/GripIcon.js +13 -0
- package/dist/common-components/icons/Icon.const.cjs +1 -0
- package/dist/common-components/icons/Icon.const.d.ts +7 -0
- package/dist/common-components/icons/Icon.const.d.ts.map +1 -0
- package/dist/common-components/icons/Icon.const.js +10 -0
- package/dist/common-components/icons/RedoIcon.cjs +1 -0
- package/dist/common-components/icons/RedoIcon.d.ts +3 -0
- package/dist/common-components/icons/RedoIcon.d.ts.map +1 -0
- package/dist/common-components/icons/RedoIcon.js +9 -0
- package/dist/common-components/icons/UndoIcon.cjs +1 -0
- package/dist/common-components/icons/UndoIcon.d.ts +3 -0
- package/dist/common-components/icons/UndoIcon.d.ts.map +1 -0
- package/dist/common-components/icons/UndoIcon.js +9 -0
- package/dist/common-components/icons/index.d.ts +4 -0
- package/dist/common-components/icons/index.d.ts.map +1 -0
- package/dist/common-components/index.d.ts +12 -0
- package/dist/common-components/index.d.ts.map +1 -0
- package/dist/components/InkEditor/InkEditor.cjs +1 -1
- package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.js +917 -432
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.cjs +1 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.const.cjs +1 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.const.d.ts +7 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.const.js +10 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.d.ts +4 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.js +17 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.types.d.ts +12 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.utils.cjs +1 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.utils.d.ts +4 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.utils.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiAutocomplete/AiAutocomplete.utils.js +25 -0
- package/dist/components/InkEditor/components/AiAutocomplete/index.d.ts +5 -0
- package/dist/components/InkEditor/components/AiAutocomplete/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiPanel/AiPanel.cjs +1 -1
- package/dist/components/InkEditor/components/AiPanel/AiPanel.d.ts +1 -0
- package/dist/components/InkEditor/components/AiPanel/AiPanel.d.ts.map +1 -1
- package/dist/components/InkEditor/components/AiPanel/AiPanel.js +53 -49
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.cjs +1 -1
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.const.cjs +1 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.const.d.ts +15 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.const.js +18 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.d.ts +1 -6
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.d.ts.map +1 -1
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.js +53 -8
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.types.d.ts +9 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/BlockHandles/index.d.ts +2 -1
- package/dist/components/InkEditor/components/BlockHandles/index.d.ts.map +1 -1
- package/dist/components/InkEditor/components/FindReplace/FindReplace.cjs +1 -1
- package/dist/components/InkEditor/components/FindReplace/FindReplace.d.ts.map +1 -1
- package/dist/components/InkEditor/components/FindReplace/FindReplace.js +63 -44
- package/dist/components/InkEditor/components/FindReplace/FindReplace.types.d.ts +2 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.types.d.ts.map +1 -1
- package/dist/components/InkEditor/components/FindReplace/index.d.ts +1 -1
- package/dist/components/InkEditor/components/FindReplace/index.d.ts.map +1 -1
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.cjs +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.const.cjs +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.const.d.ts +25 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.const.js +28 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.d.ts +4 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.d.ts.map +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.js +140 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.types.d.ts +32 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.utils.cjs +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.utils.d.ts +4 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.utils.d.ts.map +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.utils.js +16 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.utils.test.d.ts +2 -0
- package/dist/components/InkEditor/components/InlineToolbar/InlineToolbar.utils.test.d.ts.map +1 -0
- package/dist/components/InkEditor/components/InlineToolbar/index.d.ts +5 -0
- package/dist/components/InkEditor/components/InlineToolbar/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.cjs +1 -1
- package/dist/components/InkEditor/components/SignPad/SignPad.d.ts.map +1 -1
- package/dist/components/InkEditor/components/SignPad/SignPad.js +47 -51
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.js +20 -16
- package/dist/components/InkEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +16 -12
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.cjs +1 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.cjs +1 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.d.ts +10 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.const.js +18 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.d.ts +4 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.js +43 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.types.d.ts +12 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/ToolbarCustomize.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/index.d.ts +4 -0
- package/dist/components/InkEditor/components/ToolbarCustomize/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/index.d.ts +7 -1
- package/dist/components/InkEditor/components/index.d.ts.map +1 -1
- package/dist/components/InkEditor/helpers/format.utils.cjs +2 -1
- package/dist/components/InkEditor/helpers/format.utils.d.ts +9 -0
- package/dist/components/InkEditor/helpers/format.utils.d.ts.map +1 -1
- package/dist/components/InkEditor/helpers/format.utils.js +113 -20
- package/dist/components/InkEditor/helpers/index.d.ts +1 -1
- package/dist/components/InkEditor/helpers/index.d.ts.map +1 -1
- package/dist/constants/blocks.const.cjs +1 -0
- package/dist/constants/blocks.const.d.ts +11 -0
- package/dist/constants/blocks.const.d.ts.map +1 -0
- package/dist/constants/blocks.const.js +14 -0
- package/dist/constants/colorMode.const.cjs +1 -0
- package/dist/constants/colorMode.const.d.ts +6 -0
- package/dist/constants/colorMode.const.d.ts.map +1 -0
- package/dist/constants/colorMode.const.js +7 -0
- package/dist/constants/contextMenu.const.cjs +1 -0
- package/dist/constants/contextMenu.const.d.ts +37 -0
- package/dist/constants/contextMenu.const.d.ts.map +1 -0
- package/dist/constants/contextMenu.const.js +39 -0
- package/dist/constants/defaultIcons.cjs +1 -0
- package/dist/constants/defaultIcons.d.ts +4 -0
- package/dist/constants/defaultIcons.d.ts.map +1 -0
- package/dist/constants/defaultIcons.js +42 -0
- package/dist/constants/defaults.const.cjs +1 -1
- package/dist/constants/defaults.const.d.ts +4 -0
- package/dist/constants/defaults.const.d.ts.map +1 -1
- package/dist/constants/defaults.const.js +56 -48
- package/dist/constants/findReplaceMenu.const.cjs +1 -0
- package/dist/constants/findReplaceMenu.const.d.ts +10 -0
- package/dist/constants/findReplaceMenu.const.d.ts.map +1 -0
- package/dist/constants/findReplaceMenu.const.js +14 -0
- package/dist/constants/fonts.const.cjs +1 -0
- package/dist/constants/fonts.const.d.ts +25 -0
- package/dist/constants/fonts.const.d.ts.map +1 -0
- package/dist/constants/fonts.const.js +40 -0
- package/dist/constants/index.d.ts +11 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/keyboard.const.cjs +1 -0
- package/dist/constants/keyboard.const.d.ts +5 -0
- package/dist/constants/keyboard.const.d.ts.map +1 -0
- package/dist/constants/keyboard.const.js +7 -0
- package/dist/constants/lists.const.cjs +1 -0
- package/dist/constants/lists.const.d.ts +24 -0
- package/dist/constants/lists.const.d.ts.map +1 -0
- package/dist/constants/lists.const.js +28 -0
- package/dist/constants/numbers.cjs +1 -1
- package/dist/constants/numbers.js +30 -15
- package/dist/constants/openai.const.cjs +1 -0
- package/dist/constants/openai.const.d.ts +42 -0
- package/dist/constants/openai.const.d.ts.map +1 -0
- package/dist/constants/openai.const.js +58 -0
- package/dist/constants/premium.const.cjs +1 -1
- package/dist/constants/premium.const.d.ts +1 -2
- package/dist/constants/premium.const.d.ts.map +1 -1
- package/dist/constants/premium.const.js +6 -34
- package/dist/constants/table.const.cjs +1 -0
- package/dist/constants/table.const.d.ts +8 -0
- package/dist/constants/table.const.d.ts.map +1 -0
- package/dist/constants/table.const.js +10 -0
- 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 +11 -4
- package/dist/constants/toolbarMenu.const.cjs +1 -0
- package/dist/constants/toolbarMenu.const.d.ts +20 -0
- package/dist/constants/toolbarMenu.const.d.ts.map +1 -0
- package/dist/constants/toolbarMenu.const.js +66 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +103 -47
- package/dist/plugins/ai/demoProvider.cjs +1 -1
- package/dist/plugins/ai/demoProvider.d.ts.map +1 -1
- package/dist/plugins/ai/demoProvider.js +65 -40
- package/dist/plugins/ai/index.cjs +1 -1
- package/dist/plugins/ai/index.d.ts +3 -1
- package/dist/plugins/ai/index.d.ts.map +1 -1
- package/dist/plugins/ai/index.js +28 -14
- package/dist/plugins/ai/inkServerProvider.cjs +1 -0
- package/dist/plugins/ai/inkServerProvider.d.ts +4 -0
- package/dist/plugins/ai/inkServerProvider.d.ts.map +1 -0
- package/dist/plugins/ai/inkServerProvider.js +52 -0
- package/dist/plugins/ai/inkServerProvider.types.d.ts +15 -0
- package/dist/plugins/ai/inkServerProvider.types.d.ts.map +1 -0
- package/dist/plugins/ai/openaiProvider.cjs +1 -0
- package/dist/plugins/ai/openaiProvider.d.ts +4 -0
- package/dist/plugins/ai/openaiProvider.d.ts.map +1 -0
- package/dist/plugins/ai/openaiProvider.js +128 -0
- package/dist/plugins/ai/openaiProvider.types.d.ts +32 -0
- package/dist/plugins/ai/openaiProvider.types.d.ts.map +1 -0
- package/dist/plugins/ai/openaiProvider.utils.cjs +5 -0
- package/dist/plugins/ai/openaiProvider.utils.d.ts +14 -0
- package/dist/plugins/ai/openaiProvider.utils.d.ts.map +1 -0
- package/dist/plugins/ai/openaiProvider.utils.js +57 -0
- package/dist/styles.css +1 -721
- package/dist/types/ai.types.d.ts +2 -1
- package/dist/types/ai.types.d.ts.map +1 -1
- package/dist/types/features.types.d.ts +3 -1
- package/dist/types/features.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +7 -2
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/types/premium.types.d.ts +1 -1
- package/dist/types/premium.types.d.ts.map +1 -1
- package/dist/utils/blocks.utils.cjs +1 -1
- package/dist/utils/blocks.utils.d.ts +8 -0
- package/dist/utils/blocks.utils.d.ts.map +1 -1
- package/dist/utils/blocks.utils.js +61 -19
- package/dist/utils/blocks.utils.test.d.ts +2 -0
- package/dist/utils/blocks.utils.test.d.ts.map +1 -0
- package/dist/utils/comments.utils.cjs +1 -1
- package/dist/utils/comments.utils.js +23 -18
- package/dist/utils/history.utils.cjs +1 -1
- package/dist/utils/history.utils.js +7 -2
- package/dist/utils/index.d.ts +6 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/license.utils.cjs +1 -1
- package/dist/utils/license.utils.js +15 -10
- package/dist/utils/paste.utils.cjs +1 -1
- package/dist/utils/paste.utils.js +27 -23
- package/dist/utils/premium.utils.cjs +1 -1
- package/dist/utils/premium.utils.js +23 -18
- package/dist/utils/selection.utils.cjs +1 -0
- package/dist/utils/selection.utils.d.ts +10 -0
- package/dist/utils/selection.utils.d.ts.map +1 -0
- package/dist/utils/selection.utils.js +58 -0
- package/dist/utils/selection.utils.test.d.ts +2 -0
- package/dist/utils/selection.utils.test.d.ts.map +1 -0
- package/dist/utils/slash.utils.cjs +1 -1
- package/dist/utils/slash.utils.js +13 -8
- package/dist/utils/table.utils.cjs +1 -1
- package/dist/utils/table.utils.d.ts +5 -0
- package/dist/utils/table.utils.d.ts.map +1 -1
- package/dist/utils/table.utils.js +69 -10
- package/dist/utils/table.utils.test.d.ts +2 -0
- package/dist/utils/table.utils.test.d.ts.map +1 -0
- package/dist/utils/toolbarStorage.utils.cjs +1 -0
- package/dist/utils/toolbarStorage.utils.d.ts +12 -0
- package/dist/utils/toolbarStorage.utils.d.ts.map +1 -0
- package/dist/utils/toolbarStorage.utils.js +92 -0
- package/dist/utils/toolbarStorage.utils.test.d.ts +2 -0
- package/dist/utils/toolbarStorage.utils.test.d.ts.map +1 -0
- package/dist/utils/trackChanges.utils.cjs +1 -1
- package/dist/utils/trackChanges.utils.js +14 -9
- package/dist/utils/typo.utils.cjs +1 -1
- package/dist/utils/typo.utils.js +15 -10
- package/package.json +2 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { InkAiCapability, InkAiModelCatalogEntry } from '../types';
|
|
2
|
+
export declare const INK_AI_OPENAI_PROVIDER_ID = "openai";
|
|
3
|
+
export declare const INK_AI_OPENAI_PROVIDER_NAME = "OpenAI";
|
|
4
|
+
export declare const INK_AI_OPENAI_MODEL_GPT_4_1_MINI = "gpt-4.1-mini";
|
|
5
|
+
export declare const INK_AI_OPENAI_MODEL_GPT_4_1 = "gpt-4.1";
|
|
6
|
+
export declare const INK_AI_OPENAI_DEFAULT_BASE_URL = "https://api.openai.com/v1";
|
|
7
|
+
export declare const INK_AI_OPENAI_CHAT_COMPLETIONS_PATH = "/chat/completions";
|
|
8
|
+
export declare const INK_AI_OPENAI_AUTH_HEADER = "Authorization";
|
|
9
|
+
export declare const INK_AI_OPENAI_BEARER_PREFIX = "Bearer ";
|
|
10
|
+
export declare const INK_AI_OPENAI_CONTENT_TYPE_HEADER = "Content-Type";
|
|
11
|
+
export declare const INK_AI_OPENAI_CONTENT_TYPE_JSON = "application/json";
|
|
12
|
+
export declare const INK_AI_OPENAI_ROLE_SYSTEM = "system";
|
|
13
|
+
export declare const INK_AI_OPENAI_ROLE_USER = "user";
|
|
14
|
+
export declare const INK_AI_OPENAI_AUTOCOMPLETE_MAX_TOKENS = 40;
|
|
15
|
+
export declare const INK_AI_OPENAI_DEFAULT_MAX_TOKENS = 1024;
|
|
16
|
+
export declare const INK_AI_OPENAI_CHARS_PER_TOKEN_ESTIMATE = 4;
|
|
17
|
+
export declare const INK_AI_OPENAI_TEMPERATURE_DEFAULT = 0.3;
|
|
18
|
+
export declare const INK_AI_OPENAI_TEMPERATURE_AUTOCOMPLETE = 0.2;
|
|
19
|
+
export declare const INK_AI_OPENAI_HTML_TAG_PATTERN: RegExp;
|
|
20
|
+
export declare const INK_AI_OPENAI_JSON_ARRAY_PATTERN: RegExp;
|
|
21
|
+
export declare const INK_AI_OPENAI_QUOTE_TRIM_PATTERN: RegExp;
|
|
22
|
+
export declare const INK_AI_OPENAI_PARAGRAPH_OPEN = "<p>";
|
|
23
|
+
export declare const INK_AI_OPENAI_PARAGRAPH_CLOSE = "</p>";
|
|
24
|
+
export declare const INK_AI_OPENAI_META_PROVIDER_KEY = "provider";
|
|
25
|
+
export declare const INK_AI_OPENAI_META_MODEL_KEY = "model";
|
|
26
|
+
export declare const INK_AI_OPENAI_META_TOKENS_KEY = "tokens";
|
|
27
|
+
export declare const INK_AI_OPENAI_REVIEW_SEVERITY_INFO = "info";
|
|
28
|
+
export declare const INK_AI_OPENAI_REVIEW_SEVERITY_WARNING = "warning";
|
|
29
|
+
export declare const INK_AI_OPENAI_REVIEW_SEVERITY_ERROR = "error";
|
|
30
|
+
export declare const INK_AI_OPENAI_DIFF_SUMMARY_REWRITE = "Suggested rewrite";
|
|
31
|
+
export declare const INK_AI_OPENAI_DIFF_SUMMARY_SUMMARIZE = "Suggested summary";
|
|
32
|
+
export declare const INK_AI_OPENAI_DIFF_SUMMARY_EXPAND = "Suggested expansion";
|
|
33
|
+
export declare const INK_AI_OPENAI_DIFF_SUMMARY_TONE = "Suggested tone adjustment";
|
|
34
|
+
export declare const INK_AI_OPENAI_DIFF_SUMMARY_TRANSLATE = "Suggested translation";
|
|
35
|
+
export declare const INK_AI_OPENAI_DIFF_SUMMARY_SUGGEST = "Suggested change";
|
|
36
|
+
export declare const INK_AI_OPENAI_REVIEW_FALLBACK_MESSAGE = "Consider revising this passage for clarity.";
|
|
37
|
+
export declare const INK_AI_OPENAI_MODELS: InkAiModelCatalogEntry[];
|
|
38
|
+
export declare const INK_AI_OPENAI_SYSTEM_PROMPTS: Record<InkAiCapability, string>;
|
|
39
|
+
export declare const INK_AI_INK_SERVER_PROVIDER_ID = "ink-server";
|
|
40
|
+
export declare const INK_AI_INK_SERVER_PROVIDER_NAME = "Ink Server";
|
|
41
|
+
export declare const INK_AI_INK_SERVER_COMPLETE_PATH = "/api/ai/complete";
|
|
42
|
+
//# sourceMappingURL=openai.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai.const.d.ts","sourceRoot":"","sources":["../../src/constants/openai.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIxE,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAClD,eAAO,MAAM,2BAA2B,WAAW,CAAC;AACpD,eAAO,MAAM,gCAAgC,iBAAiB,CAAC;AAC/D,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,8BAA8B,8BAA8B,CAAC;AAC1E,eAAO,MAAM,mCAAmC,sBAAsB,CAAC;AACvE,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AACzD,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,iCAAiC,iBAAiB,CAAC;AAChE,eAAO,MAAM,+BAA+B,qBAAqB,CAAC;AAClE,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAClD,eAAO,MAAM,uBAAuB,SAAS,CAAC;AAC9C,eAAO,MAAM,qCAAqC,KAAe,CAAC;AAClE,eAAO,MAAM,gCAAgC,OAAO,CAAC;AACrD,eAAO,MAAM,sCAAsC,IAAc,CAAC;AAClE,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD,eAAO,MAAM,sCAAsC,MAAM,CAAC;AAC1D,eAAO,MAAM,8BAA8B,QAAuB,CAAC;AACnE,eAAO,MAAM,gCAAgC,QAAgB,CAAC;AAC9D,eAAO,MAAM,gCAAgC,QAAqB,CAAC;AACnE,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAClD,eAAO,MAAM,6BAA6B,SAAS,CAAC;AACpD,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAC1D,eAAO,MAAM,4BAA4B,UAAU,CAAC;AACpD,eAAO,MAAM,6BAA6B,WAAW,CAAC;AACtD,eAAO,MAAM,kCAAkC,SAAS,CAAC;AACzD,eAAO,MAAM,qCAAqC,YAAY,CAAC;AAC/D,eAAO,MAAM,mCAAmC,UAAU,CAAC;AAC3D,eAAO,MAAM,kCAAkC,sBAAsB,CAAC;AACtE,eAAO,MAAM,oCAAoC,sBAAsB,CAAC;AACxE,eAAO,MAAM,iCAAiC,wBAAwB,CAAC;AACvE,eAAO,MAAM,+BAA+B,8BAA8B,CAAC;AAC3E,eAAO,MAAM,oCAAoC,0BAA0B,CAAC;AAC5E,eAAO,MAAM,kCAAkC,qBAAqB,CAAC;AACrE,eAAO,MAAM,qCAAqC,gDAAgD,CAAC;AAEnG,eAAO,MAAM,oBAAoB,EAAE,sBAAsB,EAGxD,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAmBxE,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAe,CAAC;AAC1D,eAAO,MAAM,+BAA+B,eAAe,CAAC;AAC5D,eAAO,MAAM,+BAA+B,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { NUMBER_FORTY as _, NUMBER_FOUR as t } from "./numbers.js";
|
|
2
|
+
import { INK_AI_MODEL_CATALOG as o } from "./aiModels.const.js";
|
|
3
|
+
const r = "openai", E = "OpenAI", I = "gpt-4.1-mini", n = "gpt-4.1", N = "https://api.openai.com/v1", i = "/chat/completions", a = "Authorization", p = "Bearer ", R = "Content-Type", O = "application/json", T = "system", c = "user", P = _, l = 1024, M = t, K = 0.3, g = 0.2, m = /<\/?[a-z][\s\S]*>/i, d = /\[[\s\S]*\]/, u = /^["'`]+|["'`]+$/g, S = "<p>", h = "</p>", L = "provider", f = "model", D = "tokens", H = "info", v = "warning", U = "error", y = "Suggested rewrite", F = "Suggested summary", Y = "Suggested expansion", x = "Suggested tone adjustment", w = "Suggested translation", V = "Suggested change", C = "Consider revising this passage for clarity.", b = o.filter(
|
|
4
|
+
(e) => e.id === I || e.id === n
|
|
5
|
+
), k = {
|
|
6
|
+
chat: "You are Ink AI, a helpful writing assistant. Answer clearly and concisely about the document context.",
|
|
7
|
+
rewrite: "Rewrite the provided HTML or text for clarity and flow. Return only the rewritten content as simple HTML (prefer a single <p>…</p> or preserve simple tags). No preamble.",
|
|
8
|
+
summarize: "Summarize the provided HTML or text. Return only the summary as simple HTML (prefer a single <p>…</p>). No preamble.",
|
|
9
|
+
expand: "Expand the provided HTML or text with useful detail while staying on topic. Return only the expanded content as simple HTML (prefer a single <p>…</p> or preserve simple tags). No preamble.",
|
|
10
|
+
tone: "Adjust the tone of the provided HTML or text to be clearer and more professional unless another tone is specified in the user message. Return only the revised content as simple HTML. No preamble.",
|
|
11
|
+
translate: "Translate the provided HTML or text into the target language from the user message. Return only the translation as simple HTML (prefer a single <p>…</p> or preserve simple tags). No preamble.",
|
|
12
|
+
review: "Review the provided HTML or text for grammar and style. Respond with ONLY a JSON array of objects with keys: message, severity (info|warning|error), originalText, suggestedText. No markdown fences.",
|
|
13
|
+
quickAction: "Perform the requested quick writing action on the provided HTML or text. Return only the result as simple HTML (prefer a single <p>…</p>). No preamble.",
|
|
14
|
+
suggestDiff: "Suggest an improved version of the provided HTML or text. Return only the suggested content as simple HTML (prefer a single <p>…</p> or preserve simple tags). No preamble.",
|
|
15
|
+
autocomplete: "Continue the user text with a short inline completion only. Return only the continuation tokens (no quotes, no explanation, no repeating the prefix). Keep it under about 40 tokens."
|
|
16
|
+
}, G = "ink-server", B = "Ink Server", W = "/api/ai/complete";
|
|
17
|
+
export {
|
|
18
|
+
W as INK_AI_INK_SERVER_COMPLETE_PATH,
|
|
19
|
+
G as INK_AI_INK_SERVER_PROVIDER_ID,
|
|
20
|
+
B as INK_AI_INK_SERVER_PROVIDER_NAME,
|
|
21
|
+
a as INK_AI_OPENAI_AUTH_HEADER,
|
|
22
|
+
P as INK_AI_OPENAI_AUTOCOMPLETE_MAX_TOKENS,
|
|
23
|
+
p as INK_AI_OPENAI_BEARER_PREFIX,
|
|
24
|
+
M as INK_AI_OPENAI_CHARS_PER_TOKEN_ESTIMATE,
|
|
25
|
+
i as INK_AI_OPENAI_CHAT_COMPLETIONS_PATH,
|
|
26
|
+
R as INK_AI_OPENAI_CONTENT_TYPE_HEADER,
|
|
27
|
+
O as INK_AI_OPENAI_CONTENT_TYPE_JSON,
|
|
28
|
+
N as INK_AI_OPENAI_DEFAULT_BASE_URL,
|
|
29
|
+
l as INK_AI_OPENAI_DEFAULT_MAX_TOKENS,
|
|
30
|
+
Y as INK_AI_OPENAI_DIFF_SUMMARY_EXPAND,
|
|
31
|
+
y as INK_AI_OPENAI_DIFF_SUMMARY_REWRITE,
|
|
32
|
+
V as INK_AI_OPENAI_DIFF_SUMMARY_SUGGEST,
|
|
33
|
+
F as INK_AI_OPENAI_DIFF_SUMMARY_SUMMARIZE,
|
|
34
|
+
x as INK_AI_OPENAI_DIFF_SUMMARY_TONE,
|
|
35
|
+
w as INK_AI_OPENAI_DIFF_SUMMARY_TRANSLATE,
|
|
36
|
+
m as INK_AI_OPENAI_HTML_TAG_PATTERN,
|
|
37
|
+
d as INK_AI_OPENAI_JSON_ARRAY_PATTERN,
|
|
38
|
+
f as INK_AI_OPENAI_META_MODEL_KEY,
|
|
39
|
+
L as INK_AI_OPENAI_META_PROVIDER_KEY,
|
|
40
|
+
D as INK_AI_OPENAI_META_TOKENS_KEY,
|
|
41
|
+
b as INK_AI_OPENAI_MODELS,
|
|
42
|
+
n as INK_AI_OPENAI_MODEL_GPT_4_1,
|
|
43
|
+
I as INK_AI_OPENAI_MODEL_GPT_4_1_MINI,
|
|
44
|
+
h as INK_AI_OPENAI_PARAGRAPH_CLOSE,
|
|
45
|
+
S as INK_AI_OPENAI_PARAGRAPH_OPEN,
|
|
46
|
+
r as INK_AI_OPENAI_PROVIDER_ID,
|
|
47
|
+
E as INK_AI_OPENAI_PROVIDER_NAME,
|
|
48
|
+
u as INK_AI_OPENAI_QUOTE_TRIM_PATTERN,
|
|
49
|
+
C as INK_AI_OPENAI_REVIEW_FALLBACK_MESSAGE,
|
|
50
|
+
U as INK_AI_OPENAI_REVIEW_SEVERITY_ERROR,
|
|
51
|
+
H as INK_AI_OPENAI_REVIEW_SEVERITY_INFO,
|
|
52
|
+
v as INK_AI_OPENAI_REVIEW_SEVERITY_WARNING,
|
|
53
|
+
T as INK_AI_OPENAI_ROLE_SYSTEM,
|
|
54
|
+
c as INK_AI_OPENAI_ROLE_USER,
|
|
55
|
+
k as INK_AI_OPENAI_SYSTEM_PROMPTS,
|
|
56
|
+
g as INK_AI_OPENAI_TEMPERATURE_AUTOCOMPLETE,
|
|
57
|
+
K as INK_AI_OPENAI_TEMPERATURE_DEFAULT
|
|
58
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="ink_prem_",e=["icons","theme","richPaste","imageUpload","wysiwyg"],
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="ink_prem_",e=["icons","theme","richPaste","imageUpload","wysiwyg"],o={border:"--ink-border",background:"--ink-bg",toolbar:"--ink-toolbar",text:"--ink-text",muted:"--ink-muted",accent:"--ink-accent",accentSoft:"--ink-accent-soft",shadow:"--ink-shadow",radius:"--ink-radius",fontFamily:"--ink-font-family"},i=["p","br","div","span","strong","b","em","i","u","s","strike","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","a","img","table","thead","tbody","tr","th","td","hr","sub","sup"],n=["href","src","alt","title","style","colspan","rowspan","width","height","target","rel"];exports.INK_PASTE_ALLOWED_ATTRS=n;exports.INK_PASTE_ALLOWED_TAGS=i;exports.INK_PREMIUM_FEATURES=e;exports.INK_PREMIUM_LICENSE_PREFIX=t;exports.INK_THEME_CSS_VARS=o;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InkPremiumFeature, InkThemeTokens } from '../types';
|
|
2
2
|
export declare const INK_PREMIUM_LICENSE_PREFIX = "ink_prem_";
|
|
3
3
|
export declare const INK_PREMIUM_FEATURES: InkPremiumFeature[];
|
|
4
|
-
export declare const INK_DEFAULT_ICONS: Record<InkIconKey, string>;
|
|
5
4
|
export declare const INK_THEME_CSS_VARS: Record<keyof InkThemeTokens, string>;
|
|
6
5
|
export declare const INK_PASTE_ALLOWED_TAGS: readonly ["p", "br", "div", "span", "strong", "b", "em", "i", "u", "s", "strike", "h1", "h2", "h3", "h4", "h5", "h6", "ul", "ol", "li", "blockquote", "pre", "code", "a", "img", "table", "thead", "tbody", "tr", "th", "td", "hr", "sub", "sup"];
|
|
7
6
|
export declare const INK_PASTE_ALLOWED_ATTRS: readonly ["href", "src", "alt", "title", "style", "colspan", "rowspan", "width", "height", "target", "rel"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"premium.const.d.ts","sourceRoot":"","sources":["../../src/constants/premium.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"premium.const.d.ts","sourceRoot":"","sources":["../../src/constants/premium.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAElE,eAAO,MAAM,0BAA0B,cAAc,CAAC;AAEtD,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAMnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,cAAc,EAAE,MAAM,CAWnE,CAAC;AAEF,eAAO,MAAM,sBAAsB,mPAmCzB,CAAC;AAEX,eAAO,MAAM,uBAAuB,6GAY1B,CAAC"}
|
|
@@ -4,34 +4,7 @@ const t = "ink_prem_", e = [
|
|
|
4
4
|
"richPaste",
|
|
5
5
|
"imageUpload",
|
|
6
6
|
"wysiwyg"
|
|
7
|
-
],
|
|
8
|
-
bold: "B",
|
|
9
|
-
italic: "I",
|
|
10
|
-
underline: "U",
|
|
11
|
-
strikethrough: "S",
|
|
12
|
-
bulletList: "•",
|
|
13
|
-
orderedList: "1.",
|
|
14
|
-
link: "🔗",
|
|
15
|
-
image: "🖼",
|
|
16
|
-
table: "▦",
|
|
17
|
-
signature: "✍",
|
|
18
|
-
findReplace: "⌕",
|
|
19
|
-
horizontalRule: "―",
|
|
20
|
-
undo: "↶",
|
|
21
|
-
redo: "↷",
|
|
22
|
-
trackChanges: "±",
|
|
23
|
-
comments: "💬",
|
|
24
|
-
ai: "✦",
|
|
25
|
-
clearFormat: "⌫",
|
|
26
|
-
alignLeft: "⫷",
|
|
27
|
-
alignCenter: "☰",
|
|
28
|
-
alignRight: "⫸",
|
|
29
|
-
alignJustify: "≡",
|
|
30
|
-
indent: "→",
|
|
31
|
-
outdent: "←",
|
|
32
|
-
blockquote: "“",
|
|
33
|
-
code: "</>"
|
|
34
|
-
}, n = {
|
|
7
|
+
], o = {
|
|
35
8
|
border: "--ink-border",
|
|
36
9
|
background: "--ink-bg",
|
|
37
10
|
toolbar: "--ink-toolbar",
|
|
@@ -42,7 +15,7 @@ const t = "ink_prem_", e = [
|
|
|
42
15
|
shadow: "--ink-shadow",
|
|
43
16
|
radius: "--ink-radius",
|
|
44
17
|
fontFamily: "--ink-font-family"
|
|
45
|
-
},
|
|
18
|
+
}, n = [
|
|
46
19
|
"p",
|
|
47
20
|
"br",
|
|
48
21
|
"div",
|
|
@@ -77,7 +50,7 @@ const t = "ink_prem_", e = [
|
|
|
77
50
|
"hr",
|
|
78
51
|
"sub",
|
|
79
52
|
"sup"
|
|
80
|
-
],
|
|
53
|
+
], i = [
|
|
81
54
|
"href",
|
|
82
55
|
"src",
|
|
83
56
|
"alt",
|
|
@@ -91,10 +64,9 @@ const t = "ink_prem_", e = [
|
|
|
91
64
|
"rel"
|
|
92
65
|
];
|
|
93
66
|
export {
|
|
94
|
-
i as
|
|
95
|
-
|
|
96
|
-
o as INK_PASTE_ALLOWED_TAGS,
|
|
67
|
+
i as INK_PASTE_ALLOWED_ATTRS,
|
|
68
|
+
n as INK_PASTE_ALLOWED_TAGS,
|
|
97
69
|
e as INK_PREMIUM_FEATURES,
|
|
98
70
|
t as INK_PREMIUM_LICENSE_PREFIX,
|
|
99
|
-
|
|
71
|
+
o as INK_THEME_CSS_VARS
|
|
100
72
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T="Ink-table",E="table",L="tr",_="thead",A="td",t="th",B="td, th";exports.TABLE_CELL_SELECTOR=B;exports.TABLE_CELL_TAG_TD=A;exports.TABLE_CELL_TAG_TH=t;exports.TABLE_CLASS_NAME=T;exports.TABLE_ROW_TAG=L;exports.TABLE_SECTION_THEAD=_;exports.TABLE_TAG=E;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const TABLE_CLASS_NAME = "Ink-table";
|
|
2
|
+
export declare const TABLE_TAG = "table";
|
|
3
|
+
export declare const TABLE_ROW_TAG = "tr";
|
|
4
|
+
export declare const TABLE_SECTION_THEAD = "thead";
|
|
5
|
+
export declare const TABLE_CELL_TAG_TD = "td";
|
|
6
|
+
export declare const TABLE_CELL_TAG_TH = "th";
|
|
7
|
+
export declare const TABLE_CELL_SELECTOR = "td, th";
|
|
8
|
+
//# sourceMappingURL=table.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.const.d.ts","sourceRoot":"","sources":["../../src/constants/table.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAC5C,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,mBAAmB,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const t = "Ink-table", T = "table", E = "tr", L = "thead", _ = "td", A = "th", n = "td, th";
|
|
2
|
+
export {
|
|
3
|
+
n as TABLE_CELL_SELECTOR,
|
|
4
|
+
_ as TABLE_CELL_TAG_TD,
|
|
5
|
+
A as TABLE_CELL_TAG_TH,
|
|
6
|
+
t as TABLE_CLASS_NAME,
|
|
7
|
+
E as TABLE_ROW_TAG,
|
|
8
|
+
L as TABLE_SECTION_THEAD,
|
|
9
|
+
T as TABLE_TAG
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O="signature",T="findReplace",R="horizontalRule";exports.TOOLBAR_OPTION_FIND_REPLACE=T;exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O="signature",T="findReplace",_="findReplaceDropdown",R="fontDropdown",I="listDropdown",N="horizontalRule",P="directionLtr",L="directionRtl",A="superscript",t="subscript";exports.TOOLBAR_OPTION_DIRECTION_LTR=P;exports.TOOLBAR_OPTION_DIRECTION_RTL=L;exports.TOOLBAR_OPTION_FIND_REPLACE=T;exports.TOOLBAR_OPTION_FIND_REPLACE_DROPDOWN=_;exports.TOOLBAR_OPTION_FONT_DROPDOWN=R;exports.TOOLBAR_OPTION_HORIZONTAL_RULE=N;exports.TOOLBAR_OPTION_LIST_DROPDOWN=I;exports.TOOLBAR_OPTION_SIGNATURE=O;exports.TOOLBAR_OPTION_SUBSCRIPT=t;exports.TOOLBAR_OPTION_SUPERSCRIPT=A;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export declare const TOOLBAR_OPTION_SIGNATURE: "signature";
|
|
2
2
|
export declare const TOOLBAR_OPTION_FIND_REPLACE: "findReplace";
|
|
3
|
+
export declare const TOOLBAR_OPTION_FIND_REPLACE_DROPDOWN: "findReplaceDropdown";
|
|
4
|
+
export declare const TOOLBAR_OPTION_FONT_DROPDOWN: "fontDropdown";
|
|
5
|
+
export declare const TOOLBAR_OPTION_LIST_DROPDOWN: "listDropdown";
|
|
3
6
|
export declare const TOOLBAR_OPTION_HORIZONTAL_RULE: "horizontalRule";
|
|
7
|
+
export declare const TOOLBAR_OPTION_DIRECTION_LTR: "directionLtr";
|
|
8
|
+
export declare const TOOLBAR_OPTION_DIRECTION_RTL: "directionRtl";
|
|
9
|
+
export declare const TOOLBAR_OPTION_SUPERSCRIPT: "superscript";
|
|
10
|
+
export declare const TOOLBAR_OPTION_SUBSCRIPT: "subscript";
|
|
4
11
|
//# sourceMappingURL=toolbar.const.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.const.d.ts","sourceRoot":"","sources":["../../src/constants/toolbar.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,WAAoB,CAAC;AAC7D,eAAO,MAAM,2BAA2B,EAAG,aAAsB,CAAC;AAClE,eAAO,MAAM,8BAA8B,EAAG,gBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"toolbar.const.d.ts","sourceRoot":"","sources":["../../src/constants/toolbar.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,WAAoB,CAAC;AAC7D,eAAO,MAAM,2BAA2B,EAAG,aAAsB,CAAC;AAClE,eAAO,MAAM,oCAAoC,EAAG,qBAA8B,CAAC;AACnF,eAAO,MAAM,4BAA4B,EAAG,cAAuB,CAAC;AACpE,eAAO,MAAM,4BAA4B,EAAG,cAAuB,CAAC;AACpE,eAAO,MAAM,8BAA8B,EAAG,gBAAyB,CAAC;AACxE,eAAO,MAAM,4BAA4B,EAAG,cAAuB,CAAC;AACpE,eAAO,MAAM,4BAA4B,EAAG,cAAuB,CAAC;AACpE,eAAO,MAAM,0BAA0B,EAAG,aAAsB,CAAC;AACjE,eAAO,MAAM,wBAAwB,EAAG,WAAoB,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
const O = "signature",
|
|
1
|
+
const O = "signature", T = "findReplace", R = "findReplaceDropdown", _ = "fontDropdown", o = "listDropdown", t = "horizontalRule", I = "directionLtr", n = "directionRtl", N = "superscript", L = "subscript";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
I as TOOLBAR_OPTION_DIRECTION_LTR,
|
|
4
|
+
n as TOOLBAR_OPTION_DIRECTION_RTL,
|
|
5
|
+
T as TOOLBAR_OPTION_FIND_REPLACE,
|
|
6
|
+
R as TOOLBAR_OPTION_FIND_REPLACE_DROPDOWN,
|
|
7
|
+
_ as TOOLBAR_OPTION_FONT_DROPDOWN,
|
|
8
|
+
t as TOOLBAR_OPTION_HORIZONTAL_RULE,
|
|
9
|
+
o as TOOLBAR_OPTION_LIST_DROPDOWN,
|
|
10
|
+
O as TOOLBAR_OPTION_SIGNATURE,
|
|
11
|
+
L as TOOLBAR_OPTION_SUBSCRIPT,
|
|
12
|
+
N as TOOLBAR_OPTION_SUPERSCRIPT
|
|
6
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O="toolbar-customize",_="toolbar-hide",t="Customize toolbar",o="Hide toolbar",T="show-toolbar",e="Show toolbar",L="Show toolbar",E="Ask about this document or request a change…",n="Show formatting toolbar",i="ink-toolbar-hidden",A="ink-toolbar-items",r="true",a="false",R="divider",l={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph",headingDropdown:"Heading",fontDropdown:"Font",bulletList:"Bullet list",orderedList:"Numbered list",listDropdown:"List",blockquote:"Quote",code:"Code",link:"Link",image:"Image",table:"Table",signature:"Sign pad",findReplace:"Find and replace",findReplaceDropdown:"Find and replace",horizontalRule:"Horizontal rule",undo:"Undo",redo:"Redo",trackChanges:"Track changes",comments:"Comments",ai:"AI",textColor:"Text color",highlightColor:"Highlight color",directionLtr:"Left to right",directionRtl:"Right to left",superscript:"Superscript",subscript:"Subscript",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignJustify:"Justify",indent:"Indent",outdent:"Outdent",clearFormat:"Clear formatting",divider:"Divider"},d="Customize toolbar",B="Done",s="Toolbar options";exports.AGENT_BAR_PLACEHOLDER=E;exports.CONTEXT_MENU_ID_SHOW_TOOLBAR=T;exports.CONTEXT_MENU_LABEL_SHOW_TOOLBAR=e;exports.TOOLBAR_CONTEXT_MENU_ID_CUSTOMIZE=O;exports.TOOLBAR_CONTEXT_MENU_ID_HIDE=_;exports.TOOLBAR_CONTEXT_MENU_LABEL_CUSTOMIZE=t;exports.TOOLBAR_CONTEXT_MENU_LABEL_HIDE=o;exports.TOOLBAR_CUSTOMIZE_CLOSE_LABEL=B;exports.TOOLBAR_CUSTOMIZE_LIST_ARIA_LABEL=s;exports.TOOLBAR_CUSTOMIZE_TITLE=d;exports.TOOLBAR_OPTION_DIVIDER=R;exports.TOOLBAR_OPTION_LABELS=l;exports.TOOLBAR_SHOW_CONTROL_ARIA_LABEL=n;exports.TOOLBAR_SHOW_CONTROL_LABEL=L;exports.TOOLBAR_STORAGE_KEY_HIDDEN=i;exports.TOOLBAR_STORAGE_KEY_ITEMS=A;exports.TOOLBAR_STORAGE_VALUE_FALSE=a;exports.TOOLBAR_STORAGE_VALUE_TRUE=r;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ToolbarOption } from '../types';
|
|
2
|
+
export declare const TOOLBAR_CONTEXT_MENU_ID_CUSTOMIZE = "toolbar-customize";
|
|
3
|
+
export declare const TOOLBAR_CONTEXT_MENU_ID_HIDE = "toolbar-hide";
|
|
4
|
+
export declare const TOOLBAR_CONTEXT_MENU_LABEL_CUSTOMIZE = "Customize toolbar";
|
|
5
|
+
export declare const TOOLBAR_CONTEXT_MENU_LABEL_HIDE = "Hide toolbar";
|
|
6
|
+
export declare const CONTEXT_MENU_ID_SHOW_TOOLBAR = "show-toolbar";
|
|
7
|
+
export declare const CONTEXT_MENU_LABEL_SHOW_TOOLBAR = "Show toolbar";
|
|
8
|
+
export declare const TOOLBAR_SHOW_CONTROL_LABEL = "Show toolbar";
|
|
9
|
+
export declare const AGENT_BAR_PLACEHOLDER = "Ask about this document or request a change\u2026";
|
|
10
|
+
export declare const TOOLBAR_SHOW_CONTROL_ARIA_LABEL = "Show formatting toolbar";
|
|
11
|
+
export declare const TOOLBAR_STORAGE_KEY_HIDDEN = "ink-toolbar-hidden";
|
|
12
|
+
export declare const TOOLBAR_STORAGE_KEY_ITEMS = "ink-toolbar-items";
|
|
13
|
+
export declare const TOOLBAR_STORAGE_VALUE_TRUE = "true";
|
|
14
|
+
export declare const TOOLBAR_STORAGE_VALUE_FALSE = "false";
|
|
15
|
+
export declare const TOOLBAR_OPTION_DIVIDER: "divider";
|
|
16
|
+
export declare const TOOLBAR_OPTION_LABELS: Record<ToolbarOption, string>;
|
|
17
|
+
export declare const TOOLBAR_CUSTOMIZE_TITLE = "Customize toolbar";
|
|
18
|
+
export declare const TOOLBAR_CUSTOMIZE_CLOSE_LABEL = "Done";
|
|
19
|
+
export declare const TOOLBAR_CUSTOMIZE_LIST_ARIA_LABEL = "Toolbar options";
|
|
20
|
+
//# sourceMappingURL=toolbarMenu.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbarMenu.const.d.ts","sourceRoot":"","sources":["../../src/constants/toolbarMenu.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,iCAAiC,sBAAsB,CAAC;AACrE,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D,eAAO,MAAM,oCAAoC,sBAAsB,CAAC;AACxE,eAAO,MAAM,+BAA+B,iBAAiB,CAAC;AAE9D,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D,eAAO,MAAM,+BAA+B,iBAAiB,CAAC;AAE9D,eAAO,MAAM,0BAA0B,iBAAiB,CAAC;AACzD,eAAO,MAAM,qBAAqB,sDAAiD,CAAC;AACpF,eAAO,MAAM,+BAA+B,4BAA4B,CAAC;AAEzE,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAC/D,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAC7D,eAAO,MAAM,0BAA0B,SAAS,CAAC;AACjD,eAAO,MAAM,2BAA2B,UAAU,CAAC;AAEnD,eAAO,MAAM,sBAAsB,EAAG,SAAkB,CAAC;AAEzD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CA6C/D,CAAC;AAEF,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAC3D,eAAO,MAAM,6BAA6B,SAAS,CAAC;AACpD,eAAO,MAAM,iCAAiC,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const t = "toolbar-customize", o = "toolbar-hide", e = "Customize toolbar", n = "Hide toolbar", i = "show-toolbar", r = "Show toolbar", a = "Show toolbar", O = "Ask about this document or request a change…", _ = "Show formatting toolbar", l = "ink-toolbar-hidden", d = "ink-toolbar-items", T = "true", L = "false", s = "divider", E = {
|
|
2
|
+
bold: "Bold",
|
|
3
|
+
italic: "Italic",
|
|
4
|
+
underline: "Underline",
|
|
5
|
+
strikethrough: "Strikethrough",
|
|
6
|
+
heading1: "Heading 1",
|
|
7
|
+
heading2: "Heading 2",
|
|
8
|
+
heading3: "Heading 3",
|
|
9
|
+
heading4: "Heading 4",
|
|
10
|
+
heading5: "Heading 5",
|
|
11
|
+
heading6: "Heading 6",
|
|
12
|
+
paragraph: "Paragraph",
|
|
13
|
+
headingDropdown: "Heading",
|
|
14
|
+
fontDropdown: "Font",
|
|
15
|
+
bulletList: "Bullet list",
|
|
16
|
+
orderedList: "Numbered list",
|
|
17
|
+
listDropdown: "List",
|
|
18
|
+
blockquote: "Quote",
|
|
19
|
+
code: "Code",
|
|
20
|
+
link: "Link",
|
|
21
|
+
image: "Image",
|
|
22
|
+
table: "Table",
|
|
23
|
+
signature: "Sign pad",
|
|
24
|
+
findReplace: "Find and replace",
|
|
25
|
+
findReplaceDropdown: "Find and replace",
|
|
26
|
+
horizontalRule: "Horizontal rule",
|
|
27
|
+
undo: "Undo",
|
|
28
|
+
redo: "Redo",
|
|
29
|
+
trackChanges: "Track changes",
|
|
30
|
+
comments: "Comments",
|
|
31
|
+
ai: "AI",
|
|
32
|
+
textColor: "Text color",
|
|
33
|
+
highlightColor: "Highlight color",
|
|
34
|
+
directionLtr: "Left to right",
|
|
35
|
+
directionRtl: "Right to left",
|
|
36
|
+
superscript: "Superscript",
|
|
37
|
+
subscript: "Subscript",
|
|
38
|
+
alignLeft: "Align left",
|
|
39
|
+
alignCenter: "Align center",
|
|
40
|
+
alignRight: "Align right",
|
|
41
|
+
alignJustify: "Justify",
|
|
42
|
+
indent: "Indent",
|
|
43
|
+
outdent: "Outdent",
|
|
44
|
+
clearFormat: "Clear formatting",
|
|
45
|
+
divider: "Divider"
|
|
46
|
+
}, A = "Customize toolbar", c = "Done", g = "Toolbar options";
|
|
47
|
+
export {
|
|
48
|
+
O as AGENT_BAR_PLACEHOLDER,
|
|
49
|
+
i as CONTEXT_MENU_ID_SHOW_TOOLBAR,
|
|
50
|
+
r as CONTEXT_MENU_LABEL_SHOW_TOOLBAR,
|
|
51
|
+
t as TOOLBAR_CONTEXT_MENU_ID_CUSTOMIZE,
|
|
52
|
+
o as TOOLBAR_CONTEXT_MENU_ID_HIDE,
|
|
53
|
+
e as TOOLBAR_CONTEXT_MENU_LABEL_CUSTOMIZE,
|
|
54
|
+
n as TOOLBAR_CONTEXT_MENU_LABEL_HIDE,
|
|
55
|
+
c as TOOLBAR_CUSTOMIZE_CLOSE_LABEL,
|
|
56
|
+
g as TOOLBAR_CUSTOMIZE_LIST_ARIA_LABEL,
|
|
57
|
+
A as TOOLBAR_CUSTOMIZE_TITLE,
|
|
58
|
+
s as TOOLBAR_OPTION_DIVIDER,
|
|
59
|
+
E as TOOLBAR_OPTION_LABELS,
|
|
60
|
+
_ as TOOLBAR_SHOW_CONTROL_ARIA_LABEL,
|
|
61
|
+
a as TOOLBAR_SHOW_CONTROL_LABEL,
|
|
62
|
+
l as TOOLBAR_STORAGE_KEY_HIDDEN,
|
|
63
|
+
d as TOOLBAR_STORAGE_KEY_ITEMS,
|
|
64
|
+
L as TOOLBAR_STORAGE_VALUE_FALSE,
|
|
65
|
+
T as TOOLBAR_STORAGE_VALUE_TRUE
|
|
66
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./components/InkEditor/InkEditor.cjs"),l=require("./common-components/Box/Box.cjs"),A=require("./common-components/Button/Button.cjs"),u=require("./common-components/Canvas/Canvas.cjs"),N=require("./common-components/Field/Field.cjs"),T=require("./common-components/ContextMenu/ContextMenu.cjs"),a=require("./common-components/icons/UndoIcon.cjs"),R=require("./common-components/icons/RedoIcon.cjs"),P=require("./common-components/icons/GripIcon.cjs"),S=require("./utils/cn.utils.cjs"),D=require("./utils/typo.utils.cjs"),K=require("./utils/id.utils.cjs"),_=require("./utils/table.utils.cjs"),s=require("./constants/toolbarMenu.const.cjs"),r=require("./constants/colorMode.const.cjs"),L=require("./constants/typos.const.cjs"),m=require("./constants/fonts.const.cjs"),M=require("./constants/lists.const.cjs"),d=require("./constants/findReplaceMenu.const.cjs"),e=require("./constants/defaults.const.cjs"),o=require("./constants/aiModels.const.cjs"),I=require("./constants/openai.const.cjs"),O=require("./constants/premium.const.cjs"),C=require("./constants/defaultIcons.cjs"),q=require("./utils/trackChanges.utils.cjs"),b=require("./utils/comments.utils.cjs"),k=require("./utils/history.utils.cjs"),t=require("./utils/premium.utils.cjs"),F=require("./utils/license.utils.cjs"),p=require("./utils/paste.utils.cjs"),i=require("./utils/selection.utils.cjs"),n=require("./utils/toolbarStorage.utils.cjs"),c=require("./plugins/ai/aiPlugin.cjs"),U=require("./plugins/ai/demoProvider.cjs"),G=require("./plugins/ai/openaiProvider.cjs"),v=require("./plugins/ai/inkServerProvider.cjs");exports.InkEditor=E.InkEditor;exports.Box=l.Box;exports.Button=A.Button;exports.Canvas=u.Canvas;exports.Field=N.Field;exports.ContextMenu=T.ContextMenu;exports.UndoIcon=a.UndoIcon;exports.RedoIcon=R.RedoIcon;exports.GripIcon=P.GripIcon;exports.cn=S.cn;exports.applyTypoAutoFix=D.applyTypoAutoFix;exports.createInkId=K.createInkId;exports.buildTableHtml=_.buildTableHtml;exports.deleteTableColumn=_.deleteTableColumn;exports.deleteTableRow=_.deleteTableRow;exports.getTableCellFromSelection=_.getTableCellFromSelection;exports.insertTableColumn=_.insertTableColumn;exports.insertTableRow=_.insertTableRow;exports.TOOLBAR_STORAGE_KEY_HIDDEN=s.TOOLBAR_STORAGE_KEY_HIDDEN;exports.TOOLBAR_STORAGE_KEY_ITEMS=s.TOOLBAR_STORAGE_KEY_ITEMS;exports.COLOR_MODE_DARK=r.COLOR_MODE_DARK;exports.COLOR_MODE_LIGHT=r.COLOR_MODE_LIGHT;exports.COLOR_MODE_SYSTEM=r.COLOR_MODE_SYSTEM;exports.INK_DEFAULT_COLOR_MODE=r.INK_DEFAULT_COLOR_MODE;exports.TYPO_DICTIONARY=L.TYPO_DICTIONARY;exports.INK_FONT_OPTIONS=m.INK_FONT_OPTIONS;exports.INK_LIST_OPTIONS=M.INK_LIST_OPTIONS;exports.INK_FIND_REPLACE_OPTIONS=d.INK_FIND_REPLACE_OPTIONS;exports.INK_COLLAB_TOOLBAR=e.INK_COLLAB_TOOLBAR;exports.INK_DEFAULT_FEATURES=e.INK_DEFAULT_FEATURES;exports.INK_DEFAULT_TOOLBAR=e.INK_DEFAULT_TOOLBAR;exports.INK_HEADING_OPTIONS=e.INK_HEADING_OPTIONS;exports.INK_QUICK_ACTIONS=e.INK_QUICK_ACTIONS;exports.INK_SIMPLE_TOOLBAR=e.INK_SIMPLE_TOOLBAR;exports.INK_SLASH_COMMANDS=e.INK_SLASH_COMMANDS;exports.INK_TRANSLATE_LANGUAGES=e.INK_TRANSLATE_LANGUAGES;exports.INK_AI_DEMO_MODEL_ID=o.INK_AI_DEMO_MODEL_ID;exports.INK_AI_DEMO_PROVIDER_ID=o.INK_AI_DEMO_PROVIDER_ID;exports.INK_AI_MODEL_CATALOG=o.INK_AI_MODEL_CATALOG;exports.INK_AI_INK_SERVER_PROVIDER_ID=I.INK_AI_INK_SERVER_PROVIDER_ID;exports.INK_AI_OPENAI_MODEL_GPT_4_1=I.INK_AI_OPENAI_MODEL_GPT_4_1;exports.INK_AI_OPENAI_MODEL_GPT_4_1_MINI=I.INK_AI_OPENAI_MODEL_GPT_4_1_MINI;exports.INK_AI_OPENAI_PROVIDER_ID=I.INK_AI_OPENAI_PROVIDER_ID;exports.INK_AI_OPENAI_PROVIDER_NAME=I.INK_AI_OPENAI_PROVIDER_NAME;exports.INK_PREMIUM_FEATURES=O.INK_PREMIUM_FEATURES;exports.INK_PREMIUM_LICENSE_PREFIX=O.INK_PREMIUM_LICENSE_PREFIX;exports.INK_DEFAULT_ICONS=C.INK_DEFAULT_ICONS;exports.createTrackChange=q.createTrackChange;exports.createCommentThread=b.createCommentThread;exports.InkHistoryStack=k.InkHistoryStack;exports.hasInkPremiumFeature=t.hasInkPremiumFeature;exports.isInkPremiumLicenseKey=t.isInkPremiumLicenseKey;exports.resolveInkPremium=t.resolveInkPremium;exports.themeTokensToStyle=t.themeTokensToStyle;exports.mintInkPremiumLicenseKey=F.mintInkPremiumLicenseKey;exports.sanitizePastedHtml=p.sanitizePastedHtml;exports.captureSelectionInRoot=i.captureSelectionInRoot;exports.restoreSelectionInRoot=i.restoreSelectionInRoot;exports.withPreservedSelection=i.withPreservedSelection;exports.buildVisibleToolbarItems=n.buildVisibleToolbarItems;exports.listCustomizableToolbarOptions=n.listCustomizableToolbarOptions;exports.normalizeToolbarItems=n.normalizeToolbarItems;exports.createInkAiPlugin=c.createInkAiPlugin;exports.inkAi=c.inkAi;exports.createDemoAiProvider=U.createDemoAiProvider;exports.createOpenAiProvider=G.createOpenAiProvider;exports.createInkServerAiProvider=v.createInkServerAiProvider;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { InkEditor } from './components';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export type {
|
|
2
|
+
export { Box, Button, Canvas, ContextMenu, Field, UndoIcon, RedoIcon, GripIcon, } from './common-components';
|
|
3
|
+
export type { BoxProps, ButtonProps, CanvasProps, ContextMenuItem, ContextMenuProps, FieldProps, } from './common-components';
|
|
4
|
+
export { applyTypoAutoFix, cn, buildTableHtml, getTableCellFromSelection, insertTableRow, insertTableColumn, deleteTableRow, deleteTableColumn, buildVisibleToolbarItems, captureSelectionInRoot, createInkId, createCommentThread, createTrackChange, InkHistoryStack, listCustomizableToolbarOptions, normalizeToolbarItems, resolveInkPremium, restoreSelectionInRoot, hasInkPremiumFeature, isInkPremiumLicenseKey, mintInkPremiumLicenseKey, themeTokensToStyle, sanitizePastedHtml, withPreservedSelection, } from './utils';
|
|
5
|
+
export type { SavedSelection } from './utils';
|
|
6
|
+
export { inkAi, createInkAiPlugin, createDemoAiProvider, createOpenAiProvider, createInkServerAiProvider, } from './plugins/ai';
|
|
7
|
+
export { INK_DEFAULT_TOOLBAR, INK_SIMPLE_TOOLBAR, INK_COLLAB_TOOLBAR, INK_HEADING_OPTIONS, INK_FONT_OPTIONS, INK_LIST_OPTIONS, INK_FIND_REPLACE_OPTIONS, INK_SLASH_COMMANDS, INK_AI_MODEL_CATALOG, INK_AI_DEMO_PROVIDER_ID, INK_AI_DEMO_MODEL_ID, INK_AI_OPENAI_PROVIDER_ID, INK_AI_OPENAI_PROVIDER_NAME, INK_AI_OPENAI_MODEL_GPT_4_1_MINI, INK_AI_OPENAI_MODEL_GPT_4_1, INK_AI_INK_SERVER_PROVIDER_ID, INK_TRANSLATE_LANGUAGES, INK_QUICK_ACTIONS, INK_DEFAULT_FEATURES, INK_DEFAULT_ICONS, INK_DEFAULT_COLOR_MODE, COLOR_MODE_LIGHT, COLOR_MODE_DARK, COLOR_MODE_SYSTEM, TOOLBAR_STORAGE_KEY_HIDDEN, TOOLBAR_STORAGE_KEY_ITEMS, INK_PREMIUM_FEATURES, INK_PREMIUM_LICENSE_PREFIX, TYPO_DICTIONARY, } from './constants';
|
|
8
|
+
export type { InkEditorProps, ToolbarOption, TypoFixResult, SlashCommandItem, InkAiCapability, InkAiRequest, InkAiResponse, InkAiAgent, InkAiPlugin, InkAiChatTurn, InkAiDiffSuggestion, InkAiReviewSuggestion, InkAiContextFile, InkAiDocumentSnapshot, InkAiModelCatalogEntry, InkAiProvider, InkAiConfig, InkAiUiTheme, InkCommentReply, InkCommentThread, InkTrackChange, InkTrackChangeType, InkFeaturesConfig, InkFeatureName, InkEditorVariant, InkEditorChrome, InkColorMode, InkAiPlacement, InkPremiumFeature, InkPasteMode, InkIconKey, InkIconMap, InkThemeTokens, InkPremiumConfig, InkResolvedPremium, InkImageUploadHandler, } from './types';
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,EAAE,EACF,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EACL,GAAG,EACH,MAAM,EACN,MAAM,EACN,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,EAAE,EACF,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,8BAA8B,EAC9B,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EACL,KAAK,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,gCAAgC,EAChC,2BAA2B,EAC3B,6BAA6B,EAC7B,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,49 +1,105 @@
|
|
|
1
|
-
import { InkEditor as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
1
|
+
import { InkEditor as r } from "./components/InkEditor/InkEditor.js";
|
|
2
|
+
import { Box as _ } from "./common-components/Box/Box.js";
|
|
3
|
+
import { Button as m } from "./common-components/Button/Button.js";
|
|
4
|
+
import { Canvas as E } from "./common-components/Canvas/Canvas.js";
|
|
5
|
+
import { Field as N } from "./common-components/Field/Field.js";
|
|
6
|
+
import { ContextMenu as p } from "./common-components/ContextMenu/ContextMenu.js";
|
|
7
|
+
import { UndoIcon as n } from "./common-components/icons/UndoIcon.js";
|
|
8
|
+
import { RedoIcon as f } from "./common-components/icons/RedoIcon.js";
|
|
9
|
+
import { GripIcon as l } from "./common-components/icons/GripIcon.js";
|
|
10
|
+
import { cn as D } from "./utils/cn.utils.js";
|
|
11
|
+
import { applyTypoAutoFix as L } from "./utils/typo.utils.js";
|
|
12
|
+
import { createInkId as S } from "./utils/id.utils.js";
|
|
13
|
+
import { buildTableHtml as C, deleteTableColumn as c, deleteTableRow as s, getTableCellFromSelection as d, insertTableColumn as u, insertTableRow as b } from "./utils/table.utils.js";
|
|
14
|
+
import { TOOLBAR_STORAGE_KEY_HIDDEN as F, TOOLBAR_STORAGE_KEY_ITEMS as U } from "./constants/toolbarMenu.const.js";
|
|
15
|
+
import { COLOR_MODE_DARK as B, COLOR_MODE_LIGHT as v, COLOR_MODE_SYSTEM as H, INK_DEFAULT_COLOR_MODE as y } from "./constants/colorMode.const.js";
|
|
16
|
+
import { TYPO_DICTIONARY as h } from "./constants/typos.const.js";
|
|
17
|
+
import { INK_FONT_OPTIONS as g } from "./constants/fonts.const.js";
|
|
18
|
+
import { INK_LIST_OPTIONS as z } from "./constants/lists.const.js";
|
|
19
|
+
import { INK_FIND_REPLACE_OPTIONS as X } from "./constants/findReplaceMenu.const.js";
|
|
20
|
+
import { INK_COLLAB_TOOLBAR as q, INK_DEFAULT_FEATURES as J, INK_DEFAULT_TOOLBAR as W, INK_HEADING_OPTIONS as Z, INK_QUICK_ACTIONS as $, INK_SIMPLE_TOOLBAR as ee, INK_SLASH_COMMANDS as oe, INK_TRANSLATE_LANGUAGES as re } from "./constants/defaults.const.js";
|
|
21
|
+
import { INK_AI_DEMO_MODEL_ID as _e, INK_AI_DEMO_PROVIDER_ID as te, INK_AI_MODEL_CATALOG as me } from "./constants/aiModels.const.js";
|
|
22
|
+
import { INK_AI_INK_SERVER_PROVIDER_ID as Ee, INK_AI_OPENAI_MODEL_GPT_4_1 as Ae, INK_AI_OPENAI_MODEL_GPT_4_1_MINI as Ne, INK_AI_OPENAI_PROVIDER_ID as Te, INK_AI_OPENAI_PROVIDER_NAME as pe } from "./constants/openai.const.js";
|
|
23
|
+
import { INK_PREMIUM_FEATURES as ne, INK_PREMIUM_LICENSE_PREFIX as xe } from "./constants/premium.const.js";
|
|
24
|
+
import { INK_DEFAULT_ICONS as Re } from "./constants/defaultIcons.js";
|
|
25
|
+
import { createTrackChange as ae } from "./utils/trackChanges.utils.js";
|
|
26
|
+
import { createCommentThread as Ke } from "./utils/comments.utils.js";
|
|
27
|
+
import { InkHistoryStack as Pe } from "./utils/history.utils.js";
|
|
28
|
+
import { hasInkPremiumFeature as Me, isInkPremiumLicenseKey as Ce, resolveInkPremium as ce, themeTokensToStyle as se } from "./utils/premium.utils.js";
|
|
29
|
+
import { mintInkPremiumLicenseKey as ue } from "./utils/license.utils.js";
|
|
30
|
+
import { sanitizePastedHtml as ke } from "./utils/paste.utils.js";
|
|
31
|
+
import { captureSelectionInRoot as Ue, restoreSelectionInRoot as Ge, withPreservedSelection as Be } from "./utils/selection.utils.js";
|
|
32
|
+
import { buildVisibleToolbarItems as He, listCustomizableToolbarOptions as ye, normalizeToolbarItems as Ve } from "./utils/toolbarStorage.utils.js";
|
|
33
|
+
import { createInkAiPlugin as Ye, inkAi as ge } from "./plugins/ai/aiPlugin.js";
|
|
34
|
+
import { createDemoAiProvider as ze } from "./plugins/ai/demoProvider.js";
|
|
35
|
+
import { createOpenAiProvider as Xe } from "./plugins/ai/openaiProvider.js";
|
|
36
|
+
import { createInkServerAiProvider as qe } from "./plugins/ai/inkServerProvider.js";
|
|
17
37
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
_ as Box,
|
|
39
|
+
m as Button,
|
|
40
|
+
B as COLOR_MODE_DARK,
|
|
41
|
+
v as COLOR_MODE_LIGHT,
|
|
42
|
+
H as COLOR_MODE_SYSTEM,
|
|
43
|
+
E as Canvas,
|
|
44
|
+
p as ContextMenu,
|
|
45
|
+
N as Field,
|
|
46
|
+
l as GripIcon,
|
|
47
|
+
_e as INK_AI_DEMO_MODEL_ID,
|
|
48
|
+
te as INK_AI_DEMO_PROVIDER_ID,
|
|
49
|
+
Ee as INK_AI_INK_SERVER_PROVIDER_ID,
|
|
50
|
+
me as INK_AI_MODEL_CATALOG,
|
|
51
|
+
Ae as INK_AI_OPENAI_MODEL_GPT_4_1,
|
|
52
|
+
Ne as INK_AI_OPENAI_MODEL_GPT_4_1_MINI,
|
|
53
|
+
Te as INK_AI_OPENAI_PROVIDER_ID,
|
|
54
|
+
pe as INK_AI_OPENAI_PROVIDER_NAME,
|
|
55
|
+
q as INK_COLLAB_TOOLBAR,
|
|
56
|
+
y as INK_DEFAULT_COLOR_MODE,
|
|
57
|
+
J as INK_DEFAULT_FEATURES,
|
|
58
|
+
Re as INK_DEFAULT_ICONS,
|
|
59
|
+
W as INK_DEFAULT_TOOLBAR,
|
|
60
|
+
X as INK_FIND_REPLACE_OPTIONS,
|
|
61
|
+
g as INK_FONT_OPTIONS,
|
|
62
|
+
Z as INK_HEADING_OPTIONS,
|
|
63
|
+
z as INK_LIST_OPTIONS,
|
|
64
|
+
ne as INK_PREMIUM_FEATURES,
|
|
65
|
+
xe as INK_PREMIUM_LICENSE_PREFIX,
|
|
66
|
+
$ as INK_QUICK_ACTIONS,
|
|
67
|
+
ee as INK_SIMPLE_TOOLBAR,
|
|
68
|
+
oe as INK_SLASH_COMMANDS,
|
|
69
|
+
re as INK_TRANSLATE_LANGUAGES,
|
|
70
|
+
r as InkEditor,
|
|
71
|
+
Pe as InkHistoryStack,
|
|
72
|
+
f as RedoIcon,
|
|
73
|
+
F as TOOLBAR_STORAGE_KEY_HIDDEN,
|
|
74
|
+
U as TOOLBAR_STORAGE_KEY_ITEMS,
|
|
75
|
+
h as TYPO_DICTIONARY,
|
|
76
|
+
n as UndoIcon,
|
|
77
|
+
L as applyTypoAutoFix,
|
|
78
|
+
C as buildTableHtml,
|
|
79
|
+
He as buildVisibleToolbarItems,
|
|
80
|
+
Ue as captureSelectionInRoot,
|
|
81
|
+
D as cn,
|
|
82
|
+
Ke as createCommentThread,
|
|
83
|
+
ze as createDemoAiProvider,
|
|
84
|
+
Ye as createInkAiPlugin,
|
|
85
|
+
S as createInkId,
|
|
86
|
+
qe as createInkServerAiProvider,
|
|
87
|
+
Xe as createOpenAiProvider,
|
|
88
|
+
ae as createTrackChange,
|
|
89
|
+
c as deleteTableColumn,
|
|
90
|
+
s as deleteTableRow,
|
|
91
|
+
d as getTableCellFromSelection,
|
|
92
|
+
Me as hasInkPremiumFeature,
|
|
93
|
+
ge as inkAi,
|
|
94
|
+
u as insertTableColumn,
|
|
95
|
+
b as insertTableRow,
|
|
96
|
+
Ce as isInkPremiumLicenseKey,
|
|
97
|
+
ye as listCustomizableToolbarOptions,
|
|
98
|
+
ue as mintInkPremiumLicenseKey,
|
|
99
|
+
Ve as normalizeToolbarItems,
|
|
100
|
+
ce as resolveInkPremium,
|
|
101
|
+
Ge as restoreSelectionInRoot,
|
|
102
|
+
ke as sanitizePastedHtml,
|
|
103
|
+
se as themeTokensToStyle,
|
|
104
|
+
Be as withPreservedSelection
|
|
49
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../constants/numbers.cjs"),o=require("../../constants/aiModels.const.cjs");require("../../constants/openai.const.cjs");require("react/jsx-runtime");const n=require("../../utils/id.utils.cjs");require("../../utils/paste.utils.cjs");require("react");require("react-dom");const g=t=>new Promise(r=>{window.setTimeout(r,t)}),m=t=>t.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim(),s=t=>`<p>${t}</p>`,D=async t=>{var l,d;await g(p.INK_DEMO_AI_DELAY_MS);const r=t.selectionHtml||t.html||"",i=m(r)||"your content",c=((l=t.prompt)==null?void 0:l.trim())||"";switch(t.capability){case"chat":{const e=c?`Demo assistant: regarding “${c.slice(0,120)}”, here’s a concise take based on the current document (${i.slice(0,80)}…). Connect your own LLM provider for production answers.`:`Demo assistant ready. Ask a question about: ${i.slice(0,100)}…`;return{text:e,turns:[{id:n.createInkId("turn"),role:"assistant",content:e,timestamp:Date.now(),capability:"chat"}],meta:{provider:o.INK_AI_DEMO_PROVIDER_ID,model:o.INK_AI_DEMO_MODEL_ID}}}case"summarize":{const e=s(`Summary (demo): ${i.slice(0,160)}${i.length>160?"…":""}`);return{html:e,text:m(e),diff:{id:n.createInkId("diff"),originalHtml:r,suggestedHtml:e,summary:"Demo summary of the selection"}}}case"expand":{const e=s(`${i} Additionally, this demo expansion adds clarifying context, examples, and a short closing sentence so you can preview apply/reject flows.`);return{html:e,diff:{id:n.createInkId("diff"),originalHtml:r,suggestedHtml:e,summary:"Demo expansion"}}}case"tone":{const e=s(`In a clearer, more professional tone: ${i}`);return{html:e,diff:{id:n.createInkId("diff"),originalHtml:r,suggestedHtml:e,summary:"Demo tone adjustment"}}}case"translate":{const e=((d=t.options)==null?void 0:d.language)||"Spanish",a=s(`[${e} demo] ${i}`);return{html:a,text:m(a),diff:{id:n.createInkId("diff"),originalHtml:r,suggestedHtml:a,summary:`Demo translation to ${e}`}}}case"review":return{text:"Demo review complete",reviewSuggestions:[{id:n.createInkId("rev"),message:"Consider shortening long sentences for clarity.",severity:"info",originalText:i.slice(0,40),suggestedText:i.slice(0,40)},{id:n.createInkId("rev"),message:"Possible passive voice — prefer active constructions.",severity:"warning",originalText:"was processed",suggestedText:"the team processed"}]};case"autocomplete":{const e=(c||i).trim(),u=[{match:/\bhi[,]?\s*how$/i,completion:" are you?"},{match:/\bhow are$/i,completion:" you today?"},{match:/\bthank$/i,completion:" you!"},{match:/\bplease$/i,completion:" review this draft."},{match:/\blet'?s$/i,completion:" continue with the next section."},{match:/\bin conclusion$/i,completion:", the key takeaway is clear."}].find(I=>I.match.test(e));return u?{text:u.completion,meta:{provider:o.INK_AI_DEMO_PROVIDER_ID,model:o.INK_AI_DEMO_MODEL_ID}}:e.length?{text:" — continue with a clear next phrase.",meta:{provider:o.INK_AI_DEMO_PROVIDER_ID,model:o.INK_AI_DEMO_MODEL_ID}}:{text:"Start typing to see a demo completion.",meta:{provider:o.INK_AI_DEMO_PROVIDER_ID,model:o.INK_AI_DEMO_MODEL_ID}}}case"suggestDiff":case"quickAction":case"rewrite":default:{const e=s(`Rewritten (demo): ${i}`);return{html:e,diff:{id:n.createInkId("diff"),originalHtml:r,suggestedHtml:e,summary:"Demo rewrite suggestion"}}}}},_=()=>({id:o.INK_AI_DEMO_PROVIDER_ID,name:"Ink Demo Provider",models:[{id:o.INK_AI_DEMO_MODEL_ID,provider:"demo",label:"Ink Demo (local)",family:"Demo"}],run:D});exports.createDemoAiProvider=_;
|