@atlaskit/editor-plugin-breakout 1.2.2 → 1.2.4
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 +112 -92
- package/LICENSE.md +6 -8
- package/dist/cjs/plugin.js +6 -1
- package/dist/cjs/ui/LayoutButton.js +5 -1
- package/dist/cjs/utils/single-player-expand.js +1 -1
- package/dist/es2019/plugin.js +7 -2
- package/dist/es2019/ui/LayoutButton.js +5 -1
- package/dist/es2019/utils/single-player-expand.js +1 -1
- package/dist/esm/plugin.js +7 -2
- package/dist/esm/ui/LayoutButton.js +5 -1
- package/dist/esm/utils/single-player-expand.js +1 -1
- package/package.json +104 -103
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,241 +1,261 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 1.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#107785](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107785)
|
|
8
|
+
[`7304a7cd937f9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7304a7cd937f9) -
|
|
9
|
+
[ux] [ED-23522] Single player expands on behind `platform.editor.single-player-expand` for all
|
|
10
|
+
editors, single player expands on without `platform.editor.single-player-expand` feature flag for
|
|
11
|
+
live page editors
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 1.2.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#106586](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/106586)
|
|
19
|
+
[`a61ec7d27da8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a61ec7d27da8) -
|
|
20
|
+
Use editor padding changes in breakout mark
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 1.2.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
6
26
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
27
|
+
- [#102478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102478)
|
|
28
|
+
[`3378951608b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3378951608b0) -
|
|
29
|
+
[ED-23332] Update adf-schema package to 36.10.1
|
|
30
|
+
- Updated dependencies
|
|
11
31
|
|
|
12
32
|
## 1.2.1
|
|
13
33
|
|
|
14
34
|
### Patch Changes
|
|
15
35
|
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
36
|
+
- [#101524](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101524)
|
|
37
|
+
[`4821570088e6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4821570088e6) -
|
|
38
|
+
ED-23362 Bump ADF schema to version 36.8.1 and add support for adf validation and transformation
|
|
19
39
|
|
|
20
40
|
## 1.2.0
|
|
21
41
|
|
|
22
42
|
### Minor Changes
|
|
23
43
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
44
|
+
- [#99579](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99579)
|
|
45
|
+
[`f222af5687e9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f222af5687e9) -
|
|
46
|
+
Bump adf-schema to 36.3.0 and adf-schema-json to 1.14.0
|
|
27
47
|
|
|
28
48
|
### Patch Changes
|
|
29
49
|
|
|
30
|
-
-
|
|
50
|
+
- Updated dependencies
|
|
31
51
|
|
|
32
52
|
## 1.1.7
|
|
33
53
|
|
|
34
54
|
### Patch Changes
|
|
35
55
|
|
|
36
|
-
-
|
|
56
|
+
- Updated dependencies
|
|
37
57
|
|
|
38
58
|
## 1.1.6
|
|
39
59
|
|
|
40
60
|
### Patch Changes
|
|
41
61
|
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
62
|
+
- [#97599](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97599)
|
|
63
|
+
[`32c3130b08fe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32c3130b08fe) -
|
|
64
|
+
[ED-22282] Bump adf-schema to 36.1.0
|
|
45
65
|
|
|
46
66
|
## 1.1.5
|
|
47
67
|
|
|
48
68
|
### Patch Changes
|
|
49
69
|
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
- [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
|
|
71
|
+
[`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
|
|
72
|
+
[HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
|
|
73
|
+
language triggering composition on an empty line.This was fixed in a patch bump of
|
|
74
|
+
prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
|
|
55
75
|
|
|
56
76
|
## 1.1.4
|
|
57
77
|
|
|
58
78
|
### Patch Changes
|
|
59
79
|
|
|
60
|
-
-
|
|
80
|
+
- Updated dependencies
|
|
61
81
|
|
|
62
82
|
## 1.1.3
|
|
63
83
|
|
|
64
84
|
### Patch Changes
|
|
65
85
|
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
86
|
+
- [#96237](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96237)
|
|
87
|
+
[`0401e7b5a88e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0401e7b5a88e) -
|
|
88
|
+
[ED-23102] Bump ADF schema to version 35.12.2
|
|
69
89
|
|
|
70
90
|
## 1.1.2
|
|
71
91
|
|
|
72
92
|
### Patch Changes
|
|
73
93
|
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
- [#94901](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94901)
|
|
95
|
+
[`da964fcdc828`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da964fcdc828) -
|
|
96
|
+
[ED-23097] Bump ADF schema to version 35.12.1
|
|
97
|
+
- [#94398](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94398)
|
|
98
|
+
[`4df808e35fda`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4df808e35fda) -
|
|
99
|
+
[ux] [ED-23108] Solve bug where single player expands would lose their expanded state when adding
|
|
100
|
+
breakout marks. Single player expands are only used when `platform.editor.single-player-expand` FF
|
|
101
|
+
AND live page are both enabled.
|
|
82
102
|
|
|
83
103
|
## 1.1.1
|
|
84
104
|
|
|
85
105
|
### Patch Changes
|
|
86
106
|
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
107
|
+
- [#93689](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93689)
|
|
108
|
+
[`5ba5d2b4a9ac`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5ba5d2b4a9ac) -
|
|
109
|
+
Updating adf-schema version to 35.10.0
|
|
90
110
|
|
|
91
111
|
## 1.1.0
|
|
92
112
|
|
|
93
113
|
### Minor Changes
|
|
94
114
|
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
115
|
+
- [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
|
|
116
|
+
[`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
|
|
117
|
+
bumped editor-prosemirror version to 4.0.0
|
|
98
118
|
|
|
99
119
|
### Patch Changes
|
|
100
120
|
|
|
101
|
-
-
|
|
121
|
+
- Updated dependencies
|
|
102
122
|
|
|
103
123
|
## 1.0.9
|
|
104
124
|
|
|
105
125
|
### Patch Changes
|
|
106
126
|
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
127
|
+
- [#92426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92426)
|
|
128
|
+
[`32c76c7c225c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32c76c7c225c) -
|
|
129
|
+
Bump adf-schema to 35.9.2 to support table alignment options
|
|
110
130
|
|
|
111
131
|
## 1.0.8
|
|
112
132
|
|
|
113
133
|
### Patch Changes
|
|
114
134
|
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
-
|
|
135
|
+
- [#91106](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91106)
|
|
136
|
+
[`b6ffa30186b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6ffa30186b9) -
|
|
137
|
+
Bump ADF-schema package to version 35.0.0
|
|
138
|
+
- Updated dependencies
|
|
119
139
|
|
|
120
140
|
## 1.0.7
|
|
121
141
|
|
|
122
142
|
### Patch Changes
|
|
123
143
|
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
-
|
|
144
|
+
- [#88938](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88938)
|
|
145
|
+
[`db547827ee45`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/db547827ee45) -
|
|
146
|
+
[ux] Don't render LayoutButton when editor in 'view' mode
|
|
147
|
+
- Updated dependencies
|
|
128
148
|
|
|
129
149
|
## 1.0.6
|
|
130
150
|
|
|
131
151
|
### Patch Changes
|
|
132
152
|
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
153
|
+
- [#86724](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86724)
|
|
154
|
+
[`718a9aa2424d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/718a9aa2424d) -
|
|
155
|
+
[ED-22607] Remove references to maxFrames for multi bodied extensions and bump adf-schema from
|
|
156
|
+
35.7.0 to 35.8.0
|
|
137
157
|
|
|
138
158
|
## 1.0.5
|
|
139
159
|
|
|
140
160
|
### Patch Changes
|
|
141
161
|
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
- [#81777](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81777)
|
|
163
|
+
[`c6d7a5378751`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d7a5378751) -
|
|
164
|
+
Bump adf-schema to 35.7.0
|
|
145
165
|
|
|
146
166
|
## 1.0.4
|
|
147
167
|
|
|
148
168
|
### Patch Changes
|
|
149
169
|
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
|
|
170
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
|
|
171
|
+
[`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
|
|
172
|
+
Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
153
173
|
|
|
154
174
|
## 1.0.3
|
|
155
175
|
|
|
156
176
|
### Patch Changes
|
|
157
177
|
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
|
|
178
|
+
- [#80679](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80679)
|
|
179
|
+
[`104eb9443b7e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/104eb9443b7e) -
|
|
180
|
+
ED-22553 Updating adf-schema version to 35.6.0
|
|
161
181
|
|
|
162
182
|
## 1.0.2
|
|
163
183
|
|
|
164
184
|
### Patch Changes
|
|
165
185
|
|
|
166
|
-
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
186
|
+
- [#78224](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78224)
|
|
187
|
+
[`6b4c9dd4ad34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b4c9dd4ad34) -
|
|
188
|
+
ED-22219: adf-schema updated to 35.5.2
|
|
189
|
+
- Updated dependencies
|
|
170
190
|
|
|
171
191
|
## 1.0.1
|
|
172
192
|
|
|
173
193
|
### Patch Changes
|
|
174
194
|
|
|
175
|
-
-
|
|
195
|
+
- Updated dependencies
|
|
176
196
|
|
|
177
197
|
## 1.0.0
|
|
178
198
|
|
|
179
199
|
### Major Changes
|
|
180
200
|
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
201
|
+
- [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
|
|
202
|
+
[`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
|
|
203
|
+
This changeset exists to bump all editor plugins that currently don't have a major version. This
|
|
204
|
+
is to address an issue with Jira plugin consumption.
|
|
185
205
|
|
|
186
206
|
### Patch Changes
|
|
187
207
|
|
|
188
|
-
-
|
|
208
|
+
- Updated dependencies
|
|
189
209
|
|
|
190
210
|
## 0.2.2
|
|
191
211
|
|
|
192
212
|
### Patch Changes
|
|
193
213
|
|
|
194
|
-
-
|
|
195
|
-
|
|
196
|
-
|
|
214
|
+
- [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
|
|
215
|
+
[`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
|
|
216
|
+
Upgrading @atlaskit/editor-prosemirror dependency
|
|
197
217
|
|
|
198
218
|
## 0.2.1
|
|
199
219
|
|
|
200
220
|
### Patch Changes
|
|
201
221
|
|
|
202
|
-
-
|
|
203
|
-
|
|
204
|
-
|
|
222
|
+
- [#70152](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70152)
|
|
223
|
+
[`53ed3673df28`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53ed3673df28) -
|
|
224
|
+
Updating adf-schema version to 35.5.1
|
|
205
225
|
|
|
206
226
|
## 0.2.0
|
|
207
227
|
|
|
208
228
|
### Minor Changes
|
|
209
229
|
|
|
210
|
-
-
|
|
211
|
-
|
|
212
|
-
|
|
230
|
+
- [#68790](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68790)
|
|
231
|
+
[`c6d8affc52d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d8affc52d1) -
|
|
232
|
+
Support maybeAdd plugins in usePreset. Add typing support for universal preset.
|
|
213
233
|
|
|
214
|
-
|
|
234
|
+
Now when using the editor API with the universal preset
|
|
215
235
|
|
|
216
236
|
### Patch Changes
|
|
217
237
|
|
|
218
|
-
-
|
|
238
|
+
- Updated dependencies
|
|
219
239
|
|
|
220
240
|
## 0.1.3
|
|
221
241
|
|
|
222
242
|
### Patch Changes
|
|
223
243
|
|
|
224
|
-
-
|
|
244
|
+
- Updated dependencies
|
|
225
245
|
|
|
226
246
|
## 0.1.2
|
|
227
247
|
|
|
228
248
|
### Patch Changes
|
|
229
249
|
|
|
230
|
-
-
|
|
231
|
-
|
|
232
|
-
|
|
250
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238)
|
|
251
|
+
[`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) -
|
|
252
|
+
[ED-21835] Change EditorAPI type to always union with undefined
|
|
233
253
|
|
|
234
254
|
## 0.1.1
|
|
235
255
|
|
|
236
256
|
### Patch Changes
|
|
237
257
|
|
|
238
|
-
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
-
|
|
258
|
+
- [#65031](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65031)
|
|
259
|
+
[`a00094111b5a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a00094111b5a) -
|
|
260
|
+
ED-21609 Update adf-schema to 35.3.0
|
|
261
|
+
- 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;
|
|
@@ -26,13 +26,17 @@ var _isBreakoutMarkAllowed = require("../utils/is-breakout-mark-allowed");
|
|
|
26
26
|
var _isSupportedNode = require("../utils/is-supported-node");
|
|
27
27
|
/** @jsx jsx */
|
|
28
28
|
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
|
+
|
|
29
31
|
var toolbarButtonWrapperStyles = (0, _react2.css)({
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
31
33
|
'&& button': {
|
|
32
34
|
background: "var(--ds-background-neutral, ".concat(_colors.N20A, ")"),
|
|
33
35
|
color: "var(--ds-icon, ".concat(_colors.N300, ")"),
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
34
37
|
':hover': {
|
|
35
38
|
background: "var(--ds-background-neutral-hovered, ".concat(_colors.B300, ")"),
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
36
40
|
color: "var(--ds-icon, white)".concat(" !important")
|
|
37
41
|
}
|
|
38
42
|
}
|
|
@@ -7,7 +7,7 @@ exports.updateExpandedState = void 0;
|
|
|
7
7
|
var _expand = require("@atlaskit/editor-common/expand");
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
9
|
var updateExpandedState = exports.updateExpandedState = function updateExpandedState(tr, node, isLivePage) {
|
|
10
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.single-player-expand')
|
|
10
|
+
if (isLivePage || (0, _platformFeatureFlags.getBooleanFF)('platform.editor.single-player-expand')) {
|
|
11
11
|
var wasExpandExpanded = _expand.expandedState.get(node.node);
|
|
12
12
|
var newExpand = tr.doc.nodeAt(node.pos);
|
|
13
13
|
if (wasExpandExpanded !== undefined && newExpand) {
|
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;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
5
|
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { injectIntl } from 'react-intl-next';
|
|
5
7
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
@@ -19,12 +21,14 @@ import { getBreakoutMode } from '../utils/get-breakout-mode';
|
|
|
19
21
|
import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
|
|
20
22
|
import { isSupportedNodeForBreakout } from '../utils/is-supported-node';
|
|
21
23
|
const toolbarButtonWrapperStyles = css({
|
|
22
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
23
25
|
'&& button': {
|
|
24
26
|
background: `var(--ds-background-neutral, ${N20A})`,
|
|
25
27
|
color: `var(--ds-icon, ${N300})`,
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
26
29
|
':hover': {
|
|
27
30
|
background: `var(--ds-background-neutral-hovered, ${B300})`,
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
28
32
|
color: `${"var(--ds-icon, white)"} !important`
|
|
29
33
|
}
|
|
30
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
export const updateExpandedState = (tr, node, isLivePage) => {
|
|
4
|
-
if (getBooleanFF('platform.editor.single-player-expand')
|
|
4
|
+
if (isLivePage || getBooleanFF('platform.editor.single-player-expand')) {
|
|
5
5
|
const wasExpandExpanded = expandedState.get(node.node);
|
|
6
6
|
const newExpand = tr.doc.nodeAt(node.pos);
|
|
7
7
|
if (wasExpandExpanded !== undefined && newExpand) {
|
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;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
5
|
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { injectIntl } from 'react-intl-next';
|
|
5
7
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
@@ -19,12 +21,14 @@ import { getBreakoutMode } from '../utils/get-breakout-mode';
|
|
|
19
21
|
import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
|
|
20
22
|
import { isSupportedNodeForBreakout } from '../utils/is-supported-node';
|
|
21
23
|
var toolbarButtonWrapperStyles = css({
|
|
22
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
23
25
|
'&& button': {
|
|
24
26
|
background: "var(--ds-background-neutral, ".concat(N20A, ")"),
|
|
25
27
|
color: "var(--ds-icon, ".concat(N300, ")"),
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
26
29
|
':hover': {
|
|
27
30
|
background: "var(--ds-background-neutral-hovered, ".concat(B300, ")"),
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
28
32
|
color: "var(--ds-icon, white)".concat(" !important")
|
|
29
33
|
}
|
|
30
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
export var updateExpandedState = function updateExpandedState(tr, node, isLivePage) {
|
|
4
|
-
if (getBooleanFF('platform.editor.single-player-expand')
|
|
4
|
+
if (isLivePage || getBooleanFF('platform.editor.single-player-expand')) {
|
|
5
5
|
var wasExpandExpanded = expandedState.get(node.node);
|
|
6
6
|
var newExpand = tr.doc.nodeAt(node.pos);
|
|
7
7
|
if (wasExpandExpanded !== undefined && newExpand) {
|
package/package.json
CHANGED
|
@@ -1,104 +1,105 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
2
|
+
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
+
"version": "1.2.4",
|
|
4
|
+
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor: Media Experience Porygon",
|
|
12
|
+
"singleton": true,
|
|
13
|
+
"releaseModel": "continuous"
|
|
14
|
+
},
|
|
15
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
16
|
+
"main": "dist/cjs/index.js",
|
|
17
|
+
"module": "dist/esm/index.js",
|
|
18
|
+
"module:es2019": "dist/es2019/index.js",
|
|
19
|
+
"types": "dist/types/index.d.ts",
|
|
20
|
+
"typesVersions": {
|
|
21
|
+
">=4.5 <4.9": {
|
|
22
|
+
"*": [
|
|
23
|
+
"dist/types-ts4.5/*",
|
|
24
|
+
"dist/types-ts4.5/index.d.ts"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"atlaskit:src": "src/index.ts",
|
|
30
|
+
"af:exports": {
|
|
31
|
+
".": "./src/index.ts"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@atlaskit/adf-schema": "^36.10.7",
|
|
35
|
+
"@atlaskit/editor-common": "^82.9.0",
|
|
36
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^2.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-width": "^1.1.0",
|
|
38
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
39
|
+
"@atlaskit/editor-shared-styles": "^2.12.0",
|
|
40
|
+
"@atlaskit/icon": "^22.4.0",
|
|
41
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
42
|
+
"@atlaskit/theme": "^12.10.0",
|
|
43
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
44
|
+
"@babel/runtime": "^7.0.0",
|
|
45
|
+
"@emotion/react": "^11.7.1"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^16.8.0",
|
|
49
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@af/integration-testing": "*",
|
|
53
|
+
"@af/visual-regression": "*",
|
|
54
|
+
"@atlaskit/editor-plugin-code-block": "^1.3.0",
|
|
55
|
+
"@atlaskit/editor-plugin-composition": "^1.1.0",
|
|
56
|
+
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
57
|
+
"@atlaskit/ssr": "*",
|
|
58
|
+
"@atlaskit/visual-regression": "*",
|
|
59
|
+
"@testing-library/react": "^12.1.5",
|
|
60
|
+
"react-dom": "^16.8.0",
|
|
61
|
+
"typescript": "~5.4.2",
|
|
62
|
+
"wait-for-expect": "^1.2.0"
|
|
63
|
+
},
|
|
64
|
+
"techstack": {
|
|
65
|
+
"@atlassian/frontend": {
|
|
66
|
+
"import-structure": [
|
|
67
|
+
"atlassian-conventions"
|
|
68
|
+
],
|
|
69
|
+
"circular-dependencies": [
|
|
70
|
+
"file-and-folder-level"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"@repo/internal": {
|
|
74
|
+
"dom-events": "use-bind-event-listener",
|
|
75
|
+
"analytics": [
|
|
76
|
+
"analytics-next"
|
|
77
|
+
],
|
|
78
|
+
"design-tokens": [
|
|
79
|
+
"color"
|
|
80
|
+
],
|
|
81
|
+
"theming": [
|
|
82
|
+
"react-context"
|
|
83
|
+
],
|
|
84
|
+
"ui-components": [
|
|
85
|
+
"lite-mode"
|
|
86
|
+
],
|
|
87
|
+
"deprecation": "no-deprecated-imports",
|
|
88
|
+
"styling": [
|
|
89
|
+
"emotion",
|
|
90
|
+
"emotion"
|
|
91
|
+
],
|
|
92
|
+
"imports": [
|
|
93
|
+
"import-no-extraneous-disable-for-examples-and-docs"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"platform-feature-flags": {
|
|
98
|
+
"platform.editor.single-player-expand": {
|
|
99
|
+
"type": "boolean"
|
|
100
|
+
},
|
|
101
|
+
"platform.editor.core.increase-full-page-guttering": {
|
|
102
|
+
"type": "boolean"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|