@atlaskit/media-viewer 54.11.11 → 54.11.13
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 +26 -0
- package/dist/cjs/analytics/fireAnalytics.js +4 -3
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/inset-sidebar-header.js +0 -1
- package/dist/cjs/list.js +2 -2
- package/dist/cjs/styleWrappers.compiled.css +2 -0
- package/dist/cjs/styleWrappers.js +32 -17
- package/dist/cjs/utils/fit-viewport.js +91 -4
- package/dist/cjs/utils/getMediaTypeFromFilename.js +2 -2
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +4 -4
- package/dist/cjs/viewers/audio.js +2 -2
- package/dist/cjs/viewers/base-viewer.js +2 -2
- package/dist/cjs/viewers/codeViewer/index.js +2 -1
- package/dist/cjs/viewers/doc/DocViewer.js +8 -8
- package/dist/cjs/viewers/image/index.js +2 -2
- package/dist/cjs/viewers/image/interactive-img-component.js +80 -10
- package/dist/cjs/viewers/image/interactive-img.js +2 -2
- package/dist/cjs/viewers/svg/ImageWrapper-compiled.compiled.css +4 -0
- package/dist/cjs/viewers/svg/ImageWrapper-compiled.js +4 -1
- package/dist/cjs/viewers/svg/index.js +110 -19
- package/dist/cjs/viewers/video.js +5 -3
- package/dist/es2019/analytics/fireAnalytics.js +2 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/buildVideoErrorDiagnostics.js +0 -1
- package/dist/es2019/inset-sidebar-header.js +0 -1
- package/dist/es2019/list.js +1 -1
- package/dist/es2019/styleWrappers.compiled.css +2 -0
- package/dist/es2019/styleWrappers.js +25 -16
- package/dist/es2019/utils/fit-viewport.js +86 -4
- package/dist/es2019/utils/getMediaTypeFromFilename.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-folder-entry.js +2 -2
- package/dist/es2019/viewers/audio.js +1 -1
- package/dist/es2019/viewers/base-viewer.js +1 -1
- package/dist/es2019/viewers/codeViewer/index.js +2 -1
- package/dist/es2019/viewers/doc/DocViewer.js +2 -2
- package/dist/es2019/viewers/image/index.js +1 -1
- package/dist/es2019/viewers/image/interactive-img-component.js +84 -10
- package/dist/es2019/viewers/image/interactive-img.js +1 -1
- package/dist/es2019/viewers/svg/ImageWrapper-compiled.compiled.css +4 -0
- package/dist/es2019/viewers/svg/ImageWrapper-compiled.js +4 -1
- package/dist/es2019/viewers/svg/index.js +104 -17
- package/dist/es2019/viewers/video.js +3 -1
- package/dist/esm/analytics/fireAnalytics.js +2 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/buildVideoErrorDiagnostics.js +0 -1
- package/dist/esm/inset-sidebar-header.js +0 -1
- package/dist/esm/list.js +1 -1
- package/dist/esm/styleWrappers.compiled.css +2 -0
- package/dist/esm/styleWrappers.js +31 -16
- package/dist/esm/utils/fit-viewport.js +90 -4
- package/dist/esm/utils/getMediaTypeFromFilename.js +1 -1
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +2 -2
- package/dist/esm/viewers/audio.js +1 -1
- package/dist/esm/viewers/base-viewer.js +1 -1
- package/dist/esm/viewers/codeViewer/index.js +2 -1
- package/dist/esm/viewers/doc/DocViewer.js +2 -2
- package/dist/esm/viewers/image/index.js +1 -1
- package/dist/esm/viewers/image/interactive-img-component.js +80 -10
- package/dist/esm/viewers/image/interactive-img.js +1 -1
- package/dist/esm/viewers/svg/ImageWrapper-compiled.compiled.css +4 -0
- package/dist/esm/viewers/svg/ImageWrapper-compiled.js +4 -1
- package/dist/esm/viewers/svg/index.js +109 -18
- package/dist/esm/viewers/video.js +3 -1
- package/dist/types/DownloadItemProps.d.ts +3 -2
- package/dist/types/ErrorViewDownloadButton.d.ts +3 -2
- package/dist/types/ToolbarDownloadButton.d.ts +4 -2
- package/dist/types/analytics/events/operational/_mediaFile.d.ts +1 -1
- package/dist/types/analytics/events/operational/commenced.d.ts +1 -1
- package/dist/types/analytics/events/operational/createDownloadFailedEventPayload.d.ts +2 -2
- package/dist/types/analytics/events/operational/createDownloadSucceededEventPayload.d.ts +2 -2
- package/dist/types/analytics/events/operational/download.d.ts +1 -1
- package/dist/types/analytics/events/operational/loadFailed.d.ts +2 -2
- package/dist/types/analytics/events/operational/loadSucceeded.d.ts +1 -1
- package/dist/types/analytics/events/operational/previewTooLarge.d.ts +2 -2
- package/dist/types/analytics/events/operational/previewUnsupported.d.ts +2 -2
- package/dist/types/analytics/events/operational/zipEntryLoadFailed.d.ts +1 -1
- package/dist/types/analytics/events/operational/zipEntryLoadSucceeded.d.ts +2 -2
- package/dist/types/analytics/events/screen/modal.d.ts +1 -1
- package/dist/types/analytics/events/screen/passwordPdf.d.ts +1 -1
- package/dist/types/analytics/events/screen/pdfPasswordInput.d.ts +1 -1
- package/dist/types/analytics/events/ui/_clickedButton.d.ts +1 -1
- package/dist/types/analytics/events/ui/closed.d.ts +1 -1
- package/dist/types/analytics/events/ui/createNavigatedEvent.d.ts +1 -1
- package/dist/types/analytics/events/ui/downloadButtonClicked.d.ts +3 -2
- package/dist/types/analytics/events/ui/failedPreviewDownloadButtonClicked.d.ts +3 -2
- package/dist/types/analytics/events/ui/navigated.d.ts +1 -1
- package/dist/types/analytics/getFileAttributes.d.ts +2 -2
- package/dist/types/analytics/index.d.ts +2 -2
- package/dist/types/analytics/ufoExperiences.d.ts +2 -2
- package/dist/types/buildImgErrorDiagnostics.d.ts +1 -1
- package/dist/types/buildVideoErrorDiagnostics.d.ts +1 -1
- package/dist/types/components/types.d.ts +3 -2
- package/dist/types/errorMessage.d.ts +2 -2
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/getRequestMetadata.d.ts +1 -1
- package/dist/types/header.d.ts +3 -2
- package/dist/types/isFileStateItem.d.ts +1 -1
- package/dist/types/item-viewer.d.ts +4 -2
- package/dist/types/list.d.ts +2 -2
- package/dist/types/media-viewer.d.ts +2 -2
- package/dist/types/navigation.d.ts +1 -1
- package/dist/types/styleWrappers.d.ts +5 -6
- package/dist/types/utils/fit-viewport.d.ts +31 -0
- package/dist/types/utils/getIdentifierCollection.d.ts +1 -1
- package/dist/types/utils/getMediaTypeFromFilename.d.ts +1 -1
- package/dist/types/utils/getObjectUrlFromFileState.d.ts +1 -1
- package/dist/types/utils/getSelectedIndex.d.ts +1 -1
- package/dist/types/utils/isSameIdentifier.d.ts +1 -1
- package/dist/types/viewerOptions.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/archive-sidebar-renderer.d.ts +2 -1
- package/dist/types/viewers/archiveSidebar/archive-sidebar.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/get-archive-entries-from-file-state.d.ts +2 -1
- package/dist/types/viewers/archiveSidebar/types.d.ts +3 -2
- package/dist/types/viewers/audio.d.ts +3 -2
- package/dist/types/viewers/base-viewer.d.ts +3 -2
- package/dist/types/viewers/codeViewer/CodeRendererAdvanced/CodeRendererAdvanced.d.ts +1 -1
- package/dist/types/viewers/codeViewer/codeViewerRenderer-compiled.d.ts +1 -1
- package/dist/types/viewers/codeViewer/codeViewerRenderer.d.ts +1 -1
- package/dist/types/viewers/codeViewer/index.d.ts +3 -2
- package/dist/types/viewers/customViewer/customViewer.d.ts +3 -1
- package/dist/types/viewers/doc/DocViewer.d.ts +3 -2
- package/dist/types/viewers/doc/index.d.ts +3 -2
- package/dist/types/viewers/image/index.d.ts +3 -2
- package/dist/types/viewers/image/interactive-img-component.d.ts +9 -0
- package/dist/types/viewers/svg/index.d.ts +2 -2
- package/dist/types/viewers/video.d.ts +4 -2
- package/example-helpers/MainWrapper.tsx +1 -1
- package/example-helpers/NativeMediaPreview.tsx +3 -1
- package/example-helpers/index.ts +2 -2
- package/example-helpers/svg/delayApiResponses.ts +2 -2
- package/example-helpers/svg/uploader.ts +2 -2
- package/example-helpers/svg/useSelectOptions.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FileStatus } from '@atlaskit/media-client/file-state';
|
|
2
|
+
import type { WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
3
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
4
|
import type { PrimaryErrorReason } from '../../../errors';
|
|
4
5
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
5
6
|
import { type ButtonClickEventPayload } from './_clickedButton';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UIEventPayload, UIAttributes, WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
export type NavigatedAttributes = UIAttributes & WithFileAttributes & {
|
|
3
3
|
input: 'button' | 'keys';
|
|
4
4
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
export declare function getFileAttributes(fileState?: FileState): FileAttributes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { RequestMetadata } from '@atlaskit/media-client/request/types';
|
|
2
|
+
import type { WithFileAttributes, FailureAttributes, WithTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
3
3
|
import type { ProcessingFailReason } from '@atlaskit/media-state/file-state';
|
|
4
4
|
import { type PrimaryErrorReason } from '../errors';
|
|
5
5
|
/** This type takes FailureAttributes and redefines `failReason` to be the strong media-viewer type */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { RequestMetadata } from '@atlaskit/media-client/request/types';
|
|
2
|
+
import type { FileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
3
3
|
import { type FileStateFlags } from '../components/types';
|
|
4
4
|
import { type PrimaryErrorReason } from '../errors';
|
|
5
5
|
export type UFOFailedEventPayload = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SyntheticEvent } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
/**
|
|
4
4
|
* Builds a descriptive `secondaryError` for an `<img>` onerror so the downstream
|
|
5
5
|
* `loadFailed` analytics event reports a meaningful `error`/`errorDetail` instead of
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
2
2
|
/**
|
|
3
3
|
* Builds a descriptive `secondaryError` for a `<video>` onerror so the downstream
|
|
4
4
|
* `loadFailed` analytics event reports a meaningful `error`/`errorDetail` instead of
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type Identifier, type MediaClient } from '@atlaskit/media-client';
|
|
3
2
|
import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react/with-media-client';
|
|
4
|
-
import {
|
|
3
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
5
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
5
6
|
import { type ViewerOptionsProps } from '../viewerOptions';
|
|
6
7
|
export type FileStateFlags = {
|
|
7
8
|
wasStatusProcessing: boolean;
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { type MessageDescriptor, type WrappedComponentProps } from 'react-intl';
|
|
4
4
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
6
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
7
7
|
import { type LoadFailedEventPayload } from './analytics/events/operational/loadFailed';
|
|
8
8
|
import { type PreviewTooLargeEventPayload } from './analytics/events/operational/previewTooLarge';
|
|
9
9
|
import { type PreviewUnsupportedEventPayload } from './analytics/events/operational/previewUnsupported';
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MediaClientErrorReason } from '@atlaskit/media-client/errors/types';
|
|
2
2
|
import type { ArchiveViewerErrorReason } from './ArchiveViewerError';
|
|
3
3
|
import type { MediaViewerErrorReason } from './MediaViewerError';
|
|
4
4
|
export type PrimaryErrorReason = MediaViewerErrorReason | ArchiveViewerErrorReason;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RequestErrorMetadata } from '@atlaskit/media-client/request/types';
|
|
2
2
|
import type { MediaViewerError } from './MediaViewerError';
|
|
3
3
|
export declare function getRequestMetadata(error?: MediaViewerError): RequestErrorMetadata | undefined;
|
package/dist/types/header.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Ref } from 'react';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
5
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
6
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
6
7
|
import { type MediaViewerExtensions } from './components/types';
|
|
7
8
|
export type Props = {
|
|
8
9
|
readonly identifier: Identifier;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
5
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
6
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
5
7
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
6
8
|
import type { Outcome } from './domain/outcome';
|
|
7
9
|
import type { MediaViewerError } from './MediaViewerError';
|
package/dist/types/list.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type Ref } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
3
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
4
4
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
5
5
|
import { type MediaViewerExtensions } from './components/types';
|
|
6
6
|
import { type ViewerOptionsProps } from './viewerOptions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
3
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
4
4
|
import { type MediaViewerExtensions } from './components/types';
|
|
5
5
|
import { type ViewerOptionsProps } from './viewerOptions';
|
|
6
6
|
export type Props = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
4
|
-
import {
|
|
4
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
5
5
|
import { type WithInsetViewerProps } from './insetViewerContext';
|
|
6
6
|
export type NavigationDirection = 'prev' | 'next';
|
|
7
7
|
export type NavigationProps = Readonly<{
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type CSSProperties, type ForwardRefExoticComponent, type MouseEvent, type ReactNode, type RefAttributes } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import type { MediaType } from '@atlaskit/media-common/main-types';
|
|
7
|
+
export declare const INSET_VIEWER_GUTTER_PX = 24;
|
|
7
8
|
export interface IconWrapperProps {
|
|
8
9
|
type: MediaType;
|
|
9
10
|
}
|
|
@@ -84,13 +85,11 @@ export type HeaderProps = {
|
|
|
84
85
|
export declare const Header: ({ children, isArchiveSideBarVisible, className, }: Children & HeaderProps & ClassName) => JSX.Element;
|
|
85
86
|
export declare const LeftHeader: ({ children }: Children) => JSX.Element;
|
|
86
87
|
export type ImageWrapperProps = {
|
|
88
|
+
preventScrollbars?: boolean;
|
|
87
89
|
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
88
90
|
style: CSSProperties;
|
|
89
91
|
} & Children & DataTestID;
|
|
90
|
-
export declare const ImageWrapper: ForwardRefExoticComponent<
|
|
91
|
-
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
92
|
-
style: CSSProperties;
|
|
93
|
-
} & Children & DataTestID & ClassName & RefAttributes<unknown>>;
|
|
92
|
+
export declare const ImageWrapper: ForwardRefExoticComponent<ImageWrapperProps & ClassName & RefAttributes<unknown>>;
|
|
94
93
|
export declare const BaselineExtend: () => JSX.Element;
|
|
95
94
|
export type ImgProps = {
|
|
96
95
|
canDrag: boolean;
|
|
@@ -103,7 +102,7 @@ export type ImgProps = {
|
|
|
103
102
|
onError: (() => void) | undefined;
|
|
104
103
|
alt?: string;
|
|
105
104
|
} & DataTestID & ClassName;
|
|
106
|
-
export declare const Img:
|
|
105
|
+
export declare const Img: ForwardRefExoticComponent<ImgProps & RefAttributes<HTMLImageElement>>;
|
|
107
106
|
export declare const MedatadataTextWrapper: ({ children }: Children) => JSX.Element;
|
|
108
107
|
export declare const MetadataWrapper: ({ children }: Children) => JSX.Element;
|
|
109
108
|
type MetadataFileNameProps = DataTestID & Children;
|
|
@@ -1,2 +1,33 @@
|
|
|
1
|
+
import { type Camera } from '@atlaskit/media-ui/camera/camera';
|
|
1
2
|
import { Rectangle } from '@atlaskit/media-ui/rectangle';
|
|
3
|
+
import { type ZoomLevel } from '../domain/zoomLevel';
|
|
4
|
+
export type MediaViewportCenter = {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
export type WrapperSize = {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
export type WrapperScroll = {
|
|
13
|
+
scrollLeft: number;
|
|
14
|
+
scrollTop: number;
|
|
15
|
+
};
|
|
16
|
+
type ViewportRefit = {
|
|
17
|
+
camera: Camera;
|
|
18
|
+
zoomLevel: ZoomLevel;
|
|
19
|
+
};
|
|
2
20
|
export declare const insetFittedViewport: (el: HTMLElement) => Rectangle;
|
|
21
|
+
export declare const readViewportCenterOnMedia: (wrapper: HTMLElement, media: HTMLElement) => MediaViewportCenter | undefined;
|
|
22
|
+
export declare const readWrapperSize: (wrapper: HTMLElement) => WrapperSize;
|
|
23
|
+
export declare const readWrapperScroll: (wrapper: HTMLElement) => WrapperScroll;
|
|
24
|
+
export declare const isUserScroll: (wrapper: HTMLElement, fittedSize: WrapperSize | undefined, savedViewportCenterScroll: WrapperScroll | undefined) => boolean;
|
|
25
|
+
export declare const restoreViewportCenterOnMedia: (wrapper: HTMLElement, media: HTMLElement, center: MediaViewportCenter) => void;
|
|
26
|
+
export declare const refitViewport: ({ wrapper, media, camera, zoomLevel, savedViewportCenter, }: {
|
|
27
|
+
wrapper: HTMLElement;
|
|
28
|
+
media?: HTMLElement | null;
|
|
29
|
+
camera: Camera;
|
|
30
|
+
zoomLevel: ZoomLevel;
|
|
31
|
+
savedViewportCenter?: MediaViewportCenter;
|
|
32
|
+
}) => ViewportRefit | null;
|
|
33
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
export declare const getIdentifierCollection: (identifier: Identifier, defaultCollectionName: string) => string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MediaType } from '@atlaskit/media-common/main-types';
|
|
2
2
|
export declare const getMediaTypeFromFilename: (filename: string) => MediaType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
2
2
|
export declare const getObjectUrlFromFileState: (state: FileState) => Promise<string | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
export declare const getSelectedIndex: (items: Identifier[], selectedItem: Identifier) => number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
export declare const isSameIdentifier: (id1: Identifier, id2: Identifier) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import { type ZipEntry } from 'unzipit';
|
|
4
|
-
import {
|
|
4
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
5
5
|
import type { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
6
6
|
type Entries = {
|
|
7
7
|
[key: string]: ZipEntry;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { type ZipEntry } from 'unzipit';
|
|
3
|
-
import {
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
5
6
|
export interface ArchiveSidebarRendererProps {
|
|
6
7
|
selectedFileState: FileState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ZipEntry } from 'unzipit';
|
|
3
|
-
import {
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
4
|
import type { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
5
5
|
import { type ArchiveSidebarFolderProps } from './archive-sidebar-folder-entry';
|
|
6
6
|
export interface ArchiveSidebarProps {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type ZipInfo } from 'unzipit';
|
|
2
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
4
|
export declare const getArchiveEntriesFromFileState: (fileState: FileState, mediaClient: MediaClient, collectionName?: string) => Promise<ZipInfo>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
2
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
3
|
+
import type { FileState, ErrorFileState } from '@atlaskit/media-state/file-state';
|
|
3
4
|
import type { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
4
5
|
import { type ViewerOptionsProps } from '../../viewerOptions';
|
|
5
6
|
export type ArchiveViewerProps = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
5
6
|
import { Outcome } from '../domain/outcome';
|
|
6
7
|
import { MediaViewerError } from '../MediaViewerError';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import type { Outcome } from '../domain/outcome';
|
|
5
6
|
import type { MediaViewerError } from '../MediaViewerError';
|
|
6
7
|
export type BaseProps = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import type { ErrorFileState, FileState } from '@atlaskit/media-state/file-state';
|
|
6
6
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
7
7
|
export type Props = {
|
|
8
8
|
item: Exclude<FileState, ErrorFileState>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type ForwardRefExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import type { SupportedLanguages } from '@atlaskit/code/constants';
|
|
7
|
-
import {
|
|
7
|
+
import type { ErrorFileState, FileState } from '@atlaskit/media-state/file-state';
|
|
8
8
|
import type { Outcome } from '../../domain/outcome';
|
|
9
9
|
import type { MediaViewerError } from '../../MediaViewerError';
|
|
10
10
|
export declare const MAX_FORMATTED_LINES: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SupportedLanguages } from '@atlaskit/code/constants';
|
|
2
|
-
import {
|
|
2
|
+
import type { ErrorFileState, FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import type { Outcome } from '../../domain/outcome';
|
|
4
4
|
import type { MediaViewerError } from '../../MediaViewerError';
|
|
5
5
|
export type Props = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { type ComponentType } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState, ErrorFileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { Outcome } from '../../domain/outcome';
|
|
5
6
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
6
7
|
import { BaseViewer } from '../base-viewer';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NonErrorFileState } from '@atlaskit/media-client/file-state';
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
5
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
4
6
|
import type { CustomRendererConfig } from '../../viewerOptions';
|
|
5
7
|
export type Props = {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
6
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
7
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
7
8
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
8
9
|
type Props = {
|
|
9
10
|
mediaClient: MediaClient;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { Outcome } from '../../domain/outcome';
|
|
5
6
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
6
7
|
import type { MediaViewerError } from '../../MediaViewerError';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { Outcome } from '../../domain/outcome';
|
|
5
6
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
6
7
|
import { BaseViewer } from '../base-viewer';
|
|
@@ -3,6 +3,12 @@ import type { Props, State } from './interactive-img';
|
|
|
3
3
|
export declare class InteractiveImgComponent extends React.Component<Props, State> {
|
|
4
4
|
state: State;
|
|
5
5
|
private wrapper?;
|
|
6
|
+
private imageRef;
|
|
7
|
+
private resizeObserver?;
|
|
8
|
+
private savedViewportCenter?;
|
|
9
|
+
private savedViewportCenterScroll?;
|
|
10
|
+
private fittedWrapperSize?;
|
|
11
|
+
private scrollListenerTarget?;
|
|
6
12
|
private saveWrapperRef;
|
|
7
13
|
componentDidMount(): void;
|
|
8
14
|
componentWillUnmount(): void;
|
|
@@ -10,8 +16,11 @@ export declare class InteractiveImgComponent extends React.Component<Props, Stat
|
|
|
10
16
|
private renderHDIndicator;
|
|
11
17
|
render(): React.JSX.Element;
|
|
12
18
|
private onImgLoad;
|
|
19
|
+
private captureViewportCenterOnMedia;
|
|
20
|
+
private onWrapperScroll;
|
|
13
21
|
private onResize;
|
|
14
22
|
private onZoomChange;
|
|
23
|
+
private onResetZoom;
|
|
15
24
|
private startDragging;
|
|
16
25
|
private stopDragging;
|
|
17
26
|
private panImage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
5
5
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
6
6
|
export interface SvgViewerProps extends WithAnalyticsEventsProps {
|
|
7
7
|
identifier: FileIdentifier;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
5
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
6
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
5
7
|
import { MediaViewerError } from '../MediaViewerError';
|
|
6
8
|
import { type BaseState } from './base-viewer';
|
|
@@ -8,7 +8,7 @@ import { type ReactNode, type FC } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
|
|
11
|
-
import { enableMediaUfoLogger } from '@atlaskit/media-test-helpers';
|
|
11
|
+
import { enableMediaUfoLogger } from '@atlaskit/media-test-helpers/ufoLogger';
|
|
12
12
|
import { payloadPublisher } from '@atlassian/ufo/publisher';
|
|
13
13
|
|
|
14
14
|
import {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
5
|
+
import type { MediaFileArtifacts } from '@atlaskit/media-state/file-state';
|
|
4
6
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
5
7
|
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
6
8
|
|
package/example-helpers/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
import {
|
|
3
3
|
archiveFileId,
|
|
4
4
|
audioFileId,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
codeFileId,
|
|
29
29
|
emailFileId,
|
|
30
30
|
emailUnsupportedFileId,
|
|
31
|
-
} from '@atlaskit/media-client/test-helpers';
|
|
31
|
+
} from '@atlaskit/media-client/test-helpers/example-media-items';
|
|
32
32
|
|
|
33
33
|
export const imageIdentifier: FileIdentifier = {
|
|
34
34
|
...imageFileId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { sleep } from '@atlaskit/media-test-helpers';
|
|
1
|
+
import type { MediaApi } from '@atlaskit/media-client/media-store/types';
|
|
2
|
+
import { sleep } from '@atlaskit/media-test-helpers/nextTick';
|
|
3
3
|
|
|
4
4
|
type Endpoints = Partial<Record<keyof MediaApi, number>>;
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type SyntheticEvent, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { type FileIdentifier } from '@atlaskit/media-client';
|
|
4
|
-
import { type MediaClientConfig } from '@atlaskit/media-client';
|
|
5
3
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
4
|
+
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
5
|
+
import type { MediaClientConfig } from '@atlaskit/media-core/auth';
|
|
6
6
|
|
|
7
7
|
export const useSvgUploader = (
|
|
8
8
|
config: MediaClientConfig,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useMemo, type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
4
4
|
|
|
5
5
|
export const useSelectOptions = (
|
|
6
6
|
identifiers: FileIdentifier[],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "54.11.
|
|
3
|
+
"version": "54.11.13",
|
|
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/"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/spinner": "^20.4.0",
|
|
61
61
|
"@atlaskit/textfield": "^10.2.0",
|
|
62
62
|
"@atlaskit/theme": "^28.2.0",
|
|
63
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^232.0.0",
|
|
64
64
|
"@atlaskit/tokens": "^20.4.0",
|
|
65
65
|
"@atlaskit/tooltip": "^24.4.0",
|
|
66
66
|
"@atlaskit/ufo": "^2.0.0",
|