1 line
304 KiB
Plaintext
1 line
304 KiB
Plaintext
|
{"version":3,"file":"styled-components-primitives.esm.js","sources":["../../src/utils/generateAlphabeticName.js","../../src/utils/hash.js","../../src/utils/generateComponentId.js","../../src/utils/getComponentName.js","../../src/utils/isFunction.js","../../src/utils/isStatelessFunction.js","../../src/utils/isPlainObject.js","../../src/utils/isStyledComponent.js","../../src/constants.js","../../src/utils/empties.js","../../src/utils/errors.js","../../src/utils/error.js","../../src/sheet/GroupedTag.js","../../src/sheet/GroupIDAllocator.js","../../src/sheet/Rehydration.js","../../src/utils/nonce.js","../../src/sheet/dom.js","../../src/sheet/Tag.js","../../src/sheet/Sheet.js","../../src/utils/stylisPluginInsertRule.js","../../src/utils/stylis.js","../../src/models/StyleSheetManager.js","../../src/models/Keyframes.js","../../src/utils/hyphenateStyleName.js","../../src/utils/addUnitIfNeeded.js","../../src/utils/flatten.js","../../src/vendor/postcss/warn-once.js","../../src/vendor/postcss/tokenize.js","../../src/vendor/postcss/terminal-highlight.js","../../src/vendor/postcss/css-syntax-error.js","../../src/vendor/postcss/stringifier.js","../../src/vendor/postcss/stringify.js","../../src/vendor/postcss/node.js","../../src/vendor/postcss/declaration.js","../../src/vendor/postcss/comment.js","../../src/vendor/postcss/parser.js","../../src/vendor/postcss/parse.js","../../src/vendor/postcss/container.js","../../src/vendor/postcss/at-rule.js","../../src/vendor/postcss/list.js","../../src/vendor/postcss/rule.js","../../src/vendor/postcss/warning.js","../../src/vendor/postcss/result.js","../../src/vendor/postcss/lazy-result.js","../../src/vendor/postcss/processor.js","../../src/vendor/postcss/root.js","../../src/vendor/postcss/input.js","../../src/vendor/postcss-safe-parser/safe-parser.js","../../src/vendor/postcss-safe-parser/parse.js","../../src/models/InlineStyle.js","../../src/utils/mixinDeep.js","../../src/utils/determineTheme.js","../../src/utils/isTag.js","../../src/utils/generateDisplayName.js","../../src/models/ThemeProvider.js","../../src/models/StyledNativeComponent.js","../../src/utils/interleave.js","../../src/constructors/css.js","../../src/constructors/constructWithOptions.js","../../src/hoc/withTheme.js","../../src/hooks/useTheme.js","../../src/primitives/index.js"],"sourcesContent":["// @flow\n/* eslint-disable no-bitwise */\n\nconst 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 =>\n 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): string {\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","// @flow\n/* eslint-disable */\n\nexport 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): number => {\n let i = x.length;\n\n while (i) {\n h = (h * 33) ^ x.charCodeAt(--i);\n }\n\n return h;\n};\n\n// This is a djb2 hashing function\nexport const hash = (x: string): number => {\n return phash(SEED, x);\n};\n","// @flow\n/* eslint-disable */\nimport generateAlphabeticName from './generateAlphabeticName';\nimport { hash } from './hash';\n\nexport default (str: string): string => {\n return generateAlphabeticName(hash(str) >>> 0);\n};\n","// @flow\nimport type { IStyledComponent } from '../types';\n\nexport default function getComponentName(\n target: $PropertyType<IStyledComponent, 'target'>\n): string {\n return
|