@atlaskit/editor-core 205.1.12 → 205.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 205.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#137151](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/137151)
8
+ [`724daf91c62db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/724daf91c62db) -
9
+ [ux] Put move of the redo/undo/find behind its own FG. Fix double Find & Replace popup
10
+ - Updated dependencies
11
+
3
12
  ## 205.1.12
4
13
 
5
14
  ### Patch Changes
@@ -74,7 +74,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
74
74
  css: _MainToolbar.customToolbarWrapperStyle
75
75
  }, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
76
76
  beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
77
- }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
77
+ }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
78
78
  popupsBoundariesElement: props.popupsBoundariesElement,
79
79
  popupsMountPoint: popupsMountPoint,
80
80
  popupsScrollableElement: props.popupsScrollableElement,
@@ -19,9 +19,9 @@ var GutterDangerOverlay = function GutterDangerOverlay() {
19
19
 
20
20
  /* When code-block is inside the panel */
21
21
  var firstCodeBlockWithNoMargin = (0, _platformFeatureFlagsReact.functionWithFG)('platform_editor_nested_dnd_styles_changes', function () {
22
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t.ak-editor-panel__content {\n\t\t\t> .code-block:first-child,\n\t\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
22
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t.ak-editor-panel__content {\n\t\t\t> .code-block:first-child,\n\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t}\n\t\t}\n\t"])));
23
23
  }, function () {
24
- return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
24
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t.ak-editor-panel__content {\n\t\t\t> .code-block:first-child {\n\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t}\n\t\t}\n\t"])));
25
25
  });
26
26
  var codeBlockStyles = exports.codeBlockStyles = function codeBlockStyles() {
27
27
  return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block,\n\t\t> pre:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), (0, _styles.codeBlockSharedStyles)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, #FFECEB)", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))", firstCodeBlockWithNoMargin());
@@ -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 = "205.1.12";
8
+ var version = exports.version = "205.1.13";
@@ -63,7 +63,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
63
63
  css: customToolbarWrapperStyle
64
64
  }, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
65
65
  beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
66
- }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
66
+ }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
67
67
  popupsBoundariesElement: props.popupsBoundariesElement,
68
68
  popupsMountPoint: popupsMountPoint,
69
69
  popupsScrollableElement: props.popupsScrollableElement,
@@ -20,18 +20,18 @@ const GutterDangerOverlay = () => css`
20
20
  const firstCodeBlockWithNoMargin = functionWithFG('platform_editor_nested_dnd_styles_changes', () => css`
21
21
  .ak-editor-panel__content {
22
22
  > .code-block:first-child,
23
- > .ProseMirror-widget:first-child + .code-block,
24
- > .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {
25
- margin: 0 0 0 0 !important;
26
- }
23
+ > .ProseMirror-widget:first-child + .code-block,
24
+ > .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {
25
+ margin: 0 0 0 0 !important;
27
26
  }
28
- `, () => css`
29
- .ak-editor-panel__content {
30
- > .code-block:first-child {
31
- margin: 0 0 0 0 !important;
32
- }
27
+ }
28
+ `, () => css`
29
+ .ak-editor-panel__content {
30
+ > .code-block:first-child {
31
+ margin: 0 0 0 0 !important;
33
32
  }
34
- `);
33
+ }
34
+ `);
35
35
  export const codeBlockStyles = () => css`
36
36
  .ProseMirror {
37
37
  ${codeBlockSharedStyles()}
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "205.1.12";
2
+ export const version = "205.1.13";
@@ -64,7 +64,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
64
64
  css: customToolbarWrapperStyle
65
65
  }, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
66
66
  beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
67
- }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
67
+ }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
68
68
  popupsBoundariesElement: props.popupsBoundariesElement,
69
69
  popupsMountPoint: popupsMountPoint,
70
70
  popupsScrollableElement: props.popupsScrollableElement,
@@ -12,9 +12,9 @@ var GutterDangerOverlay = function GutterDangerOverlay() {
12
12
 
13
13
  /* When code-block is inside the panel */
14
14
  var firstCodeBlockWithNoMargin = functionWithFG('platform_editor_nested_dnd_styles_changes', function () {
15
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t.ak-editor-panel__content {\n\t\t\t> .code-block:first-child,\n\t\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
15
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t.ak-editor-panel__content {\n\t\t\t> .code-block:first-child,\n\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t}\n\t\t}\n\t"])));
16
16
  }, function () {
17
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
17
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t.ak-editor-panel__content {\n\t\t\t> .code-block:first-child {\n\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t}\n\t\t}\n\t"])));
18
18
  });
19
19
  export var codeBlockStyles = function codeBlockStyles() {
20
20
  return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block,\n\t\t> pre:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), codeBlockSharedStyles(), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, #FFECEB)", "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackground, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))", firstCodeBlockWithNoMargin());
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "205.1.12";
2
+ export var version = "205.1.13";
@@ -21,7 +21,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
21
21
  sharedState: import("@atlaskit/editor-plugins/find-replace").FindReplacePluginState | undefined;
22
22
  dependencies: import("packages/editor/editor-plugin-find-replace/dist/types/findReplacePluginType").FindReplacePluginDependencies;
23
23
  actions: {
24
- getToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
24
+ registerToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
25
25
  activateFindReplace: (triggerMethod?: import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.SHORTCUT | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.TOOLBAR | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.EXTERNAL | undefined) => boolean;
26
26
  };
27
27
  }, {
@@ -73,7 +73,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
73
73
  sharedState: import("@atlaskit/editor-plugins/find-replace").FindReplacePluginState | undefined;
74
74
  dependencies: import("packages/editor/editor-plugin-find-replace/dist/types/findReplacePluginType").FindReplacePluginDependencies;
75
75
  actions: {
76
- getToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
76
+ registerToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
77
77
  activateFindReplace: (triggerMethod?: import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.SHORTCUT | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.TOOLBAR | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.EXTERNAL | undefined) => boolean;
78
78
  };
79
79
  }, {
@@ -21,7 +21,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
21
21
  sharedState: import("@atlaskit/editor-plugins/find-replace").FindReplacePluginState | undefined;
22
22
  dependencies: import("packages/editor/editor-plugin-find-replace/dist/types/findReplacePluginType").FindReplacePluginDependencies;
23
23
  actions: {
24
- getToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
24
+ registerToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
25
25
  activateFindReplace: (triggerMethod?: import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.SHORTCUT | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.TOOLBAR | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.EXTERNAL | undefined) => boolean;
26
26
  };
27
27
  }, {
@@ -105,7 +105,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
105
105
  sharedState: import("@atlaskit/editor-plugins/find-replace").FindReplacePluginState | undefined;
106
106
  dependencies: import("packages/editor/editor-plugin-find-replace/dist/types/findReplacePluginType").FindReplacePluginDependencies;
107
107
  actions: {
108
- getToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
108
+ registerToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
109
109
  activateFindReplace: (triggerMethod?: import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.SHORTCUT | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.TOOLBAR | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.EXTERNAL | undefined) => boolean;
110
110
  };
111
111
  }, {
@@ -157,7 +157,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
157
157
  sharedState: import("@atlaskit/editor-plugins/find-replace").FindReplacePluginState | undefined;
158
158
  dependencies: import("packages/editor/editor-plugin-find-replace/dist/types/findReplacePluginType").FindReplacePluginDependencies;
159
159
  actions: {
160
- getToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
160
+ registerToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
161
161
  activateFindReplace: (triggerMethod?: import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.SHORTCUT | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.TOOLBAR | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.EXTERNAL | undefined) => boolean;
162
162
  };
163
163
  }, {
@@ -105,7 +105,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
105
105
  sharedState: import("@atlaskit/editor-plugins/find-replace").FindReplacePluginState | undefined;
106
106
  dependencies: import("packages/editor/editor-plugin-find-replace/dist/types/findReplacePluginType").FindReplacePluginDependencies;
107
107
  actions: {
108
- getToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
108
+ registerToolbarButton: (params: import("@atlaskit/editor-plugins/find-replace").FindReplaceToolbarButtonActionProps) => import("react").ReactNode;
109
109
  activateFindReplace: (triggerMethod?: import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.SHORTCUT | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.TOOLBAR | import("@atlaskit/editor-common/analytics").TRIGGER_METHOD.EXTERNAL | undefined) => boolean;
110
110
  };
111
111
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "205.1.12",
3
+ "version": "205.1.13",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -620,6 +620,10 @@
620
620
  "type": "boolean",
621
621
  "referenceOnly": true
622
622
  },
623
+ "platform_editor_controls_move_actions": {
624
+ "type": "boolean",
625
+ "referenceOnly": true
626
+ },
623
627
  "platform_editor_controls_widget_visibility": {
624
628
  "type": "boolean",
625
629
  "referenceOnly": true