@atlaskit/editor-common 78.31.0 → 78.31.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 +13 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +4 -1
- package/dist/cjs/extensibility/Extension/Extension/styles.js +3 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +2 -1
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +39 -13
- package/dist/cjs/extensibility/Extension/Lozenge/LozengeComponent.js +6 -2
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +6 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +3 -1
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/WidthProvider/index.js +2 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +4 -1
- package/dist/es2019/extensibility/Extension/Extension/styles.js +3 -0
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +2 -1
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +34 -9
- package/dist/es2019/extensibility/Extension/Lozenge/LozengeComponent.js +6 -2
- package/dist/es2019/extensibility/Extension/Lozenge/index.js +6 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +3 -1
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +2 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/WidthProvider/index.js +2 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +4 -1
- package/dist/esm/extensibility/Extension/Extension/styles.js +3 -0
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +2 -1
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +34 -9
- package/dist/esm/extensibility/Extension/Lozenge/LozengeComponent.js +6 -2
- package/dist/esm/extensibility/Extension/Lozenge/index.js +6 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +3 -1
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +2 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/WidthProvider/index.js +2 -1
- package/dist/types/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +3 -2
- package/dist/types/extensibility/Extension/Lozenge/LozengeComponent.d.ts +3 -1
- package/dist/types/extensibility/Extension/Lozenge/index.d.ts +2 -0
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +3 -2
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/LozengeComponent.d.ts +3 -1
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/index.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.31.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#93268](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93268) [`1b6c2eb2c1be`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1b6c2eb2c1be) - [ux] Always show borders and labels for bodied extensions in new macro UX designs
|
|
8
|
+
- [#93629](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93629) [`63b7e6ebb83e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/63b7e6ebb83e) - Null check in width provider to protect against bug that causes crash due to body not being initialised.
|
|
9
|
+
|
|
10
|
+
## 78.31.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#92744](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92744) [`3f06e77a6006`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f06e77a6006) - [ux] Makes macro label lozenge clickable for new macro interaction design updates
|
|
15
|
+
|
|
3
16
|
## 78.31.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -63,6 +63,7 @@ function ExtensionWithPluginState(props) {
|
|
|
63
63
|
var classNames = (0, _classnames2.default)('extension-container', 'block', shadowClassNames, (0, _defineProperty2.default)({
|
|
64
64
|
'with-overlay': !hasBody && !showMacroInteractionDesignUpdates,
|
|
65
65
|
'with-border': showMacroInteractionDesignUpdates,
|
|
66
|
+
'with-bodied-border': showMacroInteractionDesignUpdates && hasBody,
|
|
66
67
|
'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested,
|
|
67
68
|
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered,
|
|
68
69
|
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
@@ -109,7 +110,9 @@ function ExtensionWithPluginState(props) {
|
|
|
109
110
|
isNodeNested: isNodeNested,
|
|
110
111
|
node: node,
|
|
111
112
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
112
|
-
customContainerStyles: customContainerStyles
|
|
113
|
+
customContainerStyles: customContainerStyles,
|
|
114
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
115
|
+
isBodiedMacro: hasBody
|
|
113
116
|
}), (0, _react2.jsx)("div", {
|
|
114
117
|
ref: handleRef,
|
|
115
118
|
"data-layout": node.attrs.layout,
|
|
@@ -20,6 +20,9 @@ var wrapperStyle = exports.wrapperStyle = (0, _react.css)(_styles.wrapperDefault
|
|
|
20
20
|
'&.with-border': {
|
|
21
21
|
border: "1px solid transparent" // adding this so macro doesn't jump when hover border is shown
|
|
22
22
|
},
|
|
23
|
+
'&.with-bodied-border': {
|
|
24
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
|
|
25
|
+
},
|
|
23
26
|
'&.with-hover-border': {
|
|
24
27
|
border: "1px solid ".concat("var(--ds-border-input, ".concat(_colors.N500, ")"))
|
|
25
28
|
},
|
|
@@ -49,7 +49,8 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
49
49
|
node: node,
|
|
50
50
|
isNodeSelected: isNodeSelected,
|
|
51
51
|
isNodeHovered: isNodeHovered,
|
|
52
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
52
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
53
|
+
setIsNodeHovered: setIsNodeHovered
|
|
53
54
|
}), (0, _react2.jsx)("div", {
|
|
54
55
|
"data-testid": "inline-extension-wrapper",
|
|
55
56
|
css: [_styles2.wrapperStyle, extendedInlineExtension && _styles2.inlineWrapperStyles],
|
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ExtensionLabel = void 0;
|
|
8
|
-
var _react = require("
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _react2 = require("@emotion/react");
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
12
|
/** @jsx jsx */
|
|
12
13
|
|
|
13
|
-
var labelStyles = (0,
|
|
14
|
+
var labelStyles = (0, _react2.css)({
|
|
14
15
|
opacity: 0,
|
|
15
16
|
display: 'inline-flex',
|
|
16
17
|
width: 'max-content',
|
|
@@ -19,12 +20,13 @@ var labelStyles = (0, _react.css)({
|
|
|
19
20
|
// Unfortunately, these need to be these exact numbers - otherwise there will be a gap/noticeable overlap
|
|
20
21
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
21
22
|
top: '-18px',
|
|
22
|
-
'&.inline
|
|
23
|
+
'&.inline': {
|
|
23
24
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
24
25
|
top: '-17px',
|
|
25
26
|
marginLeft: "var(--ds-space-150, 12px)"
|
|
26
27
|
},
|
|
27
|
-
'&.
|
|
28
|
+
'&.show-label': {
|
|
29
|
+
cursor: 'pointer',
|
|
28
30
|
background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(_colors.N300, ")"),
|
|
29
31
|
color: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
|
|
30
32
|
opacity: 1
|
|
@@ -35,9 +37,16 @@ var labelStyles = (0, _react.css)({
|
|
|
35
37
|
// Need to add indent if the node is nested since we removed previous indentation styles to make it fit properly
|
|
36
38
|
// in the nested component
|
|
37
39
|
marginLeft: "var(--ds-space-150, 12px)"
|
|
40
|
+
},
|
|
41
|
+
'&.bodied-background': {
|
|
42
|
+
background: "var(--ds-surface, ".concat(_colors.N0, ")")
|
|
43
|
+
},
|
|
44
|
+
'&.bodied-border': {
|
|
45
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")")),
|
|
46
|
+
borderBottom: 'none'
|
|
38
47
|
}
|
|
39
48
|
});
|
|
40
|
-
var textStyles = (0,
|
|
49
|
+
var textStyles = (0, _react2.css)({
|
|
41
50
|
fontSize: '14px',
|
|
42
51
|
fontWeight: 'normal',
|
|
43
52
|
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
@@ -47,19 +56,36 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
47
56
|
extensionName = _ref.extensionName,
|
|
48
57
|
isNodeHovered = _ref.isNodeHovered,
|
|
49
58
|
customContainerStyles = _ref.customContainerStyles,
|
|
50
|
-
isNodeNested = _ref.isNodeNested
|
|
59
|
+
isNodeNested = _ref.isNodeNested,
|
|
60
|
+
setIsNodeHovered = _ref.setIsNodeHovered,
|
|
61
|
+
isBodiedMacro = _ref.isBodiedMacro;
|
|
51
62
|
var classNames = (0, _classnames.default)('extension-title', 'extension-label', {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
63
|
+
nested: isNodeNested,
|
|
64
|
+
inline: extensionName === 'inlineExtension',
|
|
65
|
+
bodied: isBodiedMacro,
|
|
66
|
+
'bodied-border': isBodiedMacro,
|
|
67
|
+
'bodied-background': isBodiedMacro && !isNodeHovered,
|
|
68
|
+
'show-label': isNodeHovered || isBodiedMacro
|
|
55
69
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
var handleMouseEnter = (0, _react.useCallback)(function () {
|
|
71
|
+
// If current node is hovered and the label is hovered,
|
|
72
|
+
// consider the node as hovered so we can display the label for users to click on
|
|
73
|
+
if (isNodeHovered) {
|
|
74
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
75
|
+
}
|
|
76
|
+
}, [isNodeHovered, setIsNodeHovered]);
|
|
77
|
+
var handleMouseLeave = (0, _react.useCallback)(function () {
|
|
78
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
79
|
+
}, [setIsNodeHovered]);
|
|
80
|
+
return (0, _react2.jsx)("div", {
|
|
81
|
+
style: customContainerStyles,
|
|
82
|
+
onMouseEnter: handleMouseEnter,
|
|
83
|
+
onMouseLeave: handleMouseLeave
|
|
84
|
+
}, (0, _react2.jsx)("span", {
|
|
59
85
|
"data-testid": "new-lozenge",
|
|
60
86
|
css: labelStyles,
|
|
61
87
|
className: classNames
|
|
62
|
-
}, (0,
|
|
88
|
+
}, (0, _react2.jsx)("span", {
|
|
63
89
|
css: textStyles
|
|
64
90
|
}, text)));
|
|
65
91
|
};
|
|
@@ -25,7 +25,9 @@ var LozengeComponent = exports.LozengeComponent = function LozengeComponent(_ref
|
|
|
25
25
|
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
26
26
|
customContainerStyles = _ref.customContainerStyles,
|
|
27
27
|
isNodeHovered = _ref.isNodeHovered,
|
|
28
|
-
isNodeNested = _ref.isNodeNested
|
|
28
|
+
isNodeNested = _ref.isNodeNested,
|
|
29
|
+
setIsNodeHovered = _ref.setIsNodeHovered,
|
|
30
|
+
isBodiedMacro = _ref.isBodiedMacro;
|
|
29
31
|
var capitalizedTitle = capitalizeFirstLetter(title);
|
|
30
32
|
if (showMacroInteractionDesignUpdates) {
|
|
31
33
|
return (0, _react.jsx)(_ExtensionLabel.ExtensionLabel, {
|
|
@@ -33,7 +35,9 @@ var LozengeComponent = exports.LozengeComponent = function LozengeComponent(_ref
|
|
|
33
35
|
extensionName: extensionName,
|
|
34
36
|
isNodeHovered: isNodeHovered,
|
|
35
37
|
isNodeNested: isNodeNested,
|
|
36
|
-
customContainerStyles: customContainerStyles
|
|
38
|
+
customContainerStyles: customContainerStyles,
|
|
39
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
40
|
+
isBodiedMacro: isBodiedMacro
|
|
37
41
|
});
|
|
38
42
|
}
|
|
39
43
|
var isBlockExtension = extensionName === 'extension';
|
|
@@ -49,7 +49,9 @@ var ExtensionLozenge = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
49
49
|
isNodeSelected = _this$props.isNodeSelected,
|
|
50
50
|
isNodeHovered = _this$props.isNodeHovered,
|
|
51
51
|
isNodeNested = _this$props.isNodeNested,
|
|
52
|
-
customContainerStyles = _this$props.customContainerStyles
|
|
52
|
+
customContainerStyles = _this$props.customContainerStyles,
|
|
53
|
+
setIsNodeHovered = _this$props.setIsNodeHovered,
|
|
54
|
+
isBodiedMacro = _this$props.isBodiedMacro;
|
|
53
55
|
var _this$props$node$attr = _this.props.node.attrs,
|
|
54
56
|
parameters = _this$props$node$attr.parameters,
|
|
55
57
|
extensionKey = _this$props$node$attr.extensionKey;
|
|
@@ -66,7 +68,9 @@ var ExtensionLozenge = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
66
68
|
params: params,
|
|
67
69
|
title: title,
|
|
68
70
|
renderImage: _this.renderImage,
|
|
69
|
-
customContainerStyles: customContainerStyles
|
|
71
|
+
customContainerStyles: customContainerStyles,
|
|
72
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
73
|
+
isBodiedMacro: isBodiedMacro
|
|
70
74
|
});
|
|
71
75
|
});
|
|
72
76
|
return _this;
|
|
@@ -149,7 +149,9 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
149
149
|
showMacroInteractionDesignUpdates: true,
|
|
150
150
|
customContainerStyles: mbeWrapperStyles,
|
|
151
151
|
isNodeHovered: isNodeHovered,
|
|
152
|
-
isNodeNested: isNodeNested
|
|
152
|
+
isNodeNested: isNodeNested,
|
|
153
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
154
|
+
isBodiedMacro: true
|
|
153
155
|
}), (0, _react2.jsx)("div", {
|
|
154
156
|
className: wrapperClassNames,
|
|
155
157
|
css: _styles.mbeExtensionWrapperCSSStyles,
|
|
@@ -27,7 +27,7 @@ var mbeExtensionWrapperCSSStyles = exports.mbeExtensionWrapperCSSStyles = (0, _r
|
|
|
27
27
|
paddingTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
28
28
|
},
|
|
29
29
|
'&.with-border': {
|
|
30
|
-
border: "1px solid ".concat("var(--ds-border
|
|
30
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
|
|
31
31
|
},
|
|
32
32
|
'&.with-hover-border': {
|
|
33
33
|
border: "1px solid ".concat("var(--ds-border-input, ".concat(_colors.N500, ")"))
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
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 = "78.31.
|
|
19
|
+
var packageVersion = "78.31.2";
|
|
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
|
|
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
|
|
|
20
20
|
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); }; }
|
|
21
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "78.31.
|
|
23
|
+
var packageVersion = "78.31.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -44,11 +44,12 @@ var WidthContext = exports.WidthContext = /*#__PURE__*/_react.default.createCont
|
|
|
44
44
|
var Provider = WidthContext.Provider,
|
|
45
45
|
Consumer = exports.WidthConsumer = WidthContext.Consumer;
|
|
46
46
|
var WidthProvider = exports.WidthProvider = function WidthProvider(_ref) {
|
|
47
|
+
var _document$body$offset, _document$body;
|
|
47
48
|
var className = _ref.className,
|
|
48
49
|
shouldCheckExistingValue = _ref.shouldCheckExistingValue,
|
|
49
50
|
children = _ref.children;
|
|
50
51
|
var existingContextValue = _react.default.useContext(WidthContext);
|
|
51
|
-
var _React$useState = _react.default.useState(typeof document !== 'undefined' ? document.body.offsetWidth : 0),
|
|
52
|
+
var _React$useState = _react.default.useState(typeof document !== 'undefined' ? (_document$body$offset = (_document$body = document.body) === null || _document$body === void 0 ? void 0 : _document$body.offsetWidth) !== null && _document$body$offset !== void 0 ? _document$body$offset : 0 : 0),
|
|
52
53
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
53
54
|
width = _React$useState2[0],
|
|
54
55
|
setWidth = _React$useState2[1];
|
|
@@ -52,6 +52,7 @@ function ExtensionWithPluginState(props) {
|
|
|
52
52
|
const classNames = classnames('extension-container', 'block', shadowClassNames, {
|
|
53
53
|
'with-overlay': !hasBody && !showMacroInteractionDesignUpdates,
|
|
54
54
|
'with-border': showMacroInteractionDesignUpdates,
|
|
55
|
+
'with-bodied-border': showMacroInteractionDesignUpdates && hasBody,
|
|
55
56
|
'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested,
|
|
56
57
|
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered,
|
|
57
58
|
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
@@ -105,7 +106,9 @@ function ExtensionWithPluginState(props) {
|
|
|
105
106
|
isNodeNested: isNodeNested,
|
|
106
107
|
node: node,
|
|
107
108
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
108
|
-
customContainerStyles: customContainerStyles
|
|
109
|
+
customContainerStyles: customContainerStyles,
|
|
110
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
111
|
+
isBodiedMacro: hasBody
|
|
109
112
|
}), jsx("div", {
|
|
110
113
|
ref: handleRef,
|
|
111
114
|
"data-layout": node.attrs.layout,
|
|
@@ -14,6 +14,9 @@ export const wrapperStyle = css(wrapperDefault, {
|
|
|
14
14
|
'&.with-border': {
|
|
15
15
|
border: `1px solid transparent` // adding this so macro doesn't jump when hover border is shown
|
|
16
16
|
},
|
|
17
|
+
'&.with-bodied-border': {
|
|
18
|
+
border: `1px solid ${`var(--ds-border, ${N30})`}`
|
|
19
|
+
},
|
|
17
20
|
'&.with-hover-border': {
|
|
18
21
|
border: `1px solid ${`var(--ds-border-input, ${N500})`}`
|
|
19
22
|
},
|
|
@@ -41,7 +41,8 @@ const InlineExtension = props => {
|
|
|
41
41
|
node: node,
|
|
42
42
|
isNodeSelected: isNodeSelected,
|
|
43
43
|
isNodeHovered: isNodeHovered,
|
|
44
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
44
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
45
|
+
setIsNodeHovered: setIsNodeHovered
|
|
45
46
|
}), jsx("div", {
|
|
46
47
|
"data-testid": "inline-extension-wrapper",
|
|
47
48
|
css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyles],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { N300, N500 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { N0, N30, N300, N500 } from '@atlaskit/theme/colors';
|
|
6
6
|
const labelStyles = css({
|
|
7
7
|
opacity: 0,
|
|
8
8
|
display: 'inline-flex',
|
|
@@ -12,12 +12,13 @@ const labelStyles = css({
|
|
|
12
12
|
// Unfortunately, these need to be these exact numbers - otherwise there will be a gap/noticeable overlap
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
14
14
|
top: '-18px',
|
|
15
|
-
'&.inline
|
|
15
|
+
'&.inline': {
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
17
17
|
top: '-17px',
|
|
18
18
|
marginLeft: "var(--ds-space-150, 12px)"
|
|
19
19
|
},
|
|
20
|
-
'&.
|
|
20
|
+
'&.show-label': {
|
|
21
|
+
cursor: 'pointer',
|
|
21
22
|
background: `var(--ds-background-accent-gray-subtle-pressed, ${N300})`,
|
|
22
23
|
color: `var(--ds-text-subtle, ${N500})`,
|
|
23
24
|
opacity: 1
|
|
@@ -28,6 +29,13 @@ const labelStyles = css({
|
|
|
28
29
|
// Need to add indent if the node is nested since we removed previous indentation styles to make it fit properly
|
|
29
30
|
// in the nested component
|
|
30
31
|
marginLeft: "var(--ds-space-150, 12px)"
|
|
32
|
+
},
|
|
33
|
+
'&.bodied-background': {
|
|
34
|
+
background: `var(--ds-surface, ${N0})`
|
|
35
|
+
},
|
|
36
|
+
'&.bodied-border': {
|
|
37
|
+
border: `1px solid ${`var(--ds-border, ${N30})`}`,
|
|
38
|
+
borderBottom: 'none'
|
|
31
39
|
}
|
|
32
40
|
});
|
|
33
41
|
const textStyles = css({
|
|
@@ -40,15 +48,32 @@ export const ExtensionLabel = ({
|
|
|
40
48
|
extensionName,
|
|
41
49
|
isNodeHovered,
|
|
42
50
|
customContainerStyles,
|
|
43
|
-
isNodeNested
|
|
51
|
+
isNodeNested,
|
|
52
|
+
setIsNodeHovered,
|
|
53
|
+
isBodiedMacro
|
|
44
54
|
}) => {
|
|
45
55
|
const classNames = classnames('extension-title', 'extension-label', {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
nested: isNodeNested,
|
|
57
|
+
inline: extensionName === 'inlineExtension',
|
|
58
|
+
bodied: isBodiedMacro,
|
|
59
|
+
'bodied-border': isBodiedMacro,
|
|
60
|
+
'bodied-background': isBodiedMacro && !isNodeHovered,
|
|
61
|
+
'show-label': isNodeHovered || isBodiedMacro
|
|
49
62
|
});
|
|
63
|
+
const handleMouseEnter = useCallback(() => {
|
|
64
|
+
// If current node is hovered and the label is hovered,
|
|
65
|
+
// consider the node as hovered so we can display the label for users to click on
|
|
66
|
+
if (isNodeHovered) {
|
|
67
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
68
|
+
}
|
|
69
|
+
}, [isNodeHovered, setIsNodeHovered]);
|
|
70
|
+
const handleMouseLeave = useCallback(() => {
|
|
71
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
|
|
72
|
+
}, [setIsNodeHovered]);
|
|
50
73
|
return jsx("div", {
|
|
51
|
-
style: customContainerStyles
|
|
74
|
+
style: customContainerStyles,
|
|
75
|
+
onMouseEnter: handleMouseEnter,
|
|
76
|
+
onMouseLeave: handleMouseLeave
|
|
52
77
|
}, jsx("span", {
|
|
53
78
|
"data-testid": "new-lozenge",
|
|
54
79
|
css: labelStyles,
|
|
@@ -17,7 +17,9 @@ export const LozengeComponent = ({
|
|
|
17
17
|
showMacroInteractionDesignUpdates,
|
|
18
18
|
customContainerStyles,
|
|
19
19
|
isNodeHovered,
|
|
20
|
-
isNodeNested
|
|
20
|
+
isNodeNested,
|
|
21
|
+
setIsNodeHovered,
|
|
22
|
+
isBodiedMacro
|
|
21
23
|
}) => {
|
|
22
24
|
const capitalizedTitle = capitalizeFirstLetter(title);
|
|
23
25
|
if (showMacroInteractionDesignUpdates) {
|
|
@@ -26,7 +28,9 @@ export const LozengeComponent = ({
|
|
|
26
28
|
extensionName: extensionName,
|
|
27
29
|
isNodeHovered: isNodeHovered,
|
|
28
30
|
isNodeNested: isNodeNested,
|
|
29
|
-
customContainerStyles: customContainerStyles
|
|
31
|
+
customContainerStyles: customContainerStyles,
|
|
32
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
33
|
+
isBodiedMacro: isBodiedMacro
|
|
30
34
|
});
|
|
31
35
|
}
|
|
32
36
|
const isBlockExtension = extensionName === 'extension';
|
|
@@ -30,7 +30,9 @@ export default class ExtensionLozenge extends Component {
|
|
|
30
30
|
isNodeSelected,
|
|
31
31
|
isNodeHovered,
|
|
32
32
|
isNodeNested,
|
|
33
|
-
customContainerStyles
|
|
33
|
+
customContainerStyles,
|
|
34
|
+
setIsNodeHovered,
|
|
35
|
+
isBodiedMacro
|
|
34
36
|
} = this.props;
|
|
35
37
|
const {
|
|
36
38
|
parameters,
|
|
@@ -51,7 +53,9 @@ export default class ExtensionLozenge extends Component {
|
|
|
51
53
|
params: params,
|
|
52
54
|
title: title,
|
|
53
55
|
renderImage: this.renderImage,
|
|
54
|
-
customContainerStyles: customContainerStyles
|
|
56
|
+
customContainerStyles: customContainerStyles,
|
|
57
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
58
|
+
isBodiedMacro: isBodiedMacro
|
|
55
59
|
});
|
|
56
60
|
});
|
|
57
61
|
}
|
|
@@ -137,7 +137,9 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
137
137
|
showMacroInteractionDesignUpdates: true,
|
|
138
138
|
customContainerStyles: mbeWrapperStyles,
|
|
139
139
|
isNodeHovered: isNodeHovered,
|
|
140
|
-
isNodeNested: isNodeNested
|
|
140
|
+
isNodeNested: isNodeNested,
|
|
141
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
142
|
+
isBodiedMacro: true
|
|
141
143
|
}), jsx("div", {
|
|
142
144
|
className: wrapperClassNames,
|
|
143
145
|
css: mbeExtensionWrapperCSSStyles,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
2
|
+
import { N30, N500 } from '@atlaskit/theme/colors';
|
|
3
3
|
import { wrapperDefault } from '../Extension/styles';
|
|
4
4
|
|
|
5
5
|
// Wrapper the extension title and extensionContainer
|
|
@@ -22,7 +22,7 @@ export const mbeExtensionWrapperCSSStyles = css(wrapperDefault, {
|
|
|
22
22
|
paddingTop: `${"var(--ds-space-100, 8px)"} !important`
|
|
23
23
|
},
|
|
24
24
|
'&.with-border': {
|
|
25
|
-
border: `1px solid ${`var(--ds-border
|
|
25
|
+
border: `1px solid ${`var(--ds-border, ${N30})`}`
|
|
26
26
|
},
|
|
27
27
|
'&.with-hover-border': {
|
|
28
28
|
border: `1px solid ${`var(--ds-border-input, ${N500})`}`
|
|
@@ -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 = "78.31.
|
|
3
|
+
const packageVersion = "78.31.2";
|
|
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
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "78.31.
|
|
10
|
+
const packageVersion = "78.31.2";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -34,8 +34,9 @@ export const WidthProvider = ({
|
|
|
34
34
|
shouldCheckExistingValue,
|
|
35
35
|
children
|
|
36
36
|
}) => {
|
|
37
|
+
var _document$body$offset, _document$body;
|
|
37
38
|
const existingContextValue = React.useContext(WidthContext);
|
|
38
|
-
const [width, setWidth] = React.useState(typeof document !== 'undefined' ? document.body.offsetWidth : 0);
|
|
39
|
+
const [width, setWidth] = React.useState(typeof document !== 'undefined' ? (_document$body$offset = (_document$body = document.body) === null || _document$body === void 0 ? void 0 : _document$body.offsetWidth) !== null && _document$body$offset !== void 0 ? _document$body$offset : 0 : 0);
|
|
39
40
|
const providerValue = React.useMemo(() => createWidthContext(width), [width]);
|
|
40
41
|
const updateWidth = rafSchedule(nextWidth => {
|
|
41
42
|
// Ignore changes that are less than SCROLLBAR_WIDTH, otherwise it can cause infinite re-scaling
|
|
@@ -54,6 +54,7 @@ function ExtensionWithPluginState(props) {
|
|
|
54
54
|
var classNames = classnames('extension-container', 'block', shadowClassNames, _defineProperty({
|
|
55
55
|
'with-overlay': !hasBody && !showMacroInteractionDesignUpdates,
|
|
56
56
|
'with-border': showMacroInteractionDesignUpdates,
|
|
57
|
+
'with-bodied-border': showMacroInteractionDesignUpdates && hasBody,
|
|
57
58
|
'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested,
|
|
58
59
|
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered,
|
|
59
60
|
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
@@ -100,7 +101,9 @@ function ExtensionWithPluginState(props) {
|
|
|
100
101
|
isNodeNested: isNodeNested,
|
|
101
102
|
node: node,
|
|
102
103
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
103
|
-
customContainerStyles: customContainerStyles
|
|
104
|
+
customContainerStyles: customContainerStyles,
|
|
105
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
106
|
+
isBodiedMacro: hasBody
|
|
104
107
|
}), jsx("div", {
|
|
105
108
|
ref: handleRef,
|
|
106
109
|
"data-layout": node.attrs.layout,
|
|
@@ -14,6 +14,9 @@ export var wrapperStyle = css(wrapperDefault, {
|
|
|
14
14
|
'&.with-border': {
|
|
15
15
|
border: "1px solid transparent" // adding this so macro doesn't jump when hover border is shown
|
|
16
16
|
},
|
|
17
|
+
'&.with-bodied-border': {
|
|
18
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N30, ")"))
|
|
19
|
+
},
|
|
17
20
|
'&.with-hover-border': {
|
|
18
21
|
border: "1px solid ".concat("var(--ds-border-input, ".concat(N500, ")"))
|
|
19
22
|
},
|
|
@@ -38,7 +38,8 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
38
38
|
node: node,
|
|
39
39
|
isNodeSelected: isNodeSelected,
|
|
40
40
|
isNodeHovered: isNodeHovered,
|
|
41
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
41
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
42
|
+
setIsNodeHovered: setIsNodeHovered
|
|
42
43
|
}), jsx("div", {
|
|
43
44
|
"data-testid": "inline-extension-wrapper",
|
|
44
45
|
css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyles],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { N300, N500 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { N0, N30, N300, N500 } from '@atlaskit/theme/colors';
|
|
6
6
|
var labelStyles = css({
|
|
7
7
|
opacity: 0,
|
|
8
8
|
display: 'inline-flex',
|
|
@@ -12,12 +12,13 @@ var labelStyles = css({
|
|
|
12
12
|
// Unfortunately, these need to be these exact numbers - otherwise there will be a gap/noticeable overlap
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
14
14
|
top: '-18px',
|
|
15
|
-
'&.inline
|
|
15
|
+
'&.inline': {
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
17
17
|
top: '-17px',
|
|
18
18
|
marginLeft: "var(--ds-space-150, 12px)"
|
|
19
19
|
},
|
|
20
|
-
'&.
|
|
20
|
+
'&.show-label': {
|
|
21
|
+
cursor: 'pointer',
|
|
21
22
|
background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(N300, ")"),
|
|
22
23
|
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
23
24
|
opacity: 1
|
|
@@ -28,6 +29,13 @@ var labelStyles = css({
|
|
|
28
29
|
// Need to add indent if the node is nested since we removed previous indentation styles to make it fit properly
|
|
29
30
|
// in the nested component
|
|
30
31
|
marginLeft: "var(--ds-space-150, 12px)"
|
|
32
|
+
},
|
|
33
|
+
'&.bodied-background': {
|
|
34
|
+
background: "var(--ds-surface, ".concat(N0, ")")
|
|
35
|
+
},
|
|
36
|
+
'&.bodied-border': {
|
|
37
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N30, ")")),
|
|
38
|
+
borderBottom: 'none'
|
|
31
39
|
}
|
|
32
40
|
});
|
|
33
41
|
var textStyles = css({
|
|
@@ -40,14 +48,31 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
40
48
|
extensionName = _ref.extensionName,
|
|
41
49
|
isNodeHovered = _ref.isNodeHovered,
|
|
42
50
|
customContainerStyles = _ref.customContainerStyles,
|
|
43
|
-
isNodeNested = _ref.isNodeNested
|
|
51
|
+
isNodeNested = _ref.isNodeNested,
|
|
52
|
+
setIsNodeHovered = _ref.setIsNodeHovered,
|
|
53
|
+
isBodiedMacro = _ref.isBodiedMacro;
|
|
44
54
|
var classNames = classnames('extension-title', 'extension-label', {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
nested: isNodeNested,
|
|
56
|
+
inline: extensionName === 'inlineExtension',
|
|
57
|
+
bodied: isBodiedMacro,
|
|
58
|
+
'bodied-border': isBodiedMacro,
|
|
59
|
+
'bodied-background': isBodiedMacro && !isNodeHovered,
|
|
60
|
+
'show-label': isNodeHovered || isBodiedMacro
|
|
48
61
|
});
|
|
62
|
+
var handleMouseEnter = useCallback(function () {
|
|
63
|
+
// If current node is hovered and the label is hovered,
|
|
64
|
+
// consider the node as hovered so we can display the label for users to click on
|
|
65
|
+
if (isNodeHovered) {
|
|
66
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
67
|
+
}
|
|
68
|
+
}, [isNodeHovered, setIsNodeHovered]);
|
|
69
|
+
var handleMouseLeave = useCallback(function () {
|
|
70
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
71
|
+
}, [setIsNodeHovered]);
|
|
49
72
|
return jsx("div", {
|
|
50
|
-
style: customContainerStyles
|
|
73
|
+
style: customContainerStyles,
|
|
74
|
+
onMouseEnter: handleMouseEnter,
|
|
75
|
+
onMouseLeave: handleMouseLeave
|
|
51
76
|
}, jsx("span", {
|
|
52
77
|
"data-testid": "new-lozenge",
|
|
53
78
|
css: labelStyles,
|
|
@@ -20,7 +20,9 @@ export var LozengeComponent = function LozengeComponent(_ref) {
|
|
|
20
20
|
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
21
21
|
customContainerStyles = _ref.customContainerStyles,
|
|
22
22
|
isNodeHovered = _ref.isNodeHovered,
|
|
23
|
-
isNodeNested = _ref.isNodeNested
|
|
23
|
+
isNodeNested = _ref.isNodeNested,
|
|
24
|
+
setIsNodeHovered = _ref.setIsNodeHovered,
|
|
25
|
+
isBodiedMacro = _ref.isBodiedMacro;
|
|
24
26
|
var capitalizedTitle = capitalizeFirstLetter(title);
|
|
25
27
|
if (showMacroInteractionDesignUpdates) {
|
|
26
28
|
return jsx(ExtensionLabel, {
|
|
@@ -28,7 +30,9 @@ export var LozengeComponent = function LozengeComponent(_ref) {
|
|
|
28
30
|
extensionName: extensionName,
|
|
29
31
|
isNodeHovered: isNodeHovered,
|
|
30
32
|
isNodeNested: isNodeNested,
|
|
31
|
-
customContainerStyles: customContainerStyles
|
|
33
|
+
customContainerStyles: customContainerStyles,
|
|
34
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
35
|
+
isBodiedMacro: isBodiedMacro
|
|
32
36
|
});
|
|
33
37
|
}
|
|
34
38
|
var isBlockExtension = extensionName === 'extension';
|
|
@@ -43,7 +43,9 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
43
43
|
isNodeSelected = _this$props.isNodeSelected,
|
|
44
44
|
isNodeHovered = _this$props.isNodeHovered,
|
|
45
45
|
isNodeNested = _this$props.isNodeNested,
|
|
46
|
-
customContainerStyles = _this$props.customContainerStyles
|
|
46
|
+
customContainerStyles = _this$props.customContainerStyles,
|
|
47
|
+
setIsNodeHovered = _this$props.setIsNodeHovered,
|
|
48
|
+
isBodiedMacro = _this$props.isBodiedMacro;
|
|
47
49
|
var _this$props$node$attr = _this.props.node.attrs,
|
|
48
50
|
parameters = _this$props$node$attr.parameters,
|
|
49
51
|
extensionKey = _this$props$node$attr.extensionKey;
|
|
@@ -60,7 +62,9 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
60
62
|
params: params,
|
|
61
63
|
title: title,
|
|
62
64
|
renderImage: _this.renderImage,
|
|
63
|
-
customContainerStyles: customContainerStyles
|
|
65
|
+
customContainerStyles: customContainerStyles,
|
|
66
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
67
|
+
isBodiedMacro: isBodiedMacro
|
|
64
68
|
});
|
|
65
69
|
});
|
|
66
70
|
return _this;
|
|
@@ -140,7 +140,9 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
140
140
|
showMacroInteractionDesignUpdates: true,
|
|
141
141
|
customContainerStyles: mbeWrapperStyles,
|
|
142
142
|
isNodeHovered: isNodeHovered,
|
|
143
|
-
isNodeNested: isNodeNested
|
|
143
|
+
isNodeNested: isNodeNested,
|
|
144
|
+
setIsNodeHovered: setIsNodeHovered,
|
|
145
|
+
isBodiedMacro: true
|
|
144
146
|
}), jsx("div", {
|
|
145
147
|
className: wrapperClassNames,
|
|
146
148
|
css: mbeExtensionWrapperCSSStyles,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
2
|
+
import { N30, N500 } from '@atlaskit/theme/colors';
|
|
3
3
|
import { wrapperDefault } from '../Extension/styles';
|
|
4
4
|
|
|
5
5
|
// Wrapper the extension title and extensionContainer
|
|
@@ -22,7 +22,7 @@ export var mbeExtensionWrapperCSSStyles = css(wrapperDefault, {
|
|
|
22
22
|
paddingTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
23
23
|
},
|
|
24
24
|
'&.with-border': {
|
|
25
|
-
border: "1px solid ".concat("var(--ds-border
|
|
25
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N30, ")"))
|
|
26
26
|
},
|
|
27
27
|
'&.with-hover-border': {
|
|
28
28
|
border: "1px solid ".concat("var(--ds-border-input, ".concat(N500, ")"))
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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 = "78.31.
|
|
9
|
+
var packageVersion = "78.31.2";
|
|
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
|
|
@@ -15,7 +15,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
15
15
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
16
16
|
import Layer from '../Layer';
|
|
17
17
|
var packageName = "@atlaskit/editor-common";
|
|
18
|
-
var packageVersion = "78.31.
|
|
18
|
+
var packageVersion = "78.31.2";
|
|
19
19
|
var halfFocusRing = 1;
|
|
20
20
|
var dropOffset = '0, 8';
|
|
21
21
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -31,11 +31,12 @@ export var WidthContext = /*#__PURE__*/React.createContext(createWidthContext())
|
|
|
31
31
|
var Provider = WidthContext.Provider,
|
|
32
32
|
Consumer = WidthContext.Consumer;
|
|
33
33
|
export var WidthProvider = function WidthProvider(_ref) {
|
|
34
|
+
var _document$body$offset, _document$body;
|
|
34
35
|
var className = _ref.className,
|
|
35
36
|
shouldCheckExistingValue = _ref.shouldCheckExistingValue,
|
|
36
37
|
children = _ref.children;
|
|
37
38
|
var existingContextValue = React.useContext(WidthContext);
|
|
38
|
-
var _React$useState = React.useState(typeof document !== 'undefined' ? document.body.offsetWidth : 0),
|
|
39
|
+
var _React$useState = React.useState(typeof document !== 'undefined' ? (_document$body$offset = (_document$body = document.body) === null || _document$body === void 0 ? void 0 : _document$body.offsetWidth) !== null && _document$body$offset !== void 0 ? _document$body$offset : 0 : 0),
|
|
39
40
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
40
41
|
width = _React$useState2[0],
|
|
41
42
|
setWidth = _React$useState2[1];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
3
2
|
import { jsx } from '@emotion/react';
|
|
4
3
|
type ExtensionLabelProps = {
|
|
@@ -7,6 +6,8 @@ type ExtensionLabelProps = {
|
|
|
7
6
|
isNodeHovered?: boolean;
|
|
8
7
|
isNodeNested?: boolean;
|
|
9
8
|
customContainerStyles?: CSSProperties;
|
|
9
|
+
setIsNodeHovered?: (isHovered: boolean) => void;
|
|
10
|
+
isBodiedMacro?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
12
|
+
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, setIsNodeHovered, isBodiedMacro, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -14,6 +14,8 @@ type LozengeComponentProps = {
|
|
|
14
14
|
customContainerStyles?: CSSProperties;
|
|
15
15
|
isNodeHovered?: boolean;
|
|
16
16
|
isNodeNested?: boolean;
|
|
17
|
+
setIsNodeHovered?: (isHovered: boolean) => void;
|
|
18
|
+
isBodiedMacro?: boolean;
|
|
17
19
|
};
|
|
18
|
-
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, }: LozengeComponentProps) => jsx.JSX.Element;
|
|
20
|
+
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, }: LozengeComponentProps) => jsx.JSX.Element;
|
|
19
21
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
3
2
|
import { jsx } from '@emotion/react';
|
|
4
3
|
type ExtensionLabelProps = {
|
|
@@ -7,6 +6,8 @@ type ExtensionLabelProps = {
|
|
|
7
6
|
isNodeHovered?: boolean;
|
|
8
7
|
isNodeNested?: boolean;
|
|
9
8
|
customContainerStyles?: CSSProperties;
|
|
9
|
+
setIsNodeHovered?: (isHovered: boolean) => void;
|
|
10
|
+
isBodiedMacro?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
12
|
+
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, setIsNodeHovered, isBodiedMacro, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -14,6 +14,8 @@ type LozengeComponentProps = {
|
|
|
14
14
|
customContainerStyles?: CSSProperties;
|
|
15
15
|
isNodeHovered?: boolean;
|
|
16
16
|
isNodeNested?: boolean;
|
|
17
|
+
setIsNodeHovered?: (isHovered: boolean) => void;
|
|
18
|
+
isBodiedMacro?: boolean;
|
|
17
19
|
};
|
|
18
|
-
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, }: LozengeComponentProps) => jsx.JSX.Element;
|
|
20
|
+
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, }: LozengeComponentProps) => jsx.JSX.Element;
|
|
19
21
|
export {};
|
package/package.json
CHANGED