styled-components 6.0.0-beta.8 → 6.0.0-rc.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.
Files changed (71) hide show
  1. package/dist/base.d.ts +2 -8
  2. package/dist/constructors/constructWithOptions.d.ts +10 -7
  3. package/dist/constructors/styled.d.ts +176 -176
  4. package/dist/hoc/withTheme.d.ts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/models/ComponentStyle.d.ts +0 -1
  7. package/dist/models/StyleSheetManager.d.ts +27 -9
  8. package/dist/models/ThemeProvider.d.ts +4 -3
  9. package/dist/native/index.d.ts +26 -27
  10. package/dist/sheet/GroupedTag.d.ts +1 -1
  11. package/dist/sheet/Sheet.d.ts +3 -3
  12. package/dist/sheet/types.d.ts +1 -1
  13. package/dist/styled-components-macro.cjs.js +5 -6
  14. package/dist/styled-components-macro.cjs.js.map +1 -1
  15. package/dist/styled-components-macro.esm.js +0 -1
  16. package/dist/styled-components-macro.esm.js.map +1 -1
  17. package/dist/styled-components.browser.cjs.js +1 -1844
  18. package/dist/styled-components.browser.cjs.js.map +1 -1
  19. package/dist/styled-components.browser.esm.js +1 -1818
  20. package/dist/styled-components.browser.esm.js.map +1 -1
  21. package/dist/styled-components.cjs.js +1 -1864
  22. package/dist/styled-components.cjs.js.map +1 -1
  23. package/dist/styled-components.esm.js +1 -1838
  24. package/dist/styled-components.esm.js.map +1 -1
  25. package/dist/styled-components.js +269 -249
  26. package/dist/styled-components.js.map +1 -1
  27. package/dist/styled-components.min.js +1 -1
  28. package/dist/styled-components.min.js.map +1 -1
  29. package/dist/test/types.d.ts +9 -0
  30. package/dist/test/utils.d.ts +176 -176
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/dist/types.d.ts +34 -41
  33. package/dist/utils/determineTheme.d.ts +4 -2
  34. package/dist/utils/domElements.d.ts +1 -1
  35. package/dist/utils/flatten.d.ts +1 -1
  36. package/dist/utils/hoist.d.ts +3 -3
  37. package/dist/utils/isFunction.d.ts +1 -1
  38. package/dist/utils/isPlainObject.d.ts +1 -1
  39. package/dist/utils/isStatelessFunction.d.ts +1 -1
  40. package/dist/utils/joinStrings.d.ts +2 -1
  41. package/dist/utils/stylis.d.ts +1 -1
  42. package/native/dist/base.d.ts +2 -8
  43. package/native/dist/constructors/constructWithOptions.d.ts +10 -7
  44. package/native/dist/constructors/styled.d.ts +176 -176
  45. package/native/dist/hoc/withTheme.d.ts +1 -1
  46. package/native/dist/index.d.ts +1 -1
  47. package/native/dist/models/ComponentStyle.d.ts +0 -1
  48. package/native/dist/models/StyleSheetManager.d.ts +27 -9
  49. package/native/dist/models/ThemeProvider.d.ts +4 -3
  50. package/native/dist/native/index.d.ts +26 -27
  51. package/native/dist/sheet/GroupedTag.d.ts +1 -1
  52. package/native/dist/sheet/Sheet.d.ts +3 -3
  53. package/native/dist/sheet/types.d.ts +1 -1
  54. package/native/dist/styled-components.native.cjs.js +1 -1305
  55. package/native/dist/styled-components.native.cjs.js.map +1 -1
  56. package/native/dist/styled-components.native.esm.js +1 -1287
  57. package/native/dist/styled-components.native.esm.js.map +1 -1
  58. package/native/dist/test/types.d.ts +9 -0
  59. package/native/dist/test/utils.d.ts +176 -176
  60. package/native/dist/types.d.ts +34 -41
  61. package/native/dist/utils/determineTheme.d.ts +4 -2
  62. package/native/dist/utils/domElements.d.ts +1 -1
  63. package/native/dist/utils/flatten.d.ts +1 -1
  64. package/native/dist/utils/hoist.d.ts +3 -3
  65. package/native/dist/utils/isFunction.d.ts +1 -1
  66. package/native/dist/utils/isPlainObject.d.ts +1 -1
  67. package/native/dist/utils/isStatelessFunction.d.ts +1 -1
  68. package/native/dist/utils/joinStrings.d.ts +2 -1
  69. package/native/dist/utils/stylis.d.ts +1 -1
  70. package/package.json +22 -34
  71. package/dist/hooks/useTheme.d.ts +0 -3
@@ -2,35 +2,34 @@ 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
- declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : object, object>) & {
10
- ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, import("react-native").ActivityIndicatorProps & React.RefAttributes<import("react-native").ActivityIndicator>, object>;
11
- Button: Styled<"native", typeof import("react-native").Button, import("react-native").ButtonProps & React.RefAttributes<import("react-native").Button>, object>;
12
- DatePickerIOS: Styled<"native", typeof import("react-native").DatePickerIOS, import("react-native").DatePickerIOSProps & React.RefAttributes<import("react-native").DatePickerIOS>, object>;
13
- DrawerLayoutAndroid: Styled<"native", typeof import("react-native").DrawerLayoutAndroid, import("react-native").DrawerLayoutAndroidProps & React.RefAttributes<import("react-native").DrawerLayoutAndroid>, object>;
14
- FlatList: Styled<"native", typeof import("react-native").FlatList, import("react-native").FlatListProps<unknown> & React.RefAttributes<import("react-native").FlatList<unknown>>, object>;
15
- Image: Styled<"native", typeof import("react-native").Image, import("react-native").ImageProps & React.RefAttributes<import("react-native").Image>, object>;
16
- ImageBackground: Styled<"native", typeof import("react-native").ImageBackground, import("react-native").ImageBackgroundProps & React.RefAttributes<import("react-native").ImageBackground>, object>;
17
- KeyboardAvoidingView: Styled<"native", typeof import("react-native").KeyboardAvoidingView, import("react-native").KeyboardAvoidingViewProps & React.RefAttributes<import("react-native").KeyboardAvoidingView>, object>;
18
- Modal: Styled<"native", typeof import("react-native").Modal, import("react-native").ModalBaseProps & import("react-native").ModalPropsIOS & import("react-native").ModalPropsAndroid & import("react-native").ViewProps & React.RefAttributes<import("react-native").Modal>, object>;
19
- Pressable: Styled<"native", import("react").ForwardRefExoticComponent<import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>>, import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>, object>;
20
- ProgressBarAndroid: Styled<"native", typeof import("react-native").ProgressBarAndroid, import("react-native").ProgressBarAndroidProps & React.RefAttributes<import("react-native").ProgressBarAndroid>, object>;
21
- ProgressViewIOS: Styled<"native", typeof import("react-native").ProgressViewIOS, import("react-native").ProgressViewIOSProps & React.RefAttributes<import("react-native").ProgressViewIOS>, object>;
22
- RefreshControl: Styled<"native", typeof import("react-native").RefreshControl, import("react-native").RefreshControlProps & React.RefAttributes<import("react-native").RefreshControl>, object>;
23
- SafeAreaView: Styled<"native", typeof import("react-native").SafeAreaView, import("react-native").ViewProps & React.RefAttributes<import("react-native").SafeAreaView>, object>;
24
- ScrollView: Styled<"native", typeof import("react-native").ScrollView, import("react-native").ScrollViewProps & React.RefAttributes<import("react-native").ScrollView>, object>;
25
- SectionList: Styled<"native", typeof import("react-native").SectionList, import("react-native").SectionListProps<unknown, unknown> & React.RefAttributes<import("react-native").SectionList<unknown, unknown>>, object>;
26
- Slider: Styled<"native", typeof import("react-native").Slider, import("react-native").SliderProps & React.RefAttributes<import("react-native").Slider>, object>;
27
- Switch: Styled<"native", typeof import("react-native").Switch, import("react-native").SwitchProps & React.RefAttributes<import("react-native").Switch>, object>;
28
- Text: Styled<"native", typeof import("react-native").Text, import("react-native").TextProps & React.RefAttributes<import("react-native").Text>, object>;
29
- TextInput: Styled<"native", typeof import("react-native").TextInput, import("react-native").TextInputProps & React.RefAttributes<import("react-native").TextInput>, object>;
30
- TouchableHighlight: Styled<"native", typeof import("react-native").TouchableHighlight, import("react-native").TouchableHighlightProps & React.RefAttributes<import("react-native").TouchableHighlight>, object>;
31
- TouchableOpacity: Styled<"native", typeof import("react-native").TouchableOpacity, import("react-native").TouchableOpacityProps & React.RefAttributes<import("react-native").TouchableOpacity>, object>;
32
- View: Styled<"native", typeof import("react-native").View, import("react-native").ViewProps & React.RefAttributes<import("react-native").View>, object>;
33
- VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, import("react-native").VirtualizedListProps<unknown> & React.RefAttributes<import("react-native").VirtualizedList<unknown>>, object>;
8
+ declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : object, object, object>) & {
9
+ ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, import("react-native").ActivityIndicatorProps, object, object>;
10
+ Button: Styled<"native", typeof import("react-native").Button, import("react-native").ButtonProps, object, object>;
11
+ DatePickerIOS: Styled<"native", typeof import("react-native").DatePickerIOS, import("react-native").DatePickerIOSProps, object, object>;
12
+ DrawerLayoutAndroid: Styled<"native", typeof import("react-native").DrawerLayoutAndroid, import("react-native").DrawerLayoutAndroidProps, object, object>;
13
+ FlatList: Styled<"native", typeof import("react-native").FlatList, import("react-native").FlatListProps<unknown>, object, object>;
14
+ Image: Styled<"native", typeof import("react-native").Image, import("react-native").ImageProps, object, object>;
15
+ ImageBackground: Styled<"native", typeof import("react-native").ImageBackground, import("react-native").ImageBackgroundProps, object, object>;
16
+ KeyboardAvoidingView: Styled<"native", typeof import("react-native").KeyboardAvoidingView, import("react-native").KeyboardAvoidingViewProps, object, object>;
17
+ Modal: Styled<"native", typeof import("react-native").Modal, import("react-native").ModalBaseProps & import("react-native").ModalPropsIOS & import("react-native").ModalPropsAndroid & import("react-native").ViewProps, object, object>;
18
+ Pressable: Styled<"native", import("react").ForwardRefExoticComponent<import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>>, import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>, object, object>;
19
+ ProgressBarAndroid: Styled<"native", typeof import("react-native").ProgressBarAndroid, import("react-native").ProgressBarAndroidProps, object, object>;
20
+ ProgressViewIOS: Styled<"native", typeof import("react-native").ProgressViewIOS, import("react-native").ProgressViewIOSProps, object, object>;
21
+ RefreshControl: Styled<"native", typeof import("react-native").RefreshControl, import("react-native").RefreshControlProps, object, object>;
22
+ SafeAreaView: Styled<"native", typeof import("react-native").SafeAreaView, import("react-native").ViewProps, object, object>;
23
+ ScrollView: Styled<"native", typeof import("react-native").ScrollView, import("react-native").ScrollViewProps, object, object>;
24
+ SectionList: Styled<"native", typeof import("react-native").SectionList, import("react-native").SectionListProps<unknown, unknown>, object, object>;
25
+ Slider: Styled<"native", typeof import("react-native").Slider, import("react-native").SliderProps, object, object>;
26
+ Switch: Styled<"native", typeof import("react-native").Switch, import("react-native").SwitchProps, object, object>;
27
+ Text: Styled<"native", typeof import("react-native").Text, import("react-native").TextProps, object, object>;
28
+ TextInput: Styled<"native", typeof import("react-native").TextInput, import("react-native").TextInputProps, object, object>;
29
+ TouchableHighlight: Styled<"native", typeof import("react-native").TouchableHighlight, import("react-native").TouchableHighlightProps, object, object>;
30
+ TouchableOpacity: Styled<"native", typeof import("react-native").TouchableOpacity, import("react-native").TouchableOpacityProps, object, object>;
31
+ View: Styled<"native", typeof import("react-native").View, import("react-native").ViewProps, object, object>;
32
+ VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, import("react-native").VirtualizedListProps<unknown>, object, object>;
34
33
  };
35
34
  export { DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, } from '../types';
36
35
  export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme };
@@ -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
  };
@@ -1,13 +1,13 @@
1
1
  import { GroupedTag, Sheet, SheetOptions } from './types';
2
- declare type SheetConstructorArgs = {
2
+ type SheetConstructorArgs = {
3
3
  isServer?: boolean;
4
4
  useCSSOMInjection?: boolean;
5
5
  target?: HTMLElement;
6
6
  };
7
- declare type GlobalStylesAllocationMap = {
7
+ type GlobalStylesAllocationMap = {
8
8
  [key: string]: number;
9
9
  };
10
- declare type NamesAllocationMap = Map<string, Set<string>>;
10
+ type NamesAllocationMap = Map<string, Set<string>>;
11
11
  /** Contains the main stylesheet logic for stringification and caching */
12
12
  export default class StyleSheet implements Sheet {
13
13
  gs: GlobalStylesAllocationMap;
@@ -14,7 +14,7 @@ export interface GroupedTag {
14
14
  length: number;
15
15
  tag: Tag;
16
16
  }
17
- export declare type SheetOptions = {
17
+ export type SheetOptions = {
18
18
  isServer: boolean;
19
19
  target?: HTMLElement;
20
20
  useCSSOMInjection: boolean;