From 22d03369efed25ee7a071c3c2478fde331f8a955 Mon Sep 17 00:00:00 2001 From: Murderlon Date: Thu, 9 Jan 2025 10:20:49 +0100 Subject: [PATCH] Import types consistently from @uppy/core --- packages/@uppy/audio/src/Audio.tsx | 7 +++--- .../aws-s3/src/HTTPCommunicationQueue.ts | 2 +- packages/@uppy/aws-s3/src/index.ts | 7 +++--- packages/@uppy/box/src/Box.tsx | 6 +++-- .../src/CompanionPluginOptions.ts | 3 +-- .../@uppy/companion-client/src/Provider.ts | 11 ++++++---- .../companion-client/src/SearchProvider.ts | 3 +-- packages/@uppy/compressor/src/index.ts | 2 +- packages/@uppy/core/src/Uppy.test.ts | 2 +- packages/@uppy/core/src/index.ts | 17 +++++++++++++- packages/@uppy/dashboard/src/Dashboard.tsx | 22 ++++++++++--------- .../dashboard/src/components/Dashboard.tsx | 11 ++++++++-- .../src/components/FileItem/Buttons/index.tsx | 2 +- .../FileItem/FileProgress/index.tsx | 3 +-- .../src/components/FileItem/index.tsx | 3 +-- .../dashboard/src/components/FileList.tsx | 3 +-- .../src/components/PickerPanelTopBar.tsx | 2 +- packages/@uppy/drag-drop/src/DragDrop.tsx | 12 ++++++---- packages/@uppy/drop-target/src/index.ts | 6 ++--- packages/@uppy/dropbox/src/Dropbox.tsx | 6 +++-- packages/@uppy/facebook/src/Facebook.tsx | 6 +++-- packages/@uppy/file-input/src/FileInput.tsx | 11 +++++++--- packages/@uppy/form/src/index.ts | 12 +++++++--- .../golden-retriever/src/MetaDataStore.ts | 3 +-- packages/@uppy/golden-retriever/src/index.ts | 15 ++++++++----- .../src/GoogleDrivePicker.tsx | 3 +-- .../google-drive/src/DriveProviderViews.ts | 5 +++-- .../@uppy/google-drive/src/GoogleDrive.tsx | 6 +++-- .../src/GooglePhotosPicker.tsx | 3 +-- .../@uppy/google-photos/src/GooglePhotos.tsx | 6 +++-- packages/@uppy/image-editor/src/Editor.tsx | 2 +- .../@uppy/image-editor/src/ImageEditor.tsx | 12 +++++++--- packages/@uppy/informer/src/Informer.tsx | 3 +-- packages/@uppy/instagram/src/Instagram.tsx | 6 +++-- packages/@uppy/onedrive/src/OneDrive.tsx | 6 +++-- .../@uppy/progress-bar/src/ProgressBar.tsx | 13 +++++++---- .../@uppy/provider-views/src/Breadcrumbs.tsx | 3 +-- packages/@uppy/provider-views/src/Browser.tsx | 7 +++--- .../provider-views/src/FooterActions.tsx | 3 +-- .../src/GooglePicker/GooglePickerView.tsx | 3 +-- .../src/Item/components/GridItem.tsx | 5 +---- .../src/Item/components/ListItem.tsx | 2 +- .../@uppy/provider-views/src/Item/index.tsx | 2 +- .../src/ProviderView/AuthView.tsx | 2 +- .../src/ProviderView/Header.tsx | 3 +-- .../src/ProviderView/ProviderView.tsx | 5 +++-- .../SearchProviderView/SearchProviderView.tsx | 7 +++--- .../src/utils/PartialTreeUtils/afterFill.ts | 2 +- .../utils/PartialTreeUtils/afterOpenFolder.ts | 2 +- .../PartialTreeUtils/afterScrollFolder.ts | 2 +- .../PartialTreeUtils/afterToggleCheckbox.ts | 2 +- .../utils/PartialTreeUtils/getBreadcrumbs.ts | 2 +- .../getCheckedFilesWithPaths.ts | 2 +- .../getNumberOfSelectedFiles.ts | 2 +- .../src/utils/PartialTreeUtils/index.test.ts | 2 +- .../utils/PartialTreeUtils/shallowClone.ts | 2 +- .../src/utils/getClickedRange.ts | 5 +---- packages/@uppy/react/src/Dashboard.ts | 3 +-- packages/@uppy/react/src/DashboardModal.ts | 3 +-- packages/@uppy/react/src/DragDrop.ts | 3 +-- packages/@uppy/react/src/FileInput.ts | 9 ++++++-- packages/@uppy/react/src/ProgressBar.ts | 3 +-- packages/@uppy/react/src/StatusBar.ts | 3 +-- packages/@uppy/react/src/useUppyEvent.ts | 3 +-- packages/@uppy/react/src/useUppyState.ts | 3 +-- packages/@uppy/remote-sources/src/index.ts | 11 +++++++--- .../screen-capture/src/RecorderScreen.tsx | 2 +- .../screen-capture/src/ScreenCapture.tsx | 11 +++++++--- packages/@uppy/status-bar/src/Components.tsx | 3 +-- packages/@uppy/status-bar/src/StatusBar.tsx | 11 +++++++--- packages/@uppy/status-bar/src/StatusBarUI.tsx | 3 +-- .../@uppy/thumbnail-generator/src/index.ts | 4 ++-- .../@uppy/transloadit/src/AssemblyWatcher.ts | 3 +-- packages/@uppy/transloadit/src/index.ts | 13 +++++++---- packages/@uppy/tus/src/index.ts | 15 ++++++++----- packages/@uppy/unsplash/src/Unsplash.tsx | 6 +++-- packages/@uppy/url/src/Url.tsx | 3 ++- packages/@uppy/vue/src/dashboard-modal.ts | 2 +- packages/@uppy/vue/src/dashboard.ts | 3 +-- packages/@uppy/webcam/src/Webcam.tsx | 7 +++--- packages/@uppy/webdav/src/Webdav.tsx | 20 ++++++++--------- packages/@uppy/xhr-upload/src/index.ts | 16 +++++++++----- packages/@uppy/zoom/src/Zoom.tsx | 6 +++-- packages/uppy/src/bundle.ts | 2 +- 84 files changed, 280 insertions(+), 198 deletions(-) diff --git a/packages/@uppy/audio/src/Audio.tsx b/packages/@uppy/audio/src/Audio.tsx index 113d969f12..1428e7eca2 100644 --- a/packages/@uppy/audio/src/Audio.tsx +++ b/packages/@uppy/audio/src/Audio.tsx @@ -1,12 +1,13 @@ import { h } from 'preact' -import { UIPlugin, type UIPluginOptions } from '@uppy/core' +import { UIPlugin } from '@uppy/core' import type { + Uppy, + UIPluginOptions, Body, Meta, MinimalRequiredUppyFile, -} from '@uppy/utils/lib/UppyFile' -import type { Uppy } from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension' import supportsMediaRecorder from './supportsMediaRecorder.js' diff --git a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts index 9f2a923897..ebadfa6f00 100644 --- a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts +++ b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts @@ -1,4 +1,4 @@ -import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' +import type { Meta, Body, UppyFile } from '@uppy/core' import type { RateLimitedQueue, WrapPromiseFunctionType, diff --git a/packages/@uppy/aws-s3/src/index.ts b/packages/@uppy/aws-s3/src/index.ts index d8112b2220..18b895b848 100644 --- a/packages/@uppy/aws-s3/src/index.ts +++ b/packages/@uppy/aws-s3/src/index.ts @@ -1,11 +1,12 @@ -import BasePlugin, { +import { type DefinePluginOpts, type PluginOpts, -} from '@uppy/core/lib/BasePlugin.js' + Uppy, + BasePlugin, +} from '@uppy/core' import { RequestClient } from '@uppy/companion-client' import type { RequestOptions } from '@uppy/utils/lib/CompanionClientProvider' import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { Uppy } from '@uppy/core' import EventManager from '@uppy/core/lib/EventManager.js' import { RateLimitedQueue } from '@uppy/utils/lib/RateLimitedQueue' import { diff --git a/packages/@uppy/box/src/Box.tsx b/packages/@uppy/box/src/Box.tsx index 1d3b558f7c..3171f269e9 100644 --- a/packages/@uppy/box/src/Box.tsx +++ b/packages/@uppy/box/src/Box.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts b/packages/@uppy/companion-client/src/CompanionPluginOptions.ts index a923952e75..decfdecabb 100644 --- a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts +++ b/packages/@uppy/companion-client/src/CompanionPluginOptions.ts @@ -1,5 +1,4 @@ -import type { UIPluginOptions } from '@uppy/core' -import type { AsyncStore } from '@uppy/core/lib/Uppy.js' +import type { UIPluginOptions, AsyncStore } from '@uppy/core' export interface CompanionPluginOptions extends UIPluginOptions { storage?: AsyncStore diff --git a/packages/@uppy/companion-client/src/Provider.ts b/packages/@uppy/companion-client/src/Provider.ts index 0aaa06b917..3a716c3df4 100644 --- a/packages/@uppy/companion-client/src/Provider.ts +++ b/packages/@uppy/companion-client/src/Provider.ts @@ -1,11 +1,14 @@ -import type { Uppy } from '@uppy/core' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { PluginOpts } from '@uppy/core/lib/BasePlugin.js' +import type { + Uppy, + Body, + Meta, + PluginOpts, + UnknownProviderPlugin, +} from '@uppy/core' import type { RequestOptions, CompanionClientProvider, } from '@uppy/utils/lib/CompanionClientProvider' -import type { UnknownProviderPlugin } from '@uppy/core/lib/Uppy.js' import RequestClient, { authErrorStatusCode } from './RequestClient.js' import type { CompanionPluginOptions } from './index.js' import { isOriginAllowed } from './getAllowedHosts.js' diff --git a/packages/@uppy/companion-client/src/SearchProvider.ts b/packages/@uppy/companion-client/src/SearchProvider.ts index 44904d0c72..7a9b266c72 100644 --- a/packages/@uppy/companion-client/src/SearchProvider.ts +++ b/packages/@uppy/companion-client/src/SearchProvider.ts @@ -1,5 +1,4 @@ -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { Uppy } from '@uppy/core' +import type { Body, Meta, Uppy } from '@uppy/core' import type { CompanionClientSearchProvider } from '@uppy/utils/lib/CompanionClientProvider' import RequestClient, { type Opts } from './RequestClient.js' diff --git a/packages/@uppy/compressor/src/index.ts b/packages/@uppy/compressor/src/index.ts index be75a3cd42..2e7d2d87be 100644 --- a/packages/@uppy/compressor/src/index.ts +++ b/packages/@uppy/compressor/src/index.ts @@ -7,7 +7,7 @@ import prettierBytes from '@transloadit/prettier-bytes' import CompressorJS from 'compressorjs' import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js' +import type { DefinePluginOpts, PluginOpts } from '@uppy/core' import locale from './locale.js' diff --git a/packages/@uppy/core/src/Uppy.test.ts b/packages/@uppy/core/src/Uppy.test.ts index b88a16e826..86815dba6f 100644 --- a/packages/@uppy/core/src/Uppy.test.ts +++ b/packages/@uppy/core/src/Uppy.test.ts @@ -6,7 +6,7 @@ import assert from 'node:assert' import fs from 'node:fs' import path from 'node:path' import prettierBytes from '@transloadit/prettier-bytes' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' +import type { Body, Meta } from '@uppy/core' import type { Locale } from '@uppy/utils/lib/Translator' import Core from './index.js' import UIPlugin from './UIPlugin.js' diff --git a/packages/@uppy/core/src/index.ts b/packages/@uppy/core/src/index.ts index 236c57a17a..88a7c9b5ee 100644 --- a/packages/@uppy/core/src/index.ts +++ b/packages/@uppy/core/src/index.ts @@ -2,12 +2,22 @@ export { default } from './Uppy.js' export { default as Uppy, type State, + type BaseProviderPlugin, + type PartialTree, + type PartialTreeFile, + type PartialTreeFolder, + type PartialTreeFolderNode, + type PartialTreeFolderRoot, + type PartialTreeId, type UnknownPlugin, type UnknownProviderPlugin, + type UnknownProviderPluginState, type UnknownSearchProviderPlugin, + type UnknownSearchProviderPluginState, type UploadResult, type UppyEventMap, type UppyOptions, + type AsyncStore, } from './Uppy.js' export { default as UIPlugin } from './UIPlugin.js' @@ -20,4 +30,9 @@ export { debugLogger } from './loggers.js' export type { Store } from '@uppy/store-default' -export type { UppyFile, Meta, Body } from '@uppy/utils/lib/UppyFile' +export type { + UppyFile, + MinimalRequiredUppyFile, + Meta, + Body, +} from '@uppy/utils/lib/UppyFile' diff --git a/packages/@uppy/dashboard/src/Dashboard.tsx b/packages/@uppy/dashboard/src/Dashboard.tsx index ad0ec9b033..644f5c2cd6 100644 --- a/packages/@uppy/dashboard/src/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/Dashboard.tsx @@ -1,14 +1,16 @@ -import { - UIPlugin, - type UIPluginOptions, - type UnknownPlugin, - type Uppy, - type UploadResult, - type State, -} from '@uppy/core' import type { ComponentChild, VNode } from 'preact' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' -import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' +import { UIPlugin } from '@uppy/core' +import type { + Body, + Meta, + UppyFile, + UIPluginOptions, + UnknownPlugin, + Uppy, + UploadResult, + State, + DefinePluginOpts, +} from '@uppy/core' import StatusBar from '@uppy/status-bar' import Informer from '@uppy/informer' import ThumbnailGenerator from '@uppy/thumbnail-generator' diff --git a/packages/@uppy/dashboard/src/components/Dashboard.tsx b/packages/@uppy/dashboard/src/components/Dashboard.tsx index dbb47c6faf..4caa2936a1 100644 --- a/packages/@uppy/dashboard/src/components/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/components/Dashboard.tsx @@ -2,8 +2,15 @@ import { h } from 'preact' import classNames from 'classnames' import isDragDropSupported from '@uppy/utils/lib/isDragDropSupported' -import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { State, UIPlugin, UIPluginOptions, Uppy } from '@uppy/core' +import type { + Body, + Meta, + UppyFile, + State, + UIPlugin, + UIPluginOptions, + Uppy, +} from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import type Translator from '@uppy/utils/lib/Translator' import type { TargetedEvent } from 'preact/compat' diff --git a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx index c9421f27b2..d7d6fbd3f0 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx @@ -1,5 +1,5 @@ import { h } from 'preact' -import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' +import type { Body, Meta, UppyFile } from '@uppy/core' import type Uppy from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import copyToClipboard from '../../../utils/copyToClipboard.js' diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx index 1147d7a9d8..f3cc2566c2 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx @@ -1,8 +1,7 @@ /* eslint-disable react/no-unused-prop-types */ /* eslint-disable react/destructuring-assignment */ -import type { State, Uppy, UppyFile } from '@uppy/core' +import type { Body, Meta, State, Uppy, UppyFile } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import { h, type ComponentChild } from 'preact' interface Props { diff --git a/packages/@uppy/dashboard/src/components/FileItem/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/index.tsx index a962c10555..86246fd474 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/index.tsx @@ -2,10 +2,9 @@ import { h, Component, type ComponentChild } from 'preact' import classNames from 'classnames' import { shallowEqualObjects } from 'shallow-equal' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' +import type { UppyFile, Body, Meta, State } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import type Uppy from '@uppy/core' -import type { State } from '@uppy/core' import FilePreviewAndLink from './FilePreviewAndLink/index.jsx' import FileProgress from './FileProgress/index.jsx' import FileInfo from './FileInfo/index.jsx' diff --git a/packages/@uppy/dashboard/src/components/FileList.tsx b/packages/@uppy/dashboard/src/components/FileList.tsx index 6f67460b8e..8c8fdba147 100644 --- a/packages/@uppy/dashboard/src/components/FileList.tsx +++ b/packages/@uppy/dashboard/src/components/FileList.tsx @@ -3,9 +3,8 @@ import { useMemo } from 'preact/hooks' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore untyped import VirtualList from '@uppy/utils/lib/VirtualList' -import type { UppyFile, Uppy, State } from '@uppy/core' +import type { UppyFile, Uppy, State, Body, Meta } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import FileItem from './FileItem/index.jsx' import type { DashboardState } from '../Dashboard.js' diff --git a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.tsx b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.tsx index f00d1fb7a0..02a19abf61 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.tsx +++ b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.tsx @@ -1,4 +1,4 @@ -import type { UppyFile } from '@uppy/utils/lib/UppyFile' +import type { UppyFile } from '@uppy/core' import { h } from 'preact' type $TSFixMe = any diff --git a/packages/@uppy/drag-drop/src/DragDrop.tsx b/packages/@uppy/drag-drop/src/DragDrop.tsx index 02ce832d47..2b2c9ab6b0 100644 --- a/packages/@uppy/drag-drop/src/DragDrop.tsx +++ b/packages/@uppy/drag-drop/src/DragDrop.tsx @@ -1,7 +1,11 @@ -import { UIPlugin, type Uppy } from '@uppy/core' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' -import type { UIPluginOptions } from '@uppy/core/lib/UIPlugin.js' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' +import { UIPlugin } from '@uppy/core' +import type { + UIPluginOptions, + Uppy, + DefinePluginOpts, + Body, + Meta, +} from '@uppy/core' import type { TargetedEvent } from 'preact/compat' import toArray from '@uppy/utils/lib/toArray' import isDragDropSupported from '@uppy/utils/lib/isDragDropSupported' diff --git a/packages/@uppy/drop-target/src/index.ts b/packages/@uppy/drop-target/src/index.ts index 6f3067fb7a..b66e1ac512 100644 --- a/packages/@uppy/drop-target/src/index.ts +++ b/packages/@uppy/drop-target/src/index.ts @@ -1,7 +1,5 @@ -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { Uppy } from '@uppy/core/lib/Uppy.js' -import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js' -import BasePlugin from '@uppy/core/lib/BasePlugin.js' +import type { Uppy, Body, Meta, DefinePluginOpts, PluginOpts } from '@uppy/core' +import { BasePlugin } from '@uppy/core' import getDroppedFiles from '@uppy/utils/lib/getDroppedFiles' import toArray from '@uppy/utils/lib/toArray' // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/packages/@uppy/dropbox/src/Dropbox.tsx b/packages/@uppy/dropbox/src/Dropbox.tsx index 94421bdff6..f57a47b931 100644 --- a/packages/@uppy/dropbox/src/Dropbox.tsx +++ b/packages/@uppy/dropbox/src/Dropbox.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/facebook/src/Facebook.tsx b/packages/@uppy/facebook/src/Facebook.tsx index 1fef41fd51..3b47327916 100644 --- a/packages/@uppy/facebook/src/Facebook.tsx +++ b/packages/@uppy/facebook/src/Facebook.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/file-input/src/FileInput.tsx b/packages/@uppy/file-input/src/FileInput.tsx index 90002d402d..e36987da4b 100644 --- a/packages/@uppy/file-input/src/FileInput.tsx +++ b/packages/@uppy/file-input/src/FileInput.tsx @@ -1,9 +1,14 @@ import { h, type ComponentChild } from 'preact' -import { UIPlugin, Uppy, type UIPluginOptions } from '@uppy/core' +import { UIPlugin } from '@uppy/core' +import type { + Uppy, + UIPluginOptions, + Body, + Meta, + DefinePluginOpts, +} from '@uppy/core' import toArray from '@uppy/utils/lib/toArray' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' import type { TargetedEvent } from 'preact/compat' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/form/src/index.ts b/packages/@uppy/form/src/index.ts index 3c541866e2..6d4cb0541c 100644 --- a/packages/@uppy/form/src/index.ts +++ b/packages/@uppy/form/src/index.ts @@ -1,4 +1,12 @@ -import BasePlugin, { type DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' +import { BasePlugin } from '@uppy/core' +import type { + DefinePluginOpts, + UIPluginOptions, + Uppy, + UppyEventMap, + Body, + Meta, +} from '@uppy/core' import findDOMElement from '@uppy/utils/lib/findDOMElement' import toArray from '@uppy/utils/lib/toArray' @@ -6,8 +14,6 @@ import toArray from '@uppy/utils/lib/toArray' // @ts-ignore untyped import getFormData from 'get-form-data' -import type { UIPluginOptions, Uppy, UppyEventMap } from '@uppy/core' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json import packageJson from '../package.json' diff --git a/packages/@uppy/golden-retriever/src/MetaDataStore.ts b/packages/@uppy/golden-retriever/src/MetaDataStore.ts index 5435964e45..2f80084c0b 100644 --- a/packages/@uppy/golden-retriever/src/MetaDataStore.ts +++ b/packages/@uppy/golden-retriever/src/MetaDataStore.ts @@ -1,5 +1,4 @@ -import type { State as UppyState } from '@uppy/core' -import type { Meta, Body } from '@uppy/utils/lib/UppyFile' +import type { State as UppyState, Meta, Body } from '@uppy/core' export type StoredState = { expires: number diff --git a/packages/@uppy/golden-retriever/src/index.ts b/packages/@uppy/golden-retriever/src/index.ts index 566f03e601..cd279cd199 100644 --- a/packages/@uppy/golden-retriever/src/index.ts +++ b/packages/@uppy/golden-retriever/src/index.ts @@ -1,9 +1,14 @@ import throttle from 'lodash/throttle.js' -import BasePlugin from '@uppy/core/lib/BasePlugin.js' -import type { PluginOpts, DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' -import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import type Uppy from '@uppy/core' -import type { UploadResult } from '@uppy/core' +import { BasePlugin } from '@uppy/core' +import type { + Body, + Meta, + UppyFile, + Uppy, + UploadResult, + PluginOpts, + DefinePluginOpts, +} from '@uppy/core' import ServiceWorkerStore, { type ServiceWorkerStoredFile, } from './ServiceWorkerStore.js' diff --git a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx index af7b615672..cc3b51945c 100644 --- a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx +++ b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx @@ -9,8 +9,7 @@ import { } from '@uppy/companion-client' import type { PickedItem } from '@uppy/provider-views/lib/GooglePicker/googlePicker.js' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { AsyncStore, BaseProviderPlugin } from '@uppy/core/lib/Uppy.js' +import type { Body, Meta, AsyncStore, BaseProviderPlugin } from '@uppy/core' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/google-drive/src/DriveProviderViews.ts b/packages/@uppy/google-drive/src/DriveProviderViews.ts index 3ea16e5da3..ca060b9e94 100644 --- a/packages/@uppy/google-drive/src/DriveProviderViews.ts +++ b/packages/@uppy/google-drive/src/DriveProviderViews.ts @@ -1,9 +1,10 @@ import type { PartialTreeFile, PartialTreeFolderNode, -} from '@uppy/core/lib/Uppy.js' + Body, + Meta, +} from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' export default class DriveProviderViews< M extends Meta, diff --git a/packages/@uppy/google-drive/src/GoogleDrive.tsx b/packages/@uppy/google-drive/src/GoogleDrive.tsx index 21e6f221fa..9ed1b065d5 100644 --- a/packages/@uppy/google-drive/src/GoogleDrive.tsx +++ b/packages/@uppy/google-drive/src/GoogleDrive.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import DriveProviderViews from './DriveProviderViews.js' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx index e6594d4ba8..e859285af4 100644 --- a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx +++ b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx @@ -9,8 +9,7 @@ import { } from '@uppy/companion-client' import type { PickedItem } from '@uppy/provider-views/lib/GooglePicker/googlePicker.js' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { AsyncStore, BaseProviderPlugin } from '@uppy/core/lib/Uppy.js' +import type { Body, Meta, AsyncStore, BaseProviderPlugin } from '@uppy/core' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/google-photos/src/GooglePhotos.tsx b/packages/@uppy/google-photos/src/GooglePhotos.tsx index b32ce7b90e..3933428493 100644 --- a/packages/@uppy/google-photos/src/GooglePhotos.tsx +++ b/packages/@uppy/google-photos/src/GooglePhotos.tsx @@ -8,12 +8,14 @@ import { } from '@uppy/companion-client' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/image-editor/src/Editor.tsx b/packages/@uppy/image-editor/src/Editor.tsx index ae646952b5..b2e84cf2f1 100644 --- a/packages/@uppy/image-editor/src/Editor.tsx +++ b/packages/@uppy/image-editor/src/Editor.tsx @@ -1,7 +1,7 @@ /* eslint-disable jsx-a11y/label-has-associated-control */ import Cropper from 'cropperjs' import { h, Component } from 'preact' -import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' +import type { Meta, Body, UppyFile } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import getCanvasDataThatFitsPerfectlyIntoContainer from './utils/getCanvasDataThatFitsPerfectlyIntoContainer.js' import getScaleFactorThatRemovesDarkCorners from './utils/getScaleFactorThatRemovesDarkCorners.js' diff --git a/packages/@uppy/image-editor/src/ImageEditor.tsx b/packages/@uppy/image-editor/src/ImageEditor.tsx index 52a3583df4..1f896ef398 100644 --- a/packages/@uppy/image-editor/src/ImageEditor.tsx +++ b/packages/@uppy/image-editor/src/ImageEditor.tsx @@ -1,9 +1,15 @@ -import { UIPlugin, type UIPluginOptions, type Uppy } from '@uppy/core' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' +import { UIPlugin } from '@uppy/core' +import type { + UIPluginOptions, + Uppy, + DefinePluginOpts, + Meta, + Body, + UppyFile, +} from '@uppy/core' import type Cropper from 'cropperjs' import { h } from 'preact' -import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' import Editor from './Editor.jsx' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/informer/src/Informer.tsx b/packages/@uppy/informer/src/Informer.tsx index f8fd7cc31d..cfb49d1599 100644 --- a/packages/@uppy/informer/src/Informer.tsx +++ b/packages/@uppy/informer/src/Informer.tsx @@ -2,8 +2,7 @@ /* eslint-disable jsx-a11y/click-events-have-key-events */ import { h, type ComponentChild } from 'preact' import { UIPlugin } from '@uppy/core' -import type { State, UIPluginOptions, Uppy } from '@uppy/core' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' +import type { State, UIPluginOptions, Uppy, Body, Meta } from '@uppy/core' import FadeIn from './FadeIn.jsx' import TransitionGroup from './TransitionGroup.js' diff --git a/packages/@uppy/instagram/src/Instagram.tsx b/packages/@uppy/instagram/src/Instagram.tsx index 0f5cb7cf51..b3175832ce 100644 --- a/packages/@uppy/instagram/src/Instagram.tsx +++ b/packages/@uppy/instagram/src/Instagram.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/onedrive/src/OneDrive.tsx b/packages/@uppy/onedrive/src/OneDrive.tsx index f08ba79fd0..f224899e20 100644 --- a/packages/@uppy/onedrive/src/OneDrive.tsx +++ b/packages/@uppy/onedrive/src/OneDrive.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/progress-bar/src/ProgressBar.tsx b/packages/@uppy/progress-bar/src/ProgressBar.tsx index 42a2036ca7..d48a6c3626 100644 --- a/packages/@uppy/progress-bar/src/ProgressBar.tsx +++ b/packages/@uppy/progress-bar/src/ProgressBar.tsx @@ -1,8 +1,13 @@ import { h, type ComponentChild } from 'preact' -import { UIPlugin, type UIPluginOptions } from '@uppy/core' -import type { Uppy, State } from '@uppy/core/lib/Uppy.js' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' +import { UIPlugin } from '@uppy/core' +import type { + Uppy, + State, + UIPluginOptions, + Body, + Meta, + DefinePluginOpts, +} from '@uppy/core' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/provider-views/src/Breadcrumbs.tsx b/packages/@uppy/provider-views/src/Breadcrumbs.tsx index 16f2c39e21..3e0d4c6d83 100644 --- a/packages/@uppy/provider-views/src/Breadcrumbs.tsx +++ b/packages/@uppy/provider-views/src/Breadcrumbs.tsx @@ -1,6 +1,5 @@ -import type { PartialTreeFolder } from '@uppy/core/lib/Uppy.js' +import type { PartialTreeFolder, Body, Meta } from '@uppy/core' import { h, Fragment } from 'preact' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type ProviderView from './ProviderView/index.js' type BreadcrumbsProps = { diff --git a/packages/@uppy/provider-views/src/Browser.tsx b/packages/@uppy/provider-views/src/Browser.tsx index 7cecf3d23e..926dc99884 100644 --- a/packages/@uppy/provider-views/src/Browser.tsx +++ b/packages/@uppy/provider-views/src/Browser.tsx @@ -3,12 +3,13 @@ import { h } from 'preact' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore untyped import VirtualList from '@uppy/utils/lib/VirtualList' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { I18n } from '@uppy/utils/lib/Translator' import type { + Body, + Meta, PartialTreeFile, PartialTreeFolderNode, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' +import type { I18n } from '@uppy/utils/lib/Translator' import { useEffect, useState } from 'preact/hooks' import Item from './Item/index.jsx' import ProviderView from './ProviderView/ProviderView.jsx' diff --git a/packages/@uppy/provider-views/src/FooterActions.tsx b/packages/@uppy/provider-views/src/FooterActions.tsx index c215a6eaac..3b8155c7d3 100644 --- a/packages/@uppy/provider-views/src/FooterActions.tsx +++ b/packages/@uppy/provider-views/src/FooterActions.tsx @@ -1,8 +1,7 @@ import { h } from 'preact' import type { I18n } from '@uppy/utils/lib/Translator' -import type { Meta, Body } from '@uppy/utils/lib/UppyFile' +import type { Meta, Body, PartialTree } from '@uppy/core' import classNames from 'classnames' -import type { PartialTree } from '@uppy/core/lib/Uppy.js' import { useMemo } from 'preact/hooks' import getNumberOfSelectedFiles from './utils/PartialTreeUtils/getNumberOfSelectedFiles.js' import ProviderView from './ProviderView/ProviderView.jsx' diff --git a/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx b/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx index 798ac34208..139e0296b0 100644 --- a/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx +++ b/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx @@ -1,8 +1,7 @@ import { h } from 'preact' import { useCallback, useEffect, useRef, useState } from 'preact/hooks' -import type { Uppy } from '@uppy/core' -import type { AsyncStore } from '@uppy/core/lib/Uppy.js' +import type { Uppy, AsyncStore } from '@uppy/core' import { authorize, diff --git a/packages/@uppy/provider-views/src/Item/components/GridItem.tsx b/packages/@uppy/provider-views/src/Item/components/GridItem.tsx index 6ec3930a50..858b26e815 100644 --- a/packages/@uppy/provider-views/src/Item/components/GridItem.tsx +++ b/packages/@uppy/provider-views/src/Item/components/GridItem.tsx @@ -1,8 +1,5 @@ import { h } from 'preact' -import type { - PartialTreeFile, - PartialTreeFolderNode, -} from '@uppy/core/lib/Uppy.js' +import type { PartialTreeFile, PartialTreeFolderNode } from '@uppy/core' import ItemIcon from './ItemIcon.jsx' type GridItemProps = { diff --git a/packages/@uppy/provider-views/src/Item/components/ListItem.tsx b/packages/@uppy/provider-views/src/Item/components/ListItem.tsx index 6185953fd3..0f0058457c 100644 --- a/packages/@uppy/provider-views/src/Item/components/ListItem.tsx +++ b/packages/@uppy/provider-views/src/Item/components/ListItem.tsx @@ -2,7 +2,7 @@ import type { PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import { h } from 'preact' import ItemIcon from './ItemIcon.jsx' diff --git a/packages/@uppy/provider-views/src/Item/index.tsx b/packages/@uppy/provider-views/src/Item/index.tsx index b94e84d3cd..5a2d22c1ba 100644 --- a/packages/@uppy/provider-views/src/Item/index.tsx +++ b/packages/@uppy/provider-views/src/Item/index.tsx @@ -7,7 +7,7 @@ import type { PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import GridItem from './components/GridItem.jsx' import ListItem from './components/ListItem.jsx' diff --git a/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx b/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx index 4a07909a82..d98be38894 100644 --- a/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx @@ -1,6 +1,6 @@ import { h } from 'preact' import { useCallback } from 'preact/hooks' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' +import type { Body, Meta } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import type { Opts } from './ProviderView.js' import type ProviderViews from './ProviderView.js' diff --git a/packages/@uppy/provider-views/src/ProviderView/Header.tsx b/packages/@uppy/provider-views/src/ProviderView/Header.tsx index 1dc897e581..61e3fe9582 100644 --- a/packages/@uppy/provider-views/src/ProviderView/Header.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/Header.tsx @@ -1,8 +1,7 @@ /* eslint-disable react/destructuring-assignment */ import { h } from 'preact' import type { I18n } from '@uppy/utils/lib/Translator' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { PartialTreeFolder } from '@uppy/core/lib/Uppy.js' +import type { Body, Meta, PartialTreeFolder } from '@uppy/core' import classNames from 'classnames' import User from './User.jsx' import Breadcrumbs from '../Breadcrumbs.jsx' diff --git a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx index 6bc5e4cd24..fbcbd720d7 100644 --- a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx @@ -7,8 +7,9 @@ import type { UnknownProviderPluginState, PartialTreeId, PartialTree, -} from '@uppy/core/lib/Uppy.js' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' + Body, + Meta, +} from '@uppy/core' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' import classNames from 'classnames' import type { ValidateableFile } from '@uppy/core/lib/Restricter.js' diff --git a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx index 5b8069cb94..399955e817 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx +++ b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx @@ -1,19 +1,20 @@ import { h } from 'preact' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + Body, + Meta, + DefinePluginOpts, PartialTree, PartialTreeFile, PartialTreeFolderNode, PartialTreeFolderRoot, UnknownSearchProviderPlugin, UnknownSearchProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' import classNames from 'classnames' import type { ValidateableFile } from '@uppy/core/lib/Restricter.js' import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal' -import type { DefinePluginOpts } from '@uppy/core' import SearchInput from '../SearchInput.jsx' import Browser from '../Browser.jsx' diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts index 417dbd76e8..eb0390d6c0 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts @@ -4,7 +4,7 @@ import type { PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' // p-queue does not have a `"main"` field in its `package.json`, and that makes `import/no-unresolved` freak out. // We can safely ignore it because bundlers will happily use the `"exports"` field instead. diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterOpenFolder.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterOpenFolder.ts index 182fc1f6ab..b81cd537a4 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterOpenFolder.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterOpenFolder.ts @@ -3,7 +3,7 @@ import type { PartialTreeFile, PartialTreeFolder, PartialTreeFolderNode, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' const afterOpenFolder = ( diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterScrollFolder.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterScrollFolder.ts index 632c970172..8ec1769834 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterScrollFolder.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterScrollFolder.ts @@ -4,7 +4,7 @@ import type { PartialTreeFolder, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' const afterScrollFolder = ( diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts index ccb2d736d6..101085c811 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts @@ -5,7 +5,7 @@ import type { PartialTreeFolder, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import shallowClone from './shallowClone.js' /* diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getBreadcrumbs.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getBreadcrumbs.ts index 9a19424725..c5785a9257 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getBreadcrumbs.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getBreadcrumbs.ts @@ -3,7 +3,7 @@ import type { PartialTreeFolder, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' const getBreadcrumbs = ( partialTree: PartialTree, diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts index 8ebc725403..742fdf6651 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts @@ -4,7 +4,7 @@ import type { PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' export interface Cache { diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts index 3d8635f13f..1c6643509f 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts @@ -1,4 +1,4 @@ -import type { PartialTree } from '@uppy/core/lib/Uppy.js' +import type { PartialTree } from '@uppy/core' /** * We're interested in all 'checked' leaves of this tree, diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts index 3d813cb004..74b32d205a 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts @@ -7,7 +7,7 @@ import type { PartialTreeFolderNode, PartialTreeFolderRoot, PartialTreeId, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import afterToggleCheckbox from './afterToggleCheckbox.js' import afterOpenFolder from './afterOpenFolder.js' import afterScrollFolder from './afterScrollFolder.js' diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/shallowClone.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/shallowClone.ts index fa61ed586c..a68cdbf3cf 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/shallowClone.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/shallowClone.ts @@ -1,4 +1,4 @@ -import type { PartialTree } from '@uppy/core/lib/Uppy.js' +import type { PartialTree } from '@uppy/core' /** * One-level copying is sufficient as mutations within our `partialTree` are limited to properties diff --git a/packages/@uppy/provider-views/src/utils/getClickedRange.ts b/packages/@uppy/provider-views/src/utils/getClickedRange.ts index 637885f0fa..71d8c6eac9 100644 --- a/packages/@uppy/provider-views/src/utils/getClickedRange.ts +++ b/packages/@uppy/provider-views/src/utils/getClickedRange.ts @@ -1,7 +1,4 @@ -import type { - PartialTreeFile, - PartialTreeFolderNode, -} from '@uppy/core/lib/Uppy.js' +import type { PartialTreeFile, PartialTreeFolderNode } from '@uppy/core' // Shift-clicking selects a single consecutive list of items // starting at the previous click. diff --git a/packages/@uppy/react/src/Dashboard.ts b/packages/@uppy/react/src/Dashboard.ts index 8a135c7777..2c164a66e2 100644 --- a/packages/@uppy/react/src/Dashboard.ts +++ b/packages/@uppy/react/src/Dashboard.ts @@ -1,8 +1,7 @@ import { createElement as h, Component } from 'react' import type React from 'react' -import type { UnknownPlugin, Uppy } from '@uppy/core' +import type { UnknownPlugin, Uppy, Body, Meta } from '@uppy/core' import DashboardPlugin from '@uppy/dashboard' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { DashboardOptions } from '@uppy/dashboard' import getHTMLProps from './getHTMLProps.js' import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' diff --git a/packages/@uppy/react/src/DashboardModal.ts b/packages/@uppy/react/src/DashboardModal.ts index 401fc3581f..c623f21cf3 100644 --- a/packages/@uppy/react/src/DashboardModal.ts +++ b/packages/@uppy/react/src/DashboardModal.ts @@ -1,8 +1,7 @@ import { createElement as h, Component } from 'react' import type React from 'react' import DashboardPlugin, { type DashboardOptions } from '@uppy/dashboard' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { Uppy } from '@uppy/core' +import type { Body, Meta, Uppy } from '@uppy/core' import getHTMLProps from './getHTMLProps.js' import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' diff --git a/packages/@uppy/react/src/DragDrop.ts b/packages/@uppy/react/src/DragDrop.ts index 19aed54565..5c6dce8673 100644 --- a/packages/@uppy/react/src/DragDrop.ts +++ b/packages/@uppy/react/src/DragDrop.ts @@ -1,7 +1,6 @@ import { createElement as h, Component } from 'react' -import type { UnknownPlugin, Uppy } from '@uppy/core' +import type { UnknownPlugin, Uppy, Body, Meta } from '@uppy/core' import DragDropPlugin, { type DragDropOptions } from '@uppy/drag-drop' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import getHTMLProps from './getHTMLProps.js' import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' diff --git a/packages/@uppy/react/src/FileInput.ts b/packages/@uppy/react/src/FileInput.ts index 740c389f3e..6885b9123a 100644 --- a/packages/@uppy/react/src/FileInput.ts +++ b/packages/@uppy/react/src/FileInput.ts @@ -1,7 +1,12 @@ import { createElement as h, Component } from 'react' -import type { UIPluginOptions, UnknownPlugin, Uppy } from '@uppy/core' +import type { + UIPluginOptions, + UnknownPlugin, + Uppy, + Body, + Meta, +} from '@uppy/core' import FileInputPlugin from '@uppy/file-input' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { Locale } from '@uppy/utils/lib/Translator' interface FileInputProps diff --git a/packages/@uppy/react/src/ProgressBar.ts b/packages/@uppy/react/src/ProgressBar.ts index ec528b83c5..e3ae8b8cb1 100644 --- a/packages/@uppy/react/src/ProgressBar.ts +++ b/packages/@uppy/react/src/ProgressBar.ts @@ -1,7 +1,6 @@ import { createElement as h, Component } from 'react' -import type { UnknownPlugin, Uppy } from '@uppy/core' +import type { UnknownPlugin, Uppy, Body, Meta } from '@uppy/core' import ProgressBarPlugin, { type ProgressBarOptions } from '@uppy/progress-bar' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import getHTMLProps from './getHTMLProps.js' import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' diff --git a/packages/@uppy/react/src/StatusBar.ts b/packages/@uppy/react/src/StatusBar.ts index 8a35e7cc26..8319d20dee 100644 --- a/packages/@uppy/react/src/StatusBar.ts +++ b/packages/@uppy/react/src/StatusBar.ts @@ -1,7 +1,6 @@ import { createElement as h, Component } from 'react' -import type { UnknownPlugin, Uppy } from '@uppy/core' +import type { UnknownPlugin, Uppy, Body, Meta } from '@uppy/core' import StatusBarPlugin, { type StatusBarOptions } from '@uppy/status-bar' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import getHTMLProps from './getHTMLProps.js' import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' diff --git a/packages/@uppy/react/src/useUppyEvent.ts b/packages/@uppy/react/src/useUppyEvent.ts index 54f23a95c4..4e1ae26489 100644 --- a/packages/@uppy/react/src/useUppyEvent.ts +++ b/packages/@uppy/react/src/useUppyEvent.ts @@ -1,5 +1,4 @@ -import type { Uppy, UppyEventMap } from '@uppy/core' -import type { Meta, Body } from '@uppy/utils/lib/UppyFile' +import type { Meta, Body, Uppy, UppyEventMap } from '@uppy/core' import { useEffect, useState } from 'react' type EventResults< diff --git a/packages/@uppy/react/src/useUppyState.ts b/packages/@uppy/react/src/useUppyState.ts index b811e89a77..f22c8d7d14 100644 --- a/packages/@uppy/react/src/useUppyState.ts +++ b/packages/@uppy/react/src/useUppyState.ts @@ -1,5 +1,4 @@ -import type { Uppy, State } from '@uppy/core' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' +import type { Uppy, State, Body, Meta } from '@uppy/core' import { useMemo, useCallback } from 'react' import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js' diff --git a/packages/@uppy/remote-sources/src/index.ts b/packages/@uppy/remote-sources/src/index.ts index 460e6123ef..c7ec1d8674 100644 --- a/packages/@uppy/remote-sources/src/index.ts +++ b/packages/@uppy/remote-sources/src/index.ts @@ -1,4 +1,11 @@ -import { BasePlugin, Uppy, type UnknownProviderPlugin } from '@uppy/core' +import { BasePlugin } from '@uppy/core' +import type { + Uppy, + UnknownProviderPlugin, + DefinePluginOpts, + Body, + Meta, +} from '@uppy/core' import Dropbox from '@uppy/dropbox' import GoogleDrive from '@uppy/google-drive' import GooglePhotos from '@uppy/google-photos' @@ -10,8 +17,6 @@ import Unsplash from '@uppy/unsplash' import Url from '@uppy/url' import Zoom from '@uppy/zoom' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { CompanionPluginOptions } from '@uppy/companion-client' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/screen-capture/src/RecorderScreen.tsx b/packages/@uppy/screen-capture/src/RecorderScreen.tsx index a59079583a..924c7a1b5e 100644 --- a/packages/@uppy/screen-capture/src/RecorderScreen.tsx +++ b/packages/@uppy/screen-capture/src/RecorderScreen.tsx @@ -1,6 +1,6 @@ /* eslint-disable react/jsx-props-no-spreading */ import { h, Component, type ComponentChild } from 'preact' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' +import type { Body, Meta } from '@uppy/core' import RecordButton from './RecordButton.jsx' import SubmitButton from './SubmitButton.jsx' import StopWatch from './StopWatch.jsx' diff --git a/packages/@uppy/screen-capture/src/ScreenCapture.tsx b/packages/@uppy/screen-capture/src/ScreenCapture.tsx index 82d262ba77..22ab7f93fe 100644 --- a/packages/@uppy/screen-capture/src/ScreenCapture.tsx +++ b/packages/@uppy/screen-capture/src/ScreenCapture.tsx @@ -1,8 +1,13 @@ import { h, type ComponentChild } from 'preact' -import { UIPlugin, Uppy, type UIPluginOptions } from '@uppy/core' +import { UIPlugin } from '@uppy/core' +import type { + Uppy, + UIPluginOptions, + DefinePluginOpts, + Body, + Meta, +} from '@uppy/core' import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import ScreenRecIcon from './ScreenRecIcon.jsx' import RecorderScreen from './RecorderScreen.jsx' diff --git a/packages/@uppy/status-bar/src/Components.tsx b/packages/@uppy/status-bar/src/Components.tsx index d7cfc49d3b..41e56b20d9 100644 --- a/packages/@uppy/status-bar/src/Components.tsx +++ b/packages/@uppy/status-bar/src/Components.tsx @@ -1,5 +1,4 @@ -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { State, Uppy } from '@uppy/core/lib/Uppy.js' +import type { Body, Meta, State, Uppy } from '@uppy/core' import type { FileProcessingInfo } from '@uppy/utils/lib/FileProgress' import type { I18n } from '@uppy/utils/lib/Translator' import { h } from 'preact' diff --git a/packages/@uppy/status-bar/src/StatusBar.tsx b/packages/@uppy/status-bar/src/StatusBar.tsx index 300c3a71e0..65a6f9351f 100644 --- a/packages/@uppy/status-bar/src/StatusBar.tsx +++ b/packages/@uppy/status-bar/src/StatusBar.tsx @@ -1,7 +1,12 @@ import type { ComponentChild } from 'preact' -import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { Uppy, State } from '@uppy/core/lib/Uppy.js' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' +import type { + Body, + Meta, + UppyFile, + DefinePluginOpts, + Uppy, + State, +} from '@uppy/core' import { UIPlugin } from '@uppy/core' import emaFilter from '@uppy/utils/lib/emaFilter' import getTextDirection from '@uppy/utils/lib/getTextDirection' diff --git a/packages/@uppy/status-bar/src/StatusBarUI.tsx b/packages/@uppy/status-bar/src/StatusBarUI.tsx index 6e7abc941d..f10b87096f 100644 --- a/packages/@uppy/status-bar/src/StatusBarUI.tsx +++ b/packages/@uppy/status-bar/src/StatusBarUI.tsx @@ -1,6 +1,5 @@ -import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' +import type { Body, Meta, UppyFile, Uppy, State } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' -import type { Uppy, State } from '@uppy/core/lib/Uppy.js' import { h } from 'preact' import classNames from 'classnames' import statusBarStates from './StatusBarStates.js' diff --git a/packages/@uppy/thumbnail-generator/src/index.ts b/packages/@uppy/thumbnail-generator/src/index.ts index 0c3aab4199..8b699c125f 100644 --- a/packages/@uppy/thumbnail-generator/src/index.ts +++ b/packages/@uppy/thumbnail-generator/src/index.ts @@ -1,4 +1,5 @@ -import { UIPlugin, Uppy, type UIPluginOptions } from '@uppy/core' +import { UIPlugin } from '@uppy/core' +import type { Uppy, UIPluginOptions, DefinePluginOpts } from '@uppy/core' import dataURItoBlob from '@uppy/utils/lib/dataURItoBlob' import isObjectURL from '@uppy/utils/lib/isObjectURL' import isPreviewSupported from '@uppy/utils/lib/isPreviewSupported' @@ -6,7 +7,6 @@ import isPreviewSupported from '@uppy/utils/lib/isPreviewSupported' // @ts-ignore untyped import { rotation } from 'exifr/dist/mini.esm.mjs' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/packages/@uppy/transloadit/src/AssemblyWatcher.ts b/packages/@uppy/transloadit/src/AssemblyWatcher.ts index 6982316dcc..72682d314f 100644 --- a/packages/@uppy/transloadit/src/AssemblyWatcher.ts +++ b/packages/@uppy/transloadit/src/AssemblyWatcher.ts @@ -1,5 +1,4 @@ -import type { Uppy } from '@uppy/core' -import type { Body, Meta } from '@uppy/utils/lib/UppyFile' +import type { Uppy, Body, Meta } from '@uppy/core' import Emitter from 'component-emitter' import type { AssemblyResponse } from './index.js' diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 57de811284..f4b69fd991 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -1,11 +1,16 @@ import hasProperty from '@uppy/utils/lib/hasProperty' import ErrorWithCause from '@uppy/utils/lib/ErrorWithCause' import { RateLimitedQueue } from '@uppy/utils/lib/RateLimitedQueue' -import BasePlugin from '@uppy/core/lib/BasePlugin.js' -import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js' import Tus, { type TusDetailedError, type TusOpts } from '@uppy/tus' -import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { Uppy } from '@uppy/core' +import { BasePlugin } from '@uppy/core' +import type { + DefinePluginOpts, + PluginOpts, + Uppy, + Body, + Meta, + UppyFile, +} from '@uppy/core' import Assembly from './Assembly.js' import Client, { AssemblyError } from './Client.js' import AssemblyWatcher from './AssemblyWatcher.js' diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index f4e62fe93b..20dde1484f 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -1,7 +1,12 @@ -import BasePlugin, { - type DefinePluginOpts, - type PluginOpts, -} from '@uppy/core/lib/BasePlugin.js' +import { BasePlugin } from '@uppy/core' +import type { + Uppy, + DefinePluginOpts, + PluginOpts, + Meta, + Body, + UppyFile, +} from '@uppy/core' import * as tus from 'tus-js-client' import EventManager from '@uppy/core/lib/EventManager.js' import NetworkError from '@uppy/utils/lib/NetworkError' @@ -14,8 +19,6 @@ import { filterNonFailedFiles, filterFilesToEmitUploadStarted, } from '@uppy/utils/lib/fileFilters' -import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { Uppy } from '@uppy/core' import type { RequestClient } from '@uppy/companion-client' import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields' import getFingerprint from './getFingerprint.js' diff --git a/packages/@uppy/unsplash/src/Unsplash.tsx b/packages/@uppy/unsplash/src/Unsplash.tsx index 0979e95d2c..22225e70da 100644 --- a/packages/@uppy/unsplash/src/Unsplash.tsx +++ b/packages/@uppy/unsplash/src/Unsplash.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { SearchProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownSearchProviderPlugin, UnknownSearchProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/url/src/Url.tsx b/packages/@uppy/url/src/Url.tsx index 07d8799403..1dc8b82fc3 100644 --- a/packages/@uppy/url/src/Url.tsx +++ b/packages/@uppy/url/src/Url.tsx @@ -5,7 +5,8 @@ import { type CompanionPluginOptions, } from '@uppy/companion-client' import toArray from '@uppy/utils/lib/toArray' -import type { TagFile, Meta, Body } from '@uppy/utils/lib/UppyFile' +import type { Meta, Body } from '@uppy/core' +import type { TagFile } from '@uppy/utils/lib/UppyFile' import UrlUI from './UrlUI.jsx' import forEachDroppedOrPastedUrl from './utils/forEachDroppedOrPastedUrl.js' diff --git a/packages/@uppy/vue/src/dashboard-modal.ts b/packages/@uppy/vue/src/dashboard-modal.ts index 1bfff7cd7c..a0df22ce31 100644 --- a/packages/@uppy/vue/src/dashboard-modal.ts +++ b/packages/@uppy/vue/src/dashboard-modal.ts @@ -1,7 +1,7 @@ import { defineComponent, ref, watch, h, type PropType } from 'vue' import DashboardPlugin, { type DashboardOptions } from '@uppy/dashboard' import { Uppy } from '@uppy/core' -import type { Meta, Body } from '@uppy/utils/lib/UppyFile' +import type { Meta, Body } from '@uppy/core' import useUppy from './useUppy.js' type DashboardModalOptions = Omit< diff --git a/packages/@uppy/vue/src/dashboard.ts b/packages/@uppy/vue/src/dashboard.ts index 3cf663c87a..7b5383f760 100644 --- a/packages/@uppy/vue/src/dashboard.ts +++ b/packages/@uppy/vue/src/dashboard.ts @@ -1,7 +1,6 @@ import { defineComponent, ref, h, type PropType } from 'vue' import DashboardPlugin, { type DashboardOptions } from '@uppy/dashboard' -import type { Uppy } from '@uppy/core' -import type { Meta, Body } from '@uppy/utils/lib/UppyFile' +import type { Uppy, Meta, Body } from '@uppy/core' import useUppy from './useUppy.js' type DashboardInlineOptions = Omit< diff --git a/packages/@uppy/webcam/src/Webcam.tsx b/packages/@uppy/webcam/src/Webcam.tsx index 9ee079037e..104ffaac9e 100644 --- a/packages/@uppy/webcam/src/Webcam.tsx +++ b/packages/@uppy/webcam/src/Webcam.tsx @@ -1,13 +1,14 @@ import { h, type ComponentChild } from 'preact' import { UIPlugin } from '@uppy/core' -import type { Uppy, UIPluginOptions } from '@uppy/core' -import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' import type { + Uppy, + UIPluginOptions, + DefinePluginOpts, Body, Meta, MinimalRequiredUppyFile, -} from '@uppy/utils/lib/UppyFile' +} from '@uppy/core' import type { PluginTarget } from '@uppy/core/lib/UIPlugin.js' import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension' import mimeTypes from '@uppy/utils/lib/mimeTypes' diff --git a/packages/@uppy/webdav/src/Webdav.tsx b/packages/@uppy/webdav/src/Webdav.tsx index 48a8b749fd..71c96b8e7d 100644 --- a/packages/@uppy/webdav/src/Webdav.tsx +++ b/packages/@uppy/webdav/src/Webdav.tsx @@ -1,12 +1,15 @@ import { h, type ComponentChild } from 'preact' import { useState, useCallback } from 'preact/hooks' -import { - UIPlugin, - type Body, - type Meta, - type UnknownProviderPlugin, - type UppyFile, +import { UIPlugin } from '@uppy/core' +import type { + Body, + Meta, + UnknownProviderPlugin, + UppyFile, + AsyncStore, + UnknownProviderPluginState, + Uppy, } from '@uppy/core' import { Provider, @@ -15,11 +18,6 @@ import { } from '@uppy/companion-client' import { SearchInput, ProviderViews } from '@uppy/provider-views' -import type { - AsyncStore, - UnknownProviderPluginState, - Uppy, -} from '@uppy/core/lib/Uppy.js' import type { I18n } from '@uppy/utils/lib/Translator' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/xhr-upload/src/index.ts b/packages/@uppy/xhr-upload/src/index.ts index d9f3fb9361..c219ab779a 100644 --- a/packages/@uppy/xhr-upload/src/index.ts +++ b/packages/@uppy/xhr-upload/src/index.ts @@ -1,5 +1,13 @@ -import BasePlugin from '@uppy/core/lib/BasePlugin.js' -import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js' +import { BasePlugin } from '@uppy/core' +import type { + State, + Uppy, + DefinePluginOpts, + PluginOpts, + Meta, + Body, + UppyFile, +} from '@uppy/core' import type { RequestClient } from '@uppy/companion-client' import EventManager from '@uppy/core/lib/EventManager.js' import { @@ -15,10 +23,6 @@ import { filterNonFailedFiles, filterFilesToEmitUploadStarted, } from '@uppy/utils/lib/fileFilters' -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore We don't want TS to generate types for the package.json -import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { State, Uppy } from '@uppy/core' import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/zoom/src/Zoom.tsx b/packages/@uppy/zoom/src/Zoom.tsx index 93e954b4fa..af326f7a08 100644 --- a/packages/@uppy/zoom/src/Zoom.tsx +++ b/packages/@uppy/zoom/src/Zoom.tsx @@ -8,12 +8,14 @@ import { UIPlugin, Uppy } from '@uppy/core' import { ProviderViews } from '@uppy/provider-views' import { h, type ComponentChild } from 'preact' -import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { + UppyFile, + Body, + Meta, AsyncStore, UnknownProviderPlugin, UnknownProviderPluginState, -} from '@uppy/core/lib/Uppy.js' +} from '@uppy/core' import locale from './locale.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/uppy/src/bundle.ts b/packages/uppy/src/bundle.ts index 2973473007..14aca4edaf 100644 --- a/packages/uppy/src/bundle.ts +++ b/packages/uppy/src/bundle.ts @@ -4,7 +4,7 @@ export { default as Uppy, debugLogger } from '@uppy/core' // Plugin base classes export { default as UIPlugin } from '@uppy/core/lib/UIPlugin.js' -export { default as BasePlugin } from '@uppy/core/lib/BasePlugin.js' +export { default as BasePlugin } from '@uppy/core' /** * @deprecated Use `Uppy` instead of `Core`