UNPKG

19 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack:///webpack/bootstrap 96028757772428fcfd96","webpack:///external \"babel-runtime/helpers/objectWithoutProperties\"","webpack:///external \"babel-runtime/helpers/toConsumableArray\"","webpack:///external \"ejson\"","webpack:///external \"react\"","webpack:///./src/client/isolator.js","webpack:////Users/tom/Chroma/chromatic/lib/specs/normalize/Callback.js","webpack:////Users/tom/Chroma/chromatic/lib/specs/render/index.js","webpack:////Users/tom/Chroma/chromatic/lib/specs/serialize.js","webpack:///./src/client/index.js","webpack:///external \"babel-runtime/core-js/object/keys\"","webpack:///external \"babel-runtime/helpers/classCallCheck\"","webpack:///external \"babel-runtime/helpers/createClass\"","webpack:///external \"babel-runtime/helpers/extends\"","webpack:///external \"babel-runtime/helpers/typeof\"","webpack:///external \"react-dom\""],"names":["configure","chromaticRoot","drawn","drawIsolator","styles","el","document","createElement","type","innerHTML","head","appendChild","querySelectorAll","forEach","e","style","display","body","runtimes","clearScreen","runtimeRenderers","r","runtime","renderSpec","runtimeSpecs","map","specs","spec","reduce","a","b","renderSpecToDom","parsedSpec","input","element","renderer","Error","renderedSpec","window","__chromaticRuntimeSpecs__","__renderChromaticSpec__","handleMessage","data","source","origin","message","rest","postMessage","service","version","error","toString","addEventListener","Callback","name","_getTypes","ChromaticCallback","addType","NO_LAYOUT_CLASS","CONTAINER_CLASS","defaultAncestors","defaultDimensions","width","height","wrapInAncestors","ancestors","reduceRight","output","index","Tag","id","className","classes","length","push","join","renderInputElement","options","props","mappedProps","mappedChildren","children","otherProps","propName","mapProps","concat","component","nameToComponent","dimensions","value","reactElement","stringify","parse","hasSetup","isIsolator","location","hash","match"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA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,CAA6B,wBAA7B,CAAnB;;AAEA,0BAAc;AACZ/E,cAAU,GAAGmE,MAAH,CAAUnE,QAAV,CADE,EACmB;AAC/BC,iBAAa2E;AAFD,GAAd;AAID;;kBAEc9F,S;;;;;;AC1Bf,8D;;;;;;ACAA,iE;;;;;;ACAA,8D;;;;;;ACAA,0D;;;;;;ACAA,yD;;;;;;ACAA,sC","file":"dist/client.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 96028757772428fcfd96","module.exports = require(\"babel-runtime/helpers/objectWithoutProperties\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-runtime/helpers/objectWithoutProperties\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"babel-runtime/helpers/toConsumableArray\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-runtime/helpers/toConsumableArray\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"ejson\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ejson\"\n// module id = 2\n// module chunks = 0","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 3\n// module chunks = 0","/* eslint-env browser */\nimport React from 'react';\nimport { render, unmountComponentAtNode } from 'react-dom';\n\nimport { NO_LAYOUT_CLASS, CONTAINER_CLASS } from '../../../../lib/specs/render';\nimport { parse } from '../../../../lib/specs/serialize';\n\nlet chromaticRoot;\n\nlet drawn = false;\nfunction drawIsolator() {\n if (drawn) {\n return;\n }\n const styles = `\n /* ensure a given element is not laid out at all */\n .${NO_LAYOUT_CLASS} {\n margin: 0 !important;\n padding: 0 !important;\n position: static !important;\n }\n `;\n const el = document.createElement('style');\n el.type = 'text/css';\n el.innerHTML = styles;\n document.head.appendChild(el);\n\n chromaticRoot = document.createElement('div');\n\n // Hide all existing content\n document.querySelectorAll('body > *').forEach(e => {\n e.style.display = 'none';\n });\n\n // Add our root\n document.body.appendChild(chromaticRoot);\n drawn = true;\n}\n\nexport default function configure({ runtimes, clearScreen }) {\n if (clearScreen) {\n drawIsolator();\n }\n\n const runtimeRenderers = {};\n runtimes.forEach(r => {\n runtimeRenderers[r.runtime] = r.renderSpec;\n });\n\n function runtimeSpecs() {\n return runtimes\n .map(({ runtime, specs }) => specs().map(spec => ({ runtime, ...spec })))\n .reduce((a, b) => [...a, ...b], []);\n }\n\n function renderSpecToDom(spec) {\n drawIsolator();\n\n const parsedSpec = {\n ...spec,\n input: typeof spec.input === 'string' ? parse(spec.input) : spec.input,\n };\n\n let element;\n if (spec.runtime) {\n const renderer = runtimeRenderers[spec.runtime];\n if (!renderer) {\n throw new Error(\n `Didn't find a renderer for runtime '${\n spec.runtime\n }' -- are you sure you added it in your client configuration?`\n );\n }\n const renderedSpec = renderer(parsedSpec);\n element = <div className={CONTAINER_CLASS}>{renderedSpec}</div>;\n } else {\n throw new Error('No runtime passed for spec', spec);\n }\n\n unmountComponentAtNode(chromaticRoot);\n render(element, chromaticRoot);\n }\n\n // API to be used by test script to gather runtime spec definitions\n window.__chromaticRuntimeSpecs__ = runtimeSpecs;\n\n // API to be used by capture worker to render a spec\n window.__renderChromaticSpec__ = renderSpecToDom;\n\n function handleMessage({ data, source, origin }) {\n // TODO -- is it unsafe to not check origin? I don't get the sense it matters\n\n const { message, ...rest } = data;\n if (message === 'requestCapabilities') {\n source.postMessage(\n {\n message: 'capabilities',\n service: 'chromatic-isolator',\n version: 0,\n },\n origin\n );\n } else if (message === 'renderSpec') {\n try {\n renderSpecToDom(rest.spec);\n } catch (error) {\n source.postMessage(\n {\n message: 'renderSpecError',\n error: error.toString(),\n },\n origin\n );\n\n // For now, throw the error so we can see it in the iframe\n throw error;\n }\n }\n }\n\n window.addEventListener('message', handleMessage, false);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/client/isolator.js","import EJSON from 'ejson';\n\nexport default class Callback {\n constructor(name) {\n // super('throw new Error(\"I shouldn\\'t have been called!\");');\n this.name = name;\n }\n\n toString() {\n return `function ${this.name}()`;\n }\n\n toJSONValue() {\n return this.name;\n }\n\n // eslint-disable-next-line class-methods-use-this\n typeName() {\n return 'ChromaticCallback';\n }\n}\n\n// eslint-disable-next-line no-underscore-dangle\nif (!EJSON._getTypes().ChromaticCallback) {\n EJSON.addType('ChromaticCallback', name => new Callback(name));\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/tom/Chroma/chromatic/lib/specs/normalize/Callback.js","// Render a spec in our format to a React element.\n// Note that this is *NOT* a stateless functional component\n// We *don't* want to end up with our own element type, instead\n// we need to construct an element tree *as we saved it*.\n/* eslint-disable react/prop-types */\n\nimport React, { createElement } from 'react';\n\nexport const NO_LAYOUT_CLASS = '__chromatic__no_layout';\nexport const CONTAINER_CLASS = '__chromatic_rendered_spec_container';\n\n// We need at least a single div so we can set the CONTAINER_CLASS\nconst defaultAncestors = [{ name: 'div' }];\n// Don't specify if we don't know\nconst defaultDimensions = { width: '', height: '' };\n\nfunction wrapInAncestors(element, ancestors, { width, height }) {\n return ancestors.reduceRight((output, { name: Tag, id, className }, index) => {\n const classes = [NO_LAYOUT_CLASS, className];\n if (index === ancestors.length - 1) {\n classes.push(CONTAINER_CLASS);\n }\n return (\n <Tag id={id} className={classes.join(' ')} style={{ width, height }}>\n {output}\n </Tag>\n );\n }, element);\n}\n\nfunction renderInputElement(element, options) {\n if (typeof element !== 'object') {\n return element;\n }\n\n const { name, props } = element;\n\n const mappedProps = {};\n let mappedChildren = [];\n if (props) {\n const { children, ...otherProps } = props;\n\n Object.keys(otherProps).forEach(propName => {\n mappedProps[propName] = options.mapProps(propName, props[propName]);\n });\n\n if (children) {\n mappedChildren = [].concat(children).map(e => renderInputElement(e, options));\n }\n }\n\n const component = options.nameToComponent(name);\n\n return createElement(component, mappedProps, ...mappedChildren);\n}\n\nexport default function renderSpec(\n { input: { element, ancestors = defaultAncestors, dimensions = defaultDimensions } },\n options = { nameToComponent: name => name, mapProps: (name, value) => value }\n) {\n const reactElement = renderInputElement(element, options);\n\n return wrapInAncestors(reactElement, ancestors, dimensions);\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/tom/Chroma/chromatic/lib/specs/render/index.js","import { stringify, parse } from 'ejson';\n\n// Ensure this has been registered\nimport Callback from './normalize/Callback';\n\nexport { stringify, parse, Callback };\n\n\n\n// WEBPACK FOOTER //\n// /Users/tom/Chroma/chromatic/lib/specs/serialize.js","/* eslint-env browser */\nimport startIsolator from './isolator';\n\nlet hasSetup = false;\nfunction configure(runtimes = []) {\n if (hasSetup) {\n throw new Error('Chromatic already configured.');\n }\n hasSetup = true;\n\n if (runtimes === []) {\n throw new Error(\n 'Chromatic must be configured with at least one runtime. http://docs.chromaticqa.com/runtime-api'\n );\n }\n\n // If we are rendered in an iframe, (by ourself), then we need to clear\n // the screen right away, rather than waiting for a spec\n const isIsolator = document.location.hash.match('__chromatic_isolator__');\n\n startIsolator({\n runtimes: [].concat(runtimes), // allow passing a single runtime\n clearScreen: isIsolator,\n });\n}\n\nexport default configure;\n\n\n\n// WEBPACK FOOTER //\n// ./src/client/index.js","module.exports = require(\"babel-runtime/core-js/object/keys\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-runtime/core-js/object/keys\"\n// module id = 9\n// module chunks = 0","module.exports = require(\"babel-runtime/helpers/classCallCheck\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-runtime/helpers/classCallCheck\"\n// module id = 10\n// module chunks = 0","module.exports = require(\"babel-runtime/helpers/createClass\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-runtime/helpers/createClass\"\n// module id = 11\n// module chunks = 0","module.exports = require(\"babel-runtime/helpers/extends\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-runtime/helpers/extends\"\n// module id = 12\n// module chunks = 0","module.exports = require(\"babel-runtime/helpers/typeof\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-runtime/helpers/typeof\"\n// module id = 13\n// module chunks = 0","module.exports = require(\"react-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom\"\n// module id = 14\n// module chunks = 0"],"sourceRoot":""}
\No newline at end of file