@atlaskit/renderer 91.0.0 → 93.0.0
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 +49 -0
- package/dist/cjs/analytics/enums.js +2 -0
- package/dist/cjs/react/marks/alignment.js +11 -12
- package/dist/cjs/react/marks/breakout.js +7 -9
- package/dist/cjs/react/marks/link.js +13 -6
- package/dist/cjs/react/nodes/codeBlock.js +17 -16
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +13 -11
- package/dist/cjs/react/nodes/embedCard.js +25 -33
- package/dist/cjs/react/nodes/heading-anchor.js +7 -6
- package/dist/cjs/react/nodes/heading.js +4 -2
- package/dist/cjs/react/nodes/layoutColumn.js +7 -2
- package/dist/cjs/react/nodes/media.js +7 -6
- package/dist/cjs/react/nodes/mediaSingle/index.js +15 -4
- package/dist/cjs/react/nodes/mediaSingle/styles.js +7 -10
- package/dist/cjs/react/nodes/panel.js +26 -16
- package/dist/cjs/react/nodes/table/sticky.js +63 -55
- package/dist/cjs/react/nodes/table.js +2 -10
- package/dist/cjs/react/utils/inject-props.js +33 -0
- package/dist/cjs/react/utils/performance/RenderTracking.js +52 -0
- package/dist/cjs/ui/Expand.js +52 -28
- package/dist/cjs/ui/MediaCard.js +4 -14
- package/dist/cjs/ui/Renderer/index.js +72 -64
- package/dist/cjs/ui/Renderer/style.js +62 -55
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +19 -21
- package/dist/cjs/ui/SortingIcon.js +8 -9
- package/dist/cjs/ui/annotations/draft/component.js +22 -12
- package/dist/cjs/ui/annotations/element/mark.js +9 -5
- package/dist/cjs/ui/renderer-props.js +1 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/enums.js +2 -0
- package/dist/es2019/react/marks/alignment.js +15 -7
- package/dist/es2019/react/marks/breakout.js +6 -5
- package/dist/es2019/react/marks/link.js +8 -5
- package/dist/es2019/react/nodes/codeBlock.js +25 -23
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +12 -9
- package/dist/es2019/react/nodes/embedCard.js +16 -16
- package/dist/es2019/react/nodes/heading-anchor.js +9 -6
- package/dist/es2019/react/nodes/heading.js +4 -2
- package/dist/es2019/react/nodes/layoutColumn.js +7 -3
- package/dist/es2019/react/nodes/media.js +9 -5
- package/dist/es2019/react/nodes/mediaSingle/index.js +10 -6
- package/dist/es2019/react/nodes/mediaSingle/styles.js +6 -7
- package/dist/es2019/react/nodes/panel.js +23 -16
- package/dist/es2019/react/nodes/table/sticky.js +55 -37
- package/dist/es2019/react/nodes/table.js +2 -5
- package/dist/es2019/react/utils/inject-props.js +24 -0
- package/dist/es2019/react/utils/performance/RenderTracking.js +37 -0
- package/dist/es2019/ui/Expand.js +65 -36
- package/dist/es2019/ui/MediaCard.js +3 -6
- package/dist/es2019/ui/Renderer/index.js +72 -57
- package/dist/es2019/ui/Renderer/style.js +370 -327
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +26 -15
- package/dist/es2019/ui/SortingIcon.js +9 -7
- package/dist/es2019/ui/annotations/draft/component.js +18 -12
- package/dist/es2019/ui/annotations/element/mark.js +12 -6
- package/dist/es2019/ui/renderer-props.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/enums.js +2 -0
- package/dist/esm/react/marks/alignment.js +13 -6
- package/dist/esm/react/marks/breakout.js +6 -5
- package/dist/esm/react/marks/link.js +7 -5
- package/dist/esm/react/nodes/codeBlock.js +18 -14
- package/dist/esm/react/nodes/codeBlockCopyButton.js +10 -7
- package/dist/esm/react/nodes/embedCard.js +19 -19
- package/dist/esm/react/nodes/heading-anchor.js +8 -6
- package/dist/esm/react/nodes/heading.js +4 -2
- package/dist/esm/react/nodes/layoutColumn.js +7 -3
- package/dist/esm/react/nodes/media.js +8 -5
- package/dist/esm/react/nodes/mediaSingle/index.js +11 -6
- package/dist/esm/react/nodes/mediaSingle/styles.js +5 -7
- package/dist/esm/react/nodes/panel.js +27 -15
- package/dist/esm/react/nodes/table/sticky.js +64 -53
- package/dist/esm/react/nodes/table.js +2 -8
- package/dist/esm/react/utils/inject-props.js +24 -0
- package/dist/esm/react/utils/performance/RenderTracking.js +39 -0
- package/dist/esm/ui/Expand.js +57 -29
- package/dist/esm/ui/MediaCard.js +3 -9
- package/dist/esm/ui/Renderer/index.js +74 -61
- package/dist/esm/ui/Renderer/style.js +58 -51
- package/dist/esm/ui/Renderer/truncated-wrapper.js +20 -14
- package/dist/esm/ui/SortingIcon.js +9 -7
- package/dist/esm/ui/annotations/draft/component.js +18 -11
- package/dist/esm/ui/annotations/element/mark.js +11 -4
- package/dist/esm/ui/renderer-props.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/enums.d.ts +2 -0
- package/dist/types/analytics/events.d.ts +12 -2
- package/dist/types/react/marks/alignment.d.ts +2 -2
- package/dist/types/react/marks/breakout.d.ts +4 -3
- package/dist/types/react/marks/link.d.ts +2 -2
- package/dist/types/react/nodes/codeBlock.d.ts +4 -14
- package/dist/types/react/nodes/embedCard.d.ts +3 -2
- package/dist/types/react/nodes/heading-anchor.d.ts +1 -0
- package/dist/types/react/nodes/heading.d.ts +1 -0
- package/dist/types/react/nodes/index.d.ts +1 -13
- package/dist/types/react/nodes/layoutColumn.d.ts +3 -1
- package/dist/types/react/nodes/media.d.ts +3 -1
- package/dist/types/react/nodes/mediaSingle/index.d.ts +1 -0
- package/dist/types/react/nodes/mediaSingle/styles.d.ts +2 -3
- package/dist/types/react/nodes/panel.d.ts +3 -1
- package/dist/types/react/nodes/table/sticky.d.ts +4 -2
- package/dist/types/react/utils/inject-props.d.ts +6 -0
- package/dist/types/react/utils/performance/RenderTracking.d.ts +15 -0
- package/dist/types/ui/Expand.d.ts +3 -2
- package/dist/types/ui/MediaCard.d.ts +1 -3
- package/dist/types/ui/Renderer/index.d.ts +3 -26
- package/dist/types/ui/Renderer/style.d.ts +2 -3
- package/dist/types/ui/Renderer/truncated-wrapper.d.ts +3 -1
- package/dist/types/ui/SortingIcon.d.ts +3 -3
- package/dist/types/ui/annotations/draft/component.d.ts +1 -0
- package/dist/types/ui/annotations/element/mark.d.ts +1 -0
- package/dist/types/ui/renderer-props.d.ts +14 -2
- package/package.json +22 -23
|
@@ -3,21 +3,28 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
|
|
4
4
|
var _templateObject;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/** @jsx jsx */
|
|
7
|
+
import React, { Fragment } from 'react';
|
|
8
|
+
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import { InsertDraftPosition } from '../types';
|
|
8
10
|
import { AnnotationsDraftContext } from '../context';
|
|
9
11
|
import { splitText, calcTextSplitOffset } from './text';
|
|
10
12
|
import { calcInsertDraftPositionOnText } from './position';
|
|
11
13
|
import { dataAttributes } from './dom';
|
|
12
|
-
import styled from 'styled-components';
|
|
13
14
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
var markStyles = function markStyles(props) {
|
|
17
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n ", ";\n"])), AnnotationSharedCSSByState(props).focus);
|
|
18
|
+
};
|
|
19
|
+
|
|
15
20
|
export var AnnotationDraft = function AnnotationDraft(_ref) {
|
|
16
21
|
var draftPosition = _ref.draftPosition,
|
|
17
22
|
children = _ref.children;
|
|
18
|
-
return
|
|
23
|
+
return jsx("mark", _extends({
|
|
19
24
|
"data-renderer-mark": true
|
|
20
|
-
}, dataAttributes(draftPosition)
|
|
25
|
+
}, dataAttributes(draftPosition), {
|
|
26
|
+
css: markStyles
|
|
27
|
+
}), children);
|
|
21
28
|
};
|
|
22
29
|
export var getAnnotationIndex = function getAnnotationIndex(annotationPosition, fragmentCount) {
|
|
23
30
|
if (annotationPosition === InsertDraftPosition.START) {
|
|
@@ -41,13 +48,13 @@ export var applyAnnotationOnText = function applyAnnotationOnText(_ref2) {
|
|
|
41
48
|
var annotateIndex = getAnnotationIndex(shouldApplyAnnotationAt, texts.length);
|
|
42
49
|
return texts.map(function (value, index) {
|
|
43
50
|
if (annotateIndex === index) {
|
|
44
|
-
return
|
|
51
|
+
return jsx(AnnotationDraft, {
|
|
45
52
|
key: index,
|
|
46
53
|
draftPosition: draftPosition
|
|
47
54
|
}, value);
|
|
48
55
|
}
|
|
49
56
|
|
|
50
|
-
return
|
|
57
|
+
return jsx(React.Fragment, {
|
|
51
58
|
key: index
|
|
52
59
|
}, value);
|
|
53
60
|
});
|
|
@@ -72,11 +79,11 @@ export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
|
72
79
|
}, [nextDraftPosition, textPosition]);
|
|
73
80
|
|
|
74
81
|
if (shouldApplyAnnotationAt === false || !nextDraftPosition) {
|
|
75
|
-
return
|
|
82
|
+
return jsx(Fragment, null, children);
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
if (shouldApplyAnnotationAt === InsertDraftPosition.AROUND_TEXT) {
|
|
79
|
-
return
|
|
86
|
+
return jsx(AnnotationDraft, {
|
|
80
87
|
key: 0,
|
|
81
88
|
draftPosition: nextDraftPosition
|
|
82
89
|
}, children);
|
|
@@ -86,7 +93,7 @@ export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
|
86
93
|
var texts = splitText(children, offsets);
|
|
87
94
|
|
|
88
95
|
if (!texts) {
|
|
89
|
-
return
|
|
96
|
+
return jsx(Fragment, null, children);
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
var components = applyAnnotationOnText({
|
|
@@ -94,5 +101,5 @@ export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
|
94
101
|
shouldApplyAnnotationAt: shouldApplyAnnotationAt,
|
|
95
102
|
draftPosition: nextDraftPosition
|
|
96
103
|
});
|
|
97
|
-
return
|
|
104
|
+
return jsx(Fragment, null, components);
|
|
98
105
|
};
|
|
@@ -9,11 +9,16 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
9
|
|
|
10
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
11
|
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
import React, { useMemo, useCallback } from 'react';
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
13
15
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
14
16
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
+
|
|
18
|
+
var markStyles = function markStyles(props) {
|
|
19
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: inherit;\n background-color: unset;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n &[data-mark-annotation-state='", "'] {\n ", ";\n\n &:focus,\n &[data-has-focus='true'] {\n ", ";\n }\n }\n"])), AnnotationMarkStates.ACTIVE, AnnotationSharedCSSByState(props).blur, AnnotationSharedCSSByState(props).focus);
|
|
20
|
+
};
|
|
21
|
+
|
|
17
22
|
export var MarkComponent = function MarkComponent(_ref) {
|
|
18
23
|
var annotationParentIds = _ref.annotationParentIds,
|
|
19
24
|
children = _ref.children,
|
|
@@ -47,8 +52,10 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
47
52
|
} : {
|
|
48
53
|
'aria-details': annotationIds.join(', ')
|
|
49
54
|
};
|
|
50
|
-
return
|
|
55
|
+
return jsx("mark", _extends({
|
|
51
56
|
id: id,
|
|
52
57
|
onClick: onMarkClick
|
|
53
|
-
}, accessibility, overriddenData
|
|
58
|
+
}, accessibility, overriddenData, {
|
|
59
|
+
css: markStyles
|
|
60
|
+
}), children);
|
|
54
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { ACTION_SUBJECT } from '../analytics/enums';
|
package/dist/esm/version.json
CHANGED
|
@@ -7,6 +7,8 @@ export declare enum EVENT_TYPE {
|
|
|
7
7
|
export declare enum ACTION {
|
|
8
8
|
STARTED = "started",
|
|
9
9
|
RENDERED = "rendered",
|
|
10
|
+
RE_RENDERED = "reRendered",
|
|
11
|
+
RENDERER_TTI = "tti",
|
|
10
12
|
CRASHED = "unhandledErrorCaught",
|
|
11
13
|
INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
|
|
12
14
|
SELECT_ALL_CAUGHT = "selectAllCaught",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, AEP, EVENT_TYPE, ACTION_SUBJECT_ID } from './enums';
|
|
2
|
-
import { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { PropsDifference, SEVERITY, ShallowPropsDifference, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import type { UnsupportedContentPayload } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/src/utils/analytics';
|
|
@@ -22,6 +22,11 @@ declare type RendererRenderedAEP = AEP<ACTION.RENDERED, ACTION_SUBJECT.RENDERER,
|
|
|
22
22
|
nodes: Record<string, number>;
|
|
23
23
|
severity?: SEVERITY;
|
|
24
24
|
}, EVENT_TYPE.OPERATIONAL>;
|
|
25
|
+
declare type RendererReRenderedAEP<Props> = AEP<ACTION.RE_RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
26
|
+
propsDifference: PropsDifference<Props> | ShallowPropsDifference<Props>;
|
|
27
|
+
count: number;
|
|
28
|
+
componentId?: string;
|
|
29
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
25
30
|
export declare type ComponentCrashErrorAEP = AEP<ACTION.CRASHED, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
|
|
26
31
|
platform: PLATFORM.WEB;
|
|
27
32
|
errorMessage?: string;
|
|
@@ -97,5 +102,10 @@ export declare enum RESOLVE_METHOD {
|
|
|
97
102
|
}
|
|
98
103
|
export declare type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
99
104
|
declare type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
100
|
-
|
|
105
|
+
declare type RendererTTIAEP = AEP<ACTION.RENDERER_TTI, ACTION_SUBJECT.RENDERER, undefined, {
|
|
106
|
+
tti: number;
|
|
107
|
+
ttiFromInvocation: number;
|
|
108
|
+
canceled: boolean;
|
|
109
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
110
|
+
export declare type AnalyticsEventPayload<T = void> = RendererStartAEP | RendererRenderedAEP | RendererReRenderedAEP<T> | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | HeadingAnchorLinkButtonAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | RendererTTIAEP;
|
|
101
111
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { AlignmentAttributes } from '@atlaskit/adf-schema';
|
|
3
3
|
import { MarkProps } from '../types';
|
|
4
|
-
export default function Alignment(props: MarkProps<AlignmentAttributes>): JSX.Element;
|
|
4
|
+
export default function Alignment(props: MarkProps<AlignmentAttributes>): jsx.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
3
4
|
import { MarkProps } from '../types';
|
|
4
|
-
export declare const
|
|
5
|
-
export default function Breakout(props: MarkProps<BreakoutMarkAttrs>): JSX.Element;
|
|
5
|
+
export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export default function Breakout(props: MarkProps<BreakoutMarkAttrs>): jsx.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { LinkAttributes } from '@atlaskit/adf-schema';
|
|
3
3
|
import { MarkProps } from '../types';
|
|
4
4
|
interface LinkProps extends LinkAttributes {
|
|
5
5
|
target?: string;
|
|
6
6
|
isMediaLink?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export default function Link(props: MarkProps<LinkProps>): JSX.Element;
|
|
8
|
+
export default function Link(props: MarkProps<LinkProps>): jsx.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import { SupportedLanguages } from '@atlaskit/code';
|
|
4
4
|
export interface Props {
|
|
@@ -8,17 +8,7 @@ export interface Props {
|
|
|
8
8
|
codeBidiWarningTooltipEnabled: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import("
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
|
|
15
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<Props & WrappedComponentProps<"intl">, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
16
|
-
forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
|
|
17
|
-
} & import("@atlaskit/theme").NoThemeProps), any, (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
18
|
-
theme?: any;
|
|
19
|
-
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
20
|
-
theme?: any;
|
|
21
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
22
|
-
theme?: any;
|
|
23
|
-
} & import("@atlaskit/theme").NoThemeProps)>;
|
|
11
|
+
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
12
|
+
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
13
|
+
};
|
|
24
14
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
3
4
|
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
4
5
|
import { RendererAppearance } from '../../ui/Renderer/types';
|
|
@@ -14,4 +15,4 @@ export default function EmbedCard(props: {
|
|
|
14
15
|
rendererAppearance?: RendererAppearance;
|
|
15
16
|
isInsideOfBlockNode?: boolean;
|
|
16
17
|
allowDynamicTextSizing?: boolean;
|
|
17
|
-
}): JSX.Element;
|
|
18
|
+
}): jsx.JSX.Element;
|
|
@@ -21,19 +21,7 @@ import Table from './table';
|
|
|
21
21
|
import { TableCell } from './tableCell';
|
|
22
22
|
import TableRow from './tableRow';
|
|
23
23
|
import UnknownBlock from './unknownBlock';
|
|
24
|
-
declare const CodeBlock: (React.ComponentClass<import("
|
|
25
|
-
theme?: any;
|
|
26
|
-
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
27
|
-
theme?: any;
|
|
28
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
29
|
-
theme?: any;
|
|
30
|
-
} & import("@atlaskit/theme").NoThemeProps), any>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("styled-components").ThemedOuterStyledProps<(Pick<import("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
31
|
-
theme?: any;
|
|
32
|
-
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
33
|
-
theme?: any;
|
|
34
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled" | "forwardedRef"> & {
|
|
35
|
-
theme?: any;
|
|
36
|
-
} & import("@atlaskit/theme").NoThemeProps), any>> & Loadable.LoadableComponent);
|
|
24
|
+
declare const CodeBlock: (React.ComponentClass<import("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent);
|
|
37
25
|
declare const TaskList: (React.ComponentClass<import("./taskList").Props, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./taskList").Props> & Loadable.LoadableComponent);
|
|
38
26
|
declare const TaskItem: (React.ComponentClass<import("../types").NodeProps<import("./taskItem").Props>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("../types").NodeProps<import("./taskItem").Props>> & Loadable.LoadableComponent);
|
|
39
27
|
declare const DecisionList: (React.ComponentClass<import("./decisionList").Props, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./decisionList").Props> & Loadable.LoadableComponent);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { PureComponent } from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
6
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
7
|
import { MediaCardProps } from '../../ui/MediaCard';
|
|
@@ -22,5 +24,5 @@ export declare type MediaProps = MediaCardProps & {
|
|
|
22
24
|
export default class Media extends PureComponent<MediaProps, {}> {
|
|
23
25
|
private renderCard;
|
|
24
26
|
private handleMediaLinkClick;
|
|
25
|
-
render(): JSX.Element;
|
|
27
|
+
render(): jsx.JSX.Element;
|
|
26
28
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
}>;
|
|
1
|
+
export declare const uiMediaSingleBaseStyles: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const uiMediaSingleLayoutStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
3
5
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
6
|
export interface Props {
|
|
@@ -11,5 +13,5 @@ export interface Props {
|
|
|
11
13
|
panelIconText?: string;
|
|
12
14
|
panelColor?: string;
|
|
13
15
|
}
|
|
14
|
-
declare const Panel: (props: Props) => JSX.Element;
|
|
16
|
+
declare const Panel: (props: Props) => jsx.JSX.Element;
|
|
15
17
|
export default Panel;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
|
|
3
5
|
import { TableLayout } from '@atlaskit/adf-schema';
|
|
4
6
|
export declare type StickyMode = 'none' | 'stick' | 'pin-bottom';
|
|
@@ -8,7 +10,7 @@ interface FixedProps {
|
|
|
8
10
|
wrapperWidth: number;
|
|
9
11
|
mode: StickyMode;
|
|
10
12
|
}
|
|
11
|
-
export declare const FixedTableDiv:
|
|
13
|
+
export declare const FixedTableDiv: React.FC<FixedProps>;
|
|
12
14
|
export declare type StickyTableProps = {
|
|
13
15
|
left?: number;
|
|
14
16
|
top?: number;
|
|
@@ -24,7 +26,7 @@ export declare type StickyTableProps = {
|
|
|
24
26
|
renderWidth: number;
|
|
25
27
|
allowDynamicTextSizing?: boolean;
|
|
26
28
|
} & OverflowShadowProps;
|
|
27
|
-
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, allowDynamicTextSizing, rowHeight, }: StickyTableProps) => JSX.Element;
|
|
29
|
+
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, allowDynamicTextSizing, rowHeight, }: StickyTableProps) => jsx.JSX.Element;
|
|
28
30
|
export declare class OverflowParent {
|
|
29
31
|
private ref;
|
|
30
32
|
private constructor();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnalyticsEventPayload } from '../../../analytics/events';
|
|
2
|
+
import { ACTION_SUBJECT, ACTION } from '../../../analytics/enums';
|
|
3
|
+
export declare type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
4
|
+
declare type RenderActions = ACTION.RE_RENDERED;
|
|
5
|
+
declare type RenderActionSubjects = ACTION_SUBJECT.RENDERER;
|
|
6
|
+
export declare type RenderTrackingProps<ComponentProps> = {
|
|
7
|
+
componentProps: ComponentProps;
|
|
8
|
+
action: RenderActions;
|
|
9
|
+
actionSubject: RenderActionSubjects;
|
|
10
|
+
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
11
|
+
propsToIgnore?: Array<keyof ComponentProps>;
|
|
12
|
+
useShallow?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function RenderTracking<Props>(props: RenderTrackingProps<Props>): null;
|
|
15
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { AnalyticsEventPayload } from '../analytics/events';
|
|
3
4
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export
|
|
5
|
+
export declare type StyleProps = {
|
|
5
6
|
expanded?: boolean;
|
|
6
7
|
focused?: boolean;
|
|
7
8
|
'data-node-type'?: 'expand' | 'nestedExpand';
|
|
8
9
|
'data-title'?: string;
|
|
9
|
-
}
|
|
10
|
+
};
|
|
10
11
|
export interface ExpandProps {
|
|
11
12
|
title: string;
|
|
12
13
|
nodeType: 'expand' | 'nestedExpand';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
3
2
|
import { ADFEntity } from '@atlaskit/adf-utils';
|
|
4
3
|
import { CardAppearance, CardDimensions, CardOnClickCallback, NumericalCardDimensions } from '@atlaskit/media-card';
|
|
5
4
|
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
@@ -65,7 +64,6 @@ export declare class MediaCardInternal extends Component<MediaCardProps, State>
|
|
|
65
64
|
private getOnCardClickCallback;
|
|
66
65
|
render(): JSX.Element | null;
|
|
67
66
|
}
|
|
68
|
-
export declare const CardWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
69
67
|
export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifierProvider, originalDimensions, fileState, }: {
|
|
70
68
|
id: string;
|
|
71
69
|
alt?: string | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
|
-
import { RendererAppearance } from './types';
|
|
4
3
|
import { RendererProps } from '../renderer-props';
|
|
5
4
|
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
6
5
|
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
@@ -26,30 +25,8 @@ export declare class Renderer extends PureComponent<RendererProps> {
|
|
|
26
25
|
private fireAnalyticsEvent;
|
|
27
26
|
private getSchema;
|
|
28
27
|
private onMouseDownEditView;
|
|
29
|
-
render(): JSX.Element;
|
|
28
|
+
render(): jsx.JSX.Element;
|
|
30
29
|
componentWillUnmount(): void;
|
|
31
30
|
}
|
|
32
|
-
declare
|
|
33
|
-
appearance: RendererAppearance;
|
|
34
|
-
dynamicTextSizing: boolean;
|
|
35
|
-
innerRef?: React.RefObject<HTMLDivElement>;
|
|
36
|
-
allowColumnSorting?: boolean;
|
|
37
|
-
allowCopyToClipboard?: boolean;
|
|
38
|
-
allowPlaceholderText?: boolean;
|
|
39
|
-
allowCustomPanels?: boolean;
|
|
40
|
-
allowNestedHeaderLinks: boolean;
|
|
41
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
42
|
-
onMouseDown?: (event: React.MouseEvent) => void;
|
|
43
|
-
} & {
|
|
44
|
-
children?: React.ReactNode;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* When the product doesn't provide a IframeWidthObserverFallbackWrapper,
|
|
48
|
-
* we will give one to the renderer,
|
|
49
|
-
*
|
|
50
|
-
* so if we have more than one `WidthProvider` on the content,
|
|
51
|
-
* only one iframe will be created on the older browsers.
|
|
52
|
-
*/
|
|
53
|
-
export declare function RendererWrapper(props: RendererWrapperProps): JSX.Element;
|
|
54
|
-
declare const RendererWithAnnotationSelection: (props: RendererProps) => JSX.Element;
|
|
31
|
+
declare const RendererWithAnnotationSelection: (props: RendererProps) => jsx.JSX.Element;
|
|
55
32
|
export default RendererWithAnnotationSelection;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Theme } from '@emotion/react';
|
|
2
2
|
import { RendererAppearance } from './types';
|
|
3
3
|
export declare const FullPagePadding = 32;
|
|
4
4
|
export declare type RendererWrapperProps = {
|
|
5
5
|
appearance?: RendererAppearance;
|
|
6
|
-
theme?: any;
|
|
7
6
|
allowNestedHeaderLinks: boolean;
|
|
8
7
|
allowColumnSorting: boolean;
|
|
9
8
|
};
|
|
@@ -12,4 +11,4 @@ export declare const headingSizes: {
|
|
|
12
11
|
[key: string]: number;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
export declare const
|
|
14
|
+
export declare const rendererStyles: (wrapperProps: RendererWrapperProps) => (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { Component } from 'react';
|
|
2
4
|
export interface TruncatedWrapperProps {
|
|
3
5
|
height?: number;
|
|
@@ -6,5 +8,5 @@ export interface TruncatedWrapperProps {
|
|
|
6
8
|
}
|
|
7
9
|
export declare class TruncatedWrapper extends Component<TruncatedWrapperProps, {}> {
|
|
8
10
|
constructor(props: TruncatedWrapperProps);
|
|
9
|
-
render(): JSX.Element;
|
|
11
|
+
render(): jsx.JSX.Element;
|
|
10
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
export declare const TableSortIconDataUrl: string;
|
|
@@ -12,7 +12,7 @@ declare type Props = {
|
|
|
12
12
|
isSortingAllowed: boolean;
|
|
13
13
|
sortOrdered?: SortOrder;
|
|
14
14
|
} & WrappedComponentProps;
|
|
15
|
-
declare const _default:
|
|
16
|
-
WrappedComponent:
|
|
15
|
+
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props>> & {
|
|
16
|
+
WrappedComponent: import("react").ComponentType<Props>;
|
|
17
17
|
};
|
|
18
18
|
export default _default;
|
|
@@ -12,6 +12,18 @@ import { RenderOutputStat } from '../render-document';
|
|
|
12
12
|
import { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps } from './Renderer/types';
|
|
13
13
|
import { MediaOptions } from '../types/mediaOptions';
|
|
14
14
|
import { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
15
|
+
import { ACTION_SUBJECT } from '../analytics/enums';
|
|
16
|
+
export interface RawObjectFeatureFlags {
|
|
17
|
+
['renderer-render-tracking']: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NormalizedObjectFeatureFlags {
|
|
20
|
+
rendererRenderTracking: {
|
|
21
|
+
[ACTION_SUBJECT.RENDERER]: {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
useShallow: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
15
27
|
export interface RendererProps {
|
|
16
28
|
document: any;
|
|
17
29
|
dataProviders?: ProviderFactory;
|
|
@@ -61,7 +73,7 @@ export interface RendererProps {
|
|
|
61
73
|
* Flags are expected to follow these rules or they are filtered out
|
|
62
74
|
*
|
|
63
75
|
* 1. cased in kebab-case (match [a-z-])
|
|
64
|
-
* 2. have boolean values
|
|
76
|
+
* 2. have boolean values or object {} values
|
|
65
77
|
*
|
|
66
78
|
* @example
|
|
67
79
|
* ```tsx
|
|
@@ -84,5 +96,5 @@ export interface RendererProps {
|
|
|
84
96
|
*/
|
|
85
97
|
featureFlags?: {
|
|
86
98
|
[featureFlag: string]: boolean;
|
|
87
|
-
}
|
|
99
|
+
} | Partial<RawObjectFeatureFlags>;
|
|
88
100
|
}
|