@atlaskit/editor-plugin-grid 1.0.1 → 1.0.2
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 +6 -0
- package/dist/cjs/plugin.js +5 -6
- package/dist/es2019/plugin.js +3 -2
- package/dist/esm/plugin.js +5 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-grid
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#81801](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81801) [`3afc1428a56a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3afc1428a56a) - Small refactor in the `overflowHighlight` utility function to improve compatibility with TypeScript 5
|
|
8
|
+
|
|
3
9
|
## 1.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.gridPlugin = exports.GRID_SIZE = void 0;
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -30,12 +30,11 @@ var overflowHighlight = function overflowHighlight(highlights, side, start, size
|
|
|
30
30
|
if (!highlights.length) {
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
|
-
var
|
|
34
|
-
return
|
|
35
|
-
});
|
|
36
|
-
var maxHighlight = highlights.reduce(function (prev, cur) {
|
|
37
|
-
return Math.max(prev, cur);
|
|
33
|
+
var numericHighlights = highlights.filter(function (highlight) {
|
|
34
|
+
return typeof highlight === 'number';
|
|
38
35
|
});
|
|
36
|
+
var minHighlight = Math.min.apply(Math, (0, _toConsumableArray2.default)(numericHighlights));
|
|
37
|
+
var maxHighlight = Math.max.apply(Math, (0, _toConsumableArray2.default)(numericHighlights));
|
|
39
38
|
if (side === 'left') {
|
|
40
39
|
return minHighlight < 0 && minHighlight <= -start && (typeof size === 'number' ? minHighlight >= -(start + size) : true);
|
|
41
40
|
} else {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -21,8 +21,9 @@ const overflowHighlight = (highlights, side, start, size) => {
|
|
|
21
21
|
if (!highlights.length) {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
const
|
|
24
|
+
const numericHighlights = highlights.filter(highlight => typeof highlight === 'number');
|
|
25
|
+
const minHighlight = Math.min(...numericHighlights);
|
|
26
|
+
const maxHighlight = Math.max(...numericHighlights);
|
|
26
27
|
if (side === 'left') {
|
|
27
28
|
return minHighlight < 0 && minHighlight <= -start && (typeof size === 'number' ? minHighlight >= -(start + size) : true);
|
|
28
29
|
} else {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { withTheme } from '@emotion/react';
|
|
5
5
|
import classnames from 'classnames';
|
|
@@ -23,12 +23,11 @@ var overflowHighlight = function overflowHighlight(highlights, side, start, size
|
|
|
23
23
|
if (!highlights.length) {
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
return
|
|
28
|
-
});
|
|
29
|
-
var maxHighlight = highlights.reduce(function (prev, cur) {
|
|
30
|
-
return Math.max(prev, cur);
|
|
26
|
+
var numericHighlights = highlights.filter(function (highlight) {
|
|
27
|
+
return typeof highlight === 'number';
|
|
31
28
|
});
|
|
29
|
+
var minHighlight = Math.min.apply(Math, _toConsumableArray(numericHighlights));
|
|
30
|
+
var maxHighlight = Math.max.apply(Math, _toConsumableArray(numericHighlights));
|
|
32
31
|
if (side === 'left') {
|
|
33
32
|
return minHighlight < 0 && minHighlight <= -start && (typeof size === 'number' ? minHighlight >= -(start + size) : true);
|
|
34
33
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-grid",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Grid plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
".": "./src/index.ts"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/editor-common": "^78.
|
|
27
|
+
"@atlaskit/editor-common": "^78.14.0",
|
|
28
28
|
"@atlaskit/editor-plugin-width": "^1.0.0",
|
|
29
29
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
30
30
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|