From 65e305e6e9a1ffd79e8f070e3b18e223cbd02320 Mon Sep 17 00:00:00 2001 From: Dmitry Matveyev Date: Mon, 9 Sep 2019 12:15:19 +0300 Subject: [PATCH 1/4] Fix script src path for html files to be up to date with readme (#114) --- examples/carousel/carousel.html | 2 +- examples/mediaplayer/playerapp.html | 2 +- examples/scrollapp/scrollapp.html | 2 +- examples/todoapp/todoapp.html | 2 +- experiments/ajaxtest.html | 2 +- experiments/echartstest.html | 2 +- experiments/refs/demo.html | 2 +- experiments/scrollapp.html | 2 +- karax/tools/karun.nim | 5 ++--- tests/diffDomTests.html | 2 +- tests/domEventTests.html | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) diff --git a/examples/carousel/carousel.html b/examples/carousel/carousel.html index 979dd38..464f960 100644 --- a/examples/carousel/carousel.html +++ b/examples/carousel/carousel.html @@ -9,7 +9,7 @@
- + diff --git a/examples/mediaplayer/playerapp.html b/examples/mediaplayer/playerapp.html index 9e076e6..7800d32 100644 --- a/examples/mediaplayer/playerapp.html +++ b/examples/mediaplayer/playerapp.html @@ -9,7 +9,7 @@
- + diff --git a/examples/scrollapp/scrollapp.html b/examples/scrollapp/scrollapp.html index 1ff8b1b..f7ca085 100644 --- a/examples/scrollapp/scrollapp.html +++ b/examples/scrollapp/scrollapp.html @@ -9,7 +9,7 @@
- + diff --git a/examples/todoapp/todoapp.html b/examples/todoapp/todoapp.html index 488a3bf..bec9d65 100644 --- a/examples/todoapp/todoapp.html +++ b/examples/todoapp/todoapp.html @@ -10,7 +10,7 @@
- + diff --git a/experiments/ajaxtest.html b/experiments/ajaxtest.html index 39062ad..2927a18 100644 --- a/experiments/ajaxtest.html +++ b/experiments/ajaxtest.html @@ -9,5 +9,5 @@
- + diff --git a/experiments/echartstest.html b/experiments/echartstest.html index fd510bd..8c9b225 100644 --- a/experiments/echartstest.html +++ b/experiments/echartstest.html @@ -10,5 +10,5 @@
- + diff --git a/experiments/refs/demo.html b/experiments/refs/demo.html index e1fe419..941333a 100644 --- a/experiments/refs/demo.html +++ b/experiments/refs/demo.html @@ -8,6 +8,6 @@
- + diff --git a/experiments/scrollapp.html b/experiments/scrollapp.html index ad3ce2f..8b909f1 100644 --- a/experiments/scrollapp.html +++ b/experiments/scrollapp.html @@ -10,7 +10,7 @@
- + diff --git a/karax/tools/karun.nim b/karax/tools/karun.nim index 1d266bf..c2ca647 100644 --- a/karax/tools/karun.nim +++ b/karax/tools/karun.nim @@ -35,9 +35,8 @@ proc exec(cmd: string) = proc build(name: string, rest: string, selectedCss: string, run: bool) = echo("Building...") - createDir("nimcache") - exec("nim js --out:nimcache/" & name & ".js " & rest) - let dest = "nimcache" / name & ".html" + exec("nim js --out:" & name & ".js " & rest) + let dest = name & ".html" writeFile(dest, html % [name, selectedCss]) if run: openDefaultBrowser(dest) diff --git a/tests/diffDomTests.html b/tests/diffDomTests.html index cb6ab28..f8f0e18 100644 --- a/tests/diffDomTests.html +++ b/tests/diffDomTests.html @@ -9,7 +9,7 @@
- + diff --git a/tests/domEventTests.html b/tests/domEventTests.html index 26e161f..dbbff0d 100644 --- a/tests/domEventTests.html +++ b/tests/domEventTests.html @@ -8,6 +8,6 @@
- + From 023f5d246339415c5aa727f8b44e2689d86ed88f Mon Sep 17 00:00:00 2001 From: Dmitry Matveyev Date: Fri, 13 Sep 2019 12:05:28 +0300 Subject: [PATCH 2/4] Fix typos and add small clarification to docs/docs.rst (#115) --- docs/docs.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.rst b/docs/docs.rst index 8298ba9..3eec1a4 100644 --- a/docs/docs.rst +++ b/docs/docs.rst @@ -10,17 +10,17 @@ and some extensions that allow for an efficient component system. These extensions are: ``VNodeKind.int`` - The node havs a single integer field. + The node has a single integer field. ``VNodeKind.bool`` The node has a single boolean field. -``VNodeKint.vthunk`` +``VNodeKind.vthunk`` The node is a `virtual thunk`:idx:. This means there is a function attached to it that produces the ``VNode`` structure on demand. -``VNodeKint.dthunk`` +``VNodeKind.dthunk`` The node is a `DOM thunk`:idx:. This means there is a function attached to it that produces the ``Node`` DOM structure on demand. @@ -53,6 +53,6 @@ Event system Karax does not abstract over the event system the DOM offers much: The same ``Event`` structure is used. Every callback has the -signature ``proc (ev: Event; n: VNode)``. +signature ``proc (ev: Event; n: VNode)`` or empty ``proc ()``. From 7a7cdd8e76eca9525fe099ba76af04b483c13f2b Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sat, 21 Sep 2019 14:17:41 -0700 Subject: [PATCH 3/4] add onload (#116) --- karax/vdom.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/karax/vdom.nim b/karax/vdom.nim index 7f8dcb7..321a455 100644 --- a/karax/vdom.nim +++ b/karax/vdom.nim @@ -89,9 +89,9 @@ type onanimationiteration, onkeyupenter, ## vdom extension: an input field received the ENTER key press - onkeyuplater ## vdom extension: a key was pressed and some time + onkeyuplater, ## vdom extension: a key was pressed and some time ## passed (useful for on-the-fly text completions) - + onload, # img macro buildLookupTables(): untyped = var a = newTree(nnkBracket) From e6877a51987c936916dd3f51e290f892bbd4da09 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sat, 21 Sep 2019 14:18:05 -0700 Subject: [PATCH 4/4] fixes #119 (#120) --- karax/karax.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/karax/karax.nim b/karax/karax.nim index 6c69325..ecc57fe 100644 --- a/karax/karax.nim +++ b/karax/karax.nim @@ -254,7 +254,10 @@ proc eq(a, b: VNode; recursive: bool): EqResult = for i in 0..