Commit graph

199 commits

Author SHA1 Message Date
Greg Johnston
bd1601e892 default to SerdeJson encoding for resources, use new_str() for Str encoding 2024-08-01 19:42:21 -04:00
Greg Johnston
602ac60a85 feat: synchronous serialized values with SharedValue 2024-08-01 19:42:21 -04:00
Greg Johnston
0d867ba016 fix: correctly escape text nodes, except in script/style tags 2024-08-01 19:42:21 -04:00
Greg Johnston
36272a0b1b Revert "fix: constrain reactive rendering to Fn(), because using dry_resolve() for Suspense requires idempotent render functions so that they can be called once (to register resources) and called a second time to resolve"
This reverts commit 7ec5c77ba3e8f45bae04a7661a56741f95125adb.
2024-08-01 19:42:20 -04:00
Greg Johnston
e0f98dc0fd fix: constrain reactive rendering to Fn(), because using dry_resolve() for Suspense requires idempotent render functions so that they can be called once (to register resources) and called a second time to resolve 2024-08-01 19:42:20 -04:00
Greg Johnston
949f43d145 fix: Clone for ArcResource and default to SerdeJson for Resource 2024-08-01 19:41:55 -04:00
Greg Johnston
3c39674622 refactor to allow rendering Resource directly in view 2024-08-01 19:41:27 -04:00
Greg Johnston
bae79e2b2c add ServerAction error handling for any error type (closes #2325) 2024-08-01 19:41:27 -04:00
Greg Johnston
14b7073863 feat: add .by_ref() to create a Future from an AsyncDerived (etc.) that takes a reference, rather than cloning 2024-08-01 19:41:12 -04:00
Greg Johnston
9666c9c0c5 chore: clear up... a few warnings 2024-08-01 19:41:12 -04:00
Greg Johnston
846ff2fefb feat: return an async guard from .await rather than cloning the value every time 2024-08-01 19:41:12 -04:00
Greg Johnston
ce5738d7c4 feat: return Option from AsyncDerived.get() instead of AsyncState 2024-08-01 19:41:11 -04:00
Greg Johnston
0d47399424 restore hydration feature for some of its feature-gating benefits for Resource deserialization 2024-08-01 19:41:11 -04:00
Greg Johnston
961bf89a8b lazy Future construction for AsyncDerived 2024-08-01 19:41:11 -04:00
Greg Johnston
d360cc280f support Resource in CSR for backward-compat 2024-08-01 19:41:11 -04:00
Greg Johnston
2470637b0b SSR optimizations for binary size, and flat router 2024-08-01 19:40:25 -04:00
Greg Johnston
72e97047a5 add MultiAction/ServerMultiAction 2024-08-01 19:40:25 -04:00
Greg Johnston
60d883a26c only subscribe to memo manually if already loaded 2024-08-01 19:40:25 -04:00
Greg Johnston
add3be0ff5 Suspense SSR 2024-08-01 19:40:25 -04:00
Greg Johnston
20c29cab89 add serde-wasm-bindgen encoding for resources 2024-08-01 19:40:24 -04:00
Greg Johnston
2bc04444e1 work related to 0.7 blog port 2024-08-01 19:40:24 -04:00
Greg Johnston
b41fde3ff9 work related to 0.7 blog port 2024-08-01 19:40:24 -04:00
Greg Johnston
c29081b12a completing work on meta 2024-08-01 19:40:24 -04:00
Greg Johnston
30c1cd921b stash 2024-08-01 19:40:24 -04:00
renshuncui
b9c620d4cd
chore: fix some comments (#2712)
Signed-off-by: renshuncui <renshun@111.com>
2024-07-29 09:30:50 -04:00
Oleg Shatov
0c817d51fe
fix: accurately update number of pending action dispatches (closes #2652) (#2653) 2024-07-03 06:48:02 -04:00
Chris
fb5d8513ff
docs: generate link to definition (#2656) 2024-07-03 06:46:02 -04:00
David Pitoniak
a2c7e23d54
docs: grammar typo for MultiActon doc comment (#2589) 2024-05-11 15:05:35 -04:00
Greg Johnston
41f3c46830
chore: bump nightly version in examples (#2479) 2024-04-01 15:16:53 -04:00
Paul Hansen
6a83161368
chore: add MSRV (#2360) 2024-02-28 07:19:09 -05:00
zoomiti
753bf1ed54
Fix Broken Doc links and Deprecate FromUtf8Error in oco.rs (#2318)
* fix: deprecate `FromUtf8Error` in `oco.rs`

* chore: fix broken doc links (#859)

* chore: fix broken doc link to server attribute macro

* cargo fmt
2024-02-21 19:24:40 -08:00
Greg Johnston
dfddbd6bf9
docs: give a warning when you try to .dispatch() an action immediately (closes #2225) (#2286) 2024-02-09 20:55:10 -05:00
Greg Johnston
b4a1d90327 clean up for CI 2024-01-20 12:32:51 -05:00
Greg Johnston
35e8e74dcf get rkyv working and work on custom encoding example 2024-01-19 14:16:58 -05:00
Greg Johnston
1ad7ee8a03 generalize error redirect behavior across integrations 2024-01-19 14:16:58 -05:00
Greg Johnston
cc6f65cd83 initial version of server action error handling without JS 2024-01-19 14:16:58 -05:00
Greg Johnston
b0cdeab906 remove old code 2024-01-19 14:16:58 -05:00
Greg Johnston
dec17fc65b fix server actions and server multi actions 2024-01-19 14:16:03 -05:00
Greg Johnston
2dbc5899f3 cargo fmt 2024-01-19 14:16:03 -05:00
benwis
197edebd51 Made some progress, started work on pavex integration as well 2024-01-19 14:16:03 -05:00
benwis
2a5c855595 It starts to compile! 2024-01-19 14:16:03 -05:00
Chris
5e929a75fa
feat: Action::new and Action::server (#1998) 2023-11-10 15:53:20 -05:00
Greg Johnston
cc93651bc9
fix: panic during generate_route_list if you immediately dispatch an action (#1853) 2023-10-06 07:29:10 -04:00
Greg Johnston
dbc707adcd
feat/change: adopt reactive ownership model and drop cx/Scope (#918) 2023-08-21 19:31:37 -04:00
Mark Catley
0726a3034d
examples: fix github links (#1493) 2023-08-04 07:55:04 -04:00
Greg Johnston
5e26e84d77
feat: allow feature-name flexibility when using server functions (#1427) 2023-07-25 06:07:52 -04:00
Greg Johnston
ec4bfb0e8a
chore: resolve clippy incorrect_clone_impl_on_copy_type (closes #1401) (#1418) 2023-07-22 22:14:52 -04:00
Joseph Cruz
3af115a663 fix: maybe_misused_cfg 2023-07-18 20:56:39 -04:00
Joseph Cruz
a344804734 fix: incorrect_clone_impl_on_copy_type (allow) 2023-07-18 20:54:51 -04:00
Greg Johnston
3ea3a40395
fix: server_fn rustls feature shouldn't pull in default-tls (#1343) 2023-07-13 19:41:55 -04:00
Joseph Cruz
3481a6ee53
build: run tasks from workpace or member directory (#1339) 2023-07-13 16:46:51 -04:00
Greg Johnston
ee7dbafc85
change: migrate to nightly and csr features rather than stable and default-features = false (#1227) 2023-06-26 21:12:14 -04:00
Greg Johnston
966100c2d6
feat: add an anyhow-like Result type for easier error handling (#1228) 2023-06-25 15:18:00 -04:00
Greg Johnston
c55067ab7c
feat: improved error handling and version tracking for pending actions/<ActionForm/> (closes #1205) (#1225) 2023-06-23 11:10:59 -04:00
martin frances
10c0a2de65
chore: cleared clippy warnings (#1190)
The change in indentation makes the PR hard to review

so I will discuss the change in conversational language

Two "if"'s checks were merged into one "if"

this

-        if let Some(expr) = node.value() {
-            if let syn::Expr::Tuple(tuple) = expr {

becomes

+        if let Some(Tuple(tuple)) = node.value() {
2023-06-15 20:11:50 -04:00
Greg Johnston
2b7923261b
docs: fix failing doctests from server fn docs (#1179) 2023-06-13 17:49:16 -04:00
Greg Johnston
b043f829a6
docs: clarify available server fn encodings (#1178) 2023-06-13 16:01:45 -04:00
Greg Johnston
bb10b32200
feat: register server functions automatically (#1154) 2023-06-11 09:09:21 -04:00
Greg Johnston
d8e03773f0
feat: allow structs in server function arguments (#987) 2023-05-03 15:26:48 -04:00
Matt Crane
ddf9df2b5e
change: replace serde_urlencoded with serde_html_form to support Vec<_> in server fn args (#973) 2023-05-01 17:17:45 -04:00
Greg Johnston
671b1e4a8f
docs: note need for serde dependency for server functions (closes #947) (#962) 2023-04-27 17:15:29 -04:00
Ben Wishovich
81f330e888
feat: add thorough tracing throughout (#908) 2023-04-22 06:47:11 -04:00
Greg Johnston
2c7ee0d415
feat: rustls feature for reqwest and any other relevant dependencies (#842) 2023-04-10 13:15:00 -04:00
Greg Johnston
ff5ceddbe2
fix: correctly pass server fn errors to client (#822) 2023-04-07 08:12:10 -04:00
Ben Wishovich
8b57ba7aa8
feat: add the ability for server fns to be submitted via GET requests (#789) 2023-04-05 06:47:17 -04:00
István Donkó
8ab9c08448
docs: fix typo in server_fn docs (#740) 2023-03-24 21:42:27 -04:00
martin frances
cfd5c98f97
clippy: simplify Box::pin() call. (#718) 2023-03-21 09:06:31 -04:00
Greg Johnston
38daaf3b72
chore: apply cargo machete systematically (#671) 2023-03-13 10:16:20 -04:00
Greg Johnston
b55e9a9e64
v0.2.3: fix broken stable support (#670) 2023-03-13 07:25:08 -04:00
martin frances
c63c8ac447
chore: cargo machete: Strip down leptos_server. (#644) 2023-03-08 19:37:22 -05:00
ealmloff
0c261c0fb0
feat: make server functions framework agnostic (#596) 2023-03-01 20:56:30 -05:00
Qwox
08ad6832af
fix: set new value before resetting input (#604)
Co-authored-by: Qwox <qwox@qwox.com>
2023-03-01 20:04:37 -05:00
Ben Wishovich
322041917d
fix issue with redirects in server fns creating multiple Location headers (#550) 2023-02-20 08:55:47 -05:00
jquesada2016
f2f52b2533
change: move signal method implementations into traits in signal prelude (#490) 2023-02-18 07:30:03 -05:00
Greg Johnston
1dbcfe2861
change: reorganize module exports and reexports (#503) 2023-02-12 17:04:36 -05:00
Greg Johnston
6bab4ad966
apply new formatting everywhere (#502) 2023-02-11 14:30:06 -05:00
martin frances
ddee545e7e
leptos-server: Removed dependecy on log, linear-map, rmp-serde. (#439) 2023-02-02 16:59:07 -05:00
Greg Johnston
395336a8c0 Correctly set pending state with ActionForm 2023-01-27 12:19:20 -05:00
Greg Johnston
1563d237d0
Check uniqueness of server function names at registration time (#388)
* Check uniqueness of server function names at registration time, and stop leaking src file path in release mode

* Fix missing dev-dependency
2023-01-27 06:57:32 -05:00
Greg Johnston
b861f84e40
Fix a large number of small issues in docs (#386)
* Fix example links in docs

* Restore missing CSR READMEs

* Document need to enable features on `leptos_router` and `leptos_meta`

* Add "Is it production ready?" to FAQs

* Document which types are provided as contexts in server integrations

* Fix broken links and other issues in docs
2023-01-26 21:44:01 -05:00
Martin
1fe93fd588 Minor: For each sub crate the landing page should be the root README.md. 2023-01-17 17:05:09 +00:00
Greg Johnston
cdf709fb09 0.1.0 2023-01-12 09:57:08 -05:00
Martin
1621b86d8f Minor: "leptos.workspace = true" is invalid. 2023-01-11 17:09:10 +00:00
Greg Johnston
4df3687463 Forbid unsafe code in all packages 2023-01-09 19:48:51 -05:00
hakesson
b852e459a9 Unify workspace dependencies 2023-01-07 18:00:37 +01:00
hakesson
681f10ec8d Workspace-based versioning 2023-01-07 17:35:02 +01:00
Greg Johnston
0da88f39cd Improve docs and debugging tools for server functions (closes #225) 2023-01-03 20:05:47 -05:00
Greg Johnston
95dd252c14 Disable for publish 2023-01-02 16:41:08 -05:00
Greg Johnston
755ceb7d75 0.1.0-beta 2023-01-02 16:35:00 -05:00
Greg Johnston
9663555195 Fix Action and create_action docs to match new API 2023-01-01 19:44:50 -05:00
Greg Johnston
2c614722f4 Make Action and MultiAction Copy by backing them with a StoredValue 2022-12-30 15:29:35 -05:00
Greg Johnston
70f6297277 Merge branch 'leptos_dom_v2' of https://github.com/jquesada2016/leptos into jquesada2016-leptos_dom_v2 2022-12-29 09:32:12 -05:00
Greg Johnston
b86e7f33dc Bump versions for new cargo-leptos compatible integrations 2022-12-29 08:04:22 -05:00
Greg Johnston
50ba796f49 Fix leptos_server tests 2022-12-28 13:26:10 -05:00
Ben Wishovich
f8f0d9fae0
Merge branch 'main' into cargo-leptos-beta 2022-12-27 12:49:17 -08:00
Greg Johnston
a55ce8f752 Fix deps 2022-12-25 23:08:00 -05:00
Greg Johnston
469a65ad7a Remove dev-deps for publish 2022-12-25 23:07:42 -05:00
Greg Johnston
8a8c00455e Remove version of dev-deps 2022-12-25 23:06:20 -05:00
Greg Johnston
5540bb8e8c Bump version to 0.1.0-alpha 2022-12-25 22:58:07 -05:00
Greg Johnston
391fe89542 0.0.21 2022-12-23 13:01:15 -05:00