@atlaskit/media-viewer 52.9.4 → 52.9.5
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 +6 -0
- package/dist/es2019/viewers/codeViewer/CodeRendererAdvanced/theme.js +0 -1
- package/dist/esm/viewers/codeViewer/CodeRendererAdvanced/theme.js +0 -1
- package/dist/types/errorMessage.d.ts +3 -1
- package/dist/types/styleWrappers.d.ts +6 -6
- package/dist/types/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +2 -2
- package/dist/types/viewers/archiveSidebar/styleWrappers.d.ts +2 -2
- package/dist/types/viewers/codeViewer/CodeRendererAdvanced/theme.d.ts +2 -1
- package/dist/types/viewers/codeViewer/codeViewerRenderer-compiled.d.ts +3 -3
- package/dist/types/viewers/codeViewer/styles.d.ts +4 -3
- package/dist/types-ts4.5/errorMessage.d.ts +3 -1
- package/dist/types-ts4.5/styleWrappers.d.ts +6 -6
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +2 -2
- package/dist/types-ts4.5/viewers/archiveSidebar/styleWrappers.d.ts +2 -2
- package/dist/types-ts4.5/viewers/codeViewer/CodeRendererAdvanced/theme.d.ts +2 -1
- package/dist/types-ts4.5/viewers/codeViewer/codeViewerRenderer-compiled.d.ts +3 -3
- package/dist/types-ts4.5/viewers/codeViewer/styles.d.ts +4 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
2
|
import { HighlightStyle } from '@codemirror/language';
|
|
3
3
|
import { tags } from '@lezer/highlight';
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* These styles are copied directly from
|
|
7
6
|
* packages/editor/editor-plugin-code-block-advanced/src/nodeviews/codeBlockAdvanced.ts
|
|
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import { EditorView as CodeMirror } from '@codemirror/view';
|
|
3
3
|
import { HighlightStyle } from '@codemirror/language';
|
|
4
4
|
import { tags } from '@lezer/highlight';
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* These styles are copied directly from
|
|
8
7
|
* packages/editor/editor-plugin-code-block-advanced/src/nodeviews/codeBlockAdvanced.ts
|
|
@@ -4,6 +4,8 @@ import { type MessageDescriptor, type WrappedComponentProps } from 'react-intl-n
|
|
|
4
4
|
import { type FileState } from '@atlaskit/media-client';
|
|
5
5
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
6
6
|
import { type PrimaryErrorReason, type SecondaryErrorReason, type MediaViewerError } from './errors';
|
|
7
|
+
import { type LoadFailedEventPayload } from './analytics/events/operational/loadFailed';
|
|
8
|
+
import { type PreviewUnsupportedEventPayload } from './analytics/events/operational/previewUnsupported';
|
|
7
9
|
import { type FileStateFlags } from './components/types';
|
|
8
10
|
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
9
11
|
export type Props = Readonly<{
|
|
@@ -24,7 +26,7 @@ export declare const getErrorMessageFromError: (error: MediaViewerError) => Mess
|
|
|
24
26
|
export declare class ErrorMessage extends React.Component<Props & WrappedComponentProps & WithAnalyticsEventsProps, {}> {
|
|
25
27
|
private getErrorInfo;
|
|
26
28
|
componentDidMount(): void;
|
|
27
|
-
static getEventPayload(error: MediaViewerError, fileId: string, fileState?: FileState, traceContext?: MediaTraceContext):
|
|
29
|
+
static getEventPayload(error: MediaViewerError, fileId: string, fileState?: FileState, traceContext?: MediaTraceContext): PreviewUnsupportedEventPayload | LoadFailedEventPayload;
|
|
28
30
|
render(): React.JSX.Element;
|
|
29
31
|
}
|
|
30
32
|
declare const ErroMsg: React.ComponentType<Props & WithAnalyticsEventsProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type ForwardRefExoticComponent, type MouseEvent, type ReactNode, type RefAttributes } from 'react';
|
|
2
2
|
import { type MediaType } from '@atlaskit/media-client';
|
|
3
3
|
export interface IconWrapperProps {
|
|
4
4
|
type: MediaType;
|
|
@@ -49,7 +49,7 @@ type VideoProps = {
|
|
|
49
49
|
autoPlay: boolean;
|
|
50
50
|
};
|
|
51
51
|
export declare const Video: ({ autoPlay, controls, src }: VideoProps) => JSX.Element;
|
|
52
|
-
export declare const PDFWrapper:
|
|
52
|
+
export declare const PDFWrapper: ForwardRefExoticComponent<DataTestID & Children & RefAttributes<HTMLDivElement>>;
|
|
53
53
|
export declare const Arrow: ({ className, children }: ClassName & Children) => JSX.Element;
|
|
54
54
|
export type LeftWrapperProps = {
|
|
55
55
|
isArchiveSideBarVisible: boolean;
|
|
@@ -65,10 +65,10 @@ export type ImageWrapperProps = {
|
|
|
65
65
|
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
66
66
|
style: CSSProperties;
|
|
67
67
|
} & Children & DataTestID;
|
|
68
|
-
export declare const ImageWrapper:
|
|
68
|
+
export declare const ImageWrapper: ForwardRefExoticComponent<{
|
|
69
69
|
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
70
70
|
style: CSSProperties;
|
|
71
|
-
} & Children & DataTestID & ClassName &
|
|
71
|
+
} & Children & DataTestID & ClassName & RefAttributes<unknown>>;
|
|
72
72
|
export declare const BaselineExtend: () => JSX.Element;
|
|
73
73
|
export type ImgProps = {
|
|
74
74
|
canDrag: boolean;
|
|
@@ -96,7 +96,7 @@ export declare const RightHeader: ({ children }: Children) => JSX.Element;
|
|
|
96
96
|
export declare const CustomAudioPlayerWrapper: ({ children }: Children) => JSX.Element;
|
|
97
97
|
type AudioPlayerProps = DataTestID & Children;
|
|
98
98
|
export declare const AudioPlayer: {
|
|
99
|
-
(
|
|
99
|
+
(props: AudioPlayerProps): JSX.Element;
|
|
100
100
|
displayName: string;
|
|
101
101
|
};
|
|
102
102
|
type AudioProps = {
|
|
@@ -105,7 +105,7 @@ type AudioProps = {
|
|
|
105
105
|
src: string | undefined;
|
|
106
106
|
preload: string;
|
|
107
107
|
};
|
|
108
|
-
export declare const Audio:
|
|
108
|
+
export declare const Audio: ForwardRefExoticComponent<AudioProps & RefAttributes<HTMLAudioElement>>;
|
|
109
109
|
type AudioCoverProps = {
|
|
110
110
|
alt: string | undefined;
|
|
111
111
|
src: string;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type ZipEntry } from 'unzipit';
|
|
3
3
|
import { type MediaClient } from '@atlaskit/media-client';
|
|
4
4
|
import { type ArchiveViewerError } from '../../errors';
|
|
5
|
-
import { type WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl-next';
|
|
6
6
|
type Entries = {
|
|
7
7
|
[key: string]: ZipEntry;
|
|
8
8
|
};
|
|
@@ -18,7 +18,7 @@ export interface ArchiveSidebarFolderProps {
|
|
|
18
18
|
shouldRenderAbuseModal: boolean;
|
|
19
19
|
fileId?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare const ArchiveSidebarFolderEntry: React.FC<
|
|
21
|
+
export declare const ArchiveSidebarFolderEntry: React.FC<WithIntlProps<ArchiveSidebarFolderProps & WrappedComponentProps>> & {
|
|
22
22
|
WrappedComponent: React.ComponentType<ArchiveSidebarFolderProps & WrappedComponentProps>;
|
|
23
23
|
};
|
|
24
24
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ReactNode, type MouseEvent, type Key } from 'react';
|
|
5
|
+
import { type ReactNode, type MouseEvent, type Key, type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
6
6
|
export declare const ARCHIVE_SIDE_BAR_WIDTH = 300;
|
|
7
7
|
type Children = {
|
|
8
8
|
children?: ReactNode;
|
|
@@ -13,7 +13,7 @@ type OnClick = {
|
|
|
13
13
|
export declare const ArchiveItemViewerWrapper: ({ children, fullHeight, }: Children & {
|
|
14
14
|
fullHeight?: boolean;
|
|
15
15
|
}) => JSX.Element;
|
|
16
|
-
export declare const ArchiveSideBar:
|
|
16
|
+
export declare const ArchiveSideBar: ForwardRefExoticComponent<Children & RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export declare const ArchiveSidebarFolderWrapper: ({ children }: Children) => JSX.Element;
|
|
18
18
|
export declare const ArchiveDownloadButtonWrapper: ({ children, onClick }: Children & OnClick) => JSX.Element;
|
|
19
19
|
export declare const DisabledArchiveDownloadButtonWrapper: ({ children }: Children) => JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
-
|
|
2
|
+
import type { Extension } from '@codemirror/state';
|
|
3
|
+
export declare const cmTheme: Extension;
|
|
3
4
|
export declare const highlightStyle: HighlightStyle;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type ReactNode, Component } from 'react';
|
|
1
|
+
import { type ForwardRefExoticComponent, type ReactNode, type RefAttributes, Component } from 'react';
|
|
2
2
|
import { type ErrorFileState, type FileState } from '@atlaskit/media-client';
|
|
3
3
|
import { Outcome } from '../../domain';
|
|
4
4
|
import type { SupportedLanguages } from '@atlaskit/code/types';
|
|
5
5
|
import { MediaViewerError } from '../../errors';
|
|
6
|
-
export declare const CodeViewWrapper:
|
|
6
|
+
export declare const CodeViewWrapper: ForwardRefExoticComponent<{
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
'data-testid': string | undefined;
|
|
9
|
-
} &
|
|
9
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export declare const CodeViewerHeaderBar: () => JSX.Element;
|
|
11
11
|
export type Props = {
|
|
12
12
|
item: Exclude<FileState, ErrorFileState>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const codeViewWrapperStyles: SerializedStyles;
|
|
3
|
+
export declare const codeViewerHeaderBarStyles: SerializedStyles;
|
|
4
|
+
export declare const codeViewerHTMLStyles: SerializedStyles;
|
|
@@ -4,6 +4,8 @@ import { type MessageDescriptor, type WrappedComponentProps } from 'react-intl-n
|
|
|
4
4
|
import { type FileState } from '@atlaskit/media-client';
|
|
5
5
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
6
6
|
import { type PrimaryErrorReason, type SecondaryErrorReason, type MediaViewerError } from './errors';
|
|
7
|
+
import { type LoadFailedEventPayload } from './analytics/events/operational/loadFailed';
|
|
8
|
+
import { type PreviewUnsupportedEventPayload } from './analytics/events/operational/previewUnsupported';
|
|
7
9
|
import { type FileStateFlags } from './components/types';
|
|
8
10
|
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
9
11
|
export type Props = Readonly<{
|
|
@@ -24,7 +26,7 @@ export declare const getErrorMessageFromError: (error: MediaViewerError) => Mess
|
|
|
24
26
|
export declare class ErrorMessage extends React.Component<Props & WrappedComponentProps & WithAnalyticsEventsProps, {}> {
|
|
25
27
|
private getErrorInfo;
|
|
26
28
|
componentDidMount(): void;
|
|
27
|
-
static getEventPayload(error: MediaViewerError, fileId: string, fileState?: FileState, traceContext?: MediaTraceContext):
|
|
29
|
+
static getEventPayload(error: MediaViewerError, fileId: string, fileState?: FileState, traceContext?: MediaTraceContext): PreviewUnsupportedEventPayload | LoadFailedEventPayload;
|
|
28
30
|
render(): React.JSX.Element;
|
|
29
31
|
}
|
|
30
32
|
declare const ErroMsg: React.ComponentType<Props & WithAnalyticsEventsProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type ForwardRefExoticComponent, type MouseEvent, type ReactNode, type RefAttributes } from 'react';
|
|
2
2
|
import { type MediaType } from '@atlaskit/media-client';
|
|
3
3
|
export interface IconWrapperProps {
|
|
4
4
|
type: MediaType;
|
|
@@ -49,7 +49,7 @@ type VideoProps = {
|
|
|
49
49
|
autoPlay: boolean;
|
|
50
50
|
};
|
|
51
51
|
export declare const Video: ({ autoPlay, controls, src }: VideoProps) => JSX.Element;
|
|
52
|
-
export declare const PDFWrapper:
|
|
52
|
+
export declare const PDFWrapper: ForwardRefExoticComponent<DataTestID & Children & RefAttributes<HTMLDivElement>>;
|
|
53
53
|
export declare const Arrow: ({ className, children }: ClassName & Children) => JSX.Element;
|
|
54
54
|
export type LeftWrapperProps = {
|
|
55
55
|
isArchiveSideBarVisible: boolean;
|
|
@@ -65,10 +65,10 @@ export type ImageWrapperProps = {
|
|
|
65
65
|
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
66
66
|
style: CSSProperties;
|
|
67
67
|
} & Children & DataTestID;
|
|
68
|
-
export declare const ImageWrapper:
|
|
68
|
+
export declare const ImageWrapper: ForwardRefExoticComponent<{
|
|
69
69
|
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
70
70
|
style: CSSProperties;
|
|
71
|
-
} & Children & DataTestID & ClassName &
|
|
71
|
+
} & Children & DataTestID & ClassName & RefAttributes<unknown>>;
|
|
72
72
|
export declare const BaselineExtend: () => JSX.Element;
|
|
73
73
|
export type ImgProps = {
|
|
74
74
|
canDrag: boolean;
|
|
@@ -96,7 +96,7 @@ export declare const RightHeader: ({ children }: Children) => JSX.Element;
|
|
|
96
96
|
export declare const CustomAudioPlayerWrapper: ({ children }: Children) => JSX.Element;
|
|
97
97
|
type AudioPlayerProps = DataTestID & Children;
|
|
98
98
|
export declare const AudioPlayer: {
|
|
99
|
-
(
|
|
99
|
+
(props: AudioPlayerProps): JSX.Element;
|
|
100
100
|
displayName: string;
|
|
101
101
|
};
|
|
102
102
|
type AudioProps = {
|
|
@@ -105,7 +105,7 @@ type AudioProps = {
|
|
|
105
105
|
src: string | undefined;
|
|
106
106
|
preload: string;
|
|
107
107
|
};
|
|
108
|
-
export declare const Audio:
|
|
108
|
+
export declare const Audio: ForwardRefExoticComponent<AudioProps & RefAttributes<HTMLAudioElement>>;
|
|
109
109
|
type AudioCoverProps = {
|
|
110
110
|
alt: string | undefined;
|
|
111
111
|
src: string;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type ZipEntry } from 'unzipit';
|
|
3
3
|
import { type MediaClient } from '@atlaskit/media-client';
|
|
4
4
|
import { type ArchiveViewerError } from '../../errors';
|
|
5
|
-
import { type WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl-next';
|
|
6
6
|
type Entries = {
|
|
7
7
|
[key: string]: ZipEntry;
|
|
8
8
|
};
|
|
@@ -18,7 +18,7 @@ export interface ArchiveSidebarFolderProps {
|
|
|
18
18
|
shouldRenderAbuseModal: boolean;
|
|
19
19
|
fileId?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare const ArchiveSidebarFolderEntry: React.FC<
|
|
21
|
+
export declare const ArchiveSidebarFolderEntry: React.FC<WithIntlProps<ArchiveSidebarFolderProps & WrappedComponentProps>> & {
|
|
22
22
|
WrappedComponent: React.ComponentType<ArchiveSidebarFolderProps & WrappedComponentProps>;
|
|
23
23
|
};
|
|
24
24
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ReactNode, type MouseEvent, type Key } from 'react';
|
|
5
|
+
import { type ReactNode, type MouseEvent, type Key, type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
6
6
|
export declare const ARCHIVE_SIDE_BAR_WIDTH = 300;
|
|
7
7
|
type Children = {
|
|
8
8
|
children?: ReactNode;
|
|
@@ -13,7 +13,7 @@ type OnClick = {
|
|
|
13
13
|
export declare const ArchiveItemViewerWrapper: ({ children, fullHeight, }: Children & {
|
|
14
14
|
fullHeight?: boolean;
|
|
15
15
|
}) => JSX.Element;
|
|
16
|
-
export declare const ArchiveSideBar:
|
|
16
|
+
export declare const ArchiveSideBar: ForwardRefExoticComponent<Children & RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export declare const ArchiveSidebarFolderWrapper: ({ children }: Children) => JSX.Element;
|
|
18
18
|
export declare const ArchiveDownloadButtonWrapper: ({ children, onClick }: Children & OnClick) => JSX.Element;
|
|
19
19
|
export declare const DisabledArchiveDownloadButtonWrapper: ({ children }: Children) => JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
-
|
|
2
|
+
import type { Extension } from '@codemirror/state';
|
|
3
|
+
export declare const cmTheme: Extension;
|
|
3
4
|
export declare const highlightStyle: HighlightStyle;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type ReactNode, Component } from 'react';
|
|
1
|
+
import { type ForwardRefExoticComponent, type ReactNode, type RefAttributes, Component } from 'react';
|
|
2
2
|
import { type ErrorFileState, type FileState } from '@atlaskit/media-client';
|
|
3
3
|
import { Outcome } from '../../domain';
|
|
4
4
|
import type { SupportedLanguages } from '@atlaskit/code/types';
|
|
5
5
|
import { MediaViewerError } from '../../errors';
|
|
6
|
-
export declare const CodeViewWrapper:
|
|
6
|
+
export declare const CodeViewWrapper: ForwardRefExoticComponent<{
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
'data-testid': string | undefined;
|
|
9
|
-
} &
|
|
9
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export declare const CodeViewerHeaderBar: () => JSX.Element;
|
|
11
11
|
export type Props = {
|
|
12
12
|
item: Exclude<FileState, ErrorFileState>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const codeViewWrapperStyles: SerializedStyles;
|
|
3
|
+
export declare const codeViewerHeaderBarStyles: SerializedStyles;
|
|
4
|
+
export declare const codeViewerHTMLStyles: SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "52.9.
|
|
3
|
+
"version": "52.9.5",
|
|
4
4
|
"description": "MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and extendable yet easy-to-integrate",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/spinner": "^19.1.0",
|
|
54
54
|
"@atlaskit/textfield": "^8.3.0",
|
|
55
55
|
"@atlaskit/theme": "^23.0.0",
|
|
56
|
-
"@atlaskit/tokens": "^
|
|
56
|
+
"@atlaskit/tokens": "^12.0.0",
|
|
57
57
|
"@atlaskit/tooltip": "^21.1.0",
|
|
58
58
|
"@atlaskit/ufo": "^0.4.0",
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@atlaskit/media-test-data": "^3.2.0",
|
|
91
91
|
"@atlaskit/media-test-helpers": "^40.0.0",
|
|
92
92
|
"@atlaskit/ssr": "workspace:^",
|
|
93
|
-
"@atlaskit/toggle": "^15.
|
|
93
|
+
"@atlaskit/toggle": "^15.4.0",
|
|
94
94
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
95
95
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
96
96
|
"@atlassian/ufo": "^0.7.0",
|