@atlaskit/renderer 149.0.5 → 149.0.8
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/index.js +3 -3
- package/dist/cjs/react/nodes/extension.js +60 -32
- package/dist/cjs/react/nodes/multiBodiedExtension.js +3 -4
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +2 -35
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +3 -3
- package/dist/es2019/react/nodes/extension.js +45 -23
- package/dist/es2019/react/nodes/multiBodiedExtension.js +3 -4
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +2 -40
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +3 -3
- package/dist/esm/react/nodes/extension.js +54 -28
- package/dist/esm/react/nodes/multiBodiedExtension.js +3 -4
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +2 -35
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 149.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`40a03b85a53bb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40a03b85a53bb) -
|
|
8
|
+
Clean up experiment `platform_editor_remove_important_in_render_ext`
|
|
9
|
+
- [`de7a00d09c978`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/de7a00d09c978) -
|
|
10
|
+
Clean up experiment `platform_editor_blocktaskitem_node_tenantid`
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 149.0.7
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`2af9684026f37`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2af9684026f37) -
|
|
18
|
+
Clean up experiment `platform_editor_render_bodied_extension_as_inline`
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 149.0.6
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`5f335f67f55d9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f335f67f55d9) -
|
|
26
|
+
[ux] Separate existing extension comment viewing from creation in the renderer behind
|
|
27
|
+
`cc_maui_annotations_on_extensions`. Add an optional `canCreateCommentOnBlockNode` provider
|
|
28
|
+
predicate that controls whether a supported extension can be targeted for new comments, so
|
|
29
|
+
Confluence can keep existing chart threads accessible while `cc_maui_comments_on_charts_exp`
|
|
30
|
+
disables new-thread creation.
|
|
31
|
+
|
|
32
|
+
Avoid subscribing extension nodes to annotation contexts when `cc_maui_annotations_on_extensions`
|
|
33
|
+
is disabled, preventing annotation hover updates from rerendering unrelated extensions.
|
|
34
|
+
|
|
35
|
+
- Updated dependencies
|
|
36
|
+
|
|
3
37
|
## 149.0.5
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -76,10 +76,10 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
76
76
|
parentInfo = _ref.parentInfo;
|
|
77
77
|
var pos = _this.startPos;
|
|
78
78
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
79
|
-
var parentIsIncompleteTask = (node.type.name === 'taskItem' || node.type.name === 'blockTaskItem'
|
|
79
|
+
var parentIsIncompleteTask = (node.type.name === 'taskItem' || node.type.name === 'blockTaskItem') && node.attrs.state !== 'DONE' ||
|
|
80
80
|
// If blockTaskItem is in the schema, check if the parent of the current node
|
|
81
81
|
// is an incomplete task item, because blockTaskItems can have nested nodes
|
|
82
|
-
node.type.schema.nodes.blockTaskItem && (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.parentIsIncompleteTask) === true
|
|
82
|
+
node.type.schema.nodes.blockTaskItem && (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.parentIsIncompleteTask) === true;
|
|
83
83
|
var nodeKey = "".concat(node.type.name, "__").concat(_this.startPos);
|
|
84
84
|
var serializedContent = _this.serializeFragment(node.content, _this.getNodeProps(node, parentInfo), (0, _nodes.toReact)(node, {
|
|
85
85
|
allowSelectAllTrap: _this.allowSelectAllTrap,
|
|
@@ -830,7 +830,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
830
830
|
children.push(node);
|
|
831
831
|
});
|
|
832
832
|
children = (0, _nodes.mergeTextNodes)(children);
|
|
833
|
-
if (
|
|
833
|
+
if (this.shouldDisplayExtensionAsInline) {
|
|
834
834
|
(0, _markBlockAsInline.markBlockAsInline)({
|
|
835
835
|
nodes: children,
|
|
836
836
|
onMark: function onMark(_ref5) {
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.renderExtension = exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
13
|
var _react2 = require("@emotion/react");
|
|
13
14
|
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
14
15
|
var _OverflowShadow = _interopRequireDefault(require("@atlaskit/editor-common/OverflowShadow"));
|
|
15
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
17
|
var _consts = require("../../consts");
|
|
18
18
|
var _context = require("../../ui/annotations/context");
|
|
19
19
|
var _AnnotationHoverContext = require("../../ui/annotations/contexts/AnnotationHoverContext");
|
|
@@ -21,12 +21,15 @@ var _AnnotationRangeContext = require("../../ui/annotations/contexts/AnnotationR
|
|
|
21
21
|
var _ExtensionRenderer = _interopRequireDefault(require("../../ui/ExtensionRenderer"));
|
|
22
22
|
var _breakout = require("../utils/breakout");
|
|
23
23
|
var _extensionComments = require("./extension-comments");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
24
|
+
var _excluded = ["commentProps", "commentTargetOptions"];
|
|
25
|
+
/**
|
|
27
26
|
* @jsxRuntime classic
|
|
28
27
|
* @jsx jsx
|
|
29
|
-
*/
|
|
28
|
+
*/
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
|
+
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); }
|
|
31
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
33
|
var FORGE_EXTENSION_TYPE = 'com.atlassian.ecosystem';
|
|
31
34
|
/**
|
|
32
35
|
* Mirrors `FORGE_INLINE_BODIED_PARAM` in `@atlassian/xen-editor-provider`. Duplicated rather than
|
|
@@ -101,7 +104,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
101
104
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
102
105
|
|
|
103
106
|
// we should only use custom layout for full-page appearance
|
|
104
|
-
var canUseCustomLayout =
|
|
107
|
+
var canUseCustomLayout = rendererAppearance === 'full-page';
|
|
105
108
|
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
106
109
|
var centerAlignClass = isCustomLayout ? _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
107
110
|
/**
|
|
@@ -137,7 +140,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
137
140
|
* blocks until the sibling marking works at depth.
|
|
138
141
|
*/
|
|
139
142
|
var isNestedForgeInlineBodied = !isTopLevel && (isForgeInlineBodiedEnabled || isInlineBodiedLayoutEnabled);
|
|
140
|
-
var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) &&
|
|
143
|
+
var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && !isNestedForgeInlineBodied;
|
|
141
144
|
var inlineClassName = isInline ? _consts.RendererCssClassName.EXTENSION_AS_INLINE : '';
|
|
142
145
|
/**
|
|
143
146
|
* A native Forge macro does not have its body rendered by the product — the body ADF is
|
|
@@ -163,9 +166,9 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
163
166
|
,
|
|
164
167
|
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(inlineClassName, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
165
168
|
style: {
|
|
166
|
-
width: isInline
|
|
169
|
+
width: !isInline && isCustomLayout ?
|
|
167
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
168
|
-
(0, _breakout.calcBreakoutWidthCss)(layout) :
|
|
171
|
+
(0, _breakout.calcBreakoutWidthCss)(layout) : undefined,
|
|
169
172
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
170
173
|
minHeight: isInline ? undefined : extensionMinHeight
|
|
171
174
|
},
|
|
@@ -194,20 +197,8 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
194
197
|
className: _consts.RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + _consts.RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
195
198
|
}, extensionDiv) : extensionDiv;
|
|
196
199
|
};
|
|
197
|
-
var
|
|
198
|
-
var _providers$inlineComm, _props$dataAttributes;
|
|
199
|
-
var text = props.text,
|
|
200
|
-
_props$layout = props.layout,
|
|
201
|
-
layout = _props$layout === void 0 ? 'default' : _props$layout,
|
|
202
|
-
handleRef = props.handleRef,
|
|
203
|
-
shadowClassNames = props.shadowClassNames,
|
|
204
|
-
_props$path = props.path,
|
|
205
|
-
path = _props$path === void 0 ? [] : _props$path,
|
|
206
|
-
extensionViewportSizes = props.extensionViewportSizes,
|
|
207
|
-
parameters = props.parameters,
|
|
208
|
-
nodeHeight = props.nodeHeight,
|
|
209
|
-
localId = props.localId,
|
|
210
|
-
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
200
|
+
var ExtensionWithAnnotations = function ExtensionWithAnnotations(props) {
|
|
201
|
+
var _providers$inlineComm, _providers$inlineComm2, _props$dataAttributes;
|
|
211
202
|
var providers = (0, _react.useContext)(_context.ProvidersContext);
|
|
212
203
|
var _useAnnotationRangeDi = (0, _AnnotationRangeContext.useAnnotationRangeDispatch)(),
|
|
213
204
|
setHoverTarget = _useAnnotationRangeDi.setHoverTarget;
|
|
@@ -216,9 +207,13 @@ var Extension = function Extension(props) {
|
|
|
216
207
|
initiateTimeout = _useAnnotationHoverDi.initiateTimeout,
|
|
217
208
|
setIsWithinRange = _useAnnotationHoverDi.setIsWithinRange;
|
|
218
209
|
var isBlockNodeSupported = providers === null || providers === void 0 || (_providers$inlineComm = providers.inlineComment) === null || _providers$inlineComm === void 0 ? void 0 : _providers$inlineComm.isBlockNodeSupported;
|
|
219
|
-
var
|
|
220
|
-
return Boolean(
|
|
210
|
+
var supportsComments = (0, _react.useMemo)(function () {
|
|
211
|
+
return Boolean(props.extensionNode && (isBlockNodeSupported === null || isBlockNodeSupported === void 0 ? void 0 : isBlockNodeSupported(props.extensionNode)) === true);
|
|
221
212
|
}, [props.extensionNode, isBlockNodeSupported]);
|
|
213
|
+
var canCreateCommentOnBlockNode = providers === null || providers === void 0 || (_providers$inlineComm2 = providers.inlineComment) === null || _providers$inlineComm2 === void 0 ? void 0 : _providers$inlineComm2.canCreateCommentOnBlockNode;
|
|
214
|
+
var isCommentTarget = (0, _react.useMemo)(function () {
|
|
215
|
+
return Boolean(supportsComments && props.extensionNode && (!canCreateCommentOnBlockNode || canCreateCommentOnBlockNode(props.extensionNode)));
|
|
216
|
+
}, [supportsComments, props.extensionNode, canCreateCommentOnBlockNode]);
|
|
222
217
|
var isFullPageRenderer = props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width';
|
|
223
218
|
var onMouseEnter = (0, _react.useCallback)(function (event) {
|
|
224
219
|
cancelTimeout();
|
|
@@ -253,21 +248,45 @@ var Extension = function Extension(props) {
|
|
|
253
248
|
isCommentTarget: isCommentTarget
|
|
254
249
|
};
|
|
255
250
|
var commentProps = {
|
|
256
|
-
enabled:
|
|
257
|
-
allowAnnotations: props.allowAnnotations
|
|
258
|
-
allowAnnotationsDraftMode: props.allowAnnotationsDraftMode,
|
|
251
|
+
enabled: supportsComments,
|
|
252
|
+
allowAnnotations: props.allowAnnotations,
|
|
253
|
+
allowAnnotationsDraftMode: props.allowAnnotationsDraftMode && isCommentTarget,
|
|
259
254
|
startPos: (_props$dataAttributes = props.dataAttributes) === null || _props$dataAttributes === void 0 ? void 0 : _props$dataAttributes['data-renderer-start-pos'],
|
|
260
255
|
marks: props.marks
|
|
261
256
|
};
|
|
257
|
+
return (0, _react2.jsx)(ExtensionContent
|
|
258
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
259
|
+
, (0, _extends2.default)({}, props, {
|
|
260
|
+
commentProps: commentProps,
|
|
261
|
+
commentTargetOptions: commentTargetOptions
|
|
262
|
+
}));
|
|
263
|
+
};
|
|
264
|
+
var ExtensionContent = function ExtensionContent(_ref3) {
|
|
265
|
+
var _ref3$commentProps = _ref3.commentProps,
|
|
266
|
+
commentProps = _ref3$commentProps === void 0 ? {} : _ref3$commentProps,
|
|
267
|
+
commentTargetOptions = _ref3.commentTargetOptions,
|
|
268
|
+
props = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
|
|
269
|
+
var text = props.text,
|
|
270
|
+
_props$layout = props.layout,
|
|
271
|
+
layout = _props$layout === void 0 ? 'default' : _props$layout,
|
|
272
|
+
handleRef = props.handleRef,
|
|
273
|
+
shadowClassNames = props.shadowClassNames,
|
|
274
|
+
_props$path = props.path,
|
|
275
|
+
path = _props$path === void 0 ? [] : _props$path,
|
|
276
|
+
extensionViewportSizes = props.extensionViewportSizes,
|
|
277
|
+
parameters = props.parameters,
|
|
278
|
+
nodeHeight = props.nodeHeight,
|
|
279
|
+
localId = props.localId,
|
|
280
|
+
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
262
281
|
return (0, _react2.jsx)(_ExtensionRenderer.default
|
|
263
282
|
// Ignored via go/ees005
|
|
264
283
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
265
284
|
, (0, _extends2.default)({}, props, {
|
|
266
285
|
type: "extension"
|
|
267
|
-
}), function (
|
|
286
|
+
}), function (_ref4) {
|
|
268
287
|
var _props$hideExtensionK;
|
|
269
|
-
var isExtensionProviderPending =
|
|
270
|
-
result =
|
|
288
|
+
var isExtensionProviderPending = _ref4.isExtensionProviderPending,
|
|
289
|
+
result = _ref4.result;
|
|
271
290
|
try {
|
|
272
291
|
// Return the result directly if it's a valid JSX.Element
|
|
273
292
|
if (result && /*#__PURE__*/_react.default.isValidElement(result)) {
|
|
@@ -312,6 +331,15 @@ var Extension = function Extension(props) {
|
|
|
312
331
|
}, commentTargetOptions), undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
313
332
|
});
|
|
314
333
|
};
|
|
334
|
+
var Extension = function Extension(props) {
|
|
335
|
+
// Keep annotation context subscriptions out of the gate-off render path.
|
|
336
|
+
if ((0, _fg.fg)('cc_maui_annotations_on_extensions')) {
|
|
337
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
338
|
+
return (0, _react2.jsx)(ExtensionWithAnnotations, props);
|
|
339
|
+
}
|
|
340
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
341
|
+
return (0, _react2.jsx)(ExtensionContent, props);
|
|
342
|
+
};
|
|
315
343
|
var _default_1 = (0, _OverflowShadow.default)(Extension, {
|
|
316
344
|
overflowSelector: ".".concat(_consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER)
|
|
317
345
|
});
|
|
@@ -10,7 +10,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
13
|
var _analyticsContext = _interopRequireDefault(require("../../analytics/analyticsContext"));
|
|
15
14
|
var _consts = require("../../consts");
|
|
16
15
|
var _breakout = require("../utils/breakout");
|
|
@@ -63,7 +62,7 @@ var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_
|
|
|
63
62
|
children = _ref3.children;
|
|
64
63
|
var isTopLevel = path.length < 1;
|
|
65
64
|
// we should only use custom layout for full-page appearance
|
|
66
|
-
var canUseCustomLayout =
|
|
65
|
+
var canUseCustomLayout = rendererAppearance === 'full-page';
|
|
67
66
|
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
68
67
|
var centerAlignClass = isCustomLayout ? _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
69
68
|
|
|
@@ -72,9 +71,9 @@ var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_
|
|
|
72
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
73
72
|
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
74
73
|
style: {
|
|
75
|
-
width:
|
|
74
|
+
width: isCustomLayout ?
|
|
76
75
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
77
|
-
(0, _breakout.calcBreakoutWidthCss)(layout) :
|
|
76
|
+
(0, _breakout.calcBreakoutWidthCss)(layout) : undefined
|
|
78
77
|
},
|
|
79
78
|
"data-layout": layout,
|
|
80
79
|
"data-testid": "multiBodiedExtension--wrapper-renderer",
|
|
@@ -327,15 +327,6 @@ var rendererFullPageStylesWithReducedPadding = (0, _react.css)((0, _defineProper
|
|
|
327
327
|
}, "@media (max-width: ".concat(_constants.akEditorFullPageNarrowBreakout, "px)"), {
|
|
328
328
|
'--ak-renderer--full-page-gutter': "".concat(_constants.akEditorGutterPaddingReduced, "px")
|
|
329
329
|
}));
|
|
330
|
-
var oldRendererFullWidthStyles = (0, _react.css)({
|
|
331
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
332
|
-
maxWidth: "".concat(_constants.akEditorFullWidthLayoutWidth, "px"),
|
|
333
|
-
margin: "0 auto",
|
|
334
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
335
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
336
|
-
width: '100% !important'
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
330
|
var rendererFullWidthStyles = (0, _react.css)({
|
|
340
331
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
341
332
|
maxWidth: "".concat(_constants.akEditorFullWidthLayoutWidth, "px"),
|
|
@@ -345,15 +336,6 @@ var rendererFullWidthStyles = (0, _react.css)({
|
|
|
345
336
|
width: '100% !important'
|
|
346
337
|
}
|
|
347
338
|
});
|
|
348
|
-
var oldRendererMaxWidthStyles = (0, _react.css)({
|
|
349
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
350
|
-
maxWidth: "".concat(_constants.akEditorMaxWidthLayoutWidth, "px"),
|
|
351
|
-
margin: "0 auto",
|
|
352
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
353
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
354
|
-
width: '100% !important'
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
339
|
var rendererMaxWidthStyles = (0, _react.css)({
|
|
358
340
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
359
341
|
maxWidth: "".concat(_constants.akEditorMaxWidthLayoutWidth, "px"),
|
|
@@ -857,21 +839,6 @@ var extensionStyle = (0, _react.css)({
|
|
|
857
839
|
fontSize: 'var(--ak-renderer-base-font-size)'
|
|
858
840
|
}
|
|
859
841
|
});
|
|
860
|
-
var oldExtensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts2.RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
861
|
-
display: 'inline-block'
|
|
862
|
-
}), ".".concat(_consts2.RendererCssClassName.DOCUMENT, " .").concat(_consts2.RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
863
|
-
display: 'inline-block',
|
|
864
|
-
// use !important here because the current width has !important applied to it and it's not working when used in React style prop
|
|
865
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
866
|
-
width: 'auto !important',
|
|
867
|
-
marginTop: 0
|
|
868
|
-
}), ".".concat(_consts2.RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(_consts2.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER), {
|
|
869
|
-
display: 'inline-block',
|
|
870
|
-
overflowX: 'visible',
|
|
871
|
-
containerType: 'normal'
|
|
872
|
-
}), ".".concat(_consts2.RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(_consts2.RendererCssClassName.EXTENSION_INNER_WRAPPER), {
|
|
873
|
-
display: 'inline-block'
|
|
874
|
-
}));
|
|
875
842
|
var extensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts2.RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
876
843
|
display: 'inline-block'
|
|
877
844
|
}), ".".concat(_consts2.RendererCssClassName.DOCUMENT, " .").concat(_consts2.RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
@@ -2334,13 +2301,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2334
2301
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2335
2302
|
'--ak-renderer-editor-font-small-text': _editorUgcTokenNames.editorUGCTokensRefreshed['editor.font.body.small']
|
|
2336
2303
|
},
|
|
2337
|
-
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' &&
|
|
2304
|
+
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' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max') && !(0, _table2.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && rendererMaxWidthStyles, 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,
|
|
2338
2305
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2339
2306
|
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),
|
|
2340
2307
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2341
2308
|
(0, _fg.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2342
2309
|
// this should be placed after baseOtherStyles
|
|
2343
|
-
|
|
2310
|
+
extensionAsInlineStyle, (0, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, (0, _fg.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
2344
2311
|
"data-testid": testId
|
|
2345
2312
|
}, children);
|
|
2346
2313
|
};
|
|
@@ -79,7 +79,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
79
79
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
80
80
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
81
81
|
var packageName = "@atlaskit/renderer";
|
|
82
|
-
var packageVersion = "149.0.
|
|
82
|
+
var packageVersion = "149.0.7";
|
|
83
83
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
84
84
|
containerName: 'ak-renderer-wrapper',
|
|
85
85
|
containerType: 'inline-size'
|
|
@@ -61,10 +61,10 @@ export default class ReactSerializer {
|
|
|
61
61
|
}) => {
|
|
62
62
|
const pos = this.startPos;
|
|
63
63
|
const currentPath = parentInfo && parentInfo.path || [];
|
|
64
|
-
const parentIsIncompleteTask = (node.type.name === 'taskItem' || node.type.name === 'blockTaskItem'
|
|
64
|
+
const parentIsIncompleteTask = (node.type.name === 'taskItem' || node.type.name === 'blockTaskItem') && node.attrs.state !== 'DONE' ||
|
|
65
65
|
// If blockTaskItem is in the schema, check if the parent of the current node
|
|
66
66
|
// is an incomplete task item, because blockTaskItems can have nested nodes
|
|
67
|
-
node.type.schema.nodes.blockTaskItem && (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.parentIsIncompleteTask) === true
|
|
67
|
+
node.type.schema.nodes.blockTaskItem && (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.parentIsIncompleteTask) === true;
|
|
68
68
|
const nodeKey = `${node.type.name}__${this.startPos}`;
|
|
69
69
|
const serializedContent = this.serializeFragment(node.content, this.getNodeProps(node, parentInfo), toReact(node, {
|
|
70
70
|
allowSelectAllTrap: this.allowSelectAllTrap,
|
|
@@ -736,7 +736,7 @@ export default class ReactSerializer {
|
|
|
736
736
|
children.push(node);
|
|
737
737
|
});
|
|
738
738
|
children = mergeTextNodes(children);
|
|
739
|
-
if (
|
|
739
|
+
if (this.shouldDisplayExtensionAsInline) {
|
|
740
740
|
markBlockAsInline({
|
|
741
741
|
nodes: children,
|
|
742
742
|
onMark: ({
|
|
@@ -11,7 +11,6 @@ import { jsx, css } from '@emotion/react';
|
|
|
11
11
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
12
12
|
import overflowShadow from '@atlaskit/editor-common/OverflowShadow';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import { RendererCssClassName } from '../../consts';
|
|
16
15
|
import { ProvidersContext } from '../../ui/annotations/context';
|
|
17
16
|
import { useAnnotationHoverDispatch } from '../../ui/annotations/contexts/AnnotationHoverContext';
|
|
@@ -83,7 +82,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
83
82
|
} = options || {};
|
|
84
83
|
|
|
85
84
|
// we should only use custom layout for full-page appearance
|
|
86
|
-
const canUseCustomLayout =
|
|
85
|
+
const canUseCustomLayout = rendererAppearance === 'full-page';
|
|
87
86
|
const isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
88
87
|
const centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
89
88
|
/**
|
|
@@ -119,7 +118,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
119
118
|
* blocks until the sibling marking works at depth.
|
|
120
119
|
*/
|
|
121
120
|
const isNestedForgeInlineBodied = !isTopLevel && (isForgeInlineBodiedEnabled || isInlineBodiedLayoutEnabled);
|
|
122
|
-
const isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) &&
|
|
121
|
+
const isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && !isNestedForgeInlineBodied;
|
|
123
122
|
const inlineClassName = isInline ? RendererCssClassName.EXTENSION_AS_INLINE : '';
|
|
124
123
|
/**
|
|
125
124
|
* A native Forge macro does not have its body rendered by the product — the body ADF is
|
|
@@ -145,9 +144,9 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
145
144
|
,
|
|
146
145
|
className: `${RendererCssClassName.EXTENSION} ${inlineClassName} ${options.shadowClassNames} ${centerAlignClass}`,
|
|
147
146
|
style: {
|
|
148
|
-
width: isInline
|
|
147
|
+
width: !isInline && isCustomLayout ?
|
|
149
148
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
150
|
-
calcBreakoutWidthCss(layout) :
|
|
149
|
+
calcBreakoutWidthCss(layout) : undefined,
|
|
151
150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
152
151
|
minHeight: isInline ? undefined : extensionMinHeight
|
|
153
152
|
},
|
|
@@ -176,20 +175,8 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
176
175
|
className: RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
177
176
|
}, extensionDiv) : extensionDiv;
|
|
178
177
|
};
|
|
179
|
-
const
|
|
180
|
-
var _providers$inlineComm, _props$dataAttributes;
|
|
181
|
-
const {
|
|
182
|
-
text,
|
|
183
|
-
layout = 'default',
|
|
184
|
-
handleRef,
|
|
185
|
-
shadowClassNames,
|
|
186
|
-
path = [],
|
|
187
|
-
extensionViewportSizes,
|
|
188
|
-
parameters,
|
|
189
|
-
nodeHeight,
|
|
190
|
-
localId,
|
|
191
|
-
isInsideOfInlineExtension
|
|
192
|
-
} = props;
|
|
178
|
+
const ExtensionWithAnnotations = props => {
|
|
179
|
+
var _providers$inlineComm, _providers$inlineComm2, _props$dataAttributes;
|
|
193
180
|
const providers = useContext(ProvidersContext);
|
|
194
181
|
const {
|
|
195
182
|
setHoverTarget
|
|
@@ -200,7 +187,9 @@ const Extension = props => {
|
|
|
200
187
|
setIsWithinRange
|
|
201
188
|
} = useAnnotationHoverDispatch();
|
|
202
189
|
const isBlockNodeSupported = providers === null || providers === void 0 ? void 0 : (_providers$inlineComm = providers.inlineComment) === null || _providers$inlineComm === void 0 ? void 0 : _providers$inlineComm.isBlockNodeSupported;
|
|
203
|
-
const
|
|
190
|
+
const supportsComments = useMemo(() => Boolean(props.extensionNode && (isBlockNodeSupported === null || isBlockNodeSupported === void 0 ? void 0 : isBlockNodeSupported(props.extensionNode)) === true), [props.extensionNode, isBlockNodeSupported]);
|
|
191
|
+
const canCreateCommentOnBlockNode = providers === null || providers === void 0 ? void 0 : (_providers$inlineComm2 = providers.inlineComment) === null || _providers$inlineComm2 === void 0 ? void 0 : _providers$inlineComm2.canCreateCommentOnBlockNode;
|
|
192
|
+
const isCommentTarget = useMemo(() => Boolean(supportsComments && props.extensionNode && (!canCreateCommentOnBlockNode || canCreateCommentOnBlockNode(props.extensionNode))), [supportsComments, props.extensionNode, canCreateCommentOnBlockNode]);
|
|
204
193
|
const isFullPageRenderer = props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width';
|
|
205
194
|
const onMouseEnter = useCallback(event => {
|
|
206
195
|
cancelTimeout();
|
|
@@ -233,12 +222,36 @@ const Extension = props => {
|
|
|
233
222
|
isCommentTarget
|
|
234
223
|
};
|
|
235
224
|
const commentProps = {
|
|
236
|
-
enabled:
|
|
237
|
-
allowAnnotations: props.allowAnnotations
|
|
238
|
-
allowAnnotationsDraftMode: props.allowAnnotationsDraftMode,
|
|
225
|
+
enabled: supportsComments,
|
|
226
|
+
allowAnnotations: props.allowAnnotations,
|
|
227
|
+
allowAnnotationsDraftMode: props.allowAnnotationsDraftMode && isCommentTarget,
|
|
239
228
|
startPos: (_props$dataAttributes = props.dataAttributes) === null || _props$dataAttributes === void 0 ? void 0 : _props$dataAttributes['data-renderer-start-pos'],
|
|
240
229
|
marks: props.marks
|
|
241
230
|
};
|
|
231
|
+
return jsx(ExtensionContent
|
|
232
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
233
|
+
, _extends({}, props, {
|
|
234
|
+
commentProps: commentProps,
|
|
235
|
+
commentTargetOptions: commentTargetOptions
|
|
236
|
+
}));
|
|
237
|
+
};
|
|
238
|
+
const ExtensionContent = ({
|
|
239
|
+
commentProps = {},
|
|
240
|
+
commentTargetOptions,
|
|
241
|
+
...props
|
|
242
|
+
}) => {
|
|
243
|
+
const {
|
|
244
|
+
text,
|
|
245
|
+
layout = 'default',
|
|
246
|
+
handleRef,
|
|
247
|
+
shadowClassNames,
|
|
248
|
+
path = [],
|
|
249
|
+
extensionViewportSizes,
|
|
250
|
+
parameters,
|
|
251
|
+
nodeHeight,
|
|
252
|
+
localId,
|
|
253
|
+
isInsideOfInlineExtension
|
|
254
|
+
} = props;
|
|
242
255
|
return jsx(ExtensionRenderer
|
|
243
256
|
// Ignored via go/ees005
|
|
244
257
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -295,6 +308,15 @@ const Extension = props => {
|
|
|
295
308
|
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
296
309
|
});
|
|
297
310
|
};
|
|
311
|
+
const Extension = props => {
|
|
312
|
+
// Keep annotation context subscriptions out of the gate-off render path.
|
|
313
|
+
if (fg('cc_maui_annotations_on_extensions')) {
|
|
314
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
315
|
+
return jsx(ExtensionWithAnnotations, props);
|
|
316
|
+
}
|
|
317
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
318
|
+
return jsx(ExtensionContent, props);
|
|
319
|
+
};
|
|
298
320
|
const _default_1 = overflowShadow(Extension, {
|
|
299
321
|
overflowSelector: `.${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER}`
|
|
300
322
|
});
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import React, { useContext, useState } from 'react';
|
|
10
10
|
import { jsx, css } from '@emotion/react';
|
|
11
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
11
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
13
12
|
import { RendererCssClassName } from '../../consts';
|
|
14
13
|
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
@@ -60,7 +59,7 @@ const MultiBodiedExtensionWrapperNext = ({
|
|
|
60
59
|
}) => {
|
|
61
60
|
const isTopLevel = path.length < 1;
|
|
62
61
|
// we should only use custom layout for full-page appearance
|
|
63
|
-
const canUseCustomLayout =
|
|
62
|
+
const canUseCustomLayout = rendererAppearance === 'full-page';
|
|
64
63
|
const isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
65
64
|
const centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
66
65
|
|
|
@@ -69,9 +68,9 @@ const MultiBodiedExtensionWrapperNext = ({
|
|
|
69
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
70
69
|
className: `${RendererCssClassName.EXTENSION} ${centerAlignClass}`,
|
|
71
70
|
style: {
|
|
72
|
-
width:
|
|
71
|
+
width: isCustomLayout ?
|
|
73
72
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
74
|
-
calcBreakoutWidthCss(layout) :
|
|
73
|
+
calcBreakoutWidthCss(layout) : undefined
|
|
75
74
|
},
|
|
76
75
|
"data-layout": layout,
|
|
77
76
|
"data-testid": "multiBodiedExtension--wrapper-renderer",
|
|
@@ -425,15 +425,6 @@ const rendererFullPageStylesWithReducedPadding = css({
|
|
|
425
425
|
'--ak-renderer--full-page-gutter': `${akEditorGutterPaddingReduced}px`
|
|
426
426
|
}
|
|
427
427
|
});
|
|
428
|
-
const oldRendererFullWidthStyles = css({
|
|
429
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
430
|
-
maxWidth: `${akEditorFullWidthLayoutWidth}px`,
|
|
431
|
-
margin: `0 auto`,
|
|
432
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
433
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
434
|
-
width: '100% !important'
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
428
|
const rendererFullWidthStyles = css({
|
|
438
429
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
439
430
|
maxWidth: `${akEditorFullWidthLayoutWidth}px`,
|
|
@@ -443,15 +434,6 @@ const rendererFullWidthStyles = css({
|
|
|
443
434
|
width: '100% !important'
|
|
444
435
|
}
|
|
445
436
|
});
|
|
446
|
-
const oldRendererMaxWidthStyles = css({
|
|
447
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
448
|
-
maxWidth: `${akEditorMaxWidthLayoutWidth}px`,
|
|
449
|
-
margin: `0 auto`,
|
|
450
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
451
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
452
|
-
width: '100% !important'
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
437
|
const rendererMaxWidthStyles = css({
|
|
456
438
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
457
439
|
maxWidth: `${akEditorMaxWidthLayoutWidth}px`,
|
|
@@ -1010,26 +992,6 @@ const extensionStyle = css({
|
|
|
1010
992
|
fontSize: 'var(--ak-renderer-base-font-size)'
|
|
1011
993
|
}
|
|
1012
994
|
});
|
|
1013
|
-
const oldExtensionAsInlineStyle = css({
|
|
1014
|
-
[`.${RendererCssClassName.DOCUMENT} [data-as-inline="on"]`]: {
|
|
1015
|
-
display: 'inline-block'
|
|
1016
|
-
},
|
|
1017
|
-
[`.${RendererCssClassName.DOCUMENT} .${RendererCssClassName.EXTENSION_AS_INLINE}`]: {
|
|
1018
|
-
display: 'inline-block',
|
|
1019
|
-
// use !important here because the current width has !important applied to it and it's not working when used in React style prop
|
|
1020
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
1021
|
-
width: 'auto !important',
|
|
1022
|
-
marginTop: 0
|
|
1023
|
-
},
|
|
1024
|
-
[`.${RendererCssClassName.EXTENSION_AS_INLINE} .${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER}`]: {
|
|
1025
|
-
display: 'inline-block',
|
|
1026
|
-
overflowX: 'visible',
|
|
1027
|
-
containerType: 'normal'
|
|
1028
|
-
},
|
|
1029
|
-
[`.${RendererCssClassName.EXTENSION_AS_INLINE} .${RendererCssClassName.EXTENSION_INNER_WRAPPER}`]: {
|
|
1030
|
-
display: 'inline-block'
|
|
1031
|
-
}
|
|
1032
|
-
});
|
|
1033
995
|
const extensionAsInlineStyle = css({
|
|
1034
996
|
[`.${RendererCssClassName.DOCUMENT} [data-as-inline="on"]`]: {
|
|
1035
997
|
display: 'inline-block'
|
|
@@ -2970,13 +2932,13 @@ export const RendererStyleContainer = props => {
|
|
|
2970
2932
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2971
2933
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2972
2934
|
},
|
|
2973
|
-
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' &&
|
|
2935
|
+
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' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && rendererMaxWidthStyles, 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,
|
|
2974
2936
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2975
2937
|
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),
|
|
2976
2938
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2977
2939
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2978
2940
|
// this should be placed after baseOtherStyles
|
|
2979
|
-
|
|
2941
|
+
extensionAsInlineStyle, fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
2980
2942
|
"data-testid": testId
|
|
2981
2943
|
}, children);
|
|
2982
2944
|
};
|
|
@@ -64,7 +64,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
64
64
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
65
65
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
66
66
|
const packageName = "@atlaskit/renderer";
|
|
67
|
-
const packageVersion = "149.0.
|
|
67
|
+
const packageVersion = "149.0.7";
|
|
68
68
|
const setAsQueryContainerStyles = css({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size'
|
package/dist/esm/react/index.js
CHANGED
|
@@ -69,10 +69,10 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
69
69
|
parentInfo = _ref.parentInfo;
|
|
70
70
|
var pos = _this.startPos;
|
|
71
71
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
72
|
-
var parentIsIncompleteTask = (node.type.name === 'taskItem' || node.type.name === 'blockTaskItem'
|
|
72
|
+
var parentIsIncompleteTask = (node.type.name === 'taskItem' || node.type.name === 'blockTaskItem') && node.attrs.state !== 'DONE' ||
|
|
73
73
|
// If blockTaskItem is in the schema, check if the parent of the current node
|
|
74
74
|
// is an incomplete task item, because blockTaskItems can have nested nodes
|
|
75
|
-
node.type.schema.nodes.blockTaskItem && (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.parentIsIncompleteTask) === true
|
|
75
|
+
node.type.schema.nodes.blockTaskItem && (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.parentIsIncompleteTask) === true;
|
|
76
76
|
var nodeKey = "".concat(node.type.name, "__").concat(_this.startPos);
|
|
77
77
|
var serializedContent = _this.serializeFragment(node.content, _this.getNodeProps(node, parentInfo), toReact(node, {
|
|
78
78
|
allowSelectAllTrap: _this.allowSelectAllTrap,
|
|
@@ -823,7 +823,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
823
823
|
children.push(node);
|
|
824
824
|
});
|
|
825
825
|
children = mergeTextNodes(children);
|
|
826
|
-
if (
|
|
826
|
+
if (this.shouldDisplayExtensionAsInline) {
|
|
827
827
|
markBlockAsInline({
|
|
828
828
|
nodes: children,
|
|
829
829
|
onMark: function onMark(_ref5) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
var _excluded = ["commentProps", "commentTargetOptions"];
|
|
3
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
7
|
/**
|
|
@@ -14,7 +16,6 @@ import { jsx, css } from '@emotion/react';
|
|
|
14
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
15
17
|
import overflowShadow from '@atlaskit/editor-common/OverflowShadow';
|
|
16
18
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
19
|
import { RendererCssClassName } from '../../consts';
|
|
19
20
|
import { ProvidersContext } from '../../ui/annotations/context';
|
|
20
21
|
import { useAnnotationHoverDispatch } from '../../ui/annotations/contexts/AnnotationHoverContext';
|
|
@@ -96,7 +97,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
96
97
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
97
98
|
|
|
98
99
|
// we should only use custom layout for full-page appearance
|
|
99
|
-
var canUseCustomLayout =
|
|
100
|
+
var canUseCustomLayout = rendererAppearance === 'full-page';
|
|
100
101
|
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
101
102
|
var centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
102
103
|
/**
|
|
@@ -132,7 +133,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
132
133
|
* blocks until the sibling marking works at depth.
|
|
133
134
|
*/
|
|
134
135
|
var isNestedForgeInlineBodied = !isTopLevel && (isForgeInlineBodiedEnabled || isInlineBodiedLayoutEnabled);
|
|
135
|
-
var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) &&
|
|
136
|
+
var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && !isNestedForgeInlineBodied;
|
|
136
137
|
var inlineClassName = isInline ? RendererCssClassName.EXTENSION_AS_INLINE : '';
|
|
137
138
|
/**
|
|
138
139
|
* A native Forge macro does not have its body rendered by the product — the body ADF is
|
|
@@ -158,9 +159,9 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
158
159
|
,
|
|
159
160
|
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(inlineClassName, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
160
161
|
style: {
|
|
161
|
-
width: isInline
|
|
162
|
+
width: !isInline && isCustomLayout ?
|
|
162
163
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
163
|
-
calcBreakoutWidthCss(layout) :
|
|
164
|
+
calcBreakoutWidthCss(layout) : undefined,
|
|
164
165
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
165
166
|
minHeight: isInline ? undefined : extensionMinHeight
|
|
166
167
|
},
|
|
@@ -189,20 +190,8 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
189
190
|
className: RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
190
191
|
}, extensionDiv) : extensionDiv;
|
|
191
192
|
};
|
|
192
|
-
var
|
|
193
|
-
var _providers$inlineComm, _props$dataAttributes;
|
|
194
|
-
var text = props.text,
|
|
195
|
-
_props$layout = props.layout,
|
|
196
|
-
layout = _props$layout === void 0 ? 'default' : _props$layout,
|
|
197
|
-
handleRef = props.handleRef,
|
|
198
|
-
shadowClassNames = props.shadowClassNames,
|
|
199
|
-
_props$path = props.path,
|
|
200
|
-
path = _props$path === void 0 ? [] : _props$path,
|
|
201
|
-
extensionViewportSizes = props.extensionViewportSizes,
|
|
202
|
-
parameters = props.parameters,
|
|
203
|
-
nodeHeight = props.nodeHeight,
|
|
204
|
-
localId = props.localId,
|
|
205
|
-
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
193
|
+
var ExtensionWithAnnotations = function ExtensionWithAnnotations(props) {
|
|
194
|
+
var _providers$inlineComm, _providers$inlineComm2, _props$dataAttributes;
|
|
206
195
|
var providers = useContext(ProvidersContext);
|
|
207
196
|
var _useAnnotationRangeDi = useAnnotationRangeDispatch(),
|
|
208
197
|
setHoverTarget = _useAnnotationRangeDi.setHoverTarget;
|
|
@@ -211,9 +200,13 @@ var Extension = function Extension(props) {
|
|
|
211
200
|
initiateTimeout = _useAnnotationHoverDi.initiateTimeout,
|
|
212
201
|
setIsWithinRange = _useAnnotationHoverDi.setIsWithinRange;
|
|
213
202
|
var isBlockNodeSupported = providers === null || providers === void 0 || (_providers$inlineComm = providers.inlineComment) === null || _providers$inlineComm === void 0 ? void 0 : _providers$inlineComm.isBlockNodeSupported;
|
|
214
|
-
var
|
|
215
|
-
return Boolean(
|
|
203
|
+
var supportsComments = useMemo(function () {
|
|
204
|
+
return Boolean(props.extensionNode && (isBlockNodeSupported === null || isBlockNodeSupported === void 0 ? void 0 : isBlockNodeSupported(props.extensionNode)) === true);
|
|
216
205
|
}, [props.extensionNode, isBlockNodeSupported]);
|
|
206
|
+
var canCreateCommentOnBlockNode = providers === null || providers === void 0 || (_providers$inlineComm2 = providers.inlineComment) === null || _providers$inlineComm2 === void 0 ? void 0 : _providers$inlineComm2.canCreateCommentOnBlockNode;
|
|
207
|
+
var isCommentTarget = useMemo(function () {
|
|
208
|
+
return Boolean(supportsComments && props.extensionNode && (!canCreateCommentOnBlockNode || canCreateCommentOnBlockNode(props.extensionNode)));
|
|
209
|
+
}, [supportsComments, props.extensionNode, canCreateCommentOnBlockNode]);
|
|
217
210
|
var isFullPageRenderer = props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width';
|
|
218
211
|
var onMouseEnter = useCallback(function (event) {
|
|
219
212
|
cancelTimeout();
|
|
@@ -248,21 +241,45 @@ var Extension = function Extension(props) {
|
|
|
248
241
|
isCommentTarget: isCommentTarget
|
|
249
242
|
};
|
|
250
243
|
var commentProps = {
|
|
251
|
-
enabled:
|
|
252
|
-
allowAnnotations: props.allowAnnotations
|
|
253
|
-
allowAnnotationsDraftMode: props.allowAnnotationsDraftMode,
|
|
244
|
+
enabled: supportsComments,
|
|
245
|
+
allowAnnotations: props.allowAnnotations,
|
|
246
|
+
allowAnnotationsDraftMode: props.allowAnnotationsDraftMode && isCommentTarget,
|
|
254
247
|
startPos: (_props$dataAttributes = props.dataAttributes) === null || _props$dataAttributes === void 0 ? void 0 : _props$dataAttributes['data-renderer-start-pos'],
|
|
255
248
|
marks: props.marks
|
|
256
249
|
};
|
|
250
|
+
return jsx(ExtensionContent
|
|
251
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
252
|
+
, _extends({}, props, {
|
|
253
|
+
commentProps: commentProps,
|
|
254
|
+
commentTargetOptions: commentTargetOptions
|
|
255
|
+
}));
|
|
256
|
+
};
|
|
257
|
+
var ExtensionContent = function ExtensionContent(_ref3) {
|
|
258
|
+
var _ref3$commentProps = _ref3.commentProps,
|
|
259
|
+
commentProps = _ref3$commentProps === void 0 ? {} : _ref3$commentProps,
|
|
260
|
+
commentTargetOptions = _ref3.commentTargetOptions,
|
|
261
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
262
|
+
var text = props.text,
|
|
263
|
+
_props$layout = props.layout,
|
|
264
|
+
layout = _props$layout === void 0 ? 'default' : _props$layout,
|
|
265
|
+
handleRef = props.handleRef,
|
|
266
|
+
shadowClassNames = props.shadowClassNames,
|
|
267
|
+
_props$path = props.path,
|
|
268
|
+
path = _props$path === void 0 ? [] : _props$path,
|
|
269
|
+
extensionViewportSizes = props.extensionViewportSizes,
|
|
270
|
+
parameters = props.parameters,
|
|
271
|
+
nodeHeight = props.nodeHeight,
|
|
272
|
+
localId = props.localId,
|
|
273
|
+
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
257
274
|
return jsx(ExtensionRenderer
|
|
258
275
|
// Ignored via go/ees005
|
|
259
276
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
260
277
|
, _extends({}, props, {
|
|
261
278
|
type: "extension"
|
|
262
|
-
}), function (
|
|
279
|
+
}), function (_ref4) {
|
|
263
280
|
var _props$hideExtensionK;
|
|
264
|
-
var isExtensionProviderPending =
|
|
265
|
-
result =
|
|
281
|
+
var isExtensionProviderPending = _ref4.isExtensionProviderPending,
|
|
282
|
+
result = _ref4.result;
|
|
266
283
|
try {
|
|
267
284
|
// Return the result directly if it's a valid JSX.Element
|
|
268
285
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
@@ -307,6 +324,15 @@ var Extension = function Extension(props) {
|
|
|
307
324
|
}, commentTargetOptions), undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
308
325
|
});
|
|
309
326
|
};
|
|
327
|
+
var Extension = function Extension(props) {
|
|
328
|
+
// Keep annotation context subscriptions out of the gate-off render path.
|
|
329
|
+
if (fg('cc_maui_annotations_on_extensions')) {
|
|
330
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
331
|
+
return jsx(ExtensionWithAnnotations, props);
|
|
332
|
+
}
|
|
333
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
334
|
+
return jsx(ExtensionContent, props);
|
|
335
|
+
};
|
|
310
336
|
var _default_1 = overflowShadow(Extension, {
|
|
311
337
|
overflowSelector: ".".concat(RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER)
|
|
312
338
|
});
|
|
@@ -11,7 +11,6 @@ var _templateObject;
|
|
|
11
11
|
|
|
12
12
|
import React, { useContext, useState } from 'react';
|
|
13
13
|
import { jsx, css } from '@emotion/react';
|
|
14
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
16
15
|
import { RendererCssClassName } from '../../consts';
|
|
17
16
|
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
@@ -56,7 +55,7 @@ var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_
|
|
|
56
55
|
children = _ref3.children;
|
|
57
56
|
var isTopLevel = path.length < 1;
|
|
58
57
|
// we should only use custom layout for full-page appearance
|
|
59
|
-
var canUseCustomLayout =
|
|
58
|
+
var canUseCustomLayout = rendererAppearance === 'full-page';
|
|
60
59
|
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
61
60
|
var centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
62
61
|
|
|
@@ -65,9 +64,9 @@ var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_
|
|
|
65
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
66
65
|
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
67
66
|
style: {
|
|
68
|
-
width:
|
|
67
|
+
width: isCustomLayout ?
|
|
69
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
70
|
-
calcBreakoutWidthCss(layout) :
|
|
69
|
+
calcBreakoutWidthCss(layout) : undefined
|
|
71
70
|
},
|
|
72
71
|
"data-layout": layout,
|
|
73
72
|
"data-testid": "multiBodiedExtension--wrapper-renderer",
|
|
@@ -320,15 +320,6 @@ var rendererFullPageStylesWithReducedPadding = css(_defineProperty({
|
|
|
320
320
|
}, "@media (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
|
|
321
321
|
'--ak-renderer--full-page-gutter': "".concat(akEditorGutterPaddingReduced, "px")
|
|
322
322
|
}));
|
|
323
|
-
var oldRendererFullWidthStyles = css({
|
|
324
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
325
|
-
maxWidth: "".concat(akEditorFullWidthLayoutWidth, "px"),
|
|
326
|
-
margin: "0 auto",
|
|
327
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
328
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
329
|
-
width: '100% !important'
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
323
|
var rendererFullWidthStyles = css({
|
|
333
324
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
334
325
|
maxWidth: "".concat(akEditorFullWidthLayoutWidth, "px"),
|
|
@@ -338,15 +329,6 @@ var rendererFullWidthStyles = css({
|
|
|
338
329
|
width: '100% !important'
|
|
339
330
|
}
|
|
340
331
|
});
|
|
341
|
-
var oldRendererMaxWidthStyles = css({
|
|
342
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
343
|
-
maxWidth: "".concat(akEditorMaxWidthLayoutWidth, "px"),
|
|
344
|
-
margin: "0 auto",
|
|
345
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
346
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
347
|
-
width: '100% !important'
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
332
|
var rendererMaxWidthStyles = css({
|
|
351
333
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
352
334
|
maxWidth: "".concat(akEditorMaxWidthLayoutWidth, "px"),
|
|
@@ -850,21 +832,6 @@ var extensionStyle = css({
|
|
|
850
832
|
fontSize: 'var(--ak-renderer-base-font-size)'
|
|
851
833
|
}
|
|
852
834
|
});
|
|
853
|
-
var oldExtensionAsInlineStyle = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
854
|
-
display: 'inline-block'
|
|
855
|
-
}), ".".concat(RendererCssClassName.DOCUMENT, " .").concat(RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
856
|
-
display: 'inline-block',
|
|
857
|
-
// use !important here because the current width has !important applied to it and it's not working when used in React style prop
|
|
858
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
859
|
-
width: 'auto !important',
|
|
860
|
-
marginTop: 0
|
|
861
|
-
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER), {
|
|
862
|
-
display: 'inline-block',
|
|
863
|
-
overflowX: 'visible',
|
|
864
|
-
containerType: 'normal'
|
|
865
|
-
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(RendererCssClassName.EXTENSION_INNER_WRAPPER), {
|
|
866
|
-
display: 'inline-block'
|
|
867
|
-
}));
|
|
868
835
|
var extensionAsInlineStyle = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
869
836
|
display: 'inline-block'
|
|
870
837
|
}), ".".concat(RendererCssClassName.DOCUMENT, " .").concat(RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
@@ -2327,13 +2294,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2327
2294
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2328
2295
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2329
2296
|
},
|
|
2330
|
-
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' &&
|
|
2297
|
+
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' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && rendererMaxWidthStyles, 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,
|
|
2331
2298
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2332
2299
|
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),
|
|
2333
2300
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2334
2301
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2335
2302
|
// this should be placed after baseOtherStyles
|
|
2336
|
-
|
|
2303
|
+
extensionAsInlineStyle, fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
2337
2304
|
"data-testid": testId
|
|
2338
2305
|
}, children);
|
|
2339
2306
|
};
|
|
@@ -69,7 +69,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
69
69
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
70
70
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
71
71
|
var packageName = "@atlaskit/renderer";
|
|
72
|
-
var packageVersion = "149.0.
|
|
72
|
+
var packageVersion = "149.0.7";
|
|
73
73
|
var setAsQueryContainerStyles = css({
|
|
74
74
|
containerName: 'ak-renderer-wrapper',
|
|
75
75
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "149.0.
|
|
3
|
+
"version": "149.0.8",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/status": "^5.13.0",
|
|
74
74
|
"@atlaskit/task-decision": "^21.12.0",
|
|
75
75
|
"@atlaskit/theme": "^28.2.0",
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^234.0.0",
|
|
77
77
|
"@atlaskit/tokens": "^20.4.0",
|
|
78
78
|
"@atlaskit/tooltip": "^24.4.0",
|
|
79
79
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"uuid": "^11.1.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@atlaskit/editor-common": "^130.
|
|
91
|
+
"@atlaskit/editor-common": "^130.5.0",
|
|
92
92
|
"@atlaskit/link-provider": "^6.0.0",
|
|
93
93
|
"@atlaskit/media-core": "^39.0.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.3.0",
|
|
103
|
-
"@atlaskit/editor-plugin-media": "^28.
|
|
103
|
+
"@atlaskit/editor-plugin-media": "^28.1.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",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
112
112
|
"@atlaskit/media-state": "^4.0.0",
|
|
113
113
|
"@atlaskit/media-test-helpers": "^43.0.0",
|
|
114
|
-
"@atlaskit/mention": "^30.
|
|
114
|
+
"@atlaskit/mention": "^30.2.0",
|
|
115
115
|
"@atlaskit/modal-dialog": "^17.0.0",
|
|
116
116
|
"@atlaskit/navigation-system": "^11.2.0",
|
|
117
117
|
"@atlaskit/primitives": "^22.5.0",
|