Commit Graph
6551 Commits
Author SHA1 Message Date
Carlos Diaz-Padron 1a3df9d863 add some CLI docs for stdin file input to fmt command (#3934) 2025-04-15 14:53:53 -07:00
Brian MayandJonathan Kelley 5109a4b745 feat: add cli support to build assets from executable (#3429)
* feat: add cli support to build assets from executable

See https://github.com/DioxusLabs/dioxus/discussions/3402#discussioncomment-11632372

* fix: store relative paths in executable

* bring back deprecation warning

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-04-15 14:51:04 -07:00
Brian May 2c5de0a713 fix(fullstack): Allow configuration of the public_path (#3419) 2025-04-15 14:50:22 -07:00
Miles MurgawandJonathan Kelley e96550c48c Manganis CSS Modules Support (#3578)
* feat: type safe css selectors

* feat: css modules support

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-04-15 14:44:22 -07:00
Evan Almloff bcc1dc020c Fix javascript asset bundling errors and fallback (#3935) 2025-04-15 14:38:11 -07:00
Varun V 487fa25dc8 fix: Use as_value() to properly serialize form values in login example (#3835)
The login form example was trying to directly use FormValue in reqwest's form method, which doesn't implement Serialize. This change extracts the actual string values using as_value() before sending them to the server.
2025-04-15 14:34:20 -07:00
Youn Mélois fd65c12bf5 fix(rsx): formatted attribute merging (#3719)
* test(rsx): add better tests for attributes merging

* fix(rsx): zero-lengthed source with non-empty segments is non-trivial

* refactor(rsx): use `is_empty` instead of `len() == 0` (clippy)

* fix(rsx): different asserts whether in release or not
2025-04-15 14:28:14 -07:00
_Robertas c58d7303b8 default the storage to UnSyncStorage in ReadSignal type (#3879) 2025-04-15 14:23:26 -07:00
Leon Wimbes 5f01d79907 Update and improve dev container: (#3977)
- Replace deprecated `crates` extension with `dependi`
- Add Playwright extension
- Simplify Dockerfile
- Add dependencies as specified in the Dioxus documentation
- Pre-install Playwright dependencies
- Adjust README.md
2025-04-15 14:22:40 -07:00
Henry 93a557c322 Env logger feature (#3775)
* feat: Expose and configure tracing env-filter

* doc: Add env-filter doc part

* chore: Remove conditional import

* Move logger env-filter feature out of feature flag

* Update logger env filtering

* Add RUST_LOG to the process from the cli

* Typo

* fix clippy

* clippy
2025-04-15 14:21:28 -07:00
Miles Murgaw 9ffa42392f fix: eval (#3877) 2025-04-15 14:20:25 -07:00
Steve SchoettlerandJonathan Kelley a1107de0c0 Update axum and many dependencies (#3825)
* Update many dependencies; includes prs 3820 (axum 0.8.1), 3810 (wry 0.50.1), 3801 (tauri)

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-04-15 14:19:47 -07:00
1379de7cc7 Changes to support axum 0.8 (#3820)
* changes to support axum 0.8

* fixing ci/cd failures. I would like advice on the change to cli/server

* putting back in something I took out because I am retarded

* update server function revision

* remove playwright test results

* clippy

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-04-15 13:13:58 -07:00
dependabot[bot] 66e284ce42 build(deps): bump crossbeam-channel from 0.5.14 to 0.5.15 (#3978)
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.14 to 0.5.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-11 21:11:58 -07:00
Henry b6243d32a3 feat: Add logger to logger example (#3846)
* feat: Add logger to logger example

* Add comment to logging example
2025-04-09 11:06:43 -07:00
Christopher Serr 3da821d184 Provide HotkeyState on Global Shortcut Events (#3822)
* Only react to hotkeys that are pressed

The global shortcuts are otherwise also triggering when the hotkey is
being released. This affects at least Windows.

* Provide `HotkeyState` on Global Shortcut Events

Instead of ignoring the events where the shortcut is released, the state
is now provided as an argument to the event handler.
2025-04-09 11:04:06 -07:00
Clouds e0ecf0eb49 fix: more accurate derive Clone, PartialEq for generic components (#3968)
* convert to manual clone implements
* add test for generics
2025-04-09 11:03:14 -07:00
dependabot[bot] 82534d389f build(deps): bump JamesIves/github-pages-deploy-action (#3794)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.9 to 4.7.3.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.6.9...v4.7.3)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 10:53:35 -07:00
Jonathan Kelleyotgerrogla 2356820+otgerrogla@users.noreply.github.comNico BurnskokoDavid HusičkaluoxiaozeroEvan Almloff
12c6938346 feat: inline dioxus-native from blitz (#3675)
* Rename dioxus-blitz to dioxus-native

* Add CSS import support (#139)

* Remove data dependencie from NetProvider + global provider.

* Feat CSS import

* Move net handler code out of util

* Fixing test...

* Use the better suited OnceLock instead of LazyLock

* Removing static and move resource callback back out of the document.

Signed-off-by: koko <kokos.kekse@gmail.com>

* Make things work

Signed-off-by: koko <kokos.kekse@gmail.com>

* Fix the servo example

Signed-off-by: koko <kokos.kekse@gmail.com>

* Replace servo image with a more compact version

Signed-off-by: koko <kokos.kekse@gmail.com>

* revert: 8467b271

Signed-off-by: koko <kokos.kekse@gmail.com>

---------

Signed-off-by: koko <kokos.kekse@gmail.com>

* Create readme app

* WPT: reuse FontContext to avoid reloading system fonts

Takes runtime for css-flexbox from 12s -> 8s

* Move Devtools to traits crate

* Suppress unused variable warning

* Implement net for DioxusDocument

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Eliminate BlitzWindowEvent type

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Make net crate use document id instead of window id

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Rename and document net traits

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Split `dioxus-native` crate into `dioxus-native` and `blitz-shell` crates (#163)

* Rename waker module to event

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Create seperate DioxusNativeApplication

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Rename dioxus-native crate to blitz-shell

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Split blitz-shell out of dioxus-native crate

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Remove need for dioxus-native to depend directly on stylo

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Unnest dioxus-native modules

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Split MutationWriter into it's own module

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Split HtmlDocument into it's own crate

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Rename dom field of Window to doc

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Support prefers-color-scheme (dark mode)

* Remove use of the `todo` macro in event handling and add a comment about it being a todo (#168)

Using the `todo` macro causes a panic when this event is encountered. Noop is preferable in this case as it does not crash the application. This is especially annoying on platforms where `Ime::Enabled` event is sent upon application start even when the user is using a keyboard layout that does not need an IME support. There was added a "TODO" comment that informs about this feature being missing. Most IDEs and code editors have support/plugins/extensions to work with this type of comments and this type of comment is already used widely across the codebase. As such, the information about this feature not being implemented is not lost.

* Upgrade to dioxus 0.6-rc.0

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix text input in dioxus-native

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Make dioxus-native depend dioxus-core and dioxus-html rather than dioxus

* Remove "full" feature from tokio

* Move Viewport to blitz_traits

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Make tokio optional in dioxus-native and blitz-shell

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Make SVG support optional

* Abstract renderer behind a trait

blitz-shell no longer depends on blitz-renderer-vello

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Split HTML launch functions out in `blitz` crate

* feat: Add mousedown and mouseup event (#172)

* feat: Add mousedown and mouseup event

* feat: Triggering :active pseudo-class

* fix: Triggering :active pseudo-class

* Rename RendererEvent to DomEvent

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Rename Document to BaseDocument. DocumentLike to Document

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Move event and document abstractions to blitz-traits

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Rename BlitzEvent to BlitzShellEvent

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Restyle when style attribute is mutated

* feat: Support text box mouse selection (#182)

* Rename raw_dom_data to data

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Rename dioxus-native to native

* Add to workspace

* simplify launch module, integrate native

* Fix it up again

* Update cargo lock

* FIx: propagate accessibility feature fla

* implement asset resolver

* add native to feature match in cli

* Implement document and history for native

* use no-op eval

* clippy

* typos

* typo

* Convert logs to trace

* Bump blitz to alpha releases

* unset image data

* fix style integration with blitz

* fix a few lints

* wire up ids

* implement a few more events

* add more helpful todo note

* bump ci to allow edition 2024, use newer nightly

* make clippy happy

* also update matrix tests to rust 2024

* Add autofocus

Co-authored-by: otgerrogla 2356820+otgerrogla@users.noreply.github.com

* Wait for the suspense boundary above the router to resolve before sending the first streaming chunk (#3891)

* Change the suspense streaming context after suspense is resolved in the router

* Wait for the suspense context before streaming the first chunk in ssr

* forward more response parts

* warn

* extract the hydration format into a crate

* Fix hydration when no data is sent

* forward web and server features

* Fix suspense that starts on the client

* fix use_server_future on the client

* Add documentation for fullstack hooks and protocol

* downgrade rust edition

* fix clippy

* fix tests

* fix clippy

* Fix pure web compile

* undo changes to the fullstack router example

* fix formatting

* hoist a bunch of deps

---------

Signed-off-by: koko <kokos.kekse@gmail.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: koko <72217393+kokoISnoTarget@users.noreply.github.com>
Co-authored-by: David Husička <25853767+DavidHusicka@users.noreply.github.com>
Co-authored-by: luoxiaozero <48741584+luoxiaozero@users.noreply.github.com>
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-04-08 17:30:49 -07:00
Evan Almloff 84221f55a0 Wait for the suspense boundary above the router to resolve before sending the first streaming chunk (#3891)
* Change the suspense streaming context after suspense is resolved in the router

* Wait for the suspense context before streaming the first chunk in ssr

* forward more response parts

* warn

* extract the hydration format into a crate

* Fix hydration when no data is sent

* forward web and server features

* Fix suspense that starts on the client

* fix use_server_future on the client

* Add documentation for fullstack hooks and protocol

* downgrade rust edition

* fix clippy

* fix tests

* fix clippy

* Fix pure web compile

* undo changes to the fullstack router example

* fix formatting
2025-04-08 16:01:21 -05:00
Evan Almloff 4f74ef81d1 Fix escaped text in ssr stylesheets and scripts (#3933) 2025-04-07 18:38:46 -07:00
Evan Almloff 16cae8abaf fix key validation logic (#3936) 2025-04-07 17:29:53 -07:00
Evan Almloff 5e9a505465 Fix select multiple default value (#3953)
* Fix select multiple default value

* Add a playwright test for select multiple
2025-04-07 17:28:26 -07:00
Evan Almloff cbb91d694f Fix component macro with where clause (#3951) 2025-04-07 16:36:16 -07:00
Evan Almloff 589440b9cb Allow spread attributes to be set directly (#3881)
* allow spread attributes to be set directly

* Remove ordering requirement
2025-04-07 16:35:16 -07:00
Evan Almloff 8c866b783d Remove default features when fullstack is enabled and one platform is enabled in the default features (#3925)
* Don't enable default features when only either the server or client is enabled
2025-04-07 16:19:48 -07:00
dependabot[bot] 23286ade2b build(deps): bump openssl from 0.10.68 to 0.10.72 (#3955)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.68 to 0.10.72.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.72)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-04 13:52:55 -07:00
dependabot[bot] fc861327dc build(deps): bump tar-fs from 2.1.1 to 2.1.2 in /packages/extension (#3954)
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.2.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 2.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-04 11:59:28 -07:00
Henry 3ee3d0610d feat: Add head ordering doc part (#3771) 2025-04-04 10:55:27 -07:00
Henry 2e856ecb3b doc: Fix spawn doc (#3871) 2025-04-04 10:44:20 -07:00
Henry 83ea89b88c fix comment (#3929) 2025-04-04 10:43:28 -07:00
Evan Almloff 44025340c7 Fix windows CI by removing virtual file system cache (#3912)
* try to fix windows CI

* just remove the vfs logic
2025-04-04 10:40:54 -07:00
Avinash jainandEvan Almloff bdf87aadc7 fixed the bug when future restarts the state goes to ready instead of pending (#3617)
* fiexed the bug when future restarts the state goes to ready instead of pending

* fix typo

* Fix future and formatting

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-03-27 08:28:20 -05:00
Gabi dfc359cdfb adds feature server_fn_axum that compiles for wasm target (#3840)
The current `axum` feature and `server` feature are incompatible with wasm32-unknown-unknown target
due to:
1. depends on axum features not compatible with wasm
2. SSR requires reading the filesystem for index.html

With this patch I add the `server_fn_axum` feature which disables SSR and enables targeting
wasm32-unknown-unknown with server functions enabled.

Note that for this to work, `server_fn` depends on `inventory` and as stated in this docs depending on
the context you might need to expose and call [`__wasm_call_ctors`](https://docs.rs/inventory/latest/inventory/#webassembly-and-constructors)
(I needed that specifically for cloudflare workers)

change axum_server_fn feature for axum_wasm and include SSR tools there

This change additionaly make axum_server_fn feature additive by exposing a different
`DioxusRouterWasmExt` with only the wasm-compatible parts instead of exposing the
`DioxusRouter` trait under the same name.

Docs are updated to reflect this change.

rename axum_wasm to axum_core and update docs

fix typo

re-enable default-features for axum in dioxus-cli

re-enable axum default-features for liveview

re-enable default-features for axum for playwright-tests
2025-03-27 00:51:53 -06:00
MintSoup dc0f0dbd2c Fix later-attached wry event handlers not getting called (#3908) 2025-03-26 21:50:43 -06:00
Juan Vásquez 6bdb69e235 Fixed android app crashing when changing phone orientation (#3905) 2025-03-24 17:12:17 -07:00
Casey Kneale 9e09bcf3f7 trivial fix for documentation example for onclick handler of buttons (#3882) 2025-03-16 16:25:17 -07:00
Evan Almloff 09a4b5eb4e Return a 404 when paring the route fails (#3860)
* return a 404 when paring the route fails

* add a playwright test for fullstack routing status codes

* Fix new playwright test

* document SSRError

* Make SSRError public and fix clippy

* Move the error display bound to the routable trait

* fix clippy

* return a more generic 404 message

* fix router tests
2025-03-14 00:51:44 -07:00
hackartist 7b7357037f fix(server): Provide GoogleBot compatibility. (#3851) 2025-03-11 09:14:53 -07:00
Carlos Diaz-Padron dfc59a8465 Rename wgpu child window example for discoverability (#3837)
* rename wgpu child window example

* rename child window example in Cargo.toml
2025-03-10 11:01:23 -07:00
dependabot[bot] ae1ec6f3be build(deps): bump ring from 0.17.8 to 0.17.13 (#3841)
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 10:59:08 -07:00
Sabin Regmi 8b4ccb7817 update: modify outlet context initialization level (#3830) 2025-03-06 11:14:05 -06:00
hackartist 64106ba9af fix(fullstack): correct suspense handling in SSR renderer (#3829)
Move suspense handling to the correct position in the SSR renderer to ensure proper rendering when streaming is disabled.
2025-03-05 12:41:31 -06:00
Jonathan Kelley 650605f4d1 fix: merge conflict resulting in windows lint 2025-03-04 16:31:29 -06:00
SmileSky 91a218039e Update wry version to 0.50.1 (#3810)
Signed-off-by: SmileSky <mzdk100@foxmail.com>
2025-03-04 14:36:19 -06:00
Miles Murgaw 7c2cea9df7 Revision: Cleanup Dioxus.toml (#3802)
* revision: remove unused config options

* remove: unsused icon
2025-03-04 14:30:44 -06:00
Evan Almloff 8dbb652628 update the server function crate to 0.7 (#3560) 2025-03-04 14:29:56 -06:00
Miles Murgaw bcd34e9a98 update: tauri-bundler, tauri-utils (#3801) 2025-03-04 14:28:44 -06:00
Philipp Herzog 87d113bddd adjust muda requirements to rely on a single version (#3533) 2025-03-04 14:21:40 -06:00
Evan Almloff eccd75a1fe Switch the default server function codec to json (#3602)
* Switch the default server function codec to json

* test both input and output encoding
2025-03-04 14:20:56 -06:00