@atlaskit/renderer 108.12.0 → 108.13.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 +17 -0
- package/dist/cjs/react/nodes/embedCard.js +4 -2
- package/dist/cjs/ui/Renderer/index.js +2 -2
- package/dist/es2019/react/nodes/embedCard.js +4 -2
- package/dist/es2019/ui/Renderer/index.js +2 -2
- package/dist/esm/react/nodes/embedCard.js +4 -2
- package/dist/esm/ui/Renderer/index.js +2 -2
- package/dist/types/react/nodes/embedCard.d.ts +4 -2
- package/dist/types/react/nodes/index.d.ts +1 -0
- package/dist/types/types/smartLinksOptions.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/embedCard.d.ts +4 -2
- package/dist/types-ts4.5/react/nodes/index.d.ts +1 -0
- package/dist/types-ts4.5/types/smartLinksOptions.d.ts +2 -0
- package/package.json +6 -6
- package/report.api.md +3 -0
- package/tmp/api-report-tmp.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 108.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c7f60374a72`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c7f60374a72) - The ReactSerializer will now re-render when the passed extensionHandlers changes. This is avoid SSR pages with dynamic macros breaking when re-renders is reduced. Add safety catch tests to avoid future breakages.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 108.13.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`3d5a4dfddba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3d5a4dfddba) - Make Smart Card frameStyle for embeds configurable via `@atlaskit/renderer`
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 108.12.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -31,7 +31,8 @@ function EmbedCard(props) {
|
|
|
31
31
|
layout = props.layout,
|
|
32
32
|
width = props.width,
|
|
33
33
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
34
|
-
rendererAppearance = props.rendererAppearance
|
|
34
|
+
rendererAppearance = props.rendererAppearance,
|
|
35
|
+
smartLinks = props.smartLinks;
|
|
35
36
|
var embedIframeRef = (0, _react2.useRef)(null);
|
|
36
37
|
var onClick = (0, _getCardClickHandler.getCardClickHandler)(eventHandlers, url);
|
|
37
38
|
var platform = (0, _react2.useMemo)(function () {
|
|
@@ -43,7 +44,8 @@ function EmbedCard(props) {
|
|
|
43
44
|
onClick: onClick,
|
|
44
45
|
container: portal,
|
|
45
46
|
platform: platform,
|
|
46
|
-
showActions: platform === 'web'
|
|
47
|
+
showActions: platform === 'web',
|
|
48
|
+
frameStyle: smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.frameStyle
|
|
47
49
|
};
|
|
48
50
|
var _useState = (0, _react2.useState)(null),
|
|
49
51
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
|
|
|
55
55
|
var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "108.
|
|
58
|
+
var packageVersion = "108.13.1";
|
|
59
59
|
var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
@@ -236,7 +236,7 @@ var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
236
236
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
237
237
|
var nextMedia = nextProps.media || {};
|
|
238
238
|
var media = this.props.media || {};
|
|
239
|
-
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
239
|
+
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
240
240
|
this.serializer = new _.ReactSerializer(this.deriveSerializerProps(nextProps));
|
|
241
241
|
}
|
|
242
242
|
}
|
|
@@ -38,7 +38,8 @@ export default function EmbedCard(props) {
|
|
|
38
38
|
layout,
|
|
39
39
|
width,
|
|
40
40
|
isInsideOfBlockNode,
|
|
41
|
-
rendererAppearance
|
|
41
|
+
rendererAppearance,
|
|
42
|
+
smartLinks
|
|
42
43
|
} = props;
|
|
43
44
|
const embedIframeRef = useRef(null);
|
|
44
45
|
const onClick = getCardClickHandler(eventHandlers, url);
|
|
@@ -49,7 +50,8 @@ export default function EmbedCard(props) {
|
|
|
49
50
|
onClick,
|
|
50
51
|
container: portal,
|
|
51
52
|
platform,
|
|
52
|
-
showActions: platform === 'web'
|
|
53
|
+
showActions: platform === 'web',
|
|
54
|
+
frameStyle: smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.frameStyle
|
|
53
55
|
};
|
|
54
56
|
const [liveHeight, setLiveHeight] = useState(null);
|
|
55
57
|
const [aspectRatio, setAspectRatio] = useState();
|
|
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
35
35
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
36
36
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
37
37
|
const packageName = "@atlaskit/renderer";
|
|
38
|
-
const packageVersion = "108.
|
|
38
|
+
const packageVersion = "108.13.1";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
|
@@ -212,7 +212,7 @@ export class Renderer extends PureComponent {
|
|
|
212
212
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
213
213
|
const nextMedia = nextProps.media || {};
|
|
214
214
|
const media = this.props.media || {};
|
|
215
|
-
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
215
|
+
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
216
216
|
this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
|
|
217
217
|
}
|
|
218
218
|
}
|
|
@@ -24,7 +24,8 @@ export default function EmbedCard(props) {
|
|
|
24
24
|
layout = props.layout,
|
|
25
25
|
width = props.width,
|
|
26
26
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
27
|
-
rendererAppearance = props.rendererAppearance
|
|
27
|
+
rendererAppearance = props.rendererAppearance,
|
|
28
|
+
smartLinks = props.smartLinks;
|
|
28
29
|
var embedIframeRef = useRef(null);
|
|
29
30
|
var onClick = getCardClickHandler(eventHandlers, url);
|
|
30
31
|
var platform = useMemo(function () {
|
|
@@ -36,7 +37,8 @@ export default function EmbedCard(props) {
|
|
|
36
37
|
onClick: onClick,
|
|
37
38
|
container: portal,
|
|
38
39
|
platform: platform,
|
|
39
|
-
showActions: platform === 'web'
|
|
40
|
+
showActions: platform === 'web',
|
|
41
|
+
frameStyle: smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.frameStyle
|
|
40
42
|
};
|
|
41
43
|
var _useState = useState(null),
|
|
42
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
45
45
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "108.
|
|
48
|
+
var packageVersion = "108.13.1";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
|
@@ -226,7 +226,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
226
226
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
227
227
|
var nextMedia = nextProps.media || {};
|
|
228
228
|
var media = this.props.media || {};
|
|
229
|
-
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
229
|
+
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
230
230
|
this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { SmartLinksOptions } from '../../types/smartLinksOptions';
|
|
3
4
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
5
|
-
import { RendererAppearance } from '../../ui/Renderer/types';
|
|
5
|
+
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
6
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
6
7
|
export default function EmbedCard(props: {
|
|
7
8
|
url?: string;
|
|
8
9
|
data?: object;
|
|
@@ -14,4 +15,5 @@ export default function EmbedCard(props: {
|
|
|
14
15
|
layout: RichMediaLayout;
|
|
15
16
|
rendererAppearance?: RendererAppearance;
|
|
16
17
|
isInsideOfBlockNode?: boolean;
|
|
18
|
+
smartLinks?: SmartLinksOptions;
|
|
17
19
|
}): jsx.JSX.Element;
|
|
@@ -43,6 +43,7 @@ declare const EmbedCard: React.ComponentType<{
|
|
|
43
43
|
layout: import("@atlaskit/adf-schema").RichMediaLayout;
|
|
44
44
|
rendererAppearance?: import("../../ui/Renderer/types").RendererAppearance;
|
|
45
45
|
isInsideOfBlockNode?: boolean | undefined;
|
|
46
|
+
smartLinks?: import("../../types/smartLinksOptions").SmartLinksOptions | undefined;
|
|
46
47
|
}> & Loadable.LoadableComponent;
|
|
47
48
|
declare const InlineCard: React.ComponentType<import("@atlaskit/editor-common/utils").Diff<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, import("../../ui/SmartCardStorage").WithSmartCardStorageProps>> & Loadable.LoadableComponent;
|
|
48
49
|
declare const BlockCard: React.ComponentType<{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { SmartLinksOptions } from '../../types/smartLinksOptions';
|
|
3
4
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
5
|
-
import { RendererAppearance } from '../../ui/Renderer/types';
|
|
5
|
+
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
6
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
6
7
|
export default function EmbedCard(props: {
|
|
7
8
|
url?: string;
|
|
8
9
|
data?: object;
|
|
@@ -14,4 +15,5 @@ export default function EmbedCard(props: {
|
|
|
14
15
|
layout: RichMediaLayout;
|
|
15
16
|
rendererAppearance?: RendererAppearance;
|
|
16
17
|
isInsideOfBlockNode?: boolean;
|
|
18
|
+
smartLinks?: SmartLinksOptions;
|
|
17
19
|
}): jsx.JSX.Element;
|
|
@@ -43,6 +43,7 @@ declare const EmbedCard: React.ComponentType<{
|
|
|
43
43
|
layout: import("@atlaskit/adf-schema").RichMediaLayout;
|
|
44
44
|
rendererAppearance?: import("../../ui/Renderer/types").RendererAppearance;
|
|
45
45
|
isInsideOfBlockNode?: boolean | undefined;
|
|
46
|
+
smartLinks?: import("../../types/smartLinksOptions").SmartLinksOptions | undefined;
|
|
46
47
|
}> & Loadable.LoadableComponent;
|
|
47
48
|
declare const InlineCard: React.ComponentType<import("@atlaskit/editor-common/utils").Diff<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, import("../../ui/SmartCardStorage").WithSmartCardStorageProps>> & Loadable.LoadableComponent;
|
|
48
49
|
declare const BlockCard: React.ComponentType<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "108.
|
|
3
|
+
"version": "108.13.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
32
32
|
"@atlaskit/button": "^16.10.0",
|
|
33
33
|
"@atlaskit/code": "^14.6.0",
|
|
34
|
-
"@atlaskit/editor-common": "^75.
|
|
34
|
+
"@atlaskit/editor-common": "^75.1.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.5.1",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
38
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
38
|
+
"@atlaskit/editor-shared-styles": "^2.7.0",
|
|
39
39
|
"@atlaskit/emoji": "^67.5.0",
|
|
40
40
|
"@atlaskit/icon": "^21.12.0",
|
|
41
|
-
"@atlaskit/link-datasource": "^1.
|
|
41
|
+
"@atlaskit/link-datasource": "^1.2.0",
|
|
42
42
|
"@atlaskit/media-card": "^77.0.0",
|
|
43
43
|
"@atlaskit/media-client": "^24.0.0",
|
|
44
44
|
"@atlaskit/media-common": "^9.0.0",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@atlaskit/media-ui": "^25.0.0",
|
|
47
47
|
"@atlaskit/media-viewer": "^48.0.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
49
|
-
"@atlaskit/smart-card": "^26.
|
|
49
|
+
"@atlaskit/smart-card": "^26.26.0",
|
|
50
50
|
"@atlaskit/status": "^1.3.0",
|
|
51
|
-
"@atlaskit/task-decision": "^17.
|
|
51
|
+
"@atlaskit/task-decision": "^17.9.0",
|
|
52
52
|
"@atlaskit/theme": "^12.6.0",
|
|
53
53
|
"@atlaskit/tokens": "^1.22.0",
|
|
54
54
|
"@atlaskit/tooltip": "^17.8.0",
|
package/report.api.md
CHANGED
|
@@ -22,6 +22,7 @@ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
|
22
22
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
23
23
|
import type { ADFStage } from '@atlaskit/editor-common/validator';
|
|
24
24
|
import type { AnnotationProviders } from '@atlaskit/editor-common/types';
|
|
25
|
+
import type { CardProps } from '@atlaskit/smart-card';
|
|
25
26
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
26
27
|
import { DocNode } from '@atlaskit/adf-schema';
|
|
27
28
|
import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
|
|
@@ -645,6 +646,8 @@ export interface Serializer<T> {
|
|
|
645
646
|
|
|
646
647
|
// @public (undocumented)
|
|
647
648
|
interface SmartLinksOptions {
|
|
649
|
+
// (undocumented)
|
|
650
|
+
frameStyle?: CardProps['frameStyle'];
|
|
648
651
|
// (undocumented)
|
|
649
652
|
showAuthTooltip?: boolean;
|
|
650
653
|
// (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
|
11
11
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import type { ADFStage } from '@atlaskit/editor-common/validator';
|
|
13
13
|
import type { AnnotationProviders } from '@atlaskit/editor-common/types';
|
|
14
|
+
import type { CardProps } from '@atlaskit/smart-card';
|
|
14
15
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
15
16
|
import { DocNode } from '@atlaskit/adf-schema';
|
|
16
17
|
import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
|
|
@@ -472,6 +473,8 @@ export interface Serializer<T> {
|
|
|
472
473
|
|
|
473
474
|
// @public (undocumented)
|
|
474
475
|
interface SmartLinksOptions {
|
|
476
|
+
// (undocumented)
|
|
477
|
+
frameStyle?: CardProps['frameStyle'];
|
|
475
478
|
// (undocumented)
|
|
476
479
|
showAuthTooltip?: boolean;
|
|
477
480
|
// (undocumented)
|