@atlaskit/editor-plugin-selection-toolbar 6.1.0 → 6.1.2

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,19 @@
1
1
  # @atlaskit/editor-plugin-selection-toolbar
2
2
 
3
+ ## 6.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`7e4750e649998`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7e4750e649998) -
14
+ Hide Menu section for loom and pinning when in view mode
15
+ - Updated dependencies
16
+
3
17
  ## 6.1.0
4
18
 
5
19
  ### Minor Changes
@@ -31,6 +31,9 @@ var MenuSection = exports.MenuSection = function MenuSection(_ref) {
31
31
  var _usePluginState = usePluginState(api),
32
32
  editorViewMode = _usePluginState.editorViewMode;
33
33
  var isEdit = editorViewMode === 'edit';
34
+ if (!isEdit) {
35
+ return null;
36
+ }
34
37
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
35
38
  hasSeparator: isEdit
36
39
  }, children);
@@ -1,4 +1,4 @@
1
- /* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -25,6 +25,9 @@ export const MenuSection = ({
25
25
  editorViewMode
26
26
  } = usePluginState(api);
27
27
  const isEdit = editorViewMode === 'edit';
28
+ if (!isEdit) {
29
+ return null;
30
+ }
28
31
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
29
32
  hasSeparator: isEdit
30
33
  }, children);
@@ -1,4 +1,4 @@
1
- /* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./PrimaryToolbarComponent.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
@@ -24,6 +24,9 @@ export var MenuSection = function MenuSection(_ref) {
24
24
  var _usePluginState = usePluginState(api),
25
25
  editorViewMode = _usePluginState.editorViewMode;
26
26
  var isEdit = editorViewMode === 'edit';
27
+ if (!isEdit) {
28
+ return null;
29
+ }
27
30
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
28
31
  hasSeparator: isEdit
29
32
  }, children);
@@ -1,4 +1,4 @@
1
- /* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./PrimaryToolbarComponent.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
@@ -5,5 +5,5 @@ type MenuSectionProps = {
5
5
  api: ExtractInjectionAPI<SelectionToolbarPlugin> | undefined;
6
6
  children: React.ReactNode;
7
7
  };
8
- export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element;
8
+ export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element | null;
9
9
  export {};
@@ -5,5 +5,5 @@ type MenuSectionProps = {
5
5
  api: ExtractInjectionAPI<SelectionToolbarPlugin> | undefined;
6
6
  children: React.ReactNode;
7
7
  };
8
- export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element;
8
+ export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element | null;
9
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "6.1.0",
3
+ "version": "6.1.2",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,8 +30,8 @@
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
32
  "@atlaskit/css": "^0.14.0",
33
- "@atlaskit/editor-plugin-analytics": "^5.0.0",
34
- "@atlaskit/editor-plugin-block-controls": "^6.0.0",
33
+ "@atlaskit/editor-plugin-analytics": "^5.2.0",
34
+ "@atlaskit/editor-plugin-block-controls": "^6.2.0",
35
35
  "@atlaskit/editor-plugin-connectivity": "^5.0.0",
36
36
  "@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
37
37
  "@atlaskit/editor-plugin-primary-toolbar": "^6.0.0",
@@ -39,20 +39,20 @@
39
39
  "@atlaskit/editor-plugin-user-intent": "^3.0.0",
40
40
  "@atlaskit/editor-plugin-user-preferences": "^3.0.0",
41
41
  "@atlaskit/editor-prosemirror": "7.0.0",
42
- "@atlaskit/editor-toolbar": "^0.8.0",
42
+ "@atlaskit/editor-toolbar": "^0.9.0",
43
43
  "@atlaskit/editor-toolbar-model": "^0.2.0",
44
44
  "@atlaskit/icon": "^28.1.0",
45
45
  "@atlaskit/icon-lab": "^5.7.0",
46
46
  "@atlaskit/menu": "^8.4.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
48
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
49
- "@atlaskit/tmp-editor-statsig": "^12.10.0",
49
+ "@atlaskit/tmp-editor-statsig": "^12.21.0",
50
50
  "@atlaskit/tokens": "^6.3.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "bind-event-listener": "^3.0.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@atlaskit/editor-common": "^109.1.0",
55
+ "@atlaskit/editor-common": "^109.6.0",
56
56
  "react": "^18.2.0",
57
57
  "react-dom": "^18.2.0",
58
58
  "react-intl-next": "npm:react-intl@^5.18.1"