@atlaskit/renderer 126.6.3 → 126.6.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 +16 -0
- package/dist/cjs/react/index.js +4 -6
- package/dist/cjs/react/marks/backgroundColor.js +1 -2
- package/dist/cjs/react/nodes/table/colgroup.js +1 -6
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +2 -4
- package/dist/es2019/react/marks/backgroundColor.js +1 -2
- package/dist/es2019/react/nodes/table/colgroup.js +1 -6
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +4 -6
- package/dist/esm/react/marks/backgroundColor.js +1 -2
- package/dist/esm/react/nodes/table/colgroup.js +1 -6
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +3 -6
- package/tsconfig.json +18 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 126.6.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9da7abaf781fa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9da7abaf781fa) -
|
|
8
|
+
[ux] clean up platform_editor_text_highlight_padding
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 126.6.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`d20e0e448e8b7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d20e0e448e8b7) -
|
|
16
|
+
Cleanup experiment for style changes to prevent the numbered column from growing too big
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 126.6.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -316,14 +316,12 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
316
316
|
}, {
|
|
317
317
|
key: "serializeTextWrapper",
|
|
318
318
|
value: function serializeTextWrapper(content, _ref2) {
|
|
319
|
-
var
|
|
319
|
+
var _this$standaloneBackg,
|
|
320
|
+
_this3 = this;
|
|
320
321
|
var parentInfo = _ref2.parentInfo;
|
|
321
322
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
322
323
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
323
|
-
|
|
324
|
-
var _this$standaloneBackg;
|
|
325
|
-
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, (0, _toConsumableArray2.default)((0, _getStandaloneBackgroundColorMarks.getStandaloneBackgroundColorMarks)(content)));
|
|
326
|
-
}
|
|
324
|
+
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, (0, _toConsumableArray2.default)((0, _getStandaloneBackgroundColorMarks.getStandaloneBackgroundColorMarks)(content)));
|
|
327
325
|
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
328
326
|
return _this3.serializeMark({
|
|
329
327
|
mark: mark,
|
|
@@ -359,7 +357,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
359
357
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
360
358
|
var content = (mark.content || []).map(serializeContent);
|
|
361
359
|
var markKey = "".concat(mark.type.name, "-component__").concat(this.startPos, "__").concat(parentMark.path.length);
|
|
362
|
-
var isStandalone =
|
|
360
|
+
var isStandalone = this.standaloneBackgroundColorMarks.some(function (m) {
|
|
363
361
|
return mark.eq(m);
|
|
364
362
|
});
|
|
365
363
|
return this.renderMark((0, _marks.toReact)(mark), _objectSpread(_objectSpread({}, this.getMarkProps(mark, parentMark.path)), {}, {
|
|
@@ -12,7 +12,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
13
13
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
14
14
|
var _tokens = require("@atlaskit/tokens");
|
|
15
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
16
|
function BackgroundColor(props) {
|
|
18
17
|
var _useThemeObserver = (0, _tokens.useThemeObserver)(),
|
|
@@ -50,7 +49,7 @@ function BackgroundColor(props) {
|
|
|
50
49
|
var style = (0, _react.useMemo)(function () {
|
|
51
50
|
return (0, _defineProperty2.default)({}, '--custom-palette-color', paletteColorValue);
|
|
52
51
|
}, [paletteColorValue]);
|
|
53
|
-
if (props.isStandalone
|
|
52
|
+
if (props.isStandalone) {
|
|
54
53
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
55
54
|
"data-block-mark": props.dataAttributes['data-block-mark'],
|
|
56
55
|
"data-renderer-mark": props.dataAttributes['data-renderer-mark'],
|
|
@@ -178,7 +178,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
178
178
|
isNumberColumnEnabled: isNumberColumnEnabled
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
if (isNumberColumnEnabled && (tableWidth < maxTableWidth || maxTableWidth === 0)
|
|
181
|
+
if (isNumberColumnEnabled && (tableWidth < maxTableWidth || maxTableWidth === 0)) {
|
|
182
182
|
var fixedColWidths = targetWidths.map(function (width) {
|
|
183
183
|
return fixColumnWidth({
|
|
184
184
|
columnWidth: width,
|
|
@@ -206,11 +206,6 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* When cleaning up editor_prevent_numbered_column_too_big_jira_1 experiment,
|
|
212
|
-
* resuse the fixedColWidths const to avoid code duplication.
|
|
213
|
-
*/
|
|
214
209
|
return targetWidths.map(function (colWidth) {
|
|
215
210
|
var width = fixColumnWidth({
|
|
216
211
|
columnWidth: colWidth,
|
|
@@ -1898,7 +1898,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1898
1898
|
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
|
|
1899
1899
|
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
|
|
1900
1900
|
},
|
|
1901
|
-
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1901
|
+
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1902
1902
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1903
1903
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1904
1904
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -70,7 +70,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
72
72
|
var packageName = "@atlaskit/renderer";
|
|
73
|
-
var packageVersion = "
|
|
73
|
+
var packageVersion = "0.0.0-development";
|
|
74
74
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
75
75
|
containerName: 'ak-renderer-wrapper',
|
|
76
76
|
containerType: 'inline-size'
|
|
@@ -300,9 +300,7 @@ export default class ReactSerializer {
|
|
|
300
300
|
}) {
|
|
301
301
|
const currentPath = parentInfo && parentInfo.path || [];
|
|
302
302
|
const nodePosition = parentInfo && parentInfo.pos || 1;
|
|
303
|
-
|
|
304
|
-
this.standaloneBackgroundColorMarks.push(...getStandaloneBackgroundColorMarks(content));
|
|
305
|
-
}
|
|
303
|
+
this.standaloneBackgroundColorMarks.push(...getStandaloneBackgroundColorMarks(content));
|
|
306
304
|
return ReactSerializer.buildMarkStructure(content).map((mark, _index) => {
|
|
307
305
|
return this.serializeMark({
|
|
308
306
|
mark,
|
|
@@ -334,7 +332,7 @@ export default class ReactSerializer {
|
|
|
334
332
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
335
333
|
const content = (mark.content || []).map(serializeContent);
|
|
336
334
|
const markKey = `${mark.type.name}-component__${this.startPos}__${parentMark.path.length}`;
|
|
337
|
-
const isStandalone =
|
|
335
|
+
const isStandalone = this.standaloneBackgroundColorMarks.some(m => mark.eq(m));
|
|
338
336
|
return this.renderMark(markToReact(mark), {
|
|
339
337
|
...this.getMarkProps(mark, parentMark.path),
|
|
340
338
|
isStandalone
|
|
@@ -3,7 +3,6 @@ import React, { useMemo } from 'react';
|
|
|
3
3
|
import { getDarkModeLCHColor } from '@atlaskit/adf-schema';
|
|
4
4
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
5
5
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
export default function BackgroundColor(props) {
|
|
8
7
|
const {
|
|
9
8
|
colorMode
|
|
@@ -41,7 +40,7 @@ export default function BackgroundColor(props) {
|
|
|
41
40
|
const style = useMemo(() => ({
|
|
42
41
|
['--custom-palette-color']: paletteColorValue
|
|
43
42
|
}), [paletteColorValue]);
|
|
44
|
-
if (props.isStandalone
|
|
43
|
+
if (props.isStandalone) {
|
|
45
44
|
return /*#__PURE__*/React.createElement("span", {
|
|
46
45
|
"data-block-mark": props.dataAttributes['data-block-mark'],
|
|
47
46
|
"data-renderer-mark": props.dataAttributes['data-renderer-mark'],
|
|
@@ -165,7 +165,7 @@ const renderScaleDownColgroup = props => {
|
|
|
165
165
|
isNumberColumnEnabled: isNumberColumnEnabled
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
-
if (isNumberColumnEnabled && (tableWidth < maxTableWidth || maxTableWidth === 0)
|
|
168
|
+
if (isNumberColumnEnabled && (tableWidth < maxTableWidth || maxTableWidth === 0)) {
|
|
169
169
|
const fixedColWidths = targetWidths.map(width => fixColumnWidth({
|
|
170
170
|
columnWidth: width,
|
|
171
171
|
zeroWidthColumnsCount,
|
|
@@ -191,11 +191,6 @@ const renderScaleDownColgroup = props => {
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* When cleaning up editor_prevent_numbered_column_too_big_jira_1 experiment,
|
|
197
|
-
* resuse the fixedColWidths const to avoid code duplication.
|
|
198
|
-
*/
|
|
199
194
|
return targetWidths.map(colWidth => {
|
|
200
195
|
const width = fixColumnWidth({
|
|
201
196
|
columnWidth: colWidth,
|
|
@@ -2416,7 +2416,7 @@ export const RendererStyleContainer = props => {
|
|
|
2416
2416
|
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
|
|
2417
2417
|
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
|
|
2418
2418
|
},
|
|
2419
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2419
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2420
2420
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2421
2421
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
2422
2422
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -56,7 +56,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
56
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
57
57
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
58
58
|
const packageName = "@atlaskit/renderer";
|
|
59
|
-
const packageVersion = "
|
|
59
|
+
const packageVersion = "0.0.0-development";
|
|
60
60
|
const setAsQueryContainerStyles = css({
|
|
61
61
|
containerName: 'ak-renderer-wrapper',
|
|
62
62
|
containerType: 'inline-size'
|
package/dist/esm/react/index.js
CHANGED
|
@@ -309,14 +309,12 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
309
309
|
}, {
|
|
310
310
|
key: "serializeTextWrapper",
|
|
311
311
|
value: function serializeTextWrapper(content, _ref2) {
|
|
312
|
-
var
|
|
312
|
+
var _this$standaloneBackg,
|
|
313
|
+
_this3 = this;
|
|
313
314
|
var parentInfo = _ref2.parentInfo;
|
|
314
315
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
315
316
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
316
|
-
|
|
317
|
-
var _this$standaloneBackg;
|
|
318
|
-
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, _toConsumableArray(getStandaloneBackgroundColorMarks(content)));
|
|
319
|
-
}
|
|
317
|
+
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, _toConsumableArray(getStandaloneBackgroundColorMarks(content)));
|
|
320
318
|
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
321
319
|
return _this3.serializeMark({
|
|
322
320
|
mark: mark,
|
|
@@ -352,7 +350,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
352
350
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
353
351
|
var content = (mark.content || []).map(serializeContent);
|
|
354
352
|
var markKey = "".concat(mark.type.name, "-component__").concat(this.startPos, "__").concat(parentMark.path.length);
|
|
355
|
-
var isStandalone =
|
|
353
|
+
var isStandalone = this.standaloneBackgroundColorMarks.some(function (m) {
|
|
356
354
|
return mark.eq(m);
|
|
357
355
|
});
|
|
358
356
|
return this.renderMark(markToReact(mark), _objectSpread(_objectSpread({}, this.getMarkProps(mark, parentMark.path)), {}, {
|
|
@@ -4,7 +4,6 @@ import React, { useMemo } from 'react';
|
|
|
4
4
|
import { getDarkModeLCHColor } from '@atlaskit/adf-schema';
|
|
5
5
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
6
6
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
export default function BackgroundColor(props) {
|
|
9
8
|
var _useThemeObserver = useThemeObserver(),
|
|
10
9
|
colorMode = _useThemeObserver.colorMode;
|
|
@@ -41,7 +40,7 @@ export default function BackgroundColor(props) {
|
|
|
41
40
|
var style = useMemo(function () {
|
|
42
41
|
return _defineProperty({}, '--custom-palette-color', paletteColorValue);
|
|
43
42
|
}, [paletteColorValue]);
|
|
44
|
-
if (props.isStandalone
|
|
43
|
+
if (props.isStandalone) {
|
|
45
44
|
return /*#__PURE__*/React.createElement("span", {
|
|
46
45
|
"data-block-mark": props.dataAttributes['data-block-mark'],
|
|
47
46
|
"data-renderer-mark": props.dataAttributes['data-renderer-mark'],
|
|
@@ -172,7 +172,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
172
172
|
isNumberColumnEnabled: isNumberColumnEnabled
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
if (isNumberColumnEnabled && (tableWidth < maxTableWidth || maxTableWidth === 0)
|
|
175
|
+
if (isNumberColumnEnabled && (tableWidth < maxTableWidth || maxTableWidth === 0)) {
|
|
176
176
|
var fixedColWidths = targetWidths.map(function (width) {
|
|
177
177
|
return fixColumnWidth({
|
|
178
178
|
columnWidth: width,
|
|
@@ -200,11 +200,6 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* When cleaning up editor_prevent_numbered_column_too_big_jira_1 experiment,
|
|
206
|
-
* resuse the fixedColWidths const to avoid code duplication.
|
|
207
|
-
*/
|
|
208
203
|
return targetWidths.map(function (colWidth) {
|
|
209
204
|
var width = fixColumnWidth({
|
|
210
205
|
columnWidth: colWidth,
|
|
@@ -1891,7 +1891,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1891
1891
|
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
|
|
1892
1892
|
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
|
|
1893
1893
|
},
|
|
1894
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1894
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1895
1895
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1896
1896
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1897
1897
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -61,7 +61,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
61
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
62
62
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
63
63
|
var packageName = "@atlaskit/renderer";
|
|
64
|
-
var packageVersion = "
|
|
64
|
+
var packageVersion = "0.0.0-development";
|
|
65
65
|
var setAsQueryContainerStyles = css({
|
|
66
66
|
containerName: 'ak-renderer-wrapper',
|
|
67
67
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "126.6.
|
|
3
|
+
"version": "126.6.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"@atlaskit/media-viewer": "^52.7.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
55
|
-
"@atlaskit/react-ufo": "^5.
|
|
55
|
+
"@atlaskit/react-ufo": "^5.1.0",
|
|
56
56
|
"@atlaskit/smart-card": "^43.23.0",
|
|
57
57
|
"@atlaskit/status": "^3.1.0",
|
|
58
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^20.2.0",
|
|
61
61
|
"@atlaskit/tokens": "^11.0.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.14.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -205,9 +205,6 @@
|
|
|
205
205
|
"jfp-magma-ssr-iv-editor-links": {
|
|
206
206
|
"type": "boolean"
|
|
207
207
|
},
|
|
208
|
-
"platform_editor_text_highlight_padding": {
|
|
209
|
-
"type": "boolean"
|
|
210
|
-
},
|
|
211
208
|
"platform_editor_content_mode_render_context": {
|
|
212
209
|
"type": "boolean"
|
|
213
210
|
},
|
package/tsconfig.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"extends": "../../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"moduleResolution": "node"
|
|
5
|
+
},
|
|
6
|
+
"include": [
|
|
7
|
+
"./src/**/*.ts",
|
|
8
|
+
"./src/**/*.tsx",
|
|
9
|
+
"./docs/**/*.ts",
|
|
10
|
+
"./docs/**/*.tsx",
|
|
11
|
+
"./examples/**/*.ts",
|
|
12
|
+
"./examples/**/*.tsx",
|
|
13
|
+
"**/stories.ts",
|
|
14
|
+
"**/stories.tsx",
|
|
15
|
+
"**/stories/*.ts",
|
|
16
|
+
"**/stories/*.tsx",
|
|
17
|
+
"**/stories/**/*.ts",
|
|
18
|
+
"**/stories/**/*.tsx"
|
|
19
|
+
]
|
|
18
20
|
}
|