@atlaskit/editor-common 74.26.0 → 74.26.1
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/index.js +8 -1
- package/dist/cjs/guideline/types.js +12 -0
- package/dist/cjs/guideline/utils.js +14 -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/index.js +2 -1
- package/dist/es2019/guideline/types.js +14 -1
- package/dist/es2019/guideline/utils.js +4 -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/index.js +2 -1
- package/dist/esm/guideline/types.js +14 -1
- package/dist/esm/guideline/utils.js +6 -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/index.d.ts +2 -0
- package/dist/types/guideline/types.d.ts +33 -0
- package/dist/types/guideline/utils.d.ts +3 -0
- package/dist/types-ts4.5/guideline/index.d.ts +2 -0
- package/dist/types-ts4.5/guideline/types.d.ts +33 -0
- package/dist/types-ts4.5/guideline/utils.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -27,6 +27,13 @@ Object.defineProperty(exports, "getGuidelinesWithHighlights", {
|
|
|
27
27
|
return _updateGuideline.getGuidelinesWithHighlights;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "isVerticalPosition", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _utils.isVerticalPosition;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
var _dynamicGuideline = require("./dynamicGuideline");
|
|
31
37
|
var _fixedGuideline = require("./fixedGuideline");
|
|
32
|
-
var _updateGuideline = require("./updateGuideline");
|
|
38
|
+
var _updateGuideline = require("./updateGuideline");
|
|
39
|
+
var _utils = require("./utils");
|
|
@@ -9,4 +9,16 @@ var WidthTypes = /*#__PURE__*/function (WidthTypes) {
|
|
|
9
9
|
WidthTypes["PIXEL"] = "pixel";
|
|
10
10
|
return WidthTypes;
|
|
11
11
|
}({});
|
|
12
|
+
/*
|
|
13
|
+
* When x is 0, a vertical line is displayed at the center of the editor
|
|
14
|
+
* a negative value will move the line to the left,
|
|
15
|
+
* a positive value will move the line to the right,
|
|
16
|
+
* The range is from -width/2 to width/2, outside will be ignored.
|
|
17
|
+
* Define as an object allows us add more options in the future.
|
|
18
|
+
*
|
|
19
|
+
* ────────────┬─────────── y=0
|
|
20
|
+
* │
|
|
21
|
+
* │
|
|
22
|
+
* x=0
|
|
23
|
+
*/
|
|
12
24
|
exports.WidthTypes = WidthTypes;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isVerticalPosition = exports.isNumber = void 0;
|
|
7
|
+
var isNumber = function isNumber(x) {
|
|
8
|
+
return typeof x === 'number' && !isNaN(x) && isFinite(x);
|
|
9
|
+
};
|
|
10
|
+
exports.isNumber = isNumber;
|
|
11
|
+
var isVerticalPosition = function isVerticalPosition(pos) {
|
|
12
|
+
return isNumber(pos.x);
|
|
13
|
+
};
|
|
14
|
+
exports.isVerticalPosition = isVerticalPosition;
|
|
@@ -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.26.
|
|
19
|
+
var packageVersion = "74.26.1";
|
|
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.26.
|
|
27
|
+
var packageVersion = "74.26.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
2
2
|
export { createFixedGuidelinesFromLengths, createGuidesFromLengths } from './fixedGuideline';
|
|
3
|
-
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
3
|
+
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
4
|
+
export { isVerticalPosition } from './utils';
|
|
@@ -2,4 +2,17 @@ export let WidthTypes = /*#__PURE__*/function (WidthTypes) {
|
|
|
2
2
|
WidthTypes["PERCENTAGE"] = "percentage";
|
|
3
3
|
WidthTypes["PIXEL"] = "pixel";
|
|
4
4
|
return WidthTypes;
|
|
5
|
-
}({});
|
|
5
|
+
}({});
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* When x is 0, a vertical line is displayed at the center of the editor
|
|
9
|
+
* a negative value will move the line to the left,
|
|
10
|
+
* a positive value will move the line to the right,
|
|
11
|
+
* The range is from -width/2 to width/2, outside will be ignored.
|
|
12
|
+
* Define as an object allows us add more options in the future.
|
|
13
|
+
*
|
|
14
|
+
* ────────────┬─────────── y=0
|
|
15
|
+
* │
|
|
16
|
+
* │
|
|
17
|
+
* x=0
|
|
18
|
+
*/
|
|
@@ -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.26.
|
|
3
|
+
const packageVersion = "74.26.1";
|
|
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.26.
|
|
11
|
+
const packageVersion = "74.26.1";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = '0, 8';
|
|
14
14
|
class DropList extends Component {
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
2
2
|
export { createFixedGuidelinesFromLengths, createGuidesFromLengths } from './fixedGuideline';
|
|
3
|
-
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
3
|
+
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
4
|
+
export { isVerticalPosition } from './utils';
|
|
@@ -2,4 +2,17 @@ export var WidthTypes = /*#__PURE__*/function (WidthTypes) {
|
|
|
2
2
|
WidthTypes["PERCENTAGE"] = "percentage";
|
|
3
3
|
WidthTypes["PIXEL"] = "pixel";
|
|
4
4
|
return WidthTypes;
|
|
5
|
-
}({});
|
|
5
|
+
}({});
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* When x is 0, a vertical line is displayed at the center of the editor
|
|
9
|
+
* a negative value will move the line to the left,
|
|
10
|
+
* a positive value will move the line to the right,
|
|
11
|
+
* The range is from -width/2 to width/2, outside will be ignored.
|
|
12
|
+
* Define as an object allows us add more options in the future.
|
|
13
|
+
*
|
|
14
|
+
* ────────────┬─────────── y=0
|
|
15
|
+
* │
|
|
16
|
+
* │
|
|
17
|
+
* x=0
|
|
18
|
+
*/
|
|
@@ -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.26.
|
|
9
|
+
var packageVersion = "74.26.1";
|
|
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.26.
|
|
21
|
+
var packageVersion = "74.26.1";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
2
2
|
export { createFixedGuidelinesFromLengths, createGuidesFromLengths, } from './fixedGuideline';
|
|
3
3
|
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
4
|
+
export type { WidthTypes, Position, GuidelineConfig, GuidelinePluginState, GuidelinePluginOptions, DisplayGuideline, DisplayGrid, VerticalPosition, HorizontalPosition, } from './types';
|
|
5
|
+
export { isVerticalPosition } from './utils';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { CSSToken } from '@atlaskit/tokens';
|
|
1
3
|
export declare enum WidthTypes {
|
|
2
4
|
PERCENTAGE = "percentage",
|
|
3
5
|
PIXEL = "pixel"
|
|
@@ -7,3 +9,34 @@ export type LengthGuide = {
|
|
|
7
9
|
right: number;
|
|
8
10
|
length: number;
|
|
9
11
|
};
|
|
12
|
+
export type Range = {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
};
|
|
16
|
+
export type VerticalPosition = {
|
|
17
|
+
x: number;
|
|
18
|
+
y?: Range;
|
|
19
|
+
};
|
|
20
|
+
export type HorizontalPosition = {
|
|
21
|
+
x?: Range;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
export type Position = VerticalPosition | HorizontalPosition;
|
|
25
|
+
export type GuidelineConfig = {
|
|
26
|
+
key: string;
|
|
27
|
+
position: Position;
|
|
28
|
+
active?: boolean;
|
|
29
|
+
show?: boolean;
|
|
30
|
+
style?: 'dashed' | 'solid';
|
|
31
|
+
color?: CSSToken;
|
|
32
|
+
styles?: {
|
|
33
|
+
capStyle?: 'line';
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type GuidelinePluginState = {
|
|
37
|
+
guidelines: GuidelineConfig[];
|
|
38
|
+
};
|
|
39
|
+
export interface GuidelinePluginOptions {
|
|
40
|
+
}
|
|
41
|
+
export type DisplayGrid = (props: Required<GuidelinePluginState>) => boolean;
|
|
42
|
+
export type DisplayGuideline = (view: EditorView) => DisplayGrid;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
2
2
|
export { createFixedGuidelinesFromLengths, createGuidesFromLengths, } from './fixedGuideline';
|
|
3
3
|
export { getGuidelinesWithHighlights } from './updateGuideline';
|
|
4
|
+
export type { WidthTypes, Position, GuidelineConfig, GuidelinePluginState, GuidelinePluginOptions, DisplayGuideline, DisplayGrid, VerticalPosition, HorizontalPosition, } from './types';
|
|
5
|
+
export { isVerticalPosition } from './utils';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { CSSToken } from '@atlaskit/tokens';
|
|
1
3
|
export declare enum WidthTypes {
|
|
2
4
|
PERCENTAGE = "percentage",
|
|
3
5
|
PIXEL = "pixel"
|
|
@@ -7,3 +9,34 @@ export type LengthGuide = {
|
|
|
7
9
|
right: number;
|
|
8
10
|
length: number;
|
|
9
11
|
};
|
|
12
|
+
export type Range = {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
};
|
|
16
|
+
export type VerticalPosition = {
|
|
17
|
+
x: number;
|
|
18
|
+
y?: Range;
|
|
19
|
+
};
|
|
20
|
+
export type HorizontalPosition = {
|
|
21
|
+
x?: Range;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
export type Position = VerticalPosition | HorizontalPosition;
|
|
25
|
+
export type GuidelineConfig = {
|
|
26
|
+
key: string;
|
|
27
|
+
position: Position;
|
|
28
|
+
active?: boolean;
|
|
29
|
+
show?: boolean;
|
|
30
|
+
style?: 'dashed' | 'solid';
|
|
31
|
+
color?: CSSToken;
|
|
32
|
+
styles?: {
|
|
33
|
+
capStyle?: 'line';
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type GuidelinePluginState = {
|
|
37
|
+
guidelines: GuidelineConfig[];
|
|
38
|
+
};
|
|
39
|
+
export interface GuidelinePluginOptions {
|
|
40
|
+
}
|
|
41
|
+
export type DisplayGrid = (props: Required<GuidelinePluginState>) => boolean;
|
|
42
|
+
export type DisplayGuideline = (view: EditorView) => DisplayGrid;
|
package/package.json
CHANGED