Skip to content

Commit

Permalink
Merge branch 'develop' into feature/shadertoy
Browse files Browse the repository at this point in the history
* develop: (22 commits)
  docs: fix image links
  docs: fix image links
  docs: fix branch links
  Publish
  feat(vectors): add new bvec ops & types, update readme
  docs(pixel): update readme & screenshot
  build(porter-duff): update deps
  docs(porter-duff): update readme, add docstrings, minor refactoring
  Publish
  docs: update readmes
  feat(examples): import hdom-localstate demo
  build(examples): updating example deps & list in readme
  refactor(examples): update pixel-basics
  test(pixel): update tests
  fix(pixel): update 16bit formats & handling in getChannel
  refactor(binary): update splat4_24/32
  fix(pixel): fast-route check in setChannel()
  feat(pixel): add 16bit formats, add docs, update readme
  refactor(geom): update asCubic for circle
  fix(porter-duff): re-add missing channel blend factor (porterDuffInt)
  ...
  • Loading branch information
postspectacular committed Jul 31, 2019
2 parents e83cdb1 + c32f4d2 commit ee53ab8
Show file tree
Hide file tree
Showing 301 changed files with 2,835 additions and 1,361 deletions.
56 changes: 28 additions & 28 deletions README.md

Large diffs are not rendered by default.

Binary file removed assets/screenshots/pixel-basics.jpg
Binary file not shown.
Binary file added assets/screenshots/pixel-basics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 58 additions & 53 deletions examples/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/async-effect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/bitmap-font/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"parcel-bundler": "^1.12.3",
"rimraf": "^2.6.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/canvas-dial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/cellular-automata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/commit-table-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"express": "^4.16.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/crypto-chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom-components": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest"
Expand Down
2 changes: 1 addition & 1 deletion examples/devcards/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/geom-convex-hull/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^3.17.0",
"typescript": "^3.4.1"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/geom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/geom-knn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/bench": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/geom-tessel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/compose": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/gesture-analysis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/arrays": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest"
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-benchmark2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/binary": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-canvas-clock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-canvas-draw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom-canvas": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-canvas-shapes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom-canvas": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-dropdown-fuzzy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-dyn-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/atom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-inner-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"parcel-bundler": "^1.12.3",
"rimraf": "^2.6.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest"
Expand Down
5 changes: 5 additions & 0 deletions examples/hdom-localstate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.cache
out
node_modules
yarn.lock
*.js
17 changes: 17 additions & 0 deletions examples/hdom-localstate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# hdom-localstate

[Live demo](http://demo.thi.ng/umbrella/hdom-localstate/)

Barebones example showing how one could use the hdom user context object
to store component local state without requiring higher-order component
functions...

Please refer to the [example build instructions](https://github.com/thi-ng/umbrella/wiki/Example-build-instructions) on the wiki.

## Authors

- Karsten Schmidt

## License

© 2018 Karsten Schmidt // Apache Software License 2.0
18 changes: 18 additions & 0 deletions examples/hdom-localstate/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>hdom-localstate</title>
<link
href="https://unpkg.com/tachyons@4/css/tachyons.min.css"
rel="stylesheet"
/>
<style></style>
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="./src/index.ts"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions examples/hdom-localstate/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "hdom-localstate",
"version": "0.0.1",
"repository": "https://github.com/thi-ng/umbrella",
"author": "Karsten Schmidt <k+npm@thi.ng>",
"license": "Apache-2.0",
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --public-url ./ --no-source-maps --no-cache --detailed-report --experimental-scope-hoisting",
"start": "parcel index.html -p 8080 --open"
},
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^3.17.0",
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest",
"@thi.ng/paths": "latest"
},
"browserslist": [
"last 3 Chrome versions"
],
"browser": {
"process": false
}
}
54 changes: 54 additions & 0 deletions examples/hdom-localstate/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { start } from "@thi.ng/hdom";
import { getIn, setIn } from "@thi.ng/paths";

interface ButtonAttribs {
// unique button id / local state path
id: string;
onclick?: EventListener;
}

// stateless button component which stores its local state under an
// unique key in the global hdom user context.
const button = (
ctx: any,
attribs: ButtonAttribs,
label: string,
tooltip: string
) => {
// attempt to read local state
let local = getIn(ctx.__local, attribs.id);
// create if not yet present
if (!local) {
ctx.__local = setIn(
ctx.__local,
attribs.id,
(local = { tooltip: false })
);
}
return [
"a.dib.w4.pa2.mr3.white.bg-blue.hover-black.hover-bg-yellow.bg-animate",
{
onclick: attribs.onclick,
onmouseenter: () => (local.tooltip = true),
onmouseleave: () => (local.tooltip = false)
},
local.tooltip ? tooltip : label
];
};

const APP = [
"div.ma3.sans-serif",
// the ID attrib defines the local state path for these buttons
// it will be used to lookup state in the hdom user context object
// passed to each component function
[button, { id: "button.help" }, "Help", "Whazzup?!"],
[button, { id: "button.logout" }, "Logout", "See ya!"]
];

// start app and define context object skeleton
const cancel = start(APP, { ctx: { __local: {} } });

if (process.env.NODE_ENV !== "production") {
const hot = (<any>module).hot;
hot && hot.dispose(cancel);
}
11 changes: 11 additions & 0 deletions examples/hdom-localstate/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": ".",
"target": "es6",
"sourceMap": true
},
"include": [
"./src/**/*.ts"
]
}
2 changes: 1 addition & 1 deletion examples/hdom-skip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/hdom": "latest"
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-theme-adr-0003/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hdom-vscroller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"parcel-bundler": "^1.12.3",
"rimraf": "^2.6.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hmr-basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/atom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/hydrate-basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/atom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/interceptor-basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/atom": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/interceptor-basics2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"parcel-bundler": "^1.12.3",
"terser": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.5.3"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand Down
Loading

0 comments on commit ee53ab8

Please sign in to comment.