diff --git a/packages/@uppy/components/src/Dropzone.tsx b/packages/@uppy/components/src/Dropzone.tsx index 127d8f5ce..77a341820 100644 --- a/packages/@uppy/components/src/Dropzone.tsx +++ b/packages/@uppy/components/src/Dropzone.tsx @@ -1,5 +1,5 @@ -import { clsx } from 'clsx' import { useMemo } from '@uppy/utils/preact/hooks' +import { clsx } from 'clsx' import { createDropzone } from './hooks/dropzone.js' import type { NonNullableUppyContext, UppyContext } from './types.js' diff --git a/packages/@uppy/components/src/FilesGrid.tsx b/packages/@uppy/components/src/FilesGrid.tsx index 41b26fd5b..737501128 100644 --- a/packages/@uppy/components/src/FilesGrid.tsx +++ b/packages/@uppy/components/src/FilesGrid.tsx @@ -1,7 +1,7 @@ import type { Body, Meta, UppyEventMap, UppyFile } from '@uppy/core' -import { clsx } from 'clsx' import { Fragment } from '@uppy/utils/preact' import { useEffect, useState } from '@uppy/utils/preact/hooks' +import { clsx } from 'clsx' import prettyBytes from 'pretty-bytes' import { Thumbnail } from './index.js' import type { UppyContext } from './types.js' diff --git a/packages/@uppy/components/src/FilesList.tsx b/packages/@uppy/components/src/FilesList.tsx index 79a62dc98..7bb068d1b 100644 --- a/packages/@uppy/components/src/FilesList.tsx +++ b/packages/@uppy/components/src/FilesList.tsx @@ -1,7 +1,7 @@ import type { Body, Meta, UppyEventMap, UppyFile } from '@uppy/core' -import { clsx } from 'clsx' import { Fragment } from '@uppy/utils/preact' import { useEffect, useState } from '@uppy/utils/preact/hooks' +import { clsx } from 'clsx' import prettyBytes from 'pretty-bytes' import { Thumbnail, type UppyContext } from './index.js' diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts index 108f9540b..3c4c07491 100644 --- a/packages/@uppy/core/src/Uppy.ts +++ b/packages/@uppy/core/src/Uppy.ts @@ -24,11 +24,11 @@ import { getSafeFileId, Translator, } from '@uppy/utils' +import type { h } from '@uppy/utils/preact' import throttle from 'lodash/throttle.js' // @ts-ignore untyped import ee from 'namespace-emitter' import { nanoid } from 'nanoid/non-secure' -import type { h } from '@uppy/utils/preact' import packageJson from '../package.json' with { type: 'json' } import type BasePlugin from './BasePlugin.js' import getFileName from './getFileName.js' diff --git a/packages/@uppy/dashboard/src/Dashboard.tsx b/packages/@uppy/dashboard/src/Dashboard.tsx index b8fb75cd0..ca3f1130e 100644 --- a/packages/@uppy/dashboard/src/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/Dashboard.tsx @@ -14,8 +14,8 @@ import { defaultPickerIcon } from '@uppy/provider-views' import ThumbnailGenerator from '@uppy/thumbnail-generator' import type { LocaleStrings } from '@uppy/utils' import { findAllDOMElements, getDroppedFiles, toArray } from '@uppy/utils' -import { nanoid } from 'nanoid/non-secure' import type { ComponentChild, h, VNode } from '@uppy/utils/preact' +import { nanoid } from 'nanoid/non-secure' import packageJson from '../package.json' with { type: 'json' } import DashboardUI from './components/Dashboard.js' import locale from './locale.js' diff --git a/packages/@uppy/dashboard/src/components/AddFiles.tsx b/packages/@uppy/dashboard/src/components/AddFiles.tsx index 0fc8fb5cd..1ecfee85f 100644 --- a/packages/@uppy/dashboard/src/components/AddFiles.tsx +++ b/packages/@uppy/dashboard/src/components/AddFiles.tsx @@ -1,5 +1,10 @@ import type { I18n, Translator } from '@uppy/utils' -import { Component, type ComponentChild, Fragment, type h } from '@uppy/utils/preact' +import { + Component, + type ComponentChild, + Fragment, + type h, +} from '@uppy/utils/preact' import type { DashboardState, TargetWithRender } from '../Dashboard.js' interface AddFilesProps { diff --git a/packages/@uppy/dashboard/src/components/Dashboard.tsx b/packages/@uppy/dashboard/src/components/Dashboard.tsx index 360a7171c..c7badfa4d 100644 --- a/packages/@uppy/dashboard/src/components/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/components/Dashboard.tsx @@ -9,8 +9,8 @@ import type { } from '@uppy/core' import type { I18n, Translator } from '@uppy/utils' import { isDragDropSupported } from '@uppy/utils' -import classNames from 'classnames' import type { h } from '@uppy/utils/preact' +import classNames from 'classnames' import type { DashboardState, TargetWithRender } from '../Dashboard.js' import AddFiles from './AddFiles.js' import AddFilesPanel from './AddFilesPanel.js' diff --git a/packages/@uppy/dashboard/src/components/FileCard/index.tsx b/packages/@uppy/dashboard/src/components/FileCard/index.tsx index 9889bf5b9..0a619a3b2 100644 --- a/packages/@uppy/dashboard/src/components/FileCard/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileCard/index.tsx @@ -1,6 +1,11 @@ +import { + useCallback, + useEffect, + useRef, + useState, +} from '@uppy/utils/preact/hooks' import classNames from 'classnames' import { nanoid } from 'nanoid/non-secure' -import { useCallback, useEffect, useRef, useState } from '@uppy/utils/preact/hooks' import getFileTypeIcon from '../../utils/getFileTypeIcon.js' import ignoreEvent from '../../utils/ignoreEvent.js' import FilePreview from '../FilePreview.js' diff --git a/packages/@uppy/dashboard/src/components/FileItem/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/index.tsx index abbb94d9b..292e37046 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/index.tsx @@ -1,9 +1,9 @@ import type Uppy from '@uppy/core' import type { Body, Meta, State, UppyFile } from '@uppy/core' import type { I18n } from '@uppy/utils' -import classNames from 'classnames' // biome-ignore lint/style/useImportType: h is not a type import { Component, type ComponentChild, h } from '@uppy/utils/preact' +import classNames from 'classnames' import { shallowEqualObjects } from 'shallow-equal' import type { DashboardState } from '../../Dashboard.js' import Buttons from './Buttons/index.js' diff --git a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx index 33e998634..d9bdbf522 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx +++ b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx @@ -1,5 +1,5 @@ -import classNames from 'classnames' import { useRef } from '@uppy/utils/preact/hooks' +import classNames from 'classnames' import ignoreEvent from '../utils/ignoreEvent.js' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/components/Slide.tsx b/packages/@uppy/dashboard/src/components/Slide.tsx index f3590bedf..d08dbc554 100644 --- a/packages/@uppy/dashboard/src/components/Slide.tsx +++ b/packages/@uppy/dashboard/src/components/Slide.tsx @@ -1,11 +1,16 @@ -import classNames from 'classnames' import { type ComponentChildren, cloneElement, toChildArray, type VNode, } from '@uppy/utils/preact' -import { useCallback, useEffect, useRef, useState } from '@uppy/utils/preact/hooks' +import { + useCallback, + useEffect, + useRef, + useState, +} from '@uppy/utils/preact/hooks' +import classNames from 'classnames' const transitionName = 'uppy-transition-slideDownUp' const duration = 250 diff --git a/packages/@uppy/provider-views/src/FooterActions.tsx b/packages/@uppy/provider-views/src/FooterActions.tsx index 214c27cca..17dc81bc0 100644 --- a/packages/@uppy/provider-views/src/FooterActions.tsx +++ b/packages/@uppy/provider-views/src/FooterActions.tsx @@ -1,7 +1,7 @@ import type { Body, Meta, PartialTree } from '@uppy/core' import type { I18n } from '@uppy/utils' -import classNames from 'classnames' import { useMemo } from '@uppy/utils/preact/hooks' +import classNames from 'classnames' import type ProviderView from './ProviderView/ProviderView.js' import getNumberOfSelectedFiles from './utils/PartialTreeUtils/getNumberOfSelectedFiles.js' diff --git a/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx b/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx index 1f72a08ed..5a1fb0c20 100644 --- a/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx +++ b/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx @@ -1,6 +1,11 @@ import type { AsyncStore, Uppy } from '@uppy/core' import type { I18n } from '@uppy/utils' -import { useCallback, useEffect, useRef, useState } from '@uppy/utils/preact/hooks' +import { + useCallback, + useEffect, + useRef, + useState, +} from '@uppy/utils/preact/hooks' import AuthView from '../ProviderView/AuthView.js' import { authorize, diff --git a/packages/@uppy/provider-views/src/Item/index.tsx b/packages/@uppy/provider-views/src/Item/index.tsx index 34735f80e..0ff2f90f4 100644 --- a/packages/@uppy/provider-views/src/Item/index.tsx +++ b/packages/@uppy/provider-views/src/Item/index.tsx @@ -4,8 +4,8 @@ import type { PartialTreeId, } from '@uppy/core' import type { I18n } from '@uppy/utils' -import classNames from 'classnames' import type { h } from '@uppy/utils/preact' +import classNames from 'classnames' import GridItem from './components/GridItem.js' import ListItem from './components/ListItem.js' diff --git a/packages/@uppy/provider-views/src/ProviderView/Header.tsx b/packages/@uppy/provider-views/src/ProviderView/Header.tsx index 89921570d..5f8772a98 100644 --- a/packages/@uppy/provider-views/src/ProviderView/Header.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/Header.tsx @@ -1,7 +1,7 @@ import type { Body, Meta, PartialTreeFolder } from '@uppy/core' import type { I18n } from '@uppy/utils' -import classNames from 'classnames' import type { h } from '@uppy/utils/preact' +import classNames from 'classnames' import Breadcrumbs from '../Breadcrumbs.js' import type ProviderView from './ProviderView.js' import User from './User.js' diff --git a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx index e765d5e21..5e206b4fc 100644 --- a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx @@ -12,9 +12,9 @@ import type { } from '@uppy/core' import type { CompanionFile, I18n } from '@uppy/utils' import { remoteFileObjToLocal } from '@uppy/utils' +import type { h } from '@uppy/utils/preact' import classNames from 'classnames' import debounce from 'lodash/debounce.js' -import type { h } from '@uppy/utils/preact' import packageJson from '../../package.json' with { type: 'json' } import Browser from '../Browser.js' import FilterInput from '../FilterInput.js' diff --git a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx index c7de50ce7..8fd4412ee 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx +++ b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx @@ -12,8 +12,8 @@ import type { } from '@uppy/core' import type { CompanionFile } from '@uppy/utils' import { remoteFileObjToLocal } from '@uppy/utils' -import classNames from 'classnames' import type { h } from '@uppy/utils/preact' +import classNames from 'classnames' import packageJson from '../../package.json' with { type: 'json' } import Browser from '../Browser.js' import FilterInput from '../FilterInput.js' diff --git a/packages/@uppy/provider-views/src/useSearchForm.ts b/packages/@uppy/provider-views/src/useSearchForm.ts index cc643b315..2fd036d92 100644 --- a/packages/@uppy/provider-views/src/useSearchForm.ts +++ b/packages/@uppy/provider-views/src/useSearchForm.ts @@ -1,5 +1,5 @@ -import { nanoid } from 'nanoid/non-secure' import { useCallback, useEffect, useState } from '@uppy/utils/preact/hooks' +import { nanoid } from 'nanoid/non-secure' /** * Hook to create a form element outside the component tree to avoid nested forms. diff --git a/packages/@uppy/url/src/UrlUI.tsx b/packages/@uppy/url/src/UrlUI.tsx index 12ba5dc4b..8a4aebd2d 100644 --- a/packages/@uppy/url/src/UrlUI.tsx +++ b/packages/@uppy/url/src/UrlUI.tsx @@ -1,6 +1,6 @@ import type { I18n } from '@uppy/utils' -import { nanoid } from 'nanoid/non-secure' import { Component, type ComponentChild } from '@uppy/utils/preact' +import { nanoid } from 'nanoid/non-secure' type UrlUIProps = { i18n: I18n diff --git a/packages/@uppy/utils/src/preact/hooks.ts b/packages/@uppy/utils/src/preact/hooks.ts index 1a9d8d6cd..928a269ff 100644 --- a/packages/@uppy/utils/src/preact/hooks.ts +++ b/packages/@uppy/utils/src/preact/hooks.ts @@ -1,2 +1 @@ export * from 'preact/hooks' - diff --git a/packages/@uppy/utils/src/preact/index.ts b/packages/@uppy/utils/src/preact/index.ts index 5b435dc10..95ebf48aa 100644 --- a/packages/@uppy/utils/src/preact/index.ts +++ b/packages/@uppy/utils/src/preact/index.ts @@ -1,2 +1 @@ export * from 'preact' - diff --git a/packages/@uppy/webcam/src/CameraScreen.tsx b/packages/@uppy/webcam/src/CameraScreen.tsx index ce2bd87e8..826a6de55 100644 --- a/packages/@uppy/webcam/src/CameraScreen.tsx +++ b/packages/@uppy/webcam/src/CameraScreen.tsx @@ -1,5 +1,9 @@ import type { I18n } from '@uppy/utils' -import { Component, type ComponentChild, type ComponentProps } from '@uppy/utils/preact' +import { + Component, + type ComponentChild, + type ComponentProps, +} from '@uppy/utils/preact' import DiscardButton from './DiscardButton.js' import RecordButton from './RecordButton.js' import RecordingLength from './RecordingLength.js' diff --git a/packages/@uppy/webcam/src/Webcam.tsx b/packages/@uppy/webcam/src/Webcam.tsx index e9c284f5d..7d3139808 100644 --- a/packages/@uppy/webcam/src/Webcam.tsx +++ b/packages/@uppy/webcam/src/Webcam.tsx @@ -10,9 +10,9 @@ import type { import { UIPlugin } from '@uppy/core' import type { LocaleStrings, LocalUppyFileNonGhost } from '@uppy/utils' import { canvasToBlob, getFileTypeExtension, mimeTypes } from '@uppy/utils' -import { isMobile } from 'is-mobile' // biome-ignore lint/style/useImportType: h is not a type import { type ComponentChild, h } from '@uppy/utils/preact' +import { isMobile } from 'is-mobile' import packageJson from '../package.json' with { type: 'json' } import CameraIcon from './CameraIcon.js' import CameraScreen from './CameraScreen.js'