@atlaskit/renderer 130.3.6 → 130.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +5 -2
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +5 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +3 -2
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +3 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +5 -2
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +5 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/codeBlock/codeBlock.d.ts +1 -0
- package/dist/types/react/nodes/codeBlock/windowedCodeBlock.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/codeBlock/codeBlock.d.ts +1 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/windowedCodeBlock.d.ts +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 130.3.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 130.3.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`4969431d7e397`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4969431d7e397) -
|
|
14
|
+
[ux] EDITOR-6726 Initialise renderer code block wrapping from the ADF wrap attribute
|
|
15
|
+
|
|
3
16
|
## 130.3.6
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -29,10 +29,13 @@ function CodeBlock(props) {
|
|
|
29
29
|
_props$allowWrapCodeB = props.allowWrapCodeBlock,
|
|
30
30
|
allowWrapCodeBlock = _props$allowWrapCodeB === void 0 ? false : _props$allowWrapCodeB,
|
|
31
31
|
codeBidiWarningTooltipEnabled = props.codeBidiWarningTooltipEnabled,
|
|
32
|
-
localId = props.localId
|
|
32
|
+
localId = props.localId,
|
|
33
|
+
wrap = props.wrap;
|
|
33
34
|
var codeBidiWarningLabel = props.intl.formatMessage(_messages.codeBidiWarningMessages.label);
|
|
34
35
|
var className = [_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
|
|
35
|
-
var _useState = (0, _react.useState)(
|
|
36
|
+
var _useState = (0, _react.useState)(function () {
|
|
37
|
+
return (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap);
|
|
38
|
+
}),
|
|
36
39
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
37
40
|
wrapLongLines = _useState2[0],
|
|
38
41
|
setWrapLongLines = _useState2[1];
|
|
@@ -53,7 +53,8 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
|
53
53
|
_ref2$allowWrapCodeBl = _ref2.allowWrapCodeBlock,
|
|
54
54
|
allowWrapCodeBlock = _ref2$allowWrapCodeBl === void 0 ? false : _ref2$allowWrapCodeBl,
|
|
55
55
|
codeBidiWarningTooltipEnabled = _ref2.codeBidiWarningTooltipEnabled,
|
|
56
|
-
rootClassName = _ref2.className
|
|
56
|
+
rootClassName = _ref2.className,
|
|
57
|
+
wrap = _ref2.wrap;
|
|
57
58
|
var _useBidiWarnings = (0, _useBidiWarnings2.useBidiWarnings)({
|
|
58
59
|
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
59
60
|
}),
|
|
@@ -70,7 +71,9 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
|
70
71
|
,
|
|
71
72
|
className: rootClassName
|
|
72
73
|
});
|
|
73
|
-
var _useState = (0, _react.useState)(
|
|
74
|
+
var _useState = (0, _react.useState)(function () {
|
|
75
|
+
return (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap);
|
|
76
|
+
}),
|
|
74
77
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
75
78
|
wrapLongLines = _useState2[0],
|
|
76
79
|
setWrapLongLines = _useState2[1];
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "
|
|
74
|
+
var packageVersion = "130.3.7";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -18,11 +18,12 @@ function CodeBlock(props) {
|
|
|
18
18
|
allowCopyToClipboard = false,
|
|
19
19
|
allowWrapCodeBlock = false,
|
|
20
20
|
codeBidiWarningTooltipEnabled,
|
|
21
|
-
localId
|
|
21
|
+
localId,
|
|
22
|
+
wrap
|
|
22
23
|
} = props;
|
|
23
24
|
const codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
|
|
24
25
|
const className = [CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
|
|
25
|
-
const [wrapLongLines, setWrapLongLines] = useState(
|
|
26
|
+
const [wrapLongLines, setWrapLongLines] = useState(() => expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap));
|
|
26
27
|
return jsx(CodeBlockContainer, {
|
|
27
28
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
28
29
|
allowWrapCodeBlock: allowWrapCodeBlock
|
|
@@ -24,7 +24,8 @@ const WindowedCodeBlock = ({
|
|
|
24
24
|
allowCopyToClipboard,
|
|
25
25
|
allowWrapCodeBlock = false,
|
|
26
26
|
codeBidiWarningTooltipEnabled,
|
|
27
|
-
className: rootClassName
|
|
27
|
+
className: rootClassName,
|
|
28
|
+
wrap
|
|
28
29
|
}) => {
|
|
29
30
|
const {
|
|
30
31
|
warningLabel
|
|
@@ -44,7 +45,7 @@ const WindowedCodeBlock = ({
|
|
|
44
45
|
,
|
|
45
46
|
className: rootClassName
|
|
46
47
|
});
|
|
47
|
-
const [wrapLongLines, setWrapLongLines] = useState(
|
|
48
|
+
const [wrapLongLines, setWrapLongLines] = useState(() => expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap));
|
|
48
49
|
return isInViewport ? jsx(Fragment, null, jsx(Suspense, {
|
|
49
50
|
fallback: memoizedLightWeightCodeBlock
|
|
50
51
|
}, jsx(CodeBlockContainer, {
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "
|
|
60
|
+
const packageVersion = "130.3.7";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -20,10 +20,13 @@ function CodeBlock(props) {
|
|
|
20
20
|
_props$allowWrapCodeB = props.allowWrapCodeBlock,
|
|
21
21
|
allowWrapCodeBlock = _props$allowWrapCodeB === void 0 ? false : _props$allowWrapCodeB,
|
|
22
22
|
codeBidiWarningTooltipEnabled = props.codeBidiWarningTooltipEnabled,
|
|
23
|
-
localId = props.localId
|
|
23
|
+
localId = props.localId,
|
|
24
|
+
wrap = props.wrap;
|
|
24
25
|
var codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
|
|
25
26
|
var className = [CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
|
|
26
|
-
var _useState = useState(
|
|
27
|
+
var _useState = useState(function () {
|
|
28
|
+
return expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap);
|
|
29
|
+
}),
|
|
27
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28
31
|
wrapLongLines = _useState2[0],
|
|
29
32
|
setWrapLongLines = _useState2[1];
|
|
@@ -44,7 +44,8 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
|
44
44
|
_ref2$allowWrapCodeBl = _ref2.allowWrapCodeBlock,
|
|
45
45
|
allowWrapCodeBlock = _ref2$allowWrapCodeBl === void 0 ? false : _ref2$allowWrapCodeBl,
|
|
46
46
|
codeBidiWarningTooltipEnabled = _ref2.codeBidiWarningTooltipEnabled,
|
|
47
|
-
rootClassName = _ref2.className
|
|
47
|
+
rootClassName = _ref2.className,
|
|
48
|
+
wrap = _ref2.wrap;
|
|
48
49
|
var _useBidiWarnings = useBidiWarnings({
|
|
49
50
|
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
50
51
|
}),
|
|
@@ -61,7 +62,9 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
|
61
62
|
,
|
|
62
63
|
className: rootClassName
|
|
63
64
|
});
|
|
64
|
-
var _useState = useState(
|
|
65
|
+
var _useState = useState(function () {
|
|
66
|
+
return expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap);
|
|
67
|
+
}),
|
|
65
68
|
_useState2 = _slicedToArray(_useState, 2),
|
|
66
69
|
wrapLongLines = _useState2[0],
|
|
67
70
|
setWrapLongLines = _useState2[1];
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "
|
|
65
|
+
var packageVersion = "130.3.7";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -13,6 +13,7 @@ export interface Props {
|
|
|
13
13
|
language: SupportedLanguages;
|
|
14
14
|
localId?: string;
|
|
15
15
|
text: string;
|
|
16
|
+
wrap?: boolean;
|
|
16
17
|
}
|
|
17
18
|
declare const _default_1: FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
18
19
|
WrappedComponent: ComponentType<Props & WrappedComponentProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { Props as CodeBlockProps } from './codeBlock';
|
|
3
|
-
declare const WindowedCodeBlock: ({ text, language, allowCopyToClipboard, allowWrapCodeBlock, codeBidiWarningTooltipEnabled, className: rootClassName, }: CodeBlockProps) => jsx.JSX.Element;
|
|
3
|
+
declare const WindowedCodeBlock: ({ text, language, allowCopyToClipboard, allowWrapCodeBlock, codeBidiWarningTooltipEnabled, className: rootClassName, wrap, }: CodeBlockProps) => jsx.JSX.Element;
|
|
4
4
|
export default WindowedCodeBlock;
|
|
@@ -13,6 +13,7 @@ export interface Props {
|
|
|
13
13
|
language: SupportedLanguages;
|
|
14
14
|
localId?: string;
|
|
15
15
|
text: string;
|
|
16
|
+
wrap?: boolean;
|
|
16
17
|
}
|
|
17
18
|
declare const _default_1: FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
18
19
|
WrappedComponent: ComponentType<Props & WrappedComponentProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { Props as CodeBlockProps } from './codeBlock';
|
|
3
|
-
declare const WindowedCodeBlock: ({ text, language, allowCopyToClipboard, allowWrapCodeBlock, codeBidiWarningTooltipEnabled, className: rootClassName, }: CodeBlockProps) => jsx.JSX.Element;
|
|
3
|
+
declare const WindowedCodeBlock: ({ text, language, allowCopyToClipboard, allowWrapCodeBlock, codeBidiWarningTooltipEnabled, className: rootClassName, wrap, }: CodeBlockProps) => jsx.JSX.Element;
|
|
4
4
|
export default WindowedCodeBlock;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "130.3.
|
|
3
|
+
"version": "130.3.8",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^52.
|
|
33
|
+
"@atlaskit/adf-schema": "^52.10.0",
|
|
34
34
|
"@atlaskit/adf-utils": "^19.29.0",
|
|
35
35
|
"@atlaskit/afm-i18n-platform-editor-renderer": "2.10.0",
|
|
36
36
|
"@atlaskit/analytics-listeners": "^10.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/editor-smart-link-draggable": "^0.5.0",
|
|
47
47
|
"@atlaskit/emoji": "^70.4.0",
|
|
48
48
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
49
|
-
"@atlaskit/icon": "^34.
|
|
49
|
+
"@atlaskit/icon": "^34.5.0",
|
|
50
50
|
"@atlaskit/link": "^3.4.0",
|
|
51
51
|
"@atlaskit/link-datasource": "^5.2.0",
|
|
52
52
|
"@atlaskit/link-extractors": "^2.4.0",
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
62
62
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
63
63
|
"@atlaskit/pragmatic-drag-and-drop": "^1.8.0",
|
|
64
|
-
"@atlaskit/react-ufo": "^5.
|
|
64
|
+
"@atlaskit/react-ufo": "^5.20.0",
|
|
65
65
|
"@atlaskit/smart-card": "^44.9.0",
|
|
66
66
|
"@atlaskit/status": "^4.0.0",
|
|
67
67
|
"@atlaskit/task-decision": "^20.0.0",
|
|
68
68
|
"@atlaskit/theme": "^23.2.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^78.0.0",
|
|
70
70
|
"@atlaskit/tokens": "^13.0.0",
|
|
71
|
-
"@atlaskit/tooltip": "^22.
|
|
71
|
+
"@atlaskit/tooltip": "^22.1.0",
|
|
72
72
|
"@atlaskit/visually-hidden": "^3.1.0",
|
|
73
73
|
"@babel/runtime": "^7.0.0",
|
|
74
74
|
"@compiled/react": "^0.20.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"uuid": "^3.1.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@atlaskit/editor-common": "^114.
|
|
83
|
+
"@atlaskit/editor-common": "^114.26.0",
|
|
84
84
|
"@atlaskit/link-provider": "^4.4.0",
|
|
85
85
|
"@atlaskit/media-core": "^37.0.0",
|
|
86
86
|
"react": "^18.2.0",
|