@atlaskit/editor-core 189.0.12 → 189.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/create-editor/create-plugins-list.js +1 -1
  3. package/dist/cjs/plugins/index.js +0 -7
  4. package/dist/cjs/plugins/placeholder-text/index.js +8 -1
  5. package/dist/cjs/plugins/placeholder-text/plugin.js +2 -1
  6. package/dist/cjs/plugins/placeholder-text/styles.js +1 -1
  7. package/dist/cjs/presets/default.js +13 -2
  8. package/dist/cjs/presets/universal.js +1 -12
  9. package/dist/cjs/ui/ContentStyles/index.js +7 -8
  10. package/dist/cjs/utils/index.js +0 -4
  11. package/dist/cjs/version-wrapper.js +1 -1
  12. package/dist/es2019/create-editor/create-plugins-list.js +1 -1
  13. package/dist/es2019/plugins/index.js +0 -1
  14. package/dist/es2019/plugins/placeholder-text/index.js +2 -1
  15. package/dist/es2019/plugins/placeholder-text/plugin.js +2 -1
  16. package/dist/es2019/plugins/placeholder-text/styles.js +24 -1
  17. package/dist/es2019/presets/default.js +13 -2
  18. package/dist/es2019/presets/universal.js +1 -12
  19. package/dist/es2019/ui/ContentStyles/index.js +0 -2
  20. package/dist/es2019/utils/index.js +0 -4
  21. package/dist/es2019/version-wrapper.js +1 -1
  22. package/dist/esm/create-editor/create-plugins-list.js +1 -1
  23. package/dist/esm/plugins/index.js +0 -1
  24. package/dist/esm/plugins/placeholder-text/index.js +2 -1
  25. package/dist/esm/plugins/placeholder-text/plugin.js +2 -1
  26. package/dist/esm/plugins/placeholder-text/styles.js +2 -2
  27. package/dist/esm/presets/default.js +13 -2
  28. package/dist/esm/presets/universal.js +1 -12
  29. package/dist/esm/ui/ContentStyles/index.js +2 -3
  30. package/dist/esm/utils/index.js +0 -4
  31. package/dist/esm/version-wrapper.js +1 -1
  32. package/dist/types/create-editor/create-plugins-list.d.ts +1 -1
  33. package/dist/types/plugins/index.d.ts +0 -1
  34. package/dist/types/plugins/placeholder-text/index.d.ts +1 -0
  35. package/dist/types/plugins/placeholder-text/types.d.ts +4 -1
  36. package/dist/types/presets/default.d.ts +4 -4
  37. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  38. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  39. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  40. package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +1 -1
  41. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  42. package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +1 -0
  43. package/dist/types-ts4.5/plugins/placeholder-text/types.d.ts +1 -1
  44. package/dist/types-ts4.5/presets/default.d.ts +0 -4
  45. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  46. package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  47. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  48. package/package.json +3 -3
  49. package/dist/cjs/plugins/fake-text-cursor/index.js +0 -32
  50. package/dist/cjs/plugins/fake-text-cursor/styles.js +0 -12
  51. package/dist/es2019/plugins/fake-text-cursor/index.js +0 -20
  52. package/dist/es2019/plugins/fake-text-cursor/styles.js +0 -26
  53. package/dist/esm/plugins/fake-text-cursor/index.js +0 -26
  54. package/dist/esm/plugins/fake-text-cursor/styles.js +0 -5
  55. package/dist/types/plugins/fake-text-cursor/index.d.ts +0 -7
  56. package/dist/types/plugins/fake-text-cursor/styles.d.ts +0 -1
  57. package/dist/types-ts4.5/plugins/fake-text-cursor/index.d.ts +0 -7
  58. package/dist/types-ts4.5/plugins/fake-text-cursor/styles.d.ts +0 -1
  59. /package/dist/cjs/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.js +0 -0
  60. /package/dist/es2019/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.js +0 -0
  61. /package/dist/esm/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.js +0 -0
  62. /package/dist/types/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.d.ts +0 -0
  63. /package/dist/types-ts4.5/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 189.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#42210](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42210) [`a00e52ea8b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a00e52ea8b8) - ED-20478: removes editor fake-text-cursor editor plugin and relocates it under placeholder-text plugin
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 189.0.14
14
+
15
+ ### Patch Changes
16
+
17
+ - [#42201](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42201) [`17d3a9df7c0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/17d3a9df7c0) - ED-20650 Move selectionToolbar higher in presets to prevent it from overriding the link picker floating toolbar
18
+ - [#42194](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42194) [`6b57f690c13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6b57f690c13) - Updating comment to trigger build in editor-plugin-ai branch
19
+
3
20
  ## 189.0.12
4
21
 
5
22
  ### Patch Changes
@@ -108,7 +108,7 @@ function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent) {
108
108
  * Maps EditorProps to EditorPlugins
109
109
  *
110
110
  * Note: The order that presets are added determines
111
- * their placement in the editor toolbar
111
+ * their placement in the editor toolbar.
112
112
  */
113
113
  function createPluginsList(preset, props, pluginInjectionAPI) {
114
114
  var excludes = new Set();
@@ -89,12 +89,6 @@ Object.defineProperty(exports, "extensionPlugin", {
89
89
  return _extension.default;
90
90
  }
91
91
  });
92
- Object.defineProperty(exports, "fakeTextCursorPlugin", {
93
- enumerable: true,
94
- get: function get() {
95
- return _fakeTextCursor.default;
96
- }
97
- });
98
92
  Object.defineProperty(exports, "feedbackDialogPlugin", {
99
93
  enumerable: true,
100
94
  get: function get() {
@@ -213,7 +207,6 @@ var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("./clear
213
207
  var _codeBlock = _interopRequireDefault(require("./code-block"));
214
208
  var _collabEdit = _interopRequireDefault(require("./collab-edit"));
215
209
  var _extension = _interopRequireDefault(require("./extension"));
216
- var _fakeTextCursor = _interopRequireDefault(require("./fake-text-cursor"));
217
210
  var _insertBlock = _interopRequireDefault(require("./insert-block"));
218
211
  var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
219
212
  var _layout = _interopRequireDefault(require("./layout"));
@@ -4,10 +4,17 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ Object.defineProperty(exports, "FakeTextCursorSelection", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _cursor.FakeTextCursorSelection;
11
+ }
12
+ });
7
13
  Object.defineProperty(exports, "placeholderTextPlugin", {
8
14
  enumerable: true,
9
15
  get: function get() {
10
16
  return _plugin.default;
11
17
  }
12
18
  });
13
- var _plugin = _interopRequireDefault(require("./plugin"));
19
+ var _plugin = _interopRequireDefault(require("./plugin"));
20
+ var _cursor = require("./fake-text-cursor/cursor");
@@ -13,7 +13,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
13
13
  var _text = _interopRequireDefault(require("@atlaskit/icon/glyph/media-services/text"));
14
14
  var _hooks = require("@atlaskit/editor-common/hooks");
15
15
  var _utils = require("@atlaskit/editor-common/utils");
16
- var _cursor = require("../fake-text-cursor/cursor");
16
+ var _cursor = require("./fake-text-cursor/cursor");
17
17
  var _PlaceholderFloatingToolbar = _interopRequireDefault(require("./ui/PlaceholderFloatingToolbar"));
18
18
  var _actions = require("./actions");
19
19
  var _placeholderTextNodeview = require("./placeholder-text-nodeview");
@@ -100,6 +100,7 @@ function createPlugin(dispatch, options, api) {
100
100
  return;
101
101
  },
102
102
  props: {
103
+ decorations: _cursor.drawFakeTextCursor,
103
104
  handleDOMEvents: {
104
105
  beforeinput: function beforeinput(view, event) {
105
106
  var state = view.state;
@@ -10,4 +10,4 @@ var _react = require("@emotion/react");
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _templateObject;
13
- var placeholderTextStyles = exports.placeholderTextStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"));
13
+ var placeholderTextStyles = exports.placeholderTextStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n\n .ProseMirror {\n .ProseMirror-fake-text-cursor {\n display: inline;\n pointer-events: none;\n position: relative;\n }\n\n .ProseMirror-fake-text-cursor::after {\n content: '';\n display: inline;\n top: 0;\n position: absolute;\n border-right: 1px solid ", ";\n }\n\n .ProseMirror-fake-text-selection {\n display: inline;\n pointer-events: none;\n position: relative;\n background-color: ", ";\n }\n }\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-border, rgba(0, 0, 0, 0.4))", "var(--ds-background-selected, ".concat(_colors.B75, ")"));
@@ -19,7 +19,6 @@ var _editorPluginFocus = require("@atlaskit/editor-plugin-focus");
19
19
  var _editorPluginEditorDisabled = require("@atlaskit/editor-plugin-editor-disabled");
20
20
  var _editorPluginTypeAhead = require("@atlaskit/editor-plugin-type-ahead");
21
21
  var _editorPluginSubmitEditor = require("@atlaskit/editor-plugin-submit-editor");
22
- var _fakeTextCursor = _interopRequireDefault(require("../plugins/fake-text-cursor"));
23
22
  var _editorPluginFeatureFlags = require("@atlaskit/editor-plugin-feature-flags");
24
23
  var _editorPluginCopyButton = require("@atlaskit/editor-plugin-copy-button");
25
24
  var _editorPluginFloatingToolbar = require("@atlaskit/editor-plugin-floating-toolbar");
@@ -35,6 +34,8 @@ var _codeBlock = _interopRequireDefault(require("../plugins/code-block"));
35
34
  var _undoRedo = _interopRequireDefault(require("../plugins/undo-redo"));
36
35
  var _editorPluginDecorations = require("@atlaskit/editor-plugin-decorations");
37
36
  var _preset = require("@atlaskit/editor-common/preset");
37
+ var _editorPluginSelectionToolbar = require("@atlaskit/editor-plugin-selection-toolbar");
38
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
38
39
  // #region Imports
39
40
 
40
41
  // #endregion
@@ -76,9 +77,19 @@ function createDefaultPreset(options) {
76
77
  return builder.add([p, options.annotationProviders]);
77
78
  }
78
79
  return builder;
80
+ })
81
+ /**
82
+ * Do not use this plugin - it is for AI purposes only.
83
+ */.maybeAdd(_editorPluginSelectionToolbar.selectionToolbarPlugin, function (plugin, builder) {
84
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.enable-selection-toolbar_ucdwd')) {
85
+ return builder.add([plugin, {
86
+ preferenceToolbarAboveSelection: false
87
+ }]);
88
+ }
89
+ return builder;
79
90
  }).add([_editorPluginHyperlink.hyperlinkPlugin, options.hyperlinkOptions]).add([_editorPluginTextFormatting.textFormattingPlugin, options.textFormatting]).add(_editorPluginWidth.widthPlugin).add([_editorPluginQuickInsert.quickInsertPlugin, options.quickInsert]).add([_editorPluginTypeAhead.typeAheadPlugin, options.typeAhead || {
80
91
  createAnalyticsEvent: options.createAnalyticsEvent
81
- }]).add([_editorPluginPlaceholder.placeholderPlugin, options.placeholder]).add(_editorPluginUnsupportedContent.unsupportedContentPlugin).add(_editorPluginEditorDisabled.editorDisabledPlugin).add([_editorPluginSubmitEditor.submitEditorPlugin, options.submitEditor]).add(_fakeTextCursor.default).add(_editorPluginCopyButton.copyButtonPlugin).add(_editorPluginFloatingToolbar.floatingToolbarPlugin).add([_editorPluginSelection.selectionPlugin, options.selection]).add([_codeBlock.default, options.codeBlock || {
92
+ }]).add([_editorPluginPlaceholder.placeholderPlugin, options.placeholder]).add(_editorPluginUnsupportedContent.unsupportedContentPlugin).add(_editorPluginEditorDisabled.editorDisabledPlugin).add([_editorPluginSubmitEditor.submitEditorPlugin, options.submitEditor]).add(_editorPluginCopyButton.copyButtonPlugin).add(_editorPluginFloatingToolbar.floatingToolbarPlugin).add([_editorPluginSelection.selectionPlugin, options.selection]).add([_codeBlock.default, options.codeBlock || {
82
93
  appearance: 'full-page'
83
94
  }]);
84
95
  return preset;
@@ -31,7 +31,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
31
31
  var _editorPluginSaveOnEnter = require("@atlaskit/editor-plugin-save-on-enter");
32
32
  var _editorPluginScrollIntoView = require("@atlaskit/editor-plugin-scroll-into-view");
33
33
  var _editorPluginMentions = require("@atlaskit/editor-plugin-mentions");
34
- var _editorPluginSelectionToolbar = require("@atlaskit/editor-plugin-selection-toolbar");
35
34
  var _isFullPage = require("../utils/is-full-page");
36
35
  var _mediaCommon = require("@atlaskit/media-common");
37
36
  var _default = require("./default");
@@ -409,16 +408,6 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
409
408
  return builder;
410
409
  }).add([_plugins.codeBidiWarningPlugin, {
411
410
  appearance: appearance
412
- }])
413
- /**
414
- * Do not use this plugin - it is for AI purposes only.
415
- */.maybeAdd(_editorPluginSelectionToolbar.selectionToolbarPlugin, function (plugin, builder) {
416
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.enable-selection-toolbar_ucdwd')) {
417
- return builder.add([plugin, {
418
- preferenceToolbarAboveSelection: false
419
- }]);
420
- }
421
- return builder;
422
- });
411
+ }]);
423
412
  return finalPreset;
424
413
  }
@@ -20,12 +20,11 @@ var _styles5 = require("../../plugins/code-block/styles");
20
20
  var _media = require("./media");
21
21
  var _styles6 = require("../../plugins/layout/styles");
22
22
  var _styles7 = require("../../plugins/panel/styles");
23
- var _styles8 = require("../../plugins/fake-text-cursor/styles");
24
- var _styles9 = require("../../plugins/placeholder-text/styles");
25
- var _styles10 = require("../../plugins/extension/ui/styles");
26
- var _styles11 = require("../../plugins/expand/ui/styles");
27
- var _styles12 = require("../../plugins/find-replace/styles");
28
- var _styles13 = require("../../plugins/tasks-and-decisions/styles");
23
+ var _styles8 = require("../../plugins/placeholder-text/styles");
24
+ var _styles9 = require("../../plugins/extension/ui/styles");
25
+ var _styles10 = require("../../plugins/expand/ui/styles");
26
+ var _styles11 = require("../../plugins/find-replace/styles");
27
+ var _styles12 = require("../../plugins/tasks-and-decisions/styles");
29
28
  var _status = require("./status");
30
29
  var _date = require("./date");
31
30
  var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
@@ -46,9 +45,9 @@ var listsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _
46
45
  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]));
47
46
  var placeholderStyles = exports.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, ")"));
48
47
  var contentStyles = function contentStyles(props) {
49
- 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\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)({
48
+ 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)({
50
49
  theme: props.theme
51
- }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles9.placeholderTextStyles, placeholderStyles, (0, _styles5.codeBlockStyles)(props), (0, _styles3.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _media.mediaStyles, (0, _styles6.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles7.panelStyles)(props), _styles8.fakeCursorStyles, mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles10.extensionStyles, (0, _styles11.expandStyles)(props), _styles12.findReplaceStyles, _styles4.textHighlightStyle, _styles13.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
50
+ }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles8.placeholderTextStyles, placeholderStyles, (0, _styles5.codeBlockStyles)(props), (0, _styles3.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _media.mediaStyles, (0, _styles6.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles7.panelStyles)(props), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles9.extensionStyles, (0, _styles10.expandStyles)(props), _styles11.findReplaceStyles, _styles4.textHighlightStyle, _styles12.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
52
51
  };
53
52
  var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
54
53
  return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
@@ -147,7 +147,6 @@ Object.defineProperty(exports, "toJSON", {
147
147
  });
148
148
  exports.whichTransitionEvent = whichTransitionEvent;
149
149
  var _commands = require("@atlaskit/editor-prosemirror/commands");
150
- var _cursor = require("../plugins/fake-text-cursor/cursor");
151
150
  var _utils = require("@atlaskit/editor-prosemirror/utils");
152
151
  var _utils2 = require("@atlaskit/editor-common/utils");
153
152
  var _coreUtils = require("@atlaskit/editor-common/core-utils");
@@ -173,9 +172,6 @@ function getCursor(selection) {
173
172
  * allowed.
174
173
  */
175
174
  function isMarkTypeAllowedInCurrentSelection(markType, state) {
176
- if (state.selection instanceof _cursor.FakeTextCursorSelection) {
177
- return true;
178
- }
179
175
  if (!isMarkTypeAllowedInNode(markType, state)) {
180
176
  return false;
181
177
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "189.0.12";
8
+ var version = exports.version = "189.1.0";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -97,7 +97,7 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
97
97
  * Maps EditorProps to EditorPlugins
98
98
  *
99
99
  * Note: The order that presets are added determines
100
- * their placement in the editor toolbar
100
+ * their placement in the editor toolbar.
101
101
  */
102
102
  export default function createPluginsList(preset, props, pluginInjectionAPI) {
103
103
  const excludes = new Set();
@@ -2,7 +2,6 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
2
2
  export { default as codeBlockPlugin } from './code-block';
3
3
  export { default as collabEditPlugin } from './collab-edit';
4
4
  export { default as extensionPlugin } from './extension';
5
- export { default as fakeTextCursorPlugin } from './fake-text-cursor';
6
5
  export { default as insertBlockPlugin } from './insert-block';
7
6
  export { default as jiraIssuePlugin } from './jira-issue';
8
7
  export { default as layoutPlugin } from './layout';
@@ -1 +1,2 @@
1
- export { default as placeholderTextPlugin } from './plugin';
1
+ export { default as placeholderTextPlugin } from './plugin';
2
+ export { FakeTextCursorSelection } from './fake-text-cursor/cursor';
@@ -5,7 +5,7 @@ import { placeholder } from '@atlaskit/adf-schema';
5
5
  import MediaServicesTextIcon from '@atlaskit/icon/glyph/media-services/text';
6
6
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
7
7
  import { isNodeEmpty } from '@atlaskit/editor-common/utils';
8
- import { FakeTextCursorSelection } from '../fake-text-cursor/cursor';
8
+ import { drawFakeTextCursor, FakeTextCursorSelection } from './fake-text-cursor/cursor';
9
9
  import PlaceholderFloatingToolbar from './ui/PlaceholderFloatingToolbar';
10
10
  import { hidePlaceholderFloatingToolbar, insertPlaceholderTextAtSelection } from './actions';
11
11
  import { PlaceholderTextNodeView } from './placeholder-text-nodeview';
@@ -93,6 +93,7 @@ export function createPlugin(dispatch, options, api) {
93
93
  return;
94
94
  },
95
95
  props: {
96
+ decorations: drawFakeTextCursor,
96
97
  handleDOMEvents: {
97
98
  beforeinput: (view, event) => {
98
99
  const {
@@ -1,5 +1,5 @@
1
1
  import { css } from '@emotion/react';
2
- import { N200 } from '@atlaskit/theme/colors';
2
+ import { B75, N200 } from '@atlaskit/theme/colors';
3
3
  import { SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
4
4
  export const placeholderTextStyles = css`
5
5
  .ProseMirror span[data-placeholder] {
@@ -26,4 +26,27 @@ export const placeholderTextStyles = css`
26
26
  content: attr(data-placeholder);
27
27
  display: inline;
28
28
  }
29
+
30
+ .ProseMirror {
31
+ .ProseMirror-fake-text-cursor {
32
+ display: inline;
33
+ pointer-events: none;
34
+ position: relative;
35
+ }
36
+
37
+ .ProseMirror-fake-text-cursor::after {
38
+ content: '';
39
+ display: inline;
40
+ top: 0;
41
+ position: absolute;
42
+ border-right: 1px solid ${"var(--ds-border, rgba(0, 0, 0, 0.4))"};
43
+ }
44
+
45
+ .ProseMirror-fake-text-selection {
46
+ display: inline;
47
+ pointer-events: none;
48
+ position: relative;
49
+ background-color: ${`var(--ds-background-selected, ${B75})`};
50
+ }
51
+ }
29
52
  `;
@@ -13,7 +13,6 @@ import { focusPlugin } from '@atlaskit/editor-plugin-focus';
13
13
  import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
14
14
  import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
15
15
  import { submitEditorPlugin } from '@atlaskit/editor-plugin-submit-editor';
16
- import fakeTextCursorPlugin from '../plugins/fake-text-cursor';
17
16
  import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
18
17
  import { copyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
19
18
  import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
@@ -29,6 +28,8 @@ import codeBlockPlugin from '../plugins/code-block';
29
28
  import undoRedoPlugin from '../plugins/undo-redo';
30
29
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
31
30
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
31
+ import { selectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
32
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
32
33
  // #endregion
33
34
 
34
35
  /**
@@ -72,9 +73,19 @@ export function createDefaultPreset(options) {
72
73
  return builder.add([p, options.annotationProviders]);
73
74
  }
74
75
  return builder;
76
+ })
77
+ /**
78
+ * Do not use this plugin - it is for AI purposes only.
79
+ */.maybeAdd(selectionToolbarPlugin, (plugin, builder) => {
80
+ if (getBooleanFF('platform.editor.enable-selection-toolbar_ucdwd')) {
81
+ return builder.add([plugin, {
82
+ preferenceToolbarAboveSelection: false
83
+ }]);
84
+ }
85
+ return builder;
75
86
  }).add([hyperlinkPlugin, options.hyperlinkOptions]).add([textFormattingPlugin, options.textFormatting]).add(widthPlugin).add([quickInsertPlugin, options.quickInsert]).add([typeAheadPlugin, options.typeAhead || {
76
87
  createAnalyticsEvent: options.createAnalyticsEvent
77
- }]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(fakeTextCursorPlugin).add(copyButtonPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
88
+ }]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(copyButtonPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
78
89
  appearance: 'full-page'
79
90
  }]);
80
91
  return preset;
@@ -22,7 +22,6 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
22
22
  import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
23
23
  import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
24
24
  import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
25
- import { selectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
26
25
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
27
26
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
28
27
  import { createDefaultPreset } from './default';
@@ -406,16 +405,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
406
405
  return builder;
407
406
  }).add([codeBidiWarningPlugin, {
408
407
  appearance
409
- }])
410
- /**
411
- * Do not use this plugin - it is for AI purposes only.
412
- */.maybeAdd(selectionToolbarPlugin, (plugin, builder) => {
413
- if (getBooleanFF('platform.editor.enable-selection-toolbar_ucdwd')) {
414
- return builder.add([plugin, {
415
- preferenceToolbarAboveSelection: false
416
- }]);
417
- }
418
- return builder;
419
- });
408
+ }]);
420
409
  return finalPreset;
421
410
  }
@@ -12,7 +12,6 @@ import { codeBlockStyles } from '../../plugins/code-block/styles';
12
12
  import { mediaStyles } from './media';
13
13
  import { layoutStyles } from '../../plugins/layout/styles';
14
14
  import { panelStyles } from '../../plugins/panel/styles';
15
- import { fakeCursorStyles } from '../../plugins/fake-text-cursor/styles';
16
15
  import { placeholderTextStyles } from '../../plugins/placeholder-text/styles';
17
16
  import { extensionStyles } from '../../plugins/extension/ui/styles';
18
17
  import { expandStyles } from '../../plugins/expand/ui/styles';
@@ -183,7 +182,6 @@ const contentStyles = props => css`
183
182
  ${gapCursorStyles};
184
183
  ${tableStyles(props)}
185
184
  ${panelStyles(props)}
186
- ${fakeCursorStyles}
187
185
  ${mentionsStyles}
188
186
  ${emojiStyles}
189
187
  ${tasksAndDecisionsStyles}
@@ -1,5 +1,4 @@
1
1
  import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
2
- import { FakeTextCursorSelection } from '../plugins/fake-text-cursor/cursor';
3
2
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
3
  export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
5
4
  export { insideTable } from '@atlaskit/editor-common/core-utils';
@@ -24,9 +23,6 @@ export function getCursor(selection) {
24
23
  * allowed.
25
24
  */
26
25
  export function isMarkTypeAllowedInCurrentSelection(markType, state) {
27
- if (state.selection instanceof FakeTextCursorSelection) {
28
- return true;
29
- }
30
26
  if (!isMarkTypeAllowedInNode(markType, state)) {
31
27
  return false;
32
28
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "189.0.12";
2
+ export const version = "189.1.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -99,7 +99,7 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
99
99
  * Maps EditorProps to EditorPlugins
100
100
  *
101
101
  * Note: The order that presets are added determines
102
- * their placement in the editor toolbar
102
+ * their placement in the editor toolbar.
103
103
  */
104
104
  export default function createPluginsList(preset, props, pluginInjectionAPI) {
105
105
  var excludes = new Set();
@@ -2,7 +2,6 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
2
2
  export { default as codeBlockPlugin } from './code-block';
3
3
  export { default as collabEditPlugin } from './collab-edit';
4
4
  export { default as extensionPlugin } from './extension';
5
- export { default as fakeTextCursorPlugin } from './fake-text-cursor';
6
5
  export { default as insertBlockPlugin } from './insert-block';
7
6
  export { default as jiraIssuePlugin } from './jira-issue';
8
7
  export { default as layoutPlugin } from './layout';
@@ -1 +1,2 @@
1
- export { default as placeholderTextPlugin } from './plugin';
1
+ export { default as placeholderTextPlugin } from './plugin';
2
+ export { FakeTextCursorSelection } from './fake-text-cursor/cursor';
@@ -5,7 +5,7 @@ import { placeholder } from '@atlaskit/adf-schema';
5
5
  import MediaServicesTextIcon from '@atlaskit/icon/glyph/media-services/text';
6
6
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
7
7
  import { isNodeEmpty } from '@atlaskit/editor-common/utils';
8
- import { FakeTextCursorSelection } from '../fake-text-cursor/cursor';
8
+ import { drawFakeTextCursor, FakeTextCursorSelection } from './fake-text-cursor/cursor';
9
9
  import PlaceholderFloatingToolbar from './ui/PlaceholderFloatingToolbar';
10
10
  import { hidePlaceholderFloatingToolbar, insertPlaceholderTextAtSelection } from './actions';
11
11
  import { PlaceholderTextNodeView } from './placeholder-text-nodeview';
@@ -92,6 +92,7 @@ export function createPlugin(dispatch, options, api) {
92
92
  return;
93
93
  },
94
94
  props: {
95
+ decorations: drawFakeTextCursor,
95
96
  handleDOMEvents: {
96
97
  beforeinput: function beforeinput(view, event) {
97
98
  var state = view.state;
@@ -1,6 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
3
  import { css } from '@emotion/react';
4
- import { N200 } from '@atlaskit/theme/colors';
4
+ import { B75, N200 } from '@atlaskit/theme/colors';
5
5
  import { SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
- export var placeholderTextStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Background]), "var(--ds-text-subtlest, ".concat(N200, ")"));
6
+ export var placeholderTextStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n\n .ProseMirror {\n .ProseMirror-fake-text-cursor {\n display: inline;\n pointer-events: none;\n position: relative;\n }\n\n .ProseMirror-fake-text-cursor::after {\n content: '';\n display: inline;\n top: 0;\n position: absolute;\n border-right: 1px solid ", ";\n }\n\n .ProseMirror-fake-text-selection {\n display: inline;\n pointer-events: none;\n position: relative;\n background-color: ", ";\n }\n }\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Background]), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-border, rgba(0, 0, 0, 0.4))", "var(--ds-background-selected, ".concat(B75, ")"));
@@ -13,7 +13,6 @@ import { focusPlugin } from '@atlaskit/editor-plugin-focus';
13
13
  import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
14
14
  import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
15
15
  import { submitEditorPlugin } from '@atlaskit/editor-plugin-submit-editor';
16
- import fakeTextCursorPlugin from '../plugins/fake-text-cursor';
17
16
  import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
18
17
  import { copyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
19
18
  import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
@@ -29,6 +28,8 @@ import codeBlockPlugin from '../plugins/code-block';
29
28
  import undoRedoPlugin from '../plugins/undo-redo';
30
29
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
31
30
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
31
+ import { selectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
32
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
32
33
  // #endregion
33
34
 
34
35
  /**
@@ -68,9 +69,19 @@ export function createDefaultPreset(options) {
68
69
  return builder.add([p, options.annotationProviders]);
69
70
  }
70
71
  return builder;
72
+ })
73
+ /**
74
+ * Do not use this plugin - it is for AI purposes only.
75
+ */.maybeAdd(selectionToolbarPlugin, function (plugin, builder) {
76
+ if (getBooleanFF('platform.editor.enable-selection-toolbar_ucdwd')) {
77
+ return builder.add([plugin, {
78
+ preferenceToolbarAboveSelection: false
79
+ }]);
80
+ }
81
+ return builder;
71
82
  }).add([hyperlinkPlugin, options.hyperlinkOptions]).add([textFormattingPlugin, options.textFormatting]).add(widthPlugin).add([quickInsertPlugin, options.quickInsert]).add([typeAheadPlugin, options.typeAhead || {
72
83
  createAnalyticsEvent: options.createAnalyticsEvent
73
- }]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(fakeTextCursorPlugin).add(copyButtonPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
84
+ }]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(copyButtonPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
74
85
  appearance: 'full-page'
75
86
  }]);
76
87
  return preset;
@@ -26,7 +26,6 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
26
26
  import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
27
27
  import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
28
28
  import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
29
- import { selectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
30
29
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
31
30
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
32
31
  import { createDefaultPreset } from './default';
@@ -402,16 +401,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
402
401
  return builder;
403
402
  }).add([codeBidiWarningPlugin, {
404
403
  appearance: appearance
405
- }])
406
- /**
407
- * Do not use this plugin - it is for AI purposes only.
408
- */.maybeAdd(selectionToolbarPlugin, function (plugin, builder) {
409
- if (getBooleanFF('platform.editor.enable-selection-toolbar_ucdwd')) {
410
- return builder.add([plugin, {
411
- preferenceToolbarAboveSelection: false
412
- }]);
413
- }
414
- return builder;
415
- });
404
+ }]);
416
405
  return finalPreset;
417
406
  }
@@ -14,7 +14,6 @@ import { codeBlockStyles } from '../../plugins/code-block/styles';
14
14
  import { mediaStyles } from './media';
15
15
  import { layoutStyles } from '../../plugins/layout/styles';
16
16
  import { panelStyles } from '../../plugins/panel/styles';
17
- import { fakeCursorStyles } from '../../plugins/fake-text-cursor/styles';
18
17
  import { placeholderTextStyles } from '../../plugins/placeholder-text/styles';
19
18
  import { extensionStyles } from '../../plugins/extension/ui/styles';
20
19
  import { expandStyles } from '../../plugins/expand/ui/styles';
@@ -38,9 +37,9 @@ var listsStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLit
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]));
39
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, ")"));
40
39
  var contentStyles = function contentStyles(props) {
41
- 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\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({
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({
42
41
  theme: props.theme
43
- }), 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, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
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), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
44
43
  };
45
44
  export var createEditorContentStyle = function createEditorContentStyle(styles) {
46
45
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -1,5 +1,4 @@
1
1
  import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
2
- import { FakeTextCursorSelection } from '../plugins/fake-text-cursor/cursor';
3
2
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
3
  export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
5
4
  export { insideTable } from '@atlaskit/editor-common/core-utils';
@@ -24,9 +23,6 @@ export function getCursor(selection) {
24
23
  * allowed.
25
24
  */
26
25
  export function isMarkTypeAllowedInCurrentSelection(markType, state) {
27
- if (state.selection instanceof FakeTextCursorSelection) {
28
- return true;
29
- }
30
26
  if (!isMarkTypeAllowedInNode(markType, state)) {
31
27
  return false;
32
28
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "189.0.12";
2
+ export var version = "189.1.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };