@atlaskit/editor-plugin-grid 1.1.4 → 1.1.6

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 CHANGED
@@ -1,206 +1,216 @@
1
1
  # @atlaskit/editor-plugin-grid
2
2
 
3
+ ## 1.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.1.5
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 1.1.4
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - Updated dependencies
19
+ - Updated dependencies
8
20
 
9
21
  ## 1.1.3
10
22
 
11
23
  ### Patch Changes
12
24
 
13
- - Updated dependencies
25
+ - Updated dependencies
14
26
 
15
27
  ## 1.1.2
16
28
 
17
29
  ### Patch Changes
18
30
 
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
31
+ - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
32
+ [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
33
+ [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
34
+ language triggering composition on an empty line.This was fixed in a patch bump of
35
+ prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
24
36
 
25
37
  ## 1.1.1
26
38
 
27
39
  ### Patch Changes
28
40
 
29
- - Updated dependencies
41
+ - Updated dependencies
30
42
 
31
43
  ## 1.1.0
32
44
 
33
45
  ### Minor Changes
34
46
 
35
- - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
36
- [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
37
- bumped editor-prosemirror version to 4.0.0
47
+ - [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
48
+ [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
49
+ bumped editor-prosemirror version to 4.0.0
38
50
 
39
51
  ### Patch Changes
40
52
 
41
- - Updated dependencies
53
+ - Updated dependencies
42
54
 
43
55
  ## 1.0.3
44
56
 
45
57
  ### Patch Changes
46
58
 
47
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
48
- [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
49
- Upgrade Typescript from `4.9.5` to `5.4.2`
59
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
60
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
61
+ Upgrade Typescript from `4.9.5` to `5.4.2`
50
62
 
51
63
  ## 1.0.2
52
64
 
53
65
  ### Patch Changes
54
66
 
55
- - [#81801](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81801)
56
- [`3afc1428a56a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3afc1428a56a) -
57
- Small refactor in the `overflowHighlight` utility function to improve compatibility with
58
- TypeScript 5
67
+ - [#81801](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81801)
68
+ [`3afc1428a56a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3afc1428a56a) -
69
+ Small refactor in the `overflowHighlight` utility function to improve compatibility with
70
+ TypeScript 5
59
71
 
60
72
  ## 1.0.1
61
73
 
62
74
  ### Patch Changes
63
75
 
64
- - Updated dependencies
76
+ - Updated dependencies
65
77
 
66
78
  ## 1.0.0
67
79
 
68
80
  ### Major Changes
69
81
 
70
- - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
71
- [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
72
- This changeset exists to bump all editor plugins that currently don't have a major version. This
73
- is to address an issue with Jira plugin consumption.
82
+ - [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
83
+ [`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
84
+ This changeset exists to bump all editor plugins that currently don't have a major version. This
85
+ is to address an issue with Jira plugin consumption.
74
86
 
75
87
  ### Patch Changes
76
88
 
77
- - Updated dependencies
89
+ - Updated dependencies
78
90
 
79
91
  ## 0.3.2
80
92
 
81
93
  ### Patch Changes
82
94
 
83
- - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
84
- [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
85
- Upgrading @atlaskit/editor-prosemirror dependency
95
+ - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
96
+ [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
97
+ Upgrading @atlaskit/editor-prosemirror dependency
86
98
 
87
99
  ## 0.3.1
88
100
 
89
101
  ### Patch Changes
90
102
 
91
- - Updated dependencies
103
+ - Updated dependencies
92
104
 
93
105
  ## 0.3.0
94
106
 
95
107
  ### Minor Changes
96
108
 
97
- - [#40763](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40763)
98
- [`7ff70f99909`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7ff70f99909) -
99
- Decouple media from editor-core and expose GridPluginState from grid plugin.
109
+ - [#40763](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40763)
110
+ [`7ff70f99909`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7ff70f99909) - Decouple
111
+ media from editor-core and expose GridPluginState from grid plugin.
100
112
 
101
113
  ## 0.2.2
102
114
 
103
115
  ### Patch Changes
104
116
 
105
- - Updated dependencies
117
+ - Updated dependencies
106
118
 
107
119
  ## 0.2.1
108
120
 
109
121
  ### Patch Changes
110
122
 
111
- - Updated dependencies
123
+ - Updated dependencies
112
124
 
113
125
  ## 0.2.0
114
126
 
115
127
  ### Minor Changes
116
128
 
117
- - [#39325](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39325)
118
- [`ad3c5c21079`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ad3c5c21079) -
119
- Updating all plugins with minor version to correct issue with semver.
129
+ - [#39325](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39325)
130
+ [`ad3c5c21079`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ad3c5c21079) - Updating
131
+ all plugins with minor version to correct issue with semver.
120
132
 
121
133
  ### Patch Changes
122
134
 
123
- - Updated dependencies
135
+ - Updated dependencies
124
136
 
125
137
  ## 0.1.7
126
138
 
127
139
  ### Patch Changes
128
140
 
129
- - [#39010](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39010)
130
- [`8467bdcdf4f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8467bdcdf4f) -
131
- Removing `dependencies` prop from PluginInjectionAPI and changing signature of
132
- `NextEditorPlugin`.
141
+ - [#39010](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39010)
142
+ [`8467bdcdf4f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8467bdcdf4f) - Removing
143
+ `dependencies` prop from PluginInjectionAPI and changing signature of `NextEditorPlugin`.
133
144
 
134
- Previously a `NextEditorPlugin` would be consumed as so:
145
+ Previously a `NextEditorPlugin` would be consumed as so:
135
146
 
136
- ```ts
137
- const plugin: NextEditorPlugin< ... > = (config, api) => {
138
- // Can use api like so:
139
- api.dependencies.core.actions.execute( ... )
140
- return { ... }
141
- }
142
- ```
147
+ ```ts
148
+ const plugin: NextEditorPlugin< ... > = (config, api) => {
149
+ // Can use api like so:
150
+ api.dependencies.core.actions.execute( ... )
151
+ return { ... }
152
+ }
153
+ ```
143
154
 
144
- Now these have become named parameters like so and the `pluginInjectionAPI` is used without the
145
- `dependencies` prop:
155
+ Now these have become named parameters like so and the `pluginInjectionAPI` is used without the
156
+ `dependencies` prop:
146
157
 
147
- ```ts
148
- const plugin: NextEditorPlugin< ... > = ({ config, api }) => {
149
- // Can use api like so:
150
- api.core.actions.execute( ... )
151
- return { ... }
152
- }
153
- ```
158
+ ```ts
159
+ const plugin: NextEditorPlugin< ... > = ({ config, api }) => {
160
+ // Can use api like so:
161
+ api.core.actions.execute( ... )
162
+ return { ... }
163
+ }
164
+ ```
154
165
 
155
- - Updated dependencies
166
+ - Updated dependencies
156
167
 
157
168
  ## 0.1.6
158
169
 
159
170
  ### Patch Changes
160
171
 
161
- - [#39177](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39177)
162
- [`24e27147cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/24e27147cbd) - Added
163
- atlaskit docs to all existing plugins.
172
+ - [#39177](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39177)
173
+ [`24e27147cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/24e27147cbd) - Added
174
+ atlaskit docs to all existing plugins.
164
175
 
165
176
  ## 0.1.5
166
177
 
167
178
  ### Patch Changes
168
179
 
169
- - Updated dependencies
180
+ - Updated dependencies
170
181
 
171
182
  ## 0.1.4
172
183
 
173
184
  ### Patch Changes
174
185
 
175
- - [#37785](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37785)
176
- [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) -
177
- [ED-19233] Import prosemirror libraries from internal facade package
186
+ - [#37785](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37785)
187
+ [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) -
188
+ [ED-19233] Import prosemirror libraries from internal facade package
178
189
 
179
190
  ## 0.1.3
180
191
 
181
192
  ### Patch Changes
182
193
 
183
- - [#36241](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36241)
184
- [`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) -
185
- [ED-13910] Fix prosemirror types
194
+ - [#36241](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36241)
195
+ [`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) -
196
+ [ED-13910] Fix prosemirror types
186
197
 
187
198
  ## 0.1.2
188
199
 
189
200
  ### Patch Changes
190
201
 
191
- - [#35782](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35782)
192
- [`73b5128036b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73b5128036b) -
193
- [ED-17082] Mark package as a singleton one
194
- - Updated dependencies
202
+ - [#35782](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35782)
203
+ [`73b5128036b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73b5128036b) -
204
+ [ED-17082] Mark package as a singleton one
205
+ - Updated dependencies
195
206
 
196
207
  ## 0.1.1
197
208
 
198
209
  ### Patch Changes
199
210
 
200
- - [#34938](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34938)
201
- [`7cd4abcdc0d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7cd4abcdc0d) - Fix
202
- workaround in `editor-plugin-width`. This involved removing `WidthEmitter` in `editor-core`,
203
- removing `containerWidth` from `WidthPluginState`. This change also introduces `usePluginHook`
204
- for an `EditorPlugin` - this enables a react hook to be mounted for plugins (in all
205
- appearances).
206
- - Updated dependencies
211
+ - [#34938](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34938)
212
+ [`7cd4abcdc0d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7cd4abcdc0d) - Fix
213
+ workaround in `editor-plugin-width`. This involved removing `WidthEmitter` in `editor-core`,
214
+ removing `containerWidth` from `WidthPluginState`. This change also introduces `usePluginHook` for
215
+ an `EditorPlugin` - this enables a react hook to be mounted for plugins (in all appearances).
216
+ - 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
- 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.
@@ -14,6 +14,8 @@ var _hooks = require("@atlaskit/editor-common/hooks");
14
14
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
15
15
  var _state = require("@atlaskit/editor-prosemirror/state");
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
+
17
19
  var GRID_SIZE = exports.GRID_SIZE = 12;
18
20
  var key = new _state.PluginKey('gridPlugin');
19
21
  var createDisplayGrid = function createDisplayGrid(view) {
@@ -49,16 +51,23 @@ var gutterGridLines = function gutterGridLines(editorMaxWidth, editorWidth, high
49
51
  var wideSpacing = (editorMaxWidth * _editorSharedStyles.breakoutWideScaleRatio - editorMaxWidth) / 2;
50
52
  sides.forEach(function (side) {
51
53
  gridLines.push( /*#__PURE__*/_react.default.createElement("div", {
52
- key: side,
53
- className: (0, _classnames.default)('gridLine', overflowHighlight(highlights, side, 0, 4) ? 'highlight' : ''),
54
+ key: side
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
56
+ ,
57
+ className: (0, _classnames.default)('gridLine', overflowHighlight(highlights, side, 0, 4) ? 'highlight' : '')
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
59
+ ,
54
60
  style: (0, _defineProperty2.default)({
55
61
  position: 'absolute'
56
62
  }, side, "-".concat(wideSpacing, "px"))
57
63
  }));
58
64
  gridLines.push( /*#__PURE__*/_react.default.createElement("div", {
59
- key: side + '-bk',
65
+ key: side + '-bk'
66
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
67
+ ,
60
68
  className: (0, _classnames.default)('gridLine', highlights.indexOf('full-width') > -1 ? 'highlight' : ''),
61
69
  style: (0, _defineProperty2.default)({
70
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
62
71
  position: 'absolute'
63
72
  }, side, "-".concat((editorWidth - editorMaxWidth - _editorSharedStyles.akEditorBreakoutPadding) / 2, "px"))
64
73
  }));
@@ -73,8 +82,12 @@ var lineLengthGridLines = function lineLengthGridLines(highlights) {
73
82
  paddingLeft: "".concat(gridSpacing, "%")
74
83
  };
75
84
  gridLines.push( /*#__PURE__*/_react.default.createElement("div", {
76
- key: i,
77
- className: (0, _classnames.default)('gridLine', highlights.indexOf(i) > -1 ? 'highlight' : ''),
85
+ key: i
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
87
+ ,
88
+ className: (0, _classnames.default)('gridLine', highlights.indexOf(i) > -1 ? 'highlight' : '')
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
90
+ ,
78
91
  style: i < GRID_SIZE ? style : undefined
79
92
  }));
80
93
  }
@@ -90,16 +103,21 @@ var Grid = function Grid(_ref3) {
90
103
  visible = _ref3.visible;
91
104
  var editorMaxWidth = theme.layoutMaxWidth;
92
105
  var gridLines = [].concat((0, _toConsumableArray2.default)(lineLengthGridLines(highlight)), (0, _toConsumableArray2.default)(gutterGridLines(editorMaxWidth, editorWidth, highlight, shouldCalcBreakoutGridLines)));
93
- return /*#__PURE__*/_react.default.createElement("div", {
94
- className: "gridParent"
95
- }, /*#__PURE__*/_react.default.createElement("div", {
96
- className: (0, _classnames.default)('gridContainer', gridType),
97
- style: {
98
- height: "".concat(containerElement.scrollHeight, "px"),
99
- display: visible ? 'block' : 'none'
100
- },
101
- "data-testid": "gridContainer"
102
- }, gridLines));
106
+ return (
107
+ /*#__PURE__*/
108
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
109
+ _react.default.createElement("div", {
110
+ className: "gridParent"
111
+ }, /*#__PURE__*/_react.default.createElement("div", {
112
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
113
+ className: (0, _classnames.default)('gridContainer', gridType),
114
+ style: {
115
+ height: "".concat(containerElement.scrollHeight, "px"),
116
+ display: visible ? 'block' : 'none'
117
+ },
118
+ "data-testid": "gridContainer"
119
+ }, gridLines))
120
+ );
103
121
  };
104
122
  var ThemedGrid = (0, _react2.withTheme)(Grid);
105
123
  var ContentComponent = function ContentComponent(_ref4) {
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
4
  import { withTheme } from '@emotion/react';
3
5
  import classnames from 'classnames';
4
6
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
@@ -38,18 +40,26 @@ const gutterGridLines = (editorMaxWidth, editorWidth, highlights, shouldCalcBrea
38
40
  const wideSpacing = (editorMaxWidth * breakoutWideScaleRatio - editorMaxWidth) / 2;
39
41
  sides.forEach(side => {
40
42
  gridLines.push( /*#__PURE__*/React.createElement("div", {
41
- key: side,
42
- className: classnames('gridLine', overflowHighlight(highlights, side, 0, 4) ? 'highlight' : ''),
43
+ key: side
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
45
+ ,
46
+ className: classnames('gridLine', overflowHighlight(highlights, side, 0, 4) ? 'highlight' : '')
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
48
+ ,
43
49
  style: {
44
50
  position: 'absolute',
45
51
  [side]: `-${wideSpacing}px`
46
52
  }
47
53
  }));
48
54
  gridLines.push( /*#__PURE__*/React.createElement("div", {
49
- key: side + '-bk',
55
+ key: side + '-bk'
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
57
+ ,
50
58
  className: classnames('gridLine', highlights.indexOf('full-width') > -1 ? 'highlight' : ''),
51
59
  style: {
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
52
61
  position: 'absolute',
62
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
53
63
  [side]: `-${(editorWidth - editorMaxWidth - akEditorBreakoutPadding) / 2}px`
54
64
  }
55
65
  }));
@@ -64,8 +74,12 @@ const lineLengthGridLines = highlights => {
64
74
  paddingLeft: `${gridSpacing}%`
65
75
  };
66
76
  gridLines.push( /*#__PURE__*/React.createElement("div", {
67
- key: i,
68
- className: classnames('gridLine', highlights.indexOf(i) > -1 ? 'highlight' : ''),
77
+ key: i
78
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
79
+ ,
80
+ className: classnames('gridLine', highlights.indexOf(i) > -1 ? 'highlight' : '')
81
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
82
+ ,
69
83
  style: i < GRID_SIZE ? style : undefined
70
84
  }));
71
85
  }
@@ -82,16 +96,21 @@ const Grid = ({
82
96
  }) => {
83
97
  const editorMaxWidth = theme.layoutMaxWidth;
84
98
  let gridLines = [...lineLengthGridLines(highlight), ...gutterGridLines(editorMaxWidth, editorWidth, highlight, shouldCalcBreakoutGridLines)];
85
- return /*#__PURE__*/React.createElement("div", {
86
- className: "gridParent"
87
- }, /*#__PURE__*/React.createElement("div", {
88
- className: classnames('gridContainer', gridType),
89
- style: {
90
- height: `${containerElement.scrollHeight}px`,
91
- display: visible ? 'block' : 'none'
92
- },
93
- "data-testid": "gridContainer"
94
- }, gridLines));
99
+ return (
100
+ /*#__PURE__*/
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
102
+ React.createElement("div", {
103
+ className: "gridParent"
104
+ }, /*#__PURE__*/React.createElement("div", {
105
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
106
+ className: classnames('gridContainer', gridType),
107
+ style: {
108
+ height: `${containerElement.scrollHeight}px`,
109
+ display: visible ? 'block' : 'none'
110
+ },
111
+ "data-testid": "gridContainer"
112
+ }, gridLines))
113
+ );
95
114
  };
96
115
  const ThemedGrid = withTheme(Grid);
97
116
  const ContentComponent = ({
@@ -1,6 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import React from 'react';
4
+
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
6
  import { withTheme } from '@emotion/react';
5
7
  import classnames from 'classnames';
6
8
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
@@ -42,16 +44,23 @@ var gutterGridLines = function gutterGridLines(editorMaxWidth, editorWidth, high
42
44
  var wideSpacing = (editorMaxWidth * breakoutWideScaleRatio - editorMaxWidth) / 2;
43
45
  sides.forEach(function (side) {
44
46
  gridLines.push( /*#__PURE__*/React.createElement("div", {
45
- key: side,
46
- className: classnames('gridLine', overflowHighlight(highlights, side, 0, 4) ? 'highlight' : ''),
47
+ key: side
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
49
+ ,
50
+ className: classnames('gridLine', overflowHighlight(highlights, side, 0, 4) ? 'highlight' : '')
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
52
+ ,
47
53
  style: _defineProperty({
48
54
  position: 'absolute'
49
55
  }, side, "-".concat(wideSpacing, "px"))
50
56
  }));
51
57
  gridLines.push( /*#__PURE__*/React.createElement("div", {
52
- key: side + '-bk',
58
+ key: side + '-bk'
59
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
60
+ ,
53
61
  className: classnames('gridLine', highlights.indexOf('full-width') > -1 ? 'highlight' : ''),
54
62
  style: _defineProperty({
63
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
55
64
  position: 'absolute'
56
65
  }, side, "-".concat((editorWidth - editorMaxWidth - akEditorBreakoutPadding) / 2, "px"))
57
66
  }));
@@ -66,8 +75,12 @@ var lineLengthGridLines = function lineLengthGridLines(highlights) {
66
75
  paddingLeft: "".concat(gridSpacing, "%")
67
76
  };
68
77
  gridLines.push( /*#__PURE__*/React.createElement("div", {
69
- key: i,
70
- className: classnames('gridLine', highlights.indexOf(i) > -1 ? 'highlight' : ''),
78
+ key: i
79
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
80
+ ,
81
+ className: classnames('gridLine', highlights.indexOf(i) > -1 ? 'highlight' : '')
82
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
83
+ ,
71
84
  style: i < GRID_SIZE ? style : undefined
72
85
  }));
73
86
  }
@@ -83,16 +96,21 @@ var Grid = function Grid(_ref3) {
83
96
  visible = _ref3.visible;
84
97
  var editorMaxWidth = theme.layoutMaxWidth;
85
98
  var gridLines = [].concat(_toConsumableArray(lineLengthGridLines(highlight)), _toConsumableArray(gutterGridLines(editorMaxWidth, editorWidth, highlight, shouldCalcBreakoutGridLines)));
86
- return /*#__PURE__*/React.createElement("div", {
87
- className: "gridParent"
88
- }, /*#__PURE__*/React.createElement("div", {
89
- className: classnames('gridContainer', gridType),
90
- style: {
91
- height: "".concat(containerElement.scrollHeight, "px"),
92
- display: visible ? 'block' : 'none'
93
- },
94
- "data-testid": "gridContainer"
95
- }, gridLines));
99
+ return (
100
+ /*#__PURE__*/
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
102
+ React.createElement("div", {
103
+ className: "gridParent"
104
+ }, /*#__PURE__*/React.createElement("div", {
105
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
106
+ className: classnames('gridContainer', gridType),
107
+ style: {
108
+ height: "".concat(containerElement.scrollHeight, "px"),
109
+ display: visible ? 'block' : 'none'
110
+ },
111
+ "data-testid": "gridContainer"
112
+ }, gridLines))
113
+ );
96
114
  };
97
115
  var ThemedGrid = withTheme(Grid);
98
116
  var ContentComponent = function ContentComponent(_ref4) {
package/package.json CHANGED
@@ -1,76 +1,74 @@
1
1
  {
2
- "name": "@atlaskit/editor-plugin-grid",
3
- "version": "1.1.4",
4
- "description": "Grid 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
- "runReact18": false
15
- },
16
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
17
- "main": "dist/cjs/index.js",
18
- "module": "dist/esm/index.js",
19
- "module:es2019": "dist/es2019/index.js",
20
- "types": "dist/types/index.d.ts",
21
- "sideEffects": false,
22
- "atlaskit:src": "src/index.ts",
23
- "af:exports": {
24
- ".": "./src/index.ts"
25
- },
26
- "dependencies": {
27
- "@atlaskit/editor-common": "^81.0.0",
28
- "@atlaskit/editor-plugin-width": "^1.1.0",
29
- "@atlaskit/editor-prosemirror": "4.0.1",
30
- "@atlaskit/editor-shared-styles": "^2.11.0",
31
- "@babel/runtime": "^7.0.0",
32
- "@emotion/react": "^11.7.1",
33
- "classnames": "^2.2.5"
34
- },
35
- "peerDependencies": {
36
- "react": "^16.8.0"
37
- },
38
- "devDependencies": {
39
- "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
40
- "@testing-library/react": "^12.1.5",
41
- "react-dom": "^16.8.0",
42
- "typescript": "~5.4.2",
43
- "wait-for-expect": "^1.2.0"
44
- },
45
- "techstack": {
46
- "@atlassian/frontend": {
47
- "import-structure": [
48
- "atlassian-conventions"
49
- ],
50
- "circular-dependencies": [
51
- "file-and-folder-level"
52
- ]
53
- },
54
- "@repo/internal": {
55
- "dom-events": "use-bind-event-listener",
56
- "analytics": [
57
- "analytics-next"
58
- ],
59
- "design-tokens": [
60
- "color"
61
- ],
62
- "theming": [
63
- "react-context"
64
- ],
65
- "ui-components": [
66
- "lite-mode"
67
- ],
68
- "deprecation": "no-deprecated-imports",
69
- "styling": [
70
- "emotion",
71
- "emotion"
72
- ]
73
- }
74
- },
75
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
76
- }
2
+ "name": "@atlaskit/editor-plugin-grid",
3
+ "version": "1.1.6",
4
+ "description": "Grid 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
+ "runReact18": false
15
+ },
16
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
17
+ "main": "dist/cjs/index.js",
18
+ "module": "dist/esm/index.js",
19
+ "module:es2019": "dist/es2019/index.js",
20
+ "types": "dist/types/index.d.ts",
21
+ "sideEffects": false,
22
+ "atlaskit:src": "src/index.ts",
23
+ "af:exports": {
24
+ ".": "./src/index.ts"
25
+ },
26
+ "dependencies": {
27
+ "@atlaskit/editor-common": "^83.0.0",
28
+ "@atlaskit/editor-plugin-width": "^1.1.0",
29
+ "@atlaskit/editor-prosemirror": "4.0.1",
30
+ "@atlaskit/editor-shared-styles": "^2.12.0",
31
+ "@babel/runtime": "^7.0.0",
32
+ "@emotion/react": "^11.7.1",
33
+ "classnames": "^2.2.5"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "^16.8.0"
37
+ },
38
+ "devDependencies": {
39
+ "@testing-library/react": "^12.1.5",
40
+ "react-dom": "^16.8.0",
41
+ "typescript": "~5.4.2",
42
+ "wait-for-expect": "^1.2.0"
43
+ },
44
+ "techstack": {
45
+ "@atlassian/frontend": {
46
+ "import-structure": [
47
+ "atlassian-conventions"
48
+ ],
49
+ "circular-dependencies": [
50
+ "file-and-folder-level"
51
+ ]
52
+ },
53
+ "@repo/internal": {
54
+ "dom-events": "use-bind-event-listener",
55
+ "analytics": [
56
+ "analytics-next"
57
+ ],
58
+ "design-tokens": [
59
+ "color"
60
+ ],
61
+ "theming": [
62
+ "react-context"
63
+ ],
64
+ "ui-components": [
65
+ "lite-mode"
66
+ ],
67
+ "deprecation": "no-deprecated-imports",
68
+ "styling": [
69
+ "emotion",
70
+ "emotion"
71
+ ]
72
+ }
73
+ }
74
+ }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/editor-plugin-grid"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -28,15 +29,15 @@ type DisplayGrid = (props: Required_2<GridPluginState>) => boolean;
28
29
 
29
30
  // @public (undocumented)
30
31
  export type GridPlugin = NextEditorPlugin<
31
- 'grid',
32
- {
33
- pluginConfiguration: GridPluginOptions | undefined;
34
- dependencies: [WidthPlugin];
35
- sharedState: GridPluginState | null;
36
- actions: {
37
- displayGrid: CreateDisplayGrid;
38
- };
39
- }
32
+ 'grid',
33
+ {
34
+ pluginConfiguration: GridPluginOptions | undefined;
35
+ dependencies: [WidthPlugin];
36
+ sharedState: GridPluginState | null;
37
+ actions: {
38
+ displayGrid: CreateDisplayGrid;
39
+ };
40
+ }
40
41
  >;
41
42
 
42
43
  // @public
@@ -44,15 +45,15 @@ export const gridPlugin: GridPlugin;
44
45
 
45
46
  // @public (undocumented)
46
47
  export interface GridPluginOptions {
47
- // (undocumented)
48
- shouldCalcBreakoutGridLines?: boolean;
48
+ // (undocumented)
49
+ shouldCalcBreakoutGridLines?: boolean;
49
50
  }
50
51
 
51
52
  // @public (undocumented)
52
53
  export type GridPluginState = {
53
- visible: boolean;
54
- gridType?: GridType;
55
- highlight: Highlights;
54
+ visible: boolean;
55
+ gridType?: GridType;
56
+ highlight: Highlights;
56
57
  };
57
58
 
58
59
  // @public (undocumented)
@@ -60,7 +61,7 @@ export type Highlights = Array<'full-width' | 'wide' | number>;
60
61
 
61
62
  // @public (undocumented)
62
63
  type Required_2<T> = {
63
- [P in keyof T]-?: T[P];
64
+ [P in keyof T]-?: T[P];
64
65
  };
65
66
 
66
67
  // (No @packageDocumentation comment for this package)
@@ -74,7 +75,7 @@ type Required_2<T> = {
74
75
 
75
76
  ```json
76
77
  {
77
- "react": "^16.8.0"
78
+ "react": "^16.8.0"
78
79
  }
79
80
  ```
80
81