@atlaskit/editor-common 84.1.0 → 84.3.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 +32 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/dist/cjs/extensibility/ExtensionNodeWrapper.js +2 -2
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +56 -0
- package/dist/cjs/link/ConfigureLinkOverlay/StyledButton.js +38 -0
- package/dist/cjs/link/ConfigureLinkOverlay/{OverlayButton.js → index.js} +29 -22
- package/dist/cjs/link/index.js +2 -2
- package/dist/cjs/mark/commands.js +2 -7
- package/dist/cjs/messages/annotation.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +3 -2
- package/dist/cjs/resizer/Resizer.js +23 -45
- package/dist/cjs/styles/shared/annotation.js +2 -34
- package/dist/cjs/styles/shared/smartCard.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/highlightColorPalette.js +6 -11
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -11
- package/dist/cjs/ui-color/index.js +0 -12
- package/dist/cjs/utils/annotation/index.js +10 -18
- package/dist/cjs/utils/index.js +5 -1
- package/dist/cjs/utils/scroll-gutter.js +3 -0
- package/dist/cjs/utils/validator.js +5 -5
- package/dist/cjs/whitespace/index.js +18 -0
- package/dist/es2019/extensibility/ExtensionNodeWrapper.js +1 -1
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +45 -0
- package/dist/es2019/link/ConfigureLinkOverlay/StyledButton.js +30 -0
- package/dist/es2019/link/ConfigureLinkOverlay/{OverlayButton.js → index.js} +28 -24
- package/dist/es2019/link/index.js +1 -1
- package/dist/es2019/mark/commands.js +3 -10
- package/dist/es2019/messages/annotation.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +2 -1
- package/dist/es2019/resizer/Resizer.js +26 -54
- package/dist/es2019/styles/shared/annotation.js +3 -35
- package/dist/es2019/styles/shared/smartCard.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +1 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -7
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -7
- package/dist/es2019/ui-color/index.js +2 -2
- package/dist/es2019/utils/annotation/index.js +11 -21
- package/dist/es2019/utils/index.js +4 -1
- package/dist/es2019/utils/scroll-gutter.js +3 -0
- package/dist/es2019/utils/validator.js +6 -6
- package/dist/es2019/whitespace/index.js +1 -0
- package/dist/esm/extensibility/ExtensionNodeWrapper.js +1 -1
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +46 -0
- package/dist/esm/link/ConfigureLinkOverlay/StyledButton.js +31 -0
- package/dist/esm/link/ConfigureLinkOverlay/{OverlayButton.js → index.js} +31 -24
- package/dist/esm/link/index.js +1 -1
- package/dist/esm/mark/commands.js +3 -8
- package/dist/esm/messages/annotation.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +2 -1
- package/dist/esm/resizer/Resizer.js +23 -45
- package/dist/esm/styles/shared/annotation.js +3 -35
- package/dist/esm/styles/shared/smartCard.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Color/index.js +1 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/highlightColorPalette.js +1 -10
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -10
- package/dist/esm/ui-color/index.js +2 -2
- package/dist/esm/utils/annotation/index.js +11 -19
- package/dist/esm/utils/index.js +4 -1
- package/dist/esm/utils/scroll-gutter.js +3 -0
- package/dist/esm/utils/validator.js +6 -6
- package/dist/esm/whitespace/index.js +1 -0
- package/dist/types/link/ConfigureLinkOverlay/Dropdown.d.ts +7 -0
- package/dist/types/link/ConfigureLinkOverlay/StyledButton.d.ts +7 -0
- package/dist/types/link/index.d.ts +2 -2
- package/dist/types/types/annotation/index.d.ts +2 -2
- package/dist/types/ui-color/ColorPalette/Palettes/highlightColorPalette.d.ts +0 -1
- package/dist/types/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +1 -2
- package/dist/types/ui-color/index.d.ts +2 -2
- package/dist/types/utils/annotation/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts +4 -1
- package/dist/types/utils/scroll-gutter.d.ts +3 -0
- package/dist/types/whitespace/index.d.ts +1 -0
- package/dist/types-ts4.5/link/ConfigureLinkOverlay/Dropdown.d.ts +7 -0
- package/dist/types-ts4.5/link/ConfigureLinkOverlay/StyledButton.d.ts +7 -0
- package/dist/types-ts4.5/link/index.d.ts +2 -2
- package/dist/types-ts4.5/types/annotation/index.d.ts +2 -2
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/highlightColorPalette.d.ts +0 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +1 -2
- package/dist/types-ts4.5/ui-color/index.d.ts +2 -2
- package/dist/types-ts4.5/utils/annotation/index.d.ts +2 -2
- package/dist/types-ts4.5/utils/index.d.ts +4 -1
- package/dist/types-ts4.5/utils/scroll-gutter.d.ts +3 -0
- package/dist/types-ts4.5/whitespace/index.d.ts +1 -0
- package/package.json +6 -13
- package/whitespace/package.json +15 -0
- /package/dist/cjs/{utils → whitespace}/whitespace.js +0 -0
- /package/dist/es2019/{utils → whitespace}/whitespace.js +0 -0
- /package/dist/esm/{utils → whitespace}/whitespace.js +0 -0
- /package/dist/types/link/ConfigureLinkOverlay/{OverlayButton.d.ts → index.d.ts} +0 -0
- /package/dist/types/{utils → whitespace}/whitespace.d.ts +0 -0
- /package/dist/types-ts4.5/link/ConfigureLinkOverlay/{OverlayButton.d.ts → index.d.ts} +0 -0
- /package/dist/types-ts4.5/{utils → whitespace}/whitespace.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 84.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#117973](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117973)
|
|
8
|
+
[`6e37bac62083f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6e37bac62083f) -
|
|
9
|
+
moved one const, added new entry point for other and deprecated
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#113218](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113218)
|
|
14
|
+
[`d1b428ec29d68`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d1b428ec29d68) -
|
|
15
|
+
[ED-23765] migrate inline node commenting feature flags to statsig feature gate
|
|
16
|
+
|
|
17
|
+
## 84.2.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [#117916](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117916)
|
|
22
|
+
[`cd1905bf5112d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cd1905bf5112d) -
|
|
23
|
+
[ux] Link configuration overlay shows chevron down icon on small links based on a 50px width
|
|
24
|
+
threshold. On click the overlay opens a dropdown with open link and configure link options.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#116760](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116760)
|
|
29
|
+
[`2e309117f02c6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e309117f02c6) -
|
|
30
|
+
[ED-23062] Clean up feature flag for highlight palette dark mode improvements
|
|
31
|
+
- [#117920](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117920)
|
|
32
|
+
[`b3da4fa9c20d9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b3da4fa9c20d9) -
|
|
33
|
+
Cleanup of table FF
|
|
34
|
+
|
|
3
35
|
## 84.1.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -8,7 +8,7 @@ exports.ExtensionNodeWrapper = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var
|
|
11
|
+
var _whitespace = require("../whitespace");
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -46,6 +46,6 @@ var ExtensionNodeWrapper = exports.ExtensionNodeWrapper = function ExtensionNode
|
|
|
46
46
|
(0, _react2.jsx)("span", {
|
|
47
47
|
className: wrapperClassNames,
|
|
48
48
|
css: styles
|
|
49
|
-
}, children, nodeType === 'inlineExtension' &&
|
|
49
|
+
}, children, nodeType === 'inlineExtension' && _whitespace.ZERO_WIDTH_SPACE)
|
|
50
50
|
);
|
|
51
51
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = require("@emotion/react");
|
|
12
|
+
var _reactIntlNext = require("react-intl-next");
|
|
13
|
+
var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
|
|
14
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
15
|
+
var _preferences = _interopRequireDefault(require("@atlaskit/icon/glyph/preferences"));
|
|
16
|
+
var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
|
|
17
|
+
var _messages = require("../../messages");
|
|
18
|
+
var _StyledButton = require("./StyledButton");
|
|
19
|
+
var _excluded = ["triggerRef"];
|
|
20
|
+
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
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; }
|
|
24
|
+
var Dropdown = function Dropdown(_ref) {
|
|
25
|
+
var testId = _ref.testId;
|
|
26
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
27
|
+
formatMessage = _useIntl.formatMessage;
|
|
28
|
+
var configureLinkLabel = formatMessage(_messages.cardMessages.inlineConfigureLink);
|
|
29
|
+
var goToLinkLabel = formatMessage(_messages.cardMessages.inlineGoToLink);
|
|
30
|
+
return (0, _react.jsx)(_dropdownMenu.default, {
|
|
31
|
+
trigger: function trigger(_ref2) {
|
|
32
|
+
var triggerRef = _ref2.triggerRef,
|
|
33
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
34
|
+
return (0, _react.jsx)(_StyledButton.StyledButton, (0, _extends2.default)({
|
|
35
|
+
innerRef: triggerRef
|
|
36
|
+
}, props, {
|
|
37
|
+
iconBefore: (0, _react.jsx)(_chevronDown.default, {
|
|
38
|
+
label: configureLinkLabel,
|
|
39
|
+
size: 'small'
|
|
40
|
+
})
|
|
41
|
+
}));
|
|
42
|
+
},
|
|
43
|
+
testId: "".concat(testId, "-dropdown")
|
|
44
|
+
}, (0, _react.jsx)(_dropdownMenu.DropdownItemGroup, null, (0, _react.jsx)(_dropdownMenu.DropdownItem, {
|
|
45
|
+
elemBefore: (0, _react.jsx)(_shortcut.default, {
|
|
46
|
+
label: goToLinkLabel,
|
|
47
|
+
size: 'medium'
|
|
48
|
+
})
|
|
49
|
+
}, goToLinkLabel), (0, _react.jsx)(_dropdownMenu.DropdownItem, {
|
|
50
|
+
elemBefore: (0, _react.jsx)(_preferences.default, {
|
|
51
|
+
label: configureLinkLabel,
|
|
52
|
+
size: 'medium'
|
|
53
|
+
})
|
|
54
|
+
}, configureLinkLabel)));
|
|
55
|
+
};
|
|
56
|
+
var _default = exports.default = Dropdown;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.StyledButton = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
|
+
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
12
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
13
|
+
var _excluded = ["innerRef"];
|
|
14
|
+
/** @jsx jsx */
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
+
var buttonStyles = (0, _react.css)({
|
|
17
|
+
display: 'flex',
|
|
18
|
+
background: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
|
|
19
|
+
color: "var(--ds-icon, ".concat(_colors.N700, ")"),
|
|
20
|
+
'&:hover': {
|
|
21
|
+
background: "var(--ds-background-neutral-hovered, ".concat(_colors.N40A, ")")
|
|
22
|
+
},
|
|
23
|
+
'&:active': {
|
|
24
|
+
background: "var(--ds-background-neutral-pressed, ".concat(_colors.N60A, ")")
|
|
25
|
+
},
|
|
26
|
+
width: '1.375rem',
|
|
27
|
+
height: '1.25rem'
|
|
28
|
+
});
|
|
29
|
+
var StyledButton = exports.StyledButton = function StyledButton(_ref) {
|
|
30
|
+
var innerRef = _ref.innerRef,
|
|
31
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
|
+
return (0, _react.jsx)(_button.default, (0, _extends2.default)({}, props, {
|
|
33
|
+
ref: innerRef
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
35
|
+
,
|
|
36
|
+
css: buttonStyles
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
@@ -5,33 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.OverlayButton = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
9
|
var _react = require("react");
|
|
9
10
|
var _react2 = require("@emotion/react");
|
|
10
11
|
var _reactIntlNext = require("react-intl-next");
|
|
11
|
-
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _preferences = _interopRequireDefault(require("@atlaskit/icon/glyph/preferences"));
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
var _constants = require("@atlaskit/theme/constants");
|
|
16
16
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
17
|
var _messages = require("../../messages");
|
|
18
|
+
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
19
|
+
var _StyledButton = require("./StyledButton");
|
|
18
20
|
/** @jsx jsx */
|
|
19
21
|
|
|
20
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
23
|
|
|
22
|
-
var buttonStyles = (0, _react2.css)({
|
|
23
|
-
display: 'flex',
|
|
24
|
-
background: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
|
|
25
|
-
color: "var(--ds-icon, ".concat(_colors.N700, ")"),
|
|
26
|
-
'&:hover': {
|
|
27
|
-
background: "var(--ds-background-neutral-hovered, ".concat(_colors.N40A, ")")
|
|
28
|
-
},
|
|
29
|
-
'&:active': {
|
|
30
|
-
background: "var(--ds-background-neutral-pressed, ".concat(_colors.N60A, ")")
|
|
31
|
-
},
|
|
32
|
-
width: '1.375rem',
|
|
33
|
-
height: '1.25rem'
|
|
34
|
-
});
|
|
35
24
|
var buttonWrapperStyles = (0, _react2.css)({
|
|
36
25
|
position: 'absolute',
|
|
37
26
|
zIndex: _constants.layers.card(),
|
|
@@ -41,6 +30,7 @@ var buttonWrapperStyles = (0, _react2.css)({
|
|
|
41
30
|
background: "var(--ds-surface-raised, ".concat(_colors.N0, ")"),
|
|
42
31
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
43
32
|
});
|
|
33
|
+
var showDropdownThresholdPx = 50;
|
|
44
34
|
var OverlayButton = exports.OverlayButton = function OverlayButton(_ref) {
|
|
45
35
|
var _docNode$nodeSize;
|
|
46
36
|
var editorView = _ref.editorView,
|
|
@@ -50,6 +40,25 @@ var OverlayButton = exports.OverlayButton = function OverlayButton(_ref) {
|
|
|
50
40
|
targetElementPos = _ref$targetElementPos === void 0 ? 0 : _ref$targetElementPos;
|
|
51
41
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
52
42
|
formatMessage = _useIntl.formatMessage;
|
|
43
|
+
var configureLinkLabel = formatMessage(_messages.cardMessages.inlineConfigureLink);
|
|
44
|
+
var _useState = (0, _react.useState)(false),
|
|
45
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
46
|
+
showDropdown = _useState2[0],
|
|
47
|
+
setShowDropdown = _useState2[1];
|
|
48
|
+
(0, _react.useLayoutEffect)(function () {
|
|
49
|
+
var _domNode;
|
|
50
|
+
var domNode = editorView.nodeDOM(targetElementPos);
|
|
51
|
+
if (((_domNode = domNode) === null || _domNode === void 0 ? void 0 : _domNode.nodeType) === Node.TEXT_NODE) {
|
|
52
|
+
domNode = domNode.parentElement;
|
|
53
|
+
}
|
|
54
|
+
if (domNode instanceof HTMLElement) {
|
|
55
|
+
var _domNode$getBoundingC = domNode.getBoundingClientRect(),
|
|
56
|
+
width = _domNode$getBoundingC.width;
|
|
57
|
+
if (width < showDropdownThresholdPx) {
|
|
58
|
+
setShowDropdown(true);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}, [editorView, targetElementPos]);
|
|
53
62
|
var docNode = editorView.state.doc.nodeAt(targetElementPos);
|
|
54
63
|
var nodeEnd = targetElementPos + ((_docNode$nodeSize = docNode === null || docNode === void 0 ? void 0 : docNode.nodeSize) !== null && _docNode$nodeSize !== void 0 ? _docNode$nodeSize : 0);
|
|
55
64
|
var isText = docNode === null || docNode === void 0 ? void 0 : docNode.isText;
|
|
@@ -69,18 +78,16 @@ var OverlayButton = exports.OverlayButton = function OverlayButton(_ref) {
|
|
|
69
78
|
if (!targetElementPos || isSelected) {
|
|
70
79
|
return null;
|
|
71
80
|
}
|
|
72
|
-
var configureLinkLabel = formatMessage(_messages.cardMessages.inlineConfigureLink);
|
|
73
81
|
return (0, _react2.jsx)("span", {
|
|
74
|
-
css: buttonWrapperStyles
|
|
75
|
-
|
|
82
|
+
css: buttonWrapperStyles,
|
|
83
|
+
"data-testid": testId
|
|
84
|
+
}, showDropdown ? (0, _react2.jsx)(_Dropdown.default, {
|
|
85
|
+
testId: testId
|
|
86
|
+
}) : (0, _react2.jsx)(_tooltip.default, {
|
|
76
87
|
content: configureLinkLabel,
|
|
77
88
|
hideTooltipOnClick: true,
|
|
78
89
|
testId: "".concat(testId, "-tooltip")
|
|
79
|
-
}, (0, _react2.jsx)(
|
|
80
|
-
testId: testId
|
|
81
|
-
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
82
|
-
,
|
|
83
|
-
css: buttonStyles,
|
|
90
|
+
}, (0, _react2.jsx)(_StyledButton.StyledButton, {
|
|
84
91
|
onClick: handleClick,
|
|
85
92
|
iconBefore: (0, _react2.jsx)(_preferences.default, {
|
|
86
93
|
label: configureLinkLabel,
|
package/dist/cjs/link/index.js
CHANGED
|
@@ -56,7 +56,7 @@ Object.defineProperty(exports, "LinkSearchListItem", {
|
|
|
56
56
|
Object.defineProperty(exports, "OverlayButton", {
|
|
57
57
|
enumerable: true,
|
|
58
58
|
get: function get() {
|
|
59
|
-
return
|
|
59
|
+
return _ConfigureLinkOverlay.OverlayButton;
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "RECENT_SEARCH_LIST_SIZE", {
|
|
@@ -143,6 +143,6 @@ var _HyperlinkAddToolbar2 = _interopRequireWildcard(require("./LinkPicker/Hyperl
|
|
|
143
143
|
var _utils = require("./LinkPicker/HyperlinkAddToolbar/utils");
|
|
144
144
|
var _utils2 = require("./utils");
|
|
145
145
|
var _constants = require("./constants");
|
|
146
|
-
var
|
|
146
|
+
var _ConfigureLinkOverlay = require("./ConfigureLinkOverlay");
|
|
147
147
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
148
148
|
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; }
|
|
@@ -140,22 +140,17 @@ var transformSmartCharsMentionsAndEmojis = exports.transformSmartCharsMentionsAn
|
|
|
140
140
|
var applyMarkOnRange = exports.applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr) {
|
|
141
141
|
var schema = tr.doc.type.schema;
|
|
142
142
|
var code = schema.marks.code;
|
|
143
|
-
var inlineCard = schema.nodes.inlineCard;
|
|
144
143
|
if (mark.type === code) {
|
|
145
|
-
(0, _platformFeatureFlags.
|
|
144
|
+
(0, _platformFeatureFlags.fg)('platform.editor.simplify-inline-cards-in-code-blocks_jw6t1') ? transformNonTextNodesToText(from, to, tr) : transformSmartCharsMentionsAndEmojis(from, to, tr);
|
|
146
145
|
}
|
|
147
146
|
tr.doc.nodesBetween(tr.mapping.map(from), tr.mapping.map(to), function (node, pos) {
|
|
148
|
-
if ((0, _platformFeatureFlags.
|
|
147
|
+
if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
|
|
149
148
|
if (!node.isText) {
|
|
150
149
|
var isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
|
|
151
150
|
if (!isAllowedInlineNode) {
|
|
152
151
|
return true;
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
|
-
} else if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
156
|
-
if (!node.isText && node.type !== inlineCard) {
|
|
157
|
-
return true;
|
|
158
|
-
}
|
|
159
154
|
} else {
|
|
160
155
|
if (!node.isText) {
|
|
161
156
|
return true;
|
|
@@ -11,7 +11,7 @@ var annotationMessages = exports.annotationMessages = (0, _reactIntlNext.defineM
|
|
|
11
11
|
defaultMessage: 'Comment',
|
|
12
12
|
description: 'Create/add an inline comment based on the users selection'
|
|
13
13
|
},
|
|
14
|
-
// TODO: Remove this message when the
|
|
14
|
+
// TODO: Remove this message when the editor_inline_comments_on_inline_nodes FF is removed
|
|
15
15
|
createCommentInvalid: {
|
|
16
16
|
id: 'fabric.editor.createCommentInvalid',
|
|
17
17
|
defaultMessage: 'You can only comment on text and headings',
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
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; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "84.
|
|
20
|
+
var packageVersion = "84.3.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -13,6 +13,7 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _analytics = require("../analytics");
|
|
14
14
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
15
15
|
var _utils = require("../utils");
|
|
16
|
+
var _whitespace = require("../whitespace");
|
|
16
17
|
var _generateUniqueNodeKey = require("./generateUniqueNodeKey");
|
|
17
18
|
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; }
|
|
18
19
|
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 */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -178,7 +179,7 @@ function getPortalChildren(_ref2) {
|
|
|
178
179
|
className: "zeroWidthSpaceContainer"
|
|
179
180
|
}, (0, _react2.jsx)("span", {
|
|
180
181
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
181
|
-
}),
|
|
182
|
+
}), _whitespace.ZERO_WIDTH_SPACE), (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
182
183
|
view: nodeViewParams.view
|
|
183
184
|
// TODO: ED-13910 - Remove the boolean to fix the prosemirror view type
|
|
184
185
|
,
|
|
@@ -191,7 +192,7 @@ function getPortalChildren(_ref2) {
|
|
|
191
192
|
contentEditable: "false"
|
|
192
193
|
}, (0, _react2.jsx)("span", {
|
|
193
194
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
194
|
-
}),
|
|
195
|
+
}), _whitespace.ZERO_WIDTH_SPACE) :
|
|
195
196
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
196
197
|
(0, _react2.jsx)("span", {
|
|
197
198
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
@@ -13,7 +13,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _classnames3 = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _reResizable = require("re-resizable");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
18
17
|
var _resizer = require("../styles/shared/resizer");
|
|
19
18
|
var _excluded = ["width", "children", "handleClassName", "className", "handleResize", "handleResizeStart", "handleResizeStop", "handleSize", "handleAlignmentMethod", "handlePositioning", "appearance", "handleStyles", "resizeRatio", "snap", "snapGap", "isHandleVisible", "handleHighlight", "handleTooltipContent", "needExtendedResizeZone"];
|
|
@@ -138,57 +137,36 @@ var ResizerNext = function ResizerNext(props, ref) {
|
|
|
138
137
|
if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent) {
|
|
139
138
|
return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position, thumb));
|
|
140
139
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (!!handleTooltipContent) {
|
|
151
|
-
return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position,
|
|
152
|
-
/*#__PURE__*/
|
|
153
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
154
|
-
_react.default.createElement("div", {
|
|
155
|
-
contentEditable: false,
|
|
156
|
-
style: inheritedCSS
|
|
157
|
-
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
158
|
-
content: handleTooltipContent,
|
|
159
|
-
hideTooltipOnClick: true,
|
|
160
|
-
position: "mouse",
|
|
161
|
-
mousePosition: "auto-start",
|
|
162
|
-
testId: "resizer-handle-".concat(position, "-tooltip")
|
|
163
|
-
}, thumbWithTrack))));
|
|
164
|
-
}
|
|
140
|
+
var thumbWithTrack =
|
|
141
|
+
/*#__PURE__*/
|
|
142
|
+
//It's important to have {thumb} element before the div, the thumb element is the one that gets focus and only the 1st element recives aria-descibedby attribute which is important for screen reader users
|
|
143
|
+
_react.default.createElement(_react.default.Fragment, null, thumb, /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
145
|
+
className: (0, _classnames3.default)(_resizer.resizerHandleTrackClassName, handleHighlight),
|
|
146
|
+
"data-testid": "resizer-handle-".concat(position, "-track")
|
|
147
|
+
}));
|
|
148
|
+
if (!!handleTooltipContent) {
|
|
165
149
|
return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position,
|
|
166
150
|
/*#__PURE__*/
|
|
167
151
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
168
152
|
_react.default.createElement("div", {
|
|
169
153
|
contentEditable: false,
|
|
170
154
|
style: inheritedCSS
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
className: (0, _classnames3.default)(_resizer.resizerHandleTrackClassName, handleHighlight),
|
|
179
|
-
"data-testid": "resizer-handle-".concat(position, "-track")
|
|
180
|
-
}));
|
|
181
|
-
if (!!handleTooltipContent) {
|
|
182
|
-
return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
183
|
-
content: handleTooltipContent,
|
|
184
|
-
hideTooltipOnClick: true,
|
|
185
|
-
position: "mouse",
|
|
186
|
-
mousePosition: "auto-start",
|
|
187
|
-
testId: "resizer-handle-".concat(position, "-tooltip")
|
|
188
|
-
}, _thumbWithTrack)));
|
|
189
|
-
}
|
|
190
|
-
return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position, _thumbWithTrack));
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
156
|
+
content: handleTooltipContent,
|
|
157
|
+
hideTooltipOnClick: true,
|
|
158
|
+
position: "mouse",
|
|
159
|
+
mousePosition: "auto-start",
|
|
160
|
+
testId: "resizer-handle-".concat(position, "-tooltip")
|
|
161
|
+
}, thumbWithTrack))));
|
|
191
162
|
}
|
|
163
|
+
return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position,
|
|
164
|
+
/*#__PURE__*/
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
166
|
+
_react.default.createElement("div", {
|
|
167
|
+
contentEditable: false,
|
|
168
|
+
style: inheritedCSS
|
|
169
|
+
}, thumbWithTrack)));
|
|
192
170
|
}, {});
|
|
193
171
|
}, [handleHighlight, handleTooltipContent]);
|
|
194
172
|
|
|
@@ -25,7 +25,7 @@ var BlockAnnotationSharedClassNames = exports.BlockAnnotationSharedClassNames =
|
|
|
25
25
|
var Yellow100 = 'rgb(255, 247, 214)';
|
|
26
26
|
var Y200a = 'rgba(255, 196, 0, 0.82)';
|
|
27
27
|
var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
|
|
28
|
-
if ((0, _platformFeatureFlags.
|
|
28
|
+
if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
|
|
29
29
|
// NOTE: These styles are shared between renderer and editor. Sometimes they
|
|
30
30
|
// need different selectors and other times they apply the same attributes
|
|
31
31
|
// in a different way. For example in renderer the focus styles are an
|
|
@@ -55,38 +55,6 @@ var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function A
|
|
|
55
55
|
borderBottomColor: "var(--ds-border-accent-yellow, ".concat(Y200a, ")")
|
|
56
56
|
})
|
|
57
57
|
};
|
|
58
|
-
} else if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
59
|
-
return {
|
|
60
|
-
focus: (0, _react.css)({
|
|
61
|
-
background: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"),
|
|
62
|
-
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")")),
|
|
63
|
-
boxShadow: "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")"),
|
|
64
|
-
cursor: 'pointer',
|
|
65
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
66
|
-
'&:has(.card)': {
|
|
67
|
-
fontSize: '1.5rem',
|
|
68
|
-
lineHeight: '1.2rem',
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
70
|
-
'& > *': {
|
|
71
|
-
fontSize: '16px'
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}),
|
|
75
|
-
blur: (0, _react.css)({
|
|
76
|
-
background: "var(--ds-background-accent-yellow-subtlest, ".concat(Yellow100, ")"),
|
|
77
|
-
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(Y200a, ")")),
|
|
78
|
-
cursor: 'pointer',
|
|
79
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
80
|
-
'&:has(.card)': {
|
|
81
|
-
fontSize: '1.5rem',
|
|
82
|
-
lineHeight: '1.2rem',
|
|
83
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
84
|
-
'& > *': {
|
|
85
|
-
fontSize: '16px'
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
};
|
|
90
58
|
} else {
|
|
91
59
|
return {
|
|
92
60
|
focus: (0, _react.css)({
|
|
@@ -107,7 +75,7 @@ var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function A
|
|
|
107
75
|
}
|
|
108
76
|
};
|
|
109
77
|
var annotationSharedStyles = exports.annotationSharedStyles = function annotationSharedStyles() {
|
|
110
|
-
return (0, _platformFeatureFlags.
|
|
78
|
+
return (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
|
|
111
79
|
(0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror {\n\t\t\t\t\t.", ",\n\t\t\t\t\t\t.", ",\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t\tcursor: initial;\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), AnnotationSharedClassNames.blur, AnnotationSharedClassNames.focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().common, AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
|
|
112
80
|
(0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t\tcursor: initial;\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
|
|
113
81
|
};
|
|
@@ -16,4 +16,4 @@ var DATASOURCE_INNER_CONTAINER_CLASSNAME = exports.DATASOURCE_INNER_CONTAINER_CL
|
|
|
16
16
|
var FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = exports.FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-picker';
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
19
|
-
var smartCardStyles = exports.smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > a {\n\t\t\t", "\n\t\t}\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div::after {\n\t\t\t", "\n\t\t}\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), _smartCard.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, (0, _platformFeatureFlags.
|
|
19
|
+
var smartCardStyles = exports.smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > a {\n\t\t\t", "\n\t\t}\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div::after {\n\t\t\t", "\n\t\t}\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), _smartCard.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? ".card-with-comment {\n background: ".concat("var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"), ";\n border-bottom: 2px solid ", "var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")"), ";\n box-shadow: ", "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")"), ";\n }") : '', "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-radius-200, 8px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.DATASOURCE_CONTAINER, _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-background-neutral-subtle, ".concat(_colors.N0, ")"), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(_colors.N40, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, DATASOURCE_INNER_CONTAINER_CLASSNAME, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
|
|
@@ -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 */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "84.
|
|
23
|
+
var packageVersion = "84.3.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -8,7 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
12
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
13
|
var _styles = require("./styles");
|
|
@@ -57,7 +56,7 @@ var Color = function Color(props) {
|
|
|
57
56
|
,
|
|
58
57
|
className: "".concat(isSelected ? 'selected' : ''),
|
|
59
58
|
style: {
|
|
60
|
-
backgroundColor: colorStyle ||
|
|
59
|
+
backgroundColor: colorStyle || "var(--ds-background-input, #FFFFFF)",
|
|
61
60
|
border: "1px solid ".concat(borderColor)
|
|
62
61
|
},
|
|
63
62
|
autoFocus: autoFocus
|
|
@@ -4,18 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
|
+
exports.highlightColorPalette = exports.REMOVE_HIGHLIGHT_COLOR = exports.EditorDiagonalLineIcon = void 0;
|
|
9
8
|
var _react = require("@emotion/react");
|
|
10
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
10
|
var _icon = _interopRequireDefault(require("@atlaskit/icon"));
|
|
12
11
|
var _tokens = require("@atlaskit/tokens");
|
|
13
|
-
var _common = require("./common");
|
|
14
12
|
var _getColorMessage = _interopRequireDefault(require("./getColorMessage"));
|
|
15
13
|
var _paletteMessages = _interopRequireDefault(require("./paletteMessages"));
|
|
16
14
|
var _textColorPalette = require("./textColorPalette");
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
/** @jsx jsx */
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
|
+
|
|
19
19
|
var REMOVE_HIGHLIGHT_COLOR = exports.REMOVE_HIGHLIGHT_COLOR = '#00000000';
|
|
20
20
|
var DiagonalLineGlyph = function DiagonalLineGlyph() {
|
|
21
21
|
return (0, _react.jsx)("svg", {
|
|
@@ -51,15 +51,10 @@ var highlightColorPalette = exports.highlightColorPalette = [{
|
|
|
51
51
|
value: REMOVE_HIGHLIGHT_COLOR,
|
|
52
52
|
label: 'No color',
|
|
53
53
|
// Mostly informative, only used for analytics
|
|
54
|
-
border:
|
|
54
|
+
border: "var(--ds-border, #091E4224)",
|
|
55
55
|
message: (0, _getColorMessage.default)(_paletteMessages.default, 'no-color'),
|
|
56
56
|
decorator: (0, _react.jsx)(EditorDiagonalLineIcon, null)
|
|
57
57
|
}];
|
|
58
58
|
_adfSchema.backgroundColorPalette.forEach(function (label, color) {
|
|
59
59
|
highlightColorPalette.push((0, _textColorPalette.mapPaletteColor)(label, color));
|
|
60
|
-
});
|
|
61
|
-
var highlightColorPaletteWithTokenBorders = exports.highlightColorPaletteWithTokenBorders = highlightColorPalette.map(function (paletteColor) {
|
|
62
|
-
return _objectSpread(_objectSpread({}, paletteColor), {}, {
|
|
63
|
-
border: "var(--ds-border, #091E4224)"
|
|
64
|
-
});
|
|
65
60
|
});
|