Add moduleSuffixes to tsconfig (#11146)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import {type ComposerImage} from '#/state/gallery'
|
||||
import type * as Dialog from '#/components/Dialog'
|
||||
|
||||
export type EditImageDialogProps = {
|
||||
control: Dialog.DialogOuterProps['control']
|
||||
image?: ComposerImage
|
||||
onChange: (next: ComposerImage) => void
|
||||
aspectRatio?: number
|
||||
circularCrop?: boolean
|
||||
}
|
||||
@@ -1,13 +1,6 @@
|
||||
import {type ComposerImage} from '#/state/gallery'
|
||||
import type * as Dialog from '#/components/Dialog'
|
||||
import {type EditImageDialogProps} from './EditImageDialog.shared'
|
||||
|
||||
export type EditImageDialogProps = {
|
||||
control: Dialog.DialogOuterProps['control']
|
||||
image?: ComposerImage
|
||||
onChange: (next: ComposerImage) => void
|
||||
aspectRatio?: number
|
||||
circularCrop?: boolean
|
||||
}
|
||||
export type {EditImageDialogProps} from './EditImageDialog.shared'
|
||||
|
||||
export const EditImageDialog = ({}: EditImageDialogProps): React.ReactNode => {
|
||||
return null
|
||||
|
||||
@@ -16,7 +16,7 @@ import {atoms as a, useTheme} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
import * as Dialog from '#/components/Dialog'
|
||||
import {Loader} from '#/components/Loader'
|
||||
import {type EditImageDialogProps} from './EditImageDialog'
|
||||
import {type EditImageDialogProps} from './EditImageDialog.shared'
|
||||
|
||||
export function EditImageDialog(props: EditImageDialogProps) {
|
||||
return (
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import {type ComposerImage} from '#/state/gallery'
|
||||
|
||||
export type OpenCameraBtnProps = {
|
||||
disabled?: boolean
|
||||
onAdd: (next: ComposerImage[]) => void
|
||||
}
|
||||
@@ -6,18 +6,14 @@ import {useLingui} from '@lingui/react'
|
||||
import {useCameraPermission} from '#/lib/hooks/usePermissions'
|
||||
import {openCamera} from '#/lib/media/picker'
|
||||
import {logger} from '#/logger'
|
||||
import {type ComposerImage, createComposerImage} from '#/state/gallery'
|
||||
import {createComposerImage} from '#/state/gallery'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {Button} from '#/components/Button'
|
||||
import {Camera_Stroke2_Corner0_Rounded as Camera} from '#/components/icons/Camera'
|
||||
import {IS_NATIVE, IS_WEB_MOBILE} from '#/env'
|
||||
import {type OpenCameraBtnProps} from './OpenCameraBtn.shared'
|
||||
|
||||
type Props = {
|
||||
disabled?: boolean
|
||||
onAdd: (next: ComposerImage[]) => void
|
||||
}
|
||||
|
||||
export function OpenCameraBtn({disabled, onAdd}: Props) {
|
||||
export function OpenCameraBtn({disabled, onAdd}: OpenCameraBtnProps) {
|
||||
const {_} = useLingui()
|
||||
const {requestCameraAccessIfNeeded} = useCameraPermission()
|
||||
const [mediaPermissionRes, requestMediaPermission] =
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export function OpenCameraBtn() {
|
||||
import {type OpenCameraBtnProps} from './OpenCameraBtn.shared'
|
||||
|
||||
export function OpenCameraBtn(_props: OpenCameraBtnProps) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export function SubtitleFilePicker() {
|
||||
import {type SubtitleFilePickerProps} from './SubtitleFilePicker.shared'
|
||||
|
||||
export function SubtitleFilePicker(_props: SubtitleFilePickerProps): never {
|
||||
throw new Error('SubtitleFilePicker is a web-only component')
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export type SubtitleFilePickerProps = {
|
||||
onSelectFile: (file: File) => void
|
||||
disabled?: boolean
|
||||
}
|
||||
@@ -9,14 +9,12 @@ import {atoms as a} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
import {CC_Stroke2_Corner0_Rounded as CCIcon} from '#/components/icons/CC'
|
||||
import * as Toast from '#/components/Toast'
|
||||
import {type SubtitleFilePickerProps} from './SubtitleFilePicker.shared'
|
||||
|
||||
export function SubtitleFilePicker({
|
||||
onSelectFile,
|
||||
disabled,
|
||||
}: {
|
||||
onSelectFile: (file: File) => void
|
||||
disabled?: boolean
|
||||
}) {
|
||||
}: SubtitleFilePickerProps) {
|
||||
const {_} = useLingui()
|
||||
const ref = useRef<HTMLInputElement>(null)
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import {type QueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {atoms as a, flatten} from '#/alf'
|
||||
|
||||
export function clearThumbnailCache() {
|
||||
export function clearThumbnailCache(_queryClient: QueryClient) {
|
||||
// no-op on web
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user