@atlaskit/editor-plugin-breakout 1.2.1 → 1.2.3
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 +16 -16
- package/CHANGELOG.md +106 -88
- package/LICENSE.md +6 -8
- package/dist/cjs/plugin.js +6 -1
- package/dist/es2019/plugin.js +7 -2
- package/dist/esm/plugin.js +7 -2
- package/package.json +9 -8
package/.eslintrc.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
rules: {
|
|
3
|
+
'@typescript-eslint/no-duplicate-imports': 'error',
|
|
4
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
5
|
+
'@typescript-eslint/ban-types': [
|
|
6
|
+
'error',
|
|
7
|
+
{
|
|
8
|
+
types: {
|
|
9
|
+
'React.FC':
|
|
10
|
+
'Please use types directly on props instead, and explicitly define children if required',
|
|
11
|
+
'React.FunctionalComponent':
|
|
12
|
+
'Please use types directly on props instead, and explicitly define children if required',
|
|
13
|
+
},
|
|
14
|
+
extendDefaults: false,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
18
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,232 +1,250 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 1.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#106586](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/106586)
|
|
8
|
+
[`a61ec7d27da8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a61ec7d27da8) -
|
|
9
|
+
Use editor padding changes in breakout mark
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 1.2.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#102478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102478)
|
|
17
|
+
[`3378951608b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3378951608b0) -
|
|
18
|
+
[ED-23332] Update adf-schema package to 36.10.1
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 1.2.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
6
24
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
25
|
+
- [#101524](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101524)
|
|
26
|
+
[`4821570088e6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4821570088e6) -
|
|
27
|
+
ED-23362 Bump ADF schema to version 36.8.1 and add support for adf validation and transformation
|
|
10
28
|
|
|
11
29
|
## 1.2.0
|
|
12
30
|
|
|
13
31
|
### Minor Changes
|
|
14
32
|
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
- [#99579](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99579)
|
|
34
|
+
[`f222af5687e9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f222af5687e9) -
|
|
35
|
+
Bump adf-schema to 36.3.0 and adf-schema-json to 1.14.0
|
|
18
36
|
|
|
19
37
|
### Patch Changes
|
|
20
38
|
|
|
21
|
-
-
|
|
39
|
+
- Updated dependencies
|
|
22
40
|
|
|
23
41
|
## 1.1.7
|
|
24
42
|
|
|
25
43
|
### Patch Changes
|
|
26
44
|
|
|
27
|
-
-
|
|
45
|
+
- Updated dependencies
|
|
28
46
|
|
|
29
47
|
## 1.1.6
|
|
30
48
|
|
|
31
49
|
### Patch Changes
|
|
32
50
|
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
51
|
+
- [#97599](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97599)
|
|
52
|
+
[`32c3130b08fe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32c3130b08fe) -
|
|
53
|
+
[ED-22282] Bump adf-schema to 36.1.0
|
|
36
54
|
|
|
37
55
|
## 1.1.5
|
|
38
56
|
|
|
39
57
|
### Patch Changes
|
|
40
58
|
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
- [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
|
|
60
|
+
[`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
|
|
61
|
+
[HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
|
|
62
|
+
language triggering composition on an empty line.This was fixed in a patch bump of
|
|
63
|
+
prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
|
|
46
64
|
|
|
47
65
|
## 1.1.4
|
|
48
66
|
|
|
49
67
|
### Patch Changes
|
|
50
68
|
|
|
51
|
-
-
|
|
69
|
+
- Updated dependencies
|
|
52
70
|
|
|
53
71
|
## 1.1.3
|
|
54
72
|
|
|
55
73
|
### Patch Changes
|
|
56
74
|
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
75
|
+
- [#96237](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96237)
|
|
76
|
+
[`0401e7b5a88e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0401e7b5a88e) -
|
|
77
|
+
[ED-23102] Bump ADF schema to version 35.12.2
|
|
60
78
|
|
|
61
79
|
## 1.1.2
|
|
62
80
|
|
|
63
81
|
### Patch Changes
|
|
64
82
|
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
- [#94901](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94901)
|
|
84
|
+
[`da964fcdc828`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da964fcdc828) -
|
|
85
|
+
[ED-23097] Bump ADF schema to version 35.12.1
|
|
86
|
+
- [#94398](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94398)
|
|
87
|
+
[`4df808e35fda`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4df808e35fda) -
|
|
88
|
+
[ux] [ED-23108] Solve bug where single player expands would lose their expanded state when adding
|
|
89
|
+
breakout marks. Single player expands are only used when `platform.editor.single-player-expand` FF
|
|
90
|
+
AND live page are both enabled.
|
|
73
91
|
|
|
74
92
|
## 1.1.1
|
|
75
93
|
|
|
76
94
|
### Patch Changes
|
|
77
95
|
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
96
|
+
- [#93689](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93689)
|
|
97
|
+
[`5ba5d2b4a9ac`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5ba5d2b4a9ac) -
|
|
98
|
+
Updating adf-schema version to 35.10.0
|
|
81
99
|
|
|
82
100
|
## 1.1.0
|
|
83
101
|
|
|
84
102
|
### Minor Changes
|
|
85
103
|
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
- [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
|
|
105
|
+
[`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
|
|
106
|
+
bumped editor-prosemirror version to 4.0.0
|
|
89
107
|
|
|
90
108
|
### Patch Changes
|
|
91
109
|
|
|
92
|
-
-
|
|
110
|
+
- Updated dependencies
|
|
93
111
|
|
|
94
112
|
## 1.0.9
|
|
95
113
|
|
|
96
114
|
### Patch Changes
|
|
97
115
|
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
116
|
+
- [#92426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92426)
|
|
117
|
+
[`32c76c7c225c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32c76c7c225c) -
|
|
118
|
+
Bump adf-schema to 35.9.2 to support table alignment options
|
|
101
119
|
|
|
102
120
|
## 1.0.8
|
|
103
121
|
|
|
104
122
|
### Patch Changes
|
|
105
123
|
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-
|
|
124
|
+
- [#91106](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91106)
|
|
125
|
+
[`b6ffa30186b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6ffa30186b9) -
|
|
126
|
+
Bump ADF-schema package to version 35.0.0
|
|
127
|
+
- Updated dependencies
|
|
110
128
|
|
|
111
129
|
## 1.0.7
|
|
112
130
|
|
|
113
131
|
### Patch Changes
|
|
114
132
|
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
-
|
|
133
|
+
- [#88938](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88938)
|
|
134
|
+
[`db547827ee45`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/db547827ee45) -
|
|
135
|
+
[ux] Don't render LayoutButton when editor in 'view' mode
|
|
136
|
+
- Updated dependencies
|
|
119
137
|
|
|
120
138
|
## 1.0.6
|
|
121
139
|
|
|
122
140
|
### Patch Changes
|
|
123
141
|
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
142
|
+
- [#86724](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86724)
|
|
143
|
+
[`718a9aa2424d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/718a9aa2424d) -
|
|
144
|
+
[ED-22607] Remove references to maxFrames for multi bodied extensions and bump adf-schema from
|
|
145
|
+
35.7.0 to 35.8.0
|
|
128
146
|
|
|
129
147
|
## 1.0.5
|
|
130
148
|
|
|
131
149
|
### Patch Changes
|
|
132
150
|
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
- [#81777](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81777)
|
|
152
|
+
[`c6d7a5378751`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d7a5378751) -
|
|
153
|
+
Bump adf-schema to 35.7.0
|
|
136
154
|
|
|
137
155
|
## 1.0.4
|
|
138
156
|
|
|
139
157
|
### Patch Changes
|
|
140
158
|
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
159
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
|
|
160
|
+
[`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
|
|
161
|
+
Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
144
162
|
|
|
145
163
|
## 1.0.3
|
|
146
164
|
|
|
147
165
|
### Patch Changes
|
|
148
166
|
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
167
|
+
- [#80679](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80679)
|
|
168
|
+
[`104eb9443b7e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/104eb9443b7e) -
|
|
169
|
+
ED-22553 Updating adf-schema version to 35.6.0
|
|
152
170
|
|
|
153
171
|
## 1.0.2
|
|
154
172
|
|
|
155
173
|
### Patch Changes
|
|
156
174
|
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
-
|
|
175
|
+
- [#78224](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78224)
|
|
176
|
+
[`6b4c9dd4ad34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b4c9dd4ad34) -
|
|
177
|
+
ED-22219: adf-schema updated to 35.5.2
|
|
178
|
+
- Updated dependencies
|
|
161
179
|
|
|
162
180
|
## 1.0.1
|
|
163
181
|
|
|
164
182
|
### Patch Changes
|
|
165
183
|
|
|
166
|
-
-
|
|
184
|
+
- Updated dependencies
|
|
167
185
|
|
|
168
186
|
## 1.0.0
|
|
169
187
|
|
|
170
188
|
### Major Changes
|
|
171
189
|
|
|
172
|
-
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
190
|
+
- [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
|
|
191
|
+
[`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
|
|
192
|
+
This changeset exists to bump all editor plugins that currently don't have a major version. This
|
|
193
|
+
is to address an issue with Jira plugin consumption.
|
|
176
194
|
|
|
177
195
|
### Patch Changes
|
|
178
196
|
|
|
179
|
-
-
|
|
197
|
+
- Updated dependencies
|
|
180
198
|
|
|
181
199
|
## 0.2.2
|
|
182
200
|
|
|
183
201
|
### Patch Changes
|
|
184
202
|
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
|
|
203
|
+
- [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
|
|
204
|
+
[`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
|
|
205
|
+
Upgrading @atlaskit/editor-prosemirror dependency
|
|
188
206
|
|
|
189
207
|
## 0.2.1
|
|
190
208
|
|
|
191
209
|
### Patch Changes
|
|
192
210
|
|
|
193
|
-
-
|
|
194
|
-
|
|
195
|
-
|
|
211
|
+
- [#70152](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70152)
|
|
212
|
+
[`53ed3673df28`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53ed3673df28) -
|
|
213
|
+
Updating adf-schema version to 35.5.1
|
|
196
214
|
|
|
197
215
|
## 0.2.0
|
|
198
216
|
|
|
199
217
|
### Minor Changes
|
|
200
218
|
|
|
201
|
-
-
|
|
202
|
-
|
|
203
|
-
|
|
219
|
+
- [#68790](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68790)
|
|
220
|
+
[`c6d8affc52d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d8affc52d1) -
|
|
221
|
+
Support maybeAdd plugins in usePreset. Add typing support for universal preset.
|
|
204
222
|
|
|
205
|
-
|
|
223
|
+
Now when using the editor API with the universal preset
|
|
206
224
|
|
|
207
225
|
### Patch Changes
|
|
208
226
|
|
|
209
|
-
-
|
|
227
|
+
- Updated dependencies
|
|
210
228
|
|
|
211
229
|
## 0.1.3
|
|
212
230
|
|
|
213
231
|
### Patch Changes
|
|
214
232
|
|
|
215
|
-
-
|
|
233
|
+
- Updated dependencies
|
|
216
234
|
|
|
217
235
|
## 0.1.2
|
|
218
236
|
|
|
219
237
|
### Patch Changes
|
|
220
238
|
|
|
221
|
-
-
|
|
222
|
-
|
|
223
|
-
|
|
239
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238)
|
|
240
|
+
[`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) -
|
|
241
|
+
[ED-21835] Change EditorAPI type to always union with undefined
|
|
224
242
|
|
|
225
243
|
## 0.1.1
|
|
226
244
|
|
|
227
245
|
### Patch Changes
|
|
228
246
|
|
|
229
|
-
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
-
|
|
247
|
+
- [#65031](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65031)
|
|
248
|
+
[`a00094111b5a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a00094111b5a) -
|
|
249
|
+
ED-21609 Update adf-schema to 35.3.0
|
|
250
|
+
- Updated dependencies
|
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.
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -15,6 +15,7 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
15
15
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
16
16
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _pluginKey = require("./plugin-key");
|
|
19
20
|
var _LayoutButton = _interopRequireDefault(require("./ui/LayoutButton"));
|
|
20
21
|
var _findBreakoutNode = require("./utils/find-breakout-node");
|
|
@@ -41,7 +42,11 @@ var BreakoutView = /*#__PURE__*/function () {
|
|
|
41
42
|
}
|
|
42
43
|
var containerStyle = "";
|
|
43
44
|
var contentStyle = "";
|
|
44
|
-
|
|
45
|
+
|
|
46
|
+
// when editor padding = 32px the breakout padding is calculated as 96px (32 * 3)
|
|
47
|
+
// the extra '32' ensures nodes with breakout applied default to line length its below default width
|
|
48
|
+
var padding = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.core.increase-full-page-guttering') ? (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 + 32 : undefined;
|
|
49
|
+
var breakoutWidthPx = (0, _utils.calcBreakoutWidthPx)(_this.mark.attrs.mode, widthState.width, padding);
|
|
45
50
|
if (widthState.lineLength) {
|
|
46
51
|
if (breakoutWidthPx < widthState.lineLength) {
|
|
47
52
|
breakoutWidthPx = widthState.lineLength;
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -5,7 +5,8 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
|
|
8
|
-
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
9
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { pluginKey } from './plugin-key';
|
|
10
11
|
import LayoutButton from './ui/LayoutButton';
|
|
11
12
|
import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
|
|
@@ -27,7 +28,11 @@ class BreakoutView {
|
|
|
27
28
|
}
|
|
28
29
|
let containerStyle = ``;
|
|
29
30
|
let contentStyle = ``;
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
// when editor padding = 32px the breakout padding is calculated as 96px (32 * 3)
|
|
33
|
+
// the extra '32' ensures nodes with breakout applied default to line length its below default width
|
|
34
|
+
const padding = getBooleanFF('platform.editor.core.increase-full-page-guttering') ? akEditorGutterPaddingDynamic() * 2 + 32 : undefined;
|
|
35
|
+
let breakoutWidthPx = calcBreakoutWidthPx(this.mark.attrs.mode, widthState.width, padding);
|
|
31
36
|
if (widthState.lineLength) {
|
|
32
37
|
if (breakoutWidthPx < widthState.lineLength) {
|
|
33
38
|
breakoutWidthPx = widthState.lineLength;
|
package/dist/esm/plugin.js
CHANGED
|
@@ -9,7 +9,8 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
9
9
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
10
10
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
11
11
|
import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
|
|
12
|
-
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
12
|
+
import { akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
13
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { pluginKey } from './plugin-key';
|
|
14
15
|
import LayoutButton from './ui/LayoutButton';
|
|
15
16
|
import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
|
|
@@ -34,7 +35,11 @@ var BreakoutView = /*#__PURE__*/function () {
|
|
|
34
35
|
}
|
|
35
36
|
var containerStyle = "";
|
|
36
37
|
var contentStyle = "";
|
|
37
|
-
|
|
38
|
+
|
|
39
|
+
// when editor padding = 32px the breakout padding is calculated as 96px (32 * 3)
|
|
40
|
+
// the extra '32' ensures nodes with breakout applied default to line length its below default width
|
|
41
|
+
var padding = getBooleanFF('platform.editor.core.increase-full-page-guttering') ? akEditorGutterPaddingDynamic() * 2 + 32 : undefined;
|
|
42
|
+
var breakoutWidthPx = calcBreakoutWidthPx(_this.mark.attrs.mode, widthState.width, padding);
|
|
38
43
|
if (widthState.lineLength) {
|
|
39
44
|
if (breakoutWidthPx < widthState.lineLength) {
|
|
40
45
|
breakoutWidthPx = widthState.lineLength;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^36.
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/adf-schema": "^36.10.7",
|
|
35
|
+
"@atlaskit/editor-common": "^82.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-width": "^1.1.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
39
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
40
|
-
"@atlaskit/icon": "^22.
|
|
39
|
+
"@atlaskit/editor-shared-styles": "^2.12.0",
|
|
40
|
+
"@atlaskit/icon": "^22.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
42
42
|
"@atlaskit/theme": "^12.8.0",
|
|
43
|
-
"@atlaskit/tokens": "^1.
|
|
43
|
+
"@atlaskit/tokens": "^1.49.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
57
57
|
"@atlaskit/ssr": "*",
|
|
58
58
|
"@atlaskit/visual-regression": "*",
|
|
59
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
60
59
|
"@testing-library/react": "^12.1.5",
|
|
61
60
|
"react-dom": "^16.8.0",
|
|
62
61
|
"typescript": "~5.4.2",
|
|
@@ -95,10 +94,12 @@
|
|
|
95
94
|
]
|
|
96
95
|
}
|
|
97
96
|
},
|
|
98
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",
|
|
99
97
|
"platform-feature-flags": {
|
|
100
98
|
"platform.editor.single-player-expand": {
|
|
101
99
|
"type": "boolean"
|
|
100
|
+
},
|
|
101
|
+
"platform.editor.core.increase-full-page-guttering": {
|
|
102
|
+
"type": "boolean"
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
}
|