@atlaskit/renderer 134.0.3 → 134.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/react/nodes/bodiedExtension.js +5 -0
- package/dist/cjs/react/nodes/extension.js +11 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/bodiedExtension.js +3 -0
- package/dist/es2019/react/nodes/extension.js +8 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/bodiedExtension.js +5 -0
- package/dist/esm/react/nodes/extension.js +11 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/extension.d.ts +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 134.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 134.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`620801a55eefe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/620801a55eefe) -
|
|
14
|
+
Prevent extensions inside fit-to-content tables from collapsing their intrinsic width in the
|
|
15
|
+
editor and renderer
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 134.0.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -38,6 +38,9 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
38
38
|
.map(function (child) {
|
|
39
39
|
return /*#__PURE__*/_react.default.isValidElement(child) ? child.props.nodeType === 'table' : false;
|
|
40
40
|
}).every(Boolean);
|
|
41
|
+
var isInsideOfTable = path.some(function (node) {
|
|
42
|
+
return node.type.name === 'table';
|
|
43
|
+
});
|
|
41
44
|
var validationContextValue = (0, _react.useMemo)(function () {
|
|
42
45
|
return {
|
|
43
46
|
allowNestedTables: true
|
|
@@ -67,6 +70,7 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
67
70
|
// Return the content directly if it's a valid JSX.Element
|
|
68
71
|
return (0, _extension.renderExtension)(result, layout, {
|
|
69
72
|
isTopLevel: path.length < 1,
|
|
73
|
+
isInsideOfTable: isInsideOfTable,
|
|
70
74
|
rendererAppearance: props.rendererAppearance,
|
|
71
75
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
72
76
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -79,6 +83,7 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
79
83
|
// Always return default content if anything goes wrong
|
|
80
84
|
return (0, _extension.renderExtension)(children, layout, {
|
|
81
85
|
isTopLevel: path.length < 1,
|
|
86
|
+
isInsideOfTable: isInsideOfTable,
|
|
82
87
|
rendererAppearance: props.rendererAppearance,
|
|
83
88
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
84
89
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -14,6 +14,7 @@ var _ExtensionRenderer = _interopRequireDefault(require("../../ui/ExtensionRende
|
|
|
14
14
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
15
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
16
|
var _consts = require("../../consts");
|
|
17
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
17
18
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
19
|
var _breakout = require("../utils/breakout");
|
|
19
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -85,10 +86,13 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
85
86
|
|
|
86
87
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
87
88
|
var _ref2 = options || {},
|
|
89
|
+
_ref2$isInsideOfTable = _ref2.isInsideOfTable,
|
|
90
|
+
isInsideOfTable = _ref2$isInsideOfTable === void 0 ? false : _ref2$isInsideOfTable,
|
|
88
91
|
_ref2$isTopLevel = _ref2.isTopLevel,
|
|
89
92
|
isTopLevel = _ref2$isTopLevel === void 0 ? true : _ref2$isTopLevel,
|
|
90
93
|
rendererAppearance = _ref2.rendererAppearance,
|
|
91
94
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
95
|
+
|
|
92
96
|
// we should only use custom layout for full-page appearance
|
|
93
97
|
var canUseCustomLayout = (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
94
98
|
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
@@ -130,7 +134,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
130
134
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
131
135
|
,
|
|
132
136
|
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
133
|
-
css: [!isInsideOfInlineExtension && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
137
|
+
css: [!(isInsideOfTable && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
134
138
|
}, asInlineAnalytics, content));
|
|
135
139
|
return centerAlignClass && (0, _expValEquals.expValEquals)('platform_editor_flex_based_centering', 'isEnabled', true) ? (0, _react.jsx)("div", {
|
|
136
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -160,7 +164,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
160
164
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
161
165
|
,
|
|
162
166
|
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
163
|
-
css: [!isInsideOfInlineExtension && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
167
|
+
css: [!(isInsideOfTable && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
164
168
|
}, asInlineAnalytics, content));
|
|
165
169
|
return centerAlignClass && (0, _expValEquals.expValEquals)('platform_editor_flex_based_centering', 'isEnabled', true) ? (0, _react.jsx)("div", {
|
|
166
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -181,6 +185,9 @@ var Extension = function Extension(props) {
|
|
|
181
185
|
nodeHeight = props.nodeHeight,
|
|
182
186
|
localId = props.localId,
|
|
183
187
|
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
188
|
+
var isInsideOfTable = path.some(function (node) {
|
|
189
|
+
return node.type.name === 'table';
|
|
190
|
+
});
|
|
184
191
|
return (0, _react.jsx)(_ExtensionRenderer.default
|
|
185
192
|
// Ignored via go/ees005
|
|
186
193
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -195,6 +202,7 @@ var Extension = function Extension(props) {
|
|
|
195
202
|
if (result && /*#__PURE__*/_react2.default.isValidElement(result)) {
|
|
196
203
|
return renderExtension(result, layout, {
|
|
197
204
|
isTopLevel: path.length < 1,
|
|
205
|
+
isInsideOfTable: isInsideOfTable,
|
|
198
206
|
handleRef: handleRef,
|
|
199
207
|
shadowClassNames: shadowClassNames,
|
|
200
208
|
tabIndex: props.tabIndex,
|
|
@@ -213,6 +221,7 @@ var Extension = function Extension(props) {
|
|
|
213
221
|
// Always return default content if anything goes wrong
|
|
214
222
|
return renderExtension(text || 'extension', layout, {
|
|
215
223
|
isTopLevel: path.length < 1,
|
|
224
|
+
isInsideOfTable: isInsideOfTable,
|
|
216
225
|
handleRef: handleRef,
|
|
217
226
|
shadowClassNames: shadowClassNames,
|
|
218
227
|
tabIndex: props.tabIndex,
|
|
@@ -73,7 +73,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
73
73
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
74
74
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
75
75
|
var packageName = "@atlaskit/renderer";
|
|
76
|
-
var packageVersion = "134.0.
|
|
76
|
+
var packageVersion = "134.0.4";
|
|
77
77
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
78
78
|
containerName: 'ak-renderer-wrapper',
|
|
79
79
|
containerType: 'inline-size'
|
|
@@ -28,6 +28,7 @@ const BodiedExtension = props => {
|
|
|
28
28
|
// Ignored via go/ees005
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
30
|
.map(child => /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false).every(Boolean);
|
|
31
|
+
const isInsideOfTable = path.some(node => node.type.name === 'table');
|
|
31
32
|
const validationContextValue = useMemo(() => ({
|
|
32
33
|
allowNestedTables: true
|
|
33
34
|
}), []);
|
|
@@ -56,6 +57,7 @@ const BodiedExtension = props => {
|
|
|
56
57
|
// Return the content directly if it's a valid JSX.Element
|
|
57
58
|
return renderExtension(result, layout, {
|
|
58
59
|
isTopLevel: path.length < 1,
|
|
60
|
+
isInsideOfTable,
|
|
59
61
|
rendererAppearance: props.rendererAppearance,
|
|
60
62
|
fireAnalyticsEvent
|
|
61
63
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -68,6 +70,7 @@ const BodiedExtension = props => {
|
|
|
68
70
|
// Always return default content if anything goes wrong
|
|
69
71
|
return renderExtension(children, layout, {
|
|
70
72
|
isTopLevel: path.length < 1,
|
|
73
|
+
isInsideOfTable,
|
|
71
74
|
rendererAppearance: props.rendererAppearance,
|
|
72
75
|
fireAnalyticsEvent
|
|
73
76
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -12,6 +12,7 @@ import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
|
12
12
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
14
14
|
import { RendererCssClassName } from '../../consts';
|
|
15
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
17
|
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -65,10 +66,12 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
65
66
|
|
|
66
67
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
67
68
|
const {
|
|
69
|
+
isInsideOfTable = false,
|
|
68
70
|
isTopLevel = true,
|
|
69
71
|
rendererAppearance,
|
|
70
72
|
fireAnalyticsEvent
|
|
71
73
|
} = options || {};
|
|
74
|
+
|
|
72
75
|
// we should only use custom layout for full-page appearance
|
|
73
76
|
const canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
74
77
|
const isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
@@ -110,7 +113,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
110
113
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
111
114
|
,
|
|
112
115
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
113
|
-
css: [!isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
116
|
+
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
114
117
|
}, asInlineAnalytics, content));
|
|
115
118
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
116
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -141,7 +144,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
141
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
142
145
|
,
|
|
143
146
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
144
|
-
css: [!isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
147
|
+
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
145
148
|
}, asInlineAnalytics, content));
|
|
146
149
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
147
150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -162,6 +165,7 @@ const Extension = props => {
|
|
|
162
165
|
localId,
|
|
163
166
|
isInsideOfInlineExtension
|
|
164
167
|
} = props;
|
|
168
|
+
const isInsideOfTable = path.some(node => node.type.name === 'table');
|
|
165
169
|
return jsx(ExtensionRenderer
|
|
166
170
|
// Ignored via go/ees005
|
|
167
171
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -177,6 +181,7 @@ const Extension = props => {
|
|
|
177
181
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
178
182
|
return renderExtension(result, layout, {
|
|
179
183
|
isTopLevel: path.length < 1,
|
|
184
|
+
isInsideOfTable,
|
|
180
185
|
handleRef,
|
|
181
186
|
shadowClassNames,
|
|
182
187
|
tabIndex: props.tabIndex,
|
|
@@ -195,6 +200,7 @@ const Extension = props => {
|
|
|
195
200
|
// Always return default content if anything goes wrong
|
|
196
201
|
return renderExtension(text || 'extension', layout, {
|
|
197
202
|
isTopLevel: path.length < 1,
|
|
203
|
+
isInsideOfTable,
|
|
198
204
|
handleRef,
|
|
199
205
|
shadowClassNames,
|
|
200
206
|
tabIndex: props.tabIndex,
|
|
@@ -59,7 +59,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
59
59
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
60
60
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
61
61
|
const packageName = "@atlaskit/renderer";
|
|
62
|
-
const packageVersion = "134.0.
|
|
62
|
+
const packageVersion = "134.0.4";
|
|
63
63
|
const setAsQueryContainerStyles = css({
|
|
64
64
|
containerName: 'ak-renderer-wrapper',
|
|
65
65
|
containerType: 'inline-size'
|
|
@@ -29,6 +29,9 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
29
29
|
.map(function (child) {
|
|
30
30
|
return /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false;
|
|
31
31
|
}).every(Boolean);
|
|
32
|
+
var isInsideOfTable = path.some(function (node) {
|
|
33
|
+
return node.type.name === 'table';
|
|
34
|
+
});
|
|
32
35
|
var validationContextValue = useMemo(function () {
|
|
33
36
|
return {
|
|
34
37
|
allowNestedTables: true
|
|
@@ -58,6 +61,7 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
58
61
|
// Return the content directly if it's a valid JSX.Element
|
|
59
62
|
return renderExtension(result, layout, {
|
|
60
63
|
isTopLevel: path.length < 1,
|
|
64
|
+
isInsideOfTable: isInsideOfTable,
|
|
61
65
|
rendererAppearance: props.rendererAppearance,
|
|
62
66
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
63
67
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -70,6 +74,7 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
70
74
|
// Always return default content if anything goes wrong
|
|
71
75
|
return renderExtension(children, layout, {
|
|
72
76
|
isTopLevel: path.length < 1,
|
|
77
|
+
isInsideOfTable: isInsideOfTable,
|
|
73
78
|
rendererAppearance: props.rendererAppearance,
|
|
74
79
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
75
80
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -12,6 +12,7 @@ import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
|
12
12
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
14
14
|
import { RendererCssClassName } from '../../consts';
|
|
15
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
17
|
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -75,10 +76,13 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
75
76
|
|
|
76
77
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
77
78
|
var _ref2 = options || {},
|
|
79
|
+
_ref2$isInsideOfTable = _ref2.isInsideOfTable,
|
|
80
|
+
isInsideOfTable = _ref2$isInsideOfTable === void 0 ? false : _ref2$isInsideOfTable,
|
|
78
81
|
_ref2$isTopLevel = _ref2.isTopLevel,
|
|
79
82
|
isTopLevel = _ref2$isTopLevel === void 0 ? true : _ref2$isTopLevel,
|
|
80
83
|
rendererAppearance = _ref2.rendererAppearance,
|
|
81
84
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
85
|
+
|
|
82
86
|
// we should only use custom layout for full-page appearance
|
|
83
87
|
var canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
84
88
|
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
@@ -120,7 +124,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
120
124
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
121
125
|
,
|
|
122
126
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
123
|
-
css: [!isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
127
|
+
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
124
128
|
}, asInlineAnalytics, content));
|
|
125
129
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
126
130
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -150,7 +154,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
150
154
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
151
155
|
,
|
|
152
156
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
153
|
-
css: [!isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
157
|
+
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
154
158
|
}, asInlineAnalytics, content));
|
|
155
159
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
156
160
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -171,6 +175,9 @@ var Extension = function Extension(props) {
|
|
|
171
175
|
nodeHeight = props.nodeHeight,
|
|
172
176
|
localId = props.localId,
|
|
173
177
|
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
178
|
+
var isInsideOfTable = path.some(function (node) {
|
|
179
|
+
return node.type.name === 'table';
|
|
180
|
+
});
|
|
174
181
|
return jsx(ExtensionRenderer
|
|
175
182
|
// Ignored via go/ees005
|
|
176
183
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -185,6 +192,7 @@ var Extension = function Extension(props) {
|
|
|
185
192
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
186
193
|
return renderExtension(result, layout, {
|
|
187
194
|
isTopLevel: path.length < 1,
|
|
195
|
+
isInsideOfTable: isInsideOfTable,
|
|
188
196
|
handleRef: handleRef,
|
|
189
197
|
shadowClassNames: shadowClassNames,
|
|
190
198
|
tabIndex: props.tabIndex,
|
|
@@ -203,6 +211,7 @@ var Extension = function Extension(props) {
|
|
|
203
211
|
// Always return default content if anything goes wrong
|
|
204
212
|
return renderExtension(text || 'extension', layout, {
|
|
205
213
|
isTopLevel: path.length < 1,
|
|
214
|
+
isInsideOfTable: isInsideOfTable,
|
|
206
215
|
handleRef: handleRef,
|
|
207
216
|
shadowClassNames: shadowClassNames,
|
|
208
217
|
tabIndex: props.tabIndex,
|
|
@@ -64,7 +64,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
64
64
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
65
65
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
66
66
|
var packageName = "@atlaskit/renderer";
|
|
67
|
-
var packageVersion = "134.0.
|
|
67
|
+
var packageVersion = "134.0.4";
|
|
68
68
|
var setAsQueryContainerStyles = css({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size'
|
|
@@ -41,6 +41,7 @@ type AllOrNone<T> = T | {
|
|
|
41
41
|
};
|
|
42
42
|
type RenderExtensionOptions = {
|
|
43
43
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
44
|
+
isInsideOfTable?: boolean;
|
|
44
45
|
isTopLevel?: boolean;
|
|
45
46
|
rendererAppearance?: RendererAppearance;
|
|
46
47
|
} & AllOrNone<OverflowShadowProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "134.0.
|
|
3
|
+
"version": "134.0.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/editor-smart-link-draggable": "^1.2.0",
|
|
48
48
|
"@atlaskit/emoji": "^71.15.0",
|
|
49
49
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
50
|
-
"@atlaskit/icon": "^37.
|
|
50
|
+
"@atlaskit/icon": "^37.3.0",
|
|
51
51
|
"@atlaskit/link": "^5.0.0",
|
|
52
52
|
"@atlaskit/link-datasource": "^6.4.0",
|
|
53
53
|
"@atlaskit/link-extractors": "^3.2.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/status": "^5.8.0",
|
|
70
70
|
"@atlaskit/task-decision": "^21.8.0",
|
|
71
71
|
"@atlaskit/theme": "^26.1.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^140.0.0",
|
|
73
73
|
"@atlaskit/tokens": "^16.3.0",
|
|
74
74
|
"@atlaskit/tooltip": "^24.0.0",
|
|
75
75
|
"@atlaskit/visually-hidden": "^4.2.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"uuid": "^3.1.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@atlaskit/editor-common": "^117.
|
|
87
|
+
"@atlaskit/editor-common": "^117.2.0",
|
|
88
88
|
"@atlaskit/link-provider": "^5.3.0",
|
|
89
89
|
"@atlaskit/media-core": "^38.0.0",
|
|
90
90
|
"react": "^18.2.0",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"@atlaskit/media-test-helpers": "^42.2.0",
|
|
105
105
|
"@atlaskit/mention": "^27.12.0",
|
|
106
106
|
"@atlaskit/modal-dialog": "^16.2.0",
|
|
107
|
-
"@atlaskit/navigation-system": "^10.
|
|
108
|
-
"@atlaskit/profilecard": "^26.
|
|
107
|
+
"@atlaskit/navigation-system": "^10.11.0",
|
|
108
|
+
"@atlaskit/profilecard": "^26.15.0",
|
|
109
109
|
"@atlaskit/side-nav-items": "^2.3.0",
|
|
110
110
|
"@atlaskit/util-data-test": "^19.1.0",
|
|
111
111
|
"@atlassian/a11y-jest-testing": "^0.14.0",
|