styled-components 6.1.15 → 6.1.16

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 (76) hide show
  1. package/dist/styled-components.browser.cjs.js +1 -1
  2. package/dist/styled-components.browser.esm.js +1 -1
  3. package/dist/styled-components.cjs.js +1 -1
  4. package/dist/styled-components.esm.js +1 -1
  5. package/dist/styled-components.js +1 -1
  6. package/dist/styled-components.min.js +1 -1
  7. package/dist/types.d.ts +1 -1
  8. package/native/dist/base.d.ts +12 -0
  9. package/native/dist/constants.d.ts +8 -0
  10. package/native/dist/constructors/constructWithOptions.d.ts +18 -0
  11. package/native/dist/constructors/createGlobalStyle.d.ts +3 -0
  12. package/native/dist/constructors/css.d.ts +4 -0
  13. package/native/dist/constructors/keyframes.d.ts +3 -0
  14. package/native/dist/constructors/styled.d.ts +150 -0
  15. package/native/dist/dist/types.d.ts +1 -1
  16. package/native/dist/hoc/withTheme.d.ts +3 -0
  17. package/native/dist/hoc/withTheme.spec.d.ts +1 -0
  18. package/native/dist/index-standalone.d.ts +2 -0
  19. package/native/dist/index.d.ts +4 -0
  20. package/native/dist/models/ComponentStyle.d.ts +15 -0
  21. package/native/dist/models/GlobalStyle.d.ts +11 -0
  22. package/native/dist/models/InlineStyle.d.ts +6 -0
  23. package/native/dist/models/Keyframes.d.ts +10 -0
  24. package/native/dist/models/ServerStyleSheet.d.ts +16 -0
  25. package/native/dist/models/StyleSheetManager.d.ts +65 -0
  26. package/native/dist/models/StyledComponent.d.ts +3 -0
  27. package/native/dist/models/StyledNativeComponent.d.ts +3 -0
  28. package/native/dist/models/ThemeProvider.d.ts +47 -0
  29. package/native/dist/native/index.d.ts +37 -0
  30. package/native/dist/secretInternals.d.ts +5 -0
  31. package/native/dist/sheet/GroupIDAllocator.d.ts +4 -0
  32. package/native/dist/sheet/GroupedTag.d.ts +11 -0
  33. package/native/dist/sheet/Rehydration.d.ts +3 -0
  34. package/native/dist/sheet/Sheet.d.ts +40 -0
  35. package/native/dist/sheet/Tag.d.ts +55 -0
  36. package/native/dist/sheet/dom.d.ts +5 -0
  37. package/native/dist/sheet/index.d.ts +1 -0
  38. package/native/dist/sheet/types.d.ts +36 -0
  39. package/native/dist/styled-components.native.cjs.js +1 -1
  40. package/native/dist/styled-components.native.cjs.js.map +1 -1
  41. package/native/dist/styled-components.native.esm.js +1 -1
  42. package/native/dist/styled-components.native.esm.js.map +1 -1
  43. package/native/dist/test/globals.d.ts +2 -0
  44. package/native/dist/test/utils.d.ts +145 -0
  45. package/native/dist/test/veryLargeUnionType.d.ts +1 -0
  46. package/native/dist/types.d.ts +204 -0
  47. package/native/dist/utils/addUnitIfNeeded.d.ts +1 -0
  48. package/native/dist/utils/checkDynamicCreation.d.ts +1 -0
  49. package/native/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  50. package/native/dist/utils/determineTheme.d.ts +4 -0
  51. package/native/dist/utils/domElements.d.ts +4 -0
  52. package/native/dist/utils/empties.d.ts +3 -0
  53. package/native/dist/utils/error.d.ts +5 -0
  54. package/native/dist/utils/errors.d.ts +21 -0
  55. package/native/dist/utils/escape.d.ts +5 -0
  56. package/native/dist/utils/flatten.d.ts +4 -0
  57. package/native/dist/utils/generateAlphabeticName.d.ts +1 -0
  58. package/native/dist/utils/generateComponentId.d.ts +1 -0
  59. package/native/dist/utils/generateDisplayName.d.ts +2 -0
  60. package/native/dist/utils/getComponentName.d.ts +2 -0
  61. package/native/dist/utils/hash.d.ts +3 -0
  62. package/native/dist/utils/hoist.d.ts +51 -0
  63. package/native/dist/utils/hyphenateStyleName.d.ts +14 -0
  64. package/native/dist/utils/interleave.d.ts +2 -0
  65. package/native/dist/utils/isFunction.d.ts +1 -0
  66. package/native/dist/utils/isPlainObject.d.ts +1 -0
  67. package/native/dist/utils/isStatelessFunction.d.ts +1 -0
  68. package/native/dist/utils/isStaticRules.d.ts +2 -0
  69. package/native/dist/utils/isStyledComponent.d.ts +2 -0
  70. package/native/dist/utils/isTag.d.ts +2 -0
  71. package/native/dist/utils/joinStrings.d.ts +5 -0
  72. package/native/dist/utils/mixinDeep.d.ts +6 -0
  73. package/native/dist/utils/nonce.d.ts +1 -0
  74. package/native/dist/utils/setToString.d.ts +17 -0
  75. package/native/dist/utils/stylis.d.ts +10 -0
  76. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import { RuleSet } from '../types';
2
+ export default function isStaticRules<Props extends object>(rules: RuleSet<Props>): boolean;
@@ -0,0 +1,2 @@
1
+ import { StyledComponentBrand } from '../types';
2
+ export default function isStyledComponent(target: any): target is StyledComponentBrand;
@@ -0,0 +1,2 @@
1
+ import { StyledTarget } from '../types';
2
+ export default function isTag(target: StyledTarget<'web'>): target is string;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Convenience function for joining strings to form className chains
3
+ */
4
+ export declare function joinStrings(a?: string | undefined, b?: string | undefined): string;
5
+ export declare function joinStringArray(arr: string[], sep?: string | undefined): string;
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1 @@
1
+ export default function getNonce(): string | null;
@@ -0,0 +1,17 @@
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;
@@ -0,0 +1,10 @@
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styled-components",
3
- "version": "6.1.15",
3
+ "version": "6.1.16",
4
4
  "description": "CSS for the <Component> Age. Style components your way with speed, strong typing, and flexibility.",
5
5
  "publishConfig": {
6
6
  "access": "public"