paradiego
This commit is contained in:
3
node_modules/@emotion/react/dist/declarations/src/_isolated-hnrs.d.ts
generated
vendored
Normal file
3
node_modules/@emotion/react/dist/declarations/src/_isolated-hnrs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// this entry point is not publicly available so we don't need to expose any types here
|
||||
// we need to define a definition file for each entrypoint though, otherwise Preconstruct might get confused
|
||||
export {}
|
||||
1
node_modules/@emotion/react/dist/declarations/src/index.d.ts
generated
vendored
Normal file
1
node_modules/@emotion/react/dist/declarations/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../types/index.js"
|
||||
1
node_modules/@emotion/react/dist/declarations/src/jsx-dev-runtime.d.ts
generated
vendored
Normal file
1
node_modules/@emotion/react/dist/declarations/src/jsx-dev-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../types/jsx-dev-runtime.js"
|
||||
1
node_modules/@emotion/react/dist/declarations/src/jsx-runtime.d.ts
generated
vendored
Normal file
1
node_modules/@emotion/react/dist/declarations/src/jsx-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../types/jsx-runtime.js"
|
||||
14
node_modules/@emotion/react/dist/declarations/types/helper.d.ts
generated
vendored
Normal file
14
node_modules/@emotion/react/dist/declarations/types/helper.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ReactJSX } from "./jsx-namespace.js"
|
||||
|
||||
/**
|
||||
* @desc Utility type for getting props type of React component.
|
||||
* It takes `defaultProps` into an account - making props with defaults optional.
|
||||
*/
|
||||
export type PropsOf<
|
||||
C extends keyof ReactJSX.IntrinsicElements | React.JSXElementConstructor<any>
|
||||
> = ReactJSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
|
||||
|
||||
// We need to use this version of Omit as it's distributive (Will preserve unions)
|
||||
export type DistributiveOmit<T, U> = T extends any
|
||||
? Pick<T, Exclude<keyof T, U>>
|
||||
: never
|
||||
115
node_modules/@emotion/react/dist/declarations/types/index.d.ts
generated
vendored
Normal file
115
node_modules/@emotion/react/dist/declarations/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
|
||||
// TypeScript Version: 3.4
|
||||
|
||||
import { EmotionCache } from '@emotion/cache'
|
||||
import {
|
||||
ArrayInterpolation,
|
||||
ComponentSelector,
|
||||
CSSInterpolation,
|
||||
CSSObject,
|
||||
FunctionInterpolation,
|
||||
Interpolation,
|
||||
Keyframes,
|
||||
SerializedStyles
|
||||
} from '@emotion/serialize'
|
||||
import {
|
||||
ClassAttributes,
|
||||
Context,
|
||||
Provider,
|
||||
FC,
|
||||
ReactElement,
|
||||
ReactNode,
|
||||
Ref,
|
||||
createElement
|
||||
} from 'react'
|
||||
import { EmotionJSX } from "./jsx-namespace.js"
|
||||
|
||||
export {
|
||||
ArrayInterpolation,
|
||||
ComponentSelector,
|
||||
CSSObject,
|
||||
EmotionCache,
|
||||
FunctionInterpolation,
|
||||
Interpolation,
|
||||
Keyframes,
|
||||
SerializedStyles
|
||||
}
|
||||
|
||||
export * from "./theming.js"
|
||||
export * from "./helper.js"
|
||||
|
||||
// tslint:disable-next-line: no-empty-interface
|
||||
export interface Theme {}
|
||||
|
||||
export const ThemeContext: Context<object>
|
||||
export const CacheProvider: Provider<EmotionCache>
|
||||
export function withEmotionCache<Props, RefType = any>(
|
||||
func: (props: Props, context: EmotionCache, ref: Ref<RefType>) => ReactNode
|
||||
): FC<Props & ClassAttributes<RefType>>
|
||||
|
||||
export function css(
|
||||
template: TemplateStringsArray,
|
||||
...args: Array<CSSInterpolation>
|
||||
): SerializedStyles
|
||||
export function css(...args: Array<CSSInterpolation>): SerializedStyles
|
||||
|
||||
export interface GlobalProps {
|
||||
styles: Interpolation<Theme>
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc
|
||||
* JSX generic are supported only after TS@2.9
|
||||
*/
|
||||
export function Global(props: GlobalProps): ReactElement
|
||||
|
||||
export function keyframes(
|
||||
template: TemplateStringsArray,
|
||||
...args: Array<CSSInterpolation>
|
||||
): Keyframes
|
||||
export function keyframes(...args: Array<CSSInterpolation>): Keyframes
|
||||
|
||||
export interface ArrayClassNamesArg extends Array<ClassNamesArg> {}
|
||||
export type ClassNamesArg =
|
||||
| undefined
|
||||
| null
|
||||
| string
|
||||
| boolean
|
||||
| { [className: string]: boolean | null | undefined }
|
||||
| ArrayClassNamesArg
|
||||
|
||||
export interface ClassNamesContent {
|
||||
css(template: TemplateStringsArray, ...args: Array<CSSInterpolation>): string
|
||||
css(...args: Array<CSSInterpolation>): string
|
||||
cx(...args: Array<ClassNamesArg>): string
|
||||
theme: Theme
|
||||
}
|
||||
export interface ClassNamesProps {
|
||||
children(content: ClassNamesContent): ReactNode
|
||||
}
|
||||
/**
|
||||
* @desc
|
||||
* JSX generic are supported only after TS@2.9
|
||||
*/
|
||||
export function ClassNames(props: ClassNamesProps): ReactElement
|
||||
|
||||
export const jsx: typeof createElement
|
||||
export namespace jsx {
|
||||
namespace JSX {
|
||||
type ElementType = EmotionJSX.ElementType
|
||||
interface Element extends EmotionJSX.Element {}
|
||||
interface ElementClass extends EmotionJSX.ElementClass {}
|
||||
interface ElementAttributesProperty
|
||||
extends EmotionJSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute
|
||||
extends EmotionJSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = EmotionJSX.LibraryManagedAttributes<
|
||||
C,
|
||||
P
|
||||
>
|
||||
interface IntrinsicAttributes extends EmotionJSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T>
|
||||
extends EmotionJSX.IntrinsicClassAttributes<T> {}
|
||||
type IntrinsicElements = EmotionJSX.IntrinsicElements
|
||||
}
|
||||
}
|
||||
1
node_modules/@emotion/react/dist/declarations/types/jsx-dev-runtime.d.ts
generated
vendored
Normal file
1
node_modules/@emotion/react/dist/declarations/types/jsx-dev-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { EmotionJSX as JSX } from "./jsx-namespace.js"
|
||||
102
node_modules/@emotion/react/dist/declarations/types/jsx-namespace.d.ts
generated
vendored
Normal file
102
node_modules/@emotion/react/dist/declarations/types/jsx-namespace.d.ts
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
import 'react'
|
||||
import { Interpolation } from '@emotion/serialize'
|
||||
import { Theme } from '@emotion/react'
|
||||
|
||||
type IsPreReact19 = 2 extends Parameters<React.FunctionComponent<any>>['length']
|
||||
? true
|
||||
: false
|
||||
|
||||
type WithConditionalCSSProp<P> = 'className' extends keyof P
|
||||
? string extends P['className' & keyof P]
|
||||
? { css?: Interpolation<Theme> }
|
||||
: {}
|
||||
: {}
|
||||
|
||||
// unpack all here to avoid infinite self-referencing when defining our own JSX namespace for the pre-React 19 case
|
||||
type ReactJSXElement = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.Element
|
||||
: /** @ts-ignore */
|
||||
React.JSX.Element
|
||||
type ReactJSXElementClass = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.ElementClass
|
||||
: /** @ts-ignore */
|
||||
React.JSX.ElementClass
|
||||
type ReactJSXElementAttributesProperty = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.ElementAttributesProperty
|
||||
: /** @ts-ignore */
|
||||
React.JSX.ElementAttributesProperty
|
||||
type ReactJSXElementChildrenAttribute = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.ElementChildrenAttribute
|
||||
: /** @ts-ignore */
|
||||
React.JSX.ElementChildrenAttribute
|
||||
type ReactJSXLibraryManagedAttributes<C, P> = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.LibraryManagedAttributes<C, P>
|
||||
: /** @ts-ignore */
|
||||
React.JSX.LibraryManagedAttributes<C, P>
|
||||
type ReactJSXIntrinsicAttributes = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.IntrinsicAttributes
|
||||
: /** @ts-ignore */
|
||||
React.JSX.IntrinsicAttributes
|
||||
type ReactJSXIntrinsicClassAttributes<T> = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.IntrinsicClassAttributes<T>
|
||||
: /** @ts-ignore */
|
||||
React.JSX.IntrinsicClassAttributes<T>
|
||||
type ReactJSXIntrinsicElements = true extends IsPreReact19
|
||||
? /** @ts-ignore */
|
||||
JSX.IntrinsicElements
|
||||
: /** @ts-ignore */
|
||||
React.JSX.IntrinsicElements
|
||||
|
||||
type ReactJSXElementType = true extends IsPreReact19
|
||||
? // based on the code from @types/react@18.2.8
|
||||
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/3197efc097d522c4bf02b94e1a0766d007d6cdeb/types/react/index.d.ts#LL3204C13-L3204C13
|
||||
string | React.JSXElementConstructor<any>
|
||||
: /** @ts-ignore */
|
||||
React.JSX.ElementType
|
||||
|
||||
export namespace ReactJSX {
|
||||
type ElementType = ReactJSXElementType
|
||||
interface Element extends ReactJSXElement {}
|
||||
interface ElementClass extends ReactJSXElementClass {}
|
||||
interface ElementAttributesProperty
|
||||
extends ReactJSXElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {}
|
||||
|
||||
type LibraryManagedAttributes<C, P> = ReactJSXLibraryManagedAttributes<C, P>
|
||||
|
||||
interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T>
|
||||
extends ReactJSXIntrinsicClassAttributes<T> {}
|
||||
|
||||
type IntrinsicElements = ReactJSXIntrinsicElements
|
||||
}
|
||||
|
||||
export namespace EmotionJSX {
|
||||
type ElementType = ReactJSXElementType
|
||||
interface Element extends ReactJSXElement {}
|
||||
interface ElementClass extends ReactJSXElementClass {}
|
||||
interface ElementAttributesProperty
|
||||
extends ReactJSXElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {}
|
||||
|
||||
type LibraryManagedAttributes<C, P> = P extends unknown
|
||||
? WithConditionalCSSProp<P> & ReactJSXLibraryManagedAttributes<C, P>
|
||||
: never
|
||||
|
||||
interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T>
|
||||
extends ReactJSXIntrinsicClassAttributes<T> {}
|
||||
|
||||
type IntrinsicElements = {
|
||||
[K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & {
|
||||
css?: Interpolation<Theme>
|
||||
}
|
||||
}
|
||||
}
|
||||
1
node_modules/@emotion/react/dist/declarations/types/jsx-runtime.d.ts
generated
vendored
Normal file
1
node_modules/@emotion/react/dist/declarations/types/jsx-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { EmotionJSX as JSX } from "./jsx-namespace.js"
|
||||
31
node_modules/@emotion/react/dist/declarations/types/theming.d.ts
generated
vendored
Normal file
31
node_modules/@emotion/react/dist/declarations/types/theming.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
import * as React from 'react'
|
||||
import { Theme } from '@emotion/react'
|
||||
import { DistributiveOmit, PropsOf } from "./helper.js"
|
||||
|
||||
export interface ThemeProviderProps {
|
||||
theme: Partial<Theme> | ((outerTheme: Theme) => Theme)
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export interface ThemeProvider {
|
||||
(props: ThemeProviderProps): React.ReactElement
|
||||
}
|
||||
|
||||
export type withTheme = <
|
||||
C extends React.ComponentType<React.ComponentProps<C>>
|
||||
>(
|
||||
component: C
|
||||
) => React.FC<DistributiveOmit<PropsOf<C>, 'theme'> & { theme?: Theme }>
|
||||
|
||||
export function useTheme(): Theme
|
||||
|
||||
export const ThemeProvider: ThemeProvider
|
||||
|
||||
export const withTheme: withTheme
|
||||
|
||||
export type WithTheme<P, T> = P extends { theme: infer Theme }
|
||||
? P & { theme: Exclude<Theme, undefined> }
|
||||
: P & { theme: T }
|
||||
Reference in New Issue
Block a user