@atlaskit/media-viewer 53.2.5 → 54.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/AGENTS.md +62 -0
  2. package/CHANGELOG.md +38 -0
  3. package/classnames/package.json +1 -8
  4. package/dist/cjs/analytics/index.js +1 -1
  5. package/dist/cjs/analytics/ufoExperiences.js +1 -1
  6. package/dist/cjs/components/media-viewer.js +4 -2
  7. package/dist/cjs/download.js +2 -2
  8. package/dist/cjs/header.js +27 -2
  9. package/dist/cjs/list.js +4 -2
  10. package/dist/cjs/media-viewer.js +4 -2
  11. package/dist/cjs/utils/getObjectUrlFromFileState.js +15 -16
  12. package/dist/cjs/utils/index.js +16 -17
  13. package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +11 -11
  14. package/dist/cjs/viewers/archiveSidebar/archive-sidebar-renderer.js +12 -12
  15. package/dist/cjs/viewers/archiveSidebar/archive-sidebar.js +28 -28
  16. package/dist/cjs/viewers/archiveSidebar/archive.js +29 -29
  17. package/dist/cjs/viewers/archiveSidebar/archiveViewerLoader.js +12 -12
  18. package/dist/cjs/viewers/audio.js +37 -37
  19. package/dist/cjs/viewers/codeViewer/codeViewerRenderer-compiled.js +2 -2
  20. package/dist/cjs/viewers/codeViewer/index.js +35 -35
  21. package/dist/cjs/viewers/doc/doc-viewer.js +29 -27
  22. package/dist/cjs/viewers/doc/index.js +2 -2
  23. package/dist/cjs/viewers/image/index.js +43 -44
  24. package/dist/cjs/viewers/video.js +20 -20
  25. package/dist/es2019/analytics/index.js +1 -1
  26. package/dist/es2019/analytics/ufoExperiences.js +1 -1
  27. package/dist/es2019/components/media-viewer.js +4 -2
  28. package/dist/es2019/header.js +24 -2
  29. package/dist/es2019/list.js +4 -2
  30. package/dist/es2019/media-viewer.js +4 -2
  31. package/dist/esm/analytics/index.js +1 -1
  32. package/dist/esm/analytics/ufoExperiences.js +1 -1
  33. package/dist/esm/components/media-viewer.js +4 -2
  34. package/dist/esm/download.js +2 -2
  35. package/dist/esm/header.js +27 -2
  36. package/dist/esm/list.js +4 -2
  37. package/dist/esm/media-viewer.js +4 -2
  38. package/dist/esm/utils/getObjectUrlFromFileState.js +15 -16
  39. package/dist/esm/utils/index.js +16 -17
  40. package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +11 -11
  41. package/dist/esm/viewers/archiveSidebar/archive-sidebar-renderer.js +11 -11
  42. package/dist/esm/viewers/archiveSidebar/archive-sidebar.js +28 -28
  43. package/dist/esm/viewers/archiveSidebar/archive.js +29 -29
  44. package/dist/esm/viewers/archiveSidebar/archiveViewerLoader.js +11 -11
  45. package/dist/esm/viewers/audio.js +37 -37
  46. package/dist/esm/viewers/codeViewer/codeViewerRenderer-compiled.js +2 -2
  47. package/dist/esm/viewers/codeViewer/index.js +34 -34
  48. package/dist/esm/viewers/doc/doc-viewer.js +28 -26
  49. package/dist/esm/viewers/doc/index.js +2 -2
  50. package/dist/esm/viewers/image/index.js +43 -44
  51. package/dist/esm/viewers/video.js +20 -20
  52. package/dist/types/components/media-viewer.d.ts +1 -1
  53. package/dist/types/components/types.d.ts +1 -0
  54. package/dist/types/header.d.ts +2 -1
  55. package/dist/types/list.d.ts +2 -1
  56. package/dist/types/media-viewer.d.ts +1 -0
  57. package/media-viewer-loader/package.json +1 -8
  58. package/package.json +34 -42
  59. package/types/package.json +1 -8
  60. package/viewer-options/package.json +1 -8
  61. package/dist/types-ts4.5/analytics/events/index.d.ts +0 -17
  62. package/dist/types-ts4.5/analytics/events/operational/_mediaFile.d.ts +0 -3
  63. package/dist/types-ts4.5/analytics/events/operational/commenced.d.ts +0 -5
  64. package/dist/types-ts4.5/analytics/events/operational/download.d.ts +0 -9
  65. package/dist/types-ts4.5/analytics/events/operational/loadFailed.d.ts +0 -7
  66. package/dist/types-ts4.5/analytics/events/operational/loadSucceeded.d.ts +0 -11
  67. package/dist/types-ts4.5/analytics/events/operational/previewUnsupported.d.ts +0 -6
  68. package/dist/types-ts4.5/analytics/events/operational/zipEntryLoadFailed.d.ts +0 -13
  69. package/dist/types-ts4.5/analytics/events/operational/zipEntryLoadSucceeded.d.ts +0 -12
  70. package/dist/types-ts4.5/analytics/events/screen/modal.d.ts +0 -3
  71. package/dist/types-ts4.5/analytics/events/screen/passwordPdf.d.ts +0 -3
  72. package/dist/types-ts4.5/analytics/events/screen/pdfPasswordInput.d.ts +0 -3
  73. package/dist/types-ts4.5/analytics/events/ui/_clickedButton.d.ts +0 -2
  74. package/dist/types-ts4.5/analytics/events/ui/closed.d.ts +0 -8
  75. package/dist/types-ts4.5/analytics/events/ui/downloadButtonClicked.d.ts +0 -8
  76. package/dist/types-ts4.5/analytics/events/ui/failedPreviewDownloadButtonClicked.d.ts +0 -10
  77. package/dist/types-ts4.5/analytics/events/ui/navigated.d.ts +0 -12
  78. package/dist/types-ts4.5/analytics/events/ui/zoomInButtonClicked.d.ts +0 -8
  79. package/dist/types-ts4.5/analytics/events/ui/zoomOutButtonClicked.d.ts +0 -6
  80. package/dist/types-ts4.5/analytics/index.d.ts +0 -17
  81. package/dist/types-ts4.5/analytics/ufoExperiences.d.ts +0 -19
  82. package/dist/types-ts4.5/classnames.d.ts +0 -5
  83. package/dist/types-ts4.5/components/media-viewer-error-boundary.d.ts +0 -3
  84. package/dist/types-ts4.5/components/media-viewer-loader.d.ts +0 -3
  85. package/dist/types-ts4.5/components/media-viewer.d.ts +0 -5
  86. package/dist/types-ts4.5/components/portal.d.ts +0 -4
  87. package/dist/types-ts4.5/components/types.d.ts +0 -45
  88. package/dist/types-ts4.5/content.d.ts +0 -11
  89. package/dist/types-ts4.5/domain/index.d.ts +0 -1
  90. package/dist/types-ts4.5/domain/outcome.d.ts +0 -31
  91. package/dist/types-ts4.5/domain/zoomLevel.d.ts +0 -15
  92. package/dist/types-ts4.5/download.d.ts +0 -20
  93. package/dist/types-ts4.5/error-images.d.ts +0 -2
  94. package/dist/types-ts4.5/errorMessage.d.ts +0 -33
  95. package/dist/types-ts4.5/errors.d.ts +0 -23
  96. package/dist/types-ts4.5/header.d.ts +0 -19
  97. package/dist/types-ts4.5/index.d.ts +0 -3
  98. package/dist/types-ts4.5/item-viewer.d.ts +0 -32
  99. package/dist/types-ts4.5/list.d.ts +0 -24
  100. package/dist/types-ts4.5/loading.d.ts +0 -2
  101. package/dist/types-ts4.5/media-viewer.d.ts +0 -16
  102. package/dist/types-ts4.5/navigation.d.ts +0 -25
  103. package/dist/types-ts4.5/styleWrappers.d.ts +0 -122
  104. package/dist/types-ts4.5/styles.d.ts +0 -2
  105. package/dist/types-ts4.5/utils/closeOnDirectClick.d.ts +0 -2
  106. package/dist/types-ts4.5/utils/getIdentifierCollection.d.ts +0 -2
  107. package/dist/types-ts4.5/utils/getObjectUrlFromFileState.d.ts +0 -2
  108. package/dist/types-ts4.5/utils/index.d.ts +0 -10
  109. package/dist/types-ts4.5/utils/isIE.d.ts +0 -1
  110. package/dist/types-ts4.5/viewerOptions.d.ts +0 -20
  111. package/dist/types-ts4.5/viewers/archiveSidebar/archive-download-button.d.ts +0 -8
  112. package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +0 -24
  113. package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-header.d.ts +0 -9
  114. package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-renderer.d.ts +0 -26
  115. package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar.d.ts +0 -28
  116. package/dist/types-ts4.5/viewers/archiveSidebar/archive.d.ts +0 -37
  117. package/dist/types-ts4.5/viewers/archiveSidebar/archiveViewerLoader.d.ts +0 -12
  118. package/dist/types-ts4.5/viewers/archiveSidebar/consts.d.ts +0 -2
  119. package/dist/types-ts4.5/viewers/archiveSidebar/custom-button-item.d.ts +0 -2
  120. package/dist/types-ts4.5/viewers/archiveSidebar/nativePdfViewer.d.ts +0 -9
  121. package/dist/types-ts4.5/viewers/archiveSidebar/styleWrappers.d.ts +0 -30
  122. package/dist/types-ts4.5/viewers/archiveSidebar/styles.d.ts +0 -1
  123. package/dist/types-ts4.5/viewers/archiveSidebar/types.d.ts +0 -13
  124. package/dist/types-ts4.5/viewers/audio.d.ts +0 -33
  125. package/dist/types-ts4.5/viewers/base-viewer.d.ts +0 -32
  126. package/dist/types-ts4.5/viewers/codeViewer/CodeRendererAdvanced/CodeRendererAdvanced.d.ts +0 -11
  127. package/dist/types-ts4.5/viewers/codeViewer/CodeRendererAdvanced/theme.d.ts +0 -4
  128. package/dist/types-ts4.5/viewers/codeViewer/codeViewerRenderer-compiled.d.ts +0 -29
  129. package/dist/types-ts4.5/viewers/codeViewer/codeViewerRenderer.d.ts +0 -23
  130. package/dist/types-ts4.5/viewers/codeViewer/index.d.ts +0 -27
  131. package/dist/types-ts4.5/viewers/codeViewer/msg-parser.d.ts +0 -8
  132. package/dist/types-ts4.5/viewers/codeViewer/styles.d.ts +0 -4
  133. package/dist/types-ts4.5/viewers/codeViewer/util.d.ts +0 -4
  134. package/dist/types-ts4.5/viewers/customViewer/customViewer.d.ts +0 -13
  135. package/dist/types-ts4.5/viewers/doc/doc-viewer.d.ts +0 -13
  136. package/dist/types-ts4.5/viewers/doc/index.d.ts +0 -36
  137. package/dist/types-ts4.5/viewers/doc/passwordInput.d.ts +0 -10
  138. package/dist/types-ts4.5/viewers/image/index.d.ts +0 -35
  139. package/dist/types-ts4.5/viewers/image/interactive-img.d.ts +0 -42
  140. package/dist/types-ts4.5/viewers/modalSpinner.d.ts +0 -8
  141. package/dist/types-ts4.5/viewers/svg/ImageWrapper-compiled.d.ts +0 -7
  142. package/dist/types-ts4.5/viewers/svg/ImageWrapper.d.ts +0 -7
  143. package/dist/types-ts4.5/viewers/svg/errors.d.ts +0 -3
  144. package/dist/types-ts4.5/viewers/svg/index.d.ts +0 -14
  145. package/dist/types-ts4.5/viewers/svg/utils.d.ts +0 -5
  146. package/dist/types-ts4.5/viewers/video.d.ts +0 -32
  147. package/dist/types-ts4.5/zoomControls.d.ts +0 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-viewer",
3
- "version": "53.2.5",
3
+ "version": "54.1.0",
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/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": [
24
16
  "*.compiled.css"
25
17
  ],
@@ -38,31 +30,32 @@
38
30
  }
39
31
  },
40
32
  "dependencies": {
41
- "@atlaskit/analytics-next": "^11.2.0",
42
- "@atlaskit/button": "^23.11.0",
43
- "@atlaskit/code": "^17.5.0",
44
- "@atlaskit/css": "^0.19.0",
45
- "@atlaskit/form": "^15.5.0",
46
- "@atlaskit/heading": "^5.4.0",
47
- "@atlaskit/icon": "^35.1.0",
48
- "@atlaskit/icon-file-type": "^7.0.0",
49
- "@atlaskit/icon-lab": "^6.10.0",
50
- "@atlaskit/media-client": "^36.3.0",
51
- "@atlaskit/media-client-react": "^5.1.0",
52
- "@atlaskit/media-common": "^13.3.0",
53
- "@atlaskit/media-document-viewer": "^0.7.0",
54
- "@atlaskit/media-svg": "^2.3.0",
55
- "@atlaskit/media-ui": "^29.3.0",
56
- "@atlaskit/platform-feature-flags": "^1.1.0",
57
- "@atlaskit/portal": "^5.5.0",
58
- "@atlaskit/primitives": "^19.0.0",
59
- "@atlaskit/side-navigation": "^11.2.0",
60
- "@atlaskit/spinner": "^19.1.0",
61
- "@atlaskit/textfield": "^8.3.0",
62
- "@atlaskit/theme": "^25.0.0",
63
- "@atlaskit/tokens": "^13.0.0",
64
- "@atlaskit/tooltip": "^22.3.0",
65
- "@atlaskit/ufo": "^0.5.0",
33
+ "@atlaskit/analytics-next": "^12.0.0",
34
+ "@atlaskit/button": "^24.1.0",
35
+ "@atlaskit/code": "^18.0.0",
36
+ "@atlaskit/css": "^1.0.0",
37
+ "@atlaskit/form": "^16.0.0",
38
+ "@atlaskit/heading": "^6.0.0",
39
+ "@atlaskit/icon": "^36.0.0",
40
+ "@atlaskit/icon-file-type": "^8.0.0",
41
+ "@atlaskit/icon-lab": "^7.0.0",
42
+ "@atlaskit/media-client": "^37.0.0",
43
+ "@atlaskit/media-client-react": "^6.0.0",
44
+ "@atlaskit/media-common": "^14.0.0",
45
+ "@atlaskit/media-document-viewer": "^1.0.0",
46
+ "@atlaskit/media-svg": "^3.0.0",
47
+ "@atlaskit/media-ui": "^30.1.0",
48
+ "@atlaskit/platform-feature-flags": "^2.0.0",
49
+ "@atlaskit/portal": "^6.0.0",
50
+ "@atlaskit/primitives": "^20.0.0",
51
+ "@atlaskit/side-navigation": "^12.0.0",
52
+ "@atlaskit/spinner": "^20.0.0",
53
+ "@atlaskit/textfield": "^9.0.0",
54
+ "@atlaskit/theme": "^26.0.0",
55
+ "@atlaskit/tmp-editor-statsig": "^108.3.0",
56
+ "@atlaskit/tokens": "^14.0.0",
57
+ "@atlaskit/tooltip": "^23.0.0",
58
+ "@atlaskit/ufo": "^1.0.0",
66
59
  "@babel/runtime": "^7.0.0",
67
60
  "@codemirror/language": "6.10.8",
68
61
  "@codemirror/language-data": "6.5.1",
@@ -91,25 +84,24 @@
91
84
  "@af/integration-testing": "workspace:^",
92
85
  "@af/suppress-react-warnings": "workspace:^",
93
86
  "@af/visual-regression": "workspace:^",
94
- "@atlaskit/media-core": "^37.1.0",
87
+ "@atlaskit/media-core": "^38.0.0",
95
88
  "@atlaskit/media-integration-test-helpers": "workspace:^",
96
- "@atlaskit/media-state": "^2.1.0",
97
- "@atlaskit/media-test-data": "^3.3.0",
98
- "@atlaskit/media-test-helpers": "^41.2.0",
89
+ "@atlaskit/media-state": "^3.0.0",
90
+ "@atlaskit/media-test-data": "^4.0.0",
91
+ "@atlaskit/media-test-helpers": "^42.0.0",
99
92
  "@atlaskit/ssr": "workspace:^",
100
- "@atlaskit/toggle": "^15.6.0",
101
- "@atlassian/a11y-jest-testing": "^0.11.0",
93
+ "@atlaskit/toggle": "^17.0.0",
94
+ "@atlassian/a11y-jest-testing": "^0.12.0",
102
95
  "@atlassian/feature-flags-test-utils": "^1.1.0",
103
96
  "@atlassian/react-compiler-gating": "workspace:^",
97
+ "@atlassian/testing-library": "^0.6.0",
104
98
  "@atlassian/ufo": "^0.8.0",
105
99
  "@testing-library/dom": "^10.1.0",
106
100
  "@testing-library/react": "^16.3.0",
107
101
  "@testing-library/user-event": "^14.4.3",
108
102
  "@types/deep-equal": "^1.0.1",
109
- "@types/enzyme": "3.1.15",
110
103
  "@types/mime": "^2.0.1",
111
104
  "@types/react-loadable": "^5.4.1",
112
- "enzyme": "^3.10.0",
113
105
  "exenv": "^1.2.2",
114
106
  "jsverify": "^0.8.3",
115
107
  "react": "^18.2.0",
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/components/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/components/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/components/types.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/viewerOptions.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/viewerOptions.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/viewerOptions.d.ts"
17
10
  }
@@ -1,17 +0,0 @@
1
- import { type CommencedEventPayload } from './operational/commenced';
2
- import { type LoadFailedEventPayload } from './operational/loadFailed';
3
- import { type DownloadFailedEventPayload, type DownloadSucceededEventPayload } from './operational/download';
4
- import { type LoadSucceededEventPayload } from './operational/loadSucceeded';
5
- import { type PreviewUnsupportedEventPayload } from './operational/previewUnsupported';
6
- import { type ZipEntryLoadFailedEventPayload } from './operational/zipEntryLoadFailed';
7
- import { type ZipEntryLoadSucceededEventPayload } from './operational/zipEntryLoadSucceeded';
8
- import { type ModalEventPayload } from './screen/modal';
9
- import { type PdfPasswordInputScreenEventPayload } from './screen/pdfPasswordInput';
10
- import { type PasswordPdfScreenEventPayload } from './screen/passwordPdf';
11
- import { type ClosedEventPayload } from './ui/closed';
12
- import { type DownloadButtonClickedEventPayload } from './ui/downloadButtonClicked';
13
- import { type FailedPreviewDownloadButtonClickedEventPayload } from './ui/failedPreviewDownloadButtonClicked';
14
- import { type NavigatedEventPayload } from './ui/navigated';
15
- import { type ZoomInButtonClickEventPayload } from './ui/zoomInButtonClicked';
16
- import { type ZoomOutButtonClickEventPayload } from './ui/zoomOutButtonClicked';
17
- export type MediaViewerEventPayload = CommencedEventPayload | LoadFailedEventPayload | LoadSucceededEventPayload | PreviewUnsupportedEventPayload | ZipEntryLoadFailedEventPayload | ZipEntryLoadSucceededEventPayload | ModalEventPayload | PdfPasswordInputScreenEventPayload | PasswordPdfScreenEventPayload | ClosedEventPayload | DownloadButtonClickedEventPayload | FailedPreviewDownloadButtonClickedEventPayload | NavigatedEventPayload | ZoomInButtonClickEventPayload | ZoomOutButtonClickEventPayload | DownloadFailedEventPayload | DownloadSucceededEventPayload;
@@ -1,3 +0,0 @@
1
- import { type OperationalEventPayload, type OperationalAttributes } from '@atlaskit/media-common';
2
- /** common definition used by other mediaFile events */
3
- export type MediaFileEventPayload<Attributes extends OperationalAttributes, Action extends 'commenced' | 'loadSucceeded' | 'loadFailed' | 'previewUnsupported' | 'zipEntryLoadSucceeded' | 'zipEntryLoadFailed' | 'downloadSucceeded' | 'downloadFailed'> = OperationalEventPayload<Attributes, Action, 'mediaFile'>;
@@ -1,5 +0,0 @@
1
- import { type MediaTraceContext, type WithFileAttributes, type WithTraceContext } from '@atlaskit/media-common';
2
- import { type MediaFileEventPayload } from './_mediaFile';
3
- export type CommencedAttributes = WithFileAttributes & WithTraceContext;
4
- export type CommencedEventPayload = MediaFileEventPayload<CommencedAttributes, 'commenced'>;
5
- export declare const createCommencedEvent: (fileId: string, traceContext: MediaTraceContext) => CommencedEventPayload;
@@ -1,9 +0,0 @@
1
- import { type FileState } from '@atlaskit/media-client';
2
- import { type MediaFileEventPayload } from './_mediaFile';
3
- import { type MediaViewerFailureAttributes } from '../..';
4
- import { type MediaViewerError } from '../../../errors';
5
- import { type MediaTraceContext, type SuccessAttributes, type WithFileAttributes, type WithTraceContext } from '@atlaskit/media-common';
6
- export type DownloadFailedEventPayload = MediaFileEventPayload<MediaViewerFailureAttributes, 'downloadFailed'>;
7
- export type DownloadSucceededEventPayload = MediaFileEventPayload<SuccessAttributes & WithFileAttributes & WithTraceContext, 'downloadSucceeded'>;
8
- export declare const createDownloadSucceededEventPayload: (fileState?: FileState, traceContext?: MediaTraceContext) => DownloadSucceededEventPayload;
9
- export declare const createDownloadFailedEventPayload: (fileId: string, error: MediaViewerError, fileState?: FileState, traceContext?: MediaTraceContext) => DownloadFailedEventPayload;
@@ -1,7 +0,0 @@
1
- import { type FileState } from '@atlaskit/media-client';
2
- import { type MediaFileEventPayload } from './_mediaFile';
3
- import { type MediaViewerFailureAttributes } from '../..';
4
- import { type MediaViewerError } from '../../../errors';
5
- import { type MediaTraceContext } from '@atlaskit/media-common';
6
- export type LoadFailedEventPayload = MediaFileEventPayload<MediaViewerFailureAttributes, 'loadFailed'>;
7
- export declare const createLoadFailedEvent: (fileId: string, error: MediaViewerError, fileState?: FileState, traceContext?: MediaTraceContext) => LoadFailedEventPayload;
@@ -1,11 +0,0 @@
1
- import { type SuccessAttributes, type WithFileAttributes, type FileAttributes, type MediaTraceContext, type WithTraceContext } from '@atlaskit/media-common';
2
- import { type MediaFileEventPayload } from './_mediaFile';
3
- type WithFeatureFlags = {
4
- featureFlags: {
5
- media_document_viewer: boolean;
6
- };
7
- };
8
- export type LoadSucceededAttributes = SuccessAttributes & WithFileAttributes & WithTraceContext & WithFeatureFlags;
9
- export type LoadSucceededEventPayload = MediaFileEventPayload<LoadSucceededAttributes, 'loadSucceeded'>;
10
- export declare const createLoadSucceededEvent: ({ fileId, fileMediatype, fileMimetype, fileSize }: FileAttributes, traceContext?: MediaTraceContext) => LoadSucceededEventPayload;
11
- export {};
@@ -1,6 +0,0 @@
1
- import { type FileState } from '@atlaskit/media-client';
2
- import { type WithFileAttributes } from '@atlaskit/media-common';
3
- import { type MediaFileEventPayload } from './_mediaFile';
4
- export type PreviewUnsupportedAttributes = WithFileAttributes;
5
- export type PreviewUnsupportedEventPayload = MediaFileEventPayload<PreviewUnsupportedAttributes, 'previewUnsupported'>;
6
- export declare const createPreviewUnsupportedEvent: (fileState: FileState) => PreviewUnsupportedEventPayload;
@@ -1,13 +0,0 @@
1
- import { type FileState } from '@atlaskit/media-client';
2
- import { type ZipEntry } from 'unzipit';
3
- import { type MediaFileEventPayload } from './_mediaFile';
4
- import { type MediaViewerFailureAttributes } from '../..';
5
- import { type MediaViewerError } from '../../../errors';
6
- export type ZipEntryLoadFailedAttributes = MediaViewerFailureAttributes & {
7
- size: number;
8
- encrypted: boolean;
9
- compressedSize: number;
10
- mimeType: string;
11
- };
12
- export type ZipEntryLoadFailedEventPayload = MediaFileEventPayload<ZipEntryLoadFailedAttributes, 'zipEntryLoadFailed'>;
13
- export declare const createZipEntryLoadFailedEvent: (fileState: FileState, error: MediaViewerError, zipEntry?: ZipEntry) => ZipEntryLoadFailedEventPayload;
@@ -1,12 +0,0 @@
1
- import { type FileState } from '@atlaskit/media-client';
2
- import { type SuccessAttributes, type WithFileAttributes } from '@atlaskit/media-common/analytics';
3
- import { type ZipEntry } from 'unzipit';
4
- import { type MediaFileEventPayload } from './_mediaFile';
5
- export type ZipEntryLoadSucceededAttributes = SuccessAttributes & WithFileAttributes & {
6
- size: number;
7
- encrypted: boolean;
8
- compressedSize: number;
9
- mimeType: string;
10
- };
11
- export type ZipEntryLoadSucceededEventPayload = MediaFileEventPayload<ZipEntryLoadSucceededAttributes, 'zipEntryLoadSucceeded'>;
12
- export declare const createZipEntryLoadSucceededEvent: (fileState: FileState, zipEntry: ZipEntry) => ZipEntryLoadSucceededEventPayload;
@@ -1,3 +0,0 @@
1
- import { type ScreenEventPayload, type ScreenAttributes } from '@atlaskit/media-common';
2
- export type ModalEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaViewerModal'>, 'attributes'>;
3
- export declare const createModalEvent: () => ModalEventPayload;
@@ -1,3 +0,0 @@
1
- import { type ScreenEventPayload, type ScreenAttributes } from '@atlaskit/media-common';
2
- export type PasswordPdfScreenEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaViewerPasswordPdfScreen'>, 'attributes'>;
3
- export declare const createPasswordPdfScreenEvent: () => PasswordPdfScreenEventPayload;
@@ -1,3 +0,0 @@
1
- import { type ScreenEventPayload, type ScreenAttributes } from '@atlaskit/media-common';
2
- export type PdfPasswordInputScreenEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaViewerPdfPasswordInputScreen'>, 'attributes'>;
3
- export declare const createPdfPasswordInputScreenEvent: () => PdfPasswordInputScreenEventPayload;
@@ -1,2 +0,0 @@
1
- import { type UIAttributes, type UIEventPayload } from '@atlaskit/media-common';
2
- export type ButtonClickEventPayload<Attributes extends UIAttributes> = UIEventPayload<Attributes, 'clicked', 'button'>;
@@ -1,8 +0,0 @@
1
- import { type UIEventPayload } from '@atlaskit/media-common';
2
- export type ClosedInputType = 'button' | 'blanket' | 'escKey';
3
- export interface ClosedAttributes {
4
- input: ClosedInputType;
5
- sessionDurationMs: number;
6
- }
7
- export type ClosedEventPayload = UIEventPayload<ClosedAttributes, 'closed', 'mediaViewer'>;
8
- export declare const createClosedEvent: (input: ClosedInputType) => ClosedEventPayload;
@@ -1,8 +0,0 @@
1
- import { type WithFileAttributes } from '@atlaskit/media-common';
2
- import { type FileStatus, type FileState } from '@atlaskit/media-client';
3
- import { type ButtonClickEventPayload } from './_clickedButton';
4
- export type DownloadButtonClickedAttributes = WithFileAttributes & {
5
- fileProcessingStatus: FileStatus;
6
- };
7
- export type DownloadButtonClickedEventPayload = ButtonClickEventPayload<DownloadButtonClickedAttributes>;
8
- export declare const createDownloadButtonClickedEvent: (fileState: FileState) => DownloadButtonClickedEventPayload;
@@ -1,10 +0,0 @@
1
- import { type WithFileAttributes } from '@atlaskit/media-common';
2
- import { type FileStatus, type FileState } from '@atlaskit/media-client';
3
- import { type ButtonClickEventPayload } from './_clickedButton';
4
- import { type PrimaryErrorReason, type MediaViewerError } from '../../../errors';
5
- export type FailedPreviewDownloadButtonClickedAttributes = WithFileAttributes & {
6
- fileProcessingStatus: FileStatus;
7
- failReason: PrimaryErrorReason;
8
- };
9
- export type FailedPreviewDownloadButtonClickedEventPayload = ButtonClickEventPayload<FailedPreviewDownloadButtonClickedAttributes>;
10
- export declare const createFailedPreviewDownloadButtonClickedEvent: (fileState: FileState, error: MediaViewerError) => FailedPreviewDownloadButtonClickedEventPayload;
@@ -1,12 +0,0 @@
1
- import { type UIEventPayload, type UIAttributes, type WithFileAttributes } from '@atlaskit/media-common';
2
- import { type Identifier } from '@atlaskit/media-client';
3
- import { type NavigationDirection, type NavigationSource } from '../../../navigation';
4
- export type NavigatedAttributes = UIAttributes & WithFileAttributes & {
5
- input: 'button' | 'keys';
6
- };
7
- export type NavigatedEventPayload = UIEventPayload<NavigatedAttributes, 'navigated', 'file'> & {
8
- actionSubjectId: 'next' | 'previous';
9
- };
10
- export type NavigatedInput = 'button' | 'keys';
11
- export declare const inputFromSource: (source: NavigationSource) => NavigatedInput;
12
- export declare const createNavigatedEvent: (direction: NavigationDirection, source: NavigationSource, identifier: Identifier) => NavigatedEventPayload;
@@ -1,8 +0,0 @@
1
- import { type ButtonClickEventPayload } from './_clickedButton';
2
- export type ZoomButtonClickAttributes = {
3
- zoomScale: number;
4
- };
5
- export type ZoomInButtonClickEventPayload = ButtonClickEventPayload<ZoomButtonClickAttributes> & {
6
- actionSubjectId: 'zoomIn';
7
- };
8
- export declare function createZoomInButtonClickEvent(zoomScale: number): ZoomInButtonClickEventPayload;
@@ -1,6 +0,0 @@
1
- import { type ButtonClickEventPayload } from './_clickedButton';
2
- import { type ZoomButtonClickAttributes } from './zoomInButtonClicked';
3
- export type ZoomOutButtonClickEventPayload = ButtonClickEventPayload<ZoomButtonClickAttributes> & {
4
- actionSubjectId: 'zoomOut';
5
- };
6
- export declare function createZoomOutButtonClickedEvent(zoomScale: number): ZoomOutButtonClickEventPayload;
@@ -1,17 +0,0 @@
1
- import { type FileState, type RequestMetadata } from '@atlaskit/media-client';
2
- import { type FileAttributes, type WithFileAttributes, type FailureAttributes, type WithTraceContext } from '@atlaskit/media-common/analytics';
3
- import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
- import { type PrimaryErrorReason } from '../errors';
5
- import { type MediaViewerEventPayload } from './events';
6
- declare const componentName = "mediaViewer";
7
- declare const packageName: string;
8
- declare const packageVersion: string;
9
- export { packageName, packageVersion, componentName, componentName as component };
10
- export declare function getFileAttributes(fileState?: FileState): FileAttributes;
11
- /** This type takes FailureAttributes and redefines `failReason` to be the strong media-viewer type */
12
- export type MediaViewerFailureAttributes = Omit<FailureAttributes, 'failReason'> & {
13
- failReason: PrimaryErrorReason;
14
- statusCode?: number;
15
- request?: RequestMetadata;
16
- } & WithFileAttributes & WithTraceContext;
17
- export declare function fireAnalytics(payload: MediaViewerEventPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
@@ -1,19 +0,0 @@
1
- import { type FileAttributes } from '@atlaskit/media-common';
2
- import { type RequestMetadata } from '@atlaskit/media-client';
3
- import { type PrimaryErrorReason } from '../errors';
4
- import { type FileStateFlags } from '../components/types';
5
- export type UFOFailedEventPayload = {
6
- failReason?: PrimaryErrorReason;
7
- error?: string;
8
- errorDetail?: string;
9
- request?: RequestMetadata;
10
- fileAttributes: FileAttributes;
11
- fileStateFlags?: FileStateFlags;
12
- };
13
- export type UFOSucceedEventPayload = {
14
- fileAttributes: FileAttributes;
15
- fileStateFlags?: FileStateFlags;
16
- };
17
- export declare const startMediaFileUfoExperience: () => void;
18
- export declare const succeedMediaFileUfoExperience: (properties?: UFOSucceedEventPayload) => void;
19
- export declare const failMediaFileUfoExperience: (properties?: UFOFailedEventPayload) => void;
@@ -1,5 +0,0 @@
1
- /**
2
- * Classname for the media viewer popup that appears adjacent to the editor div. Use this to check
3
- * if the media viewer has appeared.
4
- */
5
- export declare const mediaViewerPopupClass = "media-viewer-popup";
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { type MediaViewerWithMediaClientConfigProps } from './types';
3
- export declare const MediaViewerWithErrorBoundary: (props: MediaViewerWithMediaClientConfigProps) => React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { MediaViewerWithMediaClientConfigProps } from './types';
3
- export default function AsyncMediaViewer(props: MediaViewerWithMediaClientConfigProps): React.JSX.Element;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { type MediaViewerProps } from './types';
3
- import type { MediaViewerWithMediaClientConfigProps } from './types';
4
- export declare const MediaViewerBase: ({ featureFlags, onClose, selectedItem, collectionName, items, extensions, contextId, viewerOptions, }: MediaViewerProps) => React.JSX.Element;
5
- export declare const MediaViewerWithMediaClient: (props: MediaViewerWithMediaClientConfigProps) => React.JSX.Element;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const MediaViewerPortal: ({ children, }: {
3
- children: React.ReactNode;
4
- }) => React.JSX.Element;
@@ -1,45 +0,0 @@
1
- import { type Identifier, type MediaClient } from '@atlaskit/media-client';
2
- import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
3
- import { type MediaFeatureFlags } from '@atlaskit/media-common';
4
- import { type ReactNode } from 'react';
5
- import { type ViewerOptionsProps } from '../viewerOptions';
6
- export type FileStateFlags = {
7
- wasStatusProcessing: boolean;
8
- wasStatusUploading: boolean;
9
- };
10
- export interface MediaViewerExtensionsActions {
11
- close: () => void;
12
- }
13
- export interface MediaViewerExtensions {
14
- sidebar?: {
15
- icon: ReactNode;
16
- renderer: (selectedIdentifier: Identifier, actions: MediaViewerExtensionsActions) => ReactNode;
17
- };
18
- headerActions?: Array<{
19
- /** Icon to display in the header button */
20
- icon: ReactNode;
21
- /** Label for the button (accessibility) */
22
- label: string;
23
- /** Called when the button is clicked. Receives the currently viewed item's identifier
24
- * and actions (including close) to control the viewer. */
25
- onClick: (selectedIdentifier: Identifier, actions: MediaViewerExtensionsActions) => void;
26
- /** Optional callback to control per-item visibility. When omitted, button always shows. */
27
- isVisible?: (selectedIdentifier: Identifier) => boolean;
28
- }>;
29
- }
30
- export interface MediaViewerProps {
31
- readonly mediaClient: MediaClient;
32
- readonly selectedItem: Identifier;
33
- readonly items: Array<Identifier>;
34
- readonly collectionName: string;
35
- readonly onClose?: () => void;
36
- readonly featureFlags?: MediaFeatureFlags;
37
- readonly extensions?: MediaViewerExtensions;
38
- readonly contextId?: string;
39
- readonly viewerOptions?: ViewerOptionsProps;
40
- }
41
- export type MediaMessage = {
42
- source: 'media';
43
- event: 'mediaViewerOpened' | 'mediaViewerClosed';
44
- };
45
- export type MediaViewerWithMediaClientConfigProps = WithMediaClientConfigProps<MediaViewerProps>;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { Component, type ReactElement } from 'react';
3
- import { type WithShowControlMethodProp } from '@atlaskit/media-ui';
4
- export interface ContentProps {
5
- onClose?: () => void;
6
- children: ReactElement<WithShowControlMethodProp>;
7
- isSidebarVisible?: boolean;
8
- }
9
- export declare class Content extends Component<ContentProps> {
10
- render(): React.JSX.Element;
11
- }
@@ -1 +0,0 @@
1
- export { Outcome } from './outcome';
@@ -1,31 +0,0 @@
1
- export type PendingState = {
2
- status: 'PENDING';
3
- };
4
- export type SuccessfulState<Data> = {
5
- status: 'SUCCESSFUL';
6
- data: Data;
7
- };
8
- export type FailedState<Err, Data> = {
9
- status: 'FAILED';
10
- err: Err;
11
- data?: Data;
12
- };
13
- export type State<Data, Err> = PendingState | SuccessfulState<Data> | FailedState<Err, Data>;
14
- export declare class Outcome<Data, Err = Error> {
15
- private readonly state;
16
- private constructor();
17
- static successful<Data, Err>(data: Data): Outcome<Data, Err>;
18
- static pending<Data, Err>(): Outcome<Data, Err>;
19
- static failed<Data, Err>(err: Err, data?: Data): Outcome<Data, Err>;
20
- get status(): 'PENDING' | 'SUCCESSFUL' | 'FAILED';
21
- get data(): Data | undefined;
22
- get err(): Err | undefined;
23
- whenSuccessful(successful: (data: Data) => void): void;
24
- whenPending(pending: () => void): void;
25
- whenFailed(failed: (err: Err) => void): void;
26
- match<Result>({ successful, pending, failed, }: {
27
- successful: (data: Data) => Result;
28
- pending: () => Result;
29
- failed: (err: Err, data?: Data) => Result;
30
- }): Result;
31
- }
@@ -1,15 +0,0 @@
1
- export declare class ZoomLevel {
2
- readonly initialValue: number;
3
- readonly value: number;
4
- constructor(initialValue: number, selectedValue?: number);
5
- get zoomLevels(): number[];
6
- get min(): number;
7
- get max(): number;
8
- get asPercentage(): string;
9
- zoomIn(): ZoomLevel;
10
- zoomOut(): ZoomLevel;
11
- fullyZoomIn(): ZoomLevel;
12
- fullyZoomOut(): ZoomLevel;
13
- get canZoomIn(): boolean;
14
- get canZoomOut(): boolean;
15
- }
@@ -1,20 +0,0 @@
1
- import { type FileState, type Identifier, type MediaClient } from '@atlaskit/media-client';
2
- import React from 'react';
3
- import { type MediaTraceContext } from '@atlaskit/media-common';
4
- import { MediaViewerError } from './errors';
5
- export type ErrorViewDownloadButtonProps = {
6
- fileState: FileState;
7
- mediaClient: MediaClient;
8
- error: MediaViewerError;
9
- collectionName?: string;
10
- traceContext: MediaTraceContext;
11
- };
12
- export declare const ErrorViewDownloadButton: ({ fileState, mediaClient, error, traceContext, collectionName, }: ErrorViewDownloadButtonProps) => React.JSX.Element;
13
- export type ToolbarDownloadButtonProps = {
14
- state: FileState;
15
- identifier: Identifier;
16
- mediaClient: MediaClient;
17
- traceContext: MediaTraceContext;
18
- };
19
- export declare const ToolbarDownloadButton: ({ state, mediaClient, identifier, traceContext, }: ToolbarDownloadButtonProps) => React.JSX.Element | null;
20
- export declare const DisabledToolbarDownloadButton: React.JSX.Element;
@@ -1,2 +0,0 @@
1
- export declare const cannotViewFile = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIwcHgiIGhlaWdodD0iMTA4cHgiIHZpZXdCb3g9IjAgMCAxMjAgMTA4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1MC4yICg1NTA0NykgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+Q2Fubm90IFZpZXcgRmlsZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iMTIuMjg5MzYxNyUiIHkxPSI5NC40NDUyMzc4JSIgeDI9IjgzLjMxNDg5MzYlIiB5Mj0iMTQuOTk4MzM0JSIgaWQ9ImxpbmVhckdyYWRpZW50LTEiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjQzFDN0QwIiBvZmZzZXQ9IjEwJSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRUJFQ0YwIiBzdG9wLW9wYWNpdHk9IjAuNSIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJ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AgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==";
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import { type ReactNode } from 'react';
3
- import { type MessageDescriptor, type WrappedComponentProps } from 'react-intl';
4
- import { type FileState } from '@atlaskit/media-client';
5
- import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
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';
9
- import { type FileStateFlags } from './components/types';
10
- import { type MediaTraceContext } from '@atlaskit/media-common';
11
- export type Props = Readonly<{
12
- error: MediaViewerError;
13
- supressAnalytics?: boolean;
14
- fileId: string;
15
- fileState?: FileState;
16
- children?: ReactNode;
17
- fileStateFlags?: FileStateFlags;
18
- traceContext?: MediaTraceContext;
19
- }>;
20
- export type FormatMessageFn = (messageDescriptor: MessageDescriptor) => string;
21
- export declare const errorReasonToMessages: Array<[
22
- PrimaryErrorReason | SecondaryErrorReason,
23
- MessageDescriptor
24
- ]>;
25
- export declare const getErrorMessageFromError: (error: MediaViewerError) => MessageDescriptor | undefined;
26
- export declare class ErrorMessage extends React.Component<Props & WrappedComponentProps & WithAnalyticsEventsProps, {}> {
27
- private getErrorInfo;
28
- componentDidMount(): void;
29
- static getEventPayload(error: MediaViewerError, fileId: string, fileState?: FileState, traceContext?: MediaTraceContext): PreviewUnsupportedEventPayload | LoadFailedEventPayload;
30
- render(): React.JSX.Element;
31
- }
32
- declare const ErroMsg: React.ComponentType<Props & WithAnalyticsEventsProps>;
33
- export default ErroMsg;