From 0747f3deccbc7ee931deb0d652ccd7f7a4bb0347 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 13 Dec 2018 18:32:56 +0100 Subject: [PATCH] Initial reactive render setup --- examples/boxes/package.json | 8 +- examples/boxes/src/components/arrow-view.js | 33 ++- examples/boxes/src/components/box-view.js | 45 ++-- examples/boxes/src/components/canvas.js | 51 ++--- examples/boxes/src/components/sidebar.js | 26 +-- examples/boxes/src/stores/domain-state.js | 86 +++++--- examples/boxes/src/stores/time.js | 36 ++-- examples/boxes/src/utils.js | 26 ++- examples/boxes/yarn.lock | 227 ++++++++++++++++---- 9 files changed, 346 insertions(+), 192 deletions(-) diff --git a/examples/boxes/package.json b/examples/boxes/package.json index 7199eeb..1c6ebe0 100644 --- a/examples/boxes/package.json +++ b/examples/boxes/package.json @@ -3,16 +3,16 @@ "version": "0.1.0", "private": true, "devDependencies": { - "react-scripts": "2.0.5" + "react-scripts": "2.1.1" }, "dependencies": { + "node-uuid": "^1.4.8", "react": "^16.7.0-alpha.0", "react-dom": "^16.7.0-alpha.0", - "react-draggable": "^3.0.5", - "remmi": "^0.0.3" + "react-draggable": "^3.0.5" }, "scripts": { - "start": "react-scripts start", + "start": "yarn link rval && react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/examples/boxes/src/components/arrow-view.js b/examples/boxes/src/components/arrow-view.js index 3ad6794..e49e882 100644 --- a/examples/boxes/src/components/arrow-view.js +++ b/examples/boxes/src/components/arrow-view.js @@ -1,7 +1,5 @@ -import {merge, render, autoRender } from "remmi" -import { useCursor } from "../utils" import React, {memo} from 'react'; -import { boxWidth } from "../stores/domain-state" +import { RValRender } from "../utils" // // With autoRender: // export default function ArrowView({arrowC, boxesC}) { @@ -23,18 +21,19 @@ import { boxWidth } from "../stores/domain-state" // } -export default function ArrowView({arrowCursor, boxesCursor}) { - const arrow = useCursor(arrowCursor) - const from = useCursor(boxesCursor.select(arrow.from)) - const to = useCursor(boxesCursor.select(arrow.to)) - const [x1, y1, x2, y2] = [ - from.x + boxWidth(from) / 2, - from.y + 30, - to.x + boxWidth(to) / 2, - to.y + 30 - ] - console.log("rendering arrow " + arrow.id) - return +export default function ArrowView({arrow, store}) { + return {() => { + const from = store.boxes()[arrow.from] + const to = store.boxes()[arrow.to] + const [x1, y1, x2, y2] = [ + from.x() + from.width() / 2, + from.y() + 30, + to.x() + to.width() / 2, + to.y() + 30 + ] + console.log("rendering arrow " + arrow.id) + return + }} } diff --git a/examples/boxes/src/components/box-view.js b/examples/boxes/src/components/box-view.js index d2e9162..2d29048 100644 --- a/examples/boxes/src/components/box-view.js +++ b/examples/boxes/src/components/box-view.js @@ -1,45 +1,42 @@ -import {merge, render} from "remmi" -import React, {PureComponent} from "react" -import {DraggableCore} from "react-draggable" - -import {boxWidth} from "../stores/domain-state" +import React, { PureComponent } from "react" +import { DraggableCore } from "react-draggable" +import { batch } from "rval"; +import { RValRender } from "../utils" class BoxView extends PureComponent { render() { - const {box, boxCursor, store} = this.props - const isSelected = merge(boxCursor, store.select("selection")) - .select(([box, selection]) => box.id === selection) - console.log("rendering box " + box.id) - return isSelected.do( - render(isSelected => ( - + const { box, store } = this.props + return + {() => { + const isSelected = store.selection() === box.id + console.log("rendering box " + box.id) + return
- {box.name} + {box.name()}
- )) - ) + }} +
} handleClick = e => { - this.props.store.update(d => { - d.selection = this.props.box.id - }) + this.props.store.selection(this.props.box.id) e.stopPropagation() } handleDrag = (e, dragInfo) => { - this.props.boxCursor.update(d => { - d.x += dragInfo.deltaX - d.y += dragInfo.deltaY + const { box } = this.props + batch(() => { + box.x(box.x() + dragInfo.deltaX) + box.y(box.y() + dragInfo.deltaY) }) } } diff --git a/examples/boxes/src/components/canvas.js b/examples/boxes/src/components/canvas.js index bc90f8c..100c6df 100644 --- a/examples/boxes/src/components/canvas.js +++ b/examples/boxes/src/components/canvas.js @@ -1,8 +1,7 @@ import React, {Component} from "react" -import {select, renderAll} from "remmi" -import { useCursor } from "../utils" +import { RValRender } from "../utils" +import { batch } from "rval" -import {createArrow, createBox } from "../stores/domain-state" import BoxView from "./box-view" import ArrowView from "./arrow-view" import Sidebar from './sidebar'; @@ -11,44 +10,34 @@ import FunStuff from './fun-stuff'; class Canvas extends Component { render() { const {store} = this.props - const boxesCursor = store.select("boxes") - const selection = store.select(s => s.boxes[s.selection]) return (
-
- - {store.do( - select("arrows"), - renderAll((arrow, arrowCursor) => ( - - )) + {() => +
+ + {Object.entries(store.arrows()).map(([id, arrow]) => + + )} + + {Object.entries(store.boxes()).map(([id, box]) => + )} - - {boxesCursor.do( - renderAll((box, boxCursor) => ( - - )) - )} -
- - +
+ } + {/* + */}
) } onCanvasClick = e => { const {store} = this.props - if (e.ctrlKey === true && store.value().selection) { - store.update(draft => { - const id = createBox(store, "Hi.", e.clientX - 50, - e.clientY - 20) - createArrow(store, store.value().selection, id) - draft.selection = id + if (e.ctrlKey === true && store.selection()) { + batch(() => { + const id = store.addBox("Hi.", e.clientX - 50, e.clientY - 20) + store.addArrow(store.selection(), id) + store.selection(id) }) - } } } diff --git a/examples/boxes/src/components/sidebar.js b/examples/boxes/src/components/sidebar.js index 9bad6ca..750c00c 100644 --- a/examples/boxes/src/components/sidebar.js +++ b/examples/boxes/src/components/sidebar.js @@ -1,21 +1,21 @@ -import {render} from "remmi" import React, {PureComponent} from "react" class Sidebar extends PureComponent { render() { const {selection} = this.props - return selection.do( - render( - box => - box ? ( -
- -
- ) : ( -
- ) - ) - ) + // return selection.do( + // render( + // box => + // box ? ( + //
+ // + //
+ // ) : ( + //
+ // ) + // ) + // ) + return null } onChange = e => { diff --git a/examples/boxes/src/stores/domain-state.js b/examples/boxes/src/stores/domain-state.js index ad6ef45..07603ed 100644 --- a/examples/boxes/src/stores/domain-state.js +++ b/examples/boxes/src/stores/domain-state.js @@ -1,59 +1,77 @@ -import { createStore } from "remmi" +import { val, drv, batch } from "rval" import {randomUuid} from '../utils'; +function createBox(id, city, _x, _y) { + const name = val(city) + const x = val(_x) + const y = val(_y) + const width = drv(() => name().length * 15) + return { + id, + name, x, y, + width + } +} + export function createBoxesStore(initialState = { boxes: {}, arrows: {}, selection: null }) { - const storeCursor = createStore(initialState) - - storeCursor.update(() => { - // by wrapping in an update, we make this one atomic update - const id1 = createBox(storeCursor, "Roosendaal", 100, 100) - const id2 = createBox(storeCursor, "Prague", 650, 300) - const id3 = createBox(storeCursor, "Tel Aviv", 150, 300) - createArrow(storeCursor, id1, id2) - createArrow(storeCursor, id2, id3) - }) + // TODO: support initial state, use models? + const boxes = val({}) + const arrows = val({}) + const selection = val(null) - return storeCursor -} - -export function createBox(storeCursor, name, x, y) { - const id = randomUuid() - storeCursor.update(d => { - d.boxes[id] = { id, name, x, y } - }) - return id -} + function addBox(city, x, y) { + const id = randomUuid() + boxes({ ...boxes(), + [id]: createBox(id, city, x, y) + }) + return id + } -export function createArrow(storeCursor, from, to) { - storeCursor.update(d => { + function addArrow(fromId, toId) { const id = randomUuid() - d.arrows[id] = { id, from, to } - }) -} + arrows({ + ...arrows(), + [id]: { + id, + from: fromId, + to: toId + } + }) + } -export function boxWidth(box) { - return box.name.length * 15 -} + const id1 = addBox("Roosendaal", 100, 100) + const id2 = addBox("Prague", 650, 300) + const id3 = addBox("Tel Aviv", 150, 300) + addArrow(id1, id2) + addArrow(id2, id3) + return { + boxes, + arrows, + selection, + addBox, + addArrow + } +} // /** // Generate 'amount' new random arrows and boxes // */ -export function generateStuff(storeCursor, amount) { - const ids = Object.keys(storeCursor.value().boxes) - storeCursor.update(() => { +export function generateStuff(store, amount) { + const ids = Object.keys(store.boxes()) + batch(() => { for(var i = 0; i < amount; i++) { - const id = createBox(storeCursor, + const id = store.addBox( '#' + i, Math.random() * window.innerWidth * 0.5, Math.random() * window.innerHeight ) - createArrow(storeCursor, ids[Math.floor(Math.random() * ids.length)], id) + store.addArrow(ids[Math.floor(Math.random() * ids.length)], id) ids.push(id) } }) diff --git a/examples/boxes/src/stores/time.js b/examples/boxes/src/stores/time.js index db37036..288ec92 100644 --- a/examples/boxes/src/stores/time.js +++ b/examples/boxes/src/stores/time.js @@ -3,28 +3,28 @@ let currentFrame = -1; let undoing = false export function trackChanges(store) { - store.subscribe(state => { - if (!undoing) { - states.splice(++currentFrame) - states.push(state) - } - }) + // store.subscribe(state => { + // if (!undoing) { + // states.splice(++currentFrame) + // states.push(state) + // } + // }) } export function previousState(store) { - if (currentFrame > 1) { - currentFrame--; - undoing = true - store.update(() => states[currentFrame]) - undoing = false - } + // if (currentFrame > 1) { + // currentFrame--; + // undoing = true + // store.update(() => states[currentFrame]) + // undoing = false + // } } export function nextState(store) { - if (currentFrame < states.length -1) { - currentFrame++; - undoing = true - store.update(() => states[currentFrame]) - undoing = false - } + // if (currentFrame < states.length -1) { + // currentFrame++; + // undoing = true + // store.update(() => states[currentFrame]) + // undoing = false + // } } diff --git a/examples/boxes/src/utils.js b/examples/boxes/src/utils.js index 3df69a1..ed65596 100644 --- a/examples/boxes/src/utils.js +++ b/examples/boxes/src/utils.js @@ -1,4 +1,5 @@ import React from 'react'; +import { effect } from 'rval'; import {v4} from 'node-uuid'; @@ -6,12 +7,21 @@ export function randomUuid() { return v4(); } -// TODO: for whathever reason, hooks don't work when exported from the immer package :'( -// Probably build issue, need to figure out later - -export function useCursor(cursor) { - function update(v) { setValue(v) } - React.useEffect(() => cursor.subscribe(update), [cursor]) - const [value, setValue] = React.useState(() => cursor.value()) - return value +export function RValRender({ children }) { + const [tick, setTick] = React.useState(0) + const { render, dispose } = React.useMemo(() => { + let render + const dispose = effect( + children, + (didChange, pull) => { + render = pull + if (didChange()) { + setTick(tick + 1) + } + } + ) + return { render, dispose } + }, []) + React.useEffect(() => dispose, []) + return render() } diff --git a/examples/boxes/yarn.lock b/examples/boxes/yarn.lock index b393a50..f278203 100644 --- a/examples/boxes/yarn.lock +++ b/examples/boxes/yarn.lock @@ -282,6 +282,16 @@ "@babel/helper-replace-supers" "^7.1.0" "@babel/plugin-syntax-class-properties" "^7.0.0" +"@babel/plugin-proposal-decorators@7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.1.2.tgz#79829bd75fced6581ec6c7ab1930e8d738e892e7" + integrity sha512-YooynBO6PmBgHvAd0fl5e5Tq/a0pEC6RqF62ouafme8FzdIVH41Mz/u1dn8fFVm4jzEJ+g/MsOxouwybJPuP8Q== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/plugin-syntax-decorators" "^7.1.0" + "@babel/plugin-proposal-json-strings@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" @@ -323,6 +333,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-decorators@^7.1.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.2.0.tgz#c50b1b957dcc69e4b1127b65e1c33eef61570c1b" + integrity sha512-38QdqVoXdHUQfTpZo3rQwqQdWtCn5tMv4uV6r2RMfTqNBuv4ZBhz79SfaQWKTVmxHjeFv/DnXVC/+agHCklYWA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-dynamic-import@7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0.tgz#6dfb7d8b6c3be14ce952962f658f3b7eb54c33ee" @@ -359,6 +376,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-typescript@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.2.0.tgz#55d240536bd314dcbbec70fd949c5cabaed1de29" + integrity sha512-WhKr6yu6yGpGcNMVgIBuI9MkredpVc7Y3YR4UzEZmDztHoL6wV56YBHLhWnjO1EvId1B32HrD3DRFc+zSoKI1g== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-arrow-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" @@ -596,6 +620,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-typescript@^7.1.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.2.0.tgz#bce7c06300434de6a860ae8acf6a442ef74a99d1" + integrity sha512-EnI7i2/gJ7ZNr2MuyvN2Hu+BHJENlxWte5XygPvfj/MbvtOkWor9zcnHpMMQL2YYaaCcqtIvJUyJ7QVfoGs7ew== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-typescript" "^7.2.0" + "@babel/plugin-transform-unicode-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" @@ -660,6 +692,14 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" +"@babel/preset-typescript@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.1.0.tgz#49ad6e2084ff0bfb5f1f7fb3b5e76c434d442c7f" + integrity sha512-LYveByuF9AOM8WrsNne5+N79k1YxjNB6gmpCQsnuSBAcV8QUeB+ZUxQzL7Rz7HksPbahymKkq2qBR+o36ggFZA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.1.0" + "@babel/runtime@7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c" @@ -732,6 +772,19 @@ version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + "@svgr/core@^2.4.1": version "2.4.1" resolved "https://registry.yarnpkg.com/@svgr/core/-/core-2.4.1.tgz#03a407c28c4a1d84305ae95021e8eabfda8fa731" @@ -1205,7 +1258,7 @@ axobject-query@^2.0.1: dependencies: ast-types-flow "0.0.7" -babel-code-frame@^6.26.0: +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -1337,9 +1390,10 @@ babel-plugin-macros@2.4.2: cosmiconfig "^5.0.5" resolve "^1.8.1" -babel-plugin-named-asset-import@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.2.2.tgz#af1290f77e073411ef1a12f17fc458f1111122eb" +babel-plugin-named-asset-import@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.2.3.tgz#b40ed50a848e7bb0a2a7e34d990d1f9d46fe9b38" + integrity sha512-9mx2Z9M4EGbutvXxoLV7aUBCY6ps3sqLFl094FeA2tFQzQffIh0XSsmwwQRxiSfpg3rnb5x/o46qRLxS/OzFTg== babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" @@ -1363,12 +1417,14 @@ babel-preset-jest@^23.2.0: babel-plugin-jest-hoist "^23.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" -babel-preset-react-app@^5.0.4: - version "5.0.4" - resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-5.0.4.tgz#e64a875071af1637a712b68f429551988ec5ebe4" +babel-preset-react-app@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-6.1.0.tgz#477ae7f8557eb99ce26d179530127913b733310d" + integrity sha512-8PJ4N+acfYsjhDK4gMWkqJMVRMjDKb93D+nz7lWlNe73Jcv38FNu37i5K/dVQnFDdRYHbe1SjII+Y0mCgink9A== dependencies: "@babel/core" "7.1.0" "@babel/plugin-proposal-class-properties" "7.1.0" + "@babel/plugin-proposal-decorators" "7.1.2" "@babel/plugin-proposal-object-rest-spread" "7.0.0" "@babel/plugin-syntax-dynamic-import" "7.0.0" "@babel/plugin-transform-classes" "7.1.0" @@ -1379,6 +1435,7 @@ babel-preset-react-app@^5.0.4: "@babel/plugin-transform-runtime" "7.1.0" "@babel/preset-env" "7.1.0" "@babel/preset-react" "7.0.0" + "@babel/preset-typescript" "7.1.0" "@babel/runtime" "7.0.0" babel-loader "8.0.4" babel-plugin-dynamic-import-node "2.2.0" @@ -1732,6 +1789,11 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" @@ -1814,7 +1876,7 @@ check-types@^7.3.0: version "7.4.0" resolved "https://registry.yarnpkg.com/check-types/-/check-types-7.4.0.tgz#0378ec1b9616ec71f774931a3c6516fad8c152f4" -chokidar@^2.0.0, chokidar@^2.0.2: +chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" dependencies: @@ -2028,9 +2090,10 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" -confusing-browser-globals@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.4.tgz#7d3ae232117abdf158f968c1ebeeab42ea980991" +confusing-browser-globals@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.5.tgz#0171050cfdd4261e278978078bc00c4d88e135f4" + integrity sha512-tHo1tQL/9Ox5RELbkCAJhnViqWlzBz3MG1bB2czbHjH2mWd4aYUgNCNLfysFL7c4LoDws7pjg2tj48Gmpw4QHA== connect-history-api-fallback@^1.3.0: version "1.5.0" @@ -2543,6 +2606,14 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +dir-glob@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" @@ -2763,11 +2834,12 @@ escodegen@^1.11.0, escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-config-react-app@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-3.0.4.tgz#83f394d765e7d5af623d773e64609e9c9f2cbeb5" +eslint-config-react-app@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-3.0.5.tgz#d199088ab486d7ccc56d40dedcb1482b01934fb2" + integrity sha512-GjPuy0pbaCkl4+9wm8p0xpl/x/AGFy3wKuju3WNVefDNDDu8T6Ap1OFMDDJbYnOAI+4jfyAE3VT06lAYcJVpdw== dependencies: - confusing-browser-globals "^1.0.4" + confusing-browser-globals "^1.0.5" eslint-import-resolver-node@^0.3.1: version "0.3.2" @@ -3132,6 +3204,18 @@ fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" +fast-glob@^2.0.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.4.tgz#e54f4b66d378040e0e4d6a68ec36bbc5b04363c0" + integrity sha512-FjK2nCGI/McyzgNtTESqaWP3trPvHyRyoyY70hxjc3oKPNmDe8taohLZpoVKoUjW85tbU5txaYUZCNtVzygl1g== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -3325,6 +3409,20 @@ forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" +fork-ts-checker-webpack-plugin-alt@0.4.14: + version "0.4.14" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin-alt/-/fork-ts-checker-webpack-plugin-alt-0.4.14.tgz#1bd6c0d97b7d4682dde61255fcbd78b72f7473a0" + integrity sha512-s0wjOBuPdylMRBzZ4yO8LSJuzem3g0MYZFxsjRXrFDQyL5KJBVSq30+GoHM/t/r2CRU4tI6zi04sq6OXK0UYnw== + dependencies: + babel-code-frame "^6.22.0" + chalk "^2.4.1" + chokidar "^2.0.4" + lodash "^4.17.11" + micromatch "^3.1.10" + minimatch "^3.0.4" + resolve "^1.5.0" + tapable "^1.0.0" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -3459,6 +3557,11 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -3496,6 +3599,19 @@ globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" +globby@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" + integrity sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw== + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + fast-glob "^2.0.2" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -3860,13 +3976,19 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" +ignore@^3.3.5: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" -immer@^1.7.2: +immer@1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/immer/-/immer-1.7.2.tgz#a51e9723c50b27e132f6566facbec1c85fc69547" + integrity sha512-4Urocwu9+XLDJw4Tc6ZCg7APVjjLInCFvO4TwGsAYV5zT6YYSor14dsZR0+0tHlDIN92cFUOq+i7fC00G5vTxA== import-cwd@^2.0.0: version "2.1.0" @@ -4972,7 +5094,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -"lodash@>=3.5 <5", lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0: +"lodash@>=3.5 <5", lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -5088,6 +5210,11 @@ merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" +merge2@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" + integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== + merge@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" @@ -5408,6 +5535,11 @@ node-releases@^1.0.0-alpha.11, node-releases@^1.0.0-alpha.14: dependencies: semver "^5.3.0" +node-uuid@^1.4.8: + version "1.4.8" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" + integrity sha1-sEDrCSOWivq/jTL7HxfxFn/auQc= + nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -5818,6 +5950,13 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + pbkdf2@^3.0.3: version "3.0.17" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" @@ -6649,9 +6788,10 @@ react-app-polyfill@^0.1.3: raf "3.4.0" whatwg-fetch "3.0.0" -react-dev-utils@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-6.0.5.tgz#6ef34d0a416dc1c97ac20025031ea1f0d819b21d" +react-dev-utils@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-6.1.1.tgz#a07e3e8923c4609d9f27e5af5207e3ca20724895" + integrity sha512-ThbJ86coVd6wV/QiTo8klDTvdAJ1WsFCGQN07+UkN+QN9CtCSsl/+YuDJToKGeG8X4j9HMGXNKbk2QhPAZr43w== dependencies: "@babel/code-frame" "7.0.0" address "1.0.3" @@ -6663,13 +6803,15 @@ react-dev-utils@^6.0.5: filesize "3.6.1" find-up "3.0.0" global-modules "1.0.0" + globby "8.0.1" gzip-size "5.0.0" + immer "1.7.2" inquirer "6.2.0" is-root "2.0.0" loader-utils "1.1.0" opn "5.4.0" pkg-up "2.0.0" - react-error-overlay "^5.0.5" + react-error-overlay "^5.1.0" recursive-readdir "2.2.2" shell-quote "1.6.1" sockjs-client "1.1.5" @@ -6692,13 +6834,15 @@ react-draggable@^3.0.5: classnames "^2.2.5" prop-types "^15.6.0" -react-error-overlay@^5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.0.5.tgz#716ff1a92fda76bb89a39adf9ce046a5d740e71a" +react-error-overlay@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.0.tgz#c516995a5652e7bfbed8b497910d5280df74a7e8" + integrity sha512-akMy/BQT5m1J3iJIHkSb4qycq2wzllWsmmolaaFVnb+LPV9cIJ/nTud40ZsiiT0H3P+/wXIdbjx2fzF61OaeOQ== -react-scripts@2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-2.0.5.tgz#74b8e9fa6a7c5f0f11221dd18c10df2ae3df3d69" +react-scripts@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-2.1.1.tgz#c2959a756b0b61d3090adece0d7aedd324dff8a5" + integrity sha512-f6KCUy7opItgeana1Ghwj+lYQp5BTHSaivG/dbfiIqSm5QdOIUV5eiFSBsbaAE6GEKqGYmZDK6Yw5WmbrhxaFg== dependencies: "@babel/core" "7.1.0" "@svgr/webpack" "2.4.1" @@ -6706,8 +6850,8 @@ react-scripts@2.0.5: babel-eslint "9.0.0" babel-jest "23.6.0" babel-loader "8.0.4" - babel-plugin-named-asset-import "^0.2.2" - babel-preset-react-app "^5.0.4" + babel-plugin-named-asset-import "^0.2.3" + babel-preset-react-app "^6.1.0" bfj "6.1.1" case-sensitive-paths-webpack-plugin "2.1.2" chalk "2.4.1" @@ -6715,13 +6859,14 @@ react-scripts@2.0.5: dotenv "6.0.0" dotenv-expand "4.2.0" eslint "5.6.0" - eslint-config-react-app "^3.0.4" + eslint-config-react-app "^3.0.5" eslint-loader "2.1.1" eslint-plugin-flowtype "2.50.1" eslint-plugin-import "2.14.0" eslint-plugin-jsx-a11y "6.1.2" eslint-plugin-react "7.11.1" file-loader "2.0.0" + fork-ts-checker-webpack-plugin-alt "0.4.14" fs-extra "7.0.0" html-webpack-plugin "4.0.0-alpha.2" identity-obj-proxy "3.0.0" @@ -6736,7 +6881,7 @@ react-scripts@2.0.5: postcss-preset-env "6.0.6" postcss-safe-parser "4.0.1" react-app-polyfill "^0.1.3" - react-dev-utils "^6.0.5" + react-dev-utils "^6.1.1" resolve "1.8.1" sass-loader "7.1.0" style-loader "0.23.0" @@ -6745,7 +6890,7 @@ react-scripts@2.0.5: webpack "4.19.1" webpack-dev-server "3.1.9" webpack-manifest-plugin "2.0.4" - workbox-webpack-plugin "3.6.2" + workbox-webpack-plugin "3.6.3" optionalDependencies: fsevents "1.2.4" @@ -6913,12 +7058,6 @@ relateurl@0.2.x: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" -remmi@^0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/remmi/-/remmi-0.0.3.tgz#ef5eee5e642bb291a5643ab3508ad366e80c05a9" - dependencies: - immer "^1.7.2" - remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -8285,9 +8424,10 @@ workbox-broadcast-cache-update@^3.6.3: dependencies: workbox-core "^3.6.3" -workbox-build@^3.6.2: +workbox-build@^3.6.3: version "3.6.3" resolved "https://registry.yarnpkg.com/workbox-build/-/workbox-build-3.6.3.tgz#77110f9f52dc5d82fa6c1c384c6f5e2225adcbd8" + integrity sha512-w0clZ/pVjL8VXy6GfthefxpEXs0T8uiRuopZSFVQ8ovfbH6c6kUpEh6DcYwm/Y6dyWPiCucdyAZotgjz+nRz8g== dependencies: babel-runtime "^6.26.0" common-tags "^1.4.0" @@ -8377,13 +8517,14 @@ workbox-sw@^3.6.3: version "3.6.3" resolved "https://registry.yarnpkg.com/workbox-sw/-/workbox-sw-3.6.3.tgz#278ea4c1831b92bbe2d420da8399176c4b2789ff" -workbox-webpack-plugin@3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/workbox-webpack-plugin/-/workbox-webpack-plugin-3.6.2.tgz#fc94124b71e7842e09972f2fe3ec98766223d887" +workbox-webpack-plugin@3.6.3: + version "3.6.3" + resolved "https://registry.yarnpkg.com/workbox-webpack-plugin/-/workbox-webpack-plugin-3.6.3.tgz#a807bb891b4e4e3c808df07e58f17de2d5ba6182" + integrity sha512-RwmKjc7HFHUFHoOlKoZUq9349u0QN3F8W5tZZU0vc1qsBZDINWXRiIBCAKvo/Njgay5sWz7z4I2adnyTo97qIQ== dependencies: babel-runtime "^6.26.0" json-stable-stringify "^1.0.1" - workbox-build "^3.6.2" + workbox-build "^3.6.3" worker-farm@^1.5.2: version "1.6.0"