@atlaskit/editor-core 187.37.5 → 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 +7 -0
- package/dist/cjs/labs/next/presets/default.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 +19 -18
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/default.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 +16 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/default.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 +4 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +52 -4
- 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/placeholder/index.d.ts +9 -6
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +1 -0
- package/package.json +3 -3
- package/dist/cjs/plugins/placeholder/styles.js +0 -13
- package/dist/es2019/plugins/placeholder/styles.js +0 -17
- package/dist/esm/plugins/placeholder/styles.js +0 -5
- package/dist/types/plugins/placeholder/styles.d.ts +0 -1
- package/dist/types-ts4.5/plugins/placeholder/styles.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.37.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef0c2a89c72`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ef0c2a89c72) - Add isTypeAheadOpen action to type-ahead plugin. Decouple placeholder plugin from editor-core.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 187.37.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -69,14 +69,14 @@ function createDefaultPreset(options) {
|
|
|
69
69
|
return builder.add(p);
|
|
70
70
|
}
|
|
71
71
|
return builder;
|
|
72
|
-
}).add([_blockType.default, options.blockType]).add(
|
|
72
|
+
}).add([_blockType.default, options.blockType]).add(_clearMarksOnChangeToEmptyDocument.default).maybeAdd(_annotation.default, function (p, builder) {
|
|
73
73
|
if (options.annotationProviders) {
|
|
74
74
|
return builder.add([p, options.annotationProviders]);
|
|
75
75
|
}
|
|
76
76
|
return builder;
|
|
77
77
|
}).add([_editorPluginHyperlink.hyperlinkPlugin, options.hyperlinkOptions]).add([_editorPluginTextFormatting.textFormattingPlugin, options.textFormatting]).add(_editorPluginWidth.widthPlugin).add([_quickInsert.default, options.quickInsert]).add([_typeAhead.default, options.typeAhead || {
|
|
78
78
|
createAnalyticsEvent: options.createAnalyticsEvent
|
|
79
|
-
}]).add(_editorPluginUnsupportedContent.unsupportedContentPlugin).add(_editorPluginEditorDisabled.editorDisabledPlugin).add([_submitEditor.default, options.submitEditor]).add(_fakeTextCursor.default).add(_floatingToolbar.default).add([_selection.default, options.selection]).add([_codeBlock.default, options.codeBlock || {
|
|
79
|
+
}]).add([_placeholder.default, options.placeholder]).add(_editorPluginUnsupportedContent.unsupportedContentPlugin).add(_editorPluginEditorDisabled.editorDisabledPlugin).add([_submitEditor.default, options.submitEditor]).add(_fakeTextCursor.default).add(_floatingToolbar.default).add([_selection.default, options.selection]).add([_codeBlock.default, options.codeBlock || {
|
|
80
80
|
appearance: 'full-page'
|
|
81
81
|
}]);
|
|
82
82
|
return preset;
|
|
@@ -10,7 +10,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
10
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
13
|
-
var _utils2 = require("../type-ahead/utils");
|
|
14
13
|
var pluginKey = new _state.PluginKey('placeholderPlugin');
|
|
15
14
|
exports.pluginKey = pluginKey;
|
|
16
15
|
function getPlaceholderState(editorState) {
|
|
@@ -60,8 +59,8 @@ function setPlaceHolderState(placeholderText, pos) {
|
|
|
60
59
|
var emptyPlaceholder = {
|
|
61
60
|
hasPlaceholder: false
|
|
62
61
|
};
|
|
63
|
-
function createPlaceHolderStateFrom(isEditorFocused, editorState, defaultPlaceholderText, bracketPlaceholderText) {
|
|
64
|
-
if (
|
|
62
|
+
function createPlaceHolderStateFrom(isEditorFocused, editorState, isTypeAheadOpen, defaultPlaceholderText, bracketPlaceholderText) {
|
|
63
|
+
if (isTypeAheadOpen !== null && isTypeAheadOpen !== void 0 && isTypeAheadOpen(editorState)) {
|
|
65
64
|
return emptyPlaceholder;
|
|
66
65
|
}
|
|
67
66
|
if (defaultPlaceholderText && (0, _utils.isEmptyDocument)(editorState.doc)) {
|
|
@@ -84,7 +83,7 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
|
|
|
84
83
|
state: {
|
|
85
84
|
init: function init(_, state) {
|
|
86
85
|
var _api$focus, _api$focus$sharedStat;
|
|
87
|
-
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
|
|
86
|
+
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
88
87
|
},
|
|
89
88
|
apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
|
|
90
89
|
var _api$focus2, _api$focus2$sharedSta;
|
|
@@ -95,10 +94,10 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
|
|
|
95
94
|
return emptyPlaceholder;
|
|
96
95
|
}
|
|
97
96
|
if (meta.applyPlaceholderIfEmpty) {
|
|
98
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, defaultPlaceholderText, bracketPlaceholderText);
|
|
97
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, defaultPlaceholderText, bracketPlaceholderText);
|
|
100
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
102
101
|
}
|
|
103
102
|
},
|
|
104
103
|
props: {
|
|
@@ -173,6 +173,9 @@ var typeAheadPlugin = function typeAheadPlugin(_ref4) {
|
|
|
173
173
|
commands: {
|
|
174
174
|
openTypeAheadAtCursor: _openTypeaheadAtCursor.openTypeAheadAtCursor
|
|
175
175
|
},
|
|
176
|
+
actions: {
|
|
177
|
+
isOpen: _utils.isTypeAheadOpen
|
|
178
|
+
},
|
|
176
179
|
contentComponent: function contentComponent(_ref7) {
|
|
177
180
|
var editorView = _ref7.editorView,
|
|
178
181
|
containerElement = _ref7.containerElement,
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.linkStyles = exports.default = exports.createEditorContentStyle = void 0;
|
|
8
|
+
exports.placeholderStyles = exports.linkStyles = exports.default = exports.createEditorContentStyle = void 0;
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
@@ -15,26 +15,25 @@ var _mention = require("@atlaskit/editor-common/mention");
|
|
|
15
15
|
var _styles2 = require("../../plugins/collab-edit/styles");
|
|
16
16
|
var _styles3 = require("../../plugins/selection/gap-cursor/styles");
|
|
17
17
|
var _commonStyles = require("@atlaskit/editor-plugin-table/ui/common-styles");
|
|
18
|
-
var _styles4 = require("../../plugins/
|
|
19
|
-
var _styles5 = require("../../plugins/block
|
|
20
|
-
var _styles6 = require("../../plugins/
|
|
21
|
-
var _styles7 = require("../../plugins/
|
|
22
|
-
var _styles8 = require("../../plugins/
|
|
23
|
-
var _styles9 = require("../../plugins/
|
|
24
|
-
var _styles10 = require("../../plugins/
|
|
25
|
-
var _styles11 = require("../../plugins/
|
|
26
|
-
var _styles12 = require("../../plugins/
|
|
27
|
-
var _styles13 = require("../../plugins/expand/ui/styles");
|
|
18
|
+
var _styles4 = require("../../plugins/block-type/styles");
|
|
19
|
+
var _styles5 = require("../../plugins/code-block/styles");
|
|
20
|
+
var _styles6 = require("../../plugins/media/styles");
|
|
21
|
+
var _styles7 = require("../../plugins/layout/styles");
|
|
22
|
+
var _styles8 = require("../../plugins/panel/styles");
|
|
23
|
+
var _styles9 = require("../../plugins/fake-text-cursor/styles");
|
|
24
|
+
var _styles10 = require("../../plugins/placeholder-text/styles");
|
|
25
|
+
var _styles11 = require("../../plugins/extension/ui/styles");
|
|
26
|
+
var _styles12 = require("../../plugins/expand/ui/styles");
|
|
28
27
|
var _style = require("../../plugins/media/pm-plugins/alt-text/style");
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
28
|
+
var _styles13 = require("../../plugins/find-replace/styles");
|
|
29
|
+
var _styles14 = require("../../plugins/tasks-and-decisions/styles");
|
|
30
|
+
var _styles15 = require("../../plugins/status/styles");
|
|
31
|
+
var _styles16 = require("../../plugins/date/styles");
|
|
33
32
|
var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
|
|
34
33
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
35
34
|
var _emoji = require("@atlaskit/editor-common/emoji");
|
|
36
35
|
var _colors = require("@atlaskit/theme/colors");
|
|
37
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
36
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
38
37
|
/** @jsx jsx */
|
|
39
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
40
39
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -46,10 +45,12 @@ var ruleStyles = function ruleStyles(props) {
|
|
|
46
45
|
var mentionsStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(_colors.N500, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(_colors.N30A, ")"), "var(--ds-text-subtle, ".concat(_colors.N500, ")"));
|
|
47
46
|
var listsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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)", _editorSharedStyles.blockNodesVerticalMargin, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
48
47
|
var emojiStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\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"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_NODE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
|
|
48
|
+
var placeholderStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (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, ")"));
|
|
49
|
+
exports.placeholderStyles = placeholderStyles;
|
|
49
50
|
var contentStyles = function contentStyles(props) {
|
|
50
|
-
return (0, _react2.css)(
|
|
51
|
+
return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _editorSharedStyles.editorFontSize)({
|
|
51
52
|
theme: props.theme
|
|
52
|
-
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)",
|
|
53
|
+
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles10.placeholderTextStyles, placeholderStyles, (0, _styles5.codeBlockStyles)(props), (0, _styles4.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _styles6.mediaStyles, (0, _styles7.layoutStyles)(props), _styles2.telepointerStyle, _styles3.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles8.panelStyles)(props), _styles9.fakeCursorStyles, mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles11.extensionStyles, (0, _styles12.expandStyles)(props), _styles13.findReplaceStyles, _styles14.taskDecisionStyles, _styles15.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _styles16.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _style.ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
53
54
|
};
|
|
54
55
|
var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
55
56
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.37.
|
|
9
|
+
var version = "187.37.6";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
@@ -65,14 +65,14 @@ export function createDefaultPreset(options) {
|
|
|
65
65
|
return builder.add(p);
|
|
66
66
|
}
|
|
67
67
|
return builder;
|
|
68
|
-
}).add([blockTypePlugin, options.blockType]).add(
|
|
68
|
+
}).add([blockTypePlugin, options.blockType]).add(clearMarksOnChangeToEmptyDocumentPlugin).maybeAdd(annotationPlugin, (p, builder) => {
|
|
69
69
|
if (options.annotationProviders) {
|
|
70
70
|
return builder.add([p, options.annotationProviders]);
|
|
71
71
|
}
|
|
72
72
|
return builder;
|
|
73
73
|
}).add([hyperlinkPlugin, options.hyperlinkOptions]).add([textFormattingPlugin, options.textFormatting]).add(widthPlugin).add([quickInsertPlugin, options.quickInsert]).add([typeAheadPlugin, options.typeAhead || {
|
|
74
74
|
createAnalyticsEvent: options.createAnalyticsEvent
|
|
75
|
-
}]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(fakeTextCursorPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
|
|
75
|
+
}]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(fakeTextCursorPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
|
|
76
76
|
appearance: 'full-page'
|
|
77
77
|
}]);
|
|
78
78
|
return preset;
|
|
@@ -3,7 +3,6 @@ import { browser, isEmptyDocument, bracketTyped } from '@atlaskit/editor-common/
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
export const pluginKey = new PluginKey('placeholderPlugin');
|
|
6
|
-
import { isTypeAheadOpen } from '../type-ahead/utils';
|
|
7
6
|
function getPlaceholderState(editorState) {
|
|
8
7
|
return pluginKey.getState(editorState);
|
|
9
8
|
}
|
|
@@ -49,8 +48,8 @@ function setPlaceHolderState(placeholderText, pos) {
|
|
|
49
48
|
const emptyPlaceholder = {
|
|
50
49
|
hasPlaceholder: false
|
|
51
50
|
};
|
|
52
|
-
function createPlaceHolderStateFrom(isEditorFocused, editorState, defaultPlaceholderText, bracketPlaceholderText) {
|
|
53
|
-
if (isTypeAheadOpen(editorState)) {
|
|
51
|
+
function createPlaceHolderStateFrom(isEditorFocused, editorState, isTypeAheadOpen, defaultPlaceholderText, bracketPlaceholderText) {
|
|
52
|
+
if (isTypeAheadOpen !== null && isTypeAheadOpen !== void 0 && isTypeAheadOpen(editorState)) {
|
|
54
53
|
return emptyPlaceholder;
|
|
55
54
|
}
|
|
56
55
|
if (defaultPlaceholderText && isEmptyDocument(editorState.doc)) {
|
|
@@ -75,7 +74,7 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
75
74
|
state: {
|
|
76
75
|
init: (_, state) => {
|
|
77
76
|
var _api$focus, _api$focus$sharedStat;
|
|
78
|
-
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
|
|
77
|
+
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
79
78
|
},
|
|
80
79
|
apply: (tr, _oldPluginState, _oldEditorState, newEditorState) => {
|
|
81
80
|
var _api$focus2, _api$focus2$sharedSta;
|
|
@@ -86,10 +85,10 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
86
85
|
return emptyPlaceholder;
|
|
87
86
|
}
|
|
88
87
|
if (meta.applyPlaceholderIfEmpty) {
|
|
89
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, defaultPlaceholderText, bracketPlaceholderText);
|
|
88
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, defaultPlaceholderText, bracketPlaceholderText);
|
|
91
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
93
92
|
}
|
|
94
93
|
},
|
|
95
94
|
props: {
|
|
@@ -15,7 +15,7 @@ import { typeAheadQuery } from '@atlaskit/adf-schema';
|
|
|
15
15
|
import { pluginKey as typeAheadPluginKey } from './pm-plugins/key';
|
|
16
16
|
import { inputRulePlugin } from './pm-plugins/input-rules';
|
|
17
17
|
import { TypeAheadPopup } from './ui/TypeAheadPopup';
|
|
18
|
-
import { getPluginState } from './utils';
|
|
18
|
+
import { getPluginState, isTypeAheadOpen } from './utils';
|
|
19
19
|
import { useItemInsert } from './ui/hooks/use-item-insert';
|
|
20
20
|
import { updateSelectedIndex } from './commands/update-selected-index';
|
|
21
21
|
import { StatsModifier } from './stats-modifier';
|
|
@@ -155,6 +155,9 @@ const typeAheadPlugin = ({
|
|
|
155
155
|
commands: {
|
|
156
156
|
openTypeAheadAtCursor
|
|
157
157
|
},
|
|
158
|
+
actions: {
|
|
159
|
+
isOpen: isTypeAheadOpen
|
|
160
|
+
},
|
|
158
161
|
contentComponent({
|
|
159
162
|
editorView,
|
|
160
163
|
containerElement,
|
|
@@ -7,7 +7,6 @@ import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
|
7
7
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
8
8
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
9
9
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
10
|
-
import { placeholderStyles } from '../../plugins/placeholder/styles';
|
|
11
10
|
import { blocktypeStyles } from '../../plugins/block-type/styles';
|
|
12
11
|
import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
13
12
|
import { mediaStyles } from '../../plugins/media/styles';
|
|
@@ -26,7 +25,7 @@ import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewPro
|
|
|
26
25
|
import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
27
26
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
28
27
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
29
|
-
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
28
|
+
import { N500, N30A, N200 } from '@atlaskit/theme/colors';
|
|
30
29
|
export const linkStyles = css`
|
|
31
30
|
.ProseMirror {
|
|
32
31
|
${linkSharedStyle}
|
|
@@ -118,6 +117,21 @@ const emojiStyles = css`
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
`;
|
|
120
|
+
export const placeholderStyles = css`
|
|
121
|
+
.ProseMirror .placeholder-decoration {
|
|
122
|
+
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
123
|
+
width: 100%;
|
|
124
|
+
pointer-events: none;
|
|
125
|
+
user-select: none;
|
|
126
|
+
|
|
127
|
+
.placeholder-android {
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
outline: none;
|
|
130
|
+
user-select: none;
|
|
131
|
+
position: absolute;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`;
|
|
121
135
|
const contentStyles = props => css`
|
|
122
136
|
.ProseMirror {
|
|
123
137
|
outline: none;
|
|
@@ -61,14 +61,14 @@ export function createDefaultPreset(options) {
|
|
|
61
61
|
return builder.add(p);
|
|
62
62
|
}
|
|
63
63
|
return builder;
|
|
64
|
-
}).add([blockTypePlugin, options.blockType]).add(
|
|
64
|
+
}).add([blockTypePlugin, options.blockType]).add(clearMarksOnChangeToEmptyDocumentPlugin).maybeAdd(annotationPlugin, function (p, builder) {
|
|
65
65
|
if (options.annotationProviders) {
|
|
66
66
|
return builder.add([p, options.annotationProviders]);
|
|
67
67
|
}
|
|
68
68
|
return builder;
|
|
69
69
|
}).add([hyperlinkPlugin, options.hyperlinkOptions]).add([textFormattingPlugin, options.textFormatting]).add(widthPlugin).add([quickInsertPlugin, options.quickInsert]).add([typeAheadPlugin, options.typeAhead || {
|
|
70
70
|
createAnalyticsEvent: options.createAnalyticsEvent
|
|
71
|
-
}]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(fakeTextCursorPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
|
|
71
|
+
}]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(fakeTextCursorPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
|
|
72
72
|
appearance: 'full-page'
|
|
73
73
|
}]);
|
|
74
74
|
return preset;
|
|
@@ -3,7 +3,6 @@ import { browser, isEmptyDocument, bracketTyped } from '@atlaskit/editor-common/
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
export var pluginKey = new PluginKey('placeholderPlugin');
|
|
6
|
-
import { isTypeAheadOpen } from '../type-ahead/utils';
|
|
7
6
|
function getPlaceholderState(editorState) {
|
|
8
7
|
return pluginKey.getState(editorState);
|
|
9
8
|
}
|
|
@@ -50,8 +49,8 @@ function setPlaceHolderState(placeholderText, pos) {
|
|
|
50
49
|
var emptyPlaceholder = {
|
|
51
50
|
hasPlaceholder: false
|
|
52
51
|
};
|
|
53
|
-
function createPlaceHolderStateFrom(isEditorFocused, editorState, defaultPlaceholderText, bracketPlaceholderText) {
|
|
54
|
-
if (isTypeAheadOpen(editorState)) {
|
|
52
|
+
function createPlaceHolderStateFrom(isEditorFocused, editorState, isTypeAheadOpen, defaultPlaceholderText, bracketPlaceholderText) {
|
|
53
|
+
if (isTypeAheadOpen !== null && isTypeAheadOpen !== void 0 && isTypeAheadOpen(editorState)) {
|
|
55
54
|
return emptyPlaceholder;
|
|
56
55
|
}
|
|
57
56
|
if (defaultPlaceholderText && isEmptyDocument(editorState.doc)) {
|
|
@@ -74,7 +73,7 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
74
73
|
state: {
|
|
75
74
|
init: function init(_, state) {
|
|
76
75
|
var _api$focus, _api$focus$sharedStat;
|
|
77
|
-
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
|
|
76
|
+
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
78
77
|
},
|
|
79
78
|
apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
|
|
80
79
|
var _api$focus2, _api$focus2$sharedSta;
|
|
@@ -85,10 +84,10 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
85
84
|
return emptyPlaceholder;
|
|
86
85
|
}
|
|
87
86
|
if (meta.applyPlaceholderIfEmpty) {
|
|
88
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, defaultPlaceholderText, bracketPlaceholderText);
|
|
87
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, defaultPlaceholderText, bracketPlaceholderText);
|
|
90
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
92
91
|
}
|
|
93
92
|
},
|
|
94
93
|
props: {
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
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';
|
|
@@ -9,7 +9,6 @@ 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
14
|
import { mediaStyles } from '../../plugins/media/styles';
|
|
@@ -28,7 +27,7 @@ import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewPro
|
|
|
28
27
|
import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
29
28
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
30
29
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
31
|
-
import { N500, N30A } from '@atlaskit/theme/colors';
|
|
30
|
+
import { N500, N30A, N200 } from '@atlaskit/theme/colors';
|
|
32
31
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
|
|
33
32
|
var ruleStyles = function ruleStyles(props) {
|
|
34
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, ")"));
|
|
@@ -36,8 +35,9 @@ var ruleStyles = function ruleStyles(props) {
|
|
|
36
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, ")"));
|
|
37
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 : '');
|
|
38
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, ")"));
|
|
39
39
|
var contentStyles = function contentStyles(props) {
|
|
40
|
-
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({
|
|
41
41
|
theme: props.theme
|
|
42
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);
|
|
43
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;
|
|
@@ -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;
|
|
@@ -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/"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
80
80
|
"@atlaskit/editor-plugin-table": "^2.12.0",
|
|
81
81
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
82
|
-
"@atlaskit/editor-plugin-type-ahead": "^0.
|
|
82
|
+
"@atlaskit/editor-plugin-type-ahead": "^0.3.0",
|
|
83
83
|
"@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
|
|
84
84
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
85
85
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"@atlaskit/textfield": "^5.6.0",
|
|
118
118
|
"@atlaskit/theme": "^12.6.0",
|
|
119
119
|
"@atlaskit/toggle": "^12.6.0",
|
|
120
|
-
"@atlaskit/tokens": "^1.
|
|
120
|
+
"@atlaskit/tokens": "^1.20.0",
|
|
121
121
|
"@atlaskit/tooltip": "^17.8.0",
|
|
122
122
|
"@atlaskit/width-detector": "^4.1.0",
|
|
123
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,17 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { N200 } from '@atlaskit/theme/colors';
|
|
3
|
-
export const placeholderStyles = css`
|
|
4
|
-
.ProseMirror .placeholder-decoration {
|
|
5
|
-
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
6
|
-
width: 100%;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
user-select: none;
|
|
9
|
-
|
|
10
|
-
.placeholder-android {
|
|
11
|
-
pointer-events: none;
|
|
12
|
-
outline: none;
|
|
13
|
-
user-select: none;
|
|
14
|
-
position: absolute;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
-
import { N200 } from '@atlaskit/theme/colors';
|
|
5
|
-
export var placeholderStyles = css(_templateObject || (_templateObject = _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, ")"));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const placeholderStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const placeholderStyles: import("@emotion/react").SerializedStyles;
|