@atlaskit/editor-common 78.26.5 → 78.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +6 -3
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +9 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +7 -4
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +8 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +7 -4
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +8 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/card/cardOptions.d.ts +4 -0
- package/dist/types/extensibility/Extension/InlineExtension/styles.d.ts +1 -1
- package/dist/types-ts4.5/card/cardOptions.d.ts +4 -0
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/styles.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.27.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#90864](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90864) [`c8a41fe8962b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c8a41fe8962b) - [ux] Removes hover overlay and adds hover border for inline macros for macro interaction design update
|
|
8
|
+
|
|
9
|
+
## 78.27.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#89386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89386) [`91d0fdc31828`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/91d0fdc31828) - Updates card plugin to leverage hyperlink plugins addToolbarItems action in order to inject link preferences button into the hyperlink floating toolbar. Also adds support to configure the link via card plugin options (smart links). Requires platform feature flag `platform.editor.card.inject-settings-button`.
|
|
14
|
+
|
|
15
|
+
Example usage:
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<Editor
|
|
19
|
+
linking={{ smartLinks: { userPreferencesLink: 'https://example.com' } }}
|
|
20
|
+
{...restProps}
|
|
21
|
+
/>
|
|
22
|
+
```
|
|
23
|
+
|
|
3
24
|
## 78.26.5
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -31,9 +31,12 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
31
31
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
|
|
32
32
|
widthState = _useSharedPluginState.widthState;
|
|
33
33
|
var hasChildren = !!children;
|
|
34
|
-
var classNames = (0, _classnames.default)('extension-container', 'inline',
|
|
34
|
+
var classNames = (0, _classnames.default)('extension-container', 'inline', {
|
|
35
|
+
'with-overlay': !showMacroInteractionDesignUpdates,
|
|
35
36
|
'with-children': hasChildren,
|
|
36
|
-
'with-danger-overlay': showMacroInteractionDesignUpdates
|
|
37
|
+
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
38
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
39
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
|
|
37
40
|
});
|
|
38
41
|
var rendererContainerWidth = widthState ? widthState.width - _editorSharedStyles.akEditorGutterPadding * 2 : 0;
|
|
39
42
|
var extendedInlineExtension = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.inline_extension.extended_lcqdn') || false;
|
|
@@ -49,7 +52,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
49
52
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
50
53
|
}), (0, _react2.jsx)("div", {
|
|
51
54
|
"data-testid": "inline-extension-wrapper",
|
|
52
|
-
css: [_styles2.wrapperStyle, extendedInlineExtension && _styles2.
|
|
55
|
+
css: [_styles2.wrapperStyle, extendedInlineExtension && _styles2.inlineWrapperStyles],
|
|
53
56
|
className: classNames,
|
|
54
57
|
onMouseEnter: function onMouseEnter() {
|
|
55
58
|
return handleMouseEvent(true);
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.wrapperStyle = exports.
|
|
6
|
+
exports.wrapperStyle = exports.inlineWrapperStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
8
9
|
var _styles = require("../styles");
|
|
9
10
|
var wrapperStyle = exports.wrapperStyle = (0, _react.css)(_styles.wrapperDefault, {
|
|
10
11
|
cursor: 'pointer',
|
|
@@ -22,9 +23,15 @@ var wrapperStyle = exports.wrapperStyle = (0, _react.css)(_styles.wrapperDefault
|
|
|
22
23
|
'&.with-children': {
|
|
23
24
|
padding: 0,
|
|
24
25
|
background: "var(--ds-background-neutral-subtle, white)"
|
|
26
|
+
},
|
|
27
|
+
'&.with-border': {
|
|
28
|
+
border: "1px solid transparent" // 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-input, ".concat(_colors.N500, ")"))
|
|
25
32
|
}
|
|
26
33
|
});
|
|
27
|
-
var
|
|
34
|
+
var inlineWrapperStyles = exports.inlineWrapperStyles = (0, _react.css)({
|
|
28
35
|
maxWidth: '100%',
|
|
29
36
|
'tr &': {
|
|
30
37
|
maxWidth: 'inherit'
|
|
@@ -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.27.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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.27.1";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -8,7 +8,7 @@ import { useSharedPluginState } from '../../../hooks';
|
|
|
8
8
|
import { createWidthContext, WidthContext } from '../../../ui';
|
|
9
9
|
import ExtensionLozenge from '../Lozenge';
|
|
10
10
|
import { overlay } from '../styles';
|
|
11
|
-
import {
|
|
11
|
+
import { inlineWrapperStyles, wrapperStyle } from './styles';
|
|
12
12
|
const InlineExtension = props => {
|
|
13
13
|
const {
|
|
14
14
|
node,
|
|
@@ -23,9 +23,12 @@ const InlineExtension = props => {
|
|
|
23
23
|
widthState
|
|
24
24
|
} = useSharedPluginState(pluginInjectionApi, ['width']);
|
|
25
25
|
const hasChildren = !!children;
|
|
26
|
-
const classNames = classnames('extension-container', 'inline',
|
|
26
|
+
const classNames = classnames('extension-container', 'inline', {
|
|
27
|
+
'with-overlay': !showMacroInteractionDesignUpdates,
|
|
27
28
|
'with-children': hasChildren,
|
|
28
|
-
'with-danger-overlay': showMacroInteractionDesignUpdates
|
|
29
|
+
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
30
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
31
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
|
|
29
32
|
});
|
|
30
33
|
const rendererContainerWidth = widthState ? widthState.width - akEditorGutterPadding * 2 : 0;
|
|
31
34
|
const extendedInlineExtension = getBooleanFF('platform.editor.inline_extension.extended_lcqdn') || false;
|
|
@@ -41,7 +44,7 @@ const InlineExtension = props => {
|
|
|
41
44
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
42
45
|
}), jsx("div", {
|
|
43
46
|
"data-testid": "inline-extension-wrapper",
|
|
44
|
-
css: [wrapperStyle, extendedInlineExtension &&
|
|
47
|
+
css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyles],
|
|
45
48
|
className: classNames,
|
|
46
49
|
onMouseEnter: () => handleMouseEvent(true),
|
|
47
50
|
onMouseLeave: () => handleMouseEvent(false)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { N500 } from '@atlaskit/theme/colors';
|
|
2
3
|
import { wrapperDefault } from '../styles';
|
|
3
4
|
export const wrapperStyle = css(wrapperDefault, {
|
|
4
5
|
cursor: 'pointer',
|
|
@@ -16,9 +17,15 @@ export const wrapperStyle = css(wrapperDefault, {
|
|
|
16
17
|
'&.with-children': {
|
|
17
18
|
padding: 0,
|
|
18
19
|
background: "var(--ds-background-neutral-subtle, white)"
|
|
20
|
+
},
|
|
21
|
+
'&.with-border': {
|
|
22
|
+
border: `1px solid transparent` // adding this so macro doesn't jump when hover border is shown
|
|
23
|
+
},
|
|
24
|
+
'&.with-hover-border': {
|
|
25
|
+
border: `1px solid ${`var(--ds-border-input, ${N500})`}`
|
|
19
26
|
}
|
|
20
27
|
});
|
|
21
|
-
export const
|
|
28
|
+
export const inlineWrapperStyles = css({
|
|
22
29
|
maxWidth: '100%',
|
|
23
30
|
'tr &': {
|
|
24
31
|
maxWidth: 'inherit'
|
|
@@ -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.27.1";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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.27.1";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -8,7 +8,7 @@ import { useSharedPluginState } from '../../../hooks';
|
|
|
8
8
|
import { createWidthContext, WidthContext } from '../../../ui';
|
|
9
9
|
import ExtensionLozenge from '../Lozenge';
|
|
10
10
|
import { overlay } from '../styles';
|
|
11
|
-
import {
|
|
11
|
+
import { inlineWrapperStyles, wrapperStyle } from './styles';
|
|
12
12
|
var InlineExtension = function InlineExtension(props) {
|
|
13
13
|
var node = props.node,
|
|
14
14
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
@@ -20,9 +20,12 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
20
20
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
21
21
|
widthState = _useSharedPluginState.widthState;
|
|
22
22
|
var hasChildren = !!children;
|
|
23
|
-
var classNames = classnames('extension-container', 'inline',
|
|
23
|
+
var classNames = classnames('extension-container', 'inline', {
|
|
24
|
+
'with-overlay': !showMacroInteractionDesignUpdates,
|
|
24
25
|
'with-children': hasChildren,
|
|
25
|
-
'with-danger-overlay': showMacroInteractionDesignUpdates
|
|
26
|
+
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
27
|
+
'with-border': showMacroInteractionDesignUpdates,
|
|
28
|
+
'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
|
|
26
29
|
});
|
|
27
30
|
var rendererContainerWidth = widthState ? widthState.width - akEditorGutterPadding * 2 : 0;
|
|
28
31
|
var extendedInlineExtension = getBooleanFF('platform.editor.inline_extension.extended_lcqdn') || false;
|
|
@@ -38,7 +41,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
38
41
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
39
42
|
}), jsx("div", {
|
|
40
43
|
"data-testid": "inline-extension-wrapper",
|
|
41
|
-
css: [wrapperStyle, extendedInlineExtension &&
|
|
44
|
+
css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyles],
|
|
42
45
|
className: classNames,
|
|
43
46
|
onMouseEnter: function onMouseEnter() {
|
|
44
47
|
return handleMouseEvent(true);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { N500 } from '@atlaskit/theme/colors';
|
|
2
3
|
import { wrapperDefault } from '../styles';
|
|
3
4
|
export var wrapperStyle = css(wrapperDefault, {
|
|
4
5
|
cursor: 'pointer',
|
|
@@ -16,9 +17,15 @@ export var wrapperStyle = css(wrapperDefault, {
|
|
|
16
17
|
'&.with-children': {
|
|
17
18
|
padding: 0,
|
|
18
19
|
background: "var(--ds-background-neutral-subtle, white)"
|
|
20
|
+
},
|
|
21
|
+
'&.with-border': {
|
|
22
|
+
border: "1px solid transparent" // adding this so macro doesn't jump when hover border is shown
|
|
23
|
+
},
|
|
24
|
+
'&.with-hover-border': {
|
|
25
|
+
border: "1px solid ".concat("var(--ds-border-input, ".concat(N500, ")"))
|
|
19
26
|
}
|
|
20
27
|
});
|
|
21
|
-
export var
|
|
28
|
+
export var inlineWrapperStyles = css({
|
|
22
29
|
maxWidth: '100%',
|
|
23
30
|
'tr &': {
|
|
24
31
|
maxWidth: 'inherit'
|
|
@@ -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.27.1";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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.27.1";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const inlineWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const inlineWrapperStyles: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED