Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: floodfx/liveviewjs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: liveviewjs@0.10.3
Choose a base ref
...
head repository: floodfx/liveviewjs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 8 commits
  • 300 files changed
  • 5 contributors

Commits on Feb 5, 2023

  1. Copy the full SHA
    87b658d View commit details
  2. Version Packages

    github-actions[bot] authored and floodfx committed Feb 5, 2023
    Copy the full SHA
    06f61ea View commit details

Commits on Feb 10, 2023

  1. Update README to note npm

    duffn authored and floodfx committed Feb 10, 2023
    Copy the full SHA
    cbbba3b View commit details
  2. Fix docusaurus admonitions

    duffn authored and floodfx committed Feb 10, 2023
    Copy the full SHA
    bb293fb View commit details
  3. docs: deploy docs to gh-pages using github actions (#144)

    * github actions to deploy docs to gh-pages
    * minor docs updates
    * remove docs/ dir with old docs
    floodfx authored Feb 10, 2023
    Copy the full SHA
    00191a1 View commit details

Commits on Feb 19, 2023

  1. docs: Fixed table layout in api-info page

    Fixed table layout for a table in api-info markdown page.
    csarnataro authored and floodfx committed Feb 19, 2023
    Copy the full SHA
    16eba59 View commit details

Commits on Mar 1, 2023

  1. Fix Deno package README and docs

    duffn authored and floodfx committed Mar 1, 2023
    Copy the full SHA
    0508ffa View commit details

Commits on Jun 15, 2023

  1. small doc typo

    ogrodnek authored and floodfx committed Jun 15, 2023
    Copy the full SHA
    52633f3 View commit details
Showing with 764 additions and 3,227 deletions.
  1. +32 −0 .github/workflows/docs-deploy.yml
  2. +23 −0 .github/workflows/test-docs-deploy.yml
  3. +10 −0 apps/lambda-examples/CHANGELOG.md
  4. +1 −1 apps/lambda-examples/package.json
  5. +6 −6 apps/liveviewjs.com/README.md
  6. +2 −0 apps/liveviewjs.com/docs/01-overview/gratitude.md
  7. +36 −27 apps/liveviewjs.com/docs/01-overview/introduction.md
  8. +6 −2 apps/liveviewjs.com/docs/01-overview/paradigm.md
  9. +6 −6 apps/liveviewjs.com/docs/01-overview/runtimes.md
  10. +7 −1 apps/liveviewjs.com/docs/02-quick-starts/deno-run-examples.md
  11. +28 −4 apps/liveviewjs.com/docs/02-quick-starts/get-liveviewjs-repo.md
  12. +14 −6 apps/liveviewjs.com/docs/02-quick-starts/nodejs-build-first-liveview.md
  13. +5 −1 apps/liveviewjs.com/docs/02-quick-starts/nodejs-run-examples.md
  14. +6 −2 apps/liveviewjs.com/docs/03-anatomy-of-a-liveview/handle-info-background-task.md
  15. +6 −2 apps/liveviewjs.com/docs/03-anatomy-of-a-liveview/handle-info-pub-sub.md
  16. +12 −4 apps/liveviewjs.com/docs/03-anatomy-of-a-liveview/handle-params.md
  17. +10 −3 apps/liveviewjs.com/docs/03-anatomy-of-a-liveview/liveview-api.md
  18. +6 −2 apps/liveviewjs.com/docs/03-anatomy-of-a-liveview/mount-details.md
  19. +6 −2 apps/liveviewjs.com/docs/03-anatomy-of-a-liveview/render-details.md
  20. +6 −4 apps/liveviewjs.com/docs/04-liveview-socket/liveviewsocket-api-infos.md
  21. +5 −1 apps/liveviewjs.com/docs/04-liveview-socket/liveviewsocket-api-misc.md
  22. +5 −1 apps/liveviewjs.com/docs/04-liveview-socket/liveviewsocket-api-push.md
  23. +6 −2 apps/liveviewjs.com/docs/05-lifecycle-of-a-liveview/intro.md
  24. +6 −2 apps/liveviewjs.com/docs/06-user-events-slash-bindings/bindings-table.md
  25. +6 −2 apps/liveviewjs.com/docs/06-user-events-slash-bindings/overview.md
  26. +12 −4 apps/liveviewjs.com/docs/07-forms-and-changesets/changesets.md
  27. +6 −2 apps/liveviewjs.com/docs/07-forms-and-changesets/overview.md
  28. +24 −8 apps/liveviewjs.com/docs/07-forms-and-changesets/use-with-forms.md
  29. +29 −9 apps/liveviewjs.com/docs/08-file-upload/overview.md
  30. +6 −2 apps/liveviewjs.com/docs/09-real-time-multi-player-pub-sub/overview.md
  31. +9 −3 apps/liveviewjs.com/docs/10-client-javascript/client-hooks.md
  32. +12 −4 apps/liveviewjs.com/docs/10-client-javascript/overview.md
  33. +2 −2 apps/liveviewjs.com/docs/11-js-commands/overview.md
  34. +6 −2 apps/liveviewjs.com/docs/13-misc/statics-and-dynamics.md
  35. +1 −1 apps/liveviewjs.com/package.json
  36. 0 docs/.nojekyll
  37. +0 −23 docs/404.html
  38. +0 −1 docs/CNAME
  39. +0 −1 docs/assets/css/styles.02541653.css
  40. BIN docs/assets/fonts/LibreFranklin-Italic-VariableFont_wght-607905701bd37ee4f8fcf7b08571bcae.ttf
  41. BIN docs/assets/fonts/LibreFranklin-VariableFont_wght-36548e4c1ed430cc732754e5f4d9c5bb.ttf
  42. BIN docs/assets/images/docusaurus-plushie-banner-a60f7593abca1e3eef26a9afa244e4fb.jpeg
  43. +0 −1 docs/assets/images/liveview-lifecycle-heartbeat-65d664e1b997bbc0737aee2d81e0575e.svg
  44. +0 −1 docs/assets/images/liveview-lifecycle-http-phase-ea214711543a70a25c10e3bf28ab347b.svg
  45. +0 −1 docs/assets/images/liveview-lifecycle-shutdown-7e64e2d957894e06dadbde8ebfce6dc0.svg
  46. +0 −1 docs/assets/images/liveview-lifecycle-user-and-server-events-0c078ec9c402dedb80571d075a41922e.svg
  47. +0 −1 docs/assets/images/liveview-lifecycle-websocket-join-a167e1df602ab471b5bba9187ccf6ae2.svg
  48. BIN docs/assets/images/liveviewjs_counter_liveview_rec-e37b9d6de9defd8db8053c898ef0a326.gif
  49. BIN docs/assets/images/liveviewjs_examples_rec-2cc096a7ff8f675e44f0a7fa0c1108c7.gif
  50. BIN docs/assets/images/liveviewjs_hello_liveview-09cb9e9d8588fb31e92cbefd4d4d6ddf.png
  51. BIN docs/assets/images/liveviewjs_hello_liveview_deno-0f12c470d6af8952a736434974b93bfd.png
  52. BIN docs/assets/images/liveviewjs_hello_toggle_liveview_deno_rec-6770b13c7109764fe416a368f712f377.gif
  53. BIN docs/assets/images/liveviewjs_hello_toggle_liveview_rec-dff5867dec6513c570aed325880c032f.gif
  54. +0 −1 docs/assets/js/00bb4f2e.38e7d182.js
  55. +0 −1 docs/assets/js/01a85c17.41cb6eb6.js
  56. +0 −1 docs/assets/js/031793e1.42487eea.js
  57. +0 −1 docs/assets/js/04151870.cfaebfe2.js
  58. +0 −1 docs/assets/js/05a1a0e3.8ef72718.js
  59. +0 −1 docs/assets/js/05efe52d.2ada10af.js
  60. +0 −1 docs/assets/js/06e5e56e.5ea46c99.js
  61. +0 −1 docs/assets/js/0832cd5e.baac617e.js
  62. +0 −1 docs/assets/js/096bfee4.9982f285.js
  63. +0 −1 docs/assets/js/0ad92f1a.1d568a35.js
  64. +0 −1 docs/assets/js/0bd32f56.9cbc10ae.js
  65. +0 −1 docs/assets/js/0e8a1ffd.3bb752e2.js
  66. +0 −1 docs/assets/js/11e44ae3.c955dcae.js
  67. +0 −1 docs/assets/js/12d121b1.9e468a56.js
  68. +0 −1 docs/assets/js/14eb3368.1ae9325c.js
  69. +0 −1 docs/assets/js/15989f81.aaa42acf.js
  70. +0 −1 docs/assets/js/17896441.0c65f063.js
  71. +0 −1 docs/assets/js/1be78505.b84d86db.js
  72. +0 −1 docs/assets/js/1df93b7f.019f5c69.js
  73. +0 −1 docs/assets/js/1fdf7751.913e1f07.js
  74. +0 −1 docs/assets/js/2006.75ebd0c6.js
  75. +0 −1 docs/assets/js/2043d2f8.82865eed.js
  76. +0 −1 docs/assets/js/218c334f.662f52e0.js
  77. +0 −1 docs/assets/js/26de17c9.0e3042a8.js
  78. +0 −1 docs/assets/js/284ba78b.865b8096.js
  79. +0 −1 docs/assets/js/29143544.a57f485d.js
  80. +0 −1 docs/assets/js/2c6e467f.65dfc83b.js
  81. +0 −1 docs/assets/js/2f79913e.df91907d.js
  82. +0 −1 docs/assets/js/3081b21a.ce19d10e.js
  83. +0 −1 docs/assets/js/30a24c52.1683ba64.js
  84. +0 −1 docs/assets/js/33cd0f01.2c356301.js
  85. +0 −1 docs/assets/js/355cffd0.59a933d9.js
  86. +0 −1 docs/assets/js/3de70efe.562103e8.js
  87. +0 −1 docs/assets/js/3fc56706.15e86c2f.js
  88. +0 −1 docs/assets/js/42132283.acc7b213.js
  89. +0 −1 docs/assets/js/42d1d491.cf07e823.js
  90. +0 −1 docs/assets/js/4c9e35b1.7fb6c67c.js
  91. +0 −1 docs/assets/js/4ec89f2d.d296e41b.js
  92. +0 −1 docs/assets/js/4f66b655.9614f120.js
  93. +0 −1 docs/assets/js/5674.2cada8ea.js
  94. +0 −1 docs/assets/js/59362658.4deb710c.js
  95. +0 −1 docs/assets/js/5f30c8bb.6749f914.js
  96. +0 −1 docs/assets/js/6079b593.ac9b6458.js
  97. +0 −1 docs/assets/js/608ae6a4.5be44012.js
  98. +0 −1 docs/assets/js/630c0ad8.f85adf73.js
  99. +0 −1 docs/assets/js/6468.7f78e9f0.js
  100. +0 −1 docs/assets/js/66406991.6557cce3.js
  101. +0 −1 docs/assets/js/66ff5741.a69259b5.js
  102. +0 −1 docs/assets/js/6875c492.5c47c8f7.js
  103. +0 −1 docs/assets/js/6bf4f685.8e9f9d3b.js
  104. +0 −1 docs/assets/js/6c9f2a26.46cf69f9.js
  105. +0 −1 docs/assets/js/73664a40.4ae7ea32.js
  106. +0 −1 docs/assets/js/7661071f.e57dadfa.js
  107. +0 −1 docs/assets/js/76864381.a33c114b.js
  108. +0 −1 docs/assets/js/7834bba6.8d670bf6.js
  109. +0 −1 docs/assets/js/78c55e7e.59d69983.js
  110. +0 −1 docs/assets/js/7d980dc2.4c6a6448.js
  111. +0 −1 docs/assets/js/814f3328.63c77d93.js
  112. +0 −1 docs/assets/js/8717b14a.57b843ef.js
  113. +0 −1 docs/assets/js/88861ccc.20e78eba.js
  114. +0 −1 docs/assets/js/88b645ee.bbd3a54f.js
  115. +0 −1 docs/assets/js/8908bd66.557693cf.js
  116. +0 −1 docs/assets/js/925b3f96.2a134060.js
  117. +0 −1 docs/assets/js/935f2afb.6ddb8fe0.js
  118. +0 −1 docs/assets/js/9578e4ed.8fdbb7d4.js
  119. +0 −1 docs/assets/js/9a32815e.ea91b6ee.js
  120. +0 −1 docs/assets/js/9b689780.e50ad980.js
  121. +0 −1 docs/assets/js/9bbe50cd.578a542c.js
  122. +0 −1 docs/assets/js/9c3a86b6.61f78c9a.js
  123. +0 −1 docs/assets/js/9e4087bc.7cfaacea.js
  124. +0 −1 docs/assets/js/a49e487e.d097d48c.js
  125. +0 −1 docs/assets/js/a6aa9e1f.b9c01e8d.js
  126. +0 −1 docs/assets/js/a7023ddc.fbeef8ab.js
  127. +0 −1 docs/assets/js/a74eb08b.1943af2a.js
  128. +0 −1 docs/assets/js/a7e77012.33ce6ba3.js
  129. +0 −1 docs/assets/js/a80da1cf.3f59ef08.js
  130. +0 −1 docs/assets/js/abbaf8f1.0a228150.js
  131. +0 −1 docs/assets/js/ae0c09be.52c1349f.js
  132. +0 −1 docs/assets/js/b2b675dd.aad3112b.js
  133. +0 −1 docs/assets/js/b2f554cd.15a03ba7.js
  134. +0 −1 docs/assets/js/b747b5f5.70f727bd.js
  135. +0 −1 docs/assets/js/b7a0085b.997180ee.js
  136. +0 −1 docs/assets/js/bc63dc68.3f7e97f5.js
  137. +0 −1 docs/assets/js/be227171.df4b9da8.js
  138. +0 −1 docs/assets/js/c1a16298.9e22ed51.js
  139. +0 −1 docs/assets/js/c68b9697.0d9df512.js
  140. +0 −1 docs/assets/js/ccc49370.016b92cf.js
  141. +0 −1 docs/assets/js/ccf3ea07.ed328d0a.js
  142. +0 −1 docs/assets/js/d4048a91.ac358d34.js
  143. +0 −1 docs/assets/js/d5bbcc50.33ddf498.js
  144. +0 −1 docs/assets/js/d63d7ef8.33b1b0a0.js
  145. +0 −1 docs/assets/js/d6e2e8d0.96c3ccce.js
  146. +0 −1 docs/assets/js/d8b15fc0.da0409e0.js
  147. +0 −1 docs/assets/js/d9f32620.7ce0ed2a.js
  148. +0 −1 docs/assets/js/dddb404b.abf300d4.js
  149. +0 −1 docs/assets/js/e16015ca.383724d8.js
  150. +0 −1 docs/assets/js/e273c56f.1d51bf07.js
  151. +0 −1 docs/assets/js/e53ecdb2.c935addd.js
  152. +0 −1 docs/assets/js/e96d4430.318e8e94.js
  153. +0 −1 docs/assets/js/eb3e9177.2d30417e.js
  154. +0 −1 docs/assets/js/ed398bd8.068419c2.js
  155. +0 −1 docs/assets/js/f08e994e.f1826f7a.js
  156. +0 −1 docs/assets/js/f4424813.20b257f4.js
  157. +0 −1 docs/assets/js/f4f34a3a.1d3ce6eb.js
  158. +0 −1 docs/assets/js/f52ab4ca.2a9123be.js
  159. +0 −1 docs/assets/js/f98bd2c4.65b4ee08.js
  160. +0 −1 docs/assets/js/fb8b1f32.6f166156.js
  161. +0 −1 docs/assets/js/fe64d624.2d20b345.js
  162. +0 −2 docs/assets/js/main.e60717ac.js
  163. +0 −53 docs/assets/js/main.e60717ac.js.LICENSE.txt
  164. +0 −1 docs/assets/js/runtime~main.5115bea4.js
  165. +0 −25 docs/blog.html
  166. +0 −23 docs/blog/archive.html
  167. +0 −84 docs/blog/atom.xml
  168. +0 −24 docs/blog/first-blog-post.html
  169. +0 −39 docs/blog/long-blog-post.html
  170. +0 −23 docs/blog/mdx-blog-post.html
  171. +0 −70 docs/blog/rss.xml
  172. +0 −23 docs/blog/tags.html
  173. +0 −25 docs/blog/tags/docusaurus.html
  174. +0 −24 docs/blog/tags/facebook.html
  175. +0 −24 docs/blog/tags/hello.html
  176. +0 −24 docs/blog/tags/hola.html
  177. +0 −24 docs/blog/welcome.html
  178. +0 −28 docs/docs/anatomy-of-a-liveview/handle-event-details.html
  179. +0 −25 docs/docs/anatomy-of-a-liveview/handle-info-background-task.html
  180. +0 −32 docs/docs/anatomy-of-a-liveview/handle-info-pub-sub.html
  181. +0 −27 docs/docs/anatomy-of-a-liveview/handle-info-user-initiated.html
  182. +0 −27 docs/docs/anatomy-of-a-liveview/handle-info.html
  183. +0 −31 docs/docs/anatomy-of-a-liveview/handle-params.html
  184. +0 −37 docs/docs/anatomy-of-a-liveview/liveview-api.html
  185. +0 −29 docs/docs/anatomy-of-a-liveview/mount-details.html
  186. +0 −28 docs/docs/anatomy-of-a-liveview/render-details.html
  187. +0 −23 docs/docs/category/anatomy-of-a-liveview.html
  188. +0 −23 docs/docs/category/client-side-javascript.html
  189. +0 −23 docs/docs/category/forms--changesets.html
  190. +0 −23 docs/docs/category/js-commands.html
  191. +0 −23 docs/docs/category/lifecycle-of-a-liveview.html
  192. +0 −23 docs/docs/category/liveviewsocket.html
  193. +0 −23 docs/docs/category/miscellaneous.html
  194. +0 −23 docs/docs/category/overview.html
  195. +0 −23 docs/docs/category/quick-starts.html
  196. +0 −23 docs/docs/category/real-time--multi-player.html
  197. +0 −23 docs/docs/category/uploading-files.html
  198. +0 −23 docs/docs/category/user-events.html
  199. +0 −23 docs/docs/category/webserver-integrations.html
  200. +0 −37 docs/docs/client-javascript/client-hooks.html
  201. +0 −26 docs/docs/client-javascript/example-hook.html
  202. +0 −42 docs/docs/client-javascript/overview.html
  203. +0 −27 docs/docs/file-upload/drag-and-drop.html
  204. +0 −28 docs/docs/file-upload/image-preview.html
  205. +0 −50 docs/docs/file-upload/overview.html
  206. +0 −29 docs/docs/file-upload/upload-config-options.html
  207. +0 −45 docs/docs/forms-and-changesets/changesets.html
  208. +0 −29 docs/docs/forms-and-changesets/overview.html
  209. +0 −50 docs/docs/forms-and-changesets/use-with-forms.html
  210. +0 −30 docs/docs/js-commands/add-remove-class.html
  211. +0 −26 docs/docs/js-commands/dispatch-cmd.html
  212. +0 −27 docs/docs/js-commands/overview.html
  213. +0 −24 docs/docs/js-commands/push-cmd.html
  214. +0 −25 docs/docs/js-commands/set-remove-attr.html
  215. +0 −33 docs/docs/js-commands/show-hide-toggle-el.html
  216. +0 −26 docs/docs/js-commands/transition-cmd.html
  217. +0 −42 docs/docs/lifecycle-of-a-liveview/intro.html
  218. +0 −34 docs/docs/liveview-socket/liveviewsocket-api-context.html
  219. +0 −35 docs/docs/liveview-socket/liveviewsocket-api-infos.html
  220. +0 −37 docs/docs/liveview-socket/liveviewsocket-api-misc.html
  221. +0 −28 docs/docs/liveview-socket/liveviewsocket-api-push.html
  222. +0 −35 docs/docs/liveview-socket/liveviewsocket-api-uploads.html
  223. +0 −26 docs/docs/liveview-socket/liveviewsocket-api.html
  224. +0 −24 docs/docs/liveview-socket/raw-liveviewsocket-api.html
  225. +0 −23 docs/docs/misc/debugging-wire.html
  226. +0 −23 docs/docs/misc/flash.html
  227. +0 −37 docs/docs/misc/livecomponents.html
  228. +0 −23 docs/docs/misc/root-and-page-renderers.html
  229. +0 −40 docs/docs/misc/security-topics.html
  230. +0 −34 docs/docs/misc/statics-and-dynamics.html
  231. +0 −26 docs/docs/overview/feedback.html
  232. +0 −25 docs/docs/overview/gratitude.html
  233. +0 −64 docs/docs/overview/introduction.html
  234. +0 −35 docs/docs/overview/paradigm.html
  235. +0 −41 docs/docs/overview/runtimes.html
  236. +0 −32 docs/docs/quick-starts/deno-build-first-liveview.html
  237. +0 −26 docs/docs/quick-starts/deno-run-examples.html
  238. +0 −25 docs/docs/quick-starts/get-liveviewjs-repo.html
  239. +0 −32 docs/docs/quick-starts/nodejs-build-first-liveview.html
  240. +0 −26 docs/docs/quick-starts/nodejs-run-examples.html
  241. +0 −29 docs/docs/real-time-multi-player-pub-sub/example-pub-sub.html
  242. +0 −36 docs/docs/real-time-multi-player-pub-sub/overview.html
  243. +0 −28 docs/docs/user-events-slash-bindings/additional-bindings.html
  244. +0 −26 docs/docs/user-events-slash-bindings/bindings-table.html
  245. +0 −47 docs/docs/user-events-slash-bindings/overview.html
  246. +0 −31 docs/docs/user-events-slash-bindings/rate-limiting-bindings.html
  247. +0 −33 docs/docs/webserver-integration/liveview-server-adaptor.html
  248. +0 −28 docs/docs/webserver-integration/overview.html
  249. +0 −30 docs/docs/webserver-integration/support-webserver-x.html
  250. BIN docs/fonts/LibreFranklin-Italic-VariableFont_wght.ttf
  251. BIN docs/fonts/LibreFranklin-VariableFont_wght.ttf
  252. +0 −1 docs/img/diagrams/liveview-lifecycle-heartbeat.svg
  253. +0 −1 docs/img/diagrams/liveview-lifecycle-http-phase.svg
  254. +0 −1 docs/img/diagrams/liveview-lifecycle-shutdown.svg
  255. +0 −1 docs/img/diagrams/liveview-lifecycle-user-and-server-events.svg
  256. +0 −1 docs/img/diagrams/liveview-lifecycle-websocket-join.svg
  257. +0 −1 docs/img/diagrams/liveviewjs-lifecycle.svg
  258. BIN docs/img/favicon.ico
  259. +0 −17 docs/img/features/multiplayer.svg
  260. +0 −4 docs/img/features/nirvana.svg
  261. +0 −8 docs/img/features/simple.svg
  262. +0 −4 docs/img/logo.svg
  263. BIN docs/img/screenshots/liveviewjs_counter_liveview_rec.gif
  264. BIN docs/img/screenshots/liveviewjs_examples_rec.gif
  265. BIN docs/img/screenshots/liveviewjs_hello_liveview.png
  266. BIN docs/img/screenshots/liveviewjs_hello_liveview_deno.png
  267. BIN docs/img/screenshots/liveviewjs_hello_toggle_liveview_deno_rec.gif
  268. BIN docs/img/screenshots/liveviewjs_hello_toggle_liveview_rec.gif
  269. +0 −23 docs/index.html
  270. +0 −1 docs/sitemap.xml
  271. +2 −2 old_docs/file-uploads.md
  272. +2 −2 old_docs/js-commands.md
  273. +7 −7 package-lock.json
  274. +6 −0 packages/core/CHANGELOG.md
  275. +186 −175 packages/core/coverage/clover.xml
  276. +3 −3 packages/core/coverage/coverage-final.json
  277. +11 −1 packages/core/dist/liveview.d.ts
  278. +36 −14 packages/core/dist/liveview.js
  279. +36 −14 packages/core/dist/liveview.mjs
  280. +1 −1 packages/core/package.json
  281. +1 −0 packages/core/src/server/adaptor/websocket.ts
  282. +3 −0 packages/core/src/server/live/liveView.test.ts
  283. +7 −1 packages/core/src/server/socket/liveViewManager-Uploads.test.ts
  284. +8 −0 packages/core/src/server/socket/liveViewManager.test.ts
  285. +37 −13 packages/core/src/server/socket/ws/wsHandler.ts
  286. +3 −0 packages/core/src/server/socket/wsMessageRouter.test.ts
  287. +4 −0 packages/core/src/server/test/wsAdaptor.ts
  288. +3 −0 packages/deno/README.md
  289. +0 −1 packages/deno/src/deno/server.ts
  290. +8 −5 packages/deno/src/deno/wsAdaptor.ts
  291. +8 −0 packages/examples/CHANGELOG.md
  292. +1 −1 packages/examples/package.json
  293. +8 −0 packages/express/CHANGELOG.md
  294. +1 −0 packages/express/dist/liveviewjs-express.d.ts
  295. +4 −0 packages/express/dist/liveviewjs-express.js
  296. +4 −0 packages/express/dist/liveviewjs-express.mjs
  297. +1 −1 packages/express/package.json
  298. +3 −0 packages/express/src/node/wsAdaptor.ts
  299. +6 −0 packages/gen/CHANGELOG.md
  300. +1 −1 packages/gen/package.json
32 changes: 32 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies in apps/liveviewjs.com
run: npm install -w apps/liveviewjs.com
- name: Build docusaurus website
run: npm run build -w apps/liveviewjs.com

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./apps/liveviewjs.com/build
user_name: floodfx
user_email: donnie@floodfx.com
23 changes: 23 additions & 0 deletions .github/workflows/test-docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test Docs Deploy

on:
push:
branches:
- main
pull_request:
branches:
- "*"

jobs:
test-deploy:
name: Test Docs Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies in apps/liveviewjs.com
run: npm install -w apps/liveviewjs.com
- name: Build docusaurus website
run: npm run build -w apps/liveviewjs.com
10 changes: 10 additions & 0 deletions apps/lambda-examples/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @liveviewjs/lambda-examples

## 0.10.4

### Patch Changes

- 87b658d: Detect closed sockets and handle more gracefully
- Updated dependencies [87b658d]
- liveviewjs@0.10.4
- @liveviewjs/examples@0.10.4
- @liveviewjs/express@0.10.4

## 0.10.3

### Patch Changes
2 changes: 1 addition & 1 deletion apps/lambda-examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liveviewjs/lambda-examples",
"version": "0.10.3",
"version": "0.10.4",
"private": true,
"scripts": {
"start": "ts-node ./src/example/autorun.ts",
12 changes: 6 additions & 6 deletions apps/liveviewjs.com/README.md
Original file line number Diff line number Diff line change
@@ -5,13 +5,13 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta
## Installation

```
$ yarn
$ npm install
```

### Local Development

```
$ yarn start
$ npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without
@@ -20,24 +20,24 @@ having to restart the server.
### Build

```
$ yarn build
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting
This command generates static content into the `docs` directory and can be served using any static contents hosting
service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
$ USE_SSH=true npm run deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
$ GIT_USER=<Your GitHub username> npm run deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the
2 changes: 2 additions & 0 deletions apps/liveviewjs.com/docs/01-overview/gratitude.md
Original file line number Diff line number Diff line change
@@ -11,3 +11,5 @@ we can reuse on the client side.
client code instead of reinventing!

🙌 Thanks to [@blimmer](https://github.com/blimmer/) for the awesome feedback, documentation suggestions, and support!

Thanks to you for checking out **LiveViewJS**! We hope you enjoy it as much as we do!
63 changes: 36 additions & 27 deletions apps/liveviewjs.com/docs/01-overview/introduction.md
Original file line number Diff line number Diff line change
@@ -11,23 +11,39 @@ far less code and complexity and far more speed and efficiency**.

## What is a LiveView?

A LiveView is a server-rendered HTML page that connects to the server via a persistent web socket. The web socket allows
the client to send user events to the server and the server to send diffs in response. **LiveViewJS** is a LiveView
framework that handles the complex part of this (handling websockets, diffing changes, applying DOM updates, etc.) so that
you can focus on building your application.
The LiveView pattern, [as popularized in Elixir’s Phoenix framework](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html), shifts your UI’s state management, event handling to the server, calculating minimal diffs to drive updates in your HTML over WebSockets.

Here's the typical "counter" example written as a LiveView in **LiveViewJS**:
There are many benefits to this approach, including:
* extremely fast, SEO-friendly page loads
* simple state management that works well at any scale (not just small apps)
* minimal data transfer (only send diffs)
* no need to build (or operate) REST or GraphQL APIs

There are also some drawbacks, including:
* requires a server (e.g. pure static sites are not the best fit)
* requires a internet connection (e.g. offline-first apps are not the best fit - though sporadic internet connectivity is fine)

If you are building a web-based application, the LiveView approach is a super-powerful, some say "game-changing", way to build it and LiveViewJS is the best way to do it in NodeJS and Deno.

### More detail

As mentioned, a LiveView is a server-rendered HTML page that, when loaded, connects back to the server via a persistent web socket. As the user interacts with the LiveView, the client to sends user events (click, keys, etc) via the websocket back to the server and the server responds with diffs to the HTML page in return.

### Websockets and Diffs? That sounds complicated!

As a developer, you don't need to worry about connecting websockets or calculating diffs. **LiveViewJS** handles all of the complex parts of this for you. You just focus on implementing your business logic and rendering your views and LiveViewJS handles the rest.

## Example "Counter" LiveView

Here's the typical "counter" in **LiveViewJS**:

```ts
import { createLiveView, html } from "liveviewjs";

/**
* A basic counter that increments and decrements a number.
*/
export const counterLiveView = createLiveView<
{ count: number }, // Define LiveView Context (a.k.a state)
{ type: "increment" } | { type: "decrement" } // Define LiveView Events
>({
export const counterLiveView = createLiveView({
mount: (socket) => {
// init state, set count to 0
socket.assign({ count: 0 });
@@ -66,16 +82,20 @@ Yes, it "looks" like a React/Vue/Svelt UI but the main differences are:
- This page was first rendered as plain HTML (not a bundle of JS)
- The client is automatically connected to a server via a websocket
- The click events are automatically shipped to the server
- The server then runs the business logic to update the state
- Using the new state, the server then renders a new view and calculates any diffs
- Those diffs are shipped back to the client, where they are automatically applied
- The server then runs the business logic to update the state
- The server automatically calculates the minimal diffs and sends them to the client
- The client automatically applies the diffs to the DOM

Pretty cool eh? We think so too! While this counter LiveView isn't particularly useful, it gives you a quick intro to how
LiveViews work and what they look like both as code and in the browser. We've got a lot more to show you about
**LiveViewJS** including: built-in real-time / multi-player support, built-in form validation with changesets, built-in
file uploads with image previews and drag and drop support, and more!
LiveViews work and what they look like both as code and in the browser.

But first, a bit more about LiveViews...
We've got a lot more to show you about **LiveViewJS** including some amazing features built-in the framework like:

* real-time / multi-player support
* simple, powerfil form validation with changesets
* file uploads with image previews and drag and drop support, and more!

If you want more detail on LiveViews and how awesome they are feel free to keep reading. If you want to jump right in, check out the [Quick Start](../02-quick-starts/get-liveviewjs-repo.md) guide.

## LiveView is already proven technology

@@ -115,9 +135,6 @@ Here is a quote from the author and inventor of LiveView, [Chris McCord](http://
- **No client-side routing** - No need to use a library like React Router or Vue Router. LiveViews route like multi-page
applications which is handled automatically by the browser and server. (Another major complication rendered
unnecessary.)
- **No component libraries (or Storybook) required** - Traditional SPAs require teams to adopt, build or buy and then
maintain, and customize a component library and use something like [Storybook](https://storybook.js.org/). LiveView
simplifies this greatly with server-side HTML templates.

## Disadvantages

@@ -134,11 +151,3 @@ and productivity of LiveView to the NodeJS and Deno ecosystems** and are obvious
team that invented it. We believe in it so much that we think more developers should have access to the programming
paradigm it enables.

### Reach more developers

Unfortunately, Elixir only represents
[about 2%](https://survey.stackoverflow.co/2022/#section-most-popular-technologies-programming-scripting-and-markup-languages)
of the programming language market share. We believe that **LiveViewJS** will help bring the productivity and magic of
LiveView to the
[65% of developers](https://survey.stackoverflow.co/2022/#section-most-popular-technologies-programming-scripting-and-markup-languages)
that use Javascript (and Typescript).
8 changes: 6 additions & 2 deletions apps/liveviewjs.com/docs/01-overview/paradigm.md
Original file line number Diff line number Diff line change
@@ -11,8 +11,12 @@ receives the events, it runs the business logic for that LiveView, calculates th
the diffs to the client. The client automatically updates the page with the diffs. The server can also send diffs back
to the client based on events on the server or received from other clients (think chat, or other pub/sub scenarios).

:::info **LiveViewJS** solves the complex parts of LiveViews such as connecting and managing web sockets, diffing and
patching the UI, routing events, real-time/multiplayer, file uploads, and more. :::
:::info

**LiveViewJS** solves the complex parts of LiveViews such as connecting and managing web sockets, diffing and
patching the UI, routing events, real-time/multiplayer, file uploads, and more.

:::

## How is this different from SPAs?

12 changes: 6 additions & 6 deletions apps/liveviewjs.com/docs/01-overview/runtimes.md
Original file line number Diff line number Diff line change
@@ -40,10 +40,10 @@ LiveViewJS is broken up into the following packages:
- `liveviewjs` [Node](https://www.npmjs.com/package/liveviewjs) and [Deno](https://deno.land/x/liveviewjs) - The core
package that contains the **LiveViewJS** core server code. This package is runtime agnostic and can be used with
either NodeJS or Deno.
- `@liveviewjs/gen` [Link](https://www.npmjs.com/package/@liveviewjs/gen) - The code generator package that is used to
generate the LiveViewJS code including minimal project configuration for both NodeJS and Deno. This package will also add support for generating LiveViews and LiveComponents as well as other boilerplate code.
- `@liveviewjs/express` [Node](https://www.npmjs.com/package/@liveviewjs/express) - The Express package contains [ExpressJS](https://expressjs.com/) integration code and NodeJS-specific utilities like Redis pub/sub. This package is used to integrate **LiveViewJS** with Express (NodeJS). To user this packages install via `npm install @liveviewjs/express` or `yarn add @liveviewjs/express`.
- `deno` [Link](https://github.com/floodfx/liveviewjs/tree/main/packages/deno) - The Deno package contains [Oak](https://deno.land/x/oak) integration code and Deno-specific LiveViewJS utilities like BroadcastChannel pub/sub. This package is used to integrate **LiveViewJS** with Oak (Deno). To use this package, import into your Deno project via `import { LiveViewJS } from "https://raw.githubusercontent.com/floodfx/liveviewjs/main/packages/deno/mod.ts";`. (Note: DenoLand is broken for mono-repos, so we're hosting the package on GitHub for now.)
- `@liveviewjs/examples` [Node](https://www.npmjs.com/package/@liveviewjs/examples) or
[Deno](https://deno.land/x/liveviewjs/packages/examples/mod.ts) - The package contains all the example LiveViews that
can be run on either NodeJS or Deno. This package is runtime agnostic and can be used with either NodeJS or Deno.
- `@liveviewjs/express` [Node](https://www.npmjs.com/package/@liveviewjs/express) - The Express package that contains
the Express server integration code. This package is used to integrate **LiveViewJS** with Express (NodeJS).
- `https://deno.land/x/liveviewjs@VERSION/packages/deno/mod.ts` - The Deno package that contains the Oak server
integration code. This package is used to integrate **LiveViewJS** with Oak (Deno).
[Deno](https://raw.githubusercontent.com/floodfx/liveviewjs/main/packages/examples/mod.ts) - The package contains all the example LiveViews that
can be run on either NodeJS or Deno. This package is runtime agnostic and can be used with either NodeJS or Deno. See the [examples](https://github.com/floodfx/liveviewjs/tree/main/packages/examples/src/liveviews) directory for the source code.
Original file line number Diff line number Diff line change
@@ -23,10 +23,16 @@ Navigate to the `packages/deno` directory:
cd packages/deno
```

Install dependencies:

```bash
npm install
```

Then, start the Deno server with the examples:

```bash
deno run --allow-run --allow-read --allow-env src/example/autorun.ts
deno run --allow-run --allow-read --allow-write --allow-net --allow-env src/example/autorun.ts
```

Point your browser to [http://localhost:9001](http://localhost:9001)
32 changes: 28 additions & 4 deletions apps/liveviewjs.com/docs/02-quick-starts/get-liveviewjs-repo.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,22 @@
sidebar_position: 1
---

# Let's Build a LiveView

Building a LiveView is easy with **LiveViewJS**. You can get started in just a few minutes.

## Create a New Project

**LiveViewJS** has a project generation tool that will setup the project structure and install the required dependencies for either NodeJS or Deno.

Run:
```bash
npx @liveviewjs/gen
```

You will be prompted to select the type of project you want to create and a couple other questions. Then, voilà, you will have a new project that runs out of the box!


# Download the Repo

The fastest way to run the example or build your own LiveView is by downloading the **LiveViewJS** repo. This repo
@@ -11,8 +27,12 @@ contains all the examples and configured webserver code for Express (NodeJS) and

Either use `git clone` or `degit` to get the **LiveViewJS** GitHub repository.

:::info `degit` is a lightweight way to clone a repo without the .git parts.
[More info](https://github.com/Rich-Harris/degit). :::
:::info

`degit` is a lightweight way to clone a repo without the .git parts.
[More info](https://github.com/Rich-Harris/degit).

:::

### Clone the **LiveViewJS** GitHub repository:

@@ -40,8 +60,12 @@ cd liveviewjs
**LiveViewJS** runs on both Node and Deno, but you'll probably want to start down one path or the other depending on what
runtime you are more familiar with or are already using.

:::note The **LiveViewJS** library APIs are the same so you can build your LiveViews on one platform and run them on the
other unless you are using Deno or Node-specific APIs in your LiveView implementation. :::
:::note

The **LiveViewJS** library APIs are the same so you can build your LiveViews on one platform and run them on the
other unless you are using Deno or Node-specific APIs in your LiveView implementation.

:::

### Node

Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ browser.

## Setup a new Route

Let's add a route to this LiveView to see it in our browser. Edit `packages/express/src/example/index.ts` and
make the following highlighted changes:
Let's add a route to this LiveView to see it in our browser. Edit `packages/express/src/example/index.ts` and make the
following highlighted changes:

```ts title="packages/express/src/example/index.ts" {3,7}
...
@@ -60,14 +60,18 @@ Then, start the express server:
npm run start -w packages/express
```
:::info You will probably see a warning from NodeJS about using an experimental feature:
:::info
You will probably see a warning from NodeJS about using an experimental feature:
```
ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
```
The feature we are using is the built-in `fetch` method. Feel free to ignore this warning. :::
The feature we are using is the built-in `fetch` method. Feel free to ignore this warning.
:::
## See the LiveView in Action
@@ -105,8 +109,12 @@ should look something like this:
![LiveViewJS Hello World Recording](/img/screenshots/liveviewjs_hello_toggle_liveview_rec.gif)
:::info You'll notice that **LiveViewJS** automatically rebuilds and reloads the server when you make changes to your
LiveView code. This is a great way to iterate quickly on your LiveView. :::
:::info
You'll notice that **LiveViewJS** automatically rebuilds and reloads the server when you make changes to your
LiveView code. This is a great way to iterate quickly on your LiveView.
:::
## Great start!
Original file line number Diff line number Diff line change
@@ -12,7 +12,11 @@ to get a feel for the user experience of a LiveView. Let's get started!

[Node.js](https://nodejs.org/en/download/) version 18.x or above.

:::note We rely on the NodeJS Fetch API, which is only available in 18+. :::
:::note

We rely on the NodeJS Fetch API, which is only available in 18+.

:::

If you haven't already, [download the **LiveViewJS** repo](get-liveviewjs-repo).

Loading