node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import StyleSheet from '../sheet';
import { ExecutionContext, RuleSet, Stringifier } from '../types';
/**
* ComponentStyle is all the CSS-specific stuff, not the React-specific stuff.
*/
export default class ComponentStyle {
baseHash: number;
baseStyle: ComponentStyle | null | undefined;
componentId: string;
isStatic: boolean;
rules: RuleSet<any>;
staticRulesId: string;
constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle | undefined);
generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier): string;
}

View File

@@ -0,0 +1,11 @@
import StyleSheet from '../sheet';
import { ExecutionContext, RuleSet, Stringifier } from '../types';
export default class GlobalStyle<Props extends object> {
componentId: string;
isStatic: boolean;
rules: RuleSet<Props>;
constructor(rules: RuleSet<Props>, componentId: string);
createStyles(instance: number, executionContext: ExecutionContext & Props, styleSheet: StyleSheet, stylis: Stringifier): void;
removeStyles(instance: number, styleSheet: StyleSheet): void;
renderStyles(instance: number, executionContext: ExecutionContext & Props, styleSheet: StyleSheet, stylis: Stringifier): void;
}

View File

@@ -0,0 +1,6 @@
import { IInlineStyleConstructor, StyleSheet } from '../types';
export declare const resetStyleCache: () => void;
/**
* InlineStyle takes arbitrary CSS and generates a flat object
*/
export default function makeInlineStyleClass<Props extends object>(styleSheet: StyleSheet): IInlineStyleConstructor<Props>;

View File

@@ -0,0 +1,10 @@
import StyleSheet from '../sheet';
import { Keyframes as KeyframesType, Stringifier } from '../types';
export default class Keyframes implements KeyframesType {
id: string;
name: string;
rules: string;
constructor(name: string, rules: string);
inject: (styleSheet: StyleSheet, stylisInstance?: Stringifier) => void;
getName(stylisInstance?: Stringifier): string;
}

View File

@@ -0,0 +1,16 @@
/// <reference types="node" />
import React from 'react';
import type * as streamInternal from 'stream';
import { Readable } from 'stream';
import StyleSheet from '../sheet';
export default class ServerStyleSheet {
instance: StyleSheet;
sealed: boolean;
constructor();
_emitSheetCSS: () => string;
collectStyles(children: any): React.JSX.Element;
getStyleTags: () => string;
getStyleElement: () => React.JSX.Element[];
interleaveWithNodeStream(input: Readable): streamInternal.Transform;
seal: () => void;
}

View File

@@ -0,0 +1,65 @@
import React from 'react';
import type stylis from 'stylis';
import StyleSheet from '../sheet';
import { InsertionTarget, ShouldForwardProp, Stringifier } from '../types';
export declare const mainSheet: StyleSheet;
export declare const mainStylis: Stringifier;
export type IStyleSheetContext = {
shouldForwardProp?: ShouldForwardProp<'web'> | undefined;
styleSheet: StyleSheet;
stylis: Stringifier;
};
export declare const StyleSheetContext: React.Context<IStyleSheetContext>;
export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>;
export type IStylisContext = Stringifier | void;
export declare const StylisContext: React.Context<IStylisContext>;
export declare const StylisConsumer: React.Consumer<IStylisContext>;
export declare function useStyleSheetContext(): IStyleSheetContext;
export type IStyleSheetManager = React.PropsWithChildren<{
/**
* If desired, you can pass this prop to disable "speedy" insertion mode, which
* uses the browser [CSSOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet).
* When disabled, rules are inserted as simple text into style blocks.
*/
disableCSSOMInjection?: undefined | boolean;
/**
* If you are working exclusively with modern browsers, vendor prefixes can often be omitted
* to reduce the weight of CSS on the page.
*/
enableVendorPrefixes?: undefined | boolean;
/**
* Provide an optional selector to be prepended to all generated style rules.
*/
namespace?: undefined | string;
/**
* Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.
*/
sheet?: undefined | StyleSheet;
/**
* Starting in v6, styled-components no longer does its own prop validation
* and recommends use of transient props "$prop" to pass style-only props to
* components. If for some reason you are not able to use transient props, a
* prop validation function can be provided via `StyleSheetManager`, such as
* `@emotion/is-prop-valid`.
*
* When the return value is `true`, props will be forwarded to the DOM/underlying
* component. If return value is `false`, the prop will be discarded after styles
* are calculated.
*
* Manually composing `styled.{element}.withConfig({shouldForwardProp})` will
* override this default.
*/
shouldForwardProp?: undefined | IStyleSheetContext['shouldForwardProp'];
/**
* An array of plugins to be run by stylis (style processor) during compilation.
* Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis).
*
* \* The plugin(s) must be compatible with stylis v4 or above.
*/
stylisPlugins?: undefined | stylis.Middleware[];
/**
* Provide an alternate DOM node to host generated styles; useful for iframes.
*/
target?: undefined | InsertionTarget;
}>;
export declare function StyleSheetManager(props: IStyleSheetManager): React.JSX.Element;

View File

@@ -0,0 +1,3 @@
import type { BaseObject, IStyledComponentFactory, RuleSet, StyledOptions, WebTarget } from '../types';
declare function createStyledComponent<Target extends WebTarget, OuterProps extends object, Statics extends object = BaseObject>(target: Target, options: StyledOptions<'web', OuterProps>, rules: RuleSet<OuterProps>): ReturnType<IStyledComponentFactory<'web', Target, OuterProps, Statics>>;
export default createStyledComponent;

View File

@@ -0,0 +1,3 @@
import type { BaseObject, ExecutionProps, IInlineStyleConstructor, IStyledComponentFactory, NativeTarget, RuleSet, StyledOptions } from '../types';
declare const _default: (InlineStyle: IInlineStyleConstructor<any>) => <Target extends NativeTarget, OuterProps extends ExecutionProps, Statics extends object = BaseObject>(target: Target, options: StyledOptions<'native', OuterProps>, rules: RuleSet<OuterProps>) => ReturnType<IStyledComponentFactory<'native', Target, OuterProps, Statics>>;
export default _default;

View File

@@ -0,0 +1,47 @@
import React from 'react';
type DefaultThemeAsObject<T = object> = Record<keyof T, any>;
/**
* Override DefaultTheme to get accurate typings for your project.
*
* ```
* // create styled-components.d.ts in your project source
* // if it isn't being picked up, check tsconfig compilerOptions.types
* import type { CSSProp } from "styled-components";
* import Theme from './theme';
*
* type ThemeType = typeof Theme;
*
* declare module "styled-components" {
* export interface DefaultTheme extends ThemeType {}
* }
*
* declare module "react" {
* interface DOMAttributes<T> {
* css?: CSSProp;
* }
* }
* ```
*/
export interface DefaultTheme extends DefaultThemeAsObject {
}
type ThemeFn = (outerTheme?: DefaultTheme | undefined) => DefaultTheme;
type ThemeArgument = DefaultTheme | ThemeFn;
type Props = {
children?: React.ReactNode;
theme: ThemeArgument;
};
export declare const ThemeContext: React.Context<DefaultTheme | undefined>;
export declare const ThemeConsumer: React.Consumer<DefaultTheme | undefined>;
/**
* Returns the current theme (as provided by the closest ancestor `ThemeProvider`.)
*
* If no `ThemeProvider` is found, the function will error. If you need access to the theme in an
* uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there
* is no `ThemeProvider` ancestor.
*/
export declare function useTheme(): DefaultTheme;
/**
* Provide a theme to an entire react component tree via context
*/
export default function ThemeProvider(props: Props): React.JSX.Element | null;
export {};