@atlaskit/renderer 105.0.3 → 105.1.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 +17 -0
- package/dist/cjs/react/nodes/inlineCard.js +9 -3
- package/dist/cjs/ui/Expand.js +14 -3
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/react/nodes/inlineCard.js +9 -3
- package/dist/es2019/ui/Expand.js +12 -4
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +2 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/react/nodes/inlineCard.js +9 -3
- package/dist/esm/ui/Expand.js +14 -4
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/types/smartLinksOptions.d.ts +1 -0
- package/dist/types/ui/Expand.d.ts +2 -0
- package/docs/0-intro.tsx +9 -0
- package/package.json +12 -12
- package/report.api.md +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 105.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a40ac7f5614`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a40ac7f5614) - New Smartlinks prop to allow renderer to determine whether smart link component inside AK renderer should show auth tooltip on unauthenticated inline links
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [`a1031a55381`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a1031a55381) - [ux][ed-16466] Tooltip that notifies if expand is open or closed should not render on mobile
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 105.0.4
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`2ff1c66a6ab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2ff1c66a6ab) - [ux] ED-16490 fixed bug so big margin will not occur before a Decision node in Renderer on iOS
|
|
19
|
+
|
|
3
20
|
## 105.0.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -40,10 +40,15 @@ var InlineCard = function InlineCard(props) {
|
|
|
40
40
|
};
|
|
41
41
|
var featureFlags = (0, _useFeatureFlags.useFeatureFlags)();
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
var _ref = smartLinks || {},
|
|
44
|
+
showAuthTooltip = _ref.showAuthTooltip,
|
|
45
|
+
ssr = _ref.ssr;
|
|
46
|
+
|
|
47
|
+
if (ssr && url) {
|
|
44
48
|
return /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
|
|
45
49
|
appearance: "inline",
|
|
46
|
-
url: url
|
|
50
|
+
url: url,
|
|
51
|
+
showAuthTooltip: showAuthTooltip
|
|
47
52
|
});
|
|
48
53
|
}
|
|
49
54
|
|
|
@@ -55,7 +60,8 @@ var InlineCard = function InlineCard(props) {
|
|
|
55
60
|
unsupportedComponent: _ui.UnsupportedInline
|
|
56
61
|
}, cardProps), /*#__PURE__*/_react.default.createElement(_smartCard.Card, (0, _extends2.default)({
|
|
57
62
|
appearance: "inline",
|
|
58
|
-
showHoverPreview: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.showHoverPreview
|
|
63
|
+
showHoverPreview: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.showHoverPreview,
|
|
64
|
+
showAuthTooltip: showAuthTooltip
|
|
59
65
|
}, cardProps, {
|
|
60
66
|
onResolve: function onResolve(data) {
|
|
61
67
|
if (!data.url || !data.title) {
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -39,6 +39,8 @@ var _activeHeaderIdProvider = require("./active-header-id-provider");
|
|
|
39
39
|
|
|
40
40
|
var _uniqueId2 = _interopRequireDefault(require("lodash/uniqueId"));
|
|
41
41
|
|
|
42
|
+
var _utils = require("../utils");
|
|
43
|
+
|
|
42
44
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
43
45
|
|
|
44
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -118,7 +120,8 @@ function Expand(_ref) {
|
|
|
118
120
|
nodeType = _ref.nodeType,
|
|
119
121
|
intl = _ref.intl,
|
|
120
122
|
fireAnalyticsEvent = _ref.fireAnalyticsEvent,
|
|
121
|
-
nestedHeaderIds = _ref.nestedHeaderIds
|
|
123
|
+
nestedHeaderIds = _ref.nestedHeaderIds,
|
|
124
|
+
rendererAppearance = _ref.rendererAppearance;
|
|
122
125
|
|
|
123
126
|
var _React$useState = _react.default.useState(false),
|
|
124
127
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -130,6 +133,9 @@ function Expand(_ref) {
|
|
|
130
133
|
focused = _React$useState4[0],
|
|
131
134
|
setFocused = _React$useState4[1];
|
|
132
135
|
|
|
136
|
+
var isMobile = (0, _react.useMemo)(function () {
|
|
137
|
+
return (0, _utils.getPlatform)(rendererAppearance) === 'mobile';
|
|
138
|
+
}, [rendererAppearance]);
|
|
133
139
|
var label = intl.formatMessage(expanded ? _ui.expandMessages.collapseNode : _ui.expandMessages.expandNode);
|
|
134
140
|
|
|
135
141
|
var _useRef = (0, _react.useRef)((0, _uniqueId2.default)('expand-title-')),
|
|
@@ -167,10 +173,15 @@ function Expand(_ref) {
|
|
|
167
173
|
"aria-expanded": expanded,
|
|
168
174
|
contentEditable: false,
|
|
169
175
|
expanded: expanded
|
|
170
|
-
}, (0, _react2.jsx)(
|
|
176
|
+
}, isMobile ? (0, _react2.jsx)(_ui.ExpandIconWrapper, {
|
|
177
|
+
expanded: expanded
|
|
178
|
+
}, (0, _react2.jsx)(_chevronRight.default, {
|
|
179
|
+
label: label
|
|
180
|
+
})) : (0, _react2.jsx)(_tooltip.default, {
|
|
171
181
|
content: label,
|
|
172
182
|
position: "top",
|
|
173
|
-
tag: _ui.ExpandLayoutWrapperWithRef
|
|
183
|
+
tag: _ui.ExpandLayoutWrapperWithRef,
|
|
184
|
+
testId: 'tooltip'
|
|
174
185
|
}, (0, _react2.jsx)(_ui.ExpandIconWrapper, {
|
|
175
186
|
expanded: expanded
|
|
176
187
|
}, (0, _react2.jsx)(_chevronRight.default, {
|
|
@@ -102,7 +102,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
|
|
|
102
102
|
var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
103
103
|
exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
|
|
104
104
|
var packageName = "@atlaskit/renderer";
|
|
105
|
-
var packageVersion = "105.0
|
|
105
|
+
var packageVersion = "105.1.0";
|
|
106
106
|
|
|
107
107
|
var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
108
108
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
@@ -128,7 +128,7 @@ var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
128
128
|
var themeProps = {
|
|
129
129
|
theme: theme
|
|
130
130
|
};
|
|
131
|
-
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), (0, _editorSharedStyles.editorFontSize)(themeProps), (0, _components.themed)({
|
|
131
|
+
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n "])), (0, _editorSharedStyles.editorFontSize)(themeProps), (0, _components.themed)({
|
|
132
132
|
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
133
133
|
dark: "var(--ds-text, #B8C7E0)"
|
|
134
134
|
})(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), colors.placeholderText(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(themeProps), (0, _styles.ruleSharedStyles)(themeProps), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(themeProps), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
|
package/dist/cjs/version.json
CHANGED
|
@@ -24,11 +24,16 @@ const InlineCard = props => {
|
|
|
24
24
|
container: portal
|
|
25
25
|
};
|
|
26
26
|
const featureFlags = useFeatureFlags();
|
|
27
|
+
const {
|
|
28
|
+
showAuthTooltip,
|
|
29
|
+
ssr
|
|
30
|
+
} = smartLinks || {};
|
|
27
31
|
|
|
28
|
-
if (
|
|
32
|
+
if (ssr && url) {
|
|
29
33
|
return /*#__PURE__*/React.createElement(CardSSR, {
|
|
30
34
|
appearance: "inline",
|
|
31
|
-
url: url
|
|
35
|
+
url: url,
|
|
36
|
+
showAuthTooltip: showAuthTooltip
|
|
32
37
|
});
|
|
33
38
|
}
|
|
34
39
|
|
|
@@ -40,7 +45,8 @@ const InlineCard = props => {
|
|
|
40
45
|
unsupportedComponent: UnsupportedInline
|
|
41
46
|
}, cardProps), /*#__PURE__*/React.createElement(Card, _extends({
|
|
42
47
|
appearance: "inline",
|
|
43
|
-
showHoverPreview: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.showHoverPreview
|
|
48
|
+
showHoverPreview: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.showHoverPreview,
|
|
49
|
+
showAuthTooltip: showAuthTooltip
|
|
44
50
|
}, cardProps, {
|
|
45
51
|
onResolve: data => {
|
|
46
52
|
if (!data.url || !data.title) {
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import React, { useRef, useCallback } from 'react';
|
|
4
|
+
import React, { useRef, useCallback, useMemo } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { gridSize, fontSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
@@ -13,6 +13,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
13
13
|
import { injectIntl } from 'react-intl-next';
|
|
14
14
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
15
15
|
import _uniqueId from 'lodash/uniqueId';
|
|
16
|
+
import { getPlatform } from '../utils';
|
|
16
17
|
const titleStyles = css`
|
|
17
18
|
outline: none;
|
|
18
19
|
border: none;
|
|
@@ -102,10 +103,12 @@ function Expand({
|
|
|
102
103
|
nodeType,
|
|
103
104
|
intl,
|
|
104
105
|
fireAnalyticsEvent,
|
|
105
|
-
nestedHeaderIds
|
|
106
|
+
nestedHeaderIds,
|
|
107
|
+
rendererAppearance
|
|
106
108
|
}) {
|
|
107
109
|
const [expanded, setExpanded] = React.useState(false);
|
|
108
110
|
const [focused, setFocused] = React.useState(false);
|
|
111
|
+
const isMobile = useMemo(() => getPlatform(rendererAppearance) === 'mobile', [rendererAppearance]);
|
|
109
112
|
const label = intl.formatMessage(expanded ? expandMessages.collapseNode : expandMessages.expandNode);
|
|
110
113
|
const {
|
|
111
114
|
current: id
|
|
@@ -136,10 +139,15 @@ function Expand({
|
|
|
136
139
|
"aria-expanded": expanded,
|
|
137
140
|
contentEditable: false,
|
|
138
141
|
expanded: expanded
|
|
139
|
-
}, jsx(
|
|
142
|
+
}, isMobile ? jsx(ExpandIconWrapper, {
|
|
143
|
+
expanded: expanded
|
|
144
|
+
}, jsx(ChevronRightIcon, {
|
|
145
|
+
label: label
|
|
146
|
+
})) : jsx(Tooltip, {
|
|
140
147
|
content: label,
|
|
141
148
|
position: "top",
|
|
142
|
-
tag: ExpandLayoutWrapperWithRef
|
|
149
|
+
tag: ExpandLayoutWrapperWithRef,
|
|
150
|
+
testId: 'tooltip'
|
|
143
151
|
}, jsx(ExpandIconWrapper, {
|
|
144
152
|
expanded: expanded
|
|
145
153
|
}, jsx(ChevronRightIcon, {
|
|
@@ -36,7 +36,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
36
36
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
37
37
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
38
38
|
const packageName = "@atlaskit/renderer";
|
|
39
|
-
const packageVersion = "105.0
|
|
39
|
+
const packageVersion = "105.1.0";
|
|
40
40
|
export class Renderer extends PureComponent {
|
|
41
41
|
/**
|
|
42
42
|
* This is used in measuring the Renderer Mount time and is then
|
|
@@ -694,7 +694,9 @@ export const rendererStyles = wrapperProps => theme => {
|
|
|
694
694
|
> div:last-of-type.code-block {
|
|
695
695
|
margin-bottom: ${blockNodesVerticalMargin};
|
|
696
696
|
}
|
|
697
|
+
}
|
|
697
698
|
|
|
699
|
+
& :not([data-node-type='decisionList']) > li {
|
|
698
700
|
${browser.safari ? codeBlockInListSafariFix : ''}
|
|
699
701
|
}
|
|
700
702
|
`;
|
package/dist/es2019/version.json
CHANGED
|
@@ -23,10 +23,15 @@ var InlineCard = function InlineCard(props) {
|
|
|
23
23
|
};
|
|
24
24
|
var featureFlags = useFeatureFlags();
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
var _ref = smartLinks || {},
|
|
27
|
+
showAuthTooltip = _ref.showAuthTooltip,
|
|
28
|
+
ssr = _ref.ssr;
|
|
29
|
+
|
|
30
|
+
if (ssr && url) {
|
|
27
31
|
return /*#__PURE__*/React.createElement(CardSSR, {
|
|
28
32
|
appearance: "inline",
|
|
29
|
-
url: url
|
|
33
|
+
url: url,
|
|
34
|
+
showAuthTooltip: showAuthTooltip
|
|
30
35
|
});
|
|
31
36
|
}
|
|
32
37
|
|
|
@@ -38,7 +43,8 @@ var InlineCard = function InlineCard(props) {
|
|
|
38
43
|
unsupportedComponent: UnsupportedInline
|
|
39
44
|
}, cardProps), /*#__PURE__*/React.createElement(Card, _extends({
|
|
40
45
|
appearance: "inline",
|
|
41
|
-
showHoverPreview: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.showHoverPreview
|
|
46
|
+
showHoverPreview: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.showHoverPreview,
|
|
47
|
+
showAuthTooltip: showAuthTooltip
|
|
42
48
|
}, cardProps, {
|
|
43
49
|
onResolve: function onResolve(data) {
|
|
44
50
|
if (!data.url || !data.title) {
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -5,7 +5,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
6
6
|
|
|
7
7
|
/** @jsx jsx */
|
|
8
|
-
import React, { useRef, useCallback } from 'react';
|
|
8
|
+
import React, { useRef, useCallback, useMemo } from 'react';
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { gridSize, fontSize } from '@atlaskit/theme/constants';
|
|
11
11
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
@@ -17,6 +17,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
17
17
|
import { injectIntl } from 'react-intl-next';
|
|
18
18
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
19
19
|
import _uniqueId from 'lodash/uniqueId';
|
|
20
|
+
import { getPlatform } from '../utils';
|
|
20
21
|
var titleStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n border: none;\n font-size: ", ";\n line-height: ", ";\n font-weight: normal;\n display: flex;\n flex: 1;\n margin: 0;\n padding: 0 0 0 ", "px;\n text-align: left;\n"])), relativeFontSizeToBase16(fontSize()), akEditorLineHeight, gridSize() / 2);
|
|
21
22
|
|
|
22
23
|
var Container = function Container(props) {
|
|
@@ -88,7 +89,8 @@ function Expand(_ref) {
|
|
|
88
89
|
nodeType = _ref.nodeType,
|
|
89
90
|
intl = _ref.intl,
|
|
90
91
|
fireAnalyticsEvent = _ref.fireAnalyticsEvent,
|
|
91
|
-
nestedHeaderIds = _ref.nestedHeaderIds
|
|
92
|
+
nestedHeaderIds = _ref.nestedHeaderIds,
|
|
93
|
+
rendererAppearance = _ref.rendererAppearance;
|
|
92
94
|
|
|
93
95
|
var _React$useState = React.useState(false),
|
|
94
96
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -100,6 +102,9 @@ function Expand(_ref) {
|
|
|
100
102
|
focused = _React$useState4[0],
|
|
101
103
|
setFocused = _React$useState4[1];
|
|
102
104
|
|
|
105
|
+
var isMobile = useMemo(function () {
|
|
106
|
+
return getPlatform(rendererAppearance) === 'mobile';
|
|
107
|
+
}, [rendererAppearance]);
|
|
103
108
|
var label = intl.formatMessage(expanded ? expandMessages.collapseNode : expandMessages.expandNode);
|
|
104
109
|
|
|
105
110
|
var _useRef = useRef(_uniqueId('expand-title-')),
|
|
@@ -137,10 +142,15 @@ function Expand(_ref) {
|
|
|
137
142
|
"aria-expanded": expanded,
|
|
138
143
|
contentEditable: false,
|
|
139
144
|
expanded: expanded
|
|
140
|
-
}, jsx(
|
|
145
|
+
}, isMobile ? jsx(ExpandIconWrapper, {
|
|
146
|
+
expanded: expanded
|
|
147
|
+
}, jsx(ChevronRightIcon, {
|
|
148
|
+
label: label
|
|
149
|
+
})) : jsx(Tooltip, {
|
|
141
150
|
content: label,
|
|
142
151
|
position: "top",
|
|
143
|
-
tag: ExpandLayoutWrapperWithRef
|
|
152
|
+
tag: ExpandLayoutWrapperWithRef,
|
|
153
|
+
testId: 'tooltip'
|
|
144
154
|
}, jsx(ExpandIconWrapper, {
|
|
145
155
|
expanded: expanded
|
|
146
156
|
}, jsx(ChevronRightIcon, {
|
|
@@ -50,7 +50,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
50
50
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
51
51
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
52
52
|
var packageName = "@atlaskit/renderer";
|
|
53
|
-
var packageVersion = "105.0
|
|
53
|
+
var packageVersion = "105.1.0";
|
|
54
54
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
55
55
|
_inherits(Renderer, _PureComponent);
|
|
56
56
|
|
|
@@ -100,7 +100,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
100
100
|
var themeProps = {
|
|
101
101
|
theme: theme
|
|
102
102
|
};
|
|
103
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), editorFontSize(themeProps), themed({
|
|
103
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n "])), editorFontSize(themeProps), themed({
|
|
104
104
|
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
105
105
|
dark: "var(--ds-text, #B8C7E0)"
|
|
106
106
|
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), colors.placeholderText(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
package/dist/esm/version.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { AnalyticsEventPayload } from '../analytics/events';
|
|
4
4
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import { RendererAppearance } from './Renderer/types';
|
|
5
6
|
export declare type StyleProps = {
|
|
6
7
|
expanded?: boolean;
|
|
7
8
|
focused?: boolean;
|
|
@@ -14,6 +15,7 @@ export interface ExpandProps {
|
|
|
14
15
|
children: React.ReactNode;
|
|
15
16
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
16
17
|
nestedHeaderIds?: Array<string>;
|
|
18
|
+
rendererAppearance?: RendererAppearance;
|
|
17
19
|
}
|
|
18
20
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ExpandProps & WrappedComponentProps<"intl">>> & {
|
|
19
21
|
WrappedComponent: React.ComponentType<ExpandProps & WrappedComponentProps<"intl">>;
|
package/docs/0-intro.tsx
CHANGED
|
@@ -137,6 +137,15 @@ ${(
|
|
|
137
137
|
/>
|
|
138
138
|
)}
|
|
139
139
|
|
|
140
|
+
## Theming and dark mode support
|
|
141
|
+
To render certain ADF content correctly in different color themes, such as light and dark mode, this package utilise
|
|
142
|
+
the \`@atlaskit/editor-palette\` package, which converts colors stored in ADF to Atlassian Design Tokens.
|
|
143
|
+
Learn more about this utility in the [Editor Palette docs](/packages/editor/editor-palette).
|
|
144
|
+
|
|
145
|
+
Full light and dark mode support for the Editor is a work in progress. Currently, the following experiences do not yet support theming:
|
|
146
|
+
- Custom table backgrounds
|
|
147
|
+
- Custom panel backgrounds
|
|
148
|
+
|
|
140
149
|
${(
|
|
141
150
|
<Props
|
|
142
151
|
heading="Props"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "105.0
|
|
3
|
+
"version": "105.1.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,24 +26,24 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/adf-schema": "^25.1.0",
|
|
28
28
|
"@atlaskit/adf-utils": "^18.0.0",
|
|
29
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
30
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
29
|
+
"@atlaskit/analytics-listeners": "^8.5.0",
|
|
30
|
+
"@atlaskit/analytics-namespaced-context": "^6.6.0",
|
|
31
31
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
32
32
|
"@atlaskit/button": "^16.5.0",
|
|
33
33
|
"@atlaskit/code": "^14.4.0",
|
|
34
|
-
"@atlaskit/editor-common": "^72.
|
|
34
|
+
"@atlaskit/editor-common": "^72.2.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
36
|
-
"@atlaskit/editor-palette": "
|
|
36
|
+
"@atlaskit/editor-palette": "1.0.0",
|
|
37
37
|
"@atlaskit/editor-shared-styles": "^2.3.0",
|
|
38
38
|
"@atlaskit/emoji": "^67.0.0",
|
|
39
39
|
"@atlaskit/icon": "^21.11.0",
|
|
40
|
-
"@atlaskit/media-card": "^74.
|
|
40
|
+
"@atlaskit/media-card": "^74.5.0",
|
|
41
41
|
"@atlaskit/media-client": "^20.0.0",
|
|
42
|
-
"@atlaskit/media-common": "^2.
|
|
42
|
+
"@atlaskit/media-common": "^2.19.0",
|
|
43
43
|
"@atlaskit/media-filmstrip": "^46.1.0",
|
|
44
|
-
"@atlaskit/media-ui": "^22.
|
|
45
|
-
"@atlaskit/media-viewer": "^47.
|
|
46
|
-
"@atlaskit/smart-card": "^23.
|
|
44
|
+
"@atlaskit/media-ui": "^22.3.0",
|
|
45
|
+
"@atlaskit/media-viewer": "^47.4.0",
|
|
46
|
+
"@atlaskit/smart-card": "^23.14.0",
|
|
47
47
|
"@atlaskit/status": "^1.2.0",
|
|
48
48
|
"@atlaskit/task-decision": "^17.5.0",
|
|
49
49
|
"@atlaskit/theme": "^12.2.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@atlaskit/avatar": "^21.1.0",
|
|
72
72
|
"@atlaskit/css-reset": "^6.3.0",
|
|
73
73
|
"@atlaskit/docs": "*",
|
|
74
|
-
"@atlaskit/editor-core": "^178.
|
|
74
|
+
"@atlaskit/editor-core": "^178.1.0",
|
|
75
75
|
"@atlaskit/editor-test-helpers": "^18.0.0",
|
|
76
76
|
"@atlaskit/link-provider": "^1.3.0",
|
|
77
77
|
"@atlaskit/logo": "^13.10.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@atlaskit/media-test-helpers": "^30.1.0",
|
|
81
81
|
"@atlaskit/mention": "^21.0.0",
|
|
82
82
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
83
|
-
"@atlaskit/profilecard": "^18.
|
|
83
|
+
"@atlaskit/profilecard": "^18.2.0",
|
|
84
84
|
"@atlaskit/radio": "^5.4.0",
|
|
85
85
|
"@atlaskit/range": "^7.0.0",
|
|
86
86
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED
|
@@ -625,6 +625,8 @@ export interface Serializer<T> {
|
|
|
625
625
|
|
|
626
626
|
// @public (undocumented)
|
|
627
627
|
interface SmartLinksOptions {
|
|
628
|
+
// (undocumented)
|
|
629
|
+
showAuthTooltip?: boolean;
|
|
628
630
|
// (undocumented)
|
|
629
631
|
ssr?: boolean;
|
|
630
632
|
}
|
|
@@ -735,7 +737,7 @@ type VisitMediaLinkAEP = AEP<
|
|
|
735
737
|
|
|
736
738
|
```json
|
|
737
739
|
{
|
|
738
|
-
"@atlaskit/link-provider": "^1.3.
|
|
740
|
+
"@atlaskit/link-provider": "^1.3.8",
|
|
739
741
|
"@atlaskit/media-core": "^34.0.1",
|
|
740
742
|
"react": "^16.8.0",
|
|
741
743
|
"react-dom": "^16.8.0"
|