Commit graph

80 commits

Author SHA1 Message Date
Evan Almloff
281087469a
Move the history provider into the context (#3048)
* move history providers into a separate crate

* start moving route providers into the renderers

* clean up intoroutable

* remove into routable

* fix router tests

* Provide history providers in each renderer

* implement nested routers

* move the lens out of the history crate

* re-export dioxus history trait in the prelude

* also re-export the history function

* fix history doctests

* some light cleanups

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-10-31 12:44:04 -07:00
Evan Almloff
519ec9d294
Move the document trait into a separate crate (#3035)
* add a default head method through eval
* remove the old document trait
* implement document for each platform
* pull out document into a dedicated crate to cut down on shared dependencies
---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-10-14 10:33:37 -07:00
Jonathan Kelley
3fb1f739d1
Simplify cli-config, hotreload -> devtools (drop to 0 deps, fast compile times) (#2975)
* simplify cli-config crate
* clean up configs
* add devtools crate, update cargo imports
* fix serve addr, fix websocket proxy issue
* add comment about opt profiles
* rename hot-reload to devtools
2024-09-17 17:18:23 -07:00
Evan Almloff
cab573eefd
Synchronous prevent default (#2792)
* add prevent default methods to the event

* sync prevent default almost working

* sync prevent default working

* Move event handling into the runtime

* update core tests

* restore desktop file dialog

* implement prevent default on web

* add a hint about the new prevent default method

* fix web prevent default

* Fix CTRL+click on links

* fix values memorize in place test

* Fix a few more tests

* Add a playwright test for sync prevent default

* Fix core doc tests

* create a deprecated VirtualDom::handle_event

* fix macos imports in desktop

* Fix onmounted event

* Fix liveview support

* switch to RefCell for metadata

* Remove println

* remove prevent default attribute

* remove web specific link behavior

* Fix liveview links

* more liveview fixes for link

* Fix merge conflicts

* Fix clippy

* use the new prevent default in the file upload example
2024-08-13 11:57:54 -07:00
Jonathan Kelley
88af3e7eff
Hotreloading of for/if/body, formatted strings, literals, component props, nested rsx, light CLI rewrite, cli TUI (#2258)
Hotreload the contents of for loops, if chains, component bodies, props, attributes, and any literals discovered in rsx!
Add a TUI renderer to the CLI.
Improve the CLI build system to be async and parallel.
Refactor RSX to allow partial expansion of expressions.
Merge autofmt implementations for consistency.
Merge the representation of elements and components under the hood.
Add a diagnostics system for rsx for improved error messages.
Drop interprocess and move to websockets for communication between the CLI and the server.
Assign IDs to nodes and attributes in a stable way to be used in non compiler contexts.
Add hotreloading to any body of component/for loop/if chain/etc.

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Liam Mitchell <liamkarlmitchell@gmail.com>
2024-07-17 19:11:18 -07:00
Evan Almloff
176e67e5b7
switch to a Document trait and introduce Script/Head/Style/Meta components (#2635)
* switch to a Document trait and introduce Script/Head/Style/Meta components

* Fix desktop title

* Insert special elements into the head during the inital SSR render

* Make all head component attributes optional

* hydrate head elements

* improve the server streaming head warning

* Document fullstack head hydration approach

* deduplicate head elements by href

* move Link into head::Link

* document head components

* add meta and title examples

* Fix a few doc examples

* fix formatting

* Add title to playwright tests

* serde is optional on web, but it is enabled by hydrate

* remove leftover console log
2024-07-17 20:54:03 -05:00
Evan Almloff
a09548d80e
Remove implicit optional dependency features (#2512)
* remove implicit optional dependency features

* switch to new features in desktop, router and signals crates
2024-06-18 18:39:15 -05:00
Evan Almloff
b3cd4fac10
set up example scaping for docs.rs (#2450) 2024-05-28 13:05:55 -07:00
Evan Almloff
36f67bd5e2 update 0.4 doc links to 0.5 2024-03-27 20:42:07 -05:00
Evan Almloff
460a685fa3
Warn if cli-config is not available at compile time (#2135)
* warn if a package relies on the CLI config, but it is not built with the CLI

* fix default features

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-03-26 19:10:26 -07:00
Evan Almloff
a428c61457 fix the liveview launch function 2024-03-13 13:42:22 -05:00
Jonathan Kelley
403e8e2f49
Clean up file uploads in desktop/liveview, remove minify 2024-03-05 13:00:27 -08:00
Evan Almloff
e745212157 bump server functions 2024-02-16 12:17:01 -06:00
Jonathan Kelley
214a907adc
Upgrade to axum 0.7, drop 3rd party adapters 2024-02-15 18:05:30 -08:00
Evan Almloff
a789d6a64e make eval copy 2024-02-02 14:47:59 -06:00
Evan Almloff
b3ed337b6b fix SLEDGEHAMMER_JS import path in desktop 2024-02-01 10:55:10 -06:00
Evan Almloff
2371c9eed3 minify js at runtime in liveview 2024-02-01 10:10:05 -06:00
Evan Almloff
636aeb4b90 integrate liveview with the launch builder 2024-01-22 11:56:34 -06:00
Jonathan Kelley
83bce6ce97
Make cargo check --all --examples work! 2024-01-19 14:19:49 -08:00
Jonathan Kelley
6ed3aafb2f
Get cargo check --all working 2024-01-18 19:27:55 -08:00
Evan Almloff
af1749d7be re export renderers in dioxus 2024-01-15 19:14:11 -06:00
Evan Almloff
dccfba12d8 Merge branch 'master' into events-2 2024-01-04 19:02:00 -06:00
Jonathan Kelley
a2f44be2a2
Merge branch 'master' into binary-protocal 2024-01-04 10:17:10 -08:00
ealmloff
060e9348af
Merge branch 'master' into bump-salvo-utils 2024-01-02 13:45:49 -06:00
Georges KABBOUCHI
3733fbf47d
feat(liveview): add rocket adapter (#1761) 2023-12-30 13:49:32 -06:00
Evan Almloff
37e9876a70 bump salvo 2023-12-20 15:18:20 -06:00
Evan Almloff
c9612a085e fix liveview mounted event 2023-10-19 16:40:08 -05:00
Evan Almloff
f20b740abe switch liveview to sledgehammer 2023-10-09 14:28:12 -05:00
Evan Almloff
219c068283 Merge branch 'master' into events-2 2023-09-17 20:01:21 -05:00
marc2332
7f8c963cd9
fix: Update doc links from v3 to v4 2023-09-16 19:03:27 +02:00
Evan Almloff
c55c17cb81 switch to tracing for logging 2023-09-06 17:47:33 -05:00
Evan Almloff
62556b2c34 fix desktop and liveview compilation 2023-08-28 12:43:21 -05:00
Jonathan Kelley
39e89c1fac
Bump crate versions, fix any publish errors 2023-07-31 18:49:54 -07:00
Jonathan Kelley
8a875acdd2
Adjust versions, add authors, move server macro to top level 2023-07-31 17:59:36 -07:00
Miles Murgaw
6210c6fefe
Convert use_eval to use send/recv system (#1080)
* progress: reworked

don't run this, it'll kill your web browser

* feat: use_eval but with comms

* revision: async recv & recv_sync

* revision: use_eval

* revision: standard eval interface

* revision: use serde_json::Value instead of JsValue

* revision: docs

* revision: error message

* create: desktop eval (wip)

* fix: desktop eval

* revision: wrap use_eval in Rc<RefCell<_>>

* fix: fmt, clippy

* fix: desktop tests

* revision: change to channel system

- fixes clippy errors
- fixes playwright tests

* fix: tests

* fix: eval example

* fix: fmt

* fix: tests, desktop stuff

* fix: tests

* feat: drop handler

* fix: tests

* fix: rustfmt

* revision: web promise/callback system

* fix: recv error

* revision: IntoFuture, functionation

* fix: ci

* revision: playwright web

* remove: unescessary code

* remove dioxus-html from public examples

* prototype-patch

* fix web eval

* fix: rustfmt

* fix: CI

* make use_eval more efficient

* implement eval for liveview as well

* fix playwright tests

* fix clippy

* more clippy fixes

* fix clippy

* fix stack overflow

* fix desktop mock

* fix clippy

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-07-21 17:36:25 -05:00
Jonathan Kelley
91d4207fa7
Merge branch 'master' into feature/use-shared-state-better-diagnostics 2023-07-20 10:51:10 -07:00
Andrea Frigido
dccad58f1d Update license field following SPDX 2.1 license expression standard 2023-07-20 18:00:07 +01:00
niedzwiedzw
f159779af4 make thiserror a workspace dependency everywhere else 2023-07-11 22:54:24 +02:00
Marc Espín
32d4472bfd
fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
xinglixing
fb227943ae
Fix: bump liveview salvo version to 0.44.1. (#1224) (#1130) 2023-06-28 14:10:18 -05:00
Evan Almloff
5f873511c5 use workspace dependancies 2023-06-19 14:29:11 -05:00
Jonathan Kelley
f63220019d bump liveview version 2023-06-08 15:08:40 +00:00
Azriel Hoh
52742b30ae Update pretty_env_logger to address security advisory. 2023-05-29 12:20:33 +12:00
Evan Almloff
e1f02f8135 Merge branch 'upstream' into query-system 2023-04-26 18:00:39 -05:00
Jonathan Kelley
22cfff647c Merge branch 'master' into implement-file-engine 2023-04-26 15:32:34 -07:00
Evan Almloff
254947a194 fix liveview tokio features 2023-04-25 15:08:53 -05:00
Evan Almloff
9cfb655478 implement the file engine for liveview 2023-04-25 14:26:12 -05:00
Evan Almloff
8243dfe00d implement a query engine for liveview 2023-03-23 16:52:29 -05:00
Breno Rocha
8d470ceb78
chore: change tokio to support shuttle-service 2023-01-28 20:20:22 -03:00
Evan Almloff
0c6750d177 fix dependancies 2023-01-13 17:50:32 -06:00