@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
|
@@ -7,6 +7,7 @@ import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
|
7
7
|
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
8
|
import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
|
|
9
9
|
import { RendererCssClassName } from '../../../../consts';
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
10
11
|
var lightWeightCodeBlockStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n cursor: text;\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER);
|
|
11
12
|
export var LightWeightCodeBlockCssClassName = {
|
|
12
13
|
CONTAINER: 'light-weight-code-block'
|
|
@@ -18,6 +19,7 @@ export var getLightWeightCodeBlockStylesForRootRendererStyleSheet = function get
|
|
|
18
19
|
// lightweight codeblock containers will not be targeted.
|
|
19
20
|
// NOTE: This must be added after other .code-block styles in the root
|
|
20
21
|
// Renderer stylesheet.
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
21
23
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "\n > .", "\n .", " {\n margin-top: ", ";\n }\n "])), RendererCssClassName.DOCUMENT, LightWeightCodeBlockCssClassName.CONTAINER, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, blockNodesVerticalMargin);
|
|
22
24
|
};
|
|
23
25
|
var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -6,10 +6,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
10
9
|
import _extends from "@babel/runtime/helpers/extends";
|
|
11
10
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
12
|
-
var _templateObject;
|
|
13
11
|
var _excluded = ["children"];
|
|
14
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
15
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -32,7 +30,15 @@ var CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef(function (props, re
|
|
|
32
30
|
ref: ref
|
|
33
31
|
}), children);
|
|
34
32
|
});
|
|
35
|
-
var copyAnchorButtonStyles = css(
|
|
33
|
+
var copyAnchorButtonStyles = css({
|
|
34
|
+
display: 'inline',
|
|
35
|
+
outline: 'none',
|
|
36
|
+
backgroundColor: 'transparent',
|
|
37
|
+
border: 'none',
|
|
38
|
+
color: "var(--ds-icon, ".concat(N500, ")"),
|
|
39
|
+
cursor: 'pointer',
|
|
40
|
+
right: 0
|
|
41
|
+
});
|
|
36
42
|
var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
37
43
|
_inherits(HeadingAnchor, _React$PureComponent);
|
|
38
44
|
var _super = _createSuper(HeadingAnchor);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { jsx, css } from '@emotion/react';
|
|
6
4
|
import { WidthProvider, clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle } from '@atlaskit/editor-common/ui';
|
|
7
|
-
var layoutColumnClearMarginTopStyles = css(
|
|
5
|
+
var layoutColumnClearMarginTopStyles = css(clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle);
|
|
8
6
|
export default function LayoutSection(props) {
|
|
9
7
|
return jsx("div", {
|
|
10
8
|
"data-layout-column": true,
|
|
@@ -298,9 +298,9 @@ var MediaWithDraftAnnotation = function MediaWithDraftAnnotation(props) {
|
|
|
298
298
|
if (pos === undefined) {
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
|
-
if (draftPosition !== null && draftPosition.from
|
|
301
|
+
if (draftPosition !== null && draftPosition.from === pos) {
|
|
302
302
|
setShouldApplyDraftAnnotation(true);
|
|
303
|
-
setPosition(
|
|
303
|
+
setPosition(draftPosition === null || draftPosition === void 0 ? void 0 : draftPosition.from);
|
|
304
304
|
} else if (draftPosition === null && shouldApplyDraftAnnotation) {
|
|
305
305
|
setShouldApplyDraftAnnotation(false);
|
|
306
306
|
setPosition(undefined);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import { css } from '@emotion/react';
|
|
5
|
-
export var uiMediaSingleBaseStyles = css(
|
|
6
|
-
|
|
3
|
+
export var uiMediaSingleBaseStyles = css({
|
|
4
|
+
transition: 'all 0.1s linear'
|
|
5
|
+
});
|
|
6
|
+
export var uiMediaSingleLayoutStyles = css({
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
8
|
+
marginLeft: '50%',
|
|
9
|
+
transform: 'translateX(-50%)'
|
|
10
|
+
});
|
|
@@ -42,6 +42,8 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
42
42
|
}, [updateActiveChild, children]);
|
|
43
43
|
return actions;
|
|
44
44
|
};
|
|
45
|
+
|
|
46
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
45
47
|
var navigationCssExtended = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), sharedMultiBodiedExtensionStyles.mbeNavigation);
|
|
46
48
|
var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
47
49
|
var children = props.children,
|
|
@@ -70,6 +72,7 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
70
72
|
updateActiveChild: updateActiveChild,
|
|
71
73
|
children: children
|
|
72
74
|
});
|
|
75
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
73
76
|
var containerCssExtended = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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 "])), sharedMultiBodiedExtensionStyles.mbeExtensionContainer, "var(--ds-border, ".concat(N40, ")"), activeChildIndex + 1, sharedMultiBodiedExtensionStyles.extensionFrameContent);
|
|
74
77
|
var isTopLevel = path.length < 1;
|
|
75
78
|
var centerAlignClass = isTopLevel && ['wide', 'full-width'].includes(layout) ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
@@ -111,7 +114,9 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
111
114
|
}, children));
|
|
112
115
|
}
|
|
113
116
|
return jsx("section", {
|
|
114
|
-
className: "multiBodiedExtension--container"
|
|
117
|
+
className: "multiBodiedExtension--container"
|
|
118
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
119
|
+
,
|
|
115
120
|
css: containerCssExtended,
|
|
116
121
|
"data-testid": "multiBodiedExtension--container",
|
|
117
122
|
"data-active-child-index": activeChildIndex,
|
package/dist/esm/steps/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
2
3
|
function getStartPos(element) {
|
|
3
4
|
return parseInt(element.dataset.rendererStartPos || '-1', 10);
|
|
4
5
|
}
|
|
6
|
+
var getNodeType = function getNodeType(element) {
|
|
7
|
+
return element.dataset.nodeType;
|
|
8
|
+
};
|
|
5
9
|
function isPositionPointer(element) {
|
|
6
10
|
return getStartPos(element) > -1;
|
|
7
11
|
}
|
|
@@ -15,16 +19,6 @@ function findParent(element) {
|
|
|
15
19
|
}
|
|
16
20
|
return findParent(parentElement);
|
|
17
21
|
}
|
|
18
|
-
function findMediaParent(element) {
|
|
19
|
-
var parentElement = element.parentElement;
|
|
20
|
-
if (!parentElement || isRoot(parentElement)) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
if (parentElement.dataset.nodeType === 'mediaSingle') {
|
|
24
|
-
return parentElement;
|
|
25
|
-
}
|
|
26
|
-
return findParent(parentElement);
|
|
27
|
-
}
|
|
28
22
|
function findParentBeforePointer(element) {
|
|
29
23
|
var parentElement = element.parentElement;
|
|
30
24
|
if (isRoot(parentElement) || !parentElement) {
|
|
@@ -51,22 +45,39 @@ function isNodeInlineMark(node) {
|
|
|
51
45
|
function isElementInlineMark(element) {
|
|
52
46
|
return !!element && Boolean(element.dataset.rendererMark);
|
|
53
47
|
}
|
|
48
|
+
function isNodeInlineTextMark(node) {
|
|
49
|
+
if (node === null) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
var isInlineMark = isElementNode(node) && Boolean(node.dataset.rendererMark);
|
|
53
|
+
if (!isInlineMark) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This checks if the element has any descendents with the data-inline-card
|
|
59
|
+
* attribute set to 'true'. If it does, we should not consider it as an
|
|
60
|
+
* inline text mark.
|
|
61
|
+
**/
|
|
62
|
+
|
|
63
|
+
if (hasInlineCardDescendant(node)) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
54
68
|
|
|
55
69
|
/**
|
|
56
|
-
* This
|
|
57
|
-
*
|
|
70
|
+
* This checks all the descendents of a node and returns true if it reaches
|
|
71
|
+
* a descendant with the data-inline-card attribute set to 'true'.
|
|
58
72
|
*/
|
|
59
|
-
function
|
|
60
|
-
if (isTextNode(node)) {
|
|
61
|
-
return node.textContent;
|
|
62
|
-
}
|
|
73
|
+
function hasInlineCardDescendant(node) {
|
|
63
74
|
if (isElementNode(node)) {
|
|
64
75
|
if (node.dataset.inlineCard === 'true') {
|
|
65
|
-
return
|
|
76
|
+
return true;
|
|
66
77
|
}
|
|
67
|
-
return Array.from(node.childNodes).
|
|
78
|
+
return Array.from(node.childNodes).some(hasInlineCardDescendant);
|
|
68
79
|
}
|
|
69
|
-
return
|
|
80
|
+
return false;
|
|
70
81
|
}
|
|
71
82
|
function resolveNodePos(node) {
|
|
72
83
|
var resolvedPos = 0;
|
|
@@ -75,10 +86,18 @@ function resolveNodePos(node) {
|
|
|
75
86
|
if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
|
|
76
87
|
resolvedPos += (prev.textContent || '').length;
|
|
77
88
|
} else if (prev) {
|
|
78
|
-
if (
|
|
79
|
-
|
|
89
|
+
if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
90
|
+
if (isNodeInlineTextMark(prev) && prev.textContent) {
|
|
91
|
+
resolvedPos += prev.textContent.length;
|
|
92
|
+
} else {
|
|
93
|
+
resolvedPos += 1;
|
|
94
|
+
}
|
|
80
95
|
} else {
|
|
81
|
-
|
|
96
|
+
if (isNodeInlineMark(prev) && prev.textContent) {
|
|
97
|
+
resolvedPos += prev.textContent.length;
|
|
98
|
+
} else {
|
|
99
|
+
resolvedPos += 1;
|
|
100
|
+
}
|
|
82
101
|
}
|
|
83
102
|
}
|
|
84
103
|
prev = prev.previousSibling;
|
|
@@ -112,9 +131,16 @@ export function resolvePos(node, offset) {
|
|
|
112
131
|
// If our range is inside an inline node
|
|
113
132
|
// We need to move our pointers to parent element
|
|
114
133
|
// since we don't want to count text inside inline nodes at all
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
|
|
134
|
+
if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
135
|
+
if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
|
|
136
|
+
current = current.parentElement;
|
|
137
|
+
offset = 0;
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
if (!(isElementInlineMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
|
|
141
|
+
current = current.parentElement;
|
|
142
|
+
offset = 0;
|
|
143
|
+
}
|
|
118
144
|
}
|
|
119
145
|
resolvedPos += resolveNodePos(current);
|
|
120
146
|
while (current && current.parentElement !== parent) {
|
|
@@ -134,8 +160,8 @@ export function getPosFromRange(range) {
|
|
|
134
160
|
startOffset = range.startOffset,
|
|
135
161
|
endContainer = range.endContainer,
|
|
136
162
|
endOffset = range.endOffset;
|
|
137
|
-
var parent =
|
|
138
|
-
if (parent) {
|
|
163
|
+
var parent = findParent(startContainer);
|
|
164
|
+
if (parent && getNodeType(parent) === 'media') {
|
|
139
165
|
var pos = getStartPos(parent);
|
|
140
166
|
return {
|
|
141
167
|
from: pos,
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["expanded"];
|
|
6
|
-
var _templateObject, _templateObject2, _templateObject3
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
7
7
|
/** @jsx jsx */
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import React, { useCallback, useMemo, useRef } from 'react';
|
|
@@ -19,39 +19,65 @@ import { injectIntl } from 'react-intl-next';
|
|
|
19
19
|
import { MODE, PLATFORM } from '../analytics/events';
|
|
20
20
|
import { getPlatform } from '../utils';
|
|
21
21
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
22
|
-
var titleStyles = css(
|
|
22
|
+
var titleStyles = css({
|
|
23
|
+
outline: 'none',
|
|
24
|
+
border: 'none',
|
|
25
|
+
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
26
|
+
lineHeight: akEditorLineHeight,
|
|
27
|
+
fontWeight: 'normal',
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flex: 1,
|
|
30
|
+
margin: 0,
|
|
31
|
+
padding: "0 0 0 ".concat("var(--ds-space-050, 4px)"),
|
|
32
|
+
textAlign: 'left'
|
|
33
|
+
});
|
|
23
34
|
var Container = function Container(props) {
|
|
24
35
|
var paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
25
36
|
var sharedContainerStyles = sharedExpandStyles.containerStyles(props);
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
26
39
|
var styles = function styles() {
|
|
27
|
-
return css(
|
|
40
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n padding: 0;\n padding-bottom: ", ";\n "])), sharedContainerStyles(), paddingBottom);
|
|
28
41
|
};
|
|
29
|
-
return
|
|
30
|
-
css
|
|
31
|
-
|
|
42
|
+
return (
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
44
|
+
jsx("div", _extends({
|
|
45
|
+
css: styles
|
|
46
|
+
}, props), props.children)
|
|
47
|
+
);
|
|
32
48
|
};
|
|
33
49
|
var TitleContainer = function TitleContainer(props) {
|
|
34
50
|
var paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
51
|
+
|
|
52
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
35
53
|
var styles = function styles() {
|
|
36
|
-
return css(
|
|
54
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n padding: ", ";\n padding-bottom: ", ";\n "])), sharedExpandStyles.titleContainerStyles(), "var(--ds-space-100, 8px)", paddingBottom);
|
|
37
55
|
};
|
|
38
56
|
var expanded = props.expanded,
|
|
39
57
|
buttonProps = _objectWithoutProperties(props, _excluded);
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
return (
|
|
59
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
60
|
+
jsx("button", _extends({
|
|
61
|
+
type: "button",
|
|
62
|
+
css: styles
|
|
63
|
+
}, buttonProps), props.children)
|
|
64
|
+
);
|
|
44
65
|
};
|
|
45
66
|
TitleContainer.displayName = 'TitleContainerButton';
|
|
46
67
|
var ContentContainer = function ContentContainer(props) {
|
|
47
68
|
var sharedContentStyles = sharedExpandStyles.contentStyles(props);
|
|
48
69
|
var visibility = props.expanded ? 'visible' : 'hidden';
|
|
70
|
+
|
|
71
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
49
72
|
var styles = function styles() {
|
|
50
|
-
return css(
|
|
73
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", ";\n padding-right: ", ";\n padding-left: ", ";\n visibility: ", ";\n "])), sharedContentStyles(), "var(--ds-space-200, 16px)", "var(--ds-space-400, 32px)", visibility);
|
|
51
74
|
};
|
|
52
|
-
return
|
|
53
|
-
css
|
|
54
|
-
|
|
75
|
+
return (
|
|
76
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
77
|
+
jsx("div", _extends({
|
|
78
|
+
css: styles
|
|
79
|
+
}, props), props.children)
|
|
80
|
+
);
|
|
55
81
|
};
|
|
56
82
|
function fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent) {
|
|
57
83
|
if (!fireAnalyticsEvent) {
|
|
@@ -46,7 +46,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
46
46
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
47
47
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
48
48
|
var packageName = "@atlaskit/renderer";
|
|
49
|
-
var packageVersion = "109.19.
|
|
49
|
+
var packageVersion = "109.19.5";
|
|
50
50
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
51
51
|
_inherits(Renderer, _PureComponent);
|
|
52
52
|
var _super = _createSuper(Renderer);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
|
|
3
4
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
5
|
|
|
5
6
|
import { css } from '@emotion/react';
|
|
@@ -25,7 +26,7 @@ var telepointerStyles = function telepointerStyles() {
|
|
|
25
26
|
var _getGlobalTheme = getGlobalTheme(),
|
|
26
27
|
colorMode = _getGlobalTheme.colorMode;
|
|
27
28
|
|
|
28
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
29
30
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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');
|
|
30
31
|
};
|
|
31
32
|
var getLineHeight = function getLineHeight(fontCode) {
|
|
@@ -3,15 +3,26 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
7
|
-
var _templateObject;
|
|
8
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
8
|
/** @jsx jsx */
|
|
11
9
|
import { css, jsx } from '@emotion/react';
|
|
12
10
|
import { Component } from 'react';
|
|
13
11
|
var fadeOutStyles = function fadeOutStyles(maxHeight, top, backgroundColor) {
|
|
14
|
-
return css(
|
|
12
|
+
return css({
|
|
13
|
+
position: 'relative',
|
|
14
|
+
overflowY: 'hidden',
|
|
15
|
+
maxHeight: "".concat(maxHeight, "px"),
|
|
16
|
+
'&::after': {
|
|
17
|
+
content: "''",
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
top: "".concat(top, "px"),
|
|
20
|
+
bottom: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
right: 0,
|
|
23
|
+
backgroundImage: "linear-gradient( ".concat("var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0))", ", ", backgroundColor, " )")
|
|
24
|
+
}
|
|
25
|
+
});
|
|
15
26
|
};
|
|
16
27
|
var FadeOut = function FadeOut(props) {
|
|
17
28
|
var children = props.children,
|
|
@@ -20,6 +31,7 @@ var FadeOut = function FadeOut(props) {
|
|
|
20
31
|
height = props.height;
|
|
21
32
|
var top = height - fadeHeight;
|
|
22
33
|
var styles = fadeOutStyles(height, top, backgroundColor);
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
23
35
|
return jsx("div", {
|
|
24
36
|
css: styles
|
|
25
37
|
}, children);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2
|
|
2
|
+
var _templateObject, _templateObject2;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -15,13 +15,36 @@ export var StatusClassNames = /*#__PURE__*/function (StatusClassNames) {
|
|
|
15
15
|
StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
|
|
16
16
|
return StatusClassNames;
|
|
17
17
|
}({});
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
18
20
|
var buttonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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(N20, ")"), "var(--ds-surface-overlay-hovered, ".concat(N30, ")"), "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))", RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
19
23
|
var iconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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, RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
20
24
|
|
|
21
25
|
// The icon is created with CSS due to the following Firefox issue: https://product-fabric.atlassian.net/browse/ED-8001
|
|
22
26
|
// 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.
|
|
23
27
|
// For this reason, svg's should be avoided in tables until this issue is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
|
|
24
|
-
var iconStyles = css(
|
|
28
|
+
var iconStyles = css({
|
|
29
|
+
height: '100%',
|
|
30
|
+
width: '2px',
|
|
31
|
+
borderRadius: '50px',
|
|
32
|
+
background: "var(--ds-icon, #42526E)",
|
|
33
|
+
'&::before, &::after': {
|
|
34
|
+
background: "var(--ds-icon, #42526E)",
|
|
35
|
+
content: "''",
|
|
36
|
+
height: '2px',
|
|
37
|
+
width: '6px',
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
borderRadius: '50px'
|
|
40
|
+
},
|
|
41
|
+
'&::before': {
|
|
42
|
+
transform: 'rotate(45deg) translate(3.4px, 8.5px)'
|
|
43
|
+
},
|
|
44
|
+
'&::after': {
|
|
45
|
+
transform: 'rotate(-45deg) translate(-6.3px, 5.7px)'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
25
48
|
var getIconClassName = function getIconClassName(isSortingAllowed, sortOrdered) {
|
|
26
49
|
var activated = sortOrdered !== SortOrder.NO_ORDER;
|
|
27
50
|
var activeStatusClass = "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON, "-").concat(activated ? 'active' : 'inactive');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { AlignmentAttributes } from '@atlaskit/adf-schema';
|
|
3
|
-
import { MarkProps } from '../types';
|
|
2
|
+
import type { AlignmentAttributes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { MarkProps } from '../types';
|
|
4
4
|
export default function Alignment(props: MarkProps<AlignmentAttributes>): jsx.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
4
|
-
import { MarkProps } from '../types';
|
|
3
|
+
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
4
|
+
import type { MarkProps } from '../types';
|
|
5
5
|
export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export default function Breakout(props: MarkProps<BreakoutMarkAttrs>): jsx.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { LinkAttributes } from '@atlaskit/adf-schema';
|
|
3
|
-
import { MarkProps } from '../types';
|
|
2
|
+
import type { LinkAttributes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { MarkProps } from '../types';
|
|
4
4
|
interface LinkProps extends LinkAttributes {
|
|
5
5
|
target?: string;
|
|
6
6
|
isMediaLink?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { AlignmentAttributes } from '@atlaskit/adf-schema';
|
|
3
|
-
import { MarkProps } from '../types';
|
|
2
|
+
import type { AlignmentAttributes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { MarkProps } from '../types';
|
|
4
4
|
export default function Alignment(props: MarkProps<AlignmentAttributes>): jsx.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
4
|
-
import { MarkProps } from '../types';
|
|
3
|
+
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
4
|
+
import type { MarkProps } from '../types';
|
|
5
5
|
export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export default function Breakout(props: MarkProps<BreakoutMarkAttrs>): jsx.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { LinkAttributes } from '@atlaskit/adf-schema';
|
|
3
|
-
import { MarkProps } from '../types';
|
|
2
|
+
import type { LinkAttributes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { MarkProps } from '../types';
|
|
4
4
|
interface LinkProps extends LinkAttributes {
|
|
5
5
|
target?: string;
|
|
6
6
|
isMediaLink?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.19.
|
|
3
|
+
"version": "109.19.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"runReact18": true
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^35.9.
|
|
27
|
+
"@atlaskit/adf-schema": "^35.9.2",
|
|
28
28
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
29
29
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
30
30
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
31
31
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
32
|
-
"@atlaskit/button": "^17.
|
|
32
|
+
"@atlaskit/button": "^17.13.0",
|
|
33
33
|
"@atlaskit/code": "^15.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^78.
|
|
34
|
+
"@atlaskit/editor-common": "^78.30.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.5.3",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
45
45
|
"@atlaskit/media-common": "^11.1.0",
|
|
46
46
|
"@atlaskit/media-filmstrip": "^47.0.0",
|
|
47
|
-
"@atlaskit/media-ui": "^25.
|
|
47
|
+
"@atlaskit/media-ui": "^25.9.0",
|
|
48
48
|
"@atlaskit/media-viewer": "^48.4.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
50
|
-
"@atlaskit/smart-card": "^26.
|
|
50
|
+
"@atlaskit/smart-card": "^26.57.0",
|
|
51
51
|
"@atlaskit/status": "^1.4.0",
|
|
52
52
|
"@atlaskit/task-decision": "^17.9.0",
|
|
53
53
|
"@atlaskit/theme": "^12.7.0",
|