@atlaskit/renderer 109.19.3 → 109.19.5
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 +14 -0
- package/dist/cjs/actions/index.js +1 -1
- package/dist/cjs/react/marks/alignment.js +8 -4
- package/dist/cjs/react/marks/breakout.js +7 -4
- package/dist/cjs/react/marks/link.js +12 -4
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +1 -0
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +2 -0
- package/dist/cjs/react/nodes/heading-anchor.js +9 -3
- package/dist/cjs/react/nodes/layoutColumn.js +2 -3
- package/dist/cjs/react/nodes/media/index.js +2 -2
- package/dist/cjs/react/nodes/mediaSingle/styles.js +9 -5
- package/dist/cjs/react/nodes/multiBodiedExtension.js +6 -1
- package/dist/cjs/steps/index.js +53 -27
- package/dist/cjs/ui/Expand.js +41 -15
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +2 -1
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +16 -5
- package/dist/cjs/ui/SortingIcon.js +24 -3
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/react/marks/alignment.js +9 -4
- package/dist/es2019/react/marks/breakout.js +6 -5
- package/dist/es2019/react/marks/link.js +9 -11
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +2 -0
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +2 -0
- package/dist/es2019/react/nodes/heading-anchor.js +9 -9
- package/dist/es2019/react/nodes/layoutColumn.js +1 -4
- package/dist/es2019/react/nodes/media/index.js +2 -2
- package/dist/es2019/react/nodes/mediaSingle/styles.js +8 -7
- package/dist/es2019/react/nodes/multiBodiedExtension.js +6 -1
- package/dist/es2019/steps/index.js +51 -29
- package/dist/es2019/ui/Expand.js +37 -22
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +2 -1
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +14 -16
- package/dist/es2019/ui/SortingIcon.js +23 -23
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/react/marks/alignment.js +8 -4
- package/dist/esm/react/marks/breakout.js +6 -3
- package/dist/esm/react/marks/link.js +10 -3
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +2 -0
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +2 -0
- package/dist/esm/react/nodes/heading-anchor.js +9 -3
- package/dist/esm/react/nodes/layoutColumn.js +1 -3
- package/dist/esm/react/nodes/media/index.js +2 -2
- package/dist/esm/react/nodes/mediaSingle/styles.js +8 -4
- package/dist/esm/react/nodes/multiBodiedExtension.js +6 -1
- package/dist/esm/steps/index.js +53 -27
- package/dist/esm/ui/Expand.js +41 -15
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +2 -1
- package/dist/esm/ui/Renderer/truncated-wrapper.js +15 -3
- package/dist/esm/ui/SortingIcon.js +25 -2
- package/dist/types/react/marks/alignment.d.ts +2 -2
- package/dist/types/react/marks/breakout.d.ts +2 -2
- package/dist/types/react/marks/link.d.ts +2 -2
- package/dist/types-ts4.5/react/marks/alignment.d.ts +2 -2
- package/dist/types-ts4.5/react/marks/breakout.d.ts +2 -2
- package/dist/types-ts4.5/react/marks/link.d.ts +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.19.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#92426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92426) [`32c76c7c225c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32c76c7c225c) - Bump adf-schema to 35.9.2 to support table alignment options
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 109.19.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#91941](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91941) [`fded4cd65773`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fded4cd65773) - [ED-22917] fixes position calculation logic for comments on commented inline cards
|
|
15
|
+
- [#92745](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92745) [`0058e08c0a70`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0058e08c0a70) - Revert fix for "Allow realtime comments to correctly infer position of comment on media" (HOT-108750)
|
|
16
|
+
|
|
3
17
|
## 109.19.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -230,7 +230,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
230
230
|
|
|
231
231
|
// If from points to a node position,
|
|
232
232
|
// we need to 1 position before it for nodeAt to return the node itself
|
|
233
|
-
var beforeNodePos = Math.max(from, 0);
|
|
233
|
+
var beforeNodePos = Math.max(from - 1, 0);
|
|
234
234
|
var possibleNode = this.doc.nodeAt(beforeNodePos);
|
|
235
235
|
if ((possibleNode === null || possibleNode === void 0 ? void 0 : possibleNode.type.name) === 'media') {
|
|
236
236
|
step = new _transform.AddNodeMarkStep(beforeNodePos, this.schema.marks.annotation.create({
|
|
@@ -13,10 +13,14 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
13
13
|
var _templateObject;
|
|
14
14
|
/** @jsx jsx */
|
|
15
15
|
var MarkWrapper = function MarkWrapper(props) {
|
|
16
|
-
var styles = props['data-align'] ?
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
var styles = props['data-align'] ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
17
|
+
(0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n text-align: ", ";\n "])), _adfSchema.alignmentPositionMap[props['data-align']]) : '';
|
|
18
|
+
return (
|
|
19
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
20
|
+
(0, _react2.jsx)("div", (0, _extends2.default)({
|
|
21
|
+
css: styles
|
|
22
|
+
}, props), props.children)
|
|
23
|
+
);
|
|
20
24
|
};
|
|
21
25
|
function Alignment(props) {
|
|
22
26
|
return (0, _react2.jsx)(MarkWrapper, {
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = Breakout;
|
|
8
7
|
exports.wrapperStyles = void 0;
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
8
|
var _react = require("@emotion/react");
|
|
11
9
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
14
|
-
var _templateObject;
|
|
15
12
|
/** @jsx jsx */
|
|
16
|
-
|
|
13
|
+
|
|
14
|
+
var wrapperStyles = exports.wrapperStyles = (0, _react.css)({
|
|
15
|
+
margin: "".concat(_editorSharedStyles.blockNodesVerticalMargin, " 0"),
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
17
|
+
marginLeft: '50%',
|
|
18
|
+
transform: 'translateX(-50%)'
|
|
19
|
+
});
|
|
17
20
|
function Breakout(props) {
|
|
18
21
|
return (0, _react.jsx)(_ui.WidthConsumer, null, function (_ref) {
|
|
19
22
|
var width = _ref.width;
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = Link;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _react2 = require("@emotion/react");
|
|
13
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -16,11 +15,20 @@ var _events = require("../../analytics/events");
|
|
|
16
15
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
17
16
|
var _linkUrl = _interopRequireDefault(require("@atlaskit/smart-card/link-url"));
|
|
18
17
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
19
|
-
var _templateObject;
|
|
20
|
-
/** @jsx jsx */
|
|
21
18
|
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); }
|
|
22
19
|
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; }
|
|
23
|
-
|
|
20
|
+
/** @jsx jsx */
|
|
21
|
+
|
|
22
|
+
var anchorStyles = (0, _react2.css)({
|
|
23
|
+
color: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
24
|
+
'&:hover': {
|
|
25
|
+
color: "var(--ds-link, ".concat(_colors.B300, ")"),
|
|
26
|
+
textDecoration: 'underline'
|
|
27
|
+
},
|
|
28
|
+
'&:active': {
|
|
29
|
+
color: "var(--ds-link-pressed, ".concat(_colors.B500, ")")
|
|
30
|
+
}
|
|
31
|
+
});
|
|
24
32
|
function Link(props) {
|
|
25
33
|
var href = props.href,
|
|
26
34
|
target = props.target,
|
|
@@ -14,6 +14,7 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
14
14
|
var _codeBlockButtonContainer = _interopRequireDefault(require("./codeBlockButtonContainer"));
|
|
15
15
|
var _templateObject;
|
|
16
16
|
/** @jsx jsx */
|
|
17
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
17
18
|
var codeBlockStyleOverrides = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n tab-size: 4;\n background-color: ", ";\n\n &:hover {\n button {\n opacity: 1;\n }\n }\n\n button {\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n }\n\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n }\n"])), "var(--ds-surface-raised, ".concat(_colors.N20, ")"), _styles.CodeBlockSharedCssClassName.DS_CODEBLOCK, (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _editorSharedStyles.overflowShadow)({
|
|
18
19
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
19
20
|
}));
|
|
@@ -17,6 +17,7 @@ var _templateObject, _templateObject2;
|
|
|
17
17
|
/** @jsx jsx */
|
|
18
18
|
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); }
|
|
19
19
|
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; }
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
20
21
|
var lightWeightCodeBlockStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n cursor: text;\n }\n"])), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER);
|
|
21
22
|
var LightWeightCodeBlockCssClassName = exports.LightWeightCodeBlockCssClassName = {
|
|
22
23
|
CONTAINER: 'light-weight-code-block'
|
|
@@ -28,6 +29,7 @@ var getLightWeightCodeBlockStylesForRootRendererStyleSheet = exports.getLightWei
|
|
|
28
29
|
// lightweight codeblock containers will not be targeted.
|
|
29
30
|
// NOTE: This must be added after other .code-block styles in the root
|
|
30
31
|
// Renderer stylesheet.
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
31
33
|
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .", "\n > .", "\n .", " {\n margin-top: ", ";\n }\n "])), _consts.RendererCssClassName.DOCUMENT, LightWeightCodeBlockCssClassName.CONTAINER, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _editorSharedStyles.blockNodesVerticalMargin);
|
|
32
34
|
};
|
|
33
35
|
var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
@@ -14,7 +14,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
18
17
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
19
18
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
20
19
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -24,7 +23,6 @@ var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/link"));
|
|
|
24
23
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
25
24
|
var _reactIntlNext = require("react-intl-next");
|
|
26
25
|
var _messages = require("../../messages");
|
|
27
|
-
var _templateObject;
|
|
28
26
|
var _excluded = ["children"];
|
|
29
27
|
/** @jsx jsx */
|
|
30
28
|
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); }; }
|
|
@@ -38,7 +36,15 @@ var CopyAnchorWrapperWithRef = /*#__PURE__*/_react.default.forwardRef(function (
|
|
|
38
36
|
ref: ref
|
|
39
37
|
}), children);
|
|
40
38
|
});
|
|
41
|
-
var copyAnchorButtonStyles = (0, _react2.css)(
|
|
39
|
+
var copyAnchorButtonStyles = (0, _react2.css)({
|
|
40
|
+
display: 'inline',
|
|
41
|
+
outline: 'none',
|
|
42
|
+
backgroundColor: 'transparent',
|
|
43
|
+
border: 'none',
|
|
44
|
+
color: "var(--ds-icon, ".concat(_colors.N500, ")"),
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
right: 0
|
|
47
|
+
});
|
|
42
48
|
var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
43
49
|
(0, _inherits2.default)(HeadingAnchor, _React$PureComponent);
|
|
44
50
|
var _super = _createSuper(HeadingAnchor);
|
|
@@ -5,13 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = LayoutSection;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _react2 = require("@emotion/react");
|
|
11
10
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
|
-
var _templateObject;
|
|
13
11
|
/** @jsx jsx */
|
|
14
|
-
|
|
12
|
+
|
|
13
|
+
var layoutColumnClearMarginTopStyles = (0, _react2.css)(_ui.clearNextSiblingMarginTopStyle, _ui.clearNextSiblingBlockMarkMarginTopStyle);
|
|
15
14
|
function LayoutSection(props) {
|
|
16
15
|
return (0, _react2.jsx)("div", {
|
|
17
16
|
"data-layout-column": true,
|
|
@@ -307,9 +307,9 @@ var MediaWithDraftAnnotation = function MediaWithDraftAnnotation(props) {
|
|
|
307
307
|
if (pos === undefined) {
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
|
-
if (draftPosition !== null && draftPosition.from
|
|
310
|
+
if (draftPosition !== null && draftPosition.from === pos) {
|
|
311
311
|
setShouldApplyDraftAnnotation(true);
|
|
312
|
-
setPosition(
|
|
312
|
+
setPosition(draftPosition === null || draftPosition === void 0 ? void 0 : draftPosition.from);
|
|
313
313
|
} else if (draftPosition === null && shouldApplyDraftAnnotation) {
|
|
314
314
|
setShouldApplyDraftAnnotation(false);
|
|
315
315
|
setPosition(undefined);
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.uiMediaSingleLayoutStyles = exports.uiMediaSingleBaseStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
|
-
var _templateObject, _templateObject2;
|
|
11
8
|
/** @jsx jsx */
|
|
12
|
-
|
|
13
|
-
var
|
|
9
|
+
|
|
10
|
+
var uiMediaSingleBaseStyles = exports.uiMediaSingleBaseStyles = (0, _react.css)({
|
|
11
|
+
transition: 'all 0.1s linear'
|
|
12
|
+
});
|
|
13
|
+
var uiMediaSingleLayoutStyles = exports.uiMediaSingleLayoutStyles = (0, _react.css)({
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
15
|
+
marginLeft: '50%',
|
|
16
|
+
transform: 'translateX(-50%)'
|
|
17
|
+
});
|
|
@@ -50,6 +50,8 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
50
50
|
}, [updateActiveChild, children]);
|
|
51
51
|
return actions;
|
|
52
52
|
};
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
53
55
|
var navigationCssExtended = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n margin-left: 0 !important;\n margin-right: 0 !important;\n .mbe-add-tab-button,\n .mbe-remove-tab {\n display: none;\n }\n"])), _ui.sharedMultiBodiedExtensionStyles.mbeNavigation);
|
|
54
56
|
var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
55
57
|
var children = props.children,
|
|
@@ -78,6 +80,7 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
78
80
|
updateActiveChild: updateActiveChild,
|
|
79
81
|
children: children
|
|
80
82
|
});
|
|
83
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
81
84
|
var containerCssExtended = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n .ak-renderer-extension {\n margin-top: 0 !important;\n }\n\n [data-layout='full-width'],\n [data-layout='wide'] {\n .multiBodiedExtension-navigation {\n border-right: 3px solid ", " !important;\n }\n }\n\n .multiBodiedExtension--frames\n > [data-extension-frame='true']:nth-of-type(", ") {\n ", "\n margin-left: 0;\n margin-right: 0;\n }\n "])), _ui.sharedMultiBodiedExtensionStyles.mbeExtensionContainer, "var(--ds-border, ".concat(_colors.N40, ")"), activeChildIndex + 1, _ui.sharedMultiBodiedExtensionStyles.extensionFrameContent);
|
|
82
85
|
var isTopLevel = path.length < 1;
|
|
83
86
|
var centerAlignClass = isTopLevel && ['wide', 'full-width'].includes(layout) ? _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
@@ -119,7 +122,9 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
119
122
|
}, children));
|
|
120
123
|
}
|
|
121
124
|
return (0, _react.jsx)("section", {
|
|
122
|
-
className: "multiBodiedExtension--container"
|
|
125
|
+
className: "multiBodiedExtension--container"
|
|
126
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
127
|
+
,
|
|
123
128
|
css: containerCssExtended,
|
|
124
129
|
"data-testid": "multiBodiedExtension--container",
|
|
125
130
|
"data-active-child-index": activeChildIndex,
|
package/dist/cjs/steps/index.js
CHANGED
|
@@ -6,10 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createAnnotationStep = createAnnotationStep;
|
|
7
7
|
exports.getPosFromRange = getPosFromRange;
|
|
8
8
|
exports.resolvePos = resolvePos;
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
10
11
|
function getStartPos(element) {
|
|
11
12
|
return parseInt(element.dataset.rendererStartPos || '-1', 10);
|
|
12
13
|
}
|
|
14
|
+
var getNodeType = function getNodeType(element) {
|
|
15
|
+
return element.dataset.nodeType;
|
|
16
|
+
};
|
|
13
17
|
function isPositionPointer(element) {
|
|
14
18
|
return getStartPos(element) > -1;
|
|
15
19
|
}
|
|
@@ -23,16 +27,6 @@ function findParent(element) {
|
|
|
23
27
|
}
|
|
24
28
|
return findParent(parentElement);
|
|
25
29
|
}
|
|
26
|
-
function findMediaParent(element) {
|
|
27
|
-
var parentElement = element.parentElement;
|
|
28
|
-
if (!parentElement || isRoot(parentElement)) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
if (parentElement.dataset.nodeType === 'mediaSingle') {
|
|
32
|
-
return parentElement;
|
|
33
|
-
}
|
|
34
|
-
return findParent(parentElement);
|
|
35
|
-
}
|
|
36
30
|
function findParentBeforePointer(element) {
|
|
37
31
|
var parentElement = element.parentElement;
|
|
38
32
|
if (isRoot(parentElement) || !parentElement) {
|
|
@@ -59,22 +53,39 @@ function isNodeInlineMark(node) {
|
|
|
59
53
|
function isElementInlineMark(element) {
|
|
60
54
|
return !!element && Boolean(element.dataset.rendererMark);
|
|
61
55
|
}
|
|
56
|
+
function isNodeInlineTextMark(node) {
|
|
57
|
+
if (node === null) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
var isInlineMark = isElementNode(node) && Boolean(node.dataset.rendererMark);
|
|
61
|
+
if (!isInlineMark) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* This checks if the element has any descendents with the data-inline-card
|
|
67
|
+
* attribute set to 'true'. If it does, we should not consider it as an
|
|
68
|
+
* inline text mark.
|
|
69
|
+
**/
|
|
70
|
+
|
|
71
|
+
if (hasInlineCardDescendant(node)) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
62
76
|
|
|
63
77
|
/**
|
|
64
|
-
* This
|
|
65
|
-
*
|
|
78
|
+
* This checks all the descendents of a node and returns true if it reaches
|
|
79
|
+
* a descendant with the data-inline-card attribute set to 'true'.
|
|
66
80
|
*/
|
|
67
|
-
function
|
|
68
|
-
if (isTextNode(node)) {
|
|
69
|
-
return node.textContent;
|
|
70
|
-
}
|
|
81
|
+
function hasInlineCardDescendant(node) {
|
|
71
82
|
if (isElementNode(node)) {
|
|
72
83
|
if (node.dataset.inlineCard === 'true') {
|
|
73
|
-
return
|
|
84
|
+
return true;
|
|
74
85
|
}
|
|
75
|
-
return Array.from(node.childNodes).
|
|
86
|
+
return Array.from(node.childNodes).some(hasInlineCardDescendant);
|
|
76
87
|
}
|
|
77
|
-
return
|
|
88
|
+
return false;
|
|
78
89
|
}
|
|
79
90
|
function resolveNodePos(node) {
|
|
80
91
|
var resolvedPos = 0;
|
|
@@ -83,10 +94,18 @@ function resolveNodePos(node) {
|
|
|
83
94
|
if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
|
|
84
95
|
resolvedPos += (prev.textContent || '').length;
|
|
85
96
|
} else if (prev) {
|
|
86
|
-
if (
|
|
87
|
-
|
|
97
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
98
|
+
if (isNodeInlineTextMark(prev) && prev.textContent) {
|
|
99
|
+
resolvedPos += prev.textContent.length;
|
|
100
|
+
} else {
|
|
101
|
+
resolvedPos += 1;
|
|
102
|
+
}
|
|
88
103
|
} else {
|
|
89
|
-
|
|
104
|
+
if (isNodeInlineMark(prev) && prev.textContent) {
|
|
105
|
+
resolvedPos += prev.textContent.length;
|
|
106
|
+
} else {
|
|
107
|
+
resolvedPos += 1;
|
|
108
|
+
}
|
|
90
109
|
}
|
|
91
110
|
}
|
|
92
111
|
prev = prev.previousSibling;
|
|
@@ -120,9 +139,16 @@ function resolvePos(node, offset) {
|
|
|
120
139
|
// If our range is inside an inline node
|
|
121
140
|
// We need to move our pointers to parent element
|
|
122
141
|
// since we don't want to count text inside inline nodes at all
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
142
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
143
|
+
if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
|
|
144
|
+
current = current.parentElement;
|
|
145
|
+
offset = 0;
|
|
146
|
+
}
|
|
147
|
+
} else {
|
|
148
|
+
if (!(isElementInlineMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
|
|
149
|
+
current = current.parentElement;
|
|
150
|
+
offset = 0;
|
|
151
|
+
}
|
|
126
152
|
}
|
|
127
153
|
resolvedPos += resolveNodePos(current);
|
|
128
154
|
while (current && current.parentElement !== parent) {
|
|
@@ -142,8 +168,8 @@ function getPosFromRange(range) {
|
|
|
142
168
|
startOffset = range.startOffset,
|
|
143
169
|
endContainer = range.endContainer,
|
|
144
170
|
endOffset = range.endOffset;
|
|
145
|
-
var parent =
|
|
146
|
-
if (parent) {
|
|
171
|
+
var parent = findParent(startContainer);
|
|
172
|
+
if (parent && getNodeType(parent) === 'media') {
|
|
147
173
|
var pos = getStartPos(parent);
|
|
148
174
|
return {
|
|
149
175
|
from: pos,
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -24,44 +24,70 @@ var _events = require("../analytics/events");
|
|
|
24
24
|
var _utils = require("../utils");
|
|
25
25
|
var _activeHeaderIdProvider = require("./active-header-id-provider");
|
|
26
26
|
var _excluded = ["expanded"];
|
|
27
|
-
var _templateObject, _templateObject2, _templateObject3
|
|
27
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
28
28
|
/** @jsx jsx */
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
30
30
|
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); }
|
|
31
31
|
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; }
|
|
32
|
-
var titleStyles = (0, _react.css)(
|
|
32
|
+
var titleStyles = (0, _react.css)({
|
|
33
|
+
outline: 'none',
|
|
34
|
+
border: 'none',
|
|
35
|
+
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()),
|
|
36
|
+
lineHeight: _editorSharedStyles.akEditorLineHeight,
|
|
37
|
+
fontWeight: 'normal',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flex: 1,
|
|
40
|
+
margin: 0,
|
|
41
|
+
padding: "0 0 0 ".concat("var(--ds-space-050, 4px)"),
|
|
42
|
+
textAlign: 'left'
|
|
43
|
+
});
|
|
33
44
|
var Container = function Container(props) {
|
|
34
45
|
var paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
35
46
|
var sharedContainerStyles = _ui.sharedExpandStyles.containerStyles(props);
|
|
47
|
+
|
|
48
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
36
49
|
var styles = function styles() {
|
|
37
|
-
return (0, _react.css)(
|
|
50
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n padding: 0;\n padding-bottom: ", ";\n "])), sharedContainerStyles(), paddingBottom);
|
|
38
51
|
};
|
|
39
|
-
return (
|
|
40
|
-
css
|
|
41
|
-
|
|
52
|
+
return (
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
54
|
+
(0, _react.jsx)("div", (0, _extends2.default)({
|
|
55
|
+
css: styles
|
|
56
|
+
}, props), props.children)
|
|
57
|
+
);
|
|
42
58
|
};
|
|
43
59
|
var TitleContainer = function TitleContainer(props) {
|
|
44
60
|
var paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
61
|
+
|
|
62
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
45
63
|
var styles = function styles() {
|
|
46
|
-
return (0, _react.css)(
|
|
64
|
+
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n padding: ", ";\n padding-bottom: ", ";\n "])), _ui.sharedExpandStyles.titleContainerStyles(), "var(--ds-space-100, 8px)", paddingBottom);
|
|
47
65
|
};
|
|
48
66
|
var expanded = props.expanded,
|
|
49
67
|
buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
50
|
-
return (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
return (
|
|
69
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
70
|
+
(0, _react.jsx)("button", (0, _extends2.default)({
|
|
71
|
+
type: "button",
|
|
72
|
+
css: styles
|
|
73
|
+
}, buttonProps), props.children)
|
|
74
|
+
);
|
|
54
75
|
};
|
|
55
76
|
TitleContainer.displayName = 'TitleContainerButton';
|
|
56
77
|
var ContentContainer = function ContentContainer(props) {
|
|
57
78
|
var sharedContentStyles = _ui.sharedExpandStyles.contentStyles(props);
|
|
58
79
|
var visibility = props.expanded ? 'visible' : 'hidden';
|
|
80
|
+
|
|
81
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
59
82
|
var styles = function styles() {
|
|
60
|
-
return (0, _react.css)(
|
|
83
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n padding-right: ", ";\n padding-left: ", ";\n visibility: ", ";\n "])), sharedContentStyles(), "var(--ds-space-200, 16px)", "var(--ds-space-400, 32px)", visibility);
|
|
61
84
|
};
|
|
62
|
-
return (
|
|
63
|
-
css
|
|
64
|
-
|
|
85
|
+
return (
|
|
86
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
87
|
+
(0, _react.jsx)("div", (0, _extends2.default)({
|
|
88
|
+
css: styles
|
|
89
|
+
}, props), props.children)
|
|
90
|
+
);
|
|
65
91
|
};
|
|
66
92
|
function fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent) {
|
|
67
93
|
if (!fireAnalyticsEvent) {
|
|
@@ -55,7 +55,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
55
55
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
56
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "109.19.
|
|
58
|
+
var packageVersion = "109.19.5";
|
|
59
59
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
@@ -23,6 +23,7 @@ var _headingAnchor = require("../../react/nodes/heading-anchor");
|
|
|
23
23
|
var _lightWeightCodeBlock = require("../../react/nodes/codeBlock/components/lightWeightCodeBlock");
|
|
24
24
|
var _table = require("../../react/nodes/table");
|
|
25
25
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
26
|
+
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
|
|
26
27
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
27
28
|
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); }
|
|
28
29
|
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; }
|
|
@@ -33,7 +34,7 @@ var telepointerStyles = function telepointerStyles() {
|
|
|
33
34
|
var _getGlobalTheme = (0, _tokens.getGlobalTheme)(),
|
|
34
35
|
colorMode = _getGlobalTheme.colorMode;
|
|
35
36
|
|
|
36
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
37
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
37
38
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n #", " {\n display: inline-block;\n position: relative;\n width: 1.5px;\n height: 25px;\n background: linear-gradient(\n 45deg,\n ", " -12.02%,\n ", " 19.18%,\n ", " 71.87%\n );\n margin-left: ", ";\n\n &::after {\n content: 'AI';\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n font-size: 10px;\n font-weight: 700;\n width: 12.5px;\n height: 13px;\n padding-top: 1px;\n padding-left: 1.5px;\n line-height: initial;\n border-radius: 0px 2px 2px 0px;\n color: ", ";\n background: linear-gradient(\n 45deg,\n ", " -57%,\n ", " 71.87%\n );\n }\n }\n "])), TELEPOINTER_ID, colorMode === 'dark' ? '#f5cd47' : '#f8e6a0', colorMode === 'dark' ? '#60c6d2' : '#8bdbe5', colorMode === 'dark' ? '#388bff' : '#0c66e4', "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", colorMode === 'dark' ? '#60c6d2' : '#8bdbe5', colorMode === 'dark' ? '#388bff' : '#0c66e4');
|
|
38
39
|
};
|
|
39
40
|
var getLineHeight = function getLineHeight(fontCode) {
|
|
@@ -10,15 +10,25 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
10
10
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
14
13
|
var _react = require("@emotion/react");
|
|
15
14
|
var _react2 = require("react");
|
|
16
|
-
var _templateObject;
|
|
17
|
-
/** @jsx jsx */
|
|
18
15
|
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); }; }
|
|
19
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
20
17
|
var fadeOutStyles = function fadeOutStyles(maxHeight, top, backgroundColor) {
|
|
21
|
-
return (0, _react.css)(
|
|
18
|
+
return (0, _react.css)({
|
|
19
|
+
position: 'relative',
|
|
20
|
+
overflowY: 'hidden',
|
|
21
|
+
maxHeight: "".concat(maxHeight, "px"),
|
|
22
|
+
'&::after': {
|
|
23
|
+
content: "''",
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
top: "".concat(top, "px"),
|
|
26
|
+
bottom: 0,
|
|
27
|
+
left: 0,
|
|
28
|
+
right: 0,
|
|
29
|
+
backgroundImage: "linear-gradient( ".concat("var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0))", ", ", backgroundColor, " )")
|
|
30
|
+
}
|
|
31
|
+
});
|
|
22
32
|
};
|
|
23
33
|
var FadeOut = function FadeOut(props) {
|
|
24
34
|
var children = props.children,
|
|
@@ -27,6 +37,7 @@ var FadeOut = function FadeOut(props) {
|
|
|
27
37
|
height = props.height;
|
|
28
38
|
var top = height - fadeHeight;
|
|
29
39
|
var styles = fadeOutStyles(height, top, backgroundColor);
|
|
40
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
30
41
|
return (0, _react.jsx)("div", {
|
|
31
42
|
css: styles
|
|
32
43
|
}, children);
|
|
@@ -13,7 +13,7 @@ var _types = require("@atlaskit/editor-common/types");
|
|
|
13
13
|
var _messages = require("../messages");
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
15
|
var _consts = require("../consts");
|
|
16
|
-
var _templateObject, _templateObject2
|
|
16
|
+
var _templateObject, _templateObject2;
|
|
17
17
|
/** @jsx jsx */
|
|
18
18
|
var StatusClassNames = exports.StatusClassNames = /*#__PURE__*/function (StatusClassNames) {
|
|
19
19
|
StatusClassNames["ASC"] = "sorting-icon-svg__asc";
|
|
@@ -21,14 +21,35 @@ var StatusClassNames = exports.StatusClassNames = /*#__PURE__*/function (StatusC
|
|
|
21
21
|
StatusClassNames["NO_ORDER"] = "sorting-icon-svg__no_order";
|
|
22
22
|
StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
|
|
23
23
|
return StatusClassNames;
|
|
24
|
-
}({});
|
|
24
|
+
}({}); // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
25
25
|
var buttonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: ", ";\n right: 0;\n top: 0;\n border: 2px solid ", ";\n border-radius: ", ";\n background-color: ", ";\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &.", "__not-allowed {\n cursor: not-allowed;\n }\n"])), "var(--ds-space-075, 6px)", "var(--ds-border, #fff)", "var(--ds-border-radius-100, 4px)", "var(--ds-surface-overlay, ".concat(_colors.N20, ")"), "var(--ds-surface-overlay-hovered, ".concat(_colors.N30, ")"), "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))", _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
26
28
|
var iconWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n display: flex;\n justify-content: center;\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.7;\n }\n"])), StatusClassNames.DESC, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
27
29
|
|
|
28
30
|
// The icon is created with CSS due to the following Firefox issue: https://product-fabric.atlassian.net/browse/ED-8001
|
|
29
31
|
// The TL;DR is that svg's in tables mess up how HTML is copied in Firefox. Using a styled div instead solves the problem.
|
|
30
32
|
// For this reason, svg's should be avoided in tables until this issue is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
|
|
31
|
-
var iconStyles = (0, _react.css)(
|
|
33
|
+
var iconStyles = (0, _react.css)({
|
|
34
|
+
height: '100%',
|
|
35
|
+
width: '2px',
|
|
36
|
+
borderRadius: '50px',
|
|
37
|
+
background: "var(--ds-icon, #42526E)",
|
|
38
|
+
'&::before, &::after': {
|
|
39
|
+
background: "var(--ds-icon, #42526E)",
|
|
40
|
+
content: "''",
|
|
41
|
+
height: '2px',
|
|
42
|
+
width: '6px',
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
borderRadius: '50px'
|
|
45
|
+
},
|
|
46
|
+
'&::before': {
|
|
47
|
+
transform: 'rotate(45deg) translate(3.4px, 8.5px)'
|
|
48
|
+
},
|
|
49
|
+
'&::after': {
|
|
50
|
+
transform: 'rotate(-45deg) translate(-6.3px, 5.7px)'
|
|
51
|
+
}
|
|
52
|
+
});
|
|
32
53
|
var getIconClassName = function getIconClassName(isSortingAllowed, sortOrdered) {
|
|
33
54
|
var activated = sortOrdered !== _types.SortOrder.NO_ORDER;
|
|
34
55
|
var activeStatusClass = "".concat(_consts.RendererCssClassName.SORTABLE_COLUMN_ICON, "-").concat(activated ? 'active' : 'inactive');
|
|
@@ -208,7 +208,7 @@ export default class RendererActions {
|
|
|
208
208
|
|
|
209
209
|
// If from points to a node position,
|
|
210
210
|
// we need to 1 position before it for nodeAt to return the node itself
|
|
211
|
-
const beforeNodePos = Math.max(from, 0);
|
|
211
|
+
const beforeNodePos = Math.max(from - 1, 0);
|
|
212
212
|
const possibleNode = this.doc.nodeAt(beforeNodePos);
|
|
213
213
|
if ((possibleNode === null || possibleNode === void 0 ? void 0 : possibleNode.type.name) === 'media') {
|
|
214
214
|
step = new AddNodeMarkStep(beforeNodePos, this.schema.marks.annotation.create({
|