@atlaskit/editor-plugin-loom 2.2.6 → 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 +4 -4
- package/CHANGELOG.md +71 -63
- package/LICENSE.md +6 -8
- package/dist/cjs/hooks/useWindowWidth.js +29 -0
- package/dist/cjs/ui/ToolbarButton.js +7 -1
- package/dist/es2019/hooks/useWindowWidth.js +16 -0
- package/dist/es2019/ui/ToolbarButton.js +7 -1
- package/dist/esm/hooks/useWindowWidth.js +22 -0
- package/dist/esm/ui/ToolbarButton.js +7 -1
- package/dist/types/hooks/useWindowWidth.d.ts +1 -0
- package/dist/types-ts4.5/hooks/useWindowWidth.d.ts +1 -0
- package/package.json +12 -7
package/.eslintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,188 +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
|
+
|
|
3
11
|
## 2.2.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
6
14
|
|
|
7
|
-
-
|
|
15
|
+
- Updated dependencies
|
|
8
16
|
|
|
9
17
|
## 2.2.5
|
|
10
18
|
|
|
11
19
|
### Patch Changes
|
|
12
20
|
|
|
13
|
-
-
|
|
21
|
+
- Updated dependencies
|
|
14
22
|
|
|
15
23
|
## 2.2.4
|
|
16
24
|
|
|
17
25
|
### Patch Changes
|
|
18
26
|
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
24
32
|
|
|
25
33
|
## 2.2.3
|
|
26
34
|
|
|
27
35
|
### Patch Changes
|
|
28
36
|
|
|
29
|
-
-
|
|
37
|
+
- Updated dependencies
|
|
30
38
|
|
|
31
39
|
## 2.2.2
|
|
32
40
|
|
|
33
41
|
### Patch Changes
|
|
34
42
|
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
38
46
|
|
|
39
47
|
## 2.2.1
|
|
40
48
|
|
|
41
49
|
### Patch Changes
|
|
42
50
|
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
46
54
|
|
|
47
55
|
## 2.2.0
|
|
48
56
|
|
|
49
57
|
### Minor Changes
|
|
50
58
|
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
|
54
62
|
|
|
55
63
|
### Patch Changes
|
|
56
64
|
|
|
57
|
-
-
|
|
65
|
+
- Updated dependencies
|
|
58
66
|
|
|
59
67
|
## 2.1.0
|
|
60
68
|
|
|
61
69
|
### Minor Changes
|
|
62
70
|
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
|
66
74
|
|
|
67
75
|
### Patch Changes
|
|
68
76
|
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
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
|
|
73
81
|
|
|
74
82
|
## 2.0.1
|
|
75
83
|
|
|
76
84
|
### Patch Changes
|
|
77
85
|
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
|
81
89
|
|
|
82
90
|
## 2.0.0
|
|
83
91
|
|
|
84
92
|
### Major Changes
|
|
85
93
|
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
|
89
97
|
|
|
90
98
|
### Patch Changes
|
|
91
99
|
|
|
92
|
-
-
|
|
100
|
+
- Updated dependencies
|
|
93
101
|
|
|
94
102
|
## 1.0.2
|
|
95
103
|
|
|
96
104
|
### Patch Changes
|
|
97
105
|
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
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`
|
|
101
109
|
|
|
102
110
|
## 1.0.1
|
|
103
111
|
|
|
104
112
|
### Patch Changes
|
|
105
113
|
|
|
106
|
-
-
|
|
114
|
+
- Updated dependencies
|
|
107
115
|
|
|
108
116
|
## 1.0.0
|
|
109
117
|
|
|
110
118
|
### Major Changes
|
|
111
119
|
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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.
|
|
116
124
|
|
|
117
125
|
### Patch Changes
|
|
118
126
|
|
|
119
|
-
-
|
|
127
|
+
- Updated dependencies
|
|
120
128
|
|
|
121
129
|
## 0.3.1
|
|
122
130
|
|
|
123
131
|
### Patch Changes
|
|
124
132
|
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
|
128
136
|
|
|
129
137
|
## 0.3.0
|
|
130
138
|
|
|
131
139
|
### Minor Changes
|
|
132
140
|
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
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.
|
|
136
144
|
|
|
137
|
-
|
|
145
|
+
Now when using the editor API with the universal preset
|
|
138
146
|
|
|
139
147
|
### Patch Changes
|
|
140
148
|
|
|
141
|
-
-
|
|
149
|
+
- Updated dependencies
|
|
142
150
|
|
|
143
151
|
## 0.2.4
|
|
144
152
|
|
|
145
153
|
### Patch Changes
|
|
146
154
|
|
|
147
|
-
-
|
|
155
|
+
- Updated dependencies
|
|
148
156
|
|
|
149
157
|
## 0.2.3
|
|
150
158
|
|
|
151
159
|
### Patch Changes
|
|
152
160
|
|
|
153
|
-
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
|
156
164
|
|
|
157
165
|
## 0.2.2
|
|
158
166
|
|
|
159
167
|
### Patch Changes
|
|
160
168
|
|
|
161
|
-
-
|
|
169
|
+
- Updated dependencies
|
|
162
170
|
|
|
163
171
|
## 0.2.1
|
|
164
172
|
|
|
165
173
|
### Patch Changes
|
|
166
174
|
|
|
167
|
-
-
|
|
175
|
+
- Updated dependencies
|
|
168
176
|
|
|
169
177
|
## 0.2.0
|
|
170
178
|
|
|
171
179
|
### Minor Changes
|
|
172
180
|
|
|
173
|
-
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
|
177
185
|
|
|
178
186
|
### Patch Changes
|
|
179
187
|
|
|
180
|
-
-
|
|
188
|
+
- Updated dependencies
|
|
181
189
|
|
|
182
190
|
## 0.1.1
|
|
183
191
|
|
|
184
192
|
### Patch Changes
|
|
185
193
|
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
|
|
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
|
-
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
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.
|
|
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": "^81.
|
|
39
|
+
"@atlaskit/editor-common": "^81.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-hyperlink": "^1.7.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
43
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
59
|
"@atlaskit/editor-plugin-base": "^1.3.0",
|
|
53
|
-
"@atlaskit/editor-plugin-card": "^1.
|
|
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
|
}
|