@atlaskit/editor-core 189.3.14 → 189.3.15

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 (148) hide show
  1. package/CHANGELOG.md +10 -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/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
  8. package/dist/cjs/plugins/find-replace/commands-with-analytics.js +85 -71
  9. package/dist/cjs/plugins/find-replace/index.js +5 -2
  10. package/dist/cjs/plugins/find-replace/keymap.js +4 -4
  11. package/dist/cjs/plugins/index.js +1 -17
  12. package/dist/cjs/presets/context.js +5 -3
  13. package/dist/cjs/presets/universal.js +12 -3
  14. package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
  15. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  16. package/dist/cjs/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +11 -8
  17. package/dist/cjs/ui/ContentStyles/index.js +4 -4
  18. package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
  19. package/dist/cjs/use-preset.js +0 -1
  20. package/dist/cjs/version-wrapper.js +1 -1
  21. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  22. package/dist/es2019/plugins/analytics/index.js +1 -1
  23. package/dist/es2019/plugins/analytics/utils.js +0 -24
  24. package/dist/es2019/plugins/breakout/index.js +1 -1
  25. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -1
  26. package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +20 -19
  27. package/dist/es2019/plugins/find-replace/commands-with-analytics.js +15 -15
  28. package/dist/es2019/plugins/find-replace/index.js +7 -2
  29. package/dist/es2019/plugins/find-replace/keymap.js +4 -4
  30. package/dist/es2019/plugins/index.js +0 -1
  31. package/dist/es2019/presets/context.js +2 -2
  32. package/dist/es2019/presets/universal.js +10 -1
  33. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
  34. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  35. package/dist/es2019/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
  36. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  37. package/dist/es2019/ui/ToolbarFeedback/index.js +2 -2
  38. package/dist/es2019/use-preset.js +0 -1
  39. package/dist/es2019/version-wrapper.js +1 -1
  40. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  41. package/dist/esm/plugins/analytics/index.js +1 -1
  42. package/dist/esm/plugins/analytics/utils.js +0 -28
  43. package/dist/esm/plugins/breakout/index.js +1 -1
  44. package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -1
  45. package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
  46. package/dist/esm/plugins/find-replace/commands-with-analytics.js +84 -70
  47. package/dist/esm/plugins/find-replace/index.js +5 -2
  48. package/dist/esm/plugins/find-replace/keymap.js +4 -4
  49. package/dist/esm/plugins/index.js +0 -1
  50. package/dist/esm/presets/context.js +2 -2
  51. package/dist/esm/presets/universal.js +9 -1
  52. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
  53. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  54. package/dist/esm/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
  55. package/dist/esm/ui/ContentStyles/index.js +1 -1
  56. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  57. package/dist/esm/use-preset.js +0 -1
  58. package/dist/esm/version-wrapper.js +1 -1
  59. package/dist/types/plugins/analytics/index.d.ts +1 -1
  60. package/dist/types/plugins/analytics/utils.d.ts +0 -11
  61. package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
  62. package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +9 -9
  63. package/dist/types/plugins/find-replace/index.d.ts +5 -3
  64. package/dist/types/plugins/find-replace/keymap.d.ts +2 -1
  65. package/dist/types/plugins/index.d.ts +0 -1
  66. package/dist/types/plugins/insert-block/types.d.ts +1 -1
  67. package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -1
  68. package/dist/types/presets/context.d.ts +2 -2
  69. package/dist/types/presets/universal.d.ts +5 -0
  70. package/dist/types/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
  71. package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
  72. package/dist/types-ts4.5/plugins/analytics/utils.d.ts +0 -11
  73. package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
  74. package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +9 -9
  75. package/dist/types-ts4.5/plugins/find-replace/index.d.ts +6 -3
  76. package/dist/types-ts4.5/plugins/find-replace/keymap.d.ts +2 -1
  77. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  78. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
  79. package/dist/types-ts4.5/plugins/mobile-dimensions/index.d.ts +2 -1
  80. package/dist/types-ts4.5/presets/context.d.ts +2 -2
  81. package/dist/types-ts4.5/presets/universal.d.ts +5 -0
  82. package/dist/types-ts4.5/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
  83. package/package.json +3 -7
  84. package/dist/cjs/plugins/breakout/constants.js +0 -10
  85. package/dist/cjs/plugins/expand/commands.js +0 -184
  86. package/dist/cjs/plugins/expand/index.js +0 -111
  87. package/dist/cjs/plugins/expand/nodeviews/index.js +0 -485
  88. package/dist/cjs/plugins/expand/pm-plugins/keymap.js +0 -171
  89. package/dist/cjs/plugins/expand/pm-plugins/main.js +0 -85
  90. package/dist/cjs/plugins/expand/pm-plugins/plugin-factory.js +0 -15
  91. package/dist/cjs/plugins/expand/reducer.js +0 -20
  92. package/dist/cjs/plugins/expand/toolbar.js +0 -59
  93. package/dist/cjs/plugins/expand/types.js +0 -5
  94. package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +0 -104
  95. package/dist/cjs/plugins/expand/ui/class-names.js +0 -20
  96. package/dist/cjs/plugins/expand/utils.js +0 -24
  97. package/dist/es2019/plugins/breakout/constants.js +0 -4
  98. package/dist/es2019/plugins/expand/commands.js +0 -161
  99. package/dist/es2019/plugins/expand/index.js +0 -95
  100. package/dist/es2019/plugins/expand/nodeviews/index.js +0 -475
  101. package/dist/es2019/plugins/expand/pm-plugins/keymap.js +0 -197
  102. package/dist/es2019/plugins/expand/pm-plugins/main.js +0 -73
  103. package/dist/es2019/plugins/expand/pm-plugins/plugin-factory.js +0 -9
  104. package/dist/es2019/plugins/expand/reducer.js +0 -11
  105. package/dist/es2019/plugins/expand/toolbar.js +0 -52
  106. package/dist/es2019/plugins/expand/types.js +0 -1
  107. package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +0 -85
  108. package/dist/es2019/plugins/expand/ui/class-names.js +0 -12
  109. package/dist/es2019/plugins/expand/utils.js +0 -1
  110. package/dist/esm/plugins/breakout/constants.js +0 -4
  111. package/dist/esm/plugins/expand/commands.js +0 -177
  112. package/dist/esm/plugins/expand/index.js +0 -97
  113. package/dist/esm/plugins/expand/nodeviews/index.js +0 -477
  114. package/dist/esm/plugins/expand/pm-plugins/keymap.js +0 -165
  115. package/dist/esm/plugins/expand/pm-plugins/main.js +0 -77
  116. package/dist/esm/plugins/expand/pm-plugins/plugin-factory.js +0 -9
  117. package/dist/esm/plugins/expand/reducer.js +0 -13
  118. package/dist/esm/plugins/expand/toolbar.js +0 -52
  119. package/dist/esm/plugins/expand/types.js +0 -1
  120. package/dist/esm/plugins/expand/ui/ExpandIconButton.js +0 -95
  121. package/dist/esm/plugins/expand/ui/class-names.js +0 -14
  122. package/dist/esm/plugins/expand/utils.js +0 -1
  123. package/dist/types/plugins/breakout/constants.d.ts +0 -4
  124. package/dist/types/plugins/expand/commands.d.ts +0 -13
  125. package/dist/types/plugins/expand/index.d.ts +0 -31
  126. package/dist/types/plugins/expand/nodeviews/index.d.ts +0 -55
  127. package/dist/types/plugins/expand/pm-plugins/keymap.d.ts +0 -4
  128. package/dist/types/plugins/expand/pm-plugins/main.d.ts +0 -8
  129. package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
  130. package/dist/types/plugins/expand/reducer.d.ts +0 -3
  131. package/dist/types/plugins/expand/toolbar.d.ts +0 -3
  132. package/dist/types/plugins/expand/types.d.ts +0 -9
  133. package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
  134. package/dist/types/plugins/expand/ui/class-names.d.ts +0 -11
  135. package/dist/types/plugins/expand/utils.d.ts +0 -1
  136. package/dist/types-ts4.5/plugins/breakout/constants.d.ts +0 -4
  137. package/dist/types-ts4.5/plugins/expand/commands.d.ts +0 -13
  138. package/dist/types-ts4.5/plugins/expand/index.d.ts +0 -31
  139. package/dist/types-ts4.5/plugins/expand/nodeviews/index.d.ts +0 -55
  140. package/dist/types-ts4.5/plugins/expand/pm-plugins/keymap.d.ts +0 -4
  141. package/dist/types-ts4.5/plugins/expand/pm-plugins/main.d.ts +0 -8
  142. package/dist/types-ts4.5/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
  143. package/dist/types-ts4.5/plugins/expand/reducer.d.ts +0 -3
  144. package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +0 -3
  145. package/dist/types-ts4.5/plugins/expand/types.d.ts +0 -9
  146. package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
  147. package/dist/types-ts4.5/plugins/expand/ui/class-names.d.ts +0 -11
  148. package/dist/types-ts4.5/plugins/expand/utils.d.ts +0 -1
@@ -7,17 +7,18 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.expandStyles = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
- var _components = require("@atlaskit/theme/components");
11
10
  var _colors = require("@atlaskit/theme/colors");
11
+ var _components = require("@atlaskit/theme/components");
12
+ var _styles = require("@atlaskit/editor-common/styles");
12
13
  var _ui = require("@atlaskit/editor-common/ui");
13
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
- var _constants = require("../../breakout/constants");
15
- var _classNames = require("./class-names");
16
- var _templateObject, _templateObject2;
15
+ var _templateObject, _templateObject2; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
17
16
  var EXPAND_SELECTED_BACKGROUND = (0, _components.themed)({
18
17
  light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
19
18
  dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
20
19
  });
20
+
21
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
21
22
  var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
22
23
  return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _components.themed)({
23
24
  light: "var(--ds-icon-subtle, ".concat(_colors.N80A, ")"),
@@ -46,17 +47,19 @@ var DANGER_STATE_BORDER_COLOR = (0, _components.themed)({
46
47
  var DANGER_STATE_BORDER_RADIUS = (0, _components.themed)({
47
48
  dark: '3px'
48
49
  });
50
+
51
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
49
52
  var expandStyles = exports.expandStyles = function expandStyles(props) {
50
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])), _classNames.expandClassNames.icon, _classNames.expandClassNames.prefix, _ui.sharedExpandStyles.containerStyles({
53
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])), _styles.expandClassNames.icon, _styles.expandClassNames.prefix, _ui.sharedExpandStyles.containerStyles({
51
54
  expanded: false,
52
55
  focused: false
53
- })(props), _classNames.expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), ACTIVE_STATE_BACKGROUND_COLOR(props), ACTIVE_STATE_BORDER(props), ACTIVE_STATE_BORDER_RADIUS(props), DANGER_STATE_BACKGROUND_COLOR(props), DANGER_STATE_BORDER(props), DANGER_STATE_BORDER_COLOR(props), DANGER_STATE_BORDER_RADIUS(props), _classNames.expandClassNames.type('expand'), _constants.BreakoutCssClassName.BREAKOUT_MARK_DOM, _classNames.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akLayoutGutterOffset, _classNames.expandClassNames.content, _ui.sharedExpandStyles.contentStyles({
56
+ })(props), _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), ACTIVE_STATE_BACKGROUND_COLOR(props), ACTIVE_STATE_BORDER(props), ACTIVE_STATE_BORDER_RADIUS(props), DANGER_STATE_BACKGROUND_COLOR(props), DANGER_STATE_BORDER(props), DANGER_STATE_BORDER_COLOR(props), DANGER_STATE_BORDER_RADIUS(props), _styles.expandClassNames.type('expand'), _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM, _styles.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akLayoutGutterOffset, _styles.expandClassNames.content, _ui.sharedExpandStyles.contentStyles({
54
57
  expanded: false,
55
58
  focused: false
56
- })(props), _classNames.expandClassNames.titleInput, _ui.sharedExpandStyles.titleInputStyles(props), _classNames.expandClassNames.titleContainer, _ui.sharedExpandStyles.titleContainerStyles(props), _classNames.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND(props), (0, _components.themed)({
59
+ })(props), _styles.expandClassNames.titleInput, _ui.sharedExpandStyles.titleInputStyles(props), _styles.expandClassNames.titleContainer, _ui.sharedExpandStyles.titleContainerStyles(props), _styles.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND(props), (0, _components.themed)({
57
60
  light: "var(--ds-border, ".concat(_colors.N40A, ")"),
58
61
  dark: "var(--ds-border, ".concat(_colors.DN50, ")")
59
- })(props), _classNames.expandClassNames.content, "var(--ds-space-100, 8px)", _classNames.expandClassNames.inputContainer, _classNames.expandClassNames.prefix, _classNames.expandClassNames.expanded, _classNames.expandClassNames.prefix, _classNames.expandClassNames.expanded, _classNames.expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _components.themed)({
62
+ })(props), _styles.expandClassNames.content, "var(--ds-space-100, 8px)", _styles.expandClassNames.inputContainer, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _components.themed)({
60
63
  light: "var(--ds-border, ".concat(_colors.N50A, ")"),
61
64
  dark: "var(--ds-border, ".concat(_colors.DN50, ")")
62
65
  })(props), EXPAND_SELECTED_BACKGROUND(props));
@@ -22,9 +22,9 @@ var _layout = require("./layout");
22
22
  var _panel = require("./panel");
23
23
  var _styles5 = require("@atlaskit/editor-plugin-placeholder-text/styles");
24
24
  var _styles6 = require("../../plugins/extension/ui/styles");
25
- var _styles7 = require("../../plugins/expand/ui/styles");
26
- var _styles8 = require("../../plugins/find-replace/styles");
27
- var _styles9 = require("../../plugins/tasks-and-decisions/styles");
25
+ var _expand = require("./expand");
26
+ var _styles7 = require("../../plugins/find-replace/styles");
27
+ var _styles8 = require("../../plugins/tasks-and-decisions/styles");
28
28
  var _status = require("./status");
29
29
  var _date = require("./date");
30
30
  var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
@@ -47,7 +47,7 @@ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)(_templateOb
47
47
  var contentStyles = function contentStyles(props) {
48
48
  return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
49
49
  theme: props.theme
50
- }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(props), (0, _styles3.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _media.mediaStyles, (0, _layout.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(props), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles6.extensionStyles, (0, _styles7.expandStyles)(props), _styles8.findReplaceStyles, _styles4.textHighlightStyle, _styles9.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
50
+ }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(props), (0, _styles3.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _media.mediaStyles, (0, _layout.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(props), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles6.extensionStyles, (0, _expand.expandStyles)(props), _styles7.findReplaceStyles, _styles4.textHighlightStyle, _styles8.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
51
51
  };
52
52
  var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
53
53
  return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
@@ -108,7 +108,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
108
108
  jiraIssueCollectorScriptLoading: true,
109
109
  showOptOutOption: false
110
110
  });
111
- basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.base.sharedState.currentState();
111
+ 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();
112
112
  sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
113
113
  contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
114
114
  tabId = window.sessionStorage['awc.tab.id'];
@@ -41,7 +41,6 @@ var _context = require("./presets/context");
41
41
  */
42
42
  function usePreset(createPreset, dependencies) {
43
43
  var editorApi = (0, _context.usePresetContext)();
44
-
45
44
  // eslint-disable-next-line react-hooks/exhaustive-deps
46
45
  var preset = (0, _react.useMemo)(createPreset, dependencies);
47
46
  return {
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "189.3.14";
8
+ var version = exports.version = "189.3.15";
@@ -15,7 +15,7 @@ export const InlineNodeViewSharedStyles = css`
15
15
  white-space: nowrap;
16
16
  /* Then reset to the Editor default so we don't interfere
17
17
  with any component styling. */
18
- & > *:not(span[aria-hidden='true'].zeroWidthSpaceContainer) {
18
+ & > *:not(.zeroWidthSpaceContainer) {
19
19
  white-space: pre-wrap;
20
20
  }
21
21
  // Prevent visually hidden assistive text from being selected.
@@ -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;
@@ -25,28 +25,4 @@ export function addAnalytics(state, tr, payload, channel = editorAnalyticsChanne
25
25
  }
26
26
  editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
27
27
  return tr;
28
- }
29
- // Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
30
- // If changes are made to this function, please make the same update in the linked file.
31
- /**
32
- *
33
- * @private
34
- * @deprecated
35
- *
36
- * Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
37
- *
38
- */
39
- export function withAnalytics(payload, channel) {
40
- return command => (state, dispatch, view) => command(state, tr => {
41
- if (dispatch) {
42
- if (payload instanceof Function) {
43
- const dynamicPayload = payload(state);
44
- if (dynamicPayload) {
45
- dispatch(addAnalytics(state, tr, dynamicPayload, channel));
46
- }
47
- } else {
48
- dispatch(addAnalytics(state, tr, payload, channel));
49
- }
50
- }
51
- }, view);
52
28
  }
@@ -4,10 +4,10 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { breakout } from '@atlaskit/adf-schema';
5
5
  import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
6
6
  import LayoutButton from './ui/LayoutButton';
7
- import { BreakoutCssClassName } from './constants';
8
7
  import { pluginKey } from './plugin-key';
9
8
  import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
10
9
  import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
10
+ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
11
11
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
12
12
  class BreakoutView {
13
13
  constructor(
@@ -12,7 +12,7 @@ import ToolbarButton from '../../../ui/ToolbarButton';
12
12
  import { getBreakoutMode } from '../utils/get-breakout-mode';
13
13
  import { setBreakoutMode } from '../commands/set-breakout-mode';
14
14
  import { removeBreakout } from '../commands/remove-breakout';
15
- import { BreakoutCssClassName } from '../constants';
15
+ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
16
16
  import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
17
17
  import { getPluginState } from '../plugin-key';
18
18
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
@@ -5,17 +5,18 @@ import { cancelSearchWithAnalytics, replaceWithAnalytics, replaceAllWithAnalytic
5
5
  import { blur, toggleMatchCase } from './commands';
6
6
  import FindReplaceToolbarButton from './ui/FindReplaceToolbarButton';
7
7
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
8
- const FindReplaceToolbarButtonWithState = props => {
9
- const {
10
- popupsBoundariesElement,
11
- popupsMountPoint,
12
- popupsScrollableElement,
13
- isToolbarReducedSpacing,
14
- editorView,
15
- containerElement,
16
- dispatchAnalyticsEvent,
17
- featureFlags
18
- } = props;
8
+ const FindReplaceToolbarButtonWithState = ({
9
+ popupsBoundariesElement,
10
+ popupsMountPoint,
11
+ popupsScrollableElement,
12
+ isToolbarReducedSpacing,
13
+ editorView,
14
+ containerElement,
15
+ dispatchAnalyticsEvent,
16
+ featureFlags,
17
+ editorAnalyticsAPI,
18
+ takeFullWidth
19
+ }) => {
19
20
  if (!editorView) {
20
21
  return null;
21
22
  }
@@ -37,12 +38,12 @@ const FindReplaceToolbarButtonWithState = props => {
37
38
  cmd(state, dispatch);
38
39
  };
39
40
  const handleActivate = () => {
40
- runWithEditorFocused(() => dispatchCommand(activateWithAnalytics({
41
+ runWithEditorFocused(() => dispatchCommand(activateWithAnalytics(editorAnalyticsAPI)({
41
42
  triggerMethod: TRIGGER_METHOD.TOOLBAR
42
43
  })));
43
44
  };
44
45
  const handleFind = keyword => {
45
- runWithEditorFocused(() => dispatchCommand(findWithAnalytics({
46
+ runWithEditorFocused(() => dispatchCommand(findWithAnalytics(editorAnalyticsAPI)({
46
47
  editorView,
47
48
  containerElement,
48
49
  keyword
@@ -51,14 +52,14 @@ const FindReplaceToolbarButtonWithState = props => {
51
52
  const handleFindNext = ({
52
53
  triggerMethod
53
54
  }) => {
54
- runWithEditorFocused(() => dispatchCommand(findNextWithAnalytics({
55
+ runWithEditorFocused(() => dispatchCommand(findNextWithAnalytics(editorAnalyticsAPI)({
55
56
  triggerMethod
56
57
  })));
57
58
  };
58
59
  const handleFindPrev = ({
59
60
  triggerMethod
60
61
  }) => {
61
- runWithEditorFocused(() => dispatchCommand(findPrevWithAnalytics({
62
+ runWithEditorFocused(() => dispatchCommand(findPrevWithAnalytics(editorAnalyticsAPI)({
62
63
  triggerMethod
63
64
  })));
64
65
  };
@@ -66,7 +67,7 @@ const FindReplaceToolbarButtonWithState = props => {
66
67
  triggerMethod,
67
68
  replaceText
68
69
  }) => {
69
- runWithEditorFocused(() => dispatchCommand(replaceWithAnalytics({
70
+ runWithEditorFocused(() => dispatchCommand(replaceWithAnalytics(editorAnalyticsAPI)({
70
71
  triggerMethod,
71
72
  replaceText
72
73
  })));
@@ -74,7 +75,7 @@ const FindReplaceToolbarButtonWithState = props => {
74
75
  const handleReplaceAll = ({
75
76
  replaceText
76
77
  }) => {
77
- runWithEditorFocused(() => dispatchCommand(replaceAllWithAnalytics({
78
+ runWithEditorFocused(() => dispatchCommand(replaceAllWithAnalytics(editorAnalyticsAPI)({
78
79
  replaceText
79
80
  })));
80
81
  };
@@ -84,7 +85,7 @@ const FindReplaceToolbarButtonWithState = props => {
84
85
  const handleCancel = ({
85
86
  triggerMethod
86
87
  }) => {
87
- dispatchCommand(cancelSearchWithAnalytics({
88
+ dispatchCommand(cancelSearchWithAnalytics(editorAnalyticsAPI)({
88
89
  triggerMethod
89
90
  }));
90
91
  editorView.focus();
@@ -129,7 +130,7 @@ const FindReplaceToolbarButtonWithState = props => {
129
130
  onFindPrev: handleFindPrev,
130
131
  onReplace: handleReplace,
131
132
  onReplaceAll: handleReplaceAll,
132
- takeFullWidth: !!props.takeFullWidth
133
+ takeFullWidth: !!takeFullWidth
133
134
  });
134
135
  }
135
136
  });
@@ -1,10 +1,10 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { withAnalytics } from '../analytics';
3
2
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
4
4
  import { activate, find, findNext, findPrevious, replace, replaceAll, cancelSearch } from './commands';
5
- export const activateWithAnalytics = ({
5
+ export const activateWithAnalytics = editorAnalyticsAPI => ({
6
6
  triggerMethod
7
- }) => withAnalytics(state => ({
7
+ }) => withAnalytics(editorAnalyticsAPI, state => ({
8
8
  eventType: EVENT_TYPE.UI,
9
9
  action: ACTION.ACTIVATED,
10
10
  actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
@@ -13,18 +13,18 @@ export const activateWithAnalytics = ({
13
13
  triggerMethod
14
14
  }
15
15
  }))(activate());
16
- export const findWithAnalytics = ({
16
+ export const findWithAnalytics = editorAnalyticsAPI => ({
17
17
  editorView,
18
18
  containerElement,
19
19
  keyword
20
- }) => withAnalytics({
20
+ }) => withAnalytics(editorAnalyticsAPI, {
21
21
  eventType: EVENT_TYPE.TRACK,
22
22
  action: ACTION.FIND_PERFORMED,
23
23
  actionSubject: ACTION_SUBJECT.TEXT
24
24
  })(find(editorView, containerElement, keyword));
25
- export const findNextWithAnalytics = ({
25
+ export const findNextWithAnalytics = editorAnalyticsAPI => ({
26
26
  triggerMethod
27
- }) => withAnalytics({
27
+ }) => withAnalytics(editorAnalyticsAPI, {
28
28
  eventType: EVENT_TYPE.TRACK,
29
29
  action: ACTION.FIND_NEXT_PERFORMED,
30
30
  actionSubject: ACTION_SUBJECT.TEXT,
@@ -32,9 +32,9 @@ export const findNextWithAnalytics = ({
32
32
  triggerMethod
33
33
  }
34
34
  })(findNext());
35
- export const findPrevWithAnalytics = ({
35
+ export const findPrevWithAnalytics = editorAnalyticsAPI => ({
36
36
  triggerMethod
37
- }) => withAnalytics({
37
+ }) => withAnalytics(editorAnalyticsAPI, {
38
38
  eventType: EVENT_TYPE.TRACK,
39
39
  action: ACTION.FIND_PREV_PERFORMED,
40
40
  actionSubject: ACTION_SUBJECT.TEXT,
@@ -42,10 +42,10 @@ export const findPrevWithAnalytics = ({
42
42
  triggerMethod
43
43
  }
44
44
  })(findPrevious());
45
- export const replaceWithAnalytics = ({
45
+ export const replaceWithAnalytics = editorAnalyticsAPI => ({
46
46
  triggerMethod,
47
47
  replaceText
48
- }) => withAnalytics({
48
+ }) => withAnalytics(editorAnalyticsAPI, {
49
49
  eventType: EVENT_TYPE.TRACK,
50
50
  action: ACTION.REPLACED_ONE,
51
51
  actionSubject: ACTION_SUBJECT.TEXT,
@@ -53,16 +53,16 @@ export const replaceWithAnalytics = ({
53
53
  triggerMethod
54
54
  }
55
55
  })(replace(replaceText));
56
- export const replaceAllWithAnalytics = ({
56
+ export const replaceAllWithAnalytics = editorAnalyticsAPI => ({
57
57
  replaceText
58
- }) => withAnalytics({
58
+ }) => withAnalytics(editorAnalyticsAPI, {
59
59
  eventType: EVENT_TYPE.TRACK,
60
60
  action: ACTION.REPLACED_ALL,
61
61
  actionSubject: ACTION_SUBJECT.TEXT
62
62
  })(replaceAll(replaceText));
63
- export const cancelSearchWithAnalytics = ({
63
+ export const cancelSearchWithAnalytics = editorAnalyticsAPI => ({
64
64
  triggerMethod
65
- }) => withAnalytics({
65
+ }) => withAnalytics(editorAnalyticsAPI, {
66
66
  eventType: EVENT_TYPE.UI,
67
67
  action: ACTION.DEACTIVATED,
68
68
  actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
@@ -18,7 +18,10 @@ export const findReplacePlugin = ({
18
18
  }) => createPlugin(dispatch)
19
19
  }, {
20
20
  name: 'findReplaceKeymap',
21
- plugin: () => keymapPlugin()
21
+ plugin: () => {
22
+ var _api$analytics;
23
+ return keymapPlugin(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
24
+ }
22
25
  }];
23
26
  },
24
27
  primaryToolbarComponent({
@@ -33,6 +36,7 @@ export const findReplacePlugin = ({
33
36
  if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
34
37
  return null;
35
38
  } else {
39
+ var _api$analytics2;
36
40
  return /*#__PURE__*/React.createElement(FindReplaceToolbarButtonWithState, {
37
41
  popupsBoundariesElement: popupsBoundariesElement,
38
42
  popupsMountPoint: popupsMountPoint,
@@ -42,7 +46,8 @@ export const findReplacePlugin = ({
42
46
  containerElement: containerElement,
43
47
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
44
48
  takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
45
- featureFlags: featureFlags
49
+ featureFlags: featureFlags,
50
+ editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
46
51
  });
47
52
  }
48
53
  }
@@ -2,15 +2,15 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
2
2
  import { bindKeymapWithCommand, find as findKeymap } from '../../keymaps';
3
3
  import { activateWithAnalytics } from './commands-with-analytics';
4
4
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
5
- const activateFindReplace = () => (state, dispatch) => {
6
- activateWithAnalytics({
5
+ const activateFindReplace = editorAnalyticsAPI => (state, dispatch) => {
6
+ activateWithAnalytics(editorAnalyticsAPI)({
7
7
  triggerMethod: TRIGGER_METHOD.SHORTCUT
8
8
  })(state, dispatch);
9
9
  return true;
10
10
  };
11
- const keymapPlugin = () => {
11
+ const keymapPlugin = editorAnalyticsAPI => {
12
12
  const list = {};
13
- bindKeymapWithCommand(findKeymap.common, activateFindReplace(), list);
13
+ bindKeymapWithCommand(findKeymap.common, activateFindReplace(editorAnalyticsAPI), list);
14
14
  return keymap(list);
15
15
  };
16
16
  export default keymapPlugin;
@@ -15,7 +15,6 @@ export { default as annotationPlugin } from './annotation';
15
15
  export { default as analyticsPlugin } from './analytics';
16
16
  export { default as customAutoformatPlugin } from './custom-autoformat';
17
17
  export { default as feedbackDialogPlugin } from './feedback-dialog';
18
- export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
19
18
  export { default as mobileDimensionsPlugin } from './mobile-dimensions';
20
19
  export { default as findReplacePlugin } from './find-replace';
21
20
  export { default as mobileSelectionPlugin } from './mobile-selection';
@@ -11,12 +11,12 @@ export const PresetContextProvider = ({
11
11
  }
12
12
  }, children);
13
13
  };
14
- export const usePresetContext = () => {
14
+ export function usePresetContext() {
15
15
  const {
16
16
  editorApi
17
17
  } = useContext(EditorAPIContext);
18
18
  return editorApi;
19
- };
19
+ }
20
20
  export const useSetPresetContext = () => {
21
21
  const {
22
22
  setEditorApi
@@ -1,4 +1,4 @@
1
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
1
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
2
2
  import { panelPlugin } from '@atlaskit/editor-plugin-panel';
3
3
  import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
4
4
  import { historyPlugin } from '@atlaskit/editor-plugin-history';
@@ -27,6 +27,7 @@ import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
27
27
  import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
28
28
  import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
29
29
  import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
30
+ import { expandPlugin } from '@atlaskit/editor-plugin-expand';
30
31
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
31
32
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
32
33
  import { createDefaultPreset } from './default';
@@ -416,4 +417,12 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
416
417
  appearance
417
418
  }]);
418
419
  return finalPreset;
420
+ }
421
+ export function isExpandInsertionEnabled({
422
+ allowExpand
423
+ }) {
424
+ if (allowExpand && typeof allowExpand === 'object') {
425
+ return !!allowExpand.allowInsertion;
426
+ }
427
+ return false;
419
428
  }
@@ -238,7 +238,7 @@ function RenderWithPluginState({
238
238
  } = useSharedPluginState(api, ['media', 'maxContentSize']);
239
239
  return jsx(Fragment, null, renderChrome({
240
240
  maxContentSize: maxContentSizeState,
241
- mediaState
241
+ mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
242
242
  }));
243
243
  }
244
244
  export const CommentEditorWithIntl = injectIntl(Editor);
@@ -13,7 +13,7 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
14
14
  import { usePresetContext } from '../../../presets/context';
15
15
  export const EditorToolbar = /*#__PURE__*/React.memo(props => {
16
- var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3;
16
+ var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
17
17
  const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
18
18
  const editorAPI = usePresetContext();
19
19
 
@@ -62,7 +62,8 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
62
62
  editorView: props.editorView,
63
63
  containerElement: props.containerElement,
64
64
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
65
- featureFlags: props.featureFlags
65
+ featureFlags: props.featureFlags,
66
+ editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
66
67
  }) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
67
68
  useEffect(() => {
68
69
  if (twoLineEditorToolbar) {
@@ -1,14 +1,17 @@
1
1
  import { css } from '@emotion/react';
2
+ import { DN50, N40A, N50A, N80A, R200, R300, R50 } from '@atlaskit/theme/colors';
3
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
2
4
  import { themed } from '@atlaskit/theme/components';
3
- import { R50, R300, N40A, N50A, N80A, DN50, R200 } from '@atlaskit/theme/colors';
5
+ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
4
6
  import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
5
- import { SelectionStyle, getSelectionStyles, akLayoutGutterOffset, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
- import { BreakoutCssClassName } from '../../breakout/constants';
7
- import { expandClassNames } from './class-names';
7
+ import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
8
+ import { expandClassNames } from '@atlaskit/editor-common/styles';
8
9
  const EXPAND_SELECTED_BACKGROUND = themed({
9
10
  light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
10
11
  dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
11
12
  });
13
+
14
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
12
15
  const EXPAND_ICON_COLOR = props => css`
13
16
  color: ${themed({
14
17
  light: `var(--ds-icon-subtle, ${N80A})`,
@@ -37,6 +40,8 @@ const DANGER_STATE_BORDER_COLOR = themed({
37
40
  const DANGER_STATE_BORDER_RADIUS = themed({
38
41
  dark: '3px'
39
42
  });
43
+
44
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
40
45
  export const expandStyles = props => css`
41
46
  .${expandClassNames.icon} > div {
42
47
  display: flex;
@@ -14,7 +14,7 @@ import { layoutStyles } from './layout';
14
14
  import { panelStyles } from './panel';
15
15
  import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
16
16
  import { extensionStyles } from '../../plugins/extension/ui/styles';
17
- import { expandStyles } from '../../plugins/expand/ui/styles';
17
+ import { expandStyles } from './expand';
18
18
  import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
19
19
  import { findReplaceStyles } from '../../plugins/find-replace/styles';
20
20
  import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
@@ -71,12 +71,12 @@ class ToolbarFeedbackInternal extends PureComponent {
71
71
  });
72
72
  });
73
73
  _defineProperty(this, "openJiraIssueCollector", async () => {
74
- var _this$props$api, _window$localStorage$, _basePluginState$cont;
74
+ var _this$props$api, _this$props$api$base, _window$localStorage$, _basePluginState$cont;
75
75
  this.setState({
76
76
  jiraIssueCollectorScriptLoading: true,
77
77
  showOptOutOption: false
78
78
  });
79
- const basePluginState = (_this$props$api = this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.base.sharedState.currentState();
79
+ const basePluginState = (_this$props$api = this.props.api) === null || _this$props$api === void 0 ? void 0 : (_this$props$api$base = _this$props$api.base) === null || _this$props$api$base === void 0 ? void 0 : _this$props$api$base.sharedState.currentState();
80
80
  const sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
81
81
  const contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
82
82
  const 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
  const editorApi = usePresetContext();
38
-
39
38
  // eslint-disable-next-line react-hooks/exhaustive-deps
40
39
  const preset = useMemo(createPreset, dependencies);
41
40
  return {
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "189.3.14";
2
+ export const version = "189.3.15";
@@ -7,4 +7,4 @@ import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
7
7
  // For reasoning behind styles, see comments in:
8
8
  // ./getInlineNodeViewProducer -> portalChildren()
9
9
 
10
- export var InlineNodeViewSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(span[aria-hidden='true'].zeroWidthSpaceContainer) {\n white-space: pre-wrap;\n }\n // Prevent visually hidden assistive text from being selected.\n & > .assistive {\n user-select: none;\n }\n }\n /** Remove browser deafult selections style. This prevents\n unexpected visual artefacts in Safari when navigating\n with the keyboard or making range selections. */\n &.ua-safari {\n .", " {\n ::selection,\n *::selection {\n background: transparent;\n }\n }\n }\n\n &.ua-chrome .", " > span {\n user-select: none;\n }\n\n .", "AddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, ZERO_WIDTH_SPACE);
10
+ export var InlineNodeViewSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(.zeroWidthSpaceContainer) {\n white-space: pre-wrap;\n }\n // Prevent visually hidden assistive text from being selected.\n & > .assistive {\n user-select: none;\n }\n }\n /** Remove browser deafult selections style. This prevents\n unexpected visual artefacts in Safari when navigating\n with the keyboard or making range selections. */\n &.ua-safari {\n .", " {\n ::selection,\n *::selection {\n background: transparent;\n }\n }\n }\n\n &.ua-chrome .", " > span {\n user-select: none;\n }\n\n .", "AddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, ZERO_WIDTH_SPACE);
@@ -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;
@@ -26,32 +26,4 @@ export function addAnalytics(state, tr, payload) {
26
26
  }
27
27
  editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
28
28
  return tr;
29
- }
30
- // Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
31
- // If changes are made to this function, please make the same update in the linked file.
32
- /**
33
- *
34
- * @private
35
- * @deprecated
36
- *
37
- * Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
38
- *
39
- */
40
- export function withAnalytics(payload, channel) {
41
- return function (command) {
42
- return function (state, dispatch, view) {
43
- return command(state, function (tr) {
44
- if (dispatch) {
45
- if (payload instanceof Function) {
46
- var dynamicPayload = payload(state);
47
- if (dynamicPayload) {
48
- dispatch(addAnalytics(state, tr, dynamicPayload, channel));
49
- }
50
- } else {
51
- dispatch(addAnalytics(state, tr, payload, channel));
52
- }
53
- }
54
- }, view);
55
- };
56
- };
57
29
  }