UNPKG

48.2 kBSource Map (JSON)View Raw
1{"version":3,"file":"glamorous.umd.min.js","sources":["../src/dom-elements.js","../src/constants.js","../src/react-compat.js","../src/with-theme.js","../node_modules/is-function/index.js","../node_modules/isobject/index.js","../node_modules/is-plain-object/index.js","../src/theme-provider.js","../node_modules/brcast/dist/brcast.es.js","../src/get-glamor-classname.js","../src/create-glamorous.js","../node_modules/fast-memoize/src/index.js","../node_modules/react-html-attributes/dist/index.js","../src/react-props.js","../src/should-forward-property.js","../src/index.js","../src/split-props.js","../src/cjs-entry.js"],"sourcesContent":["import htmlTagNames from 'html-tag-names'\nimport svgTagNames from 'svg-tag-names'\n\nconst domElements = htmlTagNames\n .concat(svgTagNames)\n .filter((tag, index, array) => array.indexOf(tag) === index)\n\nexport default domElements\n","/* istanbul ignore next */\nimport preval from 'preval.macro'\n\nexport const CHANNEL = '__glamorous__'\nexport const isPreact = preval`module.exports = process.env.BUILD_PREACT === 'true'`\n","import React from 'react'\nimport codegen from 'codegen.macro'\nimport {isPreact} from './constants'\n\nlet PropTypes\n\n/* istanbul ignore next */\nif (isPreact) {\n if (!React.PropTypes) {\n PropTypes = () => PropTypes\n const allTypes = [\n 'array',\n 'bool',\n 'func',\n 'number',\n 'object',\n 'string',\n 'symbol',\n 'any',\n 'arrayOf',\n 'element',\n 'instanceOf',\n 'node',\n 'objectOf',\n 'oneOf',\n 'oneOfType',\n 'shape',\n 'exact',\n ]\n allTypes.forEach(type => {\n PropTypes[type] = PropTypes\n })\n }\n // copied from preact-compat\n /* eslint-disable no-eq-null, eqeqeq, consistent-return */\n if (!React.Children) {\n const Children = {\n map(children, fn, ctx) {\n if (children == null) {\n return null\n }\n children = Children.toArray(children)\n if (ctx && ctx !== children) {\n fn = fn.bind(ctx)\n }\n return children.map(fn)\n },\n forEach(children, fn, ctx) {\n if (children == null) {\n return null\n }\n children = Children.toArray(children)\n if (ctx && ctx !== children) {\n fn = fn.bind(ctx)\n }\n children.forEach(fn)\n },\n count(children) {\n return (children && children.length) || 0\n },\n only(children) {\n children = Children.toArray(children)\n if (children.length !== 1) {\n throw new Error('Children.only() expects only one child.')\n }\n return children[0]\n },\n toArray(children) {\n if (children == null) {\n return []\n }\n return [].concat(children)\n },\n }\n React.Children = Children\n }\n /* eslint-enable no-eq-null, eqeqeq, consistent-return */\n} else if (parseFloat(React.version.slice(0, 4)) >= 15.5) {\n /* istanbul ignore next */\n try {\n PropTypes = codegen`\n if (process.env.BUILD_FORMAT === 'umd') {\n module.exports = \"(typeof window !== 'undefined' ? window : global).PropTypes\"\n } else {\n module.exports = \"require('prop-types')\"\n }\n `\n /* istanbul ignore next */\n } catch (error) {\n // ignore\n }\n}\n/* istanbul ignore next */\nPropTypes = PropTypes || React.PropTypes\n\nexport {PropTypes}\n\n/*\neslint\n import/no-mutable-exports:0,\n import/prefer-default-export:0,\n react/no-deprecated:0\n */\n","import React from 'react'\n\nimport {CHANNEL} from './constants'\nimport {PropTypes} from './react-compat'\n\nfunction generateWarningMessage(Comp) {\n const componentName = Comp.displayName || Comp.name || 'FunctionComponent'\n // eslint-disable-next-line max-len\n return `glamorous warning: Expected component called \"${componentName}\" which uses withTheme to be within a ThemeProvider but none was found.`\n}\n\nexport default function withTheme(\n ComponentToTheme,\n {noWarn = false, createElement = true} = {},\n) {\n class ThemedComponent extends React.Component {\n static propTypes = {\n theme: PropTypes.object,\n }\n warned = noWarn\n state = {theme: {}}\n setTheme = theme => this.setState({theme})\n\n // eslint-disable-next-line complexity\n componentWillMount() {\n if (!this.context[CHANNEL]) {\n if (process.env.NODE_ENV !== 'production' && !this.warned) {\n this.warned = true\n // eslint-disable-next-line no-console\n console.warn(generateWarningMessage(ComponentToTheme))\n }\n }\n const {theme} = this.props\n if (this.context[CHANNEL]) {\n // if a theme is provided via props,\n // it takes precedence over context\n this.setTheme(theme ? theme : this.context[CHANNEL].getState())\n } else {\n this.setTheme(theme || {})\n }\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.setTheme(nextProps.theme)\n }\n }\n\n componentDidMount() {\n if (this.context[CHANNEL] && !this.props.theme) {\n // subscribe to future theme changes\n this.subscriptionId = this.context[CHANNEL].subscribe(this.setTheme)\n }\n }\n\n componentWillUnmount() {\n // cleanup subscription\n this.subscriptionId &&\n this.context[CHANNEL].unsubscribe(this.subscriptionId)\n }\n\n render() {\n if (createElement) {\n return <ComponentToTheme {...this.props} {...this.state} />\n } else {\n // this allows us to effectively use the GlamorousComponent\n // as our `render` method without going through lifecycle hooks.\n // Also allows us to forward the context in the scenario where\n // a user wants to add more context.\n // eslint-disable-next-line babel/new-cap\n return ComponentToTheme.call(\n this,\n {...this.props, ...this.state},\n this.context,\n )\n }\n }\n }\n\n const defaultContextTypes = {\n [CHANNEL]: PropTypes.object,\n }\n\n let userDefinedContextTypes = null\n\n // configure the contextTypes to be settable by the user,\n // however also retaining the glamorous channel.\n Object.defineProperty(ThemedComponent, 'contextTypes', {\n enumerable: true,\n configurable: true,\n set(value) {\n userDefinedContextTypes = value\n },\n get() {\n // if the user has provided a contextTypes definition,\n // merge the default context types with the provided ones.\n if (userDefinedContextTypes) {\n return {\n ...defaultContextTypes,\n ...userDefinedContextTypes,\n }\n }\n return defaultContextTypes\n },\n })\n\n return ThemedComponent\n}\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n};\n","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\n\nfunction isObjectObject(o) {\n return isObject(o) === true\n && Object.prototype.toString.call(o) === '[object Object]';\n}\n\nmodule.exports = function isPlainObject(o) {\n var ctor,prot;\n\n if (isObjectObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (typeof ctor !== 'function') return false;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObjectObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n","import React from 'react'\nimport isFunction from 'is-function'\nimport isPlainObject from 'is-plain-object'\nimport brcast from 'brcast'\nimport {PropTypes} from './react-compat'\nimport {CHANNEL} from './constants'\n\n/**\n * This is a component which will provide a theme to the entire tree\n * via context and event listener\n * (because pure components block context updates)\n * inspired by the styled-components implementation\n * https://github.com/styled-components/styled-components\n * @param {Object} theme the theme object..\n */\nclass ThemeProvider extends React.Component {\n // create theme, by merging with outer theme, if present\n getTheme(passedTheme) {\n const theme = passedTheme || this.props.theme\n if (isFunction(theme)) {\n const mergedTheme = theme(this.outerTheme)\n if (!isPlainObject(mergedTheme)) {\n throw new Error(\n '[ThemeProvider] Please return an object from your theme function, ' +\n 'i.e. theme={() => ({})}!',\n )\n }\n return mergedTheme\n }\n return {...this.outerTheme, ...theme}\n }\n\n getChildContext() {\n return {\n [CHANNEL]: this.broadcast,\n }\n }\n\n setOuterTheme = theme => {\n this.outerTheme = theme\n if (this.broadcast !== undefined) {\n this.publishTheme()\n }\n }\n\n publishTheme(theme) {\n this.broadcast.setState(this.getTheme(theme))\n }\n\n componentDidMount() {\n // create a new subscription for keeping track of outer theme, if present\n if (this.context[CHANNEL]) {\n this.subscriptionId = this.context[CHANNEL].subscribe(this.setOuterTheme)\n }\n }\n\n componentWillMount() {\n // set broadcast state by merging outer theme with own\n if (this.context[CHANNEL]) {\n this.setOuterTheme(this.context[CHANNEL].getState())\n }\n this.broadcast = brcast(this.getTheme(this.props.theme))\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.publishTheme(nextProps.theme)\n }\n }\n\n componentWillUnmount() {\n this.subscriptionId &&\n this.context[CHANNEL].unsubscribe(this.subscriptionId)\n }\n\n render() {\n return this.props.children ? React.Children.only(this.props.children) : null\n }\n}\n\nThemeProvider.childContextTypes = {\n [CHANNEL]: PropTypes.object.isRequired,\n}\n\nThemeProvider.contextTypes = {\n [CHANNEL]: PropTypes.object,\n}\n\nThemeProvider.propTypes = {\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,\n children: PropTypes.node,\n}\n\nexport default ThemeProvider\n","function createBroadcast (initialState) {\n var listeners = {};\n var id = 1;\n var _state = initialState;\n\n function getState () {\n return _state\n }\n\n function setState (state) {\n _state = state;\n var keys = Object.keys(listeners);\n var i = 0;\n var len = keys.length;\n for (; i < len; i++) {\n // if a listener gets unsubscribed during setState we just skip it\n if (listeners[keys[i]]) { listeners[keys[i]](state); }\n }\n }\n\n // subscribe to changes and return the subscriptionId\n function subscribe (listener) {\n if (typeof listener !== 'function') {\n throw new Error('listener must be a function.')\n }\n var currentId = id;\n listeners[currentId] = listener;\n id += 1;\n return currentId\n }\n\n // remove subscription by removing the listener function\n function unsubscribe (id) {\n listeners[id] = undefined;\n }\n\n return { getState: getState, setState: setState, subscribe: subscribe, unsubscribe: unsubscribe }\n}\n\nexport default createBroadcast;\n","import {css, styleSheet} from 'glamor'\n/**\n * This function takes a className string and gets all the\n * associated glamor styles. It's used to merge glamor styles\n * from a className to make sure that specificity is not\n * a problem when passing a className to a component.\n * @param {String} [className=''] the className string\n * @return {Object} { glamorStyles, glamorlessClassName }\n * - glamorStyles is an array of all the glamor styles objects\n * - glamorlessClassName is the rest of the className string\n * without the glamor classNames\n */\nfunction extractGlamorStyles(className) {\n const glamorlessClassName = []\n const glamorStyles = []\n className\n .toString()\n .split(' ')\n .forEach(name => {\n if (styleSheet.registered[name.substring(4)] === undefined) {\n glamorlessClassName.push(name)\n } else {\n const style = buildGlamorSrcFromClassName(name)\n glamorStyles.push(style)\n }\n })\n\n return {glamorlessClassName, glamorStyles}\n}\n\n/** Glamor's css function returns an object with the shape\n *\n * {\n * [`data-css-${hash}`]: '',\n * toString() { return `css-${hash}` }\n * }\n *\n * Whenever glamor's build function encounters an object with\n * this shape it just pulls the resulting styles from the cache.\n *\n * note: the toString method is not needed to qualify the shape\n **/\nfunction buildGlamorSrcFromClassName(className) {\n return {[`data-${className}`]: ''}\n}\n\nexport default getGlamorClassName\n\nfunction getGlamorClassName({\n styles,\n props,\n cssOverrides,\n cssProp,\n context,\n displayName,\n}) {\n const {mappedArgs, nonGlamorClassNames} = handleStyles(\n [...styles, props.className, cssOverrides, cssProp],\n props,\n context,\n )\n // eslint-disable-next-line max-len\n const isDev = process.env.NODE_ENV === 'development' || !process.env.NODE_ENV\n const devRules = isDev ? {label: displayName} : null\n const glamorClassName = css(devRules, ...mappedArgs).toString()\n const extras = nonGlamorClassNames.join(' ').trim()\n return `${glamorClassName} ${extras}`.trim()\n}\n\n// this next function is on a \"hot\" code-path\n// so it's pretty complex to make sure it's fast.\n// eslint-disable-next-line complexity\nfunction handleStyles(styles, props, context) {\n let current\n const mappedArgs = []\n const nonGlamorClassNames = []\n for (let i = 0; i < styles.length; i++) {\n current = styles[i]\n while (typeof current === 'function') {\n current = current(props, context)\n }\n if (typeof current === 'string') {\n const {glamorStyles, glamorlessClassName} = extractGlamorStyles(current)\n mappedArgs.push(...glamorStyles)\n nonGlamorClassNames.push(...glamorlessClassName)\n } else if (Array.isArray(current)) {\n const recursed = handleStyles(current, props, context)\n mappedArgs.push(...recursed.mappedArgs)\n nonGlamorClassNames.push(...recursed.nonGlamorClassNames)\n } else {\n mappedArgs.push(current)\n }\n }\n return {mappedArgs, nonGlamorClassNames}\n}\n","/*\n * This is a relatively small abstraction that's ripe for open sourcing.\n * Documentation is in the README.md\n */\nimport React from 'react'\nimport {PropTypes} from './react-compat'\nimport withTheme from './with-theme'\nimport getGlamorClassName from './get-glamor-classname'\n\nexport default createGlamorous\n\nfunction createGlamorous(splitProps) {\n return glamorous\n\n /**\n * This is the main export and the function that people\n * interact with most directly.\n *\n * It accepts a component which can be a string or\n * a React Component and returns\n * a \"glamorousComponentFactory\"\n * @param {String|ReactComponent} comp the component to render\n * @param {Object} options helpful info for the GlamorousComponents\n * @return {Function} the glamorousComponentFactory\n */\n function glamorous(comp, config = {}) {\n const {\n rootEl,\n displayName,\n shouldClassNameUpdate,\n filterProps = [],\n forwardProps = [],\n propsAreCssOverrides = comp.propsAreCssOverrides,\n withProps: basePropsToApply,\n } = config\n Object.assign(glamorousComponentFactory, {withConfig})\n return glamorousComponentFactory\n\n function withConfig(newConfig) {\n return glamorous(comp, {...config, ...newConfig})\n }\n\n /**\n * This returns a React Component that renders the comp (closure)\n * with a className based on the given glamor styles object(s)\n * @param {...Object|Function} styles the styles to create with glamor.\n * If any of these are functions, they are invoked with the component\n * props and the return value is used.\n * @return {ReactComponent} the ReactComponent function\n */\n function glamorousComponentFactory(...styles) {\n /**\n * This is a component which will render the comp (closure)\n * with the glamorous styles (closure). Forwards any valid\n * props to the underlying component.\n */\n const GlamorousComponent = withTheme(\n function GlamorousInnerComponent(props, context) {\n props = getPropsToApply(\n GlamorousComponent.propsToApply,\n {},\n props,\n context,\n )\n const updateClassName = shouldUpdate(props, context, this.previous)\n\n if (shouldClassNameUpdate) {\n this.previous = {props, context}\n }\n\n const {toForward, cssOverrides, cssProp} = splitProps(\n props,\n GlamorousComponent,\n )\n\n // create className to apply\n this.className = updateClassName\n ? getGlamorClassName({\n styles: GlamorousComponent.styles,\n props,\n cssOverrides,\n cssProp,\n context,\n displayName: GlamorousComponent.displayName,\n })\n : this.className\n\n return React.createElement(GlamorousComponent.comp, {\n // if innerRef is forwarded we don't want to apply it here\n ref: 'innerRef' in toForward ? undefined : props.innerRef,\n ...toForward,\n className: this.className,\n })\n },\n {noWarn: true, createElement: false},\n )\n\n GlamorousComponent.propTypes = {\n // className accepts an object due to glamor's css function\n // returning an object with a toString method that gives the className\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n cssOverrides: PropTypes.object,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n glam: PropTypes.object,\n }\n\n function withComponent(newComp, options = {}) {\n const {\n forwardProps: fwp,\n filterProps: flp,\n ...componentProperties\n } = GlamorousComponent\n return glamorous(\n {\n ...componentProperties,\n comp: newComp,\n rootEl: getRootEl(newComp),\n },\n {\n // allows the forwardProps and filterProps to be overridden\n forwardProps: fwp,\n filterProps: flp,\n ...options,\n },\n )()\n }\n\n function withProps(...propsToApply) {\n return glamorous(GlamorousComponent, {withProps: propsToApply})()\n }\n\n function shouldUpdate(props, context, previous) {\n // exiting early so components which do not use this\n // optimization are not penalized by hanging onto\n // references to previous props and context\n if (!shouldClassNameUpdate) {\n return true\n }\n let update = true\n if (previous) {\n if (\n !shouldClassNameUpdate(\n previous.props,\n props,\n previous.context,\n context,\n )\n ) {\n update = false\n }\n }\n\n return update\n }\n\n Object.assign(\n GlamorousComponent,\n getGlamorousComponentMetadata({\n comp,\n styles,\n rootEl,\n filterProps,\n forwardProps,\n displayName,\n propsToApply: basePropsToApply,\n }),\n {\n isGlamorousComponent: true,\n propsAreCssOverrides,\n withComponent,\n withProps,\n withConfig,\n },\n )\n return GlamorousComponent\n }\n }\n\n function getGlamorousComponentMetadata({\n comp,\n styles,\n rootEl,\n filterProps,\n forwardProps,\n displayName,\n propsToApply: basePropsToApply,\n }) {\n const componentsComp = comp.comp ? comp.comp : comp\n const propsToApply = comp.propsToApply\n ? [...comp.propsToApply, ...arrayify(basePropsToApply)]\n : arrayify(basePropsToApply)\n return {\n // join styles together (for anyone doing: glamorous(glamorous.a({}), {}))\n styles: when(comp.styles, styles),\n // keep track of the ultimate rootEl to render (we never\n // actually render anything but\n // the base component, even when people wrap a glamorous\n // component in glamorous\n comp: componentsComp,\n rootEl: rootEl || getRootEl(comp),\n // join forwardProps and filterProps\n // (for anyone doing: glamorous(glamorous.a({}), {}))\n forwardProps: when(comp.forwardProps, forwardProps),\n filterProps: when(comp.filterProps, filterProps),\n // set the displayName to something that's slightly more\n // helpful than `GlamorousComponent` :)\n displayName: displayName || `glamorous(${getDisplayName(comp)})`,\n // these are props that should be applied to the component at render time\n propsToApply,\n }\n }\n}\n\n/**\n * reduces the propsToApply given to a single props object\n * @param {Array} propsToApply an array of propsToApply objects:\n * - object\n * - array of propsToApply items\n * - function that accepts the accumulated props and the context\n * @param {Object} accumulator an object to apply props onto\n * @param {Object} props the props that should ultimately take precedence\n * @param {*} context the context object\n * @return {Object} the reduced props\n */\nfunction getPropsToApply(propsToApply, accumulator, props, context) {\n // using forEach rather than reduce here because the reduce solution\n // effectively did the same thing because we manipulate the `accumulator`\n propsToApply.forEach(propsToApplyItem => {\n if (typeof propsToApplyItem === 'function') {\n return Object.assign(\n accumulator,\n propsToApplyItem(Object.assign({}, accumulator, props), context),\n )\n } else if (Array.isArray(propsToApplyItem)) {\n return Object.assign(\n accumulator,\n getPropsToApply(propsToApplyItem, accumulator, props, context),\n )\n }\n return Object.assign(accumulator, propsToApplyItem)\n })\n // props wins\n return Object.assign(accumulator, props)\n}\n\nfunction arrayify(x = []) {\n return Array.isArray(x) ? x : [x]\n}\n\nfunction when(comp, prop) {\n return comp ? comp.concat(prop) : prop\n}\n\nfunction getRootEl(comp) {\n return comp.rootEl ? comp.rootEl : comp.comp || comp\n}\n\nfunction getDisplayName(comp) {\n return typeof comp === 'string'\n ? comp\n : comp.displayName || comp.name || 'unknown'\n}\n","//\n// Main\n//\n\nfunction memoize (fn, options) {\n var cache = options && options.cache\n ? options.cache\n : cacheDefault\n\n var serializer = options && options.serializer\n ? options.serializer\n : serializerDefault\n\n var strategy = options && options.strategy\n ? options.strategy\n : strategyDefault\n\n return strategy(fn, {\n cache: cache,\n serializer: serializer\n })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive (value) {\n return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nfunction monadic (fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n var computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction variadic (fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3)\n var cacheKey = serializer(args)\n\n var computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction assemble (fn, context, strategy, cache, serialize) {\n return strategy.bind(\n context,\n fn,\n cache,\n serialize\n )\n}\n\nfunction strategyDefault (fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyVariadic (fn, options) {\n var strategy = variadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyMonadic (fn, options) {\n var strategy = monadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\n//\n// Serializer\n//\n\nfunction serializerDefault () {\n return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nfunction ObjectWithoutPrototypeCache () {\n this.cache = Object.create(null)\n}\n\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n return (key in this.cache)\n}\n\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key]\n}\n\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value\n}\n\nvar cacheDefault = {\n create: function create () {\n return new ObjectWithoutPrototypeCache()\n }\n}\n\n//\n// API\n//\n\nmodule.exports = memoize\nmodule.exports.strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar reactHtmlAttributes = require('./react-html-attributes.json');\n\nexports.default = reactHtmlAttributes;\n\nmodule.exports = reactHtmlAttributes; // for CommonJS compatibility","import {isPreact} from './constants'\n\n/*\n * This is used to check if a property name is one of the React-specific\n * properties and determine if that property should be forwarded\n * to the React component\n */\n\n/* Logic copied from ReactDOMUnknownPropertyHook */\nconst reactProps = [\n 'children',\n 'dangerouslySetInnerHTML',\n 'key',\n 'ref',\n 'autoFocus',\n 'defaultValue',\n 'valueLink',\n 'defaultChecked',\n 'checkedLink',\n 'innerHTML',\n 'suppressContentEditableWarning',\n 'onFocusIn',\n 'onFocusOut',\n 'className',\n\n /* List copied from https://facebook.github.io/react/docs/events.html */\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onFocus',\n 'onBlur',\n 'onChange',\n 'onInput',\n 'onInvalid',\n 'onSubmit',\n 'onClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onError',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onLoad',\n 'onAnimationStart',\n 'onAnimationEnd',\n 'onAnimationIteration',\n 'onTransitionEnd',\n\n 'onCopyCapture',\n 'onCutCapture',\n 'onPasteCapture',\n 'onCompositionEndCapture',\n 'onCompositionStartCapture',\n 'onCompositionUpdateCapture',\n 'onKeyDownCapture',\n 'onKeyPressCapture',\n 'onKeyUpCapture',\n 'onFocusCapture',\n 'onBlurCapture',\n 'onChangeCapture',\n 'onInputCapture',\n 'onSubmitCapture',\n 'onClickCapture',\n 'onContextMenuCapture',\n 'onDoubleClickCapture',\n 'onDragCapture',\n 'onDragEndCapture',\n 'onDragEnterCapture',\n 'onDragExitCapture',\n 'onDragLeaveCapture',\n 'onDragOverCapture',\n 'onDragStartCapture',\n 'onDropCapture',\n 'onMouseDownCapture',\n 'onMouseEnterCapture',\n 'onMouseLeaveCapture',\n 'onMouseMoveCapture',\n 'onMouseOutCapture',\n 'onMouseOverCapture',\n 'onMouseUpCapture',\n 'onSelectCapture',\n 'onTouchCancelCapture',\n 'onTouchEndCapture',\n 'onTouchMoveCapture',\n 'onTouchStartCapture',\n 'onScrollCapture',\n 'onWheelCapture',\n 'onAbortCapture',\n 'onCanPlayCapture',\n 'onCanPlayThroughCapture',\n 'onDurationChangeCapture',\n 'onEmptiedCapture',\n 'onEncryptedCapture',\n 'onEndedCapture',\n 'onErrorCapture',\n 'onLoadedDataCapture',\n 'onLoadedMetadataCapture',\n 'onLoadStartCapture',\n 'onPauseCapture',\n 'onPlayCapture',\n 'onPlayingCapture',\n 'onProgressCapture',\n 'onRateChangeCapture',\n 'onSeekedCapture',\n 'onSeekingCapture',\n 'onStalledCapture',\n 'onSuspendCapture',\n 'onTimeUpdateCapture',\n 'onVolumeChangeCapture',\n 'onWaitingCapture',\n 'onLoadCapture',\n 'onAnimationStartCapture',\n 'onAnimationEndCapture',\n 'onAnimationIterationCapture',\n 'onTransitionEndCapture',\n]\n\nif (isPreact) {\n reactProps.push(\n 'autocomplete',\n 'autofocus',\n 'class',\n 'for',\n 'onDblClick',\n 'onSearch',\n 'slot',\n 'srcset',\n )\n}\n\nexport {reactProps as default}\n","/* eslint max-lines:0, func-style:0 */\n// copied from:\n// https://github.com/styled-components/styled-components/tree/\n// 956e8210b6277860c89404f9cb08735f97eaa7e1/src/utils/validAttr.js\n/* Trying to avoid the unknown-prop errors on glamorous components\n by filtering by React's attribute whitelist.\n */\n\nimport memoize from 'fast-memoize'\nimport reactHTMLAttributes from 'react-html-attributes'\nimport reactProps from './react-props'\n\nconst globalReactHtmlProps = reactHTMLAttributes['*']\nconst supportedSVGTagNames = reactHTMLAttributes.elements.svg\nconst supportedHtmlTagNames = reactHTMLAttributes.elements.html\n\n// these are valid attributes that have the\n// same name as CSS properties, and is used\n// for css overrides API\nconst cssProps = ['color', 'height', 'width']\n\n/* From DOMProperty */\nconst ATTRIBUTE_NAME_START_CHAR =\n // eslint-disable-next-line max-len\n ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD'\n// eslint-disable-next-line max-len\nconst ATTRIBUTE_NAME_CHAR = `${ATTRIBUTE_NAME_START_CHAR}\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040`\nconst isCustomAttribute = RegExp.prototype.test.bind(\n new RegExp(`^(data|aria)-[${ATTRIBUTE_NAME_CHAR}]*$`),\n)\n\nconst isSvgTag = tagName =>\n // in our context, we only say that SVG tags are SVG\n // if they are not also HTML.\n // See https://github.com/paypal/glamorous/issues/245\n // the svg tag will always be treated as svg for\n // er... obvious reasons\n tagName === 'svg' ||\n (supportedHtmlTagNames.indexOf(tagName) === -1 &&\n supportedSVGTagNames.indexOf(tagName) !== -1)\nconst isHtmlProp = (name, tagName) => {\n let elementAttributes\n\n if (isSvgTag(tagName)) {\n // all SVG attributes supported by React are grouped under 'svg'\n elementAttributes = reactHTMLAttributes.svg\n } else {\n elementAttributes = reactHTMLAttributes[tagName] || []\n }\n\n return (\n globalReactHtmlProps.indexOf(name) !== -1 ||\n elementAttributes.indexOf(name) !== -1\n )\n}\nconst isCssProp = name => cssProps.indexOf(name) !== -1\nconst isReactProp = name => reactProps.indexOf(name) !== -1\n\n// eslint-disable-next-line complexity\nconst shouldForwardProperty = (tagName, name) =>\n typeof tagName !== 'string' ||\n ((isHtmlProp(name, tagName) ||\n isReactProp(name) ||\n isCustomAttribute(name.toLowerCase())) &&\n (!isCssProp(name) || isSvgTag(tagName)))\n\nexport default memoize(shouldForwardProperty)\n","import codegen from 'codegen.macro'\nimport domElements from './dom-elements'\nimport withTheme from './with-theme'\nimport ThemeProvider from './theme-provider'\nimport createGlamorous from './create-glamorous'\nimport splitProps from './split-props'\n\nconst glamorous = createGlamorous(splitProps)\n\n/*\n * This creates a glamorousComponentFactory for every DOM element so you can\n * simply do:\n * const GreenButton = glamorous.button({\n * backgroundColor: 'green',\n * padding: 20,\n * })\n * <GreenButton>Click Me!</GreenButton>\n */\nObject.assign(\n glamorous,\n domElements.reduce((getters, tag) => {\n // TODO: next breaking change, let's make\n // the `displayName` be: `glamorous.${tag}`\n getters[tag] = glamorous(tag)\n return getters\n }, {}),\n)\n\n/*\n * This creates a glamorous component for each DOM element so you can\n * simply do:\n * <glamorous.Div\n * color=\"green\"\n * marginLeft={20}\n * >\n * I'm green!\n * </glamorous.Div>\n */\nObject.assign(\n glamorous,\n domElements.reduce((comps, tag) => {\n const capitalTag = capitalize(tag)\n comps[capitalTag] = glamorous[tag]()\n comps[capitalTag].displayName = `glamorous.${capitalTag}`\n comps[capitalTag].propsAreCssOverrides = true\n return comps\n }, {}),\n)\n\nfunction capitalize(s) {\n return s.slice(0, 1).toUpperCase() + s.slice(1)\n}\n\n/*\n * Fix importing in typescript after rollup compilation\n * https://github.com/rollup/rollup/issues/1156\n * https://github.com/Microsoft/TypeScript/issues/13017#issuecomment-268657860\n */\nglamorous.default = glamorous\n\nexport default glamorous\nexport {ThemeProvider, withTheme}\n\ncodegen`\nif (process.env.BUILD_FORMAT === 'esm') {\n module.exports = require('../other/get-exports-code')\n} else {\n module.exports = ''\n}\n`\n","import shouldForwardProperty from './should-forward-property'\n\n// eslint-disable-next-line complexity\nexport default function splitProps(\n {\n css: cssProp,\n innerRef,\n // these are plucked off\n theme, // because they\n className, // should never\n glam, // be forwarded\n // to the lower\n // component ever\n ...rest\n },\n {propsAreCssOverrides, rootEl, filterProps, forwardProps},\n) {\n // forward innerRef if user wishes to do so\n if (innerRef !== undefined && forwardProps.indexOf('innerRef') !== -1) {\n rest.innerRef = innerRef\n }\n const returnValue = {toForward: {}, cssProp, cssOverrides: {}}\n if (!propsAreCssOverrides) {\n if (typeof rootEl !== 'string' && filterProps.length === 0) {\n // if it's not a string and filterProps is empty,\n // then we can forward everything (because it's a component)\n returnValue.toForward = rest\n return returnValue\n }\n }\n return Object.keys(rest).reduce((split, propName) => {\n if (filterProps.indexOf(propName) !== -1) {\n return split\n } else if (\n forwardProps.indexOf(propName) !== -1 ||\n shouldForwardProperty(rootEl, propName)\n ) {\n split.toForward[propName] = rest[propName]\n } else if (propsAreCssOverrides) {\n split.cssOverrides[propName] = rest[propName]\n }\n return split\n }, returnValue)\n}\n\n/* eslint no-unused-vars:0 */\n","/* istanbul ignore next */\nimport * as glamorousStar from './'\n\nconst glamorous = glamorousStar.default\n\nObject.assign(\n glamorous,\n Object.keys(glamorousStar).reduce((e, prop) => {\n if (prop !== 'default') {\n // eslint-disable-next-line import/namespace\n e[prop] = glamorousStar[prop]\n }\n return e\n }, {}),\n)\n\nexport default glamorous\n"],"names":["domElements","concat","filter","tag","index","array","indexOf","CHANNEL","parseFloat","React","version","slice","error","PropTypes","withTheme","ComponentToTheme","noWarn","createElement","ThemedComponent","warned","state","theme","setTheme","_this","setState","componentWillMount","this","context","props","getState","componentWillReceiveProps","nextProps","componentDidMount","subscriptionId","subscribe","componentWillUnmount","unsubscribe","render","call","Component","defaultContextTypes","object","userDefinedContextTypes","defineProperty","value","fn","string","toString","window","setTimeout","alert","confirm","prompt","Object","prototype","val","Array","isArray","isObjectObject","o","isObject","ThemeProvider","setOuterTheme","outerTheme","undefined","broadcast","publishTheme","getTheme","passedTheme","ctor","prot","isFunction","mergedTheme","constructor","hasOwnProperty","Error","getChildContext","initialState","listeners","id","_state","keys","i","len","length","listener","currentId","children","Children","only","extractGlamorStyles","className","glamorlessClassName","glamorStyles","split","forEach","styleSheet","registered","name","substring","push","style","getGlamorClassName","styles","cssOverrides","cssProp","displayName","handleStyles","current","mappedArgs","nonGlamorClassNames","recursed","css","join","trim","arrayify","x","when","comp","prop","getRootEl","rootEl","monadic","cache","serializer","arg","cacheKey","computedValue","get","set","variadic","args","arguments","apply","assemble","strategy","serialize","bind","strategyDefault","options","create","serializerDefault","JSON","stringify","ObjectWithoutPrototypeCache","childContextTypes","isRequired","contextTypes","has","key","cacheDefault","exports","reactHtmlAttributes","module","reactProps","globalReactHtmlProps","reactHTMLAttributes","supportedSVGTagNames","elements","svg","supportedHtmlTagNames","html","cssProps","isCustomAttribute","RegExp","test","isSvgTag","tagName","memoize","elementAttributes","isHtmlProp","isReactProp","toLowerCase","isCssProp","glamorous","splitProps","config","shouldClassNameUpdate","filterProps","forwardProps","propsAreCssOverrides","basePropsToApply","withProps","assign","glamorousComponentFactory","withConfig","newConfig","GlamorousComponent","updateClassName","previous","update","shouldUpdate","getPropsToApply","propsToApply","accumulator","propsToApplyItem","toForward","innerRef","componentsComp","getDisplayName","getGlamorousComponentMetadata","newComp","fwp","flp","componentProperties","createGlamorous","rest","glam","returnValue","reduce","propName","shouldForwardProperty","getters","comps","s","capitalTag","toUpperCase","default","glamorousStar","e"],"mappings":"8SAGMA,+mCACHC,6nCACA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O3H,KAAKiG,OAGtBqB,EAA4B1F,UAAU0E,IAAM,SAAUqB,GACpD,OAAO3H,KAAKiG,MAAM0B,IAGpBL,EAA4B1F,UAAU2E,IAAM,SAAUoB,EAAKzG,GACzDlB,KAAKiG,MAAM0B,GAAOzG,GAGpB,IAAI0G,GACFV,OAAQ,WACN,OAAO,IAAII,MA/Hf,SAAkBnG,EAAI8F,GACpB,IAAIhB,EAAQgB,GAAWA,EAAQhB,MAC3BgB,EAAQhB,MACR2B,EAEA1B,EAAae,GAAWA,EAAQf,WAChCe,EAAQf,WACRiB,EAMJ,OAJeF,GAAWA,EAAQJ,SAC9BI,EAAQJ,SACRG,GAEY7F,GACd8E,MAAOA,EACPC,WAAYA,QA0HdM,SAhEF,SAA2BrF,EAAI8F,GAG7B,OAAOL,EACLzF,EACAnB,KAJawG,EAMbS,EAAQhB,MAAMiB,SACdD,EAAQf,aAyDVF,QArDF,SAA0B7E,EAAI8F,GAG5B,OAAOL,EACLzF,EACAnB,KAJagG,EAMbiB,EAAQhB,MAAMiB,SACdD,EAAQf,m2RC/FZvE,OAAOV,eAAe4G,EAAS,cAC7B3G,OAAO,IAIT2G,UAAkBC,GAElBC,UAAiBD,gICAXE,IACJ,WACA,0BACA,MACA,MACA,YACA,eACA,YACA,iBACA,cACA,YACA,iCACA,YACA,aACA,YAGA,SACA,QACA,UACA,mBACA,qBACA,sBACA,YACA,aACA,UACA,UACA,SACA,WACA,UACA,YACA,WACA,UACA,gBACA,gBACA,SACA,YACA,cACA,aACA,cACA,aACA,cACA,SACA,cACA,eACA,eACA,cACA,aACA,cACA,YACA,WACA,gBACA,aACA,cACA,eACA,WACA,UACA,UACA,YACA,mBACA,mBACA,YACA,cACA,UACA,UACA,eACA,mBACA,cACA,UACA,SACA,YACA,aACA,eACA,WACA,YACA,YACA,YACA,eACA,iBACA,YACA,SACA,mBACA,iBACA,uBACA,kBAEA,gBACA,eACA,iBACA,0BACA,4BACA,6BACA,mBACA,oBACA,iBACA,iBACA,g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