@atlaskit/editor-plugin-loom 2.2.6 → 2.2.8

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,188 +1,202 @@
1
1
  # @atlaskit/editor-plugin-loom
2
2
 
3
+ ## 2.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.2.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [#107463](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107463)
14
+ [`5c4e84045a40`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c4e84045a40) -
15
+ [ux] Add responsive label to loom plugin toolbar
16
+
3
17
  ## 2.2.6
4
18
 
5
19
  ### Patch Changes
6
20
 
7
- - Updated dependencies
21
+ - Updated dependencies
8
22
 
9
23
  ## 2.2.5
10
24
 
11
25
  ### Patch Changes
12
26
 
13
- - Updated dependencies
27
+ - Updated dependencies
14
28
 
15
29
  ## 2.2.4
16
30
 
17
31
  ### Patch Changes
18
32
 
19
- - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
20
- [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
21
- [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
22
- language triggering composition on an empty line.This was fixed in a patch bump of
23
- prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
33
+ - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
34
+ [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
35
+ [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
36
+ language triggering composition on an empty line.This was fixed in a patch bump of
37
+ prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
24
38
 
25
39
  ## 2.2.3
26
40
 
27
41
  ### Patch Changes
28
42
 
29
- - Updated dependencies
43
+ - Updated dependencies
30
44
 
31
45
  ## 2.2.2
32
46
 
33
47
  ### Patch Changes
34
48
 
35
- - [#96234](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96234)
36
- [`d414d3e7503b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d414d3e7503b) -
37
- Update copy for Loom toolbar tooltip item and quickinsert description
49
+ - [#96234](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96234)
50
+ [`d414d3e7503b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d414d3e7503b) -
51
+ Update copy for Loom toolbar tooltip item and quickinsert description
38
52
 
39
53
  ## 2.2.1
40
54
 
41
55
  ### Patch Changes
42
56
 
43
- - [#93654](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93654)
44
- [`19a2873de742`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19a2873de742) -
45
- Export loom recordVideo action in loom plugin
57
+ - [#93654](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93654)
58
+ [`19a2873de742`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19a2873de742) -
59
+ Export loom recordVideo action in loom plugin
46
60
 
47
61
  ## 2.2.0
48
62
 
49
63
  ### Minor Changes
50
64
 
51
- - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
52
- [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
53
- bumped editor-prosemirror version to 4.0.0
65
+ - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
66
+ [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
67
+ bumped editor-prosemirror version to 4.0.0
54
68
 
55
69
  ### Patch Changes
56
70
 
57
- - Updated dependencies
71
+ - Updated dependencies
58
72
 
59
73
  ## 2.1.0
60
74
 
61
75
  ### Minor Changes
62
76
 
63
- - [#90626](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90626)
64
- [`8efec4489602`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8efec4489602) -
65
- show/hide loom button in toolbar via editor plugin config
77
+ - [#90626](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90626)
78
+ [`8efec4489602`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8efec4489602) -
79
+ show/hide loom button in toolbar via editor plugin config
66
80
 
67
81
  ### Patch Changes
68
82
 
69
- - [#90878](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90878)
70
- [`962275ee0910`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962275ee0910) -
71
- [ux] [ED-22852] Update loom quick insert title, description and logo
72
- - Updated dependencies
83
+ - [#90878](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90878)
84
+ [`962275ee0910`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962275ee0910) -
85
+ [ux] [ED-22852] Update loom quick insert title, description and logo
86
+ - Updated dependencies
73
87
 
74
88
  ## 2.0.1
75
89
 
76
90
  ### Patch Changes
77
91
 
78
- - [#90526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90526)
79
- [`2f75eb73984f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2f75eb73984f) -
80
- [ux] Update toolbar icon to Loom
92
+ - [#90526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90526)
93
+ [`2f75eb73984f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2f75eb73984f) -
94
+ [ux] Update toolbar icon to Loom
81
95
 
82
96
  ## 2.0.0
83
97
 
84
98
  ### Major Changes
85
99
 
86
- - [#85470](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85470)
87
- [`32cb4d4ca34f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32cb4d4ca34f) -
88
- Update loom plugin to take in interface and remove SDK references
100
+ - [#85470](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85470)
101
+ [`32cb4d4ca34f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32cb4d4ca34f) -
102
+ Update loom plugin to take in interface and remove SDK references
89
103
 
90
104
  ### Patch Changes
91
105
 
92
- - Updated dependencies
106
+ - Updated dependencies
93
107
 
94
108
  ## 1.0.2
95
109
 
96
110
  ### Patch Changes
97
111
 
98
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
99
- [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
100
- Upgrade Typescript from `4.9.5` to `5.4.2`
112
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
113
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
114
+ Upgrade Typescript from `4.9.5` to `5.4.2`
101
115
 
102
116
  ## 1.0.1
103
117
 
104
118
  ### Patch Changes
105
119
 
106
- - Updated dependencies
120
+ - Updated dependencies
107
121
 
108
122
  ## 1.0.0
109
123
 
110
124
  ### Major Changes
111
125
 
112
- - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
113
- [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
114
- This changeset exists to bump all editor plugins that currently don't have a major version. This
115
- is to address an issue with Jira plugin consumption.
126
+ - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
127
+ [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
128
+ This changeset exists to bump all editor plugins that currently don't have a major version. This
129
+ is to address an issue with Jira plugin consumption.
116
130
 
117
131
  ### Patch Changes
118
132
 
119
- - Updated dependencies
133
+ - Updated dependencies
120
134
 
121
135
  ## 0.3.1
122
136
 
123
137
  ### Patch Changes
124
138
 
125
- - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
126
- [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
127
- Upgrading @atlaskit/editor-prosemirror dependency
139
+ - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
140
+ [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
141
+ Upgrading @atlaskit/editor-prosemirror dependency
128
142
 
129
143
  ## 0.3.0
130
144
 
131
145
  ### Minor Changes
132
146
 
133
- - [#68790](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68790)
134
- [`c6d8affc52d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d8affc52d1) -
135
- Support maybeAdd plugins in usePreset. Add typing support for universal preset.
147
+ - [#68790](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68790)
148
+ [`c6d8affc52d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d8affc52d1) -
149
+ Support maybeAdd plugins in usePreset. Add typing support for universal preset.
136
150
 
137
- Now when using the editor API with the universal preset
151
+ Now when using the editor API with the universal preset
138
152
 
139
153
  ### Patch Changes
140
154
 
141
- - Updated dependencies
155
+ - Updated dependencies
142
156
 
143
157
  ## 0.2.4
144
158
 
145
159
  ### Patch Changes
146
160
 
147
- - Updated dependencies
161
+ - Updated dependencies
148
162
 
149
163
  ## 0.2.3
150
164
 
151
165
  ### Patch Changes
152
166
 
153
- - [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238)
154
- [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) -
155
- [ED-21835] Change EditorAPI type to always union with undefined
167
+ - [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238)
168
+ [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) -
169
+ [ED-21835] Change EditorAPI type to always union with undefined
156
170
 
157
171
  ## 0.2.2
158
172
 
159
173
  ### Patch Changes
160
174
 
161
- - Updated dependencies
175
+ - Updated dependencies
162
176
 
163
177
  ## 0.2.1
164
178
 
165
179
  ### Patch Changes
166
180
 
167
- - Updated dependencies
181
+ - Updated dependencies
168
182
 
169
183
  ## 0.2.0
170
184
 
171
185
  ### Minor Changes
172
186
 
173
- - [#59421](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59421)
174
- [`3747754f8ab0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3747754f8ab0) -
175
- NO-ISSUE Added the capability to directly trigger an analytics event as an action to the editor
176
- analytics plugin
187
+ - [#59421](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59421)
188
+ [`3747754f8ab0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3747754f8ab0) -
189
+ NO-ISSUE Added the capability to directly trigger an analytics event as an action to the editor
190
+ analytics plugin
177
191
 
178
192
  ### Patch Changes
179
193
 
180
- - Updated dependencies
194
+ - Updated dependencies
181
195
 
182
196
  ## 0.1.1
183
197
 
184
198
  ### Patch Changes
185
199
 
186
- - [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147)
187
- [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) -
188
- Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
200
+ - [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147)
201
+ [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) -
202
+ 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;