1 | {"version":3,"file":null,"sources":["src/constants.js","src/util.js","src/vdom/functional-component.js","devtools/devtools.js","devtools/index.js"],"sourcesContent":["// render modes\n\nexport const NO_RENDER = 0;\nexport const SYNC_RENDER = 1;\nexport const FORCE_RENDER = 2;\nexport const ASYNC_RENDER = 3;\n\nexport const EMPTY = {};\n\nexport const ATTR_KEY = typeof Symbol!=='undefined' ? Symbol.for('preactattr') : '__preactattr_';\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const NON_DIMENSION_PROPS = {\n\tboxFlex:1, boxFlexGroup:1, columnCount:1, fillOpacity:1, flex:1, flexGrow:1,\n\tflexPositive:1, flexShrink:1, flexNegative:1, fontWeight:1, lineClamp:1, lineHeight:1,\n\topacity:1, order:1, orphans:1, strokeOpacity:1, widows:1, zIndex:1, zoom:1\n};\n\n// DOM event types that do not bubble and should be attached via useCapture\nexport const NON_BUBBLING_EVENTS = { blur:1, error:1, focus:1, load:1, resize:1, scroll:1 };\n","/** Copy own-properties from `props` onto `obj`.\n *\t@returns obj\n *\t@private\n */\nexport function extend(obj, props) {\n\tif (props) {\n\t\tfor (let i in props) obj[i] = props[i];\n\t}\n\treturn obj;\n}\n\n\n/** Fast clone. Note: does not filter out non-own properties.\n *\t@see https://esbench.com/bench/56baa34f45df6895002e03b6\n */\nexport function clone(obj) {\n\treturn extend({}, obj);\n}\n\n\n/** Get a deep property value from the given object, expressed in dot-notation.\n *\t@private\n */\nexport function delve(obj, key) {\n\tfor (let p=key.split('.'), i=0; i<p.length && obj; i++) {\n\t\tobj = obj[p[i]];\n\t}\n\treturn obj;\n}\n\n\n/** @private is the given object a Function? */\nexport function isFunction(obj) {\n\treturn 'function'===typeof obj;\n}\n\n\n/** @private is the given object a String? */\nexport function isString(obj) {\n\treturn 'string'===typeof obj;\n}\n\n\n/** Convert a hashmap of CSS classes to a space-delimited className string\n *\t@private\n */\nexport function hashToClassName(c) {\n\tlet str = '';\n\tfor (let prop in c) {\n\t\tif (c[prop]) {\n\t\t\tif (str) str += ' ';\n\t\t\tstr += prop;\n\t\t}\n\t}\n\treturn str;\n}\n\n\n/** Just a memoized String#toLowerCase */\nlet lcCache = {};\nexport const toLowerCase = s => lcCache[s] || (lcCache[s] = s.toLowerCase());\n\n\n/** Call a function asynchronously, as soon as possible.\n *\t@param {Function} callback\n */\nlet resolved = typeof Promise!=='undefined' && Promise.resolve();\nexport const defer = resolved ? (f => { resolved.then(f); }) : setTimeout;\n","import { EMPTY } from '../constants';\nimport { getNodeProps } from './index';\nimport { isFunction } from '../util';\n\n\n/** Check if a VNode is a reference to a stateless functional component.\n *\tA function component is represented as a VNode whose `nodeName` property is a reference to a function.\n *\tIf that function is not a Component (ie, has no `.render()` method on a prototype), it is considered a stateless functional component.\n *\t@param {VNode} vnode\tA VNode\n *\t@private\n */\nexport function isFunctionalComponent(vnode) {\n\tlet nodeName = vnode && vnode.nodeName;\n\treturn nodeName && isFunction(nodeName) && !(nodeName.prototype && nodeName.prototype.render);\n}\n\n\n\n/** Construct a resultant VNode from a VNode referencing a stateless functional component.\n *\t@param {VNode} vnode\tA VNode with a `nodeName` property that is a reference to a function.\n *\t@private\n */\nexport function buildFunctionalComponent(vnode, context) {\n\treturn vnode.nodeName(getNodeProps(vnode), context || EMPTY);\n}\n","/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n\nimport { options, Component } from 'preact';\n\n// Internal helpers from preact\nimport { ATTR_KEY } from '../src/constants';\nimport { isFunctionalComponent } from '../src/vdom/functional-component';\n\n/**\n * Return a ReactElement-compatible object for the current state of a preact\n * component.\n */\nfunction createReactElement(component) {\n\treturn {\n\t\ttype: component.constructor,\n\t\tkey: component.key,\n\t\tref: null, // Unsupported\n\t\tprops: component.props\n\t};\n}\n\n/**\n * Create a ReactDOMComponent-compatible object for a given DOM node rendered\n * by preact.\n *\n * This implements the subset of the ReactDOMComponent interface that\n * React DevTools requires in order to display DOM nodes in the inspector with\n * the correct type and properties.\n *\n * @param {Node} node\n */\nfunction createReactDOMComponent(node) {\n\tconst childNodes = node.nodeType === Node.ELEMENT_NODE ?\n\t\tArray.from(node.childNodes) : [];\n\n\tconst isText = node.nodeType === Node.TEXT_NODE;\n\n\treturn {\n\t\t// --- ReactDOMComponent interface\n\t\t_currentElement: isText ? node.textContent : {\n\t\t\ttype: node.nodeName.toLowerCase(),\n\t\t\tprops: node[ATTR_KEY]\n\t\t},\n\t\t_renderedChildren: childNodes.map(child => {\n\t\t\tif (child._component) {\n\t\t\t\treturn updateReactComponent(child._component);\n\t\t\t}\n\t\t\treturn updateReactComponent(child);\n\t\t}),\n\t\t_stringText: isText ? node.textContent : null,\n\n\t\t// --- Additional properties used by preact devtools\n\n\t\t// A flag indicating whether the devtools have been notified about the\n\t\t// existence of this component instance yet.\n\t\t// This is used to send the appropriate notifications when DOM components\n\t\t// are added or updated between composite component updates.\n\t\t_inDevTools: false,\n\t\tnode\n\t};\n}\n\n/**\n * Return the name of a component created by a `ReactElement`-like object.\n *\n * @param {ReactElement} element\n */\nfunction typeName(element) {\n\tif (typeof element.type === 'function') {\n\t\treturn element.type.displayName || element.type.name;\n\t}\n\treturn element.type;\n}\n\n/**\n * Return a ReactCompositeComponent-compatible object for a given preact\n * component instance.\n *\n * This implements the subset of the ReactCompositeComponent interface that\n * the DevTools requires in order to walk the component tree and inspect the\n * component's properties.\n *\n * See https://github.com/facebook/react-devtools/blob/e31ec5825342eda570acfc9bcb43a44258fceb28/backend/getData.js\n */\nfunction createReactCompositeComponent(component) {\n\tconst _currentElement = createReactElement(component);\n\tconst node = component.base;\n\n\tlet instance = {\n\t\t// --- ReactDOMComponent properties\n\t\tgetName() {\n\t\t\treturn typeName(_currentElement);\n\t\t},\n\t\t_currentElement: createReactElement(component),\n\t\tprops: component.props,\n\t\tstate: component.state,\n\t\tforceUpdate: component.forceUpdate.bind(component),\n\t\tsetState: component.setState.bind(component),\n\n\t\t// --- Additional properties used by preact devtools\n\t\tnode\n\t};\n\n\t// React DevTools exposes the `_instance` field of the selected item in the\n\t// component tree as `$r` in the console. `_instance` must refer to a\n\t// React Component (or compatible) class instance with `props` and `state`\n\t// fields and `setState()`, `forceUpdate()` methods.\n\tinstance._instance = component;\n\n\t// If the root node returned by this component instance's render function\n\t// was itself a composite component, there will be a `_component` property\n\t// containing the child component instance.\n\tif (component._component) {\n\t\tinstance._renderedComponent = updateReactComponent(component._component);\n\t} else {\n\t\t// Otherwise, if the render() function returned an HTML/SVG element,\n\t\t// create a ReactDOMComponent-like object for the DOM node itself.\n\t\tinstance._renderedComponent = updateReactComponent(node);\n\t}\n\n\treturn instance;\n}\n\n/**\n * Map of Component|Node to ReactDOMComponent|ReactCompositeComponent-like\n * object.\n *\n * The same React*Component instance must be used when notifying devtools\n * about the initial mount of a component and subsequent updates.\n */\nlet instanceMap = new Map();\n\n/**\n * Update (and create if necessary) the ReactDOMComponent|ReactCompositeComponent-like\n * instance for a given preact component instance or DOM Node.\n *\n * @param {Component|Node} componentOrNode\n */\nfunction updateReactComponent(componentOrNode) {\n\tconst newInstance = componentOrNode instanceof Node ?\n\t\tcreateReactDOMComponent(componentOrNode) :\n\t\tcreateReactCompositeComponent(componentOrNode);\n\tif (instanceMap.has(componentOrNode)) {\n\t\tlet inst = instanceMap.get(componentOrNode);\n\t\tObject.assign(inst, newInstance);\n\t\treturn inst;\n\t}\n\tinstanceMap.set(componentOrNode, newInstance);\n\treturn newInstance;\n}\n\nfunction nextRootKey(roots) {\n\treturn '.' + Object.keys(roots).length;\n}\n\n/**\n * Find all root component instances rendered by preact in `node`'s children\n * and add them to the `roots` map.\n *\n * @param {DOMElement} node\n * @param {[key: string] => ReactDOMComponent|ReactCompositeComponent}\n */\nfunction findRoots(node, roots) {\n\tArray.from(node.childNodes).forEach(child => {\n\t\tif (child._component) {\n\t\t\troots[nextRootKey(roots)] = updateReactComponent(child._component);\n\t\t} else {\n\t\t\tfindRoots(child, roots);\n\t\t}\n\t});\n}\n\n/**\n * Map of functional component name -> wrapper class.\n */\nlet functionalComponentWrappers = new Map();\n\n/**\n * Wrap a functional component with a stateful component.\n *\n * preact does not record any information about the original hierarchy of\n * functional components in the rendered DOM nodes. Wrapping functional components\n * with a trivial wrapper allows us to recover information about the original\n * component structure from the DOM.\n *\n * @param {VNode} vnode\n */\nfunction wrapFunctionalComponent(vnode) {\n\tconst originalRender = vnode.nodeName;\n\tconst name = vnode.nodeName.name || '(Function.name missing)';\n\tconst wrappers = functionalComponentWrappers;\n\tif (!wrappers.has(originalRender)) {\n\t\tlet wrapper = class extends Component {\n\t\t\trender(props, state, context) {\n\t\t\t\treturn originalRender(props, context);\n\t\t\t}\n\t\t};\n\n\t\t// Expose the original component name. React Dev Tools will use\n\t\t// this property if it exists or fall back to Function.name\n\t\t// otherwise.\n\t\twrapper.displayName = name;\n\n\t\twrappers.set(originalRender, wrapper);\n\t}\n\tvnode.nodeName = wrappers.get(originalRender);\n}\n\n/**\n * Create a bridge for exposing preact's component tree to React DevTools.\n *\n * It creates implementations of the interfaces that ReactDOM passes to\n * devtools to enable it to query the component tree and hook into component\n * updates.\n *\n * See https://github.com/facebook/react/blob/59ff7749eda0cd858d5ee568315bcba1be75a1ca/src/renderers/dom/ReactDOM.js\n * for how ReactDOM exports its internals for use by the devtools and\n * the `attachRenderer()` function in\n * https://github.com/facebook/react-devtools/blob/e31ec5825342eda570acfc9bcb43a44258fceb28/backend/attachRenderer.js\n * for how the devtools consumes the resulting objects.\n */\nfunction createDevToolsBridge() {\n\t// The devtools has different paths for interacting with the renderers from\n\t// React Native, legacy React DOM and current React DOM.\n\t//\n\t// Here we emulate the interface for the current React DOM (v15+) lib.\n\n\t// ReactDOMComponentTree-like object\n\tconst ComponentTree = {\n\t\tgetNodeFromInstance(instance) {\n\t\t\treturn instance.node;\n\t\t},\n\t\tgetClosestInstanceFromNode(node) {\n\t\t\twhile (node && !node._component) {\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\t\t\treturn node ? updateReactComponent(node._component) : null;\n\t\t}\n\t};\n\n\t// Map of root ID (the ID is unimportant) to component instance.\n\tlet roots = {};\n\tfindRoots(document.body, roots);\n\n\t// ReactMount-like object\n\t//\n\t// Used by devtools to discover the list of root component instances and get\n\t// notified when new root components are rendered.\n\tconst Mount = {\n\t\t_instancesByReactRootID: roots,\n\n\t\t// Stub - React DevTools expects to find this method and replace it\n\t\t// with a wrapper in order to observe new root components being added\n\t\t_renderNewRootComponent(/* instance, ... */) { }\n\t};\n\n\t// ReactReconciler-like object\n\tconst Reconciler = {\n\t\t// Stubs - React DevTools expects to find these methods and replace them\n\t\t// with wrappers in order to observe components being mounted, updated and\n\t\t// unmounted\n\t\tmountComponent(/* instance, ... */) { },\n\t\tperformUpdateIfNecessary(/* instance, ... */) { },\n\t\treceiveComponent(/* instance, ... */) { },\n\t\tunmountComponent(/* instance, ... */) { }\n\t};\n\n\t/** Notify devtools that a new component instance has been mounted into the DOM. */\n\tconst componentAdded = component => {\n\t\tconst instance = updateReactComponent(component);\n\t\tif (isRootComponent(component)) {\n\t\t\tinstance._rootID = nextRootKey(roots);\n\t\t\troots[instance._rootID] = instance;\n\t\t\tMount._renderNewRootComponent(instance);\n\t\t}\n\t\tvisitNonCompositeChildren(instance, childInst => {\n\t\t\tchildInst._inDevTools = true;\n\t\t\tReconciler.mountComponent(childInst);\n\t\t});\n\t\tReconciler.mountComponent(instance);\n\t};\n\n\t/** Notify devtools that a component has been updated with new props/state. */\n\tconst componentUpdated = component => {\n\t\tconst prevRenderedChildren = [];\n\t\tvisitNonCompositeChildren(instanceMap.get(component), childInst => {\n\t\t\tprevRenderedChildren.push(childInst);\n\t\t});\n\n\t\t// Notify devtools about updates to this component and any non-composite\n\t\t// children\n\t\tconst instance = updateReactComponent(component);\n\t\tReconciler.receiveComponent(instance);\n\t\tvisitNonCompositeChildren(instance, childInst => {\n\t\t\tif (!childInst._inDevTools) {\n\t\t\t\t// New DOM child component\n\t\t\t\tchildInst._inDevTools = true;\n\t\t\t\tReconciler.mountComponent(childInst);\n\t\t\t} else {\n\t\t\t\t// Updated DOM child component\n\t\t\t\tReconciler.receiveComponent(childInst);\n\t\t\t}\n\t\t});\n\n\t\t// For any non-composite children that were removed by the latest render,\n\t\t// remove the corresponding ReactDOMComponent-like instances and notify\n\t\t// the devtools\n\t\tprevRenderedChildren.forEach(childInst => {\n\t\t\tif (!document.body.contains(childInst.node)) {\n\t\t\t\tinstanceMap.delete(childInst.node);\n\t\t\t\tReconciler.unmountComponent(childInst);\n\t\t\t}\n\t\t});\n\t};\n\n\t/** Notify devtools that a component has been unmounted from the DOM. */\n\tconst componentRemoved = component => {\n\t\tconst instance = updateReactComponent(component);\n\t\tvisitNonCompositeChildren(childInst => {\n\t\t\tinstanceMap.delete(childInst.node);\n\t\t\tReconciler.unmountComponent(childInst);\n\t\t});\n\t\tReconciler.unmountComponent(instance);\n\t\tinstanceMap.delete(component);\n\t\tif (instance._rootID) {\n\t\t\tdelete roots[instance._rootID];\n\t\t}\n\t};\n\n\treturn {\n\t\tcomponentAdded,\n\t\tcomponentUpdated,\n\t\tcomponentRemoved,\n\n\t\t// Interfaces passed to devtools via __REACT_DEVTOOLS_GLOBAL_HOOK__.inject()\n\t\tComponentTree,\n\t\tMount,\n\t\tReconciler\n\t};\n}\n\n/**\n * Return `true` if a preact component is a top level component rendered by\n * `render()` into a container Element.\n */\nfunction isRootComponent(component) {\n\treturn !component.base.parentElement || !component.base.parentElement[ATTR_KEY];\n}\n\n/**\n * Visit all child instances of a ReactCompositeComponent-like object that are\n * not composite components (ie. they represent DOM elements or text)\n *\n * @param {Component} component\n * @param {(Component) => void} visitor\n */\nfunction visitNonCompositeChildren(component, visitor) {\n\tif (component._renderedComponent) {\n\t\tif (!component._renderedComponent._component) {\n\t\t\tvisitor(component._renderedComponent);\n\t\t\tvisitNonCompositeChildren(component._renderedComponent, visitor);\n\t\t}\n\t} else if (component._renderedChildren) {\n\t\tcomponent._renderedChildren.forEach(child => {\n\t\t\tvisitor(child);\n\t\t\tif (!child._component) visitNonCompositeChildren(child, visitor);\n\t\t});\n\t}\n}\n\n/**\n * Create a bridge between the preact component tree and React's dev tools\n * and register it.\n *\n * After this function is called, the React Dev Tools should be able to detect\n * \"React\" on the page and show the component tree.\n *\n * This function hooks into preact VNode creation in order to expose functional\n * components correctly, so it should be called before the root component(s)\n * are rendered.\n *\n * Returns a cleanup function which unregisters the hooks.\n */\nexport function initDevTools() {\n\tif (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n\t\t// React DevTools are not installed\n\t\treturn;\n\t}\n\n\t// Hook into preact element creation in order to wrap functional components\n\t// with stateful ones in order to make them visible in the devtools\n\tconst nextVNode = options.vnode;\n\toptions.vnode = (vnode) => {\n\t\tif (isFunctionalComponent(vnode)) wrapFunctionalComponent(vnode);\n\t\tif (nextVNode) return nextVNode(vnode);\n\t};\n\n\t// Notify devtools when preact components are mounted, updated or unmounted\n\tconst bridge = createDevToolsBridge();\n\n\tconst nextAfterMount = options.afterMount;\n\toptions.afterMount = component => {\n\t\tbridge.componentAdded(component);\n\t\tif (nextAfterMount) nextAfterMount(component);\n\t};\n\n\tconst nextAfterUpdate = options.afterUpdate;\n\toptions.afterUpdate = component => {\n\t\tbridge.componentUpdated(component);\n\t\tif (nextAfterUpdate) nextAfterUpdate(component);\n\t};\n\n\tconst nextBeforeUnmount = options.beforeUnmount;\n\toptions.beforeUnmount = component => {\n\t\tbridge.componentRemoved(component);\n\t\tif (nextBeforeUnmount) nextBeforeUnmount(component);\n\t};\n\n\t// Notify devtools about this instance of \"React\"\n\t__REACT_DEVTOOLS_GLOBAL_HOOK__.inject(bridge);\n\n\treturn () => {\n\t\toptions.afterMount = nextAfterMount;\n\t\toptions.afterUpdate = nextAfterUpdate;\n\t\toptions.beforeUnmount = nextBeforeUnmount;\n\t};\n}\n","import { initDevTools } from './devtools';\n\ninitDevTools();\n\n"],"names":["Component","options"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASO,IAAM,QAAQ,GAAG,OAAO,MAAM,KAAG,WAAW,GAAG,MAAM,OAAI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