@atlaskit/editor-core 187.18.2 → 187.19.1

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 (108) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -1
  3. package/dist/cjs/plugins/base/index.js +0 -7
  4. package/dist/cjs/plugins/code-block/index.js +1 -1
  5. package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +98 -95
  6. package/dist/cjs/plugins/composition/index.js +33 -0
  7. package/dist/cjs/plugins/{base/pm-plugins/composition.js → composition/pm-plugins/main.js} +8 -14
  8. package/dist/cjs/plugins/composition/pm-plugins/plugin-key.js +9 -0
  9. package/dist/cjs/plugins/media/index.js +4 -3
  10. package/dist/cjs/plugins/media/pm-plugins/alt-text/commands.js +10 -7
  11. package/dist/cjs/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
  12. package/dist/cjs/plugins/media/pm-plugins/main.js +9 -9
  13. package/dist/cjs/plugins/media/toolbar/alt-text.js +2 -2
  14. package/dist/cjs/plugins/media/toolbar/index.js +12 -11
  15. package/dist/cjs/plugins/media/utils/media-single.js +13 -13
  16. package/dist/cjs/plugins/paste/handlers.js +2 -2
  17. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +2 -2
  18. package/dist/cjs/plugins/paste/pm-plugins/main.js +4 -4
  19. package/dist/cjs/plugins/placeholder/index.js +2 -2
  20. package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
  21. package/dist/cjs/plugins/selection/gap-cursor/utils/place-gap-cursor.js +3 -3
  22. package/dist/cjs/plugins/selection/gap-cursor/utils.js +6 -3
  23. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +3 -3
  24. package/dist/cjs/version-wrapper.js +1 -1
  25. package/dist/cjs/version.json +1 -1
  26. package/dist/es2019/labs/next/presets/default.js +2 -1
  27. package/dist/es2019/plugins/base/index.js +0 -5
  28. package/dist/es2019/plugins/code-block/index.js +1 -1
  29. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +107 -104
  30. package/dist/es2019/plugins/composition/index.js +23 -0
  31. package/dist/es2019/plugins/{base/pm-plugins/composition.js → composition/pm-plugins/main.js} +7 -12
  32. package/dist/es2019/plugins/composition/pm-plugins/plugin-key.js +2 -0
  33. package/dist/es2019/plugins/media/index.js +6 -3
  34. package/dist/es2019/plugins/media/pm-plugins/alt-text/commands.js +3 -2
  35. package/dist/es2019/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
  36. package/dist/es2019/plugins/media/pm-plugins/main.js +7 -7
  37. package/dist/es2019/plugins/media/toolbar/alt-text.js +2 -2
  38. package/dist/es2019/plugins/media/toolbar/index.js +12 -11
  39. package/dist/es2019/plugins/media/utils/media-single.js +7 -8
  40. package/dist/es2019/plugins/paste/handlers.js +2 -3
  41. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
  42. package/dist/es2019/plugins/paste/pm-plugins/main.js +4 -4
  43. package/dist/es2019/plugins/placeholder/index.js +2 -2
  44. package/dist/es2019/plugins/selection/gap-cursor/styles.js +2 -1
  45. package/dist/es2019/plugins/selection/gap-cursor/utils/place-gap-cursor.js +4 -4
  46. package/dist/es2019/plugins/selection/gap-cursor/utils.js +5 -2
  47. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +4 -4
  48. package/dist/es2019/version-wrapper.js +1 -1
  49. package/dist/es2019/version.json +1 -1
  50. package/dist/esm/labs/next/presets/default.js +2 -1
  51. package/dist/esm/plugins/base/index.js +0 -7
  52. package/dist/esm/plugins/code-block/index.js +1 -1
  53. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +98 -95
  54. package/dist/esm/plugins/composition/index.js +25 -0
  55. package/dist/esm/plugins/{base/pm-plugins/composition.js → composition/pm-plugins/main.js} +7 -12
  56. package/dist/esm/plugins/composition/pm-plugins/plugin-key.js +2 -0
  57. package/dist/esm/plugins/media/index.js +4 -3
  58. package/dist/esm/plugins/media/pm-plugins/alt-text/commands.js +10 -7
  59. package/dist/esm/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
  60. package/dist/esm/plugins/media/pm-plugins/main.js +7 -7
  61. package/dist/esm/plugins/media/toolbar/alt-text.js +2 -2
  62. package/dist/esm/plugins/media/toolbar/index.js +12 -11
  63. package/dist/esm/plugins/media/utils/media-single.js +7 -7
  64. package/dist/esm/plugins/paste/handlers.js +2 -3
  65. package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
  66. package/dist/esm/plugins/paste/pm-plugins/main.js +4 -4
  67. package/dist/esm/plugins/placeholder/index.js +2 -2
  68. package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
  69. package/dist/esm/plugins/selection/gap-cursor/utils/place-gap-cursor.js +4 -4
  70. package/dist/esm/plugins/selection/gap-cursor/utils.js +5 -2
  71. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +4 -4
  72. package/dist/esm/version-wrapper.js +1 -1
  73. package/dist/esm/version.json +1 -1
  74. package/dist/types/labs/next/presets/default.d.ts +16 -0
  75. package/dist/types/plugins/code-block/index.d.ts +6 -4
  76. package/dist/types/plugins/code-block/pm-plugins/ide-ux.d.ts +4 -2
  77. package/dist/types/plugins/composition/index.d.ts +8 -0
  78. package/dist/types/plugins/composition/pm-plugins/main.d.ts +4 -0
  79. package/dist/types/plugins/composition/pm-plugins/plugin-key.d.ts +6 -0
  80. package/dist/types/plugins/media/pm-plugins/alt-text/commands.d.ts +2 -1
  81. package/dist/types/plugins/media/pm-plugins/alt-text/keymap.d.ts +2 -1
  82. package/dist/types/plugins/media/toolbar/alt-text.d.ts +2 -1
  83. package/dist/types/plugins/media/utils/media-single.d.ts +3 -3
  84. package/dist/types/plugins/paste/handlers.d.ts +2 -1
  85. package/dist/types/plugins/paste/index.d.ts +3 -1
  86. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +2 -1
  87. package/dist/types/plugins/placeholder/index.d.ts +2 -1
  88. package/dist/types/plugins/selection/gap-cursor/utils.d.ts +1 -1
  89. package/dist/types-ts4.5/labs/next/presets/default.d.ts +20 -0
  90. package/dist/types-ts4.5/plugins/code-block/index.d.ts +6 -4
  91. package/dist/types-ts4.5/plugins/code-block/pm-plugins/ide-ux.d.ts +4 -2
  92. package/dist/types-ts4.5/plugins/composition/index.d.ts +8 -0
  93. package/dist/types-ts4.5/plugins/composition/pm-plugins/main.d.ts +4 -0
  94. package/dist/types-ts4.5/plugins/composition/pm-plugins/plugin-key.d.ts +6 -0
  95. package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/commands.d.ts +2 -1
  96. package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/keymap.d.ts +2 -1
  97. package/dist/types-ts4.5/plugins/media/toolbar/alt-text.d.ts +2 -1
  98. package/dist/types-ts4.5/plugins/media/utils/media-single.d.ts +3 -3
  99. package/dist/types-ts4.5/plugins/paste/handlers.d.ts +2 -1
  100. package/dist/types-ts4.5/plugins/paste/index.d.ts +3 -1
  101. package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +2 -1
  102. package/dist/types-ts4.5/plugins/placeholder/index.d.ts +3 -1
  103. package/dist/types-ts4.5/plugins/selection/gap-cursor/utils.d.ts +1 -1
  104. package/package.json +1 -1
  105. package/report.api.md +1 -0
  106. package/tmp/api-report-tmp.d.ts +1 -1
  107. package/dist/types/plugins/base/pm-plugins/composition.d.ts +0 -9
  108. package/dist/types-ts4.5/plugins/base/pm-plugins/composition.d.ts +0 -9
@@ -102,7 +102,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
102
102
  }
103
103
  },
104
104
  handlePaste: function handlePaste(view, rawEvent, slice) {
105
- var _text, _analyticsPlugin$perf, _analyticsPlugin$perf2, _schema$nodes, _schema$nodes2, _schema$nodes3;
105
+ var _text, _analyticsPlugin$perf, _analyticsPlugin$perf2, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$d4, _pluginInjectionApi$d5;
106
106
  var event = rawEvent;
107
107
  if (!event.clipboardData) {
108
108
  return false;
@@ -266,7 +266,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
266
266
  if (handleCodeBlockWithAnalytics(view, event, slice, text)(state, dispatch)) {
267
267
  return true;
268
268
  }
269
- if (handleMediaSingleWithAnalytics(view, event, slice, isPastedFile ? PasteTypes.binary : PasteTypes.richText)(state, dispatch, view)) {
269
+ if (handleMediaSingleWithAnalytics(view, event, slice, isPastedFile ? PasteTypes.binary : PasteTypes.richText, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d4 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : (_pluginInjectionApi$d5 = _pluginInjectionApi$d4.analytics) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.actions)(state, dispatch, view)) {
270
270
  return true;
271
271
  }
272
272
  if (handleSelectedTableWithAnalytics(view, event, slice)(state, dispatch)) {
@@ -299,7 +299,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
299
299
 
300
300
  // finally, handle rich-text copy-paste
301
301
  if (isRichText) {
302
- var _pluginInjectionApi$d4, _pluginInjectionApi$d5;
302
+ var _pluginInjectionApi$d6, _pluginInjectionApi$d7;
303
303
  // linkify the text where possible
304
304
  slice = linkifyContent(state.schema)(slice);
305
305
  if (handlePasteLinkOnSelectedTextWithAnalytics(view, event, slice, PasteTypes.richText)(state, dispatch)) {
@@ -307,7 +307,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
307
307
  }
308
308
 
309
309
  // run macro autoconvert prior to other conversions
310
- if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d4 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : (_pluginInjectionApi$d5 = _pluginInjectionApi$d4.actions) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
310
+ if (handleMacroAutoConvert(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d6 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : (_pluginInjectionApi$d7 = _pluginInjectionApi$d6.actions) === null || _pluginInjectionApi$d7 === void 0 ? void 0 : _pluginInjectionApi$d7.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
311
311
  // TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
312
312
  sendPasteAnalyticsEvent(view, event, slice, {
313
313
  type: PasteTypes.richText
@@ -4,7 +4,6 @@ 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
6
  import { isTypeAheadOpen } from '../type-ahead/utils';
7
- import { isComposing } from '../base/pm-plugins/composition';
8
7
  function getPlaceholderState(editorState) {
9
8
  return pluginKey.getState(editorState);
10
9
  }
@@ -98,7 +97,8 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
98
97
  hasPlaceholder = _getPlaceholderState.hasPlaceholder,
99
98
  placeholderText = _getPlaceholderState.placeholderText,
100
99
  pos = _getPlaceholderState.pos;
101
- if (hasPlaceholder && placeholderText && pos !== undefined && !isComposing(editorState)) {
100
+ var compositionPluginState = api === null || api === void 0 ? void 0 : api.dependencies.composition.sharedState.currentState();
101
+ if (hasPlaceholder && placeholderText && pos !== undefined && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
102
102
  return createPlaceholderDecoration(editorState, placeholderText, pos);
103
103
  }
104
104
  return;
@@ -7,4 +7,4 @@ var gapCursor = '.ProseMirror-gapcursor';
7
7
  var prosemirrorwidget = '.ProseMirror-widget';
8
8
  var wrapLeft = '[layout="wrap-left"]';
9
9
  var wrapRight = '[layout="wrap-right"]';
10
- export var gapCursorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: -3px;\n }\n &.-right span::after {\n right: -3px;\n }\n & span[layout='full-width'],\n & span[layout='wide'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
10
+ export var gapCursorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: -3px;\n }\n &.-right span::after {\n right: -3px;\n }\n & span[layout='full-width'],\n & span[layout='wide'],\n & span[layout='fixed-width'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
@@ -1,5 +1,5 @@
1
1
  import _toArray from "@babel/runtime/helpers/toArray";
2
- import { getBreakoutModeFromTargetNode, isLeftCursor } from '../utils';
2
+ import { getLayoutModeFromTargetNode, isLeftCursor } from '../utils';
3
3
  import { Side } from '../selection';
4
4
 
5
5
  /**
@@ -79,9 +79,9 @@ export var toDOM = function toDOM(view, getPos) {
79
79
  if (nodeStart !== 0 || node && node.type.name === 'table') {
80
80
  gapCursor.style.marginTop = style.getPropertyValue('margin-top');
81
81
  }
82
- var breakoutMode = node && getBreakoutModeFromTargetNode(node);
83
- if (breakoutMode) {
84
- gapCursor.setAttribute('layout', breakoutMode);
82
+ var layoutMode = node && getLayoutModeFromTargetNode(node);
83
+ if (layoutMode) {
84
+ gapCursor.setAttribute('layout', layoutMode);
85
85
  gapCursor.style.width = "".concat(measureWidth(style), "px");
86
86
  } else {
87
87
  mutateElementStyle(gapCursor, style, selection.side);
@@ -58,7 +58,7 @@ export var isTextBlockNearPos = function isTextBlockNearPos(doc, schema, $pos, d
58
58
  }
59
59
  return false;
60
60
  };
61
- export function getBreakoutModeFromTargetNode(node) {
61
+ export function getLayoutModeFromTargetNode(node) {
62
62
  var layout;
63
63
  if (node.attrs.layout) {
64
64
  layout = node.attrs.layout;
@@ -72,7 +72,10 @@ export function getBreakoutModeFromTargetNode(node) {
72
72
  }
73
73
  }).attrs.mode;
74
74
  }
75
- if (['wide', 'full-width'].indexOf(layout) === -1) {
75
+ if (node.type.name === 'table' && node.attrs.width) {
76
+ layout = 'fixed-width';
77
+ }
78
+ if (['wide', 'full-width', 'fixed-width'].indexOf(layout) === -1) {
76
79
  return '';
77
80
  }
78
81
  return layout;
@@ -5,7 +5,7 @@ import { findPositionOfNodeBefore } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
6
6
  import { hideCaretModifier } from '../gap-cursor/styles';
7
7
  import { GapCursorSelection, JSON_ID, Side as GapCursorSide, Side } from '../gap-cursor/selection';
8
- import { getBreakoutModeFromTargetNode, isIgnoredClick } from '../gap-cursor/utils';
8
+ import { getLayoutModeFromTargetNode, isIgnoredClick } from '../gap-cursor/utils';
9
9
  import { toDOM } from '../gap-cursor/utils/place-gap-cursor';
10
10
  import { deleteNode, setGapCursorAtPos } from '../gap-cursor/actions';
11
11
  import { Direction } from '../gap-cursor/direction';
@@ -69,10 +69,10 @@ var plugin = new SafePlugin({
69
69
  }
70
70
  }
71
71
  var node = isRightCursor ? $from.nodeBefore : $from.nodeAfter;
72
- var breakoutMode = node && getBreakoutModeFromTargetNode(node);
72
+ var layoutMode = node && getLayoutModeFromTargetNode(node);
73
73
  return DecorationSet.create(doc, [Decoration.widget(position, toDOM, {
74
- key: "".concat(JSON_ID, "-").concat(side, "-").concat(breakoutMode),
75
- side: breakoutMode ? -1 : 0
74
+ key: "".concat(JSON_ID, "-").concat(side, "-").concat(layoutMode),
75
+ side: layoutMode ? -1 : 0
76
76
  })]);
77
77
  }
78
78
  return null;
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.18.2";
2
+ export var version = "187.19.1";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.18.2",
3
+ "version": "187.19.1",
4
4
  "sideEffects": false
5
5
  }
@@ -49,6 +49,10 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
49
49
  hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
50
50
  removeDecoration: import("@atlaskit/editor-common/types").Command;
51
51
  };
52
+ }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
53
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
54
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
55
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
52
56
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
53
57
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
54
58
  sharedState: {
@@ -92,6 +96,10 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
92
96
  hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
93
97
  removeDecoration: import("@atlaskit/editor-common/types").Command;
94
98
  };
99
+ }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
100
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
101
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
102
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
95
103
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
96
104
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
97
105
  sharedState: {
@@ -412,6 +420,10 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
412
420
  hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
413
421
  removeDecoration: import("@atlaskit/editor-common/types").Command;
414
422
  };
423
+ }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
424
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
425
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
426
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
415
427
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
416
428
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
417
429
  sharedState: {
@@ -455,6 +467,10 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
455
467
  hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
456
468
  removeDecoration: import("@atlaskit/editor-common/types").Command;
457
469
  };
470
+ }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
471
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
472
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
473
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
458
474
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
459
475
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
460
476
  sharedState: {
@@ -1,11 +1,13 @@
1
- import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import { CodeBlockOptions } from './types';
3
- import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
- import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
1
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { CodeBlockOptions } from './types';
3
+ import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ import type compositionPlugin from '../composition';
5
6
  declare const codeBlockPlugin: NextEditorPlugin<'codeBlock', {
6
7
  pluginConfiguration: CodeBlockOptions;
7
8
  dependencies: [
8
9
  typeof decorationsPlugin,
10
+ typeof compositionPlugin,
9
11
  OptionalPlugin<typeof analyticsPlugin>
10
12
  ];
11
13
  }>;
@@ -1,3 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- declare const _default: SafePlugin<any>;
3
- export default _default;
2
+ import type codeBlockPlugin from '../';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
+ declare const ideUX: (pluginInjectionApi: ExtractInjectionAPI<typeof codeBlockPlugin> | undefined) => SafePlugin<any>;
5
+ export default ideUX;
@@ -0,0 +1,8 @@
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ export type CompositionState = {
3
+ isComposing: boolean;
4
+ };
5
+ declare const composition: NextEditorPlugin<'composition', {
6
+ sharedState: CompositionState | undefined;
7
+ }>;
8
+ export default composition;
@@ -0,0 +1,4 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { CompositionPluginState } from './plugin-key';
3
+ declare const _default: () => SafePlugin<CompositionPluginState>;
4
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
+ export interface CompositionPluginState {
3
+ isComposing: boolean;
4
+ zeroWidthSpacePos?: number;
5
+ }
6
+ export declare const pluginKey: PluginKey<CompositionPluginState>;
@@ -1,3 +1,4 @@
1
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
1
2
  export declare const closeMediaAltTextMenu: import("@atlaskit/editor-common/types").Command;
2
- export declare const openMediaAltTextMenu: import("../../../..").Command;
3
+ export declare const openMediaAltTextMenu: (editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => import("@atlaskit/editor-common/types").Command;
3
4
  export declare const updateAltText: (newAltText: string) => import("@atlaskit/editor-common/types").Command;
@@ -1,3 +1,4 @@
1
1
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- export default function keymapPlugin(schema: Schema): SafePlugin;
3
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ export default function keymapPlugin(schema: Schema, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined): SafePlugin;
@@ -4,7 +4,8 @@ import type { Command } from '../../../types';
4
4
  import type { MediaToolbarBaseConfig } from '../types';
5
5
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
6
6
  import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
7
- export declare const altTextButton: (intl: IntlShape, state: EditorState) => FloatingToolbarButton<Command>;
7
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
8
+ export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
8
9
  export declare const altTextEditComponent: (options?: AltTextToolbarOptions) => FloatingToolbarCustom<Command>;
9
10
  export interface AltTextToolbarOptions {
10
11
  altTextValidator?: (value: string) => string[];
@@ -3,7 +3,7 @@ import { Slice } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import type { MediaState } from '../types';
6
- import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
6
+ import type { InputMethodInsertMedia, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
7
  import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
8
8
  export interface MediaSingleState extends MediaState {
9
9
  dimensions: {
@@ -14,8 +14,8 @@ export interface MediaSingleState extends MediaState {
14
14
  contextId?: string;
15
15
  }
16
16
  export declare const isMediaSingle: (schema: Schema, fileMimeType?: string) => boolean;
17
- export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia) => boolean;
18
- export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean, widthPluginState?: WidthPluginState | undefined) => boolean;
17
+ export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
18
+ export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
19
19
  export declare const createMediaSingleNode: (schema: Schema, collection: string, maxWidth?: number, minWidth?: number, alignLeftOnInsert?: boolean) => (mediaState: MediaSingleState) => PMNode;
20
20
  export declare function transformSliceForMedia(slice: Slice, schema: Schema): (selection: Selection) => Slice;
21
21
  export declare function isCaptionNode(editorView: EditorView): boolean;
@@ -5,6 +5,7 @@ import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extens
5
5
  import type { Command } from '../../types';
6
6
  import type { InputMethodInsertMedia } from '../analytics';
7
7
  import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
8
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
8
9
  export declare function handleMention(slice: Slice, schema: Schema): Slice;
9
10
  export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
10
11
  export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
@@ -14,7 +15,7 @@ export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEv
14
15
  export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
15
16
  export declare function handleMacroAutoConvert(text: string, slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, cardsOptions?: CardOptions, extensionAutoConverter?: ExtensionAutoConvertHandler): Command;
16
17
  export declare function handleCodeBlock(text: string): Command;
17
- export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia): (slice: Slice) => Command;
18
+ export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined): (slice: Slice) => Command;
18
19
  export declare function handleExpandPasteInTable(slice: Slice): Command;
19
20
  export declare function handleMarkdown(markdownSlice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, from?: number, to?: number): Command;
20
21
  export declare function handleParagraphBlockMarks(state: EditorState, slice: Slice): Slice;
@@ -4,6 +4,7 @@ import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { cardPlugin } from '@atlaskit/editor-plugin-card';
5
5
  import type betterTypeHistoryPlugin from '../better-type-history';
6
6
  import type listPlugin from '../list';
7
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
8
  export type PastePluginOptions = {
8
9
  cardOptions?: CardOptions;
9
10
  sanitizePrivateContent?: boolean;
@@ -14,7 +15,8 @@ declare const pastePlugin: NextEditorPlugin<'paste', {
14
15
  typeof featureFlagsPlugin,
15
16
  OptionalPlugin<typeof listPlugin>,
16
17
  typeof betterTypeHistoryPlugin,
17
- OptionalPlugin<typeof cardPlugin>
18
+ OptionalPlugin<typeof cardPlugin>,
19
+ OptionalPlugin<typeof analyticsPlugin>
18
20
  ];
19
21
  }>;
20
22
  export default pastePlugin;
@@ -3,6 +3,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { Slice, Fragment, Schema } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
5
5
  import type pastePlugin from '../';
6
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
7
  type PasteContext = {
7
8
  type: PasteType;
8
9
  asPlain?: boolean;
@@ -24,7 +25,7 @@ export declare const handlePasteAsPlainTextWithAnalytics: (view: EditorView, eve
24
25
  export declare const handlePasteIntoTaskAndDecisionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
25
26
  export declare const handlePasteIntoCaptionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
26
27
  export declare const handleCodeBlockWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, text: string) => Command;
27
- export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
28
+ export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => Command;
28
29
  export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
29
30
  export declare const handleMarkdownWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
30
31
  export declare const handleRichTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
@@ -5,6 +5,7 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { NextEditorPlugin, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import type { focusPlugin } from '@atlaskit/editor-plugin-focus';
7
7
  export declare const pluginKey: PluginKey<any>;
8
+ import type compositionPlugin from '../composition';
8
9
  export declare const placeholderTestId = "placeholder-test-id";
9
10
  export declare function createPlaceholderDecoration(editorState: EditorState, placeholderText: string, pos?: number): DecorationSet;
10
11
  export declare function createPlugin(defaultPlaceholderText?: string, bracketPlaceholderText?: string, api?: ExtractInjectionAPI<typeof placeholderPlugin>): SafePlugin | undefined;
@@ -14,6 +15,6 @@ export interface PlaceholderPluginOptions {
14
15
  }
15
16
  declare const placeholderPlugin: NextEditorPlugin<'placeholder', {
16
17
  pluginConfiguration: PlaceholderPluginOptions | undefined;
17
- dependencies: [typeof focusPlugin];
18
+ dependencies: [typeof focusPlugin, typeof compositionPlugin];
18
19
  }>;
19
20
  export default placeholderPlugin;
@@ -3,5 +3,5 @@ import { Side } from './selection';
3
3
  export declare const isLeftCursor: (side: Side) => side is Side.LEFT;
4
4
  export declare function getMediaNearPos(doc: PMNode, $pos: ResolvedPos, schema: Schema, dir?: number): PMNode | null;
5
5
  export declare const isTextBlockNearPos: (doc: PMNode, schema: Schema, $pos: ResolvedPos, dir: number) => boolean;
6
- export declare function getBreakoutModeFromTargetNode(node: PMNode): string;
6
+ export declare function getLayoutModeFromTargetNode(node: PMNode): string;
7
7
  export declare const isIgnoredClick: (elem: HTMLElement) => boolean;
@@ -66,6 +66,11 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
66
66
  removeDecoration: import("@atlaskit/editor-common/types").Command;
67
67
  };
68
68
  }>,
69
+ (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
70
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
71
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
72
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
73
+ }>,
69
74
  import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
70
75
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
71
76
  sharedState: {
@@ -116,6 +121,11 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
116
121
  removeDecoration: import("@atlaskit/editor-common/types").Command;
117
122
  };
118
123
  }>,
124
+ (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
125
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
126
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
127
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
128
+ }>,
119
129
  import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
120
130
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
121
131
  sharedState: {
@@ -507,6 +517,11 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
507
517
  removeDecoration: import("@atlaskit/editor-common/types").Command;
508
518
  };
509
519
  }>,
520
+ (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
521
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
522
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
523
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
524
+ }>,
510
525
  import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
511
526
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
512
527
  sharedState: {
@@ -557,6 +572,11 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
557
572
  removeDecoration: import("@atlaskit/editor-common/types").Command;
558
573
  };
559
574
  }>,
575
+ (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
576
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
577
+ }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
578
+ sharedState: import("../../../plugins/composition").CompositionState | undefined;
579
+ }>,
560
580
  import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
561
581
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
562
582
  sharedState: {
@@ -1,11 +1,13 @@
1
- import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import { CodeBlockOptions } from './types';
3
- import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
- import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
1
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { CodeBlockOptions } from './types';
3
+ import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ import type compositionPlugin from '../composition';
5
6
  declare const codeBlockPlugin: NextEditorPlugin<'codeBlock', {
6
7
  pluginConfiguration: CodeBlockOptions;
7
8
  dependencies: [
8
9
  typeof decorationsPlugin,
10
+ typeof compositionPlugin,
9
11
  OptionalPlugin<typeof analyticsPlugin>
10
12
  ];
11
13
  }>;
@@ -1,3 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- declare const _default: SafePlugin<any>;
3
- export default _default;
2
+ import type codeBlockPlugin from '../';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
+ declare const ideUX: (pluginInjectionApi: ExtractInjectionAPI<typeof codeBlockPlugin> | undefined) => SafePlugin<any>;
5
+ export default ideUX;
@@ -0,0 +1,8 @@
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ export type CompositionState = {
3
+ isComposing: boolean;
4
+ };
5
+ declare const composition: NextEditorPlugin<'composition', {
6
+ sharedState: CompositionState | undefined;
7
+ }>;
8
+ export default composition;
@@ -0,0 +1,4 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { CompositionPluginState } from './plugin-key';
3
+ declare const _default: () => SafePlugin<CompositionPluginState>;
4
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
+ export interface CompositionPluginState {
3
+ isComposing: boolean;
4
+ zeroWidthSpacePos?: number;
5
+ }
6
+ export declare const pluginKey: PluginKey<CompositionPluginState>;
@@ -1,3 +1,4 @@
1
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
1
2
  export declare const closeMediaAltTextMenu: import("@atlaskit/editor-common/types").Command;
2
- export declare const openMediaAltTextMenu: import("../../../..").Command;
3
+ export declare const openMediaAltTextMenu: (editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => import("@atlaskit/editor-common/types").Command;
3
4
  export declare const updateAltText: (newAltText: string) => import("@atlaskit/editor-common/types").Command;
@@ -1,3 +1,4 @@
1
1
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- export default function keymapPlugin(schema: Schema): SafePlugin;
3
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ export default function keymapPlugin(schema: Schema, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined): SafePlugin;
@@ -4,7 +4,8 @@ import type { Command } from '../../../types';
4
4
  import type { MediaToolbarBaseConfig } from '../types';
5
5
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
6
6
  import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
7
- export declare const altTextButton: (intl: IntlShape, state: EditorState) => FloatingToolbarButton<Command>;
7
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
8
+ export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
8
9
  export declare const altTextEditComponent: (options?: AltTextToolbarOptions) => FloatingToolbarCustom<Command>;
9
10
  export interface AltTextToolbarOptions {
10
11
  altTextValidator?: (value: string) => string[];
@@ -3,7 +3,7 @@ import { Slice } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import type { MediaState } from '../types';
6
- import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
6
+ import type { InputMethodInsertMedia, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
7
  import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
8
8
  export interface MediaSingleState extends MediaState {
9
9
  dimensions: {
@@ -14,8 +14,8 @@ export interface MediaSingleState extends MediaState {
14
14
  contextId?: string;
15
15
  }
16
16
  export declare const isMediaSingle: (schema: Schema, fileMimeType?: string) => boolean;
17
- export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia) => boolean;
18
- export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean, widthPluginState?: WidthPluginState | undefined) => boolean;
17
+ export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
18
+ export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
19
19
  export declare const createMediaSingleNode: (schema: Schema, collection: string, maxWidth?: number, minWidth?: number, alignLeftOnInsert?: boolean) => (mediaState: MediaSingleState) => PMNode;
20
20
  export declare function transformSliceForMedia(slice: Slice, schema: Schema): (selection: Selection) => Slice;
21
21
  export declare function isCaptionNode(editorView: EditorView): boolean;
@@ -5,6 +5,7 @@ import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extens
5
5
  import type { Command } from '../../types';
6
6
  import type { InputMethodInsertMedia } from '../analytics';
7
7
  import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
8
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
8
9
  export declare function handleMention(slice: Slice, schema: Schema): Slice;
9
10
  export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
10
11
  export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
@@ -14,7 +15,7 @@ export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEv
14
15
  export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
15
16
  export declare function handleMacroAutoConvert(text: string, slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, cardsOptions?: CardOptions, extensionAutoConverter?: ExtensionAutoConvertHandler): Command;
16
17
  export declare function handleCodeBlock(text: string): Command;
17
- export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia): (slice: Slice) => Command;
18
+ export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined): (slice: Slice) => Command;
18
19
  export declare function handleExpandPasteInTable(slice: Slice): Command;
19
20
  export declare function handleMarkdown(markdownSlice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, from?: number, to?: number): Command;
20
21
  export declare function handleParagraphBlockMarks(state: EditorState, slice: Slice): Slice;
@@ -4,6 +4,7 @@ import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { cardPlugin } from '@atlaskit/editor-plugin-card';
5
5
  import type betterTypeHistoryPlugin from '../better-type-history';
6
6
  import type listPlugin from '../list';
7
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
8
  export type PastePluginOptions = {
8
9
  cardOptions?: CardOptions;
9
10
  sanitizePrivateContent?: boolean;
@@ -14,7 +15,8 @@ declare const pastePlugin: NextEditorPlugin<'paste', {
14
15
  typeof featureFlagsPlugin,
15
16
  OptionalPlugin<typeof listPlugin>,
16
17
  typeof betterTypeHistoryPlugin,
17
- OptionalPlugin<typeof cardPlugin>
18
+ OptionalPlugin<typeof cardPlugin>,
19
+ OptionalPlugin<typeof analyticsPlugin>
18
20
  ];
19
21
  }>;
20
22
  export default pastePlugin;