@atlaskit/editor-core 189.3.14 → 189.3.16

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 (229) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  3. package/dist/cjs/plugins/analytics/index.js +0 -6
  4. package/dist/cjs/plugins/analytics/utils.js +0 -29
  5. package/dist/cjs/plugins/breakout/index.js +3 -3
  6. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -4
  7. package/dist/cjs/plugins/extension/extension-api.js +3 -3
  8. package/dist/cjs/plugins/extension/index.js +14 -3
  9. package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/actions.js +3 -4
  10. package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/index.js +2 -18
  11. package/dist/cjs/plugins/extension/toolbar.js +1 -1
  12. package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
  13. package/dist/cjs/plugins/find-replace/commands-with-analytics.js +85 -71
  14. package/dist/cjs/plugins/find-replace/index.js +5 -2
  15. package/dist/cjs/plugins/find-replace/keymap.js +4 -4
  16. package/dist/cjs/plugins/index.js +1 -24
  17. package/dist/cjs/plugins/insert-block/index.js +36 -53
  18. package/dist/cjs/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +3 -9
  19. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
  20. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
  21. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +3 -3
  22. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -5
  23. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +7 -8
  24. package/dist/cjs/plugins/paste/handlers.js +3 -3
  25. package/dist/cjs/plugins/paste/pm-plugins/main.js +4 -4
  26. package/dist/cjs/presets/context.js +5 -3
  27. package/dist/cjs/presets/universal.js +12 -8
  28. package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
  29. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  30. package/dist/cjs/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +11 -8
  31. package/dist/cjs/ui/ContentStyles/index.js +4 -4
  32. package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
  33. package/dist/cjs/use-preset.js +0 -1
  34. package/dist/cjs/version-wrapper.js +1 -1
  35. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  36. package/dist/es2019/plugins/analytics/index.js +1 -1
  37. package/dist/es2019/plugins/analytics/utils.js +0 -24
  38. package/dist/es2019/plugins/breakout/index.js +1 -1
  39. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -1
  40. package/dist/es2019/plugins/extension/extension-api.js +2 -2
  41. package/dist/es2019/plugins/extension/index.js +13 -3
  42. package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/actions.js +2 -2
  43. package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/index.js +1 -14
  44. package/dist/es2019/plugins/extension/toolbar.js +1 -1
  45. package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +20 -19
  46. package/dist/es2019/plugins/find-replace/commands-with-analytics.js +15 -15
  47. package/dist/es2019/plugins/find-replace/index.js +7 -2
  48. package/dist/es2019/plugins/find-replace/keymap.js +4 -4
  49. package/dist/es2019/plugins/index.js +0 -2
  50. package/dist/es2019/plugins/insert-block/index.js +19 -36
  51. package/dist/es2019/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +4 -8
  52. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
  53. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
  54. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -2
  55. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -3
  56. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +2 -2
  57. package/dist/es2019/plugins/paste/handlers.js +4 -3
  58. package/dist/es2019/plugins/paste/pm-plugins/main.js +4 -4
  59. package/dist/es2019/presets/context.js +2 -2
  60. package/dist/es2019/presets/universal.js +10 -6
  61. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
  62. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  63. package/dist/es2019/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
  64. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  65. package/dist/es2019/ui/ToolbarFeedback/index.js +2 -2
  66. package/dist/es2019/use-preset.js +0 -1
  67. package/dist/es2019/version-wrapper.js +1 -1
  68. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  69. package/dist/esm/plugins/analytics/index.js +1 -1
  70. package/dist/esm/plugins/analytics/utils.js +0 -28
  71. package/dist/esm/plugins/breakout/index.js +1 -1
  72. package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -1
  73. package/dist/esm/plugins/extension/extension-api.js +2 -2
  74. package/dist/esm/plugins/extension/index.js +14 -3
  75. package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/actions.js +2 -2
  76. package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/index.js +1 -17
  77. package/dist/esm/plugins/extension/toolbar.js +1 -1
  78. package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
  79. package/dist/esm/plugins/find-replace/commands-with-analytics.js +84 -70
  80. package/dist/esm/plugins/find-replace/index.js +5 -2
  81. package/dist/esm/plugins/find-replace/keymap.js +4 -4
  82. package/dist/esm/plugins/index.js +0 -2
  83. package/dist/esm/plugins/insert-block/index.js +36 -53
  84. package/dist/esm/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +4 -10
  85. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
  86. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
  87. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -2
  88. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -3
  89. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +2 -2
  90. package/dist/esm/plugins/paste/handlers.js +4 -3
  91. package/dist/esm/plugins/paste/pm-plugins/main.js +4 -4
  92. package/dist/esm/presets/context.js +2 -2
  93. package/dist/esm/presets/universal.js +9 -6
  94. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
  95. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  96. package/dist/esm/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
  97. package/dist/esm/ui/ContentStyles/index.js +1 -1
  98. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  99. package/dist/esm/use-preset.js +0 -1
  100. package/dist/esm/version-wrapper.js +1 -1
  101. package/dist/types/plugins/analytics/index.d.ts +1 -1
  102. package/dist/types/plugins/analytics/utils.d.ts +0 -11
  103. package/dist/types/plugins/extension/extension-api.d.ts +1 -1
  104. package/dist/{types-ts4.5/plugins → types/plugins/extension/pm-plugins}/macro/index.d.ts +1 -4
  105. package/dist/types/plugins/extension/pm-plugins/macro/types.d.ts +4 -0
  106. package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
  107. package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +9 -9
  108. package/dist/types/plugins/find-replace/index.d.ts +5 -3
  109. package/dist/types/plugins/find-replace/keymap.d.ts +2 -1
  110. package/dist/types/plugins/index.d.ts +0 -2
  111. package/dist/types/plugins/insert-block/types.d.ts +4 -2
  112. package/dist/{types-ts4.5 → types/plugins/insert-block}/ui/ElementBrowser/types.d.ts +2 -2
  113. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -1
  114. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -1
  115. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -2
  116. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -1
  117. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -1
  118. package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -1
  119. package/dist/types/plugins/paste/handlers.d.ts +2 -1
  120. package/dist/types/presets/context.d.ts +2 -2
  121. package/dist/types/presets/default.d.ts +8 -0
  122. package/dist/types/presets/universal.d.ts +5 -0
  123. package/dist/types/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
  124. package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
  125. package/dist/types-ts4.5/plugins/analytics/utils.d.ts +0 -11
  126. package/dist/types-ts4.5/plugins/extension/extension-api.d.ts +1 -1
  127. package/dist/{types/plugins → types-ts4.5/plugins/extension/pm-plugins}/macro/index.d.ts +1 -4
  128. package/dist/types-ts4.5/plugins/extension/pm-plugins/macro/types.d.ts +4 -0
  129. package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
  130. package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +9 -9
  131. package/dist/types-ts4.5/plugins/find-replace/index.d.ts +6 -3
  132. package/dist/types-ts4.5/plugins/find-replace/keymap.d.ts +2 -1
  133. package/dist/types-ts4.5/plugins/index.d.ts +0 -2
  134. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +4 -2
  135. package/dist/{types → types-ts4.5/plugins/insert-block}/ui/ElementBrowser/types.d.ts +2 -2
  136. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -1
  137. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -1
  138. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -2
  139. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -1
  140. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -1
  141. package/dist/types-ts4.5/plugins/mobile-dimensions/index.d.ts +2 -1
  142. package/dist/types-ts4.5/plugins/paste/handlers.d.ts +2 -1
  143. package/dist/types-ts4.5/presets/context.d.ts +2 -2
  144. package/dist/types-ts4.5/presets/default.d.ts +8 -0
  145. package/dist/types-ts4.5/presets/universal.d.ts +5 -0
  146. package/dist/types-ts4.5/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
  147. package/package.json +5 -9
  148. package/dist/cjs/plugins/breakout/constants.js +0 -10
  149. package/dist/cjs/plugins/expand/commands.js +0 -184
  150. package/dist/cjs/plugins/expand/index.js +0 -111
  151. package/dist/cjs/plugins/expand/nodeviews/index.js +0 -485
  152. package/dist/cjs/plugins/expand/pm-plugins/keymap.js +0 -171
  153. package/dist/cjs/plugins/expand/pm-plugins/main.js +0 -85
  154. package/dist/cjs/plugins/expand/pm-plugins/plugin-factory.js +0 -15
  155. package/dist/cjs/plugins/expand/reducer.js +0 -20
  156. package/dist/cjs/plugins/expand/toolbar.js +0 -59
  157. package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +0 -104
  158. package/dist/cjs/plugins/expand/ui/class-names.js +0 -20
  159. package/dist/cjs/plugins/expand/utils.js +0 -24
  160. package/dist/cjs/ui/ElementBrowser/types.js +0 -5
  161. package/dist/es2019/plugins/breakout/constants.js +0 -4
  162. package/dist/es2019/plugins/expand/commands.js +0 -161
  163. package/dist/es2019/plugins/expand/index.js +0 -95
  164. package/dist/es2019/plugins/expand/nodeviews/index.js +0 -475
  165. package/dist/es2019/plugins/expand/pm-plugins/keymap.js +0 -197
  166. package/dist/es2019/plugins/expand/pm-plugins/main.js +0 -73
  167. package/dist/es2019/plugins/expand/pm-plugins/plugin-factory.js +0 -9
  168. package/dist/es2019/plugins/expand/reducer.js +0 -11
  169. package/dist/es2019/plugins/expand/toolbar.js +0 -52
  170. package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +0 -85
  171. package/dist/es2019/plugins/expand/ui/class-names.js +0 -12
  172. package/dist/es2019/plugins/expand/utils.js +0 -1
  173. package/dist/esm/plugins/breakout/constants.js +0 -4
  174. package/dist/esm/plugins/expand/commands.js +0 -177
  175. package/dist/esm/plugins/expand/index.js +0 -97
  176. package/dist/esm/plugins/expand/nodeviews/index.js +0 -477
  177. package/dist/esm/plugins/expand/pm-plugins/keymap.js +0 -165
  178. package/dist/esm/plugins/expand/pm-plugins/main.js +0 -77
  179. package/dist/esm/plugins/expand/pm-plugins/plugin-factory.js +0 -9
  180. package/dist/esm/plugins/expand/reducer.js +0 -13
  181. package/dist/esm/plugins/expand/toolbar.js +0 -52
  182. package/dist/esm/plugins/expand/ui/ExpandIconButton.js +0 -95
  183. package/dist/esm/plugins/expand/ui/class-names.js +0 -14
  184. package/dist/esm/plugins/expand/utils.js +0 -1
  185. package/dist/esm/plugins/macro/types.js +0 -1
  186. package/dist/esm/ui/ElementBrowser/types.js +0 -1
  187. package/dist/types/plugins/breakout/constants.d.ts +0 -4
  188. package/dist/types/plugins/expand/commands.d.ts +0 -13
  189. package/dist/types/plugins/expand/index.d.ts +0 -31
  190. package/dist/types/plugins/expand/nodeviews/index.d.ts +0 -55
  191. package/dist/types/plugins/expand/pm-plugins/keymap.d.ts +0 -4
  192. package/dist/types/plugins/expand/pm-plugins/main.d.ts +0 -8
  193. package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
  194. package/dist/types/plugins/expand/reducer.d.ts +0 -3
  195. package/dist/types/plugins/expand/toolbar.d.ts +0 -3
  196. package/dist/types/plugins/expand/types.d.ts +0 -9
  197. package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
  198. package/dist/types/plugins/expand/ui/class-names.d.ts +0 -11
  199. package/dist/types/plugins/expand/utils.d.ts +0 -1
  200. package/dist/types/plugins/macro/types.d.ts +0 -4
  201. package/dist/types-ts4.5/plugins/breakout/constants.d.ts +0 -4
  202. package/dist/types-ts4.5/plugins/expand/commands.d.ts +0 -13
  203. package/dist/types-ts4.5/plugins/expand/index.d.ts +0 -31
  204. package/dist/types-ts4.5/plugins/expand/nodeviews/index.d.ts +0 -55
  205. package/dist/types-ts4.5/plugins/expand/pm-plugins/keymap.d.ts +0 -4
  206. package/dist/types-ts4.5/plugins/expand/pm-plugins/main.d.ts +0 -8
  207. package/dist/types-ts4.5/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
  208. package/dist/types-ts4.5/plugins/expand/reducer.d.ts +0 -3
  209. package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +0 -3
  210. package/dist/types-ts4.5/plugins/expand/types.d.ts +0 -9
  211. package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
  212. package/dist/types-ts4.5/plugins/expand/ui/class-names.d.ts +0 -11
  213. package/dist/types-ts4.5/plugins/expand/utils.d.ts +0 -1
  214. package/dist/types-ts4.5/plugins/macro/types.d.ts +0 -4
  215. /package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
  216. /package/dist/cjs/plugins/{expand → extension/pm-plugins/macro}/types.js +0 -0
  217. /package/dist/cjs/plugins/{macro → insert-block/ui/ElementBrowser}/types.js +0 -0
  218. /package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
  219. /package/dist/es2019/plugins/{expand → extension/pm-plugins/macro}/types.js +0 -0
  220. /package/dist/es2019/plugins/{macro → insert-block/ui/ElementBrowser}/types.js +0 -0
  221. /package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
  222. /package/dist/{es2019/ui/ElementBrowser → esm/plugins/extension/pm-plugins/macro}/types.js +0 -0
  223. /package/dist/esm/plugins/{expand → insert-block/ui/ElementBrowser}/types.js +0 -0
  224. /package/dist/types/plugins/{macro → extension/pm-plugins/macro}/actions.d.ts +0 -0
  225. /package/dist/types/plugins/{macro → extension/pm-plugins/macro}/plugin-key.d.ts +0 -0
  226. /package/dist/types/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.d.ts +0 -0
  227. /package/dist/types-ts4.5/plugins/{macro → extension/pm-plugins/macro}/actions.d.ts +0 -0
  228. /package/dist/types-ts4.5/plugins/{macro → extension/pm-plugins/macro}/plugin-key.d.ts +0 -0
  229. /package/dist/types-ts4.5/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.d.ts +0 -0
@@ -1,16 +1,19 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2;
3
3
  import { css } from '@emotion/react';
4
+ import { DN50, N40A, N50A, N80A, R200, R300, R50 } from '@atlaskit/theme/colors';
5
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
4
6
  import { themed } from '@atlaskit/theme/components';
5
- import { R50, R300, N40A, N50A, N80A, DN50, R200 } from '@atlaskit/theme/colors';
7
+ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
6
8
  import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
7
- import { SelectionStyle, getSelectionStyles, akLayoutGutterOffset, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
8
- import { BreakoutCssClassName } from '../../breakout/constants';
9
- import { expandClassNames } from './class-names';
9
+ import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
10
+ import { expandClassNames } from '@atlaskit/editor-common/styles';
10
11
  var EXPAND_SELECTED_BACKGROUND = themed({
11
12
  light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
12
13
  dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
13
14
  });
15
+
16
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
14
17
  var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
15
18
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
16
19
  light: "var(--ds-icon-subtle, ".concat(N80A, ")"),
@@ -39,6 +42,8 @@ var DANGER_STATE_BORDER_COLOR = themed({
39
42
  var DANGER_STATE_BORDER_RADIUS = themed({
40
43
  dark: '3px'
41
44
  });
45
+
46
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
42
47
  export var expandStyles = function expandStyles(props) {
43
48
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " > div {\n display: flex;\n }\n\n .", " {\n ", "\n overflow: hidden;\n cursor: pointer;\n box-sizing: border-box;\n\n td > & {\n margin-top: 0;\n }\n\n .", " svg {\n ", ";\n transform: rotate(90deg);\n }\n\n &.", ":not(.danger) {\n ", "\n\n ::after {\n // Custom background color and borders (for dark theme).\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n }\n }\n\n &.danger {\n background: ", ";\n border: ", ";\n border-color: ", ";\n border-radius: ", ";\n }\n }\n\n .ProseMirror\n > .", ",\n .", "\n > .", " {\n margin-left: -", "px;\n margin-right: -", "px;\n }\n\n .", " {\n ", "\n cursor: text;\n padding-top: 0px;\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", ";\n align-items: center;\n overflow: visible;\n }\n\n .", " {\n background: ", ";\n border-color: ", ";\n\n .", " {\n padding-top: ", ";\n }\n }\n\n .", " {\n width: 100%;\n }\n\n /* stylelint-disable property-no-unknown, value-keyword-case */\n .", ":(.", ") {\n .expand-content-wrapper {\n height: auto;\n }\n }\n /* stylelint-enable property-no-unknown, value-keyword-case */\n\n .", ":not(.", ") {\n .ak-editor-expand__content {\n position: absolute;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap;\n }\n\n .", " svg {\n ", ";\n transform: rotate(0deg);\n }\n\n &:not(.", "):not(.danger) {\n background: transparent;\n border-color: transparent;\n\n &:hover {\n border-color: ", ";\n background: ", ";\n }\n }\n }\n"])), expandClassNames.icon, expandClassNames.prefix, sharedExpandStyles.containerStyles({
44
49
  expanded: false,
@@ -16,7 +16,7 @@ import { layoutStyles } from './layout';
16
16
  import { panelStyles } from './panel';
17
17
  import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
18
18
  import { extensionStyles } from '../../plugins/extension/ui/styles';
19
- import { expandStyles } from '../../plugins/expand/ui/styles';
19
+ import { expandStyles } from './expand';
20
20
  import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
21
21
  import { findReplaceStyles } from '../../plugins/find-replace/styles';
22
22
  import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
@@ -102,7 +102,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
102
102
  jiraIssueCollectorScriptLoading: true,
103
103
  showOptOutOption: false
104
104
  });
105
- basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.base.sharedState.currentState();
105
+ basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.base) === null || _this$props$api === void 0 ? void 0 : _this$props$api.sharedState.currentState();
106
106
  sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
107
107
  contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
108
108
  tabId = window.sessionStorage['awc.tab.id'];
@@ -35,7 +35,6 @@ import { usePresetContext } from './presets/context';
35
35
  */
36
36
  export function usePreset(createPreset, dependencies) {
37
37
  var editorApi = usePresetContext();
38
-
39
38
  // eslint-disable-next-line react-hooks/exhaustive-deps
40
39
  var preset = useMemo(createPreset, dependencies);
41
40
  return {
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "189.3.14";
2
+ export var version = "189.3.16";
@@ -1,3 +1,3 @@
1
1
  import analyticsPlugin from './plugin';
2
- export { withAnalytics, addAnalytics } from './utils';
2
+ export { addAnalytics } from './utils';
3
3
  export default analyticsPlugin;
@@ -1,6 +1,5 @@
1
1
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { AnalyticsEventPayload } from './types';
3
- import type { HigherOrderCommand } from '../../types/command';
4
3
  /**
5
4
  *
6
5
  * @private
@@ -10,13 +9,3 @@ import type { HigherOrderCommand } from '../../types/command';
10
9
  *
11
10
  */
12
11
  export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
13
- export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
14
- /**
15
- *
16
- * @private
17
- * @deprecated
18
- *
19
- * Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
20
- *
21
- */
22
- export declare function withAnalytics(payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback, channel?: string): HigherOrderCommand;
@@ -1,5 +1,5 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import type { MacroProvider } from '../macro';
2
+ import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
3
3
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
4
  import type { CreateExtensionAPI } from '@atlaskit/editor-plugin-extension';
5
5
  interface EditInLegacyMacroBrowserArgs {
@@ -1,11 +1,8 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import type { Dispatch } from '../../event-dispatcher';
4
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
4
  import type { MacroState } from './types';
6
5
  export type { MacroProvider, MacroAttributes, ExtensionType, } from '@atlaskit/editor-common/provider-factory';
7
6
  export { insertMacroFromMacroBrowser, resolveMacro, runMacroAutoConvert, setMacroProvider, } from './actions';
8
7
  export type { MacroState };
9
8
  export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory) => SafePlugin<any>;
10
- declare const macroPlugin: NextEditorPlugin<'macro'>;
11
- export default macroPlugin;
@@ -0,0 +1,4 @@
1
+ import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
2
+ export type MacroState = {
3
+ macroProvider: MacroProvider | null;
4
+ };
@@ -1,7 +1,8 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
4
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
5
6
  export type FindReplaceToolbarButtonWithStateProps = {
6
7
  popupsBoundariesElement?: HTMLElement;
7
8
  popupsMountPoint?: HTMLElement;
@@ -12,6 +13,7 @@ export type FindReplaceToolbarButtonWithStateProps = {
12
13
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
13
14
  takeFullWidth?: boolean;
14
15
  featureFlags: FeatureFlags;
16
+ editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
15
17
  };
16
- declare const FindReplaceToolbarButtonWithState: React.FunctionComponent<FindReplaceToolbarButtonWithStateProps>;
18
+ declare const FindReplaceToolbarButtonWithState: ({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, featureFlags, editorAnalyticsAPI, takeFullWidth, }: FindReplaceToolbarButtonWithStateProps) => JSX.Element | null;
17
19
  export default FindReplaceToolbarButtonWithState;
@@ -1,27 +1,27 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { Command } from '../../types';
3
- import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
4
- export declare const activateWithAnalytics: ({ triggerMethod, }: {
3
+ import type { TRIGGER_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ export declare const activateWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
5
5
  triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR;
6
6
  }) => Command;
7
- export declare const findWithAnalytics: ({ editorView, containerElement, keyword, }: {
7
+ export declare const findWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ editorView, containerElement, keyword, }: {
8
8
  editorView: EditorView;
9
9
  containerElement: HTMLElement | null;
10
10
  keyword?: string | undefined;
11
- }) => Command;
12
- export declare const findNextWithAnalytics: ({ triggerMethod, }: {
11
+ }) => import("@atlaskit/editor-common/types").Command;
12
+ export declare const findNextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
13
13
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
14
14
  }) => Command;
15
- export declare const findPrevWithAnalytics: ({ triggerMethod, }: {
15
+ export declare const findPrevWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
16
16
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
17
17
  }) => Command;
18
- export declare const replaceWithAnalytics: ({ triggerMethod, replaceText, }: {
18
+ export declare const replaceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, replaceText, }: {
19
19
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
20
20
  replaceText: string;
21
21
  }) => Command;
22
- export declare const replaceAllWithAnalytics: ({ replaceText, }: {
22
+ export declare const replaceAllWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ replaceText }: {
23
23
  replaceText: string;
24
24
  }) => Command;
25
- export declare const cancelSearchWithAnalytics: ({ triggerMethod, }: {
25
+ export declare const cancelSearchWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
26
26
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
27
27
  }) => Command;
@@ -1,11 +1,13 @@
1
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
1
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
4
  type Config = {
4
5
  takeFullWidth: boolean;
5
6
  twoLineEditorToolbar: boolean;
6
7
  };
7
- export declare const findReplacePlugin: NextEditorPlugin<'findReplace', {
8
+ export type FindReplacePlugin = NextEditorPlugin<'findReplace', {
8
9
  pluginConfiguration: Config;
9
- dependencies: [FeatureFlagsPlugin];
10
+ dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
10
11
  }>;
12
+ export declare const findReplacePlugin: FindReplacePlugin;
11
13
  export default findReplacePlugin;
@@ -1,3 +1,4 @@
1
1
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- declare const keymapPlugin: () => SafePlugin<any>;
2
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
+ declare const keymapPlugin: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<any>;
3
4
  export default keymapPlugin;
@@ -4,7 +4,6 @@ export { default as extensionPlugin } from './extension';
4
4
  export { default as insertBlockPlugin } from './insert-block';
5
5
  export { default as jiraIssuePlugin } from './jira-issue';
6
6
  export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
7
- export { default as macroPlugin } from './macro';
8
7
  export { default as pastePlugin } from './paste';
9
8
  export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
10
9
  export { default as breakoutPlugin } from './breakout';
@@ -15,7 +14,6 @@ export { default as annotationPlugin } from './annotation';
15
14
  export { default as analyticsPlugin } from './analytics';
16
15
  export { default as customAutoformatPlugin } from './custom-autoformat';
17
16
  export { default as feedbackDialogPlugin } from './feedback-dialog';
18
- export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
19
17
  export { default as mobileDimensionsPlugin } from './mobile-dimensions';
20
18
  export { default as findReplacePlugin } from './find-replace';
21
19
  export { default as mobileSelectionPlugin } from './mobile-selection';
@@ -4,6 +4,7 @@ import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
4
4
  import type { DatePlugin } from '@atlaskit/editor-plugin-date';
5
5
  import type { TablePlugin } from '@atlaskit/editor-plugin-table';
6
6
  import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
+ import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
7
8
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
9
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
10
  import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
@@ -17,7 +18,7 @@ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
17
18
  import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
18
19
  import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
19
20
  import type { PlaceholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
20
- import type { ExpandPlugin } from '../expand';
21
+ import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
21
22
  export type InsertBlockPluginDependencies = [
22
23
  FeatureFlagsPlugin,
23
24
  TypeAheadPlugin,
@@ -37,5 +38,6 @@ export type InsertBlockPluginDependencies = [
37
38
  OptionalPlugin<StatusPlugin>,
38
39
  OptionalPlugin<LayoutPlugin>,
39
40
  OptionalPlugin<ExpandPlugin>,
40
- OptionalPlugin<PlaceholderTextPlugin>
41
+ OptionalPlugin<PlaceholderTextPlugin>,
42
+ OptionalPlugin<ExtensionPlugin>
41
43
  ];
@@ -2,8 +2,8 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
4
4
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
5
- import type { InsertBlockPluginDependencies } from '../../plugins/insert-block/types';
6
- import type { BlockMenuItem } from '../../plugins/insert-block/ui/ToolbarInsertBlock/create-items';
5
+ import type { InsertBlockPluginDependencies } from '../../types';
6
+ import type { BlockMenuItem } from '../ToolbarInsertBlock/create-items';
7
7
  type SimpleEventHandler<T> = (event?: T) => void;
8
8
  export interface InsertMenuProps {
9
9
  dropdownItems: BlockMenuItem[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { BlockMenuItem } from './create-items';
4
- import type { OnInsert } from '../../../../ui/ElementBrowser/types';
4
+ import type { OnInsert } from '../ElementBrowser/types';
5
5
  import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
6
6
  import type { InsertBlockPluginDependencies } from '../../types';
7
7
  type SimpleEventHandler<T> = (event?: T) => void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { OnInsert } from '../../../../ui/ElementBrowser/types';
3
+ import type { OnInsert } from '../ElementBrowser/types';
4
4
  import type { BlockMenuItem } from './create-items';
5
5
  import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
6
6
  import type { InsertBlockPluginDependencies } from '../../types';
@@ -4,7 +4,6 @@ import type { Schema } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EmojiProvider } from '@atlaskit/emoji/resource';
5
5
  import type { BlockType } from '@atlaskit/editor-plugin-block-type';
6
6
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
7
- import type { MacroProvider } from '../../../macro';
8
7
  export interface CreateItemsConfig {
9
8
  isTypeAheadAllowed?: boolean;
10
9
  tableSupported?: boolean;
@@ -28,7 +27,6 @@ export interface CreateItemsConfig {
28
27
  showElementBrowserLink?: boolean;
29
28
  expandEnabled?: boolean;
30
29
  insertMenuItems?: MenuItem[];
31
- macroProvider?: MacroProvider | null;
32
30
  emojiProvider?: Promise<EmojiProvider>;
33
31
  schema: Schema;
34
32
  numberOfButtons: number;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import type { ToolbarButtonRef } from '../../../../ui/ToolbarButton';
3
+ import type { ToolbarButtonRef } from '@atlaskit/editor-common/ui-menu';
4
4
  export interface DropDownButtonProps {
5
5
  label: string;
6
6
  selected: boolean;
@@ -38,7 +38,6 @@ export interface Props {
38
38
  popupsMountPoint?: HTMLElement;
39
39
  popupsBoundariesElement?: HTMLElement;
40
40
  popupsScrollableElement?: HTMLElement;
41
- macroProvider?: MacroProvider | null;
42
41
  insertMenuItems?: MenuItem[];
43
42
  showElementBrowserLink?: boolean;
44
43
  showSeparator?: boolean;
@@ -1,6 +1,7 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { MobileDimensionsPluginState } from './types';
3
- declare const mobileDimensionsPlugin: NextEditorPlugin<'mobileDimensions', {
3
+ export type MobileDimensionsPlugin = NextEditorPlugin<'mobileDimensions', {
4
4
  sharedState: MobileDimensionsPluginState | undefined;
5
5
  }>;
6
+ declare const mobileDimensionsPlugin: MobileDimensionsPlugin;
6
7
  export default mobileDimensionsPlugin;
@@ -4,6 +4,7 @@ import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state'
4
4
  import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
5
5
  import type { Command } from '@atlaskit/editor-common/types';
6
6
  import type { InputMethodInsertMedia, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
+ import type { RunMacroAutoConvert } from '@atlaskit/editor-plugin-extension';
7
8
  import type { InsertMediaAsMediaSingle } from '@atlaskit/editor-plugin-media/types';
8
9
  import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
9
10
  import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
@@ -15,7 +16,7 @@ export declare function handlePastePanelOrDecisionContentIntoList(slice: Slice,
15
16
  export declare function handlePasteLinkOnSelectedText(slice: Slice): Command;
16
17
  export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEvent, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): Command;
17
18
  export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
18
- export declare function handleMacroAutoConvert(text: string, slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, cardsOptions?: CardOptions, extensionAutoConverter?: ExtensionAutoConvertHandler): Command;
19
+ export declare function handleMacroAutoConvert(text: string, slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, runMacroAutoConvert: RunMacroAutoConvert | undefined, cardsOptions?: CardOptions, extensionAutoConverter?: ExtensionAutoConvertHandler): Command;
19
20
  export declare function handleCodeBlock(text: string): Command;
20
21
  export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia, insertMediaAsMediaSingle: InsertMediaAsMediaSingle | undefined): (slice: Slice) => Command;
21
22
  export declare function handleExpandPasteInTable(slice: Slice): Command;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
2
+ import type { PublicPluginAPI, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  export type SetEditorAPI = (editorApi: PublicPluginAPI<any>) => void;
4
4
  export interface EditorAPIContextType {
5
5
  editorApi?: PublicPluginAPI<any>;
@@ -10,6 +10,6 @@ interface EditorAPIProviderProps {
10
10
  children: React.ReactNode;
11
11
  }
12
12
  export declare const PresetContextProvider: ({ children }: EditorAPIProviderProps) => JSX.Element;
13
- export declare const usePresetContext: () => PublicPluginAPI<any> | undefined;
13
+ export declare function usePresetContext<Plugins extends OptionalPlugin<NextEditorPlugin<any, any>>[]>(): PublicPluginAPI<Plugins>;
14
14
  export declare const useSetPresetContext: () => SetEditorAPI | undefined;
15
15
  export {};
@@ -113,6 +113,8 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
113
113
  }, undefined>>];
114
114
  actions: {
115
115
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
116
+ insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
117
+ runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
116
118
  };
117
119
  }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
118
120
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -252,6 +254,8 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
252
254
  }, undefined>>];
253
255
  actions: {
254
256
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
257
+ insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
258
+ runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
255
259
  };
256
260
  }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
257
261
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -598,6 +602,8 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
598
602
  }, undefined>>];
599
603
  actions: {
600
604
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
605
+ insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
606
+ runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
601
607
  };
602
608
  }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
603
609
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -737,6 +743,8 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
737
743
  }, undefined>>];
738
744
  actions: {
739
745
  api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
746
+ insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
747
+ runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
740
748
  };
741
749
  }, import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"copyButton", {
742
750
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -1,5 +1,6 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { EditorAppearance } from '@atlaskit/editor-common/types';
3
+ import type { EditorProps } from '../types';
3
4
  import type { DefaultPresetPluginOptions } from './default';
4
5
  import type { EditorPresetProps } from './types';
5
6
  import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '../types/editor-props';
@@ -18,4 +19,8 @@ type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & Edi
18
19
  * @returns a full featured preset configured according to the provided props - basis for create-plugins-list
19
20
  */
20
21
  export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetBuilder<any, any>;
22
+ interface ExpandEditorProps {
23
+ allowExpand?: EditorProps['allowExpand'];
24
+ }
25
+ export declare function isExpandInsertionEnabled({ allowExpand }: ExpandEditorProps): boolean;
21
26
  export {};
@@ -1,2 +1,2 @@
1
- import { ThemeProps } from '@atlaskit/theme/types';
1
+ import type { ThemeProps } from '@atlaskit/theme/types';
2
2
  export declare const expandStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
@@ -1,3 +1,3 @@
1
1
  import analyticsPlugin from './plugin';
2
- export { withAnalytics, addAnalytics } from './utils';
2
+ export { addAnalytics } from './utils';
3
3
  export default analyticsPlugin;
@@ -1,6 +1,5 @@
1
1
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { AnalyticsEventPayload } from './types';
3
- import type { HigherOrderCommand } from '../../types/command';
4
3
  /**
5
4
  *
6
5
  * @private
@@ -10,13 +9,3 @@ import type { HigherOrderCommand } from '../../types/command';
10
9
  *
11
10
  */
12
11
  export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
13
- export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
14
- /**
15
- *
16
- * @private
17
- * @deprecated
18
- *
19
- * Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
20
- *
21
- */
22
- export declare function withAnalytics(payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback, channel?: string): HigherOrderCommand;
@@ -1,5 +1,5 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import type { MacroProvider } from '../macro';
2
+ import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
3
3
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
4
  import type { CreateExtensionAPI } from '@atlaskit/editor-plugin-extension';
5
5
  interface EditInLegacyMacroBrowserArgs {
@@ -1,11 +1,8 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import type { Dispatch } from '../../event-dispatcher';
4
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
4
  import type { MacroState } from './types';
6
5
  export type { MacroProvider, MacroAttributes, ExtensionType, } from '@atlaskit/editor-common/provider-factory';
7
6
  export { insertMacroFromMacroBrowser, resolveMacro, runMacroAutoConvert, setMacroProvider, } from './actions';
8
7
  export type { MacroState };
9
8
  export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory) => SafePlugin<any>;
10
- declare const macroPlugin: NextEditorPlugin<'macro'>;
11
- export default macroPlugin;
@@ -0,0 +1,4 @@
1
+ import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
2
+ export type MacroState = {
3
+ macroProvider: MacroProvider | null;
4
+ };
@@ -1,7 +1,8 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
4
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
5
6
  export type FindReplaceToolbarButtonWithStateProps = {
6
7
  popupsBoundariesElement?: HTMLElement;
7
8
  popupsMountPoint?: HTMLElement;
@@ -12,6 +13,7 @@ export type FindReplaceToolbarButtonWithStateProps = {
12
13
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
13
14
  takeFullWidth?: boolean;
14
15
  featureFlags: FeatureFlags;
16
+ editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
15
17
  };
16
- declare const FindReplaceToolbarButtonWithState: React.FunctionComponent<FindReplaceToolbarButtonWithStateProps>;
18
+ declare const FindReplaceToolbarButtonWithState: ({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, featureFlags, editorAnalyticsAPI, takeFullWidth, }: FindReplaceToolbarButtonWithStateProps) => JSX.Element | null;
17
19
  export default FindReplaceToolbarButtonWithState;
@@ -1,27 +1,27 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { Command } from '../../types';
3
- import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
4
- export declare const activateWithAnalytics: ({ triggerMethod, }: {
3
+ import type { TRIGGER_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ export declare const activateWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
5
5
  triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR;
6
6
  }) => Command;
7
- export declare const findWithAnalytics: ({ editorView, containerElement, keyword, }: {
7
+ export declare const findWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ editorView, containerElement, keyword, }: {
8
8
  editorView: EditorView;
9
9
  containerElement: HTMLElement | null;
10
10
  keyword?: string | undefined;
11
- }) => Command;
12
- export declare const findNextWithAnalytics: ({ triggerMethod, }: {
11
+ }) => import("@atlaskit/editor-common/types").Command;
12
+ export declare const findNextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
13
13
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
14
14
  }) => Command;
15
- export declare const findPrevWithAnalytics: ({ triggerMethod, }: {
15
+ export declare const findPrevWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
16
16
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
17
17
  }) => Command;
18
- export declare const replaceWithAnalytics: ({ triggerMethod, replaceText, }: {
18
+ export declare const replaceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, replaceText, }: {
19
19
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
20
20
  replaceText: string;
21
21
  }) => Command;
22
- export declare const replaceAllWithAnalytics: ({ replaceText, }: {
22
+ export declare const replaceAllWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ replaceText }: {
23
23
  replaceText: string;
24
24
  }) => Command;
25
- export declare const cancelSearchWithAnalytics: ({ triggerMethod, }: {
25
+ export declare const cancelSearchWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, }: {
26
26
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
27
27
  }) => Command;
@@ -1,13 +1,16 @@
1
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
1
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
4
  type Config = {
4
5
  takeFullWidth: boolean;
5
6
  twoLineEditorToolbar: boolean;
6
7
  };
7
- export declare const findReplacePlugin: NextEditorPlugin<'findReplace', {
8
+ export type FindReplacePlugin = NextEditorPlugin<'findReplace', {
8
9
  pluginConfiguration: Config;
9
10
  dependencies: [
10
- FeatureFlagsPlugin
11
+ FeatureFlagsPlugin,
12
+ OptionalPlugin<AnalyticsPlugin>
11
13
  ];
12
14
  }>;
15
+ export declare const findReplacePlugin: FindReplacePlugin;
13
16
  export default findReplacePlugin;
@@ -1,3 +1,4 @@
1
1
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- declare const keymapPlugin: () => SafePlugin<any>;
2
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
+ declare const keymapPlugin: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<any>;
3
4
  export default keymapPlugin;
@@ -4,7 +4,6 @@ export { default as extensionPlugin } from './extension';
4
4
  export { default as insertBlockPlugin } from './insert-block';
5
5
  export { default as jiraIssuePlugin } from './jira-issue';
6
6
  export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
7
- export { default as macroPlugin } from './macro';
8
7
  export { default as pastePlugin } from './paste';
9
8
  export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
10
9
  export { default as breakoutPlugin } from './breakout';
@@ -15,7 +14,6 @@ export { default as annotationPlugin } from './annotation';
15
14
  export { default as analyticsPlugin } from './analytics';
16
15
  export { default as customAutoformatPlugin } from './custom-autoformat';
17
16
  export { default as feedbackDialogPlugin } from './feedback-dialog';
18
- export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
19
17
  export { default as mobileDimensionsPlugin } from './mobile-dimensions';
20
18
  export { default as findReplacePlugin } from './find-replace';
21
19
  export { default as mobileSelectionPlugin } from './mobile-selection';