@atlaskit/renderer 130.2.12 → 130.2.15
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 +19 -0
- package/dist/cjs/react/nodes/tableNew.js +1 -1
- package/dist/cjs/react/utils/getCardClickHandler.js +2 -1
- package/dist/cjs/steps/index.js +2 -0
- package/dist/cjs/ui/Expand.js +4 -1
- package/dist/cjs/ui/ExtensionRenderer.js +4 -1
- package/dist/cjs/ui/Renderer/PortalContext.js +2 -0
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +2 -1
- package/dist/cjs/ui/Renderer/breakout-ssr.js +5 -1
- package/dist/cjs/ui/Renderer/count-nodes.js +2 -0
- package/dist/cjs/ui/Renderer/index.js +8 -7
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +2 -1
- package/dist/cjs/ui/Renderer/useMemoFromPropsDerivative.js +2 -0
- package/dist/cjs/ui/RendererActionsContext/index.js +2 -0
- package/dist/cjs/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +2 -0
- package/dist/cjs/ui/active-header-id-provider.js +3 -3
- package/dist/cjs/ui/annotations/contexts/AnnotationManagerContext.js +1 -0
- package/dist/cjs/ui/annotations/contexts/AnnotationRangeContext.js +1 -0
- package/dist/cjs/ui/annotations/draft/component.js +2 -1
- package/dist/cjs/ui/annotations/draft/dom.js +2 -0
- package/dist/cjs/ui/annotations/element/mark.js +1 -0
- package/dist/cjs/ui/annotations/element/useInlineAnnotationProps.js +2 -0
- package/dist/es2019/react/nodes/tableNew.js +1 -1
- package/dist/es2019/react/utils/getCardClickHandler.js +2 -2
- package/dist/es2019/steps/index.js +1 -0
- package/dist/es2019/ui/Expand.js +4 -1
- package/dist/es2019/ui/ExtensionRenderer.js +4 -2
- package/dist/es2019/ui/Renderer/PortalContext.js +1 -0
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +3 -2
- package/dist/es2019/ui/Renderer/breakout-ssr.js +4 -1
- package/dist/es2019/ui/Renderer/count-nodes.js +1 -0
- package/dist/es2019/ui/Renderer/index.js +9 -8
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +2 -2
- package/dist/es2019/ui/Renderer/useMemoFromPropsDerivative.js +1 -0
- package/dist/es2019/ui/RendererActionsContext/index.js +1 -0
- package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -0
- package/dist/es2019/ui/active-header-id-provider.js +3 -4
- package/dist/es2019/ui/annotations/contexts/AnnotationManagerContext.js +1 -0
- package/dist/es2019/ui/annotations/contexts/AnnotationRangeContext.js +1 -0
- package/dist/es2019/ui/annotations/draft/component.js +3 -2
- package/dist/es2019/ui/annotations/draft/dom.js +2 -0
- package/dist/es2019/ui/annotations/element/mark.js +1 -0
- package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +1 -0
- package/dist/esm/react/nodes/tableNew.js +1 -1
- package/dist/esm/react/utils/getCardClickHandler.js +2 -2
- package/dist/esm/steps/index.js +1 -0
- package/dist/esm/ui/Expand.js +4 -1
- package/dist/esm/ui/ExtensionRenderer.js +4 -2
- package/dist/esm/ui/Renderer/PortalContext.js +1 -0
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +3 -2
- package/dist/esm/ui/Renderer/breakout-ssr.js +4 -1
- package/dist/esm/ui/Renderer/count-nodes.js +1 -0
- package/dist/esm/ui/Renderer/index.js +9 -8
- package/dist/esm/ui/Renderer/truncated-wrapper.js +2 -2
- package/dist/esm/ui/Renderer/useMemoFromPropsDerivative.js +1 -0
- package/dist/esm/ui/RendererActionsContext/index.js +1 -0
- package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -0
- package/dist/esm/ui/active-header-id-provider.js +3 -3
- package/dist/esm/ui/annotations/contexts/AnnotationManagerContext.js +1 -0
- package/dist/esm/ui/annotations/contexts/AnnotationRangeContext.js +1 -0
- package/dist/esm/ui/annotations/draft/component.js +3 -2
- package/dist/esm/ui/annotations/draft/dom.js +2 -0
- package/dist/esm/ui/annotations/element/mark.js +1 -0
- package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +1 -0
- package/dist/types/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
- package/dist/types/react/nodes/index.d.ts +57 -32
- package/dist/types/ui/Expand.d.ts +3 -3
- package/dist/types/ui/ExtensionRenderer.d.ts +2 -1
- package/dist/types/ui/MediaCard.d.ts +2 -2
- package/dist/types/ui/Renderer/RendererStyleContainer.d.ts +2 -2
- package/dist/types/ui/Renderer/ValidationContext.d.ts +3 -2
- package/dist/types/ui/Renderer/get-base-font-size.d.ts +1 -1
- package/dist/types/ui/Renderer/index.d.ts +2 -3
- package/dist/types/ui/annotations/context.d.ts +3 -2
- package/dist/types/ui/annotations/draft/dom.d.ts +1 -1
- package/dist/types/ui/annotations/draft/text.d.ts +1 -1
- package/dist/types/ui/annotations/element/mark.d.ts +83 -82
- package/dist/types/ui/annotations/element/useInlineAnnotationProps.d.ts +6 -6
- package/dist/types/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +2 -1
- package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/index.d.ts +57 -32
- package/dist/types-ts4.5/ui/Expand.d.ts +3 -3
- package/dist/types-ts4.5/ui/ExtensionRenderer.d.ts +2 -1
- package/dist/types-ts4.5/ui/MediaCard.d.ts +2 -2
- package/dist/types-ts4.5/ui/Renderer/RendererStyleContainer.d.ts +2 -2
- package/dist/types-ts4.5/ui/Renderer/ValidationContext.d.ts +3 -2
- package/dist/types-ts4.5/ui/Renderer/get-base-font-size.d.ts +1 -1
- package/dist/types-ts4.5/ui/Renderer/index.d.ts +2 -3
- package/dist/types-ts4.5/ui/annotations/context.d.ts +3 -2
- package/dist/types-ts4.5/ui/annotations/draft/dom.d.ts +1 -1
- package/dist/types-ts4.5/ui/annotations/draft/text.d.ts +1 -1
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +83 -82
- package/dist/types-ts4.5/ui/annotations/element/useInlineAnnotationProps.d.ts +6 -6
- package/dist/types-ts4.5/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +2 -1
- package/package.json +9 -9
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import type React from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import type { OnAnnotationClickPayload } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { AnnotationId, AnnotationDataAttributes } from '@atlaskit/adf-schema';
|
|
8
|
+
import type { AnnotationId, AnnotationDataAttributes, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
8
9
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
9
10
|
type MarkComponentProps = {
|
|
10
11
|
annotationParentIds: AnnotationId[];
|
|
@@ -17,108 +18,108 @@ type MarkComponentProps = {
|
|
|
17
18
|
useBlockLevel?: boolean;
|
|
18
19
|
};
|
|
19
20
|
export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, isHovered, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
|
|
20
|
-
|
|
21
|
+
"aria-disabled": boolean;
|
|
22
|
+
css?: (false | SerializedStyles)[] | undefined;
|
|
23
|
+
"data-id": AnnotationId;
|
|
24
|
+
"data-mark-annotation-state"?: AnnotationMarkStates;
|
|
25
|
+
"data-mark-annotation-type": AnnotationTypes;
|
|
26
|
+
"data-mark-type": string;
|
|
27
|
+
id: string;
|
|
28
|
+
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
21
29
|
style?: {
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
"--ak-renderer-annotation-endmarker": string;
|
|
31
|
+
"--ak-renderer-annotation-startmarker": string;
|
|
24
32
|
} | undefined;
|
|
25
|
-
'data-id': AnnotationId;
|
|
26
|
-
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
27
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
28
|
-
'data-mark-type': string;
|
|
29
|
-
'aria-disabled': boolean;
|
|
30
|
-
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
31
|
-
id: string;
|
|
32
33
|
} | {
|
|
33
|
-
|
|
34
|
+
"aria-disabled": boolean;
|
|
35
|
+
css?: (false | SerializedStyles)[] | undefined;
|
|
36
|
+
"data-has-focus": boolean;
|
|
37
|
+
"data-id": AnnotationId;
|
|
38
|
+
"data-is-hovered": boolean;
|
|
39
|
+
"data-mark-annotation-state": AnnotationMarkStates;
|
|
40
|
+
"data-mark-annotation-type": AnnotationTypes;
|
|
41
|
+
"data-mark-type": string;
|
|
42
|
+
id: string;
|
|
43
|
+
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
34
44
|
style?: {
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
"--ak-renderer-annotation-endmarker": string;
|
|
46
|
+
"--ak-renderer-annotation-startmarker": string;
|
|
37
47
|
} | undefined;
|
|
38
|
-
'data-mark-annotation-state': AnnotationMarkStates;
|
|
39
|
-
'data-has-focus': boolean;
|
|
40
|
-
'data-is-hovered': boolean;
|
|
41
|
-
'data-id': AnnotationId;
|
|
42
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
43
|
-
'data-mark-type': string;
|
|
44
|
-
'aria-disabled': boolean;
|
|
45
|
-
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
46
|
-
id: string;
|
|
47
48
|
} | {
|
|
48
|
-
|
|
49
|
+
"aria-details": string;
|
|
50
|
+
"aria-disabled"?: undefined;
|
|
51
|
+
"aria-expanded"?: undefined;
|
|
52
|
+
css?: (false | SerializedStyles)[] | undefined;
|
|
53
|
+
"data-id": AnnotationId;
|
|
54
|
+
"data-mark-annotation-state"?: AnnotationMarkStates;
|
|
55
|
+
"data-mark-annotation-type": AnnotationTypes;
|
|
56
|
+
"data-mark-type": string;
|
|
57
|
+
id: string;
|
|
58
|
+
onKeyDown?: undefined;
|
|
59
|
+
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
60
|
+
role?: undefined;
|
|
49
61
|
style?: {
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
"--ak-renderer-annotation-endmarker": string;
|
|
63
|
+
"--ak-renderer-annotation-startmarker": string;
|
|
52
64
|
} | undefined;
|
|
53
|
-
'data-id': AnnotationId;
|
|
54
|
-
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
55
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
56
|
-
'data-mark-type': string;
|
|
57
|
-
role?: undefined;
|
|
58
65
|
tabIndex?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
"aria-details": string;
|
|
68
|
+
"aria-disabled"?: undefined;
|
|
69
|
+
"aria-expanded"?: undefined;
|
|
70
|
+
css?: (false | SerializedStyles)[] | undefined;
|
|
71
|
+
"data-has-focus": boolean;
|
|
72
|
+
"data-id": AnnotationId;
|
|
73
|
+
"data-is-hovered": boolean;
|
|
74
|
+
"data-mark-annotation-state": AnnotationMarkStates;
|
|
75
|
+
"data-mark-annotation-type": AnnotationTypes;
|
|
76
|
+
"data-mark-type": string;
|
|
77
|
+
id: string;
|
|
59
78
|
onKeyDown?: undefined;
|
|
60
|
-
'aria-expanded'?: undefined;
|
|
61
|
-
'aria-details': string;
|
|
62
|
-
'aria-disabled'?: undefined;
|
|
63
79
|
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
64
|
-
|
|
65
|
-
} | {
|
|
66
|
-
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
80
|
+
role?: undefined;
|
|
67
81
|
style?: {
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
"--ak-renderer-annotation-endmarker": string;
|
|
83
|
+
"--ak-renderer-annotation-startmarker": string;
|
|
70
84
|
} | undefined;
|
|
71
|
-
'data-mark-annotation-state': AnnotationMarkStates;
|
|
72
|
-
'data-has-focus': boolean;
|
|
73
|
-
'data-is-hovered': boolean;
|
|
74
|
-
'data-id': AnnotationId;
|
|
75
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
76
|
-
'data-mark-type': string;
|
|
77
|
-
role?: undefined;
|
|
78
85
|
tabIndex?: undefined;
|
|
79
|
-
onKeyDown?: undefined;
|
|
80
|
-
'aria-expanded'?: undefined;
|
|
81
|
-
'aria-details': string;
|
|
82
|
-
'aria-disabled'?: undefined;
|
|
83
|
-
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
84
|
-
id: string;
|
|
85
86
|
} | {
|
|
86
|
-
|
|
87
|
+
"aria-details": string;
|
|
88
|
+
"aria-disabled"?: undefined;
|
|
89
|
+
"aria-expanded": boolean;
|
|
90
|
+
css?: (false | SerializedStyles)[] | undefined;
|
|
91
|
+
"data-id": AnnotationId;
|
|
92
|
+
"data-mark-annotation-state"?: AnnotationMarkStates;
|
|
93
|
+
"data-mark-annotation-type": AnnotationTypes;
|
|
94
|
+
"data-mark-type": string;
|
|
95
|
+
id: string;
|
|
96
|
+
onKeyDown: (evt: KeyboardEvent) => void;
|
|
97
|
+
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
98
|
+
role: string;
|
|
87
99
|
style?: {
|
|
88
|
-
|
|
89
|
-
|
|
100
|
+
"--ak-renderer-annotation-endmarker": string;
|
|
101
|
+
"--ak-renderer-annotation-startmarker": string;
|
|
90
102
|
} | undefined;
|
|
91
|
-
'data-id': AnnotationId;
|
|
92
|
-
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
93
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
94
|
-
'data-mark-type': string;
|
|
95
|
-
role: string;
|
|
96
103
|
tabIndex: number;
|
|
104
|
+
} | {
|
|
105
|
+
"aria-details": string;
|
|
106
|
+
"aria-disabled"?: undefined;
|
|
107
|
+
"aria-expanded": boolean;
|
|
108
|
+
css?: (false | SerializedStyles)[] | undefined;
|
|
109
|
+
"data-has-focus": boolean;
|
|
110
|
+
"data-id": AnnotationId;
|
|
111
|
+
"data-is-hovered": boolean;
|
|
112
|
+
"data-mark-annotation-state": AnnotationMarkStates;
|
|
113
|
+
"data-mark-annotation-type": AnnotationTypes;
|
|
114
|
+
"data-mark-type": string;
|
|
115
|
+
id: string;
|
|
97
116
|
onKeyDown: (evt: KeyboardEvent) => void;
|
|
98
|
-
'aria-expanded': boolean;
|
|
99
|
-
'aria-details': string;
|
|
100
|
-
'aria-disabled'?: undefined;
|
|
101
117
|
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
102
|
-
|
|
103
|
-
} | {
|
|
104
|
-
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
118
|
+
role: string;
|
|
105
119
|
style?: {
|
|
106
|
-
|
|
107
|
-
|
|
120
|
+
"--ak-renderer-annotation-endmarker": string;
|
|
121
|
+
"--ak-renderer-annotation-startmarker": string;
|
|
108
122
|
} | undefined;
|
|
109
|
-
'data-mark-annotation-state': AnnotationMarkStates;
|
|
110
|
-
'data-has-focus': boolean;
|
|
111
|
-
'data-is-hovered': boolean;
|
|
112
|
-
'data-id': AnnotationId;
|
|
113
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
114
|
-
'data-mark-type': string;
|
|
115
|
-
role: string;
|
|
116
123
|
tabIndex: number;
|
|
117
|
-
|
|
118
|
-
'aria-expanded': boolean;
|
|
119
|
-
'aria-details': string;
|
|
120
|
-
'aria-disabled'?: undefined;
|
|
121
|
-
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
122
|
-
id: string;
|
|
123
|
-
}, string | React.JSXElementConstructor<any>>;
|
|
124
|
+
}>;
|
|
124
125
|
export {};
|
|
@@ -4,21 +4,21 @@ export type MarkDataAttributes = {
|
|
|
4
4
|
};
|
|
5
5
|
};
|
|
6
6
|
export declare function useInlineAnnotationProps(props: MarkDataAttributes): {
|
|
7
|
-
'data-renderer-mark'?: undefined;
|
|
8
7
|
'data-annotation-draft-mark'?: undefined;
|
|
9
8
|
'data-annotation-inline-node'?: undefined;
|
|
10
|
-
'data-renderer-start-pos'?: undefined;
|
|
11
9
|
'data-annotation-mark'?: undefined;
|
|
10
|
+
'data-renderer-mark'?: undefined;
|
|
11
|
+
'data-renderer-start-pos'?: undefined;
|
|
12
12
|
} | {
|
|
13
|
-
'data-renderer-mark': boolean;
|
|
14
13
|
'data-annotation-draft-mark': boolean;
|
|
15
14
|
'data-annotation-inline-node': boolean;
|
|
16
|
-
'data-renderer-start-pos': number;
|
|
17
15
|
'data-annotation-mark'?: undefined;
|
|
16
|
+
'data-renderer-mark': boolean;
|
|
17
|
+
'data-renderer-start-pos': number;
|
|
18
18
|
} | {
|
|
19
|
+
'data-annotation-draft-mark'?: undefined;
|
|
19
20
|
'data-annotation-inline-node': boolean;
|
|
20
21
|
'data-annotation-mark': boolean;
|
|
21
|
-
'data-renderer-start-pos': number;
|
|
22
22
|
'data-renderer-mark'?: undefined;
|
|
23
|
-
'data-
|
|
23
|
+
'data-renderer-start-pos': number;
|
|
24
24
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
|
|
2
|
+
export declare const useInlineCommentSubscriberContext: () => AnnotationUpdateEmitter | null;
|
|
@@ -13,5 +13,5 @@ export declare const LightWeightCodeBlockCssClassName: {
|
|
|
13
13
|
* @deprecated styles are moved to RendererStyleContainer
|
|
14
14
|
*/
|
|
15
15
|
export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => SerializedStyles;
|
|
16
|
-
declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps,
|
|
16
|
+
declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, 'text' | 'className' | 'codeBidiWarningTooltipEnabled'> & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export default LightWeightCodeBlock;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
3
|
import type { Fragment, Node, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import { type EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
5
|
import Blockquote from './blockquote';
|
|
5
6
|
import BodiedExtension from './bodiedExtension';
|
|
6
7
|
import MultiBodiedExtension from './multiBodiedExtension';
|
|
@@ -23,62 +24,86 @@ import Table from './table';
|
|
|
23
24
|
import { TableCell } from './tableCell';
|
|
24
25
|
import TableRow from './tableRow';
|
|
25
26
|
import UnknownBlock from './unknownBlock';
|
|
26
|
-
import type { NodeComponentsProps } from '../../ui/Renderer/types';
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
import type { NodeComponentsProps, RendererAppearance } from '../../ui/Renderer/types';
|
|
28
|
+
import type { RichMediaLayout, DatasourceAttributeProperties } from '@atlaskit/adf-schema';
|
|
29
|
+
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
30
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
31
|
+
import type { Diff } from '@atlaskit/editor-common/utils';
|
|
32
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
33
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
34
|
+
import type { MediaSSR } from '../../types/mediaOptions';
|
|
35
|
+
import type { SmartLinksOptions } from '../../types/smartLinksOptions';
|
|
36
|
+
import type { ExpandProps } from '../../ui/Expand';
|
|
37
|
+
import type { WithSmartCardStorageProps } from '../../ui/SmartCardStorage';
|
|
38
|
+
import type { NodeProps } from '../types';
|
|
39
|
+
import type { Props as CodeBlockNodeProps } from './codeBlock/codeBlock';
|
|
40
|
+
import type { Props as DateNodeProps } from './date';
|
|
41
|
+
import type { Props as DecisionListNodeProps } from './decisionList';
|
|
42
|
+
import type { EmojiProps } from './emoji';
|
|
43
|
+
import type { InlineCardProps } from './inlineCard';
|
|
44
|
+
import type { MediaProps } from './media';
|
|
45
|
+
import type { MediaGroupProps } from './mediaGroup';
|
|
46
|
+
import type { Props as MediaSingleNodeProps } from './mediaSingle';
|
|
47
|
+
import type { Props as MentionNodeProps } from './mention';
|
|
48
|
+
import type { Props as PanelNodeProps } from './panel';
|
|
49
|
+
import type { Props as StatusNodeProps } from './status';
|
|
50
|
+
import type { Props as TaskItemNodeProps } from './taskItem';
|
|
51
|
+
import type { Props as TaskListNodeProps } from './taskList';
|
|
52
|
+
declare const WindowedCodeBlock: React.ComponentType<CodeBlockNodeProps> & Loadable.LoadableComponent;
|
|
53
|
+
declare const CodeBlock: React.ComponentType<WithIntlProps<CodeBlockNodeProps & WrappedComponentProps>> & Loadable.LoadableComponent;
|
|
54
|
+
declare const TaskList: React.ComponentType<TaskListNodeProps> & Loadable.LoadableComponent;
|
|
55
|
+
declare const TaskItem: React.ComponentType<NodeProps<TaskItemNodeProps>> & Loadable.LoadableComponent;
|
|
56
|
+
declare const DecisionList: React.ComponentType<DecisionListNodeProps> & Loadable.LoadableComponent;
|
|
57
|
+
declare const DecisionItem: React.ComponentType<NodeProps> & Loadable.LoadableComponent;
|
|
58
|
+
declare const Date: React.ComponentType<DateNodeProps> & Loadable.LoadableComponent;
|
|
59
|
+
declare const Status: React.ComponentType<StatusNodeProps> & Loadable.LoadableComponent;
|
|
60
|
+
declare const Emoji: React.ComponentType<EmojiProps> & Loadable.LoadableComponent;
|
|
61
|
+
declare const Panel: React.ComponentType<PanelNodeProps> & Loadable.LoadableComponent;
|
|
37
62
|
declare const EmbedCard: React.ComponentType<{
|
|
38
63
|
data?: object;
|
|
39
|
-
eventHandlers?:
|
|
64
|
+
eventHandlers?: EventHandlers;
|
|
40
65
|
isInsideOfBlockNode?: boolean;
|
|
41
66
|
isInsideOfInlineExtension?: boolean;
|
|
42
|
-
layout:
|
|
67
|
+
layout: RichMediaLayout;
|
|
43
68
|
onSetLinkTarget?: (url: string) => "_blank" | undefined;
|
|
44
69
|
originalHeight?: number;
|
|
45
70
|
originalWidth?: number;
|
|
46
71
|
portal?: HTMLElement;
|
|
47
|
-
rendererAppearance?:
|
|
48
|
-
smartLinks?:
|
|
72
|
+
rendererAppearance?: RendererAppearance;
|
|
73
|
+
smartLinks?: SmartLinksOptions;
|
|
49
74
|
url?: string;
|
|
50
75
|
width?: number;
|
|
51
76
|
}> & Loadable.LoadableComponent;
|
|
52
|
-
declare const InlineCard: React.ComponentType<
|
|
77
|
+
declare const InlineCard: React.ComponentType<Diff<InlineCardProps & WithSmartCardStorageProps, WithSmartCardStorageProps>> & Loadable.LoadableComponent;
|
|
53
78
|
declare const BlockCard: React.ComponentType<{
|
|
54
79
|
data?: object;
|
|
55
|
-
datasource?:
|
|
56
|
-
eventHandlers?:
|
|
80
|
+
datasource?: DatasourceAttributeProperties;
|
|
81
|
+
eventHandlers?: EventHandlers;
|
|
57
82
|
isNodeNested?: boolean;
|
|
58
83
|
layout?: string;
|
|
59
84
|
localId?: string;
|
|
60
85
|
onSetLinkTarget?: (url: string) => "_blank" | undefined;
|
|
61
86
|
portal?: HTMLElement;
|
|
62
|
-
rendererAppearance?:
|
|
63
|
-
smartLinks?:
|
|
87
|
+
rendererAppearance?: RendererAppearance;
|
|
88
|
+
smartLinks?: SmartLinksOptions;
|
|
64
89
|
url?: string;
|
|
65
90
|
}> & Loadable.LoadableComponent;
|
|
66
|
-
declare const Media: React.ComponentType<React.PropsWithChildren<
|
|
67
|
-
declare const MediaGroup: React.ComponentType<
|
|
68
|
-
declare const MediaInline: React.ComponentType<
|
|
91
|
+
declare const Media: React.ComponentType<React.PropsWithChildren<MediaProps>> & Loadable.LoadableComponent;
|
|
92
|
+
declare const MediaGroup: React.ComponentType<MediaGroupProps> & Loadable.LoadableComponent;
|
|
93
|
+
declare const MediaInline: React.ComponentType<WithIntlProps<{
|
|
69
94
|
collection?: string;
|
|
70
|
-
eventHandlers?:
|
|
95
|
+
eventHandlers?: EventHandlers;
|
|
71
96
|
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
72
|
-
featureFlags?:
|
|
97
|
+
featureFlags?: MediaFeatureFlags;
|
|
73
98
|
id: string;
|
|
74
99
|
marks?: Array<Mark>;
|
|
75
|
-
providers:
|
|
76
|
-
rendererAppearance?:
|
|
77
|
-
ssr?:
|
|
78
|
-
} &
|
|
79
|
-
declare const MediaSingle: React.ComponentType<
|
|
80
|
-
declare const Mention: React.ComponentType<
|
|
81
|
-
declare const Expand: React.ComponentType<
|
|
100
|
+
providers: ProviderFactory;
|
|
101
|
+
rendererAppearance?: RendererAppearance;
|
|
102
|
+
ssr?: MediaSSR;
|
|
103
|
+
} & WrappedComponentProps & MediaInlineAttrs>> & Loadable.LoadableComponent;
|
|
104
|
+
declare const MediaSingle: React.ComponentType<WithIntlProps<MediaSingleNodeProps & WrappedComponentProps>> & Loadable.LoadableComponent;
|
|
105
|
+
declare const Mention: React.ComponentType<MentionNodeProps> & Loadable.LoadableComponent;
|
|
106
|
+
declare const Expand: React.ComponentType<WithIntlProps<ExpandProps & WrappedComponentProps>> & Loadable.LoadableComponent;
|
|
82
107
|
export declare const nodeToReact: {
|
|
83
108
|
[key: string]: React.ComponentType<React.PropsWithChildren<any>>;
|
|
84
109
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
4
4
|
import type { RendererAppearance, RendererContentMode } from './Renderer/types';
|
|
5
5
|
export interface ExpandProps {
|
|
@@ -13,7 +13,7 @@ export interface ExpandProps {
|
|
|
13
13
|
rendererContentMode?: RendererContentMode;
|
|
14
14
|
title: string;
|
|
15
15
|
}
|
|
16
|
-
declare const
|
|
16
|
+
declare const _default_1: React.FC<WithIntlProps<ExpandProps & WrappedComponentProps>> & {
|
|
17
17
|
WrappedComponent: React.ComponentType<ExpandProps & WrappedComponentProps>;
|
|
18
18
|
};
|
|
19
|
-
export default
|
|
19
|
+
export default _default_1;
|
|
@@ -28,7 +28,8 @@ interface Props {
|
|
|
28
28
|
text?: string;
|
|
29
29
|
type: 'extension' | 'inlineExtension' | 'bodiedExtension' | 'multiBodiedExtension';
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
/** Renders extension (macro) nodes inside the ADF renderer. */
|
|
32
|
+
export default function ExtensionRenderer(props: Props): jsx.JSX.Element;
|
|
32
33
|
export declare const InlineNodeRendererWrapper: ({ children, isPlainTextMacro, ssrPlaceholder, ssrPlaceholderReplace, }: React.PropsWithChildren<{
|
|
33
34
|
isPlainTextMacro?: boolean;
|
|
34
35
|
ssrPlaceholder?: string;
|
|
@@ -5,7 +5,7 @@ import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
5
5
|
import type { ImageResizeMode, Identifier, FileState, MediaClient } from '@atlaskit/media-client';
|
|
6
6
|
import type { MediaType } from '@atlaskit/adf-schema';
|
|
7
7
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
import type { ImageStatus } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import type { ImageLoaderProps, ImageStatus } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
10
10
|
import type { RendererAppearance } from './Renderer/types';
|
|
11
11
|
import type { RendererContext } from '../react/types';
|
|
@@ -94,5 +94,5 @@ export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifie
|
|
|
94
94
|
[key: string]: string | number | undefined;
|
|
95
95
|
};
|
|
96
96
|
export declare const MediaCardInternal: (props: MediaCardProps) => React.JSX.Element;
|
|
97
|
-
export declare const MediaCard: React.ComponentClass<MediaCardProps &
|
|
97
|
+
export declare const MediaCard: React.ComponentClass<MediaCardProps & ImageLoaderProps>;
|
|
98
98
|
export {};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
5
|
+
import { jsx, type SerializedStyles } from '@emotion/react';
|
|
6
6
|
import type { RendererWrapperProps } from './index';
|
|
7
|
-
export declare const textHighlightPaddingStyles:
|
|
7
|
+
export declare const textHighlightPaddingStyles: SerializedStyles;
|
|
8
8
|
type RendererStyleContainerProps = Pick<RendererWrapperProps, 'onClick' | 'onMouseDown' | 'appearance' | 'contentMode' | 'allowNestedHeaderLinks' | 'allowColumnSorting' | 'useBlockRenderForCodeBlock' | 'allowAnnotations' | 'allowTableResizing' | 'innerRef' | 'children' | 'allowRendererContainerStyles'> & {
|
|
9
9
|
isInsideOfSyncBlock?: boolean;
|
|
10
10
|
isInsideSyncBlock?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Context, type Provider } from 'react';
|
|
1
2
|
type ValidationContextType = {
|
|
2
3
|
allowNestedTables?: boolean;
|
|
3
4
|
skipValidation?: boolean;
|
|
@@ -8,6 +9,6 @@ type ValidationContextType = {
|
|
|
8
9
|
* to bypass the ADF schema validation when necessary.
|
|
9
10
|
* It also allows validation overrides to be passed to nested renderers. For example renderers nested inside bodiedExtension
|
|
10
11
|
*/
|
|
11
|
-
export declare const ValidationContext:
|
|
12
|
-
export declare const ValidationContextProvider:
|
|
12
|
+
export declare const ValidationContext: Context<ValidationContextType>;
|
|
13
|
+
export declare const ValidationContextProvider: Provider<ValidationContextType>;
|
|
13
14
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { RendererAppearance, RendererContentMode } from './types';
|
|
2
|
-
export declare const getBaseFontSize: (appearance: RendererAppearance, contentMode: RendererContentMode) =>
|
|
2
|
+
export declare const getBaseFontSize: (appearance: RendererAppearance, contentMode: RendererContentMode) => 13 | 14 | 16;
|
|
@@ -17,9 +17,8 @@ export declare const RendererFunctionalComponent: (props: RendererProps & {
|
|
|
17
17
|
};
|
|
18
18
|
}) => jsx.JSX.Element;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @param props
|
|
22
|
-
* @example
|
|
20
|
+
* Top-level ADF renderer: renders document content with analytics and validation context.
|
|
21
|
+
* @param props Renderer configuration and document tree.
|
|
23
22
|
*/
|
|
24
23
|
export declare function Renderer(props: RendererProps): jsx.JSX.Element;
|
|
25
24
|
export declare const RendererWithAnalytics: React.MemoExoticComponent<(props: RendererProps) => jsx.JSX.Element>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
import type { AnnotationProviders } from '@atlaskit/editor-common/types';
|
|
2
3
|
import type { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
3
|
-
export declare const ProvidersContext:
|
|
4
|
-
export declare const InlineCommentsStateContext:
|
|
4
|
+
export declare const ProvidersContext: Context<AnnotationProviders | null | undefined>;
|
|
5
|
+
export declare const InlineCommentsStateContext: Context<Record<string, AnnotationMarkStates | null>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Position } from '../types';
|
|
2
2
|
export declare const dataAttributes: ({ from, to }: Position) => {
|
|
3
3
|
"data-annotation-draft-mark": boolean;
|
|
4
|
-
"data-draft-start-at": number;
|
|
5
4
|
"data-draft-end-at": number;
|
|
5
|
+
"data-draft-start-at": number;
|
|
6
6
|
};
|
|
7
7
|
export declare const updateWindowSelectionAroundDraft: (pos: Position) => boolean;
|
|
@@ -7,7 +7,7 @@ type Offset = {
|
|
|
7
7
|
};
|
|
8
8
|
export declare const splitText: (text: string, { startOffset, endOffset }: Offset) => string[] | null;
|
|
9
9
|
export declare const calcTextSplitOffset: (position: Position, textPosition: TextPosition, text: string) => {
|
|
10
|
-
startOffset: number;
|
|
11
10
|
endOffset: number;
|
|
11
|
+
startOffset: number;
|
|
12
12
|
};
|
|
13
13
|
export {};
|