fastlifeweb 0.28.3__py3-none-any.whl → 0.28.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
CHANGELOG.md CHANGED
@@ -1,14 +1,7 @@
1
- ## 0.28.3 - Released on 2025-09-20
2
- * Install jinjax to build the doc.
1
+ ## 0.28.5 - Released on 2025-10-06
2
+ * Fix A hx-push-url fox xcomponent
3
3
 
4
- ## 0.28.2 - Released on 2025-09-20
5
- * Fix github action to build the doc.
6
-
7
- ## 0.28.1 - Released on 2025-09-20
8
- * Fix jinjax dependencies.
9
- * Fix documentation generation.
10
-
11
- ## 0.28.0 - Released on 2025-09-19
4
+ ## 0.28.4 - Released on 2025-09-20
12
5
  * Introduce new template engine xcomponent that will replace jinjax.
13
6
  * At the moment, the template engine has to be installed as an extra
14
7
  dependencie, none of them will be installed by default.
@@ -9,3 +9,8 @@ catalog = Catalog()
9
9
  @catalog.function(name="len")
10
10
  def length(iterable: Any) -> int:
11
11
  return len(iterable)
12
+
13
+
14
+ @catalog.function
15
+ def isbool(i: Any) -> bool:
16
+ return isinstance(i, bool)
@@ -170,7 +170,12 @@ def Button(
170
170
  hx-put={hx_put}
171
171
  hx-patch={hx_patch}
172
172
  hx-delete={hx_delete}
173
- hx-push-url={hx_push_url}
173
+ hx-push-url={
174
+ if isbool(hx_push_url) {
175
+ if hx_push_url { "true" } else { false }
176
+ }
177
+ else { hx_push_url }
178
+ }
174
179
  hx-params={hx_params}
175
180
  aria-label={aria_label}
176
181
  class={
@@ -17,7 +17,7 @@ def A(
17
17
  hx_target: str = "#maincontent",
18
18
  hx_select: str | None = None,
19
19
  hx_swap: str = "innerHTML show:body:top",
20
- hx_push_url: bool = True,
20
+ hx_push_url: bool | str = True,
21
21
  hx_get: str | None = None,
22
22
  hx_disable: bool | None = None,
23
23
  hx_disabled_elt: str | None = None,
@@ -39,7 +39,6 @@ def A(
39
39
  :param hx_push_url: Replace the browser URL with the link.
40
40
  :param hx_get: Override the target link only for htmx request for component
41
41
  rendering. href will be used if None.
42
- :param disable_htmx: Do not add any `hx-*` attribute to the link.
43
42
  """
44
43
 
45
44
  return """
@@ -51,7 +50,12 @@ def A(
51
50
  hx-get={hx_get or href}
52
51
  hx-target={hx_target}
53
52
  hx-swap={hx_swap}
54
- hx-push-url={hx_push_url}
53
+ hx-push-url={
54
+ if isbool(hx_push_url) {
55
+ if hx_push_url { "true" } else { false }
56
+ }
57
+ else { hx_push_url }
58
+ }
55
59
  hx-select={hx_select}
56
60
  class={class_ or globals.A_CLASS}
57
61
  >
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastlifeweb
3
- Version: 0.28.3
3
+ Version: 0.28.5
4
4
  Summary: High-level web framework
5
5
  Author-Email: Guillaume Gauvrit <guillaume@gauvr.it>
6
6
  License: MIT
@@ -33,6 +33,7 @@ Provides-Extra: testing
33
33
  Requires-Dist: beautifulsoup4; extra == "testing"
34
34
  Provides-Extra: docs
35
35
  Requires-Dist: furo>=2024.5.6; extra == "docs"
36
+ Requires-Dist: heroicons<3,>=2.7.0; extra == "docs"
36
37
  Requires-Dist: jinjax<0.49,>=0.48; extra == "docs"
37
38
  Requires-Dist: linkify-it-py<3,>=2.0.3; extra == "docs"
38
39
  Requires-Dist: myst-parser<5,>=4.0.0; extra == "docs"
@@ -1,4 +1,4 @@
1
- CHANGELOG.md,sha256=GAldlJ5HmX_zxs62ofsXGqi2uqoAL45kqyXkce1pPqA,9669
1
+ CHANGELOG.md,sha256=WjcYI4GvAkxmoR9aGt-A3BgbtRNshq_vgxxxFhEg4ZQ,9498
2
2
  fastlife/__init__.py,sha256=XtGrcI5a3MPSl4vupeWT4ZijISiXtAhjcL6eRt9WpfE,2503
3
3
  fastlife/adapters/__init__.py,sha256=imPD1hImpgrYkvUJRhHA5kVyGAua7VbP2WGkhSWKJT8,93
4
4
  fastlife/adapters/fastapi/__init__.py,sha256=1goV1FGFP04TGyskJBLKZam4Gvt1yoAvLMNs4ekWSSQ,243
@@ -43,11 +43,11 @@ fastlife/adapters/jinjax/widgets/sequence.py,sha256=aL93-ytj6nlbT8vumt3br6Jq8D97
43
43
  fastlife/adapters/jinjax/widgets/text.py,sha256=XKpoLoBNsvQhHrezKCEcXlF9iQzuclXGaeFu6uq9_5A,3390
44
44
  fastlife/adapters/jinjax/widgets/union.py,sha256=tSbiylgBOcvQl3b3SVoXRsdpVqvxVpQAlLuMk1EjTTc,2630
45
45
  fastlife/adapters/xcomponent/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
46
- fastlife/adapters/xcomponent/catalog.py,sha256=i-_HUmAXgtDCl7uHB6EBGncAlt8qtiYEo_zCbeQsnZs,209
46
+ fastlife/adapters/xcomponent/catalog.py,sha256=iQ2UxqNgrMCl-0ookxPzmEhWOs34qYUeSMM95DQygNc,288
47
47
  fastlife/adapters/xcomponent/html/__init__.py,sha256=MliLg_8CfMP63GWnRWkia2J_xfBDY5Cr6qO5875IqCE,250
48
48
  fastlife/adapters/xcomponent/html/collapsible.py,sha256=9H8JvTHvg-oJGfmk327xp2MzGKDKQDo6ZbzhDQhBcTI,2191
49
- fastlife/adapters/xcomponent/html/form.py,sha256=TD_cvET1FYqEOJTCED0LMGm25CvZRr48w0_rvEa1oT0,11546
50
- fastlife/adapters/xcomponent/html/nav.py,sha256=k3IlsBPny7kMlgG0ZHx3I2KVQRQs2PW0OMZvqHcQXNo,1940
49
+ fastlife/adapters/xcomponent/html/form.py,sha256=XJazUC9mZttoLiTDASy9MVyFwx8RshB72f1ze1ZJAdA,11685
50
+ fastlife/adapters/xcomponent/html/nav.py,sha256=BU9vlXNRhqqb8vrw9YZTfSFbLTImb0lquPOaIxdt6IU,2035
51
51
  fastlife/adapters/xcomponent/html/table.py,sha256=f-Lir3XxOQUVlUWfSXlPoKwSZ3nROhDqcrEN_g0TMbA,2678
52
52
  fastlife/adapters/xcomponent/html/text.py,sha256=Qv1mJx1_xoAZpojiEDfKjrkOBHTa2dQo1J-l4Qpwe_E,699
53
53
  fastlife/adapters/xcomponent/html/title.py,sha256=2-n4cs37medT6ovrw1-pUlNRxE3SzZNaDFo0VB5t2OM,3564
@@ -1772,8 +1772,8 @@ fastlife/testing/session.py,sha256=LEFFbiR67_x_g-ioudkY0C7PycHdbDfaIaoo_G7GXQ8,2
1772
1772
  fastlife/testing/testclient.py,sha256=gqgHQalhrLLZ8eveN2HeuoG9ne8CwxCm-Ll4b7jo9Xo,7249
1773
1773
  fastlife/views/__init__.py,sha256=zG8gveL8e2zBdYx6_9jtZfpQ6qJT-MFnBY3xXkLwHZI,22
1774
1774
  fastlife/views/pydantic_form.py,sha256=9lcS14jxddIpoN_n4VqWwU8CKhKZ8AtoD3c1Pdc-Oe4,1651
1775
- fastlifeweb-0.28.3.dist-info/METADATA,sha256=xNTB4FQj6awXf_9bnmP5Z0RVC4rUU08HLVeeTHMLVsw,3927
1776
- fastlifeweb-0.28.3.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
1777
- fastlifeweb-0.28.3.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1778
- fastlifeweb-0.28.3.dist-info/licenses/LICENSE,sha256=JFWuiKYRXKKMEAsX0aZp3hBcju-HYflJ2rwJAGwbCJo,1080
1779
- fastlifeweb-0.28.3.dist-info/RECORD,,
1775
+ fastlifeweb-0.28.5.dist-info/METADATA,sha256=mqZXRDch2WH1b_AHIc-pZ6KhRYp1JuJxj5f6uerLzAU,3979
1776
+ fastlifeweb-0.28.5.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
1777
+ fastlifeweb-0.28.5.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1778
+ fastlifeweb-0.28.5.dist-info/licenses/LICENSE,sha256=JFWuiKYRXKKMEAsX0aZp3hBcju-HYflJ2rwJAGwbCJo,1080
1779
+ fastlifeweb-0.28.5.dist-info/RECORD,,