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

21
server/node_modules/styled-components/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-present Glen Maddern and Maximilian Stoiber
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

187
server/node_modules/styled-components/README.md generated vendored Normal file
View File

@@ -0,0 +1,187 @@
<div align="center">
<a href="https://www.styled-components.com">
<img alt="styled-components" src="https://raw.githubusercontent.com/styled-components/brand/master/styled-components.png" height="150px" />
</a>
</div>
<br />
<div align="center">
<strong>Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅</strong>
<br />
<br />
<a href="https://www.npmjs.com/package/styled-components"><img src="https://www.styled-components.com/proxy/downloads.svg" alt="downloads: 600k/month"></a>
<a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/styled-components/backers/badge.svg" /></a> <a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/styled-components/sponsors/badge.svg" /></a> <a href="https://discord.gg/hfGUrbrxaU">
<img alt="Discord" src="https://img.shields.io/discord/818449605409767454?logo=discord" /></a>
<a href="https://bundlephobia.com/result?p=styled-components" title="styled-components latest minified+gzip size"><img src="https://badgen.net/bundlephobia/minzip/styled-components" alt="gzip size"></a>
<a href="#alternative-installation-methods"><img src="https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg" alt="module formats: umd, cjs, esm"></a>
<a href="https://codecov.io/gh/styled-components/styled-components"><img src="https://codecov.io/gh/styled-components/styled-components/coverage.svg?branch=main" alt="Code Coverage"></a>
</div>
---
**Upgrading from v5?** See the [migration guide](https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6).
Utilizing [tagged template literals](https://www.styled-components.com/docs/advanced#tagged-template-literals) (a recent addition to JavaScript) and the [power of CSS](https://www.styled-components.com/docs/api#supported-css), `styled-components` allow you to write actual CSS code to style your components. It also removes the mapping between components and styles using components as a low-level styling construct could not be easier!
```jsx
const Button = styled.button`
color: grey;
`;
```
Alternatively, you may use [style objects](https://www.styled-components.com/docs/advanced#style-objects). This allows for easy porting of CSS from inline styles, while still supporting the more advanced styled-components capabilities like component selectors and media queries.
```jsx
const Button = styled.button({
color: 'grey',
});
```
Equivalent to:
```jsx
const Button = styled.button`
color: grey;
`;
```
`styled-components` is compatible with both React (for web) and React Native meaning it's the perfect choice even for truly universal apps! See the [documentation about React Native](https://www.styled-components.com/docs/basics#react-native) for more information.
_Supported by [Front End Center](https://frontend.center). Thank you for making this possible!_
---
## [Docs](https://www.styled-components.com/docs)
**See the documentation at [styled-components.com/docs](https://www.styled-components.com/docs)** for more information about using `styled-components`!
Quicklinks to some of the most-visited pages:
- [**Getting started**](https://www.styled-components.com/docs/basics)
- [API Reference](https://styled-components.com/docs/api)
- [Theming](https://www.styled-components.com/docs/advanced#theming)
- [Server-side rendering](https://www.styled-components.com/docs/advanced#server-side-rendering)
- [Tagged Template Literals explained](https://www.styled-components.com/docs/advanced#tagged-template-literals)
---
## Example
```jsx
import React from 'react';
import styled from 'styled-components';
// Create a <Title> react component that renders an <h1> which is
// centered, palevioletred and sized at 1.5em
const Title = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
// Create a <Wrapper> react component that renders a <section> with
// some padding and a papayawhip background
const Wrapper = styled.section`
padding: 4em;
background: papayawhip;
`;
function MyUI() {
return (
// Use them like any other React component except they're styled!
<Wrapper>
<Title>Hello World, this is my first styled component!</Title>
</Wrapper>
);
}
```
This is what you'll see in your browser:
<div align="center">
<a href="https://styled-components.com">
<img alt="Screenshot of the above code ran in a browser" src="http://i.imgur.com/wUJpcjY.jpg" />
</a>
</div>
---
## Looking for v5?
The `main` branch is for the most-current version of styled-components, currently v6. For changes targeting v5, please point your PRs at the `legacy-v5` branch.
---
## Built with `styled-components`
A lot of hard work goes into community libraries, projects, and guides. A lot of them make it easier to get started or help you with your next project! There are also a whole lot of interesting apps and sites that people have built using styled-components.
Make sure to head over to [awesome-styled-components](https://github.com/styled-components/awesome-styled-components) to see them all! And please contribute and add your own work to the list so others can find it.
---
## Contributing
If you want to contribute to `styled-components` please see our [contributing and community guidelines](./CONTRIBUTING.md), they'll help you get set up locally and explain the whole process.
Please also note that all repositories under the `styled-components` organization follow our [Code of Conduct](./CODE_OF_CONDUCT.md), make sure to review and follow it.
---
## Badge
Let everyone know you're using _styled-components_ → [![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components)
```md
[![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components)
```
---
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/styled-components/styled-components/graphs/contributors"><img src="https://opencollective.com/styled-components/contributors.svg?width=890" /></a>
---
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/styled-components#backer)]
<a href="https://opencollective.com/styled-components#backers" target="_blank"><img src="https://opencollective.com/styled-components/backers.svg?width=890"></a>
---
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/styled-components#sponsor)]
<a href="https://opencollective.com/styled-components/sponsor/0/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/1/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/2/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/3/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/4/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/5/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/6/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/7/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/8/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/styled-components/sponsor/9/website" target="_blank"><img src="https://opencollective.com/styled-components/sponsor/9/avatar.svg"></a>
---
## License
Licensed under the MIT License, Copyright © 2016-present Glen Maddern and Maximilian Stoiber.
See [LICENSE](./LICENSE) for more information.
---
## Acknowledgements
This project builds on a long line of earlier work by clever folks all around the world. We'd like to thank Charlie Somerville, Nik Graf, Sunil Pai, Michael Chan, Andrey Popp, Jed Watson & Andrey Sitnik who contributed ideas, code or inspiration.
Special thanks to [@okonet](https://github.com/okonet) for the fantastic logo.

12
server/node_modules/styled-components/dist/base.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import { SC_VERSION } from './constants';
import createGlobalStyle from './constructors/createGlobalStyle';
import css from './constructors/css';
import keyframes from './constructors/keyframes';
import withTheme from './hoc/withTheme';
import ServerStyleSheet from './models/ServerStyleSheet';
import { IStyleSheetContext, IStyleSheetManager, IStylisContext, StyleSheetConsumer, StyleSheetContext, StyleSheetManager } from './models/StyleSheetManager';
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from './models/ThemeProvider';
import isStyledComponent from './utils/isStyledComponent';
export * from './secretInternals';
export { Attrs, DefaultTheme, ShouldForwardProp } from './types';
export { IStyleSheetContext, IStyleSheetManager, IStylisContext, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, createGlobalStyle, css, isStyledComponent, keyframes, useTheme, SC_VERSION as version, withTheme, };

View File

@@ -0,0 +1,8 @@
export declare const SC_ATTR: string;
export declare const SC_ATTR_ACTIVE = "active";
export declare const SC_ATTR_VERSION = "data-styled-version";
export declare const SC_VERSION: string;
export declare const SPLITTER = "/*!sc*/\n";
export declare const IS_BROWSER: boolean;
export declare const DISABLE_SPEEDY: boolean;
export declare const STATIC_EXECUTION_CONTEXT: {};

View File

@@ -0,0 +1,18 @@
/// <reference types="react" />
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, NoInfer, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P extends object ? P : never : T extends object ? T : never;
/**
* Based on Attrs being a simple object or function that returns
* a prop object, inspect the attrs result and attempt to extract
* any "as" prop usage to modify the runtime target.
*/
type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends StyledTarget<R>, Result extends ExecutionProps = AttrsResult<T>> = Result extends {
as: infer RuntimeTarget;
} ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics>;
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
}
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
export {};

View File

@@ -0,0 +1,3 @@
import React from 'react';
import { ExecutionProps, Interpolation, Styles } from '../types';
export default function createGlobalStyle<Props extends object>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): React.NamedExoticComponent<ExecutionProps & Props>;

View File

@@ -0,0 +1,4 @@
import { Interpolation, NoInfer, RuleSet, Styles } from '../types';
declare function css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;
declare function css<Props extends object>(styles: Styles<NoInfer<Props>>, ...interpolations: Interpolation<NoInfer<Props>>[]): RuleSet<NoInfer<Props>>;
export default css;

View File

@@ -0,0 +1,3 @@
import Keyframes from '../models/Keyframes';
import { Interpolation, Styles } from '../types';
export default function keyframes<Props extends object = {}>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): Keyframes;

View File

@@ -0,0 +1,150 @@
import * as React from 'react';
import { BaseObject, KnownTarget, WebTarget } from '../types';
import { Styled as StyledInstance } from './constructWithOptions';
declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>;
declare const styled: (<Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>) & {
object: StyledInstance<"web", "object", React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, BaseObject>;
g: StyledInstance<"web", "g", React.SVGProps<SVGGElement>, BaseObject>;
map: StyledInstance<"web", "map", React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, BaseObject>;
big: StyledInstance<"web", "big", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
link: StyledInstance<"web", "link", React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, BaseObject>;
small: StyledInstance<"web", "small", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
sub: StyledInstance<"web", "sub", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
sup: StyledInstance<"web", "sup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
a: StyledInstance<"web", "a", React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, BaseObject>;
abbr: StyledInstance<"web", "abbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
address: StyledInstance<"web", "address", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
area: StyledInstance<"web", "area", React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>, BaseObject>;
article: StyledInstance<"web", "article", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
aside: StyledInstance<"web", "aside", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
audio: StyledInstance<"web", "audio", React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, BaseObject>;
b: StyledInstance<"web", "b", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
base: StyledInstance<"web", "base", React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>, BaseObject>;
bdi: StyledInstance<"web", "bdi", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
bdo: StyledInstance<"web", "bdo", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
blockquote: StyledInstance<"web", "blockquote", React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
body: StyledInstance<"web", "body", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, BaseObject>;
br: StyledInstance<"web", "br", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>, BaseObject>;
button: StyledInstance<"web", "button", React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, BaseObject>;
canvas: StyledInstance<"web", "canvas", React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, BaseObject>;
caption: StyledInstance<"web", "caption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
cite: StyledInstance<"web", "cite", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
code: StyledInstance<"web", "code", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
col: StyledInstance<"web", "col", React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
colgroup: StyledInstance<"web", "colgroup", React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
data: StyledInstance<"web", "data", React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, BaseObject>;
datalist: StyledInstance<"web", "datalist", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>, BaseObject>;
dd: StyledInstance<"web", "dd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
del: StyledInstance<"web", "del", React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
details: StyledInstance<"web", "details", React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, BaseObject>;
dfn: StyledInstance<"web", "dfn", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
dialog: StyledInstance<"web", "dialog", React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, BaseObject>;
div: StyledInstance<"web", "div", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BaseObject>;
dl: StyledInstance<"web", "dl", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>, BaseObject>;
dt: StyledInstance<"web", "dt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
em: StyledInstance<"web", "em", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
embed: StyledInstance<"web", "embed", React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>, BaseObject>;
fieldset: StyledInstance<"web", "fieldset", React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, BaseObject>;
figcaption: StyledInstance<"web", "figcaption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
figure: StyledInstance<"web", "figure", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
footer: StyledInstance<"web", "footer", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
form: StyledInstance<"web", "form", React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, BaseObject>;
h1: StyledInstance<"web", "h1", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h2: StyledInstance<"web", "h2", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h3: StyledInstance<"web", "h3", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h4: StyledInstance<"web", "h4", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h5: StyledInstance<"web", "h5", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h6: StyledInstance<"web", "h6", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
header: StyledInstance<"web", "header", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
hgroup: StyledInstance<"web", "hgroup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
hr: StyledInstance<"web", "hr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, BaseObject>;
html: StyledInstance<"web", "html", React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, BaseObject>;
i: StyledInstance<"web", "i", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
iframe: StyledInstance<"web", "iframe", React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, BaseObject>;
img: StyledInstance<"web", "img", React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, BaseObject>;
input: StyledInstance<"web", "input", React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, BaseObject>;
ins: StyledInstance<"web", "ins", React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
kbd: StyledInstance<"web", "kbd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
keygen: StyledInstance<"web", "keygen", React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
label: StyledInstance<"web", "label", React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, BaseObject>;
legend: StyledInstance<"web", "legend", React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, BaseObject>;
li: StyledInstance<"web", "li", React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, BaseObject>;
main: StyledInstance<"web", "main", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
mark: StyledInstance<"web", "mark", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
menu: StyledInstance<"web", "menu", React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
menuitem: StyledInstance<"web", "menuitem", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
meta: StyledInstance<"web", "meta", React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, BaseObject>;
meter: StyledInstance<"web", "meter", React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, BaseObject>;
nav: StyledInstance<"web", "nav", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
noscript: StyledInstance<"web", "noscript", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ol: StyledInstance<"web", "ol", React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, BaseObject>;
optgroup: StyledInstance<"web", "optgroup", React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, BaseObject>;
option: StyledInstance<"web", "option", React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, BaseObject>;
output: StyledInstance<"web", "output", React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, BaseObject>;
p: StyledInstance<"web", "p", React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, BaseObject>;
param: StyledInstance<"web", "param", React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>, BaseObject>;
picture: StyledInstance<"web", "picture", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
pre: StyledInstance<"web", "pre", React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>, BaseObject>;
progress: StyledInstance<"web", "progress", React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, BaseObject>;
q: StyledInstance<"web", "q", React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
rp: StyledInstance<"web", "rp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
rt: StyledInstance<"web", "rt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ruby: StyledInstance<"web", "ruby", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
s: StyledInstance<"web", "s", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
samp: StyledInstance<"web", "samp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
script: StyledInstance<"web", "script", React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, BaseObject>;
section: StyledInstance<"web", "section", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
select: StyledInstance<"web", "select", React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, BaseObject>;
source: StyledInstance<"web", "source", React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, BaseObject>;
span: StyledInstance<"web", "span", React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, BaseObject>;
strong: StyledInstance<"web", "strong", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
style: StyledInstance<"web", "style", React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, BaseObject>;
summary: StyledInstance<"web", "summary", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
table: StyledInstance<"web", "table", React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, BaseObject>;
tbody: StyledInstance<"web", "tbody", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
td: StyledInstance<"web", "td", React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, BaseObject>;
textarea: StyledInstance<"web", "textarea", React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, BaseObject>;
tfoot: StyledInstance<"web", "tfoot", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
th: StyledInstance<"web", "th", React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, BaseObject>;
thead: StyledInstance<"web", "thead", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
time: StyledInstance<"web", "time", React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, BaseObject>;
tr: StyledInstance<"web", "tr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, BaseObject>;
track: StyledInstance<"web", "track", React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, BaseObject>;
u: StyledInstance<"web", "u", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ul: StyledInstance<"web", "ul", React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, BaseObject>;
var: StyledInstance<"web", "var", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
video: StyledInstance<"web", "video", React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, BaseObject>;
wbr: StyledInstance<"web", "wbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
svg: StyledInstance<"web", "svg", React.SVGProps<SVGSVGElement>, BaseObject>;
circle: StyledInstance<"web", "circle", React.SVGProps<SVGCircleElement>, BaseObject>;
clipPath: StyledInstance<"web", "clipPath", React.SVGProps<SVGClipPathElement>, BaseObject>;
defs: StyledInstance<"web", "defs", React.SVGProps<SVGDefsElement>, BaseObject>;
ellipse: StyledInstance<"web", "ellipse", React.SVGProps<SVGEllipseElement>, BaseObject>;
foreignObject: StyledInstance<"web", "foreignObject", React.SVGProps<SVGForeignObjectElement>, BaseObject>;
image: StyledInstance<"web", "image", React.SVGProps<SVGImageElement>, BaseObject>;
line: StyledInstance<"web", "line", React.SVGLineElementAttributes<SVGLineElement>, BaseObject>;
linearGradient: StyledInstance<"web", "linearGradient", React.SVGProps<SVGLinearGradientElement>, BaseObject>;
marker: StyledInstance<"web", "marker", React.SVGProps<SVGMarkerElement>, BaseObject>;
mask: StyledInstance<"web", "mask", React.SVGProps<SVGMaskElement>, BaseObject>;
path: StyledInstance<"web", "path", React.SVGProps<SVGPathElement>, BaseObject>;
pattern: StyledInstance<"web", "pattern", React.SVGProps<SVGPatternElement>, BaseObject>;
polygon: StyledInstance<"web", "polygon", React.SVGProps<SVGPolygonElement>, BaseObject>;
polyline: StyledInstance<"web", "polyline", React.SVGProps<SVGPolylineElement>, BaseObject>;
radialGradient: StyledInstance<"web", "radialGradient", React.SVGProps<SVGRadialGradientElement>, BaseObject>;
rect: StyledInstance<"web", "rect", React.SVGProps<SVGRectElement>, BaseObject>;
stop: StyledInstance<"web", "stop", React.SVGProps<SVGStopElement>, BaseObject>;
text: StyledInstance<"web", "text", React.SVGTextElementAttributes<SVGTextElement>, BaseObject>;
tspan: StyledInstance<"web", "tspan", React.SVGProps<SVGTSpanElement>, BaseObject>;
use: StyledInstance<"web", "use", React.SVGProps<SVGUseElement>, BaseObject>;
};
export default styled;
export { StyledInstance };
/**
* This is the type of the `styled` HOC.
*/
export type Styled = typeof styled;
/**
* Use this higher-order type for scenarios where you are wrapping `styled`
* and providing extra props as a third-party library.
*/
export type LibraryStyled<LibraryProps extends object = BaseObject> = <Target extends WebTarget>(tag: Target) => typeof baseStyled<Target, LibraryProps>;

View File

@@ -0,0 +1,4 @@
import React from 'react';
import { AnyComponent, ExecutionProps } from '../types';
import { NonReactStatics } from '../utils/hoist';
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<React.JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & NonReactStatics<T>;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,2 @@
import styled from './constructors/styled';
export default styled;

View File

@@ -0,0 +1,4 @@
import styled, { LibraryStyled, Styled, StyledInstance } from './constructors/styled';
export * from './base';
export { CSSKeyframes, CSSObject, CSSProp, CSSProperties, CSSPseudos, DataAttributes, DefaultTheme, ExecutionContext, ExecutionProps, FastOmit, IStyledComponent, IStyledComponentFactory, IStyledStatics, Interpolation, PolymorphicComponent, PolymorphicComponentProps, RuleSet, Runtime, StyleFunction, StyledObject, StyledOptions, SupportedHTMLElements, WebTarget, } from './types';
export { LibraryStyled, Styled, StyledInstance, styled as default, styled };

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 {};

View File

@@ -0,0 +1,37 @@
/// <reference path="../../src/global.d.ts" />
import React from 'react';
import { Styled } from '../constructors/constructWithOptions';
import css from '../constructors/css';
import withTheme from '../hoc/withTheme';
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';
import { NativeTarget, RuleSet } from '../types';
import isStyledComponent from '../utils/isStyledComponent';
declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, import("react-native").ActivityIndicatorProps, import("../types").BaseObject>;
Button: Styled<"native", typeof import("react-native").Button, import("react-native").ButtonProps, import("../types").BaseObject>;
DatePickerIOS: Styled<"native", typeof import("react-native").DatePickerIOS, import("react-native").DatePickerIOSProps, import("../types").BaseObject>;
DrawerLayoutAndroid: Styled<"native", typeof import("react-native").DrawerLayoutAndroid, import("react-native").DrawerLayoutAndroidProps, import("../types").BaseObject>;
FlatList: Styled<"native", typeof import("react-native").FlatList, import("react-native").FlatListProps<unknown>, import("../types").BaseObject>;
Image: Styled<"native", typeof import("react-native").Image, import("react-native").ImageProps, import("../types").BaseObject>;
ImageBackground: Styled<"native", typeof import("react-native").ImageBackground, import("react-native").ImageBackgroundProps, import("../types").BaseObject>;
KeyboardAvoidingView: Styled<"native", typeof import("react-native").KeyboardAvoidingView, import("react-native").KeyboardAvoidingViewProps, import("../types").BaseObject>;
Modal: Styled<"native", typeof import("react-native").Modal, import("react-native").ModalBaseProps & import("react-native").ModalPropsIOS & import("react-native").ModalPropsAndroid & import("react-native").ViewProps, import("../types").BaseObject>;
Pressable: Styled<"native", React.ForwardRefExoticComponent<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>>, import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, import("../types").BaseObject>;
ProgressBarAndroid: Styled<"native", typeof import("react-native").ProgressBarAndroid, import("react-native").ProgressBarAndroidProps, import("../types").BaseObject>;
ProgressViewIOS: Styled<"native", typeof import("react-native").ProgressViewIOS, import("react-native").ProgressViewIOSProps, import("../types").BaseObject>;
RefreshControl: Styled<"native", typeof import("react-native").RefreshControl, import("react-native").RefreshControlProps, import("../types").BaseObject>;
SafeAreaView: Styled<"native", typeof import("react-native").SafeAreaView, import("react-native").ViewProps, import("../types").BaseObject>;
ScrollView: Styled<"native", typeof import("react-native").ScrollView, import("react-native").ScrollViewProps, import("../types").BaseObject>;
SectionList: Styled<"native", typeof import("react-native").SectionList, import("react-native").SectionListProps<unknown, unknown>, import("../types").BaseObject>;
Slider: Styled<"native", typeof import("react-native").Slider, import("react-native").SliderProps, import("../types").BaseObject>;
Switch: Styled<"native", typeof import("react-native").Switch, import("react-native").SwitchProps, import("../types").BaseObject>;
Text: Styled<"native", typeof import("react-native").Text, import("react-native").TextProps, import("../types").BaseObject>;
TextInput: Styled<"native", typeof import("react-native").TextInput, import("react-native").TextInputProps, import("../types").BaseObject>;
TouchableHighlight: Styled<"native", typeof import("react-native").TouchableHighlight, import("react-native").TouchableHighlightProps, import("../types").BaseObject>;
TouchableOpacity: Styled<"native", typeof import("react-native").TouchableOpacity, import("react-native").TouchableOpacityProps, import("../types").BaseObject>;
View: Styled<"native", typeof import("react-native").View, import("react-native").ViewProps, import("../types").BaseObject>;
VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, import("react-native").VirtualizedListProps<unknown>, import("../types").BaseObject>;
};
declare const toStyleSheet: (rules: RuleSet<object>) => import("css-to-react-native").Style;
export { CSSKeyframes, CSSObject, CSSProperties, CSSPseudos, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, } from '../types';
export { ThemeConsumer, ThemeContext, ThemeProvider, css, styled as default, isStyledComponent, styled, toStyleSheet, useTheme, withTheme, };

View File

@@ -0,0 +1,5 @@
import StyleSheet from './sheet';
export declare const __PRIVATE__: {
StyleSheet: typeof StyleSheet;
mainSheet: StyleSheet;
};

View File

@@ -0,0 +1,4 @@
export declare const resetGroupIds: () => void;
export declare const getGroupForId: (id: string) => number;
export declare const getIdForGroup: (group: number) => void | string;
export declare const setGroupForId: (id: string, group: number) => void;

View File

@@ -0,0 +1,11 @@
import { Tag } from './types';
/** Create a GroupedTag with an underlying Tag implementation */
export declare const makeGroupedTag: (tag: Tag) => {
groupSizes: Uint32Array;
length: number;
tag: Tag;
indexOfGroup(group: number): number;
insertRules(group: number, rules: string[]): void;
clearGroup(group: number): void;
getGroup(group: number): string;
};

View File

@@ -0,0 +1,3 @@
import { Sheet } from './types';
export declare const outputSheet: (sheet: Sheet) => string;
export declare const rehydrateSheet: (sheet: Sheet) => void;

View File

@@ -0,0 +1,40 @@
import { InsertionTarget } from '../types';
import { GroupedTag, Sheet, SheetOptions } from './types';
type SheetConstructorArgs = {
isServer?: boolean;
useCSSOMInjection?: boolean;
target?: InsertionTarget | undefined;
};
type GlobalStylesAllocationMap = {
[key: string]: number;
};
type NamesAllocationMap = Map<string, Set<string>>;
/** Contains the main stylesheet logic for stringification and caching */
export default class StyleSheet implements Sheet {
gs: GlobalStylesAllocationMap;
names: NamesAllocationMap;
options: SheetOptions;
server: boolean;
tag?: GroupedTag | undefined;
/** Register a group ID to give it an index */
static registerId(id: string): number;
constructor(options?: SheetConstructorArgs, globalStyles?: GlobalStylesAllocationMap, names?: NamesAllocationMap | undefined);
rehydrate(): void;
reconstructWithOptions(options: SheetConstructorArgs, withNames?: boolean): StyleSheet;
allocateGSInstance(id: string): number;
/** Lazily initialises a GroupedTag for when it's actually needed */
getTag(): GroupedTag;
/** Check whether a name is known for caching */
hasNameForId(id: string, name: string): boolean;
/** Mark a group's name as known for caching */
registerName(id: string, name: string): void;
/** Insert new rules which also marks the name as known */
insertRules(id: string, name: string, rules: string | string[]): void;
/** Clears all cached names for a given group ID */
clearNames(id: string): void;
/** Clears all rules for a given group ID */
clearRules(id: string): void;
/** Clears the entire tag which deletes all rules but not its names */
clearTag(): void;
}
export {};

View File

@@ -0,0 +1,55 @@
import { InsertionTarget } from '../types';
import { SheetOptions } from './types';
/** Create a CSSStyleSheet-like tag depending on the environment */
export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOptions) => {
element: HTMLStyleElement;
sheet: CSSStyleSheet;
length: number;
insertRule(index: number, rule: string): boolean;
deleteRule(index: number): void;
getRule(index: number): string;
} | {
element: HTMLStyleElement;
nodes: NodeListOf<Node>;
length: number;
insertRule(index: number, rule: string): boolean;
deleteRule(index: number): void;
getRule(index: number): string;
} | {
rules: string[];
length: number;
insertRule(index: number, rule: string): boolean;
deleteRule(index: number): void;
getRule(index: number): string;
};
export declare const CSSOMTag: {
new (target?: InsertionTarget | undefined): {
element: HTMLStyleElement;
sheet: CSSStyleSheet;
length: number;
insertRule(index: number, rule: string): boolean;
deleteRule(index: number): void;
getRule(index: number): string;
};
};
/** A Tag that emulates the CSSStyleSheet API but uses text nodes */
export declare const TextTag: {
new (target?: InsertionTarget | undefined): {
element: HTMLStyleElement;
nodes: NodeListOf<Node>;
length: number;
insertRule(index: number, rule: string): boolean;
deleteRule(index: number): void;
getRule(index: number): string;
};
};
/** A completely virtual (server-side) Tag that doesn't manipulate the DOM */
export declare const VirtualTag: {
new (_target?: InsertionTarget | undefined): {
rules: string[];
length: number;
insertRule(index: number, rule: string): boolean;
deleteRule(index: number): void;
getRule(index: number): string;
};
};

View File

@@ -0,0 +1,5 @@
import { InsertionTarget } from '../types';
/** Create a style element inside `target` or <head> after the last */
export declare const makeStyleTag: (target?: InsertionTarget | undefined) => HTMLStyleElement;
/** Get the CSSStyleSheet instance for a given style element */
export declare const getSheet: (tag: HTMLStyleElement) => CSSStyleSheet;

View File

@@ -0,0 +1 @@
export { default } from './Sheet';

View File

@@ -0,0 +1,36 @@
import { InsertionTarget } from '../types';
/** CSSStyleSheet-like Tag abstraction for CSS rules */
export interface Tag {
insertRule(index: number, rule: string): boolean;
deleteRule(index: number): void;
getRule(index: number): string;
length: number;
}
/** Group-aware Tag that sorts rules by indices */
export interface GroupedTag {
clearGroup(group: number): void;
getGroup(group: number): string;
groupSizes: Uint32Array;
insertRules(group: number, rules: string | string[]): void;
length: number;
tag: Tag;
}
export type SheetOptions = {
isServer: boolean;
target?: InsertionTarget | undefined;
useCSSOMInjection: boolean;
};
export interface Sheet {
allocateGSInstance(id: string): number;
clearNames(id: string): void;
clearRules(id: string): void;
clearTag(): void;
getTag(): GroupedTag;
hasNameForId(id: string, name: string): boolean;
insertRules(id: string, name: string, rules: string | string[]): void;
options: SheetOptions;
names: Map<string, Set<string>>;
registerName(id: string, name: string): void;
rehydrate(): void;
toString(): string;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
declare var __SERVER__: boolean;
declare var __VERSION__: string;

View File

@@ -0,0 +1,145 @@
/// <reference types="react" />
export declare const seedNextClassnames: (names: string[]) => string[];
export declare const resetStyled: (isServer?: boolean) => (<Target extends import("..").WebTarget, InjectedProps extends object = import("../types").BaseObject>(tag: Target) => import("../constructors/constructWithOptions").Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, import("../types").BaseObject>) & {
object: import("../constructors/constructWithOptions").Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
g: import("../constructors/constructWithOptions").Styled<"web", "g", import("react").SVGProps<SVGGElement>, import("../types").BaseObject>;
map: import("../constructors/constructWithOptions").Styled<"web", "map", import("react").DetailedHTMLProps<import("react").MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, import("../types").BaseObject>;
big: import("../constructors/constructWithOptions").Styled<"web", "big", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
link: import("../constructors/constructWithOptions").Styled<"web", "link", import("react").DetailedHTMLProps<import("react").LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, import("../types").BaseObject>;
small: import("../constructors/constructWithOptions").Styled<"web", "small", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
sub: import("../constructors/constructWithOptions").Styled<"web", "sub", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
sup: import("../constructors/constructWithOptions").Styled<"web", "sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
a: import("../constructors/constructWithOptions").Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
abbr: import("../constructors/constructWithOptions").Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
address: import("../constructors/constructWithOptions").Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
area: import("../constructors/constructWithOptions").Styled<"web", "area", import("react").DetailedHTMLProps<import("react").AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>, import("../types").BaseObject>;
article: import("../constructors/constructWithOptions").Styled<"web", "article", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
aside: import("../constructors/constructWithOptions").Styled<"web", "aside", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
audio: import("../constructors/constructWithOptions").Styled<"web", "audio", import("react").DetailedHTMLProps<import("react").AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, import("../types").BaseObject>;
b: import("../constructors/constructWithOptions").Styled<"web", "b", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
base: import("../constructors/constructWithOptions").Styled<"web", "base", import("react").DetailedHTMLProps<import("react").BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>, import("../types").BaseObject>;
bdi: import("../constructors/constructWithOptions").Styled<"web", "bdi", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
bdo: import("../constructors/constructWithOptions").Styled<"web", "bdo", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
blockquote: import("../constructors/constructWithOptions").Styled<"web", "blockquote", import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, import("../types").BaseObject>;
body: import("../constructors/constructWithOptions").Styled<"web", "body", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, import("../types").BaseObject>;
br: import("../constructors/constructWithOptions").Styled<"web", "br", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBRElement>, HTMLBRElement>, import("../types").BaseObject>;
button: import("../constructors/constructWithOptions").Styled<"web", "button", import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("../types").BaseObject>;
canvas: import("../constructors/constructWithOptions").Styled<"web", "canvas", import("react").DetailedHTMLProps<import("react").CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, import("../types").BaseObject>;
caption: import("../constructors/constructWithOptions").Styled<"web", "caption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
cite: import("../constructors/constructWithOptions").Styled<"web", "cite", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
code: import("../constructors/constructWithOptions").Styled<"web", "code", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
col: import("../constructors/constructWithOptions").Styled<"web", "col", import("react").DetailedHTMLProps<import("react").ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
colgroup: import("../constructors/constructWithOptions").Styled<"web", "colgroup", import("react").DetailedHTMLProps<import("react").ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, import("../types").BaseObject>;
data: import("../constructors/constructWithOptions").Styled<"web", "data", import("react").DetailedHTMLProps<import("react").DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, import("../types").BaseObject>;
datalist: import("../constructors/constructWithOptions").Styled<"web", "datalist", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>, import("../types").BaseObject>;
dd: import("../constructors/constructWithOptions").Styled<"web", "dd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
del: import("../constructors/constructWithOptions").Styled<"web", "del", import("react").DetailedHTMLProps<import("react").DelHTMLAttributes<HTMLModElement>, HTMLModElement>, import("../types").BaseObject>;
details: import("../constructors/constructWithOptions").Styled<"web", "details", import("react").DetailedHTMLProps<import("react").DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, import("../types").BaseObject>;
dfn: import("../constructors/constructWithOptions").Styled<"web", "dfn", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
dialog: import("../constructors/constructWithOptions").Styled<"web", "dialog", import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, import("../types").BaseObject>;
div: import("../constructors/constructWithOptions").Styled<"web", "div", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("../types").BaseObject>;
dl: import("../constructors/constructWithOptions").Styled<"web", "dl", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, import("../types").BaseObject>;
dt: import("../constructors/constructWithOptions").Styled<"web", "dt", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
em: import("../constructors/constructWithOptions").Styled<"web", "em", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
embed: import("../constructors/constructWithOptions").Styled<"web", "embed", import("react").DetailedHTMLProps<import("react").EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>, import("../types").BaseObject>;
fieldset: import("../constructors/constructWithOptions").Styled<"web", "fieldset", import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, import("../types").BaseObject>;
figcaption: import("../constructors/constructWithOptions").Styled<"web", "figcaption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
figure: import("../constructors/constructWithOptions").Styled<"web", "figure", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
footer: import("../constructors/constructWithOptions").Styled<"web", "footer", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
form: import("../constructors/constructWithOptions").Styled<"web", "form", import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, import("../types").BaseObject>;
h1: import("../constructors/constructWithOptions").Styled<"web", "h1", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
h2: import("../constructors/constructWithOptions").Styled<"web", "h2", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
h3: import("../constructors/constructWithOptions").Styled<"web", "h3", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
h4: import("../constructors/constructWithOptions").Styled<"web", "h4", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
h5: import("../constructors/constructWithOptions").Styled<"web", "h5", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
h6: import("../constructors/constructWithOptions").Styled<"web", "h6", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, import("../types").BaseObject>;
header: import("../constructors/constructWithOptions").Styled<"web", "header", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
hgroup: import("../constructors/constructWithOptions").Styled<"web", "hgroup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
hr: import("../constructors/constructWithOptions").Styled<"web", "hr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, import("../types").BaseObject>;
html: import("../constructors/constructWithOptions").Styled<"web", "html", import("react").DetailedHTMLProps<import("react").HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, import("../types").BaseObject>;
i: import("../constructors/constructWithOptions").Styled<"web", "i", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
iframe: import("../constructors/constructWithOptions").Styled<"web", "iframe", import("react").DetailedHTMLProps<import("react").IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, import("../types").BaseObject>;
img: import("../constructors/constructWithOptions").Styled<"web", "img", import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, import("../types").BaseObject>;
input: import("../constructors/constructWithOptions").Styled<"web", "input", import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("../types").BaseObject>;
ins: import("../constructors/constructWithOptions").Styled<"web", "ins", import("react").DetailedHTMLProps<import("react").InsHTMLAttributes<HTMLModElement>, HTMLModElement>, import("../types").BaseObject>;
kbd: import("../constructors/constructWithOptions").Styled<"web", "kbd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
keygen: import("../constructors/constructWithOptions").Styled<"web", "keygen", import("react").DetailedHTMLProps<import("react").KeygenHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
label: import("../constructors/constructWithOptions").Styled<"web", "label", import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, import("../types").BaseObject>;
legend: import("../constructors/constructWithOptions").Styled<"web", "legend", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, import("../types").BaseObject>;
li: import("../constructors/constructWithOptions").Styled<"web", "li", import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, import("../types").BaseObject>;
main: import("../constructors/constructWithOptions").Styled<"web", "main", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
mark: import("../constructors/constructWithOptions").Styled<"web", "mark", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
menu: import("../constructors/constructWithOptions").Styled<"web", "menu", import("react").DetailedHTMLProps<import("react").MenuHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
menuitem: import("../constructors/constructWithOptions").Styled<"web", "menuitem", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
meta: import("../constructors/constructWithOptions").Styled<"web", "meta", import("react").DetailedHTMLProps<import("react").MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, import("../types").BaseObject>;
meter: import("../constructors/constructWithOptions").Styled<"web", "meter", import("react").DetailedHTMLProps<import("react").MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, import("../types").BaseObject>;
nav: import("../constructors/constructWithOptions").Styled<"web", "nav", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
noscript: import("../constructors/constructWithOptions").Styled<"web", "noscript", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
ol: import("../constructors/constructWithOptions").Styled<"web", "ol", import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, import("../types").BaseObject>;
optgroup: import("../constructors/constructWithOptions").Styled<"web", "optgroup", import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, import("../types").BaseObject>;
option: import("../constructors/constructWithOptions").Styled<"web", "option", import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, import("../types").BaseObject>;
output: import("../constructors/constructWithOptions").Styled<"web", "output", import("react").DetailedHTMLProps<import("react").OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, import("../types").BaseObject>;
p: import("../constructors/constructWithOptions").Styled<"web", "p", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, import("../types").BaseObject>;
param: import("../constructors/constructWithOptions").Styled<"web", "param", import("react").DetailedHTMLProps<import("react").ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>, import("../types").BaseObject>;
picture: import("../constructors/constructWithOptions").Styled<"web", "picture", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
pre: import("../constructors/constructWithOptions").Styled<"web", "pre", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, import("../types").BaseObject>;
progress: import("../constructors/constructWithOptions").Styled<"web", "progress", import("react").DetailedHTMLProps<import("react").ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, import("../types").BaseObject>;
q: import("../constructors/constructWithOptions").Styled<"web", "q", import("react").DetailedHTMLProps<import("react").QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, import("../types").BaseObject>;
rp: import("../constructors/constructWithOptions").Styled<"web", "rp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
rt: import("../constructors/constructWithOptions").Styled<"web", "rt", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
ruby: import("../constructors/constructWithOptions").Styled<"web", "ruby", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
s: import("../constructors/constructWithOptions").Styled<"web", "s", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
samp: import("../constructors/constructWithOptions").Styled<"web", "samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
script: import("../constructors/constructWithOptions").Styled<"web", "script", import("react").DetailedHTMLProps<import("react").ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, import("../types").BaseObject>;
section: import("../constructors/constructWithOptions").Styled<"web", "section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
select: import("../constructors/constructWithOptions").Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
source: import("../constructors/constructWithOptions").Styled<"web", "source", import("react").DetailedHTMLProps<import("react").SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, import("../types").BaseObject>;
span: import("../constructors/constructWithOptions").Styled<"web", "span", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("../types").BaseObject>;
strong: import("../constructors/constructWithOptions").Styled<"web", "strong", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
style: import("../constructors/constructWithOptions").Styled<"web", "style", import("react").DetailedHTMLProps<import("react").StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, import("../types").BaseObject>;
summary: import("../constructors/constructWithOptions").Styled<"web", "summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
table: import("../constructors/constructWithOptions").Styled<"web", "table", import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, import("../types").BaseObject>;
tbody: import("../constructors/constructWithOptions").Styled<"web", "tbody", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
td: import("../constructors/constructWithOptions").Styled<"web", "td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, import("../types").BaseObject>;
textarea: import("../constructors/constructWithOptions").Styled<"web", "textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, import("../types").BaseObject>;
tfoot: import("../constructors/constructWithOptions").Styled<"web", "tfoot", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
th: import("../constructors/constructWithOptions").Styled<"web", "th", import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("../types").BaseObject>;
thead: import("../constructors/constructWithOptions").Styled<"web", "thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
time: import("../constructors/constructWithOptions").Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
tr: import("../constructors/constructWithOptions").Styled<"web", "tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("../types").BaseObject>;
track: import("../constructors/constructWithOptions").Styled<"web", "track", import("react").DetailedHTMLProps<import("react").TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, import("../types").BaseObject>;
u: import("../constructors/constructWithOptions").Styled<"web", "u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
ul: import("../constructors/constructWithOptions").Styled<"web", "ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("../types").BaseObject>;
var: import("../constructors/constructWithOptions").Styled<"web", "var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
video: import("../constructors/constructWithOptions").Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
wbr: import("../constructors/constructWithOptions").Styled<"web", "wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
circle: import("../constructors/constructWithOptions").Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
clipPath: import("../constructors/constructWithOptions").Styled<"web", "clipPath", import("react").SVGProps<SVGClipPathElement>, import("../types").BaseObject>;
defs: import("../constructors/constructWithOptions").Styled<"web", "defs", import("react").SVGProps<SVGDefsElement>, import("../types").BaseObject>;
ellipse: import("../constructors/constructWithOptions").Styled<"web", "ellipse", import("react").SVGProps<SVGEllipseElement>, import("../types").BaseObject>;
foreignObject: import("../constructors/constructWithOptions").Styled<"web", "foreignObject", import("react").SVGProps<SVGForeignObjectElement>, import("../types").BaseObject>;
image: import("../constructors/constructWithOptions").Styled<"web", "image", import("react").SVGProps<SVGImageElement>, import("../types").BaseObject>;
line: import("../constructors/constructWithOptions").Styled<"web", "line", import("react").SVGLineElementAttributes<SVGLineElement>, import("../types").BaseObject>;
linearGradient: import("../constructors/constructWithOptions").Styled<"web", "linearGradient", import("react").SVGProps<SVGLinearGradientElement>, import("../types").BaseObject>;
marker: import("../constructors/constructWithOptions").Styled<"web", "marker", import("react").SVGProps<SVGMarkerElement>, import("../types").BaseObject>;
mask: import("../constructors/constructWithOptions").Styled<"web", "mask", import("react").SVGProps<SVGMaskElement>, import("../types").BaseObject>;
path: import("../constructors/constructWithOptions").Styled<"web", "path", import("react").SVGProps<SVGPathElement>, import("../types").BaseObject>;
pattern: import("../constructors/constructWithOptions").Styled<"web", "pattern", import("react").SVGProps<SVGPatternElement>, import("../types").BaseObject>;
polygon: import("../constructors/constructWithOptions").Styled<"web", "polygon", import("react").SVGProps<SVGPolygonElement>, import("../types").BaseObject>;
polyline: import("../constructors/constructWithOptions").Styled<"web", "polyline", import("react").SVGProps<SVGPolylineElement>, import("../types").BaseObject>;
radialGradient: import("../constructors/constructWithOptions").Styled<"web", "radialGradient", import("react").SVGProps<SVGRadialGradientElement>, import("../types").BaseObject>;
rect: import("../constructors/constructWithOptions").Styled<"web", "rect", import("react").SVGProps<SVGRectElement>, import("../types").BaseObject>;
stop: import("../constructors/constructWithOptions").Styled<"web", "stop", import("react").SVGProps<SVGStopElement>, import("../types").BaseObject>;
text: import("../constructors/constructWithOptions").Styled<"web", "text", import("react").SVGTextElementAttributes<SVGTextElement>, import("../types").BaseObject>;
tspan: import("../constructors/constructWithOptions").Styled<"web", "tspan", import("react").SVGProps<SVGTSpanElement>, import("../types").BaseObject>;
use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
};
export declare const rehydrateTestStyles: () => void;
export declare const stripComments: (str: string) => string;
export declare const stripWhitespace: (str: string) => string;
export declare const getCSS: (scope: Document | HTMLElement) => string;
export declare const expectCSSMatches: (_expectation: string, opts?: {
ignoreWhitespace: boolean;
}) => string;
export declare const getRenderedCSS: () => string;

File diff suppressed because one or more lines are too long

204
server/node_modules/styled-components/dist/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,204 @@
import type * as CSS from 'csstype';
import React from 'react';
import ComponentStyle from './models/ComponentStyle';
import { DefaultTheme } from './models/ThemeProvider';
import createWarnTooManyClasses from './utils/createWarnTooManyClasses';
import type { SupportedHTMLElements } from './utils/domElements';
export { CSS, DefaultTheme, SupportedHTMLElements };
export interface ExoticComponentWithDisplayName<P extends object = {}> extends React.ExoticComponent<P> {
defaultProps?: Partial<P> | undefined;
displayName?: string | undefined;
}
/**
* Use this type to disambiguate between a styled-component instance
* and a StyleFunction or any other type of function.
*/
export type StyledComponentBrand = {
readonly _sc: symbol;
};
export type BaseObject = {};
export type OmitNever<T> = {
[K in keyof T as T[K] extends never ? never : K]: T[K];
};
export type FastOmit<T extends object, U extends string | number | symbol> = {
[K in keyof T as K extends U ? never : K]: T[K];
};
export type Runtime = 'web' | 'native';
export type AnyComponent<P extends object = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
export type KnownTarget = SupportedHTMLElements | AnyComponent;
export type WebTarget = string | KnownTarget;
export type NativeTarget = AnyComponent;
export type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget;
export interface StyledOptions<R extends Runtime, Props extends object> {
attrs?: Attrs<Props>[] | undefined;
componentId?: (R extends 'web' ? string : never) | undefined;
displayName?: string | undefined;
parentComponentId?: (R extends 'web' ? string : never) | undefined;
shouldForwardProp?: ShouldForwardProp<R> | undefined;
}
export type Dict<T = any> = {
[key: string]: T;
};
/**
* This type is intended for when data attributes are composed via
* the `.attrs` API:
*
* ```tsx
* styled.div.attrs<DataAttributes>({ 'data-testid': 'foo' })``
* ```
*
* Would love to figure out how to support this natively without having to
* manually compose the type, but haven't figured out a way to do so yet that
* doesn't cause specificity loss (see `test/types.tsx` if you attempt to embed
* `DataAttributes` directly in the `Attrs<>` type.)
*/
export type DataAttributes = {
[key: `data-${string}`]: any;
};
export type ExecutionProps = {
/**
* Dynamically adjust the rendered component or HTML tag, e.g.
* ```
* const StyledButton = styled.button``
*
* <StyledButton as="a" href="/foo">
* I'm an anchor now
* </StyledButton>
* ```
*/
as?: KnownTarget | undefined;
forwardedAs?: KnownTarget | undefined;
theme?: DefaultTheme | undefined;
};
/**
* ExecutionProps but with `theme` required.
*/
export interface ExecutionContext extends ExecutionProps {
theme: DefaultTheme;
}
export interface StyleFunction<Props extends object> {
(executionContext: ExecutionContext & Props): Interpolation<Props>;
}
export type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | StyledComponentBrand | RuleSet<Props> | Interpolation<Props>[];
export type Attrs<Props extends object = BaseObject> = (ExecutionProps & Partial<Props>) | ((props: ExecutionContext & Props) => ExecutionProps & Partial<Props>);
export type RuleSet<Props extends object = BaseObject> = Interpolation<Props>[];
export type Styles<Props extends object> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>;
export type NameGenerator = (hash: number) => string;
export interface StyleSheet {
create: Function;
}
export interface Keyframes {
id: string;
name: string;
rules: string;
}
export interface Flattener<Props extends object> {
(chunks: Interpolation<Props>[], executionContext: object | null | undefined, styleSheet: StyleSheet | null | undefined): Interpolation<Props>[];
}
export interface Stringifier {
(css: string, selector?: string | undefined, prefix?: string | undefined, componentId?: string | undefined): string[];
hash: string;
}
export interface ShouldForwardProp<R extends Runtime> {
(prop: string, elementToBeCreated: StyledTarget<R>): boolean;
}
export interface CommonStatics<R extends Runtime, Props extends object> {
attrs: Attrs<Props>[];
target: StyledTarget<R>;
shouldForwardProp?: ShouldForwardProp<R> | undefined;
}
export interface IStyledStatics<R extends Runtime, OuterProps extends object> extends CommonStatics<R, OuterProps> {
componentStyle: R extends 'web' ? ComponentStyle : never;
foldedComponentIds: R extends 'web' ? string : never;
inlineStyle: R extends 'native' ? InstanceType<IInlineStyleConstructor<OuterProps>> : never;
target: StyledTarget<R>;
styledComponentId: R extends 'web' ? string : never;
warnTooManyClasses?: (R extends 'web' ? ReturnType<typeof createWarnTooManyClasses> : never) | undefined;
}
/**
* Used by PolymorphicComponent to define prop override cascading order.
*/
export type PolymorphicComponentProps<R extends Runtime, BaseProps extends object, AsTarget extends StyledTarget<R> | void, ForwardedAsTarget extends StyledTarget<R> | void, AsTargetProps extends object = AsTarget extends KnownTarget ? React.ComponentPropsWithRef<AsTarget> : {}, ForwardedAsTargetProps extends object = ForwardedAsTarget extends KnownTarget ? React.ComponentPropsWithRef<ForwardedAsTarget> : {}> = NoInfer<FastOmit<Substitute<BaseProps, Substitute<ForwardedAsTargetProps, AsTargetProps>>, keyof ExecutionProps>> & FastOmit<ExecutionProps, 'as' | 'forwardedAs'> & {
as?: AsTarget;
forwardedAs?: ForwardedAsTarget;
};
/**
* This type forms the signature for a forwardRef-enabled component
* that accepts the "as" prop to dynamically change the underlying
* rendered JSX. The interface will automatically attempt to extract
* props from the given rendering target to get proper typing for
* any specialized props in the target component.
*/
export interface PolymorphicComponent<R extends Runtime, BaseProps extends object> extends React.ForwardRefExoticComponent<BaseProps> {
<AsTarget extends StyledTarget<R> | void = void, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget>): React.JSX.Element;
}
export interface IStyledComponentBase<R extends Runtime, Props extends object = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
defaultProps?: (ExecutionProps & Partial<Props>) | undefined;
toString: () => string;
}
export type IStyledComponent<R extends Runtime, Props extends object = BaseObject> = IStyledComponentBase<R, Props> &
/**
* TypeScript doesn't allow using a styled component as a key inside object
* styles because "A computed property name must be of type 'string', 'number',
* 'symbol', or 'any'.". The toString() method only exists in the web runtime.
* This hack intersects the `IStyledComponent` type with the built-in `string`
* type to keep TSC happy.
*
* @example
* const H1 = styled.h1({
* fontSize: '2rem'
* });
*
* const Header = styled.header({
* [H1]: {
* marginBottom: '1rem'
* }
* })
*/
(R extends 'web' ? string : {});
export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
<Props extends object = BaseObject, Statics extends object = BaseObject>(target: Target, options: StyledOptions<R, OuterProps & Props>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics;
}
export interface IInlineStyleConstructor<Props extends object> {
new (rules: RuleSet<Props>): IInlineStyle<Props>;
}
export interface IInlineStyle<Props extends object> {
rules: RuleSet<Props>;
generateStyleObject(executionContext: ExecutionContext & Props): object;
}
export type CSSProperties = CSS.Properties<number | (string & {})>;
export type CSSPseudos = {
[K in CSS.Pseudos]?: CSSObject;
};
export type CSSKeyframes = object & {
[key: string]: CSSObject;
};
export type CSSObject<Props extends object = BaseObject> = StyledObject<Props>;
export interface StyledObject<Props extends object = BaseObject> extends CSSProperties, CSSPseudos {
[key: string]: StyledObject<Props> | string | number | StyleFunction<Props> | RuleSet<any> | undefined;
}
/**
* The `css` prop is not declared by default in the types as it would cause `css` to be present
* on the types of anything that uses styled-components indirectly, even if they do not use the
* babel plugin.
*
* To enable support for the `css` prop in TypeScript, create a `styled-components.d.ts` file in
* your project source with the following contents:
*
* ```ts
* import type { CSSProp } from "styled-components";
*
* declare module "react" {
* interface Attributes {
* css?: CSSProp;
* }
* }
* ```
*
* In order to get accurate typings for `props.theme` in `css` interpolations, see
* {@link DefaultTheme}.
*/
export type CSSProp = Interpolation<any>;
export type NoInfer<T> = [T][T extends any ? 0 : never];
export type Substitute<A extends object, B extends object> = FastOmit<A, keyof B> & B;
export type InsertionTarget = HTMLElement | ShadowRoot;

View File

@@ -0,0 +1 @@
export default function addUnitIfNeeded(name: string, value: any): string;

View File

@@ -0,0 +1 @@
export declare const checkDynamicCreation: (displayName: string, componentId?: string | undefined) => void;

View File

@@ -0,0 +1,3 @@
export declare const LIMIT = 200;
declare const _default: (displayName: string, componentId: string) => (className: string) => void;
export default _default;

View File

@@ -0,0 +1,4 @@
import { DefaultTheme, ExecutionProps } from '../types';
export default function determineTheme(props: ExecutionProps, providedTheme?: DefaultTheme | undefined, defaultProps?: {
theme?: DefaultTheme | undefined;
}): DefaultTheme | undefined;

View File

@@ -0,0 +1,4 @@
declare const elements: readonly ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"];
declare const _default: Set<"object" | "g" | "map" | "big" | "link" | "small" | "sub" | "sup" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "main" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "svg" | "circle" | "clipPath" | "defs" | "ellipse" | "foreignObject" | "image" | "line" | "linearGradient" | "marker" | "mask" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "text" | "tspan" | "use">;
export default _default;
export type SupportedHTMLElements = (typeof elements)[number];

View File

@@ -0,0 +1,3 @@
import { Dict } from '../types';
export declare const EMPTY_ARRAY: readonly any[];
export declare const EMPTY_OBJECT: Readonly<Dict<any>>;

View File

@@ -0,0 +1,5 @@
/**
* Create an error file out of errors.md for development and a simple web link to the full errors
* in production mode.
*/
export default function throwStyledComponentsError(code: string | number, ...interpolations: any[]): Error;

View File

@@ -0,0 +1,21 @@
declare const _default: {
'1': string;
'2': string;
'3': string;
'4': string;
'5': string;
'6': string;
'7': string;
'8': string;
'9': string;
'10': string;
'11': string;
'12': string;
'13': string;
'14': string;
'15': string;
'16': string;
'17': string;
'18': string;
};
export default _default;

View File

@@ -0,0 +1,5 @@
/**
* TODO: Explore using CSS.escape when it becomes more available
* in evergreen browsers.
*/
export default function escape(str: string): string;

View File

@@ -0,0 +1,4 @@
import StyleSheet from '../sheet';
import { Dict, ExecutionContext, Interpolation, RuleSet, Stringifier } from '../types';
export declare const objToCssArray: (obj: Dict<any>) => string[];
export default function flatten<Props extends object>(chunk: Interpolation<object>, executionContext?: (ExecutionContext & Props) | undefined, styleSheet?: StyleSheet | undefined, stylisInstance?: Stringifier | undefined): RuleSet<Props>;

View File

@@ -0,0 +1 @@
export default function generateAlphabeticName(code: number): string;

View File

@@ -0,0 +1 @@
export default function generateComponentId(str: string): string;

View File

@@ -0,0 +1,2 @@
import { StyledTarget } from '../types';
export default function generateDisplayName(target: StyledTarget<any>): string;

View File

@@ -0,0 +1,2 @@
import { StyledTarget } from '../types';
export default function getComponentName(target: StyledTarget<any>): string;

View File

@@ -0,0 +1,3 @@
export declare const SEED = 5381;
export declare const phash: (h: number, x: string) => number;
export declare const hash: (x: string) => number;

View File

@@ -0,0 +1,51 @@
import React from 'react';
import { AnyComponent } from '../types';
/**
* Adapted from hoist-non-react-statics to avoid the react-is dependency.
*/
declare const REACT_STATICS: {
childContextTypes: boolean;
contextType: boolean;
contextTypes: boolean;
defaultProps: boolean;
displayName: boolean;
getDefaultProps: boolean;
getDerivedStateFromError: boolean;
getDerivedStateFromProps: boolean;
mixins: boolean;
propTypes: boolean;
type: boolean;
};
declare const KNOWN_STATICS: {
name: boolean;
length: boolean;
prototype: boolean;
caller: boolean;
callee: boolean;
arguments: boolean;
arity: boolean;
};
declare const FORWARD_REF_STATICS: {
$$typeof: boolean;
render: boolean;
defaultProps: boolean;
displayName: boolean;
propTypes: boolean;
};
declare const MEMO_STATICS: {
$$typeof: boolean;
compare: boolean;
defaultProps: boolean;
displayName: boolean;
propTypes: boolean;
type: boolean;
};
type OmniComponent = AnyComponent;
type ExcludeList = {
[key: string]: true;
};
export type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = {
[key in Exclude<keyof S, S extends React.MemoExoticComponent<any> ? keyof typeof MEMO_STATICS | keyof C : S extends React.ForwardRefExoticComponent<any> ? keyof typeof FORWARD_REF_STATICS | keyof C : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C>]: S[key];
};
export default function hoistNonReactStatics<T extends OmniComponent, S extends OmniComponent, C extends ExcludeList = {}>(targetComponent: T, sourceComponent: S, excludelist?: C | undefined): T & NonReactStatics<S, C>;
export {};

View File

@@ -0,0 +1,14 @@
/**
* Hyphenates a camelcased CSS property name, for example:
*
* > hyphenateStyleName('backgroundColor')
* < "background-color"
* > hyphenateStyleName('MozTransition')
* < "-moz-transition"
* > hyphenateStyleName('msTransition')
* < "-ms-transition"
*
* As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
* is converted to `-ms-`.
*/
export default function hyphenateStyleName(string: string): string;

View File

@@ -0,0 +1,2 @@
import { Interpolation } from '../types';
export default function interleave<Props extends object>(strings: readonly string[], interpolations: Interpolation<Props>[]): Interpolation<Props>[];

View File

@@ -0,0 +1 @@
export default function isFunction(test: any): test is Function;

View File

@@ -0,0 +1 @@
export default function isPlainObject(x: any): x is Record<any, any>;

View File

@@ -0,0 +1 @@
export default function isStatelessFunction(test: any): test is Function;

View File

@@ -0,0 +1,2 @@
import { RuleSet } from '../types';
export default function isStaticRules<Props extends object>(rules: RuleSet<Props>): boolean;

View File

@@ -0,0 +1,2 @@
import { StyledComponentBrand } from '../types';
export default function isStyledComponent(target: any): target is StyledComponentBrand;

View File

@@ -0,0 +1,2 @@
import { StyledTarget } from '../types';
export default function isTag(target: StyledTarget<'web'>): target is string;

View File

@@ -0,0 +1,5 @@
/**
* Convenience function for joining strings to form className chains
*/
export declare function joinStrings(a?: string | undefined, b?: string | undefined): string;
export declare function joinStringArray(arr: string[], sep?: string | undefined): string;

View File

@@ -0,0 +1,6 @@
/**
* Arrays & POJOs merged recursively, other objects and value types are overridden
* If target is not a POJO or an Array, it will get source properties injected via shallow merge
* Source objects applied left to right. Mutates & returns target. Similar to lodash merge.
*/
export default function mixinDeep(target: any, ...sources: any[]): any;

View File

@@ -0,0 +1 @@
export default function getNonce(): string | null;

View File

@@ -0,0 +1,17 @@
/**
* If the Object prototype is frozen, the "toString" property is non-writable. This means that any objects which inherit this property
* cannot have the property changed using a "=" assignment operator. If using strict mode, attempting that will cause an error. If not using
* strict mode, attempting that will be silently ignored.
*
* If the Object prototype is frozen, inherited non-writable properties can still be shadowed using one of two mechanisms:
*
* 1. ES6 class methods: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#methods
* 2. Using the `Object.defineProperty()` static method:
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
*
* However, this project uses Babel to transpile ES6 classes, and transforms ES6 class methods to use the assignment operator instead:
* https://babeljs.io/docs/babel-plugin-transform-class-properties#options
*
* Therefore, the most compatible way to shadow the prototype's "toString" property is to define a new "toString" property on this object.
*/
export declare function setToString(object: object, toStringFn: () => string): void;

View File

@@ -0,0 +1,10 @@
import * as stylis from 'stylis';
import { Stringifier } from '../types';
export type ICreateStylisInstance = {
options?: {
namespace?: string | undefined;
prefix?: boolean | undefined;
} | undefined;
plugins?: stylis.Middleware[] | undefined;
};
export default function createStylisInstance({ options, plugins, }?: ICreateStylisInstance): Stringifier;

View File

@@ -0,0 +1,12 @@
import { SC_VERSION } from './constants';
import createGlobalStyle from './constructors/createGlobalStyle';
import css from './constructors/css';
import keyframes from './constructors/keyframes';
import withTheme from './hoc/withTheme';
import ServerStyleSheet from './models/ServerStyleSheet';
import { IStyleSheetContext, IStyleSheetManager, IStylisContext, StyleSheetConsumer, StyleSheetContext, StyleSheetManager } from './models/StyleSheetManager';
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from './models/ThemeProvider';
import isStyledComponent from './utils/isStyledComponent';
export * from './secretInternals';
export { Attrs, DefaultTheme, ShouldForwardProp } from './types';
export { IStyleSheetContext, IStyleSheetManager, IStylisContext, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, createGlobalStyle, css, isStyledComponent, keyframes, useTheme, SC_VERSION as version, withTheme, };

View File

@@ -0,0 +1,8 @@
export declare const SC_ATTR: string;
export declare const SC_ATTR_ACTIVE = "active";
export declare const SC_ATTR_VERSION = "data-styled-version";
export declare const SC_VERSION: string;
export declare const SPLITTER = "/*!sc*/\n";
export declare const IS_BROWSER: boolean;
export declare const DISABLE_SPEEDY: boolean;
export declare const STATIC_EXECUTION_CONTEXT: {};

View File

@@ -0,0 +1,18 @@
/// <reference types="react" />
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, NoInfer, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P extends object ? P : never : T extends object ? T : never;
/**
* Based on Attrs being a simple object or function that returns
* a prop object, inspect the attrs result and attempt to extract
* any "as" prop usage to modify the runtime target.
*/
type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends StyledTarget<R>, Result extends ExecutionProps = AttrsResult<T>> = Result extends {
as: infer RuntimeTarget;
} ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics>;
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
}
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
export {};

View File

@@ -0,0 +1,3 @@
import React from 'react';
import { ExecutionProps, Interpolation, Styles } from '../types';
export default function createGlobalStyle<Props extends object>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): React.NamedExoticComponent<ExecutionProps & Props>;

View File

@@ -0,0 +1,4 @@
import { Interpolation, NoInfer, RuleSet, Styles } from '../types';
declare function css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;
declare function css<Props extends object>(styles: Styles<NoInfer<Props>>, ...interpolations: Interpolation<NoInfer<Props>>[]): RuleSet<NoInfer<Props>>;
export default css;

View File

@@ -0,0 +1,3 @@
import Keyframes from '../models/Keyframes';
import { Interpolation, Styles } from '../types';
export default function keyframes<Props extends object = {}>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): Keyframes;

View File

@@ -0,0 +1,150 @@
import * as React from 'react';
import { BaseObject, KnownTarget, WebTarget } from '../types';
import { Styled as StyledInstance } from './constructWithOptions';
declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>;
declare const styled: (<Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>) & {
object: StyledInstance<"web", "object", React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, BaseObject>;
g: StyledInstance<"web", "g", React.SVGProps<SVGGElement>, BaseObject>;
map: StyledInstance<"web", "map", React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, BaseObject>;
big: StyledInstance<"web", "big", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
link: StyledInstance<"web", "link", React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, BaseObject>;
small: StyledInstance<"web", "small", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
sub: StyledInstance<"web", "sub", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
sup: StyledInstance<"web", "sup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
a: StyledInstance<"web", "a", React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, BaseObject>;
abbr: StyledInstance<"web", "abbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
address: StyledInstance<"web", "address", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
area: StyledInstance<"web", "area", React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>, BaseObject>;
article: StyledInstance<"web", "article", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
aside: StyledInstance<"web", "aside", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
audio: StyledInstance<"web", "audio", React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, BaseObject>;
b: StyledInstance<"web", "b", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
base: StyledInstance<"web", "base", React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>, BaseObject>;
bdi: StyledInstance<"web", "bdi", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
bdo: StyledInstance<"web", "bdo", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
blockquote: StyledInstance<"web", "blockquote", React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
body: StyledInstance<"web", "body", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, BaseObject>;
br: StyledInstance<"web", "br", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>, BaseObject>;
button: StyledInstance<"web", "button", React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, BaseObject>;
canvas: StyledInstance<"web", "canvas", React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, BaseObject>;
caption: StyledInstance<"web", "caption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
cite: StyledInstance<"web", "cite", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
code: StyledInstance<"web", "code", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
col: StyledInstance<"web", "col", React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
colgroup: StyledInstance<"web", "colgroup", React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
data: StyledInstance<"web", "data", React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, BaseObject>;
datalist: StyledInstance<"web", "datalist", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>, BaseObject>;
dd: StyledInstance<"web", "dd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
del: StyledInstance<"web", "del", React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
details: StyledInstance<"web", "details", React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, BaseObject>;
dfn: StyledInstance<"web", "dfn", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
dialog: StyledInstance<"web", "dialog", React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, BaseObject>;
div: StyledInstance<"web", "div", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BaseObject>;
dl: StyledInstance<"web", "dl", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>, BaseObject>;
dt: StyledInstance<"web", "dt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
em: StyledInstance<"web", "em", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
embed: StyledInstance<"web", "embed", React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>, BaseObject>;
fieldset: StyledInstance<"web", "fieldset", React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, BaseObject>;
figcaption: StyledInstance<"web", "figcaption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
figure: StyledInstance<"web", "figure", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
footer: StyledInstance<"web", "footer", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
form: StyledInstance<"web", "form", React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, BaseObject>;
h1: StyledInstance<"web", "h1", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h2: StyledInstance<"web", "h2", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h3: StyledInstance<"web", "h3", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h4: StyledInstance<"web", "h4", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h5: StyledInstance<"web", "h5", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h6: StyledInstance<"web", "h6", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
header: StyledInstance<"web", "header", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
hgroup: StyledInstance<"web", "hgroup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
hr: StyledInstance<"web", "hr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, BaseObject>;
html: StyledInstance<"web", "html", React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, BaseObject>;
i: StyledInstance<"web", "i", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
iframe: StyledInstance<"web", "iframe", React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, BaseObject>;
img: StyledInstance<"web", "img", React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, BaseObject>;
input: StyledInstance<"web", "input", React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, BaseObject>;
ins: StyledInstance<"web", "ins", React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
kbd: StyledInstance<"web", "kbd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
keygen: StyledInstance<"web", "keygen", React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
label: StyledInstance<"web", "label", React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, BaseObject>;
legend: StyledInstance<"web", "legend", React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, BaseObject>;
li: StyledInstance<"web", "li", React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, BaseObject>;
main: StyledInstance<"web", "main", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
mark: StyledInstance<"web", "mark", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
menu: StyledInstance<"web", "menu", React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
menuitem: StyledInstance<"web", "menuitem", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
meta: StyledInstance<"web", "meta", React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, BaseObject>;
meter: StyledInstance<"web", "meter", React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, BaseObject>;
nav: StyledInstance<"web", "nav", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
noscript: StyledInstance<"web", "noscript", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ol: StyledInstance<"web", "ol", React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, BaseObject>;
optgroup: StyledInstance<"web", "optgroup", React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, BaseObject>;
option: StyledInstance<"web", "option", React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, BaseObject>;
output: StyledInstance<"web", "output", React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, BaseObject>;
p: StyledInstance<"web", "p", React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, BaseObject>;
param: StyledInstance<"web", "param", React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>, BaseObject>;
picture: StyledInstance<"web", "picture", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
pre: StyledInstance<"web", "pre", React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>, BaseObject>;
progress: StyledInstance<"web", "progress", React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, BaseObject>;
q: StyledInstance<"web", "q", React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
rp: StyledInstance<"web", "rp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
rt: StyledInstance<"web", "rt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ruby: StyledInstance<"web", "ruby", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
s: StyledInstance<"web", "s", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
samp: StyledInstance<"web", "samp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
script: StyledInstance<"web", "script", React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, BaseObject>;
section: StyledInstance<"web", "section", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
select: StyledInstance<"web", "select", React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, BaseObject>;
source: StyledInstance<"web", "source", React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, BaseObject>;
span: StyledInstance<"web", "span", React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, BaseObject>;
strong: StyledInstance<"web", "strong", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
style: StyledInstance<"web", "style", React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, BaseObject>;
summary: StyledInstance<"web", "summary", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
table: StyledInstance<"web", "table", React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, BaseObject>;
tbody: StyledInstance<"web", "tbody", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
td: StyledInstance<"web", "td", React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, BaseObject>;
textarea: StyledInstance<"web", "textarea", React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, BaseObject>;
tfoot: StyledInstance<"web", "tfoot", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
th: StyledInstance<"web", "th", React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, BaseObject>;
thead: StyledInstance<"web", "thead", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
time: StyledInstance<"web", "time", React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, BaseObject>;
tr: StyledInstance<"web", "tr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, BaseObject>;
track: StyledInstance<"web", "track", React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, BaseObject>;
u: StyledInstance<"web", "u", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ul: StyledInstance<"web", "ul", React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, BaseObject>;
var: StyledInstance<"web", "var", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
video: StyledInstance<"web", "video", React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, BaseObject>;
wbr: StyledInstance<"web", "wbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
svg: StyledInstance<"web", "svg", React.SVGProps<SVGSVGElement>, BaseObject>;
circle: StyledInstance<"web", "circle", React.SVGProps<SVGCircleElement>, BaseObject>;
clipPath: StyledInstance<"web", "clipPath", React.SVGProps<SVGClipPathElement>, BaseObject>;
defs: StyledInstance<"web", "defs", React.SVGProps<SVGDefsElement>, BaseObject>;
ellipse: StyledInstance<"web", "ellipse", React.SVGProps<SVGEllipseElement>, BaseObject>;
foreignObject: StyledInstance<"web", "foreignObject", React.SVGProps<SVGForeignObjectElement>, BaseObject>;
image: StyledInstance<"web", "image", React.SVGProps<SVGImageElement>, BaseObject>;
line: StyledInstance<"web", "line", React.SVGLineElementAttributes<SVGLineElement>, BaseObject>;
linearGradient: StyledInstance<"web", "linearGradient", React.SVGProps<SVGLinearGradientElement>, BaseObject>;
marker: StyledInstance<"web", "marker", React.SVGProps<SVGMarkerElement>, BaseObject>;
mask: StyledInstance<"web", "mask", React.SVGProps<SVGMaskElement>, BaseObject>;
path: StyledInstance<"web", "path", React.SVGProps<SVGPathElement>, BaseObject>;
pattern: StyledInstance<"web", "pattern", React.SVGProps<SVGPatternElement>, BaseObject>;
polygon: StyledInstance<"web", "polygon", React.SVGProps<SVGPolygonElement>, BaseObject>;
polyline: StyledInstance<"web", "polyline", React.SVGProps<SVGPolylineElement>, BaseObject>;
radialGradient: StyledInstance<"web", "radialGradient", React.SVGProps<SVGRadialGradientElement>, BaseObject>;
rect: StyledInstance<"web", "rect", React.SVGProps<SVGRectElement>, BaseObject>;
stop: StyledInstance<"web", "stop", React.SVGProps<SVGStopElement>, BaseObject>;
text: StyledInstance<"web", "text", React.SVGTextElementAttributes<SVGTextElement>, BaseObject>;
tspan: StyledInstance<"web", "tspan", React.SVGProps<SVGTSpanElement>, BaseObject>;
use: StyledInstance<"web", "use", React.SVGProps<SVGUseElement>, BaseObject>;
};
export default styled;
export { StyledInstance };
/**
* This is the type of the `styled` HOC.
*/
export type Styled = typeof styled;
/**
* Use this higher-order type for scenarios where you are wrapping `styled`
* and providing extra props as a third-party library.
*/
export type LibraryStyled<LibraryProps extends object = BaseObject> = <Target extends WebTarget>(tag: Target) => typeof baseStyled<Target, LibraryProps>;

View File

@@ -0,0 +1,12 @@
import { SC_VERSION } from './constants';
import createGlobalStyle from './constructors/createGlobalStyle';
import css from './constructors/css';
import keyframes from './constructors/keyframes';
import withTheme from './hoc/withTheme';
import ServerStyleSheet from './models/ServerStyleSheet';
import { IStyleSheetContext, IStyleSheetManager, IStylisContext, StyleSheetConsumer, StyleSheetContext, StyleSheetManager } from './models/StyleSheetManager';
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from './models/ThemeProvider';
import isStyledComponent from './utils/isStyledComponent';
export * from './secretInternals';
export { Attrs, DefaultTheme, ShouldForwardProp } from './types';
export { IStyleSheetContext, IStyleSheetManager, IStylisContext, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, createGlobalStyle, css, isStyledComponent, keyframes, useTheme, SC_VERSION as version, withTheme, };

View File

@@ -0,0 +1,8 @@
export declare const SC_ATTR: string;
export declare const SC_ATTR_ACTIVE = "active";
export declare const SC_ATTR_VERSION = "data-styled-version";
export declare const SC_VERSION: string;
export declare const SPLITTER = "/*!sc*/\n";
export declare const IS_BROWSER: boolean;
export declare const DISABLE_SPEEDY: boolean;
export declare const STATIC_EXECUTION_CONTEXT: {};

View File

@@ -0,0 +1,18 @@
/// <reference types="react" />
import { Attrs, BaseObject, ExecutionProps, Interpolation, IStyledComponent, IStyledComponentFactory, KnownTarget, NoInfer, Runtime, StyledOptions, StyledTarget, Styles, Substitute } from '../types';
type AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P ? P extends object ? P : never : T extends object ? T : never;
/**
* Based on Attrs being a simple object or function that returns
* a prop object, inspect the attrs result and attempt to extract
* any "as" prop usage to modify the runtime target.
*/
type AttrsTarget<R extends Runtime, T extends Attrs<any>, FallbackTarget extends StyledTarget<R>, Result extends ExecutionProps = AttrsResult<T>> = Result extends {
as: infer RuntimeTarget;
} ? RuntimeTarget extends KnownTarget ? RuntimeTarget : FallbackTarget : FallbackTarget;
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
<Props extends object = BaseObject, Statics extends object = BaseObject>(initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>, ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics & (R extends 'web' ? Target extends string ? {} : Omit<Target, keyof React.Component<any>> : {});
attrs: <Props extends object = BaseObject, PrivateMergedProps extends object = Substitute<OuterProps, Props>, PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>, PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>>(attrs: PrivateAttrsArg) => Styled<R, PrivateResolvedTarget, PrivateResolvedTarget extends KnownTarget ? Substitute<Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>, Props> : PrivateMergedProps, OuterStatics>;
withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
}
export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.ComponentPropsWithRef<Target> : BaseObject, OuterStatics extends object = BaseObject>(componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>, tag: StyledTarget<R>, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
export {};

View File

@@ -0,0 +1,3 @@
import React from 'react';
import { ExecutionProps, Interpolation, Styles } from '../types';
export default function createGlobalStyle<Props extends object>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): React.NamedExoticComponent<ExecutionProps & Props>;

View File

@@ -0,0 +1,4 @@
import { Interpolation, NoInfer, RuleSet, Styles } from '../types';
declare function css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;
declare function css<Props extends object>(styles: Styles<NoInfer<Props>>, ...interpolations: Interpolation<NoInfer<Props>>[]): RuleSet<NoInfer<Props>>;
export default css;

View File

@@ -0,0 +1,3 @@
import Keyframes from '../models/Keyframes';
import { Interpolation, Styles } from '../types';
export default function keyframes<Props extends object = {}>(strings: Styles<Props>, ...interpolations: Array<Interpolation<Props>>): Keyframes;

View File

@@ -0,0 +1,150 @@
import * as React from 'react';
import { BaseObject, KnownTarget, WebTarget } from '../types';
import { Styled as StyledInstance } from './constructWithOptions';
declare const baseStyled: <Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>;
declare const styled: (<Target extends WebTarget, InjectedProps extends object = BaseObject>(tag: Target) => StyledInstance<"web", Target, Target extends KnownTarget ? React.ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, BaseObject>) & {
object: StyledInstance<"web", "object", React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, BaseObject>;
g: StyledInstance<"web", "g", React.SVGProps<SVGGElement>, BaseObject>;
map: StyledInstance<"web", "map", React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, BaseObject>;
big: StyledInstance<"web", "big", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
link: StyledInstance<"web", "link", React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, BaseObject>;
small: StyledInstance<"web", "small", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
sub: StyledInstance<"web", "sub", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
sup: StyledInstance<"web", "sup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
a: StyledInstance<"web", "a", React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, BaseObject>;
abbr: StyledInstance<"web", "abbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
address: StyledInstance<"web", "address", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
area: StyledInstance<"web", "area", React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>, BaseObject>;
article: StyledInstance<"web", "article", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
aside: StyledInstance<"web", "aside", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
audio: StyledInstance<"web", "audio", React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, BaseObject>;
b: StyledInstance<"web", "b", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
base: StyledInstance<"web", "base", React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>, BaseObject>;
bdi: StyledInstance<"web", "bdi", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
bdo: StyledInstance<"web", "bdo", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
blockquote: StyledInstance<"web", "blockquote", React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
body: StyledInstance<"web", "body", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, BaseObject>;
br: StyledInstance<"web", "br", React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>, BaseObject>;
button: StyledInstance<"web", "button", React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, BaseObject>;
canvas: StyledInstance<"web", "canvas", React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, BaseObject>;
caption: StyledInstance<"web", "caption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
cite: StyledInstance<"web", "cite", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
code: StyledInstance<"web", "code", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
col: StyledInstance<"web", "col", React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
colgroup: StyledInstance<"web", "colgroup", React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, BaseObject>;
data: StyledInstance<"web", "data", React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>, BaseObject>;
datalist: StyledInstance<"web", "datalist", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>, BaseObject>;
dd: StyledInstance<"web", "dd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
del: StyledInstance<"web", "del", React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
details: StyledInstance<"web", "details", React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, BaseObject>;
dfn: StyledInstance<"web", "dfn", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
dialog: StyledInstance<"web", "dialog", React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, BaseObject>;
div: StyledInstance<"web", "div", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BaseObject>;
dl: StyledInstance<"web", "dl", React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>, BaseObject>;
dt: StyledInstance<"web", "dt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
em: StyledInstance<"web", "em", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
embed: StyledInstance<"web", "embed", React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>, BaseObject>;
fieldset: StyledInstance<"web", "fieldset", React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, BaseObject>;
figcaption: StyledInstance<"web", "figcaption", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
figure: StyledInstance<"web", "figure", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
footer: StyledInstance<"web", "footer", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
form: StyledInstance<"web", "form", React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, BaseObject>;
h1: StyledInstance<"web", "h1", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h2: StyledInstance<"web", "h2", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h3: StyledInstance<"web", "h3", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h4: StyledInstance<"web", "h4", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h5: StyledInstance<"web", "h5", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
h6: StyledInstance<"web", "h6", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, BaseObject>;
header: StyledInstance<"web", "header", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
hgroup: StyledInstance<"web", "hgroup", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
hr: StyledInstance<"web", "hr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, BaseObject>;
html: StyledInstance<"web", "html", React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>, BaseObject>;
i: StyledInstance<"web", "i", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
iframe: StyledInstance<"web", "iframe", React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, BaseObject>;
img: StyledInstance<"web", "img", React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, BaseObject>;
input: StyledInstance<"web", "input", React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, BaseObject>;
ins: StyledInstance<"web", "ins", React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>, BaseObject>;
kbd: StyledInstance<"web", "kbd", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
keygen: StyledInstance<"web", "keygen", React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
label: StyledInstance<"web", "label", React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, BaseObject>;
legend: StyledInstance<"web", "legend", React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, BaseObject>;
li: StyledInstance<"web", "li", React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, BaseObject>;
main: StyledInstance<"web", "main", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
mark: StyledInstance<"web", "mark", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
menu: StyledInstance<"web", "menu", React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
menuitem: StyledInstance<"web", "menuitem", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
meta: StyledInstance<"web", "meta", React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, BaseObject>;
meter: StyledInstance<"web", "meter", React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, BaseObject>;
nav: StyledInstance<"web", "nav", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
noscript: StyledInstance<"web", "noscript", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ol: StyledInstance<"web", "ol", React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, BaseObject>;
optgroup: StyledInstance<"web", "optgroup", React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, BaseObject>;
option: StyledInstance<"web", "option", React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, BaseObject>;
output: StyledInstance<"web", "output", React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, BaseObject>;
p: StyledInstance<"web", "p", React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, BaseObject>;
param: StyledInstance<"web", "param", React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>, BaseObject>;
picture: StyledInstance<"web", "picture", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
pre: StyledInstance<"web", "pre", React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>, BaseObject>;
progress: StyledInstance<"web", "progress", React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, BaseObject>;
q: StyledInstance<"web", "q", React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, BaseObject>;
rp: StyledInstance<"web", "rp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
rt: StyledInstance<"web", "rt", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ruby: StyledInstance<"web", "ruby", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
s: StyledInstance<"web", "s", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
samp: StyledInstance<"web", "samp", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
script: StyledInstance<"web", "script", React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, BaseObject>;
section: StyledInstance<"web", "section", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
select: StyledInstance<"web", "select", React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, BaseObject>;
source: StyledInstance<"web", "source", React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, BaseObject>;
span: StyledInstance<"web", "span", React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, BaseObject>;
strong: StyledInstance<"web", "strong", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
style: StyledInstance<"web", "style", React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, BaseObject>;
summary: StyledInstance<"web", "summary", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
table: StyledInstance<"web", "table", React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, BaseObject>;
tbody: StyledInstance<"web", "tbody", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
td: StyledInstance<"web", "td", React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, BaseObject>;
textarea: StyledInstance<"web", "textarea", React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, BaseObject>;
tfoot: StyledInstance<"web", "tfoot", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
th: StyledInstance<"web", "th", React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, BaseObject>;
thead: StyledInstance<"web", "thead", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, BaseObject>;
time: StyledInstance<"web", "time", React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, BaseObject>;
tr: StyledInstance<"web", "tr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, BaseObject>;
track: StyledInstance<"web", "track", React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, BaseObject>;
u: StyledInstance<"web", "u", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
ul: StyledInstance<"web", "ul", React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, BaseObject>;
var: StyledInstance<"web", "var", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
video: StyledInstance<"web", "video", React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, BaseObject>;
wbr: StyledInstance<"web", "wbr", React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, BaseObject>;
svg: StyledInstance<"web", "svg", React.SVGProps<SVGSVGElement>, BaseObject>;
circle: StyledInstance<"web", "circle", React.SVGProps<SVGCircleElement>, BaseObject>;
clipPath: StyledInstance<"web", "clipPath", React.SVGProps<SVGClipPathElement>, BaseObject>;
defs: StyledInstance<"web", "defs", React.SVGProps<SVGDefsElement>, BaseObject>;
ellipse: StyledInstance<"web", "ellipse", React.SVGProps<SVGEllipseElement>, BaseObject>;
foreignObject: StyledInstance<"web", "foreignObject", React.SVGProps<SVGForeignObjectElement>, BaseObject>;
image: StyledInstance<"web", "image", React.SVGProps<SVGImageElement>, BaseObject>;
line: StyledInstance<"web", "line", React.SVGLineElementAttributes<SVGLineElement>, BaseObject>;
linearGradient: StyledInstance<"web", "linearGradient", React.SVGProps<SVGLinearGradientElement>, BaseObject>;
marker: StyledInstance<"web", "marker", React.SVGProps<SVGMarkerElement>, BaseObject>;
mask: StyledInstance<"web", "mask", React.SVGProps<SVGMaskElement>, BaseObject>;
path: StyledInstance<"web", "path", React.SVGProps<SVGPathElement>, BaseObject>;
pattern: StyledInstance<"web", "pattern", React.SVGProps<SVGPatternElement>, BaseObject>;
polygon: StyledInstance<"web", "polygon", React.SVGProps<SVGPolygonElement>, BaseObject>;
polyline: StyledInstance<"web", "polyline", React.SVGProps<SVGPolylineElement>, BaseObject>;
radialGradient: StyledInstance<"web", "radialGradient", React.SVGProps<SVGRadialGradientElement>, BaseObject>;
rect: StyledInstance<"web", "rect", React.SVGProps<SVGRectElement>, BaseObject>;
stop: StyledInstance<"web", "stop", React.SVGProps<SVGStopElement>, BaseObject>;
text: StyledInstance<"web", "text", React.SVGTextElementAttributes<SVGTextElement>, BaseObject>;
tspan: StyledInstance<"web", "tspan", React.SVGProps<SVGTSpanElement>, BaseObject>;
use: StyledInstance<"web", "use", React.SVGProps<SVGUseElement>, BaseObject>;
};
export default styled;
export { StyledInstance };
/**
* This is the type of the `styled` HOC.
*/
export type Styled = typeof styled;
/**
* Use this higher-order type for scenarios where you are wrapping `styled`
* and providing extra props as a third-party library.
*/
export type LibraryStyled<LibraryProps extends object = BaseObject> = <Target extends WebTarget>(tag: Target) => typeof baseStyled<Target, LibraryProps>;

View File

@@ -0,0 +1,4 @@
import React from 'react';
import { AnyComponent, ExecutionProps } from '../types';
import { NonReactStatics } from '../utils/hoist';
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<React.JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & NonReactStatics<T>;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,2 @@
import styled from './constructors/styled';
export default styled;

View File

@@ -0,0 +1,4 @@
import styled, { LibraryStyled, Styled, StyledInstance } from './constructors/styled';
export * from './base';
export { CSSKeyframes, CSSObject, CSSProp, CSSProperties, CSSPseudos, DataAttributes, DefaultTheme, ExecutionContext, ExecutionProps, FastOmit, IStyledComponent, IStyledComponentFactory, IStyledStatics, Interpolation, PolymorphicComponent, PolymorphicComponentProps, RuleSet, Runtime, StyleFunction, StyledObject, StyledOptions, SupportedHTMLElements, WebTarget, } from './types';
export { LibraryStyled, Styled, StyledInstance, styled as default, styled };

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;
}

Some files were not shown because too many files have changed in this diff Show More