@atlaskit/editor-common 78.15.0 → 78.17.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 +16 -0
- package/afm-cc/tsconfig.json +0 -3
- package/dist/cjs/extensibility/Extension/Extension/index.js +10 -5
- package/dist/cjs/extensibility/Extension/Extension/styles.js +10 -1
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +1 -1
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +58 -0
- package/dist/cjs/extensibility/Extension/{LozengeComponent.js → Lozenge/LozengeComponent.js} +7 -14
- package/dist/cjs/extensibility/Extension/{Lozenge.js → Lozenge/index.js} +2 -2
- package/dist/cjs/extensibility/Extension/styles.js +1 -13
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +7 -4
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +7 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MultiBodiedExtension/index.js +7 -3
- package/dist/es2019/extensibility/Extension/Extension/index.js +10 -5
- package/dist/es2019/extensibility/Extension/Extension/styles.js +10 -1
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +1 -1
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +52 -0
- package/dist/es2019/extensibility/Extension/{LozengeComponent.js → Lozenge/LozengeComponent.js} +7 -14
- package/dist/es2019/extensibility/Extension/{Lozenge.js → Lozenge/index.js} +2 -2
- package/dist/es2019/extensibility/Extension/styles.js +0 -12
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +8 -5
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +7 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MultiBodiedExtension/index.js +6 -2
- package/dist/esm/extensibility/Extension/Extension/index.js +10 -5
- package/dist/esm/extensibility/Extension/Extension/styles.js +10 -1
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +1 -1
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +51 -0
- package/dist/esm/extensibility/Extension/{LozengeComponent.js → Lozenge/LozengeComponent.js} +7 -14
- package/dist/esm/extensibility/Extension/{Lozenge.js → Lozenge/index.js} +2 -2
- package/dist/esm/extensibility/Extension/styles.js +0 -12
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +8 -5
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +7 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MultiBodiedExtension/index.js +6 -2
- package/dist/types/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +12 -0
- package/dist/types/extensibility/Extension/{LozengeComponent.d.ts → Lozenge/LozengeComponent.d.ts} +1 -1
- package/dist/types/extensibility/Extension/styles.d.ts +0 -1
- package/dist/types/types/text-formatting.d.ts +2 -1
- package/dist/types/ui/MultiBodiedExtension/index.d.ts +1 -1
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +12 -0
- package/dist/types-ts4.5/extensibility/Extension/{LozengeComponent.d.ts → Lozenge/LozengeComponent.d.ts} +1 -1
- package/dist/types-ts4.5/extensibility/Extension/styles.d.ts +0 -1
- package/dist/types-ts4.5/types/text-formatting.d.ts +2 -1
- package/dist/types-ts4.5/ui/MultiBodiedExtension/index.d.ts +1 -1
- package/package.json +3 -4
- /package/dist/types/extensibility/Extension/{Lozenge.d.ts → Lozenge/index.d.ts} +0 -0
- /package/dist/types-ts4.5/extensibility/Extension/{Lozenge.d.ts → Lozenge/index.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#81734](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81734) [`1148ef3d8a84`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1148ef3d8a84) - [ux] lozenge trash interaction, hover overlay removal, and fix label text truncation
|
|
8
|
+
|
|
9
|
+
## 78.16.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#82499](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82499) [`cbd66fd38b62`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cbd66fd38b62) - Add option to disable strikethrough on text-formatting via disableStrikethrough.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 78.15.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -60,16 +60,21 @@ function ExtensionWithPluginState(props) {
|
|
|
60
60
|
// Extension breakout state should not be respected when the editor appearance is full-width mode
|
|
61
61
|
editorAppearance !== 'full-width';
|
|
62
62
|
var classNames = (0, _classnames2.default)('extension-container', 'block', shadowClassNames, (0, _defineProperty2.default)({
|
|
63
|
-
'with-overlay': !hasBody,
|
|
63
|
+
'with-overlay': !hasBody && !showMacroInteractionDesignUpdates,
|
|
64
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
65
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered,
|
|
64
66
|
'without-frame': removeBorder
|
|
65
67
|
}, _styles2.widerLayoutClassName, shouldBreakout));
|
|
66
68
|
var headerClassNames = (0, _classnames2.default)({
|
|
67
69
|
'with-children': hasChildren,
|
|
68
70
|
'without-frame': removeBorder
|
|
69
71
|
});
|
|
70
|
-
var
|
|
72
|
+
var newContentClassNames = (0, _classnames2.default)({
|
|
71
73
|
'remove-padding': showMacroInteractionDesignUpdates
|
|
72
74
|
});
|
|
75
|
+
var contentClassNames = (0, _classnames2.default)('extension-content', 'block', {
|
|
76
|
+
'remove-border': showMacroInteractionDesignUpdates
|
|
77
|
+
});
|
|
73
78
|
var customContainerStyles = {
|
|
74
79
|
width: '100%'
|
|
75
80
|
};
|
|
@@ -103,7 +108,7 @@ function ExtensionWithPluginState(props) {
|
|
|
103
108
|
className: classNames,
|
|
104
109
|
css: _styles2.wrapperStyle,
|
|
105
110
|
style: customContainerStyles,
|
|
106
|
-
|
|
111
|
+
onMouseEnter: function onMouseEnter() {
|
|
107
112
|
return handleMouseEvent(true);
|
|
108
113
|
},
|
|
109
114
|
onMouseLeave: function onMouseLeave() {
|
|
@@ -124,11 +129,11 @@ function ExtensionWithPluginState(props) {
|
|
|
124
129
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
125
130
|
}), children), hasBody && (0, _react2.jsx)("div", {
|
|
126
131
|
css: newContentStyles,
|
|
127
|
-
className:
|
|
132
|
+
className: newContentClassNames
|
|
128
133
|
}, (0, _react2.jsx)("div", {
|
|
129
134
|
css: _styles2.content,
|
|
130
135
|
ref: handleContentDOMRef,
|
|
131
|
-
className:
|
|
136
|
+
className: contentClassNames
|
|
132
137
|
})))));
|
|
133
138
|
}
|
|
134
139
|
var Extension = function Extension(props) {
|
|
@@ -16,6 +16,12 @@ var wrapperStyle = exports.wrapperStyle = (0, _react.css)(_styles.wrapperDefault
|
|
|
16
16
|
width: '100%',
|
|
17
17
|
'.extension-overflow-wrapper:not(.with-body)': {
|
|
18
18
|
overflowX: 'auto'
|
|
19
|
+
},
|
|
20
|
+
'&.with-border': {
|
|
21
|
+
border: "1px solid transparent" // adding this so macro doesn't jump when hover border is shown
|
|
22
|
+
},
|
|
23
|
+
'&.with-hover-border': {
|
|
24
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
|
|
19
25
|
}
|
|
20
26
|
});
|
|
21
27
|
var header = exports.header = (0, _react.css)({
|
|
@@ -34,7 +40,10 @@ var content = exports.content = (0, _react.css)({
|
|
|
34
40
|
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")")),
|
|
35
41
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
36
42
|
cursor: 'initial',
|
|
37
|
-
width: '100%'
|
|
43
|
+
width: '100%',
|
|
44
|
+
'&.remove-border': {
|
|
45
|
+
border: 'none'
|
|
46
|
+
}
|
|
38
47
|
});
|
|
39
48
|
var contentWrapper = exports.contentWrapper = (0, _react.css)({
|
|
40
49
|
padding: "0 ".concat("var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)"),
|
|
@@ -46,7 +46,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
46
46
|
}), (0, _react2.jsx)("div", {
|
|
47
47
|
css: [_styles2.wrapperStyle, extendedInlineExtension && _styles2.inlineWrapperStyels],
|
|
48
48
|
className: "extension-container inline ".concat(className),
|
|
49
|
-
|
|
49
|
+
onMouseEnter: function onMouseEnter() {
|
|
50
50
|
return handleMouseEvent(true);
|
|
51
51
|
},
|
|
52
52
|
onMouseLeave: function onMouseLeave() {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.labelStyles = exports.ExtensionLabel = void 0;
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
+
/** @jsx jsx */
|
|
12
|
+
|
|
13
|
+
var labelStyles = exports.labelStyles = (0, _react.css)({
|
|
14
|
+
display: 'inline-flex',
|
|
15
|
+
width: 'max-content',
|
|
16
|
+
justifyContent: 'left',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
// Unfortunately, these need to be these exact numbers - otherwise there will be a gap/noticeable overlap
|
|
19
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
20
|
+
top: '-18px',
|
|
21
|
+
'&.inline-extension': {
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
23
|
+
top: '-17px'
|
|
24
|
+
},
|
|
25
|
+
background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(_colors.N300, ")"),
|
|
26
|
+
color: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
|
|
27
|
+
'&.selected': {
|
|
28
|
+
backgroundColor: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
|
|
29
|
+
color: "var(--ds-text-selected, ".concat(_colors.B400, ")")
|
|
30
|
+
},
|
|
31
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
32
|
+
lineHeight: 1,
|
|
33
|
+
marginLeft: "var(--ds-space-150, 12px)"
|
|
34
|
+
});
|
|
35
|
+
var textStyles = (0, _react.css)({
|
|
36
|
+
fontSize: '14px',
|
|
37
|
+
fontWeight: 'normal',
|
|
38
|
+
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
39
|
+
});
|
|
40
|
+
var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
41
|
+
var text = _ref.text,
|
|
42
|
+
extensionName = _ref.extensionName,
|
|
43
|
+
isNodeSelected = _ref.isNodeSelected,
|
|
44
|
+
customContainerStyles = _ref.customContainerStyles;
|
|
45
|
+
var classNames = (0, _classnames.default)('extension-title', 'extension-label', {
|
|
46
|
+
'inline-extension': extensionName === 'inlineExtension',
|
|
47
|
+
selected: isNodeSelected
|
|
48
|
+
});
|
|
49
|
+
return (0, _react.jsx)("div", {
|
|
50
|
+
style: customContainerStyles
|
|
51
|
+
}, (0, _react.jsx)("span", {
|
|
52
|
+
"data-testid": "new-lozenge",
|
|
53
|
+
css: labelStyles,
|
|
54
|
+
className: classNames
|
|
55
|
+
}, (0, _react.jsx)("span", {
|
|
56
|
+
css: textStyles
|
|
57
|
+
}, text)));
|
|
58
|
+
};
|
package/dist/cjs/extensibility/Extension/{LozengeComponent.js → Lozenge/LozengeComponent.js}
RENAMED
|
@@ -7,10 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.LozengeComponent = exports.ICON_SIZE = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _file = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file"));
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _styles = require("../styles");
|
|
12
|
+
var _ExtensionLabel = require("./ExtensionLabel");
|
|
14
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
14
|
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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
|
|
16
15
|
var ICON_SIZE = exports.ICON_SIZE = 24;
|
|
@@ -29,18 +28,12 @@ var LozengeComponent = exports.LozengeComponent = function LozengeComponent(_ref
|
|
|
29
28
|
isNodeHovered = _ref.isNodeHovered;
|
|
30
29
|
var capitalizedTitle = capitalizeFirstLetter(title);
|
|
31
30
|
if (showMacroInteractionDesignUpdates && (isNodeHovered || isNodeSelected)) {
|
|
32
|
-
|
|
33
|
-
'inline-extension': extensionName === 'inlineExtension'
|
|
34
|
-
});
|
|
35
|
-
return (0, _react.jsx)("div", {
|
|
36
|
-
className: lozengeClassNames,
|
|
37
|
-
css: _styles.lozengeWrapper,
|
|
38
|
-
"data-testid": "new-lozenge",
|
|
39
|
-
style: customContainerStyles
|
|
40
|
-
}, (0, _react.jsx)(_tag.SimpleTag, {
|
|
31
|
+
return (0, _react.jsx)(_ExtensionLabel.ExtensionLabel, {
|
|
41
32
|
text: capitalizedTitle,
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
extensionName: extensionName,
|
|
34
|
+
isNodeSelected: isNodeSelected,
|
|
35
|
+
customContainerStyles: customContainerStyles
|
|
36
|
+
});
|
|
44
37
|
} else if (!showMacroInteractionDesignUpdates) {
|
|
45
38
|
var isBlockExtension = extensionName === 'extension';
|
|
46
39
|
return (0, _react.jsx)("div", {
|
|
@@ -16,9 +16,9 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = require("react");
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
|
-
var _utils = require("
|
|
19
|
+
var _utils = require("../../../utils");
|
|
20
|
+
var _styles = require("../styles");
|
|
20
21
|
var _LozengeComponent = require("./LozengeComponent");
|
|
21
|
-
var _styles = require("./styles");
|
|
22
22
|
var _excluded = ["url"];
|
|
23
23
|
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); }; }
|
|
24
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "BODIED_EXT_PADDING", {
|
|
|
9
9
|
return _styles.BODIED_EXT_PADDING;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
exports.overlay =
|
|
12
|
+
exports.overlay = void 0;
|
|
13
13
|
Object.defineProperty(exports, "padding", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function get() {
|
|
@@ -69,16 +69,4 @@ var styledImage = exports.styledImage = (0, _react.css)({
|
|
|
69
69
|
/* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */
|
|
70
70
|
/* stylelint-disable-next-line */
|
|
71
71
|
label: 'lozenge-image'
|
|
72
|
-
});
|
|
73
|
-
var lozengeWrapper = exports.lozengeWrapper = (0, _react.css)({
|
|
74
|
-
display: 'flex',
|
|
75
|
-
justifyContent: 'left',
|
|
76
|
-
width: '100%',
|
|
77
|
-
marginLeft: "var(--ds-space-050, 4px)",
|
|
78
|
-
position: 'absolute',
|
|
79
|
-
top: "var(--ds-space-negative-300, -24px)",
|
|
80
|
-
'&.inline-extension': {
|
|
81
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
82
|
-
top: '-23px' // Unfortunately, this needs to be this exact number - otherwise there will be a gap/noticeable overlap
|
|
83
|
-
}
|
|
84
72
|
});
|
|
@@ -101,7 +101,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
101
101
|
var articleRef = _react.default.useCallback(function (node) {
|
|
102
102
|
return handleContentDOMRef(node);
|
|
103
103
|
}, [handleContentDOMRef]);
|
|
104
|
-
var containerCssExtended = (0, _react2.css)(_MultiBodiedExtension.sharedMultiBodiedExtensionStyles.mbeExtensionContainer, (0, _defineProperty2.default)({}, ".multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true']:nth-of-type(".concat(activeChildIndex + 1, ")"), (0, _react2.css)(_MultiBodiedExtension.sharedMultiBodiedExtensionStyles.extensionFrameContent, showMacroInteractionDesignUpdates && _MultiBodiedExtension.
|
|
104
|
+
var containerCssExtended = (0, _react2.css)(_MultiBodiedExtension.sharedMultiBodiedExtensionStyles.mbeExtensionContainer, (0, _defineProperty2.default)({}, ".multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true']:nth-of-type(".concat(activeChildIndex + 1, ")"), (0, _react2.css)(_MultiBodiedExtension.sharedMultiBodiedExtensionStyles.extensionFrameContent, showMacroInteractionDesignUpdates && _MultiBodiedExtension.removeMarginsAndBorder)));
|
|
105
105
|
var shouldBreakout =
|
|
106
106
|
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
107
107
|
['full-width', 'wide'].includes(node.attrs.layout) &&
|
|
@@ -118,13 +118,16 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
118
118
|
mbeWrapperStyles = breakoutStyles;
|
|
119
119
|
}
|
|
120
120
|
var wrapperClassNames = (0, _classnames.default)('multiBodiedExtension--wrapper', 'extension-container', 'block', {
|
|
121
|
-
'remove-margin-top': showMacroInteractionDesignUpdates
|
|
121
|
+
'remove-margin-top': showMacroInteractionDesignUpdates,
|
|
122
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
123
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
|
|
122
124
|
});
|
|
123
125
|
var containerClassNames = (0, _classnames.default)('multiBodiedExtension--container', {
|
|
124
126
|
'remove-padding': showMacroInteractionDesignUpdates
|
|
125
127
|
});
|
|
126
128
|
var navigationClassNames = (0, _classnames.default)('multiBodiedExtension--navigation', {
|
|
127
|
-
'remove-margins': showMacroInteractionDesignUpdates
|
|
129
|
+
'remove-margins': showMacroInteractionDesignUpdates,
|
|
130
|
+
'remove-border': showMacroInteractionDesignUpdates
|
|
128
131
|
});
|
|
129
132
|
var handleMouseEvent = function handleMouseEvent(didHover) {
|
|
130
133
|
if (setIsNodeHovered) {
|
|
@@ -142,7 +145,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
142
145
|
css: _styles.mbeExtensionWrapperCSS,
|
|
143
146
|
"data-testid": "multiBodiedExtension--wrapper",
|
|
144
147
|
style: mbeWrapperStyles,
|
|
145
|
-
|
|
148
|
+
onMouseEnter: function onMouseEnter() {
|
|
146
149
|
return handleMouseEvent(true);
|
|
147
150
|
},
|
|
148
151
|
onMouseLeave: function onMouseLeave() {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.mbeExtensionWrapperCSS = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
8
9
|
var _styles = require("../Extension/styles");
|
|
9
10
|
// Wrapper the extension title and extensionContainer
|
|
10
11
|
var mbeExtensionWrapperCSS = exports.mbeExtensionWrapperCSS = (0, _react.css)(_styles.wrapperDefault, {
|
|
@@ -22,5 +23,11 @@ var mbeExtensionWrapperCSS = exports.mbeExtensionWrapperCSS = (0, _react.css)(_s
|
|
|
22
23
|
marginLeft: "var(--ds-space-050, 4px)".concat(" !important"),
|
|
23
24
|
marginRight: "var(--ds-space-100, 8px)",
|
|
24
25
|
paddingTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
26
|
+
},
|
|
27
|
+
'&.with-border': {
|
|
28
|
+
border: "1px solid ".concat("var(--ds-border-inverse, ".concat(_colors.N0, ")")) // adding this so macro doesn't jump when hover border is shown
|
|
29
|
+
},
|
|
30
|
+
'&.with-hover-border': {
|
|
31
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
|
|
25
32
|
}
|
|
26
33
|
});
|
|
@@ -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.
|
|
19
|
+
var packageVersion = "78.17.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
|
|
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
22
22
|
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); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "78.
|
|
25
|
+
var packageVersion = "78.17.0";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.sharedMultiBodiedExtensionStyles = exports.
|
|
6
|
+
exports.sharedMultiBodiedExtensionStyles = exports.removeMarginsAndBorder = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
/** @jsx jsx */
|
|
@@ -48,6 +48,9 @@ var mbeNavigation = (0, _react.css)({
|
|
|
48
48
|
'&.remove-margins': {
|
|
49
49
|
marginLeft: 0,
|
|
50
50
|
marginRight: 0
|
|
51
|
+
},
|
|
52
|
+
'&.remove-border': {
|
|
53
|
+
border: 'none'
|
|
51
54
|
}
|
|
52
55
|
});
|
|
53
56
|
var extensionFrameContent = (0, _react.css)({
|
|
@@ -72,9 +75,10 @@ var extensionFrameContent = (0, _react.css)({
|
|
|
72
75
|
marginTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
73
76
|
}
|
|
74
77
|
});
|
|
75
|
-
var
|
|
78
|
+
var removeMarginsAndBorder = exports.removeMarginsAndBorder = (0, _react.css)({
|
|
76
79
|
marginLeft: 0,
|
|
77
|
-
marginRight: 0
|
|
80
|
+
marginRight: 0,
|
|
81
|
+
border: 'none'
|
|
78
82
|
});
|
|
79
83
|
var sharedMultiBodiedExtensionStyles = exports.sharedMultiBodiedExtensionStyles = {
|
|
80
84
|
mbeExtensionContainer: mbeExtensionContainer,
|
|
@@ -49,7 +49,9 @@ function ExtensionWithPluginState(props) {
|
|
|
49
49
|
// Extension breakout state should not be respected when the editor appearance is full-width mode
|
|
50
50
|
editorAppearance !== 'full-width';
|
|
51
51
|
const classNames = classnames('extension-container', 'block', shadowClassNames, {
|
|
52
|
-
'with-overlay': !hasBody,
|
|
52
|
+
'with-overlay': !hasBody && !showMacroInteractionDesignUpdates,
|
|
53
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
54
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered,
|
|
53
55
|
'without-frame': removeBorder,
|
|
54
56
|
[widerLayoutClassName]: shouldBreakout
|
|
55
57
|
});
|
|
@@ -57,9 +59,12 @@ function ExtensionWithPluginState(props) {
|
|
|
57
59
|
'with-children': hasChildren,
|
|
58
60
|
'without-frame': removeBorder
|
|
59
61
|
});
|
|
60
|
-
const
|
|
62
|
+
const newContentClassNames = classnames({
|
|
61
63
|
'remove-padding': showMacroInteractionDesignUpdates
|
|
62
64
|
});
|
|
65
|
+
const contentClassNames = classnames('extension-content', 'block', {
|
|
66
|
+
'remove-border': showMacroInteractionDesignUpdates
|
|
67
|
+
});
|
|
63
68
|
let customContainerStyles = {
|
|
64
69
|
width: '100%'
|
|
65
70
|
};
|
|
@@ -99,7 +104,7 @@ function ExtensionWithPluginState(props) {
|
|
|
99
104
|
className: classNames,
|
|
100
105
|
css: wrapperStyle,
|
|
101
106
|
style: customContainerStyles,
|
|
102
|
-
|
|
107
|
+
onMouseEnter: () => handleMouseEvent(true),
|
|
103
108
|
onMouseLeave: () => handleMouseEvent(false)
|
|
104
109
|
}, jsx("div", {
|
|
105
110
|
className: `extension-overflow-wrapper ${hasBody ? 'with-body' : ''}`
|
|
@@ -116,11 +121,11 @@ function ExtensionWithPluginState(props) {
|
|
|
116
121
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
117
122
|
}), children), hasBody && jsx("div", {
|
|
118
123
|
css: newContentStyles,
|
|
119
|
-
className:
|
|
124
|
+
className: newContentClassNames
|
|
120
125
|
}, jsx("div", {
|
|
121
126
|
css: content,
|
|
122
127
|
ref: handleContentDOMRef,
|
|
123
|
-
className:
|
|
128
|
+
className: contentClassNames
|
|
124
129
|
})))));
|
|
125
130
|
}
|
|
126
131
|
const Extension = props => {
|
|
@@ -10,6 +10,12 @@ export const wrapperStyle = css(wrapperDefault, {
|
|
|
10
10
|
width: '100%',
|
|
11
11
|
'.extension-overflow-wrapper:not(.with-body)': {
|
|
12
12
|
overflowX: 'auto'
|
|
13
|
+
},
|
|
14
|
+
'&.with-border': {
|
|
15
|
+
border: `1px solid transparent` // adding this so macro doesn't jump when hover border is shown
|
|
16
|
+
},
|
|
17
|
+
'&.with-hover-border': {
|
|
18
|
+
border: `1px solid ${`var(--ds-border, ${N30})`}`
|
|
13
19
|
}
|
|
14
20
|
});
|
|
15
21
|
export const header = css({
|
|
@@ -28,7 +34,10 @@ export const content = css({
|
|
|
28
34
|
border: `1px solid ${`var(--ds-border, ${N30})`}`,
|
|
29
35
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
30
36
|
cursor: 'initial',
|
|
31
|
-
width: '100%'
|
|
37
|
+
width: '100%',
|
|
38
|
+
'&.remove-border': {
|
|
39
|
+
border: 'none'
|
|
40
|
+
}
|
|
32
41
|
});
|
|
33
42
|
export const contentWrapper = css({
|
|
34
43
|
padding: `0 ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
@@ -38,7 +38,7 @@ const InlineExtension = props => {
|
|
|
38
38
|
}), jsx("div", {
|
|
39
39
|
css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyels],
|
|
40
40
|
className: `extension-container inline ${className}`,
|
|
41
|
-
|
|
41
|
+
onMouseEnter: () => handleMouseEvent(true),
|
|
42
42
|
onMouseLeave: () => handleMouseEvent(false)
|
|
43
43
|
}, jsx("div", {
|
|
44
44
|
css: overlay,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { B400, B50, N300, N500 } from '@atlaskit/theme/colors';
|
|
6
|
+
export const labelStyles = css({
|
|
7
|
+
display: 'inline-flex',
|
|
8
|
+
width: 'max-content',
|
|
9
|
+
justifyContent: 'left',
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
// Unfortunately, these need to be these exact numbers - otherwise there will be a gap/noticeable overlap
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
13
|
+
top: '-18px',
|
|
14
|
+
'&.inline-extension': {
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
16
|
+
top: '-17px'
|
|
17
|
+
},
|
|
18
|
+
background: `var(--ds-background-accent-gray-subtle-pressed, ${N300})`,
|
|
19
|
+
color: `var(--ds-text-subtle, ${N500})`,
|
|
20
|
+
'&.selected': {
|
|
21
|
+
backgroundColor: `var(--ds-background-selected, ${B50})`,
|
|
22
|
+
color: `var(--ds-text-selected, ${B400})`
|
|
23
|
+
},
|
|
24
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
25
|
+
lineHeight: 1,
|
|
26
|
+
marginLeft: "var(--ds-space-150, 12px)"
|
|
27
|
+
});
|
|
28
|
+
const textStyles = css({
|
|
29
|
+
fontSize: '14px',
|
|
30
|
+
fontWeight: 'normal',
|
|
31
|
+
padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}`
|
|
32
|
+
});
|
|
33
|
+
export const ExtensionLabel = ({
|
|
34
|
+
text,
|
|
35
|
+
extensionName,
|
|
36
|
+
isNodeSelected,
|
|
37
|
+
customContainerStyles
|
|
38
|
+
}) => {
|
|
39
|
+
const classNames = classnames('extension-title', 'extension-label', {
|
|
40
|
+
'inline-extension': extensionName === 'inlineExtension',
|
|
41
|
+
selected: isNodeSelected
|
|
42
|
+
});
|
|
43
|
+
return jsx("div", {
|
|
44
|
+
style: customContainerStyles
|
|
45
|
+
}, jsx("span", {
|
|
46
|
+
"data-testid": "new-lozenge",
|
|
47
|
+
css: labelStyles,
|
|
48
|
+
className: classNames
|
|
49
|
+
}, jsx("span", {
|
|
50
|
+
css: textStyles
|
|
51
|
+
}, text)));
|
|
52
|
+
};
|
package/dist/es2019/extensibility/Extension/{LozengeComponent.js → Lozenge/LozengeComponent.js}
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import classnames from 'classnames';
|
|
5
4
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { placeholderFallback, placeholderFallbackParams } from '../styles';
|
|
6
|
+
import { ExtensionLabel } from './ExtensionLabel';
|
|
8
7
|
export const ICON_SIZE = 24;
|
|
9
8
|
const capitalizeFirstLetter = str => {
|
|
10
9
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -22,18 +21,12 @@ export const LozengeComponent = ({
|
|
|
22
21
|
}) => {
|
|
23
22
|
const capitalizedTitle = capitalizeFirstLetter(title);
|
|
24
23
|
if (showMacroInteractionDesignUpdates && (isNodeHovered || isNodeSelected)) {
|
|
25
|
-
|
|
26
|
-
'inline-extension': extensionName === 'inlineExtension'
|
|
27
|
-
});
|
|
28
|
-
return jsx("div", {
|
|
29
|
-
className: lozengeClassNames,
|
|
30
|
-
css: lozengeWrapper,
|
|
31
|
-
"data-testid": "new-lozenge",
|
|
32
|
-
style: customContainerStyles
|
|
33
|
-
}, jsx(Tag, {
|
|
24
|
+
return jsx(ExtensionLabel, {
|
|
34
25
|
text: capitalizedTitle,
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
extensionName: extensionName,
|
|
27
|
+
isNodeSelected: isNodeSelected,
|
|
28
|
+
customContainerStyles: customContainerStyles
|
|
29
|
+
});
|
|
37
30
|
} else if (!showMacroInteractionDesignUpdates) {
|
|
38
31
|
const isBlockExtension = extensionName === 'extension';
|
|
39
32
|
return jsx("div", {
|
|
@@ -3,9 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Component } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import { getExtensionLozengeData } from '
|
|
6
|
+
import { getExtensionLozengeData } from '../../../utils';
|
|
7
|
+
import { styledImage } from '../styles';
|
|
7
8
|
import { LozengeComponent } from './LozengeComponent';
|
|
8
|
-
import { styledImage } from './styles';
|
|
9
9
|
export default class ExtensionLozenge extends Component {
|
|
10
10
|
constructor(...args) {
|
|
11
11
|
super(...args);
|
|
@@ -51,16 +51,4 @@ export const styledImage = css({
|
|
|
51
51
|
/* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */
|
|
52
52
|
/* stylelint-disable-next-line */
|
|
53
53
|
label: 'lozenge-image'
|
|
54
|
-
});
|
|
55
|
-
export const lozengeWrapper = css({
|
|
56
|
-
display: 'flex',
|
|
57
|
-
justifyContent: 'left',
|
|
58
|
-
width: '100%',
|
|
59
|
-
marginLeft: "var(--ds-space-050, 4px)",
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
top: "var(--ds-space-negative-300, -24px)",
|
|
62
|
-
'&.inline-extension': {
|
|
63
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
64
|
-
top: '-23px' // Unfortunately, this needs to be this exact number - otherwise there will be a gap/noticeable overlap
|
|
65
|
-
}
|
|
66
54
|
});
|
|
@@ -7,7 +7,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
9
9
|
import { useSharedPluginState } from '../../hooks';
|
|
10
|
-
import {
|
|
10
|
+
import { removeMarginsAndBorder, sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
|
|
11
11
|
import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
|
|
12
12
|
import { WithPluginState } from '../../with-plugin-state';
|
|
13
13
|
import ExtensionLozenge from '../Extension/Lozenge';
|
|
@@ -89,7 +89,7 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
89
89
|
return handleContentDOMRef(node);
|
|
90
90
|
}, [handleContentDOMRef]);
|
|
91
91
|
const containerCssExtended = css(sharedMultiBodiedExtensionStyles.mbeExtensionContainer, {
|
|
92
|
-
[`.multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true']:nth-of-type(${activeChildIndex + 1})`]: css(sharedMultiBodiedExtensionStyles.extensionFrameContent, showMacroInteractionDesignUpdates &&
|
|
92
|
+
[`.multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true']:nth-of-type(${activeChildIndex + 1})`]: css(sharedMultiBodiedExtensionStyles.extensionFrameContent, showMacroInteractionDesignUpdates && removeMarginsAndBorder)
|
|
93
93
|
});
|
|
94
94
|
const shouldBreakout =
|
|
95
95
|
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
@@ -108,13 +108,16 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
108
108
|
mbeWrapperStyles = breakoutStyles;
|
|
109
109
|
}
|
|
110
110
|
const wrapperClassNames = classnames('multiBodiedExtension--wrapper', 'extension-container', 'block', {
|
|
111
|
-
'remove-margin-top': showMacroInteractionDesignUpdates
|
|
111
|
+
'remove-margin-top': showMacroInteractionDesignUpdates,
|
|
112
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
113
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
|
|
112
114
|
});
|
|
113
115
|
const containerClassNames = classnames('multiBodiedExtension--container', {
|
|
114
116
|
'remove-padding': showMacroInteractionDesignUpdates
|
|
115
117
|
});
|
|
116
118
|
const navigationClassNames = classnames('multiBodiedExtension--navigation', {
|
|
117
|
-
'remove-margins': showMacroInteractionDesignUpdates
|
|
119
|
+
'remove-margins': showMacroInteractionDesignUpdates,
|
|
120
|
+
'remove-border': showMacroInteractionDesignUpdates
|
|
118
121
|
});
|
|
119
122
|
const handleMouseEvent = didHover => {
|
|
120
123
|
if (setIsNodeHovered) {
|
|
@@ -132,7 +135,7 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
132
135
|
css: mbeExtensionWrapperCSS,
|
|
133
136
|
"data-testid": "multiBodiedExtension--wrapper",
|
|
134
137
|
style: mbeWrapperStyles,
|
|
135
|
-
|
|
138
|
+
onMouseEnter: () => handleMouseEvent(true),
|
|
136
139
|
onMouseLeave: () => handleMouseEvent(false)
|
|
137
140
|
}, getWrapperTitleContent(imageData, title, showMacroInteractionDesignUpdates), jsx("div", {
|
|
138
141
|
className: containerClassNames,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { N0, N30 } from '@atlaskit/theme/colors';
|
|
2
3
|
import { wrapperDefault } from '../Extension/styles';
|
|
3
4
|
|
|
4
5
|
// Wrapper the extension title and extensionContainer
|
|
@@ -17,5 +18,11 @@ export const mbeExtensionWrapperCSS = css(wrapperDefault, {
|
|
|
17
18
|
marginLeft: `${"var(--ds-space-050, 4px)"} !important`,
|
|
18
19
|
marginRight: "var(--ds-space-100, 8px)",
|
|
19
20
|
paddingTop: `${"var(--ds-space-100, 8px)"} !important`
|
|
21
|
+
},
|
|
22
|
+
'&.with-border': {
|
|
23
|
+
border: `1px solid ${`var(--ds-border-inverse, ${N0})`}` // adding this so macro doesn't jump when hover border is shown
|
|
24
|
+
},
|
|
25
|
+
'&.with-hover-border': {
|
|
26
|
+
border: `1px solid ${`var(--ds-border, ${N30})`}`
|
|
20
27
|
}
|
|
21
28
|
});
|
|
@@ -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.
|
|
3
|
+
const packageVersion = "78.17.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
|
|
@@ -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.
|
|
10
|
+
const packageVersion = "78.17.0";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -42,6 +42,9 @@ const mbeNavigation = css({
|
|
|
42
42
|
'&.remove-margins': {
|
|
43
43
|
marginLeft: 0,
|
|
44
44
|
marginRight: 0
|
|
45
|
+
},
|
|
46
|
+
'&.remove-border': {
|
|
47
|
+
border: 'none'
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
const extensionFrameContent = css({
|
|
@@ -66,9 +69,10 @@ const extensionFrameContent = css({
|
|
|
66
69
|
marginTop: `${"var(--ds-space-100, 8px)"} !important`
|
|
67
70
|
}
|
|
68
71
|
});
|
|
69
|
-
export const
|
|
72
|
+
export const removeMarginsAndBorder = css({
|
|
70
73
|
marginLeft: 0,
|
|
71
|
-
marginRight: 0
|
|
74
|
+
marginRight: 0,
|
|
75
|
+
border: 'none'
|
|
72
76
|
});
|
|
73
77
|
export const sharedMultiBodiedExtensionStyles = {
|
|
74
78
|
mbeExtensionContainer,
|
|
@@ -51,16 +51,21 @@ function ExtensionWithPluginState(props) {
|
|
|
51
51
|
// Extension breakout state should not be respected when the editor appearance is full-width mode
|
|
52
52
|
editorAppearance !== 'full-width';
|
|
53
53
|
var classNames = classnames('extension-container', 'block', shadowClassNames, _defineProperty({
|
|
54
|
-
'with-overlay': !hasBody,
|
|
54
|
+
'with-overlay': !hasBody && !showMacroInteractionDesignUpdates,
|
|
55
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
56
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered,
|
|
55
57
|
'without-frame': removeBorder
|
|
56
58
|
}, widerLayoutClassName, shouldBreakout));
|
|
57
59
|
var headerClassNames = classnames({
|
|
58
60
|
'with-children': hasChildren,
|
|
59
61
|
'without-frame': removeBorder
|
|
60
62
|
});
|
|
61
|
-
var
|
|
63
|
+
var newContentClassNames = classnames({
|
|
62
64
|
'remove-padding': showMacroInteractionDesignUpdates
|
|
63
65
|
});
|
|
66
|
+
var contentClassNames = classnames('extension-content', 'block', {
|
|
67
|
+
'remove-border': showMacroInteractionDesignUpdates
|
|
68
|
+
});
|
|
64
69
|
var customContainerStyles = {
|
|
65
70
|
width: '100%'
|
|
66
71
|
};
|
|
@@ -94,7 +99,7 @@ function ExtensionWithPluginState(props) {
|
|
|
94
99
|
className: classNames,
|
|
95
100
|
css: wrapperStyle,
|
|
96
101
|
style: customContainerStyles,
|
|
97
|
-
|
|
102
|
+
onMouseEnter: function onMouseEnter() {
|
|
98
103
|
return handleMouseEvent(true);
|
|
99
104
|
},
|
|
100
105
|
onMouseLeave: function onMouseLeave() {
|
|
@@ -115,11 +120,11 @@ function ExtensionWithPluginState(props) {
|
|
|
115
120
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
116
121
|
}), children), hasBody && jsx("div", {
|
|
117
122
|
css: newContentStyles,
|
|
118
|
-
className:
|
|
123
|
+
className: newContentClassNames
|
|
119
124
|
}, jsx("div", {
|
|
120
125
|
css: content,
|
|
121
126
|
ref: handleContentDOMRef,
|
|
122
|
-
className:
|
|
127
|
+
className: contentClassNames
|
|
123
128
|
})))));
|
|
124
129
|
}
|
|
125
130
|
var Extension = function Extension(props) {
|
|
@@ -10,6 +10,12 @@ export var wrapperStyle = css(wrapperDefault, {
|
|
|
10
10
|
width: '100%',
|
|
11
11
|
'.extension-overflow-wrapper:not(.with-body)': {
|
|
12
12
|
overflowX: 'auto'
|
|
13
|
+
},
|
|
14
|
+
'&.with-border': {
|
|
15
|
+
border: "1px solid transparent" // adding this so macro doesn't jump when hover border is shown
|
|
16
|
+
},
|
|
17
|
+
'&.with-hover-border': {
|
|
18
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N30, ")"))
|
|
13
19
|
}
|
|
14
20
|
});
|
|
15
21
|
export var header = css({
|
|
@@ -28,7 +34,10 @@ export var content = css({
|
|
|
28
34
|
border: "1px solid ".concat("var(--ds-border, ".concat(N30, ")")),
|
|
29
35
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
30
36
|
cursor: 'initial',
|
|
31
|
-
width: '100%'
|
|
37
|
+
width: '100%',
|
|
38
|
+
'&.remove-border': {
|
|
39
|
+
border: 'none'
|
|
40
|
+
}
|
|
32
41
|
});
|
|
33
42
|
export var contentWrapper = css({
|
|
34
43
|
padding: "0 ".concat("var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)"),
|
|
@@ -35,7 +35,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
35
35
|
}), jsx("div", {
|
|
36
36
|
css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyels],
|
|
37
37
|
className: "extension-container inline ".concat(className),
|
|
38
|
-
|
|
38
|
+
onMouseEnter: function onMouseEnter() {
|
|
39
39
|
return handleMouseEvent(true);
|
|
40
40
|
},
|
|
41
41
|
onMouseLeave: function onMouseLeave() {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { B400, B50, N300, N500 } from '@atlaskit/theme/colors';
|
|
6
|
+
export var labelStyles = css({
|
|
7
|
+
display: 'inline-flex',
|
|
8
|
+
width: 'max-content',
|
|
9
|
+
justifyContent: 'left',
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
// Unfortunately, these need to be these exact numbers - otherwise there will be a gap/noticeable overlap
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
13
|
+
top: '-18px',
|
|
14
|
+
'&.inline-extension': {
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
16
|
+
top: '-17px'
|
|
17
|
+
},
|
|
18
|
+
background: "var(--ds-background-accent-gray-subtle-pressed, ".concat(N300, ")"),
|
|
19
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
20
|
+
'&.selected': {
|
|
21
|
+
backgroundColor: "var(--ds-background-selected, ".concat(B50, ")"),
|
|
22
|
+
color: "var(--ds-text-selected, ".concat(B400, ")")
|
|
23
|
+
},
|
|
24
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
25
|
+
lineHeight: 1,
|
|
26
|
+
marginLeft: "var(--ds-space-150, 12px)"
|
|
27
|
+
});
|
|
28
|
+
var textStyles = css({
|
|
29
|
+
fontSize: '14px',
|
|
30
|
+
fontWeight: 'normal',
|
|
31
|
+
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
32
|
+
});
|
|
33
|
+
export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
34
|
+
var text = _ref.text,
|
|
35
|
+
extensionName = _ref.extensionName,
|
|
36
|
+
isNodeSelected = _ref.isNodeSelected,
|
|
37
|
+
customContainerStyles = _ref.customContainerStyles;
|
|
38
|
+
var classNames = classnames('extension-title', 'extension-label', {
|
|
39
|
+
'inline-extension': extensionName === 'inlineExtension',
|
|
40
|
+
selected: isNodeSelected
|
|
41
|
+
});
|
|
42
|
+
return jsx("div", {
|
|
43
|
+
style: customContainerStyles
|
|
44
|
+
}, jsx("span", {
|
|
45
|
+
"data-testid": "new-lozenge",
|
|
46
|
+
css: labelStyles,
|
|
47
|
+
className: classNames
|
|
48
|
+
}, jsx("span", {
|
|
49
|
+
css: textStyles
|
|
50
|
+
}, text)));
|
|
51
|
+
};
|
package/dist/esm/extensibility/Extension/{LozengeComponent.js → Lozenge/LozengeComponent.js}
RENAMED
|
@@ -4,10 +4,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import classnames from 'classnames';
|
|
8
7
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { placeholderFallback, placeholderFallbackParams } from '../styles';
|
|
9
|
+
import { ExtensionLabel } from './ExtensionLabel';
|
|
11
10
|
export var ICON_SIZE = 24;
|
|
12
11
|
var capitalizeFirstLetter = function capitalizeFirstLetter(str) {
|
|
13
12
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -24,18 +23,12 @@ export var LozengeComponent = function LozengeComponent(_ref) {
|
|
|
24
23
|
isNodeHovered = _ref.isNodeHovered;
|
|
25
24
|
var capitalizedTitle = capitalizeFirstLetter(title);
|
|
26
25
|
if (showMacroInteractionDesignUpdates && (isNodeHovered || isNodeSelected)) {
|
|
27
|
-
|
|
28
|
-
'inline-extension': extensionName === 'inlineExtension'
|
|
29
|
-
});
|
|
30
|
-
return jsx("div", {
|
|
31
|
-
className: lozengeClassNames,
|
|
32
|
-
css: lozengeWrapper,
|
|
33
|
-
"data-testid": "new-lozenge",
|
|
34
|
-
style: customContainerStyles
|
|
35
|
-
}, jsx(Tag, {
|
|
26
|
+
return jsx(ExtensionLabel, {
|
|
36
27
|
text: capitalizedTitle,
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
extensionName: extensionName,
|
|
29
|
+
isNodeSelected: isNodeSelected,
|
|
30
|
+
customContainerStyles: customContainerStyles
|
|
31
|
+
});
|
|
39
32
|
} else if (!showMacroInteractionDesignUpdates) {
|
|
40
33
|
var isBlockExtension = extensionName === 'extension';
|
|
41
34
|
return jsx("div", {
|
|
@@ -13,9 +13,9 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
import { Component } from 'react';
|
|
15
15
|
import { jsx } from '@emotion/react';
|
|
16
|
-
import { getExtensionLozengeData } from '
|
|
16
|
+
import { getExtensionLozengeData } from '../../../utils';
|
|
17
|
+
import { styledImage } from '../styles';
|
|
17
18
|
import { LozengeComponent } from './LozengeComponent';
|
|
18
|
-
import { styledImage } from './styles';
|
|
19
19
|
var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
20
20
|
_inherits(ExtensionLozenge, _Component);
|
|
21
21
|
var _super = _createSuper(ExtensionLozenge);
|
|
@@ -51,16 +51,4 @@ export var styledImage = css({
|
|
|
51
51
|
/* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */
|
|
52
52
|
/* stylelint-disable-next-line */
|
|
53
53
|
label: 'lozenge-image'
|
|
54
|
-
});
|
|
55
|
-
export var lozengeWrapper = css({
|
|
56
|
-
display: 'flex',
|
|
57
|
-
justifyContent: 'left',
|
|
58
|
-
width: '100%',
|
|
59
|
-
marginLeft: "var(--ds-space-050, 4px)",
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
top: "var(--ds-space-negative-300, -24px)",
|
|
62
|
-
'&.inline-extension': {
|
|
63
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
64
|
-
top: '-23px' // Unfortunately, this needs to be this exact number - otherwise there will be a gap/noticeable overlap
|
|
65
|
-
}
|
|
66
54
|
});
|
|
@@ -12,7 +12,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
12
12
|
import classnames from 'classnames';
|
|
13
13
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
14
14
|
import { useSharedPluginState } from '../../hooks';
|
|
15
|
-
import {
|
|
15
|
+
import { removeMarginsAndBorder, sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
|
|
16
16
|
import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
|
|
17
17
|
import { WithPluginState } from '../../with-plugin-state';
|
|
18
18
|
import ExtensionLozenge from '../Extension/Lozenge';
|
|
@@ -92,7 +92,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
92
92
|
var articleRef = React.useCallback(function (node) {
|
|
93
93
|
return handleContentDOMRef(node);
|
|
94
94
|
}, [handleContentDOMRef]);
|
|
95
|
-
var containerCssExtended = css(sharedMultiBodiedExtensionStyles.mbeExtensionContainer, _defineProperty({}, ".multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true']:nth-of-type(".concat(activeChildIndex + 1, ")"), css(sharedMultiBodiedExtensionStyles.extensionFrameContent, showMacroInteractionDesignUpdates &&
|
|
95
|
+
var containerCssExtended = css(sharedMultiBodiedExtensionStyles.mbeExtensionContainer, _defineProperty({}, ".multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true']:nth-of-type(".concat(activeChildIndex + 1, ")"), css(sharedMultiBodiedExtensionStyles.extensionFrameContent, showMacroInteractionDesignUpdates && removeMarginsAndBorder)));
|
|
96
96
|
var shouldBreakout =
|
|
97
97
|
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
98
98
|
['full-width', 'wide'].includes(node.attrs.layout) &&
|
|
@@ -109,13 +109,16 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
109
109
|
mbeWrapperStyles = breakoutStyles;
|
|
110
110
|
}
|
|
111
111
|
var wrapperClassNames = classnames('multiBodiedExtension--wrapper', 'extension-container', 'block', {
|
|
112
|
-
'remove-margin-top': showMacroInteractionDesignUpdates
|
|
112
|
+
'remove-margin-top': showMacroInteractionDesignUpdates,
|
|
113
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
114
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
|
|
113
115
|
});
|
|
114
116
|
var containerClassNames = classnames('multiBodiedExtension--container', {
|
|
115
117
|
'remove-padding': showMacroInteractionDesignUpdates
|
|
116
118
|
});
|
|
117
119
|
var navigationClassNames = classnames('multiBodiedExtension--navigation', {
|
|
118
|
-
'remove-margins': showMacroInteractionDesignUpdates
|
|
120
|
+
'remove-margins': showMacroInteractionDesignUpdates,
|
|
121
|
+
'remove-border': showMacroInteractionDesignUpdates
|
|
119
122
|
});
|
|
120
123
|
var handleMouseEvent = function handleMouseEvent(didHover) {
|
|
121
124
|
if (setIsNodeHovered) {
|
|
@@ -133,7 +136,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
133
136
|
css: mbeExtensionWrapperCSS,
|
|
134
137
|
"data-testid": "multiBodiedExtension--wrapper",
|
|
135
138
|
style: mbeWrapperStyles,
|
|
136
|
-
|
|
139
|
+
onMouseEnter: function onMouseEnter() {
|
|
137
140
|
return handleMouseEvent(true);
|
|
138
141
|
},
|
|
139
142
|
onMouseLeave: function onMouseLeave() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { N0, N30 } from '@atlaskit/theme/colors';
|
|
2
3
|
import { wrapperDefault } from '../Extension/styles';
|
|
3
4
|
|
|
4
5
|
// Wrapper the extension title and extensionContainer
|
|
@@ -17,5 +18,11 @@ export var mbeExtensionWrapperCSS = css(wrapperDefault, {
|
|
|
17
18
|
marginLeft: "var(--ds-space-050, 4px)".concat(" !important"),
|
|
18
19
|
marginRight: "var(--ds-space-100, 8px)",
|
|
19
20
|
paddingTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
21
|
+
},
|
|
22
|
+
'&.with-border': {
|
|
23
|
+
border: "1px solid ".concat("var(--ds-border-inverse, ".concat(N0, ")")) // adding this so macro doesn't jump when hover border is shown
|
|
24
|
+
},
|
|
25
|
+
'&.with-hover-border': {
|
|
26
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N30, ")"))
|
|
20
27
|
}
|
|
21
28
|
});
|
|
@@ -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.
|
|
9
|
+
var packageVersion = "78.17.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
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "78.
|
|
20
|
+
var packageVersion = "78.17.0";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -42,6 +42,9 @@ var mbeNavigation = css({
|
|
|
42
42
|
'&.remove-margins': {
|
|
43
43
|
marginLeft: 0,
|
|
44
44
|
marginRight: 0
|
|
45
|
+
},
|
|
46
|
+
'&.remove-border': {
|
|
47
|
+
border: 'none'
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
var extensionFrameContent = css({
|
|
@@ -66,9 +69,10 @@ var extensionFrameContent = css({
|
|
|
66
69
|
marginTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
67
70
|
}
|
|
68
71
|
});
|
|
69
|
-
export var
|
|
72
|
+
export var removeMarginsAndBorder = css({
|
|
70
73
|
marginLeft: 0,
|
|
71
|
-
marginRight: 0
|
|
74
|
+
marginRight: 0,
|
|
75
|
+
border: 'none'
|
|
72
76
|
});
|
|
73
77
|
export var sharedMultiBodiedExtensionStyles = {
|
|
74
78
|
mbeExtensionContainer: mbeExtensionContainer,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
export declare const labelStyles: import("@emotion/react").SerializedStyles;
|
|
5
|
+
type ExtensionLabelProps = {
|
|
6
|
+
text: string;
|
|
7
|
+
extensionName: string;
|
|
8
|
+
isNodeSelected?: boolean;
|
|
9
|
+
customContainerStyles?: CSSProperties;
|
|
10
|
+
};
|
|
11
|
+
export declare const ExtensionLabel: ({ text, extensionName, isNodeSelected, customContainerStyles, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
12
|
+
export {};
|
package/dist/types/extensibility/Extension/{LozengeComponent.d.ts → Lozenge/LozengeComponent.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import type { CSSProperties } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import type { LozengeData } from './
|
|
4
|
+
import type { LozengeData } from './index';
|
|
5
5
|
export declare const ICON_SIZE = 24;
|
|
6
6
|
type LozengeComponentProps = {
|
|
7
7
|
lozengeData?: LozengeData;
|
|
@@ -5,4 +5,3 @@ export declare const overlay: import("@emotion/react").SerializedStyles;
|
|
|
5
5
|
export declare const placeholderFallback: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const placeholderFallbackParams: import("@emotion/react").SerializedStyles;
|
|
7
7
|
export declare const styledImage: import("@emotion/react").SerializedStyles;
|
|
8
|
-
export declare const lozengeWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '../analytics';
|
|
1
|
+
import type { INPUT_METHOD } from '../analytics';
|
|
2
2
|
/**
|
|
3
3
|
* Configuration for the Text Formatting plugin
|
|
4
4
|
*/
|
|
@@ -7,6 +7,7 @@ export interface TextFormattingOptions {
|
|
|
7
7
|
disableUnderline?: boolean;
|
|
8
8
|
disableCode?: boolean;
|
|
9
9
|
disableSmartTextCompletion?: boolean;
|
|
10
|
+
disableStrikethrough?: boolean;
|
|
10
11
|
responsiveToolbarMenu?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface TextFormattingState {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const removeMarginsAndBorder: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const sharedMultiBodiedExtensionStyles: {
|
|
4
4
|
mbeExtensionContainer: import("@emotion/react").SerializedStyles;
|
|
5
5
|
mbeNavigation: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
export declare const labelStyles: import("@emotion/react").SerializedStyles;
|
|
5
|
+
type ExtensionLabelProps = {
|
|
6
|
+
text: string;
|
|
7
|
+
extensionName: string;
|
|
8
|
+
isNodeSelected?: boolean;
|
|
9
|
+
customContainerStyles?: CSSProperties;
|
|
10
|
+
};
|
|
11
|
+
export declare const ExtensionLabel: ({ text, extensionName, isNodeSelected, customContainerStyles, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import type { CSSProperties } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import type { LozengeData } from './
|
|
4
|
+
import type { LozengeData } from './index';
|
|
5
5
|
export declare const ICON_SIZE = 24;
|
|
6
6
|
type LozengeComponentProps = {
|
|
7
7
|
lozengeData?: LozengeData;
|
|
@@ -5,4 +5,3 @@ export declare const overlay: import("@emotion/react").SerializedStyles;
|
|
|
5
5
|
export declare const placeholderFallback: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const placeholderFallbackParams: import("@emotion/react").SerializedStyles;
|
|
7
7
|
export declare const styledImage: import("@emotion/react").SerializedStyles;
|
|
8
|
-
export declare const lozengeWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '../analytics';
|
|
1
|
+
import type { INPUT_METHOD } from '../analytics';
|
|
2
2
|
/**
|
|
3
3
|
* Configuration for the Text Formatting plugin
|
|
4
4
|
*/
|
|
@@ -7,6 +7,7 @@ export interface TextFormattingOptions {
|
|
|
7
7
|
disableUnderline?: boolean;
|
|
8
8
|
disableCode?: boolean;
|
|
9
9
|
disableSmartTextCompletion?: boolean;
|
|
10
|
+
disableStrikethrough?: boolean;
|
|
10
11
|
responsiveToolbarMenu?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface TextFormattingState {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const removeMarginsAndBorder: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const sharedMultiBodiedExtensionStyles: {
|
|
4
4
|
mbeExtensionContainer: import("@emotion/react").SerializedStyles;
|
|
5
5
|
mbeNavigation: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "78.
|
|
3
|
+
"version": "78.17.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/"
|
|
@@ -126,17 +126,16 @@
|
|
|
126
126
|
"@atlaskit/mention": "^23.0.0",
|
|
127
127
|
"@atlaskit/menu": "^2.1.0",
|
|
128
128
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
129
|
-
"@atlaskit/primitives": "^5.
|
|
129
|
+
"@atlaskit/primitives": "^5.1.0",
|
|
130
130
|
"@atlaskit/profilecard": "^19.11.0",
|
|
131
131
|
"@atlaskit/section-message": "^6.4.0",
|
|
132
132
|
"@atlaskit/smart-card": "^26.50.0",
|
|
133
133
|
"@atlaskit/smart-user-picker": "^6.9.0",
|
|
134
134
|
"@atlaskit/spinner": "^16.0.0",
|
|
135
|
-
"@atlaskit/tag": "^12.0.0",
|
|
136
135
|
"@atlaskit/task-decision": "^17.9.0",
|
|
137
136
|
"@atlaskit/textfield": "^6.1.0",
|
|
138
137
|
"@atlaskit/theme": "^12.6.0",
|
|
139
|
-
"@atlaskit/tokens": "^1.
|
|
138
|
+
"@atlaskit/tokens": "^1.42.0",
|
|
140
139
|
"@atlaskit/tooltip": "^18.1.0",
|
|
141
140
|
"@atlaskit/ufo": "^0.2.0",
|
|
142
141
|
"@atlaskit/width-detector": "^4.1.0",
|
|
File without changes
|
|
File without changes
|