Commit graph

3209 commits

Author SHA1 Message Date
Deep Patel
8b411b8c6d
Update Cargo.toml (#1466)
Remove duplicate `dox` feature that resulted in build fail
2023-09-17 14:18:23 -05:00
Evan Almloff
23c215da02 make RuntimeGuard public 2023-09-17 14:11:13 -05:00
Jonathan Kelley
9c300ff266
Merge pull request #1324 from ealmloff/bool-attrs-ssr
Fix boolean attribute rendering in SSR
2023-09-16 12:01:52 -07:00
Jonathan Kelley
a7551d1e63
Merge branch 'master' into log-server-errors 2023-09-16 12:00:54 -07:00
Jonathan Kelley
13f10fea1b
Merge pull request #1441 from ealmloff/fix-uplink
Expose public methods for manipulating the global runtime
2023-09-16 11:59:59 -07:00
Jonathan Kelley
73169e377e
Merge pull request #1322 from ealmloff/fix-text-node-target-events
Fix events with a text node target
2023-09-16 11:57:33 -07:00
Jonathan Kelley
cb39122247
Merge pull request #1298 from ealmloff/fix-spread-routes
Fix parsing spread routes
2023-09-16 11:56:54 -07:00
Jonathan Kelley
30b958ffa8
Merge pull request #1386 from ealmloff/fix-new-signals-in-effects
Fix leaked signals created in effects
2023-09-16 11:56:40 -07:00
Jonathan Kelley
de649a46d6
Merge pull request #1315 from ealmloff/handle-select-elements
Handle oninput for select elements
2023-09-16 11:56:18 -07:00
Jonathan Kelley
2f1fbf3ca4
Merge pull request #1406 from DioxusLabs/fix-router-query
Fix web query segments
2023-09-16 11:55:43 -07:00
Jonathan Kelley
e59a05141e
Merge pull request #1446 from ealmloff/deduplicate-hot-reload-cli
Deduplicate serve code with hot reloading in the CLI crate
2023-09-16 11:55:16 -07:00
Jonathan Kelley
e4620250bd
Merge branch 'master' into fix-docs-rs-desktop-build 2023-09-16 11:54:08 -07:00
Jonathan Kelley
1a093b895e
Merge pull request #1464 from marc2332/fix/update-doc-links-v3-to-v4
fix: Update doc links from v0.3 to v0.4
2023-09-16 11:53:17 -07:00
Jonathan Kelley
f2b05bcfb4
Merge pull request #1440 from ealmloff/fix-use-future-docs
Fix use_future docs
2023-09-16 11:52:54 -07:00
marc2332
7f8c963cd9
fix: Update doc links from v3 to v4 2023-09-16 19:03:27 +02:00
Leonard
c866ae602b
Add system for creating component attributes + new #[component] attribute (#1448)
* Add `#[component]` attribute + system for creating component attributes + other stuff

* Delete inlineprops.rs

* Update inline_props.rs

* Cargo fmt

* Fix clippy warnings and paths in props/mods.rs

* Include where clause in `#[inline_props]` output

* Allow Clippy type complexity in `LinkProps`

* Allow the type complexity lint for the entire link.rs file

* Remove snake_case -> PascalCase converter, but rather enforce PascalCase

Also:
- Put the second function inside the main one instead of besides it.
- Simplify

* Simplify type check lints so they don't return false positives

They will not always work, but they won't return any false positives, like for aliases. This is likely going to be replaced by a more polished Clippy-backed linting system.

* Fix #583

* Cargo fmt

* Add docs for `deserialize()` and remove useless comment

* Add `#[component]` to prelude

* Merge branch 'master' of https://github.com/tigerros/dioxus

* #[inline_props] is no more. Except in the docs folder, but that's going to be removed

* Remove docs folder

* Remove docs from workspace

* Resolve `DeserializerOutput` conversation
2023-09-15 09:13:36 -05:00
Evan Almloff
9f1c735cf1 combine style and class attributes when there are multiple 2023-09-14 16:40:49 -05:00
Evan Almloff
1a17ca988c fix double quotes in autoformatting 2023-09-14 16:19:21 -05:00
Evan Almloff
be4b0c801a fix raw attributes with dynamic values 2023-09-14 16:10:48 -05:00
Evan Almloff
30b124189c fix raw attribute names 2023-09-14 15:56:17 -05:00
Evan Almloff
8c47dfaf78 clean up attribute parsing 2023-09-14 14:08:39 -05:00
ealmloff
ea69811e70
Merge branch 'master' into bump-wry 2023-09-14 12:55:54 -05:00
Jonathan Kelley
b68a1f57e0
Merge pull request #1436 from ealmloff/tracing 2023-09-13 10:41:23 -07:00
Daniel Albl
18dca07e4b
Use a gen in PartialEq for UseSharedState (#1389)
* Special case UseFutureDep for UseSharedState

* Add 'gen' to UseSharedState for use in 'PartialEq'

* Update 'gen' in 'UseSharedState::new'

* Don't require PartialEq for T in UseSharedState

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-09-13 12:10:03 -05:00
Leonard
ae5dca8f43
Routable improvements (#1461)
* Fix `SegmentType::CatchAll` `Display`

* Rename `display_route_segements` to `display_route_segments` and add dots to docs

* Fix `Routeable::static_routes` and add more route retrieval methods

* Fix Clippy and extract duplication to function

* Return route strings instead of instances

* Remove some methods

* Clippy
2023-09-13 11:55:26 -05:00
Evan Almloff
c8fca7b321 fix clippy 2023-09-12 09:28:08 -05:00
Evan Almloff
bdaa284c14 fix formatting 2023-09-12 09:12:32 -05:00
Evan Almloff
cb8027cf43 fix native core fuzzing test 2023-09-12 09:11:57 -05:00
Evan Almloff
de0c34ec60 fix hydrate example 2023-09-12 09:07:57 -05:00
ealmloff
9ff5d24d42
Merge branch 'master' into tracing 2023-09-11 19:43:57 -05:00
Evan Almloff
6e74d08bf5 remove log from a few examples 2023-09-11 19:42:08 -05:00
Evan Almloff
3eee13c7eb Merge branch 'master' into fix-event-bubbling 2023-09-11 16:40:23 -05:00
Evan Almloff
9d044ee589 make clippy happy 2023-09-11 16:30:16 -05:00
Evan Almloff
73e0be9e65 recycle vnode ids 2023-09-11 16:25:32 -05:00
Evan Almloff
589483d892 remove logs 2023-09-11 16:18:55 -05:00
Evan Almloff
d81d3ebaef assign parents through fragments 2023-09-11 16:16:16 -05:00
Evan Almloff
35b643e23f switch to bubble ids on vnodes to fix nodes under fragments pointing to an invalid parent 2023-09-11 15:55:58 -05:00
Evan Almloff
ed9573094c fix ComponentProps partialeq 2023-09-11 15:13:29 -05:00
Gijs de Jong
300cbf4fc6
Remove stray log (#1453) 2023-09-11 08:36:04 -05:00
Evan Almloff
bc3b781136 fix runtime import 2023-09-10 13:25:19 -05:00
Evan Almloff
083ccd765c fix formatting 2023-09-10 13:23:29 -05:00
ealmloff
d16a706a86
Merge branch 'DioxusLabs:master' into fix-text-node-target-events 2023-09-10 08:13:38 -05:00
Evan Almloff
49a127b31e deduplicate serve code with hot reloading in the CLI crate 2023-09-09 16:18:52 -05:00
ealmloff
28d71624ef
Restore context changes 2023-09-09 16:00:29 -05:00
Evan Almloff
9496853fbc expose public methods for manipulating the global runtime 2023-09-08 10:05:58 -05:00
Evan Almloff
66333e9767 improve context tracing 2023-09-08 10:00:05 -05:00
Evan Almloff
da627cdf3a fix use_future docs 2023-09-08 09:44:09 -05:00
Evan Almloff
c55c17cb81 switch to tracing for logging 2023-09-06 17:47:33 -05:00
Evan Almloff
992ac4a3fb clear borrowed props after ensure_drop_safety 2023-09-06 16:12:01 -05:00
ealmloff
c8127e164b
Url decode routes (#1407)
* fix a few new clippy lints

* url decode routes

* fix catch all segments

* fix clippy
2023-09-06 12:56:43 -05:00
Valentin Golev
e8ea228759
add initial_value to textarea (#1434) 2023-09-06 12:49:29 -05:00
Evan Almloff
02456c1068 fix double drop of bubble id 2023-09-05 21:21:54 -05:00
ealmloff
6662892c10
find attributes and components to drop in lazy nodes (#1376) 2023-09-05 13:43:42 -05:00
Evan Almloff
9552ab6c1c pass event propagation test 2023-09-04 19:10:11 -05:00
ealmloff
d5d974d5a3
Bump the dioxus-cli to 0.4.1 (#1424)
* bump the dioxus-cli version

* bump DIOXUS_CLI_VERSION constant

* Merge branch 'master' into bump-cli
2023-09-04 15:10:27 -05:00
Jonathan Kelley
e799c2efa2
Merge pull request #1420 from ealmloff/only-collect-rsx-macro
Only collect the rsx and render macros in autofmt
2023-09-04 12:11:02 -07:00
Jonathan Kelley
65828d0c2a
Merge pull request #1412 from ealmloff/forward-devtools-feature
Forward Wry's devtools, dox and linux-body flags
2023-09-04 12:01:22 -07:00
Jonathan Kelley
4009064767
Merge pull request #1415 from ealmloff/pin-tauri-deps
Pin Tauri dependencies to a minor version
2023-09-04 11:30:25 -07:00
Evan Almloff
d26aa95bcd update vnode ptr when parent of component reruns 2023-09-04 09:57:26 -05:00
Evan Almloff
cfc6887e34 use raw pointers instead of transmute to make miri happy 2023-09-04 09:28:16 -05:00
Evan Almloff
e86c1647d8 fix clippy 2023-09-04 08:33:56 -05:00
Evan Almloff
d1575b40d1 fix mobile build 2023-09-04 08:24:38 -05:00
Marc Espín
95887e836c
fix: Add the --locked param to every cli installation command (#1427) 2023-09-04 07:28:38 -05:00
Evan Almloff
bc94f36934 restrict tauri bundler version to 1.3.0 only 2023-09-03 13:36:56 -05:00
YuKun Liu
2cfa0e4ea9
fix: prettier_build unavailabe (#1410)
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-09-02 18:31:34 -05:00
Evan Almloff
71264b1ee3 bump bundler to "=1.3.*" 2023-09-02 18:28:44 -05:00
Evan Almloff
885580f3af update to wry 0.31.0 2023-09-02 18:24:42 -05:00
Evan Almloff
ef59696aef Merge branch 'master' into forward-devtools-feature 2023-09-02 18:15:43 -05:00
Evan Almloff
24f22b1b87 Merge branch 'master' into pin-tauri-deps 2023-09-02 18:15:29 -05:00
Evan Almloff
4e1bc13933 Merge branch 'master' into only-collect-rsx-macro 2023-09-02 18:14:04 -05:00
Leonard
94f76946fc
Improve CLI docs (#1404)
* Improve CLI docs

* Fixed all the typos (hopefully).
* Improved the bad English. This encompasses grammar, vocabulary, generally awkward phrases, etc. The result is easier to read and understand, and in some cases shorter.
* Made some formatting improvements. This includes making formatting more consistent, but I changed some of it to be better, at least in my opinion.
* Removed certain unnecessities, the biggest one being the commands documentation. I think this is unnecessary because of the `dx --help` command. It also needs to be updated every time a command gets added/updated/removed. It doesn't really provide much extra insight than `dx --help`.
* Improved plugin documentation. I added a warning to ignore all of it, which is ironic, but the fact is that plugins are probably going to change. But by the time I learned that, I already made some changes to the plugin docs. This includes a better guide on how to get started (although still bad since the plugin system is too messy), and some general changes like the aforementioned English or formatting.
* And more. I can't list it all, but I didn't use any destructive changes. The content might be reformatted (to be shorter or easier to understand), but the meaning isn't lost.

* Fix grammar in packages/cli/docs/src/creating.md

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>

* Update README.md

* Change config example

---------

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2023-09-02 17:59:20 -05:00
Marc Espín
a0d1e5de3a
fix: Typo on use_on_unmount (#1421) 2023-09-02 17:51:34 -05:00
Stygmates
1b977fdce9
Add query segment example and documentation (#1417)
* fix a few new clippy lints

* Add query segment example

* Add trait documentation

* Change core package to root package

The core package contains the virtual dom implementation ([here](https://github.com/DioxusLabs/dioxus/tree/master/packages/core)). Root package might be a more clear way to refer to the main directory

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-09-02 10:24:30 -05:00
Evan Almloff
f818d27fa6 only collect the rsx and render macros when formatting 2023-09-02 07:09:02 -05:00
fanyang
4511b37da8
Fix cli compile error due to tauri bundler adding fields (#1416)
New fields for debian settings:

- desktop_template

For NSIS settings:

- custom_language_files
- template
2023-09-02 06:44:31 -05:00
Evan Almloff
d94e2c104c pin Tauri dependencies to a minor version 2023-09-01 10:27:28 -05:00
Jay Graves
392c744ad1
Make incremental a cfg feature. (#1409)
* Make incremental a cfg feature.

* Make the incremental feature default.
2023-09-01 09:55:44 -05:00
Evan Almloff
cf04256395 try to keep template indexes valid 2023-08-31 16:14:14 -05:00
Evan Almloff
9ae6b46e20 Forward Wry's devtools, and dox flags 2023-08-31 15:43:26 -05:00
Evan Almloff
036e1ff0f5 remove node refs before dropping nodes 2023-08-31 15:38:31 -05:00
Evan Almloff
c5ebdc9635 fix parents in placeholder diffing 2023-08-31 14:17:26 -05:00
Jonathan Kelley
1ba6ca39e3
Merge pull request #1384 from ealmloff/new-in-scope-signals
Expose new_in_scope for signals
2023-08-30 23:14:58 -07:00
Evan Almloff
0554a5db5d Merge branch 'fix-new-clippy-lints' into fix-router-query 2023-08-30 09:03:41 -05:00
Evan Almloff
2d916ef628 fix web query segments 2023-08-30 08:21:24 -05:00
Evan Almloff
b0733958f2 Merge branch 'master' into fix-event-bubbling 2023-08-29 13:00:01 -05:00
Evan Almloff
c32875337c Merge branch 'fix-new-clippy-lints' into fix-new-signals-in-effects 2023-08-28 15:47:45 -05:00
Evan Almloff
f3e7f042b4 fix reading signals outside of the vdom 2023-08-26 14:53:39 -05:00
Luca
37eb929d69
Explain features necessary for the pre_cache_static_routes function. (#1401) 2023-08-25 14:00:38 -05:00
Jani Mustonen
31f8bab20d
Add ScopeId::ROOT (#1398)
* add ScopeId::ROOT

* replace ScopeId(0) with ScopeId::ROOT

---------

Co-authored-by: Jani Mustonen <jani.mustonen@taitounited.fi>
2023-08-25 08:31:23 -05:00
Evan Almloff
3ac2346e46 fix a few new clippy lints 2023-08-25 07:54:04 -05:00
Evan Almloff
dc4707ee2a WIP fix event bubbling 2023-08-23 13:01:37 -05:00
Evan Almloff
e337aff0a4 WIP split element from element ref 2023-08-23 10:48:10 -05:00
Evan Simkowitz
de87ba6548
Update all uncommented commands to remove actions-rs (#1366)
* Update all uncommented commands to remove actions-rs (#1)

* install target in toolchain action

* add linux target explicitly

* try latest

* fix install
2023-08-22 19:48:03 -05:00
Jonathan Kelley
a38860e4f2
Merge pull request #1345 from Demonthos/fix-borrowed-props
Constrain Props lifetime to parent, not child scope lifetime
2023-08-22 11:50:06 -07:00
Evan Almloff
18f8daf0bd fix generational box tests 2023-08-21 15:00:31 -05:00
Evan Almloff
38274da3ee Fix creating signals in effects 2023-08-21 14:42:56 -05:00
Evan Almloff
9c03d68d88 expose new_in_scope for signals 2023-08-21 14:33:52 -05:00
Evan Almloff
f09a2e2280 fix release builds 2023-08-21 14:28:45 -05:00
Evan Almloff
df85b25548 Add debug information to borrows and ownership in signals 2023-08-21 14:23:02 -05:00
Evan Almloff
7fb6dccc0c fix docs.rs build for desktop 2023-08-21 10:22:13 -05:00
Bruce Mitchener
d8704a0447
deps: Update keyboard-types to 0.7. (#1378) 2023-08-21 09:28:32 -05:00
ealmloff
b2f9430689
Merge branch 'DioxusLabs:master' into fix-borrowed-props 2023-08-19 13:35:24 -05:00
wooden-worm
f652474a6e
FileEngine: expose native file types on different platforms (#1258)
* Get native file

* Correct visibility
2023-08-17 08:03:56 -05:00
Vinicius Gobbo Antunes de Oliveira
fa39408d58
If mkcert not enabled, require cert_path and key_path to be specified or error. (#1342) 2023-08-17 07:58:56 -05:00
Jonathan Kelley
a2df9c2e89
Merge pull request #1364 from Demonthos/fix-core-leak
Fix leak in core because of bump allocated Vec
2023-08-15 13:54:00 -07:00
Jonathan Kelley
fee206ab3f
Merge pull request #1351 from Demonthos/fix-context-in-lists
Fix the context API in lists
2023-08-15 13:39:49 -07:00
Evan Simkowitz
3e24b3d34a
Publish CLI binaries for cargo-binstall (#1358)
* add test release pipeline

* fix

* debug

* oops forgot checkout

* debug

* fix if

* blah

* fix working dir

* fix cargo build path

* add publish step

* add cache

* fix path

* use package instead of working dir

* fix cache path

* fix typo in checksum

* fix upload artifact loop

* add more comments

* add binstall metadata

* test simplified action

* fix target

* remove dispatch

* fix permissions

* remove mac arm config

* update comments

* update comment

* replace unmaintained actions-rs
2023-08-15 13:41:32 -05:00
Daniel Albl
555f4d5834
Add 'with' and 'with_mut' to 'use_shared_state' (#1353) 2023-08-15 13:27:19 -05:00
Evan Almloff
6876d2da1c fix clippy 2023-08-15 13:22:06 -05:00
Evan Almloff
b8600d5144 fix tests 2023-08-15 13:11:03 -05:00
Evan Almloff
943c76b1da Fix memory leak in core 2023-08-15 12:19:05 -05:00
Evan Almloff
0d773eac63 fix clippy 2023-08-15 10:37:27 -05:00
Evan Almloff
9c2e713dae fix recycling nodes in native core 2023-08-15 09:30:43 -05:00
Evan Almloff
2d5a4f82bf Fix the context API in lists 2023-08-13 08:47:27 -05:00
Steven Pecht
1ab5a03aef
Use to identify cargo build artifact if present (#1344) 2023-08-12 19:25:17 -05:00
Evan Almloff
d559fdaeab fix borrowed props with temp values 2023-08-12 19:19:46 -05:00
Evan Almloff
ee2619abfd Merge remote-tracking branch 'main/signals' into signals 2023-08-10 17:20:27 -07:00
Evan Almloff
18d255decc add serde feature to signals 2023-08-10 17:17:25 -07:00
ealmloff
39ab39ac56
Merge branch 'DioxusLabs:master' into signals 2023-08-10 16:31:00 -05:00
Evan Almloff
80ac1a99af fix miri 2023-08-09 14:20:46 -07:00
Evan Almloff
f91eeccca7 add compile test for unsound case 2023-08-09 10:49:47 -07:00
Evan Almloff
b4983706ac fix variance on components 2023-08-09 10:26:59 -07:00
Dan Lock
92a8669e14
Make launch functions pub (#1288)
* Make launch functions pub

* add docs to web, desktop, and server launch functions

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-08-09 11:26:50 -05:00
gmorenz
2a32271fa0
Set response headers from response, not request, parts (#1328) 2023-08-08 21:04:15 -05:00
Evan Almloff
3f31b9de43 fix tests 2023-08-08 15:13:02 -07:00
Evan Almloff
24c626b306 fix clippy 2023-08-08 13:43:57 -07:00
Evan Almloff
4ee4cf23d3 restore a few unneeded breaking changes 2023-08-08 13:37:29 -07:00
Evan Almloff
69dab86873 add selector example to readme 2023-08-08 13:27:45 -07:00
Evan Almloff
ba7a663eb6 fix some ownership issues 2023-08-08 13:18:15 -07:00
Evan Almloff
d6089bbd35 add optional dependency variants of selectors and effects 2023-08-08 13:06:33 -07:00
Evan Almloff
25f02904e9 make clippy happy 2023-08-08 11:39:36 -07:00
Evan Almloff
e43bdd815f fix test failures 2023-08-08 11:27:29 -07:00
Evan Almloff
e2c08a79ae fix signal readme example 2023-08-08 11:12:08 -07:00
Evan Almloff
aaded7981f fix boolean attribute rendering in SSR 2023-08-08 10:56:41 -07:00
Evan Almloff
d1603238c4 Fix events with a text node target 2023-08-08 09:49:04 -07:00
Evan Almloff
292b3367dd create some more compelling examples 2023-08-07 18:20:03 -07:00
Evan Almloff
0dc602eb32 Merge branch 'master' into signals 2023-08-07 18:02:19 -07:00
Evan Almloff
ed05abc196 document remaining methods in the signal crate 2023-08-07 18:00:17 -07:00
Evan Almloff
0c17bdb737 don't subscribe in tasks or event handlers 2023-08-07 17:55:29 -07:00
Evan Almloff
4447709ac8 add readmes 2023-08-07 17:49:14 -07:00
Evan Almloff
280d094f67 document generational box 2023-08-07 17:32:25 -07:00
Evan Almloff
c32d6dc8cb Handle oninput for select elements 2023-08-07 17:19:16 -07:00
Evan Almloff
cfd68bf7d9 document signals crate 2023-08-07 16:56:49 -07:00
Evan Almloff
2c7d0700d4 rename memo to selector 2023-08-07 16:17:47 -07:00
Evan Almloff
646c161c7d create read only signal 2023-08-07 16:04:49 -07:00
Evan Almloff
6ca170453b handle virtual dom switching 2023-08-07 14:59:58 -07:00
Evan Almloff
ddbe913e79 make signals non-breaking 2023-08-07 14:50:36 -07:00
Evan Almloff
84734c4146 change dioxus signal to generational box 2023-08-07 14:34:16 -07:00
Evan Almloff
190c65b15d fix memo and add tests 2023-08-07 14:31:03 -07:00
Evan Almloff
7f2049b647 add memo 2023-08-07 12:32:46 -07:00
Evan Almloff
717c09c4a3 create tests for signals 2023-08-07 11:52:54 -07:00
Evan Almloff
b0d499036a make future handling functions global 2023-08-07 11:16:22 -07:00
Evan Almloff
65102b70c7 return more useful messages when a server function errors 2023-08-07 11:09:51 -07:00
Brian Donovan
a025617db3
refactor(cli): use more semantic Instant::elapsed (#1307)
Plus, one of these was incorrectly subtracting the end time from the start time.
2023-08-07 11:08:51 -05:00
Jonathan Kelley
56c3dcc437
Merge pull request #1301 from eventualbuddha/chore/cli/remove-unused-fn
chore(cli): remove unused function
2023-08-06 23:09:28 -07:00
Dylan Blokhuis
24df4e15d9
spelling (#1308) 2023-08-06 11:42:36 -05:00
Brian Donovan
03e02591ec
fix(cli): allows extracting files without separate directory entries
Some zip files do not list directories separately from files. For example, a zip might contain `dir/file.txt` without a corresponding entry for just `dir/`. This should be okay, so we just create the leading paths for the files we extract as necessary.

Also adds tests for the expected and dangerous path cases of `extract_zip`.
2023-08-04 21:28:09 -07:00
Brian Donovan
14e7c50478
fix(cli): prevent "zip slip" vulnerability in tool extract
Using the name directly from a zip archive's entry and writing to it is a potential security vulnerability. More information about the vulnerability can be found here: https://security.snyk.io/research/zip-slip-vulnerability and here https://docs.rs/zip/latest/zip/read/struct.ZipFile.html#warnings.

It looks like the previous version maybe tried to remove `\` characters to prevent this, but only in directory paths?
2023-08-04 20:02:07 -07:00
Evan Almloff
dce418140a create a way to hoist ownership to a different scope 2023-08-04 17:50:05 -07:00
Evan Almloff
b3fbbba711 fix signals in futures 2023-08-04 17:25:40 -07:00
Evan Almloff
a6f611eccf fix subscriptions in events 2023-08-04 17:23:57 -07:00
Evan Almloff
07ed3e67dd add check_generation feature flag 2023-08-04 15:46:04 -07:00
Evan Almloff
0032f7e2af fix miri 2023-08-04 15:23:09 -07:00
Brian Donovan
7a7397bbb4
chore(cli): remove unused module (#1302)
It seems this was replaced by the `plugin.rs` module in 6cce4b9f4d.
2023-08-04 17:01:04 -05:00
Brian Donovan
a77ff1c820
docs(cli): update subcommand comments (#1303)
A bunch of these were copy-pasted from `build`. This commit updates them to be the same as what their `dx help` string is.
2023-08-04 17:00:41 -05:00
Brian Donovan
5c62947835
refactor(cli): move check module alongside others (#1304)
There was no reason for `check` to be defined as `check/mod.rs` when all the others were at the top level e.g. `serve.rs`.
2023-08-04 17:00:19 -05:00
Evan Almloff
48b1e9e54c fix copy dependencies 2023-08-04 14:53:34 -07:00
Evan Almloff
3242fc9e88 add debug impl 2023-08-04 14:49:52 -07:00
Evan Almloff
0be5dbe715 fix the context API 2023-08-04 14:42:19 -07:00
Evan Almloff
2b6b3b67b1 move dioxus copy into a separate package 2023-08-04 14:28:55 -07:00
Evan Almloff
998f9e0d00 remove static bound from props 2023-08-04 14:24:49 -07:00
Evan Almloff
a2c7b69a1d set the scope stack correctly 2023-08-04 14:19:59 -07:00
Evan Almloff
b09e528aaa fix recursive runtime drop impl 2023-08-04 14:14:56 -07:00
Evan Almloff
cb4c46154d fix scope context 2023-08-04 14:12:59 -07:00
Evan Almloff
04cdb14e5b improve signal copy runtime 2023-08-04 13:53:05 -07:00
Brian Donovan
63bb5cc758
chore(cli): remove unused function
I believe that technically this function is part of the public API via `dioxus_cli::cli::cfg::parse_public_url`. However, I don't see any evidence that this function is actually used inside or outside this crate. The last use within the crate was removed in January 2022 (9bb10c65a3).
2023-08-04 13:52:49 -07:00
Brian Donovan
8f93ff3747
docs(hooks): fix typos (#1299)
I'm not totally sure how the sentence was supposed to read, but removing "state" from "It state" seemed to work. Also, "it's" is "it is" and not possessive, so I fixed that.
2023-08-04 15:13:02 -05:00
Evan Almloff
61a3b05616 fix parsing spread routes 2023-08-04 12:06:17 -07:00
Brian Donovan
6d154b5072
Minor Proxy Improvements (#1289)
* fix(serve): provide a clear error with pathless proxy URLs

Without this, `dx serve` panics with this message:

```
Paths must start with a `/`. Use "/" for
 root routes
 ```

 That's not very clear. Instead, we can detect this situation and provide a better error message:

```
Error: 🚫 Serving project failed: Failed to establish proxy: Proxy backend URL must have a non-empty path, e.g. http://localhost:8080/api instead of http://localhost:8080
```

* docs(config): correct format for `web.proxy`
2023-08-04 13:44:56 -05:00
Brian Donovan
50230b6f71
build(web): fix default-features warning (#1296)
`cargo build` would print this warning:

```
warning: dioxus/packages/web/Cargo.toml: `default-features` is ignored for dioxus-html, since `default-features` was not specified for `workspace.dependencies.dioxus-html`, this could become a hard error in the future
```

Since it's being ignored anyway and that doesn't seem to be causing problems, I figured I'd remove it and get rid of the warning.
2023-08-04 12:51:17 -05:00
Brian Donovan
ab1d64bc4a
docs(cli): fix typo (#1294)
"tripple" should be "triple".
2023-08-04 12:49:31 -05:00
Brian Donovan
e98e773186
doc: fix typo (#1287) 2023-08-03 16:32:14 -05:00
Jonathan Kelley
88cca9c949
Merge pull request #1285 from Demonthos/flexable-server-function-features
Make server function features flexible
2023-08-03 12:16:32 -07:00
Evan Almloff
d33ea087d0 make server function features flexible 2023-08-03 11:13:43 -07:00
Evan Almloff
97eedd22c5 fix fullstack docs building 2023-08-03 10:45:50 -07:00
Christian Albrecht
c9790860a5
fixed "http_equiv" in meta to generate "http-equiv" instead of "http_equiv" (#1277) 2023-08-02 11:25:41 -05:00
Evan Almloff
f7eba62a5d Merge branch 'master' into update-scroll-history-lazy 2023-08-01 10:47:04 -07:00
Evan Almloff
549db35de3 update scroll history lazily when you leave a page 2023-08-01 10:45:54 -07:00
Jonathan Kelley
fe1ce3bbe7
Merge pull request #1273 from Demonthos/dedup-history
Deduplicate route history
2023-08-01 10:35:20 -07:00
Jonathan Kelley
25a2abfa08
Merge pull request #1274 from Demonthos/fix-navigator
Fix navigator push/replace route
2023-08-01 10:35:01 -07:00
ealmloff
0c093964bc
Merge branch 'DioxusLabs:master' into dedup-history 2023-08-01 12:32:46 -05:00
ealmloff
61ce3dd6b7
Reject all external routes when parsing a route (#1272)
* reject all external routes when parsing a route

* fix children routers
2023-08-01 12:29:35 -05:00
Evan Almloff
4062e232d9 fix navigator 2023-08-01 10:21:16 -07:00
Evan Almloff
98de423d99 deduplicate route history 2023-08-01 10:16:19 -07:00
Jonathan Kelley
39e89c1fac
Bump crate versions, fix any publish errors 2023-07-31 18:49:54 -07:00
Jonathan Kelley
f80c3c9ffb
Bump core and interpreter 2023-07-31 18:02:23 -07:00
Jonathan Kelley
8a875acdd2
Adjust versions, add authors, move server macro to top level 2023-07-31 17:59:36 -07:00
Jonathan Kelley
09cce6bdfb
Merge pull request #1270 from Demonthos/add-authors
Add authors to all crates
2023-07-31 17:38:44 -07:00
Jonathan Kelley
456b553c93
Merge pull request #1230 from Demonthos/add-computed
Add computed hook
2023-07-31 17:37:47 -07:00
Jonathan Kelley
59016007f2
Merge pull request #1251 from DioxusLabs/make-ssr-state-public
Make SsrState public
2023-07-31 17:37:35 -07:00
Evan Almloff
3eab363e51 Add authors to all crates 2023-07-31 17:30:18 -07:00
Jonathan Kelley
f704d81519
Merge pull request #1253 from Demonthos/fix-map-route
Fix finding files with a custom map_path
2023-07-31 17:28:03 -07:00
Jonathan Kelley
8cf59fe52e
Merge pull request #1265 from Demonthos/dioxus-web-features
Create default enabled features for large web events
2023-07-31 17:14:07 -07:00
Jonathan Kelley
e1dcc335c0
Merge pull request #1263 from Demonthos/builder-launch-fullstack
Switch to launch builder instead of macro for fullstack
2023-07-31 11:44:36 -07:00
Evan Almloff
45d386810b create features for large web-sys events/types 2023-07-28 15:38:07 -07:00
Evan Almloff
d7f7116ce3 clean up the API a bit 2023-07-28 14:17:52 -07:00
Evan Almloff
fcb993a2cb don't spawn a new runtime every request 2023-07-28 13:14:26 -07:00
Evan Almloff
cabeacfcee fix formatting 2023-07-28 13:04:56 -07:00
Evan Almloff
9f891f9478 switch to launch builder instead of macro for fullstack 2023-07-28 12:58:34 -07:00
ealmloff
cfd62e274e
Make deprecated use router (#1260)
* make router props expansion better

* fix router data fields

* make a deprecated use_router hook
2023-07-27 10:32:23 -07:00
Jonathan Kelley
5e3451a6f2
Quiet cargo warnings 2023-07-26 21:02:39 -07:00
Jonathan Kelley
694fc22acb
Merge pull request #1255 from Demonthos/core-private
Make more of core private
2023-07-26 18:31:29 -07:00
Jonathan Kelley
418c03e2cd
Merge pull request #1252 from Demonthos/non-generic-link
Remove autogenerated functions/components from the routable macro
2023-07-26 18:11:32 -07:00
Jonathan Kelley
4b96b00591
Merge pull request #1254 from Demonthos/add-bundle-command
Create cli bundle command
2023-07-26 16:54:59 -07:00
Evan Almloff
20296b5038 fix some examples that used the private API 2023-07-26 16:50:04 -07:00
Evan Almloff
2d51a1c4f2 make more of core private 2023-07-26 16:17:48 -07:00
Evan Almloff
7bf0926938 use tauri bundle 1.2 2023-07-26 12:53:00 -07:00
Evan Almloff
489338d642 create cli bundle command 2023-07-26 12:40:50 -07:00
Evan Almloff
d2ec27e761 fix clippy 2023-07-26 11:29:34 -07:00
Evan Almloff
715289c3de fix finding files with a custom map_path 2023-07-26 11:16:31 -07:00
Evan Almloff
cc94711d62 rename generic navigator to navigator 2023-07-26 11:09:40 -07:00
Evan Almloff
947a153347 make navigator non-generic 2023-07-26 11:08:45 -07:00
Evan Almloff
0ebcb5f1be remove some logging 2023-07-26 10:28:49 -07:00
Evan Almloff
e7a9161066 fix link component 2023-07-26 10:18:39 -07:00
Evan Almloff
5f0dd3af3e it almost lives? 2023-07-25 18:14:48 -07:00
Evan Almloff
a4ed9bc0ef make ssrstate public 2023-07-25 15:29:40 -07:00
Evan Almloff
c19420cb29 fix root component suspense 2023-07-25 12:51:12 -07:00
ealmloff
d637ef187c
fix all broken examples (#1248) 2023-07-25 14:30:08 -05:00
Jonathan Kelley
6751d5941b
Merge pull request #1215 from eventualbuddha/feat/check/rules-of-hooks
feat(check): adds `dx check`
2023-07-25 11:57:02 -07:00
Brian Donovan
0e841f8411
fix(check): allow hook calls inside closure hooks 2023-07-24 18:58:19 -07:00
Jonathan Kelley
7d4361a701
Merge pull request #1244 from Demonthos/is-decendant
Add is_child_of function to Routable
2023-07-24 17:36:30 -07:00
Evan Almloff
61dc549ba1 Make new enum router less breaking 2023-07-24 11:57:56 -07:00
Evan Almloff
1ddda0cc17 fix clippy 2023-07-24 11:30:52 -07:00
Evan Almloff
6760c2f961 add doc example 2023-07-24 11:22:59 -07:00
Evan Almloff
440d2922be add is_child_of function to Routable 2023-07-24 10:33:55 -07:00
Marc Espín
fad3272afb
fix: Update use_coroutine example (#1237) 2023-07-24 11:32:32 -05:00
Brian Donovan
dc7e1a5f13
docs(clean): fix copy-paste docs from build (#1240) 2023-07-24 11:32:13 -05:00
Brian Donovan
420bc39ecc
docs(cli): re-sync dx --help output 2023-07-23 18:57:23 -07:00
Brian Donovan
8f8627af18
attempt to hoist prettier-please dependencies 2023-07-23 16:06:55 -07:00
Brian Donovan
1531893a45
improve test coverage and display output 2023-07-23 16:06:55 -07:00
Brian Donovan
899d9562b3
fix(check): colorize line numbers a la rustc 2023-07-23 16:06:55 -07:00
Brian Donovan
eb4438ef74
docs(check): update README
It was just copy-pasted from `dioxus-autofmt`.
2023-07-23 16:06:55 -07:00
Brian Donovan
2c2534d1cc
feat(check): adds dx check
At the moment this only checks the Rules of Hooks, ensuring that hook functions (i.e. `use_*`) are being called as expected.

https://dioxuslabs.com/docs/0.3/guide/en/interactivity/hooks.html

Closes #1202
2023-07-23 16:06:55 -07:00
Marc Espín
915e79e3be
fix: Use correct cfg for file_watcher feature in dioxus-hot-reload (#1238)
* fix: Use correct cfg for file_watcher feature in dioxus-hot-reload

* Update file_watcher.rs

* Update lib.rs

* fmt
2023-07-23 09:29:59 -05:00
Jonathan Kelley
0097b82490
Merge pull request #1234 from Demonthos/fix-static-hydrated
Fix route prerendering
2023-07-21 16:57:28 -07:00
Jonathan Kelley
6d2163bfcb
Merge pull request #1233 from Demonthos/log-rebuild-errors
Log errors when a component fails to render
2023-07-21 15:56:44 -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
ealmloff
a43f334141
use component name instead of props name 2023-07-21 16:30:14 -05:00
Evan Almloff
8af0f0a76a Fix future value never updating 2023-07-21 12:47:51 -07:00
Evan Almloff
bfc8240438 Fix use_future always spawning a new task 2023-07-21 11:52:41 -07:00
Evan Almloff
9e70aae989 fix route prerendering 2023-07-21 11:10:21 -07:00
Evan Almloff
66fc7974b0 Log errors when a component fails to render 2023-07-21 10:43:22 -07:00
Jonathan Kelley
af254102d0
Merge pull request #926 from Demonthos/prevent-default-form-web 2023-07-20 16:07:52 -07:00
Evan Almloff
14867931a4 fix clippy 2023-07-20 13:51:26 -07:00
Evan Almloff
67a2d31f9c Merge branch 'master' into prevent-default-form-web 2023-07-20 13:42:14 -07:00
Jonathan Kelley
3af0355196
Merge pull request #1199 from Demonthos/use-server-function
Use server function hook
2023-07-20 12:49:47 -07:00
Evan Almloff
33ee0636d6 add computed hook 2023-07-20 11:07:55 -07:00
Evan Almloff
09f1899539 Merge branch 'master' into optimize-remove_attribute 2023-07-20 10:56:38 -07:00
Jonathan Kelley
a49fd81523
fix merge conflict 2023-07-20 10:55:52 -07:00
Evan Almloff
28ae065218 optimize the remove_attribute function 2023-07-20 10:53:24 -07:00
Jonathan Kelley
91d4207fa7
Merge branch 'master' into feature/use-shared-state-better-diagnostics 2023-07-20 10:51:10 -07:00
Jonathan Kelley
f0289068a2
Merge pull request #1219 from Demonthos/improve-build-times
Halve Build Times
2023-07-20 10:50:15 -07:00
Andrea Frigido
dccad58f1d Update license field following SPDX 2.1 license expression standard 2023-07-20 18:00:07 +01:00
Evan Almloff
beb56b93a0 more clippy fixes 2023-07-20 09:06:12 -07:00
Jonathan Kelley
79909060cd
Merge pull request #1223 from DioxusLabs/jk/fix-use-future
Fix race condition in use_future by using use_state directly.
2023-07-19 20:01:15 -07:00
Jonathan Kelley
b028ca87ec
Merge pull request #1222 from DioxusLabs/jk/add-caching-to-ios
Add caching to windows CI, and build for Android + iOS
2023-07-19 20:00:48 -07:00
Jonathan Kelley
1ed277154a
Merge pull request #1210 from Demonthos/desktop-serve-cli
Move desktop hot reload into the CLI
2023-07-19 19:48:09 -07:00
Jonathan Kelley
eaaee45fda
Merge pull request #1216 from DioxusLabs/dependabot/npm_and_yarn/packages/extension/word-wrap-1.2.4
Bump word-wrap from 1.2.3 to 1.2.4 in /packages/extension
2023-07-19 19:47:35 -07:00
Jonathan Kelley
941641825e
Merge pull request #1226 from DioxusLabs/jk/make-miri-happier
Fix: dont use bumpslab anymore, just box scopestates
2023-07-19 19:47:13 -07:00
Jonathan Kelley
af7a7df3a6
Merge pull request #1224 from Demonthos/auto-fmt-docsite
Improve auto formatting multiline raw attributes/event handlers
2023-07-19 19:04:23 -07:00
Jonathan Kelley
4240f8428c
Fix: dont use bumpslab anymore, just box scopestates 2023-07-19 18:40:43 -07:00
Evan Almloff
330950140c fix clippy 2023-07-19 18:16:32 -07:00
Jonathan Kelley
9d942f1162
make msrv 1.66 2023-07-19 17:20:48 -07:00
Evan Almloff
b6ea722d94 fix some edge cases around multiline attributes 2023-07-19 16:59:20 -07:00
Evan Almloff
f55375b8ce simplify fullstack hello world examples 2023-07-19 16:57:43 -07:00
Jonathan Kelley
c954a116eb
Fix race condition in use_future 2023-07-19 14:23:34 -07:00
Evan Almloff
7e2ef1260f Merge branch 'master' into use-server-function 2023-07-19 14:19:03 -07:00
Evan Almloff
212022d0c2 more clippy fixes 2023-07-19 13:54:10 -07:00
Jonathan Kelley
b1a4ac48d4
Move filedialog code into cfg-ed out folder 2023-07-19 13:52:27 -07:00
Evan Almloff
1f19ac9334 bump sledgehammer bindgen 2023-07-19 13:45:47 -07:00
Jonathan Kelley
90d23714da
Fix clippy around pathbuf 2023-07-19 13:44:38 -07:00
Evan Almloff
6639011a3e fix autofmt 2023-07-19 13:43:04 -07:00
Jonathan Kelley
9185afdba8
Merge branch 'master' into desktop-serve-cli 2023-07-19 13:33:02 -07:00
ealmloff
c9d00908ec
Update component.rs 2023-07-19 15:00:10 -05:00
Jonathan Kelley
163fe68f45
Remove a bit more unsafe 2023-07-19 12:26:32 -07:00
Jonathan Kelley
2871c8bb4d
Don't use boxed cell slice, use a refcell instead 2023-07-19 12:08:13 -07:00
Evan Almloff
05a1ea403f use published prettier-please 2023-07-19 10:33:23 -07:00
Evan Almloff
0f3606ea53 use git prettyplease temporarily 2023-07-19 10:21:37 -07:00
Evan Almloff
3d8d8a1b6f half-build-times 2023-07-19 10:19:23 -07:00
Jonathan Kelley
31a68a9743
Rename dioxus to dx 2023-07-18 18:33:14 -07:00
Jonathan Kelley
cd30b42e2d
Merge branch 'master' into jk/remove-dioxus-bin 2023-07-18 18:31:48 -07:00
Jonathan Kelley
4e278fead5
rustfmt 2023-07-18 18:23:55 -07:00
Jonathan Kelley
41c4b57984
Merge pull request #1074 from kaid/directory-selection-dialog
Add directory support for file input.
2023-07-18 18:23:23 -07:00
Jonathan Kelley
1d371bf971
Merge pull request #1213 from Demonthos/prep-sledgehammer-liveview
Prepare for Sledgehammer Bindgen in Liveview
2023-07-18 18:10:48 -07:00
Jonathan Kelley
a6002a6c42
Merge pull request #1197 from DioxusLabs/jk/simple-suspense
Rip out async components in favor of a simpler suspense
2023-07-18 18:10:11 -07:00
dependabot[bot]
7a518f540f
Bump word-wrap from 1.2.3 to 1.2.4 in /packages/extension
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 01:07:27 +00:00
Evan Almloff
61e9fd9973 use :.. instead of :... 2023-07-18 16:34:27 -07:00
Evan Almloff
a96ccdc6f3 fix clippy 2023-07-18 13:16:17 -07:00
Evan Almloff
8188011fe3 fix adapters 2023-07-18 13:03:34 -07:00
Evan Almloff
ee28c89f5e Change to a stream of bytes for liveview to make using sledgehammer later non-breaking 2023-07-18 12:53:38 -07:00