From 3345f8e44fb13aacbcf438b43235df3c86ea98f2 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Fri, 31 Aug 2018 01:03:50 -0600 Subject: [PATCH 01/28] api experiment --- .vscode/settings.json | 3 + bower.json | 2 +- codegen/index.js | 25 +- examples/component/src/Container.purs | 25 +- examples/component/src/Main.purs | 3 +- examples/component/src/ToggleButton.purs | 53 +- .../controlled-input/src/ControlledInput.purs | 65 +- examples/controlled-input/src/Main.purs | 3 +- examples/counter/src/Counter.purs | 47 +- examples/counter/src/Main.purs | 8 +- generated-docs/React/Basic/Types.md | 60 + package-lock.json | 4344 ----------------- src/React/Basic.js | 131 +- src/React/Basic.purs | 251 +- src/React/Basic/DOM.purs | 6 +- src/React/Basic/DOM/Internal.purs | 4 +- 16 files changed, 411 insertions(+), 4619 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 generated-docs/React/Basic/Types.md delete mode 100644 package-lock.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ad92582 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} diff --git a/bower.json b/bower.json index dc054bb..34f4ebb 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,7 @@ "dependencies": { "purescript-functions": "^4.0.0", "purescript-unsafe-coerce": "^4.0.0", - "purescript-nullable": "^4.0.0", + "purescript-nullable": "^4.1.0", "purescript-typelevel-prelude": "^3.0.0", "purescript-record": "^1.0.0", "purescript-effect": "^2.0.0", diff --git a/codegen/index.js b/codegen/index.js index 98a0e9d..88aab99 100644 --- a/codegen/index.js +++ b/codegen/index.js @@ -1,5 +1,5 @@ -const fs = require('fs'); -const { props, voids, types, reserved } = require('./consts'); +const fs = require("fs"); +const { props, voids, types, reserved } = require("./consts"); const genFile = "../src/React/Basic/DOM/Generated.purs"; const header = `-- | ---------------------------------------- @@ -15,14 +15,15 @@ import React.Basic.Events (EventHandler) `; -const printRecord = (elProps) => elProps.length ? ` - ( ${ elProps.map((p) => - `${p} :: ${types[p] || "String"}`).join("\n , ") - } - )` : "()" +const printRecord = elProps => + elProps.length + ? ` + ( ${elProps.map(p => `${p} :: ${types[p] || "String"}`).join("\n , ")} + )` + : "()"; const domTypes = props.elements.html - .map((e) => { + .map(e => { const noChildren = voids.includes(e); const symbol = reserved.includes(e) ? `${e}'` : e; return ` @@ -36,13 +37,17 @@ const domTypes = props.elements.html => Record attrs -> JSX ${symbol} = element (unsafeCreateDOMComponent "${e}")${ - noChildren ? "" : ` + noChildren + ? "" + : ` ${e}_ :: Array JSX -> JSX ${e}_ children = ${symbol} { children }` } `; -}).map((x) => x.replace(/^\n\ {4}/, "").replace(/\n\ {4}/g, "\n")).join("\n"); + }) + .map(x => x.replace(/^\n\ {4}/, "").replace(/\n\ {4}/g, "\n")) + .join("\n"); console.log(`Writing "${genFile}" ...`); fs.writeFileSync(genFile, header + domTypes); diff --git a/examples/component/src/Container.purs b/examples/component/src/Container.purs index 212fa03..812b04c 100644 --- a/examples/component/src/Container.purs +++ b/examples/component/src/Container.purs @@ -1,16 +1,19 @@ module Container where -import React.Basic as React +import Prelude + +import React.Basic (JSX, StatelessComponent, createComponent, makeStateless) import React.Basic.DOM as R import ToggleButton as ToggleButton -component :: React.Component {} -component = React.stateless { displayName: "Container", render } - where - render _ = - R.div - { children: - [ React.element ToggleButton.component { label: "A" } - , React.element ToggleButton.component { label: "B" } - ] - } +render :: JSX +render = {} # makeStateless component \_ -> + R.div + { children: + [ ToggleButton.render { label: "A" } + , ToggleButton.render { label: "B" } + ] + } + +component :: StatelessComponent {} +component = createComponent "Container" diff --git a/examples/component/src/Main.purs b/examples/component/src/Main.purs index d6cf566..3057d14 100644 --- a/examples/component/src/Main.purs +++ b/examples/component/src/Main.purs @@ -6,7 +6,6 @@ import Container as Container import Data.Maybe (Maybe(..)) import Effect (Effect) import Effect.Exception (throw) -import React.Basic (element) import React.Basic.DOM (render) import Web.DOM.NonElementParentNode (getElementById) import Web.HTML (window) @@ -19,5 +18,5 @@ main = do case container of Nothing -> throw "Container element not found." Just c -> - let app = element Container.component {} + let app = Container.render in render app c diff --git a/examples/component/src/ToggleButton.purs b/examples/component/src/ToggleButton.purs index 852b44a..497fc93 100644 --- a/examples/component/src/ToggleButton.purs +++ b/examples/component/src/ToggleButton.purs @@ -2,7 +2,7 @@ module ToggleButton where import Prelude -import React.Basic as React +import React.Basic (JSX, Update, Component, StateUpdate(..), make, createComponent) import React.Basic.DOM as R import React.Basic.Events as Events @@ -10,24 +10,33 @@ type Props = { label :: String } -component :: React.Component Props -component = React.component { displayName: "ToggleButton", initialState, receiveProps, render } - where - initialState = - { on: false - } - - receiveProps _ = - pure unit - - render { props, state, setState } = - R.button - { onClick: Events.handler_ do - setState \s -> s { on = not s.on } - , children: - [ R.text props.label - , R.text if state.on - then " On" - else " Off" - ] - } +data Action + = Toggle + +type State = + { on :: Boolean + } + +initialState :: State +initialState = + { on: false + } + +update :: Update Props State Action +update self = case _ of + Toggle -> Update self.state { on = not self.state.on } + +render :: Props -> JSX +render = make component initialState update \self -> + R.button + { onClick: Events.handler_ do self.send Toggle + , children: + [ R.text self.props.label + , R.text if self.state.on + then " On" + else " Off" + ] + } + +component :: Component Props State Action +component = createComponent "ToggleButton" diff --git a/examples/controlled-input/src/ControlledInput.purs b/examples/controlled-input/src/ControlledInput.purs index 509c746..88c9f72 100644 --- a/examples/controlled-input/src/ControlledInput.purs +++ b/examples/controlled-input/src/ControlledInput.purs @@ -3,34 +3,47 @@ module ControlledInput where import Prelude import Data.Maybe (Maybe(..), fromMaybe, maybe) +import React.Basic (JSX, Update, Component, StateUpdate(..), make, createComponent) import React.Basic as React import React.Basic.DOM as R import React.Basic.DOM.Events (preventDefault, targetValue, timeStamp) import React.Basic.Events as Events -component :: React.Component {} -component = React.component { displayName: "ControlledInput", initialState, receiveProps, render } - where - initialState = - { value: "hello world" - , timeStamp: Nothing - } - - receiveProps _ = - pure unit - - render { state, setState } = - React.fragment - [ R.input - { onChange: - Events.handler - (preventDefault >>> Events.merge { targetValue, timeStamp }) - \{ timeStamp, targetValue } -> - setState _ { value = fromMaybe "" targetValue - , timeStamp = Just timeStamp - } - , value: state.value - } - , R.p_ [ R.text ("Current value = " <> show state.value) ] - , R.p_ [ R.text ("Changed at = " <> maybe "never" show state.timeStamp) ] - ] +type Props = {} + +type State = + { value :: String + , timestamp :: Maybe Number + } + +initialState :: State +initialState = + { value: "hello world" + , timestamp: Nothing + } + +data Action + = ValueChanged String Number + +update :: Update Props State Action +update self = case _ of + ValueChanged value timestamp -> + Update self.state { value = value, timestamp = Just timestamp } + +render :: Props -> JSX +render = make component initialState update \{ props, state, send } -> + React.fragment + [ R.input + { onChange: + Events.handler + (preventDefault >>> Events.merge { targetValue, timeStamp }) + \{ timeStamp, targetValue } -> + send $ ValueChanged (fromMaybe "" targetValue) timeStamp + , value: state.value + } + , R.p_ [ R.text ("Current value = " <> show state.value) ] + , R.p_ [ R.text ("Changed at = " <> maybe "never" show state.timestamp) ] + ] + +component :: Component Props State Action +component = createComponent "ControlledInput" diff --git a/examples/controlled-input/src/Main.purs b/examples/controlled-input/src/Main.purs index 69cc4b8..bd1668d 100644 --- a/examples/controlled-input/src/Main.purs +++ b/examples/controlled-input/src/Main.purs @@ -6,7 +6,6 @@ import ControlledInput as ControlledInput import Data.Maybe (Maybe(..)) import Effect (Effect) import Effect.Exception (throw) -import React.Basic (element) import React.Basic.DOM (render) import Web.DOM.NonElementParentNode (getElementById) import Web.HTML (window) @@ -19,5 +18,5 @@ main = do case container of Nothing -> throw "Container element not found." Just c -> - let app = element ControlledInput.component {} + let app = ControlledInput.render {} in render app c diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index cc49f94..bd6ccd8 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -2,31 +2,36 @@ module Counter where import Prelude -import React.Basic as React +import React.Basic (JSX, Update, Component, StateUpdate(..), make, createComponent) import React.Basic.DOM as R import React.Basic.Events as Events --- The props for the component type Props = { label :: String } --- Create a component by passing a record to the `react` function. --- The `render` function takes the props and current state, as well as a --- state update callback, and produces a document. -component :: React.Component Props -component = React.component { displayName: "Counter", initialState, receiveProps, render } - where - initialState = - { counter: 0 - } - - receiveProps _ = - pure unit - - render { props, state, setState } = - R.button - { onClick: Events.handler_ do - setState \s -> s { counter = s.counter + 1 } - , children: [ R.text (props.label <> ": " <> show state.counter) ] - } +data Action + = Increment + +type State = + { counter :: Int + } + +initialState :: State +initialState = + { counter: 0 + } + +update :: Update Props State Action +update self = case _ of + Increment -> Update self.state { counter = self.state.counter + 1 } + +render :: Props -> JSX +render = make component initialState update \self -> + R.button + { onClick: Events.handler_ do self.send Increment + , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] + } + +component :: Component Props State Action +component = createComponent "Counter" diff --git a/examples/counter/src/Main.purs b/examples/counter/src/Main.purs index 901a9d1..e73a2c0 100644 --- a/examples/counter/src/Main.purs +++ b/examples/counter/src/Main.purs @@ -6,18 +6,22 @@ import Counter as Counter import Data.Maybe (Maybe(..)) import Effect (Effect) import Effect.Exception (throw) -import React.Basic (element) import React.Basic.DOM (render) import Web.DOM.NonElementParentNode (getElementById) import Web.HTML (window) import Web.HTML.HTMLDocument (toNonElementParentNode) import Web.HTML.Window (document) +-- dummy :: Component +-- dummy = stateless { displayName: "dummy", render } +-- where +-- render _ = + main :: Effect Unit main = do container <- getElementById "container" =<< (map toNonElementParentNode $ document =<< window) case container of Nothing -> throw "Container element not found." Just c -> - let app = element Counter.component { label: "Increment" } + let app = Counter.render { label: "Increment" } in render app c diff --git a/generated-docs/React/Basic/Types.md b/generated-docs/React/Basic/Types.md new file mode 100644 index 0000000..4a94906 --- /dev/null +++ b/generated-docs/React/Basic/Types.md @@ -0,0 +1,60 @@ +## Module React.Basic.Types + +#### `JSX` + +``` purescript +data JSX :: Type +``` + +A virtual DOM element. + +#### `ReactComponent` + +``` purescript +data ReactComponent :: Type -> Type +``` + +A React component which can be used from JavaScript. + +#### `ReactFX` + +``` purescript +data ReactFX :: Effect +``` + +A placeholder effect for all React FFI. + +#### `DOMNode` + +``` purescript +data DOMNode :: Type +``` + +An _actual_ DOM node (not a virtual DOM element!) + +#### `CSS` + +``` purescript +data CSS :: Type +``` + +An abstract type representing records of CSS attributes. + +#### `SyntheticEvent` + +``` purescript +type SyntheticEvent = { bubbles :: Boolean, cancelable :: Boolean, currentTarget :: DOMNode, defaultPrevented :: Boolean, eventPhase :: Number, isTrusted :: Boolean, target :: DOMNode, timeStamp :: Number, "type" :: String } +``` + +Event data that we receive from React. + +#### `EventHandler` + +``` purescript +type EventHandler = EffFn1 (react :: ReactFX) SyntheticEvent Unit +``` + +An event handler, which receives a `SyntheticEvent` and performs some +effects in return. + + diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index b969c5f..0000000 --- a/package-lock.json +++ /dev/null @@ -1,4344 +0,0 @@ -{ - "name": "purescript-react-basic", - "version": "0.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "JSONStream": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz", - "integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, - "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, - "acorn-node": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.5.2.tgz", - "integrity": "sha512-krFKvw/d1F17AN3XZbybIUzEY4YEPNiGo05AfP3dBlfVKrMHETKpgjpuZkSF8qDNt9UkQcqj7am8yJLseklCMg==", - "dev": true, - "requires": { - "acorn": "^5.7.1", - "acorn-dynamic-import": "^3.0.0", - "xtend": "^4.0.1" - } - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "app-cache-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/app-cache-dir/-/app-cache-dir-0.3.0.tgz", - "integrity": "sha512-VBd9owDbwIj3cKvt87ji+OGhz+6zgA0qj9OkDhErAJyxX5G0CrHKmxHVKCWbglbLnaKoivKGpq+v2tWzlOeXOQ==", - "dev": true, - "requires": { - "inspect-with-kind": "^1.0.2" - } - }, - "append-type": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/append-type/-/append-type-1.0.1.tgz", - "integrity": "sha512-ro+W6UHJuoA2NXqKHug9bmXDbPB3eCALjcJOsYjgI9cz9cjLFthvincBCWjk25VFzJmIUHd8saOWZZBuMycXrg==", - "dev": true - }, - "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "bower": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.4.tgz", - "integrity": "sha1-54dqB23rgTf30GUl3F6MZtuC8oo=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - } - }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, - "browserify": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-13.3.0.tgz", - "integrity": "sha1-tanJAgJD8McORnW+yCI7xifkFc4=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^1.11.0", - "browserify-zlib": "~0.1.2", - "buffer": "^4.1.0", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.5.1", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.0", - "domain-browser": "~1.1.0", - "duplexer2": "~0.1.2", - "events": "~1.1.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "~0.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.0.0", - "labeled-stream-splicer": "^2.0.0", - "module-deps": "^4.0.8", - "os-browserify": "~0.1.1", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^2.0.0", - "stream-http": "^2.0.0", - "string_decoder": "~0.10.0", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "~0.0.0", - "url": "~0.11.0", - "util": "~0.10.1", - "vm-browserify": "~0.0.1", - "xtend": "^4.0.0" - }, - "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - } - } - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - } - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cache-api": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/browserify-cache-api/-/browserify-cache-api-3.0.1.tgz", - "integrity": "sha1-liR+hT8Gj9bg1FzHPwuyzZd47wI=", - "dev": true, - "requires": { - "async": "^1.5.2", - "through2": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", - "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "browserify-incremental": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/browserify-incremental/-/browserify-incremental-3.1.1.tgz", - "integrity": "sha1-BxPLdYckemMqnwjPG9FpuHi2Koo=", - "dev": true, - "requires": { - "JSONStream": "^0.10.0", - "browserify-cache-api": "^3.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "JSONStream": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.10.0.tgz", - "integrity": "sha1-dDSdDYlSK3HzDwoD/5vSDKbxKsA=", - "dev": true, - "requires": { - "jsonparse": "0.0.5", - "through": ">=2.2.7 <3" - } - }, - "jsonparse": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", - "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=", - "dev": true - } - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, - "requires": { - "pako": "~0.2.0" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "build-purescript": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/build-purescript/-/build-purescript-0.2.3.tgz", - "integrity": "sha512-oIBeOxbEHG8don4jqxCMhZxoXCqk21jIqN+a9U/8jiiwYOAS6KcssxcTklhE+LzEIsBx/hh8cObQ5Lupos/mVw==", - "dev": true, - "requires": { - "download-purescript-source": "^0.4.0", - "feint": "^1.0.2", - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "once": "^1.4.0", - "rimraf": "^2.6.2", - "spawn-stack": "^0.5.0", - "zen-observable": "^0.6.1" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - } - } - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "byline": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", - "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cached-path-relative": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", - "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", - "dev": true - }, - "cancelable-pump": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.2.0.tgz", - "integrity": "sha1-hlZl1MI6aXiNS830mNt0DxsjDVc=", - "dev": true, - "requires": { - "pump": "^1.0.2" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-stack": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", - "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "colors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.0.tgz", - "integrity": "sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw==", - "dev": true - }, - "combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", - "dev": true, - "requires": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "deps-sort": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", - "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - } - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "dev": true, - "requires": { - "acorn": "^5.2.1", - "defined": "^1.0.0" - } - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dl-tar": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/dl-tar/-/dl-tar-0.6.0.tgz", - "integrity": "sha512-bh6sKubl/RzCNC6v6PEim13GDA0D0OEq8j1yqORFQrVnH8C1aaP2xb4BSRP8VxFPKYVvAi4zzDEBMr72z2M9Wg==", - "dev": true, - "requires": { - "cancelable-pump": "^0.2.0", - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "is-stream": "^1.1.0", - "load-request-from-cwd-or-npm": "^2.0.1", - "tar-fs": "^1.16.0", - "tar-stream": "^1.5.5", - "zen-observable": "^0.6.1" - } - }, - "dl-tgz": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/dl-tgz/-/dl-tgz-0.6.0.tgz", - "integrity": "sha512-pkf0P6EwWfVmpbFTvgfrWOh9JvrCwW/bnx2i+M9ffKfKCP20B/3ZHRL/jGXL8nuZ+TQcI/rsasx1fzjf+expmQ==", - "dev": true, - "requires": { - "dl-tar": "^0.6.0", - "is-plain-obj": "^1.1.0", - "zen-observable": "^0.6.1" - } - }, - "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", - "dev": true - }, - "download-or-build-purescript": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/download-or-build-purescript/-/download-or-build-purescript-0.0.9.tgz", - "integrity": "sha512-1SOq5zLZd2Nh1bmyQUhMlmZoUxuUMYYTHcyU8kR2Y9nRRiuogEWQcD2+SiJfEl5S6Ap+S4x2hVNP3bbQp0/80g==", - "dev": true, - "requires": { - "build-purescript": "^0.2.0", - "download-purescript": "0.5.0-0", - "execa": "^0.10.0", - "feint": "^1.0.2", - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "once": "^1.4.0", - "prepare-write": "^0.3.1", - "spawn-stack": "^0.5.0", - "which": "^1.3.0", - "zen-observable": "^0.6.0" - }, - "dependencies": { - "prepare-write": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/prepare-write/-/prepare-write-0.3.1.tgz", - "integrity": "sha512-p4NqFH9qi2Qjkh8OxdUSbF32+OVp6j/Vu/RQC/v0Yar5nWdmLQvDm+uEjy9Z8c+HgqC0tS0eZRLHnn+AWAk3Hg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.2", - "is-dir": "^1.0.0", - "mkdirp": "^0.5.1" - } - } - } - }, - "download-purescript": { - "version": "0.5.0-0", - "resolved": "https://registry.npmjs.org/download-purescript/-/download-purescript-0.5.0-0.tgz", - "integrity": "sha512-oBjNPPBBB/zcsIvn9VUgL+YnT9E3dSszwISKmPxU4ehIkAisysrII8pvQAoQRxSikppJhmajo/VYEpa5LD0whQ==", - "dev": true, - "requires": { - "dl-tgz": "^0.6.0", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "zen-observable": "^0.6.1" - } - }, - "download-purescript-source": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/download-purescript-source/-/download-purescript-source-0.4.0.tgz", - "integrity": "sha512-Y+5VqajGu9uv63XbY7R27UZGplqxQkyYMg52nSBHQMOyML/2TIm4HmP3trTSM2lxFR4yCeKGQgPas35OERCFWg==", - "dev": true, - "requires": { - "dl-tgz": "^0.6.0", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "zen-observable": "^0.6.1" - } - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "feint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/feint/-/feint-1.0.2.tgz", - "integrity": "sha512-PC77rn63FAMGcmHEkuGh4AdofqI6/c/YGjyvLo60mGLcCOHUUzCnKFzoij062piVgBblkl/KlN1vHGVJsK88cg==", - "dev": true, - "requires": { - "append-type": "^1.0.1" - } - }, - "file-to-tar": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/file-to-tar/-/file-to-tar-0.3.1.tgz", - "integrity": "sha512-bFYkxQR2weH7Bgdj6Dxuo+0rRZagcqY0uuu2CcXUdrOp8TFfkGYEdHy3uSqLiwhkXCcFFDk0584bdIyyEvJKBA==", - "dev": true, - "requires": { - "cancelable-pump": "^0.4.0", - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "is-stream": "^1.1.0", - "mkdirp": "^0.5.1", - "tar-fs": "^1.16.2", - "zen-observable": "^0.6.1" - }, - "dependencies": { - "cancelable-pump": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.4.0.tgz", - "integrity": "sha512-7Yvp8ADC9exD0Kdq/Q35UD5wOiuXTTLp159gFHC+uMQvjRMllrsM6EUKnozmIe43yesLBiH/ni0KD69k07yzZQ==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz", - "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true - }, - "https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", - "dev": true - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", - "dev": true, - "requires": { - "source-map": "~0.5.3" - } - }, - "insert-module-globals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", - "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - } - }, - "inspect-with-kind": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/inspect-with-kind/-/inspect-with-kind-1.0.4.tgz", - "integrity": "sha512-KN8VFSf62Ig4hyXtXODkWF6PIatrCIJF32KY8tQUwwLtgfNsr+3ZIpd+epM+pRbC86nJZycBPjWwziDvn/+6YQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "install-purescript": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/install-purescript/-/install-purescript-0.4.0.tgz", - "integrity": "sha512-hXfy12CP/aSCxEhx75kA2jTsbUrkQYFwbolNIrFcFVaiSYc3GpEcAsLqSuijzMCtfxAq+2S6Uw5o6QrVVNVpwQ==", - "dev": true, - "requires": { - "app-cache-dir": "^0.3.0", - "arch": "^2.1.0", - "download-or-build-purescript": "^0.0.9", - "execa": "^0.10.0", - "feint": "1.0.2", - "file-to-tar": "^0.3.1", - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "once": "^1.4.0", - "prepare-write": "^1.0.0", - "readdir-clean": "^1.0.0", - "rimraf": "^2.6.2", - "tar-to-file": "^0.4.0", - "tilde-path": "^2.0.0", - "truncated-list": "^1.0.1", - "zen-observable": "^0.6.1" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - } - } - }, - "install-purescript-cli": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/install-purescript-cli/-/install-purescript-cli-0.3.0.tgz", - "integrity": "sha512-fxxJ2nnKfDHli530XVz7w5bd5I7UKODtVjMLJuvpOHPSqPfHgOPqHat2vjPTqaW5B4sHt3NYGopvt/fYPfwl2A==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "install-purescript": "^0.4.0", - "log-symbols": "^2.2.0", - "log-update": "^2.3.0", - "minimist": "^1.2.0", - "ms": "^2.1.1", - "neat-frame": "^1.0.1", - "neat-stack": "^1.0.0", - "once": "^1.4.0", - "platform-name": "^1.0.0", - "size-rate": "^0.1.0", - "tilde-path": "^2.0.0", - "tty-truncate": "^1.0.0", - "vertical-meter": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-dir/-/is-dir-1.0.0.tgz", - "integrity": "sha1-QdN/SV/MrMBaR3jWboMCTCkro/8=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "junk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/junk/-/junk-2.1.0.tgz", - "integrity": "sha1-9DG0t/By3FAKXxDOf07HGTDnATQ=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "labeled-stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", - "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "isarray": "^2.0.4", - "stream-splicer": "^2.0.0" - }, - "dependencies": { - "isarray": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", - "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", - "dev": true - } - } - }, - "load-from-cwd-or-npm": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/load-from-cwd-or-npm/-/load-from-cwd-or-npm-2.2.2.tgz", - "integrity": "sha512-Ox0Cl1RfKMKrwqhBqYADWeFspY28bhlaJVe08GJqYtVYoE0kyAnWBOnw3V/+HDoeWb7o33X/ZUcvamIlJ4O4Gg==", - "dev": true, - "requires": { - "inspect-with-kind": "^1.0.4", - "npm-cli-dir": "^2.0.1", - "optional": "^0.1.4", - "resolve-from-npm": "^2.0.4" - } - }, - "load-request-from-cwd-or-npm": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/load-request-from-cwd-or-npm/-/load-request-from-cwd-or-npm-2.0.1.tgz", - "integrity": "sha512-RMDblVBrhyatt2KBScYzbPZrg2KGOryEdcAXIF3Jh3nqcE1awqUtJABwkPv1UrC802QFFxn/mn10m9dHN+fXrQ==", - "dev": true, - "requires": { - "load-from-cwd-or-npm": "^2.2.1" - } - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "log-update": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", - "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "cli-cursor": "^2.0.0", - "wrap-ansi": "^3.0.1" - } - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "module-deps": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", - "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.5.0", - "defined": "^1.0.0", - "detective": "^4.0.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.3", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - } - } - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - } - } - }, - "mold-source-map": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/mold-source-map/-/mold-source-map-0.4.0.tgz", - "integrity": "sha1-z2fgsxxHq5uttcnCVlGGISe7gxc=", - "dev": true, - "requires": { - "convert-source-map": "^1.1.0", - "through": "~2.2.7" - }, - "dependencies": { - "through": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz", - "integrity": "sha1-bo4hIAGR1OtqmfbwEN9Gqhxusr0=", - "dev": true - } - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "neat-frame": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/neat-frame/-/neat-frame-1.0.1.tgz", - "integrity": "sha512-4rcKecmbH5Wkk/iIzvN9E0x1OtFOLbGNIcag8z+oedZPhqWOVKZ+YOvoK6bA32Z7TbC7xhSgF2cVpiAePZCtEA==", - "dev": true, - "requires": { - "inspect-with-kind": "^1.0.4", - "string-width": "^2.1.1", - "term-size": "^1.2.0", - "wrap-ansi": "^3.0.1" - } - }, - "neat-stack": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/neat-stack/-/neat-stack-1.0.0.tgz", - "integrity": "sha512-T8/XRUmzb+trkqF3gEKFZoidbOodhXIKYvDwO0yi9cVs+6f0geF4xy/VOEX2v3ewUq+OJnpBldXUjiC7Ng+cyw==", - "dev": true, - "requires": { - "chalk": "^2.4.0", - "clean-stack": "^1.3.0" - } - }, - "neo-async": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", - "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", - "dev": true - }, - "nice-try": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", - "dev": true - }, - "node-static": { - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/node-static/-/node-static-0.7.10.tgz", - "integrity": "sha512-bd7zO5hvCWzdglgwz9t82T4mYTEUzEG5pXnSqEzitvmEacusbhl8/VwuCbMaYR9g2PNK5191yBtAEQLJEmQh1A==", - "dev": true, - "requires": { - "colors": ">=0.6.0", - "mime": "^1.2.9", - "optimist": ">=0.3.4" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-cli-dir": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-cli-dir/-/npm-cli-dir-2.0.2.tgz", - "integrity": "sha512-ibO7mB5Na7yv4fFTi39y3dKeK0D51ttyldqqOZKR9GU0Qwr0FFycQhXIliwqzNCVRkNi/iTG0D9WIVt7pP+vGQ==", - "dev": true, - "requires": { - "npm-cli-path": "^2.0.1" - } - }, - "npm-cli-path": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/npm-cli-path/-/npm-cli-path-2.0.3.tgz", - "integrity": "sha512-DX+QTbHxnUIY6trC0y6JtBsPMqsMAgHbvLABwhtBjIKKy+6sg7Bq41tbWxtRT6t3yxigIePWXzKy+t285Tv56w==", - "dev": true, - "requires": { - "real-executable-path": "^2.0.2", - "win-user-installed-npm-cli-path": "^2.0.2" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, - "optional": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", - "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==", - "dev": true - }, - "os-browserify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", - "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "requires": { - "path-platform": "~0.11.15" - } - }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true - }, - "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "platform-name": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/platform-name/-/platform-name-1.0.0.tgz", - "integrity": "sha512-ZRbqJ30uRRKGKW2O1XnG/Ls1K/aBGlnyjq1Z0BbjqDPTNN+XZKFaugCsCm3/mq6XGR5DZNVdV75afpQEvNNY3Q==", - "dev": true, - "requires": { - "inspect-with-kind": "^1.0.4" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "prepare-write": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prepare-write/-/prepare-write-1.0.0.tgz", - "integrity": "sha512-p3OWhGbr3136RlcX5hRY1ohxUV0PoP0Xy1hAbHo2U1LA6IMJYeu9t9AqBI/08iMh2F+4zzH5aVxKgqoTh/45ig==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.4", - "is-dir": "^1.0.0", - "mkdirp": "^0.5.1" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "pulp": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/pulp/-/pulp-12.3.0.tgz", - "integrity": "sha512-Sm1XQg2h2JBVHWK3bxSHnmMdMoM0hEi5cbGfBBLpM6E2qU1vjJhDJsO/8bEkxC2RvNAAEOWROKMI3tTzmVxLbQ==", - "dev": true, - "requires": { - "browserify": "^13.1.0", - "browserify-incremental": "^3.0.1", - "concat-stream": "^1.4.6", - "glob": "^7.1.1", - "minimatch": "^3.0.3", - "mold-source-map": "^0.4.0", - "node-static": "^0.7.9", - "read": "^1.0.7", - "sorcery": "^0.10.0", - "string-stream": "0.0.7", - "temp": "^0.8.1", - "through": "^2.3.8", - "tree-kill": "^1.0.0", - "watchpack": "^1.0.1", - "which": "^1.2.1", - "wordwrap": "1.0.0" - } - }, - "pump": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", - "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "purescript": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/purescript/-/purescript-0.12.0.tgz", - "integrity": "sha512-q9kYKqjcukY3/4xdu3wk13Qs6po3NQR1QLGTmyVgqjKpz8l7coZCAx5Ajpi3u2Qla7eXurgD3mWFo0iMOUzUUA==", - "dev": true, - "requires": { - "install-purescript-cli": "^0.4.0 || ^0.3.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "rate-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rate-map/-/rate-map-1.0.1.tgz", - "integrity": "sha512-7Y7PeDrzR/hA3QP//S3Kt/8v9zyjwSzWeFPbMEtqwLg8jyUNgmh039NyNKguR9e9ixAhmDB7yuz9kZxlujuQ7Q==", - "dev": true, - "requires": { - "append-type": "^1.0.1" - } - }, - "read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", - "dev": true, - "requires": { - "mute-stream": "~0.0.4" - } - }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "readdir-clean": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/readdir-clean/-/readdir-clean-1.0.0.tgz", - "integrity": "sha512-9+/foOFyAlmXdMLIsrSm/aoBxnSQ+8fruH814Z3hm5xlwfKYP35qhdJH05KYSSd0RUw9cPEKqvgKdGNjn88aYg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "junk": "^2.1.0" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "real-executable-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/real-executable-path/-/real-executable-path-2.0.2.tgz", - "integrity": "sha512-fRv44zvrzFeItoj/f/SNBqO/VWUHSZeqQ28oPOzd6weXaiRG6OVGu7UrHe6pY8JlXeoe/7gWYv6kOFHmHk4EFw==", - "dev": true, - "requires": { - "real-executable-path-callback": "^2.1.2" - } - }, - "real-executable-path-callback": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/real-executable-path-callback/-/real-executable-path-callback-2.1.2.tgz", - "integrity": "sha512-dyOgKEhLKNg9tgFPs354X5fQpaAsUT+3dTO3JYoNLdPhMmRDjwwre6zHw58biFMVeFx9yxwI6MC7iMDfxSuMJA==", - "dev": true, - "requires": { - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "which": "^1.3.0" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve-from-npm": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/resolve-from-npm/-/resolve-from-npm-2.0.4.tgz", - "integrity": "sha512-JrwN+SRILVjq/mdPNd6bhoOvYMBFf0CYqvfAgaDGB9dWjyr3XDAe40O2WcxToYWMmbQabM4FM6hHVLcSxBPKOQ==", - "dev": true, - "requires": { - "inspect-with-kind": "^1.0.3", - "npm-cli-dir": "^2.0.2", - "resolve-from": "^4.0.0" - } - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "sander": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", - "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", - "dev": true, - "requires": { - "es6-promise": "^3.1.2", - "graceful-fs": "^4.1.3", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.2" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "requires": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "dev": true - }, - "size-rate": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/size-rate/-/size-rate-0.1.0.tgz", - "integrity": "sha512-Yinx2XAfbhJu+Pxz1TD3xFT6nPB54+wyRd4u82Kq+ZqzOtaODYS5/7QJtlOcRxJLUvNXMzJKGvJ/O1KyN/9+hQ==", - "dev": true, - "requires": { - "filesize": "^3.5.10", - "inspect-with-kind": "^1.0.2" - } - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sorcery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", - "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", - "dev": true, - "requires": { - "buffer-crc32": "^0.2.5", - "minimist": "^1.2.0", - "sander": "^0.5.0", - "sourcemap-codec": "^1.3.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sourcemap-codec": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", - "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==", - "dev": true - }, - "spawn-stack": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/spawn-stack/-/spawn-stack-0.5.0.tgz", - "integrity": "sha512-suwvBV2WNTOYe/TQBoAFrGbdRvo5t/pWYq/vNw24wbSmIJXr/eaadsF+92VyPm2dBYsYwBnsTLhQFCo3EdCA+Q==", - "dev": true, - "requires": { - "byline": "^5.0.0", - "execa": "^0.10.0", - "inspect-with-kind": "^1.0.4", - "zen-observable": "^0.6.1" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "requires": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "string-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/string-stream/-/string-stream-0.0.7.tgz", - "integrity": "sha1-z83oJ5n6YvMDQpqqeTNu6INDMv4=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "requires": { - "acorn-node": "^1.2.0" - } - }, - "tar-fs": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.2.tgz", - "integrity": "sha512-LdknWjPEiZC1nOBwhv0JBzfJBGPJar08dZg2rwZe0ZTLQoRGEzgrl7vF3qUEkCHpI/wN9e7RyCuDhMsJUCLPPQ==", - "dev": true, - "requires": { - "chownr": "^1.0.1", - "mkdirp": "^0.5.1", - "pump": "^1.0.0", - "tar-stream": "^1.1.2" - } - }, - "tar-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", - "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", - "dev": true, - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.1.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.0", - "xtend": "^4.0.0" - } - }, - "tar-to-file": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/tar-to-file/-/tar-to-file-0.4.0.tgz", - "integrity": "sha512-DFRBSotqmgeMrU/H7z0VIMPv8taOheRUlAhi6Q+r5Xso9xoa5vez/Z3uvASSzuT1dwe2orAdENT7NXlAh1zwvA==", - "dev": true, - "requires": { - "cancelable-pump": "^0.4.0", - "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.4", - "is-plain-obj": "^1.1.0", - "is-stream": "^1.1.0", - "tar-fs": "^1.16.2", - "tar-stream": "^1.6.1", - "zen-observable": "^0.6.1" - }, - "dependencies": { - "cancelable-pump": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.4.0.tgz", - "integrity": "sha512-7Yvp8ADC9exD0Kdq/Q35UD5wOiuXTTLp159gFHC+uMQvjRMllrsM6EUKnozmIe43yesLBiH/ni0KD69k07yzZQ==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "temp": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", - "dev": true, - "requires": { - "os-tmpdir": "^1.0.0", - "rimraf": "~2.2.6" - }, - "dependencies": { - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true - } - } - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - } - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "tilde-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tilde-path/-/tilde-path-2.0.0.tgz", - "integrity": "sha512-3aDt7b/wBbxJjUTMiCW+uu7iqrB6F1DfxSL0qB4biSrP1+knIPveccs7thL34AkzPZ/0T7+oYXZDKiokMc1d6g==", - "dev": true - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "requires": { - "process": "~0.11.0" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", - "dev": true - }, - "truncated-list": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/truncated-list/-/truncated-list-1.0.1.tgz", - "integrity": "sha512-aNcDZ1PfxAtUXXLEmy+m1D465lFv0VgWltGlTWuJuhPh+FGeOiHV9S2DYOD8IEgZU8yOInZBRHVcAts+xIYzew==", - "dev": true, - "requires": { - "inspect-with-kind": "^1.0.4" - } - }, - "tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, - "tty-truncate": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tty-truncate/-/tty-truncate-1.0.0.tgz", - "integrity": "sha512-pUnGE8KQJl/aGOkPtAPXcKnJRPNBzn/c+9gWFPtGPtayGUp0luLyM3RST10g5UbybJAWlHUuYjIO4NXsilg6nA==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0", - "inspect-with-kind": "^1.0.4", - "slice-ansi": "^1.0.0", - "string-width": "^2.1.1" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true - }, - "undeclared-identifiers": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", - "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", - "dev": true, - "requires": { - "acorn-node": "^1.3.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - } - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "vertical-meter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vertical-meter/-/vertical-meter-1.0.0.tgz", - "integrity": "sha512-xvtone0DHRBrWSBVF2p3+/KSz/mzHvDZ7+HYB3g68hBpqIC3tIF8J1maf5osHPKHB/45iq2B+T4ju/mfxArd/Q==", - "dev": true, - "requires": { - "rate-map": "^1.0.1" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "win-user-installed-npm-cli-path": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/win-user-installed-npm-cli-path/-/win-user-installed-npm-cli-path-2.0.4.tgz", - "integrity": "sha512-i+fSInL3Li47P9gGcJabtgvl2+hLmZwMsh4664WWuI1F/pQPtv4XerrOyg8poxvDv4o/QwB60f20MKtIX/CCxQ==", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", - "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "zen-observable": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.6.1.tgz", - "integrity": "sha512-DKjFTL7siVLIUMZOFZ0alqMEdTsXPUxoCZzrvB2tdWEVN/6606Qh1nCfSTCAOZMrtcPzzFI3BXmwBKLAew52NA==", - "dev": true - } - } -} diff --git a/src/React/Basic.js b/src/React/Basic.js index 28ddad3..279d7a4 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -3,60 +3,119 @@ var React = require("react"); var Fragment = React.Fragment || "div"; -exports.component_ = function(spec) { - var Component = function constructor() { - this.state = spec.initialState; - this._setState = this.setState.bind(this); +exports.voidState = {}; + +exports.createComponent = function(displayName) { + function contextToSelf(instance) { + var self = { + props: instance.props.$$props, + state: instance.state === undefined ? undefined : instance.state.$$state, + readProps: function() { + return self.instance_.props.$$props; + }, + readState: function() { + var state = self.instance_.state; + return state !== undefined && state.$$state; + }, + send: function(action) { + return function() { + var updates = self.instance_.$$spec.buildStateUpdate( + self.instance_.$$spec.update(self)(action) + ); + if (updates.state !== null) { + self.instance_.setState( + { $$state: updates.state }, + updates.effects !== null + ? function() { + updates.effects(contextToSelf(this)); + } + : undefined + ); + } else if (updates.effects !== null) { + updates.effects(self); + } + }; + }, + instance_: instance + }; + return self; + } + + var Component = function constructor(props) { + this.$$spec = props.$$spec; + this.state = + // React may optimize components with no state, + // so we leave state undefined if it was initialized + // as Void. + this.$$spec.initialState === exports.voidState + ? undefined + : { $$state: this.$$spec.initialState }; return this; }; - Component.prototype = Object.create(React.PureComponent.prototype); + Component.prototype = Object.create(React.Component.prototype); - Component.displayName = spec.displayName; - - Component.prototype.componentDidMount = function componentDidMount() { - spec.receiveProps({ - isFirstMount: true, - props: this.props, - state: this.state, - setState: this._setState, - setStateThen: this._setState, - instance_: this - }); - }; + Component.displayName = displayName; - Component.prototype.componentDidUpdate = function componentDidUpdate() { - spec.receiveProps({ - isFirstMount: false, - props: this.props, - state: this.state, - setState: this._setState, - setStateThen: this._setState, - instance_: this - }); + Component.prototype.shouldComponentUpdate = function shouldComponentUpdate( + nextProps, + nextState + ) { + return ( + !this.$$spec.eqProps(this.props.$$props)(nextProps.$$props) || + (this.state !== undefined && + !this.$$spec.eqState(this.state.$$state)(nextState.$$state)) + ); }; Component.prototype.render = function render() { - return spec.render({ - props: this.props, - state: this.state, - setState: this._setState, - setStateThen: this._setState, - instance_: this - }); + return this.$$spec.render(contextToSelf(this)); }; return Component; }; -exports.element_ = function(el, attrs) { +exports.make_ = function( + buildStateUpdate, + eqProps, + eqState, + component, + initialState, + update, + render, + $$props +) { + var props = { + $$props: $$props, + $$spec: { + buildStateUpdate: buildStateUpdate, + eqProps: eqProps, + eqState: eqState, + initialState: initialState, + update: update, + render: render + } + }; return React.createElement.apply( null, - [el, attrs].concat((attrs && attrs.children) || []) + [component, props].concat(($$props && $$props.children) || null) ); }; -exports.elementKeyed_ = exports.element_; +exports.keyed_ = function(key, child) { + return React.createElement(Fragment, { key: key }, child); +}; + +exports.element_ = function(component, props) { + return React.createElement.apply( + null, + [component, props].concat((props && props.children) || null) + ); +}; + +exports.elementKeyed_ = function(key, child) { + return React.createElement.call(null, Fragment, { key: key }, child); +}; exports.fragment = function(children) { return React.createElement.apply(null, [Fragment, {}].concat(children)); diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 2438ccd..5c7efa7 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -1,21 +1,10 @@ -module React.Basic - ( Component - , ComponentInstance - , JSX - , component - , stateless - , element - , elementKeyed - , empty - , fragment - , fragmentKeyed - ) where +module React.Basic where import Prelude -import Data.Function.Uncurried (Fn1, Fn2, mkFn1, runFn2) +import Data.Function.Uncurried (Fn1, Fn2, Fn8, runFn2, runFn8) +import Data.Nullable (Nullable, notNull, null) import Effect (Effect) -import Effect.Uncurried (EffectFn1, EffectFn2, mkEffectFn1, runEffectFn1, runEffectFn2) import Unsafe.Coerce (unsafeCoerce) -- | A virtual DOM element. @@ -27,108 +16,105 @@ instance semigroupJSX :: Semigroup JSX where instance monoidJSX :: Monoid JSX where mempty = empty --- | A React component which can be used from JavaScript. -foreign import data Component :: Type -> Type +data Component props state action --- | Create a React component from a _specification_ of that component. --- | --- | A _specification_ consists of a state type, an initial value for that state, --- | a function to apply incoming props to the internal state, and a rendering --- | function which takes props, state and a state update function. --- | --- | The rendering function should return a value of type `JSX`, which can be --- | constructed using the helper functions provided by the `React.Basic.DOM` --- | module. --- | --- | Note: This function relies on `React.PureComponent` internally -component - :: forall props state - . { displayName :: String - , initialState :: { | state } - , receiveProps :: - { isFirstMount :: Boolean - , props :: { | props } - , state :: { | state } - , setState :: SetState state - , setStateThen :: SetStateThen state - , instance_ :: ComponentInstance - } - -> Effect Unit - , render :: - { props :: { | props } - , state :: { | state } - , setState :: SetState state - , setStateThen :: SetStateThen state - , instance_ :: ComponentInstance - } - -> JSX - } - -> Component { | props } -component { displayName, initialState, receiveProps, render } = - component_ - { displayName - , initialState - , receiveProps: mkEffectFn1 \this -> receiveProps - { isFirstMount: this.isFirstMount - , props: this.props - , state: this.state - , setState: runEffectFn1 this.setState - , setStateThen: \update cb -> runEffectFn2 this.setStateThen update (mkEffectFn1 cb) - , instance_: this.instance_ - } - , render: mkFn1 \this -> render - { props: this.props - , state: this.state - , setState: runEffectFn1 this.setState - , setStateThen: \update cb -> runEffectFn2 this.setStateThen update (mkEffectFn1 cb) - , instance_: this.instance_ - } - } - --- | Create a stateless React component. --- | --- | Removes a little bit of the `react` function's boilerplate when creating --- | components which don't use state. -stateless - :: forall props - . { displayName :: String - , render :: { | props } -> JSX - } - -> Component { | props } -stateless { displayName, render } = - component - { displayName - , initialState: {} - , receiveProps: \_ -> pure unit - , render: \this -> render this.props - } +type StatelessComponent props = Component props Void Void --- | SetState uses an update function to modify the current state. -type SetState state = ({ | state } -> { | state }) -> Effect Unit +type Update props state action + = Self props state action + -> action + -> StateUpdate props state action --- | SetState uses an update function to modify the current state and a --- | callback to invoke once the resulting rerender has been completely applied. -type SetStateThen state = ({ | state } -> { | state }) -> ({ | state } -> Effect Unit) -> Effect Unit +data StateUpdate props state action + = NoUpdate + | Update state + | SideEffects (Self props state action -> Effect Unit) + | UpdateAndSideEffects state (Self props state action -> Effect Unit) --- | Represents the mounted component instance, or "this" in vanilla React. -foreign import data ComponentInstance :: Type +buildStateUpdate + :: forall props state action + . StateUpdate props state action + -> { state :: Nullable state + , effects :: Nullable (Self props state action -> Effect Unit) + } +buildStateUpdate = case _ of + NoUpdate -> + { state: null + , effects: null + } + Update state -> + { state: notNull state + , effects: null + } + SideEffects effects -> + { state: null + , effects: notNull effects + } + UpdateAndSideEffects state effects -> + { state: notNull state + , effects: notNull effects + } --- | Create a `JSX` node from a React component, by providing the props. -element - :: forall props - . Component { | props } - -> { | props } +make + :: forall props state action + . Eq props + => Eq state + => Component props state action + -> state + -> (Update props state action) + -> (Self props state action -> JSX) + -> props -> JSX -element = runFn2 element_ +make = runFn8 make_ buildStateUpdate eq eq --- | Like `element`, plus a `key` for rendering components in a dynamic list. --- | For more information see: https://reactjs.org/docs/reconciliation.html#keys -elementKeyed +makeStateless :: forall props - . Component { | props } - -> { key :: String | props } + . Eq props + => Component props Void Void + -> (props -> JSX) + -> props -> JSX -elementKeyed = runFn2 elementKeyed_ +makeStateless component render = + runFn8 make_ + (\_ -> { state: null, effects: null }) + eq + (\_ _ -> true) + component + voidState + (\_ _ -> NoUpdate) + (render <<< _.props) + +-- | Represents the state of a stateless component. +foreign import voidState :: Void + +type Self props state action = + { props :: props + , state :: state + , readProps :: Effect props + , readState :: Effect state + , send :: action -> Effect Unit + } + +foreign import make_ :: forall props state action. + Fn8 + (StateUpdate props state action + -> { state :: Nullable state + , effects :: Nullable (Self props state action -> Effect Unit) + }) + (props -> props -> Boolean) + (state -> state -> Boolean) + (Component props state action) + state + (Update props state action) + (Self props state action -> JSX) + props + JSX + +data ReactComponent props + +data ReactComponentInstance + +foreign import createComponent :: forall props state action. Fn1 String (Component props state action) -- | An empty node. This is often useful when you would like to conditionally -- | show something, but you don't want to (or can't) modify the `children` prop @@ -136,6 +122,10 @@ elementKeyed = runFn2 elementKeyed_ empty :: JSX empty = unsafeCoerce false +-- | Apply a React key to a sub-tree. +keyed :: String -> JSX -> JSX +keyed = runFn2 keyed_ + -- | Render an Array of children without a wrapping component. foreign import fragment :: Array JSX -> JSX @@ -146,36 +136,23 @@ foreign import fragment :: Array JSX -> JSX fragmentKeyed :: String -> Array JSX -> JSX fragmentKeyed = runFn2 fragmentKeyed_ --- | Private FFI - -foreign import component_ - :: forall props state - . { displayName :: String - , initialState :: { | state } - , receiveProps :: - EffectFn1 - { isFirstMount :: Boolean - , props :: { | props } - , state :: { | state } - , setState :: EffectFn1 ({ | state } -> { | state }) Unit - , setStateThen :: EffectFn2 ({ | state } -> { | state }) (EffectFn1 { | state } Unit) Unit - , instance_ :: ComponentInstance - } - Unit - , render :: - Fn1 - { props :: { | props } - , state :: { | state } - , setState :: EffectFn1 ({ | state } -> { | state }) Unit - , setStateThen :: EffectFn2 ({ | state } -> { | state }) (EffectFn1 { | state } Unit) Unit - , instance_ :: ComponentInstance - } - JSX - } - -> Component { | props } +foreign import fragmentKeyed_ :: Fn2 String (Array JSX) JSX -foreign import element_ :: forall props. Fn2 (Component { | props }) { | props } JSX +foreign import keyed_ :: Fn2 String JSX JSX -foreign import elementKeyed_ :: forall props. Fn2 (Component { | props }) { key :: String | props } JSX +-- | Create a `JSX` node from a React component, by providing the props. +element + :: forall props + . ReactComponent { | props } + -> { | props } + -> JSX +element = runFn2 element_ -foreign import fragmentKeyed_ :: Fn2 String (Array JSX) JSX +-- | Like `element`, plus a `key` for rendering components in a dynamic list. +-- | For more information see: https://reactjs.org/docs/reconciliation.html#keys +elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX +elementKeyed = runFn2 elementKeyed_ + +foreign import element_ :: forall props. Fn2 (ReactComponent { | props }) { | props } JSX + +foreign import elementKeyed_ :: forall props. Fn2 (ReactComponent { | props }) { key :: String | props } JSX diff --git a/src/React/Basic/DOM.purs b/src/React/Basic/DOM.purs index fea3d84..21ee7ce 100644 --- a/src/React/Basic/DOM.purs +++ b/src/React/Basic/DOM.purs @@ -27,7 +27,7 @@ import Data.Nullable (Nullable, toMaybe) import Effect (Effect) import Effect.Exception (Error, throw, try) import Effect.Uncurried (EffectFn1, EffectFn3, runEffectFn1, runEffectFn3) -import React.Basic (ComponentInstance, JSX) +import React.Basic (ReactComponentInstance, JSX) import React.Basic.DOM.Generated (Props_a, Props_abbr, Props_address, Props_area, Props_article, Props_aside, Props_audio, Props_b, Props_base, Props_bdi, Props_bdo, Props_blockquote, Props_body, Props_br, Props_button, Props_canvas, Props_caption, Props_cite, Props_code, Props_col, Props_colgroup, Props_data, Props_datalist, Props_dd, Props_del, Props_details, Props_dfn, Props_dialog, Props_div, Props_dl, Props_dt, Props_em, Props_embed, Props_fieldset, Props_figcaption, Props_figure, Props_footer, Props_form, Props_h1, Props_h2, Props_h3, Props_h4, Props_h5, Props_h6, Props_head, Props_header, Props_hgroup, Props_hr, Props_html, Props_i, Props_iframe, Props_img, Props_input, Props_ins, Props_kbd, Props_keygen, Props_label, Props_legend, Props_li, Props_link, Props_main, Props_map, Props_mark, Props_math, Props_menu, Props_menuitem, Props_meta, Props_meter, Props_nav, Props_noscript, Props_object, Props_ol, Props_optgroup, Props_option, Props_output, Props_p, Props_param, Props_picture, Props_pre, Props_progress, Props_q, Props_rb, Props_rp, Props_rt, Props_rtc, Props_ruby, Props_s, Props_samp, Props_script, Props_section, Props_select, Props_slot, Props_small, Props_source, Props_span, Props_strong, Props_style, Props_sub, Props_summary, Props_sup, Props_svg, Props_table, Props_tbody, Props_td, Props_template, Props_textarea, Props_tfoot, Props_th, Props_thead, Props_time, Props_title, Props_tr, Props_track, Props_u, Props_ul, Props_var, Props_video, Props_wbr, a, a_, abbr, abbr_, address, address_, area, article, article_, aside, aside_, audio, audio_, b, b_, base, bdi, bdi_, bdo, bdo_, blockquote, blockquote_, body, body_, br, button, button_, canvas, canvas_, caption, caption_, cite, cite_, code, code_, col, colgroup, colgroup_, data', data_, datalist, datalist_, dd, dd_, del, del_, details, details_, dfn, dfn_, dialog, dialog_, div, div_, dl, dl_, dt, dt_, em, em_, embed, fieldset, fieldset_, figcaption, figcaption_, figure, figure_, footer, footer_, form, form_, h1, h1_, h2, h2_, h3, h3_, h4, h4_, h5, h5_, h6, h6_, head, head_, header, header_, hgroup, hgroup_, hr, html, html_, i, i_, iframe, iframe_, img, input, ins, ins_, kbd, kbd_, keygen, keygen_, label, label_, legend, legend_, li, li_, link, main, main_, map, map_, mark, mark_, math, math_, menu, menu_, menuitem, menuitem_, meta, meter, meter_, nav, nav_, noscript, noscript_, object, object_, ol, ol_, optgroup, optgroup_, option, option_, output, output_, p, p_, param, picture, picture_, pre, pre_, progress, progress_, q, q_, rb, rb_, rp, rp_, rt, rt_, rtc, rtc_, ruby, ruby_, s, s_, samp, samp_, script, script_, section, section_, select, select_, slot, slot_, small, small_, source, span, span_, strong, strong_, style, style_, sub, sub_, summary, summary_, sup, sup_, svg, svg_, table, table_, tbody, tbody_, td, td_, template, template_, textarea, textarea_, tfoot, tfoot_, th, th_, thead, thead_, time, time_, title, title_, tr, tr_, track, u, u_, ul, ul_, var, var_, video, video_, wbr) as Generated import React.Basic.DOM.Internal (CSS, SharedProps, unsafeCreateDOMComponent) as Internal import Unsafe.Coerce (unsafeCoerce) @@ -88,7 +88,7 @@ foreign import unmountComponentAtNode_ :: EffectFn1 Element Boolean -- | instance was not mounted. -- | -- | Note: Relies on `ReactDOM.findDOMNode` -findDOMNode :: ComponentInstance -> Effect (Either Error Node) +findDOMNode :: ReactComponentInstance -> Effect (Either Error Node) findDOMNode instance_ = try do node <- runEffectFn1 findDOMNode_ instance_ case toMaybe node of @@ -96,7 +96,7 @@ findDOMNode instance_ = try do Just n -> pure n -- | Warning: Relies on `ReactDOM.findDOMNode` which may throw exceptions -foreign import findDOMNode_ :: EffectFn1 ComponentInstance (Nullable Node) +foreign import findDOMNode_ :: EffectFn1 ReactComponentInstance (Nullable Node) -- | Create a text node. text :: String -> JSX diff --git a/src/React/Basic/DOM/Internal.purs b/src/React/Basic/DOM/Internal.purs index 7d13daf..d4a6212 100644 --- a/src/React/Basic/DOM/Internal.purs +++ b/src/React/Basic/DOM/Internal.purs @@ -1,6 +1,6 @@ module React.Basic.DOM.Internal where -import React.Basic (Component) +import React.Basic (ReactComponent) import React.Basic.Events (EventHandler) import Unsafe.Coerce (unsafeCoerce) @@ -91,5 +91,5 @@ type SharedProps specific = | specific ) -unsafeCreateDOMComponent :: forall props. String -> Component props +unsafeCreateDOMComponent :: forall props. String -> ReactComponent props unsafeCreateDOMComponent = unsafeCoerce From e8bf0dc24a725f7bac3e953a0694cdb9b4faa9b9 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Thu, 4 Oct 2018 16:57:42 -0700 Subject: [PATCH 02/28] more reason-react-like api experiment --- examples/component/src/Container.purs | 8 +- examples/component/src/ToggleButton.purs | 46 +++-- .../controlled-input/src/ControlledInput.purs | 63 ++++--- examples/counter/src/Counter.purs | 35 ++-- src/React/Basic.js | 157 +++++++++++++----- src/React/Basic.purs | 142 +++++++++++----- 6 files changed, 289 insertions(+), 162 deletions(-) diff --git a/examples/component/src/Container.purs b/examples/component/src/Container.purs index 812b04c..e778e9d 100644 --- a/examples/component/src/Container.purs +++ b/examples/component/src/Container.purs @@ -2,12 +2,12 @@ module Container where import Prelude -import React.Basic (JSX, StatelessComponent, createComponent, makeStateless) +import React.Basic (JSX, StatelessComponent, createStatelessComponent, makeStateless) import React.Basic.DOM as R import ToggleButton as ToggleButton render :: JSX -render = {} # makeStateless component \_ -> +render = unit # makeStateless component \_ -> R.div { children: [ ToggleButton.render { label: "A" } @@ -15,5 +15,5 @@ render = {} # makeStateless component \_ -> ] } -component :: StatelessComponent {} -component = createComponent "Container" +component :: StatelessComponent +component = createStatelessComponent "Container" diff --git a/examples/component/src/ToggleButton.purs b/examples/component/src/ToggleButton.purs index 497fc93..11ff9c4 100644 --- a/examples/component/src/ToggleButton.purs +++ b/examples/component/src/ToggleButton.purs @@ -2,7 +2,7 @@ module ToggleButton where import Prelude -import React.Basic (JSX, Update, Component, StateUpdate(..), make, createComponent) +import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) import React.Basic.DOM as R import React.Basic.Events as Events @@ -13,30 +13,26 @@ type Props = data Action = Toggle -type State = - { on :: Boolean - } - -initialState :: State -initialState = - { on: false +render :: Props -> JSX +render = make component + { initialState = + { on: false + } + + , update = \self -> case _ of + Toggle -> Update self.state { on = not self.state.on } + + , render = \self -> + R.button + { onClick: Events.handler_ do self.send Toggle + , children: + [ R.text self.props.label + , R.text if self.state.on + then " On" + else " Off" + ] + } } -update :: Update Props State Action -update self = case _ of - Toggle -> Update self.state { on = not self.state.on } - -render :: Props -> JSX -render = make component initialState update \self -> - R.button - { onClick: Events.handler_ do self.send Toggle - , children: - [ R.text self.props.label - , R.text if self.state.on - then " On" - else " Off" - ] - } - -component :: Component Props State Action +component :: Component component = createComponent "ToggleButton" diff --git a/examples/controlled-input/src/ControlledInput.purs b/examples/controlled-input/src/ControlledInput.purs index 88c9f72..e936d48 100644 --- a/examples/controlled-input/src/ControlledInput.purs +++ b/examples/controlled-input/src/ControlledInput.purs @@ -3,7 +3,7 @@ module ControlledInput where import Prelude import Data.Maybe (Maybe(..), fromMaybe, maybe) -import React.Basic (JSX, Update, Component, StateUpdate(..), make, createComponent) +import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) import React.Basic as React import React.Basic.DOM as R import React.Basic.DOM.Events (preventDefault, targetValue, timeStamp) @@ -11,39 +11,38 @@ import React.Basic.Events as Events type Props = {} -type State = - { value :: String - , timestamp :: Maybe Number - } - -initialState :: State -initialState = - { value: "hello world" - , timestamp: Nothing - } - data Action = ValueChanged String Number -update :: Update Props State Action -update self = case _ of - ValueChanged value timestamp -> - Update self.state { value = value, timestamp = Just timestamp } - render :: Props -> JSX -render = make component initialState update \{ props, state, send } -> - React.fragment - [ R.input - { onChange: - Events.handler - (preventDefault >>> Events.merge { targetValue, timeStamp }) - \{ timeStamp, targetValue } -> - send $ ValueChanged (fromMaybe "" targetValue) timeStamp - , value: state.value - } - , R.p_ [ R.text ("Current value = " <> show state.value) ] - , R.p_ [ R.text ("Changed at = " <> maybe "never" show state.timestamp) ] - ] - -component :: Component Props State Action +render = make component + { initialState = + { value: "hello world" + , timestamp: Nothing + } + + , update = \self -> case _ of + ValueChanged value timestamp -> + Update self.state + { value = value + , timestamp = Just timestamp + } + + , render = \self -> + React.fragment + [ R.input + { onChange: + Events.handler + (preventDefault >>> Events.merge { targetValue, timeStamp }) + \{ timeStamp, targetValue } -> + self.send $ + ValueChanged (fromMaybe "" targetValue) timeStamp + , value: self.state.value + } + , R.p_ [ R.text ("Current value = " <> show self.state.value) ] + , R.p_ [ R.text ("Changed at = " <> maybe "never" show self.state.timestamp) ] + ] + } + +component :: Component component = createComponent "ControlledInput" diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index bd6ccd8..2c6753a 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -2,7 +2,7 @@ module Counter where import Prelude -import React.Basic (JSX, Update, Component, StateUpdate(..), make, createComponent) +import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) import React.Basic.DOM as R import React.Basic.Events as Events @@ -13,25 +13,20 @@ type Props = data Action = Increment -type State = - { counter :: Int - } - -initialState :: State -initialState = - { counter: 0 - } - -update :: Update Props State Action -update self = case _ of - Increment -> Update self.state { counter = self.state.counter + 1 } - render :: Props -> JSX -render = make component initialState update \self -> - R.button - { onClick: Events.handler_ do self.send Increment - , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] - } +render = make component + { initialState = { counter: 0 } + + , update = \self -> case _ of + Increment -> + Update self.state { counter = self.state.counter + 1 } + + , render = \self -> + R.button + { onClick: Events.handler_ do self.send Increment + , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] + } + } -component :: Component Props State Action +component :: Component component = createComponent "Counter" diff --git a/src/React/Basic.js b/src/React/Basic.js index 279d7a4..bebca9c 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -3,9 +3,7 @@ var React = require("react"); var Fragment = React.Fragment || "div"; -exports.voidState = {}; - -exports.createComponent = function(displayName) { +exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { function contextToSelf(instance) { var self = { props: instance.props.$$props, @@ -19,7 +17,7 @@ exports.createComponent = function(displayName) { }, send: function(action) { return function() { - var updates = self.instance_.$$spec.buildStateUpdate( + var updates = buildStateUpdate( self.instance_.$$spec.update(self)(action) ); if (updates.state !== null) { @@ -41,13 +39,39 @@ exports.createComponent = function(displayName) { return self; } + var defaultInitialState = {}; + var defaultShouldUpdate = function() { + return function() { + return function() { + return true; + }; + }; + }; + var defaultDidMount = function() { + return function() {}; + }; + var defaultDidUpdate = function() { + return function() {}; + }; + var defaultWillUnmount = function() { + return function() {}; + }; + var defaultUpdate = function() { + return function() { + return noUpdate; + }; + }; + var defaultRender = function() { + return false; + }; + var Component = function constructor(props) { this.$$spec = props.$$spec; this.state = // React may optimize components with no state, - // so we leave state undefined if it was initialized - // as Void. - this.$$spec.initialState === exports.voidState + // so we leave state undefined if it was left as + // the default value. + this.$$spec.initialState === defaultInitialState ? undefined : { $$state: this.$$spec.initialState }; return this; @@ -57,49 +81,98 @@ exports.createComponent = function(displayName) { Component.displayName = displayName; - Component.prototype.shouldComponentUpdate = function shouldComponentUpdate( - nextProps, - nextState - ) { - return ( - !this.$$spec.eqProps(this.props.$$props)(nextProps.$$props) || - (this.state !== undefined && - !this.$$spec.eqState(this.state.$$state)(nextState.$$state)) - ); + Component.prototype.shouldComponentUpdate = function(nextProps, nextState) { + return this.$$spec.shouldUpdate(contextToSelf(this))(nextProps)(nextState); + }; + + Component.prototype.componentDidMount = function() { + return this.$$spec.didMount(contextToSelf(this))(); + }; + + Component.prototype.componentDidUpdate = function() { + return this.$$spec.didUpdate(contextToSelf(this))(); }; - Component.prototype.render = function render() { + Component.prototype.componentWillUnmount = function() { + return this.$$spec.willUnmount(contextToSelf(this))(); + }; + + Component.prototype.render = function() { return this.$$spec.render(contextToSelf(this)); }; - return Component; + return { + $$type: Component, + initialState: defaultInitialState, + shouldUpdate: defaultShouldUpdate, + didMount: defaultDidMount, + didUpdate: defaultDidUpdate, + willUnmount: defaultWillUnmount, + update: defaultUpdate, + render: defaultRender + }; }; -exports.make_ = function( - buildStateUpdate, - eqProps, - eqState, - component, - initialState, - update, - render, - $$props -) { - var props = { - $$props: $$props, - $$spec: { - buildStateUpdate: buildStateUpdate, - eqProps: eqProps, - eqState: eqState, - initialState: initialState, - update: update, - render: render - } +exports.createStatelessComponent = function(displayName) { + var defaultInitialState = {}; + var defaultShouldUpdate = function() { + return function() { + return function() { + return true; + }; + }; + }; + var defaultDidMount = function() { + return function() {}; + }; + var defaultDidUpdate = function() { + return function() {}; + }; + var defaultWillUnmount = function() { + return function() {}; + }; + var defaultUpdate = function() { + return function() { + return noUpdate; + }; + }; + var defaultRender = function() { + return false; + }; + + var Component = function constructor(props) { + this.$$spec = props.$$spec; + return this; + }; + + Component.prototype = Object.create(React.Component.prototype); + + Component.displayName = displayName; + + Component.prototype.render = function() { + return this.$$spec.render(this.props.$$props); + }; + + return { + $$type: Component, + initialState: defaultInitialState, + shouldUpdate: defaultShouldUpdate, + didMount: defaultDidMount, + didUpdate: defaultDidUpdate, + willUnmount: defaultWillUnmount, + update: defaultUpdate, + render: defaultRender + }; +}; + +exports.make = function(component) { + return function($$props) { + var props = { + $$props: $$props, + $$spec: component + }; + return React.createElement(component.$$type, props); }; - return React.createElement.apply( - null, - [component, props].concat(($$props && $$props.children) || null) - ); }; exports.keyed_ = function(key, child) { diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 5c7efa7..78208dc 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -2,7 +2,7 @@ module React.Basic where import Prelude -import Data.Function.Uncurried (Fn1, Fn2, Fn8, runFn2, runFn8) +import Data.Function.Uncurried (Fn2, Fn3, runFn2, runFn3) import Data.Nullable (Nullable, notNull, null) import Effect (Effect) import Unsafe.Coerce (unsafeCoerce) @@ -16,9 +16,20 @@ instance semigroupJSX :: Semigroup JSX where instance monoidJSX :: Monoid JSX where mempty = empty -data Component props state action +type ComponentSpec props state action = + { "$$type" :: ReactComponent props + , initialState :: state + , shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean + , didMount :: Self props state action -> Effect Unit + , didUpdate :: Self props state action -> Effect Unit + , willUnmount :: LimitedSelf props state -> Effect Unit + , update :: Update props state action + , render :: Self props state action -> JSX + } + +type Component = forall props state action. ComponentSpec props state action -type StatelessComponent props = Component props Void Void +type StatelessComponent = forall props. ComponentSpec props Void Void type Update props state action = Self props state action @@ -55,37 +66,58 @@ buildStateUpdate = case _ of , effects: notNull effects } -make +-- | Turn a `ComponentSpec` into a usable render function. +-- | This is usually where you will want to provide customized +-- | implementations: +-- | +-- | ```purs +-- | type Props = +-- | { label :: String +-- | } +-- | +-- | data Action +-- | = Increment +-- | +-- | render :: Props -> JSX +-- | render = make component +-- | { initialState = { counter: 0 } +-- | +-- | , update = \self action -> case action of +-- | Increment -> +-- | Update self.state { counter = self.state.counter + 1 } +-- | +-- | , render = \self -> +-- | R.button +-- | { onClick: Events.handler_ do self.send Increment +-- | , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] +-- | } +-- | } +-- | +-- | component :: Component +-- | component = createComponent "Counter" +-- | ``` +foreign import make :: forall props state action - . Eq props - => Eq state - => Component props state action - -> state - -> (Update props state action) - -> (Self props state action -> JSX) + . ComponentSpec props state action -> props -> JSX -make = runFn8 make_ buildStateUpdate eq eq +-- | Helper to make stateless component definition slightly +-- | less verbose: +-- | +-- | ```purs +-- | render = makeStateless component \props -> JSX +-- | +-- | component = createStatelessComponent "Xyz" +-- | ``` makeStateless :: forall props - . Eq props - => Component props Void Void + . ComponentSpec props Void Void -> (props -> JSX) -> props -> JSX makeStateless component render = - runFn8 make_ - (\_ -> { state: null, effects: null }) - eq - (\_ _ -> true) - component - voidState - (\_ _ -> NoUpdate) - (render <<< _.props) - --- | Represents the state of a stateless component. -foreign import voidState :: Void + make component { render = \self -> render self.props } type Self props state action = { props :: props @@ -95,26 +127,58 @@ type Self props state action = , send :: action -> Effect Unit } -foreign import make_ :: forall props state action. - Fn8 - (StateUpdate props state action - -> { state :: Nullable state - , effects :: Nullable (Self props state action -> Effect Unit) - }) - (props -> props -> Boolean) - (state -> state -> Boolean) - (Component props state action) - state - (Update props state action) - (Self props state action -> JSX) - props - JSX +type LimitedSelf props state = + { props :: props + , state :: state + } data ReactComponent props data ReactComponentInstance -foreign import createComponent :: forall props state action. Fn1 String (Component props state action) +createComponent + :: String + -> { "$$type" :: forall props. ReactComponent props + , initialState :: forall state. state + , shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean + , didMount :: forall props state action. Self props state action -> Effect Unit + , didUpdate :: forall props state action. Self props state action -> Effect Unit + , willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit + , update :: forall props state action. Update props state action + , render :: forall props state action. Self props state action -> JSX + } +createComponent = runFn3 createComponent_ NoUpdate buildStateUpdate + +foreign import createComponent_ + :: Fn3 + (forall props state action. StateUpdate props state action) + (forall props state action. StateUpdate props state action + -> { state :: Nullable state + , effects :: Nullable (Self props state action -> Effect Unit) + }) + String + ({ "$$type" :: forall props. ReactComponent props + , initialState :: forall state. state + , shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean + , didMount :: forall props state action. Self props state action -> Effect Unit + , didUpdate :: forall props state action. Self props state action -> Effect Unit + , willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit + , update :: forall props state action. Update props state action + , render :: forall props state action. Self props state action -> JSX + }) + +-- | Creates a named, stateless component +foreign import createStatelessComponent + :: String + -> { "$$type" :: forall props. ReactComponent props + , initialState :: Void + , shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean + , didMount :: forall props. Self props Void Void -> Effect Unit + , didUpdate :: forall props. Self props Void Void -> Effect Unit + , willUnmount :: forall props. LimitedSelf props Void -> Effect Unit + , update :: forall props. Update props Void Void + , render :: forall props. Self props Void Void -> JSX + } -- | An empty node. This is often useful when you would like to conditionally -- | show something, but you don't want to (or can't) modify the `children` prop From 5161ed1d344c32ecbd2e0151d923a5310083e652 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Fri, 5 Oct 2018 18:05:36 -0700 Subject: [PATCH 03/28] Add Compat module; fix stateless; build docs --- examples/legacy-v2/.gitignore | 4 + examples/legacy-v2/Makefile | 8 + examples/legacy-v2/README.md | 12 ++ examples/legacy-v2/html/index.html | 10 ++ examples/legacy-v2/package.json | 9 + examples/legacy-v2/src/LegacyCounter.purs | 36 ++++ examples/legacy-v2/src/Main.purs | 23 +++ generated-docs/React/Basic.md | 161 ++++++++++++++---- generated-docs/React/Basic/Compat.md | 181 +++++++++++++++++++++ generated-docs/React/Basic/DOM.md | 14 +- generated-docs/React/Basic/DOM/Internal.md | 2 +- generated-docs/React/Basic/Types.md | 60 ------- src/React/Basic.js | 22 ++- src/React/Basic.purs | 6 + src/React/Basic/Compat.purs | 49 ++++++ 15 files changed, 504 insertions(+), 93 deletions(-) create mode 100644 examples/legacy-v2/.gitignore create mode 100644 examples/legacy-v2/Makefile create mode 100644 examples/legacy-v2/README.md create mode 100644 examples/legacy-v2/html/index.html create mode 100644 examples/legacy-v2/package.json create mode 100644 examples/legacy-v2/src/LegacyCounter.purs create mode 100644 examples/legacy-v2/src/Main.purs create mode 100644 generated-docs/React/Basic/Compat.md delete mode 100644 generated-docs/React/Basic/Types.md create mode 100644 src/React/Basic/Compat.purs diff --git a/examples/legacy-v2/.gitignore b/examples/legacy-v2/.gitignore new file mode 100644 index 0000000..645684d --- /dev/null +++ b/examples/legacy-v2/.gitignore @@ -0,0 +1,4 @@ +output +html/index.js +package-lock.json +node_modules diff --git a/examples/legacy-v2/Makefile b/examples/legacy-v2/Makefile new file mode 100644 index 0000000..ecacfbe --- /dev/null +++ b/examples/legacy-v2/Makefile @@ -0,0 +1,8 @@ +all: node_modules + purs compile src/*.purs '../../src/**/*.purs' '../../bower_components/purescript-*/src/**/*.purs' + purs bundle -m Main --main Main output/*/*.js > output/bundle.js + node_modules/.bin/browserify output/bundle.js -o html/index.js + +node_modules: + npm install + diff --git a/examples/legacy-v2/README.md b/examples/legacy-v2/README.md new file mode 100644 index 0000000..f2418c0 --- /dev/null +++ b/examples/legacy-v2/README.md @@ -0,0 +1,12 @@ +# Counter Example + +## Building + +``` +npm install +make all +``` + +This will compile the PureScript source files, bundle them, and use Browserify to combine PureScript and NPM sources into a single bundle. + +Then open `html/index.html` in your browser. diff --git a/examples/legacy-v2/html/index.html b/examples/legacy-v2/html/index.html new file mode 100644 index 0000000..6b93b7c --- /dev/null +++ b/examples/legacy-v2/html/index.html @@ -0,0 +1,10 @@ + + + + react-basic example + + +
+ + + diff --git a/examples/legacy-v2/package.json b/examples/legacy-v2/package.json new file mode 100644 index 0000000..624a6f3 --- /dev/null +++ b/examples/legacy-v2/package.json @@ -0,0 +1,9 @@ +{ + "dependencies": { + "react": "^16.4.2", + "react-dom": "^16.4.2" + }, + "devDependencies": { + "browserify": "^16.2.2" + } +} diff --git a/examples/legacy-v2/src/LegacyCounter.purs b/examples/legacy-v2/src/LegacyCounter.purs new file mode 100644 index 0000000..15e86b9 --- /dev/null +++ b/examples/legacy-v2/src/LegacyCounter.purs @@ -0,0 +1,36 @@ +module LegacyCounter where + +import Prelude + +import React.Basic.Compat (Component, component, element, stateless) +import React.Basic.DOM as R +import React.Basic.Events as Events + +type Props = + { label :: String + } + +-- | checks `component` +counter :: Component Props +counter = component { displayName: "LegacyCounter", initialState, receiveProps, render } + where + initialState = + { counter: 0 + } + + receiveProps self = + pure unit + + render self = + R.button + { onClick: Events.handler_ do + self.setState \s -> s { counter = s.counter + 1 } + , children: [ element buttonLabel { label: self.props.label, counter: self.state.counter } ] + } + +-- | checks `stateless` +buttonLabel :: Component { label :: String, counter :: Int } +buttonLabel = stateless { displayName: "ButtonLabel", render } + where + render props = + R.text (props.label <> ": " <> show props.counter) diff --git a/examples/legacy-v2/src/Main.purs b/examples/legacy-v2/src/Main.purs new file mode 100644 index 0000000..78486be --- /dev/null +++ b/examples/legacy-v2/src/Main.purs @@ -0,0 +1,23 @@ +module Main where + +import Prelude + +import Data.Maybe (Maybe(..)) +import Effect (Effect) +import Effect.Exception (throw) +import LegacyCounter as LegacyCounter +import React.Basic (element) +import React.Basic.DOM (render) +import Web.DOM.NonElementParentNode (getElementById) +import Web.HTML (window) +import Web.HTML.HTMLDocument (toNonElementParentNode) +import Web.HTML.Window (document) + +main :: Effect Unit +main = do + container <- getElementById "container" =<< (map toNonElementParentNode $ document =<< window) + case container of + Nothing -> throw "Container element not found." + Just c -> + let app = element LegacyCounter.counter { label: "Increment" } + in render app c diff --git a/generated-docs/React/Basic.md b/generated-docs/React/Basic.md index abab069..23c145b 100644 --- a/generated-docs/React/Basic.md +++ b/generated-docs/React/Basic.md @@ -3,18 +3,20 @@ #### `Component` ``` purescript -data Component :: Type -> Type +type Component = forall props state action. ComponentSpec props state action ``` -A React component which can be used from JavaScript. - -#### `ComponentInstance` +#### `StatelessComponent` ``` purescript -data ComponentInstance :: Type +type StatelessComponent = forall props. ComponentSpec props Void Void ``` -Represents the mounted component instance, or "this" in vanilla React. +#### `ComponentSpec` + +``` purescript +type ComponentSpec props state action = { "$$type" :: ReactComponent props, initialState :: state, shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: LimitedSelf props state -> Effect Unit, update :: Update props state action, render :: Self props state action -> JSX } +``` #### `JSX` @@ -30,51 +32,123 @@ Semigroup JSX Monoid JSX ``` -#### `component` +#### `Update` ``` purescript -component :: forall props state. { displayName :: String, initialState :: { | state }, receiveProps :: { isFirstMount :: Boolean, props :: { | props }, state :: { | state }, setState :: SetState state, setStateThen :: SetStateThen state, instance_ :: ComponentInstance } -> Effect Unit, render :: { props :: { | props }, state :: { | state }, setState :: SetState state, setStateThen :: SetStateThen state, instance_ :: ComponentInstance } -> JSX } -> Component { | props } +type Update props state action = Self props state action -> action -> StateUpdate props state action ``` -Create a React component from a _specification_ of that component. +#### `StateUpdate` -A _specification_ consists of a state type, an initial value for that state, -a function to apply incoming props to the internal state, and a rendering -function which takes props, state and a state update function. +``` purescript +data StateUpdate props state action + = NoUpdate + | Update state + | SideEffects (Self props state action -> Effect Unit) + | UpdateAndSideEffects state (Self props state action -> Effect Unit) +``` -The rendering function should return a value of type `JSX`, which can be -constructed using the helper functions provided by the `React.Basic.DOM` -module. +#### `Self` -Note: This function relies on `React.PureComponent` internally +``` purescript +type Self props state action = { props :: props, state :: state, readProps :: Effect props, readState :: Effect state, send :: action -> Effect Unit, instance_ :: ReactComponentInstance } +``` -#### `stateless` +#### `LimitedSelf` ``` purescript -stateless :: forall props. { displayName :: String, render :: { | props } -> JSX } -> Component { | props } +type LimitedSelf props state = { props :: props, state :: state } ``` -Create a stateless React component. +#### `ReactComponent` -Removes a little bit of the `react` function's boilerplate when creating -components which don't use state. +``` purescript +data ReactComponent props +``` -#### `element` +#### `ReactComponentInstance` ``` purescript -element :: forall props. Component { | props } -> { | props } -> JSX +data ReactComponentInstance ``` -Create a `JSX` node from a React component, by providing the props. +#### `make` -#### `elementKeyed` +``` purescript +make :: forall props state action. ComponentSpec props state action -> props -> JSX +``` + +Turn a `ComponentSpec` into a usable render function. +This is usually where you will want to provide customized +implementations: + +```purs +type Props = + { label :: String + } + +data Action + = Increment + +render :: Props -> JSX +render = make component + { initialState = { counter: 0 } + + , update = \self action -> case action of + Increment -> + Update self.state { counter = self.state.counter + 1 } + + , render = \self -> + R.button + { onClick: Events.handler_ do self.send Increment + , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] + } + } + +component :: Component +component = createComponent "Counter" +``` + +#### `makeStateless` ``` purescript -elementKeyed :: forall props. Component { | props } -> { key :: String | props } -> JSX +makeStateless :: forall props. ComponentSpec props Void Void -> (props -> JSX) -> props -> JSX ``` -Like `element`, plus a `key` for rendering components in a dynamic list. -For more information see: https://reactjs.org/docs/reconciliation.html#keys +Helper to make stateless component definition slightly +less verbose: + +```purs +render = makeStateless component \props -> JSX + +component = createStatelessComponent "Xyz" +``` + +#### `asyncEffects` + +``` purescript +asyncEffects :: forall props state action. (Self props state action -> Aff action) -> Self props state action -> Effect Unit +``` + +Convenience function for sending an action asynchronously. + +Note: potential failure should be handled and converted to an + action, as the default error handler will simply log the + error to the console. + +#### `createComponent` + +``` purescript +createComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: forall state. state, shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean, didMount :: forall props state action. Self props state action -> Effect Unit, didUpdate :: forall props state action. Self props state action -> Effect Unit, willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit, update :: forall props state action. Update props state action, render :: forall props state action. Self props state action -> JSX } +``` + +#### `createStatelessComponent` + +``` purescript +createStatelessComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: Void, shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean, didMount :: forall props. Self props Void Void -> Effect Unit, didUpdate :: forall props. Self props Void Void -> Effect Unit, willUnmount :: forall props. LimitedSelf props Void -> Effect Unit, update :: forall props. Update props Void Void, render :: forall props. Self props Void Void -> JSX } +``` + +Creates a named, stateless component #### `empty` @@ -86,6 +160,14 @@ An empty node. This is often useful when you would like to conditionally show something, but you don't want to (or can't) modify the `children` prop on the parent node. +#### `keyed` + +``` purescript +keyed :: String -> JSX -> JSX +``` + +Apply a React key to a sub-tree. + #### `fragment` ``` purescript @@ -105,4 +187,27 @@ Render an Array of children without a wrapping component. Provide a key when dynamically rendering multiple fragments along side each other. +#### `element` + +``` purescript +element :: forall props. ReactComponent { | props } -> { | props } -> JSX +``` + +Create a `JSX` node from a React component, by providing the props. + +#### `elementKeyed` + +``` purescript +elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX +``` + +Like `element`, plus a `key` for rendering components in a dynamic list. +For more information see: https://reactjs.org/docs/reconciliation.html#keys + +#### `toReactComponent` + +``` purescript +toReactComponent :: forall props. ({ | props } -> JSX) -> ReactComponent { | props } +``` + diff --git a/generated-docs/React/Basic/Compat.md b/generated-docs/React/Basic/Compat.md new file mode 100644 index 0000000..95dce81 --- /dev/null +++ b/generated-docs/React/Basic/Compat.md @@ -0,0 +1,181 @@ +## Module React.Basic.Compat + +#### `Component` + +``` purescript +type Component = ReactComponent +``` + +#### `component` + +``` purescript +component :: forall props state. { displayName :: String, initialState :: { | state }, receiveProps :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> Effect Unit, render :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> JSX } -> ReactComponent { | props } +``` + +Supports a common subset of the v2 API to ease the upgrade process + +#### `stateless` + +``` purescript +stateless :: forall props. { displayName :: String, render :: { | props } -> JSX } -> ReactComponent { | props } +``` + +Supports a common subset of the v2 API to ease the upgrade process + + +### Re-exported from React.Basic: + +#### `StateUpdate` + +``` purescript +data StateUpdate props state action + = NoUpdate + | Update state + | SideEffects (Self props state action -> Effect Unit) + | UpdateAndSideEffects state (Self props state action -> Effect Unit) +``` + +#### `Self` + +``` purescript +type Self props state action = { props :: props, state :: state, readProps :: Effect props, readState :: Effect state, send :: action -> Effect Unit, instance_ :: ReactComponentInstance } +``` + +#### `ReactComponent` + +``` purescript +data ReactComponent props +``` + +#### `JSX` + +``` purescript +data JSX :: Type +``` + +A virtual DOM element. + +##### Instances +``` purescript +Semigroup JSX +Monoid JSX +``` + +#### `toReactComponent` + +``` purescript +toReactComponent :: forall props. ({ | props } -> JSX) -> ReactComponent { | props } +``` + +#### `makeStateless` + +``` purescript +makeStateless :: forall props. ComponentSpec props Void Void -> (props -> JSX) -> props -> JSX +``` + +Helper to make stateless component definition slightly +less verbose: + +```purs +render = makeStateless component \props -> JSX + +component = createStatelessComponent "Xyz" +``` + +#### `make` + +``` purescript +make :: forall props state action. ComponentSpec props state action -> props -> JSX +``` + +Turn a `ComponentSpec` into a usable render function. +This is usually where you will want to provide customized +implementations: + +```purs +type Props = + { label :: String + } + +data Action + = Increment + +render :: Props -> JSX +render = make component + { initialState = { counter: 0 } + + , update = \self action -> case action of + Increment -> + Update self.state { counter = self.state.counter + 1 } + + , render = \self -> + R.button + { onClick: Events.handler_ do self.send Increment + , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] + } + } + +component :: Component +component = createComponent "Counter" +``` + +#### `fragmentKeyed` + +``` purescript +fragmentKeyed :: String -> Array JSX -> JSX +``` + +Render an Array of children without a wrapping component. + +Provide a key when dynamically rendering multiple fragments along side +each other. + +#### `fragment` + +``` purescript +fragment :: Array JSX -> JSX +``` + +Render an Array of children without a wrapping component. + +#### `empty` + +``` purescript +empty :: JSX +``` + +An empty node. This is often useful when you would like to conditionally +show something, but you don't want to (or can't) modify the `children` prop +on the parent node. + +#### `elementKeyed` + +``` purescript +elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX +``` + +Like `element`, plus a `key` for rendering components in a dynamic list. +For more information see: https://reactjs.org/docs/reconciliation.html#keys + +#### `element` + +``` purescript +element :: forall props. ReactComponent { | props } -> { | props } -> JSX +``` + +Create a `JSX` node from a React component, by providing the props. + +#### `createStatelessComponent` + +``` purescript +createStatelessComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: Void, shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean, didMount :: forall props. Self props Void Void -> Effect Unit, didUpdate :: forall props. Self props Void Void -> Effect Unit, willUnmount :: forall props. LimitedSelf props Void -> Effect Unit, update :: forall props. Update props Void Void, render :: forall props. Self props Void Void -> JSX } +``` + +Creates a named, stateless component + +#### `createComponent` + +``` purescript +createComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: forall state. state, shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean, didMount :: forall props state action. Self props state action -> Effect Unit, didUpdate :: forall props state action. Self props state action -> Effect Unit, willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit, update :: forall props state action. Update props state action, render :: forall props state action. Self props state action -> JSX } +``` + diff --git a/generated-docs/React/Basic/DOM.md b/generated-docs/React/Basic/DOM.md index b3da0bb..e58c6f7 100644 --- a/generated-docs/React/Basic/DOM.md +++ b/generated-docs/React/Basic/DOM.md @@ -74,7 +74,7 @@ Note: Relies on `ReactDOM.unmountComponentAtNode` #### `findDOMNode` ``` purescript -findDOMNode :: ComponentInstance -> Effect (Either Error Node) +findDOMNode :: ReactComponentInstance -> Effect (Either Error Node) ``` Returns the current DOM node associated with the given @@ -83,6 +83,16 @@ instance was not mounted. Note: Relies on `ReactDOM.findDOMNode` +#### `createPortal` + +``` purescript +createPortal :: JSX -> Element -> JSX +``` + +Divert a render tree into a separate DOM node. The node's +content will be overwritten and managed by React, similar +to `render` and `hydrate`. + #### `text` ``` purescript @@ -2184,6 +2194,6 @@ An abstract type representing records of CSS attributes. #### `unsafeCreateDOMComponent` ``` purescript -unsafeCreateDOMComponent :: forall props. String -> Component props +unsafeCreateDOMComponent :: forall props. String -> ReactComponent props ``` diff --git a/generated-docs/React/Basic/DOM/Internal.md b/generated-docs/React/Basic/DOM/Internal.md index 2014c92..2cd10a6 100644 --- a/generated-docs/React/Basic/DOM/Internal.md +++ b/generated-docs/React/Basic/DOM/Internal.md @@ -19,7 +19,7 @@ Standard props which are shared by all DOM elements. #### `unsafeCreateDOMComponent` ``` purescript -unsafeCreateDOMComponent :: forall props. String -> Component props +unsafeCreateDOMComponent :: forall props. String -> ReactComponent props ``` diff --git a/generated-docs/React/Basic/Types.md b/generated-docs/React/Basic/Types.md deleted file mode 100644 index 4a94906..0000000 --- a/generated-docs/React/Basic/Types.md +++ /dev/null @@ -1,60 +0,0 @@ -## Module React.Basic.Types - -#### `JSX` - -``` purescript -data JSX :: Type -``` - -A virtual DOM element. - -#### `ReactComponent` - -``` purescript -data ReactComponent :: Type -> Type -``` - -A React component which can be used from JavaScript. - -#### `ReactFX` - -``` purescript -data ReactFX :: Effect -``` - -A placeholder effect for all React FFI. - -#### `DOMNode` - -``` purescript -data DOMNode :: Type -``` - -An _actual_ DOM node (not a virtual DOM element!) - -#### `CSS` - -``` purescript -data CSS :: Type -``` - -An abstract type representing records of CSS attributes. - -#### `SyntheticEvent` - -``` purescript -type SyntheticEvent = { bubbles :: Boolean, cancelable :: Boolean, currentTarget :: DOMNode, defaultPrevented :: Boolean, eventPhase :: Number, isTrusted :: Boolean, target :: DOMNode, timeStamp :: Number, "type" :: String } -``` - -Event data that we receive from React. - -#### `EventHandler` - -``` purescript -type EventHandler = EffFn1 (react :: ReactFX) SyntheticEvent Unit -``` - -An event handler, which receives a `SyntheticEvent` and performs some -effects in return. - - diff --git a/src/React/Basic.js b/src/React/Basic.js index 21fbbd6..5f902b6 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -13,7 +13,7 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { }, readState: function() { var state = self.instance_.state; - return state !== undefined && state.$$state; + return state === undefined ? undefined : state.$$state; }, send: function(action) { return function() { @@ -114,6 +114,24 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { }; exports.createStatelessComponent = function(displayName) { + function contextToSelf(instance) { + var self = { + props: instance.props.$$props, + state: undefined, + readProps: function() { + return self.instance_.props.$$props; + }, + readState: function() { + return undefined; + }, + send: function() { + return function() {}; + }, + instance_: instance + }; + return self; + } + var defaultInitialState = {}; var defaultShouldUpdate = function() { return function() { @@ -150,7 +168,7 @@ exports.createStatelessComponent = function(displayName) { Component.displayName = displayName; Component.prototype.render = function() { - return this.$$spec.render(this.props.$$props); + return this.$$spec.render(contextToSelf(this)); }; return { diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 0cfc3be..920174e 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -20,6 +20,7 @@ module React.Basic , fragmentKeyed , element , elementKeyed + , toReactComponent ) where import Prelude @@ -82,6 +83,8 @@ asyncEffects work self = runAff_ handle (work self) handle (Right action) = self.send action handle (Left err) = do error "An async action failed." + -- Unsafely coercing to preserve browser console + -- error features such as linked stack traces error (unsafeCoerce err) buildStateUpdate @@ -266,3 +269,6 @@ elementKeyed = runFn2 elementKeyed_ foreign import element_ :: forall props. Fn2 (ReactComponent { | props }) { | props } JSX foreign import elementKeyed_ :: forall props. Fn2 (ReactComponent { | props }) { key :: String | props } JSX + +toReactComponent :: forall props. ({ | props } -> JSX) -> ReactComponent { | props } +toReactComponent = unsafeCoerce diff --git a/src/React/Basic/Compat.purs b/src/React/Basic/Compat.purs new file mode 100644 index 0000000..37470ee --- /dev/null +++ b/src/React/Basic/Compat.purs @@ -0,0 +1,49 @@ +module React.Basic.Compat + ( Component + , component + , stateless + , module React.Basic + ) where + +import Prelude + +import Effect (Effect) +import React.Basic (JSX, ReactComponent, Self, StateUpdate(..), createComponent, createStatelessComponent, element, elementKeyed, empty, fragment, fragmentKeyed, make, makeStateless, toReactComponent) + +type Component = ReactComponent + +-- | Supports a common subset of the v2 API to ease the upgrade process +component + :: forall props state + . { displayName :: String + , initialState :: { | state } + , receiveProps :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> Effect Unit + , render :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> JSX + } + -> ReactComponent { | props } +component { displayName, initialState, receiveProps, render } = + toReactComponent (make (createComponent displayName) + { initialState = initialState + , didMount = receiveProps <<< selfToLegacySelf + , didUpdate = receiveProps <<< selfToLegacySelf + , update = \self newState -> Update newState + , render = render <<< selfToLegacySelf + }) + where + selfToLegacySelf { props, state, send } = + { props + , state + , setState: \fn -> send (fn state) + } + +-- | Supports a common subset of the v2 API to ease the upgrade process +stateless + :: forall props + . { displayName :: String + , render :: { | props } -> JSX + } + -> ReactComponent { | props } +stateless { displayName, render } = + toReactComponent (make (createStatelessComponent displayName) + { render = \self -> render self.props + }) From 704efe9c3eef06adb7da2569761cb20f9b1b1ca4 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Mon, 8 Oct 2018 11:07:37 -0600 Subject: [PATCH 04/28] Split the spec component type from ReactComponent; fix toReactComponent --- src/React/Basic.js | 82 ++++++++++++++++++++++++------------- src/React/Basic.purs | 17 +++++--- src/React/Basic/Compat.purs | 12 +++--- 3 files changed, 71 insertions(+), 40 deletions(-) diff --git a/src/React/Basic.js b/src/React/Basic.js index 5f902b6..5b45a79 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -7,31 +7,39 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { function contextToSelf(instance) { var self = { props: instance.props.$$props, - state: instance.state === undefined ? undefined : instance.state.$$state, + state: instance.state === null ? null : instance.state.$$state, readProps: function() { return self.instance_.props.$$props; }, readState: function() { var state = self.instance_.state; - return state === undefined ? undefined : state.$$state; + return state === null ? null : state.$$state; }, send: function(action) { return function() { - var updates = buildStateUpdate( - self.instance_.$$spec.update(self)(action) + var sideEffects = null; + self.instance_.setState( + function(s) { + var setStateContext = contextToSelf(self.instance_); + setStateContext.state = s.$$state; + var updates = buildStateUpdate( + self.instance_.$$spec.update(setStateContext)(action) + ); + if (updates.effects !== null) { + sideEffects = updates.effects; + } + if (updates.state !== null && updates.state !== s.$$state) { + return { $$state: updates.state }; + } else { + return null; + } + }, + function() { + if (sideEffects !== null) { + sideEffects(contextToSelf(this))(); + } + } ); - if (updates.state !== null) { - self.instance_.setState( - { $$state: updates.state }, - updates.effects !== null - ? function() { - updates.effects(contextToSelf(this))(); - } - : undefined - ); - } else if (updates.effects !== null) { - updates.effects(self)(); - } }; }, instance_: instance @@ -39,7 +47,7 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { return self; } - var defaultInitialState = {}; + var defaultInitialState = null; var defaultShouldUpdate = function() { return function() { return function() { @@ -69,10 +77,10 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { this.$$spec = props.$$spec; this.state = // React may optimize components with no state, - // so we leave state undefined if it was left as + // so we leave state null if it was left as // the default value. this.$$spec.initialState === defaultInitialState - ? undefined + ? null : { $$state: this.$$spec.initialState }; return this; }; @@ -117,12 +125,12 @@ exports.createStatelessComponent = function(displayName) { function contextToSelf(instance) { var self = { props: instance.props.$$props, - state: undefined, + state: null, readProps: function() { return self.instance_.props.$$props; }, readState: function() { - return undefined; + return null; }, send: function() { return function() {}; @@ -132,7 +140,7 @@ exports.createStatelessComponent = function(displayName) { return self; } - var defaultInitialState = {}; + var defaultInitialState = null; var defaultShouldUpdate = function() { return function() { return function() { @@ -183,16 +191,36 @@ exports.createStatelessComponent = function(displayName) { }; }; -exports.make = function(component) { +exports.make = function($$spec) { return function($$props) { var props = { $$props: $$props, - $$spec: component + $$spec: $$spec }; - return React.createElement(component.$$type, props); + return React.createElement($$spec.$$type, props); }; }; +exports.toReactComponent = function($$spec) { + var Component = function constructor() { + return this; + }; + + Component.prototype = Object.create(React.Component.prototype); + + Component.displayName = $$spec.$$type.displayName + " (Wrapper)"; + + Component.prototype.render = function() { + var props = { + $$props: this.props, + $$spec: $$spec + }; + return React.createElement($$spec.$$type, props); + }; + + return Component; +}; + exports.keyed_ = function(key, child) { return React.createElement(Fragment, { key: key }, child); }; @@ -204,9 +232,7 @@ exports.element_ = function(component, props) { ); }; -exports.elementKeyed_ = function(key, child) { - return React.createElement.call(null, Fragment, { key: key }, child); -}; +exports.elementKeyed_ = exports.element_; exports.fragment = function(children) { return React.createElement.apply(null, [Fragment, {}].concat(children)); diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 920174e..ea35319 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -2,6 +2,7 @@ module React.Basic ( Component , StatelessComponent , ComponentSpec + , ComponentType , JSX , Update , StateUpdate(..) @@ -42,8 +43,10 @@ instance semigroupJSX :: Semigroup JSX where instance monoidJSX :: Monoid JSX where mempty = empty +data ComponentType props state action + type ComponentSpec props state action = - { "$$type" :: ReactComponent props + { "$$type" :: ComponentType props state action , initialState :: state , shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean , didMount :: Self props state action -> Effect Unit @@ -187,7 +190,7 @@ data ReactComponentInstance createComponent :: String - -> { "$$type" :: forall props. ReactComponent props + -> { "$$type" :: forall props state action. ComponentType props state action , initialState :: forall state. state , shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean , didMount :: forall props state action. Self props state action -> Effect Unit @@ -206,7 +209,7 @@ foreign import createComponent_ , effects :: Nullable (Self props state action -> Effect Unit) }) String - ({ "$$type" :: forall props. ReactComponent props + ({ "$$type" :: forall props state action. ComponentType props state action , initialState :: forall state. state , shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean , didMount :: forall props state action. Self props state action -> Effect Unit @@ -219,7 +222,7 @@ foreign import createComponent_ -- | Creates a named, stateless component foreign import createStatelessComponent :: String - -> { "$$type" :: forall props. ReactComponent props + -> { "$$type" :: forall props state action. ComponentType props state action , initialState :: Void , shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean , didMount :: forall props. Self props Void Void -> Effect Unit @@ -270,5 +273,7 @@ foreign import element_ :: forall props. Fn2 (ReactComponent { | props }) { | pr foreign import elementKeyed_ :: forall props. Fn2 (ReactComponent { | props }) { key :: String | props } JSX -toReactComponent :: forall props. ({ | props } -> JSX) -> ReactComponent { | props } -toReactComponent = unsafeCoerce +foreign import toReactComponent :: forall props state action. ComponentSpec { | props } state action -> ReactComponent { | props } + +displayName :: forall props state action. ComponentSpec props state action -> String +displayName = _.displayName <<< unsafeCoerce <<< _."$$type" diff --git a/src/React/Basic/Compat.purs b/src/React/Basic/Compat.purs index 37470ee..5273119 100644 --- a/src/React/Basic/Compat.purs +++ b/src/React/Basic/Compat.purs @@ -22,18 +22,18 @@ component } -> ReactComponent { | props } component { displayName, initialState, receiveProps, render } = - toReactComponent (make (createComponent displayName) + toReactComponent (createComponent displayName) { initialState = initialState , didMount = receiveProps <<< selfToLegacySelf , didUpdate = receiveProps <<< selfToLegacySelf - , update = \self newState -> Update newState + , update = \self stateUpdate -> Update (stateUpdate self.state) , render = render <<< selfToLegacySelf - }) + } where selfToLegacySelf { props, state, send } = { props , state - , setState: \fn -> send (fn state) + , setState: send } -- | Supports a common subset of the v2 API to ease the upgrade process @@ -44,6 +44,6 @@ stateless } -> ReactComponent { | props } stateless { displayName, render } = - toReactComponent (make (createStatelessComponent displayName) + toReactComponent (createStatelessComponent displayName) { render = \self -> render self.props - }) + } From a51415a84df40ee50306ec0a96c4dbd0b9c884e9 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 9 Oct 2018 16:28:10 -0600 Subject: [PATCH 05/28] Fix statelessComponent --- src/React/Basic.js | 70 -------------------------------------------- src/React/Basic.purs | 5 ++-- 2 files changed, 3 insertions(+), 72 deletions(-) diff --git a/src/React/Basic.js b/src/React/Basic.js index 5b45a79..3ed90df 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -121,76 +121,6 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { }; }; -exports.createStatelessComponent = function(displayName) { - function contextToSelf(instance) { - var self = { - props: instance.props.$$props, - state: null, - readProps: function() { - return self.instance_.props.$$props; - }, - readState: function() { - return null; - }, - send: function() { - return function() {}; - }, - instance_: instance - }; - return self; - } - - var defaultInitialState = null; - var defaultShouldUpdate = function() { - return function() { - return function() { - return true; - }; - }; - }; - var defaultDidMount = function() { - return function() {}; - }; - var defaultDidUpdate = function() { - return function() {}; - }; - var defaultWillUnmount = function() { - return function() {}; - }; - var defaultUpdate = function() { - return function() { - return noUpdate; - }; - }; - var defaultRender = function() { - return false; - }; - - var Component = function constructor(props) { - this.$$spec = props.$$spec; - return this; - }; - - Component.prototype = Object.create(React.Component.prototype); - - Component.displayName = displayName; - - Component.prototype.render = function() { - return this.$$spec.render(contextToSelf(this)); - }; - - return { - $$type: Component, - initialState: defaultInitialState, - shouldUpdate: defaultShouldUpdate, - didMount: defaultDidMount, - didUpdate: defaultDidUpdate, - willUnmount: defaultWillUnmount, - update: defaultUpdate, - render: defaultRender - }; -}; - exports.make = function($$spec) { return function($$props) { var props = { diff --git a/src/React/Basic.purs b/src/React/Basic.purs index ea35319..25a48ee 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -220,9 +220,9 @@ foreign import createComponent_ }) -- | Creates a named, stateless component -foreign import createStatelessComponent +createStatelessComponent :: String - -> { "$$type" :: forall props state action. ComponentType props state action + -> { "$$type" :: forall props state action. ComponentType props Void Void , initialState :: Void , shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean , didMount :: forall props. Self props Void Void -> Effect Unit @@ -231,6 +231,7 @@ foreign import createStatelessComponent , update :: forall props. Update props Void Void , render :: forall props. Self props Void Void -> JSX } +createStatelessComponent = createComponent -- | An empty node. This is often useful when you would like to conditionally -- | show something, but you don't want to (or can't) modify the `children` prop From 3dfd1100a23c7b56eb5af7d64c3b114253cd5fdb Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 9 Oct 2018 23:04:12 -0600 Subject: [PATCH 06/28] Update types, distinguish initialState from state until make is called --- examples/component/src/Container.purs | 6 +- generated-docs/React/Basic.md | 26 ++---- generated-docs/React/Basic/Compat.md | 22 +++-- src/React/Basic.purs | 120 +++++++++++--------------- src/React/Basic/Compat.purs | 4 +- 5 files changed, 75 insertions(+), 103 deletions(-) diff --git a/examples/component/src/Container.purs b/examples/component/src/Container.purs index e778e9d..d9966ad 100644 --- a/examples/component/src/Container.purs +++ b/examples/component/src/Container.purs @@ -2,7 +2,7 @@ module Container where import Prelude -import React.Basic (JSX, StatelessComponent, createStatelessComponent, makeStateless) +import React.Basic (Component, JSX, createComponent, makeStateless) import React.Basic.DOM as R import ToggleButton as ToggleButton @@ -15,5 +15,5 @@ render = unit # makeStateless component \_ -> ] } -component :: StatelessComponent -component = createStatelessComponent "Container" +component :: Component +component = createComponent "Container" diff --git a/generated-docs/React/Basic.md b/generated-docs/React/Basic.md index 23c145b..e4bbaa5 100644 --- a/generated-docs/React/Basic.md +++ b/generated-docs/React/Basic.md @@ -3,19 +3,19 @@ #### `Component` ``` purescript -type Component = forall props state action. ComponentSpec props state action +type Component = forall props state action. ComponentSpec props state Void action ``` -#### `StatelessComponent` +#### `ComponentSpec` ``` purescript -type StatelessComponent = forall props. ComponentSpec props Void Void +type ComponentSpec props state initialState action = { "$$type" :: ComponentType props state action, initialState :: initialState, shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: LimitedSelf props state -> Effect Unit, update :: Update props state action, render :: Self props state action -> JSX } ``` -#### `ComponentSpec` +#### `ComponentType` ``` purescript -type ComponentSpec props state action = { "$$type" :: ReactComponent props, initialState :: state, shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: LimitedSelf props state -> Effect Unit, update :: Update props state action, render :: Self props state action -> JSX } +data ComponentType props state action ``` #### `JSX` @@ -75,7 +75,7 @@ data ReactComponentInstance #### `make` ``` purescript -make :: forall props state action. ComponentSpec props state action -> props -> JSX +make :: forall props state action. ComponentSpec props state state action -> props -> JSX ``` Turn a `ComponentSpec` into a usable render function. @@ -112,7 +112,7 @@ component = createComponent "Counter" #### `makeStateless` ``` purescript -makeStateless :: forall props. ComponentSpec props Void Void -> (props -> JSX) -> props -> JSX +makeStateless :: forall props. ComponentSpec props Void Void Void -> (props -> JSX) -> props -> JSX ``` Helper to make stateless component definition slightly @@ -139,17 +139,9 @@ Note: potential failure should be handled and converted to an #### `createComponent` ``` purescript -createComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: forall state. state, shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean, didMount :: forall props state action. Self props state action -> Effect Unit, didUpdate :: forall props state action. Self props state action -> Effect Unit, willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit, update :: forall props state action. Update props state action, render :: forall props state action. Self props state action -> JSX } +createComponent :: forall props state action. String -> ComponentSpec props state Void action ``` -#### `createStatelessComponent` - -``` purescript -createStatelessComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: Void, shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean, didMount :: forall props. Self props Void Void -> Effect Unit, didUpdate :: forall props. Self props Void Void -> Effect Unit, willUnmount :: forall props. LimitedSelf props Void -> Effect Unit, update :: forall props. Update props Void Void, render :: forall props. Self props Void Void -> JSX } -``` - -Creates a named, stateless component - #### `empty` ``` purescript @@ -207,7 +199,7 @@ For more information see: https://reactjs.org/docs/reconciliation.html#keys #### `toReactComponent` ``` purescript -toReactComponent :: forall props. ({ | props } -> JSX) -> ReactComponent { | props } +toReactComponent :: forall props state action. ComponentSpec { | props } state state action -> ReactComponent { | props } ``` diff --git a/generated-docs/React/Basic/Compat.md b/generated-docs/React/Basic/Compat.md index 95dce81..18be1c2 100644 --- a/generated-docs/React/Basic/Compat.md +++ b/generated-docs/React/Basic/Compat.md @@ -61,16 +61,22 @@ Semigroup JSX Monoid JSX ``` +#### `ComponentSpec` + +``` purescript +type ComponentSpec props state initialState action = { "$$type" :: ComponentType props state action, initialState :: initialState, shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: LimitedSelf props state -> Effect Unit, update :: Update props state action, render :: Self props state action -> JSX } +``` + #### `toReactComponent` ``` purescript -toReactComponent :: forall props. ({ | props } -> JSX) -> ReactComponent { | props } +toReactComponent :: forall props state action. ComponentSpec { | props } state state action -> ReactComponent { | props } ``` #### `makeStateless` ``` purescript -makeStateless :: forall props. ComponentSpec props Void Void -> (props -> JSX) -> props -> JSX +makeStateless :: forall props. ComponentSpec props Void Void Void -> (props -> JSX) -> props -> JSX ``` Helper to make stateless component definition slightly @@ -85,7 +91,7 @@ component = createStatelessComponent "Xyz" #### `make` ``` purescript -make :: forall props state action. ComponentSpec props state action -> props -> JSX +make :: forall props state action. ComponentSpec props state state action -> props -> JSX ``` Turn a `ComponentSpec` into a usable render function. @@ -165,17 +171,9 @@ element :: forall props. ReactComponent { | props } -> { | props } -> JSX Create a `JSX` node from a React component, by providing the props. -#### `createStatelessComponent` - -``` purescript -createStatelessComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: Void, shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean, didMount :: forall props. Self props Void Void -> Effect Unit, didUpdate :: forall props. Self props Void Void -> Effect Unit, willUnmount :: forall props. LimitedSelf props Void -> Effect Unit, update :: forall props. Update props Void Void, render :: forall props. Self props Void Void -> JSX } -``` - -Creates a named, stateless component - #### `createComponent` ``` purescript -createComponent :: String -> { "$$type" :: forall props. ReactComponent props, initialState :: forall state. state, shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean, didMount :: forall props state action. Self props state action -> Effect Unit, didUpdate :: forall props state action. Self props state action -> Effect Unit, willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit, update :: forall props state action. Update props state action, render :: forall props state action. Self props state action -> JSX } +createComponent :: forall props state action. String -> ComponentSpec props state Void action ``` diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 25a48ee..ac17bba 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -1,6 +1,5 @@ module React.Basic ( Component - , StatelessComponent , ComponentSpec , ComponentType , JSX @@ -14,7 +13,6 @@ module React.Basic , makeStateless , asyncEffects , createComponent - , createStatelessComponent , empty , keyed , fragment @@ -45,9 +43,9 @@ instance monoidJSX :: Monoid JSX where data ComponentType props state action -type ComponentSpec props state action = +type ComponentSpec props state initialState action = { "$$type" :: ComponentType props state action - , initialState :: state + , initialState :: initialState , shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean , didMount :: Self props state action -> Effect Unit , didUpdate :: Self props state action -> Effect Unit @@ -56,9 +54,7 @@ type ComponentSpec props state action = , render :: Self props state action -> JSX } -type Component = forall props state action. ComponentSpec props state action - -type StatelessComponent = forall props. ComponentSpec props Void Void +type Component = forall props state action. ComponentSpec props state Void action type Update props state action = Self props state action @@ -71,6 +67,25 @@ data StateUpdate props state action | SideEffects (Self props state action -> Effect Unit) | UpdateAndSideEffects state (Self props state action -> Effect Unit) +type Self props state action = + { props :: props + , state :: state + , readProps :: Effect props + , readState :: Effect state + , send :: action -> Effect Unit + + -- | Unsafe, but still frequently better than rewriting a + -- | whold component in JS + , instance_ :: ReactComponentInstance + } + +type LimitedSelf props state = + { props :: props + , state :: state + } + +data ReactComponentInstance + -- | Convenience function for sending an action asynchronously. -- | -- | Note: potential failure should be handled and converted to an @@ -146,7 +161,7 @@ buildStateUpdate = case _ of -- | ``` foreign import make :: forall props state action - . ComponentSpec props state action + . ComponentSpec props state state action -> props -> JSX @@ -160,78 +175,31 @@ foreign import make -- | ``` makeStateless :: forall props - . ComponentSpec props Void Void + . ComponentSpec props Void Void Void -> (props -> JSX) -> props -> JSX makeStateless component render = make component { render = \self -> render self.props } -type Self props state action = - { props :: props - , state :: state - , readProps :: Effect props - , readState :: Effect state - , send :: action -> Effect Unit - - -- | Unsafe, but still frequently better than rewriting a - -- | whold component in JS - , instance_ :: ReactComponentInstance - } - -type LimitedSelf props state = - { props :: props - , state :: state - } - data ReactComponent props -data ReactComponentInstance - createComponent - :: String - -> { "$$type" :: forall props state action. ComponentType props state action - , initialState :: forall state. state - , shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean - , didMount :: forall props state action. Self props state action -> Effect Unit - , didUpdate :: forall props state action. Self props state action -> Effect Unit - , willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit - , update :: forall props state action. Update props state action - , render :: forall props state action. Self props state action -> JSX - } + :: forall props state action + . String + -> ComponentSpec props state Void action createComponent = runFn3 createComponent_ NoUpdate buildStateUpdate foreign import createComponent_ - :: Fn3 - (forall props state action. StateUpdate props state action) - (forall props state action. StateUpdate props state action + :: forall props state action + . Fn3 + (StateUpdate props state action) + (StateUpdate props state action -> { state :: Nullable state , effects :: Nullable (Self props state action -> Effect Unit) }) String - ({ "$$type" :: forall props state action. ComponentType props state action - , initialState :: forall state. state - , shouldUpdate :: forall props state. LimitedSelf props state -> props -> state -> Boolean - , didMount :: forall props state action. Self props state action -> Effect Unit - , didUpdate :: forall props state action. Self props state action -> Effect Unit - , willUnmount :: forall props state action. LimitedSelf props state -> Effect Unit - , update :: forall props state action. Update props state action - , render :: forall props state action. Self props state action -> JSX - }) - --- | Creates a named, stateless component -createStatelessComponent - :: String - -> { "$$type" :: forall props state action. ComponentType props Void Void - , initialState :: Void - , shouldUpdate :: forall props. LimitedSelf props Void -> props -> Void -> Boolean - , didMount :: forall props. Self props Void Void -> Effect Unit - , didUpdate :: forall props. Self props Void Void -> Effect Unit - , willUnmount :: forall props. LimitedSelf props Void -> Effect Unit - , update :: forall props. Update props Void Void - , render :: forall props. Self props Void Void -> JSX - } -createStatelessComponent = createComponent + (ComponentSpec props state Void action) -- | An empty node. This is often useful when you would like to conditionally -- | show something, but you don't want to (or can't) modify the `children` prop @@ -267,14 +235,28 @@ element = runFn2 element_ -- | Like `element`, plus a `key` for rendering components in a dynamic list. -- | For more information see: https://reactjs.org/docs/reconciliation.html#keys -elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX +elementKeyed + :: forall props + . ReactComponent { | props } + -> { key :: String | props } + -> JSX elementKeyed = runFn2 elementKeyed_ -foreign import element_ :: forall props. Fn2 (ReactComponent { | props }) { | props } JSX +foreign import element_ + :: forall props + . Fn2 (ReactComponent { | props }) { | props } JSX -foreign import elementKeyed_ :: forall props. Fn2 (ReactComponent { | props }) { key :: String | props } JSX +foreign import elementKeyed_ + :: forall props + . Fn2 (ReactComponent { | props }) { key :: String | props } JSX -foreign import toReactComponent :: forall props state action. ComponentSpec { | props } state action -> ReactComponent { | props } +foreign import toReactComponent + :: forall props state action + . ComponentSpec { | props } state state action + -> ReactComponent { | props } -displayName :: forall props state action. ComponentSpec props state action -> String +displayName + :: forall props state initialState action + . ComponentSpec props state initialState action + -> String displayName = _.displayName <<< unsafeCoerce <<< _."$$type" diff --git a/src/React/Basic/Compat.purs b/src/React/Basic/Compat.purs index 5273119..6e46b98 100644 --- a/src/React/Basic/Compat.purs +++ b/src/React/Basic/Compat.purs @@ -8,7 +8,7 @@ module React.Basic.Compat import Prelude import Effect (Effect) -import React.Basic (JSX, ReactComponent, Self, StateUpdate(..), createComponent, createStatelessComponent, element, elementKeyed, empty, fragment, fragmentKeyed, make, makeStateless, toReactComponent) +import React.Basic (JSX, ReactComponent, Self, StateUpdate(..), ComponentSpec, createComponent, element, elementKeyed, empty, fragment, fragmentKeyed, make, makeStateless, toReactComponent) type Component = ReactComponent @@ -44,6 +44,6 @@ stateless } -> ReactComponent { | props } stateless { displayName, render } = - toReactComponent (createStatelessComponent displayName) + toReactComponent (createComponent displayName) { render = \self -> render self.props } From 9935a0c3b1e4c038e4a43c079501751b6c61985c Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Wed, 10 Oct 2018 00:16:06 -0600 Subject: [PATCH 07/28] Fix shouldUpdate ffi --- src/React/Basic.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/React/Basic.js b/src/React/Basic.js index 3ed90df..010fefb 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -90,7 +90,9 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { Component.displayName = displayName; Component.prototype.shouldComponentUpdate = function(nextProps, nextState) { - return this.$$spec.shouldUpdate(contextToSelf(this))(nextProps)(nextState); + return this.$$spec.shouldUpdate(contextToSelf(this))(nextProps.$$props)( + nextState === null ? null : nextState.$$state + ); }; Component.prototype.componentDidMount = function() { From c4a2988b1459ac885c29cb4ac6068506bb12d457 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Fri, 12 Oct 2018 15:32:04 -0600 Subject: [PATCH 08/28] Restore package-lock.json --- package-lock.json | 4330 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 4330 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a609272 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4330 @@ +{ + "name": "purescript-react-basic", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "JSONStream": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz", + "integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "acorn": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "acorn-node": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.5.2.tgz", + "integrity": "sha512-krFKvw/d1F17AN3XZbybIUzEY4YEPNiGo05AfP3dBlfVKrMHETKpgjpuZkSF8qDNt9UkQcqj7am8yJLseklCMg==", + "dev": true, + "requires": { + "acorn": "^5.7.1", + "acorn-dynamic-import": "^3.0.0", + "xtend": "^4.0.1" + } + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "app-cache-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/app-cache-dir/-/app-cache-dir-0.3.0.tgz", + "integrity": "sha512-VBd9owDbwIj3cKvt87ji+OGhz+6zgA0qj9OkDhErAJyxX5G0CrHKmxHVKCWbglbLnaKoivKGpq+v2tWzlOeXOQ==", + "dev": true, + "requires": { + "inspect-with-kind": "^1.0.2" + } + }, + "append-type": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/append-type/-/append-type-1.0.1.tgz", + "integrity": "sha512-ro+W6UHJuoA2NXqKHug9bmXDbPB3eCALjcJOsYjgI9cz9cjLFthvincBCWjk25VFzJmIUHd8saOWZZBuMycXrg==", + "dev": true + }, + "arch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", + "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", + "dev": true + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "bower": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.4.tgz", + "integrity": "sha1-54dqB23rgTf30GUl3F6MZtuC8oo=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browserify": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-13.3.0.tgz", + "integrity": "sha1-tanJAgJD8McORnW+yCI7xifkFc4=", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.1.2", + "buffer": "^4.1.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.1", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "~1.1.0", + "duplexer2": "~0.1.2", + "events": "~1.1.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "~0.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "module-deps": "^4.0.8", + "os-browserify": "~0.1.1", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^2.0.0", + "string_decoder": "~0.10.0", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "~0.0.0", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "~0.0.1", + "xtend": "^4.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + } + } + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + } + } + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cache-api": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/browserify-cache-api/-/browserify-cache-api-3.0.1.tgz", + "integrity": "sha1-liR+hT8Gj9bg1FzHPwuyzZd47wI=", + "dev": true, + "requires": { + "async": "^1.5.2", + "through2": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "browserify-incremental": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/browserify-incremental/-/browserify-incremental-3.1.1.tgz", + "integrity": "sha1-BxPLdYckemMqnwjPG9FpuHi2Koo=", + "dev": true, + "requires": { + "JSONStream": "^0.10.0", + "browserify-cache-api": "^3.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "JSONStream": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.10.0.tgz", + "integrity": "sha1-dDSdDYlSK3HzDwoD/5vSDKbxKsA=", + "dev": true, + "requires": { + "jsonparse": "0.0.5", + "through": ">=2.2.7 <3" + } + }, + "jsonparse": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", + "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=", + "dev": true + } + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "dev": true, + "requires": { + "pako": "~0.2.0" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "build-purescript": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/build-purescript/-/build-purescript-0.2.3.tgz", + "integrity": "sha512-oIBeOxbEHG8don4jqxCMhZxoXCqk21jIqN+a9U/8jiiwYOAS6KcssxcTklhE+LzEIsBx/hh8cObQ5Lupos/mVw==", + "dev": true, + "requires": { + "download-purescript-source": "^0.4.0", + "feint": "^1.0.2", + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0", + "rimraf": "^2.6.2", + "spawn-stack": "^0.5.0", + "zen-observable": "^0.6.1" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + } + } + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cached-path-relative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", + "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", + "dev": true + }, + "cancelable-pump": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.2.0.tgz", + "integrity": "sha1-hlZl1MI6aXiNS830mNt0DxsjDVc=", + "dev": true, + "requires": { + "pump": "^1.0.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-stack": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", + "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "colors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.0.tgz", + "integrity": "sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw==", + "dev": true + }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "dev": true, + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + } + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "deps-sort": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detective": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "dev": true, + "requires": { + "acorn": "^5.2.1", + "defined": "^1.0.0" + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dl-tar": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/dl-tar/-/dl-tar-0.6.0.tgz", + "integrity": "sha512-bh6sKubl/RzCNC6v6PEim13GDA0D0OEq8j1yqORFQrVnH8C1aaP2xb4BSRP8VxFPKYVvAi4zzDEBMr72z2M9Wg==", + "dev": true, + "requires": { + "cancelable-pump": "^0.2.0", + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "is-stream": "^1.1.0", + "load-request-from-cwd-or-npm": "^2.0.1", + "tar-fs": "^1.16.0", + "tar-stream": "^1.5.5", + "zen-observable": "^0.6.1" + } + }, + "dl-tgz": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/dl-tgz/-/dl-tgz-0.6.0.tgz", + "integrity": "sha512-pkf0P6EwWfVmpbFTvgfrWOh9JvrCwW/bnx2i+M9ffKfKCP20B/3ZHRL/jGXL8nuZ+TQcI/rsasx1fzjf+expmQ==", + "dev": true, + "requires": { + "dl-tar": "^0.6.0", + "is-plain-obj": "^1.1.0", + "zen-observable": "^0.6.1" + } + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "dev": true + }, + "download-or-build-purescript": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/download-or-build-purescript/-/download-or-build-purescript-0.0.9.tgz", + "integrity": "sha512-1SOq5zLZd2Nh1bmyQUhMlmZoUxuUMYYTHcyU8kR2Y9nRRiuogEWQcD2+SiJfEl5S6Ap+S4x2hVNP3bbQp0/80g==", + "dev": true, + "requires": { + "build-purescript": "^0.2.0", + "download-purescript": "0.5.0-0", + "execa": "^0.10.0", + "feint": "^1.0.2", + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "once": "^1.4.0", + "prepare-write": "^0.3.1", + "spawn-stack": "^0.5.0", + "which": "^1.3.0", + "zen-observable": "^0.6.0" + }, + "dependencies": { + "prepare-write": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/prepare-write/-/prepare-write-0.3.1.tgz", + "integrity": "sha512-p4NqFH9qi2Qjkh8OxdUSbF32+OVp6j/Vu/RQC/v0Yar5nWdmLQvDm+uEjy9Z8c+HgqC0tS0eZRLHnn+AWAk3Hg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.2", + "is-dir": "^1.0.0", + "mkdirp": "^0.5.1" + } + } + } + }, + "download-purescript": { + "version": "0.5.0-0", + "resolved": "https://registry.npmjs.org/download-purescript/-/download-purescript-0.5.0-0.tgz", + "integrity": "sha512-oBjNPPBBB/zcsIvn9VUgL+YnT9E3dSszwISKmPxU4ehIkAisysrII8pvQAoQRxSikppJhmajo/VYEpa5LD0whQ==", + "dev": true, + "requires": { + "dl-tgz": "^0.6.0", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "zen-observable": "^0.6.1" + } + }, + "download-purescript-source": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/download-purescript-source/-/download-purescript-source-0.4.0.tgz", + "integrity": "sha512-Y+5VqajGu9uv63XbY7R27UZGplqxQkyYMg52nSBHQMOyML/2TIm4HmP3trTSM2lxFR4yCeKGQgPas35OERCFWg==", + "dev": true, + "requires": { + "dl-tgz": "^0.6.0", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "zen-observable": "^0.6.1" + } + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "feint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/feint/-/feint-1.0.2.tgz", + "integrity": "sha512-PC77rn63FAMGcmHEkuGh4AdofqI6/c/YGjyvLo60mGLcCOHUUzCnKFzoij062piVgBblkl/KlN1vHGVJsK88cg==", + "dev": true, + "requires": { + "append-type": "^1.0.1" + } + }, + "file-to-tar": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/file-to-tar/-/file-to-tar-0.3.1.tgz", + "integrity": "sha512-bFYkxQR2weH7Bgdj6Dxuo+0rRZagcqY0uuu2CcXUdrOp8TFfkGYEdHy3uSqLiwhkXCcFFDk0584bdIyyEvJKBA==", + "dev": true, + "requires": { + "cancelable-pump": "^0.4.0", + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "is-stream": "^1.1.0", + "mkdirp": "^0.5.1", + "tar-fs": "^1.16.2", + "zen-observable": "^0.6.1" + }, + "dependencies": { + "cancelable-pump": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.4.0.tgz", + "integrity": "sha512-7Yvp8ADC9exD0Kdq/Q35UD5wOiuXTTLp159gFHC+uMQvjRMllrsM6EUKnozmIe43yesLBiH/ni0KD69k07yzZQ==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz", + "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", + "dev": true + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "~0.5.3" + } + }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + } + }, + "inspect-with-kind": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/inspect-with-kind/-/inspect-with-kind-1.0.4.tgz", + "integrity": "sha512-KN8VFSf62Ig4hyXtXODkWF6PIatrCIJF32KY8tQUwwLtgfNsr+3ZIpd+epM+pRbC86nJZycBPjWwziDvn/+6YQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "install-purescript": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/install-purescript/-/install-purescript-0.4.0.tgz", + "integrity": "sha512-hXfy12CP/aSCxEhx75kA2jTsbUrkQYFwbolNIrFcFVaiSYc3GpEcAsLqSuijzMCtfxAq+2S6Uw5o6QrVVNVpwQ==", + "dev": true, + "requires": { + "app-cache-dir": "^0.3.0", + "arch": "^2.1.0", + "download-or-build-purescript": "^0.0.9", + "execa": "^0.10.0", + "feint": "1.0.2", + "file-to-tar": "^0.3.1", + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "once": "^1.4.0", + "prepare-write": "^1.0.0", + "readdir-clean": "^1.0.0", + "rimraf": "^2.6.2", + "tar-to-file": "^0.4.0", + "tilde-path": "^2.0.0", + "truncated-list": "^1.0.1", + "zen-observable": "^0.6.1" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + } + } + }, + "install-purescript-cli": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/install-purescript-cli/-/install-purescript-cli-0.3.0.tgz", + "integrity": "sha512-fxxJ2nnKfDHli530XVz7w5bd5I7UKODtVjMLJuvpOHPSqPfHgOPqHat2vjPTqaW5B4sHt3NYGopvt/fYPfwl2A==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "install-purescript": "^0.4.0", + "log-symbols": "^2.2.0", + "log-update": "^2.3.0", + "minimist": "^1.2.0", + "ms": "^2.1.1", + "neat-frame": "^1.0.1", + "neat-stack": "^1.0.0", + "once": "^1.4.0", + "platform-name": "^1.0.0", + "size-rate": "^0.1.0", + "tilde-path": "^2.0.0", + "tty-truncate": "^1.0.0", + "vertical-meter": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-dir/-/is-dir-1.0.0.tgz", + "integrity": "sha1-QdN/SV/MrMBaR3jWboMCTCkro/8=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "junk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/junk/-/junk-2.1.0.tgz", + "integrity": "sha1-9DG0t/By3FAKXxDOf07HGTDnATQ=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "labeled-stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", + "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "isarray": "^2.0.4", + "stream-splicer": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", + "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", + "dev": true + } + } + }, + "load-from-cwd-or-npm": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/load-from-cwd-or-npm/-/load-from-cwd-or-npm-2.2.2.tgz", + "integrity": "sha512-Ox0Cl1RfKMKrwqhBqYADWeFspY28bhlaJVe08GJqYtVYoE0kyAnWBOnw3V/+HDoeWb7o33X/ZUcvamIlJ4O4Gg==", + "dev": true, + "requires": { + "inspect-with-kind": "^1.0.4", + "npm-cli-dir": "^2.0.1", + "optional": "^0.1.4", + "resolve-from-npm": "^2.0.4" + } + }, + "load-request-from-cwd-or-npm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/load-request-from-cwd-or-npm/-/load-request-from-cwd-or-npm-2.0.1.tgz", + "integrity": "sha512-RMDblVBrhyatt2KBScYzbPZrg2KGOryEdcAXIF3Jh3nqcE1awqUtJABwkPv1UrC802QFFxn/mn10m9dHN+fXrQ==", + "dev": true, + "requires": { + "load-from-cwd-or-npm": "^2.2.1" + } + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "log-update": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", + "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "cli-cursor": "^2.0.0", + "wrap-ansi": "^3.0.1" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "module-deps": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", + "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.0", + "defined": "^1.0.0", + "detective": "^4.0.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.3", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + } + } + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + } + } + }, + "mold-source-map": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/mold-source-map/-/mold-source-map-0.4.0.tgz", + "integrity": "sha1-z2fgsxxHq5uttcnCVlGGISe7gxc=", + "dev": true, + "requires": { + "convert-source-map": "^1.1.0", + "through": "~2.2.7" + }, + "dependencies": { + "through": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz", + "integrity": "sha1-bo4hIAGR1OtqmfbwEN9Gqhxusr0=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neat-frame": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/neat-frame/-/neat-frame-1.0.1.tgz", + "integrity": "sha512-4rcKecmbH5Wkk/iIzvN9E0x1OtFOLbGNIcag8z+oedZPhqWOVKZ+YOvoK6bA32Z7TbC7xhSgF2cVpiAePZCtEA==", + "dev": true, + "requires": { + "inspect-with-kind": "^1.0.4", + "string-width": "^2.1.1", + "term-size": "^1.2.0", + "wrap-ansi": "^3.0.1" + } + }, + "neat-stack": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/neat-stack/-/neat-stack-1.0.0.tgz", + "integrity": "sha512-T8/XRUmzb+trkqF3gEKFZoidbOodhXIKYvDwO0yi9cVs+6f0geF4xy/VOEX2v3ewUq+OJnpBldXUjiC7Ng+cyw==", + "dev": true, + "requires": { + "chalk": "^2.4.0", + "clean-stack": "^1.3.0" + } + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "dev": true + }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "dev": true + }, + "node-static": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/node-static/-/node-static-0.7.10.tgz", + "integrity": "sha512-bd7zO5hvCWzdglgwz9t82T4mYTEUzEG5pXnSqEzitvmEacusbhl8/VwuCbMaYR9g2PNK5191yBtAEQLJEmQh1A==", + "dev": true, + "requires": { + "colors": ">=0.6.0", + "mime": "^1.2.9", + "optimist": ">=0.3.4" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-cli-dir": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-cli-dir/-/npm-cli-dir-2.0.2.tgz", + "integrity": "sha512-ibO7mB5Na7yv4fFTi39y3dKeK0D51ttyldqqOZKR9GU0Qwr0FFycQhXIliwqzNCVRkNi/iTG0D9WIVt7pP+vGQ==", + "dev": true, + "requires": { + "npm-cli-path": "^2.0.1" + } + }, + "npm-cli-path": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/npm-cli-path/-/npm-cli-path-2.0.3.tgz", + "integrity": "sha512-DX+QTbHxnUIY6trC0y6JtBsPMqsMAgHbvLABwhtBjIKKy+6sg7Bq41tbWxtRT6t3yxigIePWXzKy+t285Tv56w==", + "dev": true, + "requires": { + "real-executable-path": "^2.0.2", + "win-user-installed-npm-cli-path": "^2.0.2" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optional": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", + "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==", + "dev": true + }, + "os-browserify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", + "dev": true + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "~0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "platform-name": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/platform-name/-/platform-name-1.0.0.tgz", + "integrity": "sha512-ZRbqJ30uRRKGKW2O1XnG/Ls1K/aBGlnyjq1Z0BbjqDPTNN+XZKFaugCsCm3/mq6XGR5DZNVdV75afpQEvNNY3Q==", + "dev": true, + "requires": { + "inspect-with-kind": "^1.0.4" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prepare-write": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prepare-write/-/prepare-write-1.0.0.tgz", + "integrity": "sha512-p3OWhGbr3136RlcX5hRY1ohxUV0PoP0Xy1hAbHo2U1LA6IMJYeu9t9AqBI/08iMh2F+4zzH5aVxKgqoTh/45ig==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.4", + "is-dir": "^1.0.0", + "mkdirp": "^0.5.1" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pulp": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/pulp/-/pulp-12.3.0.tgz", + "integrity": "sha512-Sm1XQg2h2JBVHWK3bxSHnmMdMoM0hEi5cbGfBBLpM6E2qU1vjJhDJsO/8bEkxC2RvNAAEOWROKMI3tTzmVxLbQ==", + "dev": true, + "requires": { + "browserify": "^13.1.0", + "browserify-incremental": "^3.0.1", + "concat-stream": "^1.4.6", + "glob": "^7.1.1", + "minimatch": "^3.0.3", + "mold-source-map": "^0.4.0", + "node-static": "^0.7.9", + "read": "^1.0.7", + "sorcery": "^0.10.0", + "string-stream": "0.0.7", + "temp": "^0.8.1", + "through": "^2.3.8", + "tree-kill": "^1.0.0", + "watchpack": "^1.0.1", + "which": "^1.2.1", + "wordwrap": "1.0.0" + } + }, + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "purescript": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/purescript/-/purescript-0.12.0.tgz", + "integrity": "sha512-q9kYKqjcukY3/4xdu3wk13Qs6po3NQR1QLGTmyVgqjKpz8l7coZCAx5Ajpi3u2Qla7eXurgD3mWFo0iMOUzUUA==", + "dev": true, + "requires": { + "install-purescript-cli": "^0.4.0 || ^0.3.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "rate-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rate-map/-/rate-map-1.0.1.tgz", + "integrity": "sha512-7Y7PeDrzR/hA3QP//S3Kt/8v9zyjwSzWeFPbMEtqwLg8jyUNgmh039NyNKguR9e9ixAhmDB7yuz9kZxlujuQ7Q==", + "dev": true, + "requires": { + "append-type": "^1.0.1" + } + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "readdir-clean": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readdir-clean/-/readdir-clean-1.0.0.tgz", + "integrity": "sha512-9+/foOFyAlmXdMLIsrSm/aoBxnSQ+8fruH814Z3hm5xlwfKYP35qhdJH05KYSSd0RUw9cPEKqvgKdGNjn88aYg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "junk": "^2.1.0" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "real-executable-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/real-executable-path/-/real-executable-path-2.0.2.tgz", + "integrity": "sha512-fRv44zvrzFeItoj/f/SNBqO/VWUHSZeqQ28oPOzd6weXaiRG6OVGu7UrHe6pY8JlXeoe/7gWYv6kOFHmHk4EFw==", + "dev": true, + "requires": { + "real-executable-path-callback": "^2.1.2" + } + }, + "real-executable-path-callback": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/real-executable-path-callback/-/real-executable-path-callback-2.1.2.tgz", + "integrity": "sha512-dyOgKEhLKNg9tgFPs354X5fQpaAsUT+3dTO3JYoNLdPhMmRDjwwre6zHw58biFMVeFx9yxwI6MC7iMDfxSuMJA==", + "dev": true, + "requires": { + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "which": "^1.3.0" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-from-npm": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/resolve-from-npm/-/resolve-from-npm-2.0.4.tgz", + "integrity": "sha512-JrwN+SRILVjq/mdPNd6bhoOvYMBFf0CYqvfAgaDGB9dWjyr3XDAe40O2WcxToYWMmbQabM4FM6hHVLcSxBPKOQ==", + "dev": true, + "requires": { + "inspect-with-kind": "^1.0.3", + "npm-cli-dir": "^2.0.2", + "resolve-from": "^4.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", + "dev": true, + "requires": { + "es6-promise": "^3.1.2", + "graceful-fs": "^4.1.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.2" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true + }, + "size-rate": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/size-rate/-/size-rate-0.1.0.tgz", + "integrity": "sha512-Yinx2XAfbhJu+Pxz1TD3xFT6nPB54+wyRd4u82Kq+ZqzOtaODYS5/7QJtlOcRxJLUvNXMzJKGvJ/O1KyN/9+hQ==", + "dev": true, + "requires": { + "filesize": "^3.5.10", + "inspect-with-kind": "^1.0.2" + } + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sorcery": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", + "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", + "dev": true, + "requires": { + "buffer-crc32": "^0.2.5", + "minimist": "^1.2.0", + "sander": "^0.5.0", + "sourcemap-codec": "^1.3.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", + "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==", + "dev": true + }, + "spawn-stack": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/spawn-stack/-/spawn-stack-0.5.0.tgz", + "integrity": "sha512-suwvBV2WNTOYe/TQBoAFrGbdRvo5t/pWYq/vNw24wbSmIJXr/eaadsF+92VyPm2dBYsYwBnsTLhQFCo3EdCA+Q==", + "dev": true, + "requires": { + "byline": "^5.0.0", + "execa": "^0.10.0", + "inspect-with-kind": "^1.0.4", + "zen-observable": "^0.6.1" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "string-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/string-stream/-/string-stream-0.0.7.tgz", + "integrity": "sha1-z83oJ5n6YvMDQpqqeTNu6INDMv4=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "^1.1.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "requires": { + "acorn-node": "^1.2.0" + } + }, + "tar-fs": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.2.tgz", + "integrity": "sha512-LdknWjPEiZC1nOBwhv0JBzfJBGPJar08dZg2rwZe0ZTLQoRGEzgrl7vF3qUEkCHpI/wN9e7RyCuDhMsJUCLPPQ==", + "dev": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + } + }, + "tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.1.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.0", + "xtend": "^4.0.0" + } + }, + "tar-to-file": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tar-to-file/-/tar-to-file-0.4.0.tgz", + "integrity": "sha512-DFRBSotqmgeMrU/H7z0VIMPv8taOheRUlAhi6Q+r5Xso9xoa5vez/Z3uvASSzuT1dwe2orAdENT7NXlAh1zwvA==", + "dev": true, + "requires": { + "cancelable-pump": "^0.4.0", + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.4", + "is-plain-obj": "^1.1.0", + "is-stream": "^1.1.0", + "tar-fs": "^1.16.2", + "tar-stream": "^1.6.1", + "zen-observable": "^0.6.1" + }, + "dependencies": { + "cancelable-pump": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.4.0.tgz", + "integrity": "sha512-7Yvp8ADC9exD0Kdq/Q35UD5wOiuXTTLp159gFHC+uMQvjRMllrsM6EUKnozmIe43yesLBiH/ni0KD69k07yzZQ==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "dev": true, + "requires": { + "os-tmpdir": "^1.0.0", + "rimraf": "~2.2.6" + }, + "dependencies": { + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + } + } + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "^0.7.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + } + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "tilde-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tilde-path/-/tilde-path-2.0.0.tgz", + "integrity": "sha512-3aDt7b/wBbxJjUTMiCW+uu7iqrB6F1DfxSL0qB4biSrP1+knIPveccs7thL34AkzPZ/0T7+oYXZDKiokMc1d6g==", + "dev": true + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "~0.11.0" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tree-kill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", + "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", + "dev": true + }, + "truncated-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/truncated-list/-/truncated-list-1.0.1.tgz", + "integrity": "sha512-aNcDZ1PfxAtUXXLEmy+m1D465lFv0VgWltGlTWuJuhPh+FGeOiHV9S2DYOD8IEgZU8yOInZBRHVcAts+xIYzew==", + "dev": true, + "requires": { + "inspect-with-kind": "^1.0.4" + } + }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "tty-truncate": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tty-truncate/-/tty-truncate-1.0.0.tgz", + "integrity": "sha512-pUnGE8KQJl/aGOkPtAPXcKnJRPNBzn/c+9gWFPtGPtayGUp0luLyM3RST10g5UbybJAWlHUuYjIO4NXsilg6nA==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "inspect-with-kind": "^1.0.4", + "slice-ansi": "^1.0.0", + "string-width": "^2.1.1" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true + }, + "undeclared-identifiers": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", + "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "vertical-meter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vertical-meter/-/vertical-meter-1.0.0.tgz", + "integrity": "sha512-xvtone0DHRBrWSBVF2p3+/KSz/mzHvDZ7+HYB3g68hBpqIC3tIF8J1maf5osHPKHB/45iq2B+T4ju/mfxArd/Q==", + "dev": true, + "requires": { + "rate-map": "^1.0.1" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "win-user-installed-npm-cli-path": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/win-user-installed-npm-cli-path/-/win-user-installed-npm-cli-path-2.0.4.tgz", + "integrity": "sha512-i+fSInL3Li47P9gGcJabtgvl2+hLmZwMsh4664WWuI1F/pQPtv4XerrOyg8poxvDv4o/QwB60f20MKtIX/CCxQ==", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", + "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "zen-observable": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.6.1.tgz", + "integrity": "sha512-DKjFTL7siVLIUMZOFZ0alqMEdTsXPUxoCZzrvB2tdWEVN/6606Qh1nCfSTCAOZMrtcPzzFI3BXmwBKLAew52NA==", + "dev": true + } + } +} From 7436a0ce17a7ffe147fea3b59409664b11533bb6 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Mon, 15 Oct 2018 09:50:03 -0600 Subject: [PATCH 09/28] Formatting --- src/React/Basic.purs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/React/Basic.purs b/src/React/Basic.purs index ac17bba..59ae66b 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -44,14 +44,14 @@ instance monoidJSX :: Monoid JSX where data ComponentType props state action type ComponentSpec props state initialState action = - { "$$type" :: ComponentType props state action + { "$$type" :: ComponentType props state action , initialState :: initialState , shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean - , didMount :: Self props state action -> Effect Unit - , didUpdate :: Self props state action -> Effect Unit - , willUnmount :: LimitedSelf props state -> Effect Unit - , update :: Update props state action - , render :: Self props state action -> JSX + , didMount :: Self props state action -> Effect Unit + , didUpdate :: Self props state action -> Effect Unit + , willUnmount :: LimitedSelf props state -> Effect Unit + , update :: Update props state action + , render :: Self props state action -> JSX } type Component = forall props state action. ComponentSpec props state Void action @@ -63,16 +63,16 @@ type Update props state action data StateUpdate props state action = NoUpdate - | Update state - | SideEffects (Self props state action -> Effect Unit) + | Update state + | SideEffects (Self props state action -> Effect Unit) | UpdateAndSideEffects state (Self props state action -> Effect Unit) type Self props state action = - { props :: props - , state :: state + { props :: props + , state :: state , readProps :: Effect props , readState :: Effect state - , send :: action -> Effect Unit + , send :: action -> Effect Unit -- | Unsafe, but still frequently better than rewriting a -- | whold component in JS @@ -195,7 +195,7 @@ foreign import createComponent_ . Fn3 (StateUpdate props state action) (StateUpdate props state action - -> { state :: Nullable state + -> { state :: Nullable state , effects :: Nullable (Self props state action -> Effect Unit) }) String From 3560a7d6eccc0653a2f1a886f853661b37d5faed Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 16 Oct 2018 20:21:13 -0600 Subject: [PATCH 10/28] Provide self-bound event handling functions --- examples/component/src/ToggleButton.purs | 3 +- .../controlled-input/src/ControlledInput.purs | 12 +- examples/counter/src/Counter.purs | 3 +- generated-docs/React/Basic.md | 205 -- generated-docs/React/Basic/Compat.md | 179 -- generated-docs/React/Basic/DOM.md | 2199 ----------------- generated-docs/React/Basic/DOM/Events.md | 233 -- generated-docs/React/Basic/DOM/Generated.md | 2047 --------------- generated-docs/React/Basic/DOM/Internal.md | 25 - generated-docs/React/Basic/Events.md | 122 - src/React/Basic.js | 27 +- src/React/Basic.purs | 36 +- 12 files changed, 59 insertions(+), 5032 deletions(-) delete mode 100644 generated-docs/React/Basic.md delete mode 100644 generated-docs/React/Basic/Compat.md delete mode 100644 generated-docs/React/Basic/DOM.md delete mode 100644 generated-docs/React/Basic/DOM/Events.md delete mode 100644 generated-docs/React/Basic/DOM/Generated.md delete mode 100644 generated-docs/React/Basic/DOM/Internal.md delete mode 100644 generated-docs/React/Basic/Events.md diff --git a/examples/component/src/ToggleButton.purs b/examples/component/src/ToggleButton.purs index 091e1a2..650d7fc 100644 --- a/examples/component/src/ToggleButton.purs +++ b/examples/component/src/ToggleButton.purs @@ -5,7 +5,6 @@ import Prelude import Effect.Console (log) import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) import React.Basic.DOM as R -import React.Basic.Events as Events type Props = { label :: String @@ -29,7 +28,7 @@ render = make component , render = \self -> R.button - { onClick: Events.handler_ do self.send Toggle + { onClick: self.capture identity $ const Toggle , children: [ R.text self.props.label , R.text if self.state.on diff --git a/examples/controlled-input/src/ControlledInput.purs b/examples/controlled-input/src/ControlledInput.purs index e936d48..83b6fbe 100644 --- a/examples/controlled-input/src/ControlledInput.purs +++ b/examples/controlled-input/src/ControlledInput.purs @@ -6,8 +6,8 @@ import Data.Maybe (Maybe(..), fromMaybe, maybe) import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) import React.Basic as React import React.Basic.DOM as R -import React.Basic.DOM.Events (preventDefault, targetValue, timeStamp) -import React.Basic.Events as Events +import React.Basic.DOM.Events (targetValue, timeStamp) +import React.Basic.Events (merge) type Props = {} @@ -32,11 +32,9 @@ render = make component React.fragment [ R.input { onChange: - Events.handler - (preventDefault >>> Events.merge { targetValue, timeStamp }) - \{ timeStamp, targetValue } -> - self.send $ - ValueChanged (fromMaybe "" targetValue) timeStamp + self.capture + (merge { targetValue, timeStamp }) + \{ timeStamp, targetValue } -> ValueChanged (fromMaybe "" targetValue) timeStamp , value: self.state.value } , R.p_ [ R.text ("Current value = " <> show self.state.value) ] diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index 2c6753a..0bf1c62 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -4,7 +4,6 @@ import Prelude import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) import React.Basic.DOM as R -import React.Basic.Events as Events type Props = { label :: String @@ -23,7 +22,7 @@ render = make component , render = \self -> R.button - { onClick: Events.handler_ do self.send Increment + { onClick: self.capture identity $ const Increment , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] } } diff --git a/generated-docs/React/Basic.md b/generated-docs/React/Basic.md deleted file mode 100644 index e4bbaa5..0000000 --- a/generated-docs/React/Basic.md +++ /dev/null @@ -1,205 +0,0 @@ -## Module React.Basic - -#### `Component` - -``` purescript -type Component = forall props state action. ComponentSpec props state Void action -``` - -#### `ComponentSpec` - -``` purescript -type ComponentSpec props state initialState action = { "$$type" :: ComponentType props state action, initialState :: initialState, shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: LimitedSelf props state -> Effect Unit, update :: Update props state action, render :: Self props state action -> JSX } -``` - -#### `ComponentType` - -``` purescript -data ComponentType props state action -``` - -#### `JSX` - -``` purescript -data JSX :: Type -``` - -A virtual DOM element. - -##### Instances -``` purescript -Semigroup JSX -Monoid JSX -``` - -#### `Update` - -``` purescript -type Update props state action = Self props state action -> action -> StateUpdate props state action -``` - -#### `StateUpdate` - -``` purescript -data StateUpdate props state action - = NoUpdate - | Update state - | SideEffects (Self props state action -> Effect Unit) - | UpdateAndSideEffects state (Self props state action -> Effect Unit) -``` - -#### `Self` - -``` purescript -type Self props state action = { props :: props, state :: state, readProps :: Effect props, readState :: Effect state, send :: action -> Effect Unit, instance_ :: ReactComponentInstance } -``` - -#### `LimitedSelf` - -``` purescript -type LimitedSelf props state = { props :: props, state :: state } -``` - -#### `ReactComponent` - -``` purescript -data ReactComponent props -``` - -#### `ReactComponentInstance` - -``` purescript -data ReactComponentInstance -``` - -#### `make` - -``` purescript -make :: forall props state action. ComponentSpec props state state action -> props -> JSX -``` - -Turn a `ComponentSpec` into a usable render function. -This is usually where you will want to provide customized -implementations: - -```purs -type Props = - { label :: String - } - -data Action - = Increment - -render :: Props -> JSX -render = make component - { initialState = { counter: 0 } - - , update = \self action -> case action of - Increment -> - Update self.state { counter = self.state.counter + 1 } - - , render = \self -> - R.button - { onClick: Events.handler_ do self.send Increment - , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] - } - } - -component :: Component -component = createComponent "Counter" -``` - -#### `makeStateless` - -``` purescript -makeStateless :: forall props. ComponentSpec props Void Void Void -> (props -> JSX) -> props -> JSX -``` - -Helper to make stateless component definition slightly -less verbose: - -```purs -render = makeStateless component \props -> JSX - -component = createStatelessComponent "Xyz" -``` - -#### `asyncEffects` - -``` purescript -asyncEffects :: forall props state action. (Self props state action -> Aff action) -> Self props state action -> Effect Unit -``` - -Convenience function for sending an action asynchronously. - -Note: potential failure should be handled and converted to an - action, as the default error handler will simply log the - error to the console. - -#### `createComponent` - -``` purescript -createComponent :: forall props state action. String -> ComponentSpec props state Void action -``` - -#### `empty` - -``` purescript -empty :: JSX -``` - -An empty node. This is often useful when you would like to conditionally -show something, but you don't want to (or can't) modify the `children` prop -on the parent node. - -#### `keyed` - -``` purescript -keyed :: String -> JSX -> JSX -``` - -Apply a React key to a sub-tree. - -#### `fragment` - -``` purescript -fragment :: Array JSX -> JSX -``` - -Render an Array of children without a wrapping component. - -#### `fragmentKeyed` - -``` purescript -fragmentKeyed :: String -> Array JSX -> JSX -``` - -Render an Array of children without a wrapping component. - -Provide a key when dynamically rendering multiple fragments along side -each other. - -#### `element` - -``` purescript -element :: forall props. ReactComponent { | props } -> { | props } -> JSX -``` - -Create a `JSX` node from a React component, by providing the props. - -#### `elementKeyed` - -``` purescript -elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX -``` - -Like `element`, plus a `key` for rendering components in a dynamic list. -For more information see: https://reactjs.org/docs/reconciliation.html#keys - -#### `toReactComponent` - -``` purescript -toReactComponent :: forall props state action. ComponentSpec { | props } state state action -> ReactComponent { | props } -``` - - diff --git a/generated-docs/React/Basic/Compat.md b/generated-docs/React/Basic/Compat.md deleted file mode 100644 index 18be1c2..0000000 --- a/generated-docs/React/Basic/Compat.md +++ /dev/null @@ -1,179 +0,0 @@ -## Module React.Basic.Compat - -#### `Component` - -``` purescript -type Component = ReactComponent -``` - -#### `component` - -``` purescript -component :: forall props state. { displayName :: String, initialState :: { | state }, receiveProps :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> Effect Unit, render :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> JSX } -> ReactComponent { | props } -``` - -Supports a common subset of the v2 API to ease the upgrade process - -#### `stateless` - -``` purescript -stateless :: forall props. { displayName :: String, render :: { | props } -> JSX } -> ReactComponent { | props } -``` - -Supports a common subset of the v2 API to ease the upgrade process - - -### Re-exported from React.Basic: - -#### `StateUpdate` - -``` purescript -data StateUpdate props state action - = NoUpdate - | Update state - | SideEffects (Self props state action -> Effect Unit) - | UpdateAndSideEffects state (Self props state action -> Effect Unit) -``` - -#### `Self` - -``` purescript -type Self props state action = { props :: props, state :: state, readProps :: Effect props, readState :: Effect state, send :: action -> Effect Unit, instance_ :: ReactComponentInstance } -``` - -#### `ReactComponent` - -``` purescript -data ReactComponent props -``` - -#### `JSX` - -``` purescript -data JSX :: Type -``` - -A virtual DOM element. - -##### Instances -``` purescript -Semigroup JSX -Monoid JSX -``` - -#### `ComponentSpec` - -``` purescript -type ComponentSpec props state initialState action = { "$$type" :: ComponentType props state action, initialState :: initialState, shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: LimitedSelf props state -> Effect Unit, update :: Update props state action, render :: Self props state action -> JSX } -``` - -#### `toReactComponent` - -``` purescript -toReactComponent :: forall props state action. ComponentSpec { | props } state state action -> ReactComponent { | props } -``` - -#### `makeStateless` - -``` purescript -makeStateless :: forall props. ComponentSpec props Void Void Void -> (props -> JSX) -> props -> JSX -``` - -Helper to make stateless component definition slightly -less verbose: - -```purs -render = makeStateless component \props -> JSX - -component = createStatelessComponent "Xyz" -``` - -#### `make` - -``` purescript -make :: forall props state action. ComponentSpec props state state action -> props -> JSX -``` - -Turn a `ComponentSpec` into a usable render function. -This is usually where you will want to provide customized -implementations: - -```purs -type Props = - { label :: String - } - -data Action - = Increment - -render :: Props -> JSX -render = make component - { initialState = { counter: 0 } - - , update = \self action -> case action of - Increment -> - Update self.state { counter = self.state.counter + 1 } - - , render = \self -> - R.button - { onClick: Events.handler_ do self.send Increment - , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] - } - } - -component :: Component -component = createComponent "Counter" -``` - -#### `fragmentKeyed` - -``` purescript -fragmentKeyed :: String -> Array JSX -> JSX -``` - -Render an Array of children without a wrapping component. - -Provide a key when dynamically rendering multiple fragments along side -each other. - -#### `fragment` - -``` purescript -fragment :: Array JSX -> JSX -``` - -Render an Array of children without a wrapping component. - -#### `empty` - -``` purescript -empty :: JSX -``` - -An empty node. This is often useful when you would like to conditionally -show something, but you don't want to (or can't) modify the `children` prop -on the parent node. - -#### `elementKeyed` - -``` purescript -elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX -``` - -Like `element`, plus a `key` for rendering components in a dynamic list. -For more information see: https://reactjs.org/docs/reconciliation.html#keys - -#### `element` - -``` purescript -element :: forall props. ReactComponent { | props } -> { | props } -> JSX -``` - -Create a `JSX` node from a React component, by providing the props. - -#### `createComponent` - -``` purescript -createComponent :: forall props state action. String -> ComponentSpec props state Void action -``` - diff --git a/generated-docs/React/Basic/DOM.md b/generated-docs/React/Basic/DOM.md deleted file mode 100644 index 7afcb7b..0000000 --- a/generated-docs/React/Basic/DOM.md +++ /dev/null @@ -1,2199 +0,0 @@ -## Module React.Basic.DOM - -This module defines helper functions for creating virtual DOM elements -safely. - -Note: DOM element props are provided as records, and checked using `Union` -constraints. This means that we don't need to provide all props, but any we -do provide must have the correct types. - -#### `render` - -``` purescript -render :: JSX -> Element -> Effect Unit -``` - -Render or update/re-render a component tree into -a DOM element. - -Note: Relies on `ReactDOM.render` - -#### `render'` - -``` purescript -render' :: JSX -> Element -> Effect Unit -> Effect Unit -``` - -Render or update/re-render a component tree into -a DOM element. The given Effect is run once the -DOM update is complete. - -Note: Relies on `ReactDOM.render` - -#### `hydrate` - -``` purescript -hydrate :: JSX -> Element -> Effect Unit -``` - -Render or update/re-render a component tree into -a DOM element, attempting to reuse the existing -DOM tree. - -Note: Relies on `ReactDOM.hydrate`, generally only - used with `ReactDOMServer.renderToNodeStream` or - `ReactDOMServer.renderToString` - -#### `hydrate'` - -``` purescript -hydrate' :: JSX -> Element -> Effect Unit -> Effect Unit -``` - -Render or update/re-render a component tree into -a DOM element, attempting to reuse the existing -DOM tree. The given Effect is run once the -DOM update is complete. - -Note: Relies on `ReactDOM.hydrate`, generally only - used with `ReactDOMServer.renderToNodeStream` or - `ReactDOMServer.renderToString` - -#### `unmount` - -``` purescript -unmount :: Element -> Effect Boolean -``` - -Attempt to unmount and clean up the React app -rendered into the given element. Returns `true` -if an app existed and was unmounted successfully. - -Note: Relies on `ReactDOM.unmountComponentAtNode` - -#### `findDOMNode` - -``` purescript -findDOMNode :: ReactComponentInstance -> Effect (Either Error Node) -``` - -Returns the current DOM node associated with the given -instance, or an Error if no node was found or the given -instance was not mounted. - -Note: Relies on `ReactDOM.findDOMNode` - -#### `createPortal` - -``` purescript -createPortal :: JSX -> Element -> JSX -``` - -Divert a render tree into a separate DOM node. The node's -content will be overwritten and managed by React, similar -to `render` and `hydrate`. - -#### `text` - -``` purescript -text :: String -> JSX -``` - -Create a text node. - -#### `css` - -``` purescript -css :: forall css. { | css } -> CSS -``` - -Create a value of type `CSS` (which can be provided to the `style` property) -from a plain record of CSS attributes. - -E.g. - -``` -div { style: css { padding: "5px" } } [ text "This text is padded." ] -``` - -#### `mergeStyles` - -``` purescript -mergeStyles :: Array CSS -> CSS -``` - -Merge styles from right to left. Uses `Object.assign`. - -E.g. - -``` -style: mergeCSS [ (css { padding: "5px" }), props.style ] -``` - - -### Re-exported from React.Basic.DOM.Generated: - -#### `Props_wbr` - -``` purescript -type Props_wbr = () -``` - -#### `Props_video` - -``` purescript -type Props_video = (children :: Array JSX, controls :: Boolean, height :: String, loop :: Boolean, muted :: Boolean, playsInline :: Boolean, poster :: String, preload :: String, src :: String, width :: String) -``` - -#### `Props_var` - -``` purescript -type Props_var = (children :: Array JSX) -``` - -#### `Props_ul` - -``` purescript -type Props_ul = (children :: Array JSX, "type" :: String) -``` - -#### `Props_u` - -``` purescript -type Props_u = (children :: Array JSX) -``` - -#### `Props_track` - -``` purescript -type Props_track = (default :: Boolean, kind :: String, label :: String, src :: String) -``` - -#### `Props_tr` - -``` purescript -type Props_tr = (children :: Array JSX) -``` - -#### `Props_title` - -``` purescript -type Props_title = (children :: Array JSX) -``` - -#### `Props_time` - -``` purescript -type Props_time = (children :: Array JSX) -``` - -#### `Props_thead` - -``` purescript -type Props_thead = (children :: Array JSX) -``` - -#### `Props_th` - -``` purescript -type Props_th = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) -``` - -#### `Props_tfoot` - -``` purescript -type Props_tfoot = (children :: Array JSX) -``` - -#### `Props_textarea` - -``` purescript -type Props_textarea = (autoCapitalize :: String, autoCorrect :: String, children :: Array JSX, cols :: Number, defaultValue :: String, disabled :: Boolean, form :: String, name :: String, onChange :: EventHandler, placeholder :: String, required :: Boolean, rows :: Number, value :: String, wrap :: String) -``` - -#### `Props_template` - -``` purescript -type Props_template = (children :: Array JSX) -``` - -#### `Props_td` - -``` purescript -type Props_td = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) -``` - -#### `Props_tbody` - -``` purescript -type Props_tbody = (children :: Array JSX) -``` - -#### `Props_table` - -``` purescript -type Props_table = (children :: Array JSX, summary :: String, width :: String) -``` - -#### `Props_svg` - -``` purescript -type Props_svg = (accentHeight :: String, accumulate :: String, additive :: String, alignmentBaseline :: String, allowReorder :: String, alphabetic :: String, amplitude :: String, arabicForm :: String, ascent :: String, attributeName :: String, attributeType :: String, autoReverse :: String, azimuth :: String, baseFrequency :: String, baseProfile :: String, baselineShift :: String, bbox :: String, begin :: String, bias :: String, by :: String, calcMode :: String, capHeight :: String, children :: Array JSX, clip :: String, clipPath :: String, clipPathUnits :: String, clipRule :: String, color :: String, colorInterpolation :: String, colorInterpolationFilters :: String, colorProfile :: String, colorRendering :: String, contentScriptType :: String, contentStyleType :: String, cursor :: String, cx :: String, cy :: String, d :: String, decelerate :: String, descent :: String, diffuseConstant :: String, direction :: String, display :: String, divisor :: String, dominantBaseline :: String, dur :: String, dx :: String, dy :: String, edgeMode :: String, elevation :: String, enableBackground :: String, end :: String, exponent :: String, externalResourcesRequired :: String, fill :: String, fillOpacity :: String, fillRule :: String, filter :: String, filterRes :: String, filterUnits :: String, floodColor :: String, floodOpacity :: String, focusable :: String, fontFamily :: String, fontSize :: String, fontSizeAdjust :: String, fontStretch :: String, fontStyle :: String, fontVariant :: String, fontWeight :: String, format :: String, from :: String, fx :: String, fy :: String, g1 :: String, g2 :: String, glyphName :: String, glyphOrientationHorizontal :: String, glyphOrientationVertical :: String, glyphRef :: String, gradientTransform :: String, gradientUnits :: String, hanging :: String, height :: String, horizAdvX :: String, horizOriginX :: String, ideographic :: String, imageRendering :: String, "in" :: String, in2 :: String, intercept :: String, k :: String, k1 :: String, k2 :: String, k3 :: String, k4 :: String, kernelMatrix :: String, kernelUnitLength :: String, kerning :: String, keyPoints :: String, keySplines :: String, keyTimes :: String, lengthAdjust :: String, letterSpacing :: String, lightingColor :: String, limitingConeAngle :: String, local :: String, markerEnd :: String, markerHeight :: String, markerMid :: String, markerStart :: String, markerUnits :: String, markerWidth :: String, mask :: String, maskContentUnits :: String, maskUnits :: String, mathematical :: String, mode :: String, numOctaves :: String, offset :: String, opacity :: String, operator :: String, order :: String, orient :: String, orientation :: String, origin :: String, overflow :: String, overlinePosition :: String, overlineThickness :: String, paintOrder :: String, panose1 :: String, pathLength :: String, patternContentUnits :: String, patternTransform :: String, patternUnits :: String, pointerEvents :: String, points :: String, pointsAtX :: String, pointsAtY :: String, pointsAtZ :: String, preserveAlpha :: String, preserveAspectRatio :: String, primitiveUnits :: String, r :: String, radius :: String, refX :: String, refY :: String, renderingIntent :: String, repeatCount :: String, repeatDur :: String, requiredExtensions :: String, requiredFeatures :: String, restart :: String, result :: String, rotate :: String, rx :: String, ry :: String, scale :: String, seed :: String, shapeRendering :: String, slope :: String, spacing :: String, specularConstant :: String, specularExponent :: String, speed :: String, spreadMethod :: String, startOffset :: String, stdDeviation :: String, stemh :: String, stemv :: String, stitchTiles :: String, stopColor :: String, stopOpacity :: String, strikethroughPosition :: String, strikethroughThickness :: String, string :: String, stroke :: String, strokeDasharray :: String, strokeDashoffset :: String, strokeLinecap :: String, strokeLinejoin :: String, strokeMiterlimit :: String, strokeOpacity :: String, strokeWidth :: String, surfaceScale :: String, systemLanguage :: String, tableValues :: String, targetX :: String, targetY :: String, textAnchor :: String, textDecoration :: String, textLength :: String, textRendering :: String, to :: String, transform :: String, u1 :: String, u2 :: String, underlinePosition :: String, underlineThickness :: String, unicode :: String, unicodeBidi :: String, unicodeRange :: String, unitsPerEm :: String, vAlphabetic :: String, vHanging :: String, vIdeographic :: String, vMathematical :: String, values :: String, vectorEffect :: String, version :: String, vertAdvY :: String, vertOriginX :: String, vertOriginY :: String, viewBox :: String, viewTarget :: String, visibility :: String, width :: String, widths :: String, wordSpacing :: String, writingMode :: String, x :: String, x1 :: String, x2 :: String, xChannelSelector :: String, xHeight :: String, xlinkActuate :: String, xlinkArcrole :: String, xlinkHref :: String, xlinkRole :: String, xlinkShow :: String, xlinkTitle :: String, xlinkType :: String, xmlBase :: String, xmlLang :: String, xmlSpace :: String, xmlns :: String, xmlnsXlink :: String, y :: String, y1 :: String, y2 :: String, yChannelSelector :: String, z :: String, zoomAndPan :: String) -``` - -#### `Props_sup` - -``` purescript -type Props_sup = (children :: Array JSX) -``` - -#### `Props_summary` - -``` purescript -type Props_summary = (children :: Array JSX) -``` - -#### `Props_sub` - -``` purescript -type Props_sub = (children :: Array JSX) -``` - -#### `Props_style` - -``` purescript -type Props_style = (children :: Array JSX, media :: String, nonce :: String, title :: String, "type" :: String) -``` - -#### `Props_strong` - -``` purescript -type Props_strong = (children :: Array JSX) -``` - -#### `Props_span` - -``` purescript -type Props_span = (children :: Array JSX) -``` - -#### `Props_source` - -``` purescript -type Props_source = (media :: String, sizes :: String, src :: String, "type" :: String) -``` - -#### `Props_small` - -``` purescript -type Props_small = (children :: Array JSX) -``` - -#### `Props_slot` - -``` purescript -type Props_slot = (children :: Array JSX, name :: String) -``` - -#### `Props_select` - -``` purescript -type Props_select = (children :: Array JSX, defaultValue :: String, disabled :: Boolean, form :: String, multiple :: Boolean, name :: String, onChange :: EventHandler, required :: Boolean, size :: Number, value :: String) -``` - -#### `Props_section` - -``` purescript -type Props_section = (children :: Array JSX) -``` - -#### `Props_script` - -``` purescript -type Props_script = (async :: Boolean, children :: Array JSX, defer :: Boolean, integrity :: String, nonce :: String, src :: String, "type" :: String) -``` - -#### `Props_samp` - -``` purescript -type Props_samp = (children :: Array JSX) -``` - -#### `Props_s` - -``` purescript -type Props_s = (children :: Array JSX) -``` - -#### `Props_ruby` - -``` purescript -type Props_ruby = (children :: Array JSX) -``` - -#### `Props_rtc` - -``` purescript -type Props_rtc = (children :: Array JSX) -``` - -#### `Props_rt` - -``` purescript -type Props_rt = (children :: Array JSX) -``` - -#### `Props_rp` - -``` purescript -type Props_rp = (children :: Array JSX) -``` - -#### `Props_rb` - -``` purescript -type Props_rb = (children :: Array JSX) -``` - -#### `Props_q` - -``` purescript -type Props_q = (children :: Array JSX, cite :: String) -``` - -#### `Props_progress` - -``` purescript -type Props_progress = (children :: Array JSX, max :: Number, value :: String) -``` - -#### `Props_pre` - -``` purescript -type Props_pre = (children :: Array JSX, width :: String) -``` - -#### `Props_picture` - -``` purescript -type Props_picture = (children :: Array JSX) -``` - -#### `Props_param` - -``` purescript -type Props_param = (name :: String, "type" :: String, value :: String) -``` - -#### `Props_p` - -``` purescript -type Props_p = (children :: Array JSX) -``` - -#### `Props_output` - -``` purescript -type Props_output = (children :: Array JSX, form :: String, name :: String) -``` - -#### `Props_option` - -``` purescript -type Props_option = (children :: Array JSX, disabled :: Boolean, label :: String, selected :: Boolean, value :: String) -``` - -#### `Props_optgroup` - -``` purescript -type Props_optgroup = (children :: Array JSX, disabled :: Boolean, label :: String) -``` - -#### `Props_ol` - -``` purescript -type Props_ol = (children :: Array JSX, reversed :: Boolean, start :: Number, "type" :: String) -``` - -#### `Props_object` - -``` purescript -type Props_object = (children :: Array JSX, "data" :: String, form :: String, height :: String, name :: String, "type" :: String, width :: String) -``` - -#### `Props_noscript` - -``` purescript -type Props_noscript = (children :: Array JSX) -``` - -#### `Props_nav` - -``` purescript -type Props_nav = (children :: Array JSX) -``` - -#### `Props_meter` - -``` purescript -type Props_meter = (children :: Array JSX, high :: String, low :: String, max :: Number, min :: Number, optimum :: String, value :: String) -``` - -#### `Props_meta` - -``` purescript -type Props_meta = (content :: String, name :: String) -``` - -#### `Props_menuitem` - -``` purescript -type Props_menuitem = (children :: Array JSX) -``` - -#### `Props_menu` - -``` purescript -type Props_menu = (children :: Array JSX) -``` - -#### `Props_math` - -``` purescript -type Props_math = (children :: Array JSX) -``` - -#### `Props_mark` - -``` purescript -type Props_mark = (children :: Array JSX) -``` - -#### `Props_map` - -``` purescript -type Props_map = (children :: Array JSX, name :: String) -``` - -#### `Props_main` - -``` purescript -type Props_main = (children :: Array JSX) -``` - -#### `Props_link` - -``` purescript -type Props_link = (color :: String, href :: String, integrity :: String, media :: String, nonce :: String, rel :: String, scope :: String, sizes :: String, target :: String, title :: String, "type" :: String) -``` - -#### `Props_li` - -``` purescript -type Props_li = (children :: Array JSX, "type" :: String, value :: String) -``` - -#### `Props_legend` - -``` purescript -type Props_legend = (children :: Array JSX) -``` - -#### `Props_label` - -``` purescript -type Props_label = (children :: Array JSX, form :: String) -``` - -#### `Props_keygen` - -``` purescript -type Props_keygen = (challenge :: String, children :: Array JSX, disabled :: Boolean, form :: String, name :: String) -``` - -#### `Props_kbd` - -``` purescript -type Props_kbd = (children :: Array JSX) -``` - -#### `Props_ins` - -``` purescript -type Props_ins = (children :: Array JSX, cite :: String) -``` - -#### `Props_input` - -``` purescript -type Props_input = (accept :: String, alt :: String, autoCapitalize :: String, autoCorrect :: String, autoSave :: String, checked :: Boolean, defaultChecked :: String, defaultValue :: String, disabled :: Boolean, form :: String, height :: String, list :: String, max :: Number, min :: Number, multiple :: Boolean, name :: String, onChange :: EventHandler, pattern :: String, placeholder :: String, required :: Boolean, results :: String, size :: Number, src :: String, step :: String, title :: String, "type" :: String, value :: String, width :: String) -``` - -#### `Props_img` - -``` purescript -type Props_img = (alt :: String, height :: String, name :: String, sizes :: String, src :: String, width :: String) -``` - -#### `Props_iframe` - -``` purescript -type Props_iframe = (children :: Array JSX, height :: String, name :: String, sandbox :: String, scrolling :: String, src :: String, width :: String) -``` - -#### `Props_i` - -``` purescript -type Props_i = (children :: Array JSX) -``` - -#### `Props_html` - -``` purescript -type Props_html = (children :: Array JSX, manifest :: String) -``` - -#### `Props_hr` - -``` purescript -type Props_hr = (size :: Number, width :: String) -``` - -#### `Props_hgroup` - -``` purescript -type Props_hgroup = (children :: Array JSX) -``` - -#### `Props_header` - -``` purescript -type Props_header = (children :: Array JSX) -``` - -#### `Props_head` - -``` purescript -type Props_head = (children :: Array JSX, profile :: String) -``` - -#### `Props_h6` - -``` purescript -type Props_h6 = (children :: Array JSX) -``` - -#### `Props_h5` - -``` purescript -type Props_h5 = (children :: Array JSX) -``` - -#### `Props_h4` - -``` purescript -type Props_h4 = (children :: Array JSX) -``` - -#### `Props_h3` - -``` purescript -type Props_h3 = (children :: Array JSX) -``` - -#### `Props_h2` - -``` purescript -type Props_h2 = (children :: Array JSX) -``` - -#### `Props_h1` - -``` purescript -type Props_h1 = (children :: Array JSX) -``` - -#### `Props_form` - -``` purescript -type Props_form = (accept :: String, action :: String, children :: Array JSX, method :: String, name :: String, onChange :: EventHandler, onInput :: EventHandler, onInvalid :: EventHandler, onSubmit :: EventHandler, target :: String) -``` - -#### `Props_footer` - -``` purescript -type Props_footer = (children :: Array JSX) -``` - -#### `Props_figure` - -``` purescript -type Props_figure = (children :: Array JSX) -``` - -#### `Props_figcaption` - -``` purescript -type Props_figcaption = (children :: Array JSX) -``` - -#### `Props_fieldset` - -``` purescript -type Props_fieldset = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String) -``` - -#### `Props_embed` - -``` purescript -type Props_embed = (height :: String, src :: String, "type" :: String, width :: String) -``` - -#### `Props_em` - -``` purescript -type Props_em = (children :: Array JSX) -``` - -#### `Props_dt` - -``` purescript -type Props_dt = (children :: Array JSX) -``` - -#### `Props_dl` - -``` purescript -type Props_dl = (children :: Array JSX) -``` - -#### `Props_div` - -``` purescript -type Props_div = (children :: Array JSX) -``` - -#### `Props_dialog` - -``` purescript -type Props_dialog = (children :: Array JSX, open :: Boolean) -``` - -#### `Props_dfn` - -``` purescript -type Props_dfn = (children :: Array JSX, title :: String) -``` - -#### `Props_details` - -``` purescript -type Props_details = (children :: Array JSX, open :: Boolean) -``` - -#### `Props_del` - -``` purescript -type Props_del = (children :: Array JSX, cite :: String) -``` - -#### `Props_dd` - -``` purescript -type Props_dd = (children :: Array JSX) -``` - -#### `Props_datalist` - -``` purescript -type Props_datalist = (children :: Array JSX) -``` - -#### `Props_data` - -``` purescript -type Props_data = (children :: Array JSX, value :: String) -``` - -#### `Props_colgroup` - -``` purescript -type Props_colgroup = (children :: Array JSX, span :: Number, width :: String) -``` - -#### `Props_col` - -``` purescript -type Props_col = (span :: Number, width :: String) -``` - -#### `Props_code` - -``` purescript -type Props_code = (children :: Array JSX) -``` - -#### `Props_cite` - -``` purescript -type Props_cite = (children :: Array JSX) -``` - -#### `Props_caption` - -``` purescript -type Props_caption = (children :: Array JSX) -``` - -#### `Props_canvas` - -``` purescript -type Props_canvas = (children :: Array JSX, height :: String, width :: String) -``` - -#### `Props_button` - -``` purescript -type Props_button = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String, "type" :: String, value :: String) -``` - -#### `Props_br` - -``` purescript -type Props_br = () -``` - -#### `Props_body` - -``` purescript -type Props_body = (children :: Array JSX) -``` - -#### `Props_blockquote` - -``` purescript -type Props_blockquote = (children :: Array JSX, cite :: String) -``` - -#### `Props_bdo` - -``` purescript -type Props_bdo = (children :: Array JSX, dir :: String) -``` - -#### `Props_bdi` - -``` purescript -type Props_bdi = (children :: Array JSX) -``` - -#### `Props_base` - -``` purescript -type Props_base = (href :: String, target :: String) -``` - -#### `Props_b` - -``` purescript -type Props_b = (children :: Array JSX) -``` - -#### `Props_audio` - -``` purescript -type Props_audio = (children :: Array JSX, controls :: Boolean, loop :: Boolean, muted :: Boolean, preload :: String, src :: String) -``` - -#### `Props_aside` - -``` purescript -type Props_aside = (children :: Array JSX) -``` - -#### `Props_article` - -``` purescript -type Props_article = (children :: Array JSX) -``` - -#### `Props_area` - -``` purescript -type Props_area = (alt :: String, coords :: String, download :: String, href :: String, rel :: String, shape :: String, target :: String, "type" :: String) -``` - -#### `Props_address` - -``` purescript -type Props_address = (children :: Array JSX) -``` - -#### `Props_abbr` - -``` purescript -type Props_abbr = (children :: Array JSX, title :: String) -``` - -#### `Props_a` - -``` purescript -type Props_a = (children :: Array JSX, coords :: String, download :: String, href :: String, name :: String, onClick :: EventHandler, rel :: String, shape :: String, target :: String, "type" :: String) -``` - -#### `wbr` - -``` purescript -wbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_wbr) => { | attrs } -> JSX -``` - -#### `video_` - -``` purescript -video_ :: Array JSX -> JSX -``` - -#### `video` - -``` purescript -video :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_video) => { | attrs } -> JSX -``` - -#### `var_` - -``` purescript -var_ :: Array JSX -> JSX -``` - -#### `var` - -``` purescript -var :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_var) => { | attrs } -> JSX -``` - -#### `ul_` - -``` purescript -ul_ :: Array JSX -> JSX -``` - -#### `ul` - -``` purescript -ul :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ul) => { | attrs } -> JSX -``` - -#### `u_` - -``` purescript -u_ :: Array JSX -> JSX -``` - -#### `u` - -``` purescript -u :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_u) => { | attrs } -> JSX -``` - -#### `track` - -``` purescript -track :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_track) => { | attrs } -> JSX -``` - -#### `tr_` - -``` purescript -tr_ :: Array JSX -> JSX -``` - -#### `tr` - -``` purescript -tr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tr) => { | attrs } -> JSX -``` - -#### `title_` - -``` purescript -title_ :: Array JSX -> JSX -``` - -#### `title` - -``` purescript -title :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_title) => { | attrs } -> JSX -``` - -#### `time_` - -``` purescript -time_ :: Array JSX -> JSX -``` - -#### `time` - -``` purescript -time :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_time) => { | attrs } -> JSX -``` - -#### `thead_` - -``` purescript -thead_ :: Array JSX -> JSX -``` - -#### `thead` - -``` purescript -thead :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_thead) => { | attrs } -> JSX -``` - -#### `th_` - -``` purescript -th_ :: Array JSX -> JSX -``` - -#### `th` - -``` purescript -th :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_th) => { | attrs } -> JSX -``` - -#### `tfoot_` - -``` purescript -tfoot_ :: Array JSX -> JSX -``` - -#### `tfoot` - -``` purescript -tfoot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tfoot) => { | attrs } -> JSX -``` - -#### `textarea_` - -``` purescript -textarea_ :: Array JSX -> JSX -``` - -#### `textarea` - -``` purescript -textarea :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_textarea) => { | attrs } -> JSX -``` - -#### `template_` - -``` purescript -template_ :: Array JSX -> JSX -``` - -#### `template` - -``` purescript -template :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_template) => { | attrs } -> JSX -``` - -#### `td_` - -``` purescript -td_ :: Array JSX -> JSX -``` - -#### `td` - -``` purescript -td :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_td) => { | attrs } -> JSX -``` - -#### `tbody_` - -``` purescript -tbody_ :: Array JSX -> JSX -``` - -#### `tbody` - -``` purescript -tbody :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tbody) => { | attrs } -> JSX -``` - -#### `table_` - -``` purescript -table_ :: Array JSX -> JSX -``` - -#### `table` - -``` purescript -table :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_table) => { | attrs } -> JSX -``` - -#### `svg_` - -``` purescript -svg_ :: Array JSX -> JSX -``` - -#### `svg` - -``` purescript -svg :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_svg) => { | attrs } -> JSX -``` - -#### `sup_` - -``` purescript -sup_ :: Array JSX -> JSX -``` - -#### `sup` - -``` purescript -sup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sup) => { | attrs } -> JSX -``` - -#### `summary_` - -``` purescript -summary_ :: Array JSX -> JSX -``` - -#### `summary` - -``` purescript -summary :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_summary) => { | attrs } -> JSX -``` - -#### `sub_` - -``` purescript -sub_ :: Array JSX -> JSX -``` - -#### `sub` - -``` purescript -sub :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sub) => { | attrs } -> JSX -``` - -#### `style_` - -``` purescript -style_ :: Array JSX -> JSX -``` - -#### `style` - -``` purescript -style :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_style) => { | attrs } -> JSX -``` - -#### `strong_` - -``` purescript -strong_ :: Array JSX -> JSX -``` - -#### `strong` - -``` purescript -strong :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_strong) => { | attrs } -> JSX -``` - -#### `span_` - -``` purescript -span_ :: Array JSX -> JSX -``` - -#### `span` - -``` purescript -span :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_span) => { | attrs } -> JSX -``` - -#### `source` - -``` purescript -source :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_source) => { | attrs } -> JSX -``` - -#### `small_` - -``` purescript -small_ :: Array JSX -> JSX -``` - -#### `small` - -``` purescript -small :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_small) => { | attrs } -> JSX -``` - -#### `slot_` - -``` purescript -slot_ :: Array JSX -> JSX -``` - -#### `slot` - -``` purescript -slot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_slot) => { | attrs } -> JSX -``` - -#### `select_` - -``` purescript -select_ :: Array JSX -> JSX -``` - -#### `select` - -``` purescript -select :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_select) => { | attrs } -> JSX -``` - -#### `section_` - -``` purescript -section_ :: Array JSX -> JSX -``` - -#### `section` - -``` purescript -section :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_section) => { | attrs } -> JSX -``` - -#### `script_` - -``` purescript -script_ :: Array JSX -> JSX -``` - -#### `script` - -``` purescript -script :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_script) => { | attrs } -> JSX -``` - -#### `samp_` - -``` purescript -samp_ :: Array JSX -> JSX -``` - -#### `samp` - -``` purescript -samp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_samp) => { | attrs } -> JSX -``` - -#### `s_` - -``` purescript -s_ :: Array JSX -> JSX -``` - -#### `s` - -``` purescript -s :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_s) => { | attrs } -> JSX -``` - -#### `ruby_` - -``` purescript -ruby_ :: Array JSX -> JSX -``` - -#### `ruby` - -``` purescript -ruby :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ruby) => { | attrs } -> JSX -``` - -#### `rtc_` - -``` purescript -rtc_ :: Array JSX -> JSX -``` - -#### `rtc` - -``` purescript -rtc :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rtc) => { | attrs } -> JSX -``` - -#### `rt_` - -``` purescript -rt_ :: Array JSX -> JSX -``` - -#### `rt` - -``` purescript -rt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rt) => { | attrs } -> JSX -``` - -#### `rp_` - -``` purescript -rp_ :: Array JSX -> JSX -``` - -#### `rp` - -``` purescript -rp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rp) => { | attrs } -> JSX -``` - -#### `rb_` - -``` purescript -rb_ :: Array JSX -> JSX -``` - -#### `rb` - -``` purescript -rb :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rb) => { | attrs } -> JSX -``` - -#### `q_` - -``` purescript -q_ :: Array JSX -> JSX -``` - -#### `q` - -``` purescript -q :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_q) => { | attrs } -> JSX -``` - -#### `progress_` - -``` purescript -progress_ :: Array JSX -> JSX -``` - -#### `progress` - -``` purescript -progress :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_progress) => { | attrs } -> JSX -``` - -#### `pre_` - -``` purescript -pre_ :: Array JSX -> JSX -``` - -#### `pre` - -``` purescript -pre :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_pre) => { | attrs } -> JSX -``` - -#### `picture_` - -``` purescript -picture_ :: Array JSX -> JSX -``` - -#### `picture` - -``` purescript -picture :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_picture) => { | attrs } -> JSX -``` - -#### `param` - -``` purescript -param :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_param) => { | attrs } -> JSX -``` - -#### `p_` - -``` purescript -p_ :: Array JSX -> JSX -``` - -#### `p` - -``` purescript -p :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_p) => { | attrs } -> JSX -``` - -#### `output_` - -``` purescript -output_ :: Array JSX -> JSX -``` - -#### `output` - -``` purescript -output :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_output) => { | attrs } -> JSX -``` - -#### `option_` - -``` purescript -option_ :: Array JSX -> JSX -``` - -#### `option` - -``` purescript -option :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_option) => { | attrs } -> JSX -``` - -#### `optgroup_` - -``` purescript -optgroup_ :: Array JSX -> JSX -``` - -#### `optgroup` - -``` purescript -optgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_optgroup) => { | attrs } -> JSX -``` - -#### `ol_` - -``` purescript -ol_ :: Array JSX -> JSX -``` - -#### `ol` - -``` purescript -ol :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ol) => { | attrs } -> JSX -``` - -#### `object_` - -``` purescript -object_ :: Array JSX -> JSX -``` - -#### `object` - -``` purescript -object :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_object) => { | attrs } -> JSX -``` - -#### `noscript_` - -``` purescript -noscript_ :: Array JSX -> JSX -``` - -#### `noscript` - -``` purescript -noscript :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_noscript) => { | attrs } -> JSX -``` - -#### `nav_` - -``` purescript -nav_ :: Array JSX -> JSX -``` - -#### `nav` - -``` purescript -nav :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_nav) => { | attrs } -> JSX -``` - -#### `meter_` - -``` purescript -meter_ :: Array JSX -> JSX -``` - -#### `meter` - -``` purescript -meter :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meter) => { | attrs } -> JSX -``` - -#### `meta` - -``` purescript -meta :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meta) => { | attrs } -> JSX -``` - -#### `menuitem_` - -``` purescript -menuitem_ :: Array JSX -> JSX -``` - -#### `menuitem` - -``` purescript -menuitem :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menuitem) => { | attrs } -> JSX -``` - -#### `menu_` - -``` purescript -menu_ :: Array JSX -> JSX -``` - -#### `menu` - -``` purescript -menu :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menu) => { | attrs } -> JSX -``` - -#### `math_` - -``` purescript -math_ :: Array JSX -> JSX -``` - -#### `math` - -``` purescript -math :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_math) => { | attrs } -> JSX -``` - -#### `mark_` - -``` purescript -mark_ :: Array JSX -> JSX -``` - -#### `mark` - -``` purescript -mark :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_mark) => { | attrs } -> JSX -``` - -#### `map_` - -``` purescript -map_ :: Array JSX -> JSX -``` - -#### `map` - -``` purescript -map :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_map) => { | attrs } -> JSX -``` - -#### `main_` - -``` purescript -main_ :: Array JSX -> JSX -``` - -#### `main` - -``` purescript -main :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_main) => { | attrs } -> JSX -``` - -#### `link` - -``` purescript -link :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_link) => { | attrs } -> JSX -``` - -#### `li_` - -``` purescript -li_ :: Array JSX -> JSX -``` - -#### `li` - -``` purescript -li :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_li) => { | attrs } -> JSX -``` - -#### `legend_` - -``` purescript -legend_ :: Array JSX -> JSX -``` - -#### `legend` - -``` purescript -legend :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_legend) => { | attrs } -> JSX -``` - -#### `label_` - -``` purescript -label_ :: Array JSX -> JSX -``` - -#### `label` - -``` purescript -label :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_label) => { | attrs } -> JSX -``` - -#### `keygen_` - -``` purescript -keygen_ :: Array JSX -> JSX -``` - -#### `keygen` - -``` purescript -keygen :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_keygen) => { | attrs } -> JSX -``` - -#### `kbd_` - -``` purescript -kbd_ :: Array JSX -> JSX -``` - -#### `kbd` - -``` purescript -kbd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_kbd) => { | attrs } -> JSX -``` - -#### `ins_` - -``` purescript -ins_ :: Array JSX -> JSX -``` - -#### `ins` - -``` purescript -ins :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ins) => { | attrs } -> JSX -``` - -#### `input` - -``` purescript -input :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_input) => { | attrs } -> JSX -``` - -#### `img` - -``` purescript -img :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_img) => { | attrs } -> JSX -``` - -#### `iframe_` - -``` purescript -iframe_ :: Array JSX -> JSX -``` - -#### `iframe` - -``` purescript -iframe :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_iframe) => { | attrs } -> JSX -``` - -#### `i_` - -``` purescript -i_ :: Array JSX -> JSX -``` - -#### `i` - -``` purescript -i :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_i) => { | attrs } -> JSX -``` - -#### `html_` - -``` purescript -html_ :: Array JSX -> JSX -``` - -#### `html` - -``` purescript -html :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_html) => { | attrs } -> JSX -``` - -#### `hr` - -``` purescript -hr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hr) => { | attrs } -> JSX -``` - -#### `hgroup_` - -``` purescript -hgroup_ :: Array JSX -> JSX -``` - -#### `hgroup` - -``` purescript -hgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hgroup) => { | attrs } -> JSX -``` - -#### `header_` - -``` purescript -header_ :: Array JSX -> JSX -``` - -#### `header` - -``` purescript -header :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_header) => { | attrs } -> JSX -``` - -#### `head_` - -``` purescript -head_ :: Array JSX -> JSX -``` - -#### `head` - -``` purescript -head :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_head) => { | attrs } -> JSX -``` - -#### `h6_` - -``` purescript -h6_ :: Array JSX -> JSX -``` - -#### `h6` - -``` purescript -h6 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h6) => { | attrs } -> JSX -``` - -#### `h5_` - -``` purescript -h5_ :: Array JSX -> JSX -``` - -#### `h5` - -``` purescript -h5 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h5) => { | attrs } -> JSX -``` - -#### `h4_` - -``` purescript -h4_ :: Array JSX -> JSX -``` - -#### `h4` - -``` purescript -h4 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h4) => { | attrs } -> JSX -``` - -#### `h3_` - -``` purescript -h3_ :: Array JSX -> JSX -``` - -#### `h3` - -``` purescript -h3 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h3) => { | attrs } -> JSX -``` - -#### `h2_` - -``` purescript -h2_ :: Array JSX -> JSX -``` - -#### `h2` - -``` purescript -h2 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h2) => { | attrs } -> JSX -``` - -#### `h1_` - -``` purescript -h1_ :: Array JSX -> JSX -``` - -#### `h1` - -``` purescript -h1 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h1) => { | attrs } -> JSX -``` - -#### `form_` - -``` purescript -form_ :: Array JSX -> JSX -``` - -#### `form` - -``` purescript -form :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_form) => { | attrs } -> JSX -``` - -#### `footer_` - -``` purescript -footer_ :: Array JSX -> JSX -``` - -#### `footer` - -``` purescript -footer :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_footer) => { | attrs } -> JSX -``` - -#### `figure_` - -``` purescript -figure_ :: Array JSX -> JSX -``` - -#### `figure` - -``` purescript -figure :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figure) => { | attrs } -> JSX -``` - -#### `figcaption_` - -``` purescript -figcaption_ :: Array JSX -> JSX -``` - -#### `figcaption` - -``` purescript -figcaption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figcaption) => { | attrs } -> JSX -``` - -#### `fieldset_` - -``` purescript -fieldset_ :: Array JSX -> JSX -``` - -#### `fieldset` - -``` purescript -fieldset :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_fieldset) => { | attrs } -> JSX -``` - -#### `embed` - -``` purescript -embed :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_embed) => { | attrs } -> JSX -``` - -#### `em_` - -``` purescript -em_ :: Array JSX -> JSX -``` - -#### `em` - -``` purescript -em :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_em) => { | attrs } -> JSX -``` - -#### `dt_` - -``` purescript -dt_ :: Array JSX -> JSX -``` - -#### `dt` - -``` purescript -dt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dt) => { | attrs } -> JSX -``` - -#### `dl_` - -``` purescript -dl_ :: Array JSX -> JSX -``` - -#### `dl` - -``` purescript -dl :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dl) => { | attrs } -> JSX -``` - -#### `div_` - -``` purescript -div_ :: Array JSX -> JSX -``` - -#### `div` - -``` purescript -div :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_div) => { | attrs } -> JSX -``` - -#### `dialog_` - -``` purescript -dialog_ :: Array JSX -> JSX -``` - -#### `dialog` - -``` purescript -dialog :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dialog) => { | attrs } -> JSX -``` - -#### `dfn_` - -``` purescript -dfn_ :: Array JSX -> JSX -``` - -#### `dfn` - -``` purescript -dfn :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dfn) => { | attrs } -> JSX -``` - -#### `details_` - -``` purescript -details_ :: Array JSX -> JSX -``` - -#### `details` - -``` purescript -details :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_details) => { | attrs } -> JSX -``` - -#### `del_` - -``` purescript -del_ :: Array JSX -> JSX -``` - -#### `del` - -``` purescript -del :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_del) => { | attrs } -> JSX -``` - -#### `dd_` - -``` purescript -dd_ :: Array JSX -> JSX -``` - -#### `dd` - -``` purescript -dd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dd) => { | attrs } -> JSX -``` - -#### `datalist_` - -``` purescript -datalist_ :: Array JSX -> JSX -``` - -#### `datalist` - -``` purescript -datalist :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_datalist) => { | attrs } -> JSX -``` - -#### `data_` - -``` purescript -data_ :: Array JSX -> JSX -``` - -#### `data'` - -``` purescript -data' :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_data) => { | attrs } -> JSX -``` - -#### `colgroup_` - -``` purescript -colgroup_ :: Array JSX -> JSX -``` - -#### `colgroup` - -``` purescript -colgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_colgroup) => { | attrs } -> JSX -``` - -#### `col` - -``` purescript -col :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_col) => { | attrs } -> JSX -``` - -#### `code_` - -``` purescript -code_ :: Array JSX -> JSX -``` - -#### `code` - -``` purescript -code :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_code) => { | attrs } -> JSX -``` - -#### `cite_` - -``` purescript -cite_ :: Array JSX -> JSX -``` - -#### `cite` - -``` purescript -cite :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_cite) => { | attrs } -> JSX -``` - -#### `caption_` - -``` purescript -caption_ :: Array JSX -> JSX -``` - -#### `caption` - -``` purescript -caption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_caption) => { | attrs } -> JSX -``` - -#### `canvas_` - -``` purescript -canvas_ :: Array JSX -> JSX -``` - -#### `canvas` - -``` purescript -canvas :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_canvas) => { | attrs } -> JSX -``` - -#### `button_` - -``` purescript -button_ :: Array JSX -> JSX -``` - -#### `button` - -``` purescript -button :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_button) => { | attrs } -> JSX -``` - -#### `br` - -``` purescript -br :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_br) => { | attrs } -> JSX -``` - -#### `body_` - -``` purescript -body_ :: Array JSX -> JSX -``` - -#### `body` - -``` purescript -body :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_body) => { | attrs } -> JSX -``` - -#### `blockquote_` - -``` purescript -blockquote_ :: Array JSX -> JSX -``` - -#### `blockquote` - -``` purescript -blockquote :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_blockquote) => { | attrs } -> JSX -``` - -#### `bdo_` - -``` purescript -bdo_ :: Array JSX -> JSX -``` - -#### `bdo` - -``` purescript -bdo :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdo) => { | attrs } -> JSX -``` - -#### `bdi_` - -``` purescript -bdi_ :: Array JSX -> JSX -``` - -#### `bdi` - -``` purescript -bdi :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdi) => { | attrs } -> JSX -``` - -#### `base` - -``` purescript -base :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_base) => { | attrs } -> JSX -``` - -#### `b_` - -``` purescript -b_ :: Array JSX -> JSX -``` - -#### `b` - -``` purescript -b :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_b) => { | attrs } -> JSX -``` - -#### `audio_` - -``` purescript -audio_ :: Array JSX -> JSX -``` - -#### `audio` - -``` purescript -audio :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_audio) => { | attrs } -> JSX -``` - -#### `aside_` - -``` purescript -aside_ :: Array JSX -> JSX -``` - -#### `aside` - -``` purescript -aside :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_aside) => { | attrs } -> JSX -``` - -#### `article_` - -``` purescript -article_ :: Array JSX -> JSX -``` - -#### `article` - -``` purescript -article :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_article) => { | attrs } -> JSX -``` - -#### `area` - -``` purescript -area :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_area) => { | attrs } -> JSX -``` - -#### `address_` - -``` purescript -address_ :: Array JSX -> JSX -``` - -#### `address` - -``` purescript -address :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_address) => { | attrs } -> JSX -``` - -#### `abbr_` - -``` purescript -abbr_ :: Array JSX -> JSX -``` - -#### `abbr` - -``` purescript -abbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_abbr) => { | attrs } -> JSX -``` - -#### `a_` - -``` purescript -a_ :: Array JSX -> JSX -``` - -#### `a` - -``` purescript -a :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_a) => { | attrs } -> JSX -``` - -### Re-exported from React.Basic.DOM.Internal: - -#### `SharedProps` - -``` purescript -type SharedProps specific = (key :: String, about :: String, acceptCharset :: String, accessKey :: String, allowFullScreen :: Boolean, allowTransparency :: String, autoComplete :: String, autoFocus :: String, autoPlay :: Boolean, capture :: Boolean, cellPadding :: String, cellSpacing :: String, charSet :: String, classID :: String, className :: String, colSpan :: Number, contentEditable :: String, contextMenu :: String, crossOrigin :: String, datatype :: String, dateTime :: String, dir :: String, draggable :: String, encType :: String, formAction :: String, formEncType :: String, formMethod :: String, formNoValidate :: String, formTarget :: String, frameBorder :: String, hidden :: Boolean, hrefLang :: String, htmlFor :: String, httpEquiv :: String, icon :: String, id :: String, inlist :: String, inputMode :: String, is :: String, itemID :: String, itemProp :: String, itemRef :: String, itemScope :: Boolean, itemType :: String, keyParams :: String, keyType :: String, lang :: String, marginHeight :: String, marginWidth :: String, maxLength :: String, mediaGroup :: String, minLength :: String, noValidate :: String, prefix :: String, property :: String, radioGroup :: String, readOnly :: Boolean, resource :: String, role :: String, rowSpan :: Number, scoped :: Boolean, seamless :: Boolean, security :: String, spellCheck :: String, srcDoc :: String, srcLang :: String, srcSet :: String, style :: CSS, tabIndex :: String, title :: String, typeof :: String, unselectable :: String, useMap :: String, vocab :: String, wmode :: String, onBlur :: EventHandler, onClick :: EventHandler, onFocus :: EventHandler | specific) -``` - -Standard props which are shared by all DOM elements. - -#### `CSS` - -``` purescript -data CSS :: Type -``` - -An abstract type representing records of CSS attributes. - -#### `unsafeCreateDOMComponent` - -``` purescript -unsafeCreateDOMComponent :: forall props. String -> ReactComponent props -``` - diff --git a/generated-docs/React/Basic/DOM/Events.md b/generated-docs/React/Basic/DOM/Events.md deleted file mode 100644 index 4b86a99..0000000 --- a/generated-docs/React/Basic/DOM/Events.md +++ /dev/null @@ -1,233 +0,0 @@ -## Module React.Basic.DOM.Events - -This module defines safe DOM event function and property accessors. - -#### `bubbles` - -``` purescript -bubbles :: EventFn SyntheticEvent Boolean -``` - -General event fields - -#### `cancelable` - -``` purescript -cancelable :: EventFn SyntheticEvent Boolean -``` - -#### `eventPhase` - -``` purescript -eventPhase :: EventFn SyntheticEvent Int -``` - -#### `eventPhaseNone` - -``` purescript -eventPhaseNone :: Int -``` - -#### `eventPhaseCapturing` - -``` purescript -eventPhaseCapturing :: Int -``` - -#### `eventPhaseAtTarget` - -``` purescript -eventPhaseAtTarget :: Int -``` - -#### `eventPhaseBubbling` - -``` purescript -eventPhaseBubbling :: Int -``` - -#### `isTrusted` - -``` purescript -isTrusted :: EventFn SyntheticEvent Boolean -``` - -#### `nativeEvent` - -``` purescript -nativeEvent :: EventFn SyntheticEvent Event -``` - -#### `preventDefault` - -``` purescript -preventDefault :: EventFn SyntheticEvent SyntheticEvent -``` - -#### `isDefaultPrevented` - -``` purescript -isDefaultPrevented :: EventFn SyntheticEvent Boolean -``` - -#### `stopPropagation` - -``` purescript -stopPropagation :: EventFn SyntheticEvent SyntheticEvent -``` - -#### `isPropagationStopped` - -``` purescript -isPropagationStopped :: EventFn SyntheticEvent Boolean -``` - -#### `target` - -``` purescript -target :: EventFn SyntheticEvent EventTarget -``` - -#### `currentTarget` - -``` purescript -currentTarget :: EventFn SyntheticEvent EventTarget -``` - -#### `relatedTarget` - -``` purescript -relatedTarget :: EventFn SyntheticEvent (Maybe EventTarget) -``` - -#### `targetChecked` - -``` purescript -targetChecked :: EventFn SyntheticEvent (Maybe Boolean) -``` - -#### `targetValue` - -``` purescript -targetValue :: EventFn SyntheticEvent (Maybe String) -``` - -#### `timeStamp` - -``` purescript -timeStamp :: EventFn SyntheticEvent Number -``` - -#### `type_` - -``` purescript -type_ :: EventFn SyntheticEvent String -``` - -#### `key` - -``` purescript -key :: EventFn SyntheticEvent (Maybe String) -``` - -Keyboard event fields - -#### `code` - -``` purescript -code :: EventFn SyntheticEvent (Maybe String) -``` - -#### `char` - -``` purescript -char :: EventFn SyntheticEvent (Maybe String) -``` - -#### `location` - -``` purescript -location :: EventFn SyntheticEvent (Maybe Number) -``` - -#### `repeat` - -``` purescript -repeat :: EventFn SyntheticEvent (Maybe Boolean) -``` - -#### `locale` - -``` purescript -locale :: EventFn SyntheticEvent (Maybe String) -``` - -#### `ctrlKey` - -``` purescript -ctrlKey :: EventFn SyntheticEvent (Maybe Boolean) -``` - -#### `shiftKey` - -``` purescript -shiftKey :: EventFn SyntheticEvent (Maybe Boolean) -``` - -#### `altKey` - -``` purescript -altKey :: EventFn SyntheticEvent (Maybe Boolean) -``` - -#### `metaKey` - -``` purescript -metaKey :: EventFn SyntheticEvent (Maybe Boolean) -``` - -#### `detail` - -``` purescript -detail :: EventFn SyntheticEvent (Maybe Int) -``` - -Mouse event fields - -#### `screenX` - -``` purescript -screenX :: EventFn SyntheticEvent (Maybe Number) -``` - -#### `screenY` - -``` purescript -screenY :: EventFn SyntheticEvent (Maybe Number) -``` - -#### `clientX` - -``` purescript -clientX :: EventFn SyntheticEvent (Maybe Number) -``` - -#### `clientY` - -``` purescript -clientY :: EventFn SyntheticEvent (Maybe Number) -``` - -#### `button` - -``` purescript -button :: EventFn SyntheticEvent (Maybe Int) -``` - -#### `buttons` - -``` purescript -buttons :: EventFn SyntheticEvent (Maybe Int) -``` - - diff --git a/generated-docs/React/Basic/DOM/Generated.md b/generated-docs/React/Basic/DOM/Generated.md deleted file mode 100644 index 418160e..0000000 --- a/generated-docs/React/Basic/DOM/Generated.md +++ /dev/null @@ -1,2047 +0,0 @@ -## Module React.Basic.DOM.Generated - ----------------------------------------- -THIS FILE IS GENERATED -- DO NOT EDIT IT ----------------------------------------- - -#### `Props_a` - -``` purescript -type Props_a = (children :: Array JSX, coords :: String, download :: String, href :: String, name :: String, onClick :: EventHandler, rel :: String, shape :: String, target :: String, "type" :: String) -``` - -#### `a` - -``` purescript -a :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_a) => { | attrs } -> JSX -``` - -#### `a_` - -``` purescript -a_ :: Array JSX -> JSX -``` - -#### `Props_abbr` - -``` purescript -type Props_abbr = (children :: Array JSX, title :: String) -``` - -#### `abbr` - -``` purescript -abbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_abbr) => { | attrs } -> JSX -``` - -#### `abbr_` - -``` purescript -abbr_ :: Array JSX -> JSX -``` - -#### `Props_address` - -``` purescript -type Props_address = (children :: Array JSX) -``` - -#### `address` - -``` purescript -address :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_address) => { | attrs } -> JSX -``` - -#### `address_` - -``` purescript -address_ :: Array JSX -> JSX -``` - -#### `Props_area` - -``` purescript -type Props_area = (alt :: String, coords :: String, download :: String, href :: String, rel :: String, shape :: String, target :: String, "type" :: String) -``` - -#### `area` - -``` purescript -area :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_area) => { | attrs } -> JSX -``` - -#### `Props_article` - -``` purescript -type Props_article = (children :: Array JSX) -``` - -#### `article` - -``` purescript -article :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_article) => { | attrs } -> JSX -``` - -#### `article_` - -``` purescript -article_ :: Array JSX -> JSX -``` - -#### `Props_aside` - -``` purescript -type Props_aside = (children :: Array JSX) -``` - -#### `aside` - -``` purescript -aside :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_aside) => { | attrs } -> JSX -``` - -#### `aside_` - -``` purescript -aside_ :: Array JSX -> JSX -``` - -#### `Props_audio` - -``` purescript -type Props_audio = (children :: Array JSX, controls :: Boolean, loop :: Boolean, muted :: Boolean, preload :: String, src :: String) -``` - -#### `audio` - -``` purescript -audio :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_audio) => { | attrs } -> JSX -``` - -#### `audio_` - -``` purescript -audio_ :: Array JSX -> JSX -``` - -#### `Props_b` - -``` purescript -type Props_b = (children :: Array JSX) -``` - -#### `b` - -``` purescript -b :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_b) => { | attrs } -> JSX -``` - -#### `b_` - -``` purescript -b_ :: Array JSX -> JSX -``` - -#### `Props_base` - -``` purescript -type Props_base = (href :: String, target :: String) -``` - -#### `base` - -``` purescript -base :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_base) => { | attrs } -> JSX -``` - -#### `Props_bdi` - -``` purescript -type Props_bdi = (children :: Array JSX) -``` - -#### `bdi` - -``` purescript -bdi :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdi) => { | attrs } -> JSX -``` - -#### `bdi_` - -``` purescript -bdi_ :: Array JSX -> JSX -``` - -#### `Props_bdo` - -``` purescript -type Props_bdo = (children :: Array JSX, dir :: String) -``` - -#### `bdo` - -``` purescript -bdo :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdo) => { | attrs } -> JSX -``` - -#### `bdo_` - -``` purescript -bdo_ :: Array JSX -> JSX -``` - -#### `Props_blockquote` - -``` purescript -type Props_blockquote = (children :: Array JSX, cite :: String) -``` - -#### `blockquote` - -``` purescript -blockquote :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_blockquote) => { | attrs } -> JSX -``` - -#### `blockquote_` - -``` purescript -blockquote_ :: Array JSX -> JSX -``` - -#### `Props_body` - -``` purescript -type Props_body = (children :: Array JSX) -``` - -#### `body` - -``` purescript -body :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_body) => { | attrs } -> JSX -``` - -#### `body_` - -``` purescript -body_ :: Array JSX -> JSX -``` - -#### `Props_br` - -``` purescript -type Props_br = () -``` - -#### `br` - -``` purescript -br :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_br) => { | attrs } -> JSX -``` - -#### `Props_button` - -``` purescript -type Props_button = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String, "type" :: String, value :: String) -``` - -#### `button` - -``` purescript -button :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_button) => { | attrs } -> JSX -``` - -#### `button_` - -``` purescript -button_ :: Array JSX -> JSX -``` - -#### `Props_canvas` - -``` purescript -type Props_canvas = (children :: Array JSX, height :: String, width :: String) -``` - -#### `canvas` - -``` purescript -canvas :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_canvas) => { | attrs } -> JSX -``` - -#### `canvas_` - -``` purescript -canvas_ :: Array JSX -> JSX -``` - -#### `Props_caption` - -``` purescript -type Props_caption = (children :: Array JSX) -``` - -#### `caption` - -``` purescript -caption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_caption) => { | attrs } -> JSX -``` - -#### `caption_` - -``` purescript -caption_ :: Array JSX -> JSX -``` - -#### `Props_cite` - -``` purescript -type Props_cite = (children :: Array JSX) -``` - -#### `cite` - -``` purescript -cite :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_cite) => { | attrs } -> JSX -``` - -#### `cite_` - -``` purescript -cite_ :: Array JSX -> JSX -``` - -#### `Props_code` - -``` purescript -type Props_code = (children :: Array JSX) -``` - -#### `code` - -``` purescript -code :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_code) => { | attrs } -> JSX -``` - -#### `code_` - -``` purescript -code_ :: Array JSX -> JSX -``` - -#### `Props_col` - -``` purescript -type Props_col = (span :: Number, width :: String) -``` - -#### `col` - -``` purescript -col :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_col) => { | attrs } -> JSX -``` - -#### `Props_colgroup` - -``` purescript -type Props_colgroup = (children :: Array JSX, span :: Number, width :: String) -``` - -#### `colgroup` - -``` purescript -colgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_colgroup) => { | attrs } -> JSX -``` - -#### `colgroup_` - -``` purescript -colgroup_ :: Array JSX -> JSX -``` - -#### `Props_data` - -``` purescript -type Props_data = (children :: Array JSX, value :: String) -``` - -#### `data'` - -``` purescript -data' :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_data) => { | attrs } -> JSX -``` - -#### `data_` - -``` purescript -data_ :: Array JSX -> JSX -``` - -#### `Props_datalist` - -``` purescript -type Props_datalist = (children :: Array JSX) -``` - -#### `datalist` - -``` purescript -datalist :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_datalist) => { | attrs } -> JSX -``` - -#### `datalist_` - -``` purescript -datalist_ :: Array JSX -> JSX -``` - -#### `Props_dd` - -``` purescript -type Props_dd = (children :: Array JSX) -``` - -#### `dd` - -``` purescript -dd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dd) => { | attrs } -> JSX -``` - -#### `dd_` - -``` purescript -dd_ :: Array JSX -> JSX -``` - -#### `Props_del` - -``` purescript -type Props_del = (children :: Array JSX, cite :: String) -``` - -#### `del` - -``` purescript -del :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_del) => { | attrs } -> JSX -``` - -#### `del_` - -``` purescript -del_ :: Array JSX -> JSX -``` - -#### `Props_details` - -``` purescript -type Props_details = (children :: Array JSX, open :: Boolean) -``` - -#### `details` - -``` purescript -details :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_details) => { | attrs } -> JSX -``` - -#### `details_` - -``` purescript -details_ :: Array JSX -> JSX -``` - -#### `Props_dfn` - -``` purescript -type Props_dfn = (children :: Array JSX, title :: String) -``` - -#### `dfn` - -``` purescript -dfn :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dfn) => { | attrs } -> JSX -``` - -#### `dfn_` - -``` purescript -dfn_ :: Array JSX -> JSX -``` - -#### `Props_dialog` - -``` purescript -type Props_dialog = (children :: Array JSX, open :: Boolean) -``` - -#### `dialog` - -``` purescript -dialog :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dialog) => { | attrs } -> JSX -``` - -#### `dialog_` - -``` purescript -dialog_ :: Array JSX -> JSX -``` - -#### `Props_div` - -``` purescript -type Props_div = (children :: Array JSX) -``` - -#### `div` - -``` purescript -div :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_div) => { | attrs } -> JSX -``` - -#### `div_` - -``` purescript -div_ :: Array JSX -> JSX -``` - -#### `Props_dl` - -``` purescript -type Props_dl = (children :: Array JSX) -``` - -#### `dl` - -``` purescript -dl :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dl) => { | attrs } -> JSX -``` - -#### `dl_` - -``` purescript -dl_ :: Array JSX -> JSX -``` - -#### `Props_dt` - -``` purescript -type Props_dt = (children :: Array JSX) -``` - -#### `dt` - -``` purescript -dt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dt) => { | attrs } -> JSX -``` - -#### `dt_` - -``` purescript -dt_ :: Array JSX -> JSX -``` - -#### `Props_em` - -``` purescript -type Props_em = (children :: Array JSX) -``` - -#### `em` - -``` purescript -em :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_em) => { | attrs } -> JSX -``` - -#### `em_` - -``` purescript -em_ :: Array JSX -> JSX -``` - -#### `Props_embed` - -``` purescript -type Props_embed = (height :: String, src :: String, "type" :: String, width :: String) -``` - -#### `embed` - -``` purescript -embed :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_embed) => { | attrs } -> JSX -``` - -#### `Props_fieldset` - -``` purescript -type Props_fieldset = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String) -``` - -#### `fieldset` - -``` purescript -fieldset :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_fieldset) => { | attrs } -> JSX -``` - -#### `fieldset_` - -``` purescript -fieldset_ :: Array JSX -> JSX -``` - -#### `Props_figcaption` - -``` purescript -type Props_figcaption = (children :: Array JSX) -``` - -#### `figcaption` - -``` purescript -figcaption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figcaption) => { | attrs } -> JSX -``` - -#### `figcaption_` - -``` purescript -figcaption_ :: Array JSX -> JSX -``` - -#### `Props_figure` - -``` purescript -type Props_figure = (children :: Array JSX) -``` - -#### `figure` - -``` purescript -figure :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figure) => { | attrs } -> JSX -``` - -#### `figure_` - -``` purescript -figure_ :: Array JSX -> JSX -``` - -#### `Props_footer` - -``` purescript -type Props_footer = (children :: Array JSX) -``` - -#### `footer` - -``` purescript -footer :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_footer) => { | attrs } -> JSX -``` - -#### `footer_` - -``` purescript -footer_ :: Array JSX -> JSX -``` - -#### `Props_form` - -``` purescript -type Props_form = (accept :: String, action :: String, children :: Array JSX, method :: String, name :: String, onChange :: EventHandler, onInput :: EventHandler, onInvalid :: EventHandler, onSubmit :: EventHandler, target :: String) -``` - -#### `form` - -``` purescript -form :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_form) => { | attrs } -> JSX -``` - -#### `form_` - -``` purescript -form_ :: Array JSX -> JSX -``` - -#### `Props_h1` - -``` purescript -type Props_h1 = (children :: Array JSX) -``` - -#### `h1` - -``` purescript -h1 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h1) => { | attrs } -> JSX -``` - -#### `h1_` - -``` purescript -h1_ :: Array JSX -> JSX -``` - -#### `Props_h2` - -``` purescript -type Props_h2 = (children :: Array JSX) -``` - -#### `h2` - -``` purescript -h2 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h2) => { | attrs } -> JSX -``` - -#### `h2_` - -``` purescript -h2_ :: Array JSX -> JSX -``` - -#### `Props_h3` - -``` purescript -type Props_h3 = (children :: Array JSX) -``` - -#### `h3` - -``` purescript -h3 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h3) => { | attrs } -> JSX -``` - -#### `h3_` - -``` purescript -h3_ :: Array JSX -> JSX -``` - -#### `Props_h4` - -``` purescript -type Props_h4 = (children :: Array JSX) -``` - -#### `h4` - -``` purescript -h4 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h4) => { | attrs } -> JSX -``` - -#### `h4_` - -``` purescript -h4_ :: Array JSX -> JSX -``` - -#### `Props_h5` - -``` purescript -type Props_h5 = (children :: Array JSX) -``` - -#### `h5` - -``` purescript -h5 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h5) => { | attrs } -> JSX -``` - -#### `h5_` - -``` purescript -h5_ :: Array JSX -> JSX -``` - -#### `Props_h6` - -``` purescript -type Props_h6 = (children :: Array JSX) -``` - -#### `h6` - -``` purescript -h6 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h6) => { | attrs } -> JSX -``` - -#### `h6_` - -``` purescript -h6_ :: Array JSX -> JSX -``` - -#### `Props_head` - -``` purescript -type Props_head = (children :: Array JSX, profile :: String) -``` - -#### `head` - -``` purescript -head :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_head) => { | attrs } -> JSX -``` - -#### `head_` - -``` purescript -head_ :: Array JSX -> JSX -``` - -#### `Props_header` - -``` purescript -type Props_header = (children :: Array JSX) -``` - -#### `header` - -``` purescript -header :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_header) => { | attrs } -> JSX -``` - -#### `header_` - -``` purescript -header_ :: Array JSX -> JSX -``` - -#### `Props_hgroup` - -``` purescript -type Props_hgroup = (children :: Array JSX) -``` - -#### `hgroup` - -``` purescript -hgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hgroup) => { | attrs } -> JSX -``` - -#### `hgroup_` - -``` purescript -hgroup_ :: Array JSX -> JSX -``` - -#### `Props_hr` - -``` purescript -type Props_hr = (size :: Number, width :: String) -``` - -#### `hr` - -``` purescript -hr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hr) => { | attrs } -> JSX -``` - -#### `Props_html` - -``` purescript -type Props_html = (children :: Array JSX, manifest :: String) -``` - -#### `html` - -``` purescript -html :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_html) => { | attrs } -> JSX -``` - -#### `html_` - -``` purescript -html_ :: Array JSX -> JSX -``` - -#### `Props_i` - -``` purescript -type Props_i = (children :: Array JSX) -``` - -#### `i` - -``` purescript -i :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_i) => { | attrs } -> JSX -``` - -#### `i_` - -``` purescript -i_ :: Array JSX -> JSX -``` - -#### `Props_iframe` - -``` purescript -type Props_iframe = (children :: Array JSX, height :: String, name :: String, sandbox :: String, scrolling :: String, src :: String, width :: String) -``` - -#### `iframe` - -``` purescript -iframe :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_iframe) => { | attrs } -> JSX -``` - -#### `iframe_` - -``` purescript -iframe_ :: Array JSX -> JSX -``` - -#### `Props_img` - -``` purescript -type Props_img = (alt :: String, height :: String, name :: String, sizes :: String, src :: String, width :: String) -``` - -#### `img` - -``` purescript -img :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_img) => { | attrs } -> JSX -``` - -#### `Props_input` - -``` purescript -type Props_input = (accept :: String, alt :: String, autoCapitalize :: String, autoCorrect :: String, autoSave :: String, checked :: Boolean, defaultChecked :: String, defaultValue :: String, disabled :: Boolean, form :: String, height :: String, list :: String, max :: Number, min :: Number, multiple :: Boolean, name :: String, onChange :: EventHandler, pattern :: String, placeholder :: String, required :: Boolean, results :: String, size :: Number, src :: String, step :: String, title :: String, "type" :: String, value :: String, width :: String) -``` - -#### `input` - -``` purescript -input :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_input) => { | attrs } -> JSX -``` - -#### `Props_ins` - -``` purescript -type Props_ins = (children :: Array JSX, cite :: String) -``` - -#### `ins` - -``` purescript -ins :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ins) => { | attrs } -> JSX -``` - -#### `ins_` - -``` purescript -ins_ :: Array JSX -> JSX -``` - -#### `Props_kbd` - -``` purescript -type Props_kbd = (children :: Array JSX) -``` - -#### `kbd` - -``` purescript -kbd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_kbd) => { | attrs } -> JSX -``` - -#### `kbd_` - -``` purescript -kbd_ :: Array JSX -> JSX -``` - -#### `Props_keygen` - -``` purescript -type Props_keygen = (challenge :: String, children :: Array JSX, disabled :: Boolean, form :: String, name :: String) -``` - -#### `keygen` - -``` purescript -keygen :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_keygen) => { | attrs } -> JSX -``` - -#### `keygen_` - -``` purescript -keygen_ :: Array JSX -> JSX -``` - -#### `Props_label` - -``` purescript -type Props_label = (children :: Array JSX, form :: String) -``` - -#### `label` - -``` purescript -label :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_label) => { | attrs } -> JSX -``` - -#### `label_` - -``` purescript -label_ :: Array JSX -> JSX -``` - -#### `Props_legend` - -``` purescript -type Props_legend = (children :: Array JSX) -``` - -#### `legend` - -``` purescript -legend :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_legend) => { | attrs } -> JSX -``` - -#### `legend_` - -``` purescript -legend_ :: Array JSX -> JSX -``` - -#### `Props_li` - -``` purescript -type Props_li = (children :: Array JSX, "type" :: String, value :: String) -``` - -#### `li` - -``` purescript -li :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_li) => { | attrs } -> JSX -``` - -#### `li_` - -``` purescript -li_ :: Array JSX -> JSX -``` - -#### `Props_link` - -``` purescript -type Props_link = (color :: String, href :: String, integrity :: String, media :: String, nonce :: String, rel :: String, scope :: String, sizes :: String, target :: String, title :: String, "type" :: String) -``` - -#### `link` - -``` purescript -link :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_link) => { | attrs } -> JSX -``` - -#### `Props_main` - -``` purescript -type Props_main = (children :: Array JSX) -``` - -#### `main` - -``` purescript -main :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_main) => { | attrs } -> JSX -``` - -#### `main_` - -``` purescript -main_ :: Array JSX -> JSX -``` - -#### `Props_map` - -``` purescript -type Props_map = (children :: Array JSX, name :: String) -``` - -#### `map` - -``` purescript -map :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_map) => { | attrs } -> JSX -``` - -#### `map_` - -``` purescript -map_ :: Array JSX -> JSX -``` - -#### `Props_mark` - -``` purescript -type Props_mark = (children :: Array JSX) -``` - -#### `mark` - -``` purescript -mark :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_mark) => { | attrs } -> JSX -``` - -#### `mark_` - -``` purescript -mark_ :: Array JSX -> JSX -``` - -#### `Props_math` - -``` purescript -type Props_math = (children :: Array JSX) -``` - -#### `math` - -``` purescript -math :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_math) => { | attrs } -> JSX -``` - -#### `math_` - -``` purescript -math_ :: Array JSX -> JSX -``` - -#### `Props_menu` - -``` purescript -type Props_menu = (children :: Array JSX) -``` - -#### `menu` - -``` purescript -menu :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menu) => { | attrs } -> JSX -``` - -#### `menu_` - -``` purescript -menu_ :: Array JSX -> JSX -``` - -#### `Props_menuitem` - -``` purescript -type Props_menuitem = (children :: Array JSX) -``` - -#### `menuitem` - -``` purescript -menuitem :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menuitem) => { | attrs } -> JSX -``` - -#### `menuitem_` - -``` purescript -menuitem_ :: Array JSX -> JSX -``` - -#### `Props_meta` - -``` purescript -type Props_meta = (content :: String, name :: String) -``` - -#### `meta` - -``` purescript -meta :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meta) => { | attrs } -> JSX -``` - -#### `Props_meter` - -``` purescript -type Props_meter = (children :: Array JSX, high :: String, low :: String, max :: Number, min :: Number, optimum :: String, value :: String) -``` - -#### `meter` - -``` purescript -meter :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meter) => { | attrs } -> JSX -``` - -#### `meter_` - -``` purescript -meter_ :: Array JSX -> JSX -``` - -#### `Props_nav` - -``` purescript -type Props_nav = (children :: Array JSX) -``` - -#### `nav` - -``` purescript -nav :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_nav) => { | attrs } -> JSX -``` - -#### `nav_` - -``` purescript -nav_ :: Array JSX -> JSX -``` - -#### `Props_noscript` - -``` purescript -type Props_noscript = (children :: Array JSX) -``` - -#### `noscript` - -``` purescript -noscript :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_noscript) => { | attrs } -> JSX -``` - -#### `noscript_` - -``` purescript -noscript_ :: Array JSX -> JSX -``` - -#### `Props_object` - -``` purescript -type Props_object = (children :: Array JSX, "data" :: String, form :: String, height :: String, name :: String, "type" :: String, width :: String) -``` - -#### `object` - -``` purescript -object :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_object) => { | attrs } -> JSX -``` - -#### `object_` - -``` purescript -object_ :: Array JSX -> JSX -``` - -#### `Props_ol` - -``` purescript -type Props_ol = (children :: Array JSX, reversed :: Boolean, start :: Number, "type" :: String) -``` - -#### `ol` - -``` purescript -ol :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ol) => { | attrs } -> JSX -``` - -#### `ol_` - -``` purescript -ol_ :: Array JSX -> JSX -``` - -#### `Props_optgroup` - -``` purescript -type Props_optgroup = (children :: Array JSX, disabled :: Boolean, label :: String) -``` - -#### `optgroup` - -``` purescript -optgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_optgroup) => { | attrs } -> JSX -``` - -#### `optgroup_` - -``` purescript -optgroup_ :: Array JSX -> JSX -``` - -#### `Props_option` - -``` purescript -type Props_option = (children :: Array JSX, disabled :: Boolean, label :: String, selected :: Boolean, value :: String) -``` - -#### `option` - -``` purescript -option :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_option) => { | attrs } -> JSX -``` - -#### `option_` - -``` purescript -option_ :: Array JSX -> JSX -``` - -#### `Props_output` - -``` purescript -type Props_output = (children :: Array JSX, form :: String, name :: String) -``` - -#### `output` - -``` purescript -output :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_output) => { | attrs } -> JSX -``` - -#### `output_` - -``` purescript -output_ :: Array JSX -> JSX -``` - -#### `Props_p` - -``` purescript -type Props_p = (children :: Array JSX) -``` - -#### `p` - -``` purescript -p :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_p) => { | attrs } -> JSX -``` - -#### `p_` - -``` purescript -p_ :: Array JSX -> JSX -``` - -#### `Props_param` - -``` purescript -type Props_param = (name :: String, "type" :: String, value :: String) -``` - -#### `param` - -``` purescript -param :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_param) => { | attrs } -> JSX -``` - -#### `Props_picture` - -``` purescript -type Props_picture = (children :: Array JSX) -``` - -#### `picture` - -``` purescript -picture :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_picture) => { | attrs } -> JSX -``` - -#### `picture_` - -``` purescript -picture_ :: Array JSX -> JSX -``` - -#### `Props_pre` - -``` purescript -type Props_pre = (children :: Array JSX, width :: String) -``` - -#### `pre` - -``` purescript -pre :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_pre) => { | attrs } -> JSX -``` - -#### `pre_` - -``` purescript -pre_ :: Array JSX -> JSX -``` - -#### `Props_progress` - -``` purescript -type Props_progress = (children :: Array JSX, max :: Number, value :: String) -``` - -#### `progress` - -``` purescript -progress :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_progress) => { | attrs } -> JSX -``` - -#### `progress_` - -``` purescript -progress_ :: Array JSX -> JSX -``` - -#### `Props_q` - -``` purescript -type Props_q = (children :: Array JSX, cite :: String) -``` - -#### `q` - -``` purescript -q :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_q) => { | attrs } -> JSX -``` - -#### `q_` - -``` purescript -q_ :: Array JSX -> JSX -``` - -#### `Props_rb` - -``` purescript -type Props_rb = (children :: Array JSX) -``` - -#### `rb` - -``` purescript -rb :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rb) => { | attrs } -> JSX -``` - -#### `rb_` - -``` purescript -rb_ :: Array JSX -> JSX -``` - -#### `Props_rp` - -``` purescript -type Props_rp = (children :: Array JSX) -``` - -#### `rp` - -``` purescript -rp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rp) => { | attrs } -> JSX -``` - -#### `rp_` - -``` purescript -rp_ :: Array JSX -> JSX -``` - -#### `Props_rt` - -``` purescript -type Props_rt = (children :: Array JSX) -``` - -#### `rt` - -``` purescript -rt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rt) => { | attrs } -> JSX -``` - -#### `rt_` - -``` purescript -rt_ :: Array JSX -> JSX -``` - -#### `Props_rtc` - -``` purescript -type Props_rtc = (children :: Array JSX) -``` - -#### `rtc` - -``` purescript -rtc :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rtc) => { | attrs } -> JSX -``` - -#### `rtc_` - -``` purescript -rtc_ :: Array JSX -> JSX -``` - -#### `Props_ruby` - -``` purescript -type Props_ruby = (children :: Array JSX) -``` - -#### `ruby` - -``` purescript -ruby :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ruby) => { | attrs } -> JSX -``` - -#### `ruby_` - -``` purescript -ruby_ :: Array JSX -> JSX -``` - -#### `Props_s` - -``` purescript -type Props_s = (children :: Array JSX) -``` - -#### `s` - -``` purescript -s :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_s) => { | attrs } -> JSX -``` - -#### `s_` - -``` purescript -s_ :: Array JSX -> JSX -``` - -#### `Props_samp` - -``` purescript -type Props_samp = (children :: Array JSX) -``` - -#### `samp` - -``` purescript -samp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_samp) => { | attrs } -> JSX -``` - -#### `samp_` - -``` purescript -samp_ :: Array JSX -> JSX -``` - -#### `Props_script` - -``` purescript -type Props_script = (async :: Boolean, children :: Array JSX, defer :: Boolean, integrity :: String, nonce :: String, src :: String, "type" :: String) -``` - -#### `script` - -``` purescript -script :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_script) => { | attrs } -> JSX -``` - -#### `script_` - -``` purescript -script_ :: Array JSX -> JSX -``` - -#### `Props_section` - -``` purescript -type Props_section = (children :: Array JSX) -``` - -#### `section` - -``` purescript -section :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_section) => { | attrs } -> JSX -``` - -#### `section_` - -``` purescript -section_ :: Array JSX -> JSX -``` - -#### `Props_select` - -``` purescript -type Props_select = (children :: Array JSX, defaultValue :: String, disabled :: Boolean, form :: String, multiple :: Boolean, name :: String, onChange :: EventHandler, required :: Boolean, size :: Number, value :: String) -``` - -#### `select` - -``` purescript -select :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_select) => { | attrs } -> JSX -``` - -#### `select_` - -``` purescript -select_ :: Array JSX -> JSX -``` - -#### `Props_slot` - -``` purescript -type Props_slot = (children :: Array JSX, name :: String) -``` - -#### `slot` - -``` purescript -slot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_slot) => { | attrs } -> JSX -``` - -#### `slot_` - -``` purescript -slot_ :: Array JSX -> JSX -``` - -#### `Props_small` - -``` purescript -type Props_small = (children :: Array JSX) -``` - -#### `small` - -``` purescript -small :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_small) => { | attrs } -> JSX -``` - -#### `small_` - -``` purescript -small_ :: Array JSX -> JSX -``` - -#### `Props_source` - -``` purescript -type Props_source = (media :: String, sizes :: String, src :: String, "type" :: String) -``` - -#### `source` - -``` purescript -source :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_source) => { | attrs } -> JSX -``` - -#### `Props_span` - -``` purescript -type Props_span = (children :: Array JSX) -``` - -#### `span` - -``` purescript -span :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_span) => { | attrs } -> JSX -``` - -#### `span_` - -``` purescript -span_ :: Array JSX -> JSX -``` - -#### `Props_strong` - -``` purescript -type Props_strong = (children :: Array JSX) -``` - -#### `strong` - -``` purescript -strong :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_strong) => { | attrs } -> JSX -``` - -#### `strong_` - -``` purescript -strong_ :: Array JSX -> JSX -``` - -#### `Props_style` - -``` purescript -type Props_style = (children :: Array JSX, media :: String, nonce :: String, title :: String, "type" :: String) -``` - -#### `style` - -``` purescript -style :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_style) => { | attrs } -> JSX -``` - -#### `style_` - -``` purescript -style_ :: Array JSX -> JSX -``` - -#### `Props_sub` - -``` purescript -type Props_sub = (children :: Array JSX) -``` - -#### `sub` - -``` purescript -sub :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sub) => { | attrs } -> JSX -``` - -#### `sub_` - -``` purescript -sub_ :: Array JSX -> JSX -``` - -#### `Props_summary` - -``` purescript -type Props_summary = (children :: Array JSX) -``` - -#### `summary` - -``` purescript -summary :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_summary) => { | attrs } -> JSX -``` - -#### `summary_` - -``` purescript -summary_ :: Array JSX -> JSX -``` - -#### `Props_sup` - -``` purescript -type Props_sup = (children :: Array JSX) -``` - -#### `sup` - -``` purescript -sup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sup) => { | attrs } -> JSX -``` - -#### `sup_` - -``` purescript -sup_ :: Array JSX -> JSX -``` - -#### `Props_svg` - -``` purescript -type Props_svg = (accentHeight :: String, accumulate :: String, additive :: String, alignmentBaseline :: String, allowReorder :: String, alphabetic :: String, amplitude :: String, arabicForm :: String, ascent :: String, attributeName :: String, attributeType :: String, autoReverse :: String, azimuth :: String, baseFrequency :: String, baseProfile :: String, baselineShift :: String, bbox :: String, begin :: String, bias :: String, by :: String, calcMode :: String, capHeight :: String, children :: Array JSX, clip :: String, clipPath :: String, clipPathUnits :: String, clipRule :: String, color :: String, colorInterpolation :: String, colorInterpolationFilters :: String, colorProfile :: String, colorRendering :: String, contentScriptType :: String, contentStyleType :: String, cursor :: String, cx :: String, cy :: String, d :: String, decelerate :: String, descent :: String, diffuseConstant :: String, direction :: String, display :: String, divisor :: String, dominantBaseline :: String, dur :: String, dx :: String, dy :: String, edgeMode :: String, elevation :: String, enableBackground :: String, end :: String, exponent :: String, externalResourcesRequired :: String, fill :: String, fillOpacity :: String, fillRule :: String, filter :: String, filterRes :: String, filterUnits :: String, floodColor :: String, floodOpacity :: String, focusable :: String, fontFamily :: String, fontSize :: String, fontSizeAdjust :: String, fontStretch :: String, fontStyle :: String, fontVariant :: String, fontWeight :: String, format :: String, from :: String, fx :: String, fy :: String, g1 :: String, g2 :: String, glyphName :: String, glyphOrientationHorizontal :: String, glyphOrientationVertical :: String, glyphRef :: String, gradientTransform :: String, gradientUnits :: String, hanging :: String, height :: String, horizAdvX :: String, horizOriginX :: String, ideographic :: String, imageRendering :: String, "in" :: String, in2 :: String, intercept :: String, k :: String, k1 :: String, k2 :: String, k3 :: String, k4 :: String, kernelMatrix :: String, kernelUnitLength :: String, kerning :: String, keyPoints :: String, keySplines :: String, keyTimes :: String, lengthAdjust :: String, letterSpacing :: String, lightingColor :: String, limitingConeAngle :: String, local :: String, markerEnd :: String, markerHeight :: String, markerMid :: String, markerStart :: String, markerUnits :: String, markerWidth :: String, mask :: String, maskContentUnits :: String, maskUnits :: String, mathematical :: String, mode :: String, numOctaves :: String, offset :: String, opacity :: String, operator :: String, order :: String, orient :: String, orientation :: String, origin :: String, overflow :: String, overlinePosition :: String, overlineThickness :: String, paintOrder :: String, panose1 :: String, pathLength :: String, patternContentUnits :: String, patternTransform :: String, patternUnits :: String, pointerEvents :: String, points :: String, pointsAtX :: String, pointsAtY :: String, pointsAtZ :: String, preserveAlpha :: String, preserveAspectRatio :: String, primitiveUnits :: String, r :: String, radius :: String, refX :: String, refY :: String, renderingIntent :: String, repeatCount :: String, repeatDur :: String, requiredExtensions :: String, requiredFeatures :: String, restart :: String, result :: String, rotate :: String, rx :: String, ry :: String, scale :: String, seed :: String, shapeRendering :: String, slope :: String, spacing :: String, specularConstant :: String, specularExponent :: String, speed :: String, spreadMethod :: String, startOffset :: String, stdDeviation :: String, stemh :: String, stemv :: String, stitchTiles :: String, stopColor :: String, stopOpacity :: String, strikethroughPosition :: String, strikethroughThickness :: String, string :: String, stroke :: String, strokeDasharray :: String, strokeDashoffset :: String, strokeLinecap :: String, strokeLinejoin :: String, strokeMiterlimit :: String, strokeOpacity :: String, strokeWidth :: String, surfaceScale :: String, systemLanguage :: String, tableValues :: String, targetX :: String, targetY :: String, textAnchor :: String, textDecoration :: String, textLength :: String, textRendering :: String, to :: String, transform :: String, u1 :: String, u2 :: String, underlinePosition :: String, underlineThickness :: String, unicode :: String, unicodeBidi :: String, unicodeRange :: String, unitsPerEm :: String, vAlphabetic :: String, vHanging :: String, vIdeographic :: String, vMathematical :: String, values :: String, vectorEffect :: String, version :: String, vertAdvY :: String, vertOriginX :: String, vertOriginY :: String, viewBox :: String, viewTarget :: String, visibility :: String, width :: String, widths :: String, wordSpacing :: String, writingMode :: String, x :: String, x1 :: String, x2 :: String, xChannelSelector :: String, xHeight :: String, xlinkActuate :: String, xlinkArcrole :: String, xlinkHref :: String, xlinkRole :: String, xlinkShow :: String, xlinkTitle :: String, xlinkType :: String, xmlBase :: String, xmlLang :: String, xmlSpace :: String, xmlns :: String, xmlnsXlink :: String, y :: String, y1 :: String, y2 :: String, yChannelSelector :: String, z :: String, zoomAndPan :: String) -``` - -#### `svg` - -``` purescript -svg :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_svg) => { | attrs } -> JSX -``` - -#### `svg_` - -``` purescript -svg_ :: Array JSX -> JSX -``` - -#### `Props_table` - -``` purescript -type Props_table = (children :: Array JSX, summary :: String, width :: String) -``` - -#### `table` - -``` purescript -table :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_table) => { | attrs } -> JSX -``` - -#### `table_` - -``` purescript -table_ :: Array JSX -> JSX -``` - -#### `Props_tbody` - -``` purescript -type Props_tbody = (children :: Array JSX) -``` - -#### `tbody` - -``` purescript -tbody :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tbody) => { | attrs } -> JSX -``` - -#### `tbody_` - -``` purescript -tbody_ :: Array JSX -> JSX -``` - -#### `Props_td` - -``` purescript -type Props_td = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) -``` - -#### `td` - -``` purescript -td :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_td) => { | attrs } -> JSX -``` - -#### `td_` - -``` purescript -td_ :: Array JSX -> JSX -``` - -#### `Props_template` - -``` purescript -type Props_template = (children :: Array JSX) -``` - -#### `template` - -``` purescript -template :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_template) => { | attrs } -> JSX -``` - -#### `template_` - -``` purescript -template_ :: Array JSX -> JSX -``` - -#### `Props_textarea` - -``` purescript -type Props_textarea = (autoCapitalize :: String, autoCorrect :: String, children :: Array JSX, cols :: Number, defaultValue :: String, disabled :: Boolean, form :: String, name :: String, onChange :: EventHandler, placeholder :: String, required :: Boolean, rows :: Number, value :: String, wrap :: String) -``` - -#### `textarea` - -``` purescript -textarea :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_textarea) => { | attrs } -> JSX -``` - -#### `textarea_` - -``` purescript -textarea_ :: Array JSX -> JSX -``` - -#### `Props_tfoot` - -``` purescript -type Props_tfoot = (children :: Array JSX) -``` - -#### `tfoot` - -``` purescript -tfoot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tfoot) => { | attrs } -> JSX -``` - -#### `tfoot_` - -``` purescript -tfoot_ :: Array JSX -> JSX -``` - -#### `Props_th` - -``` purescript -type Props_th = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) -``` - -#### `th` - -``` purescript -th :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_th) => { | attrs } -> JSX -``` - -#### `th_` - -``` purescript -th_ :: Array JSX -> JSX -``` - -#### `Props_thead` - -``` purescript -type Props_thead = (children :: Array JSX) -``` - -#### `thead` - -``` purescript -thead :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_thead) => { | attrs } -> JSX -``` - -#### `thead_` - -``` purescript -thead_ :: Array JSX -> JSX -``` - -#### `Props_time` - -``` purescript -type Props_time = (children :: Array JSX) -``` - -#### `time` - -``` purescript -time :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_time) => { | attrs } -> JSX -``` - -#### `time_` - -``` purescript -time_ :: Array JSX -> JSX -``` - -#### `Props_title` - -``` purescript -type Props_title = (children :: Array JSX) -``` - -#### `title` - -``` purescript -title :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_title) => { | attrs } -> JSX -``` - -#### `title_` - -``` purescript -title_ :: Array JSX -> JSX -``` - -#### `Props_tr` - -``` purescript -type Props_tr = (children :: Array JSX) -``` - -#### `tr` - -``` purescript -tr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tr) => { | attrs } -> JSX -``` - -#### `tr_` - -``` purescript -tr_ :: Array JSX -> JSX -``` - -#### `Props_track` - -``` purescript -type Props_track = (default :: Boolean, kind :: String, label :: String, src :: String) -``` - -#### `track` - -``` purescript -track :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_track) => { | attrs } -> JSX -``` - -#### `Props_u` - -``` purescript -type Props_u = (children :: Array JSX) -``` - -#### `u` - -``` purescript -u :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_u) => { | attrs } -> JSX -``` - -#### `u_` - -``` purescript -u_ :: Array JSX -> JSX -``` - -#### `Props_ul` - -``` purescript -type Props_ul = (children :: Array JSX, "type" :: String) -``` - -#### `ul` - -``` purescript -ul :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ul) => { | attrs } -> JSX -``` - -#### `ul_` - -``` purescript -ul_ :: Array JSX -> JSX -``` - -#### `Props_var` - -``` purescript -type Props_var = (children :: Array JSX) -``` - -#### `var` - -``` purescript -var :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_var) => { | attrs } -> JSX -``` - -#### `var_` - -``` purescript -var_ :: Array JSX -> JSX -``` - -#### `Props_video` - -``` purescript -type Props_video = (children :: Array JSX, controls :: Boolean, height :: String, loop :: Boolean, muted :: Boolean, playsInline :: Boolean, poster :: String, preload :: String, src :: String, width :: String) -``` - -#### `video` - -``` purescript -video :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_video) => { | attrs } -> JSX -``` - -#### `video_` - -``` purescript -video_ :: Array JSX -> JSX -``` - -#### `Props_wbr` - -``` purescript -type Props_wbr = () -``` - -#### `wbr` - -``` purescript -wbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_wbr) => { | attrs } -> JSX -``` - - diff --git a/generated-docs/React/Basic/DOM/Internal.md b/generated-docs/React/Basic/DOM/Internal.md deleted file mode 100644 index 8594101..0000000 --- a/generated-docs/React/Basic/DOM/Internal.md +++ /dev/null @@ -1,25 +0,0 @@ -## Module React.Basic.DOM.Internal - -#### `CSS` - -``` purescript -data CSS :: Type -``` - -An abstract type representing records of CSS attributes. - -#### `SharedProps` - -``` purescript -type SharedProps specific = (key :: String, about :: String, acceptCharset :: String, accessKey :: String, allowFullScreen :: Boolean, allowTransparency :: String, autoComplete :: String, autoFocus :: String, autoPlay :: Boolean, capture :: Boolean, cellPadding :: String, cellSpacing :: String, charSet :: String, classID :: String, className :: String, colSpan :: Number, contentEditable :: String, contextMenu :: String, crossOrigin :: String, datatype :: String, dateTime :: String, dir :: String, draggable :: String, encType :: String, formAction :: String, formEncType :: String, formMethod :: String, formNoValidate :: String, formTarget :: String, frameBorder :: String, hidden :: Boolean, hrefLang :: String, htmlFor :: String, httpEquiv :: String, icon :: String, id :: String, inlist :: String, inputMode :: String, is :: String, itemID :: String, itemProp :: String, itemRef :: String, itemScope :: Boolean, itemType :: String, keyParams :: String, keyType :: String, lang :: String, marginHeight :: String, marginWidth :: String, maxLength :: String, mediaGroup :: String, minLength :: String, noValidate :: String, prefix :: String, property :: String, radioGroup :: String, readOnly :: Boolean, resource :: String, role :: String, rowSpan :: Number, scoped :: Boolean, seamless :: Boolean, security :: String, spellCheck :: String, srcDoc :: String, srcLang :: String, srcSet :: String, style :: CSS, tabIndex :: String, title :: String, typeof :: String, unselectable :: String, useMap :: String, vocab :: String, wmode :: String, onBlur :: EventHandler, onClick :: EventHandler, onFocus :: EventHandler | specific) -``` - -Standard props which are shared by all DOM elements. - -#### `unsafeCreateDOMComponent` - -``` purescript -unsafeCreateDOMComponent :: forall props. String -> ReactComponent props -``` - - diff --git a/generated-docs/React/Basic/Events.md b/generated-docs/React/Basic/Events.md deleted file mode 100644 index bf41558..0000000 --- a/generated-docs/React/Basic/Events.md +++ /dev/null @@ -1,122 +0,0 @@ -## Module React.Basic.Events - -#### `EventHandler` - -``` purescript -type EventHandler = EffectFn1 SyntheticEvent Unit -``` - -An event handler, which receives a `SyntheticEvent` and performs some -effects in return. - -#### `SyntheticEvent` - -``` purescript -data SyntheticEvent :: Type -``` - -Event data that we receive from React. - -#### `EventFn` - -``` purescript -newtype EventFn a b -``` - -Encapsulates a safe event operation. `EventFn`s can be composed -to perform multiple operations. - -For example: - -```purs -input { onChange: handler (preventDefault >>> targetValue) - \value -> setState \_ -> { value } - } -``` - -##### Instances -``` purescript -Semigroupoid EventFn -Category EventFn -(IsSymbol l, Cons l (EventFn a b) fns_rest fns, Cons l b r_rest r, Lacks l fns_rest, Lacks l r_rest, Merge rest fns_rest a r_rest) => Merge (Cons l (EventFn a b) rest) fns a r -``` - -#### `unsafeEventFn` - -``` purescript -unsafeEventFn :: forall a b. (a -> b) -> EventFn a b -``` - -Unsafely create an `EventFn`. This function should be avoided as it can allow -a `SyntheticEvent` to escape its scope. Accessing a React event's properties is only -valid in a synchronous event callback. - -Instead, use the helper functions specific to your platform, such as `React.Basic.DOM.Events`. - -#### `handler` - -``` purescript -handler :: forall a. EventFn SyntheticEvent a -> (a -> Effect Unit) -> EventHandler -``` - -Create an `EventHandler`, given an `EventFn` and a callback. - -For example: - -```purs -input { onChange: handler targetValue - \value -> setState \_ -> { value } - } -``` - -#### `handler_` - -``` purescript -handler_ :: Effect Unit -> EventHandler -``` - -Create an `EventHandler` which discards the `SyntheticEvent`. - -For example: - -```purs -input { onChange: handler_ (setState \_ -> { value }) - } -``` - -#### `syntheticEvent` - -``` purescript -syntheticEvent :: EventFn SyntheticEvent SyntheticEvent -``` - -#### `merge` - -``` purescript -merge :: forall a fns fns_list r. RowToList fns fns_list => Merge fns_list fns a r => { | fns } -> EventFn a ({ | r }) -``` - -Merge multiple `EventFn` operations and collect their results. - -For example: - -```purs -input { onChange: handler (merge { targetValue, timeStamp }) - \{ targetValue, timeStamp } -> setState \_ -> { ... } - } -``` - -#### `Merge` - -``` purescript -class Merge (rl :: RowList) fns a r | rl -> fns, rl a -> r where - mergeImpl :: RLProxy rl -> { | fns } -> EventFn a ({ | r }) -``` - -##### Instances -``` purescript -Merge Nil () a () -(IsSymbol l, Cons l (EventFn a b) fns_rest fns, Cons l b r_rest r, Lacks l fns_rest, Lacks l r_rest, Merge rest fns_rest a r_rest) => Merge (Cons l (EventFn a b) rest) fns a r -``` - - diff --git a/src/React/Basic.js b/src/React/Basic.js index 010fefb..70f7e08 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -3,7 +3,13 @@ var React = require("react"); var Fragment = React.Fragment || "div"; -exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { +exports.createComponent_ = function( + noUpdate, + buildStateUpdate, + handler, + composeCancel, + displayName +) { function contextToSelf(instance) { var self = { props: instance.props.$$props, @@ -17,6 +23,9 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { }, send: function(action) { return function() { + if (!self.instance_.$$mounted) { + return; + } var sideEffects = null; self.instance_.setState( function(s) { @@ -42,6 +51,20 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { ); }; }, + capture: function(eventFn) { + return function(makeAction) { + return handler(composeCancel(eventFn))(function(event) { + return self.send(makeAction(event)); + }); + }; + }, + monitor: function(eventFn) { + return function(makeAction) { + return handler(eventFn)(function(event) { + return self.send(makeAction(event)); + }); + }; + }, instance_: instance }; return self; @@ -74,6 +97,7 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { }; var Component = function constructor(props) { + this.$$mounted = true; this.$$spec = props.$$spec; this.state = // React may optimize components with no state, @@ -104,6 +128,7 @@ exports.createComponent_ = function(noUpdate, buildStateUpdate, displayName) { }; Component.prototype.componentWillUnmount = function() { + this.$$mounted = false; return this.$$spec.willUnmount(contextToSelf(this))(); }; diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 59ae66b..84cabe9 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -25,11 +25,13 @@ module React.Basic import Prelude import Data.Either (Either(..)) -import Data.Function.Uncurried (Fn2, Fn3, runFn2, runFn3) +import Data.Function.Uncurried (Fn2, Fn5, runFn2, runFn5) import Data.Nullable (Nullable, notNull, null) import Effect (Effect) import Effect.Aff (Aff, runAff_) import Effect.Console (error) +import React.Basic.DOM.Events (preventDefault, stopPropagation) +import React.Basic.Events (EventFn, EventHandler, SyntheticEvent, handler) import Unsafe.Coerce (unsafeCoerce) -- | A virtual DOM element. @@ -54,7 +56,7 @@ type ComponentSpec props state initialState action = , render :: Self props state action -> JSX } -type Component = forall props state action. ComponentSpec props state Void action +type Component = forall props state action. ComponentSpec props state Unit action type Update props state action = Self props state action @@ -73,6 +75,12 @@ type Self props state action = , readProps :: Effect props , readState :: Effect state , send :: action -> Effect Unit + -- | Create a capturing* `EventHandler` to send an action when an event occurs. + -- | + -- | *capturing: prevent default and stop propagation + , capture :: forall a. EventFn SyntheticEvent a -> (a -> action) -> EventHandler + -- | Like `capture`, but does not cancel the event. + , monitor :: forall a. EventFn SyntheticEvent a -> (a -> action) -> EventHandler -- | Unsafe, but still frequently better than rewriting a -- | whold component in JS @@ -100,7 +108,7 @@ asyncEffects work self = runAff_ handle (work self) where handle (Right action) = self.send action handle (Left err) = do - error "An async action failed." + error $ "An async action failed in a " <> displayNameFromSelf self <> " component." -- Unsafely coercing to preserve browser console -- error features such as linked stack traces error (unsafeCoerce err) @@ -175,7 +183,7 @@ foreign import make -- | ``` makeStateless :: forall props - . ComponentSpec props Void Void Void + . ComponentSpec props Unit Unit Unit -> (props -> JSX) -> props -> JSX @@ -187,19 +195,21 @@ data ReactComponent props createComponent :: forall props state action . String - -> ComponentSpec props state Void action -createComponent = runFn3 createComponent_ NoUpdate buildStateUpdate + -> ComponentSpec props state Unit action +createComponent = runFn5 createComponent_ NoUpdate buildStateUpdate handler ((preventDefault >>> stopPropagation) >>> _) foreign import createComponent_ :: forall props state action - . Fn3 + . Fn5 (StateUpdate props state action) (StateUpdate props state action -> { state :: Nullable state , effects :: Nullable (Self props state action -> Effect Unit) }) + (forall a. EventFn SyntheticEvent a -> (a -> Effect Unit) -> EventHandler) + (forall a. EventFn SyntheticEvent a -> EventFn SyntheticEvent a) String - (ComponentSpec props state Void action) + (ComponentSpec props state Unit action) -- | An empty node. This is often useful when you would like to conditionally -- | show something, but you don't want to (or can't) modify the `children` prop @@ -255,8 +265,14 @@ foreign import toReactComponent . ComponentSpec { | props } state state action -> ReactComponent { | props } -displayName +displayNameFromComponentSpec :: forall props state initialState action . ComponentSpec props state initialState action -> String -displayName = _.displayName <<< unsafeCoerce <<< _."$$type" +displayNameFromComponentSpec = _.displayName <<< unsafeCoerce <<< _."$$type" + +displayNameFromSelf + :: forall props state action + . Self props state action + -> String +displayNameFromSelf = _.dislpayName <<< _."$$type" <<< _."$$spec" <<< unsafeCoerce <<< _.instance_ From 21292cf4ebecfc7b129f03fa54392f0e9ca5c336 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 16 Oct 2018 21:16:33 -0600 Subject: [PATCH 11/28] Clean up capture/monitor --- examples/component/src/ToggleButton.purs | 2 +- examples/counter/src/Counter.purs | 2 +- src/React/Basic.js | 31 ++++++++++++++++-------- src/React/Basic.purs | 19 ++++++++++++--- 4 files changed, 39 insertions(+), 15 deletions(-) diff --git a/examples/component/src/ToggleButton.purs b/examples/component/src/ToggleButton.purs index 650d7fc..c5befe1 100644 --- a/examples/component/src/ToggleButton.purs +++ b/examples/component/src/ToggleButton.purs @@ -28,7 +28,7 @@ render = make component , render = \self -> R.button - { onClick: self.capture identity $ const Toggle + { onClick: self.capture_ Toggle , children: [ R.text self.props.label , R.text if self.state.on diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index 0bf1c62..9ba8138 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -22,7 +22,7 @@ render = make component , render = \self -> R.button - { onClick: self.capture identity $ const Increment + { onClick: self.capture_ Increment , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] } } diff --git a/src/React/Basic.js b/src/React/Basic.js index 70f7e08..f341c3f 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -7,7 +7,8 @@ exports.createComponent_ = function( noUpdate, buildStateUpdate, handler, - composeCancel, + composeCancelEventFn, + identityEventFn, displayName ) { function contextToSelf(instance) { @@ -52,11 +53,12 @@ exports.createComponent_ = function( }; }, capture: function(eventFn) { - return function(makeAction) { - return handler(composeCancel(eventFn))(function(event) { - return self.send(makeAction(event)); - }); - }; + return self.monitor(composeCancelEventFn(eventFn)); + }, + capture_: function(action) { + return self.capture(identityEventFn)(function() { + return action; + }); }, monitor: function(eventFn) { return function(makeAction) { @@ -65,6 +67,11 @@ exports.createComponent_ = function( }); }; }, + monitor_: function(action) { + return self.monitor(identityEventFn)(function() { + return action; + }); + }, instance_: instance }; return self; @@ -114,9 +121,10 @@ exports.createComponent_ = function( Component.displayName = displayName; Component.prototype.shouldComponentUpdate = function(nextProps, nextState) { - return this.$$spec.shouldUpdate(contextToSelf(this))(nextProps.$$props)( - nextState === null ? null : nextState.$$state - ); + return this.$$spec.shouldUpdate({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(nextProps.$$props)(nextState === null ? null : nextState.$$state); }; Component.prototype.componentDidMount = function() { @@ -129,7 +137,10 @@ exports.createComponent_ = function( Component.prototype.componentWillUnmount = function() { this.$$mounted = false; - return this.$$spec.willUnmount(contextToSelf(this))(); + return this.$$spec.willUnmount({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(); }; Component.prototype.render = function() { diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 84cabe9..34aba3e 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -25,7 +25,7 @@ module React.Basic import Prelude import Data.Either (Either(..)) -import Data.Function.Uncurried (Fn2, Fn5, runFn2, runFn5) +import Data.Function.Uncurried (Fn2, Fn6, runFn2, runFn6) import Data.Nullable (Nullable, notNull, null) import Effect (Effect) import Effect.Aff (Aff, runAff_) @@ -79,8 +79,10 @@ type Self props state action = -- | -- | *capturing: prevent default and stop propagation , capture :: forall a. EventFn SyntheticEvent a -> (a -> action) -> EventHandler + , capture_ :: action -> EventHandler -- | Like `capture`, but does not cancel the event. , monitor :: forall a. EventFn SyntheticEvent a -> (a -> action) -> EventHandler + , monitor_ :: action -> EventHandler -- | Unsafe, but still frequently better than rewriting a -- | whold component in JS @@ -196,18 +198,29 @@ createComponent :: forall props state action . String -> ComponentSpec props state Unit action -createComponent = runFn5 createComponent_ NoUpdate buildStateUpdate handler ((preventDefault >>> stopPropagation) >>> _) +createComponent = + runFn6 + createComponent_ + NoUpdate + buildStateUpdate + handler + ((preventDefault >>> stopPropagation) >>> _) + identity foreign import createComponent_ :: forall props state action - . Fn5 + . Fn6 (StateUpdate props state action) (StateUpdate props state action -> { state :: Nullable state , effects :: Nullable (Self props state action -> Effect Unit) }) + -- handler (forall a. EventFn SyntheticEvent a -> (a -> Effect Unit) -> EventHandler) + -- composeCancelEventFn (forall a. EventFn SyntheticEvent a -> EventFn SyntheticEvent a) + -- identityEventFn + (EventFn SyntheticEvent SyntheticEvent) String (ComponentSpec props state Unit action) From d6ff680ef3dfa27fa802dacedf027d7fd017fa26 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 16 Oct 2018 23:55:29 -0600 Subject: [PATCH 12/28] A few more performance-related tweaks --- src/React/Basic.js | 89 +++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/src/React/Basic.js b/src/React/Basic.js index f341c3f..cc8187e 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -11,6 +11,32 @@ exports.createComponent_ = function( identityEventFn, displayName ) { + var defaultInitialState = null; + var defaultShouldUpdate = function() { + return function() { + return function() { + return true; + }; + }; + }; + var defaultDidMount = function() { + return function() {}; + }; + var defaultDidUpdate = function() { + return function() {}; + }; + var defaultWillUnmount = function() { + return function() {}; + }; + var defaultUpdate = function() { + return function() { + return noUpdate; + }; + }; + var defaultRender = function() { + return false; + }; + function contextToSelf(instance) { var self = { props: instance.props.$$props, @@ -24,7 +50,10 @@ exports.createComponent_ = function( }, send: function(action) { return function() { - if (!self.instance_.$$mounted) { + if ( + !self.instance_.$$mounted || + self.instance_.$$spec.update === defaultUpdate + ) { return; } var sideEffects = null; @@ -77,32 +106,6 @@ exports.createComponent_ = function( return self; } - var defaultInitialState = null; - var defaultShouldUpdate = function() { - return function() { - return function() { - return true; - }; - }; - }; - var defaultDidMount = function() { - return function() {}; - }; - var defaultDidUpdate = function() { - return function() {}; - }; - var defaultWillUnmount = function() { - return function() {}; - }; - var defaultUpdate = function() { - return function() { - return noUpdate; - }; - }; - var defaultRender = function() { - return false; - }; - var Component = function constructor(props) { this.$$mounted = true; this.$$spec = props.$$spec; @@ -121,26 +124,38 @@ exports.createComponent_ = function( Component.displayName = displayName; Component.prototype.shouldComponentUpdate = function(nextProps, nextState) { - return this.$$spec.shouldUpdate({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(nextProps.$$props)(nextState === null ? null : nextState.$$state); + var shouldUpdate = this.$$spec.shouldUpdate; + return shouldUpdate === defaultShouldUpdate + ? true + : shouldUpdate({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(nextProps.$$props)(nextState === null ? null : nextState.$$state); }; Component.prototype.componentDidMount = function() { - return this.$$spec.didMount(contextToSelf(this))(); + var didMount = this.$$spec.didMount; + if (didMount !== defaultDidMount) { + this.$$spec.didMount(contextToSelf(this))(); + } }; Component.prototype.componentDidUpdate = function() { - return this.$$spec.didUpdate(contextToSelf(this))(); + var didUpdate = this.$$spec.didUpdate; + if (didUpdate !== defaultDidUpdate) { + didUpdate(contextToSelf(this))(); + } }; Component.prototype.componentWillUnmount = function() { this.$$mounted = false; - return this.$$spec.willUnmount({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(); + var willUnmount = this.$$spec.willUnmount; + if (willUnmount !== defaultWillUnmount) { + willUnmount({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(); + } }; Component.prototype.render = function() { From d6cdfd923943362868be691e13a1e69343877829 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Wed, 17 Oct 2018 00:19:04 -0600 Subject: [PATCH 13/28] Move displayName functions to FFI --- .gitignore | 1 + src/React/Basic.js | 8 ++++++++ src/React/Basic.purs | 8 ++++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f9fa4f1..b8b6cb0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /node_modules/ /.pulp-cache/ /output/ +/generated-docs/ /.psc-package/ /.psc* /.purs* diff --git a/src/React/Basic.js b/src/React/Basic.js index cc8187e..74ae39a 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -227,3 +227,11 @@ exports.fragmentKeyed_ = function(key, children) { [Fragment, { key: key }].concat(children) ); }; + +exports.displayNameFromComponentSpec = function($$spec) { + return $$spec.$$type.displayName || "[unknown]"; +}; + +exports.displayNameFromSelf = function(self) { + return exports.displayNameFromComponentSpec(self.instance_.$$spec); +}; diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 34aba3e..6820b46 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -20,6 +20,8 @@ module React.Basic , element , elementKeyed , toReactComponent + , displayNameFromComponentSpec + , displayNameFromSelf ) where import Prelude @@ -278,14 +280,12 @@ foreign import toReactComponent . ComponentSpec { | props } state state action -> ReactComponent { | props } -displayNameFromComponentSpec +foreign import displayNameFromComponentSpec :: forall props state initialState action . ComponentSpec props state initialState action -> String -displayNameFromComponentSpec = _.displayName <<< unsafeCoerce <<< _."$$type" -displayNameFromSelf +foreign import displayNameFromSelf :: forall props state action . Self props state action -> String -displayNameFromSelf = _.dislpayName <<< _."$$type" <<< _."$$spec" <<< unsafeCoerce <<< _.instance_ From 781853657bfc022a742d7a5166bb3b5e6a321b04 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Wed, 17 Oct 2018 13:15:52 -0600 Subject: [PATCH 14/28] More performance tweaks --- src/React/Basic.js | 119 ++++++++++++++++++++++--------------------- src/React/Basic.purs | 9 ++-- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/React/Basic.js b/src/React/Basic.js index 74ae39a..2357aed 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -8,8 +8,7 @@ exports.createComponent_ = function( buildStateUpdate, handler, composeCancelEventFn, - identityEventFn, - displayName + identityEventFn ) { var defaultInitialState = null; var defaultShouldUpdate = function() { @@ -106,71 +105,73 @@ exports.createComponent_ = function( return self; } - var Component = function constructor(props) { - this.$$mounted = true; - this.$$spec = props.$$spec; - this.state = - // React may optimize components with no state, - // so we leave state null if it was left as - // the default value. - this.$$spec.initialState === defaultInitialState - ? null - : { $$state: this.$$spec.initialState }; - return this; - }; + return function(displayName) { + var Component = function constructor(props) { + this.$$mounted = true; + this.$$spec = props.$$spec; + this.state = + // React may optimize components with no state, + // so we leave state null if it was left as + // the default value. + this.$$spec.initialState === defaultInitialState + ? null + : { $$state: this.$$spec.initialState }; + return this; + }; - Component.prototype = Object.create(React.Component.prototype); + Component.prototype = Object.create(React.Component.prototype); - Component.displayName = displayName; + Component.displayName = displayName; - Component.prototype.shouldComponentUpdate = function(nextProps, nextState) { - var shouldUpdate = this.$$spec.shouldUpdate; - return shouldUpdate === defaultShouldUpdate - ? true - : shouldUpdate({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(nextProps.$$props)(nextState === null ? null : nextState.$$state); - }; + Component.prototype.shouldComponentUpdate = function(nextProps, nextState) { + var shouldUpdate = this.$$spec.shouldUpdate; + return shouldUpdate === defaultShouldUpdate + ? true + : shouldUpdate({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(nextProps.$$props)(nextState === null ? null : nextState.$$state); + }; - Component.prototype.componentDidMount = function() { - var didMount = this.$$spec.didMount; - if (didMount !== defaultDidMount) { - this.$$spec.didMount(contextToSelf(this))(); - } - }; + Component.prototype.componentDidMount = function() { + var didMount = this.$$spec.didMount; + if (didMount !== defaultDidMount) { + this.$$spec.didMount(contextToSelf(this))(); + } + }; - Component.prototype.componentDidUpdate = function() { - var didUpdate = this.$$spec.didUpdate; - if (didUpdate !== defaultDidUpdate) { - didUpdate(contextToSelf(this))(); - } - }; + Component.prototype.componentDidUpdate = function() { + var didUpdate = this.$$spec.didUpdate; + if (didUpdate !== defaultDidUpdate) { + didUpdate(contextToSelf(this))(); + } + }; - Component.prototype.componentWillUnmount = function() { - this.$$mounted = false; - var willUnmount = this.$$spec.willUnmount; - if (willUnmount !== defaultWillUnmount) { - willUnmount({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(); - } - }; + Component.prototype.componentWillUnmount = function() { + this.$$mounted = false; + var willUnmount = this.$$spec.willUnmount; + if (willUnmount !== defaultWillUnmount) { + willUnmount({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(); + } + }; - Component.prototype.render = function() { - return this.$$spec.render(contextToSelf(this)); - }; + Component.prototype.render = function() { + return this.$$spec.render(contextToSelf(this)); + }; - return { - $$type: Component, - initialState: defaultInitialState, - shouldUpdate: defaultShouldUpdate, - didMount: defaultDidMount, - didUpdate: defaultDidUpdate, - willUnmount: defaultWillUnmount, - update: defaultUpdate, - render: defaultRender + return { + $$type: Component, + initialState: defaultInitialState, + shouldUpdate: defaultShouldUpdate, + didMount: defaultDidMount, + didUpdate: defaultDidUpdate, + willUnmount: defaultWillUnmount, + update: defaultUpdate, + render: defaultRender + }; }; }; diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 6820b46..b211f44 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -27,7 +27,7 @@ module React.Basic import Prelude import Data.Either (Either(..)) -import Data.Function.Uncurried (Fn2, Fn6, runFn2, runFn6) +import Data.Function.Uncurried (Fn2, Fn5, runFn2, runFn5) import Data.Nullable (Nullable, notNull, null) import Effect (Effect) import Effect.Aff (Aff, runAff_) @@ -201,7 +201,7 @@ createComponent . String -> ComponentSpec props state Unit action createComponent = - runFn6 + runFn5 createComponent_ NoUpdate buildStateUpdate @@ -211,7 +211,7 @@ createComponent = foreign import createComponent_ :: forall props state action - . Fn6 + . Fn5 (StateUpdate props state action) (StateUpdate props state action -> { state :: Nullable state @@ -223,8 +223,7 @@ foreign import createComponent_ (forall a. EventFn SyntheticEvent a -> EventFn SyntheticEvent a) -- identityEventFn (EventFn SyntheticEvent SyntheticEvent) - String - (ComponentSpec props state Unit action) + (String -> ComponentSpec props state Unit action) -- | An empty node. This is often useful when you would like to conditionally -- | show something, but you don't want to (or can't) modify the `children` prop From 5dba472cb08e076367dd881fa95e51591181883e Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Wed, 17 Oct 2018 13:22:54 -0600 Subject: [PATCH 15/28] Still more perf :) --- src/React/Basic.js | 86 ++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/src/React/Basic.js b/src/React/Basic.js index 2357aed..fe204ae 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -105,6 +105,45 @@ exports.createComponent_ = function( return self; } + function shouldComponentUpdate(nextProps, nextState) { + var shouldUpdate = this.$$spec.shouldUpdate; + return shouldUpdate === defaultShouldUpdate + ? true + : shouldUpdate({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(nextProps.$$props)(nextState === null ? null : nextState.$$state); + } + + function componentDidMount() { + var didMount = this.$$spec.didMount; + if (didMount !== defaultDidMount) { + this.$$spec.didMount(contextToSelf(this))(); + } + } + + function componentDidUpdate() { + var didUpdate = this.$$spec.didUpdate; + if (didUpdate !== defaultDidUpdate) { + didUpdate(contextToSelf(this))(); + } + } + + function componentWillUnmount() { + this.$$mounted = false; + var willUnmount = this.$$spec.willUnmount; + if (willUnmount !== defaultWillUnmount) { + willUnmount({ + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state + })(); + } + } + + function render() { + return this.$$spec.render(contextToSelf(this)); + } + return function(displayName) { var Component = function constructor(props) { this.$$mounted = true; @@ -119,48 +158,13 @@ exports.createComponent_ = function( return this; }; - Component.prototype = Object.create(React.Component.prototype); - Component.displayName = displayName; - - Component.prototype.shouldComponentUpdate = function(nextProps, nextState) { - var shouldUpdate = this.$$spec.shouldUpdate; - return shouldUpdate === defaultShouldUpdate - ? true - : shouldUpdate({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(nextProps.$$props)(nextState === null ? null : nextState.$$state); - }; - - Component.prototype.componentDidMount = function() { - var didMount = this.$$spec.didMount; - if (didMount !== defaultDidMount) { - this.$$spec.didMount(contextToSelf(this))(); - } - }; - - Component.prototype.componentDidUpdate = function() { - var didUpdate = this.$$spec.didUpdate; - if (didUpdate !== defaultDidUpdate) { - didUpdate(contextToSelf(this))(); - } - }; - - Component.prototype.componentWillUnmount = function() { - this.$$mounted = false; - var willUnmount = this.$$spec.willUnmount; - if (willUnmount !== defaultWillUnmount) { - willUnmount({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(); - } - }; - - Component.prototype.render = function() { - return this.$$spec.render(contextToSelf(this)); - }; + Component.prototype = Object.create(React.Component.prototype); + Component.prototype.shouldComponentUpdate = shouldComponentUpdate; + Component.prototype.componentDidMount = componentDidMount; + Component.prototype.componentDidUpdate = componentDidUpdate; + Component.prototype.componentWillUnmount = componentWillUnmount; + Component.prototype.render = render; return { $$type: Component, From 7e5b24bad7d3fcafcb7d42dde0f2fd15893eea82 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Wed, 17 Oct 2018 13:29:43 -0600 Subject: [PATCH 16/28] Remove Compat module (moved to legacy example) --- {src/React/Basic => examples/legacy-v2/src}/Compat.purs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {src/React/Basic => examples/legacy-v2/src}/Compat.purs (100%) diff --git a/src/React/Basic/Compat.purs b/examples/legacy-v2/src/Compat.purs similarity index 100% rename from src/React/Basic/Compat.purs rename to examples/legacy-v2/src/Compat.purs From 07df783bc4ce24ac10a01fcbe2770722bbc8d750 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Thu, 18 Oct 2018 18:05:05 -0600 Subject: [PATCH 17/28] Capture forall bug --- examples/controlled-input/src/ControlledInput.purs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/controlled-input/src/ControlledInput.purs b/examples/controlled-input/src/ControlledInput.purs index 83b6fbe..49115bc 100644 --- a/examples/controlled-input/src/ControlledInput.purs +++ b/examples/controlled-input/src/ControlledInput.purs @@ -3,6 +3,7 @@ module ControlledInput where import Prelude import Data.Maybe (Maybe(..), fromMaybe, maybe) +import Effect.Console (logShow) import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) import React.Basic as React import React.Basic.DOM as R @@ -28,7 +29,10 @@ render = make component , timestamp = Just timestamp } - , render = \self -> + , render = render + } + where + render self = React.fragment [ R.input { onChange: @@ -40,7 +44,7 @@ render = make component , R.p_ [ R.text ("Current value = " <> show self.state.value) ] , R.p_ [ R.text ("Changed at = " <> maybe "never" show self.state.timestamp) ] ] - } + component :: Component component = createComponent "ControlledInput" From a03d67d1bccb68ee4f8415692d658938996025fc Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Mon, 22 Oct 2018 23:38:01 -0600 Subject: [PATCH 18/28] Refactor Self, plus more FFI perf improvements --- examples/component/src/Container.purs | 10 +- examples/component/src/Main.purs | 4 +- examples/component/src/ToggleButton.purs | 8 +- .../controlled-input/src/ControlledInput.purs | 17 +- examples/controlled-input/src/Main.purs | 4 +- examples/counter/src/Counter.purs | 8 +- examples/counter/src/Main.purs | 4 +- examples/legacy-v2/src/Compat.purs | 10 +- examples/legacy-v2/src/LegacyCounter.purs | 4 +- examples/legacy-v2/src/Main.purs | 4 +- src/React/Basic.js | 214 +++++++++--------- src/React/Basic.purs | 163 ++++++++----- 12 files changed, 246 insertions(+), 204 deletions(-) diff --git a/examples/component/src/Container.purs b/examples/component/src/Container.purs index d9966ad..19c0808 100644 --- a/examples/component/src/Container.purs +++ b/examples/component/src/Container.purs @@ -4,14 +4,14 @@ import Prelude import React.Basic (Component, JSX, createComponent, makeStateless) import React.Basic.DOM as R -import ToggleButton as ToggleButton +import ToggleButton (toggleButton) -render :: JSX -render = unit # makeStateless component \_ -> +toggleButtonContainer :: JSX +toggleButtonContainer = unit # makeStateless component \_ -> R.div { children: - [ ToggleButton.render { label: "A" } - , ToggleButton.render { label: "B" } + [ toggleButton { label: "A" } + , toggleButton { label: "B" } ] } diff --git a/examples/component/src/Main.purs b/examples/component/src/Main.purs index 3057d14..67193a8 100644 --- a/examples/component/src/Main.purs +++ b/examples/component/src/Main.purs @@ -2,7 +2,7 @@ module Main where import Prelude -import Container as Container +import Container (toggleButtonContainer) import Data.Maybe (Maybe(..)) import Effect (Effect) import Effect.Exception (throw) @@ -18,5 +18,5 @@ main = do case container of Nothing -> throw "Container element not found." Just c -> - let app = Container.render + let app = toggleButtonContainer in render app c diff --git a/examples/component/src/ToggleButton.purs b/examples/component/src/ToggleButton.purs index c5befe1..2625b74 100644 --- a/examples/component/src/ToggleButton.purs +++ b/examples/component/src/ToggleButton.purs @@ -3,7 +3,7 @@ module ToggleButton where import Prelude import Effect.Console (log) -import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) +import React.Basic (Component, JSX, StateUpdate(..), capture_, createComponent, make) import React.Basic.DOM as R type Props = @@ -13,8 +13,8 @@ type Props = data Action = Toggle -render :: Props -> JSX -render = make component +toggleButton :: Props -> JSX +toggleButton = make component { initialState = { on: false } @@ -28,7 +28,7 @@ render = make component , render = \self -> R.button - { onClick: self.capture_ Toggle + { onClick: capture_ self Toggle , children: [ R.text self.props.label , R.text if self.state.on diff --git a/examples/controlled-input/src/ControlledInput.purs b/examples/controlled-input/src/ControlledInput.purs index 49115bc..e8025dc 100644 --- a/examples/controlled-input/src/ControlledInput.purs +++ b/examples/controlled-input/src/ControlledInput.purs @@ -3,8 +3,7 @@ module ControlledInput where import Prelude import Data.Maybe (Maybe(..), fromMaybe, maybe) -import Effect.Console (logShow) -import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) +import React.Basic (Component, JSX, StateUpdate(..), capture, createComponent, make) import React.Basic as React import React.Basic.DOM as R import React.Basic.DOM.Events (targetValue, timeStamp) @@ -15,8 +14,8 @@ type Props = {} data Action = ValueChanged String Number -render :: Props -> JSX -render = make component +controlledInput :: Props -> JSX +controlledInput = make component { initialState = { value: "hello world" , timestamp: Nothing @@ -29,22 +28,18 @@ render = make component , timestamp = Just timestamp } - , render = render - } - where - render self = + , render = \self -> React.fragment [ R.input { onChange: - self.capture - (merge { targetValue, timeStamp }) + capture self (merge { targetValue, timeStamp }) \{ timeStamp, targetValue } -> ValueChanged (fromMaybe "" targetValue) timeStamp , value: self.state.value } , R.p_ [ R.text ("Current value = " <> show self.state.value) ] , R.p_ [ R.text ("Changed at = " <> maybe "never" show self.state.timestamp) ] ] - + } component :: Component component = createComponent "ControlledInput" diff --git a/examples/controlled-input/src/Main.purs b/examples/controlled-input/src/Main.purs index bd1668d..3e46fe3 100644 --- a/examples/controlled-input/src/Main.purs +++ b/examples/controlled-input/src/Main.purs @@ -2,7 +2,7 @@ module Main where import Prelude -import ControlledInput as ControlledInput +import ControlledInput (controlledInput) import Data.Maybe (Maybe(..)) import Effect (Effect) import Effect.Exception (throw) @@ -18,5 +18,5 @@ main = do case container of Nothing -> throw "Container element not found." Just c -> - let app = ControlledInput.render {} + let app = controlledInput {} in render app c diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index 9ba8138..55b2eb8 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -2,7 +2,7 @@ module Counter where import Prelude -import React.Basic (Component, JSX, StateUpdate(..), createComponent, make) +import React.Basic (Component, JSX, StateUpdate(..), capture_, createComponent, make) import React.Basic.DOM as R type Props = @@ -12,8 +12,8 @@ type Props = data Action = Increment -render :: Props -> JSX -render = make component +counter :: Props -> JSX +counter = make component { initialState = { counter: 0 } , update = \self -> case _ of @@ -22,7 +22,7 @@ render = make component , render = \self -> R.button - { onClick: self.capture_ Increment + { onClick: capture_ self Increment , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] } } diff --git a/examples/counter/src/Main.purs b/examples/counter/src/Main.purs index 0888228..fa07fd4 100644 --- a/examples/counter/src/Main.purs +++ b/examples/counter/src/Main.purs @@ -2,7 +2,7 @@ module Main where import Prelude -import Counter as Counter +import Counter (counter) import Data.Maybe (Maybe(..)) import Effect (Effect) import Effect.Exception (throw) @@ -18,5 +18,5 @@ main = do case container of Nothing -> throw "Container element not found." Just c -> - let app = Counter.render { label: "Increment" } + let app = counter { label: "Increment" } in render app c diff --git a/examples/legacy-v2/src/Compat.purs b/examples/legacy-v2/src/Compat.purs index 6e46b98..34ba33d 100644 --- a/examples/legacy-v2/src/Compat.purs +++ b/examples/legacy-v2/src/Compat.purs @@ -8,7 +8,7 @@ module React.Basic.Compat import Prelude import Effect (Effect) -import React.Basic (JSX, ReactComponent, Self, StateUpdate(..), ComponentSpec, createComponent, element, elementKeyed, empty, fragment, fragmentKeyed, make, makeStateless, toReactComponent) +import React.Basic (ComponentSpec, JSX, ReactComponent, Self, StateUpdate(..), createComponent, element, elementKeyed, empty, fragment, fragmentKeyed, make, makeStateless, send, toReactComponent) type Component = ReactComponent @@ -22,7 +22,7 @@ component } -> ReactComponent { | props } component { displayName, initialState, receiveProps, render } = - toReactComponent (createComponent displayName) + toReactComponent identity (createComponent displayName) { initialState = initialState , didMount = receiveProps <<< selfToLegacySelf , didUpdate = receiveProps <<< selfToLegacySelf @@ -30,10 +30,10 @@ component { displayName, initialState, receiveProps, render } = , render = render <<< selfToLegacySelf } where - selfToLegacySelf { props, state, send } = + selfToLegacySelf self@{ props, state } = { props , state - , setState: send + , setState: send self } -- | Supports a common subset of the v2 API to ease the upgrade process @@ -44,6 +44,6 @@ stateless } -> ReactComponent { | props } stateless { displayName, render } = - toReactComponent (createComponent displayName) + toReactComponent identity (createComponent displayName) { render = \self -> render self.props } diff --git a/examples/legacy-v2/src/LegacyCounter.purs b/examples/legacy-v2/src/LegacyCounter.purs index 15e86b9..74d8e26 100644 --- a/examples/legacy-v2/src/LegacyCounter.purs +++ b/examples/legacy-v2/src/LegacyCounter.purs @@ -11,8 +11,8 @@ type Props = } -- | checks `component` -counter :: Component Props -counter = component { displayName: "LegacyCounter", initialState, receiveProps, render } +legacyCounter :: Component Props +legacyCounter = component { displayName: "LegacyCounter", initialState, receiveProps, render } where initialState = { counter: 0 diff --git a/examples/legacy-v2/src/Main.purs b/examples/legacy-v2/src/Main.purs index 78486be..bdb51c9 100644 --- a/examples/legacy-v2/src/Main.purs +++ b/examples/legacy-v2/src/Main.purs @@ -5,7 +5,7 @@ import Prelude import Data.Maybe (Maybe(..)) import Effect (Effect) import Effect.Exception (throw) -import LegacyCounter as LegacyCounter +import LegacyCounter (legacyCounter) import React.Basic (element) import React.Basic.DOM (render) import Web.DOM.NonElementParentNode (getElementById) @@ -19,5 +19,5 @@ main = do case container of Nothing -> throw "Container element not found." Just c -> - let app = element LegacyCounter.counter { label: "Increment" } + let app = element legacyCounter { label: "Increment" } in render app c diff --git a/src/React/Basic.js b/src/React/Basic.js index fe204ae..0720e9e 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -3,13 +3,48 @@ var React = require("react"); var Fragment = React.Fragment || "div"; -exports.createComponent_ = function( - noUpdate, - buildStateUpdate, - handler, - composeCancelEventFn, - identityEventFn -) { +exports.readProps = function(self) { + return self.instance_.props.$$props; +}; + +exports.readState = function(self) { + var state = self.instance_.state; + return state === null ? null : state.$$state; +}; + +exports.send_ = function(buildStateUpdate) { + return function(self, action) { + if (!self.instance_.$$mounted) { + exports.warningUnmountedComponentAction(self, action); + return; + } + var sideEffects = null; + self.instance_.setState( + function(s) { + var setStateContext = self.instance_.toSelf(); + setStateContext.state = s.$$state; + var updates = buildStateUpdate( + self.instance_.$$spec.update(setStateContext)(action) + ); + if (updates.effects !== null) { + sideEffects = updates.effects; + } + if (updates.state !== null && updates.state !== s.$$state) { + return { $$state: updates.state }; + } else { + return null; + } + }, + function() { + if (sideEffects !== null) { + sideEffects(this.toSelf())(); + } + } + ); + }; +}; + +exports.createComponent_ = function(defaultUpdate) { var defaultInitialState = null; var defaultShouldUpdate = function() { return function() { @@ -27,80 +62,18 @@ exports.createComponent_ = function( var defaultWillUnmount = function() { return function() {}; }; - var defaultUpdate = function() { - return function() { - return noUpdate; - }; - }; var defaultRender = function() { return false; }; - function contextToSelf(instance) { + // Begin component prototype functions + // (`this`-dependent, defined outside `createComponent` + // for a slight performance boost) + function toSelf() { var self = { - props: instance.props.$$props, - state: instance.state === null ? null : instance.state.$$state, - readProps: function() { - return self.instance_.props.$$props; - }, - readState: function() { - var state = self.instance_.state; - return state === null ? null : state.$$state; - }, - send: function(action) { - return function() { - if ( - !self.instance_.$$mounted || - self.instance_.$$spec.update === defaultUpdate - ) { - return; - } - var sideEffects = null; - self.instance_.setState( - function(s) { - var setStateContext = contextToSelf(self.instance_); - setStateContext.state = s.$$state; - var updates = buildStateUpdate( - self.instance_.$$spec.update(setStateContext)(action) - ); - if (updates.effects !== null) { - sideEffects = updates.effects; - } - if (updates.state !== null && updates.state !== s.$$state) { - return { $$state: updates.state }; - } else { - return null; - } - }, - function() { - if (sideEffects !== null) { - sideEffects(contextToSelf(this))(); - } - } - ); - }; - }, - capture: function(eventFn) { - return self.monitor(composeCancelEventFn(eventFn)); - }, - capture_: function(action) { - return self.capture(identityEventFn)(function() { - return action; - }); - }, - monitor: function(eventFn) { - return function(makeAction) { - return handler(eventFn)(function(event) { - return self.send(makeAction(event)); - }); - }; - }, - monitor_: function(action) { - return self.monitor(identityEventFn)(function() { - return action; - }); - }, - instance_: instance + props: this.props.$$props, + state: this.state === null ? null : this.state.$$state, + instance_: this }; return self; } @@ -109,23 +82,22 @@ exports.createComponent_ = function( var shouldUpdate = this.$$spec.shouldUpdate; return shouldUpdate === defaultShouldUpdate ? true - : shouldUpdate({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(nextProps.$$props)(nextState === null ? null : nextState.$$state); + : shouldUpdate(this.toSelf())(nextProps.$$props)( + nextState === null ? null : nextState.$$state + ); } function componentDidMount() { var didMount = this.$$spec.didMount; if (didMount !== defaultDidMount) { - this.$$spec.didMount(contextToSelf(this))(); + this.$$spec.didMount(this.toSelf())(); } } function componentDidUpdate() { var didUpdate = this.$$spec.didUpdate; if (didUpdate !== defaultDidUpdate) { - didUpdate(contextToSelf(this))(); + didUpdate(this.toSelf())(); } } @@ -133,16 +105,14 @@ exports.createComponent_ = function( this.$$mounted = false; var willUnmount = this.$$spec.willUnmount; if (willUnmount !== defaultWillUnmount) { - willUnmount({ - props: this.props.$$props, - state: this.state === null ? null : this.state.$$state - })(); + willUnmount(this.toSelf())(); } } function render() { - return this.$$spec.render(contextToSelf(this)); + return this.$$spec.render(this.toSelf()); } + // End component prototype functions return function(displayName) { var Component = function constructor(props) { @@ -160,6 +130,7 @@ exports.createComponent_ = function( Component.displayName = displayName; Component.prototype = Object.create(React.Component.prototype); + Component.prototype.toSelf = toSelf; Component.prototype.shouldComponentUpdate = shouldComponentUpdate; Component.prototype.componentDidMount = componentDidMount; Component.prototype.componentDidUpdate = componentDidUpdate; @@ -189,26 +160,6 @@ exports.make = function($$spec) { }; }; -exports.toReactComponent = function($$spec) { - var Component = function constructor() { - return this; - }; - - Component.prototype = Object.create(React.Component.prototype); - - Component.displayName = $$spec.$$type.displayName + " (Wrapper)"; - - Component.prototype.render = function() { - var props = { - $$props: this.props, - $$spec: $$spec - }; - return React.createElement($$spec.$$type, props); - }; - - return Component; -}; - exports.keyed_ = function(key, child) { return React.createElement(Fragment, { key: key }, child); }; @@ -240,3 +191,52 @@ exports.displayNameFromComponentSpec = function($$spec) { exports.displayNameFromSelf = function(self) { return exports.displayNameFromComponentSpec(self.instance_.$$spec); }; + +exports.toReactComponent_ = function(fromJSProps, $$spec) { + var Component = function constructor() { + return this; + }; + + Component.prototype = Object.create(React.Component.prototype); + + Component.displayName = $$spec.$$type.displayName + " (Wrapper)"; + + Component.prototype.render = function() { + var props = { + $$props: fromJSProps(this.props), + $$spec: $$spec + }; + return React.createElement($$spec.$$type, props); + }; + + return Component; +}; + +exports.warningDefaultUpdate = function(self, action) { + console.error( + "A " + + exports.displayNameFromSelf(self) + + " component received an action but has no `update` function defined. Override the default `update` function to handle this action." + ); + console.error("Self:", self); + console.error("Action:", action); +}; + +exports.warningUnmountedComponentAction = function(self, action) { + console.error( + "An unmounted " + + exports.displayNameFromSelf(self) + + " component received the action below. Actions received by unmounted components usually indicate a memory leak. Make sure to unsubscribe from any async work in `willUnmount`." + ); + console.error("Self:", self); + console.error("Action:", action); +}; + +exports.warningFailedAsyncAction = function(self, error) { + console.error( + "An async action failed in a " + + exports.displayNameFromSelf(self) + + " component." + ); + console.error(error); +}; diff --git a/src/React/Basic.purs b/src/React/Basic.purs index b211f44..658ffb7 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -6,9 +6,15 @@ module React.Basic , Update , StateUpdate(..) , Self - , LimitedSelf , ReactComponent , ReactComponentInstance + , readProps + , readState + , send + , capture + , capture_ + , monitor + , monitor_ , make , makeStateless , asyncEffects @@ -27,11 +33,11 @@ module React.Basic import Prelude import Data.Either (Either(..)) -import Data.Function.Uncurried (Fn2, Fn5, runFn2, runFn5) +import Data.Function.Uncurried (Fn2, Fn1, runFn1, runFn2) import Data.Nullable (Nullable, notNull, null) import Effect (Effect) -import Effect.Aff (Aff, runAff_) -import Effect.Console (error) +import Effect.Aff (Aff, Error, runAff_) +import Effect.Uncurried (EffectFn2, runEffectFn2) import React.Basic.DOM.Events (preventDefault, stopPropagation) import React.Basic.Events (EventFn, EventHandler, SyntheticEvent, handler) import Unsafe.Coerce (unsafeCoerce) @@ -50,10 +56,10 @@ data ComponentType props state action type ComponentSpec props state initialState action = { "$$type" :: ComponentType props state action , initialState :: initialState - , shouldUpdate :: LimitedSelf props state -> props -> state -> Boolean + , shouldUpdate :: Self props state action -> props -> state -> Boolean , didMount :: Self props state action -> Effect Unit , didUpdate :: Self props state action -> Effect Unit - , willUnmount :: LimitedSelf props state -> Effect Unit + , willUnmount :: Self props state action -> Effect Unit , update :: Update props state action , render :: Self props state action -> JSX } @@ -72,32 +78,59 @@ data StateUpdate props state action | UpdateAndSideEffects state (Self props state action -> Effect Unit) type Self props state action = + -- | Read the snapshot of `props` taken when this `Self` was created. { props :: props + + -- | Read the snapshot of `state` taken when this `Self` was created. , state :: state - , readProps :: Effect props - , readState :: Effect state - , send :: action -> Effect Unit - -- | Create a capturing* `EventHandler` to send an action when an event occurs. - -- | - -- | *capturing: prevent default and stop propagation - , capture :: forall a. EventFn SyntheticEvent a -> (a -> action) -> EventHandler - , capture_ :: action -> EventHandler - -- | Like `capture`, but does not cancel the event. - , monitor :: forall a. EventFn SyntheticEvent a -> (a -> action) -> EventHandler - , monitor_ :: action -> EventHandler - - -- | Unsafe, but still frequently better than rewriting a - -- | whold component in JS - , instance_ :: ReactComponentInstance - } -type LimitedSelf props state = - { props :: props - , state :: state +-- | Unsafe escape hatch, but still frequently better than +-- | rewriting an entire component in JS. + , instance_ :: ReactComponentInstance } data ReactComponentInstance +-- | Read the most up to date `props` directly from the component instance +-- | associated with this `Self`. Generally, the `props` function is sufficient. +foreign import readProps :: forall props state action. Self props state action -> Effect props + +-- | Read the most up to date `state` directly from the component instance +-- | associated with this `Self`. Generally, the `state` function is sufficient. +foreign import readState :: forall props state action. Self props state action -> Effect state + +-- | Dispatch an `action` into the component to be handled by `update`. +send :: forall props state action. Self props state action -> action -> Effect Unit +send = runEffectFn2 (runFn1 send_ buildStateUpdate) + +foreign import send_ + :: forall props state action + . Fn1 + (StateUpdate props state action + -> { state :: Nullable state + , effects :: Nullable (Self props state action -> Effect Unit) + }) + (EffectFn2 + (Self props state action) + action + Unit) + +-- | Create a capturing* `EventHandler` to send an action when an event occurs. +-- | +-- | *capturing: prevent default and stop propagation +capture :: forall props state action a. Self props state action -> EventFn SyntheticEvent a -> (a -> action) -> EventHandler +capture self eventFn = monitor self (preventDefault >>> stopPropagation >>> eventFn) + +capture_ :: forall props state action. Self props state action -> action -> EventHandler +capture_ self action = capture self identity \_ -> action + +-- | Like `capture`, but does not cancel the event. +monitor :: forall props state action a. Self props state action -> EventFn SyntheticEvent a -> (a -> action) -> EventHandler +monitor self eventFn makeAction = handler eventFn \a -> send self (makeAction a) + +monitor_ :: forall props state action. Self props state action -> action -> EventHandler +monitor_ self action = monitor self identity \_ -> action + -- | Convenience function for sending an action asynchronously. -- | -- | Note: potential failure should be handled and converted to an @@ -110,12 +143,8 @@ asyncEffects -> Effect Unit asyncEffects work self = runAff_ handle (work self) where - handle (Right action) = self.send action - handle (Left err) = do - error $ "An async action failed in a " <> displayNameFromSelf self <> " component." - -- Unsafely coercing to preserve browser console - -- error features such as linked stack traces - error (unsafeCoerce err) + handle (Right action) = send self action + handle (Left err) = runEffectFn2 warningFailedAsyncAction self err buildStateUpdate :: forall props state action @@ -128,16 +157,16 @@ buildStateUpdate = case _ of { state: null , effects: null } - Update state -> - { state: notNull state + Update state_ -> + { state: notNull state_ , effects: null } SideEffects effects -> { state: null , effects: notNull effects } - UpdateAndSideEffects state effects -> - { state: notNull state + UpdateAndSideEffects state_ effects -> + { state: notNull state_ , effects: notNull effects } @@ -201,28 +230,16 @@ createComponent . String -> ComponentSpec props state Unit action createComponent = - runFn5 + runFn1 createComponent_ - NoUpdate - buildStateUpdate - handler - ((preventDefault >>> stopPropagation) >>> _) - identity + (\_ action -> + SideEffects \self -> do + runEffectFn2 warningDefaultUpdate self action) foreign import createComponent_ :: forall props state action - . Fn5 - (StateUpdate props state action) - (StateUpdate props state action - -> { state :: Nullable state - , effects :: Nullable (Self props state action -> Effect Unit) - }) - -- handler - (forall a. EventFn SyntheticEvent a -> (a -> Effect Unit) -> EventHandler) - -- composeCancelEventFn - (forall a. EventFn SyntheticEvent a -> EventFn SyntheticEvent a) - -- identityEventFn - (EventFn SyntheticEvent SyntheticEvent) + . Fn1 + (Update props state action) (String -> ComponentSpec props state Unit action) -- | An empty node. This is often useful when you would like to conditionally @@ -274,11 +291,6 @@ foreign import elementKeyed_ :: forall props . Fn2 (ReactComponent { | props }) { key :: String | props } JSX -foreign import toReactComponent - :: forall props state action - . ComponentSpec { | props } state state action - -> ReactComponent { | props } - foreign import displayNameFromComponentSpec :: forall props state initialState action . ComponentSpec props state initialState action @@ -288,3 +300,38 @@ foreign import displayNameFromSelf :: forall props state action . Self props state action -> String + +toReactComponent + :: forall jsProps props state action + . ({ | jsProps } -> props) + -> ComponentSpec props state state action + -> ReactComponent { | jsProps } +toReactComponent = runFn2 toReactComponent_ + +foreign import toReactComponent_ + :: forall jsProps props state action + . Fn2 + ({ | jsProps } -> props) + (ComponentSpec props state state action) + (ReactComponent { | jsProps }) + +foreign import warningDefaultUpdate + :: forall props state action + . EffectFn2 + (Self props state action) + action + Unit + +foreign import warningUnmountedComponentAction + :: forall props state action + . EffectFn2 + (Self props state action) + action + Unit + +foreign import warningFailedAsyncAction + :: forall props state action + . EffectFn2 + (Self props state action) + Error + Unit From 8aa091e7a6f6e5be367bfcae32fb9626aa8ca1ca Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Thu, 25 Oct 2018 14:57:23 -0600 Subject: [PATCH 19/28] Reorganize for docs --- examples/counter/package.json | 6 +- examples/counter/src/Counter.purs | 8 +- src/React/Basic.js | 91 +++--- src/React/Basic.purs | 494 ++++++++++++++++++++---------- 4 files changed, 387 insertions(+), 212 deletions(-) diff --git a/examples/counter/package.json b/examples/counter/package.json index 624a6f3..583c22b 100644 --- a/examples/counter/package.json +++ b/examples/counter/package.json @@ -1,9 +1,9 @@ { "dependencies": { - "react": "^16.4.2", - "react-dom": "^16.4.2" + "react": "16.6.0", + "react-dom": "16.6.0" }, "devDependencies": { - "browserify": "^16.2.2" + "browserify": "16.2.3" } } diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index 55b2eb8..89e88d3 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -5,6 +5,9 @@ import Prelude import React.Basic (Component, JSX, StateUpdate(..), capture_, createComponent, make) import React.Basic.DOM as R +component :: Component +component = createComponent "Counter" + type Props = { label :: String } @@ -14,7 +17,7 @@ data Action counter :: Props -> JSX counter = make component - { initialState = { counter: 0 } + { initialState = { counter: 0, dummy: 0 } , update = \self -> case _ of Increment -> @@ -26,6 +29,3 @@ counter = make component , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] } } - -component :: Component -component = createComponent "Counter" diff --git a/src/React/Basic.js b/src/React/Basic.js index 0720e9e..6caa306 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -3,47 +3,6 @@ var React = require("react"); var Fragment = React.Fragment || "div"; -exports.readProps = function(self) { - return self.instance_.props.$$props; -}; - -exports.readState = function(self) { - var state = self.instance_.state; - return state === null ? null : state.$$state; -}; - -exports.send_ = function(buildStateUpdate) { - return function(self, action) { - if (!self.instance_.$$mounted) { - exports.warningUnmountedComponentAction(self, action); - return; - } - var sideEffects = null; - self.instance_.setState( - function(s) { - var setStateContext = self.instance_.toSelf(); - setStateContext.state = s.$$state; - var updates = buildStateUpdate( - self.instance_.$$spec.update(setStateContext)(action) - ); - if (updates.effects !== null) { - sideEffects = updates.effects; - } - if (updates.state !== null && updates.state !== s.$$state) { - return { $$state: updates.state }; - } else { - return null; - } - }, - function() { - if (sideEffects !== null) { - sideEffects(this.toSelf())(); - } - } - ); - }; -}; - exports.createComponent_ = function(defaultUpdate) { var defaultInitialState = null; var defaultShouldUpdate = function() { @@ -150,6 +109,47 @@ exports.createComponent_ = function(defaultUpdate) { }; }; +exports.send_ = function(buildStateUpdate) { + return function(self, action) { + if (!self.instance_.$$mounted) { + exports.warningUnmountedComponentAction(self, action); + return; + } + var sideEffects = null; + self.instance_.setState( + function(s) { + var setStateContext = self.instance_.toSelf(); + setStateContext.state = s.$$state; + var updates = buildStateUpdate( + self.instance_.$$spec.update(setStateContext)(action) + ); + if (updates.effects !== null) { + sideEffects = updates.effects; + } + if (updates.state !== null && updates.state !== s.$$state) { + return { $$state: updates.state }; + } else { + return null; + } + }, + function() { + if (sideEffects !== null) { + sideEffects(this.toSelf())(); + } + } + ); + }; +}; + +exports.readProps = function(self) { + return self.instance_.props.$$props; +}; + +exports.readState = function(self) { + var state = self.instance_.state; + return state === null ? null : state.$$state; +}; + exports.make = function($$spec) { return function($$props) { var props = { @@ -160,6 +160,8 @@ exports.make = function($$spec) { }; }; +exports.empty = null; + exports.keyed_ = function(key, child) { return React.createElement(Fragment, { key: key }, child); }; @@ -177,13 +179,6 @@ exports.fragment = function(children) { return React.createElement.apply(null, [Fragment, {}].concat(children)); }; -exports.fragmentKeyed_ = function(key, children) { - return React.createElement.apply( - null, - [Fragment, { key: key }].concat(children) - ); -}; - exports.displayNameFromComponentSpec = function($$spec) { return $$spec.$$type.displayName || "[unknown]"; }; diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 658ffb7..91f852d 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -1,33 +1,29 @@ module React.Basic - ( Component - , ComponentSpec + ( ComponentSpec + , createComponent + , Component , ComponentType - , JSX - , Update , StateUpdate(..) , Self - , ReactComponent - , ReactComponentInstance - , readProps - , readState , send + , sendAsync , capture , capture_ , monitor , monitor_ + , readProps + , readState , make , makeStateless - , asyncEffects - , createComponent + , JSX , empty , keyed , fragment - , fragmentKeyed , element , elementKeyed + , ReactComponent + , ReactComponentInstance , toReactComponent - , displayNameFromComponentSpec - , displayNameFromSelf ) where import Prelude @@ -40,141 +36,231 @@ import Effect.Aff (Aff, Error, runAff_) import Effect.Uncurried (EffectFn2, runEffectFn2) import React.Basic.DOM.Events (preventDefault, stopPropagation) import React.Basic.Events (EventFn, EventHandler, SyntheticEvent, handler) -import Unsafe.Coerce (unsafeCoerce) - --- | A virtual DOM element. -foreign import data JSX :: Type - -instance semigroupJSX :: Semigroup JSX where - append a b = fragment [ a, b ] - -instance monoidJSX :: Monoid JSX where - mempty = empty - -data ComponentType props state action +-- | `ComponentSpec` represents a React-Basic component implementation. +-- | +-- | These are the properties your component definition may override +-- | with specific implementations. None are required to be overridden, unless +-- | an overridden function interacts with `state`, in which case `initialState` +-- | is required (the compiler enforces this). While you _can_ use `state` and +-- | dispatch actions without defining `update`, doing so doesn't make much sense +-- | so the default `update` implementation will emit a warning. +-- | +-- | - `initialState` +-- | - The component's starting state. +-- | - Avoid mirroring prop values in state. +-- | - `update` +-- | - All state updates go through `update`. +-- | - `update` is called when `send` is used to dispatch an action. +-- | - State changes are described using `StateUpdate`. Only `Update` and `UpdateAndSideEffects` will cause rerenders and a call to `didUpdate`. +-- | - Side effects requested are only invoked _after_ any corrosponding state update has completed its render cycle and the changes have been applied. This means it is safe to interact with the DOM in a side effect, for example. +-- | - `render` +-- | - Takes a current snapshot of the component (`Self`) and converts it to renderable `JSX`. +-- | - `shouldUpdate` +-- | - Can be useful for occasional performance optimizations. Rarely necessary. +-- | - `didMount` +-- | - The React component's `componentDidMount` lifecycle. Useful for initiating an action on first mount, such as fetching data from a server. +-- | - `didUpdate` +-- | - The React component's `componentDidUpdate` lifecycle. Rarely necessary. +-- | - `willUnmount` +-- | - The React component's `componentWillUpdate` lifecycle. Any subscriptions or timers created in `didMount` or `didUpdate` should be disposed of here. +-- | +-- | The component spec is generally not exported from your component +-- | module and this type is rarely used explicitly. The simplified alias +-- | `Component` is usually sufficient, and `make` will validate whether +-- | your component's types line up. +-- | +-- | For example: +-- | +-- | ```purs +-- | component :: Component +-- | component = createComponent "Counter" +-- | +-- | type Props = +-- | { label :: String +-- | } +-- | +-- | data Action +-- | = Increment +-- | +-- | counter :: Props -> JSX +-- | counter = make component +-- | { initialState = { counter: 0 } +-- | +-- | , update = \self action -> case action of +-- | Increment -> +-- | Update self.state { counter = self.state.counter + 1 } +-- | +-- | , render = \self -> +-- | R.button +-- | { onClick: capture_ self Increment +-- | , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] +-- | } +-- | } +-- | ``` +-- | +-- | This example component overrides `initialState`, `update`, and `render`. +-- | +-- | __*Note:* A `ComponentSpec` is *not* a valid React component by itself. If you would like to use +-- | a React-Basic component from JavaScript, use `toReactComponent`.__ +-- | +-- | __*Note:* `$$type` is for internal use only. It needs to be on the type to +-- | preserve its existence during a record update, as in the example above.__ +-- | +-- | __*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ type ComponentSpec props state initialState action = - { "$$type" :: ComponentType props state action - , initialState :: initialState + { initialState :: initialState + , update :: Self props state action -> action -> StateUpdate props state action + , render :: Self props state action -> JSX , shouldUpdate :: Self props state action -> props -> state -> Boolean , didMount :: Self props state action -> Effect Unit , didUpdate :: Self props state action -> Effect Unit , willUnmount :: Self props state action -> Effect Unit - , update :: Update props state action - , render :: Self props state action -> JSX + , "$$type" :: ComponentType props state action } +-- | Creates a `ComponentSpec` with a given Display Name. +-- | +-- | The resulting component spec is usually given the simplified `Component` type: +-- | +-- | ```purs +-- | component :: Component +-- | component = createComponent "Counter" +-- | ``` +-- | +-- | This function should be used at the module level and considered side effecting. +-- | This is because React uses referential equality when deciding whether a new +-- | `JSX` tree is a valid update, or if it needs to be replaced entirely +-- | (expensive and clears component state lower in the tree). +-- | +-- | __*Note:* A `Component` is *not* a valid React component by itself. If you would like to use +-- | a React-Basic component from JavaScript, use `toReactComponent`.__ +-- | +-- | __*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ +createComponent + :: forall props state action + . String + -> ComponentSpec props state Unit action +createComponent = + runFn1 + createComponent_ + (\_ action -> + SideEffects \self -> do + runEffectFn2 warningDefaultUpdate self action) + +-- | A simplified alias for `ComponentSpec`. This type is usually used to represent +-- | the default component type returned from `createComponent`. type Component = forall props state action. ComponentSpec props state Unit action -type Update props state action - = Self props state action - -> action - -> StateUpdate props state action +-- | Opaque component information for internal use. +-- | +-- | __*For the curious:* This is the "class" React will use to render and +-- | identify the component. It receives the `ComponentSpec` as a prop and knows +-- | how to defer behavior to it. It requires very specific props and is not useful by +-- | itself from JavaScript. For JavaScript interop, see `toReactComponent`.__ +data ComponentType props state action +-- | Used by the `update` function to describe the kind of state update and/or side +-- | effects desired. +-- | +-- | __*See also:* `ComponentSpec`__ data StateUpdate props state action = NoUpdate | Update state | SideEffects (Self props state action -> Effect Unit) | UpdateAndSideEffects state (Self props state action -> Effect Unit) +-- | `Self` represents the component instance at a particular point in time. +-- | +-- | - `props` +-- | - A snapshot of `props` taken when this `Self` was created. +-- | - `state` +-- | - A snapshot of `state` taken when this `Self` was created. +-- | - `instance_` +-- | - Unsafe escape hatch to the underlying component instance (`this` in the JavaScript React paradigm). Avoid as much as possible, but it's still frequently better than rewriting an entire component in JavaScript. +-- | +-- | __*See also:* `ComponentSpec`, `send`, `capture`, `readProps`, `readState`__ type Self props state action = - -- | Read the snapshot of `props` taken when this `Self` was created. { props :: props - - -- | Read the snapshot of `state` taken when this `Self` was created. , state :: state - --- | Unsafe escape hatch, but still frequently better than --- | rewriting an entire component in JS. , instance_ :: ReactComponentInstance } -data ReactComponentInstance - --- | Read the most up to date `props` directly from the component instance --- | associated with this `Self`. Generally, the `props` function is sufficient. -foreign import readProps :: forall props state action. Self props state action -> Effect props - --- | Read the most up to date `state` directly from the component instance --- | associated with this `Self`. Generally, the `state` function is sufficient. -foreign import readState :: forall props state action. Self props state action -> Effect state - -- | Dispatch an `action` into the component to be handled by `update`. +-- | +-- | __*See also:* `update`, `capture`__ send :: forall props state action. Self props state action -> action -> Effect Unit send = runEffectFn2 (runFn1 send_ buildStateUpdate) -foreign import send_ +-- | Convenience function for sending an action when an `Aff` completes. +-- | +-- | __*Note:* Potential failure should be handled in the given `Aff` and converted +-- | to an action, as the default error handler will simply log the error to +-- | the console.__ +-- | +-- | __*See also:* `send`__ +sendAsync :: forall props state action - . Fn1 - (StateUpdate props state action - -> { state :: Nullable state - , effects :: Nullable (Self props state action -> Effect Unit) - }) - (EffectFn2 - (Self props state action) - action - Unit) + . Self props state action + -> Aff action + -> Effect Unit +sendAsync self work = runAff_ handle work + where + handle (Right action) = send self action + handle (Left err) = runEffectFn2 warningFailedAsyncAction self err --- | Create a capturing* `EventHandler` to send an action when an event occurs. +-- | Create a capturing\* `EventHandler` to send an action when an event occurs. For +-- | more complicated event handlers requiring `Effect`, use `handler` from `React.Basic.Events`. +-- | +-- | __\*calls `preventDefault` and `stopPropagation`__ -- | --- | *capturing: prevent default and stop propagation +-- | __*See also:* `update`, `capture_`, `monitor`, `React.Basic.Events`__ capture :: forall props state action a. Self props state action -> EventFn SyntheticEvent a -> (a -> action) -> EventHandler capture self eventFn = monitor self (preventDefault >>> stopPropagation >>> eventFn) +-- | Like `capture`, but for actions which don't need to extract information from the Event. +-- | +-- | __*See also:* `update`, `capture`, `monitor_`__ capture_ :: forall props state action. Self props state action -> action -> EventHandler capture_ self action = capture self identity \_ -> action -- | Like `capture`, but does not cancel the event. +-- | +-- | __*See also:* `update`, `capture`, `monitor\_`__ monitor :: forall props state action a. Self props state action -> EventFn SyntheticEvent a -> (a -> action) -> EventHandler monitor self eventFn makeAction = handler eventFn \a -> send self (makeAction a) +-- | Like `capture_`, but does not cancel the event. +-- | +-- | __*See also:* `update`, `monitor`, `capture_`, `React.Basic.Events`__ monitor_ :: forall props state action. Self props state action -> action -> EventHandler monitor_ self action = monitor self identity \_ -> action --- | Convenience function for sending an action asynchronously. +-- | Read the most up to date `props` directly from the component instance +-- | associated with this `Self`. -- | --- | Note: potential failure should be handled and converted to an --- | action, as the default error handler will simply log the --- | error to the console. -asyncEffects - :: forall props state action - . (Self props state action -> Aff action) - -> Self props state action - -> Effect Unit -asyncEffects work self = runAff_ handle (work self) - where - handle (Right action) = send self action - handle (Left err) = runEffectFn2 warningFailedAsyncAction self err +-- | _Note: This function is for specific, asynchronous edge cases. +-- | Generally, the `props` snapshot on `Self` is sufficient. +-- | +-- | __*See also:* `Self`__ +foreign import readProps :: forall props state action. Self props state action -> Effect props -buildStateUpdate - :: forall props state action - . StateUpdate props state action - -> { state :: Nullable state - , effects :: Nullable (Self props state action -> Effect Unit) - } -buildStateUpdate = case _ of - NoUpdate -> - { state: null - , effects: null - } - Update state_ -> - { state: notNull state_ - , effects: null - } - SideEffects effects -> - { state: null - , effects: notNull effects - } - UpdateAndSideEffects state_ effects -> - { state: notNull state_ - , effects: notNull effects - } +-- | Read the most up to date `state` directly from the component instance +-- | associated with this `Self`. +-- | +-- | _Note: This function is for specific, asynchronous edge cases. +-- | Generally, the `state` snapshot on `Self` is sufficient. +-- | +-- | __*See also:* `Self`__ +foreign import readState :: forall props state action. Self props state action -> Effect state --- | Turn a `ComponentSpec` into a usable render function. --- | This is usually where you will want to provide customized --- | implementations: +-- | Turn a `Component` into a usable render function. +-- | This is where you will want to provide customized implementations: -- | -- | ```purs +-- | component :: Component +-- | component = createComponent "Counter" +-- | -- | type Props = -- | { label :: String -- | } @@ -182,8 +268,8 @@ buildStateUpdate = case _ of -- | data Action -- | = Increment -- | --- | render :: Props -> JSX --- | render = make component +-- | counter :: Props -> JSX +-- | counter = make component -- | { initialState = { counter: 0 } -- | -- | , update = \self action -> case action of @@ -192,28 +278,35 @@ buildStateUpdate = case _ of -- | -- | , render = \self -> -- | R.button --- | { onClick: Events.handler_ do self.send Increment +-- | { onClick: capture_ self Increment -- | , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] -- | } -- | } --- | --- | component :: Component --- | component = createComponent "Counter" -- | ``` +-- | +-- | __*See also:* `makeStateless`, `createComponent`, `Component`, `ComponentSpec`__ foreign import make :: forall props state action . ComponentSpec props state state action -> props -> JSX --- | Helper to make stateless component definition slightly --- | less verbose: +-- | Makes stateless component definition slightly less verbose: -- | -- | ```purs --- | render = makeStateless component \props -> JSX +-- | component :: Component +-- | component = createComponent "Xyz" -- | --- | component = createStatelessComponent "Xyz" +-- | myComponent :: Props -> JSX +-- | myComponent = makeStateless component \props -> JSX -- | ``` +-- | +-- | __*Note:* The only difference between a stateless React-Basic component and +-- | a plain `props -> JSX` function is the presense of the component name +-- | in React's dev tools and error stacks. It's just a conceptual boundary. +-- | If this isn't important simply write a `props -> JSX` function.__ +-- | +-- | __*See also:* `make`, `createComponent`, `Component`, `ComponentSpec`__ makeStateless :: forall props . ComponentSpec props Unit Unit Unit @@ -223,50 +316,52 @@ makeStateless makeStateless component render = make component { render = \self -> render self.props } -data ReactComponent props +-- | Represents rendered React VDOM (the result of calling `React.createElement` +-- | in JavaScript). +-- | +-- | `JSX` is a `Monoid`: +-- | +-- | - `append` +-- | - Merge two `JSX` nodes using `React.Fragment`. +-- | - `mempty` +-- | - The `empty` node; renders nothing. +-- | +-- | __*Hint:* Many useful utility functions already exist for Monoids. For example, +-- | `guard` can be used to conditionally render a subtree of components.__ +foreign import data JSX :: Type -createComponent - :: forall props state action - . String - -> ComponentSpec props state Unit action -createComponent = - runFn1 - createComponent_ - (\_ action -> - SideEffects \self -> do - runEffectFn2 warningDefaultUpdate self action) +instance semigroupJSX :: Semigroup JSX where + append a b = fragment [ a, b ] -foreign import createComponent_ - :: forall props state action - . Fn1 - (Update props state action) - (String -> ComponentSpec props state Unit action) +instance monoidJSX :: Monoid JSX where + mempty = empty --- | An empty node. This is often useful when you would like to conditionally +-- | An empty `JSX` node. This is often useful when you would like to conditionally -- | show something, but you don't want to (or can't) modify the `children` prop -- | on the parent node. -empty :: JSX -empty = unsafeCoerce false +-- | +-- | __*See also:* `JSX`, Monoid `guard`__ +foreign import empty :: JSX --- | Apply a React key to a sub-tree. +-- | Apply a React key to a subtree. React-Basic usually hides React's warning about +-- | using `key` props on components in an Array, but keys are still important for +-- | any dynamic lists of child components. +-- | +-- | __*See also:* React's documentation regarding the special `key` prop__ keyed :: String -> JSX -> JSX keyed = runFn2 keyed_ -- | Render an Array of children without a wrapping component. +-- | +-- | __*See also:* `JSX`__ foreign import fragment :: Array JSX -> JSX --- | Render an Array of children without a wrapping component. +-- | Create a `JSX` node from a `ReactComponent`, by providing the props. -- | --- | Provide a key when dynamically rendering multiple fragments along side --- | each other. -fragmentKeyed :: String -> Array JSX -> JSX -fragmentKeyed = runFn2 fragmentKeyed_ - -foreign import fragmentKeyed_ :: Fn2 String (Array JSX) JSX - -foreign import keyed_ :: Fn2 String JSX JSX - --- | Create a `JSX` node from a React component, by providing the props. +-- | This function is for non-React-Basic React components, such as those +-- | imported from FFI. +-- | +-- | __*See also:* `ReactComponent`, `elementKeyed`__ element :: forall props . ReactComponent { | props } @@ -274,8 +369,12 @@ element -> JSX element = runFn2 element_ --- | Like `element`, plus a `key` for rendering components in a dynamic list. --- | For more information see: https://reactjs.org/docs/reconciliation.html#keys +-- | Create a `JSX` node from a `ReactComponent`, by providing the props and a key. +-- | +-- | This function is for non-React-Basic React components, such as those +-- | imported from FFI. +-- | +-- | __*See also:* `ReactComponent`, `element`, React's documentation regarding the special `key` prop__ elementKeyed :: forall props . ReactComponent { | props } @@ -283,24 +382,48 @@ elementKeyed -> JSX elementKeyed = runFn2 elementKeyed_ -foreign import element_ - :: forall props - . Fn2 (ReactComponent { | props }) { | props } JSX - -foreign import elementKeyed_ - :: forall props - . Fn2 (ReactComponent { | props }) { key :: String | props } JSX - +-- | Retrieve the Display Name from a `ComponentSpec`. Useful for debugging and improving +-- | error messages in logs. +-- | +-- | __*See also:* `displayNameFromSelf`, `createComponent`__ foreign import displayNameFromComponentSpec :: forall props state initialState action . ComponentSpec props state initialState action -> String +-- | Retrieve the Display Name from a `Self`. Useful for debugging and improving +-- | error messages in logs. +-- | +-- | __*See also:* `displayNameFromComponentSpec`, `createComponent`__ foreign import displayNameFromSelf :: forall props state action . Self props state action -> String +-- | Represents a traditional React component. Useful for JavaScript interop and +-- | FFI. For example: +-- | +-- | ```purs +-- | foreign import ComponentRequiringJSHacks :: ReactComponent { someProp :: String } +-- | ``` +-- | +-- | __*See also:* `element`, `toReactComponent`__ +data ReactComponent props + +-- | An opaque representation of a React component's instance (`this` in the JavaScript +-- | React paradigm). It exists as an escape hatch to unsafe behavior. Use it with +-- | caution. +data ReactComponentInstance + +-- | Convert a React-Basic `ComponentSpec` to a JavaScript-friendly React component. +-- | This function should only be used for JS interop and not normal React-Basic usage. +-- | +-- | __*Note:* Like `createComponent`, `toReactComponent` is side effecting in that +-- | it creates a "class" React will see as unique each time it's called. Lift +-- | any usage up to the module level, usage in `render` or any other function, +-- | and applying any type classes to the `props`.__ +-- | +-- | __*See also:* `ReactComponent`__ toReactComponent :: forall jsProps props state action . ({ | jsProps } -> props) @@ -308,12 +431,62 @@ toReactComponent -> ReactComponent { | jsProps } toReactComponent = runFn2 toReactComponent_ -foreign import toReactComponent_ - :: forall jsProps props state action - . Fn2 - ({ | jsProps } -> props) - (ComponentSpec props state state action) - (ReactComponent { | jsProps }) + +-- | +-- | Internal utility or FFI functions +-- | + +foreign import createComponent_ + :: forall props state action + . Fn1 + (Self props state action -> action -> StateUpdate props state action) + (String -> ComponentSpec props state Unit action) + +buildStateUpdate + :: forall props state action + . StateUpdate props state action + -> { state :: Nullable state + , effects :: Nullable (Self props state action -> Effect Unit) + } +buildStateUpdate = case _ of + NoUpdate -> + { state: null + , effects: null + } + Update state_ -> + { state: notNull state_ + , effects: null + } + SideEffects effects -> + { state: null + , effects: notNull effects + } + UpdateAndSideEffects state_ effects -> + { state: notNull state_ + , effects: notNull effects + } + +foreign import send_ + :: forall props state action + . Fn1 + (StateUpdate props state action + -> { state :: Nullable state + , effects :: Nullable (Self props state action -> Effect Unit) + }) + (EffectFn2 + (Self props state action) + action + Unit) + +foreign import keyed_ :: Fn2 String JSX JSX + +foreign import element_ + :: forall props + . Fn2 (ReactComponent { | props }) { | props } JSX + +foreign import elementKeyed_ + :: forall props + . Fn2 (ReactComponent { | props }) { key :: String | props } JSX foreign import warningDefaultUpdate :: forall props state action @@ -335,3 +508,10 @@ foreign import warningFailedAsyncAction (Self props state action) Error Unit + +foreign import toReactComponent_ + :: forall jsProps props state action + . Fn2 + ({ | jsProps } -> props) + (ComponentSpec props state state action) + (ReactComponent { | jsProps }) From 0fb25d1647f228dc310d7c13d9a73855ac53568d Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Thu, 25 Oct 2018 14:59:45 -0600 Subject: [PATCH 20/28] Add docs --- .gitignore | 1 - generated-docs/React/Basic.md | 442 ++++ generated-docs/React/Basic/DOM.md | 2199 +++++++++++++++++++ generated-docs/React/Basic/DOM/Events.md | 233 ++ generated-docs/React/Basic/DOM/Generated.md | 2047 +++++++++++++++++ generated-docs/React/Basic/DOM/Internal.md | 25 + generated-docs/React/Basic/Events.md | 122 + 7 files changed, 5068 insertions(+), 1 deletion(-) create mode 100644 generated-docs/React/Basic.md create mode 100644 generated-docs/React/Basic/DOM.md create mode 100644 generated-docs/React/Basic/DOM/Events.md create mode 100644 generated-docs/React/Basic/DOM/Generated.md create mode 100644 generated-docs/React/Basic/DOM/Internal.md create mode 100644 generated-docs/React/Basic/Events.md diff --git a/.gitignore b/.gitignore index b8b6cb0..f9fa4f1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ /node_modules/ /.pulp-cache/ /output/ -/generated-docs/ /.psc-package/ /.psc* /.purs* diff --git a/generated-docs/React/Basic.md b/generated-docs/React/Basic.md new file mode 100644 index 0000000..2832ee1 --- /dev/null +++ b/generated-docs/React/Basic.md @@ -0,0 +1,442 @@ +## Module React.Basic + +#### `ComponentSpec` + +``` purescript +type ComponentSpec props state initialState action = { initialState :: initialState, update :: Self props state action -> action -> StateUpdate props state action, render :: Self props state action -> JSX, shouldUpdate :: Self props state action -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: Self props state action -> Effect Unit, "$$type" :: ComponentType props state action } +``` + +`ComponentSpec` represents a React-Basic component implementation. + +These are the properties your component definition may override +with specific implementations. None are required to be overridden, unless +an overridden function interacts with `state`, in which case `initialState` +is required (the compiler enforces this). While you _can_ use `state` and +dispatch actions without defining `update`, doing so doesn't make much sense +so the default `update` implementation will emit a warning. + +- `initialState` + - The component's starting state. + - Avoid mirroring prop values in state. +- `update` + - All state updates go through `update`. + - `update` is called when `send` is used to dispatch an action. + - State changes are described using `StateUpdate`. Only `Update` and `UpdateAndSideEffects` will cause rerenders and a call to `didUpdate`. + - Side effects requested are only invoked _after_ any corrosponding state update has completed its render cycle and the changes have been applied. This means it is safe to interact with the DOM in a side effect, for example. +- `render` + - Takes a current snapshot of the component (`Self`) and converts it to renderable `JSX`. +- `shouldUpdate` + - Can be useful for occasional performance optimizations. Rarely necessary. +- `didMount` + - The React component's `componentDidMount` lifecycle. Useful for initiating an action on first mount, such as fetching data from a server. +- `didUpdate` + - The React component's `componentDidUpdate` lifecycle. Rarely necessary. +- `willUnmount` + - The React component's `componentWillUpdate` lifecycle. Any subscriptions or timers created in `didMount` or `didUpdate` should be disposed of here. + +The component spec is generally not exported from your component +module and this type is rarely used explicitly. The simplified alias +`Component` is usually sufficient, and `make` will validate whether +your component's types line up. + +For example: + +```purs +component :: Component +component = createComponent "Counter" + +type Props = + { label :: String + } + +data Action + = Increment + +counter :: Props -> JSX +counter = make component + { initialState = { counter: 0 } + + , update = \self action -> case action of + Increment -> + Update self.state { counter = self.state.counter + 1 } + + , render = \self -> + R.button + { onClick: capture_ self Increment + , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] + } + } +``` + +This example component overrides `initialState`, `update`, and `render`. + +__*Note:* A `ComponentSpec` is *not* a valid React component by itself. If you would like to use + a React-Basic component from JavaScript, use `toReactComponent`.__ + +__*Note:* `$$type` is for internal use only. It needs to be on the type to + preserve its existence during a record update, as in the example above.__ + +__*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ + +#### `createComponent` + +``` purescript +createComponent :: forall props state action. String -> ComponentSpec props state Unit action +``` + +Creates a `ComponentSpec` with a given Display Name. + +The resulting component spec is usually given the simplified `Component` type: + +```purs +component :: Component +component = createComponent "Counter" +``` + +This function should be used at the module level and considered side effecting. +This is because React uses referential equality when deciding whether a new +`JSX` tree is a valid update, or if it needs to be replaced entirely +(expensive and clears component state lower in the tree). + +__*Note:* A `Component` is *not* a valid React component by itself. If you would like to use + a React-Basic component from JavaScript, use `toReactComponent`.__ + +__*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ + +#### `Component` + +``` purescript +type Component = forall props state action. ComponentSpec props state Unit action +``` + +A simplified alias for `ComponentSpec`. This type is usually used to represent +the default component type returned from `createComponent`. + +#### `ComponentType` + +``` purescript +data ComponentType props state action +``` + +Opaque component information for internal use. + +__*For the curious:* This is the "class" React will use to render and + identify the component. It receives the `ComponentSpec` as a prop and knows + how to defer behavior to it. It requires very specific props and is not useful by + itself from JavaScript. For JavaScript interop, see `toReactComponent`.__ + +#### `StateUpdate` + +``` purescript +data StateUpdate props state action + = NoUpdate + | Update state + | SideEffects (Self props state action -> Effect Unit) + | UpdateAndSideEffects state (Self props state action -> Effect Unit) +``` + +Used by the `update` function to describe the kind of state update and/or side +effects desired. + +__*See also:* `ComponentSpec`__ + +#### `Self` + +``` purescript +type Self props state action = { props :: props, state :: state, instance_ :: ReactComponentInstance } +``` + +`Self` represents the component instance at a particular point in time. + +- `props` + - A snapshot of `props` taken when this `Self` was created. +- `state` + - A snapshot of `state` taken when this `Self` was created. +- `instance_` + - Unsafe escape hatch to the underlying component instance (`this` in the JavaScript React paradigm). Avoid as much as possible, but it's still frequently better than rewriting an entire component in JavaScript. + +__*See also:* `ComponentSpec`, `send`, `capture`, `readProps`, `readState`__ + +#### `send` + +``` purescript +send :: forall props state action. Self props state action -> action -> Effect Unit +``` + +Dispatch an `action` into the component to be handled by `update`. + +__*See also:* `update`, `capture`__ + +#### `sendAsync` + +``` purescript +sendAsync :: forall props state action. Self props state action -> Aff action -> Effect Unit +``` + +Convenience function for sending an action when an `Aff` completes. + +__*Note:* Potential failure should be handled in the given `Aff` and converted + to an action, as the default error handler will simply log the error to + the console.__ + +__*See also:* `send`__ + +#### `capture` + +``` purescript +capture :: forall props state action a. Self props state action -> EventFn SyntheticEvent a -> (a -> action) -> EventHandler +``` + +Create a capturing\* `EventHandler` to send an action when an event occurs. For +more complicated event handlers requiring `Effect`, use `handler` from `React.Basic.Events`. + +__\*calls `preventDefault` and `stopPropagation`__ + +__*See also:* `update`, `capture_`, `monitor`, `React.Basic.Events`__ + +#### `capture_` + +``` purescript +capture_ :: forall props state action. Self props state action -> action -> EventHandler +``` + +Like `capture`, but for actions which don't need to extract information from the Event. + +__*See also:* `update`, `capture`, `monitor_`__ + +#### `monitor` + +``` purescript +monitor :: forall props state action a. Self props state action -> EventFn SyntheticEvent a -> (a -> action) -> EventHandler +``` + +Like `capture`, but does not cancel the event. + +__*See also:* `update`, `capture`, `monitor\_`__ + +#### `monitor_` + +``` purescript +monitor_ :: forall props state action. Self props state action -> action -> EventHandler +``` + +Like `capture_`, but does not cancel the event. + +__*See also:* `update`, `monitor`, `capture_`, `React.Basic.Events`__ + +#### `readProps` + +``` purescript +readProps :: forall props state action. Self props state action -> Effect props +``` + +Read the most up to date `props` directly from the component instance +associated with this `Self`. + +_Note: This function is for specific, asynchronous edge cases. + Generally, the `props` snapshot on `Self` is sufficient. + +__*See also:* `Self`__ + +#### `readState` + +``` purescript +readState :: forall props state action. Self props state action -> Effect state +``` + +Read the most up to date `state` directly from the component instance +associated with this `Self`. + +_Note: This function is for specific, asynchronous edge cases. + Generally, the `state` snapshot on `Self` is sufficient. + +__*See also:* `Self`__ + +#### `make` + +``` purescript +make :: forall props state action. ComponentSpec props state state action -> props -> JSX +``` + +Turn a `Component` into a usable render function. +This is where you will want to provide customized implementations: + +```purs +component :: Component +component = createComponent "Counter" + +type Props = + { label :: String + } + +data Action + = Increment + +counter :: Props -> JSX +counter = make component + { initialState = { counter: 0 } + + , update = \self action -> case action of + Increment -> + Update self.state { counter = self.state.counter + 1 } + + , render = \self -> + R.button + { onClick: capture_ self Increment + , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] + } + } +``` + +__*See also:* `makeStateless`, `createComponent`, `Component`, `ComponentSpec`__ + +#### `makeStateless` + +``` purescript +makeStateless :: forall props. ComponentSpec props Unit Unit Unit -> (props -> JSX) -> props -> JSX +``` + +Makes stateless component definition slightly less verbose: + +```purs +component :: Component +component = createComponent "Xyz" + +myComponent :: Props -> JSX +myComponent = makeStateless component \props -> JSX +``` + +__*Note:* The only difference between a stateless React-Basic component and + a plain `props -> JSX` function is the presense of the component name + in React's dev tools and error stacks. It's just a conceptual boundary. + If this isn't important simply write a `props -> JSX` function.__ + +__*See also:* `make`, `createComponent`, `Component`, `ComponentSpec`__ + +#### `JSX` + +``` purescript +data JSX :: Type +``` + +Represents rendered React VDOM (the result of calling `React.createElement` +in JavaScript). + +`JSX` is a `Monoid`: + +- `append` + - Merge two `JSX` nodes using `React.Fragment`. +- `mempty` + - The `empty` node; renders nothing. + +__*Hint:* Many useful utility functions already exist for Monoids. For example, + `guard` can be used to conditionally render a subtree of components.__ + +##### Instances +``` purescript +Semigroup JSX +Monoid JSX +``` + +#### `empty` + +``` purescript +empty :: JSX +``` + +An empty `JSX` node. This is often useful when you would like to conditionally +show something, but you don't want to (or can't) modify the `children` prop +on the parent node. + +__*See also:* `JSX`, Monoid `guard`__ + +#### `keyed` + +``` purescript +keyed :: String -> JSX -> JSX +``` + +Apply a React key to a subtree. React-Basic usually hides React's warning about +using `key` props on components in an Array, but keys are still important for +any dynamic lists of child components. + +__*See also:* React's documentation regarding the special `key` prop__ + +#### `fragment` + +``` purescript +fragment :: Array JSX -> JSX +``` + +Render an Array of children without a wrapping component. + +__*See also:* `JSX`__ + +#### `element` + +``` purescript +element :: forall props. ReactComponent { | props } -> { | props } -> JSX +``` + +Create a `JSX` node from a `ReactComponent`, by providing the props. + +This function is for non-React-Basic React components, such as those +imported from FFI. + +__*See also:* `ReactComponent`, `elementKeyed`__ + +#### `elementKeyed` + +``` purescript +elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX +``` + +Create a `JSX` node from a `ReactComponent`, by providing the props and a key. + +This function is for non-React-Basic React components, such as those +imported from FFI. + +__*See also:* `ReactComponent`, `element`, React's documentation regarding the special `key` prop__ + +#### `ReactComponent` + +``` purescript +data ReactComponent props +``` + +Represents a traditional React component. Useful for JavaScript interop and +FFI. For example: + +```purs +foreign import ComponentRequiringJSHacks :: ReactComponent { someProp :: String } +``` + +__*See also:* `element`, `toReactComponent`__ + +#### `ReactComponentInstance` + +``` purescript +data ReactComponentInstance +``` + +An opaque representation of a React component's instance (`this` in the JavaScript +React paradigm). It exists as an escape hatch to unsafe behavior. Use it with +caution. + +#### `toReactComponent` + +``` purescript +toReactComponent :: forall jsProps props state action. ({ | jsProps } -> props) -> ComponentSpec props state state action -> ReactComponent { | jsProps } +``` + +Convert a React-Basic `ComponentSpec` to a JavaScript-friendly React component. +This function should only be used for JS interop and not normal React-Basic usage. + +__*Note:* Like `createComponent`, `toReactComponent` is side effecting in that + it creates a "class" React will see as unique each time it's called. Lift + any usage up to the module level, usage in `render` or any other function, + and applying any type classes to the `props`.__ + +__*See also:* `ReactComponent`__ + + diff --git a/generated-docs/React/Basic/DOM.md b/generated-docs/React/Basic/DOM.md new file mode 100644 index 0000000..7afcb7b --- /dev/null +++ b/generated-docs/React/Basic/DOM.md @@ -0,0 +1,2199 @@ +## Module React.Basic.DOM + +This module defines helper functions for creating virtual DOM elements +safely. + +Note: DOM element props are provided as records, and checked using `Union` +constraints. This means that we don't need to provide all props, but any we +do provide must have the correct types. + +#### `render` + +``` purescript +render :: JSX -> Element -> Effect Unit +``` + +Render or update/re-render a component tree into +a DOM element. + +Note: Relies on `ReactDOM.render` + +#### `render'` + +``` purescript +render' :: JSX -> Element -> Effect Unit -> Effect Unit +``` + +Render or update/re-render a component tree into +a DOM element. The given Effect is run once the +DOM update is complete. + +Note: Relies on `ReactDOM.render` + +#### `hydrate` + +``` purescript +hydrate :: JSX -> Element -> Effect Unit +``` + +Render or update/re-render a component tree into +a DOM element, attempting to reuse the existing +DOM tree. + +Note: Relies on `ReactDOM.hydrate`, generally only + used with `ReactDOMServer.renderToNodeStream` or + `ReactDOMServer.renderToString` + +#### `hydrate'` + +``` purescript +hydrate' :: JSX -> Element -> Effect Unit -> Effect Unit +``` + +Render or update/re-render a component tree into +a DOM element, attempting to reuse the existing +DOM tree. The given Effect is run once the +DOM update is complete. + +Note: Relies on `ReactDOM.hydrate`, generally only + used with `ReactDOMServer.renderToNodeStream` or + `ReactDOMServer.renderToString` + +#### `unmount` + +``` purescript +unmount :: Element -> Effect Boolean +``` + +Attempt to unmount and clean up the React app +rendered into the given element. Returns `true` +if an app existed and was unmounted successfully. + +Note: Relies on `ReactDOM.unmountComponentAtNode` + +#### `findDOMNode` + +``` purescript +findDOMNode :: ReactComponentInstance -> Effect (Either Error Node) +``` + +Returns the current DOM node associated with the given +instance, or an Error if no node was found or the given +instance was not mounted. + +Note: Relies on `ReactDOM.findDOMNode` + +#### `createPortal` + +``` purescript +createPortal :: JSX -> Element -> JSX +``` + +Divert a render tree into a separate DOM node. The node's +content will be overwritten and managed by React, similar +to `render` and `hydrate`. + +#### `text` + +``` purescript +text :: String -> JSX +``` + +Create a text node. + +#### `css` + +``` purescript +css :: forall css. { | css } -> CSS +``` + +Create a value of type `CSS` (which can be provided to the `style` property) +from a plain record of CSS attributes. + +E.g. + +``` +div { style: css { padding: "5px" } } [ text "This text is padded." ] +``` + +#### `mergeStyles` + +``` purescript +mergeStyles :: Array CSS -> CSS +``` + +Merge styles from right to left. Uses `Object.assign`. + +E.g. + +``` +style: mergeCSS [ (css { padding: "5px" }), props.style ] +``` + + +### Re-exported from React.Basic.DOM.Generated: + +#### `Props_wbr` + +``` purescript +type Props_wbr = () +``` + +#### `Props_video` + +``` purescript +type Props_video = (children :: Array JSX, controls :: Boolean, height :: String, loop :: Boolean, muted :: Boolean, playsInline :: Boolean, poster :: String, preload :: String, src :: String, width :: String) +``` + +#### `Props_var` + +``` purescript +type Props_var = (children :: Array JSX) +``` + +#### `Props_ul` + +``` purescript +type Props_ul = (children :: Array JSX, "type" :: String) +``` + +#### `Props_u` + +``` purescript +type Props_u = (children :: Array JSX) +``` + +#### `Props_track` + +``` purescript +type Props_track = (default :: Boolean, kind :: String, label :: String, src :: String) +``` + +#### `Props_tr` + +``` purescript +type Props_tr = (children :: Array JSX) +``` + +#### `Props_title` + +``` purescript +type Props_title = (children :: Array JSX) +``` + +#### `Props_time` + +``` purescript +type Props_time = (children :: Array JSX) +``` + +#### `Props_thead` + +``` purescript +type Props_thead = (children :: Array JSX) +``` + +#### `Props_th` + +``` purescript +type Props_th = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) +``` + +#### `Props_tfoot` + +``` purescript +type Props_tfoot = (children :: Array JSX) +``` + +#### `Props_textarea` + +``` purescript +type Props_textarea = (autoCapitalize :: String, autoCorrect :: String, children :: Array JSX, cols :: Number, defaultValue :: String, disabled :: Boolean, form :: String, name :: String, onChange :: EventHandler, placeholder :: String, required :: Boolean, rows :: Number, value :: String, wrap :: String) +``` + +#### `Props_template` + +``` purescript +type Props_template = (children :: Array JSX) +``` + +#### `Props_td` + +``` purescript +type Props_td = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) +``` + +#### `Props_tbody` + +``` purescript +type Props_tbody = (children :: Array JSX) +``` + +#### `Props_table` + +``` purescript +type Props_table = (children :: Array JSX, summary :: String, width :: String) +``` + +#### `Props_svg` + +``` purescript +type Props_svg = (accentHeight :: String, accumulate :: String, additive :: String, alignmentBaseline :: String, allowReorder :: String, alphabetic :: String, amplitude :: String, arabicForm :: String, ascent :: String, attributeName :: String, attributeType :: String, autoReverse :: String, azimuth :: String, baseFrequency :: String, baseProfile :: String, baselineShift :: String, bbox :: String, begin :: String, bias :: String, by :: String, calcMode :: String, capHeight :: String, children :: Array JSX, clip :: String, clipPath :: String, clipPathUnits :: String, clipRule :: String, color :: String, colorInterpolation :: String, colorInterpolationFilters :: String, colorProfile :: String, colorRendering :: String, contentScriptType :: String, contentStyleType :: String, cursor :: String, cx :: String, cy :: String, d :: String, decelerate :: String, descent :: String, diffuseConstant :: String, direction :: String, display :: String, divisor :: String, dominantBaseline :: String, dur :: String, dx :: String, dy :: String, edgeMode :: String, elevation :: String, enableBackground :: String, end :: String, exponent :: String, externalResourcesRequired :: String, fill :: String, fillOpacity :: String, fillRule :: String, filter :: String, filterRes :: String, filterUnits :: String, floodColor :: String, floodOpacity :: String, focusable :: String, fontFamily :: String, fontSize :: String, fontSizeAdjust :: String, fontStretch :: String, fontStyle :: String, fontVariant :: String, fontWeight :: String, format :: String, from :: String, fx :: String, fy :: String, g1 :: String, g2 :: String, glyphName :: String, glyphOrientationHorizontal :: String, glyphOrientationVertical :: String, glyphRef :: String, gradientTransform :: String, gradientUnits :: String, hanging :: String, height :: String, horizAdvX :: String, horizOriginX :: String, ideographic :: String, imageRendering :: String, "in" :: String, in2 :: String, intercept :: String, k :: String, k1 :: String, k2 :: String, k3 :: String, k4 :: String, kernelMatrix :: String, kernelUnitLength :: String, kerning :: String, keyPoints :: String, keySplines :: String, keyTimes :: String, lengthAdjust :: String, letterSpacing :: String, lightingColor :: String, limitingConeAngle :: String, local :: String, markerEnd :: String, markerHeight :: String, markerMid :: String, markerStart :: String, markerUnits :: String, markerWidth :: String, mask :: String, maskContentUnits :: String, maskUnits :: String, mathematical :: String, mode :: String, numOctaves :: String, offset :: String, opacity :: String, operator :: String, order :: String, orient :: String, orientation :: String, origin :: String, overflow :: String, overlinePosition :: String, overlineThickness :: String, paintOrder :: String, panose1 :: String, pathLength :: String, patternContentUnits :: String, patternTransform :: String, patternUnits :: String, pointerEvents :: String, points :: String, pointsAtX :: String, pointsAtY :: String, pointsAtZ :: String, preserveAlpha :: String, preserveAspectRatio :: String, primitiveUnits :: String, r :: String, radius :: String, refX :: String, refY :: String, renderingIntent :: String, repeatCount :: String, repeatDur :: String, requiredExtensions :: String, requiredFeatures :: String, restart :: String, result :: String, rotate :: String, rx :: String, ry :: String, scale :: String, seed :: String, shapeRendering :: String, slope :: String, spacing :: String, specularConstant :: String, specularExponent :: String, speed :: String, spreadMethod :: String, startOffset :: String, stdDeviation :: String, stemh :: String, stemv :: String, stitchTiles :: String, stopColor :: String, stopOpacity :: String, strikethroughPosition :: String, strikethroughThickness :: String, string :: String, stroke :: String, strokeDasharray :: String, strokeDashoffset :: String, strokeLinecap :: String, strokeLinejoin :: String, strokeMiterlimit :: String, strokeOpacity :: String, strokeWidth :: String, surfaceScale :: String, systemLanguage :: String, tableValues :: String, targetX :: String, targetY :: String, textAnchor :: String, textDecoration :: String, textLength :: String, textRendering :: String, to :: String, transform :: String, u1 :: String, u2 :: String, underlinePosition :: String, underlineThickness :: String, unicode :: String, unicodeBidi :: String, unicodeRange :: String, unitsPerEm :: String, vAlphabetic :: String, vHanging :: String, vIdeographic :: String, vMathematical :: String, values :: String, vectorEffect :: String, version :: String, vertAdvY :: String, vertOriginX :: String, vertOriginY :: String, viewBox :: String, viewTarget :: String, visibility :: String, width :: String, widths :: String, wordSpacing :: String, writingMode :: String, x :: String, x1 :: String, x2 :: String, xChannelSelector :: String, xHeight :: String, xlinkActuate :: String, xlinkArcrole :: String, xlinkHref :: String, xlinkRole :: String, xlinkShow :: String, xlinkTitle :: String, xlinkType :: String, xmlBase :: String, xmlLang :: String, xmlSpace :: String, xmlns :: String, xmlnsXlink :: String, y :: String, y1 :: String, y2 :: String, yChannelSelector :: String, z :: String, zoomAndPan :: String) +``` + +#### `Props_sup` + +``` purescript +type Props_sup = (children :: Array JSX) +``` + +#### `Props_summary` + +``` purescript +type Props_summary = (children :: Array JSX) +``` + +#### `Props_sub` + +``` purescript +type Props_sub = (children :: Array JSX) +``` + +#### `Props_style` + +``` purescript +type Props_style = (children :: Array JSX, media :: String, nonce :: String, title :: String, "type" :: String) +``` + +#### `Props_strong` + +``` purescript +type Props_strong = (children :: Array JSX) +``` + +#### `Props_span` + +``` purescript +type Props_span = (children :: Array JSX) +``` + +#### `Props_source` + +``` purescript +type Props_source = (media :: String, sizes :: String, src :: String, "type" :: String) +``` + +#### `Props_small` + +``` purescript +type Props_small = (children :: Array JSX) +``` + +#### `Props_slot` + +``` purescript +type Props_slot = (children :: Array JSX, name :: String) +``` + +#### `Props_select` + +``` purescript +type Props_select = (children :: Array JSX, defaultValue :: String, disabled :: Boolean, form :: String, multiple :: Boolean, name :: String, onChange :: EventHandler, required :: Boolean, size :: Number, value :: String) +``` + +#### `Props_section` + +``` purescript +type Props_section = (children :: Array JSX) +``` + +#### `Props_script` + +``` purescript +type Props_script = (async :: Boolean, children :: Array JSX, defer :: Boolean, integrity :: String, nonce :: String, src :: String, "type" :: String) +``` + +#### `Props_samp` + +``` purescript +type Props_samp = (children :: Array JSX) +``` + +#### `Props_s` + +``` purescript +type Props_s = (children :: Array JSX) +``` + +#### `Props_ruby` + +``` purescript +type Props_ruby = (children :: Array JSX) +``` + +#### `Props_rtc` + +``` purescript +type Props_rtc = (children :: Array JSX) +``` + +#### `Props_rt` + +``` purescript +type Props_rt = (children :: Array JSX) +``` + +#### `Props_rp` + +``` purescript +type Props_rp = (children :: Array JSX) +``` + +#### `Props_rb` + +``` purescript +type Props_rb = (children :: Array JSX) +``` + +#### `Props_q` + +``` purescript +type Props_q = (children :: Array JSX, cite :: String) +``` + +#### `Props_progress` + +``` purescript +type Props_progress = (children :: Array JSX, max :: Number, value :: String) +``` + +#### `Props_pre` + +``` purescript +type Props_pre = (children :: Array JSX, width :: String) +``` + +#### `Props_picture` + +``` purescript +type Props_picture = (children :: Array JSX) +``` + +#### `Props_param` + +``` purescript +type Props_param = (name :: String, "type" :: String, value :: String) +``` + +#### `Props_p` + +``` purescript +type Props_p = (children :: Array JSX) +``` + +#### `Props_output` + +``` purescript +type Props_output = (children :: Array JSX, form :: String, name :: String) +``` + +#### `Props_option` + +``` purescript +type Props_option = (children :: Array JSX, disabled :: Boolean, label :: String, selected :: Boolean, value :: String) +``` + +#### `Props_optgroup` + +``` purescript +type Props_optgroup = (children :: Array JSX, disabled :: Boolean, label :: String) +``` + +#### `Props_ol` + +``` purescript +type Props_ol = (children :: Array JSX, reversed :: Boolean, start :: Number, "type" :: String) +``` + +#### `Props_object` + +``` purescript +type Props_object = (children :: Array JSX, "data" :: String, form :: String, height :: String, name :: String, "type" :: String, width :: String) +``` + +#### `Props_noscript` + +``` purescript +type Props_noscript = (children :: Array JSX) +``` + +#### `Props_nav` + +``` purescript +type Props_nav = (children :: Array JSX) +``` + +#### `Props_meter` + +``` purescript +type Props_meter = (children :: Array JSX, high :: String, low :: String, max :: Number, min :: Number, optimum :: String, value :: String) +``` + +#### `Props_meta` + +``` purescript +type Props_meta = (content :: String, name :: String) +``` + +#### `Props_menuitem` + +``` purescript +type Props_menuitem = (children :: Array JSX) +``` + +#### `Props_menu` + +``` purescript +type Props_menu = (children :: Array JSX) +``` + +#### `Props_math` + +``` purescript +type Props_math = (children :: Array JSX) +``` + +#### `Props_mark` + +``` purescript +type Props_mark = (children :: Array JSX) +``` + +#### `Props_map` + +``` purescript +type Props_map = (children :: Array JSX, name :: String) +``` + +#### `Props_main` + +``` purescript +type Props_main = (children :: Array JSX) +``` + +#### `Props_link` + +``` purescript +type Props_link = (color :: String, href :: String, integrity :: String, media :: String, nonce :: String, rel :: String, scope :: String, sizes :: String, target :: String, title :: String, "type" :: String) +``` + +#### `Props_li` + +``` purescript +type Props_li = (children :: Array JSX, "type" :: String, value :: String) +``` + +#### `Props_legend` + +``` purescript +type Props_legend = (children :: Array JSX) +``` + +#### `Props_label` + +``` purescript +type Props_label = (children :: Array JSX, form :: String) +``` + +#### `Props_keygen` + +``` purescript +type Props_keygen = (challenge :: String, children :: Array JSX, disabled :: Boolean, form :: String, name :: String) +``` + +#### `Props_kbd` + +``` purescript +type Props_kbd = (children :: Array JSX) +``` + +#### `Props_ins` + +``` purescript +type Props_ins = (children :: Array JSX, cite :: String) +``` + +#### `Props_input` + +``` purescript +type Props_input = (accept :: String, alt :: String, autoCapitalize :: String, autoCorrect :: String, autoSave :: String, checked :: Boolean, defaultChecked :: String, defaultValue :: String, disabled :: Boolean, form :: String, height :: String, list :: String, max :: Number, min :: Number, multiple :: Boolean, name :: String, onChange :: EventHandler, pattern :: String, placeholder :: String, required :: Boolean, results :: String, size :: Number, src :: String, step :: String, title :: String, "type" :: String, value :: String, width :: String) +``` + +#### `Props_img` + +``` purescript +type Props_img = (alt :: String, height :: String, name :: String, sizes :: String, src :: String, width :: String) +``` + +#### `Props_iframe` + +``` purescript +type Props_iframe = (children :: Array JSX, height :: String, name :: String, sandbox :: String, scrolling :: String, src :: String, width :: String) +``` + +#### `Props_i` + +``` purescript +type Props_i = (children :: Array JSX) +``` + +#### `Props_html` + +``` purescript +type Props_html = (children :: Array JSX, manifest :: String) +``` + +#### `Props_hr` + +``` purescript +type Props_hr = (size :: Number, width :: String) +``` + +#### `Props_hgroup` + +``` purescript +type Props_hgroup = (children :: Array JSX) +``` + +#### `Props_header` + +``` purescript +type Props_header = (children :: Array JSX) +``` + +#### `Props_head` + +``` purescript +type Props_head = (children :: Array JSX, profile :: String) +``` + +#### `Props_h6` + +``` purescript +type Props_h6 = (children :: Array JSX) +``` + +#### `Props_h5` + +``` purescript +type Props_h5 = (children :: Array JSX) +``` + +#### `Props_h4` + +``` purescript +type Props_h4 = (children :: Array JSX) +``` + +#### `Props_h3` + +``` purescript +type Props_h3 = (children :: Array JSX) +``` + +#### `Props_h2` + +``` purescript +type Props_h2 = (children :: Array JSX) +``` + +#### `Props_h1` + +``` purescript +type Props_h1 = (children :: Array JSX) +``` + +#### `Props_form` + +``` purescript +type Props_form = (accept :: String, action :: String, children :: Array JSX, method :: String, name :: String, onChange :: EventHandler, onInput :: EventHandler, onInvalid :: EventHandler, onSubmit :: EventHandler, target :: String) +``` + +#### `Props_footer` + +``` purescript +type Props_footer = (children :: Array JSX) +``` + +#### `Props_figure` + +``` purescript +type Props_figure = (children :: Array JSX) +``` + +#### `Props_figcaption` + +``` purescript +type Props_figcaption = (children :: Array JSX) +``` + +#### `Props_fieldset` + +``` purescript +type Props_fieldset = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String) +``` + +#### `Props_embed` + +``` purescript +type Props_embed = (height :: String, src :: String, "type" :: String, width :: String) +``` + +#### `Props_em` + +``` purescript +type Props_em = (children :: Array JSX) +``` + +#### `Props_dt` + +``` purescript +type Props_dt = (children :: Array JSX) +``` + +#### `Props_dl` + +``` purescript +type Props_dl = (children :: Array JSX) +``` + +#### `Props_div` + +``` purescript +type Props_div = (children :: Array JSX) +``` + +#### `Props_dialog` + +``` purescript +type Props_dialog = (children :: Array JSX, open :: Boolean) +``` + +#### `Props_dfn` + +``` purescript +type Props_dfn = (children :: Array JSX, title :: String) +``` + +#### `Props_details` + +``` purescript +type Props_details = (children :: Array JSX, open :: Boolean) +``` + +#### `Props_del` + +``` purescript +type Props_del = (children :: Array JSX, cite :: String) +``` + +#### `Props_dd` + +``` purescript +type Props_dd = (children :: Array JSX) +``` + +#### `Props_datalist` + +``` purescript +type Props_datalist = (children :: Array JSX) +``` + +#### `Props_data` + +``` purescript +type Props_data = (children :: Array JSX, value :: String) +``` + +#### `Props_colgroup` + +``` purescript +type Props_colgroup = (children :: Array JSX, span :: Number, width :: String) +``` + +#### `Props_col` + +``` purescript +type Props_col = (span :: Number, width :: String) +``` + +#### `Props_code` + +``` purescript +type Props_code = (children :: Array JSX) +``` + +#### `Props_cite` + +``` purescript +type Props_cite = (children :: Array JSX) +``` + +#### `Props_caption` + +``` purescript +type Props_caption = (children :: Array JSX) +``` + +#### `Props_canvas` + +``` purescript +type Props_canvas = (children :: Array JSX, height :: String, width :: String) +``` + +#### `Props_button` + +``` purescript +type Props_button = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String, "type" :: String, value :: String) +``` + +#### `Props_br` + +``` purescript +type Props_br = () +``` + +#### `Props_body` + +``` purescript +type Props_body = (children :: Array JSX) +``` + +#### `Props_blockquote` + +``` purescript +type Props_blockquote = (children :: Array JSX, cite :: String) +``` + +#### `Props_bdo` + +``` purescript +type Props_bdo = (children :: Array JSX, dir :: String) +``` + +#### `Props_bdi` + +``` purescript +type Props_bdi = (children :: Array JSX) +``` + +#### `Props_base` + +``` purescript +type Props_base = (href :: String, target :: String) +``` + +#### `Props_b` + +``` purescript +type Props_b = (children :: Array JSX) +``` + +#### `Props_audio` + +``` purescript +type Props_audio = (children :: Array JSX, controls :: Boolean, loop :: Boolean, muted :: Boolean, preload :: String, src :: String) +``` + +#### `Props_aside` + +``` purescript +type Props_aside = (children :: Array JSX) +``` + +#### `Props_article` + +``` purescript +type Props_article = (children :: Array JSX) +``` + +#### `Props_area` + +``` purescript +type Props_area = (alt :: String, coords :: String, download :: String, href :: String, rel :: String, shape :: String, target :: String, "type" :: String) +``` + +#### `Props_address` + +``` purescript +type Props_address = (children :: Array JSX) +``` + +#### `Props_abbr` + +``` purescript +type Props_abbr = (children :: Array JSX, title :: String) +``` + +#### `Props_a` + +``` purescript +type Props_a = (children :: Array JSX, coords :: String, download :: String, href :: String, name :: String, onClick :: EventHandler, rel :: String, shape :: String, target :: String, "type" :: String) +``` + +#### `wbr` + +``` purescript +wbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_wbr) => { | attrs } -> JSX +``` + +#### `video_` + +``` purescript +video_ :: Array JSX -> JSX +``` + +#### `video` + +``` purescript +video :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_video) => { | attrs } -> JSX +``` + +#### `var_` + +``` purescript +var_ :: Array JSX -> JSX +``` + +#### `var` + +``` purescript +var :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_var) => { | attrs } -> JSX +``` + +#### `ul_` + +``` purescript +ul_ :: Array JSX -> JSX +``` + +#### `ul` + +``` purescript +ul :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ul) => { | attrs } -> JSX +``` + +#### `u_` + +``` purescript +u_ :: Array JSX -> JSX +``` + +#### `u` + +``` purescript +u :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_u) => { | attrs } -> JSX +``` + +#### `track` + +``` purescript +track :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_track) => { | attrs } -> JSX +``` + +#### `tr_` + +``` purescript +tr_ :: Array JSX -> JSX +``` + +#### `tr` + +``` purescript +tr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tr) => { | attrs } -> JSX +``` + +#### `title_` + +``` purescript +title_ :: Array JSX -> JSX +``` + +#### `title` + +``` purescript +title :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_title) => { | attrs } -> JSX +``` + +#### `time_` + +``` purescript +time_ :: Array JSX -> JSX +``` + +#### `time` + +``` purescript +time :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_time) => { | attrs } -> JSX +``` + +#### `thead_` + +``` purescript +thead_ :: Array JSX -> JSX +``` + +#### `thead` + +``` purescript +thead :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_thead) => { | attrs } -> JSX +``` + +#### `th_` + +``` purescript +th_ :: Array JSX -> JSX +``` + +#### `th` + +``` purescript +th :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_th) => { | attrs } -> JSX +``` + +#### `tfoot_` + +``` purescript +tfoot_ :: Array JSX -> JSX +``` + +#### `tfoot` + +``` purescript +tfoot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tfoot) => { | attrs } -> JSX +``` + +#### `textarea_` + +``` purescript +textarea_ :: Array JSX -> JSX +``` + +#### `textarea` + +``` purescript +textarea :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_textarea) => { | attrs } -> JSX +``` + +#### `template_` + +``` purescript +template_ :: Array JSX -> JSX +``` + +#### `template` + +``` purescript +template :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_template) => { | attrs } -> JSX +``` + +#### `td_` + +``` purescript +td_ :: Array JSX -> JSX +``` + +#### `td` + +``` purescript +td :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_td) => { | attrs } -> JSX +``` + +#### `tbody_` + +``` purescript +tbody_ :: Array JSX -> JSX +``` + +#### `tbody` + +``` purescript +tbody :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tbody) => { | attrs } -> JSX +``` + +#### `table_` + +``` purescript +table_ :: Array JSX -> JSX +``` + +#### `table` + +``` purescript +table :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_table) => { | attrs } -> JSX +``` + +#### `svg_` + +``` purescript +svg_ :: Array JSX -> JSX +``` + +#### `svg` + +``` purescript +svg :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_svg) => { | attrs } -> JSX +``` + +#### `sup_` + +``` purescript +sup_ :: Array JSX -> JSX +``` + +#### `sup` + +``` purescript +sup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sup) => { | attrs } -> JSX +``` + +#### `summary_` + +``` purescript +summary_ :: Array JSX -> JSX +``` + +#### `summary` + +``` purescript +summary :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_summary) => { | attrs } -> JSX +``` + +#### `sub_` + +``` purescript +sub_ :: Array JSX -> JSX +``` + +#### `sub` + +``` purescript +sub :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sub) => { | attrs } -> JSX +``` + +#### `style_` + +``` purescript +style_ :: Array JSX -> JSX +``` + +#### `style` + +``` purescript +style :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_style) => { | attrs } -> JSX +``` + +#### `strong_` + +``` purescript +strong_ :: Array JSX -> JSX +``` + +#### `strong` + +``` purescript +strong :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_strong) => { | attrs } -> JSX +``` + +#### `span_` + +``` purescript +span_ :: Array JSX -> JSX +``` + +#### `span` + +``` purescript +span :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_span) => { | attrs } -> JSX +``` + +#### `source` + +``` purescript +source :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_source) => { | attrs } -> JSX +``` + +#### `small_` + +``` purescript +small_ :: Array JSX -> JSX +``` + +#### `small` + +``` purescript +small :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_small) => { | attrs } -> JSX +``` + +#### `slot_` + +``` purescript +slot_ :: Array JSX -> JSX +``` + +#### `slot` + +``` purescript +slot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_slot) => { | attrs } -> JSX +``` + +#### `select_` + +``` purescript +select_ :: Array JSX -> JSX +``` + +#### `select` + +``` purescript +select :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_select) => { | attrs } -> JSX +``` + +#### `section_` + +``` purescript +section_ :: Array JSX -> JSX +``` + +#### `section` + +``` purescript +section :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_section) => { | attrs } -> JSX +``` + +#### `script_` + +``` purescript +script_ :: Array JSX -> JSX +``` + +#### `script` + +``` purescript +script :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_script) => { | attrs } -> JSX +``` + +#### `samp_` + +``` purescript +samp_ :: Array JSX -> JSX +``` + +#### `samp` + +``` purescript +samp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_samp) => { | attrs } -> JSX +``` + +#### `s_` + +``` purescript +s_ :: Array JSX -> JSX +``` + +#### `s` + +``` purescript +s :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_s) => { | attrs } -> JSX +``` + +#### `ruby_` + +``` purescript +ruby_ :: Array JSX -> JSX +``` + +#### `ruby` + +``` purescript +ruby :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ruby) => { | attrs } -> JSX +``` + +#### `rtc_` + +``` purescript +rtc_ :: Array JSX -> JSX +``` + +#### `rtc` + +``` purescript +rtc :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rtc) => { | attrs } -> JSX +``` + +#### `rt_` + +``` purescript +rt_ :: Array JSX -> JSX +``` + +#### `rt` + +``` purescript +rt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rt) => { | attrs } -> JSX +``` + +#### `rp_` + +``` purescript +rp_ :: Array JSX -> JSX +``` + +#### `rp` + +``` purescript +rp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rp) => { | attrs } -> JSX +``` + +#### `rb_` + +``` purescript +rb_ :: Array JSX -> JSX +``` + +#### `rb` + +``` purescript +rb :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rb) => { | attrs } -> JSX +``` + +#### `q_` + +``` purescript +q_ :: Array JSX -> JSX +``` + +#### `q` + +``` purescript +q :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_q) => { | attrs } -> JSX +``` + +#### `progress_` + +``` purescript +progress_ :: Array JSX -> JSX +``` + +#### `progress` + +``` purescript +progress :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_progress) => { | attrs } -> JSX +``` + +#### `pre_` + +``` purescript +pre_ :: Array JSX -> JSX +``` + +#### `pre` + +``` purescript +pre :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_pre) => { | attrs } -> JSX +``` + +#### `picture_` + +``` purescript +picture_ :: Array JSX -> JSX +``` + +#### `picture` + +``` purescript +picture :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_picture) => { | attrs } -> JSX +``` + +#### `param` + +``` purescript +param :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_param) => { | attrs } -> JSX +``` + +#### `p_` + +``` purescript +p_ :: Array JSX -> JSX +``` + +#### `p` + +``` purescript +p :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_p) => { | attrs } -> JSX +``` + +#### `output_` + +``` purescript +output_ :: Array JSX -> JSX +``` + +#### `output` + +``` purescript +output :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_output) => { | attrs } -> JSX +``` + +#### `option_` + +``` purescript +option_ :: Array JSX -> JSX +``` + +#### `option` + +``` purescript +option :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_option) => { | attrs } -> JSX +``` + +#### `optgroup_` + +``` purescript +optgroup_ :: Array JSX -> JSX +``` + +#### `optgroup` + +``` purescript +optgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_optgroup) => { | attrs } -> JSX +``` + +#### `ol_` + +``` purescript +ol_ :: Array JSX -> JSX +``` + +#### `ol` + +``` purescript +ol :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ol) => { | attrs } -> JSX +``` + +#### `object_` + +``` purescript +object_ :: Array JSX -> JSX +``` + +#### `object` + +``` purescript +object :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_object) => { | attrs } -> JSX +``` + +#### `noscript_` + +``` purescript +noscript_ :: Array JSX -> JSX +``` + +#### `noscript` + +``` purescript +noscript :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_noscript) => { | attrs } -> JSX +``` + +#### `nav_` + +``` purescript +nav_ :: Array JSX -> JSX +``` + +#### `nav` + +``` purescript +nav :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_nav) => { | attrs } -> JSX +``` + +#### `meter_` + +``` purescript +meter_ :: Array JSX -> JSX +``` + +#### `meter` + +``` purescript +meter :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meter) => { | attrs } -> JSX +``` + +#### `meta` + +``` purescript +meta :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meta) => { | attrs } -> JSX +``` + +#### `menuitem_` + +``` purescript +menuitem_ :: Array JSX -> JSX +``` + +#### `menuitem` + +``` purescript +menuitem :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menuitem) => { | attrs } -> JSX +``` + +#### `menu_` + +``` purescript +menu_ :: Array JSX -> JSX +``` + +#### `menu` + +``` purescript +menu :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menu) => { | attrs } -> JSX +``` + +#### `math_` + +``` purescript +math_ :: Array JSX -> JSX +``` + +#### `math` + +``` purescript +math :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_math) => { | attrs } -> JSX +``` + +#### `mark_` + +``` purescript +mark_ :: Array JSX -> JSX +``` + +#### `mark` + +``` purescript +mark :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_mark) => { | attrs } -> JSX +``` + +#### `map_` + +``` purescript +map_ :: Array JSX -> JSX +``` + +#### `map` + +``` purescript +map :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_map) => { | attrs } -> JSX +``` + +#### `main_` + +``` purescript +main_ :: Array JSX -> JSX +``` + +#### `main` + +``` purescript +main :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_main) => { | attrs } -> JSX +``` + +#### `link` + +``` purescript +link :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_link) => { | attrs } -> JSX +``` + +#### `li_` + +``` purescript +li_ :: Array JSX -> JSX +``` + +#### `li` + +``` purescript +li :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_li) => { | attrs } -> JSX +``` + +#### `legend_` + +``` purescript +legend_ :: Array JSX -> JSX +``` + +#### `legend` + +``` purescript +legend :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_legend) => { | attrs } -> JSX +``` + +#### `label_` + +``` purescript +label_ :: Array JSX -> JSX +``` + +#### `label` + +``` purescript +label :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_label) => { | attrs } -> JSX +``` + +#### `keygen_` + +``` purescript +keygen_ :: Array JSX -> JSX +``` + +#### `keygen` + +``` purescript +keygen :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_keygen) => { | attrs } -> JSX +``` + +#### `kbd_` + +``` purescript +kbd_ :: Array JSX -> JSX +``` + +#### `kbd` + +``` purescript +kbd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_kbd) => { | attrs } -> JSX +``` + +#### `ins_` + +``` purescript +ins_ :: Array JSX -> JSX +``` + +#### `ins` + +``` purescript +ins :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ins) => { | attrs } -> JSX +``` + +#### `input` + +``` purescript +input :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_input) => { | attrs } -> JSX +``` + +#### `img` + +``` purescript +img :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_img) => { | attrs } -> JSX +``` + +#### `iframe_` + +``` purescript +iframe_ :: Array JSX -> JSX +``` + +#### `iframe` + +``` purescript +iframe :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_iframe) => { | attrs } -> JSX +``` + +#### `i_` + +``` purescript +i_ :: Array JSX -> JSX +``` + +#### `i` + +``` purescript +i :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_i) => { | attrs } -> JSX +``` + +#### `html_` + +``` purescript +html_ :: Array JSX -> JSX +``` + +#### `html` + +``` purescript +html :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_html) => { | attrs } -> JSX +``` + +#### `hr` + +``` purescript +hr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hr) => { | attrs } -> JSX +``` + +#### `hgroup_` + +``` purescript +hgroup_ :: Array JSX -> JSX +``` + +#### `hgroup` + +``` purescript +hgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hgroup) => { | attrs } -> JSX +``` + +#### `header_` + +``` purescript +header_ :: Array JSX -> JSX +``` + +#### `header` + +``` purescript +header :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_header) => { | attrs } -> JSX +``` + +#### `head_` + +``` purescript +head_ :: Array JSX -> JSX +``` + +#### `head` + +``` purescript +head :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_head) => { | attrs } -> JSX +``` + +#### `h6_` + +``` purescript +h6_ :: Array JSX -> JSX +``` + +#### `h6` + +``` purescript +h6 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h6) => { | attrs } -> JSX +``` + +#### `h5_` + +``` purescript +h5_ :: Array JSX -> JSX +``` + +#### `h5` + +``` purescript +h5 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h5) => { | attrs } -> JSX +``` + +#### `h4_` + +``` purescript +h4_ :: Array JSX -> JSX +``` + +#### `h4` + +``` purescript +h4 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h4) => { | attrs } -> JSX +``` + +#### `h3_` + +``` purescript +h3_ :: Array JSX -> JSX +``` + +#### `h3` + +``` purescript +h3 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h3) => { | attrs } -> JSX +``` + +#### `h2_` + +``` purescript +h2_ :: Array JSX -> JSX +``` + +#### `h2` + +``` purescript +h2 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h2) => { | attrs } -> JSX +``` + +#### `h1_` + +``` purescript +h1_ :: Array JSX -> JSX +``` + +#### `h1` + +``` purescript +h1 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h1) => { | attrs } -> JSX +``` + +#### `form_` + +``` purescript +form_ :: Array JSX -> JSX +``` + +#### `form` + +``` purescript +form :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_form) => { | attrs } -> JSX +``` + +#### `footer_` + +``` purescript +footer_ :: Array JSX -> JSX +``` + +#### `footer` + +``` purescript +footer :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_footer) => { | attrs } -> JSX +``` + +#### `figure_` + +``` purescript +figure_ :: Array JSX -> JSX +``` + +#### `figure` + +``` purescript +figure :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figure) => { | attrs } -> JSX +``` + +#### `figcaption_` + +``` purescript +figcaption_ :: Array JSX -> JSX +``` + +#### `figcaption` + +``` purescript +figcaption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figcaption) => { | attrs } -> JSX +``` + +#### `fieldset_` + +``` purescript +fieldset_ :: Array JSX -> JSX +``` + +#### `fieldset` + +``` purescript +fieldset :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_fieldset) => { | attrs } -> JSX +``` + +#### `embed` + +``` purescript +embed :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_embed) => { | attrs } -> JSX +``` + +#### `em_` + +``` purescript +em_ :: Array JSX -> JSX +``` + +#### `em` + +``` purescript +em :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_em) => { | attrs } -> JSX +``` + +#### `dt_` + +``` purescript +dt_ :: Array JSX -> JSX +``` + +#### `dt` + +``` purescript +dt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dt) => { | attrs } -> JSX +``` + +#### `dl_` + +``` purescript +dl_ :: Array JSX -> JSX +``` + +#### `dl` + +``` purescript +dl :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dl) => { | attrs } -> JSX +``` + +#### `div_` + +``` purescript +div_ :: Array JSX -> JSX +``` + +#### `div` + +``` purescript +div :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_div) => { | attrs } -> JSX +``` + +#### `dialog_` + +``` purescript +dialog_ :: Array JSX -> JSX +``` + +#### `dialog` + +``` purescript +dialog :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dialog) => { | attrs } -> JSX +``` + +#### `dfn_` + +``` purescript +dfn_ :: Array JSX -> JSX +``` + +#### `dfn` + +``` purescript +dfn :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dfn) => { | attrs } -> JSX +``` + +#### `details_` + +``` purescript +details_ :: Array JSX -> JSX +``` + +#### `details` + +``` purescript +details :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_details) => { | attrs } -> JSX +``` + +#### `del_` + +``` purescript +del_ :: Array JSX -> JSX +``` + +#### `del` + +``` purescript +del :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_del) => { | attrs } -> JSX +``` + +#### `dd_` + +``` purescript +dd_ :: Array JSX -> JSX +``` + +#### `dd` + +``` purescript +dd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dd) => { | attrs } -> JSX +``` + +#### `datalist_` + +``` purescript +datalist_ :: Array JSX -> JSX +``` + +#### `datalist` + +``` purescript +datalist :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_datalist) => { | attrs } -> JSX +``` + +#### `data_` + +``` purescript +data_ :: Array JSX -> JSX +``` + +#### `data'` + +``` purescript +data' :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_data) => { | attrs } -> JSX +``` + +#### `colgroup_` + +``` purescript +colgroup_ :: Array JSX -> JSX +``` + +#### `colgroup` + +``` purescript +colgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_colgroup) => { | attrs } -> JSX +``` + +#### `col` + +``` purescript +col :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_col) => { | attrs } -> JSX +``` + +#### `code_` + +``` purescript +code_ :: Array JSX -> JSX +``` + +#### `code` + +``` purescript +code :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_code) => { | attrs } -> JSX +``` + +#### `cite_` + +``` purescript +cite_ :: Array JSX -> JSX +``` + +#### `cite` + +``` purescript +cite :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_cite) => { | attrs } -> JSX +``` + +#### `caption_` + +``` purescript +caption_ :: Array JSX -> JSX +``` + +#### `caption` + +``` purescript +caption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_caption) => { | attrs } -> JSX +``` + +#### `canvas_` + +``` purescript +canvas_ :: Array JSX -> JSX +``` + +#### `canvas` + +``` purescript +canvas :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_canvas) => { | attrs } -> JSX +``` + +#### `button_` + +``` purescript +button_ :: Array JSX -> JSX +``` + +#### `button` + +``` purescript +button :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_button) => { | attrs } -> JSX +``` + +#### `br` + +``` purescript +br :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_br) => { | attrs } -> JSX +``` + +#### `body_` + +``` purescript +body_ :: Array JSX -> JSX +``` + +#### `body` + +``` purescript +body :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_body) => { | attrs } -> JSX +``` + +#### `blockquote_` + +``` purescript +blockquote_ :: Array JSX -> JSX +``` + +#### `blockquote` + +``` purescript +blockquote :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_blockquote) => { | attrs } -> JSX +``` + +#### `bdo_` + +``` purescript +bdo_ :: Array JSX -> JSX +``` + +#### `bdo` + +``` purescript +bdo :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdo) => { | attrs } -> JSX +``` + +#### `bdi_` + +``` purescript +bdi_ :: Array JSX -> JSX +``` + +#### `bdi` + +``` purescript +bdi :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdi) => { | attrs } -> JSX +``` + +#### `base` + +``` purescript +base :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_base) => { | attrs } -> JSX +``` + +#### `b_` + +``` purescript +b_ :: Array JSX -> JSX +``` + +#### `b` + +``` purescript +b :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_b) => { | attrs } -> JSX +``` + +#### `audio_` + +``` purescript +audio_ :: Array JSX -> JSX +``` + +#### `audio` + +``` purescript +audio :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_audio) => { | attrs } -> JSX +``` + +#### `aside_` + +``` purescript +aside_ :: Array JSX -> JSX +``` + +#### `aside` + +``` purescript +aside :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_aside) => { | attrs } -> JSX +``` + +#### `article_` + +``` purescript +article_ :: Array JSX -> JSX +``` + +#### `article` + +``` purescript +article :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_article) => { | attrs } -> JSX +``` + +#### `area` + +``` purescript +area :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_area) => { | attrs } -> JSX +``` + +#### `address_` + +``` purescript +address_ :: Array JSX -> JSX +``` + +#### `address` + +``` purescript +address :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_address) => { | attrs } -> JSX +``` + +#### `abbr_` + +``` purescript +abbr_ :: Array JSX -> JSX +``` + +#### `abbr` + +``` purescript +abbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_abbr) => { | attrs } -> JSX +``` + +#### `a_` + +``` purescript +a_ :: Array JSX -> JSX +``` + +#### `a` + +``` purescript +a :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_a) => { | attrs } -> JSX +``` + +### Re-exported from React.Basic.DOM.Internal: + +#### `SharedProps` + +``` purescript +type SharedProps specific = (key :: String, about :: String, acceptCharset :: String, accessKey :: String, allowFullScreen :: Boolean, allowTransparency :: String, autoComplete :: String, autoFocus :: String, autoPlay :: Boolean, capture :: Boolean, cellPadding :: String, cellSpacing :: String, charSet :: String, classID :: String, className :: String, colSpan :: Number, contentEditable :: String, contextMenu :: String, crossOrigin :: String, datatype :: String, dateTime :: String, dir :: String, draggable :: String, encType :: String, formAction :: String, formEncType :: String, formMethod :: String, formNoValidate :: String, formTarget :: String, frameBorder :: String, hidden :: Boolean, hrefLang :: String, htmlFor :: String, httpEquiv :: String, icon :: String, id :: String, inlist :: String, inputMode :: String, is :: String, itemID :: String, itemProp :: String, itemRef :: String, itemScope :: Boolean, itemType :: String, keyParams :: String, keyType :: String, lang :: String, marginHeight :: String, marginWidth :: String, maxLength :: String, mediaGroup :: String, minLength :: String, noValidate :: String, prefix :: String, property :: String, radioGroup :: String, readOnly :: Boolean, resource :: String, role :: String, rowSpan :: Number, scoped :: Boolean, seamless :: Boolean, security :: String, spellCheck :: String, srcDoc :: String, srcLang :: String, srcSet :: String, style :: CSS, tabIndex :: String, title :: String, typeof :: String, unselectable :: String, useMap :: String, vocab :: String, wmode :: String, onBlur :: EventHandler, onClick :: EventHandler, onFocus :: EventHandler | specific) +``` + +Standard props which are shared by all DOM elements. + +#### `CSS` + +``` purescript +data CSS :: Type +``` + +An abstract type representing records of CSS attributes. + +#### `unsafeCreateDOMComponent` + +``` purescript +unsafeCreateDOMComponent :: forall props. String -> ReactComponent props +``` + diff --git a/generated-docs/React/Basic/DOM/Events.md b/generated-docs/React/Basic/DOM/Events.md new file mode 100644 index 0000000..4b86a99 --- /dev/null +++ b/generated-docs/React/Basic/DOM/Events.md @@ -0,0 +1,233 @@ +## Module React.Basic.DOM.Events + +This module defines safe DOM event function and property accessors. + +#### `bubbles` + +``` purescript +bubbles :: EventFn SyntheticEvent Boolean +``` + +General event fields + +#### `cancelable` + +``` purescript +cancelable :: EventFn SyntheticEvent Boolean +``` + +#### `eventPhase` + +``` purescript +eventPhase :: EventFn SyntheticEvent Int +``` + +#### `eventPhaseNone` + +``` purescript +eventPhaseNone :: Int +``` + +#### `eventPhaseCapturing` + +``` purescript +eventPhaseCapturing :: Int +``` + +#### `eventPhaseAtTarget` + +``` purescript +eventPhaseAtTarget :: Int +``` + +#### `eventPhaseBubbling` + +``` purescript +eventPhaseBubbling :: Int +``` + +#### `isTrusted` + +``` purescript +isTrusted :: EventFn SyntheticEvent Boolean +``` + +#### `nativeEvent` + +``` purescript +nativeEvent :: EventFn SyntheticEvent Event +``` + +#### `preventDefault` + +``` purescript +preventDefault :: EventFn SyntheticEvent SyntheticEvent +``` + +#### `isDefaultPrevented` + +``` purescript +isDefaultPrevented :: EventFn SyntheticEvent Boolean +``` + +#### `stopPropagation` + +``` purescript +stopPropagation :: EventFn SyntheticEvent SyntheticEvent +``` + +#### `isPropagationStopped` + +``` purescript +isPropagationStopped :: EventFn SyntheticEvent Boolean +``` + +#### `target` + +``` purescript +target :: EventFn SyntheticEvent EventTarget +``` + +#### `currentTarget` + +``` purescript +currentTarget :: EventFn SyntheticEvent EventTarget +``` + +#### `relatedTarget` + +``` purescript +relatedTarget :: EventFn SyntheticEvent (Maybe EventTarget) +``` + +#### `targetChecked` + +``` purescript +targetChecked :: EventFn SyntheticEvent (Maybe Boolean) +``` + +#### `targetValue` + +``` purescript +targetValue :: EventFn SyntheticEvent (Maybe String) +``` + +#### `timeStamp` + +``` purescript +timeStamp :: EventFn SyntheticEvent Number +``` + +#### `type_` + +``` purescript +type_ :: EventFn SyntheticEvent String +``` + +#### `key` + +``` purescript +key :: EventFn SyntheticEvent (Maybe String) +``` + +Keyboard event fields + +#### `code` + +``` purescript +code :: EventFn SyntheticEvent (Maybe String) +``` + +#### `char` + +``` purescript +char :: EventFn SyntheticEvent (Maybe String) +``` + +#### `location` + +``` purescript +location :: EventFn SyntheticEvent (Maybe Number) +``` + +#### `repeat` + +``` purescript +repeat :: EventFn SyntheticEvent (Maybe Boolean) +``` + +#### `locale` + +``` purescript +locale :: EventFn SyntheticEvent (Maybe String) +``` + +#### `ctrlKey` + +``` purescript +ctrlKey :: EventFn SyntheticEvent (Maybe Boolean) +``` + +#### `shiftKey` + +``` purescript +shiftKey :: EventFn SyntheticEvent (Maybe Boolean) +``` + +#### `altKey` + +``` purescript +altKey :: EventFn SyntheticEvent (Maybe Boolean) +``` + +#### `metaKey` + +``` purescript +metaKey :: EventFn SyntheticEvent (Maybe Boolean) +``` + +#### `detail` + +``` purescript +detail :: EventFn SyntheticEvent (Maybe Int) +``` + +Mouse event fields + +#### `screenX` + +``` purescript +screenX :: EventFn SyntheticEvent (Maybe Number) +``` + +#### `screenY` + +``` purescript +screenY :: EventFn SyntheticEvent (Maybe Number) +``` + +#### `clientX` + +``` purescript +clientX :: EventFn SyntheticEvent (Maybe Number) +``` + +#### `clientY` + +``` purescript +clientY :: EventFn SyntheticEvent (Maybe Number) +``` + +#### `button` + +``` purescript +button :: EventFn SyntheticEvent (Maybe Int) +``` + +#### `buttons` + +``` purescript +buttons :: EventFn SyntheticEvent (Maybe Int) +``` + + diff --git a/generated-docs/React/Basic/DOM/Generated.md b/generated-docs/React/Basic/DOM/Generated.md new file mode 100644 index 0000000..418160e --- /dev/null +++ b/generated-docs/React/Basic/DOM/Generated.md @@ -0,0 +1,2047 @@ +## Module React.Basic.DOM.Generated + +---------------------------------------- +THIS FILE IS GENERATED -- DO NOT EDIT IT +---------------------------------------- + +#### `Props_a` + +``` purescript +type Props_a = (children :: Array JSX, coords :: String, download :: String, href :: String, name :: String, onClick :: EventHandler, rel :: String, shape :: String, target :: String, "type" :: String) +``` + +#### `a` + +``` purescript +a :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_a) => { | attrs } -> JSX +``` + +#### `a_` + +``` purescript +a_ :: Array JSX -> JSX +``` + +#### `Props_abbr` + +``` purescript +type Props_abbr = (children :: Array JSX, title :: String) +``` + +#### `abbr` + +``` purescript +abbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_abbr) => { | attrs } -> JSX +``` + +#### `abbr_` + +``` purescript +abbr_ :: Array JSX -> JSX +``` + +#### `Props_address` + +``` purescript +type Props_address = (children :: Array JSX) +``` + +#### `address` + +``` purescript +address :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_address) => { | attrs } -> JSX +``` + +#### `address_` + +``` purescript +address_ :: Array JSX -> JSX +``` + +#### `Props_area` + +``` purescript +type Props_area = (alt :: String, coords :: String, download :: String, href :: String, rel :: String, shape :: String, target :: String, "type" :: String) +``` + +#### `area` + +``` purescript +area :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_area) => { | attrs } -> JSX +``` + +#### `Props_article` + +``` purescript +type Props_article = (children :: Array JSX) +``` + +#### `article` + +``` purescript +article :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_article) => { | attrs } -> JSX +``` + +#### `article_` + +``` purescript +article_ :: Array JSX -> JSX +``` + +#### `Props_aside` + +``` purescript +type Props_aside = (children :: Array JSX) +``` + +#### `aside` + +``` purescript +aside :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_aside) => { | attrs } -> JSX +``` + +#### `aside_` + +``` purescript +aside_ :: Array JSX -> JSX +``` + +#### `Props_audio` + +``` purescript +type Props_audio = (children :: Array JSX, controls :: Boolean, loop :: Boolean, muted :: Boolean, preload :: String, src :: String) +``` + +#### `audio` + +``` purescript +audio :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_audio) => { | attrs } -> JSX +``` + +#### `audio_` + +``` purescript +audio_ :: Array JSX -> JSX +``` + +#### `Props_b` + +``` purescript +type Props_b = (children :: Array JSX) +``` + +#### `b` + +``` purescript +b :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_b) => { | attrs } -> JSX +``` + +#### `b_` + +``` purescript +b_ :: Array JSX -> JSX +``` + +#### `Props_base` + +``` purescript +type Props_base = (href :: String, target :: String) +``` + +#### `base` + +``` purescript +base :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_base) => { | attrs } -> JSX +``` + +#### `Props_bdi` + +``` purescript +type Props_bdi = (children :: Array JSX) +``` + +#### `bdi` + +``` purescript +bdi :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdi) => { | attrs } -> JSX +``` + +#### `bdi_` + +``` purescript +bdi_ :: Array JSX -> JSX +``` + +#### `Props_bdo` + +``` purescript +type Props_bdo = (children :: Array JSX, dir :: String) +``` + +#### `bdo` + +``` purescript +bdo :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_bdo) => { | attrs } -> JSX +``` + +#### `bdo_` + +``` purescript +bdo_ :: Array JSX -> JSX +``` + +#### `Props_blockquote` + +``` purescript +type Props_blockquote = (children :: Array JSX, cite :: String) +``` + +#### `blockquote` + +``` purescript +blockquote :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_blockquote) => { | attrs } -> JSX +``` + +#### `blockquote_` + +``` purescript +blockquote_ :: Array JSX -> JSX +``` + +#### `Props_body` + +``` purescript +type Props_body = (children :: Array JSX) +``` + +#### `body` + +``` purescript +body :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_body) => { | attrs } -> JSX +``` + +#### `body_` + +``` purescript +body_ :: Array JSX -> JSX +``` + +#### `Props_br` + +``` purescript +type Props_br = () +``` + +#### `br` + +``` purescript +br :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_br) => { | attrs } -> JSX +``` + +#### `Props_button` + +``` purescript +type Props_button = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String, "type" :: String, value :: String) +``` + +#### `button` + +``` purescript +button :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_button) => { | attrs } -> JSX +``` + +#### `button_` + +``` purescript +button_ :: Array JSX -> JSX +``` + +#### `Props_canvas` + +``` purescript +type Props_canvas = (children :: Array JSX, height :: String, width :: String) +``` + +#### `canvas` + +``` purescript +canvas :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_canvas) => { | attrs } -> JSX +``` + +#### `canvas_` + +``` purescript +canvas_ :: Array JSX -> JSX +``` + +#### `Props_caption` + +``` purescript +type Props_caption = (children :: Array JSX) +``` + +#### `caption` + +``` purescript +caption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_caption) => { | attrs } -> JSX +``` + +#### `caption_` + +``` purescript +caption_ :: Array JSX -> JSX +``` + +#### `Props_cite` + +``` purescript +type Props_cite = (children :: Array JSX) +``` + +#### `cite` + +``` purescript +cite :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_cite) => { | attrs } -> JSX +``` + +#### `cite_` + +``` purescript +cite_ :: Array JSX -> JSX +``` + +#### `Props_code` + +``` purescript +type Props_code = (children :: Array JSX) +``` + +#### `code` + +``` purescript +code :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_code) => { | attrs } -> JSX +``` + +#### `code_` + +``` purescript +code_ :: Array JSX -> JSX +``` + +#### `Props_col` + +``` purescript +type Props_col = (span :: Number, width :: String) +``` + +#### `col` + +``` purescript +col :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_col) => { | attrs } -> JSX +``` + +#### `Props_colgroup` + +``` purescript +type Props_colgroup = (children :: Array JSX, span :: Number, width :: String) +``` + +#### `colgroup` + +``` purescript +colgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_colgroup) => { | attrs } -> JSX +``` + +#### `colgroup_` + +``` purescript +colgroup_ :: Array JSX -> JSX +``` + +#### `Props_data` + +``` purescript +type Props_data = (children :: Array JSX, value :: String) +``` + +#### `data'` + +``` purescript +data' :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_data) => { | attrs } -> JSX +``` + +#### `data_` + +``` purescript +data_ :: Array JSX -> JSX +``` + +#### `Props_datalist` + +``` purescript +type Props_datalist = (children :: Array JSX) +``` + +#### `datalist` + +``` purescript +datalist :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_datalist) => { | attrs } -> JSX +``` + +#### `datalist_` + +``` purescript +datalist_ :: Array JSX -> JSX +``` + +#### `Props_dd` + +``` purescript +type Props_dd = (children :: Array JSX) +``` + +#### `dd` + +``` purescript +dd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dd) => { | attrs } -> JSX +``` + +#### `dd_` + +``` purescript +dd_ :: Array JSX -> JSX +``` + +#### `Props_del` + +``` purescript +type Props_del = (children :: Array JSX, cite :: String) +``` + +#### `del` + +``` purescript +del :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_del) => { | attrs } -> JSX +``` + +#### `del_` + +``` purescript +del_ :: Array JSX -> JSX +``` + +#### `Props_details` + +``` purescript +type Props_details = (children :: Array JSX, open :: Boolean) +``` + +#### `details` + +``` purescript +details :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_details) => { | attrs } -> JSX +``` + +#### `details_` + +``` purescript +details_ :: Array JSX -> JSX +``` + +#### `Props_dfn` + +``` purescript +type Props_dfn = (children :: Array JSX, title :: String) +``` + +#### `dfn` + +``` purescript +dfn :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dfn) => { | attrs } -> JSX +``` + +#### `dfn_` + +``` purescript +dfn_ :: Array JSX -> JSX +``` + +#### `Props_dialog` + +``` purescript +type Props_dialog = (children :: Array JSX, open :: Boolean) +``` + +#### `dialog` + +``` purescript +dialog :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dialog) => { | attrs } -> JSX +``` + +#### `dialog_` + +``` purescript +dialog_ :: Array JSX -> JSX +``` + +#### `Props_div` + +``` purescript +type Props_div = (children :: Array JSX) +``` + +#### `div` + +``` purescript +div :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_div) => { | attrs } -> JSX +``` + +#### `div_` + +``` purescript +div_ :: Array JSX -> JSX +``` + +#### `Props_dl` + +``` purescript +type Props_dl = (children :: Array JSX) +``` + +#### `dl` + +``` purescript +dl :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dl) => { | attrs } -> JSX +``` + +#### `dl_` + +``` purescript +dl_ :: Array JSX -> JSX +``` + +#### `Props_dt` + +``` purescript +type Props_dt = (children :: Array JSX) +``` + +#### `dt` + +``` purescript +dt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_dt) => { | attrs } -> JSX +``` + +#### `dt_` + +``` purescript +dt_ :: Array JSX -> JSX +``` + +#### `Props_em` + +``` purescript +type Props_em = (children :: Array JSX) +``` + +#### `em` + +``` purescript +em :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_em) => { | attrs } -> JSX +``` + +#### `em_` + +``` purescript +em_ :: Array JSX -> JSX +``` + +#### `Props_embed` + +``` purescript +type Props_embed = (height :: String, src :: String, "type" :: String, width :: String) +``` + +#### `embed` + +``` purescript +embed :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_embed) => { | attrs } -> JSX +``` + +#### `Props_fieldset` + +``` purescript +type Props_fieldset = (children :: Array JSX, disabled :: Boolean, form :: String, name :: String) +``` + +#### `fieldset` + +``` purescript +fieldset :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_fieldset) => { | attrs } -> JSX +``` + +#### `fieldset_` + +``` purescript +fieldset_ :: Array JSX -> JSX +``` + +#### `Props_figcaption` + +``` purescript +type Props_figcaption = (children :: Array JSX) +``` + +#### `figcaption` + +``` purescript +figcaption :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figcaption) => { | attrs } -> JSX +``` + +#### `figcaption_` + +``` purescript +figcaption_ :: Array JSX -> JSX +``` + +#### `Props_figure` + +``` purescript +type Props_figure = (children :: Array JSX) +``` + +#### `figure` + +``` purescript +figure :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_figure) => { | attrs } -> JSX +``` + +#### `figure_` + +``` purescript +figure_ :: Array JSX -> JSX +``` + +#### `Props_footer` + +``` purescript +type Props_footer = (children :: Array JSX) +``` + +#### `footer` + +``` purescript +footer :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_footer) => { | attrs } -> JSX +``` + +#### `footer_` + +``` purescript +footer_ :: Array JSX -> JSX +``` + +#### `Props_form` + +``` purescript +type Props_form = (accept :: String, action :: String, children :: Array JSX, method :: String, name :: String, onChange :: EventHandler, onInput :: EventHandler, onInvalid :: EventHandler, onSubmit :: EventHandler, target :: String) +``` + +#### `form` + +``` purescript +form :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_form) => { | attrs } -> JSX +``` + +#### `form_` + +``` purescript +form_ :: Array JSX -> JSX +``` + +#### `Props_h1` + +``` purescript +type Props_h1 = (children :: Array JSX) +``` + +#### `h1` + +``` purescript +h1 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h1) => { | attrs } -> JSX +``` + +#### `h1_` + +``` purescript +h1_ :: Array JSX -> JSX +``` + +#### `Props_h2` + +``` purescript +type Props_h2 = (children :: Array JSX) +``` + +#### `h2` + +``` purescript +h2 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h2) => { | attrs } -> JSX +``` + +#### `h2_` + +``` purescript +h2_ :: Array JSX -> JSX +``` + +#### `Props_h3` + +``` purescript +type Props_h3 = (children :: Array JSX) +``` + +#### `h3` + +``` purescript +h3 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h3) => { | attrs } -> JSX +``` + +#### `h3_` + +``` purescript +h3_ :: Array JSX -> JSX +``` + +#### `Props_h4` + +``` purescript +type Props_h4 = (children :: Array JSX) +``` + +#### `h4` + +``` purescript +h4 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h4) => { | attrs } -> JSX +``` + +#### `h4_` + +``` purescript +h4_ :: Array JSX -> JSX +``` + +#### `Props_h5` + +``` purescript +type Props_h5 = (children :: Array JSX) +``` + +#### `h5` + +``` purescript +h5 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h5) => { | attrs } -> JSX +``` + +#### `h5_` + +``` purescript +h5_ :: Array JSX -> JSX +``` + +#### `Props_h6` + +``` purescript +type Props_h6 = (children :: Array JSX) +``` + +#### `h6` + +``` purescript +h6 :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_h6) => { | attrs } -> JSX +``` + +#### `h6_` + +``` purescript +h6_ :: Array JSX -> JSX +``` + +#### `Props_head` + +``` purescript +type Props_head = (children :: Array JSX, profile :: String) +``` + +#### `head` + +``` purescript +head :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_head) => { | attrs } -> JSX +``` + +#### `head_` + +``` purescript +head_ :: Array JSX -> JSX +``` + +#### `Props_header` + +``` purescript +type Props_header = (children :: Array JSX) +``` + +#### `header` + +``` purescript +header :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_header) => { | attrs } -> JSX +``` + +#### `header_` + +``` purescript +header_ :: Array JSX -> JSX +``` + +#### `Props_hgroup` + +``` purescript +type Props_hgroup = (children :: Array JSX) +``` + +#### `hgroup` + +``` purescript +hgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hgroup) => { | attrs } -> JSX +``` + +#### `hgroup_` + +``` purescript +hgroup_ :: Array JSX -> JSX +``` + +#### `Props_hr` + +``` purescript +type Props_hr = (size :: Number, width :: String) +``` + +#### `hr` + +``` purescript +hr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_hr) => { | attrs } -> JSX +``` + +#### `Props_html` + +``` purescript +type Props_html = (children :: Array JSX, manifest :: String) +``` + +#### `html` + +``` purescript +html :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_html) => { | attrs } -> JSX +``` + +#### `html_` + +``` purescript +html_ :: Array JSX -> JSX +``` + +#### `Props_i` + +``` purescript +type Props_i = (children :: Array JSX) +``` + +#### `i` + +``` purescript +i :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_i) => { | attrs } -> JSX +``` + +#### `i_` + +``` purescript +i_ :: Array JSX -> JSX +``` + +#### `Props_iframe` + +``` purescript +type Props_iframe = (children :: Array JSX, height :: String, name :: String, sandbox :: String, scrolling :: String, src :: String, width :: String) +``` + +#### `iframe` + +``` purescript +iframe :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_iframe) => { | attrs } -> JSX +``` + +#### `iframe_` + +``` purescript +iframe_ :: Array JSX -> JSX +``` + +#### `Props_img` + +``` purescript +type Props_img = (alt :: String, height :: String, name :: String, sizes :: String, src :: String, width :: String) +``` + +#### `img` + +``` purescript +img :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_img) => { | attrs } -> JSX +``` + +#### `Props_input` + +``` purescript +type Props_input = (accept :: String, alt :: String, autoCapitalize :: String, autoCorrect :: String, autoSave :: String, checked :: Boolean, defaultChecked :: String, defaultValue :: String, disabled :: Boolean, form :: String, height :: String, list :: String, max :: Number, min :: Number, multiple :: Boolean, name :: String, onChange :: EventHandler, pattern :: String, placeholder :: String, required :: Boolean, results :: String, size :: Number, src :: String, step :: String, title :: String, "type" :: String, value :: String, width :: String) +``` + +#### `input` + +``` purescript +input :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_input) => { | attrs } -> JSX +``` + +#### `Props_ins` + +``` purescript +type Props_ins = (children :: Array JSX, cite :: String) +``` + +#### `ins` + +``` purescript +ins :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ins) => { | attrs } -> JSX +``` + +#### `ins_` + +``` purescript +ins_ :: Array JSX -> JSX +``` + +#### `Props_kbd` + +``` purescript +type Props_kbd = (children :: Array JSX) +``` + +#### `kbd` + +``` purescript +kbd :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_kbd) => { | attrs } -> JSX +``` + +#### `kbd_` + +``` purescript +kbd_ :: Array JSX -> JSX +``` + +#### `Props_keygen` + +``` purescript +type Props_keygen = (challenge :: String, children :: Array JSX, disabled :: Boolean, form :: String, name :: String) +``` + +#### `keygen` + +``` purescript +keygen :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_keygen) => { | attrs } -> JSX +``` + +#### `keygen_` + +``` purescript +keygen_ :: Array JSX -> JSX +``` + +#### `Props_label` + +``` purescript +type Props_label = (children :: Array JSX, form :: String) +``` + +#### `label` + +``` purescript +label :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_label) => { | attrs } -> JSX +``` + +#### `label_` + +``` purescript +label_ :: Array JSX -> JSX +``` + +#### `Props_legend` + +``` purescript +type Props_legend = (children :: Array JSX) +``` + +#### `legend` + +``` purescript +legend :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_legend) => { | attrs } -> JSX +``` + +#### `legend_` + +``` purescript +legend_ :: Array JSX -> JSX +``` + +#### `Props_li` + +``` purescript +type Props_li = (children :: Array JSX, "type" :: String, value :: String) +``` + +#### `li` + +``` purescript +li :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_li) => { | attrs } -> JSX +``` + +#### `li_` + +``` purescript +li_ :: Array JSX -> JSX +``` + +#### `Props_link` + +``` purescript +type Props_link = (color :: String, href :: String, integrity :: String, media :: String, nonce :: String, rel :: String, scope :: String, sizes :: String, target :: String, title :: String, "type" :: String) +``` + +#### `link` + +``` purescript +link :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_link) => { | attrs } -> JSX +``` + +#### `Props_main` + +``` purescript +type Props_main = (children :: Array JSX) +``` + +#### `main` + +``` purescript +main :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_main) => { | attrs } -> JSX +``` + +#### `main_` + +``` purescript +main_ :: Array JSX -> JSX +``` + +#### `Props_map` + +``` purescript +type Props_map = (children :: Array JSX, name :: String) +``` + +#### `map` + +``` purescript +map :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_map) => { | attrs } -> JSX +``` + +#### `map_` + +``` purescript +map_ :: Array JSX -> JSX +``` + +#### `Props_mark` + +``` purescript +type Props_mark = (children :: Array JSX) +``` + +#### `mark` + +``` purescript +mark :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_mark) => { | attrs } -> JSX +``` + +#### `mark_` + +``` purescript +mark_ :: Array JSX -> JSX +``` + +#### `Props_math` + +``` purescript +type Props_math = (children :: Array JSX) +``` + +#### `math` + +``` purescript +math :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_math) => { | attrs } -> JSX +``` + +#### `math_` + +``` purescript +math_ :: Array JSX -> JSX +``` + +#### `Props_menu` + +``` purescript +type Props_menu = (children :: Array JSX) +``` + +#### `menu` + +``` purescript +menu :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menu) => { | attrs } -> JSX +``` + +#### `menu_` + +``` purescript +menu_ :: Array JSX -> JSX +``` + +#### `Props_menuitem` + +``` purescript +type Props_menuitem = (children :: Array JSX) +``` + +#### `menuitem` + +``` purescript +menuitem :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_menuitem) => { | attrs } -> JSX +``` + +#### `menuitem_` + +``` purescript +menuitem_ :: Array JSX -> JSX +``` + +#### `Props_meta` + +``` purescript +type Props_meta = (content :: String, name :: String) +``` + +#### `meta` + +``` purescript +meta :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meta) => { | attrs } -> JSX +``` + +#### `Props_meter` + +``` purescript +type Props_meter = (children :: Array JSX, high :: String, low :: String, max :: Number, min :: Number, optimum :: String, value :: String) +``` + +#### `meter` + +``` purescript +meter :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_meter) => { | attrs } -> JSX +``` + +#### `meter_` + +``` purescript +meter_ :: Array JSX -> JSX +``` + +#### `Props_nav` + +``` purescript +type Props_nav = (children :: Array JSX) +``` + +#### `nav` + +``` purescript +nav :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_nav) => { | attrs } -> JSX +``` + +#### `nav_` + +``` purescript +nav_ :: Array JSX -> JSX +``` + +#### `Props_noscript` + +``` purescript +type Props_noscript = (children :: Array JSX) +``` + +#### `noscript` + +``` purescript +noscript :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_noscript) => { | attrs } -> JSX +``` + +#### `noscript_` + +``` purescript +noscript_ :: Array JSX -> JSX +``` + +#### `Props_object` + +``` purescript +type Props_object = (children :: Array JSX, "data" :: String, form :: String, height :: String, name :: String, "type" :: String, width :: String) +``` + +#### `object` + +``` purescript +object :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_object) => { | attrs } -> JSX +``` + +#### `object_` + +``` purescript +object_ :: Array JSX -> JSX +``` + +#### `Props_ol` + +``` purescript +type Props_ol = (children :: Array JSX, reversed :: Boolean, start :: Number, "type" :: String) +``` + +#### `ol` + +``` purescript +ol :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ol) => { | attrs } -> JSX +``` + +#### `ol_` + +``` purescript +ol_ :: Array JSX -> JSX +``` + +#### `Props_optgroup` + +``` purescript +type Props_optgroup = (children :: Array JSX, disabled :: Boolean, label :: String) +``` + +#### `optgroup` + +``` purescript +optgroup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_optgroup) => { | attrs } -> JSX +``` + +#### `optgroup_` + +``` purescript +optgroup_ :: Array JSX -> JSX +``` + +#### `Props_option` + +``` purescript +type Props_option = (children :: Array JSX, disabled :: Boolean, label :: String, selected :: Boolean, value :: String) +``` + +#### `option` + +``` purescript +option :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_option) => { | attrs } -> JSX +``` + +#### `option_` + +``` purescript +option_ :: Array JSX -> JSX +``` + +#### `Props_output` + +``` purescript +type Props_output = (children :: Array JSX, form :: String, name :: String) +``` + +#### `output` + +``` purescript +output :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_output) => { | attrs } -> JSX +``` + +#### `output_` + +``` purescript +output_ :: Array JSX -> JSX +``` + +#### `Props_p` + +``` purescript +type Props_p = (children :: Array JSX) +``` + +#### `p` + +``` purescript +p :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_p) => { | attrs } -> JSX +``` + +#### `p_` + +``` purescript +p_ :: Array JSX -> JSX +``` + +#### `Props_param` + +``` purescript +type Props_param = (name :: String, "type" :: String, value :: String) +``` + +#### `param` + +``` purescript +param :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_param) => { | attrs } -> JSX +``` + +#### `Props_picture` + +``` purescript +type Props_picture = (children :: Array JSX) +``` + +#### `picture` + +``` purescript +picture :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_picture) => { | attrs } -> JSX +``` + +#### `picture_` + +``` purescript +picture_ :: Array JSX -> JSX +``` + +#### `Props_pre` + +``` purescript +type Props_pre = (children :: Array JSX, width :: String) +``` + +#### `pre` + +``` purescript +pre :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_pre) => { | attrs } -> JSX +``` + +#### `pre_` + +``` purescript +pre_ :: Array JSX -> JSX +``` + +#### `Props_progress` + +``` purescript +type Props_progress = (children :: Array JSX, max :: Number, value :: String) +``` + +#### `progress` + +``` purescript +progress :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_progress) => { | attrs } -> JSX +``` + +#### `progress_` + +``` purescript +progress_ :: Array JSX -> JSX +``` + +#### `Props_q` + +``` purescript +type Props_q = (children :: Array JSX, cite :: String) +``` + +#### `q` + +``` purescript +q :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_q) => { | attrs } -> JSX +``` + +#### `q_` + +``` purescript +q_ :: Array JSX -> JSX +``` + +#### `Props_rb` + +``` purescript +type Props_rb = (children :: Array JSX) +``` + +#### `rb` + +``` purescript +rb :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rb) => { | attrs } -> JSX +``` + +#### `rb_` + +``` purescript +rb_ :: Array JSX -> JSX +``` + +#### `Props_rp` + +``` purescript +type Props_rp = (children :: Array JSX) +``` + +#### `rp` + +``` purescript +rp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rp) => { | attrs } -> JSX +``` + +#### `rp_` + +``` purescript +rp_ :: Array JSX -> JSX +``` + +#### `Props_rt` + +``` purescript +type Props_rt = (children :: Array JSX) +``` + +#### `rt` + +``` purescript +rt :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rt) => { | attrs } -> JSX +``` + +#### `rt_` + +``` purescript +rt_ :: Array JSX -> JSX +``` + +#### `Props_rtc` + +``` purescript +type Props_rtc = (children :: Array JSX) +``` + +#### `rtc` + +``` purescript +rtc :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_rtc) => { | attrs } -> JSX +``` + +#### `rtc_` + +``` purescript +rtc_ :: Array JSX -> JSX +``` + +#### `Props_ruby` + +``` purescript +type Props_ruby = (children :: Array JSX) +``` + +#### `ruby` + +``` purescript +ruby :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ruby) => { | attrs } -> JSX +``` + +#### `ruby_` + +``` purescript +ruby_ :: Array JSX -> JSX +``` + +#### `Props_s` + +``` purescript +type Props_s = (children :: Array JSX) +``` + +#### `s` + +``` purescript +s :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_s) => { | attrs } -> JSX +``` + +#### `s_` + +``` purescript +s_ :: Array JSX -> JSX +``` + +#### `Props_samp` + +``` purescript +type Props_samp = (children :: Array JSX) +``` + +#### `samp` + +``` purescript +samp :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_samp) => { | attrs } -> JSX +``` + +#### `samp_` + +``` purescript +samp_ :: Array JSX -> JSX +``` + +#### `Props_script` + +``` purescript +type Props_script = (async :: Boolean, children :: Array JSX, defer :: Boolean, integrity :: String, nonce :: String, src :: String, "type" :: String) +``` + +#### `script` + +``` purescript +script :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_script) => { | attrs } -> JSX +``` + +#### `script_` + +``` purescript +script_ :: Array JSX -> JSX +``` + +#### `Props_section` + +``` purescript +type Props_section = (children :: Array JSX) +``` + +#### `section` + +``` purescript +section :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_section) => { | attrs } -> JSX +``` + +#### `section_` + +``` purescript +section_ :: Array JSX -> JSX +``` + +#### `Props_select` + +``` purescript +type Props_select = (children :: Array JSX, defaultValue :: String, disabled :: Boolean, form :: String, multiple :: Boolean, name :: String, onChange :: EventHandler, required :: Boolean, size :: Number, value :: String) +``` + +#### `select` + +``` purescript +select :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_select) => { | attrs } -> JSX +``` + +#### `select_` + +``` purescript +select_ :: Array JSX -> JSX +``` + +#### `Props_slot` + +``` purescript +type Props_slot = (children :: Array JSX, name :: String) +``` + +#### `slot` + +``` purescript +slot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_slot) => { | attrs } -> JSX +``` + +#### `slot_` + +``` purescript +slot_ :: Array JSX -> JSX +``` + +#### `Props_small` + +``` purescript +type Props_small = (children :: Array JSX) +``` + +#### `small` + +``` purescript +small :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_small) => { | attrs } -> JSX +``` + +#### `small_` + +``` purescript +small_ :: Array JSX -> JSX +``` + +#### `Props_source` + +``` purescript +type Props_source = (media :: String, sizes :: String, src :: String, "type" :: String) +``` + +#### `source` + +``` purescript +source :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_source) => { | attrs } -> JSX +``` + +#### `Props_span` + +``` purescript +type Props_span = (children :: Array JSX) +``` + +#### `span` + +``` purescript +span :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_span) => { | attrs } -> JSX +``` + +#### `span_` + +``` purescript +span_ :: Array JSX -> JSX +``` + +#### `Props_strong` + +``` purescript +type Props_strong = (children :: Array JSX) +``` + +#### `strong` + +``` purescript +strong :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_strong) => { | attrs } -> JSX +``` + +#### `strong_` + +``` purescript +strong_ :: Array JSX -> JSX +``` + +#### `Props_style` + +``` purescript +type Props_style = (children :: Array JSX, media :: String, nonce :: String, title :: String, "type" :: String) +``` + +#### `style` + +``` purescript +style :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_style) => { | attrs } -> JSX +``` + +#### `style_` + +``` purescript +style_ :: Array JSX -> JSX +``` + +#### `Props_sub` + +``` purescript +type Props_sub = (children :: Array JSX) +``` + +#### `sub` + +``` purescript +sub :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sub) => { | attrs } -> JSX +``` + +#### `sub_` + +``` purescript +sub_ :: Array JSX -> JSX +``` + +#### `Props_summary` + +``` purescript +type Props_summary = (children :: Array JSX) +``` + +#### `summary` + +``` purescript +summary :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_summary) => { | attrs } -> JSX +``` + +#### `summary_` + +``` purescript +summary_ :: Array JSX -> JSX +``` + +#### `Props_sup` + +``` purescript +type Props_sup = (children :: Array JSX) +``` + +#### `sup` + +``` purescript +sup :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_sup) => { | attrs } -> JSX +``` + +#### `sup_` + +``` purescript +sup_ :: Array JSX -> JSX +``` + +#### `Props_svg` + +``` purescript +type Props_svg = (accentHeight :: String, accumulate :: String, additive :: String, alignmentBaseline :: String, allowReorder :: String, alphabetic :: String, amplitude :: String, arabicForm :: String, ascent :: String, attributeName :: String, attributeType :: String, autoReverse :: String, azimuth :: String, baseFrequency :: String, baseProfile :: String, baselineShift :: String, bbox :: String, begin :: String, bias :: String, by :: String, calcMode :: String, capHeight :: String, children :: Array JSX, clip :: String, clipPath :: String, clipPathUnits :: String, clipRule :: String, color :: String, colorInterpolation :: String, colorInterpolationFilters :: String, colorProfile :: String, colorRendering :: String, contentScriptType :: String, contentStyleType :: String, cursor :: String, cx :: String, cy :: String, d :: String, decelerate :: String, descent :: String, diffuseConstant :: String, direction :: String, display :: String, divisor :: String, dominantBaseline :: String, dur :: String, dx :: String, dy :: String, edgeMode :: String, elevation :: String, enableBackground :: String, end :: String, exponent :: String, externalResourcesRequired :: String, fill :: String, fillOpacity :: String, fillRule :: String, filter :: String, filterRes :: String, filterUnits :: String, floodColor :: String, floodOpacity :: String, focusable :: String, fontFamily :: String, fontSize :: String, fontSizeAdjust :: String, fontStretch :: String, fontStyle :: String, fontVariant :: String, fontWeight :: String, format :: String, from :: String, fx :: String, fy :: String, g1 :: String, g2 :: String, glyphName :: String, glyphOrientationHorizontal :: String, glyphOrientationVertical :: String, glyphRef :: String, gradientTransform :: String, gradientUnits :: String, hanging :: String, height :: String, horizAdvX :: String, horizOriginX :: String, ideographic :: String, imageRendering :: String, "in" :: String, in2 :: String, intercept :: String, k :: String, k1 :: String, k2 :: String, k3 :: String, k4 :: String, kernelMatrix :: String, kernelUnitLength :: String, kerning :: String, keyPoints :: String, keySplines :: String, keyTimes :: String, lengthAdjust :: String, letterSpacing :: String, lightingColor :: String, limitingConeAngle :: String, local :: String, markerEnd :: String, markerHeight :: String, markerMid :: String, markerStart :: String, markerUnits :: String, markerWidth :: String, mask :: String, maskContentUnits :: String, maskUnits :: String, mathematical :: String, mode :: String, numOctaves :: String, offset :: String, opacity :: String, operator :: String, order :: String, orient :: String, orientation :: String, origin :: String, overflow :: String, overlinePosition :: String, overlineThickness :: String, paintOrder :: String, panose1 :: String, pathLength :: String, patternContentUnits :: String, patternTransform :: String, patternUnits :: String, pointerEvents :: String, points :: String, pointsAtX :: String, pointsAtY :: String, pointsAtZ :: String, preserveAlpha :: String, preserveAspectRatio :: String, primitiveUnits :: String, r :: String, radius :: String, refX :: String, refY :: String, renderingIntent :: String, repeatCount :: String, repeatDur :: String, requiredExtensions :: String, requiredFeatures :: String, restart :: String, result :: String, rotate :: String, rx :: String, ry :: String, scale :: String, seed :: String, shapeRendering :: String, slope :: String, spacing :: String, specularConstant :: String, specularExponent :: String, speed :: String, spreadMethod :: String, startOffset :: String, stdDeviation :: String, stemh :: String, stemv :: String, stitchTiles :: String, stopColor :: String, stopOpacity :: String, strikethroughPosition :: String, strikethroughThickness :: String, string :: String, stroke :: String, strokeDasharray :: String, strokeDashoffset :: String, strokeLinecap :: String, strokeLinejoin :: String, strokeMiterlimit :: String, strokeOpacity :: String, strokeWidth :: String, surfaceScale :: String, systemLanguage :: String, tableValues :: String, targetX :: String, targetY :: String, textAnchor :: String, textDecoration :: String, textLength :: String, textRendering :: String, to :: String, transform :: String, u1 :: String, u2 :: String, underlinePosition :: String, underlineThickness :: String, unicode :: String, unicodeBidi :: String, unicodeRange :: String, unitsPerEm :: String, vAlphabetic :: String, vHanging :: String, vIdeographic :: String, vMathematical :: String, values :: String, vectorEffect :: String, version :: String, vertAdvY :: String, vertOriginX :: String, vertOriginY :: String, viewBox :: String, viewTarget :: String, visibility :: String, width :: String, widths :: String, wordSpacing :: String, writingMode :: String, x :: String, x1 :: String, x2 :: String, xChannelSelector :: String, xHeight :: String, xlinkActuate :: String, xlinkArcrole :: String, xlinkHref :: String, xlinkRole :: String, xlinkShow :: String, xlinkTitle :: String, xlinkType :: String, xmlBase :: String, xmlLang :: String, xmlSpace :: String, xmlns :: String, xmlnsXlink :: String, y :: String, y1 :: String, y2 :: String, yChannelSelector :: String, z :: String, zoomAndPan :: String) +``` + +#### `svg` + +``` purescript +svg :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_svg) => { | attrs } -> JSX +``` + +#### `svg_` + +``` purescript +svg_ :: Array JSX -> JSX +``` + +#### `Props_table` + +``` purescript +type Props_table = (children :: Array JSX, summary :: String, width :: String) +``` + +#### `table` + +``` purescript +table :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_table) => { | attrs } -> JSX +``` + +#### `table_` + +``` purescript +table_ :: Array JSX -> JSX +``` + +#### `Props_tbody` + +``` purescript +type Props_tbody = (children :: Array JSX) +``` + +#### `tbody` + +``` purescript +tbody :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tbody) => { | attrs } -> JSX +``` + +#### `tbody_` + +``` purescript +tbody_ :: Array JSX -> JSX +``` + +#### `Props_td` + +``` purescript +type Props_td = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) +``` + +#### `td` + +``` purescript +td :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_td) => { | attrs } -> JSX +``` + +#### `td_` + +``` purescript +td_ :: Array JSX -> JSX +``` + +#### `Props_template` + +``` purescript +type Props_template = (children :: Array JSX) +``` + +#### `template` + +``` purescript +template :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_template) => { | attrs } -> JSX +``` + +#### `template_` + +``` purescript +template_ :: Array JSX -> JSX +``` + +#### `Props_textarea` + +``` purescript +type Props_textarea = (autoCapitalize :: String, autoCorrect :: String, children :: Array JSX, cols :: Number, defaultValue :: String, disabled :: Boolean, form :: String, name :: String, onChange :: EventHandler, placeholder :: String, required :: Boolean, rows :: Number, value :: String, wrap :: String) +``` + +#### `textarea` + +``` purescript +textarea :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_textarea) => { | attrs } -> JSX +``` + +#### `textarea_` + +``` purescript +textarea_ :: Array JSX -> JSX +``` + +#### `Props_tfoot` + +``` purescript +type Props_tfoot = (children :: Array JSX) +``` + +#### `tfoot` + +``` purescript +tfoot :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tfoot) => { | attrs } -> JSX +``` + +#### `tfoot_` + +``` purescript +tfoot_ :: Array JSX -> JSX +``` + +#### `Props_th` + +``` purescript +type Props_th = (children :: Array JSX, headers :: String, height :: String, scope :: String, width :: String) +``` + +#### `th` + +``` purescript +th :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_th) => { | attrs } -> JSX +``` + +#### `th_` + +``` purescript +th_ :: Array JSX -> JSX +``` + +#### `Props_thead` + +``` purescript +type Props_thead = (children :: Array JSX) +``` + +#### `thead` + +``` purescript +thead :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_thead) => { | attrs } -> JSX +``` + +#### `thead_` + +``` purescript +thead_ :: Array JSX -> JSX +``` + +#### `Props_time` + +``` purescript +type Props_time = (children :: Array JSX) +``` + +#### `time` + +``` purescript +time :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_time) => { | attrs } -> JSX +``` + +#### `time_` + +``` purescript +time_ :: Array JSX -> JSX +``` + +#### `Props_title` + +``` purescript +type Props_title = (children :: Array JSX) +``` + +#### `title` + +``` purescript +title :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_title) => { | attrs } -> JSX +``` + +#### `title_` + +``` purescript +title_ :: Array JSX -> JSX +``` + +#### `Props_tr` + +``` purescript +type Props_tr = (children :: Array JSX) +``` + +#### `tr` + +``` purescript +tr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_tr) => { | attrs } -> JSX +``` + +#### `tr_` + +``` purescript +tr_ :: Array JSX -> JSX +``` + +#### `Props_track` + +``` purescript +type Props_track = (default :: Boolean, kind :: String, label :: String, src :: String) +``` + +#### `track` + +``` purescript +track :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_track) => { | attrs } -> JSX +``` + +#### `Props_u` + +``` purescript +type Props_u = (children :: Array JSX) +``` + +#### `u` + +``` purescript +u :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_u) => { | attrs } -> JSX +``` + +#### `u_` + +``` purescript +u_ :: Array JSX -> JSX +``` + +#### `Props_ul` + +``` purescript +type Props_ul = (children :: Array JSX, "type" :: String) +``` + +#### `ul` + +``` purescript +ul :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_ul) => { | attrs } -> JSX +``` + +#### `ul_` + +``` purescript +ul_ :: Array JSX -> JSX +``` + +#### `Props_var` + +``` purescript +type Props_var = (children :: Array JSX) +``` + +#### `var` + +``` purescript +var :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_var) => { | attrs } -> JSX +``` + +#### `var_` + +``` purescript +var_ :: Array JSX -> JSX +``` + +#### `Props_video` + +``` purescript +type Props_video = (children :: Array JSX, controls :: Boolean, height :: String, loop :: Boolean, muted :: Boolean, playsInline :: Boolean, poster :: String, preload :: String, src :: String, width :: String) +``` + +#### `video` + +``` purescript +video :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_video) => { | attrs } -> JSX +``` + +#### `video_` + +``` purescript +video_ :: Array JSX -> JSX +``` + +#### `Props_wbr` + +``` purescript +type Props_wbr = () +``` + +#### `wbr` + +``` purescript +wbr :: forall attrs attrs_. Union attrs attrs_ (SharedProps Props_wbr) => { | attrs } -> JSX +``` + + diff --git a/generated-docs/React/Basic/DOM/Internal.md b/generated-docs/React/Basic/DOM/Internal.md new file mode 100644 index 0000000..8594101 --- /dev/null +++ b/generated-docs/React/Basic/DOM/Internal.md @@ -0,0 +1,25 @@ +## Module React.Basic.DOM.Internal + +#### `CSS` + +``` purescript +data CSS :: Type +``` + +An abstract type representing records of CSS attributes. + +#### `SharedProps` + +``` purescript +type SharedProps specific = (key :: String, about :: String, acceptCharset :: String, accessKey :: String, allowFullScreen :: Boolean, allowTransparency :: String, autoComplete :: String, autoFocus :: String, autoPlay :: Boolean, capture :: Boolean, cellPadding :: String, cellSpacing :: String, charSet :: String, classID :: String, className :: String, colSpan :: Number, contentEditable :: String, contextMenu :: String, crossOrigin :: String, datatype :: String, dateTime :: String, dir :: String, draggable :: String, encType :: String, formAction :: String, formEncType :: String, formMethod :: String, formNoValidate :: String, formTarget :: String, frameBorder :: String, hidden :: Boolean, hrefLang :: String, htmlFor :: String, httpEquiv :: String, icon :: String, id :: String, inlist :: String, inputMode :: String, is :: String, itemID :: String, itemProp :: String, itemRef :: String, itemScope :: Boolean, itemType :: String, keyParams :: String, keyType :: String, lang :: String, marginHeight :: String, marginWidth :: String, maxLength :: String, mediaGroup :: String, minLength :: String, noValidate :: String, prefix :: String, property :: String, radioGroup :: String, readOnly :: Boolean, resource :: String, role :: String, rowSpan :: Number, scoped :: Boolean, seamless :: Boolean, security :: String, spellCheck :: String, srcDoc :: String, srcLang :: String, srcSet :: String, style :: CSS, tabIndex :: String, title :: String, typeof :: String, unselectable :: String, useMap :: String, vocab :: String, wmode :: String, onBlur :: EventHandler, onClick :: EventHandler, onFocus :: EventHandler | specific) +``` + +Standard props which are shared by all DOM elements. + +#### `unsafeCreateDOMComponent` + +``` purescript +unsafeCreateDOMComponent :: forall props. String -> ReactComponent props +``` + + diff --git a/generated-docs/React/Basic/Events.md b/generated-docs/React/Basic/Events.md new file mode 100644 index 0000000..bf41558 --- /dev/null +++ b/generated-docs/React/Basic/Events.md @@ -0,0 +1,122 @@ +## Module React.Basic.Events + +#### `EventHandler` + +``` purescript +type EventHandler = EffectFn1 SyntheticEvent Unit +``` + +An event handler, which receives a `SyntheticEvent` and performs some +effects in return. + +#### `SyntheticEvent` + +``` purescript +data SyntheticEvent :: Type +``` + +Event data that we receive from React. + +#### `EventFn` + +``` purescript +newtype EventFn a b +``` + +Encapsulates a safe event operation. `EventFn`s can be composed +to perform multiple operations. + +For example: + +```purs +input { onChange: handler (preventDefault >>> targetValue) + \value -> setState \_ -> { value } + } +``` + +##### Instances +``` purescript +Semigroupoid EventFn +Category EventFn +(IsSymbol l, Cons l (EventFn a b) fns_rest fns, Cons l b r_rest r, Lacks l fns_rest, Lacks l r_rest, Merge rest fns_rest a r_rest) => Merge (Cons l (EventFn a b) rest) fns a r +``` + +#### `unsafeEventFn` + +``` purescript +unsafeEventFn :: forall a b. (a -> b) -> EventFn a b +``` + +Unsafely create an `EventFn`. This function should be avoided as it can allow +a `SyntheticEvent` to escape its scope. Accessing a React event's properties is only +valid in a synchronous event callback. + +Instead, use the helper functions specific to your platform, such as `React.Basic.DOM.Events`. + +#### `handler` + +``` purescript +handler :: forall a. EventFn SyntheticEvent a -> (a -> Effect Unit) -> EventHandler +``` + +Create an `EventHandler`, given an `EventFn` and a callback. + +For example: + +```purs +input { onChange: handler targetValue + \value -> setState \_ -> { value } + } +``` + +#### `handler_` + +``` purescript +handler_ :: Effect Unit -> EventHandler +``` + +Create an `EventHandler` which discards the `SyntheticEvent`. + +For example: + +```purs +input { onChange: handler_ (setState \_ -> { value }) + } +``` + +#### `syntheticEvent` + +``` purescript +syntheticEvent :: EventFn SyntheticEvent SyntheticEvent +``` + +#### `merge` + +``` purescript +merge :: forall a fns fns_list r. RowToList fns fns_list => Merge fns_list fns a r => { | fns } -> EventFn a ({ | r }) +``` + +Merge multiple `EventFn` operations and collect their results. + +For example: + +```purs +input { onChange: handler (merge { targetValue, timeStamp }) + \{ targetValue, timeStamp } -> setState \_ -> { ... } + } +``` + +#### `Merge` + +``` purescript +class Merge (rl :: RowList) fns a r | rl -> fns, rl a -> r where + mergeImpl :: RLProxy rl -> { | fns } -> EventFn a ({ | r }) +``` + +##### Instances +``` purescript +Merge Nil () a () +(IsSymbol l, Cons l (EventFn a b) fns_rest fns, Cons l b r_rest r, Lacks l fns_rest, Lacks l r_rest, Merge rest fns_rest a r_rest) => Merge (Cons l (EventFn a b) rest) fns a r +``` + + From b5ebb8997009b10221884d30ec8887d1beb5f0b0 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 30 Oct 2018 10:30:29 -0600 Subject: [PATCH 21/28] Make it more difficult to run into the incompatible props bug --- examples/component/src/Container.purs | 6 +++--- examples/component/src/ToggleButton.purs | 6 +++--- .../controlled-input/src/ControlledInput.purs | 8 ++++---- examples/controlled-input/src/Main.purs | 2 +- examples/counter/src/Counter.purs | 2 +- examples/legacy-v2/src/Compat.purs | 2 +- src/React/Basic.purs | 17 ++++++++++++----- 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/examples/component/src/Container.purs b/examples/component/src/Container.purs index 19c0808..1e6e877 100644 --- a/examples/component/src/Container.purs +++ b/examples/component/src/Container.purs @@ -6,6 +6,9 @@ import React.Basic (Component, JSX, createComponent, makeStateless) import React.Basic.DOM as R import ToggleButton (toggleButton) +component :: Component Unit +component = createComponent "Container" + toggleButtonContainer :: JSX toggleButtonContainer = unit # makeStateless component \_ -> R.div @@ -14,6 +17,3 @@ toggleButtonContainer = unit # makeStateless component \_ -> , toggleButton { label: "B" } ] } - -component :: Component -component = createComponent "Container" diff --git a/examples/component/src/ToggleButton.purs b/examples/component/src/ToggleButton.purs index 2625b74..f31e258 100644 --- a/examples/component/src/ToggleButton.purs +++ b/examples/component/src/ToggleButton.purs @@ -6,6 +6,9 @@ import Effect.Console (log) import React.Basic (Component, JSX, StateUpdate(..), capture_, createComponent, make) import React.Basic.DOM as R +component :: Component Props +component = createComponent "ToggleButton" + type Props = { label :: String } @@ -37,6 +40,3 @@ toggleButton = make component ] } } - -component :: Component -component = createComponent "ToggleButton" diff --git a/examples/controlled-input/src/ControlledInput.purs b/examples/controlled-input/src/ControlledInput.purs index e8025dc..93a9f24 100644 --- a/examples/controlled-input/src/ControlledInput.purs +++ b/examples/controlled-input/src/ControlledInput.purs @@ -9,7 +9,10 @@ import React.Basic.DOM as R import React.Basic.DOM.Events (targetValue, timeStamp) import React.Basic.Events (merge) -type Props = {} +component :: Component Props +component = createComponent "ControlledInput" + +type Props = Unit data Action = ValueChanged String Number @@ -40,6 +43,3 @@ controlledInput = make component , R.p_ [ R.text ("Changed at = " <> maybe "never" show self.state.timestamp) ] ] } - -component :: Component -component = createComponent "ControlledInput" diff --git a/examples/controlled-input/src/Main.purs b/examples/controlled-input/src/Main.purs index 3e46fe3..8651738 100644 --- a/examples/controlled-input/src/Main.purs +++ b/examples/controlled-input/src/Main.purs @@ -18,5 +18,5 @@ main = do case container of Nothing -> throw "Container element not found." Just c -> - let app = controlledInput {} + let app = controlledInput unit in render app c diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index 89e88d3..0e61734 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -5,7 +5,7 @@ import Prelude import React.Basic (Component, JSX, StateUpdate(..), capture_, createComponent, make) import React.Basic.DOM as R -component :: Component +component :: Component Props component = createComponent "Counter" type Props = diff --git a/examples/legacy-v2/src/Compat.purs b/examples/legacy-v2/src/Compat.purs index 34ba33d..9a1aae0 100644 --- a/examples/legacy-v2/src/Compat.purs +++ b/examples/legacy-v2/src/Compat.purs @@ -8,7 +8,7 @@ module React.Basic.Compat import Prelude import Effect (Effect) -import React.Basic (ComponentSpec, JSX, ReactComponent, Self, StateUpdate(..), createComponent, element, elementKeyed, empty, fragment, fragmentKeyed, make, makeStateless, send, toReactComponent) +import React.Basic (JSX, ReactComponent, Self, StateUpdate(..), createComponent, element, elementKeyed, empty, fragment, make, makeStateless, send, toReactComponent) type Component = ReactComponent diff --git a/src/React/Basic.purs b/src/React/Basic.purs index 91f852d..adcd30f 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -73,7 +73,7 @@ import React.Basic.Events (EventFn, EventHandler, SyntheticEvent, handler) -- | For example: -- | -- | ```purs --- | component :: Component +-- | component :: Component Props -- | component = createComponent "Counter" -- | -- | type Props = @@ -124,7 +124,7 @@ type ComponentSpec props state initialState action = -- | The resulting component spec is usually given the simplified `Component` type: -- | -- | ```purs --- | component :: Component +-- | component :: Component Props -- | component = createComponent "Counter" -- | ``` -- | @@ -133,6 +133,13 @@ type ComponentSpec props state initialState action = -- | `JSX` tree is a valid update, or if it needs to be replaced entirely -- | (expensive and clears component state lower in the tree). -- | +-- | __*Note:* A specific type for the props in `Component props` should always be chosen at this point. +-- | It's technically possible to declare the component with `forall props. Component props` +-- | but doing so is unsafe. Leaving the prop type open allows the use of a single `Component` +-- | definition in multiple React-Basic components that may have different prop types. Because +-- | component lifecycles are managed by React, it's possible for incompatible prop values to +-- | be passed into a lifecycle function.__ +-- | -- | __*Note:* A `Component` is *not* a valid React component by itself. If you would like to use -- | a React-Basic component from JavaScript, use `toReactComponent`.__ -- | @@ -150,7 +157,7 @@ createComponent = -- | A simplified alias for `ComponentSpec`. This type is usually used to represent -- | the default component type returned from `createComponent`. -type Component = forall props state action. ComponentSpec props state Unit action +type Component props = forall state action. ComponentSpec props state Unit action -- | Opaque component information for internal use. -- | @@ -258,7 +265,7 @@ foreign import readState :: forall props state action. Self props state action - -- | This is where you will want to provide customized implementations: -- | -- | ```purs --- | component :: Component +-- | component :: Component Props -- | component = createComponent "Counter" -- | -- | type Props = @@ -294,7 +301,7 @@ foreign import make -- | Makes stateless component definition slightly less verbose: -- | -- | ```purs --- | component :: Component +-- | component :: Component Props -- | component = createComponent "Xyz" -- | -- | myComponent :: Props -> JSX From c17cdf360eefcc32de2af556798e022ef61e32d1 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 30 Oct 2018 12:04:00 -0600 Subject: [PATCH 22/28] Use Union instead of Record update --- examples/component/src/ToggleButton.purs | 6 +- .../controlled-input/src/ControlledInput.purs | 6 +- examples/counter/src/Counter.purs | 11 +- examples/legacy-v2/src/Compat.purs | 12 +- src/React/Basic.js | 132 +++++++++--------- src/React/Basic.purs | 74 ++++------ 6 files changed, 114 insertions(+), 127 deletions(-) diff --git a/examples/component/src/ToggleButton.purs b/examples/component/src/ToggleButton.purs index f31e258..49430ae 100644 --- a/examples/component/src/ToggleButton.purs +++ b/examples/component/src/ToggleButton.purs @@ -18,18 +18,18 @@ data Action toggleButton :: Props -> JSX toggleButton = make component - { initialState = + { initialState: { on: false } - , update = \self -> case _ of + , update: \self -> case _ of Toggle -> UpdateAndSideEffects self.state { on = not self.state.on } \nextSelf -> do log $ "next state: " <> show nextSelf.state - , render = \self -> + , render: \self -> R.button { onClick: capture_ self Toggle , children: diff --git a/examples/controlled-input/src/ControlledInput.purs b/examples/controlled-input/src/ControlledInput.purs index 93a9f24..7824483 100644 --- a/examples/controlled-input/src/ControlledInput.purs +++ b/examples/controlled-input/src/ControlledInput.purs @@ -19,19 +19,19 @@ data Action controlledInput :: Props -> JSX controlledInput = make component - { initialState = + { initialState: { value: "hello world" , timestamp: Nothing } - , update = \self -> case _ of + , update: \self -> case _ of ValueChanged value timestamp -> Update self.state { value = value , timestamp = Just timestamp } - , render = \self -> + , render: \self -> React.fragment [ R.input { onChange: diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index 0e61734..cbea449 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -2,6 +2,7 @@ module Counter where import Prelude + import React.Basic (Component, JSX, StateUpdate(..), capture_, createComponent, make) import React.Basic.DOM as R @@ -16,16 +17,16 @@ data Action = Increment counter :: Props -> JSX -counter = make component - { initialState = { counter: 0, dummy: 0 } +counter = make component { initialState, update, render } + where + initialState = { counter: 0, dummy: 0 } - , update = \self -> case _ of + update self = case _ of Increment -> Update self.state { counter = self.state.counter + 1 } - , render = \self -> + render self = R.button { onClick: capture_ self Increment , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] } - } diff --git a/examples/legacy-v2/src/Compat.purs b/examples/legacy-v2/src/Compat.purs index 9a1aae0..30a32cc 100644 --- a/examples/legacy-v2/src/Compat.purs +++ b/examples/legacy-v2/src/Compat.purs @@ -23,11 +23,11 @@ component -> ReactComponent { | props } component { displayName, initialState, receiveProps, render } = toReactComponent identity (createComponent displayName) - { initialState = initialState - , didMount = receiveProps <<< selfToLegacySelf - , didUpdate = receiveProps <<< selfToLegacySelf - , update = \self stateUpdate -> Update (stateUpdate self.state) - , render = render <<< selfToLegacySelf + { initialState: initialState + , didMount: receiveProps <<< selfToLegacySelf + , didUpdate: receiveProps <<< selfToLegacySelf + , update: \self stateUpdate -> Update (stateUpdate self.state) + , render: render <<< selfToLegacySelf } where selfToLegacySelf self@{ props, state } = @@ -45,5 +45,5 @@ stateless -> ReactComponent { | props } stateless { displayName, render } = toReactComponent identity (createComponent displayName) - { render = \self -> render self.props + { render: \self -> render self.props } diff --git a/src/React/Basic.js b/src/React/Basic.js index 6caa306..e4a4b51 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -3,28 +3,7 @@ var React = require("react"); var Fragment = React.Fragment || "div"; -exports.createComponent_ = function(defaultUpdate) { - var defaultInitialState = null; - var defaultShouldUpdate = function() { - return function() { - return function() { - return true; - }; - }; - }; - var defaultDidMount = function() { - return function() {}; - }; - var defaultDidUpdate = function() { - return function() {}; - }; - var defaultWillUnmount = function() { - return function() {}; - }; - var defaultRender = function() { - return false; - }; - +exports.createComponent = (function() { // Begin component prototype functions // (`this`-dependent, defined outside `createComponent` // for a slight performance boost) @@ -39,7 +18,7 @@ exports.createComponent_ = function(defaultUpdate) { function shouldComponentUpdate(nextProps, nextState) { var shouldUpdate = this.$$spec.shouldUpdate; - return shouldUpdate === defaultShouldUpdate + return shouldUpdate === undefined ? true : shouldUpdate(this.toSelf())(nextProps.$$props)( nextState === null ? null : nextState.$$state @@ -48,14 +27,14 @@ exports.createComponent_ = function(defaultUpdate) { function componentDidMount() { var didMount = this.$$spec.didMount; - if (didMount !== defaultDidMount) { - this.$$spec.didMount(this.toSelf())(); + if (didMount !== undefined) { + didMount(this.toSelf())(); } } function componentDidUpdate() { var didUpdate = this.$$spec.didUpdate; - if (didUpdate !== defaultDidUpdate) { + if (didUpdate !== undefined) { didUpdate(this.toSelf())(); } } @@ -63,7 +42,7 @@ exports.createComponent_ = function(defaultUpdate) { function componentWillUnmount() { this.$$mounted = false; var willUnmount = this.$$spec.willUnmount; - if (willUnmount !== defaultWillUnmount) { + if (willUnmount !== undefined) { willUnmount(this.toSelf())(); } } @@ -81,7 +60,7 @@ exports.createComponent_ = function(defaultUpdate) { // React may optimize components with no state, // so we leave state null if it was left as // the default value. - this.$$spec.initialState === defaultInitialState + this.$$spec.initialState === undefined ? null : { $$state: this.$$spec.initialState }; return this; @@ -89,6 +68,7 @@ exports.createComponent_ = function(defaultUpdate) { Component.displayName = displayName; Component.prototype = Object.create(React.Component.prototype); + Component.prototype.constructor = Component; Component.prototype.toSelf = toSelf; Component.prototype.shouldComponentUpdate = shouldComponentUpdate; Component.prototype.componentDidMount = componentDidMount; @@ -96,18 +76,9 @@ exports.createComponent_ = function(defaultUpdate) { Component.prototype.componentWillUnmount = componentWillUnmount; Component.prototype.render = render; - return { - $$type: Component, - initialState: defaultInitialState, - shouldUpdate: defaultShouldUpdate, - didMount: defaultDidMount, - didUpdate: defaultDidUpdate, - willUnmount: defaultWillUnmount, - update: defaultUpdate, - render: defaultRender - }; + return Component; }; -}; +})(); exports.send_ = function(buildStateUpdate) { return function(self, action) { @@ -115,6 +86,10 @@ exports.send_ = function(buildStateUpdate) { exports.warningUnmountedComponentAction(self, action); return; } + if (self.instance_.$$spec.update === undefined) { + exports.warningDefaultUpdate(self, action); + return; + } var sideEffects = null; self.instance_.setState( function(s) { @@ -150,13 +125,26 @@ exports.readState = function(self) { return state === null ? null : state.$$state; }; -exports.make = function($$spec) { - return function($$props) { - var props = { - $$props: $$props, - $$spec: $$spec +exports.make = function(_unionDict) { + return function($$type) { + return function($$spec) { + var $$specPadded = { + initialState: $$spec.initialState, + update: $$spec.update, + render: $$spec.render, + shouldUpdate: $$spec.shouldUpdate, + didMount: $$spec.didMount, + didUpdate: $$spec.didUpdate, + willUnmount: $$spec.willUnmount + }; + return function($$props) { + var props = { + $$props: $$props, + $$spec: $$specPadded + }; + return React.createElement($$type, props); + }; }; - return React.createElement($$spec.$$type, props); }; }; @@ -179,32 +167,48 @@ exports.fragment = function(children) { return React.createElement.apply(null, [Fragment, {}].concat(children)); }; -exports.displayNameFromComponentSpec = function($$spec) { - return $$spec.$$type.displayName || "[unknown]"; +exports.displayNameFromComponent = function($$type) { + return $$type.displayName || "[unknown]"; }; exports.displayNameFromSelf = function(self) { - return exports.displayNameFromComponentSpec(self.instance_.$$spec); + return exports.displayNameFromComponent(self.instance_.prototype.constructor); }; -exports.toReactComponent_ = function(fromJSProps, $$spec) { - var Component = function constructor() { - return this; - }; - - Component.prototype = Object.create(React.Component.prototype); - - Component.displayName = $$spec.$$type.displayName + " (Wrapper)"; - - Component.prototype.render = function() { - var props = { - $$props: fromJSProps(this.props), - $$spec: $$spec +exports.toReactComponent = function(_unionDict) { + return function(fromJSProps) { + return function($$type) { + return function($$spec) { + var $$specPadded = { + initialState: $$spec.initialState, + update: $$spec.update, + render: $$spec.render, + shouldUpdate: $$spec.shouldUpdate, + didMount: $$spec.didMount, + didUpdate: $$spec.didUpdate, + willUnmount: $$spec.willUnmount + }; + + var Component = function constructor() { + return this; + }; + + Component.prototype = Object.create(React.Component.prototype); + + Component.displayName = $$type.displayName + " (Wrapper)"; + + Component.prototype.render = function() { + var props = { + $$props: fromJSProps(this.props), + $$spec: $$specPadded + }; + return React.createElement($$type, props); + }; + + return Component; + }; }; - return React.createElement($$spec.$$type, props); }; - - return Component; }; exports.warningDefaultUpdate = function(self, action) { diff --git a/src/React/Basic.purs b/src/React/Basic.purs index adcd30f..b6bae67 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -2,7 +2,6 @@ module React.Basic ( ComponentSpec , createComponent , Component - , ComponentType , StateUpdate(..) , Self , send @@ -21,6 +20,8 @@ module React.Basic , fragment , element , elementKeyed + , displayNameFromComponent + , displayNameFromSelf , ReactComponent , ReactComponentInstance , toReactComponent @@ -29,13 +30,14 @@ module React.Basic import Prelude import Data.Either (Either(..)) -import Data.Function.Uncurried (Fn2, Fn1, runFn1, runFn2) +import Data.Function.Uncurried (Fn1, Fn2, runFn1, runFn2) import Data.Nullable (Nullable, notNull, null) import Effect (Effect) import Effect.Aff (Aff, Error, runAff_) import Effect.Uncurried (EffectFn2, runEffectFn2) import React.Basic.DOM.Events (preventDefault, stopPropagation) import React.Basic.Events (EventFn, EventHandler, SyntheticEvent, handler) +import Type.Row (class Union) -- | `ComponentSpec` represents a React-Basic component implementation. -- | @@ -104,20 +106,16 @@ import React.Basic.Events (EventFn, EventHandler, SyntheticEvent, handler) -- | __*Note:* A `ComponentSpec` is *not* a valid React component by itself. If you would like to use -- | a React-Basic component from JavaScript, use `toReactComponent`.__ -- | --- | __*Note:* `$$type` is for internal use only. It needs to be on the type to --- | preserve its existence during a record update, as in the example above.__ --- | -- | __*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ -type ComponentSpec props state initialState action = - { initialState :: initialState +type ComponentSpec props state action = + ( initialState :: state , update :: Self props state action -> action -> StateUpdate props state action , render :: Self props state action -> JSX , shouldUpdate :: Self props state action -> props -> state -> Boolean , didMount :: Self props state action -> Effect Unit , didUpdate :: Self props state action -> Effect Unit , willUnmount :: Self props state action -> Effect Unit - , "$$type" :: ComponentType props state action - } + ) -- | Creates a `ComponentSpec` with a given Display Name. -- | @@ -144,20 +142,14 @@ type ComponentSpec props state initialState action = -- | a React-Basic component from JavaScript, use `toReactComponent`.__ -- | -- | __*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ -createComponent - :: forall props state action +foreign import createComponent + :: forall props . String - -> ComponentSpec props state Unit action -createComponent = - runFn1 - createComponent_ - (\_ action -> - SideEffects \self -> do - runEffectFn2 warningDefaultUpdate self action) + -> Component props -- | A simplified alias for `ComponentSpec`. This type is usually used to represent -- | the default component type returned from `createComponent`. -type Component props = forall state action. ComponentSpec props state Unit action +-- type Component props = forall state action. ComponentSpec props state action -- | Opaque component information for internal use. -- | @@ -165,7 +157,7 @@ type Component props = forall state action. ComponentSpec props state Unit actio -- | identify the component. It receives the `ComponentSpec` as a prop and knows -- | how to defer behavior to it. It requires very specific props and is not useful by -- | itself from JavaScript. For JavaScript interop, see `toReactComponent`.__ -data ComponentType props state action +data Component props -- | Used by the `update` function to describe the kind of state update and/or side -- | effects desired. @@ -293,8 +285,10 @@ foreign import readState :: forall props state action. Self props state action - -- | -- | __*See also:* `makeStateless`, `createComponent`, `Component`, `ComponentSpec`__ foreign import make - :: forall props state action - . ComponentSpec props state state action + :: forall spec spec_ props state action + . Union spec spec_ (ComponentSpec props state action) + => Component props + -> { render :: Self props state action -> JSX | spec } -> props -> JSX @@ -316,12 +310,12 @@ foreign import make -- | __*See also:* `make`, `createComponent`, `Component`, `ComponentSpec`__ makeStateless :: forall props - . ComponentSpec props Unit Unit Unit + . Component props -> (props -> JSX) -> props -> JSX makeStateless component render = - make component { render = \self -> render self.props } + make component { render: \self -> render self.props } -- | Represents rendered React VDOM (the result of calling `React.createElement` -- | in JavaScript). @@ -393,15 +387,15 @@ elementKeyed = runFn2 elementKeyed_ -- | error messages in logs. -- | -- | __*See also:* `displayNameFromSelf`, `createComponent`__ -foreign import displayNameFromComponentSpec - :: forall props state initialState action - . ComponentSpec props state initialState action +foreign import displayNameFromComponent + :: forall props + . Component props -> String -- | Retrieve the Display Name from a `Self`. Useful for debugging and improving -- | error messages in logs. -- | --- | __*See also:* `displayNameFromComponentSpec`, `createComponent`__ +-- | __*See also:* `displayNameFromComponent`, `createComponent`__ foreign import displayNameFromSelf :: forall props state action . Self props state action @@ -431,24 +425,19 @@ data ReactComponentInstance -- | and applying any type classes to the `props`.__ -- | -- | __*See also:* `ReactComponent`__ -toReactComponent - :: forall jsProps props state action - . ({ | jsProps } -> props) - -> ComponentSpec props state state action +foreign import toReactComponent + :: forall spec spec_ jsProps props state action + . Union spec spec_ (ComponentSpec props state action) + => ({ | jsProps } -> props) + -> Component props + -> { render :: Self props state action -> JSX | spec } -> ReactComponent { | jsProps } -toReactComponent = runFn2 toReactComponent_ -- | -- | Internal utility or FFI functions -- | -foreign import createComponent_ - :: forall props state action - . Fn1 - (Self props state action -> action -> StateUpdate props state action) - (String -> ComponentSpec props state Unit action) - buildStateUpdate :: forall props state action . StateUpdate props state action @@ -515,10 +504,3 @@ foreign import warningFailedAsyncAction (Self props state action) Error Unit - -foreign import toReactComponent_ - :: forall jsProps props state action - . Fn2 - ({ | jsProps } -> props) - (ComponentSpec props state state action) - (ReactComponent { | jsProps }) From 5fc857b618a507fd14be821437ba2be9c87f0d10 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 30 Oct 2018 13:33:22 -0600 Subject: [PATCH 23/28] Fix displayNameFromSelf --- src/React/Basic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/React/Basic.js b/src/React/Basic.js index e4a4b51..2ffd725 100644 --- a/src/React/Basic.js +++ b/src/React/Basic.js @@ -172,7 +172,7 @@ exports.displayNameFromComponent = function($$type) { }; exports.displayNameFromSelf = function(self) { - return exports.displayNameFromComponent(self.instance_.prototype.constructor); + return exports.displayNameFromComponent(self.instance_.constructor); }; exports.toReactComponent = function(_unionDict) { From 546ed40c932bf1b71307bca59df6dd6ea9902d5a Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Fri, 2 Nov 2018 12:04:41 -0600 Subject: [PATCH 24/28] Export Compat module --- {examples/legacy-v2/src => src/React/Basic}/Compat.purs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename {examples/legacy-v2/src => src/React/Basic}/Compat.purs (79%) diff --git a/examples/legacy-v2/src/Compat.purs b/src/React/Basic/Compat.purs similarity index 79% rename from examples/legacy-v2/src/Compat.purs rename to src/React/Basic/Compat.purs index 30a32cc..f450a45 100644 --- a/examples/legacy-v2/src/Compat.purs +++ b/src/React/Basic/Compat.purs @@ -2,13 +2,14 @@ module React.Basic.Compat ( Component , component , stateless - , module React.Basic + , module CompatibleTypes ) where import Prelude import Effect (Effect) -import React.Basic (JSX, ReactComponent, Self, StateUpdate(..), createComponent, element, elementKeyed, empty, fragment, make, makeStateless, send, toReactComponent) +import React.Basic (ReactComponent, StateUpdate(..), createComponent, send, toReactComponent) +import React.Basic (JSX, element, elementKeyed, empty, fragment, keyed) as CompatibleTypes type Component = ReactComponent @@ -18,7 +19,7 @@ component . { displayName :: String , initialState :: { | state } , receiveProps :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> Effect Unit - , render :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> JSX + , render :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> CompatibleTypes.JSX } -> ReactComponent { | props } component { displayName, initialState, receiveProps, render } = @@ -40,7 +41,7 @@ component { displayName, initialState, receiveProps, render } = stateless :: forall props . { displayName :: String - , render :: { | props } -> JSX + , render :: { | props } -> CompatibleTypes.JSX } -> ReactComponent { | props } stateless { displayName, render } = From 9e7f20510f27d566b1aa3b1d2b6bd372701d5bb6 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Mon, 5 Nov 2018 15:59:22 -0800 Subject: [PATCH 25/28] Remove unused state in counter example --- examples/counter/src/Counter.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index cbea449..cdac4cb 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -19,7 +19,7 @@ data Action counter :: Props -> JSX counter = make component { initialState, update, render } where - initialState = { counter: 0, dummy: 0 } + initialState = { counter: 0 } update self = case _ of Increment -> From 8e160278e2c878246b8edd6f71ed9709db9fa085 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 6 Nov 2018 14:53:52 -0800 Subject: [PATCH 26/28] Docs --- README.md | 56 ++------- {generated-docs => docs}/React/Basic.md | 94 ++++++++------ docs/React/Basic/Compat.md | 112 +++++++++++++++++ {generated-docs => docs}/React/Basic/DOM.md | 0 .../Basic/DOM/Components/GlobalEvents.md | 64 ++++++++++ .../Basic/DOM/Components/LogLifecycles.md | 9 ++ docs/React/Basic/DOM/Components/Ref.md | 28 +++++ .../React/Basic/DOM/Events.md | 0 .../React/Basic/DOM/Generated.md | 0 .../React/Basic/DOM/Internal.md | 0 .../React/Basic/Events.md | 0 examples/counter/src/Counter.purs | 1 - src/React/Basic.purs | 45 +++---- .../Basic/DOM/Components/GlobalEvents.js | 90 ++++++++++++++ .../Basic/DOM/Components/GlobalEvents.purs | 117 ++++++++++++++++++ .../Basic/DOM/Components/LogLifecycles.js | 38 ++++++ .../Basic/DOM/Components/LogLifecycles.purs | 11 ++ src/React/Basic/DOM/Components/Ref.js | 39 ++++++ src/React/Basic/DOM/Components/Ref.purs | 36 ++++++ 19 files changed, 637 insertions(+), 103 deletions(-) rename {generated-docs => docs}/React/Basic.md (78%) create mode 100644 docs/React/Basic/Compat.md rename {generated-docs => docs}/React/Basic/DOM.md (100%) create mode 100644 docs/React/Basic/DOM/Components/GlobalEvents.md create mode 100644 docs/React/Basic/DOM/Components/LogLifecycles.md create mode 100644 docs/React/Basic/DOM/Components/Ref.md rename {generated-docs => docs}/React/Basic/DOM/Events.md (100%) rename {generated-docs => docs}/React/Basic/DOM/Generated.md (100%) rename {generated-docs => docs}/React/Basic/DOM/Internal.md (100%) rename {generated-docs => docs}/React/Basic/Events.md (100%) create mode 100644 src/React/Basic/DOM/Components/GlobalEvents.js create mode 100644 src/React/Basic/DOM/Components/GlobalEvents.purs create mode 100644 src/React/Basic/DOM/Components/LogLifecycles.js create mode 100644 src/React/Basic/DOM/Components/LogLifecycles.purs create mode 100644 src/React/Basic/DOM/Components/Ref.js create mode 100644 src/React/Basic/DOM/Components/Ref.purs diff --git a/README.md b/README.md index be55df5..ca45c7c 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,16 @@ [![Build Status](https://travis-ci.org/lumihq/purescript-react-basic.svg?branch=master)](https://travis-ci.org/lumihq/purescript-react-basic) -This package implements an opinionated set of bindings to the React library, optimizing for the most basic use cases. +This package implements an opinionated set of bindings over [React](https://reactjs.org), optimizing for correctness and simplifying basic use cases. ## Features - All React DOM elements and attributes are supported (soon, events are a work in progress). -- An intuitive API for specifying props - no arrays of key value pairs, just records. +- An intuitive API for specifying props - simple records, no arrays of key value pairs. - Attributes are optional, but type-checked. It is a type error to specify `href` as an integer, for example. +- An action/update pattern for local component state, inspired by [ReasonReact](https://reasonml.github.io/reason-react/). +- React lifecycles are available, but not in your way when you don't need them. +- Typeclasses, like `Eq props`, can be used in component definitions. ## Getting Started @@ -18,49 +21,12 @@ You can install this package using Bower: bower install git@github.com:lumihq/purescript-react-basic.git ``` -Here is an example component which renders a label read from props along with a counter: +See [the documentation](https://pursuit.purescript.org/packages/purescript-react-basic/docs/React.Basic) for a detailed overview, or take a look at one of the examples: -```purescript -module Counter where +- [A Counter](./examples/counter/src/Counter.purs) +- [A controlled input](./examples/controlled-input/src/ControlledInput.purs) +- [Components](./examples/component/src/ToggleButton.purs) in [components](./examples/component/src/Container.purs) -import Prelude +## Migrating to v4 from v2 or v3 -import React.Basic as React -import React.Basic.DOM as R -import React.Basic.Events as Events - --- The props for the component -type Props = - { label :: String - } - --- Create a component by passing a record to the `react` function. --- The `render` function takes the props and current state, as well as a --- state update callback, and produces a document. -component :: React.Component Props -component = React.component { displayName: "Counter", initialState, receiveProps, render } - where - initialState = - { counter: 0 - } - - receiveProps _ = - pure unit - - render { props, state, setState } = - R.button - { onClick: Events.handler_ do - setState \s -> s { counter = s.counter + 1 } - , children: [ R.text (props.label <> ": " <> show state.counter) ] - } -``` - -This component can be used directly from JavaScript. For example, if you are using `purs-loader`: - -```jsx -import {example as Example} from 'React.Basic.Example.purs'; - -const myComponent = () => ( - -); -``` +v4 includes a new (but deprecated) module, `React.Basic.Compat`. It matches most of the old API and types (except `setStateThen` and `isFirstMount`) to make upgrading easier and more gradual. You can find `^import\sReact\.Basic\b` and replace with `import React.Basic.Compat`, upgrade the package version, and proceed from there one component at a time (or only new components). See the documentation link above for more info on the v4 API. diff --git a/generated-docs/React/Basic.md b/docs/React/Basic.md similarity index 78% rename from generated-docs/React/Basic.md rename to docs/React/Basic.md index 2832ee1..4632e99 100644 --- a/generated-docs/React/Basic.md +++ b/docs/React/Basic.md @@ -3,7 +3,7 @@ #### `ComponentSpec` ``` purescript -type ComponentSpec props state initialState action = { initialState :: initialState, update :: Self props state action -> action -> StateUpdate props state action, render :: Self props state action -> JSX, shouldUpdate :: Self props state action -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: Self props state action -> Effect Unit, "$$type" :: ComponentType props state action } +type ComponentSpec props state action = (initialState :: state, update :: Self props state action -> action -> StateUpdate props state action, render :: Self props state action -> JSX, shouldUpdate :: Self props state action -> props -> state -> Boolean, didMount :: Self props state action -> Effect Unit, didUpdate :: Self props state action -> Effect Unit, willUnmount :: Self props state action -> Effect Unit) ``` `ComponentSpec` represents a React-Basic component implementation. @@ -13,7 +13,7 @@ with specific implementations. None are required to be overridden, unless an overridden function interacts with `state`, in which case `initialState` is required (the compiler enforces this). While you _can_ use `state` and dispatch actions without defining `update`, doing so doesn't make much sense -so the default `update` implementation will emit a warning. +and will emit a warning. - `initialState` - The component's starting state. @@ -26,7 +26,7 @@ so the default `update` implementation will emit a warning. - `render` - Takes a current snapshot of the component (`Self`) and converts it to renderable `JSX`. - `shouldUpdate` - - Can be useful for occasional performance optimizations. Rarely necessary. + - Can be useful for performance optimizations. Rarely necessary. - `didMount` - The React component's `componentDidMount` lifecycle. Useful for initiating an action on first mount, such as fetching data from a server. - `didUpdate` @@ -35,14 +35,13 @@ so the default `update` implementation will emit a warning. - The React component's `componentWillUpdate` lifecycle. Any subscriptions or timers created in `didMount` or `didUpdate` should be disposed of here. The component spec is generally not exported from your component -module and this type is rarely used explicitly. The simplified alias -`Component` is usually sufficient, and `make` will validate whether -your component's types line up. +module and this type is rarely used explicitly. `make` will validate whether +your component's internal types line up. For example: ```purs -component :: Component +component :: Component Props component = createComponent "Counter" type Props = @@ -53,14 +52,14 @@ data Action = Increment counter :: Props -> JSX -counter = make component +counter: make component { initialState = { counter: 0 } - , update = \self action -> case action of + , update: \self action -> case action of Increment -> Update self.state { counter = self.state.counter + 1 } - , render = \self -> + , render: \self -> R.button { onClick: capture_ self Increment , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] @@ -73,53 +72,54 @@ This example component overrides `initialState`, `update`, and `render`. __*Note:* A `ComponentSpec` is *not* a valid React component by itself. If you would like to use a React-Basic component from JavaScript, use `toReactComponent`.__ -__*Note:* `$$type` is for internal use only. It needs to be on the type to - preserve its existence during a record update, as in the example above.__ - __*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ #### `createComponent` ``` purescript -createComponent :: forall props state action. String -> ComponentSpec props state Unit action +createComponent :: forall props. String -> Component props ``` -Creates a `ComponentSpec` with a given Display Name. +Creates a `Component` with a given Display Name. The resulting component spec is usually given the simplified `Component` type: ```purs -component :: Component +component :: Component Props component = createComponent "Counter" ``` This function should be used at the module level and considered side effecting. This is because React uses referential equality when deciding whether a new -`JSX` tree is a valid update, or if it needs to be replaced entirely +`JSX` tree is a valid update or if it needs to be replaced entirely (expensive and clears component state lower in the tree). +__*Note:* A specific type for the props in `Component props` should always be chosen at this point. + It's technically possible to declare the component with `forall props. Component props` + but doing so is unsafe. Leaving the prop type open allows the use of a single `Component` + definition in multiple React-Basic components that may have different prop types. Because + component lifecycles are managed by React, it becomes possible for incompatible prop values to + be passed by React into lifecycle functions.__ + __*Note:* A `Component` is *not* a valid React component by itself. If you would like to use a React-Basic component from JavaScript, use `toReactComponent`.__ -__*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ +__*See also:* `Component`, `make`, `makeStateless`__ #### `Component` ``` purescript -type Component = forall props state action. ComponentSpec props state Unit action +data Component props ``` A simplified alias for `ComponentSpec`. This type is usually used to represent the default component type returned from `createComponent`. - -#### `ComponentType` - -``` purescript -data ComponentType props state action -``` - Opaque component information for internal use. +__*Note:* Never define a component with + a less specific type for `props` than its associated `ComponentSpec` and `make` + calls, as this can lead to unsafe interactions with React's lifecycle management.__ + __*For the curious:* This is the "class" React will use to render and identify the component. It receives the `ComponentSpec` as a prop and knows how to defer behavior to it. It requires very specific props and is not useful by @@ -138,7 +138,7 @@ data StateUpdate props state action Used by the `update` function to describe the kind of state update and/or side effects desired. -__*See also:* `ComponentSpec`__ +__*See also:* `ComponentSpec`, `capture`__ #### `Self` @@ -255,14 +255,14 @@ __*See also:* `Self`__ #### `make` ``` purescript -make :: forall props state action. ComponentSpec props state state action -> props -> JSX +make :: forall spec spec_ props state action. Union spec spec_ (ComponentSpec props state action) => Component props -> { render :: Self props state action -> JSX | spec } -> props -> JSX ``` -Turn a `Component` into a usable render function. +Turn a `Component` and `ComponentSpec` into a usable render function. This is where you will want to provide customized implementations: ```purs -component :: Component +component :: Component Props component = createComponent "Counter" type Props = @@ -274,13 +274,13 @@ data Action counter :: Props -> JSX counter = make component - { initialState = { counter: 0 } + { initialState: { counter: 0 } - , update = \self action -> case action of + , update: \self action -> case action of Increment -> Update self.state { counter = self.state.counter + 1 } - , render = \self -> + , render: \self -> R.button { onClick: capture_ self Increment , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] @@ -293,13 +293,13 @@ __*See also:* `makeStateless`, `createComponent`, `Component`, `ComponentSpec`__ #### `makeStateless` ``` purescript -makeStateless :: forall props. ComponentSpec props Unit Unit Unit -> (props -> JSX) -> props -> JSX +makeStateless :: forall props. Component props -> (props -> JSX) -> props -> JSX ``` Makes stateless component definition slightly less verbose: ```purs -component :: Component +component :: Component Props component = createComponent "Xyz" myComponent :: Props -> JSX @@ -398,6 +398,28 @@ imported from FFI. __*See also:* `ReactComponent`, `element`, React's documentation regarding the special `key` prop__ +#### `displayNameFromComponent` + +``` purescript +displayNameFromComponent :: forall props. Component props -> String +``` + +Retrieve the Display Name from a `ComponentSpec`. Useful for debugging and improving +error messages in logs. + +__*See also:* `displayNameFromSelf`, `createComponent`__ + +#### `displayNameFromSelf` + +``` purescript +displayNameFromSelf :: forall props state action. Self props state action -> String +``` + +Retrieve the Display Name from a `Self`. Useful for debugging and improving +error messages in logs. + +__*See also:* `displayNameFromComponent`, `createComponent`__ + #### `ReactComponent` ``` purescript @@ -426,7 +448,7 @@ caution. #### `toReactComponent` ``` purescript -toReactComponent :: forall jsProps props state action. ({ | jsProps } -> props) -> ComponentSpec props state state action -> ReactComponent { | jsProps } +toReactComponent :: forall spec spec_ jsProps props state action. Union spec spec_ (ComponentSpec props state action) => ({ | jsProps } -> props) -> Component props -> { render :: Self props state action -> JSX | spec } -> ReactComponent { | jsProps } ``` Convert a React-Basic `ComponentSpec` to a JavaScript-friendly React component. diff --git a/docs/React/Basic/Compat.md b/docs/React/Basic/Compat.md new file mode 100644 index 0000000..0137610 --- /dev/null +++ b/docs/React/Basic/Compat.md @@ -0,0 +1,112 @@ +## Module React.Basic.Compat + +#### `Component` + +``` purescript +type Component = ReactComponent +``` + +#### `component` + +``` purescript +component :: forall props state. { displayName :: String, initialState :: { | state }, receiveProps :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> Effect Unit, render :: { props :: { | props }, state :: { | state }, setState :: ({ | state } -> { | state }) -> Effect Unit } -> JSX } -> ReactComponent { | props } +``` + +Supports a common subset of the v2 API to ease the upgrade process + +#### `stateless` + +``` purescript +stateless :: forall props. { displayName :: String, render :: { | props } -> JSX } -> ReactComponent { | props } +``` + +Supports a common subset of the v2 API to ease the upgrade process + + +### Re-exported from React.Basic: + +#### `JSX` + +``` purescript +data JSX :: Type +``` + +Represents rendered React VDOM (the result of calling `React.createElement` +in JavaScript). + +`JSX` is a `Monoid`: + +- `append` + - Merge two `JSX` nodes using `React.Fragment`. +- `mempty` + - The `empty` node; renders nothing. + +__*Hint:* Many useful utility functions already exist for Monoids. For example, + `guard` can be used to conditionally render a subtree of components.__ + +##### Instances +``` purescript +Semigroup JSX +Monoid JSX +``` + +#### `keyed` + +``` purescript +keyed :: String -> JSX -> JSX +``` + +Apply a React key to a subtree. React-Basic usually hides React's warning about +using `key` props on components in an Array, but keys are still important for +any dynamic lists of child components. + +__*See also:* React's documentation regarding the special `key` prop__ + +#### `fragment` + +``` purescript +fragment :: Array JSX -> JSX +``` + +Render an Array of children without a wrapping component. + +__*See also:* `JSX`__ + +#### `empty` + +``` purescript +empty :: JSX +``` + +An empty `JSX` node. This is often useful when you would like to conditionally +show something, but you don't want to (or can't) modify the `children` prop +on the parent node. + +__*See also:* `JSX`, Monoid `guard`__ + +#### `elementKeyed` + +``` purescript +elementKeyed :: forall props. ReactComponent { | props } -> { key :: String | props } -> JSX +``` + +Create a `JSX` node from a `ReactComponent`, by providing the props and a key. + +This function is for non-React-Basic React components, such as those +imported from FFI. + +__*See also:* `ReactComponent`, `element`, React's documentation regarding the special `key` prop__ + +#### `element` + +``` purescript +element :: forall props. ReactComponent { | props } -> { | props } -> JSX +``` + +Create a `JSX` node from a `ReactComponent`, by providing the props. + +This function is for non-React-Basic React components, such as those +imported from FFI. + +__*See also:* `ReactComponent`, `elementKeyed`__ + diff --git a/generated-docs/React/Basic/DOM.md b/docs/React/Basic/DOM.md similarity index 100% rename from generated-docs/React/Basic/DOM.md rename to docs/React/Basic/DOM.md diff --git a/docs/React/Basic/DOM/Components/GlobalEvents.md b/docs/React/Basic/DOM/Components/GlobalEvents.md new file mode 100644 index 0000000..bb945fa --- /dev/null +++ b/docs/React/Basic/DOM/Components/GlobalEvents.md @@ -0,0 +1,64 @@ +## Module React.Basic.DOM.Components.GlobalEvents + +These helper components register and unregister event callbacks +using React's the lifecycle callbacks. They're useful for +declaratively defining global behavior which is associated with +a particular component being mounted without having to wire +all that lifecycle logic up manually. + +For example: + +```purs +render self = + R.div + { className: "dropdown-wrapper" + , children: + [ dropdownButton + , guard showDropdown $ + windowEvent + { eventType: EventType "click" + , options: defaultOptions + , handler: \_ -> send self CloseDropdown + } + dropdownMenu + ] + } +``` + +#### `EventHandlerOptions` + +``` purescript +type EventHandlerOptions = { capture :: Boolean, once :: Boolean, passive :: Boolean } +``` + +#### `defaultOptions` + +``` purescript +defaultOptions :: EventHandlerOptions +``` + +#### `globalEvent` + +``` purescript +globalEvent :: EventTarget -> { eventType :: EventType, options :: EventHandlerOptions, handler :: Event -> Effect Unit } -> JSX -> JSX +``` + +#### `globalEvents` + +``` purescript +globalEvents :: EventTarget -> Array { eventType :: EventType, options :: EventHandlerOptions, handler :: Event -> Effect Unit } -> JSX -> JSX +``` + +#### `windowEvent` + +``` purescript +windowEvent :: { eventType :: EventType, options :: EventHandlerOptions, handler :: Event -> Effect Unit } -> JSX -> JSX +``` + +#### `windowEvents` + +``` purescript +windowEvents :: Array { eventType :: EventType, options :: EventHandlerOptions, handler :: Event -> Effect Unit } -> JSX -> JSX +``` + + diff --git a/docs/React/Basic/DOM/Components/LogLifecycles.md b/docs/React/Basic/DOM/Components/LogLifecycles.md new file mode 100644 index 0000000..be1c32c --- /dev/null +++ b/docs/React/Basic/DOM/Components/LogLifecycles.md @@ -0,0 +1,9 @@ +## Module React.Basic.DOM.Components.LogLifecycles + +#### `logLifecycles` + +``` purescript +logLifecycles :: Warn (Text "LogLifecycle is for debugging purposes only. Don't forget to remove it!") => JSX -> JSX +``` + + diff --git a/docs/React/Basic/DOM/Components/Ref.md b/docs/React/Basic/DOM/Components/Ref.md new file mode 100644 index 0000000..b816705 --- /dev/null +++ b/docs/React/Basic/DOM/Components/Ref.md @@ -0,0 +1,28 @@ +## Module React.Basic.DOM.Components.Ref + +This module provides an efficient (no `ReactDOM.findDOMNode`) and +declarative way to aquire a `Node` for an element in your render +tree. + +For both type safety and performance reasons, `ref` will always +provide a reference to its own `` `Node`, but you +can use this `Node` with `querySelector` to find more specific local +elements. + +For example: + +```purs +render self = + ref \myRef -> + case myRef of + Nothing -> R.text "DOM render in progress..." + Just _ -> R.text "DOM render complete." +``` + +#### `ref` + +``` purescript +ref :: (Maybe Node -> JSX) -> JSX +``` + + diff --git a/generated-docs/React/Basic/DOM/Events.md b/docs/React/Basic/DOM/Events.md similarity index 100% rename from generated-docs/React/Basic/DOM/Events.md rename to docs/React/Basic/DOM/Events.md diff --git a/generated-docs/React/Basic/DOM/Generated.md b/docs/React/Basic/DOM/Generated.md similarity index 100% rename from generated-docs/React/Basic/DOM/Generated.md rename to docs/React/Basic/DOM/Generated.md diff --git a/generated-docs/React/Basic/DOM/Internal.md b/docs/React/Basic/DOM/Internal.md similarity index 100% rename from generated-docs/React/Basic/DOM/Internal.md rename to docs/React/Basic/DOM/Internal.md diff --git a/generated-docs/React/Basic/Events.md b/docs/React/Basic/Events.md similarity index 100% rename from generated-docs/React/Basic/Events.md rename to docs/React/Basic/Events.md diff --git a/examples/counter/src/Counter.purs b/examples/counter/src/Counter.purs index cdac4cb..07c0ba3 100644 --- a/examples/counter/src/Counter.purs +++ b/examples/counter/src/Counter.purs @@ -2,7 +2,6 @@ module Counter where import Prelude - import React.Basic (Component, JSX, StateUpdate(..), capture_, createComponent, make) import React.Basic.DOM as R diff --git a/src/React/Basic.purs b/src/React/Basic.purs index b6bae67..8252eb8 100644 --- a/src/React/Basic.purs +++ b/src/React/Basic.purs @@ -46,7 +46,7 @@ import Type.Row (class Union) -- | an overridden function interacts with `state`, in which case `initialState` -- | is required (the compiler enforces this). While you _can_ use `state` and -- | dispatch actions without defining `update`, doing so doesn't make much sense --- | so the default `update` implementation will emit a warning. +-- | and will emit a warning. -- | -- | - `initialState` -- | - The component's starting state. @@ -59,7 +59,7 @@ import Type.Row (class Union) -- | - `render` -- | - Takes a current snapshot of the component (`Self`) and converts it to renderable `JSX`. -- | - `shouldUpdate` --- | - Can be useful for occasional performance optimizations. Rarely necessary. +-- | - Can be useful for performance optimizations. Rarely necessary. -- | - `didMount` -- | - The React component's `componentDidMount` lifecycle. Useful for initiating an action on first mount, such as fetching data from a server. -- | - `didUpdate` @@ -68,9 +68,8 @@ import Type.Row (class Union) -- | - The React component's `componentWillUpdate` lifecycle. Any subscriptions or timers created in `didMount` or `didUpdate` should be disposed of here. -- | -- | The component spec is generally not exported from your component --- | module and this type is rarely used explicitly. The simplified alias --- | `Component` is usually sufficient, and `make` will validate whether --- | your component's types line up. +-- | module and this type is rarely used explicitly. `make` will validate whether +-- | your component's internal types line up. -- | -- | For example: -- | @@ -86,14 +85,14 @@ import Type.Row (class Union) -- | = Increment -- | -- | counter :: Props -> JSX --- | counter = make component +-- | counter: make component -- | { initialState = { counter: 0 } -- | --- | , update = \self action -> case action of +-- | , update: \self action -> case action of -- | Increment -> -- | Update self.state { counter = self.state.counter + 1 } -- | --- | , render = \self -> +-- | , render: \self -> -- | R.button -- | { onClick: capture_ self Increment -- | , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] @@ -117,7 +116,7 @@ type ComponentSpec props state action = , willUnmount :: Self props state action -> Effect Unit ) --- | Creates a `ComponentSpec` with a given Display Name. +-- | Creates a `Component` with a given Display Name. -- | -- | The resulting component spec is usually given the simplified `Component` type: -- | @@ -128,20 +127,20 @@ type ComponentSpec props state action = -- | -- | This function should be used at the module level and considered side effecting. -- | This is because React uses referential equality when deciding whether a new --- | `JSX` tree is a valid update, or if it needs to be replaced entirely +-- | `JSX` tree is a valid update or if it needs to be replaced entirely -- | (expensive and clears component state lower in the tree). -- | -- | __*Note:* A specific type for the props in `Component props` should always be chosen at this point. --- | It's technically possible to declare the component with `forall props. Component props` --- | but doing so is unsafe. Leaving the prop type open allows the use of a single `Component` --- | definition in multiple React-Basic components that may have different prop types. Because --- | component lifecycles are managed by React, it's possible for incompatible prop values to --- | be passed into a lifecycle function.__ +-- | It's technically possible to declare the component with `forall props. Component props` +-- | but doing so is unsafe. Leaving the prop type open allows the use of a single `Component` +-- | definition in multiple React-Basic components that may have different prop types. Because +-- | component lifecycles are managed by React, it becomes possible for incompatible prop values to +-- | be passed by React into lifecycle functions.__ -- | -- | __*Note:* A `Component` is *not* a valid React component by itself. If you would like to use -- | a React-Basic component from JavaScript, use `toReactComponent`.__ -- | --- | __*See also:* `Component`, `ComponentSpec`, `make`, `makeStateless`__ +-- | __*See also:* `Component`, `make`, `makeStateless`__ foreign import createComponent :: forall props . String @@ -153,6 +152,10 @@ foreign import createComponent -- | Opaque component information for internal use. -- | +-- | __*Note:* Never define a component with +-- | a less specific type for `props` than its associated `ComponentSpec` and `make` +-- | calls, as this can lead to unsafe interactions with React's lifecycle management.__ +-- | -- | __*For the curious:* This is the "class" React will use to render and -- | identify the component. It receives the `ComponentSpec` as a prop and knows -- | how to defer behavior to it. It requires very specific props and is not useful by @@ -162,7 +165,7 @@ data Component props -- | Used by the `update` function to describe the kind of state update and/or side -- | effects desired. -- | --- | __*See also:* `ComponentSpec`__ +-- | __*See also:* `ComponentSpec`, `capture`__ data StateUpdate props state action = NoUpdate | Update state @@ -253,7 +256,7 @@ foreign import readProps :: forall props state action. Self props state action - -- | __*See also:* `Self`__ foreign import readState :: forall props state action. Self props state action -> Effect state --- | Turn a `Component` into a usable render function. +-- | Turn a `Component` and `ComponentSpec` into a usable render function. -- | This is where you will want to provide customized implementations: -- | -- | ```purs @@ -269,13 +272,13 @@ foreign import readState :: forall props state action. Self props state action - -- | -- | counter :: Props -> JSX -- | counter = make component --- | { initialState = { counter: 0 } +-- | { initialState: { counter: 0 } -- | --- | , update = \self action -> case action of +-- | , update: \self action -> case action of -- | Increment -> -- | Update self.state { counter = self.state.counter + 1 } -- | --- | , render = \self -> +-- | , render: \self -> -- | R.button -- | { onClick: capture_ self Increment -- | , children: [ R.text (self.props.label <> ": " <> show self.state.counter) ] diff --git a/src/React/Basic/DOM/Components/GlobalEvents.js b/src/React/Basic/DOM/Components/GlobalEvents.js new file mode 100644 index 0000000..0e0d649 --- /dev/null +++ b/src/React/Basic/DOM/Components/GlobalEvents.js @@ -0,0 +1,90 @@ +"use strict"; + +var React = require("react"); + +exports._passiveSupported = null; + +function checkPassiveSupported() { + if (exports._passiveSupported == null) { + try { + window.addEventListener( + "test", + null, + Object.defineProperty({}, "passive", { + get: function() { + exports._passiveSupported = true; + } + }) + ); + } catch (err) { + exports._passiveSupported = false; + } + } + return exports._passiveSupported; +} + +function createHandler(h) { + return function(e) { + return h(e)(); + }; +} + +function up(target, eventType, handler, options) { + target.addEventListener( + eventType, + handler, + checkPassiveSupported() ? options : options.capture + ); +} + +function down(target, eventType, handler, options) { + target.removeEventListener( + eventType, + handler, + checkPassiveSupported() ? options : options.capture + ); +} + +var GlobalEvent = function() { + return this; +}; + +GlobalEvent.prototype = Object.create(React.Component.prototype); + +GlobalEvent.displayName = "GlobalEvent"; + +GlobalEvent.prototype.componentDidMount = function() { + this._handler = createHandler(this.props.handler); + up( + this.props.target, + this.props.eventType, + this._handler, + this.props.options + ); +}; + +GlobalEvent.prototype.componentDidUpdate = function(prevProps) { + down(prevProps.target, prevProps.eventType, this._handler, prevProps.options); + this._handler = createHandler(this.props.handler); + up( + this.props.target, + this.props.eventType, + this._handler, + this.props.options + ); +}; + +GlobalEvent.prototype.componentWillUnmount = function() { + down( + this.props.target, + this.props.eventType, + this._handler, + this.props.options + ); +}; + +GlobalEvent.prototype.render = function() { + return this.props.child; +}; + +exports.globalEvent_ = GlobalEvent; diff --git a/src/React/Basic/DOM/Components/GlobalEvents.purs b/src/React/Basic/DOM/Components/GlobalEvents.purs new file mode 100644 index 0000000..ea9081d --- /dev/null +++ b/src/React/Basic/DOM/Components/GlobalEvents.purs @@ -0,0 +1,117 @@ +-- | These helper components register and unregister event callbacks +-- | using React's the lifecycle callbacks. They're useful for +-- | declaratively defining global behavior which is associated with +-- | a particular component being mounted without having to wire +-- | all that lifecycle logic up manually. +-- | +-- | For example: +-- | +-- | ```purs +-- | render self = +-- | R.div +-- | { className: "dropdown-wrapper" +-- | , children: +-- | [ dropdownButton +-- | , guard showDropdown $ +-- | windowEvent +-- | { eventType: EventType "click" +-- | , options: defaultOptions +-- | , handler: \_ -> send self CloseDropdown +-- | } +-- | dropdownMenu +-- | ] +-- | } +-- | ``` +module React.Basic.DOM.Components.GlobalEvents + ( EventHandlerOptions + , defaultOptions + , globalEvent + , globalEvents + , windowEvent + , windowEvents + ) where + +import Prelude + +import Data.Foldable (foldr) +import Effect (Effect) +import Effect.Unsafe (unsafePerformEffect) +import React.Basic (JSX, ReactComponent, element) +import Web.Event.Event (EventType) +import Web.Event.Internal.Types (Event, EventTarget) +import Web.HTML (window) +import Web.HTML.Window as Window + +type EventHandlerOptions = + { capture :: Boolean + , once :: Boolean + , passive :: Boolean + } + +defaultOptions :: EventHandlerOptions +defaultOptions = + { capture: false + , once: false + , passive: false + } + +foreign import globalEvent_ + :: ReactComponent + { target :: EventTarget + , eventType :: EventType + , handler :: Event -> Effect Unit + , options :: EventHandlerOptions + , child :: JSX + } + +globalEvent + :: EventTarget + -> { eventType :: EventType + , options :: EventHandlerOptions + , handler :: Event -> Effect Unit + } + -> JSX + -> JSX +globalEvent target { eventType, options, handler } child = + element globalEvent_ + { target + , eventType + , handler + , options + , child + } + +globalEvents + :: EventTarget + -> Array + { eventType :: EventType + , options :: EventHandlerOptions + , handler :: Event -> Effect Unit + } + -> JSX + -> JSX +globalEvents target = flip (foldr (globalEvent target)) + +windowEvents + :: Array + { eventType :: EventType + , options :: EventHandlerOptions + , handler :: Event -> Effect Unit + } + -> JSX + -> JSX +windowEvents = globalEvents $ unsafePerformEffect $ map Window.toEventTarget window + +windowEvent + :: { eventType :: EventType + , options :: EventHandlerOptions + , handler :: Event -> Effect Unit + } + -> JSX + -> JSX +windowEvent = windowEvents <<< pure + +-- | Hide "unused ffi export" warning. +-- | The export is required to prevent +-- | PS' bundler from stripping it out. +foreign import _passiveSupported :: Void diff --git a/src/React/Basic/DOM/Components/LogLifecycles.js b/src/React/Basic/DOM/Components/LogLifecycles.js new file mode 100644 index 0000000..714397d --- /dev/null +++ b/src/React/Basic/DOM/Components/LogLifecycles.js @@ -0,0 +1,38 @@ +"use strict"; + +var React = require("react"); + +var LogLifecycles = function(_props) { + return this; +}; + +LogLifecycles.prototype = Object.create(React.Component.prototype); + +LogLifecycles.displayName = "LogLifecycles"; + +LogLifecycles.prototype.componentDidMount = function() { + console.info( + this.props.child.type.displayName || this.props.child.type, + "[didMount]" + ); +}; + +LogLifecycles.prototype.componentDidUpdate = function() { + console.info( + this.props.child.type.displayName || this.props.child.type, + "[didUpdate]" + ); +}; + +LogLifecycles.prototype.componentWillUnmount = function() { + console.info( + this.props.child.type.displayName || this.props.child.type, + "[willUnmount]" + ); +}; + +LogLifecycles.prototype.render = function() { + return this.props.child; +}; + +exports.logLifecycles_ = LogLifecycles; diff --git a/src/React/Basic/DOM/Components/LogLifecycles.purs b/src/React/Basic/DOM/Components/LogLifecycles.purs new file mode 100644 index 0000000..57a5fb7 --- /dev/null +++ b/src/React/Basic/DOM/Components/LogLifecycles.purs @@ -0,0 +1,11 @@ +module React.Basic.DOM.Components.LogLifecycles + ( logLifecycles + ) where + +import Prim.TypeError (class Warn, Text) +import React.Basic (JSX, ReactComponent, element) + +foreign import logLifecycles_ :: ReactComponent { child :: JSX } + +logLifecycles :: Warn (Text "LogLifecycle is for debugging purposes only. Don't forget to remove it!") => JSX -> JSX +logLifecycles child = element logLifecycles_ { child } diff --git a/src/React/Basic/DOM/Components/Ref.js b/src/React/Basic/DOM/Components/Ref.js new file mode 100644 index 0000000..8adfbb5 --- /dev/null +++ b/src/React/Basic/DOM/Components/Ref.js @@ -0,0 +1,39 @@ +"use strict"; + +var React = require("react"); + +exports.mkRef = function(toMaybe) { + var Ref = function(_props) { + this.state = { node: null }; + this.ref = React.createRef(); + return this; + }; + + Ref.prototype = Object.create(React.Component.prototype); + + Ref.displayName = "Ref"; + + Ref.prototype.syncRef = function() { + if (this.state.node !== this.ref.current) { + this.setState({ node: this.ref.current }); + } + }; + + Ref.prototype.componentDidMount = function() { + this.syncRef(); + }; + + Ref.prototype.componentDidUpdate = function() { + this.syncRef(); + }; + + Ref.prototype.render = function() { + return React.createElement( + "react-basic-ref", + { ref: this.ref }, + this.props.render(toMaybe(this.state.node)) + ); + }; + + return Ref; +}; diff --git a/src/React/Basic/DOM/Components/Ref.purs b/src/React/Basic/DOM/Components/Ref.purs new file mode 100644 index 0000000..60b36d2 --- /dev/null +++ b/src/React/Basic/DOM/Components/Ref.purs @@ -0,0 +1,36 @@ +-- | This module provides an efficient (no `ReactDOM.findDOMNode`) and +-- | declarative way to aquire a `Node` for an element in your render +-- | tree. +-- | +-- | For both type safety and performance reasons, `ref` will always +-- | provide a reference to its own `` `Node`, but you +-- | can use this `Node` with `querySelector` to find more specific local +-- | elements. +-- | +-- | For example: +-- | +-- | ```purs +-- | render self = +-- | ref \myRef -> +-- | case myRef of +-- | Nothing -> R.text "DOM render in progress..." +-- | Just _ -> R.text "DOM render complete." +-- | ``` +module React.Basic.DOM.Components.Ref + ( ref + ) where + +import Prelude + +import Data.Maybe (Maybe) +import Data.Nullable (Nullable, toMaybe) +import React.Basic (JSX, ReactComponent, element) +import Web.DOM (Node) + +foreign import mkRef :: (Nullable ~> Maybe) -> ReactComponent { render :: Maybe Node -> JSX } + +ref_ :: ReactComponent { render :: Maybe Node -> JSX } +ref_ = mkRef toMaybe + +ref :: (Maybe Node -> JSX) -> JSX +ref render = element ref_ { render } From d31f586b6b20070c8967b704e9163339c44361a1 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Tue, 6 Nov 2018 15:40:20 -0800 Subject: [PATCH 27/28] selectorRef --- {docs => generated-docs}/React/Basic.md | 0 {docs => generated-docs}/React/Basic/Compat.md | 0 {docs => generated-docs}/React/Basic/DOM.md | 0 .../React/Basic/DOM/Components/GlobalEvents.md | 0 .../React/Basic/DOM/Components/LogLifecycles.md | 0 .../React/Basic/DOM/Components/Ref.md | 0 .../React/Basic/DOM/Events.md | 0 .../React/Basic/DOM/Generated.md | 0 .../React/Basic/DOM/Internal.md | 0 {docs => generated-docs}/React/Basic/Events.md | 0 src/React/Basic/DOM/Components/Ref.js | 8 ++++++-- src/React/Basic/DOM/Components/Ref.purs | 16 ++++++++++++---- 12 files changed, 18 insertions(+), 6 deletions(-) rename {docs => generated-docs}/React/Basic.md (100%) rename {docs => generated-docs}/React/Basic/Compat.md (100%) rename {docs => generated-docs}/React/Basic/DOM.md (100%) rename {docs => generated-docs}/React/Basic/DOM/Components/GlobalEvents.md (100%) rename {docs => generated-docs}/React/Basic/DOM/Components/LogLifecycles.md (100%) rename {docs => generated-docs}/React/Basic/DOM/Components/Ref.md (100%) rename {docs => generated-docs}/React/Basic/DOM/Events.md (100%) rename {docs => generated-docs}/React/Basic/DOM/Generated.md (100%) rename {docs => generated-docs}/React/Basic/DOM/Internal.md (100%) rename {docs => generated-docs}/React/Basic/Events.md (100%) diff --git a/docs/React/Basic.md b/generated-docs/React/Basic.md similarity index 100% rename from docs/React/Basic.md rename to generated-docs/React/Basic.md diff --git a/docs/React/Basic/Compat.md b/generated-docs/React/Basic/Compat.md similarity index 100% rename from docs/React/Basic/Compat.md rename to generated-docs/React/Basic/Compat.md diff --git a/docs/React/Basic/DOM.md b/generated-docs/React/Basic/DOM.md similarity index 100% rename from docs/React/Basic/DOM.md rename to generated-docs/React/Basic/DOM.md diff --git a/docs/React/Basic/DOM/Components/GlobalEvents.md b/generated-docs/React/Basic/DOM/Components/GlobalEvents.md similarity index 100% rename from docs/React/Basic/DOM/Components/GlobalEvents.md rename to generated-docs/React/Basic/DOM/Components/GlobalEvents.md diff --git a/docs/React/Basic/DOM/Components/LogLifecycles.md b/generated-docs/React/Basic/DOM/Components/LogLifecycles.md similarity index 100% rename from docs/React/Basic/DOM/Components/LogLifecycles.md rename to generated-docs/React/Basic/DOM/Components/LogLifecycles.md diff --git a/docs/React/Basic/DOM/Components/Ref.md b/generated-docs/React/Basic/DOM/Components/Ref.md similarity index 100% rename from docs/React/Basic/DOM/Components/Ref.md rename to generated-docs/React/Basic/DOM/Components/Ref.md diff --git a/docs/React/Basic/DOM/Events.md b/generated-docs/React/Basic/DOM/Events.md similarity index 100% rename from docs/React/Basic/DOM/Events.md rename to generated-docs/React/Basic/DOM/Events.md diff --git a/docs/React/Basic/DOM/Generated.md b/generated-docs/React/Basic/DOM/Generated.md similarity index 100% rename from docs/React/Basic/DOM/Generated.md rename to generated-docs/React/Basic/DOM/Generated.md diff --git a/docs/React/Basic/DOM/Internal.md b/generated-docs/React/Basic/DOM/Internal.md similarity index 100% rename from docs/React/Basic/DOM/Internal.md rename to generated-docs/React/Basic/DOM/Internal.md diff --git a/docs/React/Basic/Events.md b/generated-docs/React/Basic/Events.md similarity index 100% rename from docs/React/Basic/Events.md rename to generated-docs/React/Basic/Events.md diff --git a/src/React/Basic/DOM/Components/Ref.js b/src/React/Basic/DOM/Components/Ref.js index 8adfbb5..5726c4c 100644 --- a/src/React/Basic/DOM/Components/Ref.js +++ b/src/React/Basic/DOM/Components/Ref.js @@ -14,8 +14,12 @@ exports.mkRef = function(toMaybe) { Ref.displayName = "Ref"; Ref.prototype.syncRef = function() { - if (this.state.node !== this.ref.current) { - this.setState({ node: this.ref.current }); + var selector = this.props.selector; + var current = this.ref.current; + var next = + selector === null ? current : current && current.querySelector(selector); + if (this.state.node !== next) { + this.setState({ node: next }); } }; diff --git a/src/React/Basic/DOM/Components/Ref.purs b/src/React/Basic/DOM/Components/Ref.purs index 60b36d2..49ce6f3 100644 --- a/src/React/Basic/DOM/Components/Ref.purs +++ b/src/React/Basic/DOM/Components/Ref.purs @@ -18,19 +18,27 @@ -- | ``` module React.Basic.DOM.Components.Ref ( ref + , selectorRef + , module Web.DOM.ParentNode ) where import Prelude import Data.Maybe (Maybe) -import Data.Nullable (Nullable, toMaybe) +import Data.Nullable (Nullable, notNull, null, toMaybe) import React.Basic (JSX, ReactComponent, element) import Web.DOM (Node) +import Web.DOM.ParentNode (QuerySelector(..)) -foreign import mkRef :: (Nullable ~> Maybe) -> ReactComponent { render :: Maybe Node -> JSX } +foreign import mkRef :: (Nullable ~> Maybe) -> ReactComponent { render :: Maybe Node -> JSX, selector :: Nullable QuerySelector } -ref_ :: ReactComponent { render :: Maybe Node -> JSX } +ref_ :: ReactComponent { render :: Maybe Node -> JSX, selector :: Nullable QuerySelector } ref_ = mkRef toMaybe ref :: (Maybe Node -> JSX) -> JSX -ref render = element ref_ { render } +ref render = element ref_ { render, selector: null } + +selectorRef :: QuerySelector -> (Maybe Node -> JSX) -> JSX +selectorRef qs render = element ref_ { render, selector: notNull qs } + +-- selectorAllRef :: From 4430c12d83ee0de349e38085009f9cc97bf66900 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Wed, 7 Nov 2018 09:59:27 -0800 Subject: [PATCH 28/28] Doc updates --- generated-docs/React/Basic/DOM.md | 29 +++++++++-------- .../React/Basic/DOM/Components/Ref.md | 31 ++++++++++++++----- src/React/Basic/DOM.purs | 29 +++++++++-------- src/React/Basic/DOM/Components/Ref.purs | 9 ++---- 4 files changed, 58 insertions(+), 40 deletions(-) diff --git a/generated-docs/React/Basic/DOM.md b/generated-docs/React/Basic/DOM.md index 7afcb7b..11123e9 100644 --- a/generated-docs/React/Basic/DOM.md +++ b/generated-docs/React/Basic/DOM.md @@ -3,9 +3,9 @@ This module defines helper functions for creating virtual DOM elements safely. -Note: DOM element props are provided as records, and checked using `Union` -constraints. This means that we don't need to provide all props, but any we -do provide must have the correct types. +__*Note:* DOM element props are provided as records, and checked using `Union` + constraints. This means that we don't need to provide all props, but any we + do provide must have the correct types.__ #### `render` @@ -16,7 +16,7 @@ render :: JSX -> Element -> Effect Unit Render or update/re-render a component tree into a DOM element. -Note: Relies on `ReactDOM.render` +__*Note:* Relies on `ReactDOM.render`__ #### `render'` @@ -28,7 +28,7 @@ Render or update/re-render a component tree into a DOM element. The given Effect is run once the DOM update is complete. -Note: Relies on `ReactDOM.render` +__*Note:* Relies on `ReactDOM.render`__ #### `hydrate` @@ -40,9 +40,9 @@ Render or update/re-render a component tree into a DOM element, attempting to reuse the existing DOM tree. -Note: Relies on `ReactDOM.hydrate`, generally only +__*Note:* Relies on `ReactDOM.hydrate`, generally only used with `ReactDOMServer.renderToNodeStream` or - `ReactDOMServer.renderToString` + `ReactDOMServer.renderToString`__ #### `hydrate'` @@ -55,9 +55,9 @@ a DOM element, attempting to reuse the existing DOM tree. The given Effect is run once the DOM update is complete. -Note: Relies on `ReactDOM.hydrate`, generally only +__*Note:* Relies on `ReactDOM.hydrate`, generally only used with `ReactDOMServer.renderToNodeStream` or - `ReactDOMServer.renderToString` + `ReactDOMServer.renderToString`__ #### `unmount` @@ -69,7 +69,7 @@ Attempt to unmount and clean up the React app rendered into the given element. Returns `true` if an app existed and was unmounted successfully. -Note: Relies on `ReactDOM.unmountComponentAtNode` +__*Note:* Relies on `ReactDOM.unmountComponentAtNode`__ #### `findDOMNode` @@ -81,7 +81,10 @@ Returns the current DOM node associated with the given instance, or an Error if no node was found or the given instance was not mounted. -Note: Relies on `ReactDOM.findDOMNode` +__*Note:* This function can be *very* slow -- prefer +`React.Basic.DOM.Components.Ref` where possible__ + +__*Note:* Relies on `ReactDOM.findDOMNode`__ #### `createPortal` @@ -110,7 +113,7 @@ css :: forall css. { | css } -> CSS Create a value of type `CSS` (which can be provided to the `style` property) from a plain record of CSS attributes. -E.g. +For example: ``` div { style: css { padding: "5px" } } [ text "This text is padded." ] @@ -124,7 +127,7 @@ mergeStyles :: Array CSS -> CSS Merge styles from right to left. Uses `Object.assign`. -E.g. +For example: ``` style: mergeCSS [ (css { padding: "5px" }), props.style ] diff --git a/generated-docs/React/Basic/DOM/Components/Ref.md b/generated-docs/React/Basic/DOM/Components/Ref.md index b816705..75b4bef 100644 --- a/generated-docs/React/Basic/DOM/Components/Ref.md +++ b/generated-docs/React/Basic/DOM/Components/Ref.md @@ -4,19 +4,14 @@ This module provides an efficient (no `ReactDOM.findDOMNode`) and declarative way to aquire a `Node` for an element in your render tree. -For both type safety and performance reasons, `ref` will always -provide a reference to its own `` `Node`, but you -can use this `Node` with `querySelector` to find more specific local -elements. - For example: ```purs render self = ref \myRef -> case myRef of - Nothing -> R.text "DOM render in progress..." - Just _ -> R.text "DOM render complete." + Nothing -> R.text "First DOM render in progress..." + Just _ -> R.text "First DOM render complete." ``` #### `ref` @@ -25,4 +20,26 @@ render self = ref :: (Maybe Node -> JSX) -> JSX ``` +#### `selectorRef` + +``` purescript +selectorRef :: QuerySelector -> (Maybe Node -> JSX) -> JSX +``` + + +### Re-exported from Web.DOM.ParentNode: + +#### `QuerySelector` + +``` purescript +newtype QuerySelector + = QuerySelector String +``` + +##### Instances +``` purescript +Eq QuerySelector +Ord QuerySelector +Newtype QuerySelector _ +``` diff --git a/src/React/Basic/DOM.purs b/src/React/Basic/DOM.purs index 85add7e..ca45370 100644 --- a/src/React/Basic/DOM.purs +++ b/src/React/Basic/DOM.purs @@ -1,9 +1,9 @@ -- | This module defines helper functions for creating virtual DOM elements -- | safely. -- | --- | Note: DOM element props are provided as records, and checked using `Union` --- | constraints. This means that we don't need to provide all props, but any we --- | do provide must have the correct types. +-- | __*Note:* DOM element props are provided as records, and checked using `Union` +-- | constraints. This means that we don't need to provide all props, but any we +-- | do provide must have the correct types.__ module React.Basic.DOM ( module Internal @@ -38,7 +38,7 @@ import Web.DOM (Element, Node) -- | Render or update/re-render a component tree into -- | a DOM element. -- | --- | Note: Relies on `ReactDOM.render` +-- | __*Note:* Relies on `ReactDOM.render`__ render :: JSX -> Element -> Effect Unit render jsx node = render' jsx node (pure unit) @@ -46,7 +46,7 @@ render jsx node = render' jsx node (pure unit) -- | a DOM element. The given Effect is run once the -- | DOM update is complete. -- | --- | Note: Relies on `ReactDOM.render` +-- | __*Note:* Relies on `ReactDOM.render`__ render' :: JSX -> Element -> Effect Unit -> Effect Unit render' = runEffectFn3 render_ @@ -56,9 +56,9 @@ foreign import render_ :: EffectFn3 JSX Element (Effect Unit) Unit -- | a DOM element, attempting to reuse the existing -- | DOM tree. -- | --- | Note: Relies on `ReactDOM.hydrate`, generally only +-- | __*Note:* Relies on `ReactDOM.hydrate`, generally only -- | used with `ReactDOMServer.renderToNodeStream` or --- | `ReactDOMServer.renderToString` +-- | `ReactDOMServer.renderToString`__ hydrate :: JSX -> Element -> Effect Unit hydrate jsx node = hydrate' jsx node (pure unit) @@ -67,9 +67,9 @@ hydrate jsx node = hydrate' jsx node (pure unit) -- | DOM tree. The given Effect is run once the -- | DOM update is complete. -- | --- | Note: Relies on `ReactDOM.hydrate`, generally only +-- | __*Note:* Relies on `ReactDOM.hydrate`, generally only -- | used with `ReactDOMServer.renderToNodeStream` or --- | `ReactDOMServer.renderToString` +-- | `ReactDOMServer.renderToString`__ hydrate' :: JSX -> Element -> Effect Unit -> Effect Unit hydrate' = runEffectFn3 hydrate_ @@ -79,7 +79,7 @@ foreign import hydrate_ :: EffectFn3 JSX Element (Effect Unit) Unit -- | rendered into the given element. Returns `true` -- | if an app existed and was unmounted successfully. -- | --- | Note: Relies on `ReactDOM.unmountComponentAtNode` +-- | __*Note:* Relies on `ReactDOM.unmountComponentAtNode`__ unmount :: Element -> Effect Boolean unmount = runEffectFn1 unmountComponentAtNode_ @@ -89,7 +89,10 @@ foreign import unmountComponentAtNode_ :: EffectFn1 Element Boolean -- | instance, or an Error if no node was found or the given -- | instance was not mounted. -- | --- | Note: Relies on `ReactDOM.findDOMNode` +-- | __*Note:* This function can be *very* slow -- prefer +-- | `React.Basic.DOM.Components.Ref` where possible__ +-- | +-- | __*Note:* Relies on `ReactDOM.findDOMNode`__ findDOMNode :: ReactComponentInstance -> Effect (Either Error Node) findDOMNode instance_ = try do node <- runEffectFn1 findDOMNode_ instance_ @@ -115,7 +118,7 @@ text = unsafeCoerce -- | Create a value of type `CSS` (which can be provided to the `style` property) -- | from a plain record of CSS attributes. -- | --- | E.g. +-- | For example: -- | -- | ``` -- | div { style: css { padding: "5px" } } [ text "This text is padded." ] @@ -125,7 +128,7 @@ css = unsafeCoerce -- | Merge styles from right to left. Uses `Object.assign`. -- | --- | E.g. +-- | For example: -- | -- | ``` -- | style: mergeCSS [ (css { padding: "5px" }), props.style ] diff --git a/src/React/Basic/DOM/Components/Ref.purs b/src/React/Basic/DOM/Components/Ref.purs index 49ce6f3..c1b5a5f 100644 --- a/src/React/Basic/DOM/Components/Ref.purs +++ b/src/React/Basic/DOM/Components/Ref.purs @@ -2,19 +2,14 @@ -- | declarative way to aquire a `Node` for an element in your render -- | tree. -- | --- | For both type safety and performance reasons, `ref` will always --- | provide a reference to its own `` `Node`, but you --- | can use this `Node` with `querySelector` to find more specific local --- | elements. --- | -- | For example: -- | -- | ```purs -- | render self = -- | ref \myRef -> -- | case myRef of --- | Nothing -> R.text "DOM render in progress..." --- | Just _ -> R.text "DOM render complete." +-- | Nothing -> R.text "First DOM render in progress..." +-- | Just _ -> R.text "First DOM render complete." -- | ``` module React.Basic.DOM.Components.Ref ( ref