Commit graph

6180 commits

Author SHA1 Message Date
Evan Almloff
0e937daaa1
Finish the running examples section of the readme (#2889) 2024-08-28 18:52:53 -05:00
Evan Almloff
e5696cd72f
Fix script component src attribute (#2887) 2024-08-28 18:52:36 -05:00
Marc Espin
91112734f6
Revert "feat: Manual impl of PartialEq for Coroutine" (#2899)
* Revert "feat: Manual impl of PartialEq for `Coroutine` (#2895)"

This reverts commit e6efd973d8.

* Update use_coroutine.rs

* Update use_coroutine.rs

* Update use_coroutine.rs
2024-08-28 16:09:31 +00:00
Sridhar Ratnakumar
e552251683
Restore Nix devShell support (#2890)
* nix: Avoid Linux only packages on macOS

* nix: Update flake inputs to get new compiler

In particular, updating nixpkgs & rust-overlay gets us Rust 1.80.1

* Fix partialeq for coroutine

* add a comment about manual implementation of traits for coroutine

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-08-28 09:25:25 -05:00
Marc Espin
e6efd973d8
feat: Manual impl of PartialEq for Coroutine (#2895) 2024-08-27 15:03:33 -05:00
Drew Pirrone-Brusse
a575a425e3
Add placeholder doc comments to macro-generated enums (#2872)
* Add placeholder doc comments to macro-generate enums

* Add doc comments to generated router parse error enums

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-08-26 08:26:46 -05:00
Drew Pirrone-Brusse
eac7f65551
Bump dependencies to transitively bump git2 from 0.18 to 0.19 (#2873)
* Bump built to version 0.7.4

* Bump cargo-generate to 0.21.3

* Update Cargo.lock
2024-08-22 18:05:36 -07:00
Evan Almloff
be630a9d3f
Bump sledgehammer (#2879)
* bump sledgehammer

* Bump minor sledgehammer utils version
2024-08-22 18:04:45 -07:00
Jonathan Kelley
005d52468d
Fix: clippy, dont throw error on commas (#2869)
* Fix: clippy, hotreload css blocks, raw blocks

* fix test

* okay nevermind
2024-08-20 23:57:56 +00:00
Jonathan Kelley
5c002686d0
Update README.md to highlight both licenses (#2868) 2024-08-20 17:20:48 -05:00
Evan Almloff
effc0a3b94
Make use_callback and Callback bring the runtime with them (#2852)
* Move the runtime along with Callback
2024-08-20 14:58:53 -07:00
Evan Almloff
5a7a91323a
Make desktop fullstack work with the CLI (#2862)
* Make desktop fullstack work with the CLI
* Simplify desktop fullstack example
* move the profiles to the workspace
2024-08-20 14:57:51 -07:00
Evan Almloff
6a46a66c9a
Fix hot reload custom element (#2866)
* Fix hot reloading attributes on web components
2024-08-20 14:56:47 -07:00
ASR-ASU
3c699aad26
Enable wry linux-body feature flag for linux os target (#2856) 2024-08-20 12:06:44 -05:00
Miles Murgaw
8e613d3bcc
fix: cli progress (#2840) 2024-08-19 14:10:53 -07:00
Jonathan Kelley
4963aa3118
fix autofmt: don't panic when writing blocks out without a srcfile (#2854)
* fix: don't panic when writing blocks out
* also fix serialization for hotreload
* fix windows line endings
2024-08-16 21:55:30 -07:00
Evan Almloff
b47a6cf83e
Move to a generic GlobalLazy<T> (#2851)
* Expose a generic lazy type

* Switch to generic lazy globals

* simplify global lazy context a bit

* rename LazyGlobal to Global

* use Memo::global in more examples

* Fix soundness issue with deref_impl. It relies on the size of self, so it cannot be safe

* add a comment about safety

* Make clippy happy

* fix formatting

* Restore changes to signal impl

* Add helper methods for global signal and global memo to make getting the inner value easier
2024-08-16 17:57:41 -05:00
Miles Murgaw
668d5415c8
Fix: Make Toast Fixed & Increase Z-Index (#2850) 2024-08-16 10:54:35 -07:00
Jonathan Kelley
c21b44a4e6
fix collapsing of multiline components and rsx!{} calls (#2849) 2024-08-15 17:03:58 -07:00
Evan Almloff
40dc14389e
Don't rebuild when the code is in an invalid intermediate state (#2848)
* don't rebuild when the code is invalid

* Fix comment
2024-08-15 12:45:05 -07:00
Jack Lund
ecb077d734
fixes #2833 (#2835) 2024-08-14 22:09:12 -07:00
ASR-ASU
2f49a89638
Add the onresize event handler to Element (#2479)
* Add the capability to handle resize event for web target

* Add the capability to handle resize event for desktop target

* Return all the sizes, not just the first one

* Fix conversion from platform to generic ResizedData for liveview

* Update the generated interpreter js code base

* Fix clippy warnings

* Fix inconsistent use of block_size and inline_size

* Rename `onresized` event to `onresize`

* Remove the the special-casing logic from the binding logic

* Propagating the resize events using CustomEvent

* Fix case convention in core ts

* revert changes to unified bindings

* Cleanup as suggested

* add a resize example

* Fix desktop resize events

* remove tracing from resize example

* use the raw resize entry so we can downcast on web

* remove unused ResizeEventDetail

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-08-15 01:23:49 +00:00
Evan Almloff
4d6fb74e87
Fix hot reloading component properties out of order (#2842)
* Fix hot reloading component properties out of order

* ignore signal write warnings in hot reloading

* Fix hot reloading components with only some literal properties

* Add a test for hot reloading component properties
2024-08-14 15:18:37 -07:00
Evan Almloff
1e03e3946d
queue hot reload changes for future clients (#2843) 2024-08-14 14:55:04 -07:00
Jonathan Kelley
2f30c73678
Fix side-by-side fragments by walking in reverse (#2841)
* got a repro, but no solution :(

* hmmmmm 🤔

* awyayayayayayya

* omg it's because we dont create in rev

* Make nodes rev

* fix tests compile

* Clean up PR

* revert changes to native

* Clean up PR, add test
2024-08-14 19:38:54 +00:00
Jonathan Kelley
851abe82d5
Fix non-brace delimeters in nested macro formatting (#2831) 2024-08-13 22:47:43 -07:00
Evan Almloff
d649b0c54d
Fix mount use after removal/Simplify mounts a bit (#2834)
* remove clone mounted; mounted nodes should never leak into components?

* Remove the mount from vnodes after unmounting them

* Fix use after removal in iterator diffing

* remove logs

* Re-fix keyed list diffing

* Use new.len for diffing keyed lens and remove redundant check

* simplify core list diffing logic a bit

* remove println

* add proper asserts for new tests

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-08-13 22:47:12 -07:00
Evan Almloff
959ab67624
Fix templates merging in debug mode in macros (#2828)
* Fix templates merging in debug mode in macros

* Fix clippy

* Fix web-sys scroll to deprecated warning
2024-08-13 20:18:54 +00: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
Miles Murgaw
8b62b71e2d
update: wasm-bindgen (#2824) 2024-08-13 11:41:21 -05:00
Jonathan Kelley
0de3bf7aeb
Fix nested rsx expansion by not using template titles (#2799)
* Fix nested rsx expansion by not using template titles

* fix writers with nameless templates

* fix clippy

* dont commit vscode fix

* fix release mode, pull out __template_name

* fix axum_desktop

* Fix core tests

* Make most fields of HotReloadedTemplate public for testing

* wip: formatting, compare all diff cases

* slightly smarter diffing for dynamic nodes

* add a comment about generic node diffing

* clean up mutations a bit

* fix load template

* simplify maybe_rebuild

* Restore write mutations flag in web

* write_mutations -> skip_mutations

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-08-13 01:59:04 +00:00
Sylvain Tertois
a2180b92e9
adding the Access-Control-Allow-Origin header to files served from filesystem in dioxus-desktop (#2818) 2024-08-12 12:52:51 -07:00
Evan Almloff
f10ba975ba
Fix assets folder workspace (#2821)
* Fix the asset folder location in workspaces

* Fix where the asset folder is copied to in fullstack builds
2024-08-12 12:52:33 -07:00
Evan Almloff
0bb81aba6e
fix Option<T> with non path T types (#2808) 2024-08-09 13:46:37 -07:00
Leonard
b97e607aca
Simplify and fix some issues with #[component] macro (#2289) 2024-08-08 18:00:37 +00:00
Jonathan Kelley
a84c2ec6d2
Fix mac CLI publish by using mac13 for runner (#2803) 2024-08-07 19:42:41 -07:00
Jonathan Kelley
8c992bb4cb
Fix github CLI publish CI msrv (#2802) 2024-08-07 16:50:43 -07:00
Jonathan Kelley
506d47f7d2
bump dioxus released to alpha-0.2 (#2800)
dioxus@0.6.0-alpha.2
dioxus-autofmt@0.6.0-alpha.2
dioxus-check@0.6.0-alpha.2
dioxus-cli@0.6.0-alpha.2
dioxus-cli-config@0.6.0-alpha.2
dioxus-config-macro@0.6.0-alpha.2
dioxus-core@0.6.0-alpha.2
dioxus-core-macro@0.6.0-alpha.2
dioxus-desktop@0.6.0-alpha.2
dioxus-fullstack@0.6.0-alpha.2
dioxus-hooks@0.6.0-alpha.2
dioxus-hot-reload@0.6.0-alpha.2
dioxus-html@0.6.0-alpha.2
dioxus-interpreter-js@0.6.0-alpha.2
dioxus-liveview@0.6.0-alpha.2
dioxus-mobile@0.6.0-alpha.2
dioxus-router@0.6.0-alpha.2
dioxus-rsx@0.6.0-alpha.2
dioxus-signals@0.6.0-alpha.2
dioxus-ssr@0.6.0-alpha.2
dioxus-static-site-generation@0.6.0-alpha.2
dioxus-web@0.6.0-alpha.2
generational-box@0.6.0-alpha.2
rsx-rosetta@0.6.0-alpha.2

Generated by cargo-workspaces
2024-08-07 16:38:58 -07:00
Evan Almloff
4c0fefbcb9
Fix autocomplete in rsx (#2794) 2024-08-06 16:51:55 -07:00
Evan Almloff
eeccb741d3
Re-export the axum feature flag under "server" (#2786)
* re-export the axum feature flag under "server"
* remove the axum prefix from all the fullstack examples
2024-08-06 21:35:04 +00:00
Evan Almloff
37ea8ab906
Fix suspense diffing (#2789)
* Fix suspense placeholders after creating a node
* add nested suspense client side core test
* fix resolve suspense
2024-08-06 13:54:58 -07:00
Matt Hunzinger
0042430a36
Add new crate to workspace members (#2775)
* Add new crate to workspace members

* Replace DioxusCrate with cargo metadata

* Skip initializing git repo in already existing workspace

* Fix init in workspace

* Fix naming issues with new packages

Changes how we parse names so `dx new packages/blah`creates a subdirectory instead

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-08-06 20:52:33 +00:00
Evan Almloff
e4abe79276
Fix fullstack cli progress (#2787)
* Fix progress for fullstack builds
* Fix internal logs
2024-08-06 13:51:15 -07:00
dependabot[bot]
469ab66341
Bump actions/cache from 3 to 4 (#2785)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 11:51:26 -05:00
Evan Almloff
b0a2e2418c
Bubble errors from the server to the client on suspense boundaries (#2772)
* Bubble errors from the server to the client on suspense boundaries

* make resolving suspense boundaries O(n)
2024-08-02 19:01:55 -07:00
Miles Murgaw
3003362b52
remove: changelog.md (#2776) 2024-08-02 23:29:28 +00:00
Matt Hunzinger
205d8e9070
Add argument to use_callback (#2774) 2024-08-02 16:15:59 -07:00
Evan Almloff
14081e7e45
Add a warning when a copy value is used in a higher scope than it was created in (#2771) 2024-08-02 10:48:13 -07:00
Miles Murgaw
0acfe37398
revision: make EvalError impl Error (#2768) 2024-08-02 10:46:43 -07:00
Miles Murgaw
f42ca65931
Fix Links & Add Link Checker (#2769)
* feat: link checker
2024-08-02 10:46:18 -07:00