styled-components 6.2.0 → 6.2.1-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +165 -100
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/native/dist/constants.d.ts +5 -0
- package/native/dist/dist/constants.d.ts +5 -0
- package/native/dist/dist/hoc/withTheme.spec.d.ts +1 -0
- package/native/dist/dist/index.d.ts +2 -2
- package/native/dist/dist/models/ComponentStyle.d.ts +4 -1
- package/native/dist/dist/sheet/Tag.d.ts +4 -4
- package/native/dist/dist/test/utils.d.ts +33 -14
- package/native/dist/dist/types.d.ts +11 -3
- package/native/dist/dist/utils/domElements.d.ts +2 -2
- package/native/dist/dist/utils/isRSC.d.ts +11 -0
- package/native/dist/hoc/withTheme.spec.d.ts +1 -0
- package/native/dist/index.d.ts +2 -2
- package/native/dist/models/ComponentStyle.d.ts +4 -1
- package/native/dist/sheet/Tag.d.ts +4 -4
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/utils.d.ts +32 -13
- package/native/dist/types.d.ts +11 -3
- package/native/dist/utils/domElements.d.ts +2 -2
- package/native/dist/utils/isRSC.d.ts +11 -0
- package/package.json +6 -6
- package/dist/base.d.ts +0 -12
- package/dist/constants.d.ts +0 -8
- package/dist/constructors/constructWithOptions.d.ts +0 -17
- package/dist/constructors/createGlobalStyle.d.ts +0 -3
- package/dist/constructors/css.d.ts +0 -4
- package/dist/constructors/keyframes.d.ts +0 -3
- package/dist/constructors/styled.d.ts +0 -17
- package/dist/hoc/withTheme.d.ts +0 -4
- package/dist/index-standalone.d.ts +0 -2
- package/dist/index.d.ts +0 -4
- package/dist/models/ComponentStyle.d.ts +0 -15
- package/dist/models/GlobalStyle.d.ts +0 -11
- package/dist/models/InlineStyle.d.ts +0 -7
- package/dist/models/Keyframes.d.ts +0 -10
- package/dist/models/ServerStyleSheet.d.ts +0 -15
- package/dist/models/StyleSheetManager.d.ts +0 -65
- package/dist/models/StyledComponent.d.ts +0 -3
- package/dist/models/StyledNativeComponent.d.ts +0 -3
- package/dist/models/ThemeProvider.d.ts +0 -47
- package/dist/native/index.d.ts +0 -19
- package/dist/secretInternals.d.ts +0 -5
- package/dist/sheet/GroupIDAllocator.d.ts +0 -4
- package/dist/sheet/GroupedTag.d.ts +0 -11
- package/dist/sheet/Rehydration.d.ts +0 -3
- package/dist/sheet/Sheet.d.ts +0 -40
- package/dist/sheet/Tag.d.ts +0 -55
- package/dist/sheet/dom.d.ts +0 -5
- package/dist/sheet/index.d.ts +0 -1
- package/dist/sheet/types.d.ts +0 -36
- package/dist/test/globals.d.ts +0 -2
- package/dist/test/utils.d.ts +0 -144
- package/dist/test/veryLargeUnionType.d.ts +0 -1
- package/dist/types.d.ts +0 -204
- package/dist/utils/addUnitIfNeeded.d.ts +0 -1
- package/dist/utils/checkDynamicCreation.d.ts +0 -1
- package/dist/utils/createWarnTooManyClasses.d.ts +0 -3
- package/dist/utils/determineTheme.d.ts +0 -4
- package/dist/utils/domElements.d.ts +0 -4
- package/dist/utils/empties.d.ts +0 -3
- package/dist/utils/error.d.ts +0 -5
- package/dist/utils/errors.d.ts +0 -21
- package/dist/utils/escape.d.ts +0 -5
- package/dist/utils/flatten.d.ts +0 -4
- package/dist/utils/generateAlphabeticName.d.ts +0 -1
- package/dist/utils/generateComponentId.d.ts +0 -1
- package/dist/utils/generateDisplayName.d.ts +0 -2
- package/dist/utils/getComponentName.d.ts +0 -2
- package/dist/utils/hash.d.ts +0 -3
- package/dist/utils/hoist.d.ts +0 -51
- package/dist/utils/hyphenateStyleName.d.ts +0 -14
- package/dist/utils/interleave.d.ts +0 -2
- package/dist/utils/isFunction.d.ts +0 -1
- package/dist/utils/isPlainObject.d.ts +0 -1
- package/dist/utils/isStatelessFunction.d.ts +0 -1
- package/dist/utils/isStaticRules.d.ts +0 -2
- package/dist/utils/isStyledComponent.d.ts +0 -2
- package/dist/utils/isTag.d.ts +0 -2
- package/dist/utils/joinStrings.d.ts +0 -5
- package/dist/utils/mixinDeep.d.ts +0 -6
- package/dist/utils/nonce.d.ts +0 -1
- package/dist/utils/setToString.d.ts +0 -17
- package/dist/utils/stylis.d.ts +0 -10
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
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"];
|
|
2
|
-
declare const _default: Set<"object" | "g" | "map" | "big" | "link" | "small" | "sub" | "sup" | "input" | "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" | "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" | "circle" | "clipPath" | "defs" | "ellipse" | "foreignObject" | "image" | "line" | "linearGradient" | "marker" | "mask" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "text" | "tspan" | "use">;
|
|
3
|
-
export default _default;
|
|
4
|
-
export type SupportedHTMLElements = (typeof elements)[number];
|
package/dist/utils/empties.d.ts
DELETED
package/dist/utils/error.d.ts
DELETED
package/dist/utils/errors.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
'1': string;
|
|
3
|
-
'2': string;
|
|
4
|
-
'3': string;
|
|
5
|
-
'4': string;
|
|
6
|
-
'5': string;
|
|
7
|
-
'6': string;
|
|
8
|
-
'7': string;
|
|
9
|
-
'8': string;
|
|
10
|
-
'9': string;
|
|
11
|
-
'10': string;
|
|
12
|
-
'11': string;
|
|
13
|
-
'12': string;
|
|
14
|
-
'13': string;
|
|
15
|
-
'14': string;
|
|
16
|
-
'15': string;
|
|
17
|
-
'16': string;
|
|
18
|
-
'17': string;
|
|
19
|
-
'18': string;
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
package/dist/utils/escape.d.ts
DELETED
package/dist/utils/flatten.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import StyleSheet from '../sheet';
|
|
2
|
-
import { Dict, ExecutionContext, Interpolation, RuleSet, Stringifier } from '../types';
|
|
3
|
-
export declare const objToCssArray: (obj: Dict<any>) => string[];
|
|
4
|
-
export default function flatten<Props extends object>(chunk: Interpolation<object>, executionContext?: (ExecutionContext & Props) | undefined, styleSheet?: StyleSheet | undefined, stylisInstance?: Stringifier | undefined): RuleSet<Props>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function generateAlphabeticName(code: number): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function generateComponentId(str: string): string;
|
package/dist/utils/hash.d.ts
DELETED
package/dist/utils/hoist.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnyComponent } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Adapted from hoist-non-react-statics to avoid the react-is dependency.
|
|
5
|
-
*/
|
|
6
|
-
declare const REACT_STATICS: {
|
|
7
|
-
childContextTypes: boolean;
|
|
8
|
-
contextType: boolean;
|
|
9
|
-
contextTypes: boolean;
|
|
10
|
-
defaultProps: boolean;
|
|
11
|
-
displayName: boolean;
|
|
12
|
-
getDefaultProps: boolean;
|
|
13
|
-
getDerivedStateFromError: boolean;
|
|
14
|
-
getDerivedStateFromProps: boolean;
|
|
15
|
-
mixins: boolean;
|
|
16
|
-
propTypes: boolean;
|
|
17
|
-
type: boolean;
|
|
18
|
-
};
|
|
19
|
-
declare const KNOWN_STATICS: {
|
|
20
|
-
name: boolean;
|
|
21
|
-
length: boolean;
|
|
22
|
-
prototype: boolean;
|
|
23
|
-
caller: boolean;
|
|
24
|
-
callee: boolean;
|
|
25
|
-
arguments: boolean;
|
|
26
|
-
arity: boolean;
|
|
27
|
-
};
|
|
28
|
-
declare const FORWARD_REF_STATICS: {
|
|
29
|
-
$$typeof: boolean;
|
|
30
|
-
render: boolean;
|
|
31
|
-
defaultProps: boolean;
|
|
32
|
-
displayName: boolean;
|
|
33
|
-
propTypes: boolean;
|
|
34
|
-
};
|
|
35
|
-
declare const MEMO_STATICS: {
|
|
36
|
-
$$typeof: boolean;
|
|
37
|
-
compare: boolean;
|
|
38
|
-
defaultProps: boolean;
|
|
39
|
-
displayName: boolean;
|
|
40
|
-
propTypes: boolean;
|
|
41
|
-
type: boolean;
|
|
42
|
-
};
|
|
43
|
-
type OmniComponent = AnyComponent;
|
|
44
|
-
type ExcludeList = {
|
|
45
|
-
[key: string]: true;
|
|
46
|
-
};
|
|
47
|
-
export type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = {
|
|
48
|
-
[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];
|
|
49
|
-
};
|
|
50
|
-
export default function hoistNonReactStatics<T extends OmniComponent, S extends OmniComponent, C extends ExcludeList = {}>(targetComponent: T, sourceComponent: S, excludelist?: C | undefined): T & NonReactStatics<S, C>;
|
|
51
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hyphenates a camelcased CSS property name, for example:
|
|
3
|
-
*
|
|
4
|
-
* > hyphenateStyleName('backgroundColor')
|
|
5
|
-
* < "background-color"
|
|
6
|
-
* > hyphenateStyleName('MozTransition')
|
|
7
|
-
* < "-moz-transition"
|
|
8
|
-
* > hyphenateStyleName('msTransition')
|
|
9
|
-
* < "-ms-transition"
|
|
10
|
-
*
|
|
11
|
-
* As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
|
|
12
|
-
* is converted to `-ms-`.
|
|
13
|
-
*/
|
|
14
|
-
export default function hyphenateStyleName(string: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function isFunction(test: any): test is Function;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function isPlainObject(x: any): x is Record<any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function isStatelessFunction(test: any): test is Function;
|
package/dist/utils/isTag.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Arrays & POJOs merged recursively, other objects and value types are overridden
|
|
3
|
-
* If target is not a POJO or an Array, it will get source properties injected via shallow merge
|
|
4
|
-
* Source objects applied left to right. Mutates & returns target. Similar to lodash merge.
|
|
5
|
-
*/
|
|
6
|
-
export default function mixinDeep(target: any, ...sources: any[]): any;
|
package/dist/utils/nonce.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function getNonce(): string | null;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* If the Object prototype is frozen, the "toString" property is non-writable. This means that any objects which inherit this property
|
|
3
|
-
* cannot have the property changed using a "=" assignment operator. If using strict mode, attempting that will cause an error. If not using
|
|
4
|
-
* strict mode, attempting that will be silently ignored.
|
|
5
|
-
*
|
|
6
|
-
* If the Object prototype is frozen, inherited non-writable properties can still be shadowed using one of two mechanisms:
|
|
7
|
-
*
|
|
8
|
-
* 1. ES6 class methods: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#methods
|
|
9
|
-
* 2. Using the `Object.defineProperty()` static method:
|
|
10
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
|
|
11
|
-
*
|
|
12
|
-
* However, this project uses Babel to transpile ES6 classes, and transforms ES6 class methods to use the assignment operator instead:
|
|
13
|
-
* https://babeljs.io/docs/babel-plugin-transform-class-properties#options
|
|
14
|
-
*
|
|
15
|
-
* Therefore, the most compatible way to shadow the prototype's "toString" property is to define a new "toString" property on this object.
|
|
16
|
-
*/
|
|
17
|
-
export declare function setToString(object: object, toStringFn: () => string): void;
|
package/dist/utils/stylis.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as stylis from 'stylis';
|
|
2
|
-
import { Stringifier } from '../types';
|
|
3
|
-
export type ICreateStylisInstance = {
|
|
4
|
-
options?: {
|
|
5
|
-
namespace?: string | undefined;
|
|
6
|
-
prefix?: boolean | undefined;
|
|
7
|
-
} | undefined;
|
|
8
|
-
plugins?: stylis.Middleware[] | undefined;
|
|
9
|
-
};
|
|
10
|
-
export default function createStylisInstance({ options, plugins, }?: ICreateStylisInstance): Stringifier;
|