dars-framework 1.9.3__tar.gz → 1.9.6__tar.gz

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.
Files changed (185) hide show
  1. {dars_framework-1.9.3/dars_framework.egg-info → dars_framework-1.9.6}/PKG-INFO +64 -36
  2. {dars_framework-1.9.3 → dars_framework-1.9.6}/README.md +63 -35
  3. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/all.py +5 -2
  4. dars_framework-1.9.6/dars/cli/generate.py +288 -0
  5. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/main.py +132 -30
  6. dars_framework-1.9.6/dars/cli/prompts.py +68 -0
  7. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/button.py +1 -1
  8. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/markdown.py +2 -0
  9. dars_framework-1.9.6/dars/docs/index.md +5 -0
  10. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/exporters/web/html_css_js.py +219 -14
  11. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/scripts/animations.py +16 -4
  12. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/scripts/dscript.py +0 -8
  13. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/scripts/script.py +3 -0
  14. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/scripts/utils_ds.py +434 -1
  15. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/version.py +2 -2
  16. {dars_framework-1.9.3 → dars_framework-1.9.6/dars_framework.egg-info}/PKG-INFO +64 -36
  17. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars_framework.egg-info/SOURCES.txt +2 -20
  18. {dars_framework-1.9.3 → dars_framework-1.9.6}/pyproject.toml +1 -1
  19. dars_framework-1.9.3/dars/docs/INSTALL.md +0 -164
  20. dars_framework-1.9.3/dars/docs/KeyEvents.md +0 -492
  21. dars_framework-1.9.3/dars/docs/animations.md +0 -199
  22. dars_framework-1.9.3/dars/docs/app.md +0 -344
  23. dars_framework-1.9.3/dars/docs/backend_api.md +0 -363
  24. dars_framework-1.9.3/dars/docs/cli.md +0 -130
  25. dars_framework-1.9.3/dars/docs/components.md +0 -405
  26. dars_framework-1.9.3/dars/docs/config.md +0 -109
  27. dars_framework-1.9.3/dars/docs/custom_components.md +0 -288
  28. dars_framework-1.9.3/dars/docs/env.md +0 -58
  29. dars_framework-1.9.3/dars/docs/events.md +0 -114
  30. dars_framework-1.9.3/dars/docs/exporters.md +0 -322
  31. dars_framework-1.9.3/dars/docs/getting_started.md +0 -96
  32. dars_framework-1.9.3/dars/docs/hooks.md +0 -1335
  33. dars_framework-1.9.3/dars/docs/index.md +0 -52
  34. dars_framework-1.9.3/dars/docs/operations.md +0 -471
  35. dars_framework-1.9.3/dars/docs/routing.md +0 -337
  36. dars_framework-1.9.3/dars/docs/scripts.md +0 -155
  37. dars_framework-1.9.3/dars/docs/ssr.md +0 -448
  38. dars_framework-1.9.3/dars/docs/state_management.md +0 -334
  39. dars_framework-1.9.3/dars/docs/styling.md +0 -499
  40. {dars_framework-1.9.3 → dars_framework-1.9.6}/Dars-logo.png +0 -0
  41. {dars_framework-1.9.3 → dars_framework-1.9.6}/LICENSE +0 -0
  42. {dars_framework-1.9.3 → dars_framework-1.9.6}/MANIFEST.in +0 -0
  43. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/__init__.py +0 -0
  44. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/actionProtocol.py +0 -0
  45. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/backend/__init__.py +0 -0
  46. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/backend/components.py +0 -0
  47. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/backend/data.py +0 -0
  48. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/backend/http.py +0 -0
  49. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/backend/json_utils.py +0 -0
  50. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/backend/route_loader.py +0 -0
  51. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/backend/ssr.py +0 -0
  52. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/__init__.py +0 -0
  53. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/doctor/__init__.py +0 -0
  54. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/doctor/detect.py +0 -0
  55. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/doctor/doctor.py +0 -0
  56. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/doctor/installers.py +0 -0
  57. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/doctor/persist.py +0 -0
  58. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/doctor/preflight.py +0 -0
  59. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/doctor/ui.py +0 -0
  60. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/dpm.py +0 -0
  61. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/hot_reload.py +0 -0
  62. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/preview.py +0 -0
  63. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/cli/translations.py +0 -0
  64. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/__init__.py +0 -0
  65. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/__init__.py +0 -0
  66. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/accordion.py +0 -0
  67. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/card.py +0 -0
  68. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/file_upload.py +0 -0
  69. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/head.py +0 -0
  70. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/modal.py +0 -0
  71. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/navbar.py +0 -0
  72. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/outlet.py +0 -0
  73. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/table.py +0 -0
  74. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/advanced/tabs.py +0 -0
  75. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/__init__.py +0 -0
  76. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/audio.py +0 -0
  77. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/checkbox.py +0 -0
  78. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/container.py +0 -0
  79. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/datepicker.py +0 -0
  80. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/image.py +0 -0
  81. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/input.py +0 -0
  82. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/link.py +0 -0
  83. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/page.py +0 -0
  84. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/progressbar.py +0 -0
  85. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/radiobutton.py +0 -0
  86. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/section.py +0 -0
  87. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/select.py +0 -0
  88. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/slider.py +0 -0
  89. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/spinner.py +0 -0
  90. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/text.py +0 -0
  91. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/textarea.py +0 -0
  92. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/tooltip.py +0 -0
  93. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/basic/video.py +0 -0
  94. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/layout/__init__.py +0 -0
  95. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/layout/anchor.py +0 -0
  96. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/layout/flex.py +0 -0
  97. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/layout/grid.py +0 -0
  98. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/visualization/__init__.py +0 -0
  99. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/visualization/chart.py +0 -0
  100. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/components/visualization/table.py +0 -0
  101. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/config.py +0 -0
  102. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/__init__.py +0 -0
  103. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/app.py +0 -0
  104. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/component.py +0 -0
  105. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/events.py +0 -0
  106. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/js_bridge.py +0 -0
  107. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/properties.py +0 -0
  108. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/route_types.py +0 -0
  109. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/routing.py +0 -0
  110. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/state.py +0 -0
  111. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/state_v2.py +0 -0
  112. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/core/utilities.py +0 -0
  113. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/dars_tests/apps_test/health_check.py +0 -0
  114. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/dars_tests/run_tests.py +0 -0
  115. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/dars_tests/tests/test_advanced_components.py +0 -0
  116. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/dars_tests/tests/test_basic_components.py +0 -0
  117. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/dars_tests/tests/test_core_and_cli.py +0 -0
  118. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/dars_tests/tests/test_layout_components.py +0 -0
  119. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/dars_tests/tests/test_version_check.py +0 -0
  120. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/desktop/__init__.py +0 -0
  121. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/desktop/api.py +0 -0
  122. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/desktop/js_generator.py +0 -0
  123. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/docs/__init__.py +0 -0
  124. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/env.py +0 -0
  125. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/exporters/__init__.py +0 -0
  126. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/exporters/base.py +0 -0
  127. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/exporters/desktop/electron.py +0 -0
  128. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/exporters/web/__init__.py +0 -0
  129. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/exporters/web/vdom.py +0 -0
  130. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/__init__.py +0 -0
  131. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/form_helpers.py +0 -0
  132. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/set_vref.py +0 -0
  133. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/update_vref.py +0 -0
  134. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/use_dynamic.py +0 -0
  135. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/use_value.py +0 -0
  136. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/use_vref.py +0 -0
  137. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/use_watch.py +0 -0
  138. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/hooks/value_helpers.py +0 -0
  139. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/scripts/__init__.py +0 -0
  140. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/scripts/keycode.py +0 -0
  141. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/security.py +0 -0
  142. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/__init__.py +0 -0
  143. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/icon.png +0 -0
  144. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/backend/icons/icon.png +0 -0
  145. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/backend/main.js +0 -0
  146. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/backend/package.json +0 -0
  147. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/backend/preload.js +0 -0
  148. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/dars.config.json +0 -0
  149. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/icons/icon.png +0 -0
  150. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/main.py +0 -0
  151. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/public/electron-icon.png +0 -0
  152. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/desktop/template/public/icon.png +0 -0
  153. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/README.md +0 -0
  154. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/CustomComp/main.py +0 -0
  155. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/Modal_Demo/advanced_modal_demo.py +0 -0
  156. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/StateV2/README.md +0 -0
  157. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/StateV2/animation_component.py +0 -0
  158. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/StateV2/counter_component.py +0 -0
  159. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/StateV2/hero_component.py +0 -0
  160. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/StateV2/main.py +0 -0
  161. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/StateV2/styles.css +0 -0
  162. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/StateV2/timer_component.py +0 -0
  163. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/VariousComponents/all_components_demo.py +0 -0
  164. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/__init__.py +0 -0
  165. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/dState/state_mods_demo.py +0 -0
  166. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/hooks/useDynamic.py +0 -0
  167. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/hooks/useValue.py +0 -0
  168. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/advanced/hooks/useWatch.py +0 -0
  169. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/HelloWorld/hello_world.py +0 -0
  170. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/Layouts/flex_layout_responsive.py +0 -0
  171. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/Layouts/grid_layout_responsive.py +0 -0
  172. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/Layouts/layout_multipage_demo.py +0 -0
  173. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/PWA/icon-192x192.png +0 -0
  174. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/PWA/icon-512x512.png +0 -0
  175. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/PWA/pwa_custom_icons.py +0 -0
  176. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/basic/__init__.py +0 -0
  177. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/markdown/MarkdownTemplate/README.md +0 -0
  178. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/markdown/MarkdownTemplate/markdown_template.py +0 -0
  179. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/markdown/MarkdownTemplate/other_docs.md +0 -0
  180. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars/templates/examples/markdown/__init__.py +0 -0
  181. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars_framework.egg-info/dependency_links.txt +0 -0
  182. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars_framework.egg-info/entry_points.txt +0 -0
  183. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars_framework.egg-info/requires.txt +0 -0
  184. {dars_framework-1.9.3 → dars_framework-1.9.6}/dars_framework.egg-info/top_level.txt +0 -0
  185. {dars_framework-1.9.3 → dars_framework-1.9.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dars-framework
3
- Version: 1.9.3
3
+ Version: 1.9.6
4
4
  Summary: Dars is a Full-Stack multiplatform Python UI framework for building modern, interactive web and desktop apps with Python code. Seamlessly integrated with FastAPI, it allows you to build complete applications with Server-Side Rendering (SSR) and reactive SPA capabilities also classic multipage html and desktop apps in a single codebase.
5
5
  Author-email: ztamdev <ztadevs@gmail.com>
6
6
  Maintainer-email: ztamdev <ztadevs@gmail.com>
@@ -52,7 +52,6 @@ Dynamic: license-file
52
52
  <a href="https://deepwiki.com/ZtaMDev/Dars-Framework"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
53
53
  </p>
54
54
 
55
-
56
55
  <p align="center">
57
56
  <em>Dars is a Full-Stack multiplatform Python UI framework for building modern, interactive web and desktop apps with Python code. Seamlessly integrated with FastAPI, it allows you to build complete applications with Server-Side Rendering (SSR) and reactive SPA capabilities also classic multipage html and desktop apps in a single codebase.</em>
58
57
 
@@ -60,8 +59,9 @@ Dynamic: license-file
60
59
 
61
60
  <div align="center">
62
61
 
63
- Official [Website](https://ztamdev.github.io/Dars-Framework/) |
64
- Documentation [Docs](https://ztamdev.github.io/Dars-Framework/docs.html) |
62
+ Official [Website](https://ztamdev.github.io/Dars-Framework/) |
63
+ Documentation [Docs](https://ztamdev.github.io/Dars-Framework/docs.html) |
64
+ Official [Roadmap](https://ztamdev.github.io/Dars-Framework/roadmap.html) |
65
65
  Extension for VSCode [here](https://marketplace.visualstudio.com/items?itemName=ZtaMDev.dars-framework) and OpenVSX version [here](https://open-vsx.org/extension/ztamdev/dars-framework)
66
66
 
67
67
  </div>
@@ -73,6 +73,7 @@ pip install dars-framework
73
73
  Try dars without installing nothing just visit the [Dars Playground](https://dars-playground.vercel.app/)
74
74
 
75
75
  ## How It Works
76
+
76
77
  - Build your UI using Python classes and components (like Text, Button, Container, Page, etc).
77
78
  - Preview instantly with hot-reload using `app.rTimeCompile()`.
78
79
  - Export your app to static/dynamic/ssr web files with a single CLI command.
@@ -81,6 +82,7 @@ Try dars without installing nothing just visit the [Dars Playground](https://dar
81
82
  - For more information visit the [Documentation](https://ztamdev.github.io/Dars-Framework/docs.html)
82
83
 
83
84
  ## Quick Example: Your First App
85
+
84
86
  ```python
85
87
  from dars.all import *
86
88
 
@@ -91,7 +93,7 @@ state = State("app", title_val="Simple Counter", count=0)
91
93
 
92
94
  # 2. Define Route
93
95
  @route("/")
94
- def index():
96
+ def index():
95
97
  return Page(
96
98
  # 3. Use useValue for app text
97
99
  Text(
@@ -131,7 +133,7 @@ def index():
131
133
  ),
132
134
  style="flex flex-col items-center justify-center h-[100vh] ffam-[Arial] bg-[#f0f2f5]",
133
135
 
134
- )
136
+ )
135
137
 
136
138
  # 8. Add page
137
139
  app.add_page("index", index(), title="index")
@@ -148,9 +150,11 @@ if __name__ == "__main__":
148
150
  Dars Framework features **powerful state management system**, designed for different use cases.
149
151
 
150
152
  ### State V2
153
+
151
154
  Modern, Pythonic state management for reactive updates. Best for counters, timers, and component interactions using hooks.
152
155
 
153
156
  **Hooks System:**
157
+
154
158
  - `useDynamic()`: Reactive state binding for automatic UI updates.
155
159
  - `useValue()`: Set initial values from state (non-reactive).
156
160
  - `useWatch()`: Monitor state changes and trigger side effects.
@@ -168,7 +172,7 @@ def index():
168
172
  return Page(
169
173
  # Bind to state with useDynamic
170
174
  Text(text=useDynamic("counter.count"), style={"font-size": "24px"}),
171
-
175
+
172
176
  # Update state on click
173
177
  Button("Increment", on_click=state.count.increment(1)),
174
178
  Button("Decrement", on_click=state.count.decrement(1)),
@@ -181,7 +185,7 @@ if __name__ == "__main__":
181
185
  app.rTimeCompile()
182
186
  ```
183
187
 
184
- **String ID Support:** `State()` can accept a string ID (e.g., `State("my-state", ...)`).
188
+ **String ID Support:** `State()` can accept a string ID (e.g., `State("my-state", ...)`).
185
189
 
186
190
  > [!WARNING]
187
191
  > **Important:** When using hooks, the State ID is used for binding. **Do not use an ID that belongs to another unrelated component**, as hooks use this ID as the State ID. Using a conflicting ID may cause unexpected behavior or state collisions.
@@ -215,6 +219,7 @@ button.on_click = sequence(
215
219
  ```
216
220
 
217
221
  **Available Animations:**
222
+
218
223
  - **Opacity:** `fadeIn`, `fadeOut`
219
224
  - **Movement:** `slideIn`, `slideOut` (up, down, left, right)
220
225
  - **Scaling:** `scaleIn`, `scaleOut`, `pulse`
@@ -257,7 +262,6 @@ button.on_click = sequence(
257
262
 
258
263
  ---
259
264
 
260
-
261
265
  ## Routing System (SPA & SSR)
262
266
 
263
267
  Dars Framework offers a flexible routing system that supports both Client-Side Routing (SPA) and Server-Side Rendering (SSR).
@@ -321,7 +325,7 @@ def dashboard():
321
325
  Link("Settings", href="/dashboard/settings"),
322
326
  Link("Profile", href="/dashboard/profile"),
323
327
  id="nav",
324
-
328
+
325
329
  ),
326
330
  Outlet(), # Child routes render here
327
331
  style={"padding": "20px"}
@@ -356,6 +360,7 @@ app.set_404_page(custom_404)
356
360
  ### Hot Reload for SPAs
357
361
 
358
362
  The development preview server includes intelligent hot reload:
363
+
359
364
  - Detects changes and reloads automatically
360
365
  - Stops polling after 10 errors to prevent browser lag
361
366
  - Clean console output without spam
@@ -458,10 +463,10 @@ callback=(
458
463
 
459
464
  ### Available HTTP Methods
460
465
 
461
- - **`get(id, url, **options)`** - GET request
462
- - **`post(id, url, body, **options)`** - POST request
463
- - **`put(id, url, body, **options)`** - PUT request
464
- - **`delete(id, url, **options)`** - DELETE request
466
+ - **`get(id, url, **options)`\*\* - GET request
467
+ - **`post(id, url, body, **options)`\*\* - POST request
468
+ - **`put(id, url, body, **options)`\*\* - PUT request
469
+ - **`delete(id, url, **options)`\*\* - DELETE request
465
470
 
466
471
  For complete documentation, see the [Backend API Guide](https://ztamdev.github.io/Dars-Framework/docs.html#backend-http-utilities).
467
472
 
@@ -469,23 +474,26 @@ For complete documentation, see the [Backend API Guide](https://ztamdev.github.i
469
474
 
470
475
  ## CLI Usage
471
476
 
472
- | Command | What it does |
473
- |-------------------------------------------|----------------------------------------------|
474
- | `dars export my_app.py --format html` | Export app to HTML/CSS/JS in `./my_app_web` |
475
- | `dars init --type desktop` | Scaffold desktop-capable project (BETA) |
476
- | `dars init --type ssr` | Scaffold full-stack SSR project (SSR + API) |
477
- | `dars build` (desktop config) | Build desktop app artifacts (BETA) |
478
- | `dars preview ./my_app_web` | Preview exported app locally |
479
- | `dars init my_project` | Create a new Dars project (also creates dars.config.json) |
480
- | `dars init --update` | Create/Update dars.config.json in current dir |
481
- | `dars build` | Build using dars.config.json (entry/outdir/format) |
482
- | `dars config validate` | Validate dars.config.json and print report |
483
- | `dars info my_app.py` | Show info about your app |
484
- | `dars formats` | List supported export formats |
485
- | `dars dev` | Run the configured entry file with hot preview (app.rTimeCompile) |
486
- | `dars dev --port 9000` | Run dev server on a custom port (overrides config) |
487
- | `dars dev --backend` | Run only the configured backendEntry (FastAPI/SSR backend) |
488
- | `dars --help` | Show help and all CLI options |
477
+ | Command | What it does |
478
+ | ------------------------------------- | ----------------------------------------------------------------- |
479
+ | `dars export my_app.py --format html` | Export app to HTML/CSS/JS in `./my_app_web` |
480
+ | `dars init --type desktop` | Scaffold desktop-capable project (BETA) |
481
+ | `dars init --type ssr` | Scaffold full-stack SSR project (SSR + API) |
482
+ | `dars build` (desktop config) | Build desktop app artifacts (BETA) |
483
+ | `dars preview` | Preview exported app (auto-detects output) |
484
+ | `dars preview --port 9000` | Preview on a custom port |
485
+ | `dars init my_project` | Create a new Dars project (also creates dars.config.json) |
486
+ | `dars init --update` | Create/Update dars.config.json in current dir |
487
+ | `dars build` | Build using dars.config.json (entry/outdir/format) |
488
+ | `dars config validate` | Validate dars.config.json and print report |
489
+ | `dars info my_app.py` | Show info about your app |
490
+ | `dars formats` | List supported export formats |
491
+ | `dars dev` | Run the configured entry file with hot preview (app.rTimeCompile) |
492
+ | `dars dev --port 9000` | Run dev server on a custom port (overrides config) |
493
+ | `dars dev --backend` | Run only the configured backendEntry (FastAPI/SSR backend) |
494
+ | `dars generate component <name>` | Scaffold a new FunctionComponent |
495
+ | `dars generate page <name>` | Scaffold a new page (static or SPA) |
496
+ | `dars --help` | Show help and all CLI options |
489
497
 
490
498
  Tip: use `dars doctor` to review optional tooling that can enhance bundling/minification.
491
499
 
@@ -496,6 +504,22 @@ Tip: use `dars doctor` to review optional tooling that can enhance bundling/mini
496
504
  - Build with `dars build` to produce desktop artifacts under `dist/`.
497
505
  - This feature is in BETA: usable for testing, not yet recommended for production.
498
506
 
507
+ ### Code Generation
508
+
509
+ Scaffold new components and pages instantly with automatic project integration.
510
+
511
+ ```bash
512
+ # Generate a new FunctionComponent
513
+ dars generate component MyComponent
514
+
515
+ # Generate a new Page (Static, SPA or SSR)
516
+ dars generate page About --page-type spa
517
+ dars generate page Dashboard --page-type ssr
518
+
519
+ # Scaffold and auto-inject into your main.py file
520
+ dars generate page Contact --yes
521
+ ```
522
+
499
523
  ---
500
524
 
501
525
  - Visit dars [official website](https://ztamdev.github.io/Dars-Framework/)
@@ -525,13 +549,17 @@ python my_app.py --port 8088
525
549
 
526
550
  ---
527
551
 
528
- You can also use the CLI preview command on an exported app:
552
+ You can also use the CLI preview command on an exported app. Starting from v1.9.6, the path is optional and will be automatically detected from your `dars.config.json` (defaults to `./dist`):
529
553
 
530
554
  ```bash
531
- dars preview ./my_exported_app
555
+ # Auto-detects output directory and port from config
556
+ dars preview
557
+
558
+ # Or specify a custom path and port
559
+ dars preview ./my_exported_app -p 8080
532
560
  ```
533
561
 
534
- This will start a local server at http://localhost:8000 to view your exported app in the browser.
562
+ This will start a local server at the configured port (defaults to http://localhost:8000) to view your exported app in the browser.
535
563
 
536
564
  ---
537
565
 
@@ -570,8 +598,8 @@ Example default:
570
598
  - `viteMinify`: Toggle the Vite/esbuild minifier for JS/CSS. Default `true`.
571
599
  - `utility_styles`: Dictionary defining custom utility classes. Keys are class names, values are lists of utility strings or raw CSS properties.
572
600
  - `markdownHighlight`: Auto-inject a client-side syntax highlighter for fenced code blocks in Markdown. Default `true`.
573
- - `backendEntry`: Python import path for your SSR/backend app (e.g. `"backend.api:app"`). Required when your app uses `RouteType.SSR` routes. Used by `dars dev --backend`.
574
- - `port`: The port for the development preview server. Default `8000`.
601
+ - `backendEntry`: Python import path for your SSR/backend app (e.g. `"backend.api:app"`). Required when your app uses `RouteType.SSR` routes. Used by `dars dev --backend`.
602
+ - `port`: The port for the development preview server. Default `8000`. This port is used by `dars dev`, `python app.py` (rTimeCompile), and `dars preview`.
575
603
 
576
604
  Validate your config:
577
605
 
@@ -11,7 +11,6 @@
11
11
  <a href="https://deepwiki.com/ZtaMDev/Dars-Framework"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
12
12
  </p>
13
13
 
14
-
15
14
  <p align="center">
16
15
  <em>Dars is a Full-Stack multiplatform Python UI framework for building modern, interactive web and desktop apps with Python code. Seamlessly integrated with FastAPI, it allows you to build complete applications with Server-Side Rendering (SSR) and reactive SPA capabilities also classic multipage html and desktop apps in a single codebase.</em>
17
16
 
@@ -19,8 +18,9 @@
19
18
 
20
19
  <div align="center">
21
20
 
22
- Official [Website](https://ztamdev.github.io/Dars-Framework/) |
23
- Documentation [Docs](https://ztamdev.github.io/Dars-Framework/docs.html) |
21
+ Official [Website](https://ztamdev.github.io/Dars-Framework/) |
22
+ Documentation [Docs](https://ztamdev.github.io/Dars-Framework/docs.html) |
23
+ Official [Roadmap](https://ztamdev.github.io/Dars-Framework/roadmap.html) |
24
24
  Extension for VSCode [here](https://marketplace.visualstudio.com/items?itemName=ZtaMDev.dars-framework) and OpenVSX version [here](https://open-vsx.org/extension/ztamdev/dars-framework)
25
25
 
26
26
  </div>
@@ -32,6 +32,7 @@ pip install dars-framework
32
32
  Try dars without installing nothing just visit the [Dars Playground](https://dars-playground.vercel.app/)
33
33
 
34
34
  ## How It Works
35
+
35
36
  - Build your UI using Python classes and components (like Text, Button, Container, Page, etc).
36
37
  - Preview instantly with hot-reload using `app.rTimeCompile()`.
37
38
  - Export your app to static/dynamic/ssr web files with a single CLI command.
@@ -40,6 +41,7 @@ Try dars without installing nothing just visit the [Dars Playground](https://dar
40
41
  - For more information visit the [Documentation](https://ztamdev.github.io/Dars-Framework/docs.html)
41
42
 
42
43
  ## Quick Example: Your First App
44
+
43
45
  ```python
44
46
  from dars.all import *
45
47
 
@@ -50,7 +52,7 @@ state = State("app", title_val="Simple Counter", count=0)
50
52
 
51
53
  # 2. Define Route
52
54
  @route("/")
53
- def index():
55
+ def index():
54
56
  return Page(
55
57
  # 3. Use useValue for app text
56
58
  Text(
@@ -90,7 +92,7 @@ def index():
90
92
  ),
91
93
  style="flex flex-col items-center justify-center h-[100vh] ffam-[Arial] bg-[#f0f2f5]",
92
94
 
93
- )
95
+ )
94
96
 
95
97
  # 8. Add page
96
98
  app.add_page("index", index(), title="index")
@@ -107,9 +109,11 @@ if __name__ == "__main__":
107
109
  Dars Framework features **powerful state management system**, designed for different use cases.
108
110
 
109
111
  ### State V2
112
+
110
113
  Modern, Pythonic state management for reactive updates. Best for counters, timers, and component interactions using hooks.
111
114
 
112
115
  **Hooks System:**
116
+
113
117
  - `useDynamic()`: Reactive state binding for automatic UI updates.
114
118
  - `useValue()`: Set initial values from state (non-reactive).
115
119
  - `useWatch()`: Monitor state changes and trigger side effects.
@@ -127,7 +131,7 @@ def index():
127
131
  return Page(
128
132
  # Bind to state with useDynamic
129
133
  Text(text=useDynamic("counter.count"), style={"font-size": "24px"}),
130
-
134
+
131
135
  # Update state on click
132
136
  Button("Increment", on_click=state.count.increment(1)),
133
137
  Button("Decrement", on_click=state.count.decrement(1)),
@@ -140,7 +144,7 @@ if __name__ == "__main__":
140
144
  app.rTimeCompile()
141
145
  ```
142
146
 
143
- **String ID Support:** `State()` can accept a string ID (e.g., `State("my-state", ...)`).
147
+ **String ID Support:** `State()` can accept a string ID (e.g., `State("my-state", ...)`).
144
148
 
145
149
  > [!WARNING]
146
150
  > **Important:** When using hooks, the State ID is used for binding. **Do not use an ID that belongs to another unrelated component**, as hooks use this ID as the State ID. Using a conflicting ID may cause unexpected behavior or state collisions.
@@ -174,6 +178,7 @@ button.on_click = sequence(
174
178
  ```
175
179
 
176
180
  **Available Animations:**
181
+
177
182
  - **Opacity:** `fadeIn`, `fadeOut`
178
183
  - **Movement:** `slideIn`, `slideOut` (up, down, left, right)
179
184
  - **Scaling:** `scaleIn`, `scaleOut`, `pulse`
@@ -216,7 +221,6 @@ button.on_click = sequence(
216
221
 
217
222
  ---
218
223
 
219
-
220
224
  ## Routing System (SPA & SSR)
221
225
 
222
226
  Dars Framework offers a flexible routing system that supports both Client-Side Routing (SPA) and Server-Side Rendering (SSR).
@@ -280,7 +284,7 @@ def dashboard():
280
284
  Link("Settings", href="/dashboard/settings"),
281
285
  Link("Profile", href="/dashboard/profile"),
282
286
  id="nav",
283
-
287
+
284
288
  ),
285
289
  Outlet(), # Child routes render here
286
290
  style={"padding": "20px"}
@@ -315,6 +319,7 @@ app.set_404_page(custom_404)
315
319
  ### Hot Reload for SPAs
316
320
 
317
321
  The development preview server includes intelligent hot reload:
322
+
318
323
  - Detects changes and reloads automatically
319
324
  - Stops polling after 10 errors to prevent browser lag
320
325
  - Clean console output without spam
@@ -417,10 +422,10 @@ callback=(
417
422
 
418
423
  ### Available HTTP Methods
419
424
 
420
- - **`get(id, url, **options)`** - GET request
421
- - **`post(id, url, body, **options)`** - POST request
422
- - **`put(id, url, body, **options)`** - PUT request
423
- - **`delete(id, url, **options)`** - DELETE request
425
+ - **`get(id, url, **options)`\*\* - GET request
426
+ - **`post(id, url, body, **options)`\*\* - POST request
427
+ - **`put(id, url, body, **options)`\*\* - PUT request
428
+ - **`delete(id, url, **options)`\*\* - DELETE request
424
429
 
425
430
  For complete documentation, see the [Backend API Guide](https://ztamdev.github.io/Dars-Framework/docs.html#backend-http-utilities).
426
431
 
@@ -428,23 +433,26 @@ For complete documentation, see the [Backend API Guide](https://ztamdev.github.i
428
433
 
429
434
  ## CLI Usage
430
435
 
431
- | Command | What it does |
432
- |-------------------------------------------|----------------------------------------------|
433
- | `dars export my_app.py --format html` | Export app to HTML/CSS/JS in `./my_app_web` |
434
- | `dars init --type desktop` | Scaffold desktop-capable project (BETA) |
435
- | `dars init --type ssr` | Scaffold full-stack SSR project (SSR + API) |
436
- | `dars build` (desktop config) | Build desktop app artifacts (BETA) |
437
- | `dars preview ./my_app_web` | Preview exported app locally |
438
- | `dars init my_project` | Create a new Dars project (also creates dars.config.json) |
439
- | `dars init --update` | Create/Update dars.config.json in current dir |
440
- | `dars build` | Build using dars.config.json (entry/outdir/format) |
441
- | `dars config validate` | Validate dars.config.json and print report |
442
- | `dars info my_app.py` | Show info about your app |
443
- | `dars formats` | List supported export formats |
444
- | `dars dev` | Run the configured entry file with hot preview (app.rTimeCompile) |
445
- | `dars dev --port 9000` | Run dev server on a custom port (overrides config) |
446
- | `dars dev --backend` | Run only the configured backendEntry (FastAPI/SSR backend) |
447
- | `dars --help` | Show help and all CLI options |
436
+ | Command | What it does |
437
+ | ------------------------------------- | ----------------------------------------------------------------- |
438
+ | `dars export my_app.py --format html` | Export app to HTML/CSS/JS in `./my_app_web` |
439
+ | `dars init --type desktop` | Scaffold desktop-capable project (BETA) |
440
+ | `dars init --type ssr` | Scaffold full-stack SSR project (SSR + API) |
441
+ | `dars build` (desktop config) | Build desktop app artifacts (BETA) |
442
+ | `dars preview` | Preview exported app (auto-detects output) |
443
+ | `dars preview --port 9000` | Preview on a custom port |
444
+ | `dars init my_project` | Create a new Dars project (also creates dars.config.json) |
445
+ | `dars init --update` | Create/Update dars.config.json in current dir |
446
+ | `dars build` | Build using dars.config.json (entry/outdir/format) |
447
+ | `dars config validate` | Validate dars.config.json and print report |
448
+ | `dars info my_app.py` | Show info about your app |
449
+ | `dars formats` | List supported export formats |
450
+ | `dars dev` | Run the configured entry file with hot preview (app.rTimeCompile) |
451
+ | `dars dev --port 9000` | Run dev server on a custom port (overrides config) |
452
+ | `dars dev --backend` | Run only the configured backendEntry (FastAPI/SSR backend) |
453
+ | `dars generate component <name>` | Scaffold a new FunctionComponent |
454
+ | `dars generate page <name>` | Scaffold a new page (static or SPA) |
455
+ | `dars --help` | Show help and all CLI options |
448
456
 
449
457
  Tip: use `dars doctor` to review optional tooling that can enhance bundling/minification.
450
458
 
@@ -455,6 +463,22 @@ Tip: use `dars doctor` to review optional tooling that can enhance bundling/mini
455
463
  - Build with `dars build` to produce desktop artifacts under `dist/`.
456
464
  - This feature is in BETA: usable for testing, not yet recommended for production.
457
465
 
466
+ ### Code Generation
467
+
468
+ Scaffold new components and pages instantly with automatic project integration.
469
+
470
+ ```bash
471
+ # Generate a new FunctionComponent
472
+ dars generate component MyComponent
473
+
474
+ # Generate a new Page (Static, SPA or SSR)
475
+ dars generate page About --page-type spa
476
+ dars generate page Dashboard --page-type ssr
477
+
478
+ # Scaffold and auto-inject into your main.py file
479
+ dars generate page Contact --yes
480
+ ```
481
+
458
482
  ---
459
483
 
460
484
  - Visit dars [official website](https://ztamdev.github.io/Dars-Framework/)
@@ -484,13 +508,17 @@ python my_app.py --port 8088
484
508
 
485
509
  ---
486
510
 
487
- You can also use the CLI preview command on an exported app:
511
+ You can also use the CLI preview command on an exported app. Starting from v1.9.6, the path is optional and will be automatically detected from your `dars.config.json` (defaults to `./dist`):
488
512
 
489
513
  ```bash
490
- dars preview ./my_exported_app
514
+ # Auto-detects output directory and port from config
515
+ dars preview
516
+
517
+ # Or specify a custom path and port
518
+ dars preview ./my_exported_app -p 8080
491
519
  ```
492
520
 
493
- This will start a local server at http://localhost:8000 to view your exported app in the browser.
521
+ This will start a local server at the configured port (defaults to http://localhost:8000) to view your exported app in the browser.
494
522
 
495
523
  ---
496
524
 
@@ -529,8 +557,8 @@ Example default:
529
557
  - `viteMinify`: Toggle the Vite/esbuild minifier for JS/CSS. Default `true`.
530
558
  - `utility_styles`: Dictionary defining custom utility classes. Keys are class names, values are lists of utility strings or raw CSS properties.
531
559
  - `markdownHighlight`: Auto-inject a client-side syntax highlighter for fenced code blocks in Markdown. Default `true`.
532
- - `backendEntry`: Python import path for your SSR/backend app (e.g. `"backend.api:app"`). Required when your app uses `RouteType.SSR` routes. Used by `dars dev --backend`.
533
- - `port`: The port for the development preview server. Default `8000`.
560
+ - `backendEntry`: Python import path for your SSR/backend app (e.g. `"backend.api:app"`). Required when your app uses `RouteType.SSR` routes. Used by `dars dev --backend`.
561
+ - `port`: The port for the development preview server. Default `8000`. This port is used by `dars dev`, `python app.py` (rTimeCompile), and `dars preview`.
534
562
 
535
563
  Validate your config:
536
564
 
@@ -65,6 +65,7 @@ from dars.exporters.web.html_css_js import HTMLCSSJSExporter
65
65
  # Script utilities
66
66
  from dars.scripts.dscript import dScript, RawJS, Arg
67
67
  from dars.scripts.utils_ds import showModal, hideModal, goTo, goToNew, reload, goBack, goForward, alert, confirm, log, getDateTime, show, hide, toggle, addClass, removeClass, toggleClass, scrollTo, scrollToTop, scrollToBottom, scrollToElement, submitForm, resetForm, getValue, clearInput, saveToLocal, loadFromLocal, removeFromLocal, clearLocalStorage, copyToClipboard, copyElementText, focus, blur, setText, setTimeout, getInputValue, switch
68
+ from dars.scripts.utils_ds import onViewport, classOnView, runOnView, animateOnView, staggerOnView, scrollProgress, animate, timeline, stagger # Viewport & Scroll Animation Utilities
68
69
  from dars.scripts.animations import fadeIn, fadeOut, slideIn, slideOut, scaleIn, scaleOut, shake, bounce, pulse, rotate, flip, colorChange, morphSize, popIn, popOut, sequence # Animation System
69
70
  from dars.scripts.script import *
70
71
  # Hooks
@@ -128,8 +129,7 @@ __all__ = [
128
129
  # Storage utilities
129
130
  'saveToLocal', 'loadFromLocal', 'removeFromLocal', 'clearLocalStorage',
130
131
  # Clipboard utilities
131
- 'copyToClipboard', 'copyElementText',
132
- # Focus utilities
132
+ 'copyToClipboard', 'copyElementText', # Focus utilities
133
133
  'focus', 'blur',
134
134
  # Timer utilities
135
135
  'setTimeout',
@@ -137,6 +137,9 @@ __all__ = [
137
137
  'fadeIn', 'fadeOut', 'slideIn', 'slideOut', 'scaleIn', 'scaleOut',
138
138
  'shake', 'bounce', 'pulse', 'rotate', 'flip',
139
139
  'colorChange', 'morphSize', 'popIn', 'popOut', 'sequence',
140
+ # Viewport & Scroll Animation Engine
141
+ 'onViewport', 'classOnView', 'runOnView', 'animateOnView',
142
+ 'staggerOnView', 'scrollProgress', 'animate', 'timeline', 'stagger',
140
143
  # Input utilities
141
144
  'getInputValue',
142
145
  # Hooks