@atlaskit/editor-plugin-expand 8.2.14 → 8.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 8.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7ea2e225c0abb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7ea2e225c0abb) -
8
+ [ux] Minor styling, wording changes for block menu and sync blocks
9
+ - Updated dependencies
10
+
11
+ ## 8.3.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`01e7751e6b213`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/01e7751e6b213) -
16
+ [EDITOR-5538](https://hello.jira.atlassian.cloud/browse/EDITOR-5538) - fix how navite expand icon
17
+ is rendered in SSR
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 8.2.14
4
24
 
5
25
  ### Patch Changes
@@ -11,6 +11,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _editorToolbar = require("@atlaskit/editor-toolbar");
13
13
  var _expandElement = _interopRequireDefault(require("@atlaskit/icon-lab/core/expand-element"));
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var NODE_NAME = 'expand';
15
16
  var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
16
17
  var api = _ref.api;
@@ -32,10 +33,16 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
32
33
  }) : null;
33
34
  });
34
35
  };
36
+
37
+ // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
38
+ // Adds size="small" to icons for better visual consistency in block menu.
39
+ // To clean up: remove conditional, keep only size="small" version.
40
+ var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
35
41
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
36
42
  onClick: handleClick,
37
43
  elemBefore: /*#__PURE__*/_react.default.createElement(_expandElement.default, {
38
- label: ""
44
+ label: "",
45
+ size: iconSize
39
46
  })
40
47
  }, formatMessage(_messages.toolbarInsertBlockMessages.expand));
41
48
  };
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderExpandButton = renderExpandButton;
7
- var _browserApis = require("@atlaskit/browser-apis");
8
7
  var _styles = require("@atlaskit/editor-common/styles");
9
8
  var _ui = require("@atlaskit/editor-common/ui");
10
9
  /**
@@ -32,7 +31,7 @@ function renderExpandButton(container, buttonProps) {
32
31
  existingButton.setAttribute('disabled', 'true');
33
32
  }
34
33
  } else {
35
- var doc = (0, _browserApis.getDocument)();
34
+ var doc = container.ownerDocument;
36
35
  if (!doc) {
37
36
  return;
38
37
  }
@@ -4,6 +4,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
6
6
  import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  const NODE_NAME = 'expand';
8
9
  const ExpandBlockMenuItem = ({
9
10
  api
@@ -28,10 +29,16 @@ const ExpandBlockMenuItem = ({
28
29
  }) : null;
29
30
  });
30
31
  };
32
+
33
+ // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
34
+ // Adds size="small" to icons for better visual consistency in block menu.
35
+ // To clean up: remove conditional, keep only size="small" version.
36
+ const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
31
37
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
32
38
  onClick: handleClick,
33
39
  elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
34
- label: ""
40
+ label: "",
41
+ size: iconSize
35
42
  })
36
43
  }, formatMessage(toolbarInsertBlockMessages.expand));
37
44
  };
@@ -1,4 +1,3 @@
1
- import { getDocument } from '@atlaskit/browser-apis';
2
1
  import { expandClassNames } from '@atlaskit/editor-common/styles';
3
2
  import { expandMessages } from '@atlaskit/editor-common/ui';
4
3
  /**
@@ -28,7 +27,7 @@ export function renderExpandButton(container, buttonProps) {
28
27
  existingButton.setAttribute('disabled', 'true');
29
28
  }
30
29
  } else {
31
- const doc = getDocument();
30
+ const doc = container.ownerDocument;
32
31
  if (!doc) {
33
32
  return;
34
33
  }
@@ -4,6 +4,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
6
6
  import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  var NODE_NAME = 'expand';
8
9
  var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
9
10
  var api = _ref.api;
@@ -25,10 +26,16 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
25
26
  }) : null;
26
27
  });
27
28
  };
29
+
30
+ // [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
31
+ // Adds size="small" to icons for better visual consistency in block menu.
32
+ // To clean up: remove conditional, keep only size="small" version.
33
+ var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
28
34
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
29
35
  onClick: handleClick,
30
36
  elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
31
- label: ""
37
+ label: "",
38
+ size: iconSize
32
39
  })
33
40
  }, formatMessage(toolbarInsertBlockMessages.expand));
34
41
  };
@@ -1,4 +1,3 @@
1
- import { getDocument } from '@atlaskit/browser-apis';
2
1
  import { expandClassNames } from '@atlaskit/editor-common/styles';
3
2
  import { expandMessages } from '@atlaskit/editor-common/ui';
4
3
  /**
@@ -26,7 +25,7 @@ export function renderExpandButton(container, buttonProps) {
26
25
  existingButton.setAttribute('disabled', 'true');
27
26
  }
28
27
  } else {
29
- var doc = getDocument();
28
+ var doc = container.ownerDocument;
30
29
  if (!doc) {
31
30
  return;
32
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "8.2.14",
3
+ "version": "8.3.1",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,10 +30,9 @@
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
32
  "@atlaskit/adf-schema": "^51.5.0",
33
- "@atlaskit/browser-apis": "^0.0.1",
34
33
  "@atlaskit/button": "^23.9.0",
35
34
  "@atlaskit/editor-plugin-analytics": "^7.0.0",
36
- "@atlaskit/editor-plugin-block-menu": "^6.0.0",
35
+ "@atlaskit/editor-plugin-block-menu": "^6.1.0",
37
36
  "@atlaskit/editor-plugin-decorations": "^7.0.0",
38
37
  "@atlaskit/editor-plugin-editor-disabled": "^7.0.0",
39
38
  "@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
@@ -48,7 +47,7 @@
48
47
  "@atlaskit/icon-lab": "^5.16.0",
49
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
49
  "@atlaskit/prosemirror-history": "^0.2.0",
51
- "@atlaskit/tmp-editor-statsig": "^29.0.0",
50
+ "@atlaskit/tmp-editor-statsig": "^29.6.0",
52
51
  "@atlaskit/tokens": "^11.0.0",
53
52
  "@atlaskit/tooltip": "^20.14.0",
54
53
  "@babel/runtime": "^7.0.0",
@@ -57,7 +56,7 @@
57
56
  "w3c-keyname": "^2.1.8"
58
57
  },
59
58
  "peerDependencies": {
60
- "@atlaskit/editor-common": "^111.16.0",
59
+ "@atlaskit/editor-common": "^111.19.0",
61
60
  "react": "^18.2.0",
62
61
  "react-dom": "^18.2.0",
63
62
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -105,6 +104,9 @@
105
104
  },
106
105
  "platform_editor_adf_with_localid": {
107
106
  "type": "boolean"
107
+ },
108
+ "platform_editor_block_menu_v2_patch_3": {
109
+ "type": "boolean"
108
110
  }
109
111
  }
110
112
  }