styled-components 6.0.0-beta.13 → 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.
Files changed (47) hide show
  1. package/dist/base.d.ts +1 -2
  2. package/dist/models/ComponentStyle.d.ts +0 -1
  3. package/dist/models/StyleSheetManager.d.ts +6 -7
  4. package/dist/models/ThemeProvider.d.ts +1 -0
  5. package/dist/native/index.d.ts +1 -2
  6. package/dist/sheet/GroupedTag.d.ts +1 -1
  7. package/dist/styled-components.browser.cjs.js +1 -1862
  8. package/dist/styled-components.browser.cjs.js.map +1 -1
  9. package/dist/styled-components.browser.esm.js +1 -1836
  10. package/dist/styled-components.browser.esm.js.map +1 -1
  11. package/dist/styled-components.cjs.js +1 -1886
  12. package/dist/styled-components.cjs.js.map +1 -1
  13. package/dist/styled-components.esm.js +1 -1860
  14. package/dist/styled-components.esm.js.map +1 -1
  15. package/dist/styled-components.js +185 -185
  16. package/dist/styled-components.js.map +1 -1
  17. package/dist/styled-components.min.js +1 -1
  18. package/dist/styled-components.min.js.map +1 -1
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/dist/types.d.ts +1 -1
  21. package/dist/utils/determineTheme.d.ts +4 -2
  22. package/dist/utils/domElements.d.ts +1 -1
  23. package/dist/utils/flatten.d.ts +1 -1
  24. package/dist/utils/isFunction.d.ts +1 -1
  25. package/dist/utils/isPlainObject.d.ts +1 -1
  26. package/dist/utils/isStatelessFunction.d.ts +1 -1
  27. package/dist/utils/joinStrings.d.ts +2 -1
  28. package/native/dist/base.d.ts +1 -2
  29. package/native/dist/models/ComponentStyle.d.ts +0 -1
  30. package/native/dist/models/StyleSheetManager.d.ts +6 -7
  31. package/native/dist/models/ThemeProvider.d.ts +1 -0
  32. package/native/dist/native/index.d.ts +1 -2
  33. package/native/dist/sheet/GroupedTag.d.ts +1 -1
  34. package/native/dist/styled-components.native.cjs.js +1 -1324
  35. package/native/dist/styled-components.native.cjs.js.map +1 -1
  36. package/native/dist/styled-components.native.esm.js +1 -1306
  37. package/native/dist/styled-components.native.esm.js.map +1 -1
  38. package/native/dist/types.d.ts +1 -1
  39. package/native/dist/utils/determineTheme.d.ts +4 -2
  40. package/native/dist/utils/domElements.d.ts +1 -1
  41. package/native/dist/utils/flatten.d.ts +1 -1
  42. package/native/dist/utils/isFunction.d.ts +1 -1
  43. package/native/dist/utils/isPlainObject.d.ts +1 -1
  44. package/native/dist/utils/isStatelessFunction.d.ts +1 -1
  45. package/native/dist/utils/joinStrings.d.ts +2 -1
  46. package/package.json +1 -1
  47. package/dist/hooks/useTheme.d.ts +0 -3
package/dist/base.d.ts CHANGED
@@ -3,10 +3,9 @@ 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
10
  export * from './secretInternals';
12
11
  export { AttrsArg as Attrs, DefaultTheme, ShouldForwardProp } from './types';
@@ -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?: 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 const mainSheet: StyleSheet;
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
- disableVendorPrefixes?: boolean;
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
  */
@@ -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 '../hooks/useTheme';
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 | string[]): void;
8
+ insertRules(group: number, rules: string[]): void;
9
9
  clearGroup(group: number): void;
10
10
  getGroup(group: number): string;
11
11
  };