This commit is contained in:
Murderlon 2026-03-03 12:19:45 +01:00
parent fa8d7641e0
commit bf03e87913
No known key found for this signature in database
23 changed files with 46 additions and 24 deletions

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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 {

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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'

View file

@ -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,

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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.

View file

@ -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

View file

@ -1,2 +1 @@
export * from 'preact/hooks'

View file

@ -1,2 +1 @@
export * from 'preact'

View file

@ -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'

View file

@ -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'