@atlaskit/renderer 109.50.4 → 109.50.6
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 +18 -0
- package/dist/cjs/analytics/events.js +3 -3
- package/dist/cjs/react/marks/breakout.js +1 -3
- package/dist/cjs/react/nodes/media/index.js +4 -4
- package/dist/cjs/react/nodes/mediaInline.js +2 -2
- package/dist/cjs/react/nodes/table/colgroup.js +2 -2
- package/dist/cjs/react/nodes/table/sticky.js +2 -2
- package/dist/cjs/react/renderer-node.js +3 -3
- package/dist/cjs/text/nodes/index.js +2 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +2 -2
- package/dist/cjs/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -2
- package/dist/cjs/ui/annotations/contexts/AnnotationRangeContext.js +3 -3
- package/dist/es2019/analytics/events.js +2 -2
- package/dist/es2019/react/marks/breakout.js +1 -2
- package/dist/es2019/react/marks/confluence-inline-comment.js +1 -2
- package/dist/es2019/react/nodes/decisionList.js +1 -2
- package/dist/es2019/react/nodes/media/index.js +3 -3
- package/dist/es2019/react/nodes/mediaGroup.js +1 -2
- package/dist/es2019/react/nodes/mediaInline.js +1 -1
- package/dist/es2019/react/nodes/table/colgroup.js +1 -1
- package/dist/es2019/react/nodes/table/sticky.js +1 -1
- package/dist/es2019/react/nodes/taskItem.js +1 -2
- package/dist/es2019/react/nodes/taskList.js +1 -2
- package/dist/es2019/react/renderer-node.js +2 -2
- package/dist/es2019/text/nodes/index.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +1 -1
- package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -1
- package/dist/es2019/ui/annotations/contexts/AnnotationRangeContext.js +2 -2
- package/dist/esm/analytics/events.js +2 -2
- package/dist/esm/react/marks/breakout.js +1 -2
- package/dist/esm/react/marks/confluence-inline-comment.js +1 -2
- package/dist/esm/react/nodes/decisionList.js +1 -2
- package/dist/esm/react/nodes/media/index.js +3 -3
- package/dist/esm/react/nodes/mediaGroup.js +1 -2
- package/dist/esm/react/nodes/mediaInline.js +1 -1
- package/dist/esm/react/nodes/table/colgroup.js +1 -1
- package/dist/esm/react/nodes/table/sticky.js +1 -1
- package/dist/esm/react/nodes/taskItem.js +1 -2
- package/dist/esm/react/nodes/taskList.js +1 -2
- package/dist/esm/react/renderer-node.js +2 -2
- package/dist/esm/text/nodes/index.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +1 -1
- package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -1
- package/dist/esm/ui/annotations/contexts/AnnotationRangeContext.js +2 -2
- package/dist/types/actions/index.d.ts +3 -3
- package/dist/types/analytics/events.d.ts +6 -6
- package/dist/types/react/marks/breakout.d.ts +0 -1
- package/dist/types/react/marks/confluence-inline-comment.d.ts +2 -1
- package/dist/types/react/nodes/bodiedExtension.d.ts +1 -1
- package/dist/types/react/nodes/extension.d.ts +1 -2
- package/dist/types/react/nodes/extensionFrame.d.ts +1 -1
- package/dist/types/react/nodes/fallback.d.ts +2 -1
- package/dist/types/react/nodes/index.d.ts +12 -8
- package/dist/types/react/nodes/inlineExtension.d.ts +1 -1
- package/dist/types/react/nodes/media/index.d.ts +0 -2
- package/dist/types/react/nodes/mediaGroup.d.ts +6 -6
- package/dist/types/react/nodes/mediaInline.d.ts +2 -17
- package/dist/types/react/nodes/multiBodiedExtension.d.ts +1 -1
- package/dist/types/react/nodes/placeholder.d.ts +2 -1
- package/dist/types/react/nodes/table/colgroup.d.ts +0 -6
- package/dist/types/react/nodes/table/sticky.d.ts +1 -8
- package/dist/types/react/nodes/table/table.d.ts +2 -1
- package/dist/types/react/nodes/table.d.ts +2 -2
- package/dist/types/react/nodes/task-item-with-providers.d.ts +2 -4
- package/dist/types/react/nodes/taskItem.d.ts +1 -2
- package/dist/types/react/renderer-node.d.ts +0 -2
- package/dist/types/react/utils/performance/RenderTracking.d.ts +1 -1
- package/dist/types/text/nodes/index.d.ts +0 -3
- package/dist/types/ui/Expand.d.ts +0 -7
- package/dist/types/ui/ExtensionRenderer.d.ts +3 -5
- package/dist/types/ui/MediaCard.d.ts +2 -1
- package/dist/types/ui/Renderer/index.d.ts +0 -6
- package/dist/types/ui/Renderer/style.d.ts +2 -6
- package/dist/types/ui/Renderer/truncated-wrapper.d.ts +2 -1
- package/dist/types/ui/RendererActionsContext/WithRendererActions.d.ts +2 -1
- package/dist/types/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +4 -4
- package/dist/types/ui/TaskItemsFormatContext/index.d.ts +0 -1
- package/dist/types/ui/annotations/context.d.ts +1 -1
- package/dist/types/ui/annotations/contexts/AnnotationHoverContext.d.ts +6 -2
- package/dist/types/ui/annotations/contexts/AnnotationRangeContext.d.ts +2 -2
- package/dist/types/ui/renderer-props.d.ts +1 -1
- package/dist/types-ts4.5/actions/index.d.ts +3 -3
- package/dist/types-ts4.5/analytics/events.d.ts +6 -6
- package/dist/types-ts4.5/react/marks/breakout.d.ts +0 -1
- package/dist/types-ts4.5/react/marks/confluence-inline-comment.d.ts +2 -1
- package/dist/types-ts4.5/react/nodes/bodiedExtension.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/extension.d.ts +1 -2
- package/dist/types-ts4.5/react/nodes/extensionFrame.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/fallback.d.ts +2 -1
- package/dist/types-ts4.5/react/nodes/index.d.ts +12 -8
- package/dist/types-ts4.5/react/nodes/inlineExtension.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/media/index.d.ts +0 -2
- package/dist/types-ts4.5/react/nodes/mediaGroup.d.ts +6 -6
- package/dist/types-ts4.5/react/nodes/mediaInline.d.ts +2 -17
- package/dist/types-ts4.5/react/nodes/multiBodiedExtension.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/placeholder.d.ts +2 -1
- package/dist/types-ts4.5/react/nodes/table/colgroup.d.ts +0 -6
- package/dist/types-ts4.5/react/nodes/table/sticky.d.ts +1 -8
- package/dist/types-ts4.5/react/nodes/table/table.d.ts +2 -1
- package/dist/types-ts4.5/react/nodes/table.d.ts +2 -2
- package/dist/types-ts4.5/react/nodes/task-item-with-providers.d.ts +2 -4
- package/dist/types-ts4.5/react/nodes/taskItem.d.ts +1 -2
- package/dist/types-ts4.5/react/renderer-node.d.ts +0 -2
- package/dist/types-ts4.5/react/utils/performance/RenderTracking.d.ts +1 -1
- package/dist/types-ts4.5/text/nodes/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/Expand.d.ts +0 -7
- package/dist/types-ts4.5/ui/ExtensionRenderer.d.ts +3 -5
- package/dist/types-ts4.5/ui/MediaCard.d.ts +2 -1
- package/dist/types-ts4.5/ui/Renderer/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/Renderer/style.d.ts +2 -6
- package/dist/types-ts4.5/ui/Renderer/truncated-wrapper.d.ts +2 -1
- package/dist/types-ts4.5/ui/RendererActionsContext/WithRendererActions.d.ts +2 -1
- package/dist/types-ts4.5/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +4 -4
- package/dist/types-ts4.5/ui/TaskItemsFormatContext/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/annotations/context.d.ts +1 -1
- package/dist/types-ts4.5/ui/annotations/contexts/AnnotationHoverContext.d.ts +6 -2
- package/dist/types-ts4.5/ui/annotations/contexts/AnnotationRangeContext.d.ts +2 -2
- package/dist/types-ts4.5/ui/renderer-props.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
var defaultValue = [undefined, function () {}];
|
|
3
|
-
|
|
3
|
+
var TaskItemsFormatContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
4
4
|
var reducer = function reducer(_state, action) {
|
|
5
5
|
return action;
|
|
6
6
|
};
|
|
@@ -79,12 +79,12 @@ function reducer(state, action) {
|
|
|
79
79
|
return state;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
var AnnotationRangeStateContext = /*#__PURE__*/createContext({
|
|
83
83
|
range: null,
|
|
84
84
|
draftRange: null,
|
|
85
85
|
type: null
|
|
86
86
|
});
|
|
87
|
-
|
|
87
|
+
var AnnotationRangeDispatchContext = /*#__PURE__*/createContext({
|
|
88
88
|
clearRange: function clearRange() {},
|
|
89
89
|
clearSelectionRange: function clearSelectionRange() {},
|
|
90
90
|
clearDraftRange: function clearDraftRange() {},
|
|
@@ -17,18 +17,18 @@ type Annotation = {
|
|
|
17
17
|
annotationId: string;
|
|
18
18
|
annotationType: AnnotationTypes;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
interface RendererActionsOptions {
|
|
21
21
|
annotate: (range: Range, annotationId: string, annotationType: 'inlineComment') => ActionResult;
|
|
22
22
|
deleteAnnotation: (annotationId: string, annotationType: 'inlineComment') => ActionResult;
|
|
23
23
|
isValidAnnotationRange: (range: Range) => boolean;
|
|
24
24
|
}
|
|
25
25
|
export type ApplyAnnotation = (pos: Position, annotation: Annotation, isCommentsOnMediaBugFixEnabled?: boolean) => AnnotationActionResult;
|
|
26
|
-
|
|
26
|
+
interface AnnotationsRendererActionsOptions {
|
|
27
27
|
isValidAnnotationPosition: (pos: Position) => boolean;
|
|
28
28
|
applyAnnotation: ApplyAnnotation;
|
|
29
29
|
getAnnotationMarks: () => Mark[];
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
interface PositionRendererActionsOptions {
|
|
32
32
|
getPositionFromRange: (range: Range) => Position | false;
|
|
33
33
|
}
|
|
34
34
|
export default class RendererActions implements RendererActionsOptions, AnnotationsRendererActionsOptions, PositionRendererActionsOptions {
|
|
@@ -96,23 +96,23 @@ type ExpandAEP = AEP<ACTION.TOGGLE_EXPAND, ACTION_SUBJECT.EXPAND | ACTION_SUBJEC
|
|
|
96
96
|
mode: MODE.RENDERER;
|
|
97
97
|
expanded: boolean;
|
|
98
98
|
}, EVENT_TYPE.TRACK>;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
type AnnotationActionType = ACTION.INSERTED | ACTION.CLOSED | ACTION.EDITED | ACTION.DELETED | ACTION.OPENED | ACTION.RESOLVED | ACTION.VIEWED | ACTION.CREATE_NOT_ALLOWED;
|
|
100
|
+
type AnnotationAEPAttributes = AnnotationDraftAEPAttributes | AnnotationResolvedAEPAttributes;
|
|
101
|
+
type AnnotationDraftAEPAttributes = {
|
|
102
102
|
overlap?: number;
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
type AnnotationResolvedAEPAttributes = {
|
|
105
105
|
method?: RESOLVE_METHOD;
|
|
106
106
|
};
|
|
107
107
|
export type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, {
|
|
108
108
|
inlineNodeNames?: string[];
|
|
109
109
|
}, EVENT_TYPE.TRACK>;
|
|
110
|
-
|
|
110
|
+
declare enum RESOLVE_METHOD {
|
|
111
111
|
COMPONENT = "component",
|
|
112
112
|
CONSUMER = "consumer",
|
|
113
113
|
ORPHANED = "orphaned"
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
116
116
|
type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
117
117
|
type RendererTTIAEP = AEP<ACTION.RENDERER_TTI, ACTION_SUBJECT.RENDERER, undefined, {
|
|
118
118
|
tti: number;
|
|
@@ -5,5 +5,4 @@
|
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
7
7
|
import type { MarkProps } from '../types';
|
|
8
|
-
export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
|
|
9
8
|
export default function Breakout(props: MarkProps<BreakoutMarkAttrs>): jsx.JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import { type MarkProps } from '../types';
|
|
3
|
-
|
|
3
|
+
interface Props {
|
|
4
4
|
reference: string;
|
|
5
5
|
}
|
|
6
6
|
export default class ConfluenceInlineComment extends Component<MarkProps<Props>, {}> {
|
|
7
7
|
render(): JSX.Element;
|
|
8
8
|
}
|
|
9
|
+
export {};
|
|
@@ -5,7 +5,7 @@ import type { Serializer } from '../..';
|
|
|
5
5
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
|
|
8
|
+
interface Props {
|
|
9
9
|
serializer: Serializer<any>;
|
|
10
10
|
extensionHandlers?: ExtensionHandlers;
|
|
11
11
|
rendererContext: RendererContext;
|
|
@@ -5,7 +5,7 @@ import { type ExtensionLayout } from '@atlaskit/adf-schema';
|
|
|
5
5
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
6
6
|
import { type ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
|
|
8
|
-
|
|
8
|
+
interface Props {
|
|
9
9
|
extensionHandlers?: ExtensionHandlers;
|
|
10
10
|
providers: ProviderFactory;
|
|
11
11
|
rendererContext: RendererContext;
|
|
@@ -68,7 +68,6 @@ declare const _default: {
|
|
|
68
68
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, nextContext: any): void;
|
|
69
69
|
};
|
|
70
70
|
new (props: Props, context: any): {
|
|
71
|
-
/** We keep rendering the default content */
|
|
72
71
|
overflowContainer?: HTMLElement | null | undefined;
|
|
73
72
|
container?: HTMLElement | undefined;
|
|
74
73
|
shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
|
|
@@ -10,7 +10,7 @@ import type { Serializer } from '../..';
|
|
|
10
10
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
11
11
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
13
|
-
|
|
13
|
+
type Props = React.PropsWithChildren<{
|
|
14
14
|
serializer: Serializer<any>;
|
|
15
15
|
extensionHandlers?: ExtensionHandlers;
|
|
16
16
|
rendererContext: RendererContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type CardErrorBoundaryProps = {
|
|
3
3
|
unsupportedComponent: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
4
4
|
};
|
|
5
5
|
export declare class CardErrorBoundary extends React.PureComponent<{
|
|
@@ -21,3 +21,4 @@ export declare class CardErrorBoundary extends React.PureComponent<{
|
|
|
21
21
|
render(): React.ReactNode;
|
|
22
22
|
componentDidCatch(_error: Error): void;
|
|
23
23
|
}
|
|
24
|
+
export {};
|
|
@@ -2,18 +2,14 @@ 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
4
|
import Blockquote from './blockquote';
|
|
5
|
-
import type { Props as BodiedExtensionProps } from './bodiedExtension';
|
|
6
5
|
import BodiedExtension from './bodiedExtension';
|
|
7
|
-
import type { Props as MultiBodiedExtensionProps } from './multiBodiedExtension';
|
|
8
6
|
import MultiBodiedExtension from './multiBodiedExtension';
|
|
9
7
|
import ExtensionFrame from './extensionFrame';
|
|
10
8
|
import BulletList from './bulletList';
|
|
11
9
|
import Doc, { DocWithSelectAllTrap } from './doc';
|
|
12
|
-
import type { Props as ExtensionProps } from './extension';
|
|
13
10
|
import Extension from './extension';
|
|
14
11
|
import HardBreak from './hardBreak';
|
|
15
12
|
import Heading from './heading';
|
|
16
|
-
import type { Props as InlineExtensionProps } from './inlineExtension';
|
|
17
13
|
import InlineExtension from './inlineExtension';
|
|
18
14
|
import LayoutSection from './layoutSection';
|
|
19
15
|
import LayoutColumn from './layoutColumn';
|
|
@@ -66,14 +62,23 @@ declare const BlockCard: React.ComponentType<{
|
|
|
66
62
|
}> & Loadable.LoadableComponent;
|
|
67
63
|
declare const Media: React.ComponentType<import("./media").MediaProps> & Loadable.LoadableComponent;
|
|
68
64
|
declare const MediaGroup: React.ComponentType<import("./mediaGroup").MediaGroupProps> & Loadable.LoadableComponent;
|
|
69
|
-
declare const MediaInline: React.ComponentType<import("react-intl-next").WithIntlProps<
|
|
65
|
+
declare const MediaInline: React.ComponentType<import("react-intl-next").WithIntlProps<{
|
|
66
|
+
id: string;
|
|
67
|
+
providers: import("@atlaskit/editor-common/provider-factory").ProviderFactory;
|
|
68
|
+
collection?: string | undefined;
|
|
69
|
+
eventHandlers?: import("@atlaskit/editor-common/ui").EventHandlers | undefined;
|
|
70
|
+
rendererAppearance?: import("../../ui/Renderer/types").RendererAppearance;
|
|
71
|
+
featureFlags?: import("@atlaskit/media-common").MediaFeatureFlags | undefined;
|
|
72
|
+
marks?: Mark[] | undefined;
|
|
73
|
+
ssr?: import("../..").MediaSSR | undefined;
|
|
74
|
+
} & import("react-intl-next").WrappedComponentProps & import("@atlaskit/editor-common/media-inline").MediaInlineAttrs>> & Loadable.LoadableComponent;
|
|
70
75
|
declare const MediaSingle: React.ComponentType<import("react-intl-next").WithIntlProps<import("./mediaSingle").Props & import("react-intl-next").WrappedComponentProps>> & Loadable.LoadableComponent;
|
|
71
76
|
declare const Mention: React.ComponentType<import("./mention").Props> & Loadable.LoadableComponent;
|
|
72
77
|
declare const Expand: React.ComponentType<import("react-intl-next").WithIntlProps<import("../../ui/Expand").ExpandProps & import("react-intl-next").WrappedComponentProps>> & Loadable.LoadableComponent;
|
|
73
78
|
export declare const nodeToReact: {
|
|
74
79
|
[key: string]: React.ComponentType<React.PropsWithChildren<any>>;
|
|
75
80
|
};
|
|
76
|
-
|
|
81
|
+
interface ToReactFlags {
|
|
77
82
|
allowSelectAllTrap?: boolean;
|
|
78
83
|
allowWindowedCodeBlock?: boolean;
|
|
79
84
|
}
|
|
@@ -85,7 +90,7 @@ export interface TextWrapper {
|
|
|
85
90
|
content: Node[];
|
|
86
91
|
nodeSize: number;
|
|
87
92
|
}
|
|
88
|
-
|
|
93
|
+
interface NodeSimple {
|
|
89
94
|
type: {
|
|
90
95
|
name: string;
|
|
91
96
|
};
|
|
@@ -103,4 +108,3 @@ export declare function isTextNode(node: Node | Mark): node is Node;
|
|
|
103
108
|
*/
|
|
104
109
|
export declare const isEmojiDoc: (doc: Fragment) => boolean;
|
|
105
110
|
export { Blockquote, BodiedExtension, BulletList, BlockCard, Caption, CodeBlock, WindowedCodeBlock, Date, DecisionItem, DecisionList, Doc, DocWithSelectAllTrap, Emoji, Extension, ExtensionFrame, Expand, HardBreak, Heading, ListItem, InlineCard, InlineExtension, LayoutSection, LayoutColumn, Media, MediaGroup, MediaInline, MediaSingle, Mention, MultiBodiedExtension, OrderedList, Panel, Paragraph, Placeholder, Rule, Status, TaskItem, TaskList, Table, TableCell, TableRow, UnknownBlock, EmbedCard, };
|
|
106
|
-
export type { BodiedExtensionProps, ExtensionProps, InlineExtensionProps, MultiBodiedExtensionProps, };
|
|
@@ -3,7 +3,7 @@ import type { RendererContext } from '../types';
|
|
|
3
3
|
import type { Mark as PMMark } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
|
|
6
|
+
interface Props {
|
|
7
7
|
extensionHandlers?: ExtensionHandlers;
|
|
8
8
|
providers: ProviderFactory;
|
|
9
9
|
rendererContext: RendererContext;
|
|
@@ -30,7 +30,5 @@ export type MediaProps = MediaCardProps & {
|
|
|
30
30
|
height?: number;
|
|
31
31
|
isDrafting: boolean;
|
|
32
32
|
};
|
|
33
|
-
export declare const linkStyle: import("@emotion/react").SerializedStyles;
|
|
34
|
-
export declare const borderStyle: (color: string, width: number) => import("@emotion/react").SerializedStyles;
|
|
35
33
|
declare const MediaWithDraftAnnotation: (props: PropsWithChildren<MediaProps>) => jsx.JSX.Element;
|
|
36
34
|
export default MediaWithDraftAnnotation;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { ReactElement } from 'react';
|
|
3
|
-
import { PureComponent } from 'react';
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
4
3
|
import type { CardEvent } from '@atlaskit/media-card';
|
|
5
4
|
import type { EventHandlers, CardEventClickHandler } from '@atlaskit/editor-common/ui';
|
|
6
5
|
import type { Identifier } from '@atlaskit/media-client';
|
|
@@ -12,7 +11,7 @@ export interface MediaGroupProps {
|
|
|
12
11
|
featureFlags?: MediaFeatureFlags;
|
|
13
12
|
enableDownloadButton?: boolean;
|
|
14
13
|
}
|
|
15
|
-
|
|
14
|
+
interface MediaGroupState {
|
|
16
15
|
animate: boolean;
|
|
17
16
|
offset: number;
|
|
18
17
|
}
|
|
@@ -21,10 +20,11 @@ export default class MediaGroup extends PureComponent<MediaGroupProps, MediaGrou
|
|
|
21
20
|
private handleSize;
|
|
22
21
|
private handleScroll;
|
|
23
22
|
render(): JSX.Element;
|
|
24
|
-
renderSingleFile(child: ReactElement<MediaProps>):
|
|
25
|
-
renderSingleLink(child: ReactElement<MediaProps>):
|
|
23
|
+
renderSingleFile(child: ReactElement<MediaProps>): ReactElement<MediaProps, string | React.JSXElementConstructor<any>>;
|
|
24
|
+
renderSingleLink(child: ReactElement<MediaProps>): ReactElement<MediaProps, string | React.JSXElementConstructor<any>>;
|
|
26
25
|
onMediaClick: (cardClickHandler: CardEventClickHandler, child: ReactElement<MediaProps>, surroundingItems: Identifier[]) => (event: CardEvent, analyticsEvent?: any) => void;
|
|
27
|
-
cloneFileCard(child: ReactElement<MediaProps>, surroundingItems: Identifier[]):
|
|
26
|
+
cloneFileCard(child: ReactElement<MediaProps>, surroundingItems: Identifier[]): ReactElement<MediaProps, string | React.JSXElementConstructor<any>>;
|
|
28
27
|
renderStrip(): JSX.Element;
|
|
29
28
|
private mapMediaPropsToIdentifier;
|
|
30
29
|
}
|
|
30
|
+
export {};
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
2
2
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
|
-
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
5
4
|
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
6
5
|
import React from 'react';
|
|
7
|
-
import type {
|
|
8
|
-
import type { ClipboardAttrs } from '../../ui/MediaCard';
|
|
6
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
9
7
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
10
|
-
import type { RendererContext } from '../types';
|
|
11
8
|
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
12
9
|
import type { MediaSSR } from '../../types/mediaOptions';
|
|
13
|
-
|
|
14
|
-
identifier: FileIdentifier;
|
|
15
|
-
clipboardAttrs: ClipboardAttrs;
|
|
16
|
-
intl?: IntlShape;
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
collection?: string;
|
|
19
|
-
eventHandlers?: EventHandlers;
|
|
20
|
-
rendererAppearance?: RendererAppearance;
|
|
21
|
-
featureFlags?: MediaFeatureFlags;
|
|
22
|
-
rendererContext?: RendererContext;
|
|
23
|
-
};
|
|
24
|
-
export type MediaInlineProps = {
|
|
10
|
+
type MediaInlineProps = {
|
|
25
11
|
id: string;
|
|
26
12
|
providers: ProviderFactory;
|
|
27
13
|
collection?: string;
|
|
@@ -31,7 +17,6 @@ export type MediaInlineProps = {
|
|
|
31
17
|
marks?: Array<Mark>;
|
|
32
18
|
ssr?: MediaSSR;
|
|
33
19
|
};
|
|
34
|
-
export declare const RenderMediaInline: ({ rendererAppearance, clipboardAttrs, collection: collectionName, eventHandlers, identifier, }: RenderMediaInlineProps) => JSX.Element;
|
|
35
20
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps & MediaInlineAttrs>> & {
|
|
36
21
|
WrappedComponent: React.ComponentType<MediaInlineProps & WrappedComponentProps & MediaInlineAttrs>;
|
|
37
22
|
};
|
|
@@ -10,7 +10,7 @@ import type { Serializer } from '../..';
|
|
|
10
10
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
11
11
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
13
|
-
|
|
13
|
+
type Props = React.PropsWithChildren<{
|
|
14
14
|
serializer: Serializer<any>;
|
|
15
15
|
extensionHandlers?: ExtensionHandlers;
|
|
16
16
|
rendererContext: RendererContext;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { SharedTableProps } from './types';
|
|
3
|
-
export interface ScaleOptions {
|
|
4
|
-
renderWidth: number;
|
|
5
|
-
tableWidth: number;
|
|
6
|
-
maxScale: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const calcScalePercent: ({ renderWidth, tableWidth, maxScale }: ScaleOptions) => number;
|
|
9
3
|
export declare const Colgroup: (props: SharedTableProps) => JSX.Element | null;
|
|
@@ -10,14 +10,7 @@ import type { TableLayout } from '@atlaskit/adf-schema';
|
|
|
10
10
|
import type { RendererAppearance } from '../../../ui/Renderer/types';
|
|
11
11
|
export type StickyMode = 'none' | 'stick' | 'pin-bottom';
|
|
12
12
|
export declare const tableStickyPadding = 8;
|
|
13
|
-
type
|
|
14
|
-
top?: number;
|
|
15
|
-
wrapperWidth: number;
|
|
16
|
-
mode: StickyMode;
|
|
17
|
-
rendererAppearance: RendererAppearance;
|
|
18
|
-
}>;
|
|
19
|
-
export declare const FixedTableDiv: (props: FixedProps) => jsx.JSX.Element;
|
|
20
|
-
export type StickyTableProps = {
|
|
13
|
+
type StickyTableProps = {
|
|
21
14
|
left?: number;
|
|
22
15
|
top?: number;
|
|
23
16
|
mode: StickyMode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SharedTableProps } from './types';
|
|
3
|
-
|
|
3
|
+
type TableProps = SharedTableProps & {
|
|
4
4
|
innerRef?: React.RefObject<HTMLTableElement>;
|
|
5
5
|
children: React.ReactNode[];
|
|
6
6
|
};
|
|
7
7
|
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isinsideMultiBodiedExtension, }: TableProps) => JSX.Element>;
|
|
8
|
+
export {};
|
|
@@ -8,7 +8,7 @@ import type { StickyMode } from './table/sticky';
|
|
|
8
8
|
import { OverflowParent } from './table/sticky';
|
|
9
9
|
import type { SharedTableProps } from './table/types';
|
|
10
10
|
export declare const isTableResizingEnabled: (appearance: RendererAppearance) => boolean;
|
|
11
|
-
|
|
11
|
+
type TableProps = SharedTableProps & {
|
|
12
12
|
children: React.ReactElement<any> | Array<React.ReactElement<any>>;
|
|
13
13
|
tableNode?: PMNode;
|
|
14
14
|
rendererAppearance?: RendererAppearance;
|
|
@@ -47,7 +47,7 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
47
47
|
render(): JSX.Element;
|
|
48
48
|
private grabFirstRowRef;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
type TableProcessorState = {
|
|
51
51
|
tableOrderStatus?: TableOrderStatus;
|
|
52
52
|
};
|
|
53
53
|
export declare class TableProcessor extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableProcessorState> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { type ContentRef, type TaskDecisionProvider } from '@atlaskit/task-decision';
|
|
4
|
-
|
|
4
|
+
interface Props {
|
|
5
5
|
taskId: string;
|
|
6
6
|
objectAri: string;
|
|
7
7
|
isDone: boolean;
|
|
@@ -17,7 +17,5 @@ export interface Props {
|
|
|
17
17
|
[key: string]: string | number;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
export interface State {
|
|
21
|
-
resolvedContextProvider?: ContextIdentifierProvider;
|
|
22
|
-
}
|
|
23
20
|
export default function TaskItemWithProviders(props: Props): JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PureComponent, type ReactNode } from 'react';
|
|
2
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import { type RendererContext } from '../types';
|
|
4
|
-
import { type NodeProps } from '../types';
|
|
3
|
+
import { type RendererContext, type NodeProps } from '../types';
|
|
5
4
|
export interface Props {
|
|
6
5
|
localId: string;
|
|
7
6
|
rendererContext?: RendererContext;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare const isLayoutNode: (node: Node) => boolean;
|
|
3
|
-
export declare const hasBreakOutMark: (node: Node) => boolean;
|
|
4
2
|
export declare const insideBreakoutLayout: (path: Node[]) => boolean;
|
|
5
3
|
export declare const insideBlockNode: (path: Node[], schema: Schema) => boolean;
|
|
6
4
|
export declare const insideMultiBodiedExtension: (path: Node[], schema: Schema) => boolean;
|
|
@@ -3,7 +3,7 @@ import { type ACTION_SUBJECT, type ACTION } from '@atlaskit/editor-common/analyt
|
|
|
3
3
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
4
4
|
type RenderActions = ACTION.RE_RENDERED;
|
|
5
5
|
type RenderActionSubjects = ACTION_SUBJECT.RENDERER;
|
|
6
|
-
|
|
6
|
+
type RenderTrackingProps<ComponentProps> = {
|
|
7
7
|
componentProps: ComponentProps;
|
|
8
8
|
action: RenderActions;
|
|
9
9
|
actionSubject: RenderActionSubjects;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { type Node as PMNode, type Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export type NodeReducer = (node: PMNode, schema: Schema) => string;
|
|
3
3
|
export declare const reduce: NodeReducer;
|
|
4
|
-
export declare const nodeToReducerMapping: {
|
|
5
|
-
[key: string]: NodeReducer;
|
|
6
|
-
};
|
|
@@ -2,13 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
4
4
|
import type { RendererAppearance } from './Renderer/types';
|
|
5
|
-
export type StyleProps = {
|
|
6
|
-
expanded?: boolean;
|
|
7
|
-
focused?: boolean;
|
|
8
|
-
'data-node-type'?: 'expand' | 'nestedExpand';
|
|
9
|
-
'data-title'?: string;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
};
|
|
12
5
|
export interface ExpandProps {
|
|
13
6
|
title: string;
|
|
14
7
|
nodeType: 'expand' | 'nestedExpand';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { RendererContext } from '../react/types';
|
|
3
3
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
4
|
-
import type { ExtensionHandlers,
|
|
4
|
+
import type { ExtensionHandlers, MultiBodiedExtensionActions } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { Mark as PMMark } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
|
|
7
|
+
interface Props {
|
|
8
8
|
type: 'extension' | 'inlineExtension' | 'bodiedExtension' | 'multiBodiedExtension';
|
|
9
9
|
extensionHandlers?: ExtensionHandlers;
|
|
10
10
|
providers?: ProviderFactory;
|
|
@@ -22,7 +22,5 @@ export interface Props {
|
|
|
22
22
|
result?: JSX.Element | null;
|
|
23
23
|
}) => JSX.Element;
|
|
24
24
|
}
|
|
25
|
-
export interface State {
|
|
26
|
-
extensionProvider?: ExtensionProvider | null;
|
|
27
|
-
}
|
|
28
25
|
export default function ExtensionRenderer(props: Props): JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -41,7 +41,7 @@ export interface MediaCardProps {
|
|
|
41
41
|
ssr?: MediaSSR;
|
|
42
42
|
dataAttributes?: Record<string, any>;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
interface State {
|
|
45
45
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
46
46
|
fileState?: FileState;
|
|
47
47
|
}
|
|
@@ -79,3 +79,4 @@ export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifie
|
|
|
79
79
|
};
|
|
80
80
|
export declare const MediaCardInternal: (props: MediaCardProps) => JSX.Element;
|
|
81
81
|
export declare const MediaCard: React.ComponentClass<MediaCardProps & import("@atlaskit/editor-common/utils").ImageLoaderProps, any>;
|
|
82
|
+
export {};
|
|
@@ -8,13 +8,7 @@ import type { NodeComponentsProps } from './types';
|
|
|
8
8
|
import type { RendererProps } from '../renderer-props';
|
|
9
9
|
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
10
10
|
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
11
|
-
export interface Extension<T> {
|
|
12
|
-
extensionKey: string;
|
|
13
|
-
parameters?: T;
|
|
14
|
-
content?: any;
|
|
15
|
-
}
|
|
16
11
|
export declare const defaultNodeComponents: NodeComponentsProps;
|
|
17
|
-
export type { RendererProps as Props };
|
|
18
12
|
export declare class Renderer extends PureComponent<RendererProps> {
|
|
19
13
|
private providerFactory;
|
|
20
14
|
private serializer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RendererAppearance } from './types';
|
|
2
2
|
export declare const FullPagePadding = 32;
|
|
3
|
-
|
|
3
|
+
type RendererWrapperProps = {
|
|
4
4
|
allowAnnotations?: boolean;
|
|
5
5
|
appearance?: RendererAppearance;
|
|
6
6
|
allowNestedHeaderLinks: boolean;
|
|
@@ -8,9 +8,5 @@ export type RendererWrapperProps = {
|
|
|
8
8
|
useBlockRenderForCodeBlock: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare const TELEPOINTER_ID = "ai-streaming-telepointer";
|
|
11
|
-
export declare const headingSizes: {
|
|
12
|
-
[key: string]: {
|
|
13
|
-
[key: string]: number;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
11
|
export declare const rendererStyles: (wrapperProps: RendererWrapperProps) => (theme: any) => import("@emotion/react").SerializedStyles;
|
|
12
|
+
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import { Component } from 'react';
|
|
7
|
-
|
|
7
|
+
interface TruncatedWrapperProps {
|
|
8
8
|
height?: number;
|
|
9
9
|
fadeHeight?: number;
|
|
10
10
|
backgroundColor?: string;
|
|
@@ -14,3 +14,4 @@ export declare class TruncatedWrapper extends Component<TruncatedWrapperProps, u
|
|
|
14
14
|
constructor(props: TruncatedWrapperProps);
|
|
15
15
|
render(): jsx.JSX.Element;
|
|
16
16
|
}
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type RendererActions from '../../actions/index';
|
|
3
|
-
|
|
3
|
+
interface WithRendererActionsProps {
|
|
4
4
|
render(actions: RendererActions): ReactNode | null;
|
|
5
5
|
}
|
|
6
6
|
export declare function WithRendererActions({ render }: WithRendererActionsProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type TaskItemsFormatReducerAction = boolean | undefined;
|
|
2
|
+
type TaskItemsDone = boolean | undefined;
|
|
3
|
+
type TaskItemsStateContext = [TaskItemsDone, React.Dispatch<TaskItemsFormatReducerAction>];
|
|
4
|
+
type TaskItemsFormatReducerAction = boolean | undefined;
|
|
6
5
|
export declare function TaskItemsFormatProvider({ children }: {
|
|
7
6
|
children: ReactNode;
|
|
8
7
|
}): JSX.Element;
|
|
@@ -10,3 +9,4 @@ export declare function useTaskItemsFormatContext(): TaskItemsStateContext;
|
|
|
10
9
|
export declare function TaskItemsFormatConsumer({ children, }: {
|
|
11
10
|
children: ([isChecked, dispatch]: TaskItemsStateContext) => ReactNode;
|
|
12
11
|
}): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -6,7 +6,7 @@ export type AnnotationsDraftContextWrapperChildrenProps = {
|
|
|
6
6
|
applyAnnotationDraftAt: (position: Position) => void;
|
|
7
7
|
clearAnnotationDraft: () => void;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type RenderCallbackType = (props: React.PropsWithChildren<AnnotationsDraftContextWrapperChildrenProps>) => React.ReactNode;
|
|
10
10
|
type Props = {
|
|
11
11
|
setDraftRange: () => void;
|
|
12
12
|
clearDraftRange: () => void;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface AnnotationHoverStateContext {
|
|
3
4
|
isWithinRange: boolean;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
+
interface AnnotationHoverDispatchContext {
|
|
6
7
|
cancelTimeout: () => void;
|
|
7
8
|
initiateTimeout: () => void;
|
|
8
9
|
setIsWithinRange: (isWithinRange: boolean) => void;
|
|
9
10
|
}
|
|
11
|
+
declare const AnnotationHoverStateContext: React.Context<AnnotationHoverStateContext>;
|
|
12
|
+
declare const AnnotationHoverDispatchContext: React.Context<AnnotationHoverDispatchContext>;
|
|
10
13
|
export declare const AnnotationHoverContext: ({ children }: {
|
|
11
14
|
children?: ReactNode;
|
|
12
15
|
}) => JSX.Element;
|
|
13
16
|
export declare const useAnnotationHoverContext: () => AnnotationHoverStateContext;
|
|
14
17
|
export declare const useAnnotationHoverDispatch: () => AnnotationHoverDispatchContext;
|
|
18
|
+
export {};
|
|
@@ -15,8 +15,8 @@ interface AnnotationRangeDispatchContext {
|
|
|
15
15
|
setDraftRange: (draftRange: Range | null, type: RangeType) => void;
|
|
16
16
|
setHoverTarget?: (target: HTMLElement) => void;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
declare const AnnotationRangeStateContext: React.Context<AnnotationRangeStateContext>;
|
|
19
|
+
declare const AnnotationRangeDispatchContext: React.Context<AnnotationRangeDispatchContext>;
|
|
20
20
|
export declare const AnnotationRangeProvider: ({ children, allowCommentsOnMedia, }: {
|
|
21
21
|
children?: ReactNode;
|
|
22
22
|
allowCommentsOnMedia?: boolean | undefined;
|
|
@@ -17,7 +17,7 @@ import type { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
|
17
17
|
import type { DocNode } from '@atlaskit/adf-schema';
|
|
18
18
|
import type { TextHighlighter } from '../react/types';
|
|
19
19
|
export type { NodeComponentsProps } from './Renderer/types';
|
|
20
|
-
|
|
20
|
+
interface RawObjectFeatureFlags {
|
|
21
21
|
['renderer-render-tracking']: string;
|
|
22
22
|
}
|
|
23
23
|
export interface NormalizedObjectFeatureFlags {
|