FrontPastel/node_modules/@emotion/react/dist/emotion-react.umd.min.js.map

1 line
127 KiB
Plaintext
Raw Normal View History

2024-04-17 13:55:11 +00:00
{"version":3,"file":"emotion-react.umd.min.js","sources":["../../sheet/src/index.js","../../../node_modules/stylis/src/Enum.js","../../../node_modules/stylis/src/Utility.js","../../../node_modules/stylis/src/Tokenizer.js","../../../node_modules/stylis/src/Parser.js","../../../node_modules/stylis/src/Serializer.js","../../weak-memoize/src/index.js","../../memoize/src/index.js","../../cache/src/stylis-plugins.js","../../cache/src/prefixer.js","../../cache/src/index.js","../../../node_modules/stylis/src/Middleware.js","../src/utils.js","../src/context.js","../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/index.js","../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../src/theming.js","../../utils/src/index.js","../../unitless/src/index.js","../../serialize/src/index.js","../../hash/src/index.js","../../use-insertion-effect-with-fallbacks/src/index.js","../src/emotion-element.js","../src/jsx.js","../src/global.js","../src/css.js","../src/keyframes.js","../src/class-names.js","../src/_isolated-hnrs.js"],"sourcesContent":["// @flow\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\n// $FlowFixMe\nfunction sheetForTag(tag: HTMLStyleElement): CSSStyleSheet {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet\n }\n\n // this weirdness brought to you by firefox\n /* istanbul ignore next */\n for (let i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i]\n }\n }\n}\n\nexport type Options = {\n nonce?: string,\n key: string,\n container: Node,\n speedy?: boolean,\n prepend?: boolean,\n insertionPoint?: HTMLElement\n}\n\nfunction createStyleElement(options: {\n key: string,\n nonce: string | void\n}): HTMLStyleElement {\n let tag = document.createElement('style')\n tag.setAttribute('data-emotion', options.key)\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce)\n }\n tag.appendChild(document.createTextNode(''))\n tag.setAttribute('data-s', '')\n return tag\n}\n\nexport class StyleSheet {\n isSpeedy: boolean\n ctr: number\n tags: HTMLStyleElement[]\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n container: Node\n key: string\n nonce: string | void\n prepend: boolean | void\n before: Element | null\n insertionPoint: HTMLElement | void\n constructor(options: Options) {\n this.isSpeedy =\n options.speedy === undefined\n ? process.env.NODE_ENV === 'production'\n : options.speedy\n this.tags = []\n this.ctr = 0\n this.nonce = options.nonce\n // key is the value of the data-emotion attribute, it's used to identify different sheets\n this.key = options.key\n this.container = options.container\n this.prepend = options.prepend\n this.insertionPoint = options.insertionPoint\n this.before = null\n }\n\n _insertTag = (tag: HTMLStyleElement) => {\n let before\n if (this.tags.length === 0) {\n if (this.insertionPoint) {\n before = this.insertionPoint.nextSibling\n } else if (this.prepend) {\n before = this.container.firstChild\n } else {\n before = this.before\n }\n } else {\n before = this.tags[this.tags.length - 1].nextSibling\n }\n this.container.insertBefore(tag, before)\n this.tags.push(tag)\n }\n\n hydrate(nodes: HTMLStyleElement[]) {\n nodes.forEach(this._insertTag)\n }\