@atlaskit/renderer 109.1.5 → 109.2.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 +20 -0
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +4 -13
- package/dist/cjs/react/nodes/mediaInline.js +77 -114
- package/dist/cjs/react/nodes/multiBodiedExtension.js +14 -9
- package/dist/cjs/react/nodes/panel.js +2 -16
- package/dist/cjs/react/nodes/table/colgroup.js +5 -12
- package/dist/cjs/react/nodes/table.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +7 -58
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +22 -29
- package/dist/es2019/react/nodes/mediaInline.js +66 -88
- package/dist/es2019/react/nodes/multiBodiedExtension.js +43 -37
- package/dist/es2019/react/nodes/panel.js +11 -23
- package/dist/es2019/react/nodes/table/colgroup.js +5 -12
- package/dist/es2019/react/nodes/table.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +27 -79
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +5 -14
- package/dist/esm/react/nodes/mediaInline.js +82 -119
- package/dist/esm/react/nodes/multiBodiedExtension.js +16 -10
- package/dist/esm/react/nodes/panel.js +3 -17
- package/dist/esm/react/nodes/table/colgroup.js +5 -12
- package/dist/esm/react/nodes/table.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +9 -59
- package/dist/types/react/nodes/mediaInline.d.ts +5 -8
- package/dist/types-ts4.5/react/nodes/mediaInline.d.ts +5 -8
- package/package.json +5 -8
|
@@ -461,7 +461,7 @@ var TableWithWidth = function TableWithWidth(props) {
|
|
|
461
461
|
var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
|
|
462
462
|
return total + val;
|
|
463
463
|
}, 0)) || 0;
|
|
464
|
-
if (colWidthsSum ||
|
|
464
|
+
if (colWidthsSum || isTableResizingEnabled(props.rendererAppearance)) {
|
|
465
465
|
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
466
466
|
renderWidth: renderWidth
|
|
467
467
|
}, props));
|
|
@@ -45,7 +45,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
45
45
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "109.
|
|
48
|
+
var packageVersion = "109.2.0";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
|
@@ -1,16 +1,18 @@
|
|
|
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/ensure-design-token-usage */
|
|
4
|
+
|
|
3
5
|
import { css } from '@emotion/react';
|
|
4
|
-
import { themed } from '@atlaskit/theme/components';
|
|
5
6
|
import { fontFamily, fontSize } from '@atlaskit/theme/constants';
|
|
6
7
|
import * as colors from '@atlaskit/theme/colors';
|
|
7
8
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
9
|
+
import { getGlobalTheme } from '@atlaskit/tokens';
|
|
8
10
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
11
|
import { mediaInlineImageStyles } from '@atlaskit/editor-common/media-inline';
|
|
10
12
|
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles, codeBlockInListSafariFix, SmartCardSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
11
13
|
import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
12
14
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
13
|
-
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar,
|
|
15
|
+
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableBorder, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
16
|
import { N40A } from '@atlaskit/theme/colors';
|
|
15
17
|
import { RendererCssClassName } from '../../consts';
|
|
16
18
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
@@ -20,23 +22,10 @@ import { isTableResizingEnabled } from '../../react/nodes/table';
|
|
|
20
22
|
export var FullPagePadding = 32;
|
|
21
23
|
var tableShadowWidth = 32;
|
|
22
24
|
export var TELEPOINTER_ID = 'ai-streaming-telepointer';
|
|
23
|
-
var telepointerStyles = function telepointerStyles(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
dark: '#
|
|
27
|
-
})(themeProps), themed({
|
|
28
|
-
light: '#8BDBE5',
|
|
29
|
-
dark: '#60C6D2'
|
|
30
|
-
})(themeProps), themed({
|
|
31
|
-
light: '#0C66E4',
|
|
32
|
-
dark: '#388BFF'
|
|
33
|
-
})(themeProps), "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", themed({
|
|
34
|
-
light: '#8BDBE5',
|
|
35
|
-
dark: '#60C6D2'
|
|
36
|
-
})(themeProps), themed({
|
|
37
|
-
light: '#0C66E4',
|
|
38
|
-
dark: '#388BFF'
|
|
39
|
-
})(themeProps));
|
|
25
|
+
var telepointerStyles = function telepointerStyles() {
|
|
26
|
+
var _getGlobalTheme = getGlobalTheme(),
|
|
27
|
+
colorMode = _getGlobalTheme.colorMode;
|
|
28
|
+
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');
|
|
40
29
|
};
|
|
41
30
|
var getLineHeight = function getLineHeight(fontCode) {
|
|
42
31
|
return headingSizesImport[fontCode].lineHeight / headingSizesImport[fontCode].size;
|
|
@@ -114,46 +103,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
114
103
|
theme: theme
|
|
115
104
|
};
|
|
116
105
|
var useBlockRenderForCodeBlock = wrapperProps.useBlockRenderForCodeBlock;
|
|
117
|
-
return css(_templateObject9 || (_templateObject9 = _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 .", " {\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\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: ", ";\n color: ", ";\n padding: ", " ", ";\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: ", " 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: ", ";\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\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 &\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: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\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\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 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 // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n ", "\n }\n "])), editorFontSize(themeProps), themed({
|
|
118
|
-
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
119
|
-
dark: "var(--ds-text, #B8C7E0)"
|
|
120
|
-
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), RendererCssClassName.DOCUMENT, mediaInlineImageStyles, 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, ")"), themed({
|
|
121
|
-
light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
122
|
-
dark: "var(--ds-text-subtlest, ".concat(colors.DN200, ")")
|
|
123
|
-
})(themeProps), telepointerStyles(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(), ruleSharedStyles(), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
124
|
-
light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
|
|
125
|
-
dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
|
|
126
|
-
})(themeProps), "var(--ds-border-radius-100, 3px)", themed({
|
|
127
|
-
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
128
|
-
dark: "var(--ds-text, ".concat(colors.DN600, ")")
|
|
129
|
-
})(themeProps), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, breakoutWidthStyle(), RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, getShadowOverrides(), shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
|
|
130
|
-
light: "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"),
|
|
131
|
-
dark: "var(--ds-background-neutral, ".concat(akEditorTableToolbarDark, ")")
|
|
132
|
-
})(themeProps), themed({
|
|
133
|
-
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
|
|
134
|
-
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
|
|
135
|
-
})(themeProps), akEditorTableNumberColumnWidth, themed({
|
|
136
|
-
light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
137
|
-
dark: "var(--ds-text-subtlest, ".concat(colors.DN400, ")")
|
|
138
|
-
})(themeProps), relativeFontSizeToBase16(fontSize()), RendererCssClassName.NUMBER_COLUMN, akEditorStickyHeaderZIndex, themed({
|
|
139
|
-
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
|
|
140
|
-
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
|
|
141
|
-
})(themeProps), themed({
|
|
142
|
-
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
|
|
143
|
-
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
|
|
144
|
-
})(themeProps), akEditorStickyHeaderZIndex, themed({
|
|
145
|
-
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
|
|
146
|
-
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
|
|
147
|
-
})(themeProps), themed({
|
|
148
|
-
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
|
|
149
|
-
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
|
|
150
|
-
})(themeProps), themed({
|
|
151
|
-
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"),
|
|
152
|
-
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbarDark, ")")
|
|
153
|
-
})(themeProps), themed({
|
|
154
|
-
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"),
|
|
155
|
-
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbarDark, ")")
|
|
156
|
-
})(themeProps), "var(--ds-border-radius-100, 3px)", blockNodesVerticalMargin, useGridRenderForCodeBlock(useBlockRenderForCodeBlock), getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, "var(--ds-space-250, 20px)", "var(--ds-space-400, 32px)", gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
|
|
106
|
+
return css(_templateObject9 || (_templateObject9 = _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 .", " {\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\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: ", ";\n color: ", ";\n padding: ", " ", ";\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: ", " 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: ", ";\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\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 &\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: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\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\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 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 // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n ", "\n }\n "])), editorFontSize(themeProps), "var(--ds-text, ".concat(colors.N800, ")"), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), RendererCssClassName.DOCUMENT, mediaInlineImageStyles, 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, ")"), "var(--ds-text-subtlest, ".concat(colors.N200, ")"), telepointerStyles(), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(), ruleSharedStyles(), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), "var(--ds-background-neutral, ".concat(colors.N30A, ")"), "var(--ds-border-radius-100, 3px)", "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, breakoutWidthStyle(), RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, getShadowOverrides(), shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorTableNumberColumnWidth, "var(--ds-text-subtlest, ".concat(colors.N200, ")"), relativeFontSizeToBase16(fontSize()), RendererCssClassName.NUMBER_COLUMN, akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-border-radius-100, 3px)", blockNodesVerticalMargin, useGridRenderForCodeBlock(useBlockRenderForCodeBlock), getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, "var(--ds-space-250, 20px)", "var(--ds-space-400, 32px)", gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
|
|
157
107
|
};
|
|
158
108
|
};
|
|
159
109
|
var useGridRenderForCodeBlock = function useGridRenderForCodeBlock(codeBlockRenderAsBlock) {
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
5
5
|
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
6
6
|
import type { FC } from 'react';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
9
|
-
import type { ClipboardAttrs
|
|
9
|
+
import type { ClipboardAttrs } from '../../ui/MediaCard';
|
|
10
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
11
11
|
import type { RendererContext } from '../types';
|
|
12
12
|
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
13
|
-
type
|
|
14
|
-
mediaProvider?: Promise<MediaProvider>;
|
|
15
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
16
|
-
};
|
|
13
|
+
import type { MediaSSR } from '../../types/mediaOptions';
|
|
17
14
|
export type RenderMediaInlineProps = {
|
|
18
15
|
identifier: FileIdentifier;
|
|
19
16
|
clipboardAttrs: ClipboardAttrs;
|
|
20
|
-
mediaInlineProviders: MediaInlineProviders;
|
|
21
17
|
intl?: IntlShape;
|
|
22
18
|
children?: React.ReactNode;
|
|
23
19
|
collection?: string;
|
|
@@ -34,8 +30,9 @@ export type MediaInlineProps = {
|
|
|
34
30
|
rendererAppearance?: RendererAppearance;
|
|
35
31
|
featureFlags?: MediaFeatureFlags;
|
|
36
32
|
marks?: Array<Mark>;
|
|
33
|
+
ssr?: MediaSSR;
|
|
37
34
|
};
|
|
38
|
-
export declare const RenderMediaInline: FC<RenderMediaInlineProps
|
|
35
|
+
export declare const RenderMediaInline: FC<RenderMediaInlineProps>;
|
|
39
36
|
declare const _default: FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>> & {
|
|
40
37
|
WrappedComponent: React.ComponentType<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>;
|
|
41
38
|
};
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
5
5
|
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
6
6
|
import type { FC } from 'react';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
9
|
-
import type { ClipboardAttrs
|
|
9
|
+
import type { ClipboardAttrs } from '../../ui/MediaCard';
|
|
10
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
11
11
|
import type { RendererContext } from '../types';
|
|
12
12
|
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
13
|
-
type
|
|
14
|
-
mediaProvider?: Promise<MediaProvider>;
|
|
15
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
16
|
-
};
|
|
13
|
+
import type { MediaSSR } from '../../types/mediaOptions';
|
|
17
14
|
export type RenderMediaInlineProps = {
|
|
18
15
|
identifier: FileIdentifier;
|
|
19
16
|
clipboardAttrs: ClipboardAttrs;
|
|
20
|
-
mediaInlineProviders: MediaInlineProviders;
|
|
21
17
|
intl?: IntlShape;
|
|
22
18
|
children?: React.ReactNode;
|
|
23
19
|
collection?: string;
|
|
@@ -34,8 +30,9 @@ export type MediaInlineProps = {
|
|
|
34
30
|
rendererAppearance?: RendererAppearance;
|
|
35
31
|
featureFlags?: MediaFeatureFlags;
|
|
36
32
|
marks?: Array<Mark>;
|
|
33
|
+
ssr?: MediaSSR;
|
|
37
34
|
};
|
|
38
|
-
export declare const RenderMediaInline: FC<RenderMediaInlineProps
|
|
35
|
+
export declare const RenderMediaInline: FC<RenderMediaInlineProps>;
|
|
39
36
|
declare const _default: FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>> & {
|
|
40
37
|
WrappedComponent: React.ComponentType<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>;
|
|
41
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.
|
|
3
|
+
"version": "109.2.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
31
31
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
32
32
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
33
|
-
"@atlaskit/button": "^17.
|
|
33
|
+
"@atlaskit/button": "^17.2.0",
|
|
34
34
|
"@atlaskit/code": "^15.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^76.
|
|
35
|
+
"@atlaskit/editor-common": "^76.34.0",
|
|
36
36
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
37
37
|
"@atlaskit/editor-palette": "1.5.2",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
39
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
39
|
+
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
40
40
|
"@atlaskit/emoji": "^67.6.0",
|
|
41
41
|
"@atlaskit/icon": "^22.0.0",
|
|
42
42
|
"@atlaskit/link-datasource": "^1.19.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/status": "^1.4.0",
|
|
53
53
|
"@atlaskit/task-decision": "^17.9.0",
|
|
54
54
|
"@atlaskit/theme": "^12.6.0",
|
|
55
|
-
"@atlaskit/tokens": "^1.
|
|
55
|
+
"@atlaskit/tokens": "^1.33.0",
|
|
56
56
|
"@atlaskit/tooltip": "^18.1.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"@emotion/react": "^11.7.1",
|
|
@@ -119,9 +119,6 @@
|
|
|
119
119
|
"platform.editor.custom-table-width": {
|
|
120
120
|
"type": "boolean"
|
|
121
121
|
},
|
|
122
|
-
"platform.editor.custom-table-width-scale-down-undefined-column_nkyvx": {
|
|
123
|
-
"type": "boolean"
|
|
124
|
-
},
|
|
125
122
|
"platform.editor.table.increase-shadow-visibility_lh89r": {
|
|
126
123
|
"type": "boolean"
|
|
127
124
|
},
|