mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
merge main
This commit is contained in:
13
web/types/jsx.d.ts
vendored
Normal file
13
web/types/jsx.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// TypeScript type definitions for custom JSX elements
|
||||
// Custom JSX elements for emoji-mart web components
|
||||
|
||||
import 'react'
|
||||
|
||||
declare module 'react' {
|
||||
namespace JSX {
|
||||
// eslint-disable-next-line ts/consistent-type-definitions
|
||||
interface IntrinsicElements {
|
||||
'em-emoji': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
|
||||
}
|
||||
}
|
||||
}
|
||||
36
web/types/lamejs.d.ts
vendored
Normal file
36
web/types/lamejs.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
declare module 'lamejs' {
|
||||
export class Mp3Encoder {
|
||||
constructor(channels: number, sampleRate: number, bitRate: number)
|
||||
encodeBuffer(left: Int16Array, right?: Int16Array | null): Int8Array
|
||||
flush(): Int8Array
|
||||
}
|
||||
|
||||
export class WavHeader {
|
||||
static readHeader(data: DataView): {
|
||||
channels: number
|
||||
sampleRate: number
|
||||
}
|
||||
}
|
||||
|
||||
const lamejs: {
|
||||
Mp3Encoder: typeof Mp3Encoder
|
||||
WavHeader: typeof WavHeader
|
||||
}
|
||||
|
||||
export default lamejs
|
||||
}
|
||||
|
||||
declare module 'lamejs/src/js/MPEGMode' {
|
||||
const MPEGMode: any
|
||||
export default MPEGMode
|
||||
}
|
||||
|
||||
declare module 'lamejs/src/js/Lame' {
|
||||
const Lame: any
|
||||
export default Lame
|
||||
}
|
||||
|
||||
declare module 'lamejs/src/js/BitStream' {
|
||||
const BitStream: any
|
||||
export default BitStream
|
||||
}
|
||||
4
web/types/mdx.d.ts
vendored
Normal file
4
web/types/mdx.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module '*.mdx' {
|
||||
const MDXComponent: (props?: Record<string, unknown>) => JSX.Element
|
||||
export default MDXComponent
|
||||
}
|
||||
23
web/types/react-18-input-autosize.d.ts
vendored
Normal file
23
web/types/react-18-input-autosize.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
declare module 'react-18-input-autosize' {
|
||||
import type { CSSProperties, ChangeEvent, FocusEvent, KeyboardEvent } from 'react'
|
||||
|
||||
export type AutosizeInputProps = {
|
||||
value?: string | number
|
||||
defaultValue?: string | number
|
||||
onChange?: (event: ChangeEvent<HTMLInputElement>) => void
|
||||
onFocus?: (event: FocusEvent<HTMLInputElement>) => void
|
||||
onBlur?: (event: FocusEvent<HTMLInputElement>) => void
|
||||
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void
|
||||
placeholder?: string
|
||||
className?: string
|
||||
inputClassName?: string
|
||||
style?: CSSProperties
|
||||
inputStyle?: CSSProperties
|
||||
minWidth?: number | string
|
||||
maxWidth?: number | string
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
const AutosizeInput: React.FC<AutosizeInputProps>
|
||||
export default AutosizeInput
|
||||
}
|
||||
Reference in New Issue
Block a user