@atlaskit/renderer 153.4.5 → 153.4.7
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 +21 -0
- package/dist/cjs/react/index.js +3 -2
- package/dist/cjs/react/nodes/mediaInline.js +7 -2
- package/dist/cjs/react/nodes/table.js +3 -33
- package/dist/cjs/ui/MediaCard.js +3 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +3 -2
- package/dist/es2019/react/nodes/mediaInline.js +7 -2
- package/dist/es2019/react/nodes/table.js +3 -33
- package/dist/es2019/ui/MediaCard.js +3 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +3 -2
- package/dist/esm/react/nodes/mediaInline.js +7 -2
- package/dist/esm/react/nodes/table.js +3 -33
- package/dist/esm/ui/MediaCard.js +3 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/mediaInline.d.ts +2 -0
- package/dist/types/react/nodes/table.d.ts +0 -33
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 153.4.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef0e136c312f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef0e136c312f5) -
|
|
8
|
+
Remove obsolete nested-table rollout documentation from renderer declarations.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 153.4.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`b277bd792e5dc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b277bd792e5dc) -
|
|
16
|
+
`@atlaskit/editor-common`: `MediaInlineImageCard` takes an optional `mediaViewerExtensions` prop.
|
|
17
|
+
With the `cc_comments_media_viewer_sidebar` experiment on, it passes the extensions to the Media
|
|
18
|
+
Viewer it opens and calls `onSelectedItemChange` when it opens and closes.
|
|
19
|
+
|
|
20
|
+
`@atlaskit/renderer` passes `mediaViewerExtensions` to inline media and external images.
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 153.4.5
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -654,10 +654,11 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
654
654
|
}, {
|
|
655
655
|
key: "getMediaInlineProps",
|
|
656
656
|
value: function getMediaInlineProps(node) {
|
|
657
|
-
var _this$media8, _this$media9;
|
|
657
|
+
var _this$media8, _this$media9, _this$media0;
|
|
658
658
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
659
659
|
ssr: (_this$media8 = this.media) === null || _this$media8 === void 0 ? void 0 : _this$media8.ssr,
|
|
660
|
-
fallbackMediaNameFetcher: (_this$media9 = this.media) === null || _this$media9 === void 0 ? void 0 : _this$media9.fallbackMediaNameFetcher
|
|
660
|
+
fallbackMediaNameFetcher: (_this$media9 = this.media) === null || _this$media9 === void 0 ? void 0 : _this$media9.fallbackMediaNameFetcher,
|
|
661
|
+
mediaViewerExtensions: (_this$media0 = this.media) === null || _this$media0 === void 0 ? void 0 : _this$media0.mediaViewerExtensions
|
|
661
662
|
});
|
|
662
663
|
}
|
|
663
664
|
}, {
|
|
@@ -34,6 +34,7 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
34
34
|
eventHandlers = _ref.eventHandlers,
|
|
35
35
|
identifier = _ref.identifier,
|
|
36
36
|
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher,
|
|
37
|
+
mediaViewerExtensions = _ref.mediaViewerExtensions,
|
|
37
38
|
ssr = _ref.ssr;
|
|
38
39
|
var _useState = (0, _react.useState)(),
|
|
39
40
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -151,6 +152,7 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
151
152
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
152
153
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
153
154
|
mediaViewerItems: Array.from(_MediaCard.mediaIdentifierMap.values()),
|
|
155
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
154
156
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
155
157
|
ssrMediaItem: ssrMediaItem
|
|
156
158
|
}))
|
|
@@ -168,7 +170,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
168
170
|
height = props.height,
|
|
169
171
|
marks = props.marks,
|
|
170
172
|
ssr = props.ssr,
|
|
171
|
-
fallbackMediaNameFetcher = props.fallbackMediaNameFetcher
|
|
173
|
+
fallbackMediaNameFetcher = props.fallbackMediaNameFetcher,
|
|
174
|
+
mediaViewerExtensions = props.mediaViewerExtensions;
|
|
172
175
|
var clipboardAttrs = {
|
|
173
176
|
id: id,
|
|
174
177
|
collection: collection
|
|
@@ -211,7 +214,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
211
214
|
borderColor: borderColor
|
|
212
215
|
},
|
|
213
216
|
serializeDataAttrs: true,
|
|
214
|
-
shouldOpenMediaViewer: !hasLinkMark
|
|
217
|
+
shouldOpenMediaViewer: !hasLinkMark,
|
|
218
|
+
mediaViewerExtensions: mediaViewerExtensions
|
|
215
219
|
}));
|
|
216
220
|
}
|
|
217
221
|
return /*#__PURE__*/_react.default.createElement(RenderMediaInline, {
|
|
@@ -223,6 +227,7 @@ var MediaInline = function MediaInline(props) {
|
|
|
223
227
|
collection: collection,
|
|
224
228
|
featureFlags: featureFlags,
|
|
225
229
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
230
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
226
231
|
ssr: ssr
|
|
227
232
|
});
|
|
228
233
|
};
|
|
@@ -398,39 +398,9 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
398
398
|
return Boolean(this.props.isInsideOfTable || this.isInsideTableCell());
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
* which overrides the inline styles set by this component. Using
|
|
405
|
-
* style.setProperty with 'important' priority on inline styles beats
|
|
406
|
-
* stylesheet !important rules per the CSS cascade.
|
|
407
|
-
*
|
|
408
|
-
* Tables that are nested inside another table need to remain constrained by
|
|
409
|
-
* their table-cell context. Do not promote their width to inline !important,
|
|
410
|
-
* otherwise nested tables rendered through macros such as Excerpt Include can
|
|
411
|
-
* overflow and overlap adjacent cells.
|
|
412
|
-
*
|
|
413
|
-
* Top-level tables in nested renderers still preserve their saved width, but
|
|
414
|
-
* are capped to their containing block so wide tables do not escape constrained
|
|
415
|
-
* macro bodies such as Excerpt Include panels.
|
|
416
|
-
*
|
|
417
|
-
* Uses lastComputedStyle (populated during render) rather than reading from
|
|
418
|
-
* element.style, because React may remove properties from the DOM when their
|
|
419
|
-
* values transition to undefined between renders.
|
|
420
|
-
*
|
|
421
|
-
* A NON-resized table inside a nested renderer (e.g. an Excerpt macro body)
|
|
422
|
-
* takes a default layout cap (760px/1800px, or a `cqw` length for full-page
|
|
423
|
-
* appearances) from the outer renderer's width context. That value does not
|
|
424
|
-
* match the macro's own box, so promoting it to inline `!important` makes
|
|
425
|
-
* the table collapse. Such tables have no author-chosen size to preserve, so
|
|
426
|
-
* we re-assert the parent stylesheet's intent (fill the box:
|
|
427
|
-
* `width: 100%; left: 0`) with inline `!important`.
|
|
428
|
-
*
|
|
429
|
-
* Explicitly resized tables (`tableNode.attrs.width` set) are excluded and keep
|
|
430
|
-
* the original PGXT-10226 behavior: their author-chosen width/left is promoted
|
|
431
|
-
* verbatim so the Include Page macro does not stretch or indent them. The
|
|
432
|
-
* table-cell short-circuit (PGXT-10294) above also still applies.
|
|
433
|
-
*/
|
|
401
|
+
// Preserve saved widths in nested renderers while keeping tables within their macro bounds.
|
|
402
|
+
// Unresized tables fill the macro; tables inside table cells keep their cell constraints.
|
|
403
|
+
// Use lastComputedStyle because React can remove inline styles during rerenders.
|
|
434
404
|
}, {
|
|
435
405
|
key: "applyNestedRendererTableFix",
|
|
436
406
|
value: function applyNestedRendererTableFix() {
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -284,7 +284,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
284
284
|
mediaClient = _this$props7.mediaClient,
|
|
285
285
|
dataAttributes = _this$props7.dataAttributes,
|
|
286
286
|
enableSyncMediaCard = _this$props7.enableSyncMediaCard,
|
|
287
|
-
localId = _this$props7.localId
|
|
287
|
+
localId = _this$props7.localId,
|
|
288
|
+
mediaViewerExtensions = _this$props7.mediaViewerExtensions;
|
|
288
289
|
if (imageStatus === 'loading' || !url) {
|
|
289
290
|
return this.renderLoadingCard();
|
|
290
291
|
}
|
|
@@ -319,6 +320,7 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
319
320
|
disableOverlay: disableOverlay,
|
|
320
321
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
321
322
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
323
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
322
324
|
featureFlags: featureFlags,
|
|
323
325
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
324
326
|
shouldHideTooltip: false,
|
|
@@ -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 = "153.4.
|
|
82
|
+
var packageVersion = "153.4.6";
|
|
83
83
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
84
84
|
containerName: 'ak-renderer-wrapper',
|
|
85
85
|
containerType: 'inline-size'
|
|
@@ -589,11 +589,12 @@ export default class ReactSerializer {
|
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
getMediaInlineProps(node) {
|
|
592
|
-
var _this$media8, _this$media9;
|
|
592
|
+
var _this$media8, _this$media9, _this$media0;
|
|
593
593
|
return {
|
|
594
594
|
...this.getProps(node),
|
|
595
595
|
ssr: (_this$media8 = this.media) === null || _this$media8 === void 0 ? void 0 : _this$media8.ssr,
|
|
596
|
-
fallbackMediaNameFetcher: (_this$media9 = this.media) === null || _this$media9 === void 0 ? void 0 : _this$media9.fallbackMediaNameFetcher
|
|
596
|
+
fallbackMediaNameFetcher: (_this$media9 = this.media) === null || _this$media9 === void 0 ? void 0 : _this$media9.fallbackMediaNameFetcher,
|
|
597
|
+
mediaViewerExtensions: (_this$media0 = this.media) === null || _this$media0 === void 0 ? void 0 : _this$media0.mediaViewerExtensions
|
|
597
598
|
};
|
|
598
599
|
}
|
|
599
600
|
getTaskItemProps(node, path = []) {
|
|
@@ -19,6 +19,7 @@ const RenderMediaInline = ({
|
|
|
19
19
|
eventHandlers,
|
|
20
20
|
identifier,
|
|
21
21
|
fallbackMediaNameFetcher,
|
|
22
|
+
mediaViewerExtensions,
|
|
22
23
|
ssr
|
|
23
24
|
}) => {
|
|
24
25
|
const [contextIdentifier, setContextIdentifier] = useState();
|
|
@@ -115,6 +116,7 @@ const RenderMediaInline = ({
|
|
|
115
116
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
116
117
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
117
118
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
119
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
118
120
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
119
121
|
ssrMediaItem: ssrMediaItem
|
|
120
122
|
}))
|
|
@@ -133,7 +135,8 @@ const MediaInline = props => {
|
|
|
133
135
|
height,
|
|
134
136
|
marks,
|
|
135
137
|
ssr,
|
|
136
|
-
fallbackMediaNameFetcher
|
|
138
|
+
fallbackMediaNameFetcher,
|
|
139
|
+
mediaViewerExtensions
|
|
137
140
|
} = props;
|
|
138
141
|
const clipboardAttrs = {
|
|
139
142
|
id,
|
|
@@ -174,7 +177,8 @@ const MediaInline = props => {
|
|
|
174
177
|
borderColor
|
|
175
178
|
},
|
|
176
179
|
serializeDataAttrs: true,
|
|
177
|
-
shouldOpenMediaViewer: !hasLinkMark
|
|
180
|
+
shouldOpenMediaViewer: !hasLinkMark,
|
|
181
|
+
mediaViewerExtensions: mediaViewerExtensions
|
|
178
182
|
}));
|
|
179
183
|
}
|
|
180
184
|
return /*#__PURE__*/React.createElement(RenderMediaInline, {
|
|
@@ -186,6 +190,7 @@ const MediaInline = props => {
|
|
|
186
190
|
collection: collection,
|
|
187
191
|
featureFlags: featureFlags,
|
|
188
192
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
193
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
189
194
|
ssr: ssr
|
|
190
195
|
});
|
|
191
196
|
};
|
|
@@ -349,39 +349,9 @@ export class TableContainer extends React.Component {
|
|
|
349
349
|
return Boolean(this.props.isInsideOfTable || this.isInsideTableCell());
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
* which overrides the inline styles set by this component. Using
|
|
356
|
-
* style.setProperty with 'important' priority on inline styles beats
|
|
357
|
-
* stylesheet !important rules per the CSS cascade.
|
|
358
|
-
*
|
|
359
|
-
* Tables that are nested inside another table need to remain constrained by
|
|
360
|
-
* their table-cell context. Do not promote their width to inline !important,
|
|
361
|
-
* otherwise nested tables rendered through macros such as Excerpt Include can
|
|
362
|
-
* overflow and overlap adjacent cells.
|
|
363
|
-
*
|
|
364
|
-
* Top-level tables in nested renderers still preserve their saved width, but
|
|
365
|
-
* are capped to their containing block so wide tables do not escape constrained
|
|
366
|
-
* macro bodies such as Excerpt Include panels.
|
|
367
|
-
*
|
|
368
|
-
* Uses lastComputedStyle (populated during render) rather than reading from
|
|
369
|
-
* element.style, because React may remove properties from the DOM when their
|
|
370
|
-
* values transition to undefined between renders.
|
|
371
|
-
*
|
|
372
|
-
* A NON-resized table inside a nested renderer (e.g. an Excerpt macro body)
|
|
373
|
-
* takes a default layout cap (760px/1800px, or a `cqw` length for full-page
|
|
374
|
-
* appearances) from the outer renderer's width context. That value does not
|
|
375
|
-
* match the macro's own box, so promoting it to inline `!important` makes
|
|
376
|
-
* the table collapse. Such tables have no author-chosen size to preserve, so
|
|
377
|
-
* we re-assert the parent stylesheet's intent (fill the box:
|
|
378
|
-
* `width: 100%; left: 0`) with inline `!important`.
|
|
379
|
-
*
|
|
380
|
-
* Explicitly resized tables (`tableNode.attrs.width` set) are excluded and keep
|
|
381
|
-
* the original PGXT-10226 behavior: their author-chosen width/left is promoted
|
|
382
|
-
* verbatim so the Include Page macro does not stretch or indent them. The
|
|
383
|
-
* table-cell short-circuit (PGXT-10294) above also still applies.
|
|
384
|
-
*/
|
|
352
|
+
// Preserve saved widths in nested renderers while keeping tables within their macro bounds.
|
|
353
|
+
// Unresized tables fill the macro; tables inside table cells keep their cell constraints.
|
|
354
|
+
// Use lastComputedStyle because React can remove inline styles during rerenders.
|
|
385
355
|
applyNestedRendererTableFix() {
|
|
386
356
|
var _this$props$tableNode;
|
|
387
357
|
if (!this.containerRef) {
|
|
@@ -208,7 +208,8 @@ export class MediaCardView extends Component {
|
|
|
208
208
|
mediaClient,
|
|
209
209
|
dataAttributes,
|
|
210
210
|
enableSyncMediaCard,
|
|
211
|
-
localId
|
|
211
|
+
localId,
|
|
212
|
+
mediaViewerExtensions
|
|
212
213
|
} = this.props;
|
|
213
214
|
if (imageStatus === 'loading' || !url) {
|
|
214
215
|
return this.renderLoadingCard();
|
|
@@ -244,6 +245,7 @@ export class MediaCardView extends Component {
|
|
|
244
245
|
disableOverlay: disableOverlay,
|
|
245
246
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
246
247
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
248
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
247
249
|
featureFlags: featureFlags,
|
|
248
250
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
249
251
|
shouldHideTooltip: false,
|
|
@@ -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 = "153.4.
|
|
67
|
+
const packageVersion = "153.4.6";
|
|
68
68
|
const setAsQueryContainerStyles = css({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size'
|
package/dist/esm/react/index.js
CHANGED
|
@@ -647,10 +647,11 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
647
647
|
}, {
|
|
648
648
|
key: "getMediaInlineProps",
|
|
649
649
|
value: function getMediaInlineProps(node) {
|
|
650
|
-
var _this$media8, _this$media9;
|
|
650
|
+
var _this$media8, _this$media9, _this$media0;
|
|
651
651
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
652
652
|
ssr: (_this$media8 = this.media) === null || _this$media8 === void 0 ? void 0 : _this$media8.ssr,
|
|
653
|
-
fallbackMediaNameFetcher: (_this$media9 = this.media) === null || _this$media9 === void 0 ? void 0 : _this$media9.fallbackMediaNameFetcher
|
|
653
|
+
fallbackMediaNameFetcher: (_this$media9 = this.media) === null || _this$media9 === void 0 ? void 0 : _this$media9.fallbackMediaNameFetcher,
|
|
654
|
+
mediaViewerExtensions: (_this$media0 = this.media) === null || _this$media0 === void 0 ? void 0 : _this$media0.mediaViewerExtensions
|
|
654
655
|
});
|
|
655
656
|
}
|
|
656
657
|
}, {
|
|
@@ -25,6 +25,7 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
25
25
|
eventHandlers = _ref.eventHandlers,
|
|
26
26
|
identifier = _ref.identifier,
|
|
27
27
|
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher,
|
|
28
|
+
mediaViewerExtensions = _ref.mediaViewerExtensions,
|
|
28
29
|
ssr = _ref.ssr;
|
|
29
30
|
var _useState = useState(),
|
|
30
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -142,6 +143,7 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
142
143
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
143
144
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
144
145
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
146
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
145
147
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
146
148
|
ssrMediaItem: ssrMediaItem
|
|
147
149
|
}))
|
|
@@ -159,7 +161,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
159
161
|
height = props.height,
|
|
160
162
|
marks = props.marks,
|
|
161
163
|
ssr = props.ssr,
|
|
162
|
-
fallbackMediaNameFetcher = props.fallbackMediaNameFetcher
|
|
164
|
+
fallbackMediaNameFetcher = props.fallbackMediaNameFetcher,
|
|
165
|
+
mediaViewerExtensions = props.mediaViewerExtensions;
|
|
163
166
|
var clipboardAttrs = {
|
|
164
167
|
id: id,
|
|
165
168
|
collection: collection
|
|
@@ -202,7 +205,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
202
205
|
borderColor: borderColor
|
|
203
206
|
},
|
|
204
207
|
serializeDataAttrs: true,
|
|
205
|
-
shouldOpenMediaViewer: !hasLinkMark
|
|
208
|
+
shouldOpenMediaViewer: !hasLinkMark,
|
|
209
|
+
mediaViewerExtensions: mediaViewerExtensions
|
|
206
210
|
}));
|
|
207
211
|
}
|
|
208
212
|
return /*#__PURE__*/React.createElement(RenderMediaInline, {
|
|
@@ -214,6 +218,7 @@ var MediaInline = function MediaInline(props) {
|
|
|
214
218
|
collection: collection,
|
|
215
219
|
featureFlags: featureFlags,
|
|
216
220
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
221
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
217
222
|
ssr: ssr
|
|
218
223
|
});
|
|
219
224
|
};
|
|
@@ -393,39 +393,9 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
393
393
|
return Boolean(this.props.isInsideOfTable || this.isInsideTableCell());
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
* which overrides the inline styles set by this component. Using
|
|
400
|
-
* style.setProperty with 'important' priority on inline styles beats
|
|
401
|
-
* stylesheet !important rules per the CSS cascade.
|
|
402
|
-
*
|
|
403
|
-
* Tables that are nested inside another table need to remain constrained by
|
|
404
|
-
* their table-cell context. Do not promote their width to inline !important,
|
|
405
|
-
* otherwise nested tables rendered through macros such as Excerpt Include can
|
|
406
|
-
* overflow and overlap adjacent cells.
|
|
407
|
-
*
|
|
408
|
-
* Top-level tables in nested renderers still preserve their saved width, but
|
|
409
|
-
* are capped to their containing block so wide tables do not escape constrained
|
|
410
|
-
* macro bodies such as Excerpt Include panels.
|
|
411
|
-
*
|
|
412
|
-
* Uses lastComputedStyle (populated during render) rather than reading from
|
|
413
|
-
* element.style, because React may remove properties from the DOM when their
|
|
414
|
-
* values transition to undefined between renders.
|
|
415
|
-
*
|
|
416
|
-
* A NON-resized table inside a nested renderer (e.g. an Excerpt macro body)
|
|
417
|
-
* takes a default layout cap (760px/1800px, or a `cqw` length for full-page
|
|
418
|
-
* appearances) from the outer renderer's width context. That value does not
|
|
419
|
-
* match the macro's own box, so promoting it to inline `!important` makes
|
|
420
|
-
* the table collapse. Such tables have no author-chosen size to preserve, so
|
|
421
|
-
* we re-assert the parent stylesheet's intent (fill the box:
|
|
422
|
-
* `width: 100%; left: 0`) with inline `!important`.
|
|
423
|
-
*
|
|
424
|
-
* Explicitly resized tables (`tableNode.attrs.width` set) are excluded and keep
|
|
425
|
-
* the original PGXT-10226 behavior: their author-chosen width/left is promoted
|
|
426
|
-
* verbatim so the Include Page macro does not stretch or indent them. The
|
|
427
|
-
* table-cell short-circuit (PGXT-10294) above also still applies.
|
|
428
|
-
*/
|
|
396
|
+
// Preserve saved widths in nested renderers while keeping tables within their macro bounds.
|
|
397
|
+
// Unresized tables fill the macro; tables inside table cells keep their cell constraints.
|
|
398
|
+
// Use lastComputedStyle because React can remove inline styles during rerenders.
|
|
429
399
|
}, {
|
|
430
400
|
key: "applyNestedRendererTableFix",
|
|
431
401
|
value: function applyNestedRendererTableFix() {
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -275,7 +275,8 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
275
275
|
mediaClient = _this$props7.mediaClient,
|
|
276
276
|
dataAttributes = _this$props7.dataAttributes,
|
|
277
277
|
enableSyncMediaCard = _this$props7.enableSyncMediaCard,
|
|
278
|
-
localId = _this$props7.localId
|
|
278
|
+
localId = _this$props7.localId,
|
|
279
|
+
mediaViewerExtensions = _this$props7.mediaViewerExtensions;
|
|
279
280
|
if (imageStatus === 'loading' || !url) {
|
|
280
281
|
return this.renderLoadingCard();
|
|
281
282
|
}
|
|
@@ -310,6 +311,7 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
310
311
|
disableOverlay: disableOverlay,
|
|
311
312
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
312
313
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
314
|
+
mediaViewerExtensions: mediaViewerExtensions,
|
|
313
315
|
featureFlags: featureFlags,
|
|
314
316
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
315
317
|
shouldHideTooltip: false,
|
|
@@ -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 = "153.4.
|
|
72
|
+
var packageVersion = "153.4.6";
|
|
73
73
|
var setAsQueryContainerStyles = css({
|
|
74
74
|
containerName: 'ak-renderer-wrapper',
|
|
75
75
|
containerType: 'inline-size'
|
|
@@ -5,6 +5,7 @@ import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline/type
|
|
|
5
5
|
import type ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
6
6
|
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
8
|
+
import type { MediaViewerExtensions } from '@atlaskit/media-viewer/types';
|
|
8
9
|
import type { MediaSSR } from '../../types/mediaOptions';
|
|
9
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
10
11
|
type MediaInlineProps = {
|
|
@@ -14,6 +15,7 @@ type MediaInlineProps = {
|
|
|
14
15
|
featureFlags?: MediaFeatureFlags;
|
|
15
16
|
id: string;
|
|
16
17
|
marks?: Array<Mark>;
|
|
18
|
+
mediaViewerExtensions?: MediaViewerExtensions;
|
|
17
19
|
providers: ProviderFactory;
|
|
18
20
|
rendererAppearance?: RendererAppearance;
|
|
19
21
|
ssr?: MediaSSR;
|
|
@@ -81,39 +81,6 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
81
81
|
*/
|
|
82
82
|
private isInsideTableCell;
|
|
83
83
|
private isInsideTableContext;
|
|
84
|
-
/**
|
|
85
|
-
* For tables inside nested renderers (e.g. Include Page macro), the parent
|
|
86
|
-
* renderer's CSS override forces width:100%!important and left:0!important
|
|
87
|
-
* which overrides the inline styles set by this component. Using
|
|
88
|
-
* style.setProperty with 'important' priority on inline styles beats
|
|
89
|
-
* stylesheet !important rules per the CSS cascade.
|
|
90
|
-
*
|
|
91
|
-
* Tables that are nested inside another table need to remain constrained by
|
|
92
|
-
* their table-cell context. Do not promote their width to inline !important,
|
|
93
|
-
* otherwise nested tables rendered through macros such as Excerpt Include can
|
|
94
|
-
* overflow and overlap adjacent cells.
|
|
95
|
-
*
|
|
96
|
-
* Top-level tables in nested renderers still preserve their saved width, but
|
|
97
|
-
* are capped to their containing block so wide tables do not escape constrained
|
|
98
|
-
* macro bodies such as Excerpt Include panels.
|
|
99
|
-
*
|
|
100
|
-
* Uses lastComputedStyle (populated during render) rather than reading from
|
|
101
|
-
* element.style, because React may remove properties from the DOM when their
|
|
102
|
-
* values transition to undefined between renders.
|
|
103
|
-
*
|
|
104
|
-
* A NON-resized table inside a nested renderer (e.g. an Excerpt macro body)
|
|
105
|
-
* takes a default layout cap (760px/1800px, or a `cqw` length for full-page
|
|
106
|
-
* appearances) from the outer renderer's width context. That value does not
|
|
107
|
-
* match the macro's own box, so promoting it to inline `!important` makes
|
|
108
|
-
* the table collapse. Such tables have no author-chosen size to preserve, so
|
|
109
|
-
* we re-assert the parent stylesheet's intent (fill the box:
|
|
110
|
-
* `width: 100%; left: 0`) with inline `!important`.
|
|
111
|
-
*
|
|
112
|
-
* Explicitly resized tables (`tableNode.attrs.width` set) are excluded and keep
|
|
113
|
-
* the original PGXT-10226 behavior: their author-chosen width/left is promoted
|
|
114
|
-
* verbatim so the Include Page macro does not stretch or indent them. The
|
|
115
|
-
* table-cell short-circuit (PGXT-10294) above also still applies.
|
|
116
|
-
*/
|
|
117
84
|
private applyNestedRendererTableFix;
|
|
118
85
|
/**
|
|
119
86
|
* Callback ref that captures the container DOM element and also forwards
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "153.4.
|
|
3
|
+
"version": "153.4.7",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/media-client-react": "^7.0.0",
|
|
62
62
|
"@atlaskit/media-common": "^14.7.0",
|
|
63
63
|
"@atlaskit/media-filmstrip": "^53.0.0",
|
|
64
|
-
"@atlaskit/media-ui": "^31.
|
|
64
|
+
"@atlaskit/media-ui": "^31.10.0",
|
|
65
65
|
"@atlaskit/media-viewer": "^54.12.0",
|
|
66
66
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"uuid": "^11.1.1"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@atlaskit/editor-common": "^134.
|
|
89
|
+
"@atlaskit/editor-common": "^134.18.0",
|
|
90
90
|
"@atlaskit/link-provider": "^6.1.0",
|
|
91
91
|
"@atlaskit/media-core": "^39.0.0",
|
|
92
92
|
"react": "^18.2.0 || ^19.2.0",
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"@af/visual-regression": "workspace:^",
|
|
99
99
|
"@atlaskit/analytics-gas-types": "^6.2.0",
|
|
100
100
|
"@atlaskit/checkbox": "^19.3.0",
|
|
101
|
-
"@atlaskit/editor-common": "^134.
|
|
102
|
-
"@atlaskit/editor-plugin-media": "^32.
|
|
101
|
+
"@atlaskit/editor-common": "^134.18.0",
|
|
102
|
+
"@atlaskit/editor-plugin-media": "^32.4.0",
|
|
103
103
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
104
104
|
"@atlaskit/inline-edit": "^16.5.0",
|
|
105
105
|
"@atlaskit/json-ld-types": "^2.1.0",
|
|
@@ -114,10 +114,10 @@
|
|
|
114
114
|
"@atlaskit/modal-dialog": "^17.2.0",
|
|
115
115
|
"@atlaskit/navigation-system": "^11.7.0",
|
|
116
116
|
"@atlaskit/primitives": "^22.7.0",
|
|
117
|
-
"@atlaskit/profilecard": "^27.
|
|
117
|
+
"@atlaskit/profilecard": "^27.9.0",
|
|
118
118
|
"@atlaskit/radio": "^10.2.0",
|
|
119
119
|
"@atlaskit/range": "^12.2.0",
|
|
120
|
-
"@atlaskit/section-message": "^10.
|
|
120
|
+
"@atlaskit/section-message": "^10.3.0",
|
|
121
121
|
"@atlaskit/side-nav-items": "^2.6.0",
|
|
122
122
|
"@atlaskit/textfield": "^10.3.0",
|
|
123
123
|
"@atlaskit/toggle": "^17.3.0",
|