@atlaskit/editor-common 74.21.4 → 74.22.0
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/guideline/fixedGuideline.js +65 -0
- package/dist/cjs/guideline/index.js +21 -1
- package/dist/cjs/guideline/updateGuideline.js +29 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/guideline/fixedGuideline.js +53 -0
- package/dist/es2019/guideline/index.js +3 -1
- package/dist/es2019/guideline/updateGuideline.js +17 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/guideline/fixedGuideline.js +56 -0
- package/dist/esm/guideline/index.js +3 -1
- package/dist/esm/guideline/updateGuideline.js +21 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/guideline/fixedGuideline.d.ts +29 -0
- package/dist/types/guideline/index.d.ts +2 -0
- package/dist/types/guideline/types.d.ts +5 -0
- package/dist/types/guideline/updateGuideline.d.ts +5 -0
- package/dist/types/resizer/Resizer.d.ts +5 -0
- package/dist/types-ts4.5/guideline/fixedGuideline.d.ts +29 -0
- package/dist/types-ts4.5/guideline/index.d.ts +2 -0
- package/dist/types-ts4.5/guideline/types.d.ts +5 -0
- package/dist/types-ts4.5/guideline/updateGuideline.d.ts +5 -0
- package/dist/types-ts4.5/resizer/Resizer.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 74.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`464745a92e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/464745a92e6) - [ux] Updated the Editor Table plugin to use the new guidelines plugin when custom-table-widths FF is enabled
|
|
8
|
+
|
|
3
9
|
## 74.21.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.createGuidesFromLengths = exports.createFixedGuidelinesFromLengths = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
/**
|
|
10
|
+
* This creates a collection of points relative to the center line of each supplied length. For example; a length of
|
|
11
|
+
* 100 centered to 0 would result in the left position of -50 and a right position of +50.
|
|
12
|
+
*
|
|
13
|
+
* Length values should be unique, as duplicates will be trimmed from the result.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* createGuidelinesFromLengths([100, 200, 200, -200, 201]) => [
|
|
17
|
+
* {left: -50, right: 50, length: 100},
|
|
18
|
+
* {left: -100, right: 100, length: 200},
|
|
19
|
+
* {left: 100, right: -100, length: -200},
|
|
20
|
+
* {left: -100.5, right: 100.5, length: 201},
|
|
21
|
+
* ]
|
|
22
|
+
*
|
|
23
|
+
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
24
|
+
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
25
|
+
*/
|
|
26
|
+
var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
|
|
27
|
+
return Array.from(new Set(lengths)).reduce(function (acc, length) {
|
|
28
|
+
var h = length * 0.5;
|
|
29
|
+
if (!h || !Number.isFinite(length)) {
|
|
30
|
+
// Filter out nonsensical values, like 0
|
|
31
|
+
return acc;
|
|
32
|
+
}
|
|
33
|
+
return [].concat((0, _toConsumableArray2.default)(acc), [{
|
|
34
|
+
left: -h,
|
|
35
|
+
right: h,
|
|
36
|
+
length: length
|
|
37
|
+
}]);
|
|
38
|
+
}, []);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
43
|
+
* Each length value generates a guideline config for both the left and right side of the length.
|
|
44
|
+
*/
|
|
45
|
+
exports.createGuidesFromLengths = createGuidesFromLengths;
|
|
46
|
+
var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths(lengths) {
|
|
47
|
+
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'guide';
|
|
48
|
+
return createGuidesFromLengths(lengths).reduce(function (acc, _ref) {
|
|
49
|
+
var left = _ref.left,
|
|
50
|
+
right = _ref.right,
|
|
51
|
+
length = _ref.length;
|
|
52
|
+
return [].concat((0, _toConsumableArray2.default)(acc), [{
|
|
53
|
+
key: "".concat(key, "-").concat(length, "-left"),
|
|
54
|
+
position: {
|
|
55
|
+
x: left
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "".concat(key, "-").concat(length, "-right"),
|
|
59
|
+
position: {
|
|
60
|
+
x: right
|
|
61
|
+
}
|
|
62
|
+
}]);
|
|
63
|
+
}, []);
|
|
64
|
+
};
|
|
65
|
+
exports.createFixedGuidelinesFromLengths = createFixedGuidelinesFromLengths;
|
|
@@ -3,10 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "createFixedGuidelinesFromLengths", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _fixedGuideline.createFixedGuidelinesFromLengths;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "createGuidesFromLengths", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _fixedGuideline.createGuidesFromLengths;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
6
18
|
Object.defineProperty(exports, "generateDynamicGuidelines", {
|
|
7
19
|
enumerable: true,
|
|
8
20
|
get: function get() {
|
|
9
21
|
return _dynamicGuideline.generateDynamicGuidelines;
|
|
10
22
|
}
|
|
11
23
|
});
|
|
12
|
-
|
|
24
|
+
Object.defineProperty(exports, "getGuidelinesWithHighlights", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _updateGuideline.getGuidelinesWithHighlights;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var _dynamicGuideline = require("./dynamicGuideline");
|
|
31
|
+
var _fixedGuideline = require("./fixedGuideline");
|
|
32
|
+
var _updateGuideline = require("./updateGuideline");
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getGuidelinesWithHighlights = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
+
var activeGuidelineStyle = function activeGuidelineStyle(guideline) {
|
|
12
|
+
return _objectSpread(_objectSpread({}, guideline), {}, {
|
|
13
|
+
active: true,
|
|
14
|
+
show: true
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var getGuidelinesWithHighlights = function getGuidelinesWithHighlights(gap, maxGap, activeGuidelineKeys, guidelines) {
|
|
18
|
+
if (activeGuidelineKeys.length) {
|
|
19
|
+
return guidelines.map(function (guideline) {
|
|
20
|
+
if (activeGuidelineKeys.includes(guideline.key) && gap < maxGap) {
|
|
21
|
+
return activeGuidelineStyle(guideline);
|
|
22
|
+
}
|
|
23
|
+
return guideline;
|
|
24
|
+
});
|
|
25
|
+
} else {
|
|
26
|
+
return guidelines;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.getGuidelinesWithHighlights = getGuidelinesWithHighlights;
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "74.
|
|
19
|
+
var packageVersion = "74.22.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "74.
|
|
27
|
+
var packageVersion = "74.22.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This creates a collection of points relative to the center line of each supplied length. For example; a length of
|
|
3
|
+
* 100 centered to 0 would result in the left position of -50 and a right position of +50.
|
|
4
|
+
*
|
|
5
|
+
* Length values should be unique, as duplicates will be trimmed from the result.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* createGuidelinesFromLengths([100, 200, 200, -200, 201]) => [
|
|
9
|
+
* {left: -50, right: 50, length: 100},
|
|
10
|
+
* {left: -100, right: 100, length: 200},
|
|
11
|
+
* {left: 100, right: -100, length: -200},
|
|
12
|
+
* {left: -100.5, right: 100.5, length: 201},
|
|
13
|
+
* ]
|
|
14
|
+
*
|
|
15
|
+
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
16
|
+
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
17
|
+
*/
|
|
18
|
+
export const createGuidesFromLengths = lengths => {
|
|
19
|
+
return Array.from(new Set(lengths)).reduce((acc, length) => {
|
|
20
|
+
const h = length * 0.5;
|
|
21
|
+
if (!h || !Number.isFinite(length)) {
|
|
22
|
+
// Filter out nonsensical values, like 0
|
|
23
|
+
return acc;
|
|
24
|
+
}
|
|
25
|
+
return [...acc, {
|
|
26
|
+
left: -h,
|
|
27
|
+
right: h,
|
|
28
|
+
length
|
|
29
|
+
}];
|
|
30
|
+
}, []);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
35
|
+
* Each length value generates a guideline config for both the left and right side of the length.
|
|
36
|
+
*/
|
|
37
|
+
export const createFixedGuidelinesFromLengths = (lengths, key = 'guide') => {
|
|
38
|
+
return createGuidesFromLengths(lengths).reduce((acc, {
|
|
39
|
+
left,
|
|
40
|
+
right,
|
|
41
|
+
length
|
|
42
|
+
}) => [...acc, {
|
|
43
|
+
key: `${key}-${length}-left`,
|
|
44
|
+
position: {
|
|
45
|
+
x: left
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
key: `${key}-${length}-right`,
|
|
49
|
+
position: {
|
|
50
|
+
x: right
|
|
51
|
+
}
|
|
52
|
+
}], []);
|
|
53
|
+
};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
1
|
+
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
2
|
+
export { createFixedGuidelinesFromLengths, createGuidesFromLengths } from './fixedGuideline';
|
|
3
|
+
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const activeGuidelineStyle = guideline => ({
|
|
2
|
+
...guideline,
|
|
3
|
+
active: true,
|
|
4
|
+
show: true
|
|
5
|
+
});
|
|
6
|
+
export const getGuidelinesWithHighlights = (gap, maxGap, activeGuidelineKeys, guidelines) => {
|
|
7
|
+
if (activeGuidelineKeys.length) {
|
|
8
|
+
return guidelines.map(guideline => {
|
|
9
|
+
if (activeGuidelineKeys.includes(guideline.key) && gap < maxGap) {
|
|
10
|
+
return activeGuidelineStyle(guideline);
|
|
11
|
+
}
|
|
12
|
+
return guideline;
|
|
13
|
+
});
|
|
14
|
+
} else {
|
|
15
|
+
return guidelines;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "74.
|
|
3
|
+
const packageVersion = "74.22.0";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
9
9
|
import Layer from '../Layer';
|
|
10
10
|
const packageName = "@atlaskit/editor-common";
|
|
11
|
-
const packageVersion = "74.
|
|
11
|
+
const packageVersion = "74.22.0";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = '0, 8';
|
|
14
14
|
class DropList extends Component {
|
package/dist/es2019/version.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
/**
|
|
3
|
+
* This creates a collection of points relative to the center line of each supplied length. For example; a length of
|
|
4
|
+
* 100 centered to 0 would result in the left position of -50 and a right position of +50.
|
|
5
|
+
*
|
|
6
|
+
* Length values should be unique, as duplicates will be trimmed from the result.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* createGuidelinesFromLengths([100, 200, 200, -200, 201]) => [
|
|
10
|
+
* {left: -50, right: 50, length: 100},
|
|
11
|
+
* {left: -100, right: 100, length: 200},
|
|
12
|
+
* {left: 100, right: -100, length: -200},
|
|
13
|
+
* {left: -100.5, right: 100.5, length: 201},
|
|
14
|
+
* ]
|
|
15
|
+
*
|
|
16
|
+
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
17
|
+
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
18
|
+
*/
|
|
19
|
+
export var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
|
|
20
|
+
return Array.from(new Set(lengths)).reduce(function (acc, length) {
|
|
21
|
+
var h = length * 0.5;
|
|
22
|
+
if (!h || !Number.isFinite(length)) {
|
|
23
|
+
// Filter out nonsensical values, like 0
|
|
24
|
+
return acc;
|
|
25
|
+
}
|
|
26
|
+
return [].concat(_toConsumableArray(acc), [{
|
|
27
|
+
left: -h,
|
|
28
|
+
right: h,
|
|
29
|
+
length: length
|
|
30
|
+
}]);
|
|
31
|
+
}, []);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
36
|
+
* Each length value generates a guideline config for both the left and right side of the length.
|
|
37
|
+
*/
|
|
38
|
+
export var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths(lengths) {
|
|
39
|
+
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'guide';
|
|
40
|
+
return createGuidesFromLengths(lengths).reduce(function (acc, _ref) {
|
|
41
|
+
var left = _ref.left,
|
|
42
|
+
right = _ref.right,
|
|
43
|
+
length = _ref.length;
|
|
44
|
+
return [].concat(_toConsumableArray(acc), [{
|
|
45
|
+
key: "".concat(key, "-").concat(length, "-left"),
|
|
46
|
+
position: {
|
|
47
|
+
x: left
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
key: "".concat(key, "-").concat(length, "-right"),
|
|
51
|
+
position: {
|
|
52
|
+
x: right
|
|
53
|
+
}
|
|
54
|
+
}]);
|
|
55
|
+
}, []);
|
|
56
|
+
};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
1
|
+
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
2
|
+
export { createFixedGuidelinesFromLengths, createGuidesFromLengths } from './fixedGuideline';
|
|
3
|
+
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
var activeGuidelineStyle = function activeGuidelineStyle(guideline) {
|
|
5
|
+
return _objectSpread(_objectSpread({}, guideline), {}, {
|
|
6
|
+
active: true,
|
|
7
|
+
show: true
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export var getGuidelinesWithHighlights = function getGuidelinesWithHighlights(gap, maxGap, activeGuidelineKeys, guidelines) {
|
|
11
|
+
if (activeGuidelineKeys.length) {
|
|
12
|
+
return guidelines.map(function (guideline) {
|
|
13
|
+
if (activeGuidelineKeys.includes(guideline.key) && gap < maxGap) {
|
|
14
|
+
return activeGuidelineStyle(guideline);
|
|
15
|
+
}
|
|
16
|
+
return guideline;
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
return guidelines;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "74.
|
|
9
|
+
var packageVersion = "74.22.0";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
18
18
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
19
19
|
import Layer from '../Layer';
|
|
20
20
|
var packageName = "@atlaskit/editor-common";
|
|
21
|
-
var packageVersion = "74.
|
|
21
|
+
var packageVersion = "74.22.0";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LengthGuide } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* This creates a collection of points relative to the center line of each supplied length. For example; a length of
|
|
4
|
+
* 100 centered to 0 would result in the left position of -50 and a right position of +50.
|
|
5
|
+
*
|
|
6
|
+
* Length values should be unique, as duplicates will be trimmed from the result.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* createGuidelinesFromLengths([100, 200, 200, -200, 201]) => [
|
|
10
|
+
* {left: -50, right: 50, length: 100},
|
|
11
|
+
* {left: -100, right: 100, length: 200},
|
|
12
|
+
* {left: 100, right: -100, length: -200},
|
|
13
|
+
* {left: -100.5, right: 100.5, length: 201},
|
|
14
|
+
* ]
|
|
15
|
+
*
|
|
16
|
+
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
17
|
+
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
18
|
+
*/
|
|
19
|
+
export declare const createGuidesFromLengths: (lengths: number[]) => LengthGuide[];
|
|
20
|
+
/**
|
|
21
|
+
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
22
|
+
* Each length value generates a guideline config for both the left and right side of the length.
|
|
23
|
+
*/
|
|
24
|
+
export declare const createFixedGuidelinesFromLengths: (lengths: number[], key?: string) => {
|
|
25
|
+
key: string;
|
|
26
|
+
position: {
|
|
27
|
+
x: number;
|
|
28
|
+
};
|
|
29
|
+
}[];
|
|
@@ -16,6 +16,11 @@ export type ResizerProps = {
|
|
|
16
16
|
handleComponent?: HandleComponent;
|
|
17
17
|
handleHeightSize?: HandleHeightSizeType;
|
|
18
18
|
handleMarginTop?: number;
|
|
19
|
+
snap?: {
|
|
20
|
+
x?: Array<number>;
|
|
21
|
+
y?: Array<number>;
|
|
22
|
+
};
|
|
23
|
+
snapGap?: number;
|
|
19
24
|
handleAlignmentMethod?: HandleAlignmentMethod;
|
|
20
25
|
resizeRatio?: number;
|
|
21
26
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LengthGuide } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* This creates a collection of points relative to the center line of each supplied length. For example; a length of
|
|
4
|
+
* 100 centered to 0 would result in the left position of -50 and a right position of +50.
|
|
5
|
+
*
|
|
6
|
+
* Length values should be unique, as duplicates will be trimmed from the result.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* createGuidelinesFromLengths([100, 200, 200, -200, 201]) => [
|
|
10
|
+
* {left: -50, right: 50, length: 100},
|
|
11
|
+
* {left: -100, right: 100, length: 200},
|
|
12
|
+
* {left: 100, right: -100, length: -200},
|
|
13
|
+
* {left: -100.5, right: 100.5, length: 201},
|
|
14
|
+
* ]
|
|
15
|
+
*
|
|
16
|
+
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
17
|
+
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
18
|
+
*/
|
|
19
|
+
export declare const createGuidesFromLengths: (lengths: number[]) => LengthGuide[];
|
|
20
|
+
/**
|
|
21
|
+
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
22
|
+
* Each length value generates a guideline config for both the left and right side of the length.
|
|
23
|
+
*/
|
|
24
|
+
export declare const createFixedGuidelinesFromLengths: (lengths: number[], key?: string) => {
|
|
25
|
+
key: string;
|
|
26
|
+
position: {
|
|
27
|
+
x: number;
|
|
28
|
+
};
|
|
29
|
+
}[];
|
|
@@ -16,6 +16,11 @@ export type ResizerProps = {
|
|
|
16
16
|
handleComponent?: HandleComponent;
|
|
17
17
|
handleHeightSize?: HandleHeightSizeType;
|
|
18
18
|
handleMarginTop?: number;
|
|
19
|
+
snap?: {
|
|
20
|
+
x?: Array<number>;
|
|
21
|
+
y?: Array<number>;
|
|
22
|
+
};
|
|
23
|
+
snapGap?: number;
|
|
19
24
|
handleAlignmentMethod?: HandleAlignmentMethod;
|
|
20
25
|
resizeRatio?: number;
|
|
21
26
|
};
|
package/package.json
CHANGED