diff --git a/.gitignore b/.gitignore index 3b7c9023b4..73fe25942e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,13 +5,15 @@ build dev doc docs +export examples/dataflow-scenegraph examples/hdc examples/hdom-class +examples/hdom-clj +examples/ts-parse .DS_Store tachyons.min.css bundle.* -*.html *.log *.tgz *.js @@ -19,3 +21,5 @@ bundle.* *.bak* *.zip /.gtm/ + +packages/geom-accel diff --git a/README.md b/README.md index a4631f94e7..10565be7f0 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ All / most packages: - auto-generated online documentation at [docs.thi.ng](http://docs.thi.ng) - licensed under Apache Software License 2.0 -There's a steadily growing number (20+) of standalone examples +There's a steadily growing number (30+) of standalone examples (different difficulties, many combining functionality from several packages) in the [examples](./examples) directory. @@ -43,6 +43,7 @@ packages) in the [examples](./examples) directory. | [`@thi.ng/associative`](./packages/associative) | [![version](https://img.shields.io/npm/v/@thi.ng/associative.svg)](https://www.npmjs.com/package/@thi.ng/associative) | [changelog](./packages/associative/CHANGELOG.md) | Alt Set & Map implementations | | [`@thi.ng/atom`](./packages/atom) | [![version](https://img.shields.io/npm/v/@thi.ng/atom.svg)](https://www.npmjs.com/package/@thi.ng/atom) | [changelog](./packages/atom/CHANGELOG.md) | Immutable value wrappers, views, history | | [`@thi.ng/bench`](./packages/bench) | [![version](https://img.shields.io/npm/v/@thi.ng/bench.svg)](https://www.npmjs.com/package/@thi.ng/bench) | [changelog](./packages/bench/CHANGELOG.md) | Basic benchmarking helpers | +| [`@thi.ng/binary`](./packages/binary) | [![version](https://img.shields.io/npm/v/@thi.ng/binary.svg)](https://www.npmjs.com/package/@thi.ng/binary) | [changelog](./packages/binary/CHANGELOG.md) | Assorted binary / bitwise ops, utilities | | [`@thi.ng/bitstream`](./packages/bitstream) | [![version](https://img.shields.io/npm/v/@thi.ng/bitstream.svg)](https://www.npmjs.com/package/@thi.ng/bitstream) | [changelog](./packages/bitstream/CHANGELOG.md) | Bitwise input / output streams | | [`@thi.ng/cache`](./packages/cache) | [![version](https://img.shields.io/npm/v/@thi.ng/cache.svg)](https://www.npmjs.com/package/@thi.ng/cache) | [changelog](./packages/cache/CHANGELOG.md) | In-memory caches / strategies | | [`@thi.ng/checks`](./packages/checks) | [![version](https://img.shields.io/npm/v/@thi.ng/checks.svg)](https://www.npmjs.com/package/@thi.ng/checks) | [changelog](./packages/checks/CHANGELOG.md) | Type & value checks | @@ -52,9 +53,12 @@ packages) in the [examples](./examples) directory. | [`@thi.ng/defmulti`](./packages/defmulti) | [![version](https://img.shields.io/npm/v/@thi.ng/defmulti.svg)](https://www.npmjs.com/package/@thi.ng/defmulti) | [changelog](./packages/defmulti/CHANGELOG.md) | Dynamic multiple dispatch | | [`@thi.ng/dgraph`](./packages/dgraph) | [![version](https://img.shields.io/npm/v/@thi.ng/dgraph.svg)](https://www.npmjs.com/package/@thi.ng/dgraph) | [changelog](./packages/dgraph/CHANGELOG.md) | Dependency graph | | [`@thi.ng/diff`](./packages/diff) | [![version](https://img.shields.io/npm/v/@thi.ng/diff.svg)](https://www.npmjs.com/package/@thi.ng/diff) | [changelog](./packages/diff/CHANGELOG.md) | Array & object diffing | +| [`@thi.ng/dlogic`](./packages/dlogic) | [![version](https://img.shields.io/npm/v/@thi.ng/dlogic.svg)](https://www.npmjs.com/package/@thi.ng/dlogic) | [changelog](./packages/dlogic/CHANGELOG.md) | Digital logic ops / constructs | | [`@thi.ng/dot`](./packages/dot) | [![version](https://img.shields.io/npm/v/@thi.ng/dot.svg)](https://www.npmjs.com/package/@thi.ng/dot) | [changelog](./packages/dot/CHANGELOG.md) | Graphviz DOM & export | +| [`@thi.ng/dsp`](./packages/dsp) | [![version](https://img.shields.io/npm/v/@thi.ng/dsp.svg)](https://www.npmjs.com/package/@thi.ng/dsp) | [changelog](./packages/dsp/CHANGELOG.md) | DSP utils, oscillators | | [`@thi.ng/equiv`](./packages/equiv) | [![version](https://img.shields.io/npm/v/@thi.ng/equiv.svg)](https://www.npmjs.com/package/@thi.ng/equiv) | [changelog](./packages/equiv/CHANGELOG.md) | Deep value equivalence checking | | [`@thi.ng/errors`](./packages/errors) | [![version](https://img.shields.io/npm/v/@thi.ng/errors.svg)](https://www.npmjs.com/package/@thi.ng/errors) | [changelog](./packages/errors/CHANGELOG.md) | Custom error types | +| [`@thi.ng/geom`](./packages/geom) | [![version](https://img.shields.io/npm/v/@thi.ng/geom.svg)](https://www.npmjs.com/package/@thi.ng/geom) | [changelog](./packages/geom/CHANGELOG.md) | Hiccup based VDOM & diffing | | [`@thi.ng/hdom`](./packages/hdom) | [![version](https://img.shields.io/npm/v/@thi.ng/hdom.svg)](https://www.npmjs.com/package/@thi.ng/hdom) | [changelog](./packages/hdom/CHANGELOG.md) | Hiccup based VDOM & diffing | | [`@thi.ng/hdom-canvas`](./packages/hdom-canvas) | [![version](https://img.shields.io/npm/v/@thi.ng/hdom-canvas.svg)](https://www.npmjs.com/package/@thi.ng/hdom-canvas) | [changelog](./packages/hdom-canvas/CHANGELOG.md) | hdom based declarative canvas drawing | | [`@thi.ng/hdom-components`](./packages/hdom-components) | [![version](https://img.shields.io/npm/v/@thi.ng/hdom-components.svg)](https://www.npmjs.com/package/@thi.ng/hdom-components) | [changelog](./packages/hdom-components/CHANGELOG.md) | hdom based UI components | @@ -65,7 +69,9 @@ packages) in the [examples](./examples) directory. | [`@thi.ng/iges`](./packages/iges) | [![version](https://img.shields.io/npm/v/@thi.ng/iges.svg)](https://www.npmjs.com/package/@thi.ng/iges) | [changelog](./packages/iges/CHANGELOG.md) | IGES format geometry serialization | | [`@thi.ng/interceptors`](./packages/interceptors) | [![version](https://img.shields.io/npm/v/@thi.ng/interceptors.svg)](https://www.npmjs.com/package/@thi.ng/interceptors) | [changelog](./packages/interceptors/CHANGELOG.md) | Composable event handlers & processor | | [`@thi.ng/iterators`](./packages/iterators) | [![version](https://img.shields.io/npm/v/@thi.ng/iterators.svg)](https://www.npmjs.com/package/@thi.ng/iterators) | [changelog](./packages/iterators/CHANGELOG.md) | ES6 generators / iterators | +| [`@thi.ng/math`](./packages/math) | [![version](https://img.shields.io/npm/v/@thi.ng/math.svg)](https://www.npmjs.com/package/@thi.ng/math) | [changelog](./packages/math/CHANGELOG.md) | Assorted common math functions & utilities | | [`@thi.ng/memoize`](./packages/memoize) | [![version](https://img.shields.io/npm/v/@thi.ng/memoize.svg)](https://www.npmjs.com/package/@thi.ng/memoize) | [changelog](./packages/memoize/CHANGELOG.md) | Function memoization w/ customizable caching | +| [`@thi.ng/morton`](./packages/morton) | [![version](https://img.shields.io/npm/v/@thi.ng/morton.svg)](https://www.npmjs.com/package/@thi.ng/morton) | [changelog](./packages/morton/CHANGELOG.md) | Z-order-curve / Morton coding | | [`@thi.ng/paths`](./packages/paths) | [![version](https://img.shields.io/npm/v/@thi.ng/paths.svg)](https://www.npmjs.com/package/@thi.ng/paths) | [changelog](./packages/paths/CHANGELOG.md) | Immutable nested object accessors | | [`@thi.ng/pointfree`](./packages/pointfree) | [![version](https://img.shields.io/npm/v/@thi.ng/pointfree.svg)](https://www.npmjs.com/package/@thi.ng/pointfree) | [changelog](./packages/pointfree/CHANGELOG.md) | stack-based DSL & functional composition | | [`@thi.ng/pointfree-lang`](./packages/pointfree-lang) | [![version](https://img.shields.io/npm/v/@thi.ng/pointfree-lang.svg)](https://www.npmjs.com/package/@thi.ng/pointfree-lang) | [changelog](./packages/pointfree-lang/CHANGELOG.md) | Forth-like syntax layer for @thi.ng/pointfree | diff --git a/assets/dot/xml-converter.dot b/assets/dot/xml-converter.dot new file mode 100644 index 0000000000..c4dd90e3d9 --- /dev/null +++ b/assets/dot/xml-converter.dot @@ -0,0 +1,34 @@ +digraph g { + rankdir=LR; + node[fontname="Inconsolata", fontsize="11"]; + edge[arrowsize="0.75", fontname="Inconsolata", fontsize="9"]; + + rank=same { + prettyPrint; + doubleQuote; + trailingComma; + removeTags; + removeAttribs; + xml; + } + + prettyPrint -> formatOpts; + doubleQuote -> formatOpts; + trailingComma -> formatOpts; + + removeTags -> opts; + removeAttribs -> opts; + formatOpts -> opts; + + xml -> main; + opts -> main; + + main -> app -> ui; + + ui -> xml[label="user", style=dashed]; + ui -> prettyPrint[label="user", style=dashed]; + ui -> doubleQuote[label="user", style=dashed]; + ui -> trailingComma[label="user", style=dashed]; + ui -> removeTags[label="user", style=dashed]; + ui -> removeAttribs[label="user", style=dashed]; +} \ No newline at end of file diff --git a/assets/geom/chaikin-closed.svg b/assets/geom/chaikin-closed.svg new file mode 100644 index 0000000000..c439bcea88 --- /dev/null +++ b/assets/geom/chaikin-closed.svg @@ -0,0 +1,72 @@ + \ No newline at end of file diff --git a/assets/geom/chaikin-open.svg b/assets/geom/chaikin-open.svg new file mode 100644 index 0000000000..04c207342d --- /dev/null +++ b/assets/geom/chaikin-open.svg @@ -0,0 +1,58 @@ + \ No newline at end of file diff --git a/assets/geom/tessel.svg b/assets/geom/tessel.svg new file mode 100644 index 0000000000..ca7ab57ab7 --- /dev/null +++ b/assets/geom/tessel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/screenshots/xml-converter.png b/assets/screenshots/xml-converter.png new file mode 100644 index 0000000000..16aa3ab321 Binary files /dev/null and b/assets/screenshots/xml-converter.png differ diff --git a/assets/xml-converter.png b/assets/xml-converter.png new file mode 100644 index 0000000000..ca95fc8e79 Binary files /dev/null and b/assets/xml-converter.png differ diff --git a/examples/README.md b/examples/README.md index 1007040b42..16dfc833c0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -37,3 +37,4 @@ If you want to [contribute](../CONTRIBUTING.md) an example, please get in touch | 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 | +| 32 | [xml-converter](./xml-converter) | XML/HTML/SVG to hiccup conversion as you type | rstream, sax, transducers, transducers-hdom | advanced | diff --git a/examples/async-effect/package.json b/examples/async-effect/package.json index 0098aeece5..31052e68e8 100644 --- a/examples/async-effect/package.json +++ b/examples/async-effect/package.json @@ -6,9 +6,9 @@ "license": "Apache-2.0", "scripts": { "clean": "rm -rf .cache build out", - "prepare": "yarn clean && mkdir -p out && cp foo.json out", - "build": "yarn prepare && parcel build index.html -d out --no-source-maps --no-cache --detailed-report --public-url ./", - "start": "yarn prepare && parcel index.html -p 8080 --open -d out" + "prep": "yarn clean && mkdir -p out && cp foo.json out", + "build": "yarn prep && parcel build index.html -d out --no-source-maps --no-cache --detailed-report --public-url ./", + "start": "yarn prep && parcel index.html -p 8080 --open -d out" }, "devDependencies": { "parcel-bundler": "^1.9.7", diff --git a/examples/commit-table-ssr/.gitignore b/examples/commit-table-ssr/.gitignore index 0c5abcab62..aa37efed9a 100644 --- a/examples/commit-table-ssr/.gitignore +++ b/examples/commit-table-ssr/.gitignore @@ -2,4 +2,5 @@ out node_modules yarn.lock +table.html *.js diff --git a/examples/commit-table-ssr/commits.json b/examples/commit-table-ssr/commits.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/examples/commit-table-ssr/commits.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/examples/commit-table-ssr/index.html b/examples/commit-table-ssr/index.html new file mode 100644 index 0000000000..868c182c64 --- /dev/null +++ b/examples/commit-table-ssr/index.html @@ -0,0 +1,17 @@ + + + +
+ + + + +