Commit graph

3768 commits

Author SHA1 Message Date
Pascal
29f9d002e2 expose dioxus_desktop::build_default_menu_bar() 2023-12-07 19:03:37 +01:00
Evan Almloff
a1550460ce Fix peek spelling 2023-12-07 11:37:59 -06:00
Jonathan Kelley
424926a8db
Merge pull request #1698 from ealmloff/fix-server-function-early-disconnect 2023-12-07 09:28:54 -08:00
Jonathan Kelley
9a3287e05f
Merge pull request #1681 from ealmloff/warn-windows-gnu 2023-12-07 09:28:38 -08:00
Jonathan Kelley
fe7df0c6a5
Merge pull request #1697 from ealmloff/hot-reload-temp-dir 2023-12-07 09:18:10 -08:00
Pascal
cbfb80d5c6 fixup: improved documentation and refactored naming to be more self-explanatory
Note:
This is the actual correct commit. The previous one contained files touched by cargo fmt which are unrelated. Sorry for that.
2023-12-07 17:23:14 +01:00
Pascal
906c466e78 Revert "improved documentation and refactored naming to be more self-explanatory"
This reverts commit adfbb6c380.
2023-12-07 17:11:56 +01:00
Pascal
adfbb6c380 improved documentation and refactored naming to be more self-explanatory 2023-12-07 16:36:20 +01:00
Evan Almloff
df57cc7d9c fix disconnects that happen while a server function is being resolved 2023-12-07 08:29:14 -06:00
Evan Almloff
1c2a6fa010 fix signals with debug information 2023-12-07 07:19:41 -06:00
ealmloff
c67e0705ea
Merge branch 'master' into signal-read-untracked 2023-12-07 07:12:30 -06:00
Evan Almloff
7d2bbda53d move gnu warning to build script 2023-12-07 07:10:53 -06:00
Evan Almloff
2bab4eb6c3 rename read_untracked to peak 2023-12-07 07:06:43 -06:00
Evan Almloff
9a13df2c73 move hot reload socket into the target directory 2023-12-07 07:00:59 -06:00
ealmloff
6c9c081f5c
Merge branch 'DioxusLabs:master' into fix-native-core-leak 2023-12-07 06:27:00 -06:00
Jonathan Kelley
ad885ec47a
Merge pull request #1650 from ealmloff/effect-cleanup
Add an optional cleanup closure to the use effect hook
2023-12-06 22:13:08 -08:00
Jonathan Kelley
8f1791c039
Merge pull request #1597 from ColonelThirtyTwo/fmt-indent
Use indentation settings in dx fmt and vscode extension
2023-12-06 22:06:16 -08:00
Jonathan Kelley
4444ba0b97
Merge pull request #1576 from ealmloff/fix-lints-release-web
Fix use shared state lint in release mode
2023-12-06 21:39:36 -08:00
Jonathan Kelley
edebe5be4a
Merge pull request #1653 from ealmloff/fix-hot-reload-missing-items
Fix missing items in hot reloading diffing
2023-12-06 21:38:36 -08:00
Jonathan Kelley
f2504cec84
Merge pull request #1674 from ealmloff/better-optional-props
Make optional props accept Nothing, T or Option<T>
2023-12-06 21:37:39 -08:00
Jonathan Kelley
3b63791ec1
Merge pull request #1485 from ealmloff/make-fullstack-layer-public
Make the layer module public in fullstack
2023-12-06 21:34:38 -08:00
Jonathan Kelley
ecb1b61b65
Merge pull request #1664 from ealmloff/fix-svg-hot-reload
Fix hot reloading svg elements
2023-12-06 21:34:05 -08:00
Jonathan Kelley
ea15c6a2eb
Merge branch 'master' into cli-config-library 2023-12-06 21:30:14 -08:00
Jonathan Kelley
07d84fedb7
Merge pull request #1580 from ealmloff/miri-leak
Remove the ignore leaks in flag MIRI
2023-12-06 21:29:32 -08:00
Jonathan Kelley
ccd850edf6
Merge pull request #1383 from ealmloff/debug-signals
Add debug information to borrows and ownership in signals
2023-12-06 21:19:38 -08:00
Jonathan Kelley
ae8eaf80a2
Merge pull request #1612 from ealmloff/ssr-eval
Add a noop evaluator to the ssr renderer
2023-12-06 21:17:36 -08:00
Jonathan Kelley
f52233c095
Merge pull request #1634 from ealmloff/fix-string-memory-leak
Fix string memory leak
2023-12-06 21:16:43 -08:00
Jonathan Kelley
850f2da0c6
Merge pull request #1651 from ealmloff/string-into-attribute
Add into attribute value impl for String
2023-12-06 21:14:31 -08:00
Jonathan Kelley
16982c9f69
Add metadata for signals crate 2023-12-06 20:54:50 -08:00
Jonathan Kelley
d3f6ff703c
Release 0.4.3
dioxus@0.4.3
dioxus-autofmt@0.4.3
dioxus-check@0.4.3
dioxus-cli@0.4.3
dioxus-core@0.4.3
dioxus-core-macro@0.4.3
dioxus-desktop@0.4.3
dioxus-fullstack@0.4.3
dioxus-hooks@0.4.3
dioxus-hot-reload@0.4.3
dioxus-html@0.4.3
dioxus-interpreter-js@0.4.3
dioxus-liveview@0.4.3
dioxus-mobile@0.4.3
dioxus-native-core@0.4.3
dioxus-native-core-macro@0.4.3
dioxus-router@0.4.3
dioxus-router-macro@0.4.3
dioxus-rsx@0.4.3
dioxus-signals@0.4.3
dioxus-ssr@0.4.3
dioxus-tui@0.4.3
dioxus-web@0.4.3
dioxus_server_macro@0.4.3
fermi@0.4.3
generational-box@0.4.3
plasmo@0.4.3
rsx-rosetta@0.4.3

Generated by cargo-workspaces
2023-12-06 16:56:35 -08:00
Evan Almloff
b965fc23e9 use a temp directory for the hot reloading pipe on desktop, fullstack and liveview 2023-12-06 17:01:51 -06:00
Pascal
e4d60c8dfc add default menu bar in dioxus-desktop to resolve #1691
fixup naming and expose disable_default_menu_bar with builder function
2023-12-06 23:00:01 +01:00
JMS55
8530f53692
Fix typo (#1695)
* Fix typo

* Fix typo again
2023-12-06 06:55:07 -06:00
Jonathan Kelley
0c92486883
publish generational box 2023-12-05 22:57:20 -08:00
Ben Sully
04fd2487b3
feat(fullstack): add render_handler_with_state (#1687)
* feat(fullstack): add `render_handler_with_state`

When using server functions, the current pattern to access state such as
database connections is to use `register_server_fns_with_handler` on an
Axum router and 'inject' the state into the context provided to the
server function. However, this only affects function calls which go via
the Axum router; SSR renders bypass this, and therefore don't have
access to any state.

This commit adds an alternative `render_handler` which accepts some
additional state. That state is injected into the context in a
similar manner to `register_server_fns_with_handler`. SSR renders can
then proceed to run in the same way as HTTP calls.

* Change state object to 'inject_state' callback

Also add a compiling doctest example.

* remove the explicit for<'a> lifetime

* remove unused assets_path from render_handler_with_context example

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-12-05 14:10:18 -06:00
Evan Almloff
71f7481ded use requestAnimationFrame on desktop 2023-12-04 20:45:26 -06:00
Raul Cesar Teixeira
8149868ebc
Fixed conflict of "--verbose" and "--quiet" flags (#1686)
Co-authored-by: Raul Cesar <raul@zideco.dev>
2023-12-04 18:11:02 -06:00
Felix F Xu
d404ddfccf
fix false notification/rebuild for dx hot-reload (#1684)
* fix false notification/rebuild for dx hot-reload

* Make sure we have permissions and the changed file exists before reading the metadata

---------

Co-authored-by: ealmloff <evanalmloff@gmail.com>
2023-12-03 20:02:30 -06:00
Felix F Xu
a2ca1760c9
Set local_socket_stream to blocking (default) (#1682) 2023-12-02 19:25:27 -06:00
Evan Almloff
a4600294c5 allow users to disable the warning in a feature 2023-12-01 22:17:51 -06:00
Evan Almloff
0a3b794a1c add a warning about wry gnu support to dioxus desktop 2023-12-01 15:56:14 -06:00
Evan Almloff
8a44fe8d03 derive query parsing in the router macro 2023-12-01 15:31:45 -06:00
zhangzhonglai
c8a9a7b1d5
docs(desktop): fix wrong example code (#1678)
* docs(desktop): fix wrong example code

* stop ignoring doctests in dioxus desktop

---------

Co-authored-by: ealmloff <evanalmloff@gmail.com>
2023-12-01 07:52:20 -06:00
Evan Almloff
a840e012d8 fix clippy 2023-11-29 11:46:18 -06:00
Evan Almloff
be94c69f11 make optional props accept T or Option<T> 2023-11-29 11:38:28 -06:00
Exotik850
e0fbed7eea
Switch outdated tui crate for ratatui (#1671)
* Switch outdated tui crate for ratatui

* fix query docs whoops
2023-11-28 16:54:17 -06:00
Exotik850
694989e826
Add use_const hook (#1667)
* Add use_const hook

* cargo fmt

* clippy allow

* pub fn on get_rc
2023-11-28 09:51:09 -06:00
Evan Almloff
b3c7ebfdba fix merged changes 2023-11-27 16:12:48 -06:00
Exotik850
8e4debb226
remove #[doc(hidden)] from EventHandler (#1665)
* remove #[doc(hidden)] from EventHandler

* Make UseFuture Clone, factor out dependencies field

* Revert "Make UseFuture Clone, factor out dependencies field"

This reverts commit 9ca09e595d.

* fix formatting

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-11-27 15:45:29 -06:00
Exotik850
18fa1e4831
Make UseFuture Clone, factor out dependencies field (#1666) 2023-11-27 15:42:48 -06:00
Evan Almloff
141554a786 remove logging 2023-11-26 09:23:27 -06:00
Evan Almloff
1c0b33cef4 fix hot reloading svg elements 2023-11-26 09:21:27 -06:00
tigerros
d9220d4e42
Add it (#1660) 2023-11-23 16:44:39 -06:00
ealmloff
7a459e15d8
Update packages/hooks/src/use_effect.rs
Co-authored-by: Marc Espín <mespinsanz@gmail.com>
2023-11-21 16:28:06 -06:00
Evan Almloff
23090cb56b optimize fullstack compile times 2023-11-21 14:46:47 -06:00
Evan Almloff
4ff86d9763 make some extra dependencies only enabled for the CLI 2023-11-21 13:11:49 -06:00
Evan Almloff
355cd9b19e Merge branch 'master' into pr/atty303/1349 2023-11-20 18:37:33 -06:00
Evan Almloff
532ffaa614 fix merge 2023-11-20 18:36:18 -06:00
Evan Almloff
557630c419 Merge branch 'master' into cli-config-library 2023-11-20 18:35:24 -06:00
Exotik850
f8ce72c605
Fix outdated lazynode documentation (#1648)
* Fix outdated lazynode documentation

* Use expanded rsx! instead of just rsx macro
2023-11-20 09:49:18 -06:00
Evan Almloff
8cf8f66c27 add more logging to desktop hot reloading 2023-11-20 09:47:03 -06:00
Evan Almloff
0ee21dff1e fix missing item in hot reloading diffing 2023-11-20 09:33:39 -06:00
XiaoZhang
aa284d7e93
Fix grammar typo in comment (#1652) 2023-11-20 08:24:16 -06:00
HJin.me
ff6c7efb41
fix: tailwind.css use absolute path (#1649) 2023-11-19 11:22:54 -06:00
Evan Almloff
d51e9b60df make WebDevResourceConfig optional 2023-11-19 11:16:15 -06:00
Evan Almloff
3c115bbef7 add into attribute value impl for String 2023-11-19 10:03:18 -06:00
Evan Almloff
83f7ef9a44 add an optional cleanup closure to the use effect hook 2023-11-19 09:58:00 -06:00
Raman Hafiyatulin
098689083d
Related to #1547: use dioxus-cli within a workspace (wildcard-members, real package names) (#1642)
* Related to #1547: use `dioxus-cli` within a workspace

Although the `dx` CLI allows to specify a package name to chose from workspace members,
it does not support workspace members specified as glob-wildcards.
Neither it respects the effective package name, specified in the crate's `Cargo.toml`.

This PR addresses that issue:
- upon `dx build ...`, if the `--bin` CLI-argument is provided, treat the current dir as a workspace;
- search through the workspace's `members`: resolve each of them with `glob`;
- assume that any workspace member has a `Cargo.toml` in it (cargo does it, so it's okay);
- read said manifest, and check the package name in it;
- if found — there we have our sought package.

* Use cargo-metadata to find out the workspace structure

* glob is unused
2023-11-15 15:14:16 -06:00
Evan Almloff
e11f3fdc48 fix clippy 2023-11-15 09:30:15 -06:00
Evan Almloff
9bb464dd7d fix cli tests 2023-11-15 09:29:15 -06:00
Evan Almloff
cd48b3b7f9 allow base_path in the CLI 2023-11-15 08:23:12 -06:00
Evan Almloff
109e10e406 use a default base path for the web router from the config 2023-11-14 16:49:06 -06:00
Evan Almloff
15984b78db use the name in the dioxus.toml in desktop if no name was set in the desktop config 2023-11-14 15:53:11 -06:00
Evan Almloff
1ed66a54cc fix cli configuration environment variable 2023-11-14 15:50:04 -06:00
Evan Almloff
06be18a591 export lazy current config 2023-11-14 15:34:06 -06:00
Bunny Bites
cf77325f67 fix code format issues (pipeline) 2023-11-14 23:27:50 +05:30
ealmloff
4631050a04
fix FormValue 2023-11-14 10:52:39 -06:00
ealmloff
20bbf95979
document parsed_values and FormValue 2023-11-14 10:45:53 -06:00
Bunny Bites
67670875bb fix parsing issue for desktop platform 2023-11-14 01:13:47 +05:30
Evan Almloff
7f4e2af0c4 fix string memory leak 2023-11-13 08:17:08 -06:00
Bunny Bites
a74e6d82c7 rename parse_json to parsed_values 2023-11-12 13:09:51 +05:30
Evan Almloff
a120af33ad Merge branch 'master' into fix-event-bubbling 2023-11-11 17:53:47 -06:00
Bunny Bites
13a82a3705 remove serde and serde_json from serialize dependency. 2023-11-11 21:55:08 +05:30
Bunny Bites
48295b021c remove optional config of serde_json 2023-11-11 21:27:44 +05:30
Bunny Bites
8183935f66 remove unwanted cloning while passing reference. 2023-11-11 09:36:26 +05:30
Evan Almloff
5dc3486c53 Merge branch 'cli-serde-default' into cli-config-library 2023-11-10 16:26:58 -06:00
ealmloff
79e3fe677f
Merge branch 'master' into cli-serde-default 2023-11-10 16:22:53 -06:00
Bunny Bites
2b459e6fc1 1. optimize import.
2. modify post event serialization.
2023-11-10 23:32:41 +05:30
Bunny Bites
6398af1d65 code cleanup 2023-11-10 23:23:26 +05:30
Bunny Bites
c6b39c05b7 1. remove value_types from FormData.
2. modify type of values to accept dynamic type.
2023-11-10 11:44:19 +05:30
tigerros
d4b0451d09
Allow warning in necessary functions (#1626) 2023-11-09 12:31:59 -06:00
Evan Almloff
4b4dcbed6a fix error boundary test 2023-11-09 08:43:38 -06:00
Evan Almloff
1b7017f67b fix formatting 2023-11-09 08:36:14 -06:00
Bunny Bites
9f0e000295 provide proper error message 2023-11-09 11:09:07 +05:30
Bunny Bites
2cbbdc23c6 add impl fn for FormData to get input types 2023-11-09 11:04:47 +05:30
Erithax
c2749b3371 rename IntoDynNode and IntoTemplate traits 2023-11-09 02:00:36 +01:00
Bunny Bites
1a9d1eda19 optimize hashmap insertion 2023-11-09 00:41:50 +05:30
Bunny Bites
f1533781a4 add fn to convert hashmap to json 2023-11-09 00:38:22 +05:30
Evan Almloff
8a2d170d96 pull out the CLI config data into a separate library 2023-11-08 12:48:25 -06:00
Joshua Wolfe
8ea7f076e5
Updated server_fn to 0.5.2 (#1620) 2023-11-08 08:33:41 -06:00
Evan Almloff
6141aeb037 polish the throw trait 2023-11-07 18:24:07 -06:00
Evan Almloff
c1bfe9514f document remaining items in generational box 2023-11-07 13:19:26 -06:00
Evan Almloff
b3c5158524 fix tests 2023-11-07 13:15:19 -06:00
Evan Almloff
2731ca0b30 fix ref try map 2023-11-07 09:26:12 -06:00
Evan Almloff
e77c158636 fix selector effect id 2023-11-07 09:19:33 -06:00
Evan Almloff
4e19f8f2be make GenerationalBoxId send and sync 2023-11-06 18:57:55 -06:00
Evan Almloff
7daa945ae3 fix effects 2023-11-06 18:54:35 -06:00
Evan Almloff
466005890d make effect system async to make signals send + sync 2023-11-06 18:47:51 -06:00
Jonathan Kelley
42faecf942
Merge pull request #1581 from ealmloff/drop-any-attribute-later
Drop any attribute after rendering
2023-11-06 16:52:30 -05:00
Evan Almloff
c33276e0a0 remove ghost 2023-11-06 14:46:38 -06:00
Evan Almloff
6eb4e7358b fix selector and signal unsync default 2023-11-06 14:46:26 -06:00
xTeKc
ca556ea9cb
update readme (#1615)
* Fix wasm-bindgen version mismatch

* fixes #1613
2023-11-06 13:32:42 -06:00
Evan Almloff
b9554fd744 add a noop evaluator to the ssr renderer 2023-11-05 08:32:39 -06:00
Bunny Bites
d54ec57192 1. migrated code to form.rs
2. made get_parsed_values as private fn.
3. handled multi-valued data while parsing
2023-11-05 08:16:09 +05:30
Marc Espín
c18f911429
Update atom_root.rs (#1611) 2023-11-04 14:04:14 -05:00
Lee TaeWoo
be1decf9f2
fix syntax error at derive Props using const generics (#1607) 2023-11-04 13:53:50 -05:00
Marc Espín
bb5738a0ba
fix: Read value from root when calling AtomState::current() (#1609) 2023-11-04 13:22:47 -05:00
Bunny Bites
02e91d8b9a add get_parsed_values function 2023-11-04 21:50:11 +05:30
Evan Almloff
4215e2b247 fix cargo.toml/lock path capitalization for linux 2023-11-03 13:09:33 -05:00
Evan Almloff
ebbaacf073 fix read and write impls 2023-11-03 10:27:21 -05:00
divinerapier
f372144fd7
Bump tauri bundler for using proxy to fetch resources
Signed-off-by: divinerapier <sihao.fang@outlook.com>
2023-11-03 11:01:00 +08:00
Jonathan Kelley
a3e6d0adca
Merge pull request #1602 from ealmloff/fix-scroll-web 2023-11-02 22:35:16 -04:00
Evan Almloff
7590cf822d fix the scroll event on the web renderer 2023-11-02 21:00:43 -05:00
Evan Almloff
0a8de1d40f clean up ref mapping with GATs 2023-11-02 19:35:53 -05:00
Evan Almloff
0aa4875ec0 fix formating 2023-11-02 13:59:46 -05:00
Evan Almloff
46fec1ae48 fix clippy 2023-11-02 13:46:57 -05:00
Evan Almloff
0f2923a385 fix extension types 2023-11-02 13:17:21 -05:00
Alex Parrill
52fb080193 Use indentation settings in dx fmt and vscode extension
Adds the ability to specify an indent string to public autofmt methods - either
a sequence of spaces or a tab character.

Get the indentation style and size from rustfmt for dx fmt, or from the editor
settings for the vscode extension.

Closes #1595
2023-11-01 17:24:18 -04:00
Evan Almloff
ff26380838 fix clippy 2023-11-01 08:21:04 -05:00
Evan Almloff
fdec47b90b fix clippy 2023-11-01 08:19:35 -05:00
tigerros
bf36fc6def
Fix #[component] expansion Clippy warning (#1599)
Adds a `#[allow(clippy::inline_always)]` attribute to the generated `__dx_inner_comp` function.
2023-11-01 08:14:07 -05:00
Evan Almloff
d815c7cc89 create a reactive selector called comparer 2023-10-31 18:30:06 -05:00
Evan Almloff
8a62e4a987 Merge branch 'master' into debug-signals 2023-10-31 13:55:20 -05:00
Evan Almloff
5fdff4b7ed bump wry to 0.34 2023-10-31 13:49:29 -05:00
ealmloff
856fb1874e
Merge branch 'master' into binary-protocal 2023-10-31 13:40:31 -05:00
ealmloff
c84a13f164
Merge branch 'master' into bump-wry 2023-10-31 13:40:03 -05:00
Evan Almloff
77d53df532 Merge branch 'master' into pr/atty303/1349 2023-10-31 13:39:20 -05:00
Evan Almloff
57dd56c8a4 Merge branch 'miri-leak' into events-2 2023-10-30 16:18:12 -05:00
ealmloff
5bb06b9719
Merge branch 'master' into events-2 2023-10-30 15:37:29 -05:00
Evan Almloff
51f342417a add examples to the default watch path 2023-10-30 14:41:41 -05:00
Evan Almloff
90e04edcdf make the signal runtime global 2023-10-30 14:25:31 -05:00
Evan Almloff
c5e647e97d add read untracked to signals 2023-10-30 08:39:37 -05:00
HKalbasi
720bfdf231
Make window invisible until the first render (#1588) 2023-10-29 13:09:07 -05:00
Falco Hirschenberger
d4e6876ff6
Silence desktop build outputs from cargo (#1584)
Silence additional disturbing output from cargo in desktop builds
2023-10-27 08:29:43 -05:00
Evan Almloff
4ac6aed482 try specialization 2023-10-26 16:36:41 -05:00
Emil Boman
f5bc1a9856
Implement LiveView Router Integration (#1505)
* Fix GoForwardButton calling can_go_back instead of can_go_forward

* Add first draft of LiveviewHistory

* Add external URL redirect

* Lock evaluator channel outside loop

* Add liveview to router examples

* fixup! Add liveview to router examples

* Communicate with liveview server on page load

* Add PopState event to Liveview routing

* Call updater callback from liveview history

* Add rudimentary PopState functionality to liveview router.

* Fix linter errors

* Refactor

* Fix navigator external redirection not working.

* Add go back and go forward buttons to router examples

* Finish functionality for timeline stack in liveview router

* Add docs to LiveviewHistory

* Replace Liveview history context attachment with constructor that takes context

* Fix go forward/backward history/future shuffle

* Support history across entire liveview session, if contiguous page jumps.

* Remove unnecessary bounds

* Add query and hash to location string

* Run rustfmt

* fix: Update server function docs link (#1489)

* liveview: Add `interpreter_glue_relative_uri (#1481)

* liveview: Add `interpreter_glue_relative_uri`

By utilizing `window.location.host` in the client-side JavaScript, we can easily derive the WebSocket URI from a relative path URI. This approach obviates the need for host address retrieval on the server side, unlike the method of serving glue code in liveview using `interpreter_glue`.

* liveview: Merge `.._relative_url` functionality

- Merged `.._relative_url` to current API `interpreter_glue`.
- Edit axum example to work with new feature.

* liveview: Fix clippy warning

* Rename modules to use snake_case (#1498)

* Change Scope into &ScopeState

* Move synchronization of state into router and make it opt-in

---------

Co-authored-by: Marc Espín <mespinsanz@gmail.com>
Co-authored-by: Seungwoo Kang <ki6080@gmail.com>
Co-authored-by: Leonard <tigerros.gh@gmail.com>
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-10-26 14:19:51 -05:00
Evan Almloff
eea4a02ef5 add comments about the cause of the leak 2023-10-26 13:23:12 -05:00
Evan Almloff
fca9d95519 fix props memory leak 2023-10-26 13:06:42 -05:00
Evan Almloff
1126c1d329 make signal sync 2023-10-26 12:47:53 -05:00
Evan Almloff
370c6cb9d2 fix clippy 2023-10-25 16:47:04 -05:00
Evan Almloff
b99f081c08 drop any attribute after rendering 2023-10-25 16:37:04 -05:00
Jonathan Kelley
035f26d4bf
Merge pull request #1573 from tigerros/fix-props-docs-line-breaks
Fix prop docs line breaks
2023-10-25 17:03:46 -04:00
Stephen Andary
b25fada776
Add Newtype so that Rust-url can be IntoRoutable (#1579)
* add newtype so that rust-url can IntoRoutable

* add doc line

* implement From<Url> directly

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-10-25 15:36:38 -05:00
Evan Almloff
6e85ecea12 fix use shared state lint in release mode 2023-10-25 10:23:23 -05:00
Evan Almloff
3bb6042e42 fix web renderer imports 2023-10-25 10:22:05 -05:00
Evan Almloff
dc306a51ba fix desktop inner html 2023-10-24 13:17:34 -05:00
Evan Almloff
9de56c00f3 fix multiple types of desktop/liveview listeners in the same app 2023-10-24 13:09:10 -05:00
Leonard
613f2f9aca Revert "Fix random clippy warning"
This reverts commit 85839abe56.
2023-10-24 01:41:46 +02:00
Leonard
85839abe56 Fix random clippy warning 2023-10-24 01:35:59 +02:00
Leonard
33d4721fbe Fix 2023-10-24 00:10:56 +02:00
Jonathan Kelley
647815fa6f
Merge pull request #1558 from ealmloff/link-key-props
Add an readable error when you name a prop key
2023-10-23 16:58:53 -04:00
Jonathan Kelley
716130d025
Merge pull request #1570 from ealmloff/clarify-web-gaurd-fullstack
Add error message when overlapping fullstack features are enabled
2023-10-23 16:32:34 -04:00
Jonathan Kelley
1fe8e94063
Deprecate use_window 2023-10-23 16:30:39 -04:00
Jonathan Kelley
dd4547d753
Feat: add global context functions
Add functions like window() and router() to
allow dynamically grabbing global contexts
without have to use the hook variants.

Deprecates the existing hook variants to
discourage folks from adding more noise
to their codebases.
2023-10-23 16:26:10 -04:00
Jonathan Kelley
ea8c5e290d
Merge pull request #1551 from ealmloff/fix-signals-outside-of-runtime
Fix using signals outside of a scope
2023-10-23 15:32:12 -04:00
Evan Almloff
d9b32afd64 add error message when overlapping fullstack features are enabled 2023-10-23 12:45:10 -05:00
Leonard
cea9563e25
Improve prop docs (#1565)
* Do the stuff

* More sanitizing + fix warnings and format
2023-10-23 08:41:26 -05:00
Leonard
74952179db
Append prop documentation to function when using #[inline_props] or #[component] (#1563)
* Do the stuff

* Add deprecated warning and attribute list

Also move out methods that didn't take self as a parameter from `InlinePropsDeserializer`
2023-10-22 09:28:17 -05:00
Evan Almloff
9abc390d04 bench 2023-10-20 13:21:27 -05:00
Evan Almloff
b14aaca7b2 fix desktop renderer on windows 2023-10-20 13:05:13 -05:00
Marc Espín
129d0a68ff
feat: Optional web support for hot-reload crate (#1527)
* feat: Optional web support for hot-reload crate

* rename feature

* tweak

* tweak
2023-10-20 12:59:49 -05:00
Evan Almloff
33f0f0c172 fix clippy 2023-10-20 09:38:10 -05:00
Evan Almloff
1d664c616e restore desktop/liveview minification 2023-10-20 09:18:16 -05:00
Evan Almloff
2404bfeeb3 fix liveview element 2023-10-20 09:06:19 -05:00
Evan Almloff
378cbfabd9 fix desktop mounted event 2023-10-20 08:45:04 -05:00
Evan Almloff
007aacc247 remove liveview logging 2023-10-19 16:41:47 -05:00
Evan Almloff
c9612a085e fix liveview mounted event 2023-10-19 16:40:08 -05:00
Evan Almloff
42eb4b5098 fix clippy 2023-10-19 15:48:06 -05:00
Evan Almloff
ad9c59c2b4 add an readable error when you name a prop key 2023-10-19 13:23:58 -05:00
ealmloff
1cf8f71368
Fix typo in generational box readme 2023-10-19 13:03:26 -05:00
ealmloff
000edc0552
document generational box 2023-10-19 13:01:38 -05:00
Jonathan Kelley
e819702fc5
Add into_vnode temporary logic for more things
This commit adjusts how rsx! works, making it more forgiving with signals.

Notably, we add the temporaries to if chains too.
2023-10-17 15:42:21 -07:00
Jonathan Kelley
55ad41b392
Merge branch 'master' into jk/loop-allocation-strategy 2023-10-17 15:27:20 -07:00
Evan Almloff
06ca8c53d8 gitignore minified.js 2023-10-17 14:47:11 -05:00
Evan Almloff
a4fbeeb932 add stress test for desktop 2023-10-17 14:45:37 -05:00
Evan Almloff
c807808231 remove logging 2023-10-17 14:32:31 -05:00
Evan Almloff
db56962eea basic example working with binary protocol on desktop 2023-10-17 14:31:58 -05:00
Evan Almloff
bfacf94db4 finish removing generic from SignalMap 2023-10-17 13:50:21 -05:00
Evan Almloff
4b8701e3eb Merge branch 'master' into map-signal 2023-10-17 13:45:36 -05:00
Evan Almloff
365868f636 remove extra generic from SignalMap 2023-10-17 13:45:25 -05:00
Evan Almloff
ce86aabf26 fix clippy 2023-10-17 13:02:51 -05:00
Evan Almloff
050add21d7 effect-outside-of-runtime 2023-10-17 12:56:12 -05:00
Jonathan Kelley
509dca97e6
Merge pull request #1544 from ealmloff/must-use-hooks
Add must use to several hooks
2023-10-17 09:24:39 -07:00
Evan Almloff
6e9aa4dba1 fix clippy 2023-10-16 13:29:32 -05:00
Evan Almloff
87dae6a41f add a test for derefing signals to a closure 2023-10-16 13:08:18 -05:00
Evan Almloff
c65116c173 restore deref<Fn() -> Ref> 2023-10-16 13:03:37 -05:00
Evan Simkowitz
b1d6069363
Fix deref for Write struct in dioxus-signals (#1549) 2023-10-16 10:49:21 -05:00
Evan Almloff
9d19f4d204 fix clippy 2023-10-16 10:44:08 -05:00
Jonathan Kelley
7e2164d6d6
Add toggle 2023-10-15 17:52:01 -07:00
Jonathan Kelley
14b3fa72e4
Change the semantics of exprs/for loops allocations strategy
This commit adjusts how exprs and for loops are handled within
rsx. This is a breaking change in terms of codegen, but has
slight semantic changes as well.

Now, when exprs/for loops are allocated, they are given a temporary.
The temporary is elided to the <'a> lifetime of the bump, to satisfy
the borrow checker. This fixes issues with signals where exprs/for
loops mapping vecs out of RefCells would be caught up without a
temporary lifetime.
2023-10-15 17:40:56 -07:00
Evan Almloff
2645b85533 WIP desktop binary protocol 2023-10-15 09:23:01 -05:00
Evan Almloff
9f729dd6de fix clippy 2023-10-14 14:32:08 -05:00
Evan Almloff
3bf6d2d7cf add must use to several hooks 2023-10-14 12:08:54 -05:00
Evan Almloff
cb148cc881 Merge branch 'bump-wry' into binary-protocal 2023-10-13 09:45:11 -05:00
Evan Almloff
3063d83406 start migrating desktop to sledgehammer 2023-10-13 09:21:57 -05:00
Evan Almloff
1a4741ce04 fix liveview events 2023-10-12 10:21:29 -05:00
ealmloff
a7736284c8
Merge branch 'master' into intigrate-collect-assets 2023-10-12 08:46:27 -05:00
Oak
f3a749538b
feat: initial_checked attribute for inputs (#1540)
Mapped to defaultChecked property of HTMLInputElement.
2023-10-12 08:12:09 -05:00
Evan Almloff
7ea868bd08 add a map method to signal 2023-10-11 12:46:53 -05:00
Evan Almloff
3578f03f4f add the ability to map signals 2023-10-11 12:43:22 -05:00
Evan Almloff
b26985ea6c make debug build of fullstack applications load faster by default 2023-10-10 14:23:58 -05:00
Leonard
2d1234c3d1
Include README and Dioxus logo in package docs (#1536)
* Include README in docs.rs and add Dioxus logo

* Update README.md
2023-10-10 10:52:48 -05:00
Evan Almloff
426a342700 add logs when the desktop or fullstack application is collecting assets 2023-10-10 10:26:16 -05:00
Evan Almloff
b76f129083 Merge branch 'master' into intigrate-collect-assets 2023-10-10 09:57:16 -05:00
Leonard
c65a49fd0f
Remove redundant directories (#1535)
Also fix typo
2023-10-10 09:50:58 -05:00
Evan Almloff
f20b740abe switch liveview to sledgehammer 2023-10-09 14:28:12 -05:00
Marc Espín
c8c4e85e65
feat: Remove unused deps (#1447)
* feat: Reduce dioxus-cli deps

* remove more unused deps
2023-10-09 10:14:46 -05:00
Timothy Mertz
cde1e886d6
cli: Add ability for autofmt to read stdin (#1529)
This change adds the ability for autofmt to read from stdin by using
'-f -' or '--file -'
2023-10-09 08:20:31 -05:00
Sridhar Ratnakumar
0d7bc86250
cli: Log connection errors during dx serve in desktop apps (#1515)
* cli: Log connection errors during `dx serve` in desktop apps

* add a note about the dioxus CLI

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-10-09 07:56:23 -05:00
Leonard
95d8843d9d
Fix clippy (#1532) 2023-10-08 18:24:38 -05:00
Evan Almloff
248d78fbfe fix clippy 2023-10-05 15:45:34 -05:00
Leonard
459f24d5e9
Clarify where serve warnings come from (#1524) 2023-10-05 13:05:14 -05:00
Evan Almloff
7f0fa07757 fix hot reloading 2023-10-04 09:11:21 -05:00
Evan Almloff
ed95ac932d fix double triggering events 2023-10-04 08:58:28 -05:00
Evan Almloff
d5b7a6d15e fix fuzzing test 2023-10-04 08:46:24 -05:00
Leonard
30a3283438
Add use_on_mount and fix some typos (#1497)
* Add `use_on_mount` and fix some typos

* Optimize away UseOnMount struct

* `use_on_mount`, `use_on_unmount` -> `use_on_create`, `use_on_destroy`

* Make `use_on_unmount` deprecated

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-10-04 08:23:21 -05:00
Sridhar Ratnakumar
91752e7220
cli: Fix typo, resouces (#1516) 2023-10-04 08:20:13 -05:00
Evan Almloff
eb15014b9d fix hydration mounted element 2023-10-03 16:42:42 -05:00
Leonard
06814dc17b
Update core-macro README per #1448 (#1510) 2023-10-03 06:59:53 -05:00
ealmloff
072ca3529b
Merge branch 'DioxusLabs:master' into events-2 2023-10-02 19:48:52 -05:00
Oak
5bcb772511
feat: initial_selected attribute for options (#1508) 2023-10-02 14:08:09 -05:00
Evan Almloff
c30dc25293 Merge branch 'master' into fix-event-bubbling 2023-09-28 16:06:13 -05:00
Evan Almloff
c137357094 fix hydration 2023-09-27 10:22:49 -05:00
Evan Almloff
3e55bb8885 fix some clippy lints 2023-09-27 10:21:33 -05:00
Evan Almloff
ee25c03e74 fix some clippy lints 2023-09-27 10:13:45 -05:00
Evan Almloff
b60671e0fe fix non extending attributes 2023-09-27 10:02:49 -05:00
Evan Almloff
7b51bb8060 WIP: add extends to the props macro 2023-09-26 19:23:00 -05:00
Leonard
a2dd926f7f
Rename modules to use snake_case (#1498) 2023-09-26 17:20:29 -05:00
Seungwoo Kang
31780b3ede
liveview: Add `interpreter_glue_relative_uri (#1481)
* liveview: Add `interpreter_glue_relative_uri`

By utilizing `window.location.host` in the client-side JavaScript, we can easily derive the WebSocket URI from a relative path URI. This approach obviates the need for host address retrieval on the server side, unlike the method of serving glue code in liveview using `interpreter_glue`.

* liveview: Merge `.._relative_url` functionality

- Merged `.._relative_url` to current API `interpreter_glue`.
- Edit axum example to work with new feature.

* liveview: Fix clippy warning
2023-09-26 16:35:17 -05:00
Evan Almloff
e5b15f7c31 fix tracing in desktop 2023-09-26 09:07:11 -05:00
Evan Almloff
e48761e11c Merge branch 'master' into intigrate-collect-assets 2023-09-26 09:00:53 -05:00
Evan Almloff
56b1a0aefc add bump to props 2023-09-25 15:42:37 -05:00
Evan Almloff
d2f0f4b4b6 document layer and service 2023-09-25 12:25:21 -05:00
Marc Espín
517a43d765
fix: Update server function docs link (#1489) 2023-09-25 08:31:35 -05:00
Evan Almloff
d994e3e722 make the layer module public in fullstack 2023-09-23 07:57:41 -05:00
Evan Almloff
5b65c4cfb4 implement spreading props in the rsx macro 2023-09-22 10:04:34 -05:00
Evan Almloff
9e167dfdb7 Merge branch 'many_optional_attributes' into pr/atty303/1349 2023-09-22 09:32:05 -05:00
Evan Almloff
5ed116b060 fix bounds on generated element extensions 2023-09-22 09:24:00 -05:00
Evan Almloff
e113562c7c Merge branch 'master' into fix-event-bubbling 2023-09-22 08:26:05 -05:00
Evan Almloff
6fab8963e6 use tracing in new logs 2023-09-22 08:25:38 -05:00
Evan Almloff
78860da006 Merge branch 'master' into debug-signals 2023-09-22 07:59:47 -05:00
Evan Almloff
e2f50cc689 Merge branch 'master' into intigrate-collect-assets 2023-09-22 07:56:00 -05:00
Evan Almloff
7033276c34 Merge branch 'master' into pr/atty303/1349 2023-09-20 16:19:23 -05:00
Evan Almloff
fa494349fe add a lifetime to the properties trait and make the manual spread example work 2023-09-20 16:15:11 -05:00
Evan Almloff
fc8c25280a allow many attributes to be attached to one element 2023-09-20 16:02:04 -05:00
ealmloff
60ee82942c
restore the tray feature in the desktop crate (#1475) 2023-09-19 16:48:01 -05:00
Evan Almloff
dc446b5e5b fix extending an element 2023-09-19 16:38:27 -05:00
Evan Almloff
610401b928 fix repeated class in ssr test 2023-09-19 10:23:36 -05:00
Evan Almloff
561830d814 fix merging static attributes 2023-09-19 10:20:42 -05:00
Evan Almloff
c0f345e775 add if statements to test and rsx usage example 2023-09-19 09:48:56 -05:00
Evan Almloff
ab2b9fb34e fix autoformatting 2023-09-19 09:39:53 -05:00
Evan Almloff
d3eefe4a27 fix clippy 2023-09-19 09:16:58 -05:00
Jonathan Kelley
27a551d63e
Merge pull request #1467 from ealmloff/expose-runtime-gaurd
Make RuntimeGuard public
2023-09-18 23:12:50 -07:00
Calastrophe
98babe1096
partial ord impl (#1473) 2023-09-18 19:50:57 -05:00
Evan Almloff
d297e2baa2 Add optional attributes 2023-09-18 19:50:02 -05:00
Leonard
07613c806b
Fix #1367 (#1471)
* Bump cargo_toml to 1.16.0

* Format
2023-09-18 18:51:04 -05:00
Evan Almloff
ef6e9098fd fix formatting 2023-09-17 20:06:41 -05:00
Evan Almloff
c933bfaed3 fix formatting 2023-09-17 20:04:40 -05:00
Evan Almloff
b9a92a1bd8 fix core exports 2023-09-17 20:03:58 -05:00
Evan Almloff
219c068283 Merge branch 'master' into events-2 2023-09-17 20:01:21 -05:00
Evan Almloff
98335bd9a6 Merge branch 'master' into fix-event-bubbling 2023-09-17 20:00:22 -05:00
Evan Almloff
f976e08f71 Merge branch 'master' into intigrate-collect-assets 2023-09-17 19:40:14 -05:00
ealmloff
848f2d8905
Merge branch 'DioxusLabs:master' into expose-runtime-gaurd 2023-09-17 19:34:33 -05:00
Evan Almloff
4691046e23 fix formatting 2023-09-17 19:01:20 -05:00
Evan Almloff
22c659d995 fix formatting 2023-09-17 19:01:00 -05:00
Evan Almloff
070ef6aec9 Merge branch 'master' into cli-serde-default 2023-09-17 19:00:13 -05:00
Evan Almloff
847801908f Merge branch 'master' into add-file-data-drag-event 2023-09-17 18:56:59 -05:00
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
fc5c53810b fix rink imports 2023-09-13 10:08:06 -05:00
Evan Almloff
27f4b3f345 add touches_changed and target_touches 2023-09-12 17:45:07 -05:00
Evan Almloff
c10700c962 add touch data to touch events 2023-09-12 17:28:55 -05:00
Evan Almloff
b47064165e Merge branch 'events-2' of https://github.com/Demonthos/dioxus into events-2 2023-09-12 10:01:55 -05:00
Evan Almloff
a9bb04722f split the point interaction trait into smaller traits for touch compatibility 2023-09-12 10:01:53 -05:00
ealmloff
f449823d10
Merge branch 'master' into events-2 2023-09-12 09:33:54 -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
3a02520ffa fix web onmount event 2023-09-08 10:32:48 -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
Evan Almloff
d06e64e5ad fix dioxus-tui events 2023-09-06 12:51:02 -05:00
Valentin Golev
e8ea228759
add initial_value to textarea (#1434) 2023-09-06 12:49:29 -05:00
Evan Almloff
0ab7a02777 fix clippy 2023-09-05 21:30:20 -05:00
Evan Almloff
02456c1068 fix double drop of bubble id 2023-09-05 21:21:54 -05:00
Evan Almloff
ffb5de91d1 Merge branch 'master' into intigrate-collect-assets 2023-09-05 13:45:37 -05:00
ealmloff
6662892c10
find attributes and components to drop in lazy nodes (#1376) 2023-09-05 13:43:42 -05:00
Evan Almloff
bd38cddc9f fix dioxus core event tests 2023-09-04 19:17:43 -05:00
Evan Almloff
9552ab6c1c pass event propagation test 2023-09-04 19:10:11 -05:00
ealmloff
9e623d52cb
Merge branch 'master' into events-2 2023-09-04 18:52:48 -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
148b35a87a fix clippy 2023-09-04 08:42:30 -05:00
Evan Almloff
282e098086 Merge branch 'master' into intigrate-collect-assets 2023-09-04 08:42:14 -05:00
Evan Almloff
e86c1647d8 fix clippy 2023-09-04 08:33:56 -05:00
Evan Almloff
18fd40a5c2 pin tauri bundler version 2023-09-04 08:31:31 -05:00
Evan Almloff
d1575b40d1 fix mobile build 2023-09-04 08:24:38 -05:00
Evan Almloff
b1b2537949 Merge branch 'master' into events-2 2023-09-04 07:44:59 -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
baf36ab9ec Merge branch 'master' into events-2 2023-09-02 18:14:36 -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
df222c121a port examples to new events 2023-09-01 15:38:55 -05:00
Evan Almloff
dee92b83be remove the serde feature flag from enumset 2023-09-01 15:06:30 -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
f812e52ccb Merge branch 'fix-new-clippy-lints' into events-2 2023-08-31 16:44:42 -05:00
Evan Almloff
364654e1fd fix clippy with events 2023-08-31 16:43:24 -05:00
Evan Almloff
bf90b7584e add some inline hints 2023-08-31 16:42:33 -05:00
Evan Almloff
3c01593703 document HtmlEventConverter 2023-08-31 16:38:14 -05:00
Evan Almloff
3eafb05d92 fix features on rink html dependency 2023-08-31 16:34:27 -05:00
Evan Almloff
f7451c02e8 port liveview events 2023-08-31 16:34:04 -05:00
Evan Almloff
4879f65a3e fix tui events 2023-08-31 16:25:26 -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
177db238b9 add some inline hints 2023-08-28 17:55:23 -05:00
Evan Almloff
097eb2099c add extension to downcast web events 2023-08-28 17:16:56 -05:00
Evan Almloff
8ba1c05a93 fix desktop events 2023-08-28 16:37:19 -05:00
Evan Almloff
bd387d601c fix formatting 2023-08-28 15:49:46 -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
62556b2c34 fix desktop and liveview compilation 2023-08-28 12:43:21 -05:00
Evan Almloff
0ef765e060 move rink over to the new event system 2023-08-28 12:35:55 -05:00
Evan Almloff
93cbfd0dbc derive more traits for serialized types 2023-08-28 12:35:43 -05:00
Evan Almloff
f7dff22552 expose all serialized events as public 2023-08-28 11:49:16 -05:00
Evan Almloff
b4ebf34595 forward data PointInteraction data in the PointerData debug and partial implementation 2023-08-28 11:39:55 -05:00
Evan Almloff
f3e7f042b4 fix reading signals outside of the vdom 2023-08-26 14:53:39 -05:00
Evan Almloff
b54f7dd5d2 fix no default features on the web renderer 2023-08-25 21:28:44 -05:00
Evan Almloff
ca1a502714 use an event converter for bundle splitting 2023-08-25 21:03:03 -05:00
Evan Almloff
299b123446 trait based event system 2023-08-25 17:02:48 -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 Simkowitz
a72718134b
fix failing check 2023-08-24 00:18:00 -04:00
Evan Simkowitz
124b58afb1
missed one 2023-08-24 00:06:57 -04:00
Evan Simkowitz
a5d687f7af
fix formatting 2023-08-24 00:06:52 -04:00
Evan Simkowitz
a5b97aa4a3
fix hover.rs formatting 2023-08-23 22:29:12 -04:00
Evan Simkowitz
c9da74313c
fix another bad format 2023-08-23 22:18:12 -04:00
Evan Simkowitz
f599ad6ad7
remove unnecessary PointInteraction imports now that it's in prelude 2023-08-23 22:14:57 -04:00
Evan Simkowitz
bad30786e2
address comments 2023-08-23 22:09:39 -04:00
Evan Simkowitz
a8af958d75
Add dxfmt::skip and workspace recommendations 2023-08-23 20:39:34 -04:00
Evan Simkowitz
500051e2b2
fix formatting issue 2023-08-23 20:23:54 -04:00
Evan Simkowitz
e8b95993ac
fix text_like import 2023-08-23 18:33:27 -04:00
Evan Simkowitz
56095116e2
Fix tests 2023-08-23 17:58:43 -04:00
Evan Simkowitz
af9875f9b1
revert change to cargo 2023-08-23 14:10:18 -04:00
Evan Simkowitz
b771386c13
fix dioxusmousebuttons 2023-08-23 14:02:25 -04:00
Evan Almloff
dc4707ee2a WIP fix event bubbling 2023-08-23 13:01:37 -05:00
Evan Simkowitz
e0f42f8173
Fix rink 2023-08-23 13:31:42 -04:00
Evan Simkowitz
0e5600f2f4
add impl for pointer 2023-08-23 12:47:37 -04:00
Evan Almloff
e337aff0a4 WIP split element from element ref 2023-08-23 10:48:10 -05:00
Evan Simkowitz
cc3f60dd2f
Adding PointInteraction trait, etc. 2023-08-22 23:29:24 -04: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
e162e3e4cf fix formatting 2023-08-21 16:07:49 -05:00
Evan Almloff
99268acc05 add an option to skip assets in the CLI 2023-08-21 16:05:25 -05: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
Evan Almloff
5eca11fe3d update collect assets name 2023-08-18 14:54:57 -05:00
Evan Almloff
4ee2bc259d fix clippy 2023-08-18 14:45:03 -05:00
Evan Almloff
1a36409922 disable asset patching in cargo run for mobile 2023-08-18 14:43:56 -05:00
Evan Almloff
1c58352456 implement fullstack assets integration 2023-08-18 14:30:23 -05:00
Evan Almloff
afb8578605 Merge branch 'fullstack-serve' into intigrate-collect-assets 2023-08-18 14:03:55 -05:00
Evan Almloff
e3aac14ec9 make clippy happy 2023-08-18 13:57:05 -05:00
Evan Almloff
bd743fa2f9 Add fullstack platform to serve and build commands 2023-08-18 13:55:00 -05:00
Evan Almloff
1ed814668a Set an environment variable during serve for bundling 2023-08-18 11:12:56 -05:00
Evan Almloff
efe08df966 report request errors in desktop 2023-08-18 11:02:15 -05:00
Evan Almloff
7b2bf4acc5 find head relative to asset root 2023-08-18 10:57:30 -05:00
Evan Almloff
1cbf549847 log errors when desktop fails to read the head 2023-08-18 10:36:55 -05:00
Evan Almloff
9bfe9682b5 integrate with the bundle command 2023-08-18 10:27:38 -05:00
Evan Almloff
213b80790b fix release desktop builds 2023-08-18 09:55:49 -05:00
Evan Almloff
62f8e0f727 fix fullstack assets 2023-08-17 09:56:59 -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
Evan Almloff
77d11f6d9a Fix the asset config in the CLI 2023-08-16 17:24:30 -05:00
Evan Almloff
c402b6cd36 collect assets in desktop debug mode 2023-08-16 17:01:51 -05:00
Evan Almloff
8d3c11ef15 inject included styles and preload images into the head 2023-08-16 16:16:34 -05:00
Evan Almloff
0ec085fbbd add collect assets 2023-08-16 14:03:28 -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
Koji AGAWA
d573f5dfd5 feat: props spread 2023-08-13 16:45:17 +09: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
8d1c17ba7d fix clippy 2023-08-09 11:10:41 -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
8b4e0b3e07 Use serde default instead of options in the CLI 2023-08-08 15:33:48 -07: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