styled-components 6.0.0-beta.12 → 6.0.0-beta.14
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/dist/base.d.ts +1 -7
- package/dist/models/ComponentStyle.d.ts +0 -1
- package/dist/models/StyleSheetManager.d.ts +6 -7
- package/dist/models/ThemeProvider.d.ts +1 -0
- package/dist/native/index.d.ts +1 -2
- package/dist/sheet/GroupedTag.d.ts +1 -1
- package/dist/styled-components.browser.cjs.js +1 -1859
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1833
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1880
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1854
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +199 -196
- 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/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/determineTheme.d.ts +4 -2
- package/dist/utils/domElements.d.ts +1 -1
- package/dist/utils/flatten.d.ts +1 -1
- package/dist/utils/isFunction.d.ts +1 -1
- package/dist/utils/isPlainObject.d.ts +1 -1
- package/dist/utils/isStatelessFunction.d.ts +1 -1
- package/dist/utils/joinStrings.d.ts +2 -1
- package/native/dist/base.d.ts +1 -7
- package/native/dist/models/ComponentStyle.d.ts +0 -1
- package/native/dist/models/StyleSheetManager.d.ts +6 -7
- package/native/dist/models/ThemeProvider.d.ts +1 -0
- package/native/dist/native/index.d.ts +1 -2
- package/native/dist/sheet/GroupedTag.d.ts +1 -1
- package/native/dist/styled-components.native.cjs.js +1 -1324
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1306
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/types.d.ts +1 -1
- package/native/dist/utils/determineTheme.d.ts +4 -2
- package/native/dist/utils/domElements.d.ts +1 -1
- package/native/dist/utils/flatten.d.ts +1 -1
- package/native/dist/utils/isFunction.d.ts +1 -1
- package/native/dist/utils/isPlainObject.d.ts +1 -1
- package/native/dist/utils/isStatelessFunction.d.ts +1 -1
- package/native/dist/utils/joinStrings.d.ts +2 -1
- package/package.json +1 -12
- package/dist/hooks/useTheme.d.ts +0 -3
package/dist/base.d.ts
CHANGED
|
@@ -3,16 +3,10 @@ import createGlobalStyle from './constructors/createGlobalStyle';
|
|
|
3
3
|
import css from './constructors/css';
|
|
4
4
|
import keyframes from './constructors/keyframes';
|
|
5
5
|
import withTheme from './hoc/withTheme';
|
|
6
|
-
import useTheme from './hooks/useTheme';
|
|
7
6
|
import ServerStyleSheet from './models/ServerStyleSheet';
|
|
8
7
|
import { IStyleSheetContext, IStyleSheetManager, IStylisContext, StyleSheetConsumer, StyleSheetContext, StyleSheetManager } from './models/StyleSheetManager';
|
|
9
|
-
import ThemeProvider, { ThemeConsumer, ThemeContext } from './models/ThemeProvider';
|
|
8
|
+
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from './models/ThemeProvider';
|
|
10
9
|
import isStyledComponent from './utils/isStyledComponent';
|
|
11
|
-
declare global {
|
|
12
|
-
interface Window {
|
|
13
|
-
'__styled-components-init__'?: number;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
10
|
export * from './secretInternals';
|
|
17
11
|
export { AttrsArg as Attrs, DefaultTheme, ShouldForwardProp } from './types';
|
|
18
12
|
export { createGlobalStyle, css, isStyledComponent, IStyleSheetManager, IStyleSheetContext, IStylisContext, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, };
|
|
@@ -8,7 +8,6 @@ export default class ComponentStyle {
|
|
|
8
8
|
baseStyle: ComponentStyle | null | undefined;
|
|
9
9
|
componentId: string;
|
|
10
10
|
isStatic: boolean;
|
|
11
|
-
names: string[];
|
|
12
11
|
rules: RuleSet<any>;
|
|
13
12
|
staticRulesId: string;
|
|
14
13
|
constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle);
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import StyleSheet from '../sheet';
|
|
3
3
|
import { ShouldForwardProp, Stringifier } from '../types';
|
|
4
|
+
export declare const mainSheet: StyleSheet;
|
|
5
|
+
export declare const mainStylis: Stringifier;
|
|
4
6
|
export type IStyleSheetContext = {
|
|
5
7
|
shouldForwardProp?: ShouldForwardProp<'web'>;
|
|
6
|
-
styleSheet
|
|
8
|
+
styleSheet: StyleSheet;
|
|
9
|
+
stylis: Stringifier;
|
|
7
10
|
};
|
|
8
11
|
export declare const StyleSheetContext: React.Context<IStyleSheetContext>;
|
|
9
12
|
export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>;
|
|
10
13
|
export type IStylisContext = Stringifier | void;
|
|
11
14
|
export declare const StylisContext: React.Context<IStylisContext>;
|
|
12
15
|
export declare const StylisConsumer: React.Consumer<IStylisContext>;
|
|
13
|
-
export declare
|
|
14
|
-
export declare const mainStylis: Stringifier;
|
|
15
|
-
export declare function useShouldForwardProp(): ShouldForwardProp<"web"> | undefined;
|
|
16
|
-
export declare function useStyleSheet(): StyleSheet;
|
|
17
|
-
export declare function useStylis(): Stringifier;
|
|
16
|
+
export declare function useStyleSheetContext(): IStyleSheetContext;
|
|
18
17
|
export type IStyleSheetManager = React.PropsWithChildren<{
|
|
19
18
|
/**
|
|
20
19
|
* If desired, you can pass this prop to disable "speedy" insertion mode, which
|
|
@@ -26,7 +25,7 @@ export type IStyleSheetManager = React.PropsWithChildren<{
|
|
|
26
25
|
* If you are working exclusively with modern browsers, vendor prefixes can often be omitted
|
|
27
26
|
* to reduce the weight of CSS on the page.
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
enableVendorPrefixes?: boolean;
|
|
30
29
|
/**
|
|
31
30
|
* Provide an optional selector to be prepended to all generated style rules.
|
|
32
31
|
*/
|
|
@@ -32,6 +32,7 @@ type Props = {
|
|
|
32
32
|
};
|
|
33
33
|
export declare const ThemeContext: React.Context<DefaultTheme | undefined>;
|
|
34
34
|
export declare const ThemeConsumer: React.Consumer<DefaultTheme | undefined>;
|
|
35
|
+
export declare function useTheme(): DefaultTheme | undefined;
|
|
35
36
|
/**
|
|
36
37
|
* Provide a theme to an entire react component tree via context
|
|
37
38
|
*/
|
package/dist/native/index.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Styled } from '../constructors/constructWithOptions';
|
|
3
3
|
import css from '../constructors/css';
|
|
4
4
|
import withTheme from '../hoc/withTheme';
|
|
5
|
-
import useTheme from '../
|
|
6
|
-
import ThemeProvider, { ThemeConsumer, ThemeContext } from '../models/ThemeProvider';
|
|
5
|
+
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';
|
|
7
6
|
import { NativeTarget } from '../types';
|
|
8
7
|
import isStyledComponent from '../utils/isStyledComponent';
|
|
9
8
|
declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : object, object, object>) & {
|
|
@@ -5,7 +5,7 @@ export declare const makeGroupedTag: (tag: Tag) => {
|
|
|
5
5
|
length: number;
|
|
6
6
|
tag: Tag;
|
|
7
7
|
indexOfGroup(group: number): number;
|
|
8
|
-
insertRules(group: number, rules: string
|
|
8
|
+
insertRules(group: number, rules: string[]): void;
|
|
9
9
|
clearGroup(group: number): void;
|
|
10
10
|
getGroup(group: number): string;
|
|
11
11
|
};
|