@atlaskit/renderer 120.2.3 → 120.2.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 +18 -0
- package/dist/cjs/react/nodes/embedCard.js +49 -3
- package/dist/cjs/react/nodes/table.js +3 -1
- package/dist/cjs/react/nodes/tableNew.js +3 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +28 -6
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/use-events.js +0 -6
- package/dist/es2019/react/nodes/embedCard.js +50 -4
- package/dist/es2019/react/nodes/table.js +3 -1
- package/dist/es2019/react/nodes/tableNew.js +3 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +28 -3
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +0 -6
- package/dist/esm/react/nodes/embedCard.js +50 -4
- package/dist/esm/react/nodes/table.js +3 -1
- package/dist/esm/react/nodes/tableNew.js +3 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +29 -7
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/use-events.js +0 -6
- package/dist/types/react/nodes/embedCard.d.ts +6 -2
- package/dist/types-ts4.5/react/nodes/embedCard.d.ts +6 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 120.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#189276](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189276)
|
|
8
|
+
[`95e1796eaa4d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/95e1796eaa4d0) -
|
|
9
|
+
[ux] Applies reduced padding in Full page renderer on narrow screens.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 120.2.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#185241](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185241)
|
|
17
|
+
[`0d1bffce3fedd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d1bffce3fedd) -
|
|
18
|
+
[ux] View embed as block card when page width smaller or equal to 600px
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 120.2.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = exports.EmbedOrBlockCardInternal = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
@@ -15,11 +15,14 @@ var _linkProvider = require("@atlaskit/link-provider");
|
|
|
15
15
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
19
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
20
|
var _fallback = require("./fallback");
|
|
19
21
|
var _style = require("../../ui/Renderer/style");
|
|
20
22
|
var _getCardClickHandler = require("../utils/getCardClickHandler");
|
|
21
23
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
22
24
|
var _PortalContext = require("../../ui/Renderer/PortalContext");
|
|
25
|
+
var _blockCard = _interopRequireDefault(require("./blockCard"));
|
|
23
26
|
/**
|
|
24
27
|
* @jsxRuntime classic
|
|
25
28
|
* @jsx jsx
|
|
@@ -46,7 +49,7 @@ var uIMediaSingleLayoutStyles = (0, _react.css)({
|
|
|
46
49
|
marginLeft: '50%',
|
|
47
50
|
transform: 'translateX(-50%)'
|
|
48
51
|
});
|
|
49
|
-
function
|
|
52
|
+
function EmbedCardInternal(props) {
|
|
50
53
|
var _smartLinks$frameStyl;
|
|
51
54
|
var url = props.url,
|
|
52
55
|
data = props.data,
|
|
@@ -219,4 +222,47 @@ function EmbedCard(props) {
|
|
|
219
222
|
}, cardComponent)))))
|
|
220
223
|
);
|
|
221
224
|
}));
|
|
222
|
-
}
|
|
225
|
+
}
|
|
226
|
+
var EmbedOrBlockCardInternal = exports.EmbedOrBlockCardInternal = function EmbedOrBlockCardInternal(_ref5) {
|
|
227
|
+
var url = _ref5.url,
|
|
228
|
+
data = _ref5.data,
|
|
229
|
+
eventHandlers = _ref5.eventHandlers,
|
|
230
|
+
portal = _ref5.portal,
|
|
231
|
+
originalHeight = _ref5.originalHeight,
|
|
232
|
+
originalWidth = _ref5.originalWidth,
|
|
233
|
+
embedWidth = _ref5.width,
|
|
234
|
+
layout = _ref5.layout,
|
|
235
|
+
rendererAppearance = _ref5.rendererAppearance,
|
|
236
|
+
isInsideOfBlockNode = _ref5.isInsideOfBlockNode,
|
|
237
|
+
smartLinks = _ref5.smartLinks,
|
|
238
|
+
isInsideOfInlineExtension = _ref5.isInsideOfInlineExtension;
|
|
239
|
+
var _useContext = (0, _react2.useContext)(_ui.WidthContext),
|
|
240
|
+
width = _useContext.width;
|
|
241
|
+
var viewAsBlockCard = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout;
|
|
242
|
+
return viewAsBlockCard ? (0, _react.jsx)(_blockCard.default, {
|
|
243
|
+
url: url,
|
|
244
|
+
data: data,
|
|
245
|
+
eventHandlers: eventHandlers,
|
|
246
|
+
portal: portal,
|
|
247
|
+
layout: layout,
|
|
248
|
+
rendererAppearance: rendererAppearance,
|
|
249
|
+
smartLinks: smartLinks
|
|
250
|
+
}) : (0, _react.jsx)(EmbedCardInternal, {
|
|
251
|
+
url: url,
|
|
252
|
+
data: data,
|
|
253
|
+
eventHandlers: eventHandlers,
|
|
254
|
+
portal: portal,
|
|
255
|
+
originalHeight: originalHeight,
|
|
256
|
+
originalWidth: originalWidth,
|
|
257
|
+
width: embedWidth,
|
|
258
|
+
layout: layout,
|
|
259
|
+
rendererAppearance: rendererAppearance,
|
|
260
|
+
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
261
|
+
smartLinks: smartLinks,
|
|
262
|
+
isInsideOfInlineExtension: isInsideOfInlineExtension
|
|
263
|
+
});
|
|
264
|
+
};
|
|
265
|
+
var EmbedCardWithCondition = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
266
|
+
return (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
267
|
+
}, EmbedOrBlockCardInternal, EmbedCardInternal);
|
|
268
|
+
var _default = exports.default = EmbedCardWithCondition;
|
|
@@ -30,6 +30,7 @@ var _SmartCardStorage = require("../../ui/SmartCardStorage");
|
|
|
30
30
|
var _sticky = require("./table/sticky");
|
|
31
31
|
var _table = require("./table/table");
|
|
32
32
|
var _appearance = require("../utils/appearance");
|
|
33
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
33
34
|
var _TableStickyScrollbar = require("./TableStickyScrollbar");
|
|
34
35
|
var _tableNew = require("./tableNew");
|
|
35
36
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
@@ -425,7 +426,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
425
426
|
// Please consider changes below carefully to not negatively impact SSR
|
|
426
427
|
// `renderWidth` cannot be depended on during SSR
|
|
427
428
|
var isRenderWidthValid = !!renderWidth && renderWidth > 0;
|
|
428
|
-
var
|
|
429
|
+
var fullPageRendererWidthCSS = (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(_style.FullPagePadding, "px * 2");
|
|
430
|
+
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
429
431
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
430
432
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
431
433
|
return [isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorFullWidthLayoutWidth, "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")")];
|
|
@@ -16,6 +16,7 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
16
16
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
17
17
|
var _style = require("../../ui/Renderer/style");
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
20
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
20
21
|
var _types = require("@atlaskit/editor-common/types");
|
|
21
22
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
@@ -399,7 +400,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
399
400
|
var stickyMode = this.state.stickyMode;
|
|
400
401
|
var lineLengthFixedWidth = _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
401
402
|
var updatedLayout;
|
|
402
|
-
var
|
|
403
|
+
var fullPageRendererWidthCSS = (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(_style.FullPagePadding, "px * 2");
|
|
404
|
+
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
403
405
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
404
406
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
405
407
|
return "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
@@ -24,7 +24,7 @@ var _table2 = require("@atlaskit/editor-common/table");
|
|
|
24
24
|
var _lightWeightCodeBlock = require("../../react/nodes/codeBlock/components/lightWeightCodeBlock");
|
|
25
25
|
var _ugcTokens = require("@atlaskit/editor-common/ugc-tokens");
|
|
26
26
|
var _getBaseFontSize = require("./get-base-font-size");
|
|
27
|
-
var _css,
|
|
27
|
+
var _css, _css7;
|
|
28
28
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles */
|
|
29
29
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
30
30
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -154,6 +154,15 @@ var responsiveBreakoutWidthFullWidth = (0, _react.css)((0, _defineProperty2.defa
|
|
|
154
154
|
}, "@media (min-width: ".concat(akEditorBreakpointForSmallDevice, ")"), {
|
|
155
155
|
'--ak-editor--breakout-wide-layout-width': "".concat(_editorSharedStyles.akEditorCalculatedWideLayoutWidth, "px")
|
|
156
156
|
}));
|
|
157
|
+
var responsiveBreakoutWidthWithReducedPadding = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
158
|
+
'--ak-editor--breakout-container-without-gutter-width': "calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)",
|
|
159
|
+
// Corresponds to the legacyContentStyles from `@atlaskit/editor-core` meant to introduce responsive breakout width.
|
|
160
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(_editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, "px")
|
|
161
|
+
}, "@media (min-width: ".concat(akEditorBreakpointForSmallDevice, ")"), {
|
|
162
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(_editorSharedStyles.akEditorCalculatedWideLayoutWidth, "px")
|
|
163
|
+
}), "@media (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
|
|
164
|
+
'--ak-editor--breakout-container-without-gutter-width': "calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)"
|
|
165
|
+
}));
|
|
157
166
|
var hideHeadingCopyLinkWrapperStyles = (0, _react.css)({
|
|
158
167
|
'& h1, & h2, & h3, & h4, & h5, & h6': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
159
168
|
'&:focus-within': {
|
|
@@ -173,6 +182,16 @@ var rendererFullPageStyles = (0, _react.css)({
|
|
|
173
182
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
174
183
|
padding: "0 ".concat(_style.FullPagePadding, "px")
|
|
175
184
|
});
|
|
185
|
+
var rendererFullPageStylesWithReducedPadding = (0, _react.css)((0, _defineProperty2.default)({
|
|
186
|
+
'--ak-renderer--full-page-gutter': "".concat(_style.FullPagePadding, "px"),
|
|
187
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
188
|
+
maxWidth: "".concat(_editorSharedStyles.akEditorDefaultLayoutWidth, "px"),
|
|
189
|
+
margin: '0 auto',
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
191
|
+
padding: "0 var(--ak-renderer--full-page-gutter)"
|
|
192
|
+
}, "@media (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
|
|
193
|
+
'--ak-renderer--full-page-gutter': "".concat(_editorSharedStyles.akEditorGutterPaddingReduced, "px")
|
|
194
|
+
}));
|
|
176
195
|
var rendererFullWidthStyles = (0, _react.css)({
|
|
177
196
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
178
197
|
maxWidth: "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px"),
|
|
@@ -491,13 +510,13 @@ var paragraphSharedStyles = (0, _react.css)({
|
|
|
491
510
|
letterSpacing: '-0.005em'
|
|
492
511
|
}
|
|
493
512
|
});
|
|
494
|
-
var listsSharedStyles = (0, _react.css)((
|
|
513
|
+
var listsSharedStyles = (0, _react.css)((_css7 = {
|
|
495
514
|
/* =============== INDENTATION SPACING ========= */
|
|
496
515
|
'ul, ol': {
|
|
497
516
|
boxSizing: 'border-box',
|
|
498
517
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(_styles.listItemCounterPadding, "px)")
|
|
499
518
|
}
|
|
500
|
-
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
519
|
+
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css7, "".concat(_adfSchema.orderedListSelector, ", ").concat(_adfSchema.bulletListSelector), {
|
|
501
520
|
/*
|
|
502
521
|
Ensures list item content adheres to the list's margin instead
|
|
503
522
|
of filling the entire block row. This is important to allow
|
|
@@ -529,7 +548,7 @@ var listsSharedStyles = (0, _react.css)((_css5 = {
|
|
|
529
548
|
listStyleType: 'lower-alpha'
|
|
530
549
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
531
550
|
listStyleType: 'lower-roman'
|
|
532
|
-
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
551
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css7, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
533
552
|
listStyleType: 'disc'
|
|
534
553
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
535
554
|
listStyleType: 'circle'
|
|
@@ -1415,6 +1434,9 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1415
1434
|
innerRef = props.innerRef,
|
|
1416
1435
|
testId = props.testId;
|
|
1417
1436
|
var isAdvancedLayoutsOn = (0, _experiments.editorExperiment)('advanced_layouts', true);
|
|
1437
|
+
var isPreviewPanelResponsivenessOn = (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
1438
|
+
exposure: true
|
|
1439
|
+
});
|
|
1418
1440
|
return (
|
|
1419
1441
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
1420
1442
|
(0, _react.jsx)("div", {
|
|
@@ -1431,13 +1453,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1431
1453
|
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
|
|
1432
1454
|
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
|
|
1433
1455
|
},
|
|
1434
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _platformFeatureFlags.fg)('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, (0, _platformFeatureFlags.fg)('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1456
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _platformFeatureFlags.fg)('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, (0, _platformFeatureFlags.fg)('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1435
1457
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1436
1458
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1437
1459
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
1438
1460
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') &&
|
|
1439
1461
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1440
|
-
(0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, (0, _platformFeatureFlags.fg)('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, _browser.browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && responsiveBreakoutWidth, appearance === 'full-width' && responsiveBreakoutWidthFullWidth],
|
|
1462
|
+
(0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, (0, _platformFeatureFlags.fg)('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, _browser.browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, appearance === 'full-width' && responsiveBreakoutWidthFullWidth],
|
|
1441
1463
|
"data-testid": testId
|
|
1442
1464
|
}, children)
|
|
1443
1465
|
);
|
|
@@ -63,7 +63,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
63
63
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
64
64
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
65
65
|
var packageName = "@atlaskit/renderer";
|
|
66
|
-
var packageVersion = "120.2.
|
|
66
|
+
var packageVersion = "120.2.4";
|
|
67
67
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
68
68
|
containerName: 'ak-renderer-wrapper',
|
|
69
69
|
containerType: 'inline-size'
|
|
@@ -94,9 +94,6 @@ var useHasFocusEvent = exports.useHasFocusEvent = function useHasFocusEvent(_ref
|
|
|
94
94
|
};
|
|
95
95
|
var removeFocus = function removeFocus() {
|
|
96
96
|
setHasFocus(false);
|
|
97
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
98
|
-
document.activeElement.blur();
|
|
99
|
-
}
|
|
100
97
|
};
|
|
101
98
|
var removeHoverEffect = function removeHoverEffect() {
|
|
102
99
|
setIsHovered(false);
|
|
@@ -200,9 +197,6 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
|
|
|
200
197
|
annotations: [],
|
|
201
198
|
clickElementTarget: undefined
|
|
202
199
|
});
|
|
203
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
204
|
-
document.activeElement.blur();
|
|
205
|
-
}
|
|
206
200
|
};
|
|
207
201
|
if (!isAnnotationManagerEnabled) {
|
|
208
202
|
updateSubscriber.on(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
@@ -9,14 +9,17 @@ import { useContext, useState, useRef } from 'react';
|
|
|
9
9
|
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
10
10
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
11
11
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
12
|
-
import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle } from '@atlaskit/editor-common/ui';
|
|
13
|
-
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
12
|
+
import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle, WidthContext } from '@atlaskit/editor-common/ui';
|
|
13
|
+
import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
16
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
17
|
import { CardErrorBoundary } from './fallback';
|
|
16
18
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
17
19
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
18
20
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
19
21
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
22
|
+
import BlockCard from './blockCard';
|
|
20
23
|
const embedCardWrapperStyles = css({
|
|
21
24
|
width: '100%',
|
|
22
25
|
height: '100%',
|
|
@@ -37,7 +40,7 @@ const uIMediaSingleLayoutStyles = css({
|
|
|
37
40
|
marginLeft: '50%',
|
|
38
41
|
transform: 'translateX(-50%)'
|
|
39
42
|
});
|
|
40
|
-
|
|
43
|
+
function EmbedCardInternal(props) {
|
|
41
44
|
var _smartLinks$frameStyl;
|
|
42
45
|
const {
|
|
43
46
|
url,
|
|
@@ -207,4 +210,47 @@ export default function EmbedCard(props) {
|
|
|
207
210
|
}, cardComponent)))))
|
|
208
211
|
);
|
|
209
212
|
}));
|
|
210
|
-
}
|
|
213
|
+
}
|
|
214
|
+
export const EmbedOrBlockCardInternal = ({
|
|
215
|
+
url,
|
|
216
|
+
data,
|
|
217
|
+
eventHandlers,
|
|
218
|
+
portal,
|
|
219
|
+
originalHeight,
|
|
220
|
+
originalWidth,
|
|
221
|
+
width: embedWidth,
|
|
222
|
+
layout,
|
|
223
|
+
rendererAppearance,
|
|
224
|
+
isInsideOfBlockNode,
|
|
225
|
+
smartLinks,
|
|
226
|
+
isInsideOfInlineExtension
|
|
227
|
+
}) => {
|
|
228
|
+
const {
|
|
229
|
+
width
|
|
230
|
+
} = useContext(WidthContext);
|
|
231
|
+
const viewAsBlockCard = width && width <= akEditorFullPageNarrowBreakout;
|
|
232
|
+
return viewAsBlockCard ? jsx(BlockCard, {
|
|
233
|
+
url: url,
|
|
234
|
+
data: data,
|
|
235
|
+
eventHandlers: eventHandlers,
|
|
236
|
+
portal: portal,
|
|
237
|
+
layout: layout,
|
|
238
|
+
rendererAppearance: rendererAppearance,
|
|
239
|
+
smartLinks: smartLinks
|
|
240
|
+
}) : jsx(EmbedCardInternal, {
|
|
241
|
+
url: url,
|
|
242
|
+
data: data,
|
|
243
|
+
eventHandlers: eventHandlers,
|
|
244
|
+
portal: portal,
|
|
245
|
+
originalHeight: originalHeight,
|
|
246
|
+
originalWidth: originalWidth,
|
|
247
|
+
width: embedWidth,
|
|
248
|
+
layout: layout,
|
|
249
|
+
rendererAppearance: rendererAppearance,
|
|
250
|
+
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
251
|
+
smartLinks: smartLinks,
|
|
252
|
+
isInsideOfInlineExtension: isInsideOfInlineExtension
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
const EmbedCardWithCondition = componentWithCondition(() => expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true), EmbedOrBlockCardInternal, EmbedCardInternal);
|
|
256
|
+
export default EmbedCardWithCondition;
|
|
@@ -17,6 +17,7 @@ import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
|
17
17
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
18
18
|
import { Table } from './table/table';
|
|
19
19
|
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
|
|
20
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
21
22
|
import { TableProcessorWithContainerStyles } from './tableNew';
|
|
22
23
|
export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) || isCommentAppearance(appearance) && editorExperiment('support_table_in_comment', true, {
|
|
@@ -371,7 +372,8 @@ export class TableContainer extends React.Component {
|
|
|
371
372
|
// Please consider changes below carefully to not negatively impact SSR
|
|
372
373
|
// `renderWidth` cannot be depended on during SSR
|
|
373
374
|
const isRenderWidthValid = !!renderWidth && renderWidth > 0;
|
|
374
|
-
const
|
|
375
|
+
const fullPageRendererWidthCSS = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : `100cqw - ${FullPagePadding}px * 2`;
|
|
376
|
+
const renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : `100cqw`;
|
|
375
377
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
376
378
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
377
379
|
return [isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth, `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`];
|
|
@@ -5,6 +5,7 @@ import { TableSharedCssClassName, tableMarginTop } from '@atlaskit/editor-common
|
|
|
5
5
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
6
6
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMergedCell, compose } from '@atlaskit/editor-common/utils';
|
|
9
10
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
10
11
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
@@ -343,7 +344,8 @@ export class TableContainer extends React.Component {
|
|
|
343
344
|
} = this.state;
|
|
344
345
|
const lineLengthFixedWidth = akEditorDefaultLayoutWidth;
|
|
345
346
|
let updatedLayout;
|
|
346
|
-
const
|
|
347
|
+
const fullPageRendererWidthCSS = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : `100cqw - ${FullPagePadding}px * 2`;
|
|
348
|
+
const renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : `100cqw`;
|
|
347
349
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
348
350
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
349
351
|
return `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
@@ -11,7 +11,7 @@ import { B300, B400, B500, N20, N200, N30A, N40A, N60A, N800, R50, R500, Y300, Y
|
|
|
11
11
|
import { FullPagePadding } from './style';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { RendererCssClassName } from '../../consts';
|
|
14
|
-
import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
14
|
+
import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
|
|
16
16
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
17
17
|
import { CodeBlockSharedCssClassName, DateSharedCssClassName, listItemCounterPadding, richMediaClassName, SmartCardSharedCssClassName, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginTop, TableSharedCssClassName, TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
@@ -215,6 +215,17 @@ const responsiveBreakoutWidthFullWidth = css({
|
|
|
215
215
|
'--ak-editor--breakout-wide-layout-width': `${akEditorCalculatedWideLayoutWidth}px`
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
|
+
const responsiveBreakoutWidthWithReducedPadding = css({
|
|
219
|
+
'--ak-editor--breakout-container-without-gutter-width': `calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)`,
|
|
220
|
+
// Corresponds to the legacyContentStyles from `@atlaskit/editor-core` meant to introduce responsive breakout width.
|
|
221
|
+
'--ak-editor--breakout-wide-layout-width': `${akEditorCalculatedWideLayoutWidthSmallViewport}px`,
|
|
222
|
+
[`@media (min-width: ${akEditorBreakpointForSmallDevice})`]: {
|
|
223
|
+
'--ak-editor--breakout-wide-layout-width': `${akEditorCalculatedWideLayoutWidth}px`
|
|
224
|
+
},
|
|
225
|
+
[`@media (max-width: ${akEditorFullPageNarrowBreakout}px)`]: {
|
|
226
|
+
'--ak-editor--breakout-container-without-gutter-width': `calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)`
|
|
227
|
+
}
|
|
228
|
+
});
|
|
218
229
|
const hideHeadingCopyLinkWrapperStyles = css({
|
|
219
230
|
'& h1, & h2, & h3, & h4, & h5, & h6': {
|
|
220
231
|
[`.${HeadingAnchorWrapperClassName}`]: {
|
|
@@ -242,6 +253,17 @@ const rendererFullPageStyles = css({
|
|
|
242
253
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
243
254
|
padding: `0 ${FullPagePadding}px`
|
|
244
255
|
});
|
|
256
|
+
const rendererFullPageStylesWithReducedPadding = css({
|
|
257
|
+
'--ak-renderer--full-page-gutter': `${FullPagePadding}px`,
|
|
258
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
259
|
+
maxWidth: `${akEditorDefaultLayoutWidth}px`,
|
|
260
|
+
margin: '0 auto',
|
|
261
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
262
|
+
padding: `0 var(--ak-renderer--full-page-gutter)`,
|
|
263
|
+
[`@media (max-width: ${akEditorFullPageNarrowBreakout}px)`]: {
|
|
264
|
+
'--ak-renderer--full-page-gutter': `${akEditorGutterPaddingReduced}px`
|
|
265
|
+
}
|
|
266
|
+
});
|
|
245
267
|
const rendererFullWidthStyles = css({
|
|
246
268
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
247
269
|
maxWidth: `${akEditorFullWidthLayoutWidth}px`,
|
|
@@ -1811,6 +1833,9 @@ export const RendererStyleContainer = props => {
|
|
|
1811
1833
|
testId
|
|
1812
1834
|
} = props;
|
|
1813
1835
|
const isAdvancedLayoutsOn = editorExperiment('advanced_layouts', true);
|
|
1836
|
+
const isPreviewPanelResponsivenessOn = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
1837
|
+
exposure: true
|
|
1838
|
+
});
|
|
1814
1839
|
return (
|
|
1815
1840
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
1816
1841
|
jsx("div", {
|
|
@@ -1827,13 +1852,13 @@ export const RendererStyleContainer = props => {
|
|
|
1827
1852
|
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
|
|
1828
1853
|
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
|
|
1829
1854
|
},
|
|
1830
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1855
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1831
1856
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1832
1857
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1833
1858
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
1834
1859
|
fg('editor_inline_comments_on_inline_nodes') &&
|
|
1835
1860
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1836
|
-
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, fg('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && responsiveBreakoutWidth, appearance === 'full-width' && responsiveBreakoutWidthFullWidth],
|
|
1861
|
+
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, fg('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, appearance === 'full-width' && responsiveBreakoutWidthFullWidth],
|
|
1837
1862
|
"data-testid": testId
|
|
1838
1863
|
}, children)
|
|
1839
1864
|
);
|
|
@@ -49,7 +49,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
49
49
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
50
50
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
51
51
|
const packageName = "@atlaskit/renderer";
|
|
52
|
-
const packageVersion = "120.2.
|
|
52
|
+
const packageVersion = "120.2.4";
|
|
53
53
|
const setAsQueryContainerStyles = css({
|
|
54
54
|
containerName: 'ak-renderer-wrapper',
|
|
55
55
|
containerType: 'inline-size'
|
|
@@ -89,9 +89,6 @@ export const useHasFocusEvent = ({
|
|
|
89
89
|
};
|
|
90
90
|
const removeFocus = () => {
|
|
91
91
|
setHasFocus(false);
|
|
92
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
93
|
-
document.activeElement.blur();
|
|
94
|
-
}
|
|
95
92
|
};
|
|
96
93
|
const removeHoverEffect = () => {
|
|
97
94
|
setIsHovered(false);
|
|
@@ -193,9 +190,6 @@ export const useAnnotationClickEvent = props => {
|
|
|
193
190
|
annotations: [],
|
|
194
191
|
clickElementTarget: undefined
|
|
195
192
|
});
|
|
196
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
197
|
-
document.activeElement.blur();
|
|
198
|
-
}
|
|
199
193
|
};
|
|
200
194
|
if (!isAnnotationManagerEnabled) {
|
|
201
195
|
updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
@@ -10,14 +10,17 @@ import { useContext, useState, useRef } from 'react';
|
|
|
10
10
|
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
11
11
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
12
12
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
13
|
-
import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle } from '@atlaskit/editor-common/ui';
|
|
14
|
-
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
13
|
+
import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle, WidthContext } from '@atlaskit/editor-common/ui';
|
|
14
|
+
import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
17
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
18
|
import { CardErrorBoundary } from './fallback';
|
|
17
19
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
18
20
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
19
21
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
20
22
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
23
|
+
import BlockCard from './blockCard';
|
|
21
24
|
var embedCardWrapperStyles = css({
|
|
22
25
|
width: '100%',
|
|
23
26
|
height: '100%',
|
|
@@ -38,7 +41,7 @@ var uIMediaSingleLayoutStyles = css({
|
|
|
38
41
|
marginLeft: '50%',
|
|
39
42
|
transform: 'translateX(-50%)'
|
|
40
43
|
});
|
|
41
|
-
|
|
44
|
+
function EmbedCardInternal(props) {
|
|
42
45
|
var _smartLinks$frameStyl;
|
|
43
46
|
var url = props.url,
|
|
44
47
|
data = props.data,
|
|
@@ -211,4 +214,47 @@ export default function EmbedCard(props) {
|
|
|
211
214
|
}, cardComponent)))))
|
|
212
215
|
);
|
|
213
216
|
}));
|
|
214
|
-
}
|
|
217
|
+
}
|
|
218
|
+
export var EmbedOrBlockCardInternal = function EmbedOrBlockCardInternal(_ref5) {
|
|
219
|
+
var url = _ref5.url,
|
|
220
|
+
data = _ref5.data,
|
|
221
|
+
eventHandlers = _ref5.eventHandlers,
|
|
222
|
+
portal = _ref5.portal,
|
|
223
|
+
originalHeight = _ref5.originalHeight,
|
|
224
|
+
originalWidth = _ref5.originalWidth,
|
|
225
|
+
embedWidth = _ref5.width,
|
|
226
|
+
layout = _ref5.layout,
|
|
227
|
+
rendererAppearance = _ref5.rendererAppearance,
|
|
228
|
+
isInsideOfBlockNode = _ref5.isInsideOfBlockNode,
|
|
229
|
+
smartLinks = _ref5.smartLinks,
|
|
230
|
+
isInsideOfInlineExtension = _ref5.isInsideOfInlineExtension;
|
|
231
|
+
var _useContext = useContext(WidthContext),
|
|
232
|
+
width = _useContext.width;
|
|
233
|
+
var viewAsBlockCard = width && width <= akEditorFullPageNarrowBreakout;
|
|
234
|
+
return viewAsBlockCard ? jsx(BlockCard, {
|
|
235
|
+
url: url,
|
|
236
|
+
data: data,
|
|
237
|
+
eventHandlers: eventHandlers,
|
|
238
|
+
portal: portal,
|
|
239
|
+
layout: layout,
|
|
240
|
+
rendererAppearance: rendererAppearance,
|
|
241
|
+
smartLinks: smartLinks
|
|
242
|
+
}) : jsx(EmbedCardInternal, {
|
|
243
|
+
url: url,
|
|
244
|
+
data: data,
|
|
245
|
+
eventHandlers: eventHandlers,
|
|
246
|
+
portal: portal,
|
|
247
|
+
originalHeight: originalHeight,
|
|
248
|
+
originalWidth: originalWidth,
|
|
249
|
+
width: embedWidth,
|
|
250
|
+
layout: layout,
|
|
251
|
+
rendererAppearance: rendererAppearance,
|
|
252
|
+
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
253
|
+
smartLinks: smartLinks,
|
|
254
|
+
isInsideOfInlineExtension: isInsideOfInlineExtension
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
var EmbedCardWithCondition = componentWithCondition(function () {
|
|
258
|
+
return expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
259
|
+
}, EmbedOrBlockCardInternal, EmbedCardInternal);
|
|
260
|
+
export default EmbedCardWithCondition;
|
|
@@ -28,6 +28,7 @@ import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
|
28
28
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
29
29
|
import { Table } from './table/table';
|
|
30
30
|
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
|
|
31
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
31
32
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
32
33
|
import { TableProcessorWithContainerStyles } from './tableNew';
|
|
33
34
|
export var isTableResizingEnabled = function isTableResizingEnabled(appearance) {
|
|
@@ -418,7 +419,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
418
419
|
// Please consider changes below carefully to not negatively impact SSR
|
|
419
420
|
// `renderWidth` cannot be depended on during SSR
|
|
420
421
|
var isRenderWidthValid = !!renderWidth && renderWidth > 0;
|
|
421
|
-
var
|
|
422
|
+
var fullPageRendererWidthCSS = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(FullPagePadding, "px * 2");
|
|
423
|
+
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
422
424
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
423
425
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
424
426
|
return [isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth, "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")")];
|
|
@@ -17,6 +17,7 @@ import { TableSharedCssClassName, tableMarginTop } from '@atlaskit/editor-common
|
|
|
17
17
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
18
18
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMergedCell, compose } from '@atlaskit/editor-common/utils';
|
|
21
22
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
22
23
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
@@ -393,7 +394,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
393
394
|
var stickyMode = this.state.stickyMode;
|
|
394
395
|
var lineLengthFixedWidth = akEditorDefaultLayoutWidth;
|
|
395
396
|
var updatedLayout;
|
|
396
|
-
var
|
|
397
|
+
var fullPageRendererWidthCSS = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(FullPagePadding, "px * 2");
|
|
398
|
+
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
397
399
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
398
400
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
399
401
|
return "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css,
|
|
2
|
+
var _css, _css7;
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles */
|
|
4
4
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
5
5
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -13,7 +13,7 @@ import { B300, B400, B500, N20, N200, N30A, N40A, N60A, N800, R50, R500, Y300, Y
|
|
|
13
13
|
import { FullPagePadding } from './style';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { RendererCssClassName } from '../../consts';
|
|
16
|
-
import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
16
|
+
import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
17
17
|
import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
|
|
18
18
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
19
19
|
import { CodeBlockSharedCssClassName, DateSharedCssClassName, listItemCounterPadding, richMediaClassName, SmartCardSharedCssClassName, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginTop, TableSharedCssClassName, TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
@@ -147,6 +147,15 @@ var responsiveBreakoutWidthFullWidth = css(_defineProperty({
|
|
|
147
147
|
}, "@media (min-width: ".concat(akEditorBreakpointForSmallDevice, ")"), {
|
|
148
148
|
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidth, "px")
|
|
149
149
|
}));
|
|
150
|
+
var responsiveBreakoutWidthWithReducedPadding = css(_defineProperty(_defineProperty({
|
|
151
|
+
'--ak-editor--breakout-container-without-gutter-width': "calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)",
|
|
152
|
+
// Corresponds to the legacyContentStyles from `@atlaskit/editor-core` meant to introduce responsive breakout width.
|
|
153
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidthSmallViewport, "px")
|
|
154
|
+
}, "@media (min-width: ".concat(akEditorBreakpointForSmallDevice, ")"), {
|
|
155
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidth, "px")
|
|
156
|
+
}), "@media (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
|
|
157
|
+
'--ak-editor--breakout-container-without-gutter-width': "calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)"
|
|
158
|
+
}));
|
|
150
159
|
var hideHeadingCopyLinkWrapperStyles = css({
|
|
151
160
|
'& h1, & h2, & h3, & h4, & h5, & h6': _defineProperty(_defineProperty({}, ".".concat(HeadingAnchorWrapperClassName), {
|
|
152
161
|
'&:focus-within': {
|
|
@@ -166,6 +175,16 @@ var rendererFullPageStyles = css({
|
|
|
166
175
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
167
176
|
padding: "0 ".concat(FullPagePadding, "px")
|
|
168
177
|
});
|
|
178
|
+
var rendererFullPageStylesWithReducedPadding = css(_defineProperty({
|
|
179
|
+
'--ak-renderer--full-page-gutter': "".concat(FullPagePadding, "px"),
|
|
180
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
181
|
+
maxWidth: "".concat(akEditorDefaultLayoutWidth, "px"),
|
|
182
|
+
margin: '0 auto',
|
|
183
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
184
|
+
padding: "0 var(--ak-renderer--full-page-gutter)"
|
|
185
|
+
}, "@media (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
|
|
186
|
+
'--ak-renderer--full-page-gutter': "".concat(akEditorGutterPaddingReduced, "px")
|
|
187
|
+
}));
|
|
169
188
|
var rendererFullWidthStyles = css({
|
|
170
189
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
171
190
|
maxWidth: "".concat(akEditorFullWidthLayoutWidth, "px"),
|
|
@@ -484,13 +503,13 @@ var paragraphSharedStyles = css({
|
|
|
484
503
|
letterSpacing: '-0.005em'
|
|
485
504
|
}
|
|
486
505
|
});
|
|
487
|
-
var listsSharedStyles = css((
|
|
506
|
+
var listsSharedStyles = css((_css7 = {
|
|
488
507
|
/* =============== INDENTATION SPACING ========= */
|
|
489
508
|
'ul, ol': {
|
|
490
509
|
boxSizing: 'border-box',
|
|
491
510
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(listItemCounterPadding, "px)")
|
|
492
511
|
}
|
|
493
|
-
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
512
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css7, "".concat(orderedListSelector, ", ").concat(bulletListSelector), {
|
|
494
513
|
/*
|
|
495
514
|
Ensures list item content adheres to the list's margin instead
|
|
496
515
|
of filling the entire block row. This is important to allow
|
|
@@ -522,7 +541,7 @@ var listsSharedStyles = css((_css5 = {
|
|
|
522
541
|
listStyleType: 'lower-alpha'
|
|
523
542
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
524
543
|
listStyleType: 'lower-roman'
|
|
525
|
-
}), _defineProperty(_defineProperty(_defineProperty(
|
|
544
|
+
}), _defineProperty(_defineProperty(_defineProperty(_css7, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
526
545
|
listStyleType: 'disc'
|
|
527
546
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
528
547
|
listStyleType: 'circle'
|
|
@@ -1408,6 +1427,9 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1408
1427
|
innerRef = props.innerRef,
|
|
1409
1428
|
testId = props.testId;
|
|
1410
1429
|
var isAdvancedLayoutsOn = editorExperiment('advanced_layouts', true);
|
|
1430
|
+
var isPreviewPanelResponsivenessOn = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
1431
|
+
exposure: true
|
|
1432
|
+
});
|
|
1411
1433
|
return (
|
|
1412
1434
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
1413
1435
|
jsx("div", {
|
|
@@ -1424,13 +1446,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1424
1446
|
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
|
|
1425
1447
|
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
|
|
1426
1448
|
},
|
|
1427
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1449
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1428
1450
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1429
1451
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1430
1452
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
1431
1453
|
fg('editor_inline_comments_on_inline_nodes') &&
|
|
1432
1454
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1433
|
-
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, fg('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && responsiveBreakoutWidth, appearance === 'full-width' && responsiveBreakoutWidthFullWidth],
|
|
1455
|
+
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, fg('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, appearance === 'full-width' && responsiveBreakoutWidthFullWidth],
|
|
1434
1456
|
"data-testid": testId
|
|
1435
1457
|
}, children)
|
|
1436
1458
|
);
|
|
@@ -54,7 +54,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
54
54
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
55
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "120.2.
|
|
57
|
+
var packageVersion = "120.2.4";
|
|
58
58
|
var setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size'
|
|
@@ -87,9 +87,6 @@ export var useHasFocusEvent = function useHasFocusEvent(_ref2) {
|
|
|
87
87
|
};
|
|
88
88
|
var removeFocus = function removeFocus() {
|
|
89
89
|
setHasFocus(false);
|
|
90
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
91
|
-
document.activeElement.blur();
|
|
92
|
-
}
|
|
93
90
|
};
|
|
94
91
|
var removeHoverEffect = function removeHoverEffect() {
|
|
95
92
|
setIsHovered(false);
|
|
@@ -193,9 +190,6 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
|
|
|
193
190
|
annotations: [],
|
|
194
191
|
clickElementTarget: undefined
|
|
195
192
|
});
|
|
196
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
197
|
-
document.activeElement.blur();
|
|
198
|
-
}
|
|
199
193
|
};
|
|
200
194
|
if (!isAnnotationManagerEnabled) {
|
|
201
195
|
updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -7,7 +8,7 @@ import type { SmartLinksOptions } from '../../types/smartLinksOptions';
|
|
|
7
8
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
8
9
|
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
9
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
10
|
-
|
|
11
|
+
type EmbedCardInternalProps = {
|
|
11
12
|
url?: string;
|
|
12
13
|
data?: object;
|
|
13
14
|
eventHandlers?: EventHandlers;
|
|
@@ -20,4 +21,7 @@ export default function EmbedCard(props: {
|
|
|
20
21
|
isInsideOfBlockNode?: boolean;
|
|
21
22
|
smartLinks?: SmartLinksOptions;
|
|
22
23
|
isInsideOfInlineExtension?: boolean;
|
|
23
|
-
}
|
|
24
|
+
};
|
|
25
|
+
export declare const EmbedOrBlockCardInternal: ({ url, data, eventHandlers, portal, originalHeight, originalWidth, width: embedWidth, layout, rendererAppearance, isInsideOfBlockNode, smartLinks, isInsideOfInlineExtension, }: EmbedCardInternalProps) => jsx.JSX.Element;
|
|
26
|
+
declare const EmbedCardWithCondition: import("react").FC<EmbedCardInternalProps>;
|
|
27
|
+
export default EmbedCardWithCondition;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -7,7 +8,7 @@ import type { SmartLinksOptions } from '../../types/smartLinksOptions';
|
|
|
7
8
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
8
9
|
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
9
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
10
|
-
|
|
11
|
+
type EmbedCardInternalProps = {
|
|
11
12
|
url?: string;
|
|
12
13
|
data?: object;
|
|
13
14
|
eventHandlers?: EventHandlers;
|
|
@@ -20,4 +21,7 @@ export default function EmbedCard(props: {
|
|
|
20
21
|
isInsideOfBlockNode?: boolean;
|
|
21
22
|
smartLinks?: SmartLinksOptions;
|
|
22
23
|
isInsideOfInlineExtension?: boolean;
|
|
23
|
-
}
|
|
24
|
+
};
|
|
25
|
+
export declare const EmbedOrBlockCardInternal: ({ url, data, eventHandlers, portal, originalHeight, originalWidth, width: embedWidth, layout, rendererAppearance, isInsideOfBlockNode, smartLinks, isInsideOfInlineExtension, }: EmbedCardInternalProps) => jsx.JSX.Element;
|
|
26
|
+
declare const EmbedCardWithCondition: import("react").FC<EmbedCardInternalProps>;
|
|
27
|
+
export default EmbedCardWithCondition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "120.2.
|
|
3
|
+
"version": "120.2.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
38
38
|
"@atlaskit/emoji": "^69.3.0",
|
|
39
39
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
40
|
-
"@atlaskit/icon": "^27.
|
|
40
|
+
"@atlaskit/icon": "^27.7.0",
|
|
41
41
|
"@atlaskit/link": "^3.2.0",
|
|
42
42
|
"@atlaskit/link-datasource": "^4.14.0",
|
|
43
43
|
"@atlaskit/media-card": "^79.4.0",
|
|
44
|
-
"@atlaskit/media-client": "^35.
|
|
44
|
+
"@atlaskit/media-client": "^35.2.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
46
46
|
"@atlaskit/media-common": "^12.3.0",
|
|
47
47
|
"@atlaskit/media-filmstrip": "^51.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/status": "^3.0.0",
|
|
55
55
|
"@atlaskit/task-decision": "^19.2.0",
|
|
56
56
|
"@atlaskit/theme": "^19.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^9.12.0",
|
|
58
58
|
"@atlaskit/tokens": "^5.6.0",
|
|
59
59
|
"@atlaskit/tooltip": "^20.3.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|