@atlaskit/editor-core 221.9.0 → 221.9.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 +7 -0
- package/dist/cjs/ui/ContextPanel/index-compiled.compiled.css +0 -1
- package/dist/cjs/ui/ContextPanel/index-compiled.js +46 -23
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ContextPanel/index-compiled.compiled.css +0 -1
- package/dist/es2019/ui/ContextPanel/index-compiled.js +43 -20
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/ContextPanel/index-compiled.compiled.css +0 -1
- package/dist/esm/ui/ContextPanel/index-compiled.js +45 -23
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +0 -1
- package/dist/types/ui/ContextPanel/index-compiled.d.ts +0 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
});
|
|
9
9
|
exports.ContextPanelWrapperCompiled = exports.ContextPanelContentCompiled = void 0;
|
|
10
10
|
require("./index-compiled.compiled.css");
|
|
11
|
-
var
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
12
13
|
var _runtime = require("@compiled/react/runtime");
|
|
13
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
@@ -23,46 +24,68 @@ var _excluded = ["children", "customWidth", "visible", "disableAnimation"],
|
|
|
23
24
|
*/
|
|
24
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
26
|
var ANIM_SPEED_MS = 500;
|
|
27
|
+
var getContextPanelWidthStyle = function getContextPanelWidthStyle(_ref) {
|
|
28
|
+
var customWidth = _ref.customWidth,
|
|
29
|
+
visible = _ref.visible;
|
|
30
|
+
if (!visible) {
|
|
31
|
+
return {
|
|
32
|
+
width: 0
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (customWidth) {
|
|
36
|
+
return {
|
|
37
|
+
width: "".concat(customWidth, "px")
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return undefined;
|
|
41
|
+
};
|
|
26
42
|
var panelStyles = {
|
|
27
43
|
panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h",
|
|
28
|
-
panelHidden: "_1bsbidpf",
|
|
29
44
|
disablePanelAnimation: "_v564glyw",
|
|
30
45
|
content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug",
|
|
31
46
|
padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi",
|
|
32
47
|
customWidthOverflow: "_1reo15vq"
|
|
33
48
|
};
|
|
34
|
-
var ContextPanelWrapperCompiled = exports.ContextPanelWrapperCompiled = function ContextPanelWrapperCompiled(
|
|
35
|
-
var children =
|
|
36
|
-
customWidth =
|
|
37
|
-
visible =
|
|
38
|
-
disableAnimation =
|
|
39
|
-
rest = (0, _objectWithoutProperties2.default)(
|
|
49
|
+
var ContextPanelWrapperCompiled = exports.ContextPanelWrapperCompiled = function ContextPanelWrapperCompiled(_ref2) {
|
|
50
|
+
var children = _ref2.children,
|
|
51
|
+
customWidth = _ref2.customWidth,
|
|
52
|
+
visible = _ref2.visible,
|
|
53
|
+
disableAnimation = _ref2.disableAnimation,
|
|
54
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
55
|
+
var widthStyle = (0, _react.useMemo)(function () {
|
|
56
|
+
return getContextPanelWidthStyle({
|
|
57
|
+
customWidth: customWidth,
|
|
58
|
+
visible: visible
|
|
59
|
+
});
|
|
60
|
+
}, [customWidth, visible]);
|
|
40
61
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
41
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
|
|
42
|
-
style:
|
|
43
|
-
width: "".concat(customWidth, "px")
|
|
44
|
-
} : undefined
|
|
63
|
+
style: widthStyle
|
|
45
64
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
46
65
|
}, rest, {
|
|
47
|
-
className: (0, _runtime.ax)([panelStyles.panel, customWidth && "",
|
|
66
|
+
className: (0, _runtime.ax)([panelStyles.panel, customWidth && "", disableAnimation && panelStyles.disablePanelAnimation])
|
|
48
67
|
}), children);
|
|
49
68
|
};
|
|
50
69
|
|
|
51
70
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
52
|
-
var ContextPanelContentCompiled = exports.ContextPanelContentCompiled = function ContextPanelContentCompiled(
|
|
53
|
-
var children =
|
|
54
|
-
customWidth =
|
|
55
|
-
visible =
|
|
56
|
-
disableAnimation =
|
|
57
|
-
hasPadding =
|
|
58
|
-
rest = (0, _objectWithoutProperties2.default)(
|
|
71
|
+
var ContextPanelContentCompiled = exports.ContextPanelContentCompiled = function ContextPanelContentCompiled(_ref3) {
|
|
72
|
+
var children = _ref3.children,
|
|
73
|
+
customWidth = _ref3.customWidth,
|
|
74
|
+
visible = _ref3.visible,
|
|
75
|
+
disableAnimation = _ref3.disableAnimation,
|
|
76
|
+
hasPadding = _ref3.hasPadding,
|
|
77
|
+
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
78
|
+
var widthStyle = (0, _react.useMemo)(function () {
|
|
79
|
+
return getContextPanelWidthStyle({
|
|
80
|
+
customWidth: customWidth,
|
|
81
|
+
visible: visible
|
|
82
|
+
});
|
|
83
|
+
}, [customWidth, visible]);
|
|
59
84
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
60
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
|
|
61
|
-
style:
|
|
62
|
-
width: "".concat(customWidth, "px")
|
|
63
|
-
} : undefined
|
|
86
|
+
style: widthStyle
|
|
64
87
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
65
88
|
}, rest, {
|
|
66
|
-
className: (0, _runtime.ax)([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "",
|
|
89
|
+
className: (0, _runtime.ax)([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", disableAnimation && panelStyles.disablePanelAnimation])
|
|
67
90
|
}), children);
|
|
68
91
|
};
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
8
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
9
|
-
var version = exports.version = "221.
|
|
9
|
+
var version = exports.version = "221.9.0";
|
|
@@ -9,12 +9,27 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
9
9
|
*
|
|
10
10
|
* Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
import { useMemo } from 'react';
|
|
13
13
|
import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
const ANIM_SPEED_MS = 500;
|
|
15
|
+
const getContextPanelWidthStyle = ({
|
|
16
|
+
customWidth,
|
|
17
|
+
visible
|
|
18
|
+
}) => {
|
|
19
|
+
if (!visible) {
|
|
20
|
+
return {
|
|
21
|
+
width: 0
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (customWidth) {
|
|
25
|
+
return {
|
|
26
|
+
width: `${customWidth}px`
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
};
|
|
15
31
|
const panelStyles = {
|
|
16
32
|
panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h",
|
|
17
|
-
panelHidden: "_1bsbidpf",
|
|
18
33
|
disablePanelAnimation: "_v564glyw",
|
|
19
34
|
content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug",
|
|
20
35
|
padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi",
|
|
@@ -26,15 +41,19 @@ export const ContextPanelWrapperCompiled = ({
|
|
|
26
41
|
visible,
|
|
27
42
|
disableAnimation,
|
|
28
43
|
...rest
|
|
29
|
-
}) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
}) => {
|
|
45
|
+
const widthStyle = useMemo(() => getContextPanelWidthStyle({
|
|
46
|
+
customWidth,
|
|
47
|
+
visible
|
|
48
|
+
}), [customWidth, visible]);
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
|
|
51
|
+
style: widthStyle
|
|
52
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
53
|
+
}, rest, {
|
|
54
|
+
className: ax([panelStyles.panel, customWidth && "", disableAnimation && panelStyles.disablePanelAnimation])
|
|
55
|
+
}), children);
|
|
56
|
+
};
|
|
38
57
|
|
|
39
58
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
40
59
|
export const ContextPanelContentCompiled = ({
|
|
@@ -44,12 +63,16 @@ export const ContextPanelContentCompiled = ({
|
|
|
44
63
|
disableAnimation,
|
|
45
64
|
hasPadding,
|
|
46
65
|
...rest
|
|
47
|
-
}) =>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
66
|
+
}) => {
|
|
67
|
+
const widthStyle = useMemo(() => getContextPanelWidthStyle({
|
|
68
|
+
customWidth,
|
|
69
|
+
visible
|
|
70
|
+
}), [customWidth, visible]);
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
|
|
73
|
+
style: widthStyle
|
|
74
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
75
|
+
}, rest, {
|
|
76
|
+
className: ax([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", disableAnimation && panelStyles.disablePanelAnimation])
|
|
77
|
+
}), children);
|
|
78
|
+
};
|
|
@@ -12,49 +12,71 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
12
12
|
*
|
|
13
13
|
* Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
import { useMemo } from 'react';
|
|
16
16
|
import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
17
17
|
var ANIM_SPEED_MS = 500;
|
|
18
|
+
var getContextPanelWidthStyle = function getContextPanelWidthStyle(_ref) {
|
|
19
|
+
var customWidth = _ref.customWidth,
|
|
20
|
+
visible = _ref.visible;
|
|
21
|
+
if (!visible) {
|
|
22
|
+
return {
|
|
23
|
+
width: 0
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (customWidth) {
|
|
27
|
+
return {
|
|
28
|
+
width: "".concat(customWidth, "px")
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
};
|
|
18
33
|
var panelStyles = {
|
|
19
34
|
panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h",
|
|
20
|
-
panelHidden: "_1bsbidpf",
|
|
21
35
|
disablePanelAnimation: "_v564glyw",
|
|
22
36
|
content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug",
|
|
23
37
|
padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi",
|
|
24
38
|
customWidthOverflow: "_1reo15vq"
|
|
25
39
|
};
|
|
26
|
-
export var ContextPanelWrapperCompiled = function ContextPanelWrapperCompiled(
|
|
27
|
-
var children =
|
|
28
|
-
customWidth =
|
|
29
|
-
visible =
|
|
30
|
-
disableAnimation =
|
|
31
|
-
rest = _objectWithoutProperties(
|
|
40
|
+
export var ContextPanelWrapperCompiled = function ContextPanelWrapperCompiled(_ref2) {
|
|
41
|
+
var children = _ref2.children,
|
|
42
|
+
customWidth = _ref2.customWidth,
|
|
43
|
+
visible = _ref2.visible,
|
|
44
|
+
disableAnimation = _ref2.disableAnimation,
|
|
45
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
46
|
+
var widthStyle = useMemo(function () {
|
|
47
|
+
return getContextPanelWidthStyle({
|
|
48
|
+
customWidth: customWidth,
|
|
49
|
+
visible: visible
|
|
50
|
+
});
|
|
51
|
+
}, [customWidth, visible]);
|
|
32
52
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
33
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
|
|
34
|
-
style:
|
|
35
|
-
width: "".concat(customWidth, "px")
|
|
36
|
-
} : undefined
|
|
54
|
+
style: widthStyle
|
|
37
55
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
56
|
}, rest, {
|
|
39
|
-
className: ax([panelStyles.panel, customWidth && "",
|
|
57
|
+
className: ax([panelStyles.panel, customWidth && "", disableAnimation && panelStyles.disablePanelAnimation])
|
|
40
58
|
}), children);
|
|
41
59
|
};
|
|
42
60
|
|
|
43
61
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
44
|
-
export var ContextPanelContentCompiled = function ContextPanelContentCompiled(
|
|
45
|
-
var children =
|
|
46
|
-
customWidth =
|
|
47
|
-
visible =
|
|
48
|
-
disableAnimation =
|
|
49
|
-
hasPadding =
|
|
50
|
-
rest = _objectWithoutProperties(
|
|
62
|
+
export var ContextPanelContentCompiled = function ContextPanelContentCompiled(_ref3) {
|
|
63
|
+
var children = _ref3.children,
|
|
64
|
+
customWidth = _ref3.customWidth,
|
|
65
|
+
visible = _ref3.visible,
|
|
66
|
+
disableAnimation = _ref3.disableAnimation,
|
|
67
|
+
hasPadding = _ref3.hasPadding,
|
|
68
|
+
rest = _objectWithoutProperties(_ref3, _excluded2);
|
|
69
|
+
var widthStyle = useMemo(function () {
|
|
70
|
+
return getContextPanelWidthStyle({
|
|
71
|
+
customWidth: customWidth,
|
|
72
|
+
visible: visible
|
|
73
|
+
});
|
|
74
|
+
}, [customWidth, visible]);
|
|
51
75
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
52
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
|
|
53
|
-
style:
|
|
54
|
-
width: "".concat(customWidth, "px")
|
|
55
|
-
} : undefined
|
|
77
|
+
style: widthStyle
|
|
56
78
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
57
79
|
}, rest, {
|
|
58
|
-
className: ax([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "",
|
|
80
|
+
className: ax([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", disableAnimation && panelStyles.disablePanelAnimation])
|
|
59
81
|
}), children);
|
|
60
82
|
};
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
* Compiled migration: platform_editor_core_non_ecc_static_css
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
8
|
-
* Used via `componentWithCondition` in `index.tsx`.
|
|
9
|
-
*
|
|
10
|
-
* Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
|
|
11
|
-
*/
|
|
12
1
|
import type { HTMLAttributes } from 'react';
|
|
13
2
|
export interface ContextPanelWrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
3
|
customWidth?: number;
|