@atlaskit/renderer 124.15.1 → 124.16.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 +19 -0
- package/dist/cjs/actions/index.js +1 -1
- package/dist/cjs/react/index.js +4 -5
- package/dist/cjs/react/nodes/extension.js +21 -0
- package/dist/cjs/react/nodes/mediaInline.js +1 -1
- package/dist/cjs/react/nodes/multiBodiedExtension.js +43 -5
- package/dist/cjs/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/cjs/react/utils/breakout.js +15 -0
- package/dist/cjs/text/nodes/date.js +1 -1
- package/dist/cjs/text/nodes/inlineCard.js +1 -1
- package/dist/cjs/text/nodes/mention.js +1 -1
- package/dist/cjs/text/nodes/status.js +1 -1
- package/dist/cjs/ui/Expand.js +0 -1
- package/dist/cjs/ui/ExtensionRenderer.js +1 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +2 -1
- package/dist/cjs/ui/Renderer/index.js +2 -2
- package/dist/cjs/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/cjs/ui/annotations/element/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/react/index.js +3 -4
- package/dist/es2019/react/nodes/extension.js +21 -0
- package/dist/es2019/react/nodes/mediaInline.js +1 -1
- package/dist/es2019/react/nodes/multiBodiedExtension.js +42 -3
- package/dist/es2019/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/es2019/react/utils/breakout.js +9 -0
- package/dist/es2019/text/nodes/date.js +1 -1
- package/dist/es2019/text/nodes/inlineCard.js +1 -1
- package/dist/es2019/text/nodes/mention.js +1 -1
- package/dist/es2019/text/nodes/status.js +1 -1
- package/dist/es2019/ui/Expand.js +0 -1
- package/dist/es2019/ui/ExtensionRenderer.js +1 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -0
- package/dist/es2019/ui/Renderer/index.js +2 -2
- package/dist/es2019/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/es2019/ui/annotations/element/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/react/index.js +4 -5
- package/dist/esm/react/nodes/extension.js +21 -0
- package/dist/esm/react/nodes/mediaInline.js +1 -1
- package/dist/esm/react/nodes/multiBodiedExtension.js +43 -5
- package/dist/esm/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/esm/react/utils/breakout.js +9 -0
- package/dist/esm/text/nodes/date.js +1 -1
- package/dist/esm/text/nodes/inlineCard.js +1 -1
- package/dist/esm/text/nodes/mention.js +1 -1
- package/dist/esm/text/nodes/status.js +1 -1
- package/dist/esm/ui/Expand.js +0 -1
- package/dist/esm/ui/ExtensionRenderer.js +1 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +2 -1
- package/dist/esm/ui/Renderer/index.js +2 -2
- package/dist/esm/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/esm/ui/annotations/element/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/analytics/events.d.ts +1 -1
- package/dist/types/react/utils/breakout.d.ts +1 -0
- package/dist/types-ts4.5/actions/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/events.d.ts +1 -1
- package/dist/types-ts4.5/react/utils/breakout.d.ts +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`516909774accc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/516909774accc) -
|
|
8
|
+
Fixing type issues
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 124.16.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`d2da08dd6c682`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2da08dd6c682) -
|
|
16
|
+
use css driven width for extension styles in renderer
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 124.15.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -152,7 +152,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
152
152
|
}
|
|
153
153
|
}, {
|
|
154
154
|
key: "annotate",
|
|
155
|
-
value: function annotate(range, annotationId,
|
|
155
|
+
value: function annotate(range, annotationId, _annotationType) {
|
|
156
156
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
157
157
|
return false;
|
|
158
158
|
}
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -300,15 +300,14 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
300
300
|
key: "serializeTextWrapper",
|
|
301
301
|
value: function serializeTextWrapper(content, _ref2) {
|
|
302
302
|
var _this3 = this;
|
|
303
|
-
var
|
|
304
|
-
parentInfo = _ref2.parentInfo;
|
|
303
|
+
var parentInfo = _ref2.parentInfo;
|
|
305
304
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
306
305
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
307
306
|
if ((0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
308
307
|
var _this$standaloneBackg;
|
|
309
308
|
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, (0, _toConsumableArray2.default)((0, _getStandaloneBackgroundColorMarks.getStandaloneBackgroundColorMarks)(content)));
|
|
310
309
|
}
|
|
311
|
-
return ReactSerializer.buildMarkStructure(content).map(function (mark,
|
|
310
|
+
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
312
311
|
return _this3.serializeMark({
|
|
313
312
|
mark: mark,
|
|
314
313
|
parentNode: {
|
|
@@ -329,7 +328,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
329
328
|
parentNode = _ref3.parentNode,
|
|
330
329
|
parentMark = _ref3.parentMark;
|
|
331
330
|
if (!(0, _nodes.isTextNode)(mark)) {
|
|
332
|
-
var serializeContent = function serializeContent(childMark,
|
|
331
|
+
var serializeContent = function serializeContent(childMark, _index) {
|
|
333
332
|
return _this4.serializeMark({
|
|
334
333
|
mark: childMark,
|
|
335
334
|
parentNode: parentNode,
|
|
@@ -665,7 +664,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
665
664
|
key: "getExpandProps",
|
|
666
665
|
value: function getExpandProps(node) {
|
|
667
666
|
var _this7 = this;
|
|
668
|
-
var
|
|
667
|
+
var _path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
669
668
|
if (!(0, _links.isNestedHeaderLinksEnabled)(this.allowHeadingAnchorLinks)) {
|
|
670
669
|
return this.getProps(node);
|
|
671
670
|
}
|
|
@@ -11,6 +11,8 @@ var _ExtensionRenderer = _interopRequireDefault(require("../../ui/ExtensionRende
|
|
|
11
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
13
|
var _consts = require("../../consts");
|
|
14
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
|
+
var _breakout = require("../utils/breakout");
|
|
14
16
|
var viewportSizes = ['small', 'medium', 'default', 'large', 'xlarge'];
|
|
15
17
|
// Mirrors sizes from https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/browse/platform/packages/forge/xen-editor-provider/src/render/renderers/ForgeUIExtension.tsx
|
|
16
18
|
var macroHeights = {
|
|
@@ -54,6 +56,25 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
54
56
|
*/
|
|
55
57
|
var viewportSize = getViewportSize(extensionId, extensionViewportSizes);
|
|
56
58
|
var extensionHeight = nodeHeight || viewportSize;
|
|
59
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
ref: options.handleRef
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
63
|
+
,
|
|
64
|
+
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
65
|
+
style: {
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
67
|
+
width: isTopLevel ? (0, _breakout.calcBreakoutWidthCss)(layout) : '100%',
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
69
|
+
minHeight: extensionHeight && "".concat(extensionHeight, "px")
|
|
70
|
+
},
|
|
71
|
+
"data-layout": layout,
|
|
72
|
+
"data-local-id": localId,
|
|
73
|
+
"data-testid": "extension--wrapper"
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
75
|
+
className: overflowContainerClass
|
|
76
|
+
}, content));
|
|
77
|
+
}
|
|
57
78
|
return /*#__PURE__*/_react.default.createElement(_ui.WidthConsumer, null, function (_ref2) {
|
|
58
79
|
var width = _ref2.width;
|
|
59
80
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
27
27
|
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; }
|
|
28
28
|
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; }
|
|
29
29
|
var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
30
|
-
var
|
|
30
|
+
var _rendererAppearance = _ref.rendererAppearance,
|
|
31
31
|
clipboardAttrs = _ref.clipboardAttrs,
|
|
32
32
|
collectionName = _ref.collection,
|
|
33
33
|
eventHandlers = _ref.eventHandlers,
|
|
@@ -15,6 +15,8 @@ var _consts = require("../../consts");
|
|
|
15
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
16
|
var _actions = require("./multiBodiedExtension/actions");
|
|
17
17
|
var _context = require("./multiBodiedExtension/context");
|
|
18
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
|
+
var _breakout = require("../utils/breakout");
|
|
18
20
|
var _templateObject;
|
|
19
21
|
/* eslint-disable @atlaskit/design-system/prefer-primitives, @atlaskit/design-system/consistent-css-prop-usage */
|
|
20
22
|
/**
|
|
@@ -43,7 +45,7 @@ var MultiBodiedExtensionNavigation = function MultiBodiedExtensionNavigation(_re
|
|
|
43
45
|
"data-testid": "multiBodiedExtension-navigation"
|
|
44
46
|
}, children);
|
|
45
47
|
};
|
|
46
|
-
var
|
|
48
|
+
var MultiBodiedExtensionWrapperLegacy = function MultiBodiedExtensionWrapperLegacy(_ref3) {
|
|
47
49
|
var width = _ref3.width,
|
|
48
50
|
path = _ref3.path,
|
|
49
51
|
layout = _ref3.layout,
|
|
@@ -56,7 +58,7 @@ var MultiBodiedExtensionWrapper = function MultiBodiedExtensionWrapper(_ref3) {
|
|
|
56
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
57
59
|
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
58
60
|
style: {
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
60
62
|
width: isTopLevel ? (0, _utils.calcBreakoutWidth)(layout, width) : '100%'
|
|
61
63
|
},
|
|
62
64
|
"data-layout": layout,
|
|
@@ -66,6 +68,29 @@ var MultiBodiedExtensionWrapper = function MultiBodiedExtensionWrapper(_ref3) {
|
|
|
66
68
|
className: "".concat(_consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER)
|
|
67
69
|
}, children));
|
|
68
70
|
};
|
|
71
|
+
var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_ref4) {
|
|
72
|
+
var path = _ref4.path,
|
|
73
|
+
layout = _ref4.layout,
|
|
74
|
+
children = _ref4.children;
|
|
75
|
+
var isTopLevel = path.length < 1;
|
|
76
|
+
var centerAlignClass = isTopLevel && ['wide', 'full-width'].includes(layout) ? _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
77
|
+
|
|
78
|
+
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
79
|
+
return (0, _react.jsx)("div", {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
81
|
+
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
82
|
+
style: {
|
|
83
|
+
width: isTopLevel ?
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
85
|
+
(0, _breakout.calcBreakoutWidthCss)(layout) : '100%'
|
|
86
|
+
},
|
|
87
|
+
"data-layout": layout,
|
|
88
|
+
"data-testid": "multiBodiedExtension--wrapper"
|
|
89
|
+
}, (0, _react.jsx)("div", {
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
91
|
+
className: "".concat(_consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER)
|
|
92
|
+
}, children));
|
|
93
|
+
};
|
|
69
94
|
var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
70
95
|
var _extensionContext$pri;
|
|
71
96
|
var children = props.children,
|
|
@@ -130,6 +155,19 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
130
155
|
// make the frame visible
|
|
131
156
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
132
157
|
var containerActiveFrameStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t& [data-extension-frame='true']:nth-of-type(", ") {\n\t\t\tdisplay: block;\n\t\t}\n\t"])), activeChildIndex + 1);
|
|
158
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
159
|
+
return (0, _react.jsx)("section", {
|
|
160
|
+
css: [containerStyles, containerActiveFrameStyles],
|
|
161
|
+
"data-testid": "multiBodiedExtension--container",
|
|
162
|
+
"data-multiBodiedExtension-container": true,
|
|
163
|
+
"data-active-child-index": activeChildIndex,
|
|
164
|
+
"data-layout": layout,
|
|
165
|
+
"data-local-id": localId
|
|
166
|
+
}, (0, _react.jsx)(MultiBodiedExtensionWrapperNext, {
|
|
167
|
+
layout: layout,
|
|
168
|
+
path: path
|
|
169
|
+
}, renderContent()));
|
|
170
|
+
}
|
|
133
171
|
return (0, _react.jsx)("section", {
|
|
134
172
|
css: [containerStyles, containerActiveFrameStyles],
|
|
135
173
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -137,9 +175,9 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
137
175
|
"data-active-child-index": activeChildIndex,
|
|
138
176
|
"data-layout": layout,
|
|
139
177
|
"data-local-id": localId
|
|
140
|
-
}, (0, _react.jsx)(_ui.WidthConsumer, null, function (
|
|
141
|
-
var width =
|
|
142
|
-
return (0, _react.jsx)(
|
|
178
|
+
}, (0, _react.jsx)(_ui.WidthConsumer, null, function (_ref5) {
|
|
179
|
+
var width = _ref5.width;
|
|
180
|
+
return (0, _react.jsx)(MultiBodiedExtensionWrapperLegacy, {
|
|
143
181
|
layout: layout,
|
|
144
182
|
width: width,
|
|
145
183
|
path: path
|
|
@@ -39,10 +39,10 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
39
39
|
getChildrenCount: function getChildrenCount() {
|
|
40
40
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
41
41
|
},
|
|
42
|
-
removeChild: function removeChild(
|
|
42
|
+
removeChild: function removeChild(_index) {
|
|
43
43
|
return false;
|
|
44
44
|
},
|
|
45
|
-
updateParameters: function updateParameters(
|
|
45
|
+
updateParameters: function updateParameters(_parameters) {
|
|
46
46
|
return false;
|
|
47
47
|
},
|
|
48
48
|
// Ignored via go/ees005
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.calcBreakoutWidthCss = void 0;
|
|
7
|
+
var calcBreakoutWidthCss = exports.calcBreakoutWidthCss = function calcBreakoutWidthCss(layout) {
|
|
8
|
+
if (layout === 'full-width') {
|
|
9
|
+
return 'min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--full-width-layout-width))';
|
|
10
|
+
}
|
|
11
|
+
if (layout === 'wide') {
|
|
12
|
+
return 'min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--breakout-wide-layout-width))';
|
|
13
|
+
}
|
|
14
|
+
return '100%';
|
|
15
|
+
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
8
|
var _utils2 = require("../../utils");
|
|
9
|
-
var date = function date(node,
|
|
9
|
+
var date = function date(node, _schema) {
|
|
10
10
|
return node.attrs.timestamp ? (0, _utils.timestampToIsoFormat)(node.attrs.timestamp) : (0, _utils2.getText)(node);
|
|
11
11
|
};
|
|
12
12
|
var _default = exports.default = date;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../utils");
|
|
8
|
-
var inlineCard = function inlineCard(node,
|
|
8
|
+
var inlineCard = function inlineCard(node, _schema) {
|
|
9
9
|
var _node$attrs$data;
|
|
10
10
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || (0, _utils.getText)(node);
|
|
11
11
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var mention = function mention(node,
|
|
7
|
+
var mention = function mention(node, _schema) {
|
|
8
8
|
if (['all', 'here'].indexOf(node.attrs.id) !== -1) {
|
|
9
9
|
return "@".concat(node.attrs.id);
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../utils");
|
|
8
|
-
var status = function status(node,
|
|
8
|
+
var status = function status(node, _schema) {
|
|
9
9
|
return node.attrs.text ? "[ ".concat(node.attrs.text.toUpperCase(), " ]") : (0, _utils.getText)(node);
|
|
10
10
|
};
|
|
11
11
|
var _default = exports.default = status;
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -202,7 +202,6 @@ function Expand(_ref2) {
|
|
|
202
202
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent,
|
|
203
203
|
localId = _ref2.localId,
|
|
204
204
|
nestedHeaderIds = _ref2.nestedHeaderIds,
|
|
205
|
-
rendererAppearance = _ref2.rendererAppearance,
|
|
206
205
|
rendererContentMode = _ref2.rendererContentMode;
|
|
207
206
|
var _React$useState = _react2.default.useState(false),
|
|
208
207
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -69,7 +69,7 @@ function ExtensionRenderer(props) {
|
|
|
69
69
|
|
|
70
70
|
// Ignored via go/ees005
|
|
71
71
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
-
var handleProvider = _react2.default.useCallback(function (
|
|
72
|
+
var handleProvider = _react2.default.useCallback(function (_name, providerPromise) {
|
|
73
73
|
providerPromise && providerPromise.then(function (provider) {
|
|
74
74
|
if (isMounted.current) {
|
|
75
75
|
setExtensionProvider(provider);
|
|
@@ -58,7 +58,8 @@ var baseStyles = (0, _react.css)((_css = {
|
|
|
58
58
|
fontSize: 'var(--ak-renderer-base-font-size)',
|
|
59
59
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
60
60
|
lineHeight: '1.5rem',
|
|
61
|
-
color: "var(--ds-text, ".concat(_colors.N800, ")")
|
|
61
|
+
color: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
62
|
+
'--ak-editor--full-width-layout-width': "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px")
|
|
62
63
|
}, (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)(_css, ".".concat(_consts.RendererCssClassName.DOCUMENT, "::after"), {
|
|
63
64
|
// we add a clearfix after ak-renderer-document in order to
|
|
64
65
|
// contain internal floats (such as media images that are "wrap-left")
|
|
@@ -69,7 +69,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
69
69
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var packageName = "@atlaskit/renderer";
|
|
72
|
-
var packageVersion = "
|
|
72
|
+
var packageVersion = "0.0.0-development";
|
|
73
73
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
74
74
|
containerName: 'ak-renderer-wrapper',
|
|
75
75
|
containerType: 'inline-size'
|
|
@@ -616,7 +616,7 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
616
616
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
617
617
|
}
|
|
618
618
|
var mutateTelepointer = function mutateTelepointer(mutations) {
|
|
619
|
-
mutations.forEach(function (mutation,
|
|
619
|
+
mutations.forEach(function (mutation, _index) {
|
|
620
620
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
621
621
|
if (initialUpdate.current) {
|
|
622
622
|
var oldTelepointer = _renderer.querySelector("#".concat(_style.TELEPOINTER_ID));
|
|
@@ -451,8 +451,8 @@ var AnnotationManagerProvider = exports.AnnotationManagerProvider = function Ann
|
|
|
451
451
|
var onAnnotationClick = function onAnnotationClick(_ref2) {
|
|
452
452
|
var annotationIds = _ref2.annotationIds,
|
|
453
453
|
eventTarget = _ref2.eventTarget,
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
_eventTargetType = _ref2.eventTargetType,
|
|
455
|
+
_viewMethod = _ref2.viewMethod;
|
|
456
456
|
dispatch({
|
|
457
457
|
type: 'updateAnnotation',
|
|
458
458
|
data: {
|
|
@@ -74,7 +74,7 @@ var MarkElement = exports.MarkElement = function MarkElement(_ref) {
|
|
|
74
74
|
} else {
|
|
75
75
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
76
76
|
}
|
|
77
|
-
}).catch(function (
|
|
77
|
+
}).catch(function (_error) {
|
|
78
78
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
79
79
|
});
|
|
80
80
|
} else {
|
|
@@ -22,7 +22,7 @@ var useUserSelectionRange = exports.useUserSelectionRange = function useUserSele
|
|
|
22
22
|
annotationManager = _useAnnotationManager.annotationManager;
|
|
23
23
|
var lastRangeRef = (0, _react.useRef)(null);
|
|
24
24
|
var isAnnotationManagerEnabled = !!annotationManager;
|
|
25
|
-
var onSelectionChange = (0, _react.useCallback)(function (
|
|
25
|
+
var onSelectionChange = (0, _react.useCallback)(function (_event) {
|
|
26
26
|
if (selectionTimeoutRef.current) {
|
|
27
27
|
clearTimeout(selectionTimeoutRef.current);
|
|
28
28
|
}
|
|
@@ -130,7 +130,7 @@ export default class RendererActions {
|
|
|
130
130
|
}
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
|
-
annotate(range, annotationId,
|
|
133
|
+
annotate(range, annotationId, _annotationType) {
|
|
134
134
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
135
135
|
return false;
|
|
136
136
|
}
|
|
@@ -278,7 +278,6 @@ export default class ReactSerializer {
|
|
|
278
278
|
}));
|
|
279
279
|
}
|
|
280
280
|
serializeTextWrapper(content, {
|
|
281
|
-
index,
|
|
282
281
|
parentInfo
|
|
283
282
|
}) {
|
|
284
283
|
const currentPath = parentInfo && parentInfo.path || [];
|
|
@@ -286,7 +285,7 @@ export default class ReactSerializer {
|
|
|
286
285
|
if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
287
286
|
this.standaloneBackgroundColorMarks.push(...getStandaloneBackgroundColorMarks(content));
|
|
288
287
|
}
|
|
289
|
-
return ReactSerializer.buildMarkStructure(content).map((mark,
|
|
288
|
+
return ReactSerializer.buildMarkStructure(content).map((mark, _index) => {
|
|
290
289
|
return this.serializeMark({
|
|
291
290
|
mark,
|
|
292
291
|
parentNode: {
|
|
@@ -305,7 +304,7 @@ export default class ReactSerializer {
|
|
|
305
304
|
parentMark
|
|
306
305
|
}) {
|
|
307
306
|
if (!isTextNode(mark)) {
|
|
308
|
-
const serializeContent = (childMark,
|
|
307
|
+
const serializeContent = (childMark, _index) => this.serializeMark({
|
|
309
308
|
mark: childMark,
|
|
310
309
|
parentNode,
|
|
311
310
|
parentMark: {
|
|
@@ -589,7 +588,7 @@ export default class ReactSerializer {
|
|
|
589
588
|
showAnchorLink: this.appearance !== 'comment' && this.allowHeadingAnchorLinks && !this.disableHeadingIDs && this.headingAnchorSupported(path)
|
|
590
589
|
};
|
|
591
590
|
}
|
|
592
|
-
getExpandProps(node,
|
|
591
|
+
getExpandProps(node, _path = []) {
|
|
593
592
|
if (!isNestedHeaderLinksEnabled(this.allowHeadingAnchorLinks)) {
|
|
594
593
|
return this.getProps(node);
|
|
595
594
|
}
|
|
@@ -4,6 +4,8 @@ import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
|
4
4
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { RendererCssClassName } from '../../consts';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
+
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
7
9
|
const viewportSizes = ['small', 'medium', 'default', 'large', 'xlarge'];
|
|
8
10
|
// Mirrors sizes from https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/browse/platform/packages/forge/xen-editor-provider/src/render/renderers/ForgeUIExtension.tsx
|
|
9
11
|
const macroHeights = {
|
|
@@ -39,6 +41,25 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
39
41
|
*/
|
|
40
42
|
const viewportSize = getViewportSize(extensionId, extensionViewportSizes);
|
|
41
43
|
const extensionHeight = nodeHeight || viewportSize;
|
|
44
|
+
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
ref: options.handleRef
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
48
|
+
,
|
|
49
|
+
className: `${RendererCssClassName.EXTENSION} ${options.shadowClassNames} ${centerAlignClass}`,
|
|
50
|
+
style: {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
52
|
+
width: isTopLevel ? calcBreakoutWidthCss(layout) : '100%',
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
54
|
+
minHeight: extensionHeight && `${extensionHeight}px`
|
|
55
|
+
},
|
|
56
|
+
"data-layout": layout,
|
|
57
|
+
"data-local-id": localId,
|
|
58
|
+
"data-testid": "extension--wrapper"
|
|
59
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: overflowContainerClass
|
|
61
|
+
}, content));
|
|
62
|
+
}
|
|
42
63
|
return /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
43
64
|
width
|
|
44
65
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
@@ -12,7 +12,7 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
12
12
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
13
13
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
const RenderMediaInline = ({
|
|
15
|
-
rendererAppearance,
|
|
15
|
+
rendererAppearance: _rendererAppearance,
|
|
16
16
|
clipboardAttrs,
|
|
17
17
|
collection: collectionName,
|
|
18
18
|
eventHandlers,
|
|
@@ -13,6 +13,8 @@ import { RendererCssClassName } from '../../consts';
|
|
|
13
13
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
14
14
|
import { useMultiBodiedExtensionActions } from './multiBodiedExtension/actions';
|
|
15
15
|
import { useMultiBodiedExtensionContext } from './multiBodiedExtension/context';
|
|
16
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
+
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
16
18
|
const containerStyles = css({
|
|
17
19
|
// Remove top margin if MBE is the first on the doc/page (MBE can only be on the first level)
|
|
18
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -34,7 +36,7 @@ const MultiBodiedExtensionNavigation = ({
|
|
|
34
36
|
"data-testid": "multiBodiedExtension-navigation"
|
|
35
37
|
}, children);
|
|
36
38
|
};
|
|
37
|
-
const
|
|
39
|
+
const MultiBodiedExtensionWrapperLegacy = ({
|
|
38
40
|
width,
|
|
39
41
|
path,
|
|
40
42
|
layout,
|
|
@@ -48,7 +50,7 @@ const MultiBodiedExtensionWrapper = ({
|
|
|
48
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
49
51
|
className: `${RendererCssClassName.EXTENSION} ${centerAlignClass}`,
|
|
50
52
|
style: {
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
52
54
|
width: isTopLevel ? calcBreakoutWidth(layout, width) : '100%'
|
|
53
55
|
},
|
|
54
56
|
"data-layout": layout,
|
|
@@ -58,6 +60,30 @@ const MultiBodiedExtensionWrapper = ({
|
|
|
58
60
|
className: `${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER}`
|
|
59
61
|
}, children));
|
|
60
62
|
};
|
|
63
|
+
const MultiBodiedExtensionWrapperNext = ({
|
|
64
|
+
path,
|
|
65
|
+
layout,
|
|
66
|
+
children
|
|
67
|
+
}) => {
|
|
68
|
+
const isTopLevel = path.length < 1;
|
|
69
|
+
const centerAlignClass = isTopLevel && ['wide', 'full-width'].includes(layout) ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
70
|
+
|
|
71
|
+
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
72
|
+
return jsx("div", {
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
74
|
+
className: `${RendererCssClassName.EXTENSION} ${centerAlignClass}`,
|
|
75
|
+
style: {
|
|
76
|
+
width: isTopLevel ?
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
78
|
+
calcBreakoutWidthCss(layout) : '100%'
|
|
79
|
+
},
|
|
80
|
+
"data-layout": layout,
|
|
81
|
+
"data-testid": "multiBodiedExtension--wrapper"
|
|
82
|
+
}, jsx("div", {
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
84
|
+
className: `${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER}`
|
|
85
|
+
}, children));
|
|
86
|
+
};
|
|
61
87
|
const MultiBodiedExtension = props => {
|
|
62
88
|
var _extensionContext$pri;
|
|
63
89
|
const {
|
|
@@ -124,6 +150,19 @@ const MultiBodiedExtension = props => {
|
|
|
124
150
|
display: block;
|
|
125
151
|
}
|
|
126
152
|
`;
|
|
153
|
+
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
154
|
+
return jsx("section", {
|
|
155
|
+
css: [containerStyles, containerActiveFrameStyles],
|
|
156
|
+
"data-testid": "multiBodiedExtension--container",
|
|
157
|
+
"data-multiBodiedExtension-container": true,
|
|
158
|
+
"data-active-child-index": activeChildIndex,
|
|
159
|
+
"data-layout": layout,
|
|
160
|
+
"data-local-id": localId
|
|
161
|
+
}, jsx(MultiBodiedExtensionWrapperNext, {
|
|
162
|
+
layout: layout,
|
|
163
|
+
path: path
|
|
164
|
+
}, renderContent()));
|
|
165
|
+
}
|
|
127
166
|
return jsx("section", {
|
|
128
167
|
css: [containerStyles, containerActiveFrameStyles],
|
|
129
168
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -133,7 +172,7 @@ const MultiBodiedExtension = props => {
|
|
|
133
172
|
"data-local-id": localId
|
|
134
173
|
}, jsx(WidthConsumer, null, ({
|
|
135
174
|
width
|
|
136
|
-
}) => jsx(
|
|
175
|
+
}) => jsx(MultiBodiedExtensionWrapperLegacy, {
|
|
137
176
|
layout: layout,
|
|
138
177
|
width: width,
|
|
139
178
|
path: path
|
|
@@ -29,10 +29,10 @@ const useMultiBodiedExtensionActions = ({
|
|
|
29
29
|
getChildrenCount() {
|
|
30
30
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
31
31
|
},
|
|
32
|
-
removeChild(
|
|
32
|
+
removeChild(_index) {
|
|
33
33
|
return false;
|
|
34
34
|
},
|
|
35
|
-
updateParameters(
|
|
35
|
+
updateParameters(_parameters) {
|
|
36
36
|
return false;
|
|
37
37
|
},
|
|
38
38
|
// Ignored via go/ees005
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const calcBreakoutWidthCss = layout => {
|
|
2
|
+
if (layout === 'full-width') {
|
|
3
|
+
return 'min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--full-width-layout-width))';
|
|
4
|
+
}
|
|
5
|
+
if (layout === 'wide') {
|
|
6
|
+
return 'min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--breakout-wide-layout-width))';
|
|
7
|
+
}
|
|
8
|
+
return '100%';
|
|
9
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { timestampToIsoFormat } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { getText } from '../../utils';
|
|
3
|
-
const date = (node,
|
|
3
|
+
const date = (node, _schema) => {
|
|
4
4
|
return node.attrs.timestamp ? timestampToIsoFormat(node.attrs.timestamp) : getText(node);
|
|
5
5
|
};
|
|
6
6
|
export default date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getText } from '../../utils';
|
|
2
|
-
const inlineCard = (node,
|
|
2
|
+
const inlineCard = (node, _schema) => {
|
|
3
3
|
var _node$attrs$data;
|
|
4
4
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || getText(node);
|
|
5
5
|
};
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -56,7 +56,7 @@ export default function ExtensionRenderer(props) {
|
|
|
56
56
|
|
|
57
57
|
// Ignored via go/ees005
|
|
58
58
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
59
|
-
const handleProvider = React.useCallback((
|
|
59
|
+
const handleProvider = React.useCallback((_name, providerPromise) => {
|
|
60
60
|
providerPromise && providerPromise.then(provider => {
|
|
61
61
|
if (isMounted.current) {
|
|
62
62
|
setExtensionProvider(provider);
|
|
@@ -50,6 +50,7 @@ const baseStyles = css({
|
|
|
50
50
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
51
51
|
lineHeight: '1.5rem',
|
|
52
52
|
color: `var(--ds-text, ${N800})`,
|
|
53
|
+
'--ak-editor--full-width-layout-width': `${akEditorFullWidthLayoutWidth}px`,
|
|
53
54
|
[`.${RendererCssClassName.DOCUMENT}::after`]: {
|
|
54
55
|
// we add a clearfix after ak-renderer-document in order to
|
|
55
56
|
// contain internal floats (such as media images that are "wrap-left")
|
|
@@ -55,7 +55,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
55
55
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
56
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
57
57
|
const packageName = "@atlaskit/renderer";
|
|
58
|
-
const packageVersion = "
|
|
58
|
+
const packageVersion = "0.0.0-development";
|
|
59
59
|
const setAsQueryContainerStyles = css({
|
|
60
60
|
containerName: 'ak-renderer-wrapper',
|
|
61
61
|
containerType: 'inline-size'
|
|
@@ -604,7 +604,7 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
604
604
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
605
605
|
}
|
|
606
606
|
const mutateTelepointer = mutations => {
|
|
607
|
-
mutations.forEach((mutation,
|
|
607
|
+
mutations.forEach((mutation, _index) => {
|
|
608
608
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
609
609
|
if (initialUpdate.current) {
|
|
610
610
|
const oldTelepointer = renderer.querySelector(`#${TELEPOINTER_ID}`);
|
|
@@ -450,8 +450,8 @@ export const AnnotationManagerProvider = ({
|
|
|
450
450
|
const onAnnotationClick = ({
|
|
451
451
|
annotationIds,
|
|
452
452
|
eventTarget,
|
|
453
|
-
eventTargetType,
|
|
454
|
-
viewMethod
|
|
453
|
+
eventTargetType: _eventTargetType,
|
|
454
|
+
viewMethod: _viewMethod
|
|
455
455
|
}) => {
|
|
456
456
|
dispatch({
|
|
457
457
|
type: 'updateAnnotation',
|
|
@@ -69,7 +69,7 @@ const MarkElement = ({
|
|
|
69
69
|
} else {
|
|
70
70
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
71
71
|
}
|
|
72
|
-
}).catch(
|
|
72
|
+
}).catch(_error => {
|
|
73
73
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
@@ -23,7 +23,7 @@ export const useUserSelectionRange = props => {
|
|
|
23
23
|
} = useAnnotationManagerDispatch();
|
|
24
24
|
const lastRangeRef = useRef(null);
|
|
25
25
|
const isAnnotationManagerEnabled = !!annotationManager;
|
|
26
|
-
const onSelectionChange = useCallback(
|
|
26
|
+
const onSelectionChange = useCallback(_event => {
|
|
27
27
|
if (selectionTimeoutRef.current) {
|
|
28
28
|
clearTimeout(selectionTimeoutRef.current);
|
|
29
29
|
}
|
|
@@ -145,7 +145,7 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
145
145
|
}
|
|
146
146
|
}, {
|
|
147
147
|
key: "annotate",
|
|
148
|
-
value: function annotate(range, annotationId,
|
|
148
|
+
value: function annotate(range, annotationId, _annotationType) {
|
|
149
149
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
150
150
|
return false;
|
|
151
151
|
}
|
package/dist/esm/react/index.js
CHANGED
|
@@ -293,15 +293,14 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
293
293
|
key: "serializeTextWrapper",
|
|
294
294
|
value: function serializeTextWrapper(content, _ref2) {
|
|
295
295
|
var _this3 = this;
|
|
296
|
-
var
|
|
297
|
-
parentInfo = _ref2.parentInfo;
|
|
296
|
+
var parentInfo = _ref2.parentInfo;
|
|
298
297
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
299
298
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
300
299
|
if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
301
300
|
var _this$standaloneBackg;
|
|
302
301
|
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, _toConsumableArray(getStandaloneBackgroundColorMarks(content)));
|
|
303
302
|
}
|
|
304
|
-
return ReactSerializer.buildMarkStructure(content).map(function (mark,
|
|
303
|
+
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
305
304
|
return _this3.serializeMark({
|
|
306
305
|
mark: mark,
|
|
307
306
|
parentNode: {
|
|
@@ -322,7 +321,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
322
321
|
parentNode = _ref3.parentNode,
|
|
323
322
|
parentMark = _ref3.parentMark;
|
|
324
323
|
if (!isTextNode(mark)) {
|
|
325
|
-
var serializeContent = function serializeContent(childMark,
|
|
324
|
+
var serializeContent = function serializeContent(childMark, _index) {
|
|
326
325
|
return _this4.serializeMark({
|
|
327
326
|
mark: childMark,
|
|
328
327
|
parentNode: parentNode,
|
|
@@ -658,7 +657,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
658
657
|
key: "getExpandProps",
|
|
659
658
|
value: function getExpandProps(node) {
|
|
660
659
|
var _this7 = this;
|
|
661
|
-
var
|
|
660
|
+
var _path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
662
661
|
if (!isNestedHeaderLinksEnabled(this.allowHeadingAnchorLinks)) {
|
|
663
662
|
return this.getProps(node);
|
|
664
663
|
}
|
|
@@ -4,6 +4,8 @@ import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
|
4
4
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { RendererCssClassName } from '../../consts';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
+
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
7
9
|
var viewportSizes = ['small', 'medium', 'default', 'large', 'xlarge'];
|
|
8
10
|
// Mirrors sizes from https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/browse/platform/packages/forge/xen-editor-provider/src/render/renderers/ForgeUIExtension.tsx
|
|
9
11
|
var macroHeights = {
|
|
@@ -47,6 +49,25 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
47
49
|
*/
|
|
48
50
|
var viewportSize = getViewportSize(extensionId, extensionViewportSizes);
|
|
49
51
|
var extensionHeight = nodeHeight || viewportSize;
|
|
52
|
+
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
ref: options.handleRef
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
56
|
+
,
|
|
57
|
+
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
58
|
+
style: {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
60
|
+
width: isTopLevel ? calcBreakoutWidthCss(layout) : '100%',
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
62
|
+
minHeight: extensionHeight && "".concat(extensionHeight, "px")
|
|
63
|
+
},
|
|
64
|
+
"data-layout": layout,
|
|
65
|
+
"data-local-id": localId,
|
|
66
|
+
"data-testid": "extension--wrapper"
|
|
67
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: overflowContainerClass
|
|
69
|
+
}, content));
|
|
70
|
+
}
|
|
50
71
|
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref2) {
|
|
51
72
|
var width = _ref2.width;
|
|
52
73
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -18,7 +18,7 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
18
18
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
19
19
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
20
20
|
var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
21
|
-
var
|
|
21
|
+
var _rendererAppearance = _ref.rendererAppearance,
|
|
22
22
|
clipboardAttrs = _ref.clipboardAttrs,
|
|
23
23
|
collectionName = _ref.collection,
|
|
24
24
|
eventHandlers = _ref.eventHandlers,
|
|
@@ -16,6 +16,8 @@ import { RendererCssClassName } from '../../consts';
|
|
|
16
16
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
17
17
|
import { useMultiBodiedExtensionActions } from './multiBodiedExtension/actions';
|
|
18
18
|
import { useMultiBodiedExtensionContext } from './multiBodiedExtension/context';
|
|
19
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
|
+
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
19
21
|
var containerStyles = css({
|
|
20
22
|
// Remove top margin if MBE is the first on the doc/page (MBE can only be on the first level)
|
|
21
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -35,7 +37,7 @@ var MultiBodiedExtensionNavigation = function MultiBodiedExtensionNavigation(_re
|
|
|
35
37
|
"data-testid": "multiBodiedExtension-navigation"
|
|
36
38
|
}, children);
|
|
37
39
|
};
|
|
38
|
-
var
|
|
40
|
+
var MultiBodiedExtensionWrapperLegacy = function MultiBodiedExtensionWrapperLegacy(_ref3) {
|
|
39
41
|
var width = _ref3.width,
|
|
40
42
|
path = _ref3.path,
|
|
41
43
|
layout = _ref3.layout,
|
|
@@ -48,7 +50,7 @@ var MultiBodiedExtensionWrapper = function MultiBodiedExtensionWrapper(_ref3) {
|
|
|
48
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
49
51
|
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
50
52
|
style: {
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
52
54
|
width: isTopLevel ? calcBreakoutWidth(layout, width) : '100%'
|
|
53
55
|
},
|
|
54
56
|
"data-layout": layout,
|
|
@@ -58,6 +60,29 @@ var MultiBodiedExtensionWrapper = function MultiBodiedExtensionWrapper(_ref3) {
|
|
|
58
60
|
className: "".concat(RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER)
|
|
59
61
|
}, children));
|
|
60
62
|
};
|
|
63
|
+
var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_ref4) {
|
|
64
|
+
var path = _ref4.path,
|
|
65
|
+
layout = _ref4.layout,
|
|
66
|
+
children = _ref4.children;
|
|
67
|
+
var isTopLevel = path.length < 1;
|
|
68
|
+
var centerAlignClass = isTopLevel && ['wide', 'full-width'].includes(layout) ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
69
|
+
|
|
70
|
+
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
71
|
+
return jsx("div", {
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
73
|
+
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
74
|
+
style: {
|
|
75
|
+
width: isTopLevel ?
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
77
|
+
calcBreakoutWidthCss(layout) : '100%'
|
|
78
|
+
},
|
|
79
|
+
"data-layout": layout,
|
|
80
|
+
"data-testid": "multiBodiedExtension--wrapper"
|
|
81
|
+
}, jsx("div", {
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
83
|
+
className: "".concat(RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER)
|
|
84
|
+
}, children));
|
|
85
|
+
};
|
|
61
86
|
var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
62
87
|
var _extensionContext$pri;
|
|
63
88
|
var children = props.children,
|
|
@@ -122,6 +147,19 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
122
147
|
// make the frame visible
|
|
123
148
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
124
149
|
var containerActiveFrameStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t& [data-extension-frame='true']:nth-of-type(", ") {\n\t\t\tdisplay: block;\n\t\t}\n\t"])), activeChildIndex + 1);
|
|
150
|
+
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
151
|
+
return jsx("section", {
|
|
152
|
+
css: [containerStyles, containerActiveFrameStyles],
|
|
153
|
+
"data-testid": "multiBodiedExtension--container",
|
|
154
|
+
"data-multiBodiedExtension-container": true,
|
|
155
|
+
"data-active-child-index": activeChildIndex,
|
|
156
|
+
"data-layout": layout,
|
|
157
|
+
"data-local-id": localId
|
|
158
|
+
}, jsx(MultiBodiedExtensionWrapperNext, {
|
|
159
|
+
layout: layout,
|
|
160
|
+
path: path
|
|
161
|
+
}, renderContent()));
|
|
162
|
+
}
|
|
125
163
|
return jsx("section", {
|
|
126
164
|
css: [containerStyles, containerActiveFrameStyles],
|
|
127
165
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -129,9 +167,9 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
129
167
|
"data-active-child-index": activeChildIndex,
|
|
130
168
|
"data-layout": layout,
|
|
131
169
|
"data-local-id": localId
|
|
132
|
-
}, jsx(WidthConsumer, null, function (
|
|
133
|
-
var width =
|
|
134
|
-
return jsx(
|
|
170
|
+
}, jsx(WidthConsumer, null, function (_ref5) {
|
|
171
|
+
var width = _ref5.width;
|
|
172
|
+
return jsx(MultiBodiedExtensionWrapperLegacy, {
|
|
135
173
|
layout: layout,
|
|
136
174
|
width: width,
|
|
137
175
|
path: path
|
|
@@ -31,10 +31,10 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
31
31
|
getChildrenCount: function getChildrenCount() {
|
|
32
32
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
33
33
|
},
|
|
34
|
-
removeChild: function removeChild(
|
|
34
|
+
removeChild: function removeChild(_index) {
|
|
35
35
|
return false;
|
|
36
36
|
},
|
|
37
|
-
updateParameters: function updateParameters(
|
|
37
|
+
updateParameters: function updateParameters(_parameters) {
|
|
38
38
|
return false;
|
|
39
39
|
},
|
|
40
40
|
// Ignored via go/ees005
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var calcBreakoutWidthCss = function calcBreakoutWidthCss(layout) {
|
|
2
|
+
if (layout === 'full-width') {
|
|
3
|
+
return 'min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--full-width-layout-width))';
|
|
4
|
+
}
|
|
5
|
+
if (layout === 'wide') {
|
|
6
|
+
return 'min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--breakout-wide-layout-width))';
|
|
7
|
+
}
|
|
8
|
+
return '100%';
|
|
9
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { timestampToIsoFormat } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { getText } from '../../utils';
|
|
3
|
-
var date = function date(node,
|
|
3
|
+
var date = function date(node, _schema) {
|
|
4
4
|
return node.attrs.timestamp ? timestampToIsoFormat(node.attrs.timestamp) : getText(node);
|
|
5
5
|
};
|
|
6
6
|
export default date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getText } from '../../utils';
|
|
2
|
-
var inlineCard = function inlineCard(node,
|
|
2
|
+
var inlineCard = function inlineCard(node, _schema) {
|
|
3
3
|
var _node$attrs$data;
|
|
4
4
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || getText(node);
|
|
5
5
|
};
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -193,7 +193,6 @@ function Expand(_ref2) {
|
|
|
193
193
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent,
|
|
194
194
|
localId = _ref2.localId,
|
|
195
195
|
nestedHeaderIds = _ref2.nestedHeaderIds,
|
|
196
|
-
rendererAppearance = _ref2.rendererAppearance,
|
|
197
196
|
rendererContentMode = _ref2.rendererContentMode;
|
|
198
197
|
var _React$useState = React.useState(false),
|
|
199
198
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -60,7 +60,7 @@ export default function ExtensionRenderer(props) {
|
|
|
60
60
|
|
|
61
61
|
// Ignored via go/ees005
|
|
62
62
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
-
var handleProvider = React.useCallback(function (
|
|
63
|
+
var handleProvider = React.useCallback(function (_name, providerPromise) {
|
|
64
64
|
providerPromise && providerPromise.then(function (provider) {
|
|
65
65
|
if (isMounted.current) {
|
|
66
66
|
setExtensionProvider(provider);
|
|
@@ -51,7 +51,8 @@ var baseStyles = css((_css = {
|
|
|
51
51
|
fontSize: 'var(--ak-renderer-base-font-size)',
|
|
52
52
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
53
53
|
lineHeight: '1.5rem',
|
|
54
|
-
color: "var(--ds-text, ".concat(N800, ")")
|
|
54
|
+
color: "var(--ds-text, ".concat(N800, ")"),
|
|
55
|
+
'--ak-editor--full-width-layout-width': "".concat(akEditorFullWidthLayoutWidth, "px")
|
|
55
56
|
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css, ".".concat(RendererCssClassName.DOCUMENT, "::after"), {
|
|
56
57
|
// we add a clearfix after ak-renderer-document in order to
|
|
57
58
|
// contain internal floats (such as media images that are "wrap-left")
|
|
@@ -60,7 +60,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
61
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
62
62
|
var packageName = "@atlaskit/renderer";
|
|
63
|
-
var packageVersion = "
|
|
63
|
+
var packageVersion = "0.0.0-development";
|
|
64
64
|
var setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
|
@@ -607,7 +607,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
607
607
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
608
608
|
}
|
|
609
609
|
var mutateTelepointer = function mutateTelepointer(mutations) {
|
|
610
|
-
mutations.forEach(function (mutation,
|
|
610
|
+
mutations.forEach(function (mutation, _index) {
|
|
611
611
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
612
612
|
if (initialUpdate.current) {
|
|
613
613
|
var oldTelepointer = _renderer.querySelector("#".concat(TELEPOINTER_ID));
|
|
@@ -442,8 +442,8 @@ export var AnnotationManagerProvider = function AnnotationManagerProvider(_ref)
|
|
|
442
442
|
var onAnnotationClick = function onAnnotationClick(_ref2) {
|
|
443
443
|
var annotationIds = _ref2.annotationIds,
|
|
444
444
|
eventTarget = _ref2.eventTarget,
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
_eventTargetType = _ref2.eventTargetType,
|
|
446
|
+
_viewMethod = _ref2.viewMethod;
|
|
447
447
|
dispatch({
|
|
448
448
|
type: 'updateAnnotation',
|
|
449
449
|
data: {
|
|
@@ -66,7 +66,7 @@ var MarkElement = function MarkElement(_ref) {
|
|
|
66
66
|
} else {
|
|
67
67
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
68
68
|
}
|
|
69
|
-
}).catch(function (
|
|
69
|
+
}).catch(function (_error) {
|
|
70
70
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
71
71
|
});
|
|
72
72
|
} else {
|
|
@@ -16,7 +16,7 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
|
|
|
16
16
|
annotationManager = _useAnnotationManager.annotationManager;
|
|
17
17
|
var lastRangeRef = useRef(null);
|
|
18
18
|
var isAnnotationManagerEnabled = !!annotationManager;
|
|
19
|
-
var onSelectionChange = useCallback(function (
|
|
19
|
+
var onSelectionChange = useCallback(function (_event) {
|
|
20
20
|
if (selectionTimeoutRef.current) {
|
|
21
21
|
clearTimeout(selectionTimeoutRef.current);
|
|
22
22
|
}
|
|
@@ -49,7 +49,7 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
49
49
|
step: RemoveNodeMarkStep | RemoveMarkStep;
|
|
50
50
|
doc: JSONDocNode;
|
|
51
51
|
};
|
|
52
|
-
annotate(range: Range, annotationId: string,
|
|
52
|
+
annotate(range: Range, annotationId: string, _annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isRangeAnnotatable(range: Range | null): boolean;
|
|
55
55
|
/**
|
|
@@ -142,6 +142,6 @@ export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERE
|
|
|
142
142
|
external?: boolean;
|
|
143
143
|
reason: string;
|
|
144
144
|
}>;
|
|
145
|
-
export type AnalyticsEventPayload<
|
|
145
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
146
146
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
147
147
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const calcBreakoutWidthCss: (layout: "full-width" | "wide" | "default") => "100%" | "min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--full-width-layout-width))" | "min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--breakout-wide-layout-width))";
|
|
@@ -49,7 +49,7 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
49
49
|
step: RemoveNodeMarkStep | RemoveMarkStep;
|
|
50
50
|
doc: JSONDocNode;
|
|
51
51
|
};
|
|
52
|
-
annotate(range: Range, annotationId: string,
|
|
52
|
+
annotate(range: Range, annotationId: string, _annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isRangeAnnotatable(range: Range | null): boolean;
|
|
55
55
|
/**
|
|
@@ -142,6 +142,6 @@ export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERE
|
|
|
142
142
|
external?: boolean;
|
|
143
143
|
reason: string;
|
|
144
144
|
}>;
|
|
145
|
-
export type AnalyticsEventPayload<
|
|
145
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
146
146
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
147
147
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const calcBreakoutWidthCss: (layout: "full-width" | "wide" | "default") => "100%" | "min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--full-width-layout-width))" | "min(var(--ak-editor--breakout-container-without-gutter-width), var(--ak-editor--breakout-wide-layout-width))";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.
|
|
3
|
+
"version": "124.16.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
55
55
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
56
56
|
"@atlaskit/react-ufo": "^4.15.0",
|
|
57
|
-
"@atlaskit/smart-card": "^43.
|
|
57
|
+
"@atlaskit/smart-card": "^43.8.0",
|
|
58
58
|
"@atlaskit/status": "^3.0.0",
|
|
59
59
|
"@atlaskit/task-decision": "^19.2.0",
|
|
60
60
|
"@atlaskit/theme": "^21.0.0",
|
|
61
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
62
|
-
"@atlaskit/tokens": "^8.
|
|
63
|
-
"@atlaskit/tooltip": "^20.
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^13.39.0",
|
|
62
|
+
"@atlaskit/tokens": "^8.1.0",
|
|
63
|
+
"@atlaskit/tooltip": "^20.10.0",
|
|
64
64
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
66
66
|
"@emotion/react": "^11.7.1",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^110.
|
|
75
|
+
"@atlaskit/editor-common": "^110.33.0",
|
|
76
76
|
"@atlaskit/link-provider": "^4.0.0",
|
|
77
77
|
"@atlaskit/media-core": "^37.0.0",
|
|
78
78
|
"react": "^18.2.0",
|