@atlaskit/editor-plugin-grid 11.0.13 → 11.0.15
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/CHANGELOG.md +15 -0
- package/dist/cjs/gridPlugin.js +5 -5
- package/dist/es2019/gridPlugin.js +5 -3
- package/dist/esm/gridPlugin.js +5 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-grid
|
|
2
2
|
|
|
3
|
+
## 11.0.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0117f2bf00eb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0117f2bf00eb2) -
|
|
8
|
+
Use editor line length rather than editor DOM width for the external embed grid guideline fix so
|
|
9
|
+
guidelines stay aligned in wide editor layouts.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 11.0.14
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 11.0.13
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/cjs/gridPlugin.js
CHANGED
|
@@ -158,9 +158,10 @@ var ThemedGrid = (0, _platformFeatureFlagsReact.componentWithCondition)(function
|
|
|
158
158
|
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true) || (0, _expValEquals.expValEquals)('platform_editor_core_static_css', 'isEnabled', true);
|
|
159
159
|
}, GridNext, ThemedGridLegacy);
|
|
160
160
|
var selector = function selector(states) {
|
|
161
|
-
var _states$widthState, _states$gridState, _states$gridState2, _states$gridState3;
|
|
161
|
+
var _states$widthState, _states$widthState2, _states$gridState, _states$gridState2, _states$gridState3;
|
|
162
162
|
return {
|
|
163
|
-
|
|
163
|
+
lineLength: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.lineLength,
|
|
164
|
+
width: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.width,
|
|
164
165
|
visible: (_states$gridState = states.gridState) === null || _states$gridState === void 0 ? void 0 : _states$gridState.visible,
|
|
165
166
|
gridType: (_states$gridState2 = states.gridState) === null || _states$gridState2 === void 0 ? void 0 : _states$gridState2.gridType,
|
|
166
167
|
highlight: (_states$gridState3 = states.gridState) === null || _states$gridState3 === void 0 ? void 0 : _states$gridState3.highlight
|
|
@@ -171,13 +172,12 @@ var ContentComponent = function ContentComponent(_ref5) {
|
|
|
171
172
|
editorView = _ref5.editorView,
|
|
172
173
|
options = _ref5.options;
|
|
173
174
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['width', 'grid'], selector),
|
|
175
|
+
lineLength = _useSharedPluginState.lineLength,
|
|
174
176
|
width = _useSharedPluginState.width,
|
|
175
177
|
visible = _useSharedPluginState.visible,
|
|
176
178
|
gridType = _useSharedPluginState.gridType,
|
|
177
179
|
highlight = _useSharedPluginState.highlight;
|
|
178
|
-
var overlayWidth =
|
|
179
|
-
return (0, _expValEquals.expValEquals)('platform_editor_external_embed_grid_fix', 'isEnabled', true) ? (editorView.dom.getBoundingClientRect().width || width || _editorSharedStyles.akEditorFullPageMaxWidth) + GRID_GUTTER_WIDTH : undefined;
|
|
180
|
-
}, [editorView.dom, width]);
|
|
180
|
+
var overlayWidth = (0, _expValEquals.expValEquals)('platform_editor_external_embed_grid_fix', 'isEnabled', true) ? (lineLength || width || _editorSharedStyles.akEditorFullPageMaxWidth) + GRID_GUTTER_WIDTH : undefined;
|
|
181
181
|
if (!visible || !highlight) {
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
@@ -150,9 +150,10 @@ const GridNext = ({
|
|
|
150
150
|
const ThemedGridLegacy = withTheme(GridLegacy);
|
|
151
151
|
const ThemedGrid = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true) || expValEquals('platform_editor_core_static_css', 'isEnabled', true), GridNext, ThemedGridLegacy);
|
|
152
152
|
const selector = states => {
|
|
153
|
-
var _states$widthState, _states$gridState, _states$gridState2, _states$gridState3;
|
|
153
|
+
var _states$widthState, _states$widthState2, _states$gridState, _states$gridState2, _states$gridState3;
|
|
154
154
|
return {
|
|
155
|
-
|
|
155
|
+
lineLength: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.lineLength,
|
|
156
|
+
width: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.width,
|
|
156
157
|
visible: (_states$gridState = states.gridState) === null || _states$gridState === void 0 ? void 0 : _states$gridState.visible,
|
|
157
158
|
gridType: (_states$gridState2 = states.gridState) === null || _states$gridState2 === void 0 ? void 0 : _states$gridState2.gridType,
|
|
158
159
|
highlight: (_states$gridState3 = states.gridState) === null || _states$gridState3 === void 0 ? void 0 : _states$gridState3.highlight
|
|
@@ -164,12 +165,13 @@ const ContentComponent = ({
|
|
|
164
165
|
options
|
|
165
166
|
}) => {
|
|
166
167
|
const {
|
|
168
|
+
lineLength,
|
|
167
169
|
width,
|
|
168
170
|
visible,
|
|
169
171
|
gridType,
|
|
170
172
|
highlight
|
|
171
173
|
} = useSharedPluginStateWithSelector(api, ['width', 'grid'], selector);
|
|
172
|
-
const overlayWidth =
|
|
174
|
+
const overlayWidth = expValEquals('platform_editor_external_embed_grid_fix', 'isEnabled', true) ? (lineLength || width || akEditorFullPageMaxWidth) + GRID_GUTTER_WIDTH : undefined;
|
|
173
175
|
if (!visible || !highlight) {
|
|
174
176
|
return null;
|
|
175
177
|
}
|
package/dist/esm/gridPlugin.js
CHANGED
|
@@ -151,9 +151,10 @@ var ThemedGrid = componentWithCondition(function () {
|
|
|
151
151
|
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true) || expValEquals('platform_editor_core_static_css', 'isEnabled', true);
|
|
152
152
|
}, GridNext, ThemedGridLegacy);
|
|
153
153
|
var selector = function selector(states) {
|
|
154
|
-
var _states$widthState, _states$gridState, _states$gridState2, _states$gridState3;
|
|
154
|
+
var _states$widthState, _states$widthState2, _states$gridState, _states$gridState2, _states$gridState3;
|
|
155
155
|
return {
|
|
156
|
-
|
|
156
|
+
lineLength: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.lineLength,
|
|
157
|
+
width: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.width,
|
|
157
158
|
visible: (_states$gridState = states.gridState) === null || _states$gridState === void 0 ? void 0 : _states$gridState.visible,
|
|
158
159
|
gridType: (_states$gridState2 = states.gridState) === null || _states$gridState2 === void 0 ? void 0 : _states$gridState2.gridType,
|
|
159
160
|
highlight: (_states$gridState3 = states.gridState) === null || _states$gridState3 === void 0 ? void 0 : _states$gridState3.highlight
|
|
@@ -164,13 +165,12 @@ var ContentComponent = function ContentComponent(_ref5) {
|
|
|
164
165
|
editorView = _ref5.editorView,
|
|
165
166
|
options = _ref5.options;
|
|
166
167
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['width', 'grid'], selector),
|
|
168
|
+
lineLength = _useSharedPluginState.lineLength,
|
|
167
169
|
width = _useSharedPluginState.width,
|
|
168
170
|
visible = _useSharedPluginState.visible,
|
|
169
171
|
gridType = _useSharedPluginState.gridType,
|
|
170
172
|
highlight = _useSharedPluginState.highlight;
|
|
171
|
-
var overlayWidth =
|
|
172
|
-
return expValEquals('platform_editor_external_embed_grid_fix', 'isEnabled', true) ? (editorView.dom.getBoundingClientRect().width || width || akEditorFullPageMaxWidth) + GRID_GUTTER_WIDTH : undefined;
|
|
173
|
-
}, [editorView.dom, width]);
|
|
173
|
+
var overlayWidth = expValEquals('platform_editor_external_embed_grid_fix', 'isEnabled', true) ? (lineLength || width || akEditorFullPageMaxWidth) + GRID_GUTTER_WIDTH : undefined;
|
|
174
174
|
if (!visible || !highlight) {
|
|
175
175
|
return null;
|
|
176
176
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-grid",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.15",
|
|
4
4
|
"description": "Grid plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
26
26
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags-react": "^0.5.0",
|
|
28
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^102.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"@emotion/react": "^11.7.1",
|
|
31
31
|
"classnames": "^2.2.5"
|