1 line
40 KiB
Plaintext
1 line
40 KiB
Plaintext
|
{"version":3,"file":"emotion-styled.umd.min.js","sources":["../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../memoize/src/index.js","../../is-prop-valid/src/index.js","../src/utils.js","../../utils/src/index.js","../../unitless/src/index.js","../../serialize/src/index.js","../../use-insertion-effect-with-fallbacks/src/index.js","../src/base.js","../src/index.js","../../hash/src/index.js","../src/tags.js"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}","// @flow\n\nexport default function memoize<V>(fn: string => V): string => V {\n const cache = Object.create(null)\n\n return (arg: string) => {\n if (cache[arg] === undefined) cache[arg] = fn(arg)\n return cache[arg]\n }\n}\n","// @flow\nimport memoize from '@emotion/memoize'\n\ndeclare var codegen: { require: string => RegExp }\n\nconst reactPropsRegex = codegen.require('./props')\n\n// https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\nconst isPropValid = /* #__PURE__ */ memoize(\n prop =>\n reactPropsRegex.test(prop) ||\n (prop.charCodeAt(0) === 111 /* o */ &&\n prop.charCodeAt(1) === 110 /* n */ &&\n prop.charCodeAt(2) < 91) /* Z+1 */\n)\n\nexport default isPropValid\n","// @flow\nimport type {\n ElementType,\n StatelessFunctionalComponent,\n AbstractComponent\n} from 'react'\nimport isPropValid from '@emotion/is-prop-valid'\n\nexport type Interpolations = Array<any>\n\nexport type StyledElementType<Props> =\n | string\n | AbstractComponent<{ ...Props, className: string }, mixed>\n\nexport type StyledOptions = {\n label?: string,\n shouldForwardProp?: string => boolean,\n target?: string\n}\n\nexport type StyledComponent<Props> = StatelessFunctionalComponent<Props> & {\n defaultProps: any,\n toString: () => string,\n withComponent: (\n nextTag: StyledElementType<Props>,\n nextOptions?: StyledOptions\n ) => StyledComponent<Props>\n}\n\nexport type PrivateStyledComponent<Props> = StyledComponent<Props> & {\n __emotion_real: StyledComponent<Props>,\n __emotion_base: any,\n __emotion_styles: any,\n __emotion_forwardProp: any\n}\n\nconst testOmitPropsOnStringTag = isPropValid\nconst testOmitPropsOnComponent = (key: string) => key !== 'theme'\n\nexport const getDefaultShouldForwardProp = (tag: ElementType) =>\n typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96\n ? testOmitPropsOnStringTag\n : testOmitPropsOnComponent\n\nexport const composeShouldForwardProps = (\n tag: PrivateStyledComponent<any>,\n options: StyledOptions | void,\n isReal: boolean\n) => {\n let shouldForwardProp\n if (options) {\n const optionsShouldForwardProp = options.shouldForwardProp\n shouldForwardProp =\n tag.__emotion_forwardProp && optionsShouldForwardProp\n ? (propName: string) =>\n tag.__emotion_forwardProp(propName) &&\n optionsShouldForwardProp(propName)\n : optionsShouldForwardProp\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp\n }\n\n return shouldForwardProp\n}\n\nexport type CreateStyledComponent = <Props>(\n ...args: Interpolations\n) => StyledComponent<Props>\n\nexport type CreateStyled = {\n <Props>(\n tag: StyledElementType<Props>,\n options?: StyledOptions\n ): (...args: Interpolations) => StyledComponent<Props>,\n [key: string]: CreateStyledComponent,\n bind: () => CreateStyled\n}\n","// @flow\nimport type { RegisteredCache, EmotionCache, SerializedStyles } from './types'\n\nconst isBrowser = typeof document !== 'undefined'\n\nexport function getRegisteredStyles(\
|