@atlaskit/editor-plugin-loom 2.2.5 → 2.2.7

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/.eslintrc.js CHANGED
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
- rules: {
3
- '@typescript-eslint/no-duplicate-imports': 'error',
4
- '@typescript-eslint/no-explicit-any': 'error',
5
- },
2
+ rules: {
3
+ '@typescript-eslint/no-duplicate-imports': 'error',
4
+ '@typescript-eslint/no-explicit-any': 'error',
5
+ },
6
6
  };
package/CHANGELOG.md CHANGED
@@ -1,182 +1,196 @@
1
1
  # @atlaskit/editor-plugin-loom
2
2
 
3
+ ## 2.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#107463](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107463)
8
+ [`5c4e84045a40`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c4e84045a40) -
9
+ [ux] Add responsive label to loom plugin toolbar
10
+
11
+ ## 2.2.6
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 2.2.5
4
18
 
5
19
  ### Patch Changes
6
20
 
7
- - Updated dependencies
21
+ - Updated dependencies
8
22
 
9
23
  ## 2.2.4
10
24
 
11
25
  ### Patch Changes
12
26
 
13
- - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
14
- [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
15
- [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
16
- language triggering composition on an empty line.This was fixed in a patch bump of
17
- prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
27
+ - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
28
+ [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
29
+ [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
30
+ language triggering composition on an empty line.This was fixed in a patch bump of
31
+ prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
18
32
 
19
33
  ## 2.2.3
20
34
 
21
35
  ### Patch Changes
22
36
 
23
- - Updated dependencies
37
+ - Updated dependencies
24
38
 
25
39
  ## 2.2.2
26
40
 
27
41
  ### Patch Changes
28
42
 
29
- - [#96234](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96234)
30
- [`d414d3e7503b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d414d3e7503b) -
31
- Update copy for Loom toolbar tooltip item and quickinsert description
43
+ - [#96234](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96234)
44
+ [`d414d3e7503b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d414d3e7503b) -
45
+ Update copy for Loom toolbar tooltip item and quickinsert description
32
46
 
33
47
  ## 2.2.1
34
48
 
35
49
  ### Patch Changes
36
50
 
37
- - [#93654](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93654)
38
- [`19a2873de742`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19a2873de742) -
39
- Export loom recordVideo action in loom plugin
51
+ - [#93654](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93654)
52
+ [`19a2873de742`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19a2873de742) -
53
+ Export loom recordVideo action in loom plugin
40
54
 
41
55
  ## 2.2.0
42
56
 
43
57
  ### Minor Changes
44
58
 
45
- - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
46
- [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
47
- bumped editor-prosemirror version to 4.0.0
59
+ - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
60
+ [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
61
+ bumped editor-prosemirror version to 4.0.0
48
62
 
49
63
  ### Patch Changes
50
64
 
51
- - Updated dependencies
65
+ - Updated dependencies
52
66
 
53
67
  ## 2.1.0
54
68
 
55
69
  ### Minor Changes
56
70
 
57
- - [#90626](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90626)
58
- [`8efec4489602`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8efec4489602) -
59
- show/hide loom button in toolbar via editor plugin config
71
+ - [#90626](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90626)
72
+ [`8efec4489602`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8efec4489602) -
73
+ show/hide loom button in toolbar via editor plugin config
60
74
 
61
75
  ### Patch Changes
62
76
 
63
- - [#90878](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90878)
64
- [`962275ee0910`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962275ee0910) -
65
- [ux] [ED-22852] Update loom quick insert title, description and logo
66
- - Updated dependencies
77
+ - [#90878](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90878)
78
+ [`962275ee0910`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962275ee0910) -
79
+ [ux] [ED-22852] Update loom quick insert title, description and logo
80
+ - Updated dependencies
67
81
 
68
82
  ## 2.0.1
69
83
 
70
84
  ### Patch Changes
71
85
 
72
- - [#90526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90526)
73
- [`2f75eb73984f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2f75eb73984f) -
74
- [ux] Update toolbar icon to Loom
86
+ - [#90526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90526)
87
+ [`2f75eb73984f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2f75eb73984f) -
88
+ [ux] Update toolbar icon to Loom
75
89
 
76
90
  ## 2.0.0
77
91
 
78
92
  ### Major Changes
79
93
 
80
- - [#85470](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85470)
81
- [`32cb4d4ca34f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32cb4d4ca34f) -
82
- Update loom plugin to take in interface and remove SDK references
94
+ - [#85470](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85470)
95
+ [`32cb4d4ca34f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32cb4d4ca34f) -
96
+ Update loom plugin to take in interface and remove SDK references
83
97
 
84
98
  ### Patch Changes
85
99
 
86
- - Updated dependencies
100
+ - Updated dependencies
87
101
 
88
102
  ## 1.0.2
89
103
 
90
104
  ### Patch Changes
91
105
 
92
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
93
- [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
94
- Upgrade Typescript from `4.9.5` to `5.4.2`
106
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
107
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
108
+ Upgrade Typescript from `4.9.5` to `5.4.2`
95
109
 
96
110
  ## 1.0.1
97
111
 
98
112
  ### Patch Changes
99
113
 
100
- - Updated dependencies
114
+ - Updated dependencies
101
115
 
102
116
  ## 1.0.0
103
117
 
104
118
  ### Major Changes
105
119
 
106
- - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
107
- [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
108
- This changeset exists to bump all editor plugins that currently don't have a major version. This
109
- is to address an issue with Jira plugin consumption.
120
+ - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
121
+ [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
122
+ This changeset exists to bump all editor plugins that currently don't have a major version. This
123
+ is to address an issue with Jira plugin consumption.
110
124
 
111
125
  ### Patch Changes
112
126
 
113
- - Updated dependencies
127
+ - Updated dependencies
114
128
 
115
129
  ## 0.3.1
116
130
 
117
131
  ### Patch Changes
118
132
 
119
- - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
120
- [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
121
- Upgrading @atlaskit/editor-prosemirror dependency
133
+ - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
134
+ [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
135
+ Upgrading @atlaskit/editor-prosemirror dependency
122
136
 
123
137
  ## 0.3.0
124
138
 
125
139
  ### Minor Changes
126
140
 
127
- - [#68790](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68790)
128
- [`c6d8affc52d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d8affc52d1) -
129
- Support maybeAdd plugins in usePreset. Add typing support for universal preset.
141
+ - [#68790](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68790)
142
+ [`c6d8affc52d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d8affc52d1) -
143
+ Support maybeAdd plugins in usePreset. Add typing support for universal preset.
130
144
 
131
- Now when using the editor API with the universal preset
145
+ Now when using the editor API with the universal preset
132
146
 
133
147
  ### Patch Changes
134
148
 
135
- - Updated dependencies
149
+ - Updated dependencies
136
150
 
137
151
  ## 0.2.4
138
152
 
139
153
  ### Patch Changes
140
154
 
141
- - Updated dependencies
155
+ - Updated dependencies
142
156
 
143
157
  ## 0.2.3
144
158
 
145
159
  ### Patch Changes
146
160
 
147
- - [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238)
148
- [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) -
149
- [ED-21835] Change EditorAPI type to always union with undefined
161
+ - [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238)
162
+ [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) -
163
+ [ED-21835] Change EditorAPI type to always union with undefined
150
164
 
151
165
  ## 0.2.2
152
166
 
153
167
  ### Patch Changes
154
168
 
155
- - Updated dependencies
169
+ - Updated dependencies
156
170
 
157
171
  ## 0.2.1
158
172
 
159
173
  ### Patch Changes
160
174
 
161
- - Updated dependencies
175
+ - Updated dependencies
162
176
 
163
177
  ## 0.2.0
164
178
 
165
179
  ### Minor Changes
166
180
 
167
- - [#59421](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59421)
168
- [`3747754f8ab0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3747754f8ab0) -
169
- NO-ISSUE Added the capability to directly trigger an analytics event as an action to the editor
170
- analytics plugin
181
+ - [#59421](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59421)
182
+ [`3747754f8ab0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3747754f8ab0) -
183
+ NO-ISSUE Added the capability to directly trigger an analytics event as an action to the editor
184
+ analytics plugin
171
185
 
172
186
  ### Patch Changes
173
187
 
174
- - Updated dependencies
188
+ - Updated dependencies
175
189
 
176
190
  ## 0.1.1
177
191
 
178
192
  ### Patch Changes
179
193
 
180
- - [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147)
181
- [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) -
182
- Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
194
+ - [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147)
195
+ [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) -
196
+ Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
package/LICENSE.md CHANGED
@@ -1,13 +1,11 @@
1
1
  Copyright 2023 Atlassian Pty Ltd
2
2
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
4
+ compliance with the License. You may obtain a copy of the License at
6
5
 
7
6
  http://www.apache.org/licenses/LICENSE-2.0
8
7
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
8
+ Unless required by applicable law or agreed to in writing, software distributed under the License is
9
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+ implied. See the License for the specific language governing permissions and limitations under the
11
+ License.
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useWindowWidth = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _react = require("react");
10
+ var _bindEventListener = require("bind-event-listener");
11
+ var useWindowWidth = exports.useWindowWidth = function useWindowWidth() {
12
+ var _useState = (0, _react.useState)(window.innerWidth),
13
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
14
+ windowWidth = _useState2[0],
15
+ setWindowWidth = _useState2[1];
16
+ (0, _react.useLayoutEffect)(function () {
17
+ function handleResize() {
18
+ setWindowWidth(window.innerWidth);
19
+ }
20
+ var unbind = (0, _bindEventListener.bind)(window, {
21
+ type: 'resize',
22
+ listener: handleResize
23
+ });
24
+ return function () {
25
+ return unbind();
26
+ };
27
+ }, []);
28
+ return windowWidth;
29
+ };
@@ -12,12 +12,18 @@ var _hooks = require("@atlaskit/editor-common/hooks");
12
12
  var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
14
14
  var _logo = require("@atlaskit/logo");
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _commands = require("../commands");
17
+ var _useWindowWidth = require("../hooks/useWindowWidth");
18
+ // This const is derived from the breakpoint where the toolbar hides its icons. It is used to hide the text in the AI button.
19
+ // Derived from values from platform/packages/editor/editor-core/src/ui/Appearance/FullPage/MainToolbar.tsx
20
+ var LOOM_BUTTON_WIDTH_BREAKPOINT = 1076;
16
21
  var LoomToolbarButton = function LoomToolbarButton(_ref) {
17
22
  var disabled = _ref.disabled,
18
23
  api = _ref.api,
19
24
  appearance = _ref.appearance,
20
25
  formatMessage = _ref.intl.formatMessage;
26
+ var width = (0, _useWindowWidth.useWindowWidth)();
21
27
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['loom']),
22
28
  loomState = _useSharedPluginState.loomState;
23
29
  if (!loomState) {
@@ -41,6 +47,6 @@ var LoomToolbarButton = function LoomToolbarButton(_ref) {
41
47
  label: label,
42
48
  size: "small"
43
49
  })
44
- });
50
+ }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.plugin.loom.responsive-menu_4at4a') && width >= LOOM_BUTTON_WIDTH_BREAKPOINT && /*#__PURE__*/_react.default.createElement("span", null, formatMessage(_messages.toolbarInsertBlockMessages.recordLoomShortTitle)));
45
51
  };
46
52
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(LoomToolbarButton);
@@ -0,0 +1,16 @@
1
+ import { useLayoutEffect, useState } from 'react';
2
+ import { bind } from 'bind-event-listener';
3
+ export const useWindowWidth = () => {
4
+ const [windowWidth, setWindowWidth] = useState(window.innerWidth);
5
+ useLayoutEffect(() => {
6
+ function handleResize() {
7
+ setWindowWidth(window.innerWidth);
8
+ }
9
+ const unbind = bind(window, {
10
+ type: 'resize',
11
+ listener: handleResize
12
+ });
13
+ return () => unbind();
14
+ }, []);
15
+ return windowWidth;
16
+ };
@@ -5,7 +5,12 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
5
5
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
6
6
  import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
7
7
  import { LoomIcon } from '@atlaskit/logo';
8
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import { recordVideo } from '../commands';
10
+ import { useWindowWidth } from '../hooks/useWindowWidth';
11
+ // This const is derived from the breakpoint where the toolbar hides its icons. It is used to hide the text in the AI button.
12
+ // Derived from values from platform/packages/editor/editor-core/src/ui/Appearance/FullPage/MainToolbar.tsx
13
+ const LOOM_BUTTON_WIDTH_BREAKPOINT = 1076;
9
14
  const LoomToolbarButton = ({
10
15
  disabled,
11
16
  api,
@@ -14,6 +19,7 @@ const LoomToolbarButton = ({
14
19
  formatMessage
15
20
  }
16
21
  }) => {
22
+ const width = useWindowWidth();
17
23
  const {
18
24
  loomState
19
25
  } = useSharedPluginState(api, ['loom']);
@@ -38,6 +44,6 @@ const LoomToolbarButton = ({
38
44
  label: label,
39
45
  size: "small"
40
46
  })
41
- });
47
+ }, getBooleanFF('platform.editor.plugin.loom.responsive-menu_4at4a') && width >= LOOM_BUTTON_WIDTH_BREAKPOINT && /*#__PURE__*/React.createElement("span", null, formatMessage(toolbarInsertBlockMessages.recordLoomShortTitle)));
42
48
  };
43
49
  export default injectIntl(LoomToolbarButton);
@@ -0,0 +1,22 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { useLayoutEffect, useState } from 'react';
3
+ import { bind } from 'bind-event-listener';
4
+ export var useWindowWidth = function useWindowWidth() {
5
+ var _useState = useState(window.innerWidth),
6
+ _useState2 = _slicedToArray(_useState, 2),
7
+ windowWidth = _useState2[0],
8
+ setWindowWidth = _useState2[1];
9
+ useLayoutEffect(function () {
10
+ function handleResize() {
11
+ setWindowWidth(window.innerWidth);
12
+ }
13
+ var unbind = bind(window, {
14
+ type: 'resize',
15
+ listener: handleResize
16
+ });
17
+ return function () {
18
+ return unbind();
19
+ };
20
+ }, []);
21
+ return windowWidth;
22
+ };
@@ -5,12 +5,18 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
5
5
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
6
6
  import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
7
7
  import { LoomIcon } from '@atlaskit/logo';
8
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import { recordVideo } from '../commands';
10
+ import { useWindowWidth } from '../hooks/useWindowWidth';
11
+ // This const is derived from the breakpoint where the toolbar hides its icons. It is used to hide the text in the AI button.
12
+ // Derived from values from platform/packages/editor/editor-core/src/ui/Appearance/FullPage/MainToolbar.tsx
13
+ var LOOM_BUTTON_WIDTH_BREAKPOINT = 1076;
9
14
  var LoomToolbarButton = function LoomToolbarButton(_ref) {
10
15
  var disabled = _ref.disabled,
11
16
  api = _ref.api,
12
17
  appearance = _ref.appearance,
13
18
  formatMessage = _ref.intl.formatMessage;
19
+ var width = useWindowWidth();
14
20
  var _useSharedPluginState = useSharedPluginState(api, ['loom']),
15
21
  loomState = _useSharedPluginState.loomState;
16
22
  if (!loomState) {
@@ -34,6 +40,6 @@ var LoomToolbarButton = function LoomToolbarButton(_ref) {
34
40
  label: label,
35
41
  size: "small"
36
42
  })
37
- });
43
+ }, getBooleanFF('platform.editor.plugin.loom.responsive-menu_4at4a') && width >= LOOM_BUTTON_WIDTH_BREAKPOINT && /*#__PURE__*/React.createElement("span", null, formatMessage(toolbarInsertBlockMessages.recordLoomShortTitle)));
38
44
  };
39
45
  export default injectIntl(LoomToolbarButton);
@@ -0,0 +1 @@
1
+ export declare const useWindowWidth: () => number;
@@ -0,0 +1 @@
1
+ export declare const useWindowWidth: () => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-loom",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
4
4
  "description": "Loom plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,21 +36,28 @@
36
36
  ".": "./src/index.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@atlaskit/editor-common": "^80.0.0",
40
- "@atlaskit/editor-plugin-analytics": "^1.1.0",
41
- "@atlaskit/editor-plugin-hyperlink": "^1.6.0",
39
+ "@atlaskit/editor-common": "^81.2.0",
40
+ "@atlaskit/editor-plugin-analytics": "^1.2.0",
41
+ "@atlaskit/editor-plugin-hyperlink": "^1.7.0",
42
42
  "@atlaskit/editor-prosemirror": "4.0.1",
43
- "@atlaskit/logo": "^13.16.0",
43
+ "@atlaskit/logo": "^13.17.0",
44
+ "@atlaskit/platform-feature-flags": "0.2.5",
44
45
  "@babel/runtime": "^7.0.0",
45
- "@loomhq/record-sdk": "^2.36.18"
46
+ "@loomhq/record-sdk": "^2.36.18",
47
+ "bind-event-listener": "^3.0.0"
46
48
  },
47
49
  "peerDependencies": {
48
50
  "react": "^16.8.0",
49
51
  "react-intl-next": "npm:react-intl@^5.18.1"
50
52
  },
53
+ "platform-feature-flags": {
54
+ "platform.editor.plugin.loom.responsive-menu_4at4a": {
55
+ "type": "boolean"
56
+ }
57
+ },
51
58
  "devDependencies": {
52
- "@atlaskit/editor-plugin-base": "^1.1.0",
53
- "@atlaskit/editor-plugin-card": "^1.11.0",
59
+ "@atlaskit/editor-plugin-base": "^1.3.0",
60
+ "@atlaskit/editor-plugin-card": "^1.15.0",
54
61
  "@atlaskit/editor-plugin-copy-button": "^1.1.0",
55
62
  "@atlaskit/editor-plugin-decorations": "^1.1.0",
56
63
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
@@ -58,7 +65,6 @@
58
65
  "@atlaskit/editor-plugin-floating-toolbar": "^1.4.0",
59
66
  "@atlaskit/editor-plugin-grid": "^1.1.0",
60
67
  "@atlaskit/editor-plugin-width": "^1.1.0",
61
- "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
62
68
  "@testing-library/react": "^12.1.5",
63
69
  "@testing-library/user-event": "^14.4.3",
64
70
  "raf-stub": "^2.0.1",
@@ -97,6 +103,5 @@
97
103
  "import-no-extraneous-disable-for-examples-and-docs"
98
104
  ]
99
105
  }
100
- },
101
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
106
+ }
102
107
  }