@atlaskit/editor-common 74.17.1 → 74.18.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/constants.js +8 -0
- package/dist/cjs/guideline/dynamicGuideline.js +73 -0
- package/dist/cjs/guideline/index.js +12 -0
- package/dist/cjs/guideline/types.js +12 -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/constants.js +1 -0
- package/dist/es2019/guideline/dynamicGuideline.js +68 -0
- package/dist/es2019/guideline/index.js +1 -0
- package/dist/es2019/guideline/types.js +5 -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/constants.js +1 -0
- package/dist/esm/guideline/dynamicGuideline.js +65 -0
- package/dist/esm/guideline/index.js +1 -0
- package/dist/esm/guideline/types.js +5 -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/constants.d.ts +1 -0
- package/dist/types/guideline/dynamicGuideline.d.ts +16 -0
- package/dist/types/guideline/index.d.ts +1 -0
- package/dist/types/guideline/types.d.ts +4 -0
- package/dist/types-ts4.5/guideline/constants.d.ts +1 -0
- package/dist/types-ts4.5/guideline/dynamicGuideline.d.ts +16 -0
- package/dist/types-ts4.5/guideline/index.d.ts +1 -0
- package/dist/types-ts4.5/guideline/types.d.ts +4 -0
- package/guideline/package.json +15 -0
- package/package.json +5 -4
- package/tmp/api-report-tmp.d.ts +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 74.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`11285b1d77e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/11285b1d77e) - ED-18971 Added editor dynamic guideline util and new guideline entry point in editor-common
|
|
8
|
+
|
|
3
9
|
## 74.17.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.generateDynamicGuidelines = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _prosemirrorState = require("prosemirror-state");
|
|
10
|
+
var _prosemirrorUtils = require("prosemirror-utils");
|
|
11
|
+
var _constants = require("./constants");
|
|
12
|
+
var _types = require("./types");
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
var generateDynamicGuidelines = function generateDynamicGuidelines(state, editorWidth) {
|
|
16
|
+
var selectedNode = state.selection instanceof _prosemirrorState.NodeSelection && state.selection.node;
|
|
17
|
+
var mediaSingleNode = (0, _prosemirrorUtils.findChildren)(state.tr.doc, function (node) {
|
|
18
|
+
return node.type === state.schema.nodes.mediaSingle;
|
|
19
|
+
}, false // only top level
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
var offset = editorWidth / 2;
|
|
23
|
+
return mediaSingleNode.map(function (_ref, index) {
|
|
24
|
+
var node = _ref.node;
|
|
25
|
+
if (selectedNode === node) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
var _node$attrs = node.attrs,
|
|
29
|
+
layout = _node$attrs.layout,
|
|
30
|
+
width = _node$attrs.width,
|
|
31
|
+
widthType = _node$attrs.widthType;
|
|
32
|
+
var pixelWidth = !widthType || widthType === _types.WidthTypes.PERCENTAGE ? width / 100 * editorWidth : width;
|
|
33
|
+
var commonStyles = {
|
|
34
|
+
style: 'dashed',
|
|
35
|
+
show: true
|
|
36
|
+
};
|
|
37
|
+
var key = "".concat(_constants.MEDIA_DYNAMIC_GUIDELINE_PREFIX).concat(index);
|
|
38
|
+
switch (layout) {
|
|
39
|
+
case 'align-start':
|
|
40
|
+
case 'wrap-left':
|
|
41
|
+
return _objectSpread({
|
|
42
|
+
position: {
|
|
43
|
+
x: pixelWidth - offset
|
|
44
|
+
},
|
|
45
|
+
key: key
|
|
46
|
+
}, commonStyles);
|
|
47
|
+
case 'align-end':
|
|
48
|
+
case 'wrap-right':
|
|
49
|
+
return _objectSpread({
|
|
50
|
+
position: {
|
|
51
|
+
x: editorWidth - pixelWidth - offset
|
|
52
|
+
},
|
|
53
|
+
key: key
|
|
54
|
+
}, commonStyles);
|
|
55
|
+
case 'center':
|
|
56
|
+
return [_objectSpread({
|
|
57
|
+
position: {
|
|
58
|
+
x: pixelWidth / 2
|
|
59
|
+
},
|
|
60
|
+
key: "".concat(key, "_right")
|
|
61
|
+
}, commonStyles), _objectSpread({
|
|
62
|
+
position: {
|
|
63
|
+
x: -pixelWidth / 2
|
|
64
|
+
},
|
|
65
|
+
key: "".concat(key, "_left")
|
|
66
|
+
}, commonStyles)];
|
|
67
|
+
// we ignore full-width and wide
|
|
68
|
+
default:
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
}).flat();
|
|
72
|
+
};
|
|
73
|
+
exports.generateDynamicGuidelines = generateDynamicGuidelines;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "generateDynamicGuidelines", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _dynamicGuideline.generateDynamicGuidelines;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _dynamicGuideline = require("./dynamicGuideline");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WidthTypes = void 0;
|
|
7
|
+
var WidthTypes = /*#__PURE__*/function (WidthTypes) {
|
|
8
|
+
WidthTypes["PERCENTAGE"] = "percentage";
|
|
9
|
+
WidthTypes["PIXEL"] = "pixel";
|
|
10
|
+
return WidthTypes;
|
|
11
|
+
}({});
|
|
12
|
+
exports.WidthTypes = WidthTypes;
|
|
@@ -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.18.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.18.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 @@
|
|
|
1
|
+
export const MEDIA_DYNAMIC_GUIDELINE_PREFIX = 'media_';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { NodeSelection } from 'prosemirror-state';
|
|
2
|
+
import { findChildren } from 'prosemirror-utils';
|
|
3
|
+
import { MEDIA_DYNAMIC_GUIDELINE_PREFIX } from './constants';
|
|
4
|
+
import { WidthTypes } from './types';
|
|
5
|
+
export const generateDynamicGuidelines = (state, editorWidth) => {
|
|
6
|
+
const selectedNode = state.selection instanceof NodeSelection && state.selection.node;
|
|
7
|
+
const mediaSingleNode = findChildren(state.tr.doc, node => {
|
|
8
|
+
return node.type === state.schema.nodes.mediaSingle;
|
|
9
|
+
}, false // only top level
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
const offset = editorWidth / 2;
|
|
13
|
+
return mediaSingleNode.map(({
|
|
14
|
+
node
|
|
15
|
+
}, index) => {
|
|
16
|
+
if (selectedNode === node) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
const {
|
|
20
|
+
layout,
|
|
21
|
+
width,
|
|
22
|
+
widthType
|
|
23
|
+
} = node.attrs;
|
|
24
|
+
const pixelWidth = !widthType || widthType === WidthTypes.PERCENTAGE ? width / 100 * editorWidth : width;
|
|
25
|
+
const commonStyles = {
|
|
26
|
+
style: 'dashed',
|
|
27
|
+
show: true
|
|
28
|
+
};
|
|
29
|
+
const key = `${MEDIA_DYNAMIC_GUIDELINE_PREFIX}${index}`;
|
|
30
|
+
switch (layout) {
|
|
31
|
+
case 'align-start':
|
|
32
|
+
case 'wrap-left':
|
|
33
|
+
return {
|
|
34
|
+
position: {
|
|
35
|
+
x: pixelWidth - offset
|
|
36
|
+
},
|
|
37
|
+
key,
|
|
38
|
+
...commonStyles
|
|
39
|
+
};
|
|
40
|
+
case 'align-end':
|
|
41
|
+
case 'wrap-right':
|
|
42
|
+
return {
|
|
43
|
+
position: {
|
|
44
|
+
x: editorWidth - pixelWidth - offset
|
|
45
|
+
},
|
|
46
|
+
key,
|
|
47
|
+
...commonStyles
|
|
48
|
+
};
|
|
49
|
+
case 'center':
|
|
50
|
+
return [{
|
|
51
|
+
position: {
|
|
52
|
+
x: pixelWidth / 2
|
|
53
|
+
},
|
|
54
|
+
key: `${key}_right`,
|
|
55
|
+
...commonStyles
|
|
56
|
+
}, {
|
|
57
|
+
position: {
|
|
58
|
+
x: -pixelWidth / 2
|
|
59
|
+
},
|
|
60
|
+
key: `${key}_left`,
|
|
61
|
+
...commonStyles
|
|
62
|
+
}];
|
|
63
|
+
// we ignore full-width and wide
|
|
64
|
+
default:
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
}).flat();
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
@@ -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.18.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.18.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 @@
|
|
|
1
|
+
export var MEDIA_DYNAMIC_GUIDELINE_PREFIX = 'media_';
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
import { NodeSelection } from 'prosemirror-state';
|
|
5
|
+
import { findChildren } from 'prosemirror-utils';
|
|
6
|
+
import { MEDIA_DYNAMIC_GUIDELINE_PREFIX } from './constants';
|
|
7
|
+
import { WidthTypes } from './types';
|
|
8
|
+
export var generateDynamicGuidelines = function generateDynamicGuidelines(state, editorWidth) {
|
|
9
|
+
var selectedNode = state.selection instanceof NodeSelection && state.selection.node;
|
|
10
|
+
var mediaSingleNode = findChildren(state.tr.doc, function (node) {
|
|
11
|
+
return node.type === state.schema.nodes.mediaSingle;
|
|
12
|
+
}, false // only top level
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
var offset = editorWidth / 2;
|
|
16
|
+
return mediaSingleNode.map(function (_ref, index) {
|
|
17
|
+
var node = _ref.node;
|
|
18
|
+
if (selectedNode === node) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
var _node$attrs = node.attrs,
|
|
22
|
+
layout = _node$attrs.layout,
|
|
23
|
+
width = _node$attrs.width,
|
|
24
|
+
widthType = _node$attrs.widthType;
|
|
25
|
+
var pixelWidth = !widthType || widthType === WidthTypes.PERCENTAGE ? width / 100 * editorWidth : width;
|
|
26
|
+
var commonStyles = {
|
|
27
|
+
style: 'dashed',
|
|
28
|
+
show: true
|
|
29
|
+
};
|
|
30
|
+
var key = "".concat(MEDIA_DYNAMIC_GUIDELINE_PREFIX).concat(index);
|
|
31
|
+
switch (layout) {
|
|
32
|
+
case 'align-start':
|
|
33
|
+
case 'wrap-left':
|
|
34
|
+
return _objectSpread({
|
|
35
|
+
position: {
|
|
36
|
+
x: pixelWidth - offset
|
|
37
|
+
},
|
|
38
|
+
key: key
|
|
39
|
+
}, commonStyles);
|
|
40
|
+
case 'align-end':
|
|
41
|
+
case 'wrap-right':
|
|
42
|
+
return _objectSpread({
|
|
43
|
+
position: {
|
|
44
|
+
x: editorWidth - pixelWidth - offset
|
|
45
|
+
},
|
|
46
|
+
key: key
|
|
47
|
+
}, commonStyles);
|
|
48
|
+
case 'center':
|
|
49
|
+
return [_objectSpread({
|
|
50
|
+
position: {
|
|
51
|
+
x: pixelWidth / 2
|
|
52
|
+
},
|
|
53
|
+
key: "".concat(key, "_right")
|
|
54
|
+
}, commonStyles), _objectSpread({
|
|
55
|
+
position: {
|
|
56
|
+
x: -pixelWidth / 2
|
|
57
|
+
},
|
|
58
|
+
key: "".concat(key, "_left")
|
|
59
|
+
}, commonStyles)];
|
|
60
|
+
// we ignore full-width and wide
|
|
61
|
+
default:
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}).flat();
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
@@ -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.18.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.18.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 @@
|
|
|
1
|
+
export declare const MEDIA_DYNAMIC_GUIDELINE_PREFIX = "media_";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
export declare const generateDynamicGuidelines: (state: EditorState, editorWidth: number) => ({
|
|
3
|
+
style: string;
|
|
4
|
+
show: boolean;
|
|
5
|
+
position: {
|
|
6
|
+
x: number;
|
|
7
|
+
};
|
|
8
|
+
key: string;
|
|
9
|
+
} | {
|
|
10
|
+
style: string;
|
|
11
|
+
show: boolean;
|
|
12
|
+
position: {
|
|
13
|
+
x: number;
|
|
14
|
+
};
|
|
15
|
+
key: string;
|
|
16
|
+
})[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MEDIA_DYNAMIC_GUIDELINE_PREFIX = "media_";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
export declare const generateDynamicGuidelines: (state: EditorState, editorWidth: number) => ({
|
|
3
|
+
style: string;
|
|
4
|
+
show: boolean;
|
|
5
|
+
position: {
|
|
6
|
+
x: number;
|
|
7
|
+
};
|
|
8
|
+
key: string;
|
|
9
|
+
} | {
|
|
10
|
+
style: string;
|
|
11
|
+
show: boolean;
|
|
12
|
+
position: {
|
|
13
|
+
x: number;
|
|
14
|
+
};
|
|
15
|
+
key: string;
|
|
16
|
+
})[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateDynamicGuidelines } from './dynamicGuideline';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/guideline",
|
|
3
|
+
"main": "../dist/cjs/guideline/index.js",
|
|
4
|
+
"module": "../dist/esm/guideline/index.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/guideline/index.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/guideline/index.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.5/guideline/index.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "74.
|
|
3
|
+
"version": "74.18.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
"./paste": "./src/paste/index.ts",
|
|
70
70
|
"./resizer": "./src/resizer/index.ts",
|
|
71
71
|
"./editor-analytics": "./src/editor-analytics/index.ts",
|
|
72
|
-
"./selection-based-node-view": "./src/selection-based-node-view/index.ts"
|
|
72
|
+
"./selection-based-node-view": "./src/selection-based-node-view/index.ts",
|
|
73
|
+
"./guideline": "./src/guideline/index.ts"
|
|
73
74
|
},
|
|
74
75
|
"dependencies": {
|
|
75
76
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
"@atlaskit/button": "^16.8.0",
|
|
83
84
|
"@atlaskit/code": "^14.6.0",
|
|
84
85
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
85
|
-
"@atlaskit/collab-provider": "^9.
|
|
86
|
+
"@atlaskit/collab-provider": "^9.6.0",
|
|
86
87
|
"@atlaskit/editor-palette": "1.5.1",
|
|
87
88
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
88
89
|
"@atlaskit/emoji": "^67.4.0",
|
|
@@ -134,7 +135,7 @@
|
|
|
134
135
|
},
|
|
135
136
|
"devDependencies": {
|
|
136
137
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
137
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
138
|
+
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
138
139
|
"@atlaskit/media-core": "^34.1.0",
|
|
139
140
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
140
141
|
"@atlaskit/smart-card": "^26.9.0",
|
package/tmp/api-report-tmp.d.ts
DELETED