@atlaskit/renderer 140.2.8 → 141.0.1
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 +34 -0
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +6 -3
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +2 -1
- package/dist/cjs/react/nodes/heading-anchor-button.compiled.css +16 -0
- package/dist/cjs/react/nodes/heading-anchor-button.js +24 -0
- package/dist/cjs/react/nodes/heading-anchor.js +37 -0
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +15 -6
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +6 -3
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +2 -1
- package/dist/es2019/react/nodes/heading-anchor-button.compiled.css +16 -0
- package/dist/es2019/react/nodes/heading-anchor-button.js +15 -0
- package/dist/es2019/react/nodes/heading-anchor.js +37 -0
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +12 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +6 -3
- package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +2 -1
- package/dist/esm/react/nodes/heading-anchor-button.compiled.css +16 -0
- package/dist/esm/react/nodes/heading-anchor-button.js +15 -0
- package/dist/esm/react/nodes/heading-anchor.js +37 -0
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +15 -6
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/heading-anchor-button.d.ts +7 -0
- package/package.json +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 141.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`43145fb3049ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/43145fb3049ae) -
|
|
8
|
+
Increase heading link targets to at least 24 by 24 pixels when
|
|
9
|
+
platform_editor_heading_link_target_size is enabled.
|
|
10
|
+
- [`a3fc5f163489f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a3fc5f163489f) -
|
|
11
|
+
Remove unnecessary aria-haspopup from the code block wrap and copy buttons behind
|
|
12
|
+
platform_editor_a11y_codeblock_haspopup
|
|
13
|
+
- [`8864ef7070f02`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8864ef7070f02) -
|
|
14
|
+
Use the precise code-block copy accessible name behind platform_editor_a11y_codeblock_copy_name.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 141.0.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`3b3e57040d2d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b3e57040d2d0) -
|
|
22
|
+
Remove retired flexible-list feature controls and schema styles while preserving shipped list
|
|
23
|
+
normalization, hidden-marker rendering for wrapper list items, task paste and task-list tab
|
|
24
|
+
behavior, and toolbar indentation behavior.
|
|
25
|
+
|
|
26
|
+
Remove unused legacy list utilities after the flexible-list rollout: `flattenList`,
|
|
27
|
+
`normalizeListItemsSelection`, `hasValidListIndentationLevel`,
|
|
28
|
+
`processNestedTaskListsInSameLevel`, and `wrapTaskListIntoListAbove`. The
|
|
29
|
+
`@atlaskit/editor-common/lists/indentation` entrypoint is also removed.
|
|
30
|
+
|
|
31
|
+
Consumers of the removed runtime helpers should use the editor list plugin's indent/outdent
|
|
32
|
+
commands. The shared `FlattenedItem`, `FlattenListOptions`, and `FlattenListResult` types remain
|
|
33
|
+
available for the active list implementations.
|
|
34
|
+
|
|
35
|
+
- Updated dependencies
|
|
36
|
+
|
|
3
37
|
## 140.2.8
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
|
@@ -9,7 +9,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button/custom-theme-button"));
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
11
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
12
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
13
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
14
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
13
15
|
var _react = require("@emotion/react");
|
|
14
16
|
var _react2 = require("react");
|
|
15
17
|
var _reactIntl = require("react-intl");
|
|
@@ -26,7 +28,8 @@ var _clipboard = require("../../../utils/clipboard");
|
|
|
26
28
|
var CopyButton = function CopyButton(_ref) {
|
|
27
29
|
var content = _ref.content,
|
|
28
30
|
intl = _ref.intl;
|
|
29
|
-
var
|
|
31
|
+
var copyCodeToClipboardMessage = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_a11y_codeblock_copy_name') ? _messages.codeBlockButtonMessages.copyCodeSnippetToClipboard : _messages.codeBlockButtonMessages.copyCodeToClipboard;
|
|
32
|
+
var _useState = (0, _react2.useState)(intl.formatMessage(copyCodeToClipboardMessage)),
|
|
30
33
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
31
34
|
tooltip = _useState2[0],
|
|
32
35
|
setTooltip = _useState2[1];
|
|
@@ -35,7 +38,7 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
35
38
|
className = _useState4[0],
|
|
36
39
|
setClassName = _useState4[1];
|
|
37
40
|
var onMouseLeave = function onMouseLeave() {
|
|
38
|
-
setTooltip(intl.formatMessage(
|
|
41
|
+
setTooltip(intl.formatMessage(copyCodeToClipboardMessage));
|
|
39
42
|
setClassName('copy-to-clipboard');
|
|
40
43
|
};
|
|
41
44
|
return (0, _react.jsx)(_analyticsContext.default.Consumer, null, function (_ref2) {
|
|
@@ -49,7 +52,7 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
49
52
|
onBlur: onMouseLeave
|
|
50
53
|
}, (0, _react.jsx)(_customThemeButton.default, {
|
|
51
54
|
appearance: "subtle",
|
|
52
|
-
"aria-haspopup": true,
|
|
55
|
+
"aria-haspopup": (0, _fg.fg)('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
53
56
|
"aria-label": tooltip
|
|
54
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
55
58
|
,
|
|
@@ -10,6 +10,7 @@ var _reactIntl = require("react-intl");
|
|
|
10
10
|
var _textWrap = _interopRequireDefault(require("@atlaskit/icon/core/text-wrap"));
|
|
11
11
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button/custom-theme-button"));
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
14
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
14
15
|
var _analyticsContext = _interopRequireDefault(require("../../../../analytics/analyticsContext"));
|
|
15
16
|
var _enums = require("../../../../analytics/enums");
|
|
@@ -32,7 +33,7 @@ var CodeBlockWrapButton = function CodeBlockWrapButton(_ref) {
|
|
|
32
33
|
position: "top"
|
|
33
34
|
}, (0, _react.jsx)(_customThemeButton.default, {
|
|
34
35
|
appearance: "subtle",
|
|
35
|
-
"aria-haspopup": true,
|
|
36
|
+
"aria-haspopup": (0, _fg.fg)('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
36
37
|
"aria-label": wrapMessage
|
|
37
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
38
39
|
,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
._1dqoglyw{border-style:none}._12ji1r31{outline-color:currentColor}
|
|
2
|
+
._12y31o36{outline-width:medium}
|
|
3
|
+
._19bvidpf{padding-left:0}
|
|
4
|
+
._1bah1h6o{justify-content:center}
|
|
5
|
+
._1bsb1tcg{width:24px}
|
|
6
|
+
._1e0c116y{display:inline-flex}
|
|
7
|
+
._1qu2glyw{outline-style:none}
|
|
8
|
+
._4cvr1h6o{align-items:center}
|
|
9
|
+
._4t3i1tcg{height:24px}
|
|
10
|
+
._80omtlke{cursor:pointer}
|
|
11
|
+
._bfhk1j28{background-color:transparent}
|
|
12
|
+
._ca0qidpf{padding-top:0}
|
|
13
|
+
._n3tdidpf{padding-bottom:0}
|
|
14
|
+
._s7n4nkob{vertical-align:middle}
|
|
15
|
+
._u5f3idpf{padding-right:0}
|
|
16
|
+
._vchhusvi{box-sizing:border-box}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.default = HeadingAnchorButton;
|
|
10
|
+
require("./heading-anchor-button.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
+
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); }
|
|
15
|
+
var buttonStyles = null;
|
|
16
|
+
|
|
17
|
+
/** Heading link button with a minimum 24px pointer target. */
|
|
18
|
+
function HeadingAnchorButton(props) {
|
|
19
|
+
// eslint-disable-next-line react/jsx-props-no-spreading -- Forward the existing heading anchor's accessibility and event props.
|
|
20
|
+
return /*#__PURE__*/React.createElement("button", (0, _extends2.default)({}, props, {
|
|
21
|
+
type: "button",
|
|
22
|
+
className: (0, _runtime.ax)(["_12ji1r31 _1qu2glyw _12y31o36 _1dqoglyw _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _s7n4nkob _bfhk1j28 _80omtlke"])
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
@@ -23,6 +23,7 @@ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-ex
|
|
|
23
23
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
24
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
25
|
var _messages = require("../../messages");
|
|
26
|
+
var _headingAnchorButton = _interopRequireDefault(require("./heading-anchor-button"));
|
|
26
27
|
var _excluded = ["children"];
|
|
27
28
|
/**
|
|
28
29
|
* @jsxRuntime classic
|
|
@@ -32,12 +33,22 @@ var _excluded = ["children"];
|
|
|
32
33
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
33
34
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
34
35
|
var HeadingAnchorWrapperClassName = exports.HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
36
|
+
var headingAnchorWrapperTargetSizeStyles = (0, _react2.css)({
|
|
37
|
+
display: 'inline-flex',
|
|
38
|
+
boxSizing: 'border-box',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
width: '24px',
|
|
42
|
+
height: '24px',
|
|
43
|
+
verticalAlign: 'middle'
|
|
44
|
+
});
|
|
35
45
|
var CopyAnchorWrapperWithRef = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
36
46
|
var children = props.children,
|
|
37
47
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
38
48
|
return (0, _react2.jsx)("span", (0, _extends2.default)({}, rest, {
|
|
39
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
40
50
|
className: HeadingAnchorWrapperClassName,
|
|
51
|
+
css: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_heading_link_target_size') ? headingAnchorWrapperTargetSizeStyles : undefined,
|
|
41
52
|
ref: ref
|
|
42
53
|
}), children);
|
|
43
54
|
});
|
|
@@ -50,6 +61,11 @@ var copyAnchorButtonStyles = (0, _react2.css)({
|
|
|
50
61
|
cursor: 'pointer',
|
|
51
62
|
right: 0
|
|
52
63
|
});
|
|
64
|
+
var scaledLinkIconStyles = (0, _react2.css)({
|
|
65
|
+
display: 'inline-flex',
|
|
66
|
+
transform: 'scale(1.5)',
|
|
67
|
+
transformOrigin: 'center'
|
|
68
|
+
});
|
|
53
69
|
// Ignored via go/ees005
|
|
54
70
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
55
71
|
var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -128,6 +144,27 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
128
144
|
heading: headingId
|
|
129
145
|
}) : headingId;
|
|
130
146
|
var tabIndex = (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? 0 : hideFromScreenReader ? undefined : -1;
|
|
147
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_heading_link_target_size')) {
|
|
148
|
+
return (0, _react2.jsx)(_headingAnchorButton.default, {
|
|
149
|
+
"data-testid": "anchor-button",
|
|
150
|
+
id: _this.copyLinkId,
|
|
151
|
+
onMouseLeave: _this.resetMessage,
|
|
152
|
+
onBlur: _this.resetMessage,
|
|
153
|
+
onClick: _this.copyToClipboard,
|
|
154
|
+
"aria-hidden": hideFromScreenReader,
|
|
155
|
+
tabIndex: tabIndex,
|
|
156
|
+
"aria-label": hideFromScreenReader ? undefined : _this.state.tooltipMessage,
|
|
157
|
+
"aria-labelledby": hideFromScreenReader ? undefined : labelledBy,
|
|
158
|
+
type: "button"
|
|
159
|
+
}, (0, _react2.jsx)("span", {
|
|
160
|
+
css: scaledLinkIconStyles,
|
|
161
|
+
"data-testid": "scaled-link-icon"
|
|
162
|
+
}, (0, _react2.jsx)(_link.default, {
|
|
163
|
+
label: _this.getCopyAriaLabel(),
|
|
164
|
+
size: "medium",
|
|
165
|
+
color: _this.state.isClicked ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon-subtle, #505258)"
|
|
166
|
+
})));
|
|
167
|
+
}
|
|
131
168
|
return (0, _react2.jsx)("button", {
|
|
132
169
|
"data-testid": "anchor-button",
|
|
133
170
|
id: _this.copyLinkId,
|
|
@@ -30,7 +30,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
30
30
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
31
31
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
32
32
|
var _collapsibleHeadingsDom = require("../collapsible-headings-dom");
|
|
33
|
-
var
|
|
33
|
+
var _css0, _$concat3, _$concat5;
|
|
34
34
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors */
|
|
35
35
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
36
36
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -554,6 +554,16 @@ var headingWrapperInlineFlowStyles = (0, _react.css)((0, _defineProperty2.defaul
|
|
|
554
554
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
555
555
|
marginTop: '1.59091em'
|
|
556
556
|
}));
|
|
557
|
+
var headingAnchorWrapperTargetSizeStyles = (0, _react.css)((0, _defineProperty2.default)({
|
|
558
|
+
'& .renderer-heading-wrapper > h1, & .renderer-heading-wrapper > h2, & .renderer-heading-wrapper > h3, & .renderer-heading-wrapper > h4, & .renderer-heading-wrapper > h5, & .renderer-heading-wrapper > h6': {
|
|
559
|
+
verticalAlign: 'middle'
|
|
560
|
+
}
|
|
561
|
+
}, "& .renderer-heading-wrapper > .".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
|
|
562
|
+
display: 'inline-flex',
|
|
563
|
+
alignItems: 'center',
|
|
564
|
+
justifyContent: 'center',
|
|
565
|
+
verticalAlign: 'middle'
|
|
566
|
+
}));
|
|
557
567
|
var headingWithAlignmentStylesDuplicateAnchor = (0, _react.css)({
|
|
558
568
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
559
569
|
'.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
|
|
@@ -644,13 +654,13 @@ var paragraphStylesUGCScaledMargin = (0, _react.css)({
|
|
|
644
654
|
marginBottom: 0
|
|
645
655
|
}
|
|
646
656
|
});
|
|
647
|
-
var listsSharedStyles = (0, _react.css)((
|
|
657
|
+
var listsSharedStyles = (0, _react.css)((_css0 = {
|
|
648
658
|
/* =============== INDENTATION SPACING ========= */
|
|
649
659
|
'ul, ol': {
|
|
650
660
|
boxSizing: 'border-box',
|
|
651
661
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(_styles.listItemCounterPadding, "px)")
|
|
652
662
|
}
|
|
653
|
-
}, (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)(
|
|
663
|
+
}, (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)(_css0, "".concat(_orderedList.orderedListSelector, ", ").concat(_bulletList.bulletListSelector), {
|
|
654
664
|
/*
|
|
655
665
|
Ensures list item content adheres to the list's margin instead
|
|
656
666
|
of filling the entire block row. This is important to allow
|
|
@@ -682,7 +692,7 @@ var listsSharedStyles = (0, _react.css)((_css9 = {
|
|
|
682
692
|
listStyleType: 'lower-alpha'
|
|
683
693
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
684
694
|
listStyleType: 'lower-roman'
|
|
685
|
-
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
695
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css0, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
686
696
|
listStyleType: 'disc'
|
|
687
697
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
688
698
|
listStyleType: 'circle'
|
|
@@ -711,7 +721,6 @@ var listsSharedStylesForGekko = (0, _react.css)({
|
|
|
711
721
|
/**
|
|
712
722
|
* Hides list markers for "wrapper items" - list items that only contain nested lists with no other content.
|
|
713
723
|
* These wrapper items have no meaningful content themselves, only nested lists below.
|
|
714
|
-
* Applied when platform_editor_flexible_list_schema experiment is enabled.
|
|
715
724
|
*/
|
|
716
725
|
var listItemHiddenMarkerStyles = (0, _react.css)({
|
|
717
726
|
// Hide markers and remove spacing for wrapper list items (items containing only nested lists)
|
|
@@ -2289,7 +2298,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2289
2298
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2290
2299
|
'--ak-renderer-editor-font-small-text': _ugcTokens.editorUGCTokensRefreshed['editor.font.body.small']
|
|
2291
2300
|
},
|
|
2292
|
-
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, (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' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (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)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), 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' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko,
|
|
2301
|
+
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, (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' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (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)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2293
2302
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2294
2303
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _fg.fg)('editor_inline_comments_on_inline_nodes') && ((0, _expValEquals.expValEquals)('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2295
2304
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -73,7 +73,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
73
73
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
74
74
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
75
75
|
var packageName = "@atlaskit/renderer";
|
|
76
|
-
var packageVersion = "
|
|
76
|
+
var packageVersion = "141.0.0";
|
|
77
77
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
78
78
|
containerName: 'ak-renderer-wrapper',
|
|
79
79
|
containerType: 'inline-size'
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
6
6
|
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
9
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
10
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
12
|
import { jsx } from '@emotion/react';
|
|
11
13
|
import { useState } from 'react';
|
|
@@ -17,10 +19,11 @@ const CopyButton = ({
|
|
|
17
19
|
content,
|
|
18
20
|
intl
|
|
19
21
|
}) => {
|
|
20
|
-
const
|
|
22
|
+
const copyCodeToClipboardMessage = isExperimentEnabled('platform_editor_a11y_codeblock_copy_name') ? codeBlockButtonMessages.copyCodeSnippetToClipboard : codeBlockButtonMessages.copyCodeToClipboard;
|
|
23
|
+
const [tooltip, setTooltip] = useState(intl.formatMessage(copyCodeToClipboardMessage));
|
|
21
24
|
const [className, setClassName] = useState('copy-to-clipboard');
|
|
22
25
|
const onMouseLeave = () => {
|
|
23
|
-
setTooltip(intl.formatMessage(
|
|
26
|
+
setTooltip(intl.formatMessage(copyCodeToClipboardMessage));
|
|
24
27
|
setClassName('copy-to-clipboard');
|
|
25
28
|
};
|
|
26
29
|
return jsx(AnalyticsContext.Consumer, null, ({
|
|
@@ -34,7 +37,7 @@ const CopyButton = ({
|
|
|
34
37
|
onBlur: onMouseLeave
|
|
35
38
|
}, jsx(Button, {
|
|
36
39
|
appearance: "subtle",
|
|
37
|
-
"aria-haspopup": true,
|
|
40
|
+
"aria-haspopup": fg('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
38
41
|
"aria-label": tooltip
|
|
39
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
40
43
|
,
|
|
@@ -8,6 +8,7 @@ import { injectIntl } from 'react-intl';
|
|
|
8
8
|
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
9
9
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
10
10
|
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
12
13
|
import AnalyticsContext from '../../../../analytics/analyticsContext';
|
|
13
14
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../../../analytics/enums';
|
|
@@ -25,7 +26,7 @@ const CodeBlockWrapButton = ({
|
|
|
25
26
|
position: "top"
|
|
26
27
|
}, jsx(Button, {
|
|
27
28
|
appearance: "subtle",
|
|
28
|
-
"aria-haspopup": true,
|
|
29
|
+
"aria-haspopup": fg('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
29
30
|
"aria-label": wrapMessage
|
|
30
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
31
32
|
,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
._1dqoglyw{border-style:none}._12ji1r31{outline-color:currentColor}
|
|
2
|
+
._12y31o36{outline-width:medium}
|
|
3
|
+
._19bvidpf{padding-left:0}
|
|
4
|
+
._1bah1h6o{justify-content:center}
|
|
5
|
+
._1bsb1tcg{width:24px}
|
|
6
|
+
._1e0c116y{display:inline-flex}
|
|
7
|
+
._1qu2glyw{outline-style:none}
|
|
8
|
+
._4cvr1h6o{align-items:center}
|
|
9
|
+
._4t3i1tcg{height:24px}
|
|
10
|
+
._80omtlke{cursor:pointer}
|
|
11
|
+
._bfhk1j28{background-color:transparent}
|
|
12
|
+
._ca0qidpf{padding-top:0}
|
|
13
|
+
._n3tdidpf{padding-bottom:0}
|
|
14
|
+
._s7n4nkob{vertical-align:middle}
|
|
15
|
+
._u5f3idpf{padding-right:0}
|
|
16
|
+
._vchhusvi{box-sizing:border-box}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./heading-anchor-button.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
const buttonStyles = null;
|
|
7
|
+
|
|
8
|
+
/** Heading link button with a minimum 24px pointer target. */
|
|
9
|
+
export default function HeadingAnchorButton(props) {
|
|
10
|
+
// eslint-disable-next-line react/jsx-props-no-spreading -- Forward the existing heading anchor's accessibility and event props.
|
|
11
|
+
return /*#__PURE__*/React.createElement("button", _extends({}, props, {
|
|
12
|
+
type: "button",
|
|
13
|
+
className: ax(["_12ji1r31 _1qu2glyw _12y31o36 _1dqoglyw _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _s7n4nkob _bfhk1j28 _80omtlke"])
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
@@ -14,7 +14,17 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
|
|
|
14
14
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
import { headingAnchorLinkMessages } from '../../messages';
|
|
17
|
+
import HeadingAnchorButton from './heading-anchor-button';
|
|
17
18
|
export const HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
19
|
+
const headingAnchorWrapperTargetSizeStyles = css({
|
|
20
|
+
display: 'inline-flex',
|
|
21
|
+
boxSizing: 'border-box',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
width: '24px',
|
|
25
|
+
height: '24px',
|
|
26
|
+
verticalAlign: 'middle'
|
|
27
|
+
});
|
|
18
28
|
const CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
19
29
|
const {
|
|
20
30
|
children,
|
|
@@ -23,6 +33,7 @@ const CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
23
33
|
return jsx("span", _extends({}, rest, {
|
|
24
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
25
35
|
className: HeadingAnchorWrapperClassName,
|
|
36
|
+
css: isExperimentEnabled('platform_editor_heading_link_target_size') ? headingAnchorWrapperTargetSizeStyles : undefined,
|
|
26
37
|
ref: ref
|
|
27
38
|
}), children);
|
|
28
39
|
});
|
|
@@ -35,6 +46,11 @@ const copyAnchorButtonStyles = css({
|
|
|
35
46
|
cursor: 'pointer',
|
|
36
47
|
right: 0
|
|
37
48
|
});
|
|
49
|
+
const scaledLinkIconStyles = css({
|
|
50
|
+
display: 'inline-flex',
|
|
51
|
+
transform: 'scale(1.5)',
|
|
52
|
+
transformOrigin: 'center'
|
|
53
|
+
});
|
|
38
54
|
// Ignored via go/ees005
|
|
39
55
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
40
56
|
class HeadingAnchor extends React.PureComponent {
|
|
@@ -97,6 +113,27 @@ class HeadingAnchor extends React.PureComponent {
|
|
|
97
113
|
heading: headingId
|
|
98
114
|
}) : headingId;
|
|
99
115
|
const tabIndex = expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? 0 : hideFromScreenReader ? undefined : -1;
|
|
116
|
+
if (isExperimentEnabled('platform_editor_heading_link_target_size')) {
|
|
117
|
+
return jsx(HeadingAnchorButton, {
|
|
118
|
+
"data-testid": "anchor-button",
|
|
119
|
+
id: this.copyLinkId,
|
|
120
|
+
onMouseLeave: this.resetMessage,
|
|
121
|
+
onBlur: this.resetMessage,
|
|
122
|
+
onClick: this.copyToClipboard,
|
|
123
|
+
"aria-hidden": hideFromScreenReader,
|
|
124
|
+
tabIndex: tabIndex,
|
|
125
|
+
"aria-label": hideFromScreenReader ? undefined : this.state.tooltipMessage,
|
|
126
|
+
"aria-labelledby": hideFromScreenReader ? undefined : labelledBy,
|
|
127
|
+
type: "button"
|
|
128
|
+
}, jsx("span", {
|
|
129
|
+
css: scaledLinkIconStyles,
|
|
130
|
+
"data-testid": "scaled-link-icon"
|
|
131
|
+
}, jsx(LinkIcon, {
|
|
132
|
+
label: this.getCopyAriaLabel(),
|
|
133
|
+
size: "medium",
|
|
134
|
+
color: this.state.isClicked ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon-subtle, #505258)"
|
|
135
|
+
})));
|
|
136
|
+
}
|
|
100
137
|
return jsx("button", {
|
|
101
138
|
"data-testid": "anchor-button",
|
|
102
139
|
id: this.copyLinkId,
|
|
@@ -661,6 +661,17 @@ const headingWrapperInlineFlowStyles = css({
|
|
|
661
661
|
marginTop: '1.59091em'
|
|
662
662
|
}
|
|
663
663
|
});
|
|
664
|
+
const headingAnchorWrapperTargetSizeStyles = css({
|
|
665
|
+
'& .renderer-heading-wrapper > h1, & .renderer-heading-wrapper > h2, & .renderer-heading-wrapper > h3, & .renderer-heading-wrapper > h4, & .renderer-heading-wrapper > h5, & .renderer-heading-wrapper > h6': {
|
|
666
|
+
verticalAlign: 'middle'
|
|
667
|
+
},
|
|
668
|
+
[`& .renderer-heading-wrapper > .${HeadingAnchorWrapperClassName}`]: {
|
|
669
|
+
display: 'inline-flex',
|
|
670
|
+
alignItems: 'center',
|
|
671
|
+
justifyContent: 'center',
|
|
672
|
+
verticalAlign: 'middle'
|
|
673
|
+
}
|
|
674
|
+
});
|
|
664
675
|
const headingWithAlignmentStylesDuplicateAnchor = css({
|
|
665
676
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
666
677
|
'.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
|
|
@@ -837,7 +848,6 @@ const listsSharedStylesForGekko = css({
|
|
|
837
848
|
/**
|
|
838
849
|
* Hides list markers for "wrapper items" - list items that only contain nested lists with no other content.
|
|
839
850
|
* These wrapper items have no meaningful content themselves, only nested lists below.
|
|
840
|
-
* Applied when platform_editor_flexible_list_schema experiment is enabled.
|
|
841
851
|
*/
|
|
842
852
|
const listItemHiddenMarkerStyles = css({
|
|
843
853
|
// Hide markers and remove spacing for wrapper list items (items containing only nested lists)
|
|
@@ -2921,7 +2931,7 @@ export const RendererStyleContainer = props => {
|
|
|
2921
2931
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2922
2932
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2923
2933
|
},
|
|
2924
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (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)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), 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' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko,
|
|
2934
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (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)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, isExperimentEnabled('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2925
2935
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2926
2936
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2927
2937
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -59,7 +59,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
59
59
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
60
60
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
61
61
|
const packageName = "@atlaskit/renderer";
|
|
62
|
-
const packageVersion = "
|
|
62
|
+
const packageVersion = "141.0.0";
|
|
63
63
|
const setAsQueryContainerStyles = css({
|
|
64
64
|
containerName: 'ak-renderer-wrapper',
|
|
65
65
|
containerType: 'inline-size'
|
|
@@ -6,7 +6,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
6
6
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
7
7
|
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
10
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
11
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
13
|
import { jsx } from '@emotion/react';
|
|
12
14
|
import { useState } from 'react';
|
|
@@ -17,7 +19,8 @@ import { copyTextToClipboard } from '../../../utils/clipboard';
|
|
|
17
19
|
var CopyButton = function CopyButton(_ref) {
|
|
18
20
|
var content = _ref.content,
|
|
19
21
|
intl = _ref.intl;
|
|
20
|
-
var
|
|
22
|
+
var copyCodeToClipboardMessage = isExperimentEnabled('platform_editor_a11y_codeblock_copy_name') ? codeBlockButtonMessages.copyCodeSnippetToClipboard : codeBlockButtonMessages.copyCodeToClipboard;
|
|
23
|
+
var _useState = useState(intl.formatMessage(copyCodeToClipboardMessage)),
|
|
21
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
25
|
tooltip = _useState2[0],
|
|
23
26
|
setTooltip = _useState2[1];
|
|
@@ -26,7 +29,7 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
26
29
|
className = _useState4[0],
|
|
27
30
|
setClassName = _useState4[1];
|
|
28
31
|
var onMouseLeave = function onMouseLeave() {
|
|
29
|
-
setTooltip(intl.formatMessage(
|
|
32
|
+
setTooltip(intl.formatMessage(copyCodeToClipboardMessage));
|
|
30
33
|
setClassName('copy-to-clipboard');
|
|
31
34
|
};
|
|
32
35
|
return jsx(AnalyticsContext.Consumer, null, function (_ref2) {
|
|
@@ -40,7 +43,7 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
40
43
|
onBlur: onMouseLeave
|
|
41
44
|
}, jsx(Button, {
|
|
42
45
|
appearance: "subtle",
|
|
43
|
-
"aria-haspopup": true,
|
|
46
|
+
"aria-haspopup": fg('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
44
47
|
"aria-label": tooltip
|
|
45
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
46
49
|
,
|
|
@@ -8,6 +8,7 @@ import { injectIntl } from 'react-intl';
|
|
|
8
8
|
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
9
9
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
10
10
|
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
12
13
|
import AnalyticsContext from '../../../../analytics/analyticsContext';
|
|
13
14
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../../../analytics/enums';
|
|
@@ -24,7 +25,7 @@ var CodeBlockWrapButton = function CodeBlockWrapButton(_ref) {
|
|
|
24
25
|
position: "top"
|
|
25
26
|
}, jsx(Button, {
|
|
26
27
|
appearance: "subtle",
|
|
27
|
-
"aria-haspopup": true,
|
|
28
|
+
"aria-haspopup": fg('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
28
29
|
"aria-label": wrapMessage
|
|
29
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
30
31
|
,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
._1dqoglyw{border-style:none}._12ji1r31{outline-color:currentColor}
|
|
2
|
+
._12y31o36{outline-width:medium}
|
|
3
|
+
._19bvidpf{padding-left:0}
|
|
4
|
+
._1bah1h6o{justify-content:center}
|
|
5
|
+
._1bsb1tcg{width:24px}
|
|
6
|
+
._1e0c116y{display:inline-flex}
|
|
7
|
+
._1qu2glyw{outline-style:none}
|
|
8
|
+
._4cvr1h6o{align-items:center}
|
|
9
|
+
._4t3i1tcg{height:24px}
|
|
10
|
+
._80omtlke{cursor:pointer}
|
|
11
|
+
._bfhk1j28{background-color:transparent}
|
|
12
|
+
._ca0qidpf{padding-top:0}
|
|
13
|
+
._n3tdidpf{padding-bottom:0}
|
|
14
|
+
._s7n4nkob{vertical-align:middle}
|
|
15
|
+
._u5f3idpf{padding-right:0}
|
|
16
|
+
._vchhusvi{box-sizing:border-box}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./heading-anchor-button.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
var buttonStyles = null;
|
|
7
|
+
|
|
8
|
+
/** Heading link button with a minimum 24px pointer target. */
|
|
9
|
+
export default function HeadingAnchorButton(props) {
|
|
10
|
+
// eslint-disable-next-line react/jsx-props-no-spreading -- Forward the existing heading anchor's accessibility and event props.
|
|
11
|
+
return /*#__PURE__*/React.createElement("button", _extends({}, props, {
|
|
12
|
+
type: "button",
|
|
13
|
+
className: ax(["_12ji1r31 _1qu2glyw _12y31o36 _1dqoglyw _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _s7n4nkob _bfhk1j28 _80omtlke"])
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
@@ -25,13 +25,24 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
|
|
|
25
25
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
26
26
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
27
|
import { headingAnchorLinkMessages } from '../../messages';
|
|
28
|
+
import HeadingAnchorButton from './heading-anchor-button';
|
|
28
29
|
export var HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
30
|
+
var headingAnchorWrapperTargetSizeStyles = css({
|
|
31
|
+
display: 'inline-flex',
|
|
32
|
+
boxSizing: 'border-box',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
width: '24px',
|
|
36
|
+
height: '24px',
|
|
37
|
+
verticalAlign: 'middle'
|
|
38
|
+
});
|
|
29
39
|
var CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
30
40
|
var children = props.children,
|
|
31
41
|
rest = _objectWithoutProperties(props, _excluded);
|
|
32
42
|
return jsx("span", _extends({}, rest, {
|
|
33
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
34
44
|
className: HeadingAnchorWrapperClassName,
|
|
45
|
+
css: isExperimentEnabled('platform_editor_heading_link_target_size') ? headingAnchorWrapperTargetSizeStyles : undefined,
|
|
35
46
|
ref: ref
|
|
36
47
|
}), children);
|
|
37
48
|
});
|
|
@@ -44,6 +55,11 @@ var copyAnchorButtonStyles = css({
|
|
|
44
55
|
cursor: 'pointer',
|
|
45
56
|
right: 0
|
|
46
57
|
});
|
|
58
|
+
var scaledLinkIconStyles = css({
|
|
59
|
+
display: 'inline-flex',
|
|
60
|
+
transform: 'scale(1.5)',
|
|
61
|
+
transformOrigin: 'center'
|
|
62
|
+
});
|
|
47
63
|
// Ignored via go/ees005
|
|
48
64
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
49
65
|
var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -122,6 +138,27 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
122
138
|
heading: headingId
|
|
123
139
|
}) : headingId;
|
|
124
140
|
var tabIndex = expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? 0 : hideFromScreenReader ? undefined : -1;
|
|
141
|
+
if (isExperimentEnabled('platform_editor_heading_link_target_size')) {
|
|
142
|
+
return jsx(HeadingAnchorButton, {
|
|
143
|
+
"data-testid": "anchor-button",
|
|
144
|
+
id: _this.copyLinkId,
|
|
145
|
+
onMouseLeave: _this.resetMessage,
|
|
146
|
+
onBlur: _this.resetMessage,
|
|
147
|
+
onClick: _this.copyToClipboard,
|
|
148
|
+
"aria-hidden": hideFromScreenReader,
|
|
149
|
+
tabIndex: tabIndex,
|
|
150
|
+
"aria-label": hideFromScreenReader ? undefined : _this.state.tooltipMessage,
|
|
151
|
+
"aria-labelledby": hideFromScreenReader ? undefined : labelledBy,
|
|
152
|
+
type: "button"
|
|
153
|
+
}, jsx("span", {
|
|
154
|
+
css: scaledLinkIconStyles,
|
|
155
|
+
"data-testid": "scaled-link-icon"
|
|
156
|
+
}, jsx(LinkIcon, {
|
|
157
|
+
label: _this.getCopyAriaLabel(),
|
|
158
|
+
size: "medium",
|
|
159
|
+
color: _this.state.isClicked ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon-subtle, #505258)"
|
|
160
|
+
})));
|
|
161
|
+
}
|
|
125
162
|
return jsx("button", {
|
|
126
163
|
"data-testid": "anchor-button",
|
|
127
164
|
id: _this.copyLinkId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var
|
|
2
|
+
var _css0, _$concat3, _$concat5;
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors */
|
|
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 */
|
|
@@ -547,6 +547,16 @@ var headingWrapperInlineFlowStyles = css(_defineProperty(_defineProperty(_define
|
|
|
547
547
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
548
548
|
marginTop: '1.59091em'
|
|
549
549
|
}));
|
|
550
|
+
var headingAnchorWrapperTargetSizeStyles = css(_defineProperty({
|
|
551
|
+
'& .renderer-heading-wrapper > h1, & .renderer-heading-wrapper > h2, & .renderer-heading-wrapper > h3, & .renderer-heading-wrapper > h4, & .renderer-heading-wrapper > h5, & .renderer-heading-wrapper > h6': {
|
|
552
|
+
verticalAlign: 'middle'
|
|
553
|
+
}
|
|
554
|
+
}, "& .renderer-heading-wrapper > .".concat(HeadingAnchorWrapperClassName), {
|
|
555
|
+
display: 'inline-flex',
|
|
556
|
+
alignItems: 'center',
|
|
557
|
+
justifyContent: 'center',
|
|
558
|
+
verticalAlign: 'middle'
|
|
559
|
+
}));
|
|
550
560
|
var headingWithAlignmentStylesDuplicateAnchor = css({
|
|
551
561
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
552
562
|
'.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
|
|
@@ -637,13 +647,13 @@ var paragraphStylesUGCScaledMargin = css({
|
|
|
637
647
|
marginBottom: 0
|
|
638
648
|
}
|
|
639
649
|
});
|
|
640
|
-
var listsSharedStyles = css((
|
|
650
|
+
var listsSharedStyles = css((_css0 = {
|
|
641
651
|
/* =============== INDENTATION SPACING ========= */
|
|
642
652
|
'ul, ol': {
|
|
643
653
|
boxSizing: 'border-box',
|
|
644
654
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(listItemCounterPadding, "px)")
|
|
645
655
|
}
|
|
646
|
-
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
656
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css0, "".concat(orderedListSelector, ", ").concat(bulletListSelector), {
|
|
647
657
|
/*
|
|
648
658
|
Ensures list item content adheres to the list's margin instead
|
|
649
659
|
of filling the entire block row. This is important to allow
|
|
@@ -675,7 +685,7 @@ var listsSharedStyles = css((_css9 = {
|
|
|
675
685
|
listStyleType: 'lower-alpha'
|
|
676
686
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
677
687
|
listStyleType: 'lower-roman'
|
|
678
|
-
}), _defineProperty(_defineProperty(_defineProperty(
|
|
688
|
+
}), _defineProperty(_defineProperty(_defineProperty(_css0, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
679
689
|
listStyleType: 'disc'
|
|
680
690
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
681
691
|
listStyleType: 'circle'
|
|
@@ -704,7 +714,6 @@ var listsSharedStylesForGekko = css({
|
|
|
704
714
|
/**
|
|
705
715
|
* Hides list markers for "wrapper items" - list items that only contain nested lists with no other content.
|
|
706
716
|
* These wrapper items have no meaningful content themselves, only nested lists below.
|
|
707
|
-
* Applied when platform_editor_flexible_list_schema experiment is enabled.
|
|
708
717
|
*/
|
|
709
718
|
var listItemHiddenMarkerStyles = css({
|
|
710
719
|
// Hide markers and remove spacing for wrapper list items (items containing only nested lists)
|
|
@@ -2282,7 +2291,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2282
2291
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2283
2292
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2284
2293
|
},
|
|
2285
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (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)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), 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' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko,
|
|
2294
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (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)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, isExperimentEnabled('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2286
2295
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2287
2296
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2288
2297
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -64,7 +64,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
64
64
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
65
65
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
66
66
|
var packageName = "@atlaskit/renderer";
|
|
67
|
-
var packageVersion = "
|
|
67
|
+
var packageVersion = "141.0.0";
|
|
68
68
|
var setAsQueryContainerStyles = css({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size'
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import type { ButtonHTMLAttributes, JSX } from 'react';
|
|
6
|
+
/** Heading link button with a minimum 24px pointer target. */
|
|
7
|
+
export default function HeadingAnchorButton(props: ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "141.0.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/adf-schema": "^57.5.0",
|
|
37
37
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
38
38
|
"@atlaskit/afm-i18n-platform-editor-renderer": "2.249.0",
|
|
39
|
-
"@atlaskit/analytics-listeners": "^11.
|
|
39
|
+
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
40
40
|
"@atlaskit/analytics-namespaced-context": "^8.2.0",
|
|
41
41
|
"@atlaskit/analytics-next": "^12.5.0",
|
|
42
42
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/editor-card-provider": "^7.3.0",
|
|
47
47
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
48
48
|
"@atlaskit/editor-palette": "^3.5.0",
|
|
49
|
-
"@atlaskit/editor-prosemirror": "^
|
|
49
|
+
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
50
50
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
51
51
|
"@atlaskit/editor-smart-link-draggable": "^1.2.0",
|
|
52
52
|
"@atlaskit/emoji": "^72.4.0",
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
"@atlaskit/platform-feature-flags-react": "^1.2.0",
|
|
69
69
|
"@atlaskit/pragmatic-drag-and-drop": "^3.1.0",
|
|
70
70
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
71
|
-
"@atlaskit/react-ufo": "^7.
|
|
71
|
+
"@atlaskit/react-ufo": "^7.13.0",
|
|
72
72
|
"@atlaskit/smart-card": "^45.24.0",
|
|
73
|
-
"@atlaskit/status": "^5.
|
|
73
|
+
"@atlaskit/status": "^5.12.0",
|
|
74
74
|
"@atlaskit/task-decision": "^21.10.0",
|
|
75
75
|
"@atlaskit/theme": "^28.2.0",
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
77
|
-
"@atlaskit/tokens": "^18.
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^200.0.0",
|
|
77
|
+
"@atlaskit/tokens": "^18.2.0",
|
|
78
78
|
"@atlaskit/tooltip": "^24.3.0",
|
|
79
79
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
80
80
|
"@babel/runtime": "^7.0.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"uuid": "^11.1.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@atlaskit/editor-common": "^
|
|
91
|
+
"@atlaskit/editor-common": "^123.0.0",
|
|
92
92
|
"@atlaskit/link-provider": "^5.7.0",
|
|
93
93
|
"@atlaskit/media-core": "^38.2.0",
|
|
94
94
|
"react": "^18.2.0 || ^19.2.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"@af/visual-regression": "workspace:^",
|
|
101
101
|
"@atlaskit/analytics-gas-types": "^6.2.0",
|
|
102
102
|
"@atlaskit/checkbox": "^19.2.0",
|
|
103
|
-
"@atlaskit/editor-plugin-media": "^
|
|
103
|
+
"@atlaskit/editor-plugin-media": "^21.0.0",
|
|
104
104
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
105
105
|
"@atlaskit/inline-edit": "^16.4.0",
|
|
106
106
|
"@atlaskit/json-ld-types": "^2.0.0",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"@atlaskit/radio": "^10.2.0",
|
|
119
119
|
"@atlaskit/range": "^12.2.0",
|
|
120
120
|
"@atlaskit/section-message": "^10.2.0",
|
|
121
|
-
"@atlaskit/side-nav-items": "^2.
|
|
121
|
+
"@atlaskit/side-nav-items": "^2.5.0",
|
|
122
122
|
"@atlaskit/textfield": "^10.2.0",
|
|
123
123
|
"@atlaskit/toggle": "^17.3.0",
|
|
124
124
|
"@atlaskit/util-data-test": "^19.1.0",
|
|
@@ -147,6 +147,9 @@
|
|
|
147
147
|
"worker-plugin": "^4.0.2"
|
|
148
148
|
},
|
|
149
149
|
"platform-feature-flags": {
|
|
150
|
+
"platform_editor_a11y_codeblock_haspopup": {
|
|
151
|
+
"type": "boolean"
|
|
152
|
+
},
|
|
150
153
|
"platform_renderer_table_row_functional": {
|
|
151
154
|
"type": "boolean"
|
|
152
155
|
},
|