@atlaskit/editor-core 187.37.4 → 187.37.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 +15 -0
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/placeholder/index.js +5 -6
- package/dist/cjs/plugins/type-ahead/index.js +3 -0
- package/dist/cjs/ui/ContentStyles/index.js +25 -22
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/default.js +2 -2
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/es2019/plugins/placeholder/index.js +5 -6
- package/dist/es2019/plugins/type-ahead/index.js +4 -1
- package/dist/es2019/ui/ContentStyles/index.js +35 -5
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/default.js +2 -2
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +2 -2
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/esm/plugins/placeholder/index.js +5 -6
- package/dist/esm/plugins/type-ahead/index.js +4 -1
- package/dist/esm/ui/ContentStyles/index.js +12 -10
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +52 -4
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +1 -1
- package/dist/types/plugins/placeholder/index.d.ts +7 -5
- package/dist/types/ui/ContentStyles/index.d.ts +1 -0
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +60 -0
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/placeholder/index.d.ts +9 -6
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +1 -0
- package/package.json +4 -3
- package/dist/cjs/plugins/placeholder/styles.js +0 -13
- package/dist/cjs/plugins/rule/commands.js +0 -22
- package/dist/cjs/plugins/rule/index.js +0 -80
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +0 -76
- package/dist/cjs/plugins/rule/pm-plugins/keymap.js +0 -21
- package/dist/cjs/plugins/rule/styles.js +0 -16
- package/dist/es2019/plugins/placeholder/styles.js +0 -17
- package/dist/es2019/plugins/rule/commands.js +0 -11
- package/dist/es2019/plugins/rule/index.js +0 -71
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +0 -73
- package/dist/es2019/plugins/rule/pm-plugins/keymap.js +0 -11
- package/dist/es2019/plugins/rule/styles.js +0 -20
- package/dist/esm/plugins/placeholder/styles.js +0 -5
- package/dist/esm/plugins/rule/commands.js +0 -15
- package/dist/esm/plugins/rule/index.js +0 -72
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +0 -67
- package/dist/esm/plugins/rule/pm-plugins/keymap.js +0 -13
- package/dist/esm/plugins/rule/styles.js +0 -8
- package/dist/types/plugins/placeholder/styles.d.ts +0 -1
- package/dist/types/plugins/rule/commands.d.ts +0 -3
- package/dist/types/plugins/rule/index.d.ts +0 -13
- package/dist/types/plugins/rule/pm-plugins/input-rule.d.ts +0 -9
- package/dist/types/plugins/rule/pm-plugins/keymap.d.ts +0 -5
- package/dist/types/plugins/rule/styles.d.ts +0 -2
- package/dist/types-ts4.5/plugins/placeholder/styles.d.ts +0 -1
- package/dist/types-ts4.5/plugins/rule/commands.d.ts +0 -3
- package/dist/types-ts4.5/plugins/rule/index.d.ts +0 -16
- package/dist/types-ts4.5/plugins/rule/pm-plugins/input-rule.d.ts +0 -9
- package/dist/types-ts4.5/plugins/rule/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.5/plugins/rule/styles.d.ts +0 -2
|
@@ -16,7 +16,7 @@ import { typeAheadQuery } from '@atlaskit/adf-schema';
|
|
|
16
16
|
import { pluginKey as typeAheadPluginKey } from './pm-plugins/key';
|
|
17
17
|
import { inputRulePlugin } from './pm-plugins/input-rules';
|
|
18
18
|
import { TypeAheadPopup } from './ui/TypeAheadPopup';
|
|
19
|
-
import { getPluginState } from './utils';
|
|
19
|
+
import { getPluginState, isTypeAheadOpen } from './utils';
|
|
20
20
|
import { useItemInsert } from './ui/hooks/use-item-insert';
|
|
21
21
|
import { updateSelectedIndex } from './commands/update-selected-index';
|
|
22
22
|
import { StatsModifier } from './stats-modifier';
|
|
@@ -159,6 +159,9 @@ var typeAheadPlugin = function typeAheadPlugin(_ref4) {
|
|
|
159
159
|
commands: {
|
|
160
160
|
openTypeAheadAtCursor: openTypeAheadAtCursor
|
|
161
161
|
},
|
|
162
|
+
actions: {
|
|
163
|
+
isOpen: isTypeAheadOpen
|
|
164
|
+
},
|
|
162
165
|
contentComponent: function contentComponent(_ref7) {
|
|
163
166
|
var editorView = _ref7.editorView,
|
|
164
167
|
containerElement = _ref7.containerElement,
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
6
6
|
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
7
|
-
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
7
|
+
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
9
9
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
10
10
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
11
11
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
12
|
-
import { placeholderStyles } from '../../plugins/placeholder/styles';
|
|
13
12
|
import { blocktypeStyles } from '../../plugins/block-type/styles';
|
|
14
13
|
import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
15
|
-
import { ruleStyles } from '../../plugins/rule/styles';
|
|
16
14
|
import { mediaStyles } from '../../plugins/media/styles';
|
|
17
15
|
import { layoutStyles } from '../../plugins/layout/styles';
|
|
18
16
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
@@ -26,16 +24,20 @@ import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
|
|
|
26
24
|
import { statusStyles } from '../../plugins/status/styles';
|
|
27
25
|
import { dateStyles } from '../../plugins/date/styles';
|
|
28
26
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
29
|
-
import { linkSharedStyle, codeMarkSharedStyles } from '@atlaskit/editor-common/styles';
|
|
27
|
+
import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
30
28
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
31
29
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
32
|
-
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
30
|
+
import { N500, N30A, N200 } from '@atlaskit/theme/colors';
|
|
33
31
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
var ruleStyles = function ruleStyles(props) {
|
|
33
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), ruleSharedStyles(props), "var(--ds-space-050, 4px)", akEditorLineHeight, akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
|
|
34
|
+
};
|
|
35
|
+
var mentionsStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(N500, ")"), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(N30A, ")"), "var(--ds-text-subtle, ".concat(N500, ")"));
|
|
36
|
+
var listsStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n }\n"])), "var(--ds-space-050, 4px)", blockNodesVerticalMargin, browser.safari ? codeBlockInListSafariFix : '');
|
|
37
|
+
var emojiStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_NODE, EmojiSharedCssClassName.EMOJI_IMAGE, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
38
|
+
export var placeholderStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .ProseMirror .placeholder-decoration {\n color: ", ";\n width: 100%;\n pointer-events: none;\n user-select: none;\n\n .placeholder-android {\n pointer-events: none;\n outline: none;\n user-select: none;\n position: absolute;\n }\n }\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
37
39
|
var contentStyles = function contentStyles(props) {
|
|
38
|
-
return css(
|
|
40
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
39
41
|
theme: props.theme
|
|
40
42
|
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(props), codeMarkSharedStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles(props), telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
41
43
|
};
|
|
@@ -34,7 +34,7 @@ export type DefaultPresetPluginOptions = {
|
|
|
34
34
|
* Note: The order that presets are added determines
|
|
35
35
|
* their placement in the editor toolbar
|
|
36
36
|
*/
|
|
37
|
-
export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
|
|
37
|
+
export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "placeholder", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
|
|
38
38
|
pluginConfiguration: CodeBlockOptions;
|
|
39
39
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
40
40
|
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
@@ -89,8 +89,32 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
89
89
|
pluginConfiguration: ((editorView: import("prosemirror-view").EditorView) => void) | undefined;
|
|
90
90
|
}, ((editorView: import("prosemirror-view").EditorView) => void) | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
91
91
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
92
|
-
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
92
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"placeholder", {
|
|
93
|
+
pluginConfiguration: PlaceholderPluginOptions | undefined;
|
|
94
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
95
|
+
sharedState: {
|
|
96
|
+
hasFocus: boolean;
|
|
97
|
+
};
|
|
98
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
99
|
+
sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
|
|
100
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
101
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
102
|
+
actions: {
|
|
103
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
104
|
+
};
|
|
105
|
+
commands: {
|
|
106
|
+
openTypeAheadAtCursor: (props: {
|
|
107
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
108
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
109
|
+
query?: string | undefined;
|
|
110
|
+
}) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
111
|
+
};
|
|
112
|
+
}, TypeAheadPluginOptions | undefined>];
|
|
113
|
+
}, PlaceholderPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
93
114
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
115
|
+
actions: {
|
|
116
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
117
|
+
};
|
|
94
118
|
commands: {
|
|
95
119
|
openTypeAheadAtCursor: (props: {
|
|
96
120
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
@@ -162,7 +186,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
162
186
|
};
|
|
163
187
|
sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
|
|
164
188
|
}, HyperlinkPluginOptions | undefined>, ...import("@atlaskit/editor-common/types").AllEditorPresetPluginTypes[]]>;
|
|
165
|
-
export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
|
|
189
|
+
export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "placeholder", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBlock", {
|
|
166
190
|
pluginConfiguration: CodeBlockOptions;
|
|
167
191
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
168
192
|
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
@@ -217,8 +241,32 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
217
241
|
pluginConfiguration: ((editorView: import("prosemirror-view").EditorView) => void) | undefined;
|
|
218
242
|
}, ((editorView: import("prosemirror-view").EditorView) => void) | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
219
243
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
220
|
-
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
244
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"placeholder", {
|
|
245
|
+
pluginConfiguration: PlaceholderPluginOptions | undefined;
|
|
246
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
247
|
+
sharedState: {
|
|
248
|
+
hasFocus: boolean;
|
|
249
|
+
};
|
|
250
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
251
|
+
sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
|
|
252
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
253
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
254
|
+
actions: {
|
|
255
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
256
|
+
};
|
|
257
|
+
commands: {
|
|
258
|
+
openTypeAheadAtCursor: (props: {
|
|
259
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
260
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
261
|
+
query?: string | undefined;
|
|
262
|
+
}) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
263
|
+
};
|
|
264
|
+
}, TypeAheadPluginOptions | undefined>];
|
|
265
|
+
}, PlaceholderPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
221
266
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
267
|
+
actions: {
|
|
268
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
269
|
+
};
|
|
222
270
|
commands: {
|
|
223
271
|
openTypeAheadAtCursor: (props: {
|
|
224
272
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
@@ -20,7 +20,6 @@ export { default as panelPlugin } from './panel';
|
|
|
20
20
|
export { default as pastePlugin } from './paste';
|
|
21
21
|
export { default as placeholderPlugin } from './placeholder';
|
|
22
22
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
23
|
-
export { default as rulePlugin } from './rule';
|
|
24
23
|
export { default as quickInsertPlugin } from './quick-insert';
|
|
25
24
|
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
26
25
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
@@ -11,7 +11,7 @@ import type quickInsertPlugin from '../quick-insert';
|
|
|
11
11
|
import type blockTypePlugin from '../block-type';
|
|
12
12
|
import type codeBlockPlugin from '../code-block';
|
|
13
13
|
import type panelPlugin from '../panel';
|
|
14
|
-
import type { RulePlugin } from '
|
|
14
|
+
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
export type InsertBlockPluginDependencies = [
|
|
16
16
|
FeatureFlagsPlugin,
|
|
17
17
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -3,18 +3,20 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { NextEditorPlugin, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type {
|
|
6
|
+
import type { FocusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
7
|
+
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
7
8
|
export declare const pluginKey: PluginKey<any>;
|
|
8
|
-
import type {
|
|
9
|
+
import type { CompositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
9
10
|
export declare const placeholderTestId = "placeholder-test-id";
|
|
10
11
|
export declare function createPlaceholderDecoration(editorState: EditorState, placeholderText: string, pos?: number): DecorationSet;
|
|
11
|
-
export declare function createPlugin(defaultPlaceholderText?: string, bracketPlaceholderText?: string, api?: ExtractInjectionAPI<
|
|
12
|
+
export declare function createPlugin(defaultPlaceholderText?: string, bracketPlaceholderText?: string, api?: ExtractInjectionAPI<PlaceholderPlugin>): SafePlugin | undefined;
|
|
12
13
|
export interface PlaceholderPluginOptions {
|
|
13
14
|
placeholder?: string;
|
|
14
15
|
placeholderBracketHint?: string;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
type PlaceholderPlugin = NextEditorPlugin<'placeholder', {
|
|
17
18
|
pluginConfiguration: PlaceholderPluginOptions | undefined;
|
|
18
|
-
dependencies: [
|
|
19
|
+
dependencies: [FocusPlugin, CompositionPlugin, TypeAheadPlugin];
|
|
19
20
|
}>;
|
|
21
|
+
declare const placeholderPlugin: PlaceholderPlugin;
|
|
20
22
|
export default placeholderPlugin;
|
|
@@ -7,6 +7,7 @@ type ContentStylesProps = {
|
|
|
7
7
|
theme?: any;
|
|
8
8
|
featureFlags?: FeatureFlags;
|
|
9
9
|
};
|
|
10
|
+
export declare const placeholderStyles: SerializedStyles;
|
|
10
11
|
type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
|
|
11
12
|
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
|
12
13
|
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -41,6 +41,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
41
41
|
"width",
|
|
42
42
|
"quickInsert",
|
|
43
43
|
"typeAhead",
|
|
44
|
+
"placeholder",
|
|
44
45
|
"unsupportedContent",
|
|
45
46
|
"editorDisabled",
|
|
46
47
|
"submitEditor",
|
|
@@ -122,8 +123,37 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
122
123
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
123
124
|
}, undefined>,
|
|
124
125
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>,
|
|
126
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"placeholder", {
|
|
127
|
+
pluginConfiguration: PlaceholderPluginOptions | undefined;
|
|
128
|
+
dependencies: [
|
|
129
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
130
|
+
sharedState: {
|
|
131
|
+
hasFocus: boolean;
|
|
132
|
+
};
|
|
133
|
+
}, undefined>,
|
|
134
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
135
|
+
sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
|
|
136
|
+
}, undefined>,
|
|
137
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
138
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
139
|
+
actions: {
|
|
140
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
141
|
+
};
|
|
142
|
+
commands: {
|
|
143
|
+
openTypeAheadAtCursor: (props: {
|
|
144
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
145
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
146
|
+
query?: string | undefined;
|
|
147
|
+
}) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
148
|
+
};
|
|
149
|
+
}, TypeAheadPluginOptions | undefined>
|
|
150
|
+
];
|
|
151
|
+
}, PlaceholderPluginOptions | undefined>,
|
|
125
152
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
126
153
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
154
|
+
actions: {
|
|
155
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
156
|
+
};
|
|
127
157
|
commands: {
|
|
128
158
|
openTypeAheadAtCursor: (props: {
|
|
129
159
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
@@ -217,6 +247,7 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
217
247
|
"width",
|
|
218
248
|
"quickInsert",
|
|
219
249
|
"typeAhead",
|
|
250
|
+
"placeholder",
|
|
220
251
|
"unsupportedContent",
|
|
221
252
|
"editorDisabled",
|
|
222
253
|
"submitEditor",
|
|
@@ -298,8 +329,37 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
298
329
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
299
330
|
}, undefined>,
|
|
300
331
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>,
|
|
332
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"placeholder", {
|
|
333
|
+
pluginConfiguration: PlaceholderPluginOptions | undefined;
|
|
334
|
+
dependencies: [
|
|
335
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
336
|
+
sharedState: {
|
|
337
|
+
hasFocus: boolean;
|
|
338
|
+
};
|
|
339
|
+
}, undefined>,
|
|
340
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
341
|
+
sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
|
|
342
|
+
}, undefined>,
|
|
343
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
344
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
345
|
+
actions: {
|
|
346
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
347
|
+
};
|
|
348
|
+
commands: {
|
|
349
|
+
openTypeAheadAtCursor: (props: {
|
|
350
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
351
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
352
|
+
query?: string | undefined;
|
|
353
|
+
}) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
354
|
+
};
|
|
355
|
+
}, TypeAheadPluginOptions | undefined>
|
|
356
|
+
];
|
|
357
|
+
}, PlaceholderPluginOptions | undefined>,
|
|
301
358
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
302
359
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
360
|
+
actions: {
|
|
361
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
362
|
+
};
|
|
303
363
|
commands: {
|
|
304
364
|
openTypeAheadAtCursor: (props: {
|
|
305
365
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
@@ -20,7 +20,6 @@ export { default as panelPlugin } from './panel';
|
|
|
20
20
|
export { default as pastePlugin } from './paste';
|
|
21
21
|
export { default as placeholderPlugin } from './placeholder';
|
|
22
22
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
23
|
-
export { default as rulePlugin } from './rule';
|
|
24
23
|
export { default as quickInsertPlugin } from './quick-insert';
|
|
25
24
|
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
26
25
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
@@ -11,7 +11,7 @@ import type quickInsertPlugin from '../quick-insert';
|
|
|
11
11
|
import type blockTypePlugin from '../block-type';
|
|
12
12
|
import type codeBlockPlugin from '../code-block';
|
|
13
13
|
import type panelPlugin from '../panel';
|
|
14
|
-
import type { RulePlugin } from '
|
|
14
|
+
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
export type InsertBlockPluginDependencies = [
|
|
16
16
|
FeatureFlagsPlugin,
|
|
17
17
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -3,21 +3,24 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { NextEditorPlugin, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type {
|
|
6
|
+
import type { FocusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
7
|
+
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
7
8
|
export declare const pluginKey: PluginKey<any>;
|
|
8
|
-
import type {
|
|
9
|
+
import type { CompositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
9
10
|
export declare const placeholderTestId = "placeholder-test-id";
|
|
10
11
|
export declare function createPlaceholderDecoration(editorState: EditorState, placeholderText: string, pos?: number): DecorationSet;
|
|
11
|
-
export declare function createPlugin(defaultPlaceholderText?: string, bracketPlaceholderText?: string, api?: ExtractInjectionAPI<
|
|
12
|
+
export declare function createPlugin(defaultPlaceholderText?: string, bracketPlaceholderText?: string, api?: ExtractInjectionAPI<PlaceholderPlugin>): SafePlugin | undefined;
|
|
12
13
|
export interface PlaceholderPluginOptions {
|
|
13
14
|
placeholder?: string;
|
|
14
15
|
placeholderBracketHint?: string;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
type PlaceholderPlugin = NextEditorPlugin<'placeholder', {
|
|
17
18
|
pluginConfiguration: PlaceholderPluginOptions | undefined;
|
|
18
19
|
dependencies: [
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
FocusPlugin,
|
|
21
|
+
CompositionPlugin,
|
|
22
|
+
TypeAheadPlugin
|
|
21
23
|
];
|
|
22
24
|
}>;
|
|
25
|
+
declare const placeholderPlugin: PlaceholderPlugin;
|
|
23
26
|
export default placeholderPlugin;
|
|
@@ -7,6 +7,7 @@ type ContentStylesProps = {
|
|
|
7
7
|
theme?: any;
|
|
8
8
|
featureFlags?: FeatureFlags;
|
|
9
9
|
};
|
|
10
|
+
export declare const placeholderStyles: SerializedStyles;
|
|
10
11
|
type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
|
|
11
12
|
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
|
12
13
|
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.37.
|
|
3
|
+
"version": "187.37.6",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -76,9 +76,10 @@
|
|
|
76
76
|
"@atlaskit/editor-plugin-hyperlink": "^0.4.0",
|
|
77
77
|
"@atlaskit/editor-plugin-image-upload": "^0.2.0",
|
|
78
78
|
"@atlaskit/editor-plugin-list": "^1.2.0",
|
|
79
|
+
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
79
80
|
"@atlaskit/editor-plugin-table": "^2.12.0",
|
|
80
81
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
81
|
-
"@atlaskit/editor-plugin-type-ahead": "^0.
|
|
82
|
+
"@atlaskit/editor-plugin-type-ahead": "^0.3.0",
|
|
82
83
|
"@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
|
|
83
84
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
84
85
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
@@ -116,7 +117,7 @@
|
|
|
116
117
|
"@atlaskit/textfield": "^5.6.0",
|
|
117
118
|
"@atlaskit/theme": "^12.6.0",
|
|
118
119
|
"@atlaskit/toggle": "^12.6.0",
|
|
119
|
-
"@atlaskit/tokens": "^1.
|
|
120
|
+
"@atlaskit/tokens": "^1.20.0",
|
|
120
121
|
"@atlaskit/tooltip": "^17.8.0",
|
|
121
122
|
"@atlaskit/width-detector": "^4.1.0",
|
|
122
123
|
"@babel/runtime": "^7.0.0",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.placeholderStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var _templateObject;
|
|
12
|
-
var placeholderStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .placeholder-decoration {\n color: ", ";\n width: 100%;\n pointer-events: none;\n user-select: none;\n\n .placeholder-android {\n pointer-events: none;\n outline: none;\n user-select: none;\n position: absolute;\n }\n }\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"));
|
|
13
|
-
exports.placeholderStyles = placeholderStyles;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.insertHorizontalRule = void 0;
|
|
7
|
-
var _inputRule = require("./pm-plugins/input-rule");
|
|
8
|
-
var insertHorizontalRule = function insertHorizontalRule(featureFlags, editorAnalyticsAPI) {
|
|
9
|
-
return function (inputMethod) {
|
|
10
|
-
return function (state, dispatch) {
|
|
11
|
-
var tr = (0, _inputRule.createHorizontalRule)(state, featureFlags, state.selection.from, state.selection.to, inputMethod, editorAnalyticsAPI);
|
|
12
|
-
if (tr) {
|
|
13
|
-
if (dispatch) {
|
|
14
|
-
dispatch(tr);
|
|
15
|
-
}
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.insertHorizontalRule = insertHorizontalRule;
|