@atlaskit/renderer 118.6.7 → 118.6.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 +9 -0
- package/dist/cjs/ui/ExtensionRenderer.js +9 -14
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/ExtensionRenderer.js +8 -12
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/ExtensionRenderer.js +9 -14
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/ui/ExtensionRenderer.d.ts +1 -3
- package/dist/types-ts4.5/ui/ExtensionRenderer.d.ts +1 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 118.6.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#166323](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166323)
|
|
8
|
+
[`51519a7335b4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51519a7335b4d) -
|
|
9
|
+
[ux] Remove 1px margin top from inline macro wrapper that is causing hydration shift
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 118.6.7
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -19,21 +19,18 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
19
19
|
*/
|
|
20
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
21
|
|
|
22
|
-
// When running on server-side emotion will generate style tags before elements.
|
|
23
|
-
// This caused packages/editor/editor-common/src/styles/shared/block-marks.ts to override the margin-top.
|
|
24
|
-
// However as soon as the styles are extracted to <head> it adds back the margin.
|
|
25
|
-
// The timing is tricky as it happens to be when UFO collects the dimension for the placeholder for TTVC calculation.
|
|
26
|
-
// This resulted 1px mismatch on the image. Further cause everything on page to shift by 1px.
|
|
27
|
-
var forceMarginTopStyle = (0, _react.css)({
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
29
|
-
marginTop: "1px !important"
|
|
30
|
-
});
|
|
31
22
|
var inlineExtensionStyle = (0, _react.css)({
|
|
32
23
|
display: 'inline-block',
|
|
33
24
|
maxWidth: '100%',
|
|
34
25
|
verticalAlign: 'middle',
|
|
26
|
+
// 0px margin top is important here.
|
|
27
|
+
// When running on server-side emotion will generate style tags before elements.
|
|
28
|
+
// This caused packages/editor/editor-common/src/styles/shared/block-marks.ts to override the margin-top.
|
|
29
|
+
// However as soon as the styles are extracted to <head> it adds back the margin.
|
|
30
|
+
// The timing is tricky as it happens to be when UFO collects the dimension for the placeholder for TTVC calculation.
|
|
31
|
+
// This resulted 1px mismatch on the image. Further cause everything on page to shift by 1px.
|
|
35
32
|
// es-lint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
36
|
-
margin: "
|
|
33
|
+
margin: "0px 1px ".concat("var(--ds-space-050, 4px)"),
|
|
37
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
38
35
|
'& .rich-media-item': {
|
|
39
36
|
maxWidth: '100%'
|
|
@@ -137,12 +134,10 @@ function ExtensionRenderer(props) {
|
|
|
137
134
|
});
|
|
138
135
|
}
|
|
139
136
|
var InlineNodeRendererWrapper = exports.InlineNodeRendererWrapper = function InlineNodeRendererWrapper(_ref) {
|
|
140
|
-
var
|
|
141
|
-
forceMarginTop = _ref$forceMarginTop === void 0 ? false : _ref$forceMarginTop,
|
|
142
|
-
children = _ref.children;
|
|
137
|
+
var children = _ref.children;
|
|
143
138
|
return (0, _react.jsx)("div", {
|
|
144
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
145
140
|
className: "inline-extension-renderer",
|
|
146
|
-
css:
|
|
141
|
+
css: inlineExtensionStyle
|
|
147
142
|
}, children);
|
|
148
143
|
};
|
|
@@ -62,7 +62,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
62
62
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
63
63
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "118.6.
|
|
65
|
+
var packageVersion = "118.6.8";
|
|
66
66
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -9,21 +9,18 @@ import memoizeOne from 'memoize-one';
|
|
|
9
9
|
import { getNodeRenderer } from '@atlaskit/editor-common/extensions';
|
|
10
10
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
11
11
|
import { getExtensionRenderer } from '@atlaskit/editor-common/utils';
|
|
12
|
-
// When running on server-side emotion will generate style tags before elements.
|
|
13
|
-
// This caused packages/editor/editor-common/src/styles/shared/block-marks.ts to override the margin-top.
|
|
14
|
-
// However as soon as the styles are extracted to <head> it adds back the margin.
|
|
15
|
-
// The timing is tricky as it happens to be when UFO collects the dimension for the placeholder for TTVC calculation.
|
|
16
|
-
// This resulted 1px mismatch on the image. Further cause everything on page to shift by 1px.
|
|
17
|
-
const forceMarginTopStyle = css({
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
19
|
-
marginTop: `1px !important`
|
|
20
|
-
});
|
|
21
12
|
const inlineExtensionStyle = css({
|
|
22
13
|
display: 'inline-block',
|
|
23
14
|
maxWidth: '100%',
|
|
24
15
|
verticalAlign: 'middle',
|
|
16
|
+
// 0px margin top is important here.
|
|
17
|
+
// When running on server-side emotion will generate style tags before elements.
|
|
18
|
+
// This caused packages/editor/editor-common/src/styles/shared/block-marks.ts to override the margin-top.
|
|
19
|
+
// However as soon as the styles are extracted to <head> it adds back the margin.
|
|
20
|
+
// The timing is tricky as it happens to be when UFO collects the dimension for the placeholder for TTVC calculation.
|
|
21
|
+
// This resulted 1px mismatch on the image. Further cause everything on page to shift by 1px.
|
|
25
22
|
// es-lint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
26
|
-
margin: `
|
|
23
|
+
margin: `0px 1px ${"var(--ds-space-050, 4px)"}`,
|
|
27
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
28
25
|
'& .rich-media-item': {
|
|
29
26
|
maxWidth: '100%'
|
|
@@ -122,12 +119,11 @@ export default function ExtensionRenderer(props) {
|
|
|
122
119
|
});
|
|
123
120
|
}
|
|
124
121
|
export const InlineNodeRendererWrapper = ({
|
|
125
|
-
forceMarginTop = false,
|
|
126
122
|
children
|
|
127
123
|
}) => {
|
|
128
124
|
return jsx("div", {
|
|
129
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
130
126
|
className: "inline-extension-renderer",
|
|
131
|
-
css:
|
|
127
|
+
css: inlineExtensionStyle
|
|
132
128
|
}, children);
|
|
133
129
|
};
|
|
@@ -48,7 +48,7 @@ import { PortalContext } from './PortalContext';
|
|
|
48
48
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
49
49
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
50
50
|
const packageName = "@atlaskit/renderer";
|
|
51
|
-
const packageVersion = "118.6.
|
|
51
|
+
const packageVersion = "118.6.8";
|
|
52
52
|
const setAsQueryContainerStyles = css({
|
|
53
53
|
containerName: 'ak-renderer-wrapper',
|
|
54
54
|
containerType: 'inline-size'
|
|
@@ -10,21 +10,18 @@ import memoizeOne from 'memoize-one';
|
|
|
10
10
|
import { getNodeRenderer } from '@atlaskit/editor-common/extensions';
|
|
11
11
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
12
12
|
import { getExtensionRenderer } from '@atlaskit/editor-common/utils';
|
|
13
|
-
// When running on server-side emotion will generate style tags before elements.
|
|
14
|
-
// This caused packages/editor/editor-common/src/styles/shared/block-marks.ts to override the margin-top.
|
|
15
|
-
// However as soon as the styles are extracted to <head> it adds back the margin.
|
|
16
|
-
// The timing is tricky as it happens to be when UFO collects the dimension for the placeholder for TTVC calculation.
|
|
17
|
-
// This resulted 1px mismatch on the image. Further cause everything on page to shift by 1px.
|
|
18
|
-
var forceMarginTopStyle = css({
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
20
|
-
marginTop: "1px !important"
|
|
21
|
-
});
|
|
22
13
|
var inlineExtensionStyle = css({
|
|
23
14
|
display: 'inline-block',
|
|
24
15
|
maxWidth: '100%',
|
|
25
16
|
verticalAlign: 'middle',
|
|
17
|
+
// 0px margin top is important here.
|
|
18
|
+
// When running on server-side emotion will generate style tags before elements.
|
|
19
|
+
// This caused packages/editor/editor-common/src/styles/shared/block-marks.ts to override the margin-top.
|
|
20
|
+
// However as soon as the styles are extracted to <head> it adds back the margin.
|
|
21
|
+
// The timing is tricky as it happens to be when UFO collects the dimension for the placeholder for TTVC calculation.
|
|
22
|
+
// This resulted 1px mismatch on the image. Further cause everything on page to shift by 1px.
|
|
26
23
|
// es-lint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
27
|
-
margin: "
|
|
24
|
+
margin: "0px 1px ".concat("var(--ds-space-050, 4px)"),
|
|
28
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
26
|
'& .rich-media-item': {
|
|
30
27
|
maxWidth: '100%'
|
|
@@ -128,12 +125,10 @@ export default function ExtensionRenderer(props) {
|
|
|
128
125
|
});
|
|
129
126
|
}
|
|
130
127
|
export var InlineNodeRendererWrapper = function InlineNodeRendererWrapper(_ref) {
|
|
131
|
-
var
|
|
132
|
-
forceMarginTop = _ref$forceMarginTop === void 0 ? false : _ref$forceMarginTop,
|
|
133
|
-
children = _ref.children;
|
|
128
|
+
var children = _ref.children;
|
|
134
129
|
return jsx("div", {
|
|
135
130
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
136
131
|
className: "inline-extension-renderer",
|
|
137
|
-
css:
|
|
132
|
+
css: inlineExtensionStyle
|
|
138
133
|
}, children);
|
|
139
134
|
};
|
|
@@ -53,7 +53,7 @@ import { PortalContext } from './PortalContext';
|
|
|
53
53
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
54
54
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
55
55
|
var packageName = "@atlaskit/renderer";
|
|
56
|
-
var packageVersion = "118.6.
|
|
56
|
+
var packageVersion = "118.6.8";
|
|
57
57
|
var setAsQueryContainerStyles = css({
|
|
58
58
|
containerName: 'ak-renderer-wrapper',
|
|
59
59
|
containerType: 'inline-size'
|
|
@@ -28,7 +28,5 @@ interface Props {
|
|
|
28
28
|
}) => JSX.Element;
|
|
29
29
|
}
|
|
30
30
|
export default function ExtensionRenderer(props: Props): JSX.Element;
|
|
31
|
-
export declare const InlineNodeRendererWrapper: ({
|
|
32
|
-
forceMarginTop?: boolean | undefined;
|
|
33
|
-
}>) => jsx.JSX.Element;
|
|
31
|
+
export declare const InlineNodeRendererWrapper: ({ children }: React.PropsWithChildren<unknown>) => jsx.JSX.Element;
|
|
34
32
|
export {};
|
|
@@ -28,7 +28,5 @@ interface Props {
|
|
|
28
28
|
}) => JSX.Element;
|
|
29
29
|
}
|
|
30
30
|
export default function ExtensionRenderer(props: Props): JSX.Element;
|
|
31
|
-
export declare const InlineNodeRendererWrapper: ({
|
|
32
|
-
forceMarginTop?: boolean | undefined;
|
|
33
|
-
}>) => jsx.JSX.Element;
|
|
31
|
+
export declare const InlineNodeRendererWrapper: ({ children }: React.PropsWithChildren<unknown>) => jsx.JSX.Element;
|
|
34
32
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "118.6.
|
|
3
|
+
"version": "118.6.8",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
32
32
|
"@atlaskit/button": "^23.2.0",
|
|
33
33
|
"@atlaskit/code": "^17.2.0",
|
|
34
|
-
"@atlaskit/editor-common": "^106.
|
|
34
|
+
"@atlaskit/editor-common": "^106.2.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
39
39
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
40
|
-
"@atlaskit/emoji": "^69.
|
|
40
|
+
"@atlaskit/emoji": "^69.3.0",
|
|
41
41
|
"@atlaskit/feature-gate-js-client": "^5.3.0",
|
|
42
42
|
"@atlaskit/icon": "^26.4.0",
|
|
43
43
|
"@atlaskit/link": "^3.2.0",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
54
54
|
"@atlaskit/react-ufo": "^3.13.0",
|
|
55
|
-
"@atlaskit/smart-card": "^38.
|
|
55
|
+
"@atlaskit/smart-card": "^38.7.0",
|
|
56
56
|
"@atlaskit/status": "^3.0.0",
|
|
57
57
|
"@atlaskit/task-decision": "^19.2.0",
|
|
58
58
|
"@atlaskit/theme": "^18.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^5.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^5.12.0",
|
|
60
60
|
"@atlaskit/tokens": "^5.0.0",
|
|
61
61
|
"@atlaskit/tooltip": "^20.3.0",
|
|
62
62
|
"@atlaskit/visually-hidden": "^3.0.0",
|