diff --git a/examples/README.md b/examples/README.md index 801959a6f5..1007040b42 100644 --- a/examples/README.md +++ b/examples/README.md @@ -17,21 +17,23 @@ If you want to [contribute](../CONTRIBUTING.md) an example, please get in touch | 9 | [hdom-basics](./hdom-basics) | Hello world | hdom, hiccup | basic | | 10 | [hdom-benchmark](./hdom-benchmark) | hdom rendering perf / stress test, FPS counter | hdom, rstream, transducers | intermediate | | 11 | [hdom-canvas-clock](./hdom-canvas-clock) | hdom-canvas rendered clock | hdom, hdom-canvas, transducers | basic | -| 12 | [hdom-canvas-shapes](./hdom-canvas-shapes) | various hdom-canvas shape tests | hdom, hdom-canvas, rstream, transducers | basic | -| 13 | [hdom-theme-adr-0003](./hdom-theme-adr-0003) | hdom themed components proposal | hdom | intermediate | -| 14 | [hmr-basics](./hmr-basics) | hdom & hot module replacement | hdom, memoize | basic | -| 15 | [hydrate-basics](./hydrate-basics) | hiccup / hdom DOM hydration | hiccup, hdom | intermediate | -| 16 | [interceptor-basics](./interceptor-basics) | Event handling w/ interceptors and side effects | atom, hdom, interceptors | intermediate | -| 17 | [json-components](./json-components) | JSON->component transformation, live editor | hdom, transducers | intermediate | -| 18 | [login-form](./login-form) | Basic SPA without router | atom, hdom | intermediate | -| 19 | [pointfree-svg](./pointfree-svg) | Generate SVG using pointfree DSL | hiccup, hiccup-svg, pointfree-lang | intermediate | -| 20 | [router-basics](./router-basics) | Complete mini SPA | atom, hdom, interceptors, router | advanced | -| 21 | [rstream-dataflow](./rstream-dataflow) | Dataflow graph | atom, hdom, rstream, rstream-gestures, rstream-graph, transducers | intermediate | -| 22 | [rstream-grid](./rstream-grid) | Dataflow graph SVG grid | atom, hdom, hiccup-svg, interceptors, rstream-graph, transducers | advanced | -| 23 | [rstream-hdom](./rstream-hdom) | rstream based UI updates & state handling | hdom, rstream, transducers | intermediate | -| 24 | [svg-particles](./svg-particles) | hdom SVG generation / animation | hdom, transducers | basic | -| 25 | [svg-waveform](./svg-waveform) | hdom SVG generation / undo history | atom, hdom, hiccup-svg, interceptors, iterators | intermediate | -| 26 | [todo-list](./todo-list) | Canonical Todo list with undo/redo | atom, hdom, transducers | intermediate | -| 27 | [transducers-hdom](./transducers-hdom) | Transducer & rstream based hdom UI updates | hdom, rstream, transducers-hdom | basic | -| 28 | [triple-query](./triple-query) | Triple store query results & sortable table | atom, hdom, hdom-components, rstream-query, transducers | intermediate | -| 29 | [webgl](./webgl) | Canvas component handling | hdom, hdom-components | basic | \ No newline at end of file +| 12 | [hdom-canvas-draw](./hdom-canvas-draw) | hdom-canvas mouse / touch gesture drawing | hdom, hdom-canvas, transducers | intermediate | +| 13 | [hdom-canvas-shapes](./hdom-canvas-shapes) | various hdom-canvas shape tests | hdom, hdom-canvas, rstream, transducers | basic | +| 14 | [hdom-theme-adr-0003](./hdom-theme-adr-0003) | hdom themed components proposal | hdom | intermediate | +| 15 | [hmr-basics](./hmr-basics) | hdom & hot module replacement | hdom, memoize | basic | +| 16 | [hydrate-basics](./hydrate-basics) | hiccup / hdom DOM hydration | hiccup, hdom | intermediate | +| 17 | [interceptor-basics](./interceptor-basics) | Event handling w/ interceptors and side effects | atom, hdom, interceptors | intermediate | +| 18 | [json-components](./json-components) | JSON->component transformation, live editor | hdom, transducers | intermediate | +| 19 | [login-form](./login-form) | Basic SPA without router | atom, hdom | intermediate | +| 20 | [pointfree-svg](./pointfree-svg) | Generate SVG using pointfree DSL | hiccup, hiccup-svg, pointfree-lang | intermediate | +| 21 | [router-basics](./router-basics) | Complete mini SPA | atom, hdom, interceptors, router | advanced | +| 22 | [rstream-dataflow](./rstream-dataflow) | Dataflow graph | atom, hdom, rstream, rstream-gestures, rstream-graph, transducers | intermediate | +| 23 | [rstream-grid](./rstream-grid) | Dataflow graph SVG grid | atom, hdom, hiccup-svg, interceptors, rstream-graph, transducers | advanced | +| 24 | [rstream-hdom](./rstream-hdom) | rstream based UI updates & state handling | hdom, rstream, transducers | intermediate | +| 25 | [svg-barchart](./svg-barchart) | hdom SVG barchart component | hdom, transducers | basic | +| 26 | [svg-particles](./svg-particles) | hdom SVG generation / animation | hdom, transducers | basic | +| 27 | [svg-waveform](./svg-waveform) | hdom SVG generation / undo history | atom, hdom, hiccup-svg, interceptors, iterators | intermediate | +| 28 | [todo-list](./todo-list) | Canonical Todo list with undo/redo | atom, hdom, transducers | intermediate | +| 29 | [transducers-hdom](./transducers-hdom) | Transducer & rstream based hdom UI updates | hdom, rstream, transducers-hdom | basic | +| 30 | [triple-query](./triple-query) | Triple store query results & sortable table | atom, hdom, hdom-components, rstream-query, transducers | intermediate | +| 31 | [webgl](./webgl) | Canvas component handling | hdom, hdom-components | basic | diff --git a/examples/crypto-chart/README.md b/examples/crypto-chart/README.md index 7b53a3b8f4..99d2d52d05 100644 --- a/examples/crypto-chart/README.md +++ b/examples/crypto-chart/README.md @@ -9,7 +9,7 @@ Price data provided by [cryptocompare.com](https://min-api.cryptocompare.com/). This example demonstrates how to use [@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/master/packages/rstream) & -[@thi.ng/transducer](https://github.com/thi-ng/umbrella/tree/master/packages/transducer) +[@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/master/packages/transducers) constructs to create a basic crypto-currency candle chart with multiple moving averages plots. Unlike most other examples in this repo, there's no additional state handling used (e.g. via diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index 627f601886..9ed7ea26dd 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [4.2.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@4.2.0...@thi.ng/api@4.2.1) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/api + + + + + # [4.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@4.1.1...@thi.ng/api@4.2.0) (2018-09-22) diff --git a/packages/api/README.md b/packages/api/README.md index 4c69810c82..3e44252346 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -2,6 +2,8 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/api.svg)](https://www.npmjs.com/package/@thi.ng/api) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/api.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) + This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/api/package.json b/packages/api/package.json index bd56028e96..30720fcae4 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/api", - "version": "4.2.0", + "version": "4.2.1", "description": "Common, generic types & interfaces for thi.ng projects", "main": "./index.js", "typings": "./index.d.ts", @@ -28,7 +28,7 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/errors": "^0.1.8" + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "compare", diff --git a/packages/associative/CHANGELOG.md b/packages/associative/CHANGELOG.md index 36784192b3..d83bf05f48 100644 --- a/packages/associative/CHANGELOG.md +++ b/packages/associative/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.6.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/associative@0.6.7...@thi.ng/associative@0.6.8) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/associative + + + + + ## [0.6.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/associative@0.6.7-alpha.1...@thi.ng/associative@0.6.7) (2018-09-22) diff --git a/packages/associative/README.md b/packages/associative/README.md index ae3bab980e..3178bf73ad 100644 --- a/packages/associative/README.md +++ b/packages/associative/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/associative.svg)](https://www.npmjs.com/package/@thi.ng/associative) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/associative.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/associative/package.json b/packages/associative/package.json index b3bbaff460..9383a0446e 100644 --- a/packages/associative/package.json +++ b/packages/associative/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/associative", - "version": "0.6.7", + "version": "0.6.8", "description": "Alternative Set & Map data type implementations with customizable equality semantics & supporting operations", "main": "./index.js", "typings": "./index.d.ts", @@ -28,13 +28,13 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/compare": "^0.1.8", - "@thi.ng/dcons": "^1.1.7", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/compare": "^0.1.9", + "@thi.ng/dcons": "^1.1.8", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "data structures", diff --git a/packages/atom/CHANGELOG.md b/packages/atom/CHANGELOG.md index 69f48278a0..efde5b5251 100644 --- a/packages/atom/CHANGELOG.md +++ b/packages/atom/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.5.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@1.5.3...@thi.ng/atom@1.5.4) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/atom + + + + + ## [1.5.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@1.5.3-alpha.1...@thi.ng/atom@1.5.3) (2018-09-22) diff --git a/packages/atom/README.md b/packages/atom/README.md index 68308269f0..83687f3739 100644 --- a/packages/atom/README.md +++ b/packages/atom/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/atom.svg)](https://www.npmjs.com/package/@thi.ng/atom) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/atom.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/atom/package.json b/packages/atom/package.json index a0d97f5cda..d1a9fa720d 100644 --- a/packages/atom/package.json +++ b/packages/atom/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/atom", - "version": "1.5.3", + "version": "1.5.4", "description": "Mutable wrapper for immutable values", "main": "./index.js", "typings": "./index.d.ts", @@ -28,11 +28,11 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/paths": "^1.6.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/paths": "^1.6.3" }, "keywords": [ "cursor", diff --git a/packages/bench/CHANGELOG.md b/packages/bench/CHANGELOG.md index 2af1471229..6e7645f07a 100644 --- a/packages/bench/CHANGELOG.md +++ b/packages/bench/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@0.2.2...@thi.ng/bench@0.2.3) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/bench + + + + + ## [0.2.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@0.2.1...@thi.ng/bench@0.2.2) (2018-09-22) diff --git a/packages/bench/README.md b/packages/bench/README.md index 12304f8490..5380968ec8 100644 --- a/packages/bench/README.md +++ b/packages/bench/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/bench.svg)](https://www.npmjs.com/package/@thi.ng/bench) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/bench.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. @@ -28,6 +29,34 @@ None ```ts import { timed, bench } from "@thi.ng/bench"; + +// test functions +const fib = (n) => n > 2 ? fib(n - 1) + fib(n - 2) : n > 0 ? 1 : 0; + +const fib2 = (n) => { + const res = [0, 1]; + for(let i = 2; i <= n; i++) { + res[i] = res[i - 1] + res[i - 2]; + } + return res[n]; +}; + +// measure single execution time +timed(() => fib(40)); +// 714ms +// 102334155 +timed(() => fib2(40)); +// 0ms +// 102334155 + +// measure 1mil iterations (default) +bench(() => fib(10), 1e6); +// 395ms +// 55 + +bench(() => fib2(10), 1e6); +// 53ms +// 55 ``` ## Authors diff --git a/packages/bench/package.json b/packages/bench/package.json index c7ce4c2b2e..b85148ac32 100644 --- a/packages/bench/package.json +++ b/packages/bench/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/bench", - "version": "0.2.2", + "version": "0.2.3", "description": "Basic benchmarking helpers", "main": "./index.js", "typings": "./index.d.ts", diff --git a/packages/bitstream/CHANGELOG.md b/packages/bitstream/CHANGELOG.md index 57e1dacaab..6ecd1c5859 100644 --- a/packages/bitstream/CHANGELOG.md +++ b/packages/bitstream/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.4.18](https://github.com/thi-ng/umbrella/compare/@thi.ng/bitstream@0.4.17...@thi.ng/bitstream@0.4.18) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/bitstream + + + + + ## [0.4.17](https://github.com/thi-ng/umbrella/compare/@thi.ng/bitstream@0.4.16...@thi.ng/bitstream@0.4.17) (2018-09-22) diff --git a/packages/bitstream/README.md b/packages/bitstream/README.md index 89ad138289..cbe4f7ed85 100644 --- a/packages/bitstream/README.md +++ b/packages/bitstream/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/bitstream.svg)](https://www.npmjs.com/package/@thi.ng/bitstream) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/bitstream.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/bitstream/package.json b/packages/bitstream/package.json index 3af2100af9..dfd2e59231 100644 --- a/packages/bitstream/package.json +++ b/packages/bitstream/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/bitstream", - "version": "0.4.17", + "version": "0.4.18", "description": "ES6 iterator based read/write bit streams & support for variable word widths", "main": "./index.js", "typings": "./index.d.ts", @@ -20,7 +20,7 @@ "test": "rm -rf build && tsc -p test && nyc mocha build/test/*.js" }, "dependencies": { - "@thi.ng/errors": "^0.1.8" + "@thi.ng/errors": "^0.1.9" }, "devDependencies": { "@types/mocha": "^5.2.5", diff --git a/packages/cache/CHANGELOG.md b/packages/cache/CHANGELOG.md index 82eb421aea..5e357915c8 100644 --- a/packages/cache/CHANGELOG.md +++ b/packages/cache/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.25](https://github.com/thi-ng/umbrella/compare/@thi.ng/cache@0.2.24...@thi.ng/cache@0.2.25) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/cache + + + + + ## [0.2.24](https://github.com/thi-ng/umbrella/compare/@thi.ng/cache@0.2.24-alpha.1...@thi.ng/cache@0.2.24) (2018-09-22) diff --git a/packages/cache/README.md b/packages/cache/README.md index 7b1292ef17..573cf90cd3 100644 --- a/packages/cache/README.md +++ b/packages/cache/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/cache.svg)](https://www.npmjs.com/package/@thi.ng/cache) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/cache.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/cache/package.json b/packages/cache/package.json index 4262027a13..ad665eb3e8 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/cache", - "version": "0.2.24", + "version": "0.2.25", "description": "In-memory cache implementations with ES6 Map-like API and different eviction strategies", "main": "./index.js", "typings": "./index.d.ts", @@ -28,9 +28,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/dcons": "^1.1.7", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/dcons": "^1.1.8", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "cache", diff --git a/packages/checks/CHANGELOG.md b/packages/checks/CHANGELOG.md index 8210cfbf75..f796805803 100644 --- a/packages/checks/CHANGELOG.md +++ b/packages/checks/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.5.11](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.10...@thi.ng/checks@1.5.11) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/checks + + + + + ## [1.5.10](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.9...@thi.ng/checks@1.5.10) (2018-09-22) diff --git a/packages/checks/README.md b/packages/checks/README.md index 8d1326fb4d..14ec1889da 100644 --- a/packages/checks/README.md +++ b/packages/checks/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/checks.svg)](https://www.npmjs.com/package/@thi.ng/checks) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/checks.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/checks/package.json b/packages/checks/package.json index 25c876f39f..9aecbff357 100644 --- a/packages/checks/package.json +++ b/packages/checks/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/checks", - "version": "1.5.10", + "version": "1.5.11", "description": "Single-function sub-modules for type, feature & value checks", "main": "./index.js", "typings": "./index.d.ts", diff --git a/packages/compare/CHANGELOG.md b/packages/compare/CHANGELOG.md index 5d5abc360e..a3a4bc7c6e 100644 --- a/packages/compare/CHANGELOG.md +++ b/packages/compare/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/compare@0.1.8...@thi.ng/compare@0.1.9) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/compare + + + + + ## [0.1.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/compare@0.1.7...@thi.ng/compare@0.1.8) (2018-09-22) diff --git a/packages/compare/README.md b/packages/compare/README.md index 44506ee1dc..75fbc245fa 100644 --- a/packages/compare/README.md +++ b/packages/compare/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/compare.svg)](https://www.npmjs.com/package/@thi.ng/compare) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/compare.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/compare/package.json b/packages/compare/package.json index de9145e5c6..a3540fa5bf 100644 --- a/packages/compare/package.json +++ b/packages/compare/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/compare", - "version": "0.1.8", + "version": "0.1.9", "description": "Comparator with optional delegation for types implementing @thi.ng/api/ICompare interface", "main": "./index.js", "typings": "./index.d.ts", diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md index 8cc6e27a0a..6301293c69 100644 --- a/packages/compose/CHANGELOG.md +++ b/packages/compose/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.1.3...@thi.ng/compose@0.1.4) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/compose + + + + + ## [0.1.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.1.2...@thi.ng/compose@0.1.3) (2018-09-22) diff --git a/packages/compose/README.md b/packages/compose/README.md index 43597cb0d5..accff7d6d9 100644 --- a/packages/compose/README.md +++ b/packages/compose/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/compose.svg)](https://www.npmjs.com/package/@thi.ng/compose) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/compose.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/compose/package.json b/packages/compose/package.json index 23c6081785..3570ea9b12 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/compose", - "version": "0.1.3", + "version": "0.1.4", "description": "Functional composition helpers", "main": "./index.js", "typings": "./index.d.ts", @@ -28,8 +28,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/api": "^4.2.1", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "composition", diff --git a/packages/csp/CHANGELOG.md b/packages/csp/CHANGELOG.md index 81c5cdb076..d7aeda7e4a 100644 --- a/packages/csp/CHANGELOG.md +++ b/packages/csp/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.3.64](https://github.com/thi-ng/umbrella/compare/@thi.ng/csp@0.3.63...@thi.ng/csp@0.3.64) (2018-09-24) + + +### Performance Improvements + +* **csp:** `State` => const enum ([c3e8d68](https://github.com/thi-ng/umbrella/commit/c3e8d68)) + + + + + ## [0.3.63](https://github.com/thi-ng/umbrella/compare/@thi.ng/csp@0.3.63-alpha.1...@thi.ng/csp@0.3.63) (2018-09-22) diff --git a/packages/csp/README.md b/packages/csp/README.md index 1aff267865..3c063d0160 100644 --- a/packages/csp/README.md +++ b/packages/csp/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/csp.svg)](https://www.npmjs.com/package/@thi.ng/csp) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/csp.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/csp/package.json b/packages/csp/package.json index da12962977..b23784230d 100644 --- a/packages/csp/package.json +++ b/packages/csp/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/csp", - "version": "0.3.63", + "version": "0.3.64", "description": "ES6 promise based CSP implementation", "main": "./index.js", "typings": "./index.d.ts", @@ -32,11 +32,11 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/dcons": "^1.1.7", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/dcons": "^1.1.8", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "async", diff --git a/packages/csp/src/api.ts b/packages/csp/src/api.ts index 446e74698f..12326397bc 100644 --- a/packages/csp/src/api.ts +++ b/packages/csp/src/api.ts @@ -2,12 +2,17 @@ import { IID, ILength, IRelease } from "@thi.ng/api/api"; import { Channel } from "./channel"; -export enum State { +export const enum State { OPEN, CLOSED, DONE, } +/** + * Reverse lookup for `State` enums + */ +export const __State = (exports).State; + export interface ChannelItem { value: () => Promise; resolve: (success: boolean) => void; diff --git a/packages/dcons/CHANGELOG.md b/packages/dcons/CHANGELOG.md index 51fab06abf..29bc7bcd12 100644 --- a/packages/dcons/CHANGELOG.md +++ b/packages/dcons/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.1.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/dcons@1.1.7...@thi.ng/dcons@1.1.8) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/dcons + + + + + ## [1.1.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/dcons@1.1.7-alpha.1...@thi.ng/dcons@1.1.7) (2018-09-22) diff --git a/packages/dcons/README.md b/packages/dcons/README.md index e521e9605f..bf7737e5a1 100644 --- a/packages/dcons/README.md +++ b/packages/dcons/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/dcons.svg)](https://www.npmjs.com/package/@thi.ng/dcons) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/dcons.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/dcons/package.json b/packages/dcons/package.json index 7082ffd19e..0e484ad8dc 100644 --- a/packages/dcons/package.json +++ b/packages/dcons/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/dcons", - "version": "1.1.7", + "version": "1.1.8", "description": "Comprehensive doubly linked list structure w/ iterator support", "main": "./index.js", "typings": "./index.d.ts", @@ -28,12 +28,12 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/compare": "^0.1.8", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/compare": "^0.1.9", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "datastructure", diff --git a/packages/defmulti/CHANGELOG.md b/packages/defmulti/CHANGELOG.md index e61fa7e8be..b2bd426006 100644 --- a/packages/defmulti/CHANGELOG.md +++ b/packages/defmulti/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.3.11](https://github.com/thi-ng/umbrella/compare/@thi.ng/defmulti@0.3.10...@thi.ng/defmulti@0.3.11) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/defmulti + + + + + ## [0.3.10](https://github.com/thi-ng/umbrella/compare/@thi.ng/defmulti@0.3.9...@thi.ng/defmulti@0.3.10) (2018-09-22) diff --git a/packages/defmulti/README.md b/packages/defmulti/README.md index c62135ca85..2ffae5bc39 100644 --- a/packages/defmulti/README.md +++ b/packages/defmulti/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/defmulti.svg)](https://www.npmjs.com/package/@thi.ng/defmulti) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/defmulti.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/defmulti/package.json b/packages/defmulti/package.json index ee25fd1a8f..b94d32c73f 100644 --- a/packages/defmulti/package.json +++ b/packages/defmulti/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/defmulti", - "version": "0.3.10", + "version": "0.3.11", "description": "Dynamically extensible multiple dispatch via user supplied dispatch function.", "main": "./index.js", "typings": "./index.d.ts", @@ -28,8 +28,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/api": "^4.2.1", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "ES6", diff --git a/packages/dgraph/CHANGELOG.md b/packages/dgraph/CHANGELOG.md index e2e9f2419b..90a3b677e0 100644 --- a/packages/dgraph/CHANGELOG.md +++ b/packages/dgraph/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.20](https://github.com/thi-ng/umbrella/compare/@thi.ng/dgraph@0.2.19...@thi.ng/dgraph@0.2.20) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/dgraph + + + + + ## [0.2.19](https://github.com/thi-ng/umbrella/compare/@thi.ng/dgraph@0.2.19-alpha.1...@thi.ng/dgraph@0.2.19) (2018-09-22) diff --git a/packages/dgraph/README.md b/packages/dgraph/README.md index ef9c28ba28..b4c752082e 100644 --- a/packages/dgraph/README.md +++ b/packages/dgraph/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/dgraph.svg)](https://www.npmjs.com/package/@thi.ng/dgraph) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/dgraph.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) ## About diff --git a/packages/dgraph/package.json b/packages/dgraph/package.json index ad39294a43..ed69d7442d 100644 --- a/packages/dgraph/package.json +++ b/packages/dgraph/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/dgraph", - "version": "0.2.19", + "version": "0.2.20", "description": "Type-agnostic directed acyclic graph (DAG) & graph operations", "main": "./index.js", "typings": "./index.d.ts", @@ -28,11 +28,11 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/associative": "^0.6.7", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/associative": "^0.6.8", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "data structure", diff --git a/packages/diff/CHANGELOG.md b/packages/diff/CHANGELOG.md index 82c95b3d11..e72898ca1e 100644 --- a/packages/diff/CHANGELOG.md +++ b/packages/diff/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/diff@1.1.1...@thi.ng/diff@1.1.2) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/diff + + + + + ## [1.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/diff@1.1.0...@thi.ng/diff@1.1.1) (2018-09-22) diff --git a/packages/diff/README.md b/packages/diff/README.md index a40eb87568..cdd80a7ca5 100644 --- a/packages/diff/README.md +++ b/packages/diff/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/diff.svg)](https://www.npmjs.com/package/@thi.ng/diff) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/diff.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/diff/package.json b/packages/diff/package.json index 2c10157b6c..f244daeb09 100644 --- a/packages/diff/package.json +++ b/packages/diff/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/diff", - "version": "1.1.1", + "version": "1.1.2", "description": "Array & object Diff", "main": "./index.js", "typings": "./index.d.ts", @@ -26,8 +26,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/equiv": "^0.1.10" + "@thi.ng/api": "^4.2.1", + "@thi.ng/equiv": "^0.1.11" }, "keywords": [ "array", diff --git a/packages/dot/CHANGELOG.md b/packages/dot/CHANGELOG.md index c5e4c9f64d..0c13cfa4d1 100644 --- a/packages/dot/CHANGELOG.md +++ b/packages/dot/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.15](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@0.1.14...@thi.ng/dot@0.1.15) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/dot + + + + + ## [0.1.14](https://github.com/thi-ng/umbrella/compare/@thi.ng/dot@0.1.14-alpha.0...@thi.ng/dot@0.1.14) (2018-09-22) diff --git a/packages/dot/README.md b/packages/dot/README.md index d517c4ba1c..6da2d1195a 100644 --- a/packages/dot/README.md +++ b/packages/dot/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/dot.svg)](https://www.npmjs.com/package/@thi.ng/dot) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/dot.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/dot/package.json b/packages/dot/package.json index 30ed861624..0d0a4f4b9d 100644 --- a/packages/dot/package.json +++ b/packages/dot/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/dot", - "version": "0.1.14", + "version": "0.1.15", "description": "Graphviz DOM abstraction as vanilla JS objects & serialization to DOT format", "main": "./index.js", "typings": "./index.d.ts", @@ -28,8 +28,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11" }, "keywords": [ "ES6", diff --git a/packages/equiv/CHANGELOG.md b/packages/equiv/CHANGELOG.md index e669a808f3..b0e21dacd9 100644 --- a/packages/equiv/CHANGELOG.md +++ b/packages/equiv/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.11](https://github.com/thi-ng/umbrella/compare/@thi.ng/equiv@0.1.10...@thi.ng/equiv@0.1.11) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/equiv + + + + + ## [0.1.10](https://github.com/thi-ng/umbrella/compare/@thi.ng/equiv@0.1.9...@thi.ng/equiv@0.1.10) (2018-09-22) diff --git a/packages/equiv/README.md b/packages/equiv/README.md index 240fbf59b5..a96a6536f7 100644 --- a/packages/equiv/README.md +++ b/packages/equiv/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/equiv.svg)](https://www.npmjs.com/package/@thi.ng/equiv) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/equiv.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. @@ -17,6 +18,8 @@ Extensible deep equivalence checking for any data types. Supports: - Date - RegExp - types with `.equiv()` implementations + ([IEquiv](https://github.com/thi-ng/umbrella/tree/master/packages/api/src/api.ts#L213) + interface) This feature was previously part of the [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/master/packages/api) diff --git a/packages/equiv/package.json b/packages/equiv/package.json index 1d4cf84bb2..2d286d5ff4 100644 --- a/packages/equiv/package.json +++ b/packages/equiv/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/equiv", - "version": "0.1.10", + "version": "0.1.11", "description": "Extensible deep equivalence checking for any data types", "main": "./index.js", "typings": "./index.d.ts", diff --git a/packages/errors/CHANGELOG.md b/packages/errors/CHANGELOG.md index 2635c94a5f..ca6bd52a00 100644 --- a/packages/errors/CHANGELOG.md +++ b/packages/errors/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@0.1.8...@thi.ng/errors@0.1.9) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/errors + + + + + ## [0.1.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@0.1.7...@thi.ng/errors@0.1.8) (2018-09-22) diff --git a/packages/errors/README.md b/packages/errors/README.md index ad47435bbc..b93e0f4ba1 100644 --- a/packages/errors/README.md +++ b/packages/errors/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/errors.svg)](https://www.npmjs.com/package/@thi.ng/errors) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/errors.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/errors/package.json b/packages/errors/package.json index 621495fcf5..ec817aa873 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/errors", - "version": "0.1.8", + "version": "0.1.9", "description": "Custom error types and helper fns.", "main": "./index.js", "typings": "./index.d.ts", diff --git a/packages/hdom-canvas/CHANGELOG.md b/packages/hdom-canvas/CHANGELOG.md index 10b7c41aff..a953d26a1e 100644 --- a/packages/hdom-canvas/CHANGELOG.md +++ b/packages/hdom-canvas/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-canvas@0.1.1...@thi.ng/hdom-canvas@0.1.2) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/hdom-canvas + + + + + + +## [0.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-canvas@0.1.0...@thi.ng/hdom-canvas@0.1.1) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/hdom-canvas + + + + + # [0.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-canvas@0.1.0-alpha.1...@thi.ng/hdom-canvas@0.1.0) (2018-09-22) diff --git a/packages/hdom-canvas/README.md b/packages/hdom-canvas/README.md index 7c6adb197e..38cf38a584 100644 --- a/packages/hdom-canvas/README.md +++ b/packages/hdom-canvas/README.md @@ -1,6 +1,8 @@ # @thi.ng/hdom-canvas [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/hdom-canvas.svg)](https://www.npmjs.com/package/@thi.ng/hdom-canvas) +![npm downloads](https://img.shields.io/npm/dm/@thi.ng/hdom-canvas.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/hdom-canvas/package.json b/packages/hdom-canvas/package.json index d23a371ce1..bc35c61122 100644 --- a/packages/hdom-canvas/package.json +++ b/packages/hdom-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/hdom-canvas", - "version": "0.1.0", + "version": "0.1.2", "description": "Declarative canvas scenegraph & visualization for @thi.ng/hdom", "main": "./index.js", "typings": "./index.d.ts", @@ -28,10 +28,10 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/diff": "^1.1.1", - "@thi.ng/hdom": "^5.0.0" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/diff": "^1.1.2", + "@thi.ng/hdom": "^5.0.2" }, "keywords": [ "ES6", diff --git a/packages/hdom-components/CHANGELOG.md b/packages/hdom-components/CHANGELOG.md index 919ab68804..ac72686151 100644 --- a/packages/hdom-components/CHANGELOG.md +++ b/packages/hdom-components/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.2.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.2.6...@thi.ng/hdom-components@2.2.7) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/hdom-components + + + + + ## [2.2.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.2.6-alpha.1...@thi.ng/hdom-components@2.2.6) (2018-09-22) diff --git a/packages/hdom-components/README.md b/packages/hdom-components/README.md index 5899482729..a9dbe40645 100644 --- a/packages/hdom-components/README.md +++ b/packages/hdom-components/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/hdom-components.svg)](https://www.npmjs.com/package/@thi.ng/hdom-components) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/hdom-components.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/hdom-components/package.json b/packages/hdom-components/package.json index 424eab2c22..3f061d396d 100644 --- a/packages/hdom-components/package.json +++ b/packages/hdom-components/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/hdom-components", - "version": "2.2.6", + "version": "2.2.7", "description": "Raw, skinnable UI & SVG components for @thi.ng/hdom", "main": "./index.js", "typings": "./index.d.ts", @@ -28,9 +28,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/transducers": "^2.1.2", + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/transducers": "^2.1.3", "@types/webgl2": "^0.0.4" }, "keywords": [ diff --git a/packages/hdom/CHANGELOG.md b/packages/hdom/CHANGELOG.md index 5d2b5ff128..694be3c7cf 100644 --- a/packages/hdom/CHANGELOG.md +++ b/packages/hdom/CHANGELOG.md @@ -3,39 +3,58 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [5.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@5.0.0-alpha.1...@thi.ng/hdom@5.0.0) (2018-09-22) + +## [5.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@5.0.1...@thi.ng/hdom@5.0.2) (2018-09-24) +**Note:** Version bump only for package @thi.ng/hdom -### Features -* **hdom:** add renderOnce() ([5ef9cf0](https://github.com/thi-ng/umbrella/commit/5ef9cf0)) -### Performance Improvements -* **hdom:** minor updates ([de17db8](https://github.com/thi-ng/umbrella/commit/de17db8)) + +## [5.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@5.0.0...@thi.ng/hdom@5.0.1) (2018-09-23) +**Note:** Version bump only for package @thi.ng/hdom - -# [5.0.0-alpha.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@5.0.0-alpha.0...@thi.ng/hdom@5.0.0-alpha.1) (2018-09-17) -**Note:** Version bump only for package @thi.ng/hdom + +# [5.0.0](https://github.com/thi-ng/umbrella/compare/525d90d5...@thi.ng/hdom@5.0.0) (2018-09-22) +### Features +* **hdom:** generalize diffElement() ([#4](https://github.com/thi-ng/umbrella/issues/4)) ([525d90d](https://github.com/thi-ng/umbrella/commit/525d90d)) +* **hdom:** update normalizeTree, add to HDOMImplementation ([59bb19c](https://github.com/thi-ng/umbrella/commit/59bb19c)) +* **hdom:** reorg & extend HDOMImplementation ([1ac245f](https://github.com/thi-ng/umbrella/commit/1ac245f)) +* **hdom:** add `.toHiccup()` interface support ([54ba0ce](https://github.com/thi-ng/umbrella/commit/54ba0ce)) +* **hdom:** add renderOnce() ([5ef9cf0](https://github.com/thi-ng/umbrella/commit/5ef9cf0)) +### Bug fixes - -# [5.0.0-alpha.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@5.0.0-alpha...@thi.ng/hdom@5.0.0-alpha.0) (2018-09-17) +* **hdom:** minor fix (hydrateDOM) ([e4f780c](https://github.com/thi-ng/umbrella/commit/e4f780c)) +* **hdom:** exclude hdom control attribs in setAttrib() ([0592063](https://github.com/thi-ng/umbrella/commit/0592063)) +* **hdom:** delegate diffTree() to branch impl ([6c33901](https://github.com/thi-ng/umbrella/commit/6c33901)) -**Note:** Version bump only for package @thi.ng/hdom +### Performance Improvements +* **hdom:** add opt `__release` attrib to disable releaseDeep() ([2e3fb66](https://github.com/thi-ng/umbrella/commit/2e3fb66)) +* **hdom:** update diffTree(), inline node type checks ([382c45c](https://github.com/thi-ng/umbrella/commit/382c45c)) +* **hdom:** minor updates ([de17db8](https://github.com/thi-ng/umbrella/commit/de17db8)) + + +### BREAKING CHANGES +* **hdom:** new names & call signatures for: + - normalizeTree + - diffElement => diffTree + - createDOM + - hydrateDOM + - replaceChild diff --git a/packages/hdom/README.md b/packages/hdom/README.md index e7aa14d541..344bd23b57 100644 --- a/packages/hdom/README.md +++ b/packages/hdom/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/hdom.svg)](https://www.npmjs.com/package/@thi.ng/hdom) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/hdom.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. @@ -37,6 +38,7 @@ This project is part of the - [Dependencies](#dependencies) - [API & Usage](#api--usage) - [start()](#start) + - [renderOnce()](#renderonce) - [HDOMOpts config options](#hdomopts-config-options) - [normalizeTree()](#normalizetree) - [diffTree()](#difftree) @@ -52,8 +54,8 @@ This project is part of the ## About -Extensible, abstract, hierarchical UI component tree definition syntax & -differential tree updates using only vanilla JS data structures (arrays, +Lightweight UI component tree definition syntax, DOM creation and +differential updates using only vanilla JS data structures (arrays, iterators, closures, attribute objects or objects with life cycle functions, closures). By default targets the browser's native DOM, but supports other arbitrary target implementations in a branch-local @@ -66,7 +68,7 @@ Benefits: - Use the full expressiveness of ES6 / TypeScript to define user interfaces - No enforced opinion about state handling, very flexible - Clean, functional component composition & reuse -- No source pre-processing, pre-compilation or string interpolation +- No source pre-processing, transpiling or string interpolation - Less verbose than HTML / JSX, resulting in smaller file sizes - Supports arbitrary elements (incl. SVG), attributes and events in uniform, S-expression based syntax @@ -74,9 +76,9 @@ Benefits: non-DOM) target data structures to which tree diffs are applied to - Suitable for server-side rendering and then "hydrating" listeners and components with life cycle methods on the client side -- Static components (or component templates) can be distributed as JSON -- Optional user context injection (an arbitrary object passed to all - component functions embedded in the tree) +- Can use JSON for static components (or component templates) +- Optional user context injection (an arbitrary object/value passed to + all component functions embedded in the tree) - Default implementation supports CSS conversion from JS objects for `style` attribs (also see: [@thi.ng/hiccup-css](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup-css)) @@ -96,7 +98,7 @@ import * as hdom from "@thi.ng/hdom"; // stateless component w/ params // the first arg is an auto-injected context object -// (not used here, details further below) +// (not used here, see dedicated section in readme further below) const greeter = (_, name) => ["h1.title", "hello ", name]; // component w/ local state @@ -115,12 +117,12 @@ const app = () => { hdom.start(app(), { root: document.body }); // alternatively create DOM tree only once -hdom.createDOM({}, document.body, hdom.normalizeTree(app())); +hdom.renderOnce(app(), { root: document.body }); ``` -Alternatively, use the same component function for browser or server -side HTML serialization (Note: does not emit attributes w/ functions as -values, e.g. a button's `onclick` attrib). +Alternatively, use the same component for browser or server side HTML +serialization (Note: does not emit attributes w/ functions as values, +e.g. a button's `onclick` attrib). ```ts import { serialize } from "@thi.ng/hiccup"; @@ -187,6 +189,9 @@ needed. [Live demo](http://demo.thi.ng/umbrella/interceptor-basics/) | [Source code](https://github.com/thi-ng/umbrella/tree/master/examples/interceptor-basics) +[Live demo](http://demo.thi.ng/umbrella/interceptor-basics2/) | +[Source code](https://github.com/thi-ng/umbrella/tree/master/examples/interceptor-basics2) (extended version) + ```ts import { Atom } from "@thi.ng/atom"; import { start } from "@thi.ng/hdom"; @@ -237,8 +242,8 @@ start( }, `clicks: ${state.value.clicks}`] : null, - // hdom options incl. - // arbitrary user context object passed to all components + // hdom options, here including an arbitrary user context object + // passed to all components { ctx: { state, bus } } ); @@ -250,10 +255,11 @@ bus.dispatch(["init"]); This example uses the [@thi.ng/hdom-canvas](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-canvas) -component to support the inclusion of (virtual, non-DOM targets) shape +component to support the inclusion of (virtual / non-DOM targets) shape elements as part of the normal HTML component tree. A description of the actual mechanism can be found further below and in the hdom-canvas -readme. +readme. In short, all canvas child elements will be translated into +canvas API draw calls. Related examples: @@ -289,30 +295,34 @@ start(() => ### The hdom data flow -The usual hdom update process is based on the creation of an up-to-date -component tree, which is first normalized (expanded into a canonical -format) and the used to compute minimal edit set of the recursive -difference to previous DOM tree. +The usual hdom update process is as follows: First the user app creates +an up-to-date UI component tree, which is then passed to hdom, will be +normalized (expanded into a canonical format) and then used to +recursively compute the minimal edit set of the difference to the +previous DOM tree. **Important**: -- hdom uses a RAF render loop only by default, but is in absolutely -no way tied to this -- hdom used the browser DOM only by default, but supports custom target - implementations, which can be defined on branch-local basis in the +- hdom uses a RAF render loop only by default, but is in absolutely no + way tied to this (see + [@thi.ng/transducers-hdom](https://github.com/thi-ng/umbrella/tree/master/packages/transducers-hdom) + for a possible alternative) +- hdom uses the browser DOM only by default, but supports custom target + implementations, which can modify other target data structures. These + custom implementations can be triggered on branch-local basis in the tree - hdom NEVER tracks the real DOM, only its own trees (previous & current) - hdom can be used **without** diffing, i.e. for compact, one-off DOM - creation + creation (see [`renderOnce()`](#renderonce)) ![hdom dataflow](https://raw.githubusercontent.com/thi-ng/umbrella/master/assets/hdom-dataflow.png) The syntax is inspired by Clojure's [Hiccup](https://github.com/weavejester/hiccup) and [Reagent](http://reagent-project.github.io/) projects, which themselves -were influenced on [prior art by Phil +were influenced by [prior art by Phil Wadler](http://homepages.inf.ed.ac.uk/wadler/papers/next700/next700.pdf) -at Edinburgh University who pioneered this approach in Lisp back in +at Edinburgh University, who pioneered this approach in Lisp back in 1999. hdom offers several additional features to these established approaches. @@ -349,10 +359,12 @@ Equivalent HTML: ### Attribute objects -Attributes objects are used to define arbitrary attributes, CSS -properties and event listeners. The latter always have to be prefixed -with `on` and their values always must be functions (naturally). CSS -props are assigned to the `style` attribute, but given as JS object. +Attributes objects are optional, but if present always given as the 2nd +element in an element array and are used to define arbitrary attributes, +CSS properties and event listeners. The latter always have to be +prefixed with `on` and their values always must be functions +(naturally). CSS props are assigned to the `style` attribute, but given +as JS object. ```ts ["a", { @@ -372,16 +384,19 @@ props are assigned to the `style` attribute, but given as JS object. Say Hi ``` -Attribute values can be functions themselves and if so will be called -with the entire attributes object as sole argument. Same goes for CSS -property function values (which receive the entire `style` object). In -both cases, this supports the creation of derived values based on other +With the exception of event listeners (which are always functions), +others attribute values can be functions too and if so will be called +with the entire attributes object as sole argument and their return +value used as actual attribute value. Same goes for CSS property +function values (which receive the entire `style` object). In both +cases, this supports the creation of derived values based on other attribs: ```ts const btAttribs = { - // event handler are always functions + // event handlers are always standard listener functions onclick: (e)=> alert(e.target.id), + // these fns receive the entire attribs object class: (attr) => `bt bt-${attr.id}`, href: (attr) => `#${attr.id}`, }; @@ -473,10 +488,11 @@ see [this issue comment](https://github.com/thi-ng/umbrella/issues/42#issuecomment-420094339) for potential pitfalls. -Please see the +The [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/master/packages/transducers) -package, which provides 130+ functions to create, compose and work with -iterator based pipelines. +package provides 130+ functions to create, compose and work with +iterator based pipelines. These are very powerful & handy for component +construction as well! ```ts import { map, range } from "@thi.ng/transducers"; @@ -510,8 +526,12 @@ repo, but also any user defined custom types: ```ts class Foo { + constructor(val) { + this.value = val; + } + deref() { - return ["div.deref"]; + return ["div.deref", this.value]; } } @@ -519,18 +539,33 @@ class Foo { // receives current user context as argument // (see section further below) class Bar { + constructor(val) { + this.value = val; + } + toHiccup(ctx) { return ["div.hiccup", ctx && ctx.foo, this.value]; } } -["div", new Foo(), new Bar()] +// to demonstrate usage of the user context we're using +// @thi.ng/hiccup's serialize() function here, which too +// supports user context handling, but produces an HTML string +serialize( + ["div", new Foo(23), new Bar(42)], + // global user context with theming rules + // here only use tachyons css classes, but could be anything... + { + foo: { class: "bg-lightest-blue navy pa2 ma0" } + } +); ``` ```html
-
-
+
23
+ +
``` @@ -564,6 +599,13 @@ interface ILifecycle { * determine if an `init` is necessary. `init` itself will be * called from `diffTree`, `createDOM` or `hydrateDOM()` in a later * phase of processing. + * + * `render` should ALWAYS return an array or another function, + * else the component's `init` or `release` fns will NOT be able + * to be called later. E.g. If the return value of `render` + * evaluates as a string or number, the return value should be + * wrapped as `["span", "foo"]`. If no `init` or `release` are + * used, this requirement is relaxed. */ render(ctx: any, ...args: any[]): any; @@ -577,12 +619,12 @@ interface ILifecycle { When the component is first used the order of execution is: `render` -> `init`. The `release` method is only called when the component has been -removed / replaced (basically if it's not present in the new tree +removed / replaced (basically, if it's not present in the new tree anymore). **The `release` implementation should NOT manually call -`release()` on any children, since that's already handled by +`release()` on any children, since that's already been handled by hdom's `diffTree()`.** -The rest `...args` provided are sourced from the component call site as +Any remaining arguments are sourced from the component call site as this simple example demonstrates: ```ts @@ -605,29 +647,29 @@ const canvas = () => { // inline initialization is okay here... start( [canvas(), { width: 100, height: 100 }, "Hello world"], - { root: document.body } ); // usage scenario #2: dynamic component // in this example, the root component itself is given as function, // which is evaluated each frame. -// since `canvas()` is a higher order component it too produces +// since `canvas()` is a higher order component it would produce // a new instance with each call. therefore the canvas instance(s) -// need to be created beforehand +// need to be created beforehand... const app = () => { // pre-instantiate canvases const c1 = canvas(); const c2 = canvas(); - // return root component function - return () => ["div", - // use canvas instances - [c1, { width: 100, height: 100 }, "Hello world"], - [c2, { width: 100, height: 100 }, "Goodbye world", "blue"] - ]; + // return actual root component function + return () => + ["div", + // use canvas instances + [c1, { width: 100, height: 100 }, "Hello world"], + [c2, { width: 100, height: 100 }, "Goodbye world", "blue"] + ]; }; -start(app(), { root: document.body }); +start(app()); ``` ### Event & state handling options @@ -822,9 +864,16 @@ pre-existing DOM and the hdom trees will cause undefined behavior. `start` returns a function, which when called, immediately cancels the update loop. +### renderOnce() + +One-off hdom tree conversion & target DOM application. Takes same args +as `start()`, but performs no diffing and only creates or hydrates +target (DOM) once. The given tree is first normalized and no further +action will be taken, if the normalized result is `null` or `undefined`. + ### HDOMOpts config options -Config options object passed to hdom's `start()` or +Config options object passed to hdom's `start()`, `renderOnce()` or [@thi.ng/transducers-hdom](https://github.com/thi-ng/umbrella/tree/master/packages/transducers-hdom)'s `updateDOM()`: @@ -856,6 +905,9 @@ its canonical form: - resolves Emmet-style tags (e.g. from `div#id.foo.bar`) - adds missing attribute objects (and `key` attribs) +- merges Emmet-style classes with additional `class` attrib values (if + given), e.g. `["div.foo", { class: "bar" }]` => `["div", { class: "bar + foo" }]` - evaluates embedded functions and replaces them with their result - calls the `render` life cycle method on component objects and uses result @@ -865,7 +917,7 @@ its canonical form: - calls `toHiccup()` on elements implementing the `IToHiccup` interface and uses returned results - calls `.toString()` on any other non-component value and by default - wrapps it in `["span", x]`. The only exceptions to this are: `button`, + wraps it in `["span", x]`. The only exceptions to this are: `button`, `option`, `textarea` and SVG `text` elements, for which spans are never created. @@ -972,19 +1024,21 @@ start(app, { ctx }); ### Behavior control attributes -The following special attributes can be added to elements to choose -and/or control the branch-local behavior of the hdom implementation: +The following special attributes can be added to elements to control the +branch-local behavior of the hdom implementation: #### __impl -A custom implementation of the `HDOMImplementation` interface. -Currently, +If present, the element and all of its children will be processed by the +given implementation of the `HDOMImplementation` interface. Currently, [@thi.ng/hdom-canvas](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-canvas) is the only example of a component using this feature. #### __diff -If `false`, disables diffing of the current branch and replaces the old one with current. +If true (default), the element will be fully processed by `diffTree()`. +If false, no diff will be computed and the `replaceChild()` operation +will be called in the currently active hdom target implementation. #### __normalize @@ -994,14 +1048,14 @@ this when you're sure that all children are already in canonical format #### __release -If `false`, do not attempt to call `release()` lifecycle methods on this -element or any of its children. +If `false`, hdom will not attempt to call `release()` lifecycle methods +on this element or any of its children. #### __serialize [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup) -only. If `false`, this element and its children will not be serialized -to XML syntax. +only. If `false`, this element and its children will be omitted from the +serialized output. ### Benchmark diff --git a/packages/hdom/package.json b/packages/hdom/package.json index ee01f81031..f66e0f009a 100644 --- a/packages/hdom/package.json +++ b/packages/hdom/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/hdom", - "version": "5.0.0", + "version": "5.0.2", "description": "Lightweight vanilla ES6 UI component trees with customizable branch-local behaviors", "main": "./index.js", "typings": "./index.d.ts", @@ -20,7 +20,7 @@ "test": "rm -rf build && tsc -p test && nyc mocha build/test/*.js" }, "devDependencies": { - "@thi.ng/atom": "^1.5.3", + "@thi.ng/atom": "^1.5.4", "@types/mocha": "^5.2.5", "@types/node": "^10.5.5", "mocha": "^5.2.0", @@ -29,11 +29,11 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/diff": "^1.1.1", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/hiccup": "^2.3.0" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/diff": "^1.1.2", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/hiccup": "^2.4.1" }, "keywords": [ "browser", diff --git a/packages/hdom/src/api.ts b/packages/hdom/src/api.ts index 6fc48cd792..09e2358d2f 100644 --- a/packages/hdom/src/api.ts +++ b/packages/hdom/src/api.ts @@ -1,8 +1,40 @@ import { IObjectOf } from "@thi.ng/api/api"; export interface ILifecycle { + /** + * Component init method. Called with the actual DOM element, + * hdom user context and any other args when the component is + * first used, but **after** `render()` has been called once already. + */ init?(el: Element, ctx: any, ...args: any[]); + + /** + * Returns the hdom tree of this component. + * Note: Always will be called first (prior to `init`/`release`) + * to obtain the actual component definition used for diffing. + * Therefore might have to include checks if any local state + * has already been initialized via `init`. This is the only + * mandatory method which MUST be implemented. + * + * `render` is executed before `init` because `normalizeTree()` + * must obtain the component's hdom tree first before it can + * determine if an `init` is necessary. `init` itself will be + * called from `diffTree`, `createDOM` or `hydrateDOM()` in a later + * phase of processing. + * + * `render` should ALWAYS return an array or another function, + * else the component's `init` or `release` fns will NOT be able + * to be called later. E.g. If the return value of `render` + * evaluates as a string or number, the return value should be + * wrapped as `["span", "foo"]`. If no `init` or `release` are + * used, this requirement is relaxed. + */ render(ctx: any, ...args: any[]): any; + + /** + * Called when the underlying DOM of this component is removed + * (or replaced). Intended for cleanup tasks. + */ release?(ctx: any, ...args: any[]); } @@ -11,7 +43,7 @@ export interface HDOMBehaviorAttribs { * HDOM behavior control attribute. If true (default), the element * will be fully processed by `diffTree()`. If false, no diff will * be computed and the `replaceChild()` operation will be called in - * the currently active hdom target. + * the currently active hdom target implementation. */ __diff?: boolean; /** @@ -21,11 +53,16 @@ export interface HDOMBehaviorAttribs { */ __impl?: HDOMImplementation; /** - * HDOM behavior control attribute. + * HDOM behavior control attribute. If `false`, the current + * element's children will not be normalized. Use this when you're + * sure that all children are already in canonical format (incl. + * `key` attributes). See `normalizeTree()` for details. */ __normalize?: boolean; /** - * HDOM behavior control attribute. + * HDOM behavior control attribute. If `false`, hdom will not + * attempt to call `release()` lifecycle methods on this element or + * any of its children. */ __release?: boolean; } diff --git a/packages/hdom/src/normalize.ts b/packages/hdom/src/normalize.ts index 18cd399239..190e5a39e2 100644 --- a/packages/hdom/src/normalize.ts +++ b/packages/hdom/src/normalize.ts @@ -61,26 +61,35 @@ export const normalizeElement = (spec: any[], keys: boolean) => { /** * Calling this function is a prerequisite before passing a component - * tree to `diffTree`. Recursively expands given hiccup component - * tree into its canonical form by: + * tree to `diffTree()`. Recursively expands given hiccup component tree + * into its canonical form: * - * - resolving Emmet-style tags (e.g. from `div#id.foo.bar`) - * - evaluating embedded functions and replacing them with their result - * - calling `render` life cycle method on component objects and using + * ``` + * ["tag", { attribs }, ...body] + * ``` + * + * - resolves Emmet-style tags (e.g. from `div#id.foo.bar`) + * - adds missing attribute objects (and `key` attribs) + * - merges Emmet-style classes with additional `class` attrib values + * (if given), e.g. `["div.foo", { class: "bar" }]` => `["div", { + * class: "bar foo" }]` + * - evaluates embedded functions and replaces them with their result + * - calls the `render` life cycle method on component objects and uses * result - * - consuming iterables and normalizing results - * - calling `deref()` on elements implementing `IDeref` interface and - * using returned result - * - calling `.toString()` on any other non-component value `x` and by - * default wrapping it in `["span", x]`. The only exceptions to this - * are: `option`, `textarea` and SVG `text` elements, for which spans - * are always skipped. + * - consumes iterables and normalizes their individual values + * - calls `deref()` on elements implementing the `IDeref` interface and + * uses returned results + * - calls `toHiccup()` on elements implementing the `IToHiccup` + * interface and uses returned results + * - calls `.toString()` on any other non-component value and by default + * wraps it in `["span", x]`. The only exceptions to this are: + * `button`, `option`, `textarea` and SVG `text` elements, for which + * spans are never created. * - * Additionally, unless `keys` is set to false, an unique `key` - * attribute is created for each node in the tree. This attribute is - * used by `diffTree` to determine if a changed node can be patched - * or will need to be replaced/removed. The `key` values are defined by - * the `path` array arg. + * Additionally, unless the `keys` option is explicitly set to false, an + * unique `key` attribute is created for each node in the tree. This + * attribute is used by `diffElement` to determine if a changed node can + * be patched or will need to be moved, replaced or removed. * * In terms of life cycle methods: `render` should ALWAYS return an * array or another function, else the component's `init` or `release` @@ -89,9 +98,6 @@ export const normalizeElement = (spec: any[], keys: boolean) => { * wrapped as `["span", "foo"]`. If no `init` or `release` are used, * this requirement is relaxed. * - * For normal usage only the first 2 args should be specified and the - * rest kept at their defaults. - * * See `normalizeElement` for further details about canonical form. * * @param tree diff --git a/packages/hdom/src/render-once.ts b/packages/hdom/src/render-once.ts index aff3e7ca79..65bdd042c9 100644 --- a/packages/hdom/src/render-once.ts +++ b/packages/hdom/src/render-once.ts @@ -1,11 +1,11 @@ -import { isString } from "@thi.ng/checks/is-string"; import { HDOMImplementation, HDOMOpts } from "./api"; import { DEFAULT_IMPL } from "./default"; +import { resolveRoot } from "./utils"; /** * One-off hdom tree conversion & target DOM application. Takes same * options as `start()`, but performs no diffing and only creates or - * hydrates target once. The given tree is first normalized and not + * hydrates target once. The given tree is first normalized and no * further action will be taken, if the normalized result is `null` or * `undefined`. * @@ -15,9 +15,7 @@ import { DEFAULT_IMPL } from "./default"; */ export const renderOnce = (tree: any, opts?: Partial, impl: HDOMImplementation = DEFAULT_IMPL) => { opts = { root: "app", ...opts }; - const root = isString(opts.root) ? - document.getElementById(opts.root) : - opts.root; + const root = resolveRoot(opts.root); tree = impl.normalizeTree(opts, tree); if (!tree) return; opts.hydrate ? diff --git a/packages/hdom/src/start.ts b/packages/hdom/src/start.ts index 3726b5ee10..043af9e915 100644 --- a/packages/hdom/src/start.ts +++ b/packages/hdom/src/start.ts @@ -1,7 +1,6 @@ -import { isString } from "@thi.ng/checks/is-string"; - import { HDOMImplementation, HDOMOpts } from "./api"; import { DEFAULT_IMPL } from "./default"; +import { resolveRoot } from "./utils"; /** * Takes an hiccup tree (array, function or component object w/ life @@ -45,9 +44,7 @@ export const start = (tree: any, opts?: Partial, impl: HDOMImplementat opts = { root: "app", ...opts }; let prev = []; let isActive = true; - const root = isString(opts.root) ? - document.getElementById(opts.root) : - opts.root; + const root = resolveRoot(opts.root); const update = () => { if (isActive) { const curr = impl.normalizeTree(opts, tree); diff --git a/packages/hdom/src/utils.ts b/packages/hdom/src/utils.ts new file mode 100644 index 0000000000..01c9a39797 --- /dev/null +++ b/packages/hdom/src/utils.ts @@ -0,0 +1,6 @@ +import { isString } from "@thi.ng/checks/is-string"; + +export const resolveRoot = (root: any) => + isString(root) ? + document.getElementById(root) : + root; \ No newline at end of file diff --git a/packages/heaps/CHANGELOG.md b/packages/heaps/CHANGELOG.md index 7a55ccaf75..87b30449d6 100644 --- a/packages/heaps/CHANGELOG.md +++ b/packages/heaps/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.19](https://github.com/thi-ng/umbrella/compare/@thi.ng/heaps@0.2.18...@thi.ng/heaps@0.2.19) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/heaps + + + + + ## [0.2.18](https://github.com/thi-ng/umbrella/compare/@thi.ng/heaps@0.2.17...@thi.ng/heaps@0.2.18) (2018-09-22) diff --git a/packages/heaps/README.md b/packages/heaps/README.md index c01078544f..fcc509ffd6 100644 --- a/packages/heaps/README.md +++ b/packages/heaps/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/heaps.svg)](https://www.npmjs.com/package/@thi.ng/heaps) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/heaps.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/heaps/package.json b/packages/heaps/package.json index f161b97f4a..c74b7c0b44 100644 --- a/packages/heaps/package.json +++ b/packages/heaps/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/heaps", - "version": "0.2.18", + "version": "0.2.19", "description": "Generic binary heap & d-ary heap implementations with customizable ordering", "main": "./index.js", "typings": "./index.d.ts", @@ -28,8 +28,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/compare": "^0.1.8" + "@thi.ng/api": "^4.2.1", + "@thi.ng/compare": "^0.1.9" }, "keywords": [ "data structure", diff --git a/packages/hiccup-css/CHANGELOG.md b/packages/hiccup-css/CHANGELOG.md index 1ca2e50f10..5ab23e7314 100644 --- a/packages/hiccup-css/CHANGELOG.md +++ b/packages/hiccup-css/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.23](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-css@0.2.22...@thi.ng/hiccup-css@0.2.23) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/hiccup-css + + + + + ## [0.2.22](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-css@0.2.22-alpha.1...@thi.ng/hiccup-css@0.2.22) (2018-09-22) diff --git a/packages/hiccup-css/README.md b/packages/hiccup-css/README.md index 8c485063d8..cc99bcc994 100644 --- a/packages/hiccup-css/README.md +++ b/packages/hiccup-css/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/hiccup-css.svg)](https://www.npmjs.com/package/@thi.ng/hiccup-css) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/hiccup-css.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/hiccup-css/package.json b/packages/hiccup-css/package.json index ffdd2f843e..b33d830cf1 100644 --- a/packages/hiccup-css/package.json +++ b/packages/hiccup-css/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/hiccup-css", - "version": "0.2.22", + "version": "0.2.23", "description": "CSS from nested JS data structures", "main": "./index.js", "typings": "./index.d.ts", @@ -28,10 +28,10 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "clojure", diff --git a/packages/hiccup-svg/CHANGELOG.md b/packages/hiccup-svg/CHANGELOG.md index 7bbe99cef1..1e0f5fed39 100644 --- a/packages/hiccup-svg/CHANGELOG.md +++ b/packages/hiccup-svg/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@2.0.1...@thi.ng/hiccup-svg@2.0.2) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/hiccup-svg + + + + + + +## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@2.0.0...@thi.ng/hiccup-svg@2.0.1) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/hiccup-svg + + + + + # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@2.0.0-alpha.1...@thi.ng/hiccup-svg@2.0.0) (2018-09-22) diff --git a/packages/hiccup-svg/README.md b/packages/hiccup-svg/README.md index 7c455b990e..afd9026745 100644 --- a/packages/hiccup-svg/README.md +++ b/packages/hiccup-svg/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/hiccup-svg.svg)](https://www.npmjs.com/package/@thi.ng/hiccup-svg) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/hiccup-svg.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. @@ -32,6 +33,22 @@ svg.svg(svg.circle([0, 0], 100, { fill: "red" })); [svg.svg, [svg.circle, [0, 0], 100, { fill: "red" }]] ``` +### SVG conversion of hdom-canvas shape trees + +Since v2.0.0 this package provides a conversion utility to translate the +more compact syntax used for +[@thi.ng/hdom-canvas](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-canvas) +shape trees (designed for more performant realtime canvas drawing) into +a SVG serializable hiccup format. + +The `convertTree()` function takes a normalized hiccup tree of +hdom-canvas shape definitions and recursively converts it into an hiccup +flavor which is ready for SVG serialization. This conversion also +involves translation & re-organization of various attributes. The +function returns a new tree. The original remains untouched, as will any +unrecognized tree/shape nodes (those will be transferred as-is to the +result tree). See example below. + ## Installation ```bash @@ -49,7 +66,8 @@ import * as svg from "@thi.ng/hiccup-svg"; import { serialize } from "@thi.ng/hiccup"; import * as fs from "fs"; -fs.writeFileSync("hello.svg", +fs.writeFileSync( + "hello.svg", serialize( svg.svg( {width: 100, height: 100}, @@ -60,6 +78,54 @@ fs.writeFileSync("hello.svg", )); ``` +Minimal example showing SVG conversion of a hdom-canvas scene: + +```ts +// scene tree defined for hdom-canvas +const scene = [ + ["defs", {}, + ["radialGradient", + { id: "bg", from: [150, 280], to: [150, 300], r1: 300, r2: 100 }, + [[0, "#07f"], [0.5, "#0ef"], [0.8, "#efe"], [1, "#af0"]]], + ["radialGradient", + { id: "sun", from: [110, 120], to: [110, 120], r1: 5, r2: 50 }, + [[0, "#fff"], [1, "rgba(255,255,192,0)"]]] + ], + ["circle", { fill: "$bg" }, [150, 150], 130], + ["circle", { fill: "$sun" }, [110, 120], 50], +]; + +fs.writeFileSync( + "radialgradient.svg", + serialize( + svg.svg({ width: 300, height: 300 }, svg.convertTree(scene)) + ) +); +``` + +Result: + +```xml + + + + + + + + + + + + + + + + +``` + ## Authors - Karsten Schmidt diff --git a/packages/hiccup-svg/package.json b/packages/hiccup-svg/package.json index dc2b6a30a4..75f92415d0 100644 --- a/packages/hiccup-svg/package.json +++ b/packages/hiccup-svg/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/hiccup-svg", - "version": "2.0.0", + "version": "2.0.2", "description": "SVG element functions for @thi.ng/hiccup & @thi.ng/hdom", "main": "./index.js", "typings": "./index.d.ts", @@ -28,7 +28,7 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/hiccup": "^2.3.0" + "@thi.ng/hiccup": "^2.4.1" }, "keywords": [ "components", diff --git a/packages/hiccup/CHANGELOG.md b/packages/hiccup/CHANGELOG.md index c3657552d5..d2d75155d5 100644 --- a/packages/hiccup/CHANGELOG.md +++ b/packages/hiccup/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.4.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@2.4.0...@thi.ng/hiccup@2.4.1) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/hiccup + + + + + + +# [2.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@2.3.0...@thi.ng/hiccup@2.4.0) (2018-09-23) + + +### Features + +* **hiccup:** emmet class & class attrib merging in normalize() ([1d8eeb4](https://github.com/thi-ng/umbrella/commit/1d8eeb4)) + + + + + # [2.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@2.2.1-alpha.1...@thi.ng/hiccup@2.3.0) (2018-09-22) diff --git a/packages/hiccup/README.md b/packages/hiccup/README.md index 587398a6dc..82526e8c29 100644 --- a/packages/hiccup/README.md +++ b/packages/hiccup/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/hiccup.svg)](https://www.npmjs.com/package/@thi.ng/hiccup) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/hiccup.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. @@ -11,6 +12,7 @@ This project is part of the - [About](#about) - [Features](#features) - [Use cases](#use-cases) + - [Related packages](#related-packages) - [No special sauce needed (or wanted)](#no-special-sauce-needed-or-wanted) - [What is Hiccup?](#what-is-hiccup) - [Installation](#installation) @@ -67,6 +69,13 @@ serialization time. Examples below... - Serverside rendering - Static site, feed generation - SVG asset generation +- Shape trees for declarative canvas API drawing + +### Related packages + +- [@thi.ng/hdom](https://github.com/thi-ng/umbrella/tree/master/packages/hdom) +- [@thi.ng/hdom-canvas](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-canvas) +- [@thi.ng/hiccup-svg](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup-svg) ### No special sauce needed (or wanted) @@ -272,6 +281,10 @@ serialize([div, {id: "foo"}, "bar"]); ### SVG generation, generators & lazy composition +Also see +[@thi.ng/hiccup-svg](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup-svg) +for related functionality. + ```ts const fs = require("fs"); diff --git a/packages/hiccup/package.json b/packages/hiccup/package.json index 66d04d6adb..78ea6154f3 100644 --- a/packages/hiccup/package.json +++ b/packages/hiccup/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/hiccup", - "version": "2.3.0", + "version": "2.4.1", "description": "HTML/SVG/XML serialization of nested data structures, iterables & closures", "main": "./index.js", "typings": "./index.d.ts", @@ -20,7 +20,7 @@ "test": "rm -rf build && tsc -p test && nyc mocha build/test/*.js" }, "devDependencies": { - "@thi.ng/atom": "^1.5.3", + "@thi.ng/atom": "^1.5.4", "@types/mocha": "^5.2.5", "@types/node": "^10.5.5", "mocha": "^5.2.0", @@ -29,8 +29,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "clojure", diff --git a/packages/hiccup/src/serialize.ts b/packages/hiccup/src/serialize.ts index 0740403afe..db9114e166 100644 --- a/packages/hiccup/src/serialize.ts +++ b/packages/hiccup/src/serialize.ts @@ -222,8 +222,10 @@ const _serializeIter = (iter: Iterable, ctx: any, esc: boolean, span: boole } const normalize = (tag: any[]) => { - let el = tag[0], match, id, clazz; - const attribs: any = {}; + let el = tag[0]; + let match, id, clazz; + const hasAttribs = isPlainObject(tag[1]); + const attribs: any = hasAttribs ? { ...tag[1] } : {}; if (!isString(el) || !(match = TAG_REGEXP.exec(el))) { illegalArgs(`"${el}" is not a valid tag name`); } @@ -234,19 +236,18 @@ const normalize = (tag: any[]) => { attribs.id = id; } if (clazz) { - attribs.class = clazz.replace(/\./g, " "); + clazz = clazz.replace(/\./g, " "); + if (attribs.class) { + attribs.class += " " + clazz; + } else { + attribs.class = clazz; + } } if (tag.length > 1) { - let i = 1; - const att = tag[1]; - if (isPlainObject(att)) { - Object.assign(attribs, att); - i++; - } if (isPlainObject(attribs.style)) { attribs.style = css(attribs.style); } - tag = tag.slice(i).filter((x) => x != null); + tag = tag.slice(hasAttribs ? 2 : 1).filter((x) => x != null); if (tag.length > 0) { return [el, attribs, tag]; } diff --git a/packages/hiccup/test/index.ts b/packages/hiccup/test/index.ts index 4ad8069ab6..4a83c9e6fb 100644 --- a/packages/hiccup/test/index.ts +++ b/packages/hiccup/test/index.ts @@ -46,7 +46,13 @@ describe("serialize", () => { check( "div w/ id, class & attrib", ["div#foo.bar.baz", { extra: 23 }, "foo"], - `
foo
` + `
foo
` + ); + + check( + "div w/ class merging", + ["div.foo", { class: "bar baz" }, "foo"], + `
foo
` ); check( diff --git a/packages/iges/CHANGELOG.md b/packages/iges/CHANGELOG.md index 0ddfc68a17..bd15babe16 100644 --- a/packages/iges/CHANGELOG.md +++ b/packages/iges/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.13](https://github.com/thi-ng/umbrella/compare/@thi.ng/iges@0.2.12...@thi.ng/iges@0.2.13) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/iges + + + + + ## [0.2.12](https://github.com/thi-ng/umbrella/compare/@thi.ng/iges@0.2.12-alpha.1...@thi.ng/iges@0.2.12) (2018-09-22) diff --git a/packages/iges/README.md b/packages/iges/README.md index 51fe3f3183..f02f7baf14 100644 --- a/packages/iges/README.md +++ b/packages/iges/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/iges.svg)](https://www.npmjs.com/package/@thi.ng/iges) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/iges.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/iges/package.json b/packages/iges/package.json index 8d56e3f127..3976c496fb 100644 --- a/packages/iges/package.json +++ b/packages/iges/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/iges", - "version": "0.2.12", + "version": "0.2.13", "description": "IGES 5.3 serializer for (currently only) polygonal geometry, both open & closed", "main": "./index.js", "typings": "./index.d.ts", @@ -28,10 +28,10 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/defmulti": "^0.3.10", - "@thi.ng/strings": "^0.4.1", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/defmulti": "^0.3.11", + "@thi.ng/strings": "^0.4.2", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "CAD", diff --git a/packages/interceptors/CHANGELOG.md b/packages/interceptors/CHANGELOG.md index 8502708ef0..ba0a5b36a0 100644 --- a/packages/interceptors/CHANGELOG.md +++ b/packages/interceptors/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.8.15](https://github.com/thi-ng/umbrella/compare/@thi.ng/interceptors@1.8.14...@thi.ng/interceptors@1.8.15) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/interceptors + + + + + ## [1.8.14](https://github.com/thi-ng/umbrella/compare/@thi.ng/interceptors@1.8.14-alpha.1...@thi.ng/interceptors@1.8.14) (2018-09-22) diff --git a/packages/interceptors/README.md b/packages/interceptors/README.md index 8c0373faf5..de78f32687 100644 --- a/packages/interceptors/README.md +++ b/packages/interceptors/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/interceptors.svg)](https://www.npmjs.com/package/@thi.ng/interceptors) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/interceptors.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. @@ -40,6 +41,7 @@ and examples for now: Introductory: - [/examples/interceptor-basics](https://github.com/thi-ng/umbrella/tree/master/examples/interceptor-basics) | [live demo](https://demo.thi.ng/umbrella/interceptor-basics) +- [/examples/interceptor-basics2](https://github.com/thi-ng/umbrella/tree/master/examples/interceptor-basics2) | [live demo](https://demo.thi.ng/umbrella/interceptor-basics2) - [/examples/async-effect](https://github.com/thi-ng/umbrella/tree/master/examples/async-effect) | [live demo](https://demo.thi.ng/umbrella/async-effect) Advanced: diff --git a/packages/interceptors/package.json b/packages/interceptors/package.json index 4a279f55b1..3d13177378 100644 --- a/packages/interceptors/package.json +++ b/packages/interceptors/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/interceptors", - "version": "1.8.14", + "version": "1.8.15", "description": "Interceptor based event bus, side effect & immutable state handling", "main": "./index.js", "typings": "./index.d.ts", @@ -28,11 +28,11 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/atom": "^1.5.3", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/paths": "^1.6.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/atom": "^1.5.4", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/paths": "^1.6.3" }, "keywords": [ "ES6", diff --git a/packages/iterators/CHANGELOG.md b/packages/iterators/CHANGELOG.md index 6a10e834b8..c230d20ba4 100644 --- a/packages/iterators/CHANGELOG.md +++ b/packages/iterators/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [4.1.29](https://github.com/thi-ng/umbrella/compare/@thi.ng/iterators@4.1.28...@thi.ng/iterators@4.1.29) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/iterators + + + + + ## [4.1.28](https://github.com/thi-ng/umbrella/compare/@thi.ng/iterators@4.1.28-alpha.1...@thi.ng/iterators@4.1.28) (2018-09-22) diff --git a/packages/iterators/README.md b/packages/iterators/README.md index 9154214dec..bf2336d8e5 100644 --- a/packages/iterators/README.md +++ b/packages/iterators/README.md @@ -2,6 +2,7 @@ ![npm version](https://img.shields.io/npm/v/@thi.ng/iterators.svg) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/iterators.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/iterators/package.json b/packages/iterators/package.json index 90fe70349c..f55b3b4af1 100644 --- a/packages/iterators/package.json +++ b/packages/iterators/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/iterators", - "version": "4.1.28", + "version": "4.1.29", "description": "clojure.core inspired, composable ES6 iterators & generators", "main": "./index.js", "typings": "./index.d.ts", @@ -28,9 +28,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/dcons": "^1.1.7", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/api": "^4.2.1", + "@thi.ng/dcons": "^1.1.8", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "clojure", diff --git a/packages/memoize/CHANGELOG.md b/packages/memoize/CHANGELOG.md index c33faaf3dd..e6cc190b8a 100644 --- a/packages/memoize/CHANGELOG.md +++ b/packages/memoize/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@0.2.2...@thi.ng/memoize@0.2.3) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/memoize + + + + + ## [0.2.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@0.2.1...@thi.ng/memoize@0.2.2) (2018-09-22) diff --git a/packages/memoize/README.md b/packages/memoize/README.md index a898878a24..8e8407dae5 100644 --- a/packages/memoize/README.md +++ b/packages/memoize/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/memoize.svg)](https://www.npmjs.com/package/@thi.ng/memoize) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/memoize.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/memoize/package.json b/packages/memoize/package.json index c60e5f6c29..9954aaefa7 100644 --- a/packages/memoize/package.json +++ b/packages/memoize/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/memoize", - "version": "0.2.2", + "version": "0.2.3", "description": "Function memoization with configurable caches", "main": "./index.js", "typings": "./index.d.ts", @@ -28,7 +28,7 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0" + "@thi.ng/api": "^4.2.1" }, "keywords": [ "cache", diff --git a/packages/paths/CHANGELOG.md b/packages/paths/CHANGELOG.md index 67b1583282..806ea73d63 100644 --- a/packages/paths/CHANGELOG.md +++ b/packages/paths/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.6.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/paths@1.6.2...@thi.ng/paths@1.6.3) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/paths + + + + + ## [1.6.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/paths@1.6.2-alpha.0...@thi.ng/paths@1.6.2) (2018-09-22) diff --git a/packages/paths/README.md b/packages/paths/README.md index c076c058cd..90868d1735 100644 --- a/packages/paths/README.md +++ b/packages/paths/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/paths.svg)](https://www.npmjs.com/package/@thi.ng/paths) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/paths.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/paths/package.json b/packages/paths/package.json index 6a5cd57fc8..91108ab7d1 100644 --- a/packages/paths/package.json +++ b/packages/paths/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/paths", - "version": "1.6.2", + "version": "1.6.3", "description": "immutable, optimized path-based object property / array accessors", "main": "./index.js", "typings": "./index.d.ts", @@ -28,8 +28,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "accessors", diff --git a/packages/pointfree-lang/CHANGELOG.md b/packages/pointfree-lang/CHANGELOG.md index adac00af22..ea8b0a4e52 100644 --- a/packages/pointfree-lang/CHANGELOG.md +++ b/packages/pointfree-lang/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.22](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree-lang@0.2.21...@thi.ng/pointfree-lang@0.2.22) (2018-09-24) + + +### Performance Improvements + +* **pointfree-lang:** `NodeType` => const enum ([a7b9a42](https://github.com/thi-ng/umbrella/commit/a7b9a42)) + + + + + ## [0.2.21](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree-lang@0.2.21-alpha.0...@thi.ng/pointfree-lang@0.2.21) (2018-09-22) diff --git a/packages/pointfree-lang/README.md b/packages/pointfree-lang/README.md index a9c4be6ac9..b143e262ef 100644 --- a/packages/pointfree-lang/README.md +++ b/packages/pointfree-lang/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/pointfree-lang.svg)](https://www.npmjs.com/package/@thi.ng/pointfree-lang) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/pointfree-lang.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/pointfree-lang/package.json b/packages/pointfree-lang/package.json index 3fea59288b..4ea76dcc2f 100644 --- a/packages/pointfree-lang/package.json +++ b/packages/pointfree-lang/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/pointfree-lang", - "version": "0.2.21", + "version": "0.2.22", "description": "Forth style syntax layer/compiler for the @thi.ng/pointfree DSL", "main": "./index.js", "typings": "./index.d.ts", @@ -30,9 +30,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/pointfree": "^0.8.9" + "@thi.ng/api": "^4.2.1", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/pointfree": "^0.8.10" }, "keywords": [ "concatenative", diff --git a/packages/pointfree-lang/src/api.ts b/packages/pointfree-lang/src/api.ts index 5deee4d70f..66e48dab41 100644 --- a/packages/pointfree-lang/src/api.ts +++ b/packages/pointfree-lang/src/api.ts @@ -13,7 +13,7 @@ export interface VisitorState { word: boolean; } -export enum NodeType { +export const enum NodeType { SYM = 1, WORD, @@ -31,6 +31,11 @@ export enum NodeType { STACK_COMMENT, }; +/** + * Reverse lookup for `NodeType` enums + */ +export const __NodeType = (exports).NodeType; + export const ALIASES: IObjectOf = { "?drop": pf.dropif, "?dup": pf.dupif, diff --git a/packages/pointfree-lang/src/grammar.pegjs b/packages/pointfree-lang/src/grammar.pegjs index bf2866fbec..0b628fee70 100644 --- a/packages/pointfree-lang/src/grammar.pegjs +++ b/packages/pointfree-lang/src/grammar.pegjs @@ -1,19 +1,19 @@ { - const NodeType = require("./api").NodeType; - - // const NodeType = {}; - // NodeType[NodeType["SYM"] = 1] = "SYM"; - // NodeType[NodeType["WORD"] = 2] = "WORD"; - // NodeType[NodeType["VAR_DEREF"] = 3] = "VAR_DEREF"; - // NodeType[NodeType["VAR_STORE"] = 4] = "VAR_STORE"; - // NodeType[NodeType["NIL"] = 5] = "NIL"; - // NodeType[NodeType["NUMBER"] = 6] = "NUMBER"; - // NodeType[NodeType["BOOLEAN"] = 7] = "BOOLEAN"; - // NodeType[NodeType["STRING"] = 8] = "STRING"; - // NodeType[NodeType["ARRAY"] = 9] = "ARRAY"; - // NodeType[NodeType["OBJ"] = 10] = "OBJ"; - // NodeType[NodeType["COMMENT"] = 11] = "COMMENT"; - // NodeType[NodeType["STACK_COMMENT"] = 12] = "STACK_COMMENT"; + const __NodeType = require("./api").__NodeType; + + // const __NodeType = {}; + // __NodeType[__NodeType["SYM"] = 1] = "SYM"; + // __NodeType[__NodeType["WORD"] = 2] = "WORD"; + // __NodeType[__NodeType["VAR_DEREF"] = 3] = "VAR_DEREF"; + // __NodeType[__NodeType["VAR_STORE"] = 4] = "VAR_STORE"; + // __NodeType[__NodeType["NIL"] = 5] = "NIL"; + // __NodeType[__NodeType["NUMBER"] = 6] = "NUMBER"; + // __NodeType[__NodeType["BOOLEAN"] = 7] = "BOOLEAN"; + // __NodeType[__NodeType["STRING"] = 8] = "STRING"; + // __NodeType[__NodeType["ARRAY"] = 9] = "ARRAY"; + // __NodeType[__NodeType["OBJ"] = 10] = "OBJ"; + // __NodeType[__NodeType["COMMENT"] = 11] = "COMMENT"; + // __NodeType[__NodeType["STACK_COMMENT"] = 12] = "STACK_COMMENT"; const ast = (node) => { const loc = location().start; @@ -42,7 +42,7 @@ NonWordExpr Word = ":" __ id:Sym locals:LocalVars? body:NonWordExpr+ ";" { - return { type: NodeType.WORD, id: id.id, locals, body}; + return { type: __NodeType.WORD, id: id.id, locals, body}; } LocalVars @@ -55,12 +55,12 @@ SymList Array = "[" body:NonWordExpr* "]" { - return { type: NodeType.ARRAY, body }; + return { type: __NodeType.ARRAY, body }; } Obj = "{" _ body:ObjPair* "}" { - return { type: NodeType.OBJ, body }; + return { type: __NodeType.OBJ, body }; } ObjPair @@ -92,17 +92,17 @@ Atom Nil = "nil" { - return {type: NodeType.NIL, body: null}; + return {type: __NodeType.NIL, body: null}; } Boolean = $("T" / "F") { - return {type: NodeType.BOOLEAN, body: text() == "T"}; + return {type: __NodeType.BOOLEAN, body: text() == "T"}; } Sym = id:$((Alpha / SymChars) (AlphaNum / SymChars)*) { - return {type: NodeType.SYM, id}; + return {type: __NodeType.SYM, id}; } SymChars @@ -114,35 +114,35 @@ Var VarDeref = "@" id:Sym { - return {type: NodeType.VAR_DEREF, id: id.id} + return {type: __NodeType.VAR_DEREF, id: id.id} } VarStore = id:Sym "!" { - return {type: NodeType.VAR_STORE, id: id.id} + return {type: __NodeType.VAR_STORE, id: id.id} } LitQuote = "'" body:NonWordExpr { - return {type: NodeType.ARRAY, body: [body]}; + return {type: __NodeType.ARRAY, body: [body]}; } Comment = "("+ body:$(!")" .)* ")" { return body.indexOf("--") > 0 ? { - type: NodeType.STACK_COMMENT, + type: __NodeType.STACK_COMMENT, body: body.split("--").map(x => x.trim()) } : { - type: NodeType.COMMENT, + type: __NodeType.COMMENT, body: body.trim() }; } String = "\"" body:$(!"\"" .)* "\"" { - return {type: NodeType.STRING, body }; + return {type: __NodeType.STRING, body }; } Number @@ -154,12 +154,12 @@ Sign = [-+] Binary = "0b" n:$[01]+ { - return {type: NodeType.NUMBER, radix: 2, body: parseInt(n, 2)}; + return {type: __NodeType.NUMBER, radix: 2, body: parseInt(n, 2)}; } Hex = "0x" n:$[0-9a-fA-F]+ { - return {type: NodeType.NUMBER, radix: 16, body: parseInt(n, 16)}; + return {type: __NodeType.NUMBER, radix: 16, body: parseInt(n, 16)}; } Int @@ -170,7 +170,7 @@ Uint Decimal = Int ("." Uint?)? ("e" Int)? { - return {type: NodeType.NUMBER, body: parseFloat(text())}; + return {type: __NodeType.NUMBER, body: parseFloat(text())}; } AlphaNum diff --git a/packages/pointfree-lang/src/index.ts b/packages/pointfree-lang/src/index.ts index 29771fc7a3..18035ecbcd 100644 --- a/packages/pointfree-lang/src/index.ts +++ b/packages/pointfree-lang/src/index.ts @@ -4,6 +4,7 @@ import { illegalState } from "@thi.ng/errors/illegal-state"; import * as pf from "@thi.ng/pointfree"; import { + __NodeType, ALIASES, ASTNode, NodeType, @@ -186,7 +187,7 @@ const endvar = (id: string) => (ctx: pf.StackContext) => { * @param state */ const visit = (node: ASTNode, ctx: pf.StackContext, state: VisitorState) => { - DEBUG && console.log("visit", NodeType[node.type], node, ctx[0].toString()); + DEBUG && console.log("visit", __NodeType[node.type], node, ctx[0].toString()); switch (node.type) { case NodeType.SYM: return visitSym(node, ctx, state); diff --git a/packages/pointfree/CHANGELOG.md b/packages/pointfree/CHANGELOG.md index 9d7b3ed024..f57a86a635 100644 --- a/packages/pointfree/CHANGELOG.md +++ b/packages/pointfree/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.8.10](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.8.9...@thi.ng/pointfree@0.8.10) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/pointfree + + + + + ## [0.8.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.8.9-alpha.0...@thi.ng/pointfree@0.8.9) (2018-09-22) diff --git a/packages/pointfree/README.md b/packages/pointfree/README.md index 536ad04bc4..78fdacc6cd 100644 --- a/packages/pointfree/README.md +++ b/packages/pointfree/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/pointfree.svg)](https://www.npmjs.com/package/@thi.ng/pointfree) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/pointfree.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/pointfree/package.json b/packages/pointfree/package.json index 58bb97583b..9ccfa0414d 100644 --- a/packages/pointfree/package.json +++ b/packages/pointfree/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/pointfree", - "version": "0.8.9", + "version": "0.8.10", "description": "Pointfree functional composition / Forth style stack execution engine", "main": "./index.js", "typings": "./index.d.ts", @@ -28,10 +28,10 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "composition", diff --git a/packages/range-coder/CHANGELOG.md b/packages/range-coder/CHANGELOG.md index 63f013f508..0129415a6b 100644 --- a/packages/range-coder/CHANGELOG.md +++ b/packages/range-coder/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.13](https://github.com/thi-ng/umbrella/compare/@thi.ng/range-coder@0.1.12...@thi.ng/range-coder@0.1.13) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/range-coder + + + + + ## [0.1.12](https://github.com/thi-ng/umbrella/compare/@thi.ng/range-coder@0.1.12-alpha.1...@thi.ng/range-coder@0.1.12) (2018-09-22) diff --git a/packages/range-coder/README.md b/packages/range-coder/README.md index 4e322c0cf0..7acd8fd4f7 100644 --- a/packages/range-coder/README.md +++ b/packages/range-coder/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/range-coder.svg)](https://www.npmjs.com/package/@thi.ng/range-coder) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/range-coder.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/range-coder/package.json b/packages/range-coder/package.json index 85256854ba..0f87a53c46 100644 --- a/packages/range-coder/package.json +++ b/packages/range-coder/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/range-coder", - "version": "0.1.12", + "version": "0.1.13", "description": "Binary data range encoder / decoder", "main": "./index.js", "typings": "./index.d.ts", @@ -20,7 +20,7 @@ "test": "rm -rf build && tsc -p test && nyc mocha build/test/*.js" }, "devDependencies": { - "@thi.ng/transducers": "^2.1.2", + "@thi.ng/transducers": "^2.1.3", "@types/mocha": "^5.2.5", "@types/node": "^10.5.5", "mocha": "^5.2.0", @@ -29,7 +29,7 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/bitstream": "^0.4.17" + "@thi.ng/bitstream": "^0.4.18" }, "keywords": [ "ES6", diff --git a/packages/resolve-map/CHANGELOG.md b/packages/resolve-map/CHANGELOG.md index 497767802f..e90291fc0e 100644 --- a/packages/resolve-map/CHANGELOG.md +++ b/packages/resolve-map/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [3.0.13](https://github.com/thi-ng/umbrella/compare/@thi.ng/resolve-map@3.0.12...@thi.ng/resolve-map@3.0.13) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/resolve-map + + + + + ## [3.0.12](https://github.com/thi-ng/umbrella/compare/@thi.ng/resolve-map@3.0.12-alpha.0...@thi.ng/resolve-map@3.0.12) (2018-09-22) diff --git a/packages/resolve-map/README.md b/packages/resolve-map/README.md index e4736e9970..13f3f5b379 100644 --- a/packages/resolve-map/README.md +++ b/packages/resolve-map/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/resolve-map.svg)](https://www.npmjs.com/package/@thi.ng/resolve-map) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/resolve-map.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/resolve-map/package.json b/packages/resolve-map/package.json index acbf80d2da..362dd0618e 100644 --- a/packages/resolve-map/package.json +++ b/packages/resolve-map/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/resolve-map", - "version": "3.0.12", + "version": "3.0.13", "description": "DAG resolution of vanilla objects & arrays with internally linked values", "main": "./index.js", "typings": "./index.d.ts", @@ -26,9 +26,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/paths": "^1.6.2" + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/paths": "^1.6.3" }, "keywords": [ "configuration", diff --git a/packages/rle-pack/CHANGELOG.md b/packages/rle-pack/CHANGELOG.md index 0d1bd3d09c..c25680b52d 100644 --- a/packages/rle-pack/CHANGELOG.md +++ b/packages/rle-pack/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/rle-pack@1.0.4...@thi.ng/rle-pack@1.0.5) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/rle-pack + + + + + ## [1.0.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/rle-pack@1.0.3...@thi.ng/rle-pack@1.0.4) (2018-09-22) diff --git a/packages/rle-pack/README.md b/packages/rle-pack/README.md index 7490069e2f..ca749ae0c9 100644 --- a/packages/rle-pack/README.md +++ b/packages/rle-pack/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rle-pack.svg)](https://www.npmjs.com/package/@thi.ng/rle-pack) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rle-pack.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/rle-pack/package.json b/packages/rle-pack/package.json index 4db33a2f30..7859f6e923 100644 --- a/packages/rle-pack/package.json +++ b/packages/rle-pack/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rle-pack", - "version": "1.0.4", + "version": "1.0.5", "description": "Binary run-length encoding packer w/ flexible repeat bit widths", "main": "./index.js", "typings": "./index.d.ts", @@ -29,8 +29,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/bitstream": "^0.4.17", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/bitstream": "^0.4.18", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "binary", diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 6953e8fe2e..5cd17f7255 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.25](https://github.com/thi-ng/umbrella/compare/@thi.ng/router@0.1.24...@thi.ng/router@0.1.25) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/router + + + + + ## [0.1.24](https://github.com/thi-ng/umbrella/compare/@thi.ng/router@0.1.24-alpha.0...@thi.ng/router@0.1.24) (2018-09-22) diff --git a/packages/router/README.md b/packages/router/README.md index 07767d2fad..7b35f79fe6 100644 --- a/packages/router/README.md +++ b/packages/router/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/router.svg)](https://www.npmjs.com/package/@thi.ng/router) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/router.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/router/package.json b/packages/router/package.json index 91c981a7bd..2dd801ca9d 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/router", - "version": "0.1.24", + "version": "0.1.25", "description": "Generic router for browser & non-browser based applications", "main": "./index.js", "typings": "./index.d.ts", @@ -27,10 +27,10 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "declarative", diff --git a/packages/rstream-csp/CHANGELOG.md b/packages/rstream-csp/CHANGELOG.md index 7d9ae5f379..b3722f4d15 100644 --- a/packages/rstream-csp/CHANGELOG.md +++ b/packages/rstream-csp/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.109](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-csp@0.1.108...@thi.ng/rstream-csp@0.1.109) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/rstream-csp + + + + + + +## [0.1.108](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-csp@0.1.107...@thi.ng/rstream-csp@0.1.108) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/rstream-csp + + + + + ## [0.1.107](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-csp@0.1.107-alpha.2...@thi.ng/rstream-csp@0.1.107) (2018-09-22) diff --git a/packages/rstream-csp/README.md b/packages/rstream-csp/README.md index 337fc4cd04..f5d0e56359 100644 --- a/packages/rstream-csp/README.md +++ b/packages/rstream-csp/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream-csp.svg)](https://www.npmjs.com/package/@thi.ng/rstream-csp) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rstream-csp.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/rstream-csp/package.json b/packages/rstream-csp/package.json index 45d907a1cf..4c07c313c9 100644 --- a/packages/rstream-csp/package.json +++ b/packages/rstream-csp/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rstream-csp", - "version": "0.1.107", + "version": "0.1.109", "description": "@thi.ng/csp bridge module for @thi.ng/rstream", "main": "./index.js", "typings": "./index.d.ts", @@ -28,8 +28,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/csp": "^0.3.63", - "@thi.ng/rstream": "^1.13.0" + "@thi.ng/csp": "^0.3.64", + "@thi.ng/rstream": "^1.13.2" }, "keywords": [ "bridge", diff --git a/packages/rstream-dot/CHANGELOG.md b/packages/rstream-dot/CHANGELOG.md index 706e952ec7..ebe4bc292f 100644 --- a/packages/rstream-dot/CHANGELOG.md +++ b/packages/rstream-dot/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.48](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@0.2.47...@thi.ng/rstream-dot@0.2.48) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/rstream-dot + + + + + + +## [0.2.47](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@0.2.46...@thi.ng/rstream-dot@0.2.47) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/rstream-dot + + + + + ## [0.2.46](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-dot@0.2.46-alpha.2...@thi.ng/rstream-dot@0.2.46) (2018-09-22) diff --git a/packages/rstream-dot/README.md b/packages/rstream-dot/README.md index dd20a97d85..979d362cdc 100644 --- a/packages/rstream-dot/README.md +++ b/packages/rstream-dot/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream-dot.svg)](https://www.npmjs.com/package/@thi.ng/rstream-dot) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rsteam-dot.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/rstream-dot/package.json b/packages/rstream-dot/package.json index 7d6af5edab..7679faf8d1 100644 --- a/packages/rstream-dot/package.json +++ b/packages/rstream-dot/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rstream-dot", - "version": "0.2.46", + "version": "0.2.48", "description": "Graphviz DOT conversion of @thi.ng/rstream dataflow graph topologies", "main": "./index.js", "typings": "./index.d.ts", @@ -28,7 +28,7 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/rstream": "^1.13.0" + "@thi.ng/rstream": "^1.13.2" }, "keywords": [ "conversion", diff --git a/packages/rstream-gestures/CHANGELOG.md b/packages/rstream-gestures/CHANGELOG.md index 6d99ce06ea..16e7b106df 100644 --- a/packages/rstream-gestures/CHANGELOG.md +++ b/packages/rstream-gestures/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.5.10](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-gestures@0.5.9...@thi.ng/rstream-gestures@0.5.10) (2018-09-24) + + +### Performance Improvements + +* **rstream-gestures:** `GestureType` => const enum ([8e4fc90](https://github.com/thi-ng/umbrella/commit/8e4fc90)) + + + + + + +## [0.5.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-gestures@0.5.8...@thi.ng/rstream-gestures@0.5.9) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/rstream-gestures + + + + + ## [0.5.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-gestures@0.5.8-alpha.2...@thi.ng/rstream-gestures@0.5.8) (2018-09-22) diff --git a/packages/rstream-gestures/README.md b/packages/rstream-gestures/README.md index 18656d0032..37f8076b46 100644 --- a/packages/rstream-gestures/README.md +++ b/packages/rstream-gestures/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream-gestures.svg)](https://www.npmjs.com/package/@thi.ng/rstream-gestures) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rstream-gestures.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/rstream-gestures/package.json b/packages/rstream-gestures/package.json index d5111ba012..0bb7c1a204 100644 --- a/packages/rstream-gestures/package.json +++ b/packages/rstream-gestures/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rstream-gestures", - "version": "0.5.8", + "version": "0.5.10", "description": "Unified mouse, mouse wheel & single-touch event stream abstraction", "main": "./index.js", "typings": "./index.d.ts", @@ -28,9 +28,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/rstream": "^1.13.0", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/rstream": "^1.13.2", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "dataflow", diff --git a/packages/rstream-gestures/src/index.ts b/packages/rstream-gestures/src/index.ts index c7c2be9195..7d2c647e33 100644 --- a/packages/rstream-gestures/src/index.ts +++ b/packages/rstream-gestures/src/index.ts @@ -3,7 +3,7 @@ import { fromEvent } from "@thi.ng/rstream/from/event"; import { merge, StreamMerge } from "@thi.ng/rstream/stream-merge"; import { map } from "@thi.ng/transducers/xform/map"; -export enum GestureType { +export const enum GestureType { START, MOVE, DRAG, @@ -11,6 +11,11 @@ export enum GestureType { ZOOM, } +/** + * Reverse lookup for `GestureType` enums + */ +export const __GestureType = (exports).GestureType; + export interface GestureInfo { pos: number[]; click: number[]; diff --git a/packages/rstream-graph/CHANGELOG.md b/packages/rstream-graph/CHANGELOG.md index df50776698..8e4195490a 100644 --- a/packages/rstream-graph/CHANGELOG.md +++ b/packages/rstream-graph/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.1.34](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-graph@2.1.33...@thi.ng/rstream-graph@2.1.34) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/rstream-graph + + + + + + +## [2.1.33](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-graph@2.1.32...@thi.ng/rstream-graph@2.1.33) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/rstream-graph + + + + + ## [2.1.32](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-graph@2.1.32-alpha.2...@thi.ng/rstream-graph@2.1.32) (2018-09-22) diff --git a/packages/rstream-graph/README.md b/packages/rstream-graph/README.md index 8fdf6267ef..b797abb671 100644 --- a/packages/rstream-graph/README.md +++ b/packages/rstream-graph/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream-graph.svg)](https://www.npmjs.com/package/@thi.ng/rstream-graph) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rstream-graph.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/rstream-graph/package.json b/packages/rstream-graph/package.json index 775076e90e..8b8236458d 100644 --- a/packages/rstream-graph/package.json +++ b/packages/rstream-graph/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rstream-graph", - "version": "2.1.32", + "version": "2.1.34", "description": "Declarative dataflow graph construction for @thi.ng/rstream", "main": "./index.js", "typings": "./index.d.ts", @@ -28,13 +28,13 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/paths": "^1.6.2", - "@thi.ng/resolve-map": "^3.0.12", - "@thi.ng/rstream": "^1.13.0", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/paths": "^1.6.3", + "@thi.ng/resolve-map": "^3.0.13", + "@thi.ng/rstream": "^1.13.2", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "compute", diff --git a/packages/rstream-log/CHANGELOG.md b/packages/rstream-log/CHANGELOG.md index 79d6d772d0..3df83e7c3c 100644 --- a/packages/rstream-log/CHANGELOG.md +++ b/packages/rstream-log/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.0.60](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log@1.0.59...@thi.ng/rstream-log@1.0.60) (2018-09-24) + + +### Performance Improvements + +* **rstream-log:** `Level` => const enum ([fc6a4d3](https://github.com/thi-ng/umbrella/commit/fc6a4d3)) + + + + + + +## [1.0.59](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log@1.0.58...@thi.ng/rstream-log@1.0.59) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/rstream-log + + + + + ## [1.0.58](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-log@1.0.58-alpha.2...@thi.ng/rstream-log@1.0.58) (2018-09-22) diff --git a/packages/rstream-log/README.md b/packages/rstream-log/README.md index 29ad0fba07..daf4a75595 100644 --- a/packages/rstream-log/README.md +++ b/packages/rstream-log/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream-log.svg)](https://www.npmjs.com/package/@thi.ng/rstream-log) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rstream-log.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/rstream-log/package.json b/packages/rstream-log/package.json index 568acd1aae..e3b06ad73b 100644 --- a/packages/rstream-log/package.json +++ b/packages/rstream-log/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rstream-log", - "version": "1.0.58", + "version": "1.0.60", "description": "Structured, multilevel & hierarchical loggers based on @thi.ng/rstream", "main": "./index.js", "typings": "./index.d.ts", @@ -28,11 +28,11 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/rstream": "^1.13.0", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/rstream": "^1.13.2", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "ES6", diff --git a/packages/rstream-log/src/api.ts b/packages/rstream-log/src/api.ts index 60c71c880c..38942c1ca8 100644 --- a/packages/rstream-log/src/api.ts +++ b/packages/rstream-log/src/api.ts @@ -1,7 +1,7 @@ import { IID } from "@thi.ng/api/api"; import { ISubscribable } from "@thi.ng/rstream/api"; -export enum Level { +export const enum Level { FINE, DEBUG, INFO, @@ -10,6 +10,11 @@ export enum Level { NONE, } +/** + * Reverse lookup for `Level` enums + */ +export const __Level = (exports).Level; + export interface LogEntry extends Array { [0]: Level; [1]: string; diff --git a/packages/rstream-log/src/xform/format.ts b/packages/rstream-log/src/xform/format.ts index 91b63d220b..e9de60c238 100644 --- a/packages/rstream-log/src/xform/format.ts +++ b/packages/rstream-log/src/xform/format.ts @@ -2,9 +2,9 @@ import { Transducer } from "@thi.ng/transducers/api"; import { map } from "@thi.ng/transducers/xform/map"; import { + __Level, BodyFormat, DateFormat, - Level, LogEntry, LogEntryObj } from "../api"; @@ -14,7 +14,7 @@ export function formatString(dtFmt?: DateFormat, bodyFmt?: BodyFormat): Transduc bodyFmt = bodyFmt || ((x) => x.toString()); return map( ([level, id, time, ...body]) => - `[${Level[level]}] [${id}] ${dtFmt(time)} ${bodyFmt(body)}` + `[${__Level[level]}] [${id}] ${dtFmt(time)} ${bodyFmt(body)}` ); } @@ -29,7 +29,7 @@ export function formatJSON(dtfmt?: (dt: number) => string): Transducer JSON.stringify({ - level: Level[level], + level: __Level[level], id, time: dtfmt(time), body diff --git a/packages/rstream-query/CHANGELOG.md b/packages/rstream-query/CHANGELOG.md index 070f03cb78..5d84732b30 100644 --- a/packages/rstream-query/CHANGELOG.md +++ b/packages/rstream-query/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.3.47](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-query@0.3.46...@thi.ng/rstream-query@0.3.47) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/rstream-query + + + + + + +## [0.3.46](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-query@0.3.45...@thi.ng/rstream-query@0.3.46) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/rstream-query + + + + + ## [0.3.45](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream-query@0.3.45-alpha.2...@thi.ng/rstream-query@0.3.45) (2018-09-22) diff --git a/packages/rstream-query/README.md b/packages/rstream-query/README.md index 2df3881799..c1a1e4fbe6 100644 --- a/packages/rstream-query/README.md +++ b/packages/rstream-query/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream-query.svg)](https://www.npmjs.com/package/@thi.ng/rstream-query) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rstream-query.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/rstream-query/package.json b/packages/rstream-query/package.json index c2bc5c683b..d6d21378ba 100644 --- a/packages/rstream-query/package.json +++ b/packages/rstream-query/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rstream-query", - "version": "0.3.45", + "version": "0.3.47", "description": "@thi.ng/rstream based triple store & reactive query engine", "main": "./index.js", "typings": "./index.d.ts", @@ -28,14 +28,14 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/associative": "^0.6.7", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/rstream": "^1.13.0", - "@thi.ng/rstream-dot": "^0.2.46", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/associative": "^0.6.8", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/rstream": "^1.13.2", + "@thi.ng/rstream-dot": "^0.2.48", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "dataflow", diff --git a/packages/rstream/CHANGELOG.md b/packages/rstream/CHANGELOG.md index 34cb9bf2c4..6426c24926 100644 --- a/packages/rstream/CHANGELOG.md +++ b/packages/rstream/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.13.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream@1.13.1...@thi.ng/rstream@1.13.2) (2018-09-24) + + +### Performance Improvements + +* **rstream:** `State` => const enum ([7ac83c6](https://github.com/thi-ng/umbrella/commit/7ac83c6)) + + + + + + +## [1.13.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream@1.13.0...@thi.ng/rstream@1.13.1) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/rstream + + + + + # [1.13.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rstream@1.12.2-alpha.2...@thi.ng/rstream@1.13.0) (2018-09-22) diff --git a/packages/rstream/README.md b/packages/rstream/README.md index 5e2b54e782..d24d2b4b19 100644 --- a/packages/rstream/README.md +++ b/packages/rstream/README.md @@ -2,10 +2,35 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream.svg)](https://www.npmjs.com/package/@thi.ng/rstream) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rstream.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. + + +- [About](#about) +- [Support packages](#support-packages) +- [Conceptual differences to RxJS](#conceptual-differences-to-rxjs) +- [Installation](#installation) +- [Dependencies](#dependencies) +- [Usage examples](#usage-examples) + - [Realtime crypto candle chart](#realtime-crypto-candle-chart) + - [Interactive SVG grid generator](#interactive-svg-grid-generator) + - [Mouse gesture analysis](#mouse-gesture-analysis) + - [Declarative dataflow graph](#declarative-dataflow-graph) + - [@thi.ng/hdom benchmark](#thinghdom-benchmark) +- [API](#api) + - [Stream creation](#stream-creation) + - [Stream merging](#stream-merging) + - [Stream splitting](#stream-splitting) + - [Side-chaining](#side-chaining) + - [Other subscription ops](#other-subscription-ops) +- [Authors](#authors) +- [License](#license) + + + ## About Lightweight reactive multi-tap streams and transducer based @@ -25,8 +50,105 @@ programming: - **Recursive teardown**: Whenever possible, any unsubscription initiates cleanup and propagates to parent(s). -Using these building blocks, a growing number of high-level operations -are provided too: +## Support packages + +- [@thi.ng/rstream-csp](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-csp) - CSP channel-to-stream adapter +- [@thi.ng/rstream-dot](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-dot) - GraphViz DOT conversion of rstream dataflow graph topologies +- [@thi.ng/rstream-gestures](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-gestures) - unified mouse, single-touch & wheel event stream +- [@thi.ng/rstream-graph](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-graph) - declarative dataflow graph construction +- [@thi.ng/rstream-log](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-log) - extensible multi-level, multi-target structured logging +- [@thi.ng/rstream-query](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-query) - triple store & query engine + +## Conceptual differences to RxJS + +(No value judgements implied - there's room for both approaches!) + +- Streams are not the same as Observables: I.e. stream sources are NOT + (often just cannot) re-run for each new sub added. Only the first sub + is guaranteed to receive **all** values. Subs added at a later time + MIGHT not receive earlier emitted values, but only the most recent + emitted and any future values) +- Every subscription supports any number of subscribers, which can be + added/removed at any time +- Every unsubscription recursively triggers upstream unsubscriptions + (provided a parent has no other active child subscriptions) +- Every subscription can have its own transducer transforming + incoming values (possibly into multiple new ones) +- Transducers can create streams themselves (only for `merge()` / + `sync()`) +- Transducers can cause early stream termination and subsequent unwinding +- Values can be manually injected into the stream pipeline / graph at + any point +- Every Stream also is a subscription +- Unhandled errors in subscriptions will move subscription into error + state and cause unsubscription from parent (if any). Unhandled errors + in stream sources will cancel the stream. +- *Much* smaller API surface since most common & custom operations can + be solved via available transducers. Therefore less need to provide + specialized functions (map / filter etc.) and more flexibility in + terms of composing new operations. +- IMHO less confusing naming / terminology (only streams (producers) & + subscriptions (consumers)) + +## Installation + +```bash +yarn add @thi.ng/rstream +``` + +## Dependencies + +- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/master/packages/api) +- [@thi.ng/associative](https://github.com/thi-ng/umbrella/tree/master/packages/associative) +- [@thi.ng/atom](https://github.com/thi-ng/umbrella/tree/master/packages/atom) +- [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/master/packages/checks) +- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/master/packages/errors) +- [@thi.ng/paths](https://github.com/thi-ng/umbrella/tree/master/packages/paths) +- [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/master/packages/transducers) + +## Usage examples + +Several demos in this repo's [/examples]() directoy are using this package. + +A small selection: + +### Realtime crypto candle chart + +![screenshot](https://raw.githubusercontent.com/thi-ng/umbrella/master/assets/screenshots/crypto-chart.png) + +[Source](https://github.com/thi-ng/umbrella/tree/master/examples/crypto-chart) | +[Live version](https://demo.thi.ng/umbrella/crypto-chart/) + +### Interactive SVG grid generator + +![screenshot](https://raw.githubusercontent.com/thi-ng/umbrella/master/assets/screenshots/rstream-grid.png) + +[Source](https://github.com/thi-ng/umbrella/tree/master/examples/rstream-grid) | +[Live version](https://demo.thi.ng/umbrella/rstream-grid/) + +### Mouse gesture analysis + +![screenshot](https://raw.githubusercontent.com/thi-ng/umbrella/master/assets/screenshots/gesture-analysis.png) + +[Source](https://github.com/thi-ng/umbrella/tree/master/examples/gesture-analysis) +| [Live version](https://demo.thi.ng/umbrella/gesture-analysis) + +### Declarative dataflow graph + +This demo is utilizing the [@thi.ng/rstream-graph](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-graph) support package. + +[Source](https://github.com/thi-ng/umbrella/tree/master/examples/rstream-dataflow) +| [Live version](https://demo.thi.ng/umbrella/rstream-dataflow) + +### @thi.ng/hdom benchmark + +The FPS counter canvas component used in this benchmark is driven by +this package. + +[Source](https://github.com/thi-ng/umbrella/tree/master/examples/hdom-benchmark) +| [Live version](https://demo.thi.ng/umbrella/hdom-benchmark/) + +## API ### Stream creation @@ -353,148 +475,6 @@ fromInterval(500) - [trace](https://github.com/thi-ng/umbrella/tree/master/packages/rstream/src/subs/trace.ts) - debug helper - [transduce](https://github.com/thi-ng/umbrella/tree/master/packages/rstream/src/subs/transduce.ts) - transduce or just reduce an entire stream into a promise -## Support packages - -- [@thi.ng/rstream-csp](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-csp) - CSP channel-to-stream adapter -- [@thi.ng/rstream-dot](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-dot) - GraphViz DOT conversion of rstream dataflow graph topologies -- [@thi.ng/rstream-gestures](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-gestures) - unified mouse, single-touch & wheel event stream -- [@thi.ng/rstream-graph](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-graph) - declarative dataflow graph construction -- [@thi.ng/rstream-log](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-log) - extensible multi-level, multi-target structured logging -- [@thi.ng/rstream-query](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-query) - triple store & query engine - -## Conceptual differences to RxJS - -(No value judgements implied - there's room for both approaches!) - -- Streams are not the same as Observables: I.e. stream sources are NOT - (often just cannot) re-run for each new sub added. Only the first sub - is guaranteed to receive **all** values. Subs added at a later time - MIGHT not receive earlier emitted values, but only the most recent - emitted and any future values) -- Every subscription supports any number of subscribers, which can be - added/removed at any time -- Every unsubscription recursively triggers upstream unsubscriptions - (provided a parent has no other active child subscriptions) -- Every subscription can have its own transducer transforming - incoming values (possibly into multiple new ones) -- Transducers can create streams themselves (only for `merge()` / - `sync()`) -- Transducers can cause early stream termination and subsequent unwinding -- Values can be manually injected into the stream pipeline / graph at - any point -- Every Stream also is a subscription -- Unhandled errors in subscriptions will move subscription into error - state and cause unsubscription from parent (if any). Unhandled errors - in stream sources will cancel the stream. -- *Much* smaller API surface since most common & custom operations can - be solved via available transducers. Therefore less need to provide - specialized functions (map / filter etc.) and more flexibility in - terms of composing new operations. -- IMHO less confusing naming / terminology (only streams (producers) & - subscriptions (consumers)) - -## Installation - -```bash -yarn add @thi.ng/rstream -``` - -## Dependencies - -- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/master/packages/api) -- [@thi.ng/associative](https://github.com/thi-ng/umbrella/tree/master/packages/associative) -- [@thi.ng/atom](https://github.com/thi-ng/umbrella/tree/master/packages/atom) -- [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/master/packages/checks) -- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/master/packages/errors) -- [@thi.ng/paths](https://github.com/thi-ng/umbrella/tree/master/packages/paths) -- [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/master/packages/transducers) - -## Usage examples - -Several demos in this repo's [/examples]() directoy are using this package. - -A small selection: - -### Realtime crypto candle chart - -![screenshot](https://raw.githubusercontent.com/thi-ng/umbrella/master/assets/screenshots/crypto-chart.png) - -[Source](https://github.com/thi-ng/umbrella/tree/master/examples/crypto-chart) | -[Live version](https://demo.thi.ng/umbrella/crypto-chart/) - -### Interactive SVG grid generator - -![screenshot](https://raw.githubusercontent.com/thi-ng/umbrella/master/assets/screenshots/rstream-grid.png) - -[Source](https://github.com/thi-ng/umbrella/tree/master/examples/rstream-grid) | -[Live version](https://demo.thi.ng/umbrella/rstream-grid/) - -### Mouse gesture analysis - -![screenshot](https://raw.githubusercontent.com/thi-ng/umbrella/master/assets/screenshots/gesture-analysis.png) - -[Source](https://github.com/thi-ng/umbrella/tree/master/examples/gesture-analysis) -| [Live version](https://demo.thi.ng/umbrella/gesture-analysis) - -### Declarative dataflow graph - -This demo is utilizing the [@thi.ng/rstream-graph](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-graph) support package. - -[Source](https://github.com/thi-ng/umbrella/tree/master/examples/rstream-dataflow) -| [Live version](https://demo.thi.ng/umbrella/rstream-dataflow) - -### @thi.ng/hdom benchmark - -The FPS counter canvas component used in this benchmark is driven by -this package. - -[Source](https://github.com/thi-ng/umbrella/tree/master/examples/hdom-benchmark) -| [Live version](https://demo.thi.ng/umbrella/hdom-benchmark/) - -## Basic usage - -This example uses this package for reactive state values and -[@thi.ng/transducers-hdom](https://github.com/thi-ng/umbrella/tree/master/packages/transducers-hdom) -to achieve push-based DOM updates. - -[Live demo](https://demo.thi.ng/umbrella/transducers-hdom/) | -[standalone example](https://github.com/thi-ng/umbrella/tree/master/examples/transducers-hdom) - -```ts -import { fromInterval, stream, sync } from "@thi.ng/rstream/stream"; -import { updateDOM } from "@thi.ng/rstream/transducers-hdom"; -import * as tx from "@thi.ng/rstream/transducers"; - -// root component function -const app = ({ ticks, clicks }) => - ["div", - `${ticks} ticks & `, - ["a", - { href: "#", onclick: () => clickStream.next(0)}, - `${clicks} clicks`] - ]; - -// transformed stream to count clicks -const clickStream = stream().transform(tx.scan(tx.count(-1))); -// seed -clickStream.next(0); - -// stream combinator -// waits until all inputs have produced at least one value, -// then updates whenever either input has changed -sync({ - // streams to combine & synchronize - src: { - ticks: fromInterval(1000), - clicks: clickStream, - }, -}).transform( - // transform tuple into hdom component - tx.map(app), - // apply hdom tree to real DOM - updateDOM({ root: document.body }) -); -``` ## Authors diff --git a/packages/rstream/package.json b/packages/rstream/package.json index e5bfdf3fff..44282917e9 100644 --- a/packages/rstream/package.json +++ b/packages/rstream/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/rstream", - "version": "1.13.0", + "version": "1.13.2", "description": "Reactive multi-tap streams, dataflow & transformation pipeline constructs", "main": "./index.js", "typings": "./index.d.ts", @@ -28,13 +28,13 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/associative": "^0.6.7", - "@thi.ng/atom": "^1.5.3", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/paths": "^1.6.2", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/associative": "^0.6.8", + "@thi.ng/atom": "^1.5.4", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/paths": "^1.6.3", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "datastructure", diff --git a/packages/rstream/src/api.ts b/packages/rstream/src/api.ts index ecde79300e..4de3d382a9 100644 --- a/packages/rstream/src/api.ts +++ b/packages/rstream/src/api.ts @@ -4,7 +4,7 @@ import { Transducer } from "@thi.ng/transducers/api"; import { Stream } from "./stream"; import { Subscription } from "./subscription"; -export enum State { +export const enum State { IDLE, ACTIVE, DONE, @@ -12,6 +12,11 @@ export enum State { DISABLED, // TODO currently unused } +/** + * Reverse lookup for `State` enums + */ +export const __State = (exports).State; + export type Fn = (x: T) => void; export interface ISubscriber { diff --git a/packages/rstream/src/subs/resolve.ts b/packages/rstream/src/subs/resolve.ts index ee86cced37..821067eb9b 100644 --- a/packages/rstream/src/subs/resolve.ts +++ b/packages/rstream/src/subs/resolve.ts @@ -1,6 +1,6 @@ import { IID } from "@thi.ng/api/api"; -import { DEBUG, State } from "../api"; +import { __State, DEBUG, State } from "../api"; import { Subscription } from "../subscription"; export interface ResolverOpts extends IID { @@ -54,7 +54,7 @@ export class Resolver extends Subscription, T> { this.done(); } } else { - DEBUG && console.log(`resolved value in ${State[this.state]} state (${x})`); + DEBUG && console.log(`resolved value in ${__State[this.state]} state (${x})`); } }, (e) => { diff --git a/packages/rstream/src/subscription.ts b/packages/rstream/src/subscription.ts index 22fdbd55b7..f6ac3a69ab 100644 --- a/packages/rstream/src/subscription.ts +++ b/packages/rstream/src/subscription.ts @@ -10,6 +10,7 @@ import { isReduced, unreduced } from "@thi.ng/transducers/reduced"; import { push } from "@thi.ng/transducers/rfn/push"; import { + __State, DEBUG, ISubscribable, ISubscriber, @@ -295,7 +296,7 @@ export class Subscription implements protected ensureState() { if (this.state >= State.DONE) { - illegalState(`operation not allowed in ${State[this.state]} state`); + illegalState(`operation not allowed in ${__State[this.state]} state`); } } diff --git a/packages/sax/CHANGELOG.md b/packages/sax/CHANGELOG.md index 32de05e3f9..d0cb8bd679 100644 --- a/packages/sax/CHANGELOG.md +++ b/packages/sax/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/sax@0.3.21...@thi.ng/sax@0.4.0) (2018-09-24) + + +### Features + +* **sax:** update parse() to return iterator if input given (optional) ([665564c](https://github.com/thi-ng/umbrella/commit/665564c)) + + + + + ## [0.3.21](https://github.com/thi-ng/umbrella/compare/@thi.ng/sax@0.3.21-alpha.1...@thi.ng/sax@0.3.21) (2018-09-22) diff --git a/packages/sax/README.md b/packages/sax/README.md index 3e7713b391..0f5be85fcb 100644 --- a/packages/sax/README.md +++ b/packages/sax/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/sax.svg)](https://www.npmjs.com/package/@thi.ng/sax) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/sax.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. @@ -55,9 +56,13 @@ src=` ` +// sax.parse() returns a transducer doc = [...tx.iterator(sax.parse(), src)] -// (see description of `type` values further below) +// ...or returns iterator if input is given +doc = [...sax.parse(src)] + +// (see description of `type` values and parse options further below) // [ { type: 0, // tag: 'xml', @@ -150,6 +155,10 @@ svg=` ### DOM-style tree parsing using `defmulti` +This example shows how SVG can be parsed into +[@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup) +format. + ```ts import { defmulti, DEFAULT } from "@thi.ng/defmulti"; diff --git a/packages/sax/package.json b/packages/sax/package.json index 1ff3354f27..6c70b722ee 100644 --- a/packages/sax/package.json +++ b/packages/sax/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/sax", - "version": "0.3.21", + "version": "0.4.0", "description": "Transducer-based, SAX-like, non-validating, speedy & tiny XML parser", "main": "./index.js", "typings": "./index.d.ts", @@ -28,9 +28,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/transducers": "^2.1.2", - "@thi.ng/transducers-fsm": "^0.2.20" + "@thi.ng/api": "^4.2.1", + "@thi.ng/transducers": "^2.1.3", + "@thi.ng/transducers-fsm": "^0.2.21" }, "keywords": [ "ES6", diff --git a/packages/sax/src/index.ts b/packages/sax/src/index.ts index 38accfcc61..4f21a8a952 100644 --- a/packages/sax/src/index.ts +++ b/packages/sax/src/index.ts @@ -1,6 +1,7 @@ import { IObjectOf } from "@thi.ng/api"; import { fsm, FSMState, FSMStateMap } from "@thi.ng/transducers-fsm"; import { Transducer } from "@thi.ng/transducers/api"; +import { $iter, iterator } from "@thi.ng/transducers/iterator"; export interface ParseOpts { /** @@ -88,7 +89,7 @@ interface ParseState extends FSMState { opts: Partial; } -enum State { +const enum State { WAIT, ERROR, MAYBE_ELEM, @@ -135,12 +136,19 @@ const ESCAPE_SEQS = { /** * Returns XML parser transducer, optionally configured with given - * options. + * options. If `src` is also given, returns an iterator instead. * * @param opts */ -export const parse = (opts?: Partial): Transducer => - fsm({ +export function parse(opts?: Partial): Transducer; +export function parse(src: string): IterableIterator; +export function parse(opts: Partial, src: string): IterableIterator; +export function parse(...args: any[]): any { + const iter = $iter(parse, args, iterator); + if (iter) { + return iter; + } + return fsm({ states: PARSER, init: () => ({ state: State.WAIT, @@ -150,11 +158,12 @@ export const parse = (opts?: Partial): Transducer children: true, entities: false, trim: false, - ...opts + ...args[0] }, }), terminate: State.ERROR }); +} const isWS = (x: string) => { const c = x.charCodeAt(0); diff --git a/packages/strings/CHANGELOG.md b/packages/strings/CHANGELOG.md index 8f6ac24cd4..6a52b9e272 100644 --- a/packages/strings/CHANGELOG.md +++ b/packages/strings/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.4.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.4.1...@thi.ng/strings@0.4.2) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/strings + + + + + ## [0.4.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.4.0...@thi.ng/strings@0.4.1) (2018-09-22) diff --git a/packages/strings/README.md b/packages/strings/README.md index b8ef83cf66..9ab38a59d0 100644 --- a/packages/strings/README.md +++ b/packages/strings/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/strings.svg)](https://www.npmjs.com/package/@thi.ng/strings) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/strings.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/strings/package.json b/packages/strings/package.json index 8e445f8b37..54c1688cb9 100644 --- a/packages/strings/package.json +++ b/packages/strings/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/strings", - "version": "0.4.1", + "version": "0.4.2", "description": "Various string formatting & utility functions", "main": "./index.js", "typings": "./index.d.ts", @@ -28,7 +28,7 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/memoize": "^0.2.2" + "@thi.ng/memoize": "^0.2.3" }, "keywords": [ "ES6", diff --git a/packages/transducers-fsm/CHANGELOG.md b/packages/transducers-fsm/CHANGELOG.md index 006632af8c..e378ffb09b 100644 --- a/packages/transducers-fsm/CHANGELOG.md +++ b/packages/transducers-fsm/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.21](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers-fsm@0.2.20...@thi.ng/transducers-fsm@0.2.21) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/transducers-fsm + + + + + ## [0.2.20](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers-fsm@0.2.20-alpha.1...@thi.ng/transducers-fsm@0.2.20) (2018-09-22) diff --git a/packages/transducers-fsm/README.md b/packages/transducers-fsm/README.md index 87207099c7..4ef903b81e 100644 --- a/packages/transducers-fsm/README.md +++ b/packages/transducers-fsm/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/transducers-fsm.svg)](https://www.npmjs.com/package/@thi.ng/transducers-fsm) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/transducers-fsm.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/transducers-fsm/package.json b/packages/transducers-fsm/package.json index ecdf3cfd2f..a289f65ff4 100644 --- a/packages/transducers-fsm/package.json +++ b/packages/transducers-fsm/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/transducers-fsm", - "version": "0.2.20", + "version": "0.2.21", "description": "Transducer-based Finite State Machine transformer", "main": "./index.js", "typings": "./index.d.ts", @@ -28,8 +28,8 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/api": "^4.2.1", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "ES6", diff --git a/packages/transducers-hdom/CHANGELOG.md b/packages/transducers-hdom/CHANGELOG.md index 09617245e8..0720d13932 100644 --- a/packages/transducers-hdom/CHANGELOG.md +++ b/packages/transducers-hdom/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers-hdom@1.1.1...@thi.ng/transducers-hdom@1.1.2) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/transducers-hdom + + + + + + +## [1.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers-hdom@1.1.0...@thi.ng/transducers-hdom@1.1.1) (2018-09-23) + +**Note:** Version bump only for package @thi.ng/transducers-hdom + + + + + # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers-hdom@1.1.0-alpha.2...@thi.ng/transducers-hdom@1.1.0) (2018-09-22) diff --git a/packages/transducers-hdom/README.md b/packages/transducers-hdom/README.md index 6126f86e51..975b2e19a5 100644 --- a/packages/transducers-hdom/README.md +++ b/packages/transducers-hdom/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/transducers-hdom.svg)](https://www.npmjs.com/package/@thi.ng/transducers-hdom) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/transducers-hdom.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/transducers-hdom/package.json b/packages/transducers-hdom/package.json index 1896750527..417d5b2e05 100644 --- a/packages/transducers-hdom/package.json +++ b/packages/transducers-hdom/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/transducers-hdom", - "version": "1.1.0", + "version": "1.1.2", "description": "Transducer based UI updater for @thi.ng/hdom", "main": "./index.js", "typings": "./index.d.ts", @@ -28,9 +28,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/checks": "^1.5.10", - "@thi.ng/hdom": "^5.0.0", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/checks": "^1.5.11", + "@thi.ng/hdom": "^5.0.2", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "diff", diff --git a/packages/transducers-stats/CHANGELOG.md b/packages/transducers-stats/CHANGELOG.md index cd0b4d04e8..44c795791e 100644 --- a/packages/transducers-stats/CHANGELOG.md +++ b/packages/transducers-stats/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.4.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers-stats@0.4.7...@thi.ng/transducers-stats@0.4.8) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/transducers-stats + + + + + ## [0.4.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers-stats@0.4.7-alpha.1...@thi.ng/transducers-stats@0.4.7) (2018-09-22) diff --git a/packages/transducers-stats/README.md b/packages/transducers-stats/README.md index d73f3ed9af..c2428a49e7 100644 --- a/packages/transducers-stats/README.md +++ b/packages/transducers-stats/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/transducers-stats.svg)](https://www.npmjs.com/package/@thi.ng/transducers-stats) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/transducers-stats.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/transducers-stats/package.json b/packages/transducers-stats/package.json index 9562bd7f88..71cd21e08b 100644 --- a/packages/transducers-stats/package.json +++ b/packages/transducers-stats/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/transducers-stats", - "version": "0.4.7", + "version": "0.4.8", "description": "Transducers for statistical / technical analysis", "main": "./index.js", "typings": "./index.d.ts", @@ -28,9 +28,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/dcons": "^1.1.7", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/transducers": "^2.1.2" + "@thi.ng/dcons": "^1.1.8", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/transducers": "^2.1.3" }, "keywords": [ "ES6", diff --git a/packages/transducers/CHANGELOG.md b/packages/transducers/CHANGELOG.md index 108d105227..db8fef0175 100644 --- a/packages/transducers/CHANGELOG.md +++ b/packages/transducers/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.1.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers@2.1.2...@thi.ng/transducers@2.1.3) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/transducers + + + + + ## [2.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers@2.1.2-alpha.1...@thi.ng/transducers@2.1.2) (2018-09-22) diff --git a/packages/transducers/README.md b/packages/transducers/README.md index b5f42264b5..e92bd2318f 100644 --- a/packages/transducers/README.md +++ b/packages/transducers/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/transducers.svg)](https://www.npmjs.com/package/@thi.ng/transducers) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/transducers.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/transducers/package.json b/packages/transducers/package.json index 16fdbbc58c..b20df7af82 100644 --- a/packages/transducers/package.json +++ b/packages/transducers/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/transducers", - "version": "2.1.2", + "version": "2.1.3", "description": "Lightweight transducer implementations for ES6 / TypeScript", "main": "./index.js", "typings": "./index.d.ts", @@ -28,13 +28,13 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/compare": "^0.1.8", - "@thi.ng/compose": "^0.1.3", - "@thi.ng/equiv": "^0.1.10", - "@thi.ng/errors": "^0.1.8", - "@thi.ng/strings": "^0.4.1" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/compare": "^0.1.9", + "@thi.ng/compose": "^0.1.4", + "@thi.ng/equiv": "^0.1.11", + "@thi.ng/errors": "^0.1.9", + "@thi.ng/strings": "^0.4.2" }, "keywords": [ "ES6", diff --git a/packages/unionstruct/CHANGELOG.md b/packages/unionstruct/CHANGELOG.md index b422cbe5bd..9ab88c93b4 100644 --- a/packages/unionstruct/CHANGELOG.md +++ b/packages/unionstruct/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.1.16](https://github.com/thi-ng/umbrella/compare/@thi.ng/unionstruct@0.1.15...@thi.ng/unionstruct@0.1.16) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/unionstruct + + + + + ## [0.1.15](https://github.com/thi-ng/umbrella/compare/@thi.ng/unionstruct@0.1.14...@thi.ng/unionstruct@0.1.15) (2018-09-22) diff --git a/packages/unionstruct/README.md b/packages/unionstruct/README.md index 99f5da0283..2db7eddffe 100644 --- a/packages/unionstruct/README.md +++ b/packages/unionstruct/README.md @@ -2,6 +2,7 @@ [![npm](https://img.shields.io/npm/v/@thi.ng/unionstruct.svg)](https://www.npmjs.com/package/@thi.ng/unionstruct) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/unionstruct.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/unionstruct/package.json b/packages/unionstruct/package.json index 722139dab9..71c4af46dd 100644 --- a/packages/unionstruct/package.json +++ b/packages/unionstruct/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/unionstruct", - "version": "0.1.15", + "version": "0.1.16", "description": "C-style struct, union and bitfield views of ArrayBuffers", "main": "./index.js", "typings": "./index.d.ts", diff --git a/packages/vectors/CHANGELOG.md b/packages/vectors/CHANGELOG.md index fcfcdf3df7..516ae5f978 100644 --- a/packages/vectors/CHANGELOG.md +++ b/packages/vectors/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.2.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/vectors@1.2.1...@thi.ng/vectors@1.2.2) (2018-09-24) + +**Note:** Version bump only for package @thi.ng/vectors + + + + + ## [1.2.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/vectors@1.2.0...@thi.ng/vectors@1.2.1) (2018-09-22) diff --git a/packages/vectors/README.md b/packages/vectors/README.md index c5f809ebfb..cadf12f341 100644 --- a/packages/vectors/README.md +++ b/packages/vectors/README.md @@ -2,6 +2,7 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/vectors.svg)](https://www.npmjs.com/package/@thi.ng/vectors) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/vectors.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/packages/vectors/package.json b/packages/vectors/package.json index 54b61bda76..4f85be133c 100644 --- a/packages/vectors/package.json +++ b/packages/vectors/package.json @@ -1,6 +1,6 @@ { "name": "@thi.ng/vectors", - "version": "1.2.1", + "version": "1.2.2", "description": "Vector algebra for fixed & variable sizes, memory mapped, flexible layouts", "main": "./index.js", "typings": "./index.d.ts", @@ -29,9 +29,9 @@ "typescript": "^3.0.1" }, "dependencies": { - "@thi.ng/api": "^4.2.0", - "@thi.ng/checks": "^1.5.10", - "@thi.ng/errors": "^0.1.8" + "@thi.ng/api": "^4.2.1", + "@thi.ng/checks": "^1.5.11", + "@thi.ng/errors": "^0.1.9" }, "keywords": [ "ES6", diff --git a/scripts/make-module b/scripts/make-module index 4eba13b41e..b899a02ec9 100755 --- a/scripts/make-module +++ b/scripts/make-module @@ -120,6 +120,7 @@ cat << EOF > $MODULE/README.md [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/$1.svg)](https://www.npmjs.com/package/@thi.ng/$1) ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/$1.svg) +[![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella) This project is part of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo. diff --git a/tsconfig.json b/tsconfig.json index 15582d8635..4777c2b7bd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,8 @@ "target": "es6", "experimentalDecorators": true, "noUnusedParameters": true, - "noUnusedLocals": true + "noUnusedLocals": true, + "preserveConstEnums": true }, "exclude": [ "./**/node_modules"