styled-components 6.4.0-prerelease.8 → 6.4.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 (66) hide show
  1. package/dist/bench/bench-utils.d.ts +9 -0
  2. package/dist/constructors/constructWithOptions.d.ts +1 -1
  3. package/dist/constructors/createTheme.d.ts +19 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/models/ComponentStyle.d.ts +5 -0
  6. package/dist/models/ServerStyleSheet.d.ts +0 -10
  7. package/dist/models/StyleSheetManager.d.ts +11 -2
  8. package/dist/styled-components.browser.cjs.js +3 -3
  9. package/dist/styled-components.browser.cjs.js.map +1 -1
  10. package/dist/styled-components.browser.esm.js +3 -3
  11. package/dist/styled-components.browser.esm.js.map +1 -1
  12. package/dist/styled-components.cjs.js +3 -3
  13. package/dist/styled-components.cjs.js.map +1 -1
  14. package/dist/styled-components.esm.js +3 -3
  15. package/dist/styled-components.esm.js.map +1 -1
  16. package/dist/styled-components.js +236 -245
  17. package/dist/styled-components.js.map +1 -1
  18. package/dist/styled-components.min.js +3 -3
  19. package/dist/styled-components.min.js.map +1 -1
  20. package/dist/types.d.ts +23 -26
  21. package/dist/utils/cssTagged.d.ts +2 -0
  22. package/dist/utils/joinStrings.d.ts +3 -0
  23. package/dist/utils/rscCache.d.ts +2 -0
  24. package/dist/utils/stylis.d.ts +17 -0
  25. package/dist/utils/stylisPluginRSC.d.ts +3 -0
  26. package/native/dist/bench/bench-utils.d.ts +9 -0
  27. package/native/dist/constructors/constructWithOptions.d.ts +1 -1
  28. package/native/dist/constructors/createTheme.d.ts +19 -0
  29. package/native/dist/dist/bench/bench-utils.d.ts +9 -0
  30. package/native/dist/dist/constructors/constructWithOptions.d.ts +1 -1
  31. package/native/dist/dist/constructors/createTheme.d.ts +19 -0
  32. package/native/dist/dist/index.d.ts +1 -0
  33. package/native/dist/dist/models/ComponentStyle.d.ts +5 -0
  34. package/native/dist/dist/models/ServerStyleSheet.d.ts +0 -10
  35. package/native/dist/dist/models/StyleSheetManager.d.ts +11 -2
  36. package/native/dist/dist/types.d.ts +23 -26
  37. package/native/dist/dist/utils/cssTagged.d.ts +2 -0
  38. package/native/dist/dist/utils/joinStrings.d.ts +3 -0
  39. package/native/dist/dist/utils/rscCache.d.ts +2 -0
  40. package/native/dist/dist/utils/stylis.d.ts +17 -0
  41. package/native/dist/dist/utils/stylisPluginRSC.d.ts +3 -0
  42. package/native/dist/index.d.ts +1 -0
  43. package/native/dist/models/ComponentStyle.d.ts +5 -0
  44. package/native/dist/models/ServerStyleSheet.d.ts +0 -10
  45. package/native/dist/models/StyleSheetManager.d.ts +11 -2
  46. package/native/dist/styled-components.native.cjs.js +1 -1
  47. package/native/dist/styled-components.native.cjs.js.map +1 -1
  48. package/native/dist/styled-components.native.esm.js +1 -1
  49. package/native/dist/styled-components.native.esm.js.map +1 -1
  50. package/native/dist/types.d.ts +23 -26
  51. package/native/dist/utils/cssTagged.d.ts +2 -0
  52. package/native/dist/utils/joinStrings.d.ts +3 -0
  53. package/native/dist/utils/rscCache.d.ts +2 -0
  54. package/native/dist/utils/stylis.d.ts +17 -0
  55. package/native/dist/utils/stylisPluginRSC.d.ts +3 -0
  56. package/package.json +30 -38
  57. package/native/dist/bench/run.d.ts +0 -5
  58. package/native/dist/dist/bench/run.d.ts +0 -5
  59. package/native/dist/dist/test/globals.d.ts +0 -2
  60. package/native/dist/dist/test/utils.d.ts +0 -163
  61. package/native/dist/dist/test/veryLargeUnionType.d.ts +0 -1
  62. package/native/dist/dist/utils/rawElement.d.ts +0 -11
  63. package/native/dist/test/globals.d.ts +0 -2
  64. package/native/dist/test/utils.d.ts +0 -163
  65. package/native/dist/test/veryLargeUnionType.d.ts +0 -1
  66. package/native/dist/utils/rawElement.d.ts +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"styled-components.native.esm.js","sources":["../../../src/utils/empties.ts","../../../src/utils/error.ts","../../../src/utils/errors.ts","../../../src/utils/addUnitIfNeeded.ts","../../../src/utils/getComponentName.ts","../../../src/utils/hyphenateStyleName.ts","../../../src/utils/isFunction.ts","../../../src/utils/isKeyframes.ts","../../../src/utils/isPlainObject.ts","../../../src/utils/isStyledComponent.ts","../../../src/utils/flatten.ts","../../../src/utils/isStatelessFunction.ts","../../../src/utils/interleave.ts","../../../src/constructors/css.ts","../../../src/constructors/constructWithOptions.ts","../../../src/constants.ts","../../../src/models/ThemeProvider.tsx","../../../src/utils/determineTheme.ts","../../../src/utils/hoist.ts","../../../src/hoc/withTheme.tsx","../../../src/utils/generateAlphabeticName.ts","../../../src/utils/joinStrings.ts","../../../src/models/InlineStyle.ts","../../../src/utils/generateComponentId.ts","../../../src/utils/hash.ts","../../../src/utils/generateDisplayName.ts","../../../src/utils/isTag.ts","../../../src/utils/mixinDeep.ts","../../../src/models/StyledNativeComponent.ts","../../../src/native/index.ts"],"sourcesContent":["import { Dict } from '../types';\n\nexport const EMPTY_ARRAY = Object.freeze([]) as Readonly<any[]>;\nexport const EMPTY_OBJECT = Object.freeze({}) as Readonly<Dict<any>>;\n","import { Dict } from '../types';\nimport errorMap from './errors';\n\nconst ERRORS: Dict<any> = process.env.NODE_ENV !== 'production' ? errorMap : {};\n\n/**\n * super basic version of sprintf\n */\nfunction format(...args: [string, ...any]) {\n let a = args[0];\n const b = [];\n\n for (let c = 1, len = args.length; c < len; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(d => {\n a = a.replace(/%[a-z]/, d);\n });\n\n return a;\n}\n\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n */\nexport default function throwStyledComponentsError(\n code: string | number,\n ...interpolations: any[]\n) {\n if (process.env.NODE_ENV === 'production') {\n return new Error(\n `An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${code} for more information.${\n interpolations.length > 0 ? ` Args: ${interpolations.join(', ')}` : ''\n }`\n );\n } else {\n return new Error(format(ERRORS[code], ...interpolations).trim());\n }\n}\n","export default {\n '1': 'Cannot create styled-component for component: %s.\\n\\n',\n '2': \"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",\n '3': 'Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n',\n '4': 'The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n',\n '5': 'The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n',\n '6': \"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",\n '7': 'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',\n '8': 'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',\n '9': 'Missing document `<head>`\\n\\n',\n '10': 'Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n',\n '11': '_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n',\n '12': 'It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n',\n '13': '%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n',\n '14': 'ThemeProvider: \"theme\" prop is required.\\n\\n',\n '15': \"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",\n '16': \"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",\n '17': \"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\",\n '18': 'ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`',\n};\n","/**\n * CSS properties that accept unitless numeric values.\n * Inlined from @emotion/unitless with IE-only entries removed\n * (boxFlex, boxFlexGroup, boxOrdinalGroup, flexPositive, flexNegative,\n * flexOrder, msGridRow, msGridRowSpan, msGridColumn, msGridColumnSpan).\n */\nconst unitless: Record<string, 1> = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexShrink: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1,\n};\n\n// Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js\nexport default function addUnitIfNeeded(name: string, value: any) {\n // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133\n if (value == null || typeof value === 'boolean' || value === '') {\n return '';\n }\n\n if (typeof value === 'number' && value !== 0 && !(name in unitless) && !name.startsWith('--')) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers except for CSS variables\n }\n\n return String(value).trim();\n}\n","import { StyledTarget } from '../types';\n\nexport default function getComponentName(target: StyledTarget<any>) {\n return (\n (process.env.NODE_ENV !== 'production' ? typeof target === 'string' && target : false) ||\n (target as Exclude<StyledTarget<any>, string>).displayName ||\n (target as Function).name ||\n 'Component'\n );\n}\n","const isUpper = (c: string) => c >= 'A' && c <= 'Z';\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\nexport default function hyphenateStyleName(string: string): string {\n let output = '';\n\n for (let i = 0; i < string.length; i++) {\n const c = string[i];\n // Check for CSS variable prefix\n if (i === 1 && c === '-' && string[0] === '-') {\n return string;\n }\n\n if (isUpper(c)) {\n output += '-' + c.toLowerCase();\n } else {\n output += c;\n }\n }\n\n return output.startsWith('ms-') ? '-' + output : output;\n}\n","export default function isFunction(test: any): test is Function {\n return typeof test === 'function';\n}\n","import type KeyframesClass from '../models/Keyframes';\n\nconst KEYFRAMES_SYMBOL = Symbol.for('sc-keyframes');\n\nexport default function isKeyframes(value: unknown): value is KeyframesClass {\n return typeof value === 'object' && value !== null && KEYFRAMES_SYMBOL in value;\n}\n\nexport { KEYFRAMES_SYMBOL };\n","export default function isPlainObject(x: any): x is Record<any, any> {\n return (\n x !== null &&\n typeof x === 'object' &&\n x.constructor.name === Object.name &&\n /* check for reasonable markers that the object isn't an element for react & preact/compat */\n !('props' in x && x.$$typeof)\n );\n}\n","import { StyledComponentBrand } from '../types';\n\n/** Type guard that returns true if the target is a styled component. */\nexport default function isStyledComponent(target: any): target is StyledComponentBrand {\n return typeof target === 'object' && 'styledComponentId' in target;\n}\n","import type StyleSheet from '../sheet';\nimport {\n AnyComponent,\n Dict,\n ExecutionContext,\n Interpolation,\n IStyledComponent,\n RuleSet,\n Stringifier,\n StyledObject,\n} from '../types';\nimport addUnitIfNeeded from './addUnitIfNeeded';\nimport getComponentName from './getComponentName';\nimport hyphenate from './hyphenateStyleName';\nimport isFunction from './isFunction';\nimport isKeyframes from './isKeyframes';\nimport isPlainObject from './isPlainObject';\nimport isStatelessFunction from './isStatelessFunction';\nimport isStyledComponent from './isStyledComponent';\n\n/**\n * It's falsish not falsy because 0 is allowed.\n */\nconst isFalsish = (chunk: any): chunk is undefined | null | false | '' =>\n chunk === undefined || chunk === null || chunk === false || chunk === '';\n\nexport const objToCssArray = (obj: Dict<any>): string[] => {\n const rules = [];\n\n for (const key in obj) {\n const val = obj[key];\n if (!obj.hasOwnProperty(key) || isFalsish(val)) continue;\n\n // @ts-expect-error Property 'isCss' does not exist on type 'any[]'\n if ((Array.isArray(val) && val.isCss) || isFunction(val)) {\n rules.push(hyphenate(key) + ':', val, ';');\n } else if (isPlainObject(val)) {\n rules.push(key + ' {', ...objToCssArray(val), '}');\n } else {\n rules.push(hyphenate(key) + ': ' + addUnitIfNeeded(key, val) + ';');\n }\n }\n\n return rules;\n};\n\nexport default function flatten<Props extends object>(\n chunk: Interpolation<object>,\n executionContext?: (ExecutionContext & Props) | undefined,\n styleSheet?: StyleSheet | undefined,\n stylisInstance?: Stringifier | undefined,\n result: RuleSet<Props> = []\n): RuleSet<Props> {\n if (typeof chunk === 'string') {\n if (chunk) result.push(chunk);\n return result;\n }\n\n if (isFalsish(chunk)) {\n return result;\n }\n\n /* Handle other components */\n if (isStyledComponent(chunk)) {\n result.push(`.${(chunk as unknown as IStyledComponent<'web', any>).styledComponentId}`);\n return result;\n }\n\n /* Either execute or defer the function */\n if (isFunction(chunk)) {\n if (isStatelessFunction(chunk) && executionContext) {\n const fnResult = chunk(executionContext);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n typeof fnResult === 'object' &&\n !Array.isArray(fnResult) &&\n !isKeyframes(fnResult) &&\n !isPlainObject(fnResult) &&\n fnResult !== null\n ) {\n console.error(\n `${getComponentName(\n chunk as AnyComponent\n )} is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.`\n );\n }\n\n return flatten<Props>(fnResult, executionContext, styleSheet, stylisInstance, result);\n } else {\n result.push(chunk as unknown as IStyledComponent<'web'>);\n return result;\n }\n }\n\n if (isKeyframes(chunk)) {\n if (styleSheet) {\n chunk.inject(styleSheet, stylisInstance);\n result.push(chunk.getName(stylisInstance));\n } else {\n result.push(chunk);\n }\n return result;\n }\n\n /* Handle objects */\n if (isPlainObject(chunk)) {\n const cssArr = objToCssArray(chunk as StyledObject<Props>);\n for (let i = 0; i < cssArr.length; i++) result.push(cssArr[i]);\n return result;\n }\n\n if (!Array.isArray(chunk)) {\n result.push(chunk.toString());\n return result;\n }\n\n for (let i = 0; i < chunk.length; i++) {\n flatten<Props>(chunk[i], executionContext, styleSheet, stylisInstance, result);\n }\n\n return result;\n}\n","import isFunction from './isFunction';\n\nexport default function isStatelessFunction(test: any): test is Function {\n return isFunction(test) && !(test.prototype && test.prototype.isReactComponent);\n}\n","import { Interpolation } from '../types';\n\nexport default function interleave<Props extends object>(\n strings: readonly string[],\n interpolations: Interpolation<Props>[]\n): Interpolation<Props>[] {\n const result: Interpolation<Props>[] = [strings[0]];\n\n for (let i = 0, len = interpolations.length; i < len; i += 1) {\n result.push(interpolations[i], strings[i + 1]);\n }\n\n return result;\n}\n","import { BaseObject, Interpolation, RuleSet, StyledObject, StyleFunction, Styles } from '../types';\nimport { EMPTY_ARRAY } from '../utils/empties';\nimport flatten from '../utils/flatten';\nimport interleave from '../utils/interleave';\nimport isFunction from '../utils/isFunction';\nimport isPlainObject from '../utils/isPlainObject';\n\n/**\n * Used when flattening object styles to determine if we should\n * expand an array of styles.\n */\nconst addTag = <T extends RuleSet<any>>(arg: T): T & { isCss: true } =>\n Object.assign(arg, { isCss: true } as const);\n\n/**\n * Tag a CSS template literal for use in styled components, createGlobalStyle, or attrs.\n * Enables interpolation type-checking and shared style blocks.\n *\n * ```tsx\n * const truncate = css`\n * white-space: nowrap;\n * overflow: hidden;\n * text-overflow: ellipsis;\n * `;\n * ```\n */\nfunction css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;\nfunction css<Props extends object>(\n styles: Styles<NoInfer<Props>>,\n ...interpolations: Interpolation<NoInfer<Props>>[]\n): RuleSet<NoInfer<Props>>;\nfunction css<Props extends object = BaseObject>(\n styles: Styles<NoInfer<Props>>,\n ...interpolations: Interpolation<NoInfer<Props>>[]\n): RuleSet<NoInfer<Props>> {\n if (isFunction(styles) || isPlainObject(styles)) {\n const styleFunctionOrObject = styles as StyleFunction<Props> | StyledObject<Props>;\n\n return addTag(\n flatten<Props>(\n interleave<Props>(EMPTY_ARRAY, [\n styleFunctionOrObject,\n ...interpolations,\n ]) as Interpolation<object>\n )\n );\n }\n\n const styleStringArray = styles as TemplateStringsArray;\n\n if (\n interpolations.length === 0 &&\n styleStringArray.length === 1 &&\n typeof styleStringArray[0] === 'string'\n ) {\n return flatten<Props>(styleStringArray);\n }\n\n return addTag(\n flatten<Props>(interleave<Props>(styleStringArray, interpolations) as Interpolation<object>)\n );\n}\n\nexport default css;\n","import {\n Attrs,\n BaseObject,\n ExecutionProps,\n Interpolation,\n IStyledComponent,\n IStyledComponentFactory,\n KnownTarget,\n MakeAttrsOptional,\n Runtime,\n StyledOptions,\n StyledTarget,\n Styles,\n Substitute,\n} from '../types';\nimport { EMPTY_OBJECT } from '../utils/empties';\nimport styledError from '../utils/error';\nimport css from './css';\n\ntype AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P\n ? P extends object\n ? P\n : never\n : T extends object\n ? T\n : never;\n\n/**\n * Based on Attrs being a simple object or function that returns\n * a prop object, inspect the attrs result and attempt to extract\n * any \"as\" prop usage to modify the runtime target.\n */\ntype AttrsTarget<\n R extends Runtime,\n T extends Attrs<any>,\n FallbackTarget extends StyledTarget<R>,\n Result extends ExecutionProps = AttrsResult<T>,\n> = Result extends { as: infer RuntimeTarget }\n ? RuntimeTarget extends KnownTarget\n ? RuntimeTarget\n : FallbackTarget\n : FallbackTarget;\n\nexport interface Styled<\n R extends Runtime,\n Target extends StyledTarget<R>,\n OuterProps extends object,\n OuterStatics extends object = BaseObject,\n AttrsKeys extends keyof any = never,\n> {\n <Props extends object = BaseObject, Statics extends object = BaseObject>(\n initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>,\n ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]\n ): IStyledComponent<R, MakeAttrsOptional<Substitute<OuterProps, Props>, AttrsKeys>> &\n OuterStatics &\n Statics &\n (R extends 'web'\n ? Target extends string\n ? {}\n : Omit<Target, keyof React.Component<any>>\n : {});\n\n attrs: <\n Props extends object = BaseObject,\n PrivateMergedProps extends object = Substitute<OuterProps, Props>,\n PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>,\n PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>,\n >(\n attrs: PrivateAttrsArg\n ) => Styled<\n R,\n PrivateResolvedTarget,\n PrivateResolvedTarget extends KnownTarget\n ? Substitute<\n Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>,\n Props\n >\n : PrivateMergedProps,\n OuterStatics,\n AttrsKeys | keyof AttrsResult<PrivateAttrsArg>\n >;\n\n withConfig: (\n config: StyledOptions<R, OuterProps>\n ) => Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;\n}\n\nexport default function constructWithOptions<\n R extends Runtime,\n Target extends StyledTarget<R>,\n OuterProps extends object = Target extends KnownTarget\n ? React.ComponentPropsWithRef<Target>\n : BaseObject,\n OuterStatics extends object = BaseObject,\n AttrsKeys extends keyof any = never,\n>(\n componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>,\n tag: StyledTarget<R>,\n options: StyledOptions<R, OuterProps> = EMPTY_OBJECT\n): Styled<R, Target, OuterProps, OuterStatics, AttrsKeys> {\n /**\n * We trust that the tag is a valid component as long as it isn't\n * falsish. Typically the tag here is a string or function (i.e.\n * class or pure function component), however a component may also be\n * an object if it uses another utility, e.g. React.memo. React will\n * output an appropriate warning however if the `tag` isn't valid.\n */\n if (!tag) {\n throw styledError(1, tag);\n }\n\n /* This is callable directly as a template function */\n const templateFunction = <Props extends object = BaseObject, Statics extends object = BaseObject>(\n initialStyles: Styles<Substitute<OuterProps, Props>>,\n ...interpolations: Interpolation<Substitute<OuterProps, Props>>[]\n ) =>\n componentConstructor<Substitute<OuterProps, Props>, Statics>(\n tag,\n options as StyledOptions<R, Substitute<OuterProps, Props>>,\n css<Substitute<OuterProps, Props>>(initialStyles, ...interpolations)\n );\n\n /**\n * Attrs allows for accomplishing two goals:\n *\n * 1. Backfilling props at runtime more expressively than defaultProps\n * 2. Amending the prop interface of a wrapped styled component\n */\n templateFunction.attrs = <\n Props extends object = BaseObject,\n PrivateMergedProps extends object = Substitute<OuterProps, Props>,\n PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>,\n PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>,\n >(\n attrs: PrivateAttrsArg\n ) =>\n constructWithOptions<\n R,\n PrivateResolvedTarget,\n PrivateResolvedTarget extends KnownTarget\n ? Substitute<\n Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>,\n Props\n >\n : PrivateMergedProps,\n OuterStatics,\n AttrsKeys | keyof AttrsResult<PrivateAttrsArg>\n >(componentConstructor, tag, {\n ...options,\n attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean),\n });\n\n /**\n * If config methods are called, wrap up a new template function\n * and merge options.\n */\n templateFunction.withConfig = (config: StyledOptions<R, OuterProps>) =>\n constructWithOptions<R, Target, OuterProps, OuterStatics, AttrsKeys>(\n componentConstructor,\n tag,\n {\n ...options,\n ...config,\n }\n );\n\n return templateFunction;\n}\n","declare let SC_DISABLE_SPEEDY: boolean | null | undefined;\ndeclare let __VERSION__: string;\n\nimport React from 'react';\n\nexport const SC_ATTR: string =\n (typeof process !== 'undefined' &&\n typeof process.env !== 'undefined' &&\n (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) ||\n 'data-styled';\n\nexport const SC_ATTR_ACTIVE = 'active';\nexport const SC_ATTR_VERSION = 'data-styled-version';\nexport const SC_VERSION = __VERSION__;\nexport const SPLITTER = '/*!sc*/\\n';\n\nexport const IS_BROWSER = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * True when running in a React Server Component environment (createContext\n * is unavailable). In browser / standalone / native builds the entire\n * expression is replaced with the literal `false` via rollup-plugin-replace\n * with empty delimiters (exact string match), enabling rollup constant\n * inlining and terser dead-code elimination for all RSC branches.\n */\nexport const IS_RSC: boolean = typeof React.createContext === 'undefined';\n\nfunction readSpeedyFlag(name: string): boolean | undefined {\n if (typeof process !== 'undefined' && typeof process.env !== 'undefined') {\n const val = process.env[name];\n if (val !== undefined && val !== '') {\n return val !== 'false';\n }\n }\n return undefined;\n}\n\nexport const DISABLE_SPEEDY = Boolean(\n typeof SC_DISABLE_SPEEDY === 'boolean'\n ? SC_DISABLE_SPEEDY\n : (readSpeedyFlag('REACT_APP_SC_DISABLE_SPEEDY') ??\n readSpeedyFlag('SC_DISABLE_SPEEDY') ??\n (typeof process !== 'undefined' && typeof process.env !== 'undefined'\n ? process.env.NODE_ENV !== 'production'\n : true))\n);\n\nexport const KEYFRAMES_ID_PREFIX = 'sc-keyframes-';\n\n// Shared empty execution context when generating static styles\nexport const STATIC_EXECUTION_CONTEXT = {};\n","import React from 'react';\nimport { IS_RSC } from '../constants';\nimport styledError from '../utils/error';\nimport isFunction from '../utils/isFunction';\n\n// Helper type for the `DefaultTheme` interface that enforces an object type & exclusively allows\n// for typed keys.\ntype DefaultThemeAsObject<T = object> = Record<keyof T, any>;\n\n/**\n * Override DefaultTheme to get accurate typings for your project.\n *\n * ```\n * // create styled-components.d.ts in your project source\n * // if it isn't being picked up, check tsconfig compilerOptions.types\n * import type { CSSProp } from \"styled-components\";\n * import Theme from './theme';\n *\n * type ThemeType = typeof Theme;\n *\n * declare module \"styled-components\" {\n * export interface DefaultTheme extends ThemeType {}\n * }\n *\n * declare module \"react\" {\n * interface DOMAttributes<T> {\n * css?: CSSProp;\n * }\n * }\n * ```\n */\nexport interface DefaultTheme extends DefaultThemeAsObject {}\n\ntype ThemeFn = (outerTheme?: DefaultTheme | undefined) => DefaultTheme;\ntype ThemeArgument = DefaultTheme | ThemeFn;\n\ntype Props = {\n children?: React.ReactNode;\n theme: ThemeArgument;\n};\n\n// Create context only if createContext is available, otherwise create a fallback\nexport const ThemeContext = !IS_RSC\n ? React.createContext<DefaultTheme | undefined>(undefined)\n : ({\n Provider: ({ children }: { children: React.ReactNode; value?: DefaultTheme }) => children,\n Consumer: ({ children }: { children: (theme?: DefaultTheme) => React.ReactNode }) =>\n children(undefined),\n } as React.Context<DefaultTheme | undefined>);\n\nexport const ThemeConsumer = ThemeContext.Consumer;\n\nfunction mergeTheme(theme: ThemeArgument, outerTheme?: DefaultTheme | undefined): DefaultTheme {\n if (!theme) {\n throw styledError(14);\n }\n\n if (isFunction(theme)) {\n const themeFn = theme as ThemeFn;\n const mergedTheme = themeFn(outerTheme);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (mergedTheme === null || Array.isArray(mergedTheme) || typeof mergedTheme !== 'object')\n ) {\n throw styledError(7);\n }\n\n return mergedTheme;\n }\n\n if (Array.isArray(theme) || typeof theme !== 'object') {\n throw styledError(8);\n }\n\n return outerTheme ? { ...outerTheme, ...theme } : theme;\n}\n\n/**\n * Returns the current theme (as provided by the closest ancestor `ThemeProvider`.)\n *\n * If no `ThemeProvider` is found, the function will error. If you need access to the theme in an\n * uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there\n * is no `ThemeProvider` ancestor.\n */\nexport function useTheme(): DefaultTheme {\n // Skip useContext if we're in an RSC environment without context support\n const theme = !IS_RSC ? React.useContext(ThemeContext) : undefined;\n\n if (!theme) {\n throw styledError(18);\n }\n\n return theme;\n}\n\n/**\n * Provide a theme to an entire react component tree via context\n */\nexport default function ThemeProvider(props: Props): React.JSX.Element | null {\n // In RSC environments without context support, ThemeProvider becomes a no-op\n if (IS_RSC) {\n return props.children as React.JSX.Element | null;\n }\n\n const outerTheme = React.useContext(ThemeContext);\n const themeContext = React.useMemo(\n () => mergeTheme(props.theme, outerTheme),\n [props.theme, outerTheme]\n );\n\n if (!props.children) {\n return null;\n }\n\n return <ThemeContext.Provider value={themeContext}>{props.children}</ThemeContext.Provider>;\n}\n","import { DefaultTheme, ExecutionProps } from '../types';\nimport { EMPTY_OBJECT } from './empties';\n\nexport default function determineTheme(\n props: ExecutionProps,\n providedTheme?: DefaultTheme | undefined,\n defaultProps: { theme?: DefaultTheme | undefined } = EMPTY_OBJECT\n): DefaultTheme | undefined {\n return (props.theme !== defaultProps.theme && props.theme) || providedTheme || defaultProps.theme;\n}\n","import React from 'react';\nimport { AnyComponent } from '../types';\n\n// copied from react-is\nconst REACT_MEMO_TYPE = Symbol.for('react.memo');\nconst REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\n\n/**\n * Adapted from hoist-non-react-statics to avoid the react-is dependency.\n */\nconst REACT_STATICS = {\n contextType: true,\n defaultProps: true,\n displayName: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n propTypes: true,\n type: true,\n};\n\nconst KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true,\n};\n\nconst FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n};\n\nconst MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true,\n};\n\nconst TYPE_STATICS: Record<symbol, Record<string, boolean>> = {\n [REACT_FORWARD_REF_TYPE]: FORWARD_REF_STATICS,\n [REACT_MEMO_TYPE]: MEMO_STATICS,\n};\n\ntype OmniComponent = AnyComponent;\n\n// adapted from react-is\nfunction isMemo(\n object: OmniComponent | React.MemoExoticComponent<any>\n): object is React.MemoExoticComponent<any> {\n const $$typeofType = 'type' in object && object.type.$$typeof;\n\n return $$typeofType === REACT_MEMO_TYPE;\n}\n\nfunction getStatics(component: OmniComponent) {\n // React v16.11 and below\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n\n // React v16.12 and above\n return '$$typeof' in component\n ? TYPE_STATICS[component['$$typeof'] as unknown as symbol]\n : REACT_STATICS;\n}\n\nconst defineProperty = Object.defineProperty;\nconst getOwnPropertyNames = Object.getOwnPropertyNames;\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst objectPrototype = Object.prototype;\n\ntype ExcludeList = {\n [key: string]: true;\n};\n\nexport type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = {\n [key in Exclude<\n keyof S,\n S extends React.MemoExoticComponent<any>\n ? keyof typeof MEMO_STATICS | keyof C\n : S extends React.ForwardRefExoticComponent<any>\n ? keyof typeof FORWARD_REF_STATICS | keyof C\n : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C\n >]: S[key];\n};\n\nexport default function hoistNonReactStatics<\n T extends OmniComponent,\n S extends OmniComponent,\n C extends ExcludeList = {},\n>(targetComponent: T, sourceComponent: S, excludelist?: C | undefined) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n\n const inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, excludelist);\n }\n\n const keys: (string | symbol)[] = (\n getOwnPropertyNames(sourceComponent) as (string | symbol)[]\n ).concat(getOwnPropertySymbols(sourceComponent));\n\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i] as string;\n if (\n !(key in KNOWN_STATICS) &&\n !(excludelist && excludelist[key]) &&\n !(sourceStatics && key in sourceStatics) &&\n !(targetStatics && key in targetStatics)\n ) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor!);\n } catch (e) {\n /* ignore */\n }\n }\n }\n }\n\n return targetComponent as T & NonReactStatics<S, C>;\n}\n","import React from 'react';\nimport { IS_RSC } from '../constants';\nimport { ThemeContext } from '../models/ThemeProvider';\nimport { AnyComponent, ExecutionProps } from '../types';\nimport determineTheme from '../utils/determineTheme';\nimport getComponentName from '../utils/getComponentName';\nimport hoist, { NonReactStatics } from '../utils/hoist';\n\ntype WithThemeOuterProps<T extends AnyComponent> = Omit<\n React.ComponentPropsWithRef<T>,\n keyof ExecutionProps\n> &\n ExecutionProps;\n\n/** Higher-order component that injects the current theme as a prop. Prefer `useTheme` in function components. */\nexport default function withTheme<T extends AnyComponent>(\n Component: T\n): React.ForwardRefExoticComponent<\n React.PropsWithoutRef<WithThemeOuterProps<T>> & React.RefAttributes<any>\n> &\n NonReactStatics<T> {\n const WithTheme = React.forwardRef<any, WithThemeOuterProps<T>>((props, ref) => {\n const theme = !IS_RSC ? React.useContext(ThemeContext) : undefined;\n const themeProp = determineTheme(props, theme, Component.defaultProps);\n\n if (process.env.NODE_ENV !== 'production' && themeProp === undefined) {\n console.warn(\n `[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"${getComponentName(\n Component\n )}\"`\n );\n }\n\n return React.createElement(Component, {\n ...props,\n theme: themeProp,\n ref,\n } as React.ComponentPropsWithRef<T>);\n });\n\n WithTheme.displayName = `WithTheme(${getComponentName(Component)})`;\n\n return hoist(WithTheme, Component);\n}\n","const AD_REPLACER_R = /(a)(d)/gi;\n\n/* This is the \"capacity\" of our alphabet i.e. 2x26 for all letters plus their capitalised\n * counterparts */\nconst charsLength = 52;\n\n/* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */\nconst getAlphabeticChar = (code: number) => String.fromCharCode(code + (code > 25 ? 39 : 97));\n\n/* input a number, usually a hash and convert it to base-52 */\nexport default function generateAlphabeticName(code: number) {\n let name = '';\n let x;\n\n /* get a char and divide by alphabet-length */\n for (x = Math.abs(code); x > charsLength; x = (x / charsLength) | 0) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return (getAlphabeticChar(x % charsLength) + name).replace(AD_REPLACER_R, '$1-$2');\n}\n","/**\n * Convenience function for joining strings to form className chains\n */\nexport function joinStrings(a?: string | undefined, b?: string | undefined): string {\n return a && b ? a + ' ' + b : a || b || '';\n}\n\nexport function joinStringArray(arr: string[], sep?: string | undefined): string {\n return arr.join(sep || '');\n}\n","import transformDeclPairs from 'css-to-react-native';\nimport {\n Dict,\n ExecutionContext,\n IInlineStyle,\n IInlineStyleConstructor,\n RuleSet,\n StyleSheet,\n} from '../types';\nimport flatten from '../utils/flatten';\nimport generateComponentId from '../utils/generateComponentId';\nimport { joinStringArray } from '../utils/joinStrings';\n\n// List of CSS values not supported by React Native\nexport const RN_UNSUPPORTED_VALUES = ['fit-content', 'min-content', 'max-content'];\n\nfunction stripComments(css: string): string {\n if (css.indexOf('/*') === -1) return css;\n let result = '';\n let i = 0;\n let quote = 0; // 0 = none, 34 = \", 39 = '\n const len = css.length;\n while (i < len) {\n const ch = css.charCodeAt(i);\n if (quote) {\n if (ch === 92) {\n // backslash: copy it and the next char (escape sequence)\n result += css.substring(i, i + 2);\n i += 2;\n continue;\n }\n if (ch === quote) quote = 0;\n result += css[i];\n i++;\n } else if (ch === 34 || ch === 39) {\n quote = ch;\n result += css[i];\n i++;\n } else if (ch === 47 && css.charCodeAt(i + 1) === 42) {\n // /* comment */\n const end = css.indexOf('*/', i + 2);\n if (end === -1) break;\n i = end + 2;\n } else {\n result += css[i];\n i++;\n }\n }\n return result;\n}\n\n/**\n * Extract CSS declaration pairs from flat CSS text.\n * Only handles `property: value;` — selectors, at-rules, and nesting\n * are not supported (and not expected in the native inline style path).\n */\nexport function parseCSSDeclarations(rawCss: string): [string, string][] {\n const css = stripComments(rawCss);\n const pairs: [string, string][] = [];\n const len = css.length;\n let i = 0;\n\n while (i < len) {\n // skip whitespace, stray semicolons, and braces (from selectors leaking through)\n while (\n i < len &&\n (css[i] === ' ' ||\n css[i] === '\\n' ||\n css[i] === '\\r' ||\n css[i] === '\\t' ||\n css[i] === ';' ||\n css[i] === '{' ||\n css[i] === '}')\n )\n i++;\n\n if (i >= len) break;\n\n // find the colon separating property from value\n const colonIdx = css.indexOf(':', i);\n if (colonIdx === -1) break;\n\n const prop = css.substring(i, colonIdx).trim();\n\n let parenDepth = 0;\n let quote = 0; // 0 = none, 34 = \", 39 = '\n let j = colonIdx + 1;\n while (j < len) {\n const ch = css.charCodeAt(j);\n if (quote) {\n if (ch === 92) {\n j++; // skip escaped character\n } else if (ch === quote) {\n quote = 0;\n }\n } else if (ch === 34 || ch === 39) {\n quote = ch;\n } else if (ch === 40) {\n parenDepth++;\n } else if (ch === 41) {\n if (parenDepth > 0) parenDepth--;\n } else if (ch === 59 && parenDepth === 0) {\n break;\n }\n j++;\n }\n\n // Unclosed quote or paren: drop this declaration, find first ; to resume from\n if (j >= len && (quote !== 0 || parenDepth > 0)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[styled-components/native] Invalid CSS in declaration \"${prop}\": ` +\n (quote ? 'unterminated string' : 'unclosed parenthesis') +\n '. This declaration was dropped.'\n );\n }\n const semi = css.indexOf(';', colonIdx + 1);\n i = semi !== -1 ? semi + 1 : len;\n continue;\n }\n\n const value = css.substring(colonIdx + 1, j).trim();\n\n if (prop && value) {\n if (process.env.NODE_ENV !== 'production' && (prop[0] === '@' || prop.indexOf('{') !== -1)) {\n console.warn(\n `[styled-components/native] \"${prop}\" is not supported as an inline style and will be ignored. ` +\n 'Only CSS declarations (property: value) are supported in React Native.'\n );\n } else {\n pairs.push([prop, value]);\n }\n }\n\n i = j + 1; // skip past the semicolon\n }\n\n return pairs;\n}\n\nlet generated: Dict<any> = {};\n\n/** Clear the cached CSS-to-style-object mappings. Useful in tests or long-running RN apps with highly dynamic styles. */\nexport const resetStyleCache = (): void => {\n generated = {};\n};\n\n/**\n * Parse flat CSS into a style object via css-to-react-native, with caching.\n */\nexport function cssToStyleObject(flatCSS: string, styleSheet: StyleSheet) {\n const hash = generateComponentId(flatCSS);\n\n if (!generated[hash]) {\n const declPairs: [string, string][] = [];\n for (const [prop, value] of parseCSSDeclarations(flatCSS)) {\n if (RN_UNSUPPORTED_VALUES.includes(value)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[styled-components/native] The value \"${value}\" for property \"${prop}\" is not supported in React Native and will be ignored.`\n );\n }\n } else {\n declPairs.push([prop, value]);\n }\n }\n\n // RN does not support differing border values for Image components (but does for View).\n // https://github.com/styled-components/styled-components/issues/4181\n const styleObject = transformDeclPairs(declPairs, ['borderWidth', 'borderColor']);\n\n generated[hash] = styleSheet.create({ generated: styleObject }).generated;\n }\n return generated[hash];\n}\n\n/**\n * InlineStyle takes arbitrary CSS and generates a flat object\n */\nexport default function makeInlineStyleClass<Props extends object>(styleSheet: StyleSheet) {\n const InlineStyle: IInlineStyleConstructor<Props> = class InlineStyle implements IInlineStyle<Props> {\n rules: RuleSet<Props>;\n\n constructor(rules: RuleSet<Props>) {\n this.rules = rules;\n }\n\n generateStyleObject(executionContext: ExecutionContext & Props) {\n const flatCSS = joinStringArray(\n flatten(this.rules as RuleSet<object>, executionContext) as string[]\n );\n return cssToStyleObject(flatCSS, styleSheet);\n }\n };\n\n return InlineStyle;\n}\n","import generateAlphabeticName from './generateAlphabeticName';\nimport { hash } from './hash';\n\nexport default function generateComponentId(str: string) {\n return generateAlphabeticName(hash(str) >>> 0);\n}\n","export const SEED = 5381;\n\n// When we have separate strings it's useful to run a progressive\n// version of djb2 where we pretend that we're still looping over\n// the same string\nexport const phash = (h: number, x: string) => {\n let i = x.length;\n\n while (i) {\n h = (h * 33) ^ x.charCodeAt(--i);\n }\n\n return h;\n};\n\n// Hash a non-negative integer, avoiding String() allocation for single digits.\n// Equivalent to phash(h, String(n)) for n >= 0.\nexport const phashN = (h: number, n: number) => {\n if (n >= 0 && n < 10) return (h * 33) ^ (n + 48);\n return phash(h, '' + n);\n};\n\n// This is a djb2 hashing function\nexport const hash = (x: string) => {\n return phash(SEED, x);\n};\n","import { StyledTarget } from '../types';\nimport getComponentName from './getComponentName';\nimport isTag from './isTag';\n\nexport default function generateDisplayName(target: StyledTarget<any>) {\n return isTag(target) ? `styled.${target}` : `Styled(${getComponentName(target)})`;\n}\n","import { StyledTarget } from '../types';\n\nexport default function isTag(target: StyledTarget<'web'>): target is string {\n return (\n typeof target === 'string' &&\n (process.env.NODE_ENV !== 'production'\n ? target.charAt(0) === target.charAt(0).toLowerCase()\n : true)\n );\n}\n","import isPlainObject from './isPlainObject';\n\nfunction mixinRecursively(target: any, source: any, forceMerge = false) {\n /* only merge into POJOs, Arrays, but for top level objects only\n * allow to merge into anything by passing forceMerge = true */\n if (!forceMerge && !isPlainObject(target) && !Array.isArray(target)) {\n return source;\n }\n\n if (Array.isArray(source)) {\n for (let key = 0; key < source.length; key++) {\n target[key] = mixinRecursively(target[key], source[key]);\n }\n } else if (isPlainObject(source)) {\n for (const key in source) {\n target[key] = mixinRecursively(target[key], source[key]);\n }\n }\n\n return target;\n}\n\n/**\n * Arrays & POJOs merged recursively, other objects and value types are overridden\n * If target is not a POJO or an Array, it will get source properties injected via shallow merge\n * Source objects applied left to right. Mutates & returns target. Similar to lodash merge.\n */\nexport default function mixinDeep(target: any, ...sources: any[]) {\n for (const source of sources) {\n mixinRecursively(target, source, true);\n }\n\n return target;\n}\n","import React, { createElement, Ref } from 'react';\nimport type {\n Attrs,\n BaseObject,\n Dict,\n ExecutionContext,\n ExecutionProps,\n IInlineStyleConstructor,\n IStyledComponent,\n IStyledComponentFactory,\n IStyledStatics,\n NativeTarget,\n OmitNever,\n RuleSet,\n StyledOptions,\n} from '../types';\nimport determineTheme from '../utils/determineTheme';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '../utils/empties';\nimport generateDisplayName from '../utils/generateDisplayName';\nimport hoist from '../utils/hoist';\nimport isFunction from '../utils/isFunction';\nimport isStyledComponent from '../utils/isStyledComponent';\nimport merge from '../utils/mixinDeep';\nimport { DefaultTheme, ThemeContext } from './ThemeProvider';\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nfunction shallowEqualContext(prev: object, next: object, prevKeyCount: number): boolean {\n const a = prev as Record<string, unknown>;\n const b = next as Record<string, unknown>;\n let nextKeyCount = 0;\n for (const key in b) {\n if (hasOwn.call(b, key)) {\n nextKeyCount++;\n if (a[key] !== b[key]) return false;\n }\n }\n return nextKeyCount === prevKeyCount;\n}\n\nfunction resolveContext<Props extends object>(\n theme: DefaultTheme = EMPTY_OBJECT,\n props: Props,\n attrs: Attrs<Props>[]\n): ExecutionContext & Props {\n const context: ExecutionContext & Props = { ...props, theme };\n\n for (let i = 0; i < attrs.length; i++) {\n const resolvedAttrDef = isFunction(attrs[i])\n ? (attrs[i] as Function)({ ...context })\n : attrs[i];\n\n for (const key in resolvedAttrDef) {\n // @ts-expect-error bad types\n context[key] = resolvedAttrDef[key];\n }\n }\n\n return context;\n}\n\ninterface StyledComponentImplProps extends ExecutionProps {\n style?: any;\n}\n\nfunction buildPropsForElement(\n context: Record<string, any>,\n elementToBeCreated: NativeTarget,\n shouldForwardProp: ((prop: string, el: NativeTarget) => boolean) | undefined\n): Dict<any> {\n const propsForElement: Dict<any> = {};\n for (const key in context) {\n if (key[0] === '$' || key === 'as' || key === 'theme') continue;\n else if (key === 'forwardedAs') {\n propsForElement.as = context[key];\n } else if (!shouldForwardProp || shouldForwardProp(key, elementToBeCreated)) {\n propsForElement[key] = context[key];\n }\n }\n return propsForElement;\n}\n\n// [prevProps, prevTheme, prevPropsKeyCount, cachedContext, cachedStyles]\ntype RenderCache = [object, DefaultTheme | undefined, number, object, any];\n\nfunction useStyledComponentImpl<Props extends StyledComponentImplProps>(\n forwardedComponent: IStyledComponent<'native', Props>,\n props: Props,\n forwardedRef: Ref<any>\n) {\n const {\n attrs: componentAttrs,\n inlineStyle,\n defaultProps,\n shouldForwardProp,\n target,\n } = forwardedComponent;\n\n // Guard exists for RSC: useContext is undefined in server component environments\n const contextTheme = React.useContext ? React.useContext(ThemeContext) : undefined;\n const theme = determineTheme(props, contextTheme, defaultProps) || EMPTY_OBJECT;\n\n let context: ExecutionContext & Props;\n let generatedStyles: any;\n\n const renderCacheRef = React.useRef ? React.useRef<RenderCache | null>(null) : { current: null };\n const prev = renderCacheRef.current;\n\n if (prev !== null && prev[1] === theme && shallowEqualContext(prev[0], props, prev[2])) {\n context = prev[3] as typeof context;\n generatedStyles = prev[4];\n } else {\n context = resolveContext<Props>(theme, props, componentAttrs);\n generatedStyles = inlineStyle.generateStyleObject(context);\n\n let propsKeyCount = 0;\n for (const key in props) {\n if (hasOwn.call(props, key)) propsKeyCount++;\n }\n renderCacheRef.current = [props, theme, propsKeyCount, context, generatedStyles];\n }\n\n const elementToBeCreated: NativeTarget = (context as any).as || props.as || target;\n const propsForElement = buildPropsForElement(context, elementToBeCreated, shouldForwardProp);\n\n // Guard exists for RSC: useMemo is undefined in server component environments\n propsForElement.style = React.useMemo\n ? React.useMemo(\n () =>\n isFunction(props.style)\n ? (state: any) => [generatedStyles].concat(props.style(state))\n : props.style\n ? [generatedStyles].concat(props.style)\n : generatedStyles,\n [props.style, generatedStyles]\n )\n : isFunction(props.style)\n ? (state: any) => [generatedStyles].concat(props.style(state))\n : props.style\n ? [generatedStyles].concat(props.style)\n : generatedStyles;\n\n if (forwardedRef) {\n propsForElement.ref = forwardedRef;\n }\n\n return createElement(elementToBeCreated, propsForElement);\n}\n\nexport default (InlineStyle: IInlineStyleConstructor<any>) => {\n const createStyledNativeComponent = <\n Target extends NativeTarget,\n OuterProps extends ExecutionProps,\n Statics extends object = BaseObject,\n >(\n target: Target,\n options: StyledOptions<'native', OuterProps>,\n rules: RuleSet<OuterProps>\n ): ReturnType<IStyledComponentFactory<'native', Target, OuterProps, Statics>> => {\n const isTargetStyledComp = isStyledComponent(target);\n const styledComponentTarget = target as IStyledComponent<'native', OuterProps>;\n\n const { displayName = generateDisplayName(target), attrs = EMPTY_ARRAY } = options;\n\n // fold the underlying StyledComponent attrs up (implicit extend)\n const finalAttrs =\n isTargetStyledComp && styledComponentTarget.attrs\n ? styledComponentTarget.attrs.concat(attrs).filter(Boolean)\n : (attrs as Attrs<OuterProps>[]);\n\n let shouldForwardProp = options.shouldForwardProp;\n\n if (isTargetStyledComp && styledComponentTarget.shouldForwardProp) {\n const shouldForwardPropFn = styledComponentTarget.shouldForwardProp;\n\n if (options.shouldForwardProp) {\n const passedShouldForwardPropFn = options.shouldForwardProp;\n\n // compose nested shouldForwardProp calls\n shouldForwardProp = (prop, elementToBeCreated) =>\n shouldForwardPropFn(prop, elementToBeCreated) &&\n passedShouldForwardPropFn(prop, elementToBeCreated);\n } else {\n shouldForwardProp = shouldForwardPropFn;\n }\n }\n\n const forwardRefRender = (\n props: React.PropsWithoutRef<ExecutionProps & OuterProps>,\n ref: React.Ref<any>\n ) =>\n useStyledComponentImpl<OuterProps>(\n WrappedStyledComponent,\n props as ExecutionProps & OuterProps,\n ref\n );\n\n forwardRefRender.displayName = displayName;\n\n /**\n * forwardRef creates a new interim component, which we'll take advantage of\n * instead of extending ParentComponent to create _another_ interim class\n */\n let WrappedStyledComponent = React.forwardRef(forwardRefRender) as unknown as IStyledComponent<\n 'native',\n any\n > &\n Statics;\n\n WrappedStyledComponent.attrs = finalAttrs;\n WrappedStyledComponent.inlineStyle = new InlineStyle(\n isTargetStyledComp ? styledComponentTarget.inlineStyle.rules.concat(rules) : rules\n ) as InstanceType<IInlineStyleConstructor<OuterProps>>;\n WrappedStyledComponent.displayName = displayName;\n WrappedStyledComponent.shouldForwardProp = shouldForwardProp;\n\n // @ts-expect-error we don't actually need this for anything other than detection of a styled-component\n WrappedStyledComponent.styledComponentId = true;\n\n // fold the underlying StyledComponent target up since we folded the styles\n WrappedStyledComponent.target = isTargetStyledComp ? styledComponentTarget.target : target;\n\n Object.defineProperty(WrappedStyledComponent, 'defaultProps', {\n get() {\n return this._foldedDefaultProps;\n },\n\n set(obj) {\n this._foldedDefaultProps = isTargetStyledComp\n ? merge({}, styledComponentTarget.defaultProps, obj)\n : obj;\n },\n });\n\n hoist<typeof WrappedStyledComponent, typeof target>(WrappedStyledComponent, target, {\n // all SC-specific things should not be hoisted\n attrs: true,\n inlineStyle: true,\n displayName: true,\n shouldForwardProp: true,\n target: true,\n } as { [key in keyof OmitNever<IStyledStatics<'native', Target>>]: true });\n\n return WrappedStyledComponent;\n };\n\n return createStyledNativeComponent;\n};\n","import React from 'react';\nimport constructWithOptions, { Styled } from '../constructors/constructWithOptions';\nimport css from '../constructors/css';\nimport withTheme from '../hoc/withTheme';\nimport _InlineStyle, { cssToStyleObject } from '../models/InlineStyle';\nimport _StyledNativeComponent from '../models/StyledNativeComponent';\nimport ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';\nimport { NativeTarget, RuleSet } from '../types';\nimport flatten from '../utils/flatten';\nimport isStyledComponent from '../utils/isStyledComponent';\nimport { joinStringArray } from '../utils/joinStrings';\n\nconst reactNative = require('react-native') as Awaited<typeof import('react-native')>;\n\nconst InlineStyle = _InlineStyle(reactNative.StyleSheet);\nconst StyledNativeComponent = _StyledNativeComponent(InlineStyle);\n\n/**\n * Create a styled component for React Native.\n *\n * ```tsx\n * const Card = styled.View`padding: 16px; background-color: white;`;\n * const Label = styled(Text)`font-size: 14px;`;\n * ```\n */\nconst baseStyled = <Target extends NativeTarget>(tag: Target) =>\n constructWithOptions<'native', Target>(StyledNativeComponent, tag);\n\nconst aliases = [\n 'ActivityIndicator',\n 'Button',\n 'FlatList',\n 'Image',\n 'ImageBackground',\n 'InputAccessoryView',\n 'KeyboardAvoidingView',\n 'Modal',\n 'Pressable',\n 'RefreshControl',\n 'SafeAreaView',\n 'ScrollView',\n 'SectionList',\n 'StatusBar',\n 'Switch',\n 'Text',\n 'TextInput',\n 'TouchableHighlight',\n 'TouchableNativeFeedback',\n 'TouchableOpacity',\n 'TouchableWithoutFeedback',\n 'View',\n 'VirtualizedList',\n] as const;\n\ntype KnownComponents = (typeof aliases)[number];\n\n/** Isolates RN-provided components since they don't expose a helper type for this. */\ntype RNComponents = {\n [K in keyof typeof reactNative]: (typeof reactNative)[K] extends React.ComponentType<any>\n ? (typeof reactNative)[K]\n : never;\n};\n\nconst styled = baseStyled as typeof baseStyled & {\n [E in KnownComponents]: Styled<'native', RNComponents[E], React.ComponentProps<RNComponents[E]>>;\n};\n\n/* Define a getter for each alias which simply gets the reactNative component\n * and passes it to styled */\naliases.forEach(alias =>\n Object.defineProperty(styled, alias, {\n enumerable: true,\n configurable: false,\n get() {\n if (alias in reactNative && reactNative[alias]) {\n return styled(reactNative[alias] as NativeTarget);\n }\n\n throw new Error(\n `${alias} is not available in the currently-installed version of react-native`\n );\n },\n })\n);\n\n/**\n * Convert a `css` tagged template to a React Native StyleSheet object.\n *\n * ```tsx\n * const styles = toStyleSheet(css`background-color: red; padding: 10px;`);\n * // { backgroundColor: 'red', paddingTop: 10, ... }\n * ```\n */\nconst toStyleSheet = (rules: RuleSet<object>) => {\n const flatCSS = joinStringArray(flatten(rules) as string[]);\n return cssToStyleObject(flatCSS, reactNative.StyleSheet);\n};\n\nexport {\n CSSKeyframes,\n CSSObject,\n CSSProperties,\n CSSPseudos,\n DefaultTheme,\n ExecutionContext,\n ExecutionProps,\n IStyledComponent,\n IStyledComponentFactory,\n IStyledStatics,\n NativeTarget,\n PolymorphicComponent,\n PolymorphicComponentProps,\n Runtime,\n StyledObject,\n StyledOptions,\n} from '../types';\nexport {\n css,\n styled as default,\n isStyledComponent,\n styled,\n ThemeConsumer,\n ThemeContext,\n ThemeProvider,\n toStyleSheet,\n useTheme,\n withTheme,\n};\n"],"names":["EMPTY_ARRAY","Object","freeze","EMPTY_OBJECT","ERRORS","process","env","NODE_ENV","throwStyledComponentsError","code","interpolations","Error","length","join","args","a","b","c","len","push","forEach","d","replace","format","trim","unitless","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","flex","flexGrow","flexShrink","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","addUnitIfNeeded","name","value","startsWith","String","getComponentName","target","displayName","isUpper","hyphenateStyleName","string","output","i","toLowerCase","isFunction","test","KEYFRAMES_SYMBOL","Symbol","for","isKeyframes","isPlainObject","x","constructor","$$typeof","isStyledComponent","isFalsish","chunk","objToCssArray","obj","rules","key","val","hasOwnProperty","Array","isArray","isCss","hyphenate","flatten","executionContext","styleSheet","stylisInstance","result","styledComponentId","prototype","isReactComponent","fnResult","console","error","inject","getName","cssArr","toString","interleave","strings","addTag","arg","assign","css","styles","styleStringArray","constructWithOptions","componentConstructor","tag","options","styledError","templateFunction","initialStyles","attrs","concat","filter","Boolean","withConfig","config","readSpeedyFlag","undefined","REACT_APP_SC_ATTR","SC_DISABLE_SPEEDY","_b","_a","ThemeContext","React","createContext","ThemeConsumer","Consumer","useTheme","theme","useContext","ThemeProvider","props","outerTheme","themeContext","useMemo","mergedTheme","mergeTheme","children","createElement","Provider","determineTheme","providedTheme","defaultProps","REACT_MEMO_TYPE","REACT_FORWARD_REF_TYPE","REACT_STATICS","contextType","getDerivedStateFromError","getDerivedStateFromProps","propTypes","type","KNOWN_STATICS","caller","callee","arguments","arity","MEMO_STATICS","compare","TYPE_STATICS","render","getStatics","component","object","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","excludelist","inheritedComponent","keys","targetStatics","sourceStatics","descriptor","e","withTheme","Component","WithTheme","forwardRef","ref","themeProp","warn","hoist","AD_REPLACER_R","getAlphabeticChar","fromCharCode","joinStringArray","arr","sep","RN_UNSUPPORTED_VALUES","generated","cssToStyleObject","flatCSS","hash","Math","abs","generateAlphabeticName","h","charCodeAt","phash","declPairs","prop","rawCss","indexOf","quote","ch","substring","end","stripComments","pairs","colonIdx","parenDepth","j","semi","parseCSSDeclarations","includes","styleObject","transformDeclPairs","create","generateDisplayName","charAt","isTag","mixinRecursively","source","forceMerge","hasOwn","reactNative","require","StyledNativeComponent","StyleSheet","InlineStyle","this","generateStyleObject","isTargetStyledComp","styledComponentTarget","finalAttrs","shouldForwardProp","shouldForwardPropFn","passedShouldForwardPropFn","elementToBeCreated","forwardRefRender","forwardedComponent","forwardedRef","componentAttrs","inlineStyle","contextTheme","context","generatedStyles","renderCacheRef","useRef","current","prev","next","prevKeyCount","nextKeyCount","call","shallowEqualContext","resolvedAttrDef","resolveContext","propsKeyCount","as","propsForElement","buildPropsForElement","style","state","useStyledComponentImpl","WrappedStyledComponent","get","_foldedDefaultProps","set","sources","merge","styled","alias","enumerable","configurable","toStyleSheet"],"mappings":"4EAEO,MAAMA,EAAcC,OAAOC,OAAO,IAC5BC,EAAeF,OAAOC,OAAO,ICApCE,EAA6C,eAAzBC,QAAQC,IAAIC,SCHvB,CACb,EAAK,wDACL,EAAK,gQACL,EAAK,sHACL,EAAK,sMACL,EAAK,kKACL,EAAK,4OACL,EAAK,qHACL,EAAK,8DACL,EAAK,gCACL,GAAM,iUACN,GAAM,wNACN,GAAM,qWACN,GAAM,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/B,IAAI4N,EAAyBnJ,EAAM2D,WAAW8D,GAwC9C,OAlCA0B,EAAuBhK,MAAQiI,EAC/B+B,EAAuBtB,YAAc,IAAId,GACvCG,EAAqBC,EAAsBU,YAAYhL,MAAMuC,OAAOvC,GAASA,GAE/EsM,EAAuB5N,YAAcA,EACrC4N,EAAuB9B,kBAAoBA,EAG3C8B,EAAuBzL,mBAAoB,EAG3CyL,EAAuB7N,OAAS4L,EAAqBC,EAAsB7L,OAASA,EAEpFpE,OAAOsL,eAAe2G,EAAwB,eAAgB,CAC5D,GAAAC,GACE,OAAOpC,KAAKqC,mBACb,EAED,GAAAC,CAAI1M,GACFoK,KAAKqC,oBAAsBnC,EDzMX,SAAU5L,KAAgBiO,GAChD,IAAK,MAAM/C,KAAU+C,EACnBhD,GAAiBjL,EAAQkL,GAAQ,GAGnC,OAAOlL,CACT,CCoMYkO,CAAM,CAAE,EAAErC,EAAsBhG,aAAcvE,GAC9CA,CACL,IAGHmH,EAAoDoF,EAAwB7N,EAAQ,CAElF6D,OAAO,EACP0I,aAAa,EACbtM,aAAa,EACb8L,mBAAmB,EACnB/L,QAAQ,IAGH6N,ICpLLM,GAtC2C3K,GAC/CF,EAAuCiI,GAAuB/H,GD2HjD,IAACiI,GCzHA,CACd,oBACA,SACA,WACA,QACA,kBACA,qBACA,uBACA,QACA,YACA,iBACA,eACA,aACA,cACA,YACA,SACA,OACA,YACA,qBACA,0BACA,mBACA,2BACA,OACA,mBAkBM1O,QAAQqR,GACdxS,OAAOsL,eAAeiH,GAAQC,EAAO,CACnCC,YAAY,EACZC,cAAc,EACd,GAAAR,GACE,GAAIM,KAAS/C,IAAeA,GAAY+C,GACtC,OAAOD,GAAO9C,GAAY+C,IAG5B,MAAM,IAAI9R,MACR,GAAG8R,wEAEN,KAYL,MAAMG,GAAgBhN,GAEb2H,EADSL,EAAgB9G,EAAQR,IACP8J,GAAYG"}
1
+ {"version":3,"file":"styled-components.native.esm.js","sources":["../../../src/utils/empties.ts","../../../src/utils/error.ts","../../../src/utils/errors.ts","../../../src/utils/cssTagged.ts","../../../src/utils/addUnitIfNeeded.ts","../../../src/utils/getComponentName.ts","../../../src/utils/hyphenateStyleName.ts","../../../src/utils/isFunction.ts","../../../src/utils/isKeyframes.ts","../../../src/utils/isPlainObject.ts","../../../src/utils/isStyledComponent.ts","../../../src/utils/flatten.ts","../../../src/utils/isStatelessFunction.ts","../../../src/utils/interleave.ts","../../../src/constructors/css.ts","../../../src/constructors/constructWithOptions.ts","../../../src/constants.ts","../../../src/models/ThemeProvider.tsx","../../../src/utils/determineTheme.ts","../../../src/utils/hoist.ts","../../../src/hoc/withTheme.tsx","../../../src/utils/generateAlphabeticName.ts","../../../src/utils/joinStrings.ts","../../../src/models/InlineStyle.ts","../../../src/utils/generateComponentId.ts","../../../src/utils/hash.ts","../../../src/utils/generateDisplayName.ts","../../../src/utils/isTag.ts","../../../src/utils/mixinDeep.ts","../../../src/models/StyledNativeComponent.ts","../../../src/native/index.ts"],"sourcesContent":["import { Dict } from '../types';\n\nexport const EMPTY_ARRAY = Object.freeze([]) as Readonly<any[]>;\nexport const EMPTY_OBJECT = Object.freeze({}) as Readonly<Dict<any>>;\n","import { Dict } from '../types';\nimport errorMap from './errors';\n\nconst ERRORS: Dict<any> = process.env.NODE_ENV !== 'production' ? errorMap : {};\n\n/**\n * super basic version of sprintf\n */\nfunction format(...args: [string, ...any]) {\n let a = args[0];\n const b = [];\n\n for (let c = 1, len = args.length; c < len; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(d => {\n a = a.replace(/%[a-z]/, d);\n });\n\n return a;\n}\n\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n */\nexport default function throwStyledComponentsError(\n code: string | number,\n ...interpolations: any[]\n) {\n if (process.env.NODE_ENV === 'production') {\n return new Error(\n `An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${code} for more information.${\n interpolations.length > 0 ? ` Args: ${interpolations.join(', ')}` : ''\n }`\n );\n } else {\n return new Error(format(ERRORS[code], ...interpolations).trim());\n }\n}\n","export default {\n '1': 'Cannot create styled-component for component: %s.\\n\\n',\n '2': \"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",\n '3': 'Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n',\n '4': 'The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n',\n '5': 'The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n',\n '6': \"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",\n '7': 'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',\n '8': 'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',\n '9': 'Missing document `<head>`\\n\\n',\n '10': 'Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n',\n '11': '_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n',\n '12': 'It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n',\n '13': '%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n',\n '14': 'ThemeProvider: \"theme\" prop is required.\\n\\n',\n '15': \"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",\n '16': \"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",\n '17': \"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\",\n '18': 'ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`',\n};\n","import type { RuleSet } from '../types';\n\nexport const cssTagged = new WeakSet<RuleSet<any>>();\n","/**\n * CSS properties that accept unitless numeric values.\n * Inlined from @emotion/unitless with IE-only entries removed\n * (boxFlex, boxFlexGroup, boxOrdinalGroup, flexPositive, flexNegative,\n * flexOrder, msGridRow, msGridRowSpan, msGridColumn, msGridColumnSpan).\n */\nconst unitless: Record<string, 1> = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexShrink: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1,\n};\n\n// Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js\nexport default function addUnitIfNeeded(name: string, value: any) {\n // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133\n if (value == null || typeof value === 'boolean' || value === '') {\n return '';\n }\n\n if (typeof value === 'number' && value !== 0 && !(name in unitless) && !name.startsWith('--')) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers except for CSS variables\n }\n\n return String(value).trim();\n}\n","import { StyledTarget } from '../types';\n\nexport default function getComponentName(target: StyledTarget<any>) {\n return (\n (process.env.NODE_ENV !== 'production' ? typeof target === 'string' && target : false) ||\n (target as Exclude<StyledTarget<any>, string>).displayName ||\n (target as Function).name ||\n 'Component'\n );\n}\n","const isUpper = (c: string) => c >= 'A' && c <= 'Z';\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\nexport default function hyphenateStyleName(string: string): string {\n let output = '';\n\n for (let i = 0; i < string.length; i++) {\n const c = string[i];\n // Check for CSS variable prefix\n if (i === 1 && c === '-' && string[0] === '-') {\n return string;\n }\n\n if (isUpper(c)) {\n output += '-' + c.toLowerCase();\n } else {\n output += c;\n }\n }\n\n return output.startsWith('ms-') ? '-' + output : output;\n}\n","export default function isFunction(test: any): test is Function {\n return typeof test === 'function';\n}\n","import type KeyframesClass from '../models/Keyframes';\n\nconst KEYFRAMES_SYMBOL = Symbol.for('sc-keyframes');\n\nexport default function isKeyframes(value: unknown): value is KeyframesClass {\n return typeof value === 'object' && value !== null && KEYFRAMES_SYMBOL in value;\n}\n\nexport { KEYFRAMES_SYMBOL };\n","export default function isPlainObject(x: any): x is Record<any, any> {\n return (\n x !== null &&\n typeof x === 'object' &&\n x.constructor.name === Object.name &&\n /* check for reasonable markers that the object isn't an element for react & preact/compat */\n !('props' in x && x.$$typeof)\n );\n}\n","import { StyledComponentBrand } from '../types';\n\n/** Type guard that returns true if the target is a styled component. */\nexport default function isStyledComponent(target: any): target is StyledComponentBrand {\n return typeof target === 'object' && 'styledComponentId' in target;\n}\n","import type StyleSheet from '../sheet';\nimport {\n AnyComponent,\n Dict,\n ExecutionContext,\n Interpolation,\n IStyledComponent,\n RuleSet,\n Stringifier,\n StyledObject,\n} from '../types';\nimport { cssTagged } from './cssTagged';\nimport addUnitIfNeeded from './addUnitIfNeeded';\nimport getComponentName from './getComponentName';\nimport hyphenate from './hyphenateStyleName';\nimport isFunction from './isFunction';\nimport isKeyframes from './isKeyframes';\nimport isPlainObject from './isPlainObject';\nimport isStatelessFunction from './isStatelessFunction';\nimport isStyledComponent from './isStyledComponent';\n\n/**\n * It's falsish not falsy because 0 is allowed.\n */\nconst isFalsish = (chunk: any): chunk is undefined | null | false | '' =>\n chunk === undefined || chunk === null || chunk === false || chunk === '';\n\nconst CLIENT_REFERENCE = Symbol.for('react.client.reference');\n\ninterface ClientReference {\n $$typeof: symbol;\n $$id?: string;\n $$async?: boolean;\n name?: string;\n}\n\nfunction isClientReference(chunk: unknown): chunk is ClientReference {\n return (chunk as any).$$typeof === CLIENT_REFERENCE;\n}\n\n// React encodes $$id as \"modulePath#exportName\"\nfunction warnClientReference(ref: ClientReference): void {\n const id = ref.$$id;\n const label = (id && id.includes('#') ? id.split('#').pop() : id) || ref.name || 'unknown';\n console.warn(\n `Interpolating a client component (${label}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`\n );\n}\n\nexport const objToCssArray = (obj: Dict<any>): string[] => {\n const rules = [];\n\n for (const key in obj) {\n const val = obj[key];\n if (!obj.hasOwnProperty(key) || isFalsish(val)) continue;\n\n if ((Array.isArray(val) && cssTagged.has(val)) || isFunction(val)) {\n rules.push(hyphenate(key) + ':', val, ';');\n } else if (isPlainObject(val)) {\n rules.push(key + ' {', ...objToCssArray(val), '}');\n } else {\n rules.push(hyphenate(key) + ': ' + addUnitIfNeeded(key, val) + ';');\n }\n }\n\n return rules;\n};\n\nexport default function flatten<Props extends object>(\n chunk: Interpolation<object>,\n executionContext?: (ExecutionContext & Props) | undefined,\n styleSheet?: StyleSheet | undefined,\n stylisInstance?: Stringifier | undefined,\n result: RuleSet<Props> = []\n): RuleSet<Props> {\n if (isFalsish(chunk)) {\n return result;\n }\n\n const t = typeof chunk;\n\n if (t === 'string') {\n result.push(chunk as string);\n return result;\n }\n\n if (t === 'function') {\n if (isClientReference(chunk)) {\n if (process.env.NODE_ENV !== 'production') warnClientReference(chunk);\n return result;\n }\n\n if (isStatelessFunction(chunk) && executionContext) {\n const fnResult = (chunk as Function)(executionContext);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n typeof fnResult === 'object' &&\n !Array.isArray(fnResult) &&\n !isKeyframes(fnResult) &&\n !isPlainObject(fnResult) &&\n fnResult !== null\n ) {\n console.error(\n `${getComponentName(\n chunk as AnyComponent\n )} is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.`\n );\n }\n\n return flatten<Props>(fnResult, executionContext, styleSheet, stylisInstance, result);\n } else {\n result.push(chunk as unknown as IStyledComponent<'web'>);\n return result;\n }\n }\n\n if (Array.isArray(chunk)) {\n for (let i = 0; i < chunk.length; i++) {\n flatten<Props>(chunk[i], executionContext, styleSheet, stylisInstance, result);\n }\n return result;\n }\n\n if (isStyledComponent(chunk)) {\n result.push(`.${(chunk as unknown as IStyledComponent<'web', any>).styledComponentId}`);\n return result;\n }\n\n if (isKeyframes(chunk)) {\n if (styleSheet) {\n chunk.inject(styleSheet, stylisInstance);\n result.push(chunk.getName(stylisInstance));\n } else {\n result.push(chunk);\n }\n return result;\n }\n\n // Module-level client reference proxies (typeof 'object') pass isPlainObject — catch before\n if (isClientReference(chunk)) {\n if (process.env.NODE_ENV !== 'production') warnClientReference(chunk);\n return result;\n }\n\n if (isPlainObject(chunk)) {\n const cssArr = objToCssArray(chunk as StyledObject<Props>);\n for (let i = 0; i < cssArr.length; i++) result.push(cssArr[i]);\n return result;\n }\n\n result.push((chunk as any).toString());\n return result;\n}\n","import isFunction from './isFunction';\n\nexport default function isStatelessFunction(test: any): test is Function {\n return isFunction(test) && !(test.prototype && test.prototype.isReactComponent);\n}\n","import { Interpolation } from '../types';\n\nexport default function interleave<Props extends object>(\n strings: readonly string[],\n interpolations: Interpolation<Props>[]\n): Interpolation<Props>[] {\n const result: Interpolation<Props>[] = [strings[0]];\n\n for (let i = 0, len = interpolations.length; i < len; i += 1) {\n result.push(interpolations[i], strings[i + 1]);\n }\n\n return result;\n}\n","import { BaseObject, Interpolation, RuleSet, StyledObject, StyleFunction, Styles } from '../types';\nimport { EMPTY_ARRAY } from '../utils/empties';\nimport flatten from '../utils/flatten';\nimport interleave from '../utils/interleave';\nimport isFunction from '../utils/isFunction';\nimport isPlainObject from '../utils/isPlainObject';\n\nimport { cssTagged } from '../utils/cssTagged';\n\nconst addTag = <T extends RuleSet<any>>(arg: T): T & { isCss: true } => {\n cssTagged.add(arg);\n return arg as T & { isCss: true };\n};\n\n/**\n * Tag a CSS template literal for use in styled components, createGlobalStyle, or attrs.\n * Enables interpolation type-checking and shared style blocks.\n *\n * ```tsx\n * const truncate = css`\n * white-space: nowrap;\n * overflow: hidden;\n * text-overflow: ellipsis;\n * `;\n * ```\n */\nfunction css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;\nfunction css<Props extends object>(\n styles: Styles<NoInfer<Props>>,\n ...interpolations: Interpolation<NoInfer<Props>>[]\n): RuleSet<NoInfer<Props>>;\nfunction css<Props extends object = BaseObject>(\n styles: Styles<NoInfer<Props>>,\n ...interpolations: Interpolation<NoInfer<Props>>[]\n): RuleSet<NoInfer<Props>> {\n if (isFunction(styles) || isPlainObject(styles)) {\n const styleFunctionOrObject = styles as StyleFunction<Props> | StyledObject<Props>;\n\n return addTag(\n flatten<Props>(\n interleave<Props>(EMPTY_ARRAY, [\n styleFunctionOrObject,\n ...interpolations,\n ]) as Interpolation<object>\n )\n );\n }\n\n const styleStringArray = styles as TemplateStringsArray;\n\n if (\n interpolations.length === 0 &&\n styleStringArray.length === 1 &&\n typeof styleStringArray[0] === 'string'\n ) {\n return flatten<Props>(styleStringArray);\n }\n\n return addTag(\n flatten<Props>(interleave<Props>(styleStringArray, interpolations) as Interpolation<object>)\n );\n}\n\nexport default css;\n","import {\n Attrs,\n BaseObject,\n ExecutionProps,\n Interpolation,\n IStyledComponent,\n IStyledComponentFactory,\n KnownTarget,\n MakeAttrsOptional,\n Runtime,\n StyledOptions,\n StyledTarget,\n Styles,\n Substitute,\n} from '../types';\nimport { EMPTY_OBJECT } from '../utils/empties';\nimport styledError from '../utils/error';\nimport css from './css';\n\ntype AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P\n ? P extends object\n ? P\n : never\n : T extends object\n ? T\n : never;\n\n/**\n * Based on Attrs being a simple object or function that returns\n * a prop object, inspect the attrs result and attempt to extract\n * any \"as\" prop usage to modify the runtime target.\n */\ntype AttrsTarget<\n R extends Runtime,\n T extends Attrs<any>,\n FallbackTarget extends StyledTarget<R>,\n Result extends ExecutionProps = AttrsResult<T>,\n> = Result extends { as: infer RuntimeTarget }\n ? RuntimeTarget extends KnownTarget\n ? RuntimeTarget\n : FallbackTarget\n : FallbackTarget;\n\nexport interface Styled<\n out R extends Runtime,\n out Target extends StyledTarget<R>,\n in out OuterProps extends object,\n out OuterStatics extends object = BaseObject,\n out AttrsKeys extends keyof any = never,\n> {\n <Props extends object = BaseObject, Statics extends object = BaseObject>(\n initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>,\n ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]\n ): IStyledComponent<R, MakeAttrsOptional<Substitute<OuterProps, Props>, AttrsKeys>> &\n OuterStatics &\n Statics &\n (R extends 'web'\n ? Target extends string\n ? {}\n : Omit<Target, keyof React.Component<any>>\n : {});\n\n attrs: <\n Props extends object = BaseObject,\n PrivateMergedProps extends object = Substitute<OuterProps, Props>,\n PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>,\n PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>,\n >(\n attrs: PrivateAttrsArg\n ) => Styled<\n R,\n PrivateResolvedTarget,\n PrivateResolvedTarget extends KnownTarget\n ? Substitute<\n Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>,\n Props\n >\n : PrivateMergedProps,\n OuterStatics,\n AttrsKeys | keyof AttrsResult<PrivateAttrsArg>\n >;\n\n withConfig: (\n config: StyledOptions<R, OuterProps>\n ) => Styled<R, Target, OuterProps, OuterStatics, AttrsKeys>;\n}\n\nexport default function constructWithOptions<\n R extends Runtime,\n Target extends StyledTarget<R>,\n OuterProps extends object = Target extends KnownTarget\n ? React.ComponentPropsWithRef<Target>\n : BaseObject,\n OuterStatics extends object = BaseObject,\n AttrsKeys extends keyof any = never,\n>(\n componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>,\n tag: StyledTarget<R>,\n options: StyledOptions<R, OuterProps> = EMPTY_OBJECT\n): Styled<R, Target, OuterProps, OuterStatics, AttrsKeys> {\n /**\n * We trust that the tag is a valid component as long as it isn't\n * falsish. Typically the tag here is a string or function (i.e.\n * class or pure function component), however a component may also be\n * an object if it uses another utility, e.g. React.memo. React will\n * output an appropriate warning however if the `tag` isn't valid.\n */\n if (!tag) {\n throw styledError(1, tag);\n }\n\n /* This is callable directly as a template function */\n const templateFunction = <Props extends object = BaseObject, Statics extends object = BaseObject>(\n initialStyles: Styles<Substitute<OuterProps, Props>>,\n ...interpolations: Interpolation<Substitute<OuterProps, Props>>[]\n ) =>\n componentConstructor<Substitute<OuterProps, Props>, Statics>(\n tag,\n options as StyledOptions<R, Substitute<OuterProps, Props>>,\n css<Substitute<OuterProps, Props>>(initialStyles, ...interpolations)\n );\n\n /**\n * Attrs allows for accomplishing two goals:\n *\n * 1. Backfilling props at runtime more expressively than defaultProps\n * 2. Amending the prop interface of a wrapped styled component\n */\n templateFunction.attrs = <\n Props extends object = BaseObject,\n PrivateMergedProps extends object = Substitute<OuterProps, Props>,\n PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>,\n PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>,\n >(\n attrs: PrivateAttrsArg\n ) =>\n constructWithOptions<\n R,\n PrivateResolvedTarget,\n PrivateResolvedTarget extends KnownTarget\n ? Substitute<\n Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>,\n Props\n >\n : PrivateMergedProps,\n OuterStatics,\n AttrsKeys | keyof AttrsResult<PrivateAttrsArg>\n >(componentConstructor, tag, {\n ...options,\n attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean),\n });\n\n /**\n * If config methods are called, wrap up a new template function\n * and merge options.\n */\n templateFunction.withConfig = (config: StyledOptions<R, OuterProps>) =>\n constructWithOptions<R, Target, OuterProps, OuterStatics, AttrsKeys>(\n componentConstructor,\n tag,\n {\n ...options,\n ...config,\n }\n );\n\n return templateFunction;\n}\n","declare let SC_DISABLE_SPEEDY: boolean | null | undefined;\ndeclare let __VERSION__: string;\n\nimport React from 'react';\n\nexport const SC_ATTR: string =\n (typeof process !== 'undefined' &&\n typeof process.env !== 'undefined' &&\n (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) ||\n 'data-styled';\n\nexport const SC_ATTR_ACTIVE = 'active';\nexport const SC_ATTR_VERSION = 'data-styled-version';\nexport const SC_VERSION = __VERSION__;\nexport const SPLITTER = '/*!sc*/\\n';\n\nexport const IS_BROWSER = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * True when running in a React Server Component environment (createContext\n * is unavailable). In browser / standalone / native builds the entire\n * expression is replaced with the literal `false` via rollup-plugin-replace\n * with empty delimiters (exact string match), enabling rollup constant\n * inlining and terser dead-code elimination for all RSC branches.\n */\nexport const IS_RSC: boolean = typeof React.createContext === 'undefined';\n\nfunction readSpeedyFlag(name: string): boolean | undefined {\n if (typeof process !== 'undefined' && typeof process.env !== 'undefined') {\n const val = process.env[name];\n if (val !== undefined && val !== '') {\n return val !== 'false';\n }\n }\n return undefined;\n}\n\nexport const DISABLE_SPEEDY = Boolean(\n typeof SC_DISABLE_SPEEDY === 'boolean'\n ? SC_DISABLE_SPEEDY\n : (readSpeedyFlag('REACT_APP_SC_DISABLE_SPEEDY') ??\n readSpeedyFlag('SC_DISABLE_SPEEDY') ??\n (typeof process !== 'undefined' && typeof process.env !== 'undefined'\n ? process.env.NODE_ENV !== 'production'\n : true))\n);\n\nexport const KEYFRAMES_ID_PREFIX = 'sc-keyframes-';\n\n// Shared empty execution context when generating static styles\nexport const STATIC_EXECUTION_CONTEXT = {};\n","import React from 'react';\nimport { IS_RSC } from '../constants';\nimport styledError from '../utils/error';\nimport isFunction from '../utils/isFunction';\n\n// Helper type for the `DefaultTheme` interface that enforces an object type & exclusively allows\n// for typed keys.\ntype DefaultThemeAsObject<T = object> = Record<keyof T, any>;\n\n/**\n * Override DefaultTheme to get accurate typings for your project.\n *\n * ```\n * // create styled-components.d.ts in your project source\n * // if it isn't being picked up, check tsconfig compilerOptions.types\n * import type { CSSProp } from \"styled-components\";\n * import Theme from './theme';\n *\n * type ThemeType = typeof Theme;\n *\n * declare module \"styled-components\" {\n * export interface DefaultTheme extends ThemeType {}\n * }\n *\n * declare module \"react\" {\n * interface DOMAttributes<T> {\n * css?: CSSProp;\n * }\n * }\n * ```\n */\nexport interface DefaultTheme extends DefaultThemeAsObject {}\n\ntype ThemeFn = (outerTheme?: DefaultTheme | undefined) => DefaultTheme;\ntype ThemeArgument = DefaultTheme | ThemeFn;\n\ntype Props = {\n children?: React.ReactNode;\n theme: ThemeArgument;\n};\n\n// Create context only if createContext is available, otherwise create a fallback\nexport const ThemeContext = !IS_RSC\n ? React.createContext<DefaultTheme | undefined>(undefined)\n : ({\n Provider: ({ children }: { children: React.ReactNode; value?: DefaultTheme }) => children,\n Consumer: ({ children }: { children: (theme?: DefaultTheme) => React.ReactNode }) =>\n children(undefined),\n } as React.Context<DefaultTheme | undefined>);\n\nexport const ThemeConsumer = ThemeContext.Consumer;\n\nfunction mergeTheme(theme: ThemeArgument, outerTheme?: DefaultTheme | undefined): DefaultTheme {\n if (!theme) {\n throw styledError(14);\n }\n\n if (isFunction(theme)) {\n const themeFn = theme as ThemeFn;\n const mergedTheme = themeFn(outerTheme);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (mergedTheme === null || Array.isArray(mergedTheme) || typeof mergedTheme !== 'object')\n ) {\n throw styledError(7);\n }\n\n return mergedTheme;\n }\n\n if (Array.isArray(theme) || typeof theme !== 'object') {\n throw styledError(8);\n }\n\n return outerTheme ? { ...outerTheme, ...theme } : theme;\n}\n\n/**\n * Returns the current theme (as provided by the closest ancestor `ThemeProvider`.)\n *\n * If no `ThemeProvider` is found, the function will error. If you need access to the theme in an\n * uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there\n * is no `ThemeProvider` ancestor.\n */\nexport function useTheme(): DefaultTheme {\n // Skip useContext if we're in an RSC environment without context support\n const theme = !IS_RSC ? React.useContext(ThemeContext) : undefined;\n\n if (!theme) {\n throw styledError(18);\n }\n\n return theme;\n}\n\n/**\n * Provide a theme to an entire react component tree via context\n */\nexport default function ThemeProvider(props: Props): React.JSX.Element | null {\n // In RSC environments without context support, ThemeProvider becomes a no-op\n if (IS_RSC) {\n return props.children as React.JSX.Element | null;\n }\n\n const outerTheme = React.useContext(ThemeContext);\n const themeContext = React.useMemo(\n () => mergeTheme(props.theme, outerTheme),\n [props.theme, outerTheme]\n );\n\n if (!props.children) {\n return null;\n }\n\n return <ThemeContext.Provider value={themeContext}>{props.children}</ThemeContext.Provider>;\n}\n","import { DefaultTheme, ExecutionProps } from '../types';\nimport { EMPTY_OBJECT } from './empties';\n\nexport default function determineTheme(\n props: ExecutionProps,\n providedTheme?: DefaultTheme | undefined,\n defaultProps: { theme?: DefaultTheme | undefined } = EMPTY_OBJECT\n): DefaultTheme | undefined {\n return (props.theme !== defaultProps.theme && props.theme) || providedTheme || defaultProps.theme;\n}\n","import React from 'react';\nimport { AnyComponent } from '../types';\n\n// copied from react-is\nconst REACT_MEMO_TYPE = Symbol.for('react.memo');\nconst REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\n\n/**\n * Adapted from hoist-non-react-statics to avoid the react-is dependency.\n */\nconst REACT_STATICS = {\n contextType: true,\n defaultProps: true,\n displayName: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n propTypes: true,\n type: true,\n};\n\nconst KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true,\n};\n\nconst FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n};\n\nconst MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true,\n};\n\nconst TYPE_STATICS: Record<symbol, Record<string, boolean>> = {\n [REACT_FORWARD_REF_TYPE]: FORWARD_REF_STATICS,\n [REACT_MEMO_TYPE]: MEMO_STATICS,\n};\n\ntype OmniComponent = AnyComponent;\n\n// adapted from react-is\nfunction isMemo(\n object: OmniComponent | React.MemoExoticComponent<any>\n): object is React.MemoExoticComponent<any> {\n const $$typeofType = 'type' in object && object.type.$$typeof;\n\n return $$typeofType === REACT_MEMO_TYPE;\n}\n\nfunction getStatics(component: OmniComponent) {\n // React v16.11 and below\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n\n // React v16.12 and above\n return '$$typeof' in component\n ? TYPE_STATICS[component['$$typeof'] as unknown as symbol]\n : REACT_STATICS;\n}\n\nconst defineProperty = Object.defineProperty;\nconst getOwnPropertyNames = Object.getOwnPropertyNames;\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst objectPrototype = Object.prototype;\n\ntype ExcludeList = {\n [key: string]: true;\n};\n\nexport type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = {\n [key in Exclude<\n keyof S,\n S extends React.MemoExoticComponent<any>\n ? keyof typeof MEMO_STATICS | keyof C\n : S extends React.ForwardRefExoticComponent<any>\n ? keyof typeof FORWARD_REF_STATICS | keyof C\n : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C\n >]: S[key];\n};\n\nexport default function hoistNonReactStatics<\n T extends OmniComponent,\n S extends OmniComponent,\n C extends ExcludeList = {},\n>(targetComponent: T, sourceComponent: S, excludelist?: C | undefined) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n\n const inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, excludelist);\n }\n\n const keys: (string | symbol)[] = (\n getOwnPropertyNames(sourceComponent) as (string | symbol)[]\n ).concat(getOwnPropertySymbols(sourceComponent));\n\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i] as string;\n if (\n !(key in KNOWN_STATICS) &&\n !(excludelist && excludelist[key]) &&\n !(sourceStatics && key in sourceStatics) &&\n !(targetStatics && key in targetStatics)\n ) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor!);\n } catch (e) {\n /* ignore */\n }\n }\n }\n }\n\n return targetComponent as T & NonReactStatics<S, C>;\n}\n","import React from 'react';\nimport { IS_RSC } from '../constants';\nimport { ThemeContext } from '../models/ThemeProvider';\nimport { AnyComponent, ExecutionProps } from '../types';\nimport determineTheme from '../utils/determineTheme';\nimport getComponentName from '../utils/getComponentName';\nimport hoist, { NonReactStatics } from '../utils/hoist';\n\ntype WithThemeOuterProps<T extends AnyComponent> = Omit<\n React.ComponentPropsWithRef<T>,\n keyof ExecutionProps\n> &\n ExecutionProps;\n\n/** Higher-order component that injects the current theme as a prop. Prefer `useTheme` in function components. */\nexport default function withTheme<T extends AnyComponent>(\n Component: T\n): React.ForwardRefExoticComponent<\n React.PropsWithoutRef<WithThemeOuterProps<T>> & React.RefAttributes<any>\n> &\n NonReactStatics<T> {\n const WithTheme = React.forwardRef<any, WithThemeOuterProps<T>>((props, ref) => {\n const theme = !IS_RSC ? React.useContext(ThemeContext) : undefined;\n const themeProp = determineTheme(props, theme, Component.defaultProps);\n\n if (process.env.NODE_ENV !== 'production' && themeProp === undefined) {\n console.warn(\n `[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"${getComponentName(\n Component\n )}\"`\n );\n }\n\n return React.createElement(Component, {\n ...props,\n theme: themeProp,\n ref,\n } as React.ComponentPropsWithRef<T>);\n });\n\n WithTheme.displayName = `WithTheme(${getComponentName(Component)})`;\n\n return hoist(WithTheme, Component);\n}\n","const AD_REPLACER_R = /(a)(d)/gi;\n\n/* This is the \"capacity\" of our alphabet i.e. 2x26 for all letters plus their capitalised\n * counterparts */\nconst charsLength = 52;\n\n/* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */\nconst getAlphabeticChar = (code: number) => String.fromCharCode(code + (code > 25 ? 39 : 97));\n\n/* input a number, usually a hash and convert it to base-52 */\nexport default function generateAlphabeticName(code: number) {\n let name = '';\n let x;\n\n /* get a char and divide by alphabet-length */\n for (x = Math.abs(code); x > charsLength; x = (x / charsLength) | 0) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return (getAlphabeticChar(x % charsLength) + name).replace(AD_REPLACER_R, '$1-$2');\n}\n","import { SPLITTER } from '../constants';\n\n/**\n * Convenience function for joining strings to form className chains\n */\nexport function joinStrings(a?: string | undefined, b?: string | undefined): string {\n return a && b ? a + ' ' + b : a || b || '';\n}\n\nexport function joinStringArray(arr: string[], sep?: string | undefined): string {\n return arr.join(sep || '');\n}\n\n/** Join compiled CSS rules with the SC splitter delimiter. */\nexport function joinRules(rules: string[]): string {\n let css = '';\n for (let i = 0; i < rules.length; i++) {\n css += rules[i] + SPLITTER;\n }\n return css;\n}\n\nexport function stripSplitter(css: string): string {\n if (!css) return css;\n return css.replaceAll(SPLITTER, '');\n}\n","import transformDeclPairs from 'css-to-react-native';\nimport {\n Dict,\n ExecutionContext,\n IInlineStyle,\n IInlineStyleConstructor,\n RuleSet,\n StyleSheet,\n} from '../types';\nimport flatten from '../utils/flatten';\nimport generateComponentId from '../utils/generateComponentId';\nimport { joinStringArray } from '../utils/joinStrings';\n\n// List of CSS values not supported by React Native\nexport const RN_UNSUPPORTED_VALUES = ['fit-content', 'min-content', 'max-content'];\n\nfunction stripComments(css: string): string {\n if (css.indexOf('/*') === -1) return css;\n let result = '';\n let i = 0;\n let quote = 0; // 0 = none, 34 = \", 39 = '\n const len = css.length;\n while (i < len) {\n const ch = css.charCodeAt(i);\n if (quote) {\n if (ch === 92) {\n // backslash: copy it and the next char (escape sequence)\n result += css.substring(i, i + 2);\n i += 2;\n continue;\n }\n if (ch === quote) quote = 0;\n result += css[i];\n i++;\n } else if (ch === 34 || ch === 39) {\n quote = ch;\n result += css[i];\n i++;\n } else if (ch === 47 && css.charCodeAt(i + 1) === 42) {\n // /* comment */\n const end = css.indexOf('*/', i + 2);\n if (end === -1) break;\n i = end + 2;\n } else {\n result += css[i];\n i++;\n }\n }\n return result;\n}\n\n/**\n * Extract CSS declaration pairs from flat CSS text.\n * Only handles `property: value;` — selectors, at-rules, and nesting\n * are not supported (and not expected in the native inline style path).\n */\nexport function parseCSSDeclarations(rawCss: string): [string, string][] {\n const css = stripComments(rawCss);\n const pairs: [string, string][] = [];\n const len = css.length;\n let i = 0;\n\n while (i < len) {\n // skip whitespace, stray semicolons, and brace-delimited blocks (selectors/at-rules leaking through)\n while (i < len) {\n const c = css[i];\n if (c === ' ' || c === '\\n' || c === '\\r' || c === '\\t' || c === ';' || c === '}') {\n i++;\n } else if (c === '{') {\n // skip entire block (handles `.foo { color: red; font-size: 12px; }`)\n let depth = 1;\n i++;\n while (i < len && depth > 0) {\n if (css[i] === '{') depth++;\n else if (css[i] === '}') depth--;\n i++;\n }\n } else {\n break;\n }\n }\n\n if (i >= len) break;\n\n // find the colon separating property from value\n const colonIdx = css.indexOf(':', i);\n if (colonIdx === -1) break;\n\n const prop = css.substring(i, colonIdx).trim();\n\n let parenDepth = 0;\n let quote = 0; // 0 = none, 34 = \", 39 = '\n let j = colonIdx + 1;\n while (j < len) {\n const ch = css.charCodeAt(j);\n if (quote) {\n if (ch === 92) {\n j++; // skip escaped character\n } else if (ch === quote) {\n quote = 0;\n }\n } else if (ch === 34 || ch === 39) {\n quote = ch;\n } else if (ch === 40) {\n parenDepth++;\n } else if (ch === 41) {\n if (parenDepth > 0) parenDepth--;\n } else if (ch === 59 && parenDepth === 0) {\n break;\n }\n j++;\n }\n\n // Unclosed quote or paren: drop this declaration, find first ; to resume from\n if (j >= len && (quote !== 0 || parenDepth > 0)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[styled-components/native] Invalid CSS in declaration \"${prop}\": ` +\n (quote ? 'unterminated string' : 'unclosed parenthesis') +\n '. This declaration was dropped.'\n );\n }\n const semi = css.indexOf(';', colonIdx + 1);\n i = semi !== -1 ? semi + 1 : len;\n continue;\n }\n\n const value = css.substring(colonIdx + 1, j).trim();\n\n if (prop && value) {\n // Selector or at-rule detected: warn and skip entire block (including nested declarations)\n if (prop[0] === '@' || prop.indexOf('{') !== -1) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[styled-components/native] \"${prop}\" is not supported as an inline style and will be ignored. ` +\n 'Only CSS declarations (property: value) are supported in React Native.'\n );\n }\n // Skip to matching closing brace — count braces in both prop and value\n let depth = 0;\n let k = j;\n for (let vi = i; vi < j; vi++) {\n if (css[vi] === '{') depth++;\n else if (css[vi] === '}') depth--;\n }\n // Scan forward for remaining unmatched braces\n while (k < len && depth > 0) {\n if (css[k] === '{') depth++;\n else if (css[k] === '}') depth--;\n k++;\n }\n i = k;\n continue;\n }\n pairs.push([prop, value]);\n }\n\n i = j + 1; // skip past the semicolon\n }\n\n return pairs;\n}\n\nlet generated: Dict<any> = {};\n\n/** Clear the cached CSS-to-style-object mappings. Useful in tests or long-running RN apps with highly dynamic styles. */\nexport const resetStyleCache = (): void => {\n generated = {};\n};\n\n/**\n * Parse flat CSS into a style object via css-to-react-native, with caching.\n */\nexport function cssToStyleObject(flatCSS: string, styleSheet: StyleSheet) {\n const hash = generateComponentId(flatCSS);\n\n if (!generated[hash]) {\n const declPairs: [string, string][] = [];\n for (const [prop, value] of parseCSSDeclarations(flatCSS)) {\n if (RN_UNSUPPORTED_VALUES.includes(value)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[styled-components/native] The value \"${value}\" for property \"${prop}\" is not supported in React Native and will be ignored.`\n );\n }\n } else {\n declPairs.push([prop, value]);\n }\n }\n\n // RN does not support differing border values for Image components (but does for View).\n // https://github.com/styled-components/styled-components/issues/4181\n const styleObject = transformDeclPairs(declPairs, ['borderWidth', 'borderColor']);\n\n generated[hash] = styleSheet.create({ generated: styleObject }).generated;\n }\n return generated[hash];\n}\n\n/**\n * InlineStyle takes arbitrary CSS and generates a flat object\n */\nexport default function makeInlineStyleClass<Props extends object>(styleSheet: StyleSheet) {\n const InlineStyle: IInlineStyleConstructor<Props> = class InlineStyle implements IInlineStyle<Props> {\n rules: RuleSet<Props>;\n\n constructor(rules: RuleSet<Props>) {\n this.rules = rules;\n }\n\n generateStyleObject(executionContext: ExecutionContext & Props) {\n const flatCSS = joinStringArray(\n flatten(this.rules as RuleSet<object>, executionContext) as string[]\n );\n return cssToStyleObject(flatCSS, styleSheet);\n }\n };\n\n return InlineStyle;\n}\n","import generateAlphabeticName from './generateAlphabeticName';\nimport { hash } from './hash';\n\nexport default function generateComponentId(str: string) {\n return generateAlphabeticName(hash(str) >>> 0);\n}\n","export const SEED = 5381;\n\n// When we have separate strings it's useful to run a progressive\n// version of djb2 where we pretend that we're still looping over\n// the same string\nexport const phash = (h: number, x: string) => {\n let i = x.length;\n\n while (i) {\n h = (h * 33) ^ x.charCodeAt(--i);\n }\n\n return h;\n};\n\n// Hash a non-negative integer, avoiding String() allocation for single digits.\n// Equivalent to phash(h, String(n)) for n >= 0.\nexport const phashN = (h: number, n: number) => {\n if (n >= 0 && n < 10) return (h * 33) ^ (n + 48);\n return phash(h, '' + n);\n};\n\n// This is a djb2 hashing function\nexport const hash = (x: string) => {\n return phash(SEED, x);\n};\n","import { StyledTarget } from '../types';\nimport getComponentName from './getComponentName';\nimport isTag from './isTag';\n\nexport default function generateDisplayName(target: StyledTarget<any>) {\n return isTag(target) ? `styled.${target}` : `Styled(${getComponentName(target)})`;\n}\n","import { StyledTarget } from '../types';\n\nexport default function isTag(target: StyledTarget<'web'>): target is string {\n return (\n typeof target === 'string' &&\n (process.env.NODE_ENV !== 'production'\n ? target.charAt(0) === target.charAt(0).toLowerCase()\n : true)\n );\n}\n","import isPlainObject from './isPlainObject';\n\nfunction mixinRecursively(target: any, source: any, forceMerge = false) {\n /* only merge into POJOs, Arrays, but for top level objects only\n * allow to merge into anything by passing forceMerge = true */\n if (!forceMerge && !isPlainObject(target) && !Array.isArray(target)) {\n return source;\n }\n\n if (Array.isArray(source)) {\n for (let key = 0; key < source.length; key++) {\n target[key] = mixinRecursively(target[key], source[key]);\n }\n } else if (isPlainObject(source)) {\n for (const key in source) {\n target[key] = mixinRecursively(target[key], source[key]);\n }\n }\n\n return target;\n}\n\n/**\n * Arrays & POJOs merged recursively, other objects and value types are overridden\n * If target is not a POJO or an Array, it will get source properties injected via shallow merge\n * Source objects applied left to right. Mutates & returns target. Similar to lodash merge.\n */\nexport default function mixinDeep(target: any, ...sources: any[]) {\n for (const source of sources) {\n mixinRecursively(target, source, true);\n }\n\n return target;\n}\n","import React, { createElement, Ref } from 'react';\nimport type {\n Attrs,\n BaseObject,\n Dict,\n ExecutionContext,\n ExecutionProps,\n IInlineStyleConstructor,\n IStyledComponent,\n IStyledComponentFactory,\n IStyledStatics,\n NativeTarget,\n OmitNever,\n RuleSet,\n StyledOptions,\n} from '../types';\nimport determineTheme from '../utils/determineTheme';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '../utils/empties';\nimport generateDisplayName from '../utils/generateDisplayName';\nimport hoist from '../utils/hoist';\nimport isFunction from '../utils/isFunction';\nimport isStyledComponent from '../utils/isStyledComponent';\nimport merge from '../utils/mixinDeep';\nimport { DefaultTheme, ThemeContext } from './ThemeProvider';\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nfunction shallowEqualContext(prev: object, next: object, prevKeyCount: number): boolean {\n const a = prev as Record<string, unknown>;\n const b = next as Record<string, unknown>;\n let nextKeyCount = 0;\n for (const key in b) {\n if (hasOwn.call(b, key)) {\n nextKeyCount++;\n if (a[key] !== b[key]) return false;\n }\n }\n return nextKeyCount === prevKeyCount;\n}\n\nfunction resolveContext<Props extends object>(\n theme: DefaultTheme = EMPTY_OBJECT,\n props: Props,\n attrs: Attrs<Props>[]\n): ExecutionContext & Props {\n const context: ExecutionContext & Props = { ...props, theme };\n\n for (let i = 0; i < attrs.length; i++) {\n const resolvedAttrDef = isFunction(attrs[i])\n ? (attrs[i] as Function)({ ...context })\n : attrs[i];\n\n for (const key in resolvedAttrDef) {\n // @ts-expect-error bad types\n context[key] = resolvedAttrDef[key];\n }\n }\n\n return context;\n}\n\ninterface StyledComponentImplProps extends ExecutionProps {\n style?: any;\n}\n\nfunction buildPropsForElement(\n context: Record<string, any>,\n elementToBeCreated: NativeTarget,\n shouldForwardProp: ((prop: string, el: NativeTarget) => boolean) | undefined\n): Dict<any> {\n const propsForElement: Dict<any> = {};\n for (const key in context) {\n if (key[0] === '$' || key === 'as' || key === 'theme') continue;\n else if (key === 'forwardedAs') {\n propsForElement.as = context[key];\n } else if (!shouldForwardProp || shouldForwardProp(key, elementToBeCreated)) {\n propsForElement[key] = context[key];\n }\n }\n return propsForElement;\n}\n\n// [prevProps, prevTheme, prevPropsKeyCount, cachedContext, cachedStyles]\ntype RenderCache = [object, DefaultTheme | undefined, number, object, any];\n\nfunction useStyledComponentImpl<Props extends StyledComponentImplProps>(\n forwardedComponent: IStyledComponent<'native', Props>,\n props: Props,\n forwardedRef: Ref<any>\n) {\n const {\n attrs: componentAttrs,\n inlineStyle,\n defaultProps,\n shouldForwardProp,\n target,\n } = forwardedComponent;\n\n // Guard exists for RSC: useContext is undefined in server component environments\n const contextTheme = React.useContext ? React.useContext(ThemeContext) : undefined;\n const theme = determineTheme(props, contextTheme, defaultProps) || EMPTY_OBJECT;\n\n let context: ExecutionContext & Props;\n let generatedStyles: any;\n\n const renderCacheRef = React.useRef ? React.useRef<RenderCache | null>(null) : { current: null };\n const prev = renderCacheRef.current;\n\n if (prev !== null && prev[1] === theme && shallowEqualContext(prev[0], props, prev[2])) {\n context = prev[3] as typeof context;\n generatedStyles = prev[4];\n } else {\n context = resolveContext<Props>(theme, props, componentAttrs);\n generatedStyles = inlineStyle.generateStyleObject(context);\n\n let propsKeyCount = 0;\n for (const key in props) {\n if (hasOwn.call(props, key)) propsKeyCount++;\n }\n renderCacheRef.current = [props, theme, propsKeyCount, context, generatedStyles];\n }\n\n const elementToBeCreated: NativeTarget = (context as any).as || props.as || target;\n const propsForElement = buildPropsForElement(context, elementToBeCreated, shouldForwardProp);\n\n // Guard exists for RSC: useMemo is undefined in server component environments\n propsForElement.style = React.useMemo\n ? React.useMemo(\n () =>\n isFunction(props.style)\n ? (state: any) => [generatedStyles].concat(props.style(state))\n : props.style\n ? [generatedStyles].concat(props.style)\n : generatedStyles,\n [props.style, generatedStyles]\n )\n : isFunction(props.style)\n ? (state: any) => [generatedStyles].concat(props.style(state))\n : props.style\n ? [generatedStyles].concat(props.style)\n : generatedStyles;\n\n if (forwardedRef) {\n propsForElement.ref = forwardedRef;\n }\n\n return createElement(elementToBeCreated, propsForElement);\n}\n\nexport default (InlineStyle: IInlineStyleConstructor<any>) => {\n const createStyledNativeComponent = <\n Target extends NativeTarget,\n OuterProps extends ExecutionProps,\n Statics extends object = BaseObject,\n >(\n target: Target,\n options: StyledOptions<'native', OuterProps>,\n rules: RuleSet<OuterProps>\n ): ReturnType<IStyledComponentFactory<'native', Target, OuterProps, Statics>> => {\n const isTargetStyledComp = isStyledComponent(target);\n const styledComponentTarget = target as IStyledComponent<'native', OuterProps>;\n\n const { displayName = generateDisplayName(target), attrs = EMPTY_ARRAY } = options;\n\n // fold the underlying StyledComponent attrs up (implicit extend)\n const finalAttrs =\n isTargetStyledComp && styledComponentTarget.attrs\n ? styledComponentTarget.attrs.concat(attrs).filter(Boolean)\n : (attrs as Attrs<OuterProps>[]);\n\n let shouldForwardProp = options.shouldForwardProp;\n\n if (isTargetStyledComp && styledComponentTarget.shouldForwardProp) {\n const shouldForwardPropFn = styledComponentTarget.shouldForwardProp;\n\n if (options.shouldForwardProp) {\n const passedShouldForwardPropFn = options.shouldForwardProp;\n\n // compose nested shouldForwardProp calls\n shouldForwardProp = (prop, elementToBeCreated) =>\n shouldForwardPropFn(prop, elementToBeCreated) &&\n passedShouldForwardPropFn(prop, elementToBeCreated);\n } else {\n shouldForwardProp = shouldForwardPropFn;\n }\n }\n\n const forwardRefRender = (\n props: React.PropsWithoutRef<ExecutionProps & OuterProps>,\n ref: React.Ref<any>\n ) =>\n useStyledComponentImpl<OuterProps>(\n WrappedStyledComponent,\n props as ExecutionProps & OuterProps,\n ref\n );\n\n forwardRefRender.displayName = displayName;\n\n /**\n * forwardRef creates a new interim component, which we'll take advantage of\n * instead of extending ParentComponent to create _another_ interim class\n */\n let WrappedStyledComponent = React.forwardRef(forwardRefRender) as unknown as IStyledComponent<\n 'native',\n any\n > &\n Statics;\n\n WrappedStyledComponent.attrs = finalAttrs;\n WrappedStyledComponent.inlineStyle = new InlineStyle(\n isTargetStyledComp ? styledComponentTarget.inlineStyle.rules.concat(rules) : rules\n ) as InstanceType<IInlineStyleConstructor<OuterProps>>;\n WrappedStyledComponent.displayName = displayName;\n WrappedStyledComponent.shouldForwardProp = shouldForwardProp;\n\n // @ts-expect-error we don't actually need this for anything other than detection of a styled-component\n WrappedStyledComponent.styledComponentId = true;\n\n // fold the underlying StyledComponent target up since we folded the styles\n WrappedStyledComponent.target = isTargetStyledComp ? styledComponentTarget.target : target;\n\n Object.defineProperty(WrappedStyledComponent, 'defaultProps', {\n get() {\n return this._foldedDefaultProps;\n },\n\n set(obj) {\n this._foldedDefaultProps = isTargetStyledComp\n ? merge({}, styledComponentTarget.defaultProps, obj)\n : obj;\n },\n });\n\n hoist<typeof WrappedStyledComponent, typeof target>(WrappedStyledComponent, target, {\n // all SC-specific things should not be hoisted\n attrs: true,\n inlineStyle: true,\n displayName: true,\n shouldForwardProp: true,\n target: true,\n } as { [key in keyof OmitNever<IStyledStatics<'native', Target>>]: true });\n\n return WrappedStyledComponent;\n };\n\n return createStyledNativeComponent;\n};\n","import React from 'react';\nimport constructWithOptions, { Styled } from '../constructors/constructWithOptions';\nimport css from '../constructors/css';\nimport withTheme from '../hoc/withTheme';\nimport _InlineStyle, { cssToStyleObject } from '../models/InlineStyle';\nimport _StyledNativeComponent from '../models/StyledNativeComponent';\nimport ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';\nimport { NativeTarget, RuleSet } from '../types';\nimport flatten from '../utils/flatten';\nimport isStyledComponent from '../utils/isStyledComponent';\nimport { joinStringArray } from '../utils/joinStrings';\n\nconst reactNative = require('react-native') as Awaited<typeof import('react-native')>;\n\nconst InlineStyle = _InlineStyle(reactNative.StyleSheet);\nconst StyledNativeComponent = _StyledNativeComponent(InlineStyle);\n\n/**\n * Create a styled component for React Native.\n *\n * ```tsx\n * const Card = styled.View`padding: 16px; background-color: white;`;\n * const Label = styled(Text)`font-size: 14px;`;\n * ```\n */\nconst baseStyled = <Target extends NativeTarget>(tag: Target) =>\n constructWithOptions<'native', Target>(StyledNativeComponent, tag);\n\nconst aliases = [\n 'ActivityIndicator',\n 'Button',\n 'FlatList',\n 'Image',\n 'ImageBackground',\n 'InputAccessoryView',\n 'KeyboardAvoidingView',\n 'Modal',\n 'Pressable',\n 'RefreshControl',\n 'SafeAreaView',\n 'ScrollView',\n 'SectionList',\n 'StatusBar',\n 'Switch',\n 'Text',\n 'TextInput',\n 'TouchableHighlight',\n 'TouchableNativeFeedback',\n 'TouchableOpacity',\n 'TouchableWithoutFeedback',\n 'View',\n 'VirtualizedList',\n] as const;\n\ntype KnownComponents = (typeof aliases)[number];\n\n/** Isolates RN-provided components since they don't expose a helper type for this. */\ntype RNComponents = {\n [K in keyof typeof reactNative]: (typeof reactNative)[K] extends React.ComponentType<any>\n ? (typeof reactNative)[K]\n : never;\n};\n\nconst styled = baseStyled as typeof baseStyled & {\n [E in KnownComponents]: Styled<'native', RNComponents[E], React.ComponentProps<RNComponents[E]>>;\n};\n\n/* Define a getter for each alias which simply gets the reactNative component\n * and passes it to styled */\naliases.forEach(alias =>\n Object.defineProperty(styled, alias, {\n enumerable: true,\n configurable: false,\n get() {\n if (alias in reactNative && reactNative[alias]) {\n return styled(reactNative[alias] as NativeTarget);\n }\n\n throw new Error(\n `${alias} is not available in the currently-installed version of react-native`\n );\n },\n })\n);\n\n/**\n * Convert a `css` tagged template to a React Native StyleSheet object.\n *\n * ```tsx\n * const styles = toStyleSheet(css`background-color: red; padding: 10px;`);\n * // { backgroundColor: 'red', paddingTop: 10, ... }\n * ```\n */\nconst toStyleSheet = (rules: RuleSet<object>) => {\n const flatCSS = joinStringArray(flatten(rules) as string[]);\n return cssToStyleObject(flatCSS, reactNative.StyleSheet);\n};\n\nexport {\n CSSKeyframes,\n CSSObject,\n CSSProperties,\n CSSPseudos,\n DefaultTheme,\n ExecutionContext,\n ExecutionProps,\n IStyledComponent,\n IStyledComponentFactory,\n IStyledStatics,\n NativeTarget,\n PolymorphicComponent,\n PolymorphicComponentProps,\n Runtime,\n StyledObject,\n StyledOptions,\n} from '../types';\nexport {\n css,\n styled as default,\n isStyledComponent,\n styled,\n ThemeConsumer,\n ThemeContext,\n ThemeProvider,\n toStyleSheet,\n useTheme,\n withTheme,\n};\n"],"names":["EMPTY_ARRAY","Object","freeze","EMPTY_OBJECT","ERRORS","process","env","NODE_ENV","throwStyledComponentsError","code","interpolations","Error","length","join","args","a","b","c","len","push","forEach","d","replace","format","trim","cssTagged","WeakSet","unitless","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","flex","flexGrow","flexShrink","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","addUnitIfNeeded","name","value","startsWith","String","getComponentName","target","displayName","isUpper","hyphenateStyleName","string","output","i","toLowerCase","isFunction","test","KEYFRAMES_SYMBOL","Symbol","for","isKeyframes","isPlainObject","x","constructor","$$typeof","isStyledComponent","isFalsish","chunk","CLIENT_REFERENCE","isClientReference","warnClientReference","ref","id","$$id","label","includes","split","pop","console","warn","objToCssArray","obj","rules","key","val","hasOwnProperty","Array","isArray","has","hyphenate","flatten","executionContext","styleSheet","stylisInstance","result","t","prototype","isReactComponent","fnResult","error","styledComponentId","inject","getName","cssArr","toString","interleave","strings","addTag","arg","add","css","styles","styleStringArray","constructWithOptions","componentConstructor","tag","options","styledError","templateFunction","initialStyles","attrs","assign","concat","filter","Boolean","withConfig","config","readSpeedyFlag","undefined","REACT_APP_SC_ATTR","SC_DISABLE_SPEEDY","_b","_a","ThemeContext","React","createContext","ThemeConsumer","Consumer","useTheme","theme","useContext","ThemeProvider","props","outerTheme","themeContext","useMemo","mergedTheme","mergeTheme","children","createElement","Provider","determineTheme","providedTheme","defaultProps","REACT_MEMO_TYPE","REACT_FORWARD_REF_TYPE","REACT_STATICS","contextType","getDerivedStateFromError","getDerivedStateFromProps","propTypes","type","KNOWN_STATICS","caller","callee","arguments","arity","MEMO_STATICS","compare","TYPE_STATICS","render","getStatics","component","object","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","excludelist","inheritedComponent","keys","targetStatics","sourceStatics","descriptor","e","withTheme","Component","WithTheme","forwardRef","themeProp","hoist","AD_REPLACER_R","getAlphabeticChar","fromCharCode","joinStringArray","arr","sep","RN_UNSUPPORTED_VALUES","generated","cssToStyleObject","flatCSS","hash","Math","abs","generateAlphabeticName","h","charCodeAt","phash","declPairs","prop","rawCss","indexOf","quote","ch","substring","end","stripComments","pairs","depth","colonIdx","parenDepth","j","semi","k","vi","parseCSSDeclarations","styleObject","transformDeclPairs","create","generateDisplayName","charAt","isTag","mixinRecursively","source","forceMerge","hasOwn","reactNative","require","StyledNativeComponent","StyleSheet","InlineStyle","this","generateStyleObject","isTargetStyledComp","styledComponentTarget","finalAttrs","shouldForwardProp","shouldForwardPropFn","passedShouldForwardPropFn","elementToBeCreated","forwardRefRender","forwardedComponent","forwardedRef","componentAttrs","inlineStyle","contextTheme","context","generatedStyles","renderCacheRef","useRef","current","prev","next","prevKeyCount","nextKeyCount","call","shallowEqualContext","resolvedAttrDef","resolveContext","propsKeyCount","as","propsForElement","buildPropsForElement","style","state","useStyledComponentImpl","WrappedStyledComponent","get","_foldedDefaultProps","set","sources","merge","styled","alias","enumerable","configurable","toStyleSheet"],"mappings":"4EAEO,MAAMA,EAAcC,OAAOC,OAAO,IAC5BC,EAAeF,OAAOC,OAAO,ICApCE,EAA6C,eAAzBC,QAAQC,IAAIC,SCHvB,CACb,EAAK,wDACL,EAAK,gQACL,EAAK,sHACL,EAAK,s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M,EAAuBzO,YAAcA,EACrCyO,EAAuB9B,kBAAoBA,EAG3C8B,EAAuBrL,mBAAoB,EAG3CqL,EAAuB1O,OAASyM,EAAqBC,EAAsB1M,OAASA,EAEpFtE,OAAOqM,eAAe2G,EAAwB,eAAgB,CAC5D,GAAAC,GACE,OAAOpC,KAAKqC,mBACb,EAED,GAAAC,CAAI3M,GACFqK,KAAKqC,oBAAsBnC,EDzMX,SAAUzM,KAAgB8O,GAChD,IAAK,MAAM/C,KAAU+C,EACnBhD,GAAiB9L,EAAQ+L,GAAQ,GAGnC,OAAO/L,CACT,CCoMY+O,CAAM,CAAE,EAAErC,EAAsBhG,aAAcxE,GAC9CA,CACL,IAGHkH,EAAoDsF,EAAwB1O,EAAQ,CAElFyE,OAAO,EACP2I,aAAa,EACbnN,aAAa,EACb2M,mBAAmB,EACnB5M,QAAQ,IAGH0O,ICpLLM,GAtC2C5K,GAC/CF,EAAuCkI,GAAuBhI,GD2HjD,IAACkI,GCzHA,CACd,oBACA,SACA,WACA,QACA,kBACA,qBACA,uBACA,QACA,YACA,iBACA,eACA,aACA,cACA,YACA,SACA,OACA,YACA,qBACA,0BACA,mBACA,2BACA,OACA,mBAkBMzP,QAAQoS,GACdvT,OAAOqM,eAAeiH,GAAQC,EAAO,CACnCC,YAAY,EACZC,cAAc,EACd,GAAAR,GACE,GAAIM,KAAS/C,IAAeA,GAAY+C,GACtC,OAAOD,GAAO9C,GAAY+C,IAG5B,MAAM,IAAI7S,MACR,GAAG6S,wEAEN,KAYL,MAAMG,GAAgBjN,GAEb0H,GADSL,EAAgB7G,EAAQR,IACP+J,GAAYG"}
@@ -26,7 +26,7 @@ export type FastOmit<T extends BaseObject, U extends string | number | symbol> =
26
26
  export type Runtime = 'web' | 'native';
27
27
  export type AnyComponent<P extends BaseObject = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
28
28
  export type KnownTarget = SupportedHTMLElements | AnyComponent;
29
- export type WebTarget = string | KnownTarget;
29
+ export type WebTarget = (string & {}) | KnownTarget;
30
30
  export type NativeTarget = AnyComponent;
31
31
  export type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget;
32
32
  export interface StyledOptions<R extends Runtime, Props extends BaseObject> {
@@ -105,12 +105,12 @@ export interface Stringifier {
105
105
  export interface ShouldForwardProp<R extends Runtime> {
106
106
  (prop: string, elementToBeCreated: StyledTarget<R>): boolean;
107
107
  }
108
- export interface CommonStatics<R extends Runtime, Props extends BaseObject> {
108
+ export interface CommonStatics<out R extends Runtime, in out Props extends BaseObject> {
109
109
  attrs: Attrs<Props>[];
110
110
  target: StyledTarget<R>;
111
111
  shouldForwardProp?: ShouldForwardProp<R> | undefined;
112
112
  }
113
- export interface IStyledStatics<R extends Runtime, OuterProps extends BaseObject> extends CommonStatics<R, OuterProps> {
113
+ export interface IStyledStatics<out R extends Runtime, in out OuterProps extends BaseObject> extends CommonStatics<R, OuterProps> {
114
114
  componentStyle: R extends 'web' ? ComponentStyle : never;
115
115
  foldedComponentIds: R extends 'web' ? string : never;
116
116
  inlineStyle: R extends 'native' ? InstanceType<IInlineStyleConstructor<OuterProps>> : never;
@@ -132,37 +132,34 @@ export type PolymorphicComponentProps<R extends Runtime, BaseProps extends BaseO
132
132
  * props from the given rendering target to get proper typing for
133
133
  * any specialized props in the target component.
134
134
  */
135
- export interface PolymorphicComponent<R extends Runtime, BaseProps extends BaseObject> extends React.ForwardRefExoticComponent<BaseProps & {
135
+ export interface PolymorphicComponent<out R extends Runtime, in out BaseProps extends BaseObject> extends React.ForwardRefExoticComponent<BaseProps & {
136
136
  as?: StyledTarget<R> | undefined;
137
137
  forwardedAs?: StyledTarget<R> | undefined;
138
138
  }> {
139
- <AsTarget extends StyledTarget<R> | void = void, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget> & React.RefAttributes<any>): React.JSX.Element;
140
- }
141
- export interface IStyledComponentBase<R extends Runtime, Props extends BaseObject = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
139
+ <AsTarget extends StyledTarget<R>, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget> & {
140
+ as: AsTarget;
141
+ }): React.JSX.Element;
142
+ <ForwardedAsTarget extends StyledTarget<R>>(props: PolymorphicComponentProps<R, BaseProps, void, ForwardedAsTarget> & {
143
+ forwardedAs: ForwardedAsTarget;
144
+ }): React.JSX.Element;
145
+ (props: OverrideStyle<NoInfer<FastOmit<BaseProps, keyof ExecutionProps>> & FastOmit<ExecutionProps, 'as' | 'forwardedAs'> & {
146
+ as?: void;
147
+ forwardedAs?: void;
148
+ }>): React.JSX.Element;
149
+ }
150
+ export interface IStyledComponentBase<out R extends Runtime, in out Props extends BaseObject = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
142
151
  defaultProps?: (ExecutionProps & Partial<Props>) | undefined;
143
152
  toString: () => string;
144
153
  }
145
- export type IStyledComponent<R extends Runtime, Props extends BaseObject = BaseObject> = IStyledComponentBase<R, Props> &
146
154
  /**
147
- * TypeScript doesn't allow using a styled component as a key inside object
148
- * styles because "A computed property name must be of type 'string', 'number',
149
- * 'symbol', or 'any'.". The toString() method only exists in the web runtime.
150
- * This hack intersects the `IStyledComponent` type with the built-in `string`
151
- * type to keep TSC happy.
152
- *
153
- * @example
154
- * const H1 = styled.h1({
155
- * fontSize: '2rem'
156
- * });
157
- *
158
- * const Header = styled.header({
159
- * [H1]: {
160
- * marginBottom: '1rem'
161
- * }
162
- * })
155
+ * Intersected with `string` so styled components can be used as computed
156
+ * property keys in object styles: `{ [MyComponent]: { ... } }`.
157
+ * The conditional `R extends 'web' ? string : {}` was removed to avoid
158
+ * a type alias with a conditional — type aliases require full structural
159
+ * comparison on every use, while this unconditional intersection is cheaper.
163
160
  */
164
- (R extends 'web' ? string : {});
165
- export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends BaseObject, OuterStatics extends BaseObject = BaseObject> {
161
+ export type IStyledComponent<R extends Runtime, Props extends BaseObject = BaseObject> = IStyledComponentBase<R, Props> & string;
162
+ export interface IStyledComponentFactory<out R extends Runtime, in Target extends StyledTarget<R>, in out OuterProps extends BaseObject, out OuterStatics extends BaseObject = BaseObject> {
166
163
  <Props extends BaseObject = BaseObject, Statics extends BaseObject = BaseObject>(target: Target, options: StyledOptions<R, OuterProps & Props>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics;
167
164
  }
168
165
  export interface IInlineStyleConstructor<Props extends BaseObject> {
@@ -0,0 +1,2 @@
1
+ import type { RuleSet } from '../types';
2
+ export declare const cssTagged: WeakSet<RuleSet<any>>;
@@ -3,3 +3,6 @@
3
3
  */
4
4
  export declare function joinStrings(a?: string | undefined, b?: string | undefined): string;
5
5
  export declare function joinStringArray(arr: string[], sep?: string | undefined): string;
6
+ /** Join compiled CSS rules with the SC splitter delimiter. */
7
+ export declare function joinRules(rules: string[]): string;
8
+ export declare function stripSplitter(css: string): string;
@@ -0,0 +1,2 @@
1
+ /** Create a per-render cached factory via React.cache (React 19+). Returns null when not in RSC. */
2
+ export declare function createRSCCache<T>(factory: () => T): (() => T) | null;
@@ -1,5 +1,22 @@
1
1
  import * as stylis from 'stylis';
2
2
  import { Stringifier } from '../types';
3
+ /**
4
+ * Check if a quote at position i is escaped. A quote is escaped when preceded
5
+ * by an ODD number of backslashes (\", \\\", etc.). An even number means the
6
+ * backslashes themselves are escaped and the quote is real (\\", \\\\", etc.).
7
+ */
8
+ export declare function isEscaped(css: string, i: number): boolean;
9
+ /**
10
+ * Unified CSS preprocessor: strips JS-style line comments (//) and validates
11
+ * brace balance in a single pass. Handles strings, parenthesized expressions
12
+ * (any function call), and block comments with one shared state machine.
13
+ *
14
+ * Fast paths:
15
+ * - No // and no } → return unchanged (zero work)
16
+ * - No // but has } → brace-only validation (lightweight single pass)
17
+ * - Has // → full unified pass (strip comments + count braces simultaneously)
18
+ */
19
+ export declare function preprocessCSS(css: string): string;
3
20
  export type ICreateStylisInstance = {
4
21
  options?: {
5
22
  namespace?: string | undefined;
@@ -0,0 +1,3 @@
1
+ import { type Middleware } from 'stylis';
2
+ declare function stylisPluginRSC(element: Parameters<Middleware>[0]): void;
3
+ export default stylisPluginRSC;