@atlaskit/renderer 113.2.0 → 113.2.2
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 +14 -0
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1369 -0
- package/dist/cjs/ui/Renderer/get-base-font-size.js +10 -0
- package/dist/cjs/ui/Renderer/index.js +13 -16
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1742 -0
- package/dist/es2019/ui/Renderer/get-base-font-size.js +4 -0
- package/dist/es2019/ui/Renderer/index.js +14 -17
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +1362 -0
- package/dist/esm/ui/Renderer/get-base-font-size.js +4 -0
- package/dist/esm/ui/Renderer/index.js +14 -17
- package/dist/types/ui/Renderer/RendererStyleContainer.d.ts +11 -0
- package/dist/types/ui/Renderer/get-base-font-size.d.ts +2 -0
- package/dist/types/ui/Renderer/index.d.ts +23 -0
- package/dist/types-ts4.5/ui/Renderer/RendererStyleContainer.d.ts +11 -0
- package/dist/types-ts4.5/ui/Renderer/get-base-font-size.d.ts +2 -0
- package/dist/types-ts4.5/ui/Renderer/index.d.ts +23 -0
- package/package.json +16 -7
|
@@ -31,7 +31,6 @@ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
|
31
31
|
import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
32
32
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
33
33
|
import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
34
|
-
import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
|
|
35
34
|
import memoizeOne from 'memoize-one';
|
|
36
35
|
import uuid from 'uuid/v4';
|
|
37
36
|
import { ReactSerializer, renderDocument } from '../../';
|
|
@@ -49,13 +48,15 @@ import { ErrorBoundary } from './ErrorBoundary';
|
|
|
49
48
|
import { BreakoutSSRInlineScript } from './breakout-ssr';
|
|
50
49
|
import { isInteractiveElement } from './click-to-edit';
|
|
51
50
|
import { countNodes } from './count-nodes';
|
|
52
|
-
import { TELEPOINTER_ID
|
|
51
|
+
import { TELEPOINTER_ID } from './style';
|
|
53
52
|
import { TruncatedWrapper } from './truncated-wrapper';
|
|
54
53
|
import { ValidationContext } from './ValidationContext';
|
|
54
|
+
import { RendererStyleContainer } from './RendererStyleContainer';
|
|
55
|
+
import { getBaseFontSize } from './get-base-font-size';
|
|
55
56
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
57
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
58
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "113.2.
|
|
59
|
+
var packageVersion = "113.2.2";
|
|
59
60
|
var setAsQueryContainerStyles = css({
|
|
60
61
|
containerName: 'ak-renderer-wrapper',
|
|
61
62
|
containerType: 'inline-size',
|
|
@@ -953,23 +954,19 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
953
954
|
"data-appearance": appearance,
|
|
954
955
|
shouldCheckExistingValue: isInsideOfInlineExtension
|
|
955
956
|
}, jsx(BaseTheme, {
|
|
956
|
-
baseFontSize: appearance
|
|
957
|
+
baseFontSize: getBaseFontSize(appearance)
|
|
957
958
|
}, jsx(EditorMediaClientProvider, {
|
|
958
959
|
ssr: ssr
|
|
959
|
-
}, jsx(
|
|
960
|
-
|
|
960
|
+
}, jsx(RendererStyleContainer, {
|
|
961
|
+
innerRef: innerRef,
|
|
961
962
|
onClick: onClick,
|
|
962
|
-
onMouseDown: onMouseDown
|
|
963
|
-
|
|
964
|
-
,
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
|
|
970
|
-
allowAnnotations: props.allowAnnotations,
|
|
971
|
-
allowTableResizing: allowTableResizing
|
|
972
|
-
})
|
|
963
|
+
onMouseDown: onMouseDown,
|
|
964
|
+
appearance: appearance,
|
|
965
|
+
allowNestedHeaderLinks: allowNestedHeaderLinks,
|
|
966
|
+
allowColumnSorting: !!allowColumnSorting,
|
|
967
|
+
useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
|
|
968
|
+
allowAnnotations: props.allowAnnotations,
|
|
969
|
+
allowTableResizing: allowTableResizing
|
|
973
970
|
}, children))));
|
|
974
971
|
|
|
975
972
|
// We can only make the wrapper div query container when we have a known width.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
|
+
import { type RendererWrapperProps } from './index';
|
|
7
|
+
type RendererStyleContainerProps = Pick<RendererWrapperProps, 'onClick' | 'onMouseDown' | 'appearance' | 'allowNestedHeaderLinks' | 'allowColumnSorting' | 'useBlockRenderForCodeBlock' | 'allowAnnotations' | 'allowTableResizing' | 'innerRef' | 'children'> & {
|
|
8
|
+
testId?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const RendererStyleContainer: (props: RendererStyleContainerProps) => jsx.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { PureComponent } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import type { MediaSSR } from '../../';
|
|
7
8
|
import type { RendererProps } from '../renderer-props';
|
|
9
|
+
import type { RendererAppearance } from './types';
|
|
8
10
|
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
9
11
|
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
10
12
|
/**
|
|
@@ -44,5 +46,26 @@ export declare class __RendererClassComponent extends PureComponent<RendererProp
|
|
|
44
46
|
}
|
|
45
47
|
export declare function Renderer(props: RendererProps): jsx.JSX.Element;
|
|
46
48
|
export declare const RendererWithAnalytics: React.MemoExoticComponent<(props: RendererProps) => jsx.JSX.Element>;
|
|
49
|
+
export type RendererWrapperProps = {
|
|
50
|
+
allowAnnotations?: boolean;
|
|
51
|
+
appearance: RendererAppearance;
|
|
52
|
+
innerRef?: React.RefObject<HTMLDivElement>;
|
|
53
|
+
allowColumnSorting?: boolean;
|
|
54
|
+
allowCopyToClipboard?: boolean;
|
|
55
|
+
allowWrapCodeBlock?: boolean;
|
|
56
|
+
allowPlaceholderText?: boolean;
|
|
57
|
+
allowCustomPanels?: boolean;
|
|
58
|
+
addTelepointer?: boolean;
|
|
59
|
+
allowNestedHeaderLinks: boolean;
|
|
60
|
+
useBlockRenderForCodeBlock: boolean;
|
|
61
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
62
|
+
onMouseDown?: (event: React.MouseEvent) => void;
|
|
63
|
+
ssr?: MediaSSR;
|
|
64
|
+
isInsideOfInlineExtension?: boolean;
|
|
65
|
+
allowTableResizing?: boolean;
|
|
66
|
+
isTopLevelRenderer?: boolean;
|
|
67
|
+
} & {
|
|
68
|
+
children?: React.ReactNode;
|
|
69
|
+
};
|
|
47
70
|
declare const RendererWithAnnotationSelection: (props: RendererProps) => jsx.JSX.Element;
|
|
48
71
|
export default RendererWithAnnotationSelection;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
|
+
import { type RendererWrapperProps } from './index';
|
|
7
|
+
type RendererStyleContainerProps = Pick<RendererWrapperProps, 'onClick' | 'onMouseDown' | 'appearance' | 'allowNestedHeaderLinks' | 'allowColumnSorting' | 'useBlockRenderForCodeBlock' | 'allowAnnotations' | 'allowTableResizing' | 'innerRef' | 'children'> & {
|
|
8
|
+
testId?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const RendererStyleContainer: (props: RendererStyleContainerProps) => jsx.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { PureComponent } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import type { MediaSSR } from '../../';
|
|
7
8
|
import type { RendererProps } from '../renderer-props';
|
|
9
|
+
import type { RendererAppearance } from './types';
|
|
8
10
|
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
9
11
|
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
10
12
|
/**
|
|
@@ -44,5 +46,26 @@ export declare class __RendererClassComponent extends PureComponent<RendererProp
|
|
|
44
46
|
}
|
|
45
47
|
export declare function Renderer(props: RendererProps): jsx.JSX.Element;
|
|
46
48
|
export declare const RendererWithAnalytics: React.MemoExoticComponent<(props: RendererProps) => jsx.JSX.Element>;
|
|
49
|
+
export type RendererWrapperProps = {
|
|
50
|
+
allowAnnotations?: boolean;
|
|
51
|
+
appearance: RendererAppearance;
|
|
52
|
+
innerRef?: React.RefObject<HTMLDivElement>;
|
|
53
|
+
allowColumnSorting?: boolean;
|
|
54
|
+
allowCopyToClipboard?: boolean;
|
|
55
|
+
allowWrapCodeBlock?: boolean;
|
|
56
|
+
allowPlaceholderText?: boolean;
|
|
57
|
+
allowCustomPanels?: boolean;
|
|
58
|
+
addTelepointer?: boolean;
|
|
59
|
+
allowNestedHeaderLinks: boolean;
|
|
60
|
+
useBlockRenderForCodeBlock: boolean;
|
|
61
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
62
|
+
onMouseDown?: (event: React.MouseEvent) => void;
|
|
63
|
+
ssr?: MediaSSR;
|
|
64
|
+
isInsideOfInlineExtension?: boolean;
|
|
65
|
+
allowTableResizing?: boolean;
|
|
66
|
+
isTopLevelRenderer?: boolean;
|
|
67
|
+
} & {
|
|
68
|
+
children?: React.ReactNode;
|
|
69
|
+
};
|
|
47
70
|
declare const RendererWithAnnotationSelection: (props: RendererProps) => jsx.JSX.Element;
|
|
48
71
|
export default RendererWithAnnotationSelection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "113.2.
|
|
3
|
+
"version": "113.2.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
32
32
|
"@atlaskit/button": "^21.1.0",
|
|
33
33
|
"@atlaskit/code": "^16.0.0",
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^102.0.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
36
|
-
"@atlaskit/editor-palette": "2.0.0",
|
|
36
|
+
"@atlaskit/editor-palette": "^2.0.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
39
39
|
"@atlaskit/emoji": "^68.0.0",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"react-dom": "^18.2.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@af/integration-testing": "
|
|
76
|
-
"@af/visual-regression": "
|
|
75
|
+
"@af/integration-testing": "^0.5.0",
|
|
76
|
+
"@af/visual-regression": "^1.3.0",
|
|
77
77
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
78
78
|
"@atlaskit/css-reset": "^7.0.0",
|
|
79
79
|
"@atlaskit/link-provider": "^2.0.0",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@atlaskit/mention": "^24.1.0",
|
|
86
86
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-d1445f2f74.patch",
|
|
87
87
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
88
|
-
"@atlaskit/visual-regression": "
|
|
89
|
-
"@atlassian/feature-flags-test-utils": "
|
|
88
|
+
"@atlaskit/visual-regression": "^0.10.0",
|
|
89
|
+
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
90
90
|
"@testing-library/react": "^13.4.0",
|
|
91
91
|
"@testing-library/react-hooks": "^8.0.1",
|
|
92
92
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -118,6 +118,15 @@
|
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
"platform-feature-flags": {
|
|
121
|
+
"platform_editor_heading_margin_fix": {
|
|
122
|
+
"type": "boolean"
|
|
123
|
+
},
|
|
124
|
+
"platform_editor_typography_ugc": {
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
"platform_editor_emotion_refactor_renderer": {
|
|
128
|
+
"type": "boolean"
|
|
129
|
+
},
|
|
121
130
|
"platform_editor_update_panel_icon_aria_label": {
|
|
122
131
|
"type": "boolean"
|
|
123
132
|
},
|