Commit graph

455 commits

Author SHA1 Message Date
Vladimir Motylenko
571e778bce
fix: hygiene on template macro (#1101)
Pass dependency needed for template, and also hide them behind feature guide, to avoid compile time bloating.
2023-05-27 08:07:44 -04:00
Vladimir Motylenko
5a71ca797a
feat: RSX parser with recovery after errors, and unquoted text (#1054)
* Feat: Upgrade to new local version of syn-rsx

* chore: Make macro more IDE friendly

1. Add quotation to RawText node.
2. Replace vec! macro with [].to_vec().
Cons:
1. Temporary remove allow(unused_braces) from expressions, to allow completion after dot in rust-analyzer.

* chore: Change dependency from syn-rsx to rstml

* chore: Fix value_to_string usage, pr comments, and fmt.
2023-05-21 06:45:53 -04:00
Greg Johnston
00fcd1c65e
docs: fix small docs issues (closes #1045) (#1049) 2023-05-16 13:01:29 -04:00
Greg Johnston
0db4f5821f
fix: avoid extra { escaping (closes #1035) (#1038) 2023-05-12 16:29:33 -04:00
Greg Johnston
1fdb6f1cdf
feat: add style: to view (#1009) 2023-05-06 06:23:20 -04:00
Greg Johnston
ea153e4f26
docs: error when component ends with view! { ... }; (closes #985) (#993) 2023-05-03 18:15:02 -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
Roland Fredenhagen
661adc4027
feat: ```view code block in doc comments for properties (#961) 2023-04-28 16:03:04 -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
Roland Fredenhagen
75a7bd610a
fix: escapes in doc comments on component properties (#958) 2023-04-27 16:43:38 -04:00
Greg Johnston
0f277c55ec fix: use absolute reference to ::leptos::Scope in case not imported 2023-04-25 16:52:14 -04:00
jquesada2016
362150a715
feat: implemented IntoView for component props (#948) 2023-04-24 20:05:31 -04:00
yuuma03
234861a156
fix: generics on impl From slot to Vec<slot> (#946) 2023-04-24 20:03:03 -04:00
Greg Johnston
78d6d312f8
CI: fix unused variables breaking tests (#950) 2023-04-24 17:19:10 -04:00
Roland Fredenhagen
c471986024
feat: add #[allow(missing_docs)] to children prop in components (#934) 2023-04-23 15:34:42 -04:00
Roland Fredenhagen
d2e3a156e8
fix: link to actual type instead of Into trait for component properties (#932) 2023-04-23 15:33:27 -04:00
yuuma03
0e2181fb90
fix: allow nested slots (#928) 2023-04-22 14:14:01 -04:00
Ben Wishovich
81f330e888
feat: add thorough tracing throughout (#908) 2023-04-22 06:47:11 -04:00
yuuma03
f51857cedc
feat: add slots (closes #769) (#909) 2023-04-21 14:36:38 -04:00
Greg Johnston
d3a577c365 cargo fmt 2023-04-21 12:45:08 -04:00
Greg Johnston
b80f9e3871
fix: issue with ordering of class attribute and class=("fancy-name-200", true) (closes #907) (#914) 2023-04-21 12:42:35 -04:00
Greg Johnston
fe68b47ba2
perf: tiny optimization on primitive child values (#887) 2023-04-17 22:09:10 -04:00
Greg Johnston
17040a4af4
fix: custom events in SSR mode (#852) 2023-04-12 13:21:36 -04:00
Greg Johnston
b09a5f905e
docs: emit error when trying to combine global class and dynamic class in a bugged way (#850) 2023-04-11 21:15:07 -04:00
Greg Johnston
012ff56cd6
fix static text nodes with curly braces in SSR (#849) 2023-04-11 12:46:32 -04:00
Greg Johnston
f969fd7eff
fix: don't entity-encode HTML special characters inside <script> or <style> (closes #837) (#846) 2023-04-10 13:15:15 -04:00
Greg Johnston
016ad6b7a6
feat: make __Props imports unnecessary (closes #746) (#828) 2023-04-07 15:06: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
Greg Johnston
a3327f8841
fix: SVG <title> tag (#783) 2023-04-01 11:24:32 -04:00
Greg Johnston
1e037ecb60
chore: clippy and docs warnings (#779) 2023-03-31 17:12:42 -04:00
Lukas Potthast
e9ff26abb4
feat: allow component declaration without use leptos::Scope in scope (#748) 2023-03-29 07:59:08 -04:00
Greg Johnston
38d97babd8
fix: always run dynamic classes after static classes (closes #735) (#738) 2023-03-24 17:38:34 -04:00
Greg Johnston
508ad52582
chore: fix clippy warnings (#721)
* `v0.2.4`

* chore: fix clippy warnings
2023-03-21 18:20:29 -04:00
Alexis Fontaine
71ee4cd09d
fix: view! macro not compiling with a non-default scope name (#704) 2023-03-19 13:14:47 -04:00
Greg Johnston
1698ffa7db
fix issues in release mode (closes #700) (#701) 2023-03-18 11:04:06 -04:00
Greg Johnston
f2ac412253
feat: support diffing inside component children in hot-reload (#690) 2023-03-17 13:53:53 -04:00
Greg Johnston
3bd52fcc9d
fix: hydration errors with <Suspense/> inside components in SSR mode (#688) 2023-03-17 12:46:04 -04:00
Greg Johnston
817152ff39
feat: new reactive system implementation (#637) 2023-03-13 17:58:00 -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
Greg Johnston
87d5bddb21
fix: text node issue in template macro (#661) 2023-03-11 14:25:38 -05:00
Greg Johnston
591212a56a
feat: add fragment support for hot reloading and fix some stuff (#659) 2023-03-11 07:21:37 -05:00
martin frances
94998aa95e
chore: cargo machete: leptos_macro - Removed unused crates. (#656) 2023-03-10 09:44:23 -05:00
martin frances
81401a738c
chore: bumped typed-builder up to 0.14. (#648) 2023-03-09 16:44:27 -05:00
Greg Johnston
bb0324fd48
fix: custom events (closes issue #641) (#642) 2023-03-07 14:00:48 -05:00
martin frances
27fb430900
bump typed-builder to version 0.13. (#633) 2023-03-06 09:07:21 -05:00
Greg Johnston
08d98691a3
fix: boolean attributes in SSR (#629) 2023-03-04 14:24:08 -05:00
Greg Johnston
55ce805b60
feat: hot reloading support for cargo-leptos (#592) 2023-03-04 09:04:22 -05:00
Greg Johnston
c8e6d18139
feat: allow multiple class names in view! macro class = (closes #612) (#614) 2023-03-03 10:44:15 -05:00
Roland Fredenhagen
2ee323135f
feat: support expressions in #[prop(default=...)] (#611) 2023-03-02 19:15:45 -05:00
ealmloff
0c261c0fb0
feat: make server functions framework agnostic (#596) 2023-03-01 20:56:30 -05:00
Greg Johnston
578853877a fix: restore SSR fast-path support 2023-02-28 15:36:52 -05:00
Remo
46e6e7629c
chore: macro panic hygiene (#568) 2023-02-24 16:36:05 -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
586f524015
feature: in-order streaming and async rendering (#496) 2023-02-17 17:31:32 -05:00
Greg Johnston
0071a48b8a
feature: reintroduce limited template-node cloning w/ template macro (#526) 2023-02-16 07:02:01 -05:00
Greg Johnston
8d42e91eb8
fix: top-level SVG in view macro with new exports (#525) 2023-02-15 15:38:06 -05:00
Greg Johnston
50d8eae694
fix: correct namespace for Unit in empty views (closes #518) (#520) 2023-02-13 20:25:26 -05:00
g-re-g
51e11e756a
Typos and a small cleanup (#509) 2023-02-12 18:11:31 -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
g-re-g
d0cacecfc6
Allow literal string as class in view macro (#500) 2023-02-10 22:43:40 -05:00
Greg Johnston
3fd3e73a10 Correctly handle custom elements in SSR 2023-02-08 20:32:59 -05:00
jquesada2016
765006158a
change: NodeRef<HtmlElement<Div>> generics to NodeRef<Div> (#481) 2023-02-07 20:13:25 -05:00
Greg Johnston
8a1adaefaf
fix: typed route params with #[derive(Params)] (#488) 2023-02-07 17:28:46 -05:00
Greg Johnston
086326324e
Fix inner_html in SSR (#487) 2023-02-07 13:14:14 -05:00
Greg Johnston
45d4ebccd8
fix: cargo doc in projects using #[server] (#476) 2023-02-05 19:12:32 -05:00
Greg Johnston
e0bf8f5b6d
fix: fix node_ref in SSR (#471) 2023-02-04 15:37:59 -05:00
Greg Johnston
5ace580edb
fix: don't override element event listeners with component event listeners (closes #461) (#470) 2023-02-04 15:37:48 -05:00
Roland Fredenhagen
5d612d9740
error on non meta input for prop attribute (#469) 2023-02-04 13:17:04 -05:00
g-re-g
c4e693e01e
Derive debug in server macro (#458) 2023-02-03 17:38:29 -05:00
Greg Johnston
2be4e8d959
docs: add new Children types to macro docs (#454) 2023-02-03 12:51:37 -05:00
Greg Johnston
bb9df8937d
feature: allow on: event listeners on <Component/> nodes (#448) 2023-02-02 23:24:03 -05:00
martin frances
65465cad78
leptos_macro: Machete - Removed unused deps. (#441) 2023-02-02 16:59:49 -05:00
Greg Johnston
53f7677258
Fix top-level SVG elements in SSR (#435) 2023-02-01 20:36:50 -05:00
Greg Johnston
e1bcf77b03
docs: Document inner_html attribute (#429) 2023-02-01 19:21:08 -05:00
IcosaHedron
63a7a4dec1
Several Minor Updates on Examples (#427) 2023-02-01 19:20:34 -05:00
jquesada2016
1f6a326268
fixes cx not found on components marked with #[component(transparent)] (#423) 2023-02-01 11:17:20 -05:00
Greg Johnston
0efc39db8b
fix: Make all fragment rendering lazy (closes #299 and #421) (#425)
Make all fragment rendering lazy (closes #299 and #421)
2023-02-01 06:47:12 -05:00
Greg Johnston
cbf2f73e95
fix: HTML entity issues in axum_errors example (#424) 2023-01-31 23:39:31 -05:00
Greg Johnston
45eee12b18
Fix issues with attribute names in SSR (#418) 2023-01-31 11:57:05 -05:00
Greg Johnston
42e50327a6
Fix <option> and <use> top-level types in SSR (#416) 2023-01-30 20:10:07 -05:00
martin frances
465cbc36be
Minor: Bump typed-builder from 0.11 to 0.12. (#409) 2023-01-30 19:17:09 -05:00
Greg Johnston
ce6a093f9f oops 2023-01-29 17:11:02 -05:00
Greg Johnston
f07fa0e0be escape attributes 2023-01-29 16:55:28 -05:00
Greg Johnston
43ad91512a Fixes boolean attributes in SSR (closes #405) 2023-01-29 16:29:06 -05:00
Greg Johnston
116d23f2c3 Revert "fix: Fixes boolean attributes in HTML fast-path (closes issue #405)"
This reverts commit 2ecb345a79.
2023-01-29 16:27:28 -05:00
Greg Johnston
2ecb345a79 fix: Fixes boolean attributes in HTML fast-path (closes issue #405) 2023-01-29 16:02:47 -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
Greg Johnston
62812af5b2
Allow unused cx in server fn arguments (#385)
* Suppress warning for unused `cx` in server function arguments
2023-01-26 21:43:39 -05:00
Greg Johnston
a2ea1d8483
Reorganize snake-case #[component] docs and please clippy (#362) 2023-01-23 11:14:04 -05:00
Greg Johnston
fd6e63796e
Merge pull request #354 from jclmnop/feat/allow-snake-case-components
Allow snake case components
2023-01-22 16:46:47 -05:00
jclmnop
39cddfc82d update docs for component macro 2023-01-22 17:13:24 +00:00
jclmnop
d1333a3402 modify component attribute macro to allow snake_case fn names 2023-01-22 14:04:36 +00:00
Greg Johnston
a75abb9e04
Merge pull request #351 from leptos-rs/view-styling
Add support for `class = ...`, in `view` macro to support scoped styling
2023-01-21 12:56:21 -05:00
Greg Johnston
bf1ef1b7c2 Fix missing {} after cleaning up unnecessary formats 2023-01-21 11:42:52 -05:00
Greg Johnston
a22a693de7 Add support for class = ..., in view macro to support scoped styling solutions 2023-01-21 09:52:05 -05:00
Greg Johnston
ed6d6ae4b0 Add node_ref to docs 2023-01-21 07:26:06 -05:00
Greg Johnston
89ee88d75e Add SVG <script>, <style>, and <title> to set of ambiguous elements — closes #349 2023-01-21 07:23:32 -05:00
Greg Johnston
c1c74ead0f Get view-macro SSR optimization working 2023-01-20 09:47:16 -05:00
Greg Johnston
ebe5bf4600
Merge pull request #330 from martinfrances107/typed_builder
typed-builder inconsistent version.
2023-01-17 13:53:58 -05:00
Martin
586e9be99a Minor - type-builder version is inconsistent. 2023-01-17 17:23:05 +00: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
e17afd4559 Handle custom elements correctly 2023-01-14 14:09:23 -05:00
Greg Johnston
7ff044cef6
Merge pull request #308 from Indrazar/main
Update Generated API URL on Windows Attempt #2
2023-01-13 07:30:03 -05:00
hakesson
884297706a Search https://github.com/gbj/ and replace with https://github.com/leptos-rs/ 2023-01-13 09:03:11 +01:00
indrazar
2afe8e202a update url for Windows directories attempt 2 2023-01-12 22:07:55 -05: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
b8cafeb650
Merge pull request #289 from gbj/forbid-unsafe
Forbid `unsafe` code in all packages
2023-01-09 20:45:28 -05:00
Greg Johnston
c050456a47 Use a runtime warning about SVG <a/> instead of a macro warning on all ambiguous tags 2023-01-09 20:31:51 -05:00
Greg Johnston
4df3687463 Forbid unsafe code in all packages 2023-01-09 19:48:51 -05:00
Martin
3d25e86c23 Policy change: Workflow now enforce "cargo fmt". 2023-01-09 12:44:30 +00:00
Dylan Maloy
35601d8284 update abort_opt_message 2023-01-08 16:47:02 -05:00
Dylan Maloy
49bc7d2a27 init 2023-01-08 16:35:43 -05:00
Greg Johnston
aa7c7367dc
Merge pull request #277 from martinfrances107/clippy_hackernews
examples/hackernews - Cargo clippy fixes.
2023-01-08 14:10:57 -05:00
Greg Johnston
70808c5262
Merge pull request #272 from DPM97/component_lifetimes
fix component macro lifetime parsing
2023-01-08 14:07:00 -05:00
Martin
ef52a01838 examples/hackernews - Cargo clippy fixes. 2023-01-08 13:33:53 +00:00
Martin
8875939a27 Minor: Removed Clippy::needless_borrrow issues. 2023-01-08 10:42:25 +00:00
Dylan Maloy
1f29d29947 init 2023-01-08 00:15:00 -05:00
Greg Johnston
343e8c8abe Update macro docs to reflect newly-available class syntax. 2023-01-07 22:02:23 -05:00
Greg Johnston
656d20cb65 Don't panic in proc macro, use proc_macro_error instead. 2023-01-07 21:32:52 -05:00
Greg Johnston
a0a66b75dd Allow complex class names with ("class-[name]-42", value) syntax. 2023-01-07 21:29:26 -05:00
Greg Johnston
f2842cf14e children should take FnOnce(Scope) -> Fragment, to ease need of cloning etc. 2023-01-07 17:04:58 -05:00
Greg Johnston
7f47134058
Merge pull request #265 from martinfrances107/needless_borrowed_reference
Clippy: Minor needless_borrowed_reference.
2023-01-07 14:21:58 -05:00
Greg Johnston
af7b93fa1e
Merge pull request #128 from akesson/workspace-features
Workspace features
2023-01-07 14:19:56 -05:00
Martin
916f30a07b Clippy: Minor needless_borrowed_reference. 2023-01-07 18:28:42 +00: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
Martin
7acc309f66 Minor: Clippy format!() all variables now inlined. 2023-01-07 15:46:47 +00:00
Greg Johnston
64bf01c59e Reduce CI load with skipped feature sets 2023-01-05 11:08:07 -05:00
Greg Johnston
e8c1bf5055 #[prop] docs 2023-01-04 11:10:03 -05:00
Greg Johnston
af1a4492e8 leptos_macro improvements to class:, prop:, on:, :undelegated, and events 2023-01-04 00:25:53 -05:00
Greg Johnston
6b1b4463a0 Fix server docs 2023-01-03 23:22:06 -05:00
Greg Johnston
0da88f39cd Improve docs and debugging tools for server functions (closes #225) 2023-01-03 20:05:47 -05:00
Greg Johnston
8d14972808 Merge branch 'main' of https://github.com/gbj/leptos 2023-01-03 15:52:33 -05:00
Greg Johnston
441eb1697e Reduce CI load by omitting tracing feature from CI testing 2023-01-03 15:52:29 -05:00
Greg Johnston
78d965cc91
Merge pull request #220 from jquesada2016/view_on_undelegated
added on:eventname:undelegated support
2023-01-03 13:07:22 -05:00
Jose Quesada
28dce925b0 relaxed parse_event to be undelegated only when :undelegated appears at the end of the event 2023-01-03 08:54:52 -06:00
Greg Johnston
755ceb7d75 0.1.0-beta 2023-01-02 16:35:00 -05:00
Greg Johnston
edbd3612b3 stable for leptos_macro 2023-01-02 13:04:56 -05:00
Jose Quesada
1344f113c5 added on:eventname:undelegated support 2023-01-02 10:36:08 -06:00
Greg Johnston
d5f8d3a9b7
Merge pull request #206 from jquesada2016/199
fixed components only rendering `<() />` on release
2022-12-31 09:22:09 -05:00
Jose Quesada
2a1b531bd2 fixed components only rendering <() /> on release 2022-12-31 08:08:14 -06:00
Ramon Klass
c3a7ef0357 ambiguous tags inherit the type of their parent 2022-12-30 23:38:51 +01:00
Greg Johnston
4b1fce4c9c Revert "Merge branch 'main' into pr/119"
This reverts commit 63f680f37d, reversing
changes made to 50ba796f49.
2022-12-28 15:06:46 -05:00
Greg Johnston
63f680f37d Merge branch 'main' into pr/119 2022-12-28 14:21:54 -05:00
Jose Quesada
4340fbfc78 Merge branch 'leptos_dom_v2' of https://github.com/jquesada2016/leptos into leptos_dom_v2 2022-12-28 10:52:06 -06:00