solara 1.29.1__py2.py3-none-any.whl → 1.30.1__py2.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.
Files changed (286) hide show
  1. solara/__init__.py +5 -5
  2. solara/__main__.py +6 -2
  3. solara/autorouting.py +88 -56
  4. solara/cache.py +2 -2
  5. solara/checks.html +1 -1
  6. solara/components/__init__.py +1 -1
  7. solara/components/applayout.py +5 -5
  8. solara/components/button.py +4 -4
  9. solara/components/card.py +1 -2
  10. solara/components/component_vue.py +9 -8
  11. solara/components/cross_filter.py +6 -7
  12. solara/components/datatable.py +2 -3
  13. solara/components/figure_altair.py +1 -1
  14. solara/components/file_download.py +2 -2
  15. solara/components/file_drop.py +76 -33
  16. solara/components/file_drop.vue +24 -10
  17. solara/components/head.py +1 -2
  18. solara/components/head_tag.py +2 -3
  19. solara/components/image.py +1 -1
  20. solara/components/link.py +3 -4
  21. solara/components/meta.py +1 -1
  22. solara/components/misc.py +5 -9
  23. solara/datatypes.py +2 -2
  24. solara/hooks/use_reactive.py +2 -2
  25. solara/lab/components/confirmation_dialog.py +1 -1
  26. solara/lab/components/tabs.py +6 -6
  27. solara/reactive.py +1 -1
  28. solara/routing.py +9 -8
  29. solara/scope/__init__.py +3 -2
  30. solara/server/app.py +44 -1
  31. solara/server/assets/style.css +6 -0
  32. solara/server/esm.py +28 -4
  33. solara/server/kernel_context.py +78 -7
  34. solara/server/patch.py +3 -0
  35. solara/server/reload.py +2 -2
  36. solara/server/server.py +3 -3
  37. solara/server/settings.py +1 -0
  38. solara/server/starlette.py +66 -33
  39. solara/server/static/solara_bootstrap.py +1 -1
  40. solara/server/templates/solara.html.j2 +62 -42
  41. solara/tasks.py +1 -6
  42. solara/util.py +23 -1
  43. solara/website/assets/custom.css +56 -0
  44. solara/website/components/__init__.py +1 -0
  45. solara/website/components/algolia_api.vue +157 -0
  46. solara/website/components/docs.py +118 -0
  47. solara/website/components/header.py +20 -10
  48. solara/website/components/hero.py +1 -1
  49. solara/website/components/markdown.py +30 -0
  50. solara/website/pages/__init__.py +234 -20
  51. solara/website/pages/apps/jupyter-dashboard-1.py +1 -1
  52. solara/website/pages/apps/multipage/__init__.py +1 -1
  53. solara/website/pages/apps/multipage/page2.py +1 -1
  54. solara/website/pages/apps/scatter.py +21 -7
  55. solara/website/pages/changelog/__init__.py +8 -0
  56. solara/website/pages/{docs/content/95-changelog.md → changelog/changelog.md} +43 -2
  57. solara/website/pages/contact/__init__.py +8 -0
  58. solara/website/pages/documentation/__init__.py +184 -0
  59. solara/website/pages/{docs → documentation/advanced}/__init__.py +2 -2
  60. solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
  61. solara/website/pages/{docs → documentation/advanced}/content/10-howto/00-overview.md +5 -0
  62. solara/website/pages/{docs/content/10-howto/20-multipage.md → documentation/advanced/content/10-howto/10-multipage.md} +9 -5
  63. solara/website/pages/{docs/content/10-howto/30-layout.md → documentation/advanced/content/10-howto/20-layout.md} +26 -21
  64. solara/website/pages/{docs/content/10-howto/50-testing.md → documentation/advanced/content/10-howto/30-testing.md} +5 -0
  65. solara/website/pages/{docs/content/10-howto/51-debugging.md → documentation/advanced/content/10-howto/31-debugging.md} +4 -1
  66. solara/website/pages/{docs/content/10-howto/80-embed.md → documentation/advanced/content/10-howto/40-embed.md} +7 -1
  67. solara/website/pages/{docs/content/10-howto/ipywidget_libraries.md → documentation/advanced/content/10-howto/50-ipywidget_libraries.md} +4 -0
  68. solara/website/pages/documentation/advanced/content/20-understanding/00-introduction.md +10 -0
  69. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/05-ipywidgets.md +5 -0
  70. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md +5 -1
  71. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/10-reacton.md +4 -0
  72. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md +5 -1
  73. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/15-anatomy.md +6 -2
  74. solara/website/pages/documentation/advanced/content/20-understanding/17-rules-of-hooks.md +7 -0
  75. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md +9 -3
  76. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/20-solara.md +5 -0
  77. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/40-routing.md +13 -9
  78. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md +6 -1
  79. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/60-voila.md +5 -0
  80. solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/10-oauth.md +7 -3
  81. solara/website/pages/{docs/content/10-howto → documentation/advanced/content/40-development}/01-contribute.md +9 -5
  82. solara/website/pages/{docs/content/90-development → documentation/advanced/content/40-development}/10-setup.md +6 -2
  83. solara/website/pages/documentation/api/__init__.py +19 -0
  84. solara/website/pages/documentation/api/cross_filter/__init__.py +9 -0
  85. solara/website/pages/documentation/api/hooks/__init__.py +9 -0
  86. solara/website/pages/{api → documentation/api/hooks}/use_effect.md +3 -3
  87. solara/website/pages/{api → documentation/api/hooks}/use_effect.py +2 -1
  88. solara/website/pages/{api → documentation/api/hooks}/use_memo.md +2 -2
  89. solara/website/pages/{api → documentation/api/hooks}/use_memo.py +2 -1
  90. solara/website/pages/{api → documentation/api/hooks}/use_reactive.py +1 -2
  91. solara/website/pages/{api → documentation/api/hooks}/use_state.py +1 -2
  92. solara/website/pages/documentation/api/routing/__init__.py +9 -0
  93. solara/website/pages/{api → documentation/api/routing}/generate_routes.py +1 -2
  94. solara/website/pages/{api → documentation/api/routing}/generate_routes_directory.py +1 -2
  95. solara/website/pages/{api → documentation/api/routing}/use_route.py +2 -2
  96. solara/website/pages/{api → documentation/api/routing}/use_router.py +1 -2
  97. solara/website/pages/documentation/api/utilities/__init__.py +9 -0
  98. solara/website/pages/{api → documentation/api/utilities}/component_vue.py +1 -2
  99. solara/website/pages/{api → documentation/api/utilities}/computed.py +2 -2
  100. solara/website/pages/{api → documentation/api/utilities}/display.py +1 -2
  101. solara/website/pages/{api → documentation/api/utilities}/get_kernel_id.py +2 -2
  102. solara/website/pages/{api → documentation/api/utilities}/get_session_id.py +2 -2
  103. solara/website/pages/{api → documentation/api/utilities}/on_kernel_start.py +9 -3
  104. solara/website/pages/{api → documentation/api/utilities}/reactive.py +1 -2
  105. solara/website/pages/{api → documentation/api/utilities}/widget.py +2 -2
  106. solara/website/pages/documentation/components/__init__.py +12 -0
  107. solara/website/pages/documentation/components/advanced/__init__.py +9 -0
  108. solara/website/pages/documentation/components/data/__init__.py +9 -0
  109. solara/website/pages/documentation/components/enterprise/__init__.py +9 -0
  110. solara/website/pages/{api → documentation/components/enterprise}/avatar.py +1 -2
  111. solara/website/pages/{api → documentation/components/enterprise}/avatar_menu.py +1 -2
  112. solara/website/pages/documentation/components/input/__init__.py +9 -0
  113. solara/website/pages/{api → documentation/components/input}/checkbox.py +1 -2
  114. solara/website/pages/documentation/components/input/file_drop.py +75 -0
  115. solara/website/pages/{api → documentation/components/input}/input.py +1 -2
  116. solara/website/pages/{api → documentation/components/input}/select.py +1 -2
  117. solara/website/pages/{api → documentation/components/input}/slider.py +1 -2
  118. solara/website/pages/{api → documentation/components/input}/switch.py +1 -2
  119. solara/website/pages/{api → documentation/components/input}/togglebuttons.py +1 -2
  120. solara/website/pages/documentation/components/lab/__init__.py +9 -0
  121. solara/website/pages/{api → documentation/components/lab}/chat.py +2 -3
  122. solara/website/pages/{api → documentation/components/lab}/cookies_headers.py +1 -1
  123. solara/website/pages/{api → documentation/components/lab}/input_date.py +1 -2
  124. solara/website/pages/{api → documentation/components/lab}/menu.py +1 -2
  125. solara/website/pages/{api → documentation/components/lab}/task.py +1 -2
  126. solara/website/pages/{api → documentation/components/lab}/theming.py +1 -2
  127. solara/website/pages/{api → documentation/components/lab}/use_task.py +1 -2
  128. solara/website/pages/documentation/components/layout/__init__.py +9 -0
  129. solara/website/pages/{api → documentation/components/layout}/app_bar.py +1 -2
  130. solara/website/pages/{api → documentation/components/layout}/app_bar_title.py +1 -2
  131. solara/website/pages/{api → documentation/components/layout}/card.py +1 -2
  132. solara/website/pages/{api → documentation/components/layout}/card_actions.py +1 -2
  133. solara/website/pages/{api → documentation/components/layout}/griddraggable.py +1 -1
  134. solara/website/pages/{api → documentation/components/layout}/gridfixed.py +1 -1
  135. solara/website/pages/{api → documentation/components/layout}/hbox.py +1 -1
  136. solara/website/pages/{api → documentation/components/layout}/vbox.py +1 -1
  137. solara/website/pages/documentation/components/output/__init__.py +9 -0
  138. solara/website/pages/{api → documentation/components/output}/file_download.py +1 -2
  139. solara/website/pages/{api → documentation/components/output}/image.py +1 -2
  140. solara/website/pages/{api → documentation/components/output}/tooltip.py +1 -2
  141. solara/website/pages/documentation/components/page/__init__.py +9 -0
  142. solara/website/pages/documentation/components/status/__init__.py +9 -0
  143. solara/website/pages/{api → documentation/components/status}/error.py +3 -3
  144. solara/website/pages/{api → documentation/components/status}/info.py +3 -3
  145. solara/website/pages/{api → documentation/components/status}/progress.py +1 -2
  146. solara/website/pages/{api → documentation/components/status}/spinner.py +1 -2
  147. solara/website/pages/{api → documentation/components/status}/success.py +3 -3
  148. solara/website/pages/{api → documentation/components/status}/warning.py +3 -3
  149. solara/website/pages/documentation/components/viz/__init__.py +9 -0
  150. solara/website/pages/{api → documentation/components/viz}/plotly.py +1 -0
  151. solara/website/pages/{examples → documentation/examples}/__init__.py +3 -43
  152. solara/website/pages/{examples → documentation/examples}/general/custom_storage.py +1 -1
  153. solara/website/pages/{examples → documentation/examples}/general/deploy_model.py +3 -3
  154. solara/website/pages/{examples → documentation/examples}/general/login_oauth.py +1 -1
  155. solara/website/pages/{examples → documentation/examples}/general/vue_component.py +1 -2
  156. solara/website/pages/{examples → documentation/examples}/libraries/altair.py +2 -3
  157. solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet_advanced.py +1 -1
  158. solara/website/pages/{examples → documentation/examples}/utilities/countdown_timer.py +1 -1
  159. solara/website/pages/{examples → documentation/examples}/visualization/plotly.py +1 -2
  160. solara/website/pages/documentation/faq/__init__.py +12 -0
  161. solara/website/pages/{docs → documentation/faq}/content/99-faq.md +4 -1
  162. solara/website/pages/documentation/getting_started/__init__.py +9 -0
  163. solara/website/pages/{docs/content/03-quickstart.md → documentation/getting_started/content/00-quickstart.md} +7 -2
  164. solara/website/pages/{docs/content/00-introduction.md → documentation/getting_started/content/01-introduction.md} +20 -16
  165. solara/website/pages/{docs → documentation/getting_started}/content/02-installing.md +5 -1
  166. solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +14 -0
  167. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/20-web-app.md +9 -4
  168. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/30-ipywidgets.md +13 -9
  169. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/40-streamlit.md +17 -12
  170. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/50-dash.md +7 -3
  171. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_data_science.ipynb +5 -5
  172. solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +11 -0
  173. solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/10-components.md +7 -2
  174. solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/50-state-management.md +8 -3
  175. solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +3 -0
  176. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/40-static_files.md +4 -0
  177. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/41-asset-files.md +5 -1
  178. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/60-static-site-generation.md +5 -1
  179. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/70-search.md +5 -1
  180. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/80-reloading.md +7 -3
  181. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/90-notebook-support.md +4 -1
  182. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/95-caching.md +6 -1
  183. solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +7 -0
  184. solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/10-self-hosted.md +7 -3
  185. solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/20-cloud-hosted.md +5 -1
  186. solara/website/pages/documentation/getting_started/content/80-what-is-lab.md +7 -0
  187. solara/website/pages/{docs → documentation/getting_started}/content/90-troubleshoot.md +4 -0
  188. solara/website/pages/showcase/__init__.py +1 -1
  189. solara/website/pages/showcase/domino_code_assist.py +1 -1
  190. solara/website/pages/showcase/solara_dev.py +1 -1
  191. solara/website/public/social/discord.svg +1 -0
  192. solara/website/public/social/github.svg +1 -0
  193. solara/website/public/social/twitter.svg +3 -0
  194. {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/METADATA +8 -7
  195. solara-1.30.1.dist-info/RECORD +437 -0
  196. {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/WHEEL +1 -1
  197. solara/website/pages/api/__init__.py +0 -292
  198. solara/website/pages/api/default_layout.py +0 -16
  199. solara/website/pages/api/file_drop.py +0 -36
  200. solara/website/pages/docs/content/04-tutorial/00-overview.md +0 -9
  201. solara/website/pages/docs/content/07-fundamentals/00-overview.md +0 -7
  202. solara/website/pages/docs/content/15-reference/00-overview.md +0 -6
  203. solara/website/pages/docs/content/20-understanding/00-introduction.md +0 -4
  204. solara/website/pages/docs/content/20-understanding/17-rules-of-hooks.md +0 -3
  205. solara/website/pages/docs/content/30-deploying/00-overview.md +0 -3
  206. solara/website/pages/docs/content/lab/00-what-is-lab.md +0 -3
  207. solara-1.29.1.dist-info/RECORD +0 -411
  208. /solara/website/pages/{docs/content/99-contact.md → contact/contact.md} +0 -0
  209. /solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/00-overview.md +0 -0
  210. /solara/website/pages/{docs/content/__init__.py → documentation/advanced/content/40-development/00-overview.md} +0 -0
  211. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_dataframe.py +0 -0
  212. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_report.py +0 -0
  213. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_select.py +0 -0
  214. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_slider.py +0 -0
  215. /solara/website/pages/{api → documentation/api/hooks}/use_cross_filter.py +0 -0
  216. /solara/website/pages/{api → documentation/api/hooks}/use_dark_effective.py +0 -0
  217. /solara/website/pages/{api → documentation/api/hooks}/use_exception.py +0 -0
  218. /solara/website/pages/{api → documentation/api/hooks}/use_previous.py +0 -0
  219. /solara/website/pages/{api → documentation/api/hooks}/use_state_or_update.py +0 -0
  220. /solara/website/pages/{api → documentation/api/hooks}/use_thread.md +0 -0
  221. /solara/website/pages/{api → documentation/api/hooks}/use_thread.py +0 -0
  222. /solara/website/pages/{api → documentation/api/hooks}/use_trait_observe.py +0 -0
  223. /solara/website/pages/{api → documentation/api/routing}/resolve_path.py +0 -0
  224. /solara/website/pages/{api → documentation/api/routing}/route.py +0 -0
  225. /solara/website/pages/{api → documentation/api/utilities}/memoize.py +0 -0
  226. /solara/website/pages/{api → documentation/components/advanced}/link.py +0 -0
  227. /solara/website/pages/{api → documentation/components/advanced}/meta.py +0 -0
  228. /solara/website/pages/{api → documentation/components/advanced}/style.py +0 -0
  229. /solara/website/pages/{api → documentation/components}/common.py +0 -0
  230. /solara/website/pages/{api → documentation/components/data}/dataframe.py +0 -0
  231. /solara/website/pages/{api → documentation/components/data}/pivot_table.py +0 -0
  232. /solara/website/pages/{api → documentation/components/input}/button.py +0 -0
  233. /solara/website/pages/{api → documentation/components/input}/file_browser.py +0 -0
  234. /solara/website/pages/{api → documentation/components/lab}/confirmation_dialog.py +0 -0
  235. /solara/website/pages/{api → documentation/components/lab}/tab.py +0 -0
  236. /solara/website/pages/{api → documentation/components/lab}/tabs.py +0 -0
  237. /solara/website/pages/{api → documentation/components/layout}/app_layout.py +0 -0
  238. /solara/website/pages/{api → documentation/components/layout}/column.py +0 -0
  239. /solara/website/pages/{api → documentation/components/layout}/columns.py +0 -0
  240. /solara/website/pages/{api → documentation/components/layout}/columns_responsive.py +0 -0
  241. /solara/website/pages/{api → documentation/components/layout}/row.py +0 -0
  242. /solara/website/pages/{api → documentation/components/layout}/sidebar.py +0 -0
  243. /solara/website/pages/{api → documentation/components/output}/html.py +0 -0
  244. /solara/website/pages/{api → documentation/components/output}/markdown.py +0 -0
  245. /solara/website/pages/{api → documentation/components/output}/markdown_editor.py +0 -0
  246. /solara/website/pages/{api → documentation/components/output}/sql_code.py +0 -0
  247. /solara/website/pages/{api → documentation/components/page}/head.py +0 -0
  248. /solara/website/pages/{api → documentation/components/page}/title.py +0 -0
  249. /solara/website/pages/{api → documentation/components/viz}/altair.py +0 -0
  250. /solara/website/pages/{api → documentation/components/viz}/echarts.py +0 -0
  251. /solara/website/pages/{api → documentation/components/viz}/matplotlib.py +0 -0
  252. /solara/website/pages/{api → documentation/components/viz}/plotly_express.py +0 -0
  253. /solara/website/pages/{examples → documentation/examples}/ai/__init__.py +0 -0
  254. /solara/website/pages/{examples → documentation/examples}/ai/chatbot.py +0 -0
  255. /solara/website/pages/{examples → documentation/examples}/ai/tokenizer.py +0 -0
  256. /solara/website/pages/{examples → documentation/examples}/basics/__init__.py +0 -0
  257. /solara/website/pages/{examples → documentation/examples}/basics/sine.py +0 -0
  258. /solara/website/pages/{examples → documentation/examples}/fullscreen/__init__.py +0 -0
  259. /solara/website/pages/{examples → documentation/examples}/fullscreen/authorization.py +0 -0
  260. /solara/website/pages/{examples → documentation/examples}/fullscreen/layout_demo.py +0 -0
  261. /solara/website/pages/{examples → documentation/examples}/fullscreen/multipage.py +0 -0
  262. /solara/website/pages/{examples → documentation/examples}/fullscreen/scatter.py +0 -0
  263. /solara/website/pages/{examples → documentation/examples}/fullscreen/scrolling.py +0 -0
  264. /solara/website/pages/{examples → documentation/examples}/fullscreen/tutorial_streamlit.py +0 -0
  265. /solara/website/pages/{examples → documentation/examples}/general/__init__.py +0 -0
  266. /solara/website/pages/{examples → documentation/examples}/general/live_update.py +0 -0
  267. /solara/website/pages/{examples → documentation/examples}/general/mycard.vue +0 -0
  268. /solara/website/pages/{examples → documentation/examples}/general/pokemon_search.py +0 -0
  269. /solara/website/pages/{examples → documentation/examples}/ipycanvas.py +0 -0
  270. /solara/website/pages/{examples → documentation/examples}/libraries/__init__.py +0 -0
  271. /solara/website/pages/{examples → documentation/examples}/libraries/bqplot.py +0 -0
  272. /solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet.py +0 -0
  273. /solara/website/pages/{examples → documentation/examples}/utilities/__init__.py +0 -0
  274. /solara/website/pages/{examples → documentation/examples}/utilities/calculator.py +0 -0
  275. /solara/website/pages/{examples → documentation/examples}/utilities/todo.py +0 -0
  276. /solara/website/pages/{examples → documentation/examples}/visualization/__init__.py +0 -0
  277. /solara/website/pages/{examples → documentation/examples}/visualization/annotator.py +0 -0
  278. /solara/website/pages/{examples → documentation/examples}/visualization/linked_views.py +0 -0
  279. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/10_data_science.py +0 -0
  280. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/60-jupyter-dashboard-part1.py +0 -0
  281. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/SF_crime_sample.csv.gz +0 -0
  282. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_jupyter_dashboard_1.ipynb +0 -0
  283. {solara-1.29.1.data → solara-1.30.1.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
  284. {solara-1.29.1.data → solara-1.30.1.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
  285. {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/entry_points.txt +0 -0
  286. {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,184 @@
1
+ from pathlib import Path
2
+
3
+ import solara
4
+
5
+ _title = "Documentation"
6
+
7
+ HERE = Path(__file__).parent
8
+
9
+ route_order = ["/", "getting_started", "examples", "components", "api", "advanced", "faq"]
10
+
11
+
12
+ @solara.component_vue(str(HERE.parent.parent / "components" / "algolia_api.vue"))
13
+ def Algolia():
14
+ pass
15
+
16
+
17
+ @solara.component
18
+ def Page(children=[]):
19
+ # show a gallery of all the api pages
20
+ router = solara.use_router()
21
+ route_current = router.path_routes[-2]
22
+
23
+ with solara.Column(style={"width": "100%"}, gap="75px"):
24
+ if route_current.path == "documentation":
25
+ with solara.Column(classes=["api-search-container"], gap="50px", style={"justify-content": "center"}, align="center"):
26
+ solara.Markdown("# Search the Solara Documentation", style={"text-align": "center"})
27
+ with solara.Row(style={"width": "100%", "min-width": "20rem", "justify-content": "center", "background-color": "transparent"}):
28
+ Algolia()
29
+ with solara.Row(gap="20px", classes=["docs-card-container"]):
30
+ for route in route_current.children:
31
+ if route.path in ["/", "advanced", "faq"]:
32
+ continue
33
+ with solara.Link("/documentation/" + route.path):
34
+ with solara.Row(
35
+ classes=["docs-card"],
36
+ style={
37
+ "background-color": f"var({'--docs-color-grey' if route.path != 'getting_started' else '--color-primary'})",
38
+ },
39
+ ):
40
+ with solara.Column(style={"height": "100%", "flex-grow": "1", "background-color": "transparent"}):
41
+ solara.HTML(tag="h2", unsafe_innerHTML=route.label, style={"color": "white", "padding": "1.5rem"})
42
+ with solara.Column(style={"justify-content": "center", "height": "100%", "background-color": "transparent"}):
43
+ solara.v.Icon(children=["mdi-arrow-right"], color="var(--color-grey-light)", x_large=True, class_="docs-card-icon")
44
+ with solara.Row(gap="75px", style={"flex-wrap": "wrap", "row-gap": "75px", "padding-bottom": "75px"}):
45
+ with solara.Column(style={"padding-left": "10%"}):
46
+ solara.HTML(tag="h2", unsafe_innerHTML="How to use our documentation:", style={"padding": "1.5rem"})
47
+ solara.Markdown(
48
+ """
49
+ * [Getting Started](/documentation/getting_started) - Learn how to install Solara and get started with building your app.
50
+ Also includes tutorials for you to get a hang of Solara workflow.
51
+ * [Examples](/documentation/examples) - More complex and real world applicable examples of Solara apps.
52
+ For even more complexity you can see the [Showcase](/showcase) page.
53
+ * [Components](/documentation/components) - All the components that are available in Solara.
54
+ * [API](/documentation/api) - All the API functions that are available in Solara. Importantly, this includes routing and hooks.
55
+ * [Advanced](/documentation/advanced) - Advanced topics like associated and underlying libraries.
56
+ If a component you would like to use is not available in Solara, you can use the underlying library directly.
57
+ """
58
+ )
59
+ with solara.Column(style={"justify-content": "center", "height": "100%"}):
60
+ solara.HTML(tag="h2", unsafe_innerHTML="Also Check Out", style={"padding": "1.5rem"})
61
+ with solara.Row(gap="20px", style={"flex-wrap": "wrap", "row-gap": "20px", "align-items": "center"}):
62
+ with solara.v.Html(tag="a", attributes={"href": "https://discord.solara.dev", "target": "_blank"}):
63
+ with solara.Div(classes=["social-logo-container"], style={"background-color": "var(--docs-social-discord)"}):
64
+ solara.v.Html(tag="img", attributes={"src": "/static/public/social/discord.svg"}, style_="height: 1.5rem; width: auto;")
65
+ solara.Text("We use discord to provide support and answer questions there actively.")
66
+ with solara.Row(gap="20px", style={"flex-wrap": "wrap", "row-gap": "20px", "align-items": "center"}):
67
+ with solara.v.Html(tag="a", attributes={"href": "https://github.com/widgetti/solara", "target": "_blank"}):
68
+ with solara.Div(classes=["social-logo-container"], style={"background-color": "var(--docs-social-github)"}):
69
+ solara.v.Html(tag="img", attributes={"src": "/static/public/social/github.svg"}, style_="height: 1.5rem; width: auto;")
70
+ solara.Text("Search for solutions on Github issues, or report bugs.")
71
+ with solara.Row(gap="20px", style={"flex-wrap": "wrap", "row-gap": "20px", "align-items": "center"}):
72
+ with solara.v.Html(tag="a", attributes={"href": "https://twitter.com/solara_dev", "target": "_blank"}):
73
+ with solara.Div(classes=["social-logo-container"], style={"background-color": "var(--docs-social-twitter)"}):
74
+ solara.v.Html(tag="img", attributes={"src": "/static/public/social/twitter.svg"}, style_="height: 1.5rem; width: auto;")
75
+ solara.Text("Get announcements about Solara features, showcases, and events!.")
76
+
77
+ else:
78
+ with solara.Column(align="center", children=children, style={"padding": "0"}):
79
+ pass
80
+
81
+
82
+ @solara.component
83
+ def Sidebar():
84
+ route_current, all_routes = solara.use_route()
85
+ router = solara.use_router()
86
+ if route_current is None:
87
+ return solara.Error("Page not found")
88
+
89
+ with solara.v.NavigationDrawer(
90
+ clipped=True, width="20rem", height="unset", style_="min-height: calc(100vh - 215.5px);", class_="d-none d-md-block"
91
+ ) as main:
92
+ with solara.v.List(expand=True, nav=True, style_="height: calc(100vh - 215.5px); display: flex; flex-direction: column;"):
93
+ with solara.v.ListItemGroup(v_model=router.path):
94
+ for route in all_routes:
95
+ if len(route.children) == 1 or route.path == "/":
96
+ with solara.Link("/documentation/" + route.path if route.path != "/" else "/documentation"):
97
+ with solara.v.ListItem(value="/documentation/" + route.path if route.path != "/" else "/documentation"):
98
+ if route.path == "/":
99
+ solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-home"])])
100
+ solara.v.ListItemTitle(style_="padding: 0 20px;", children=[route.label])
101
+ else:
102
+ with solara.v.ListGroup(
103
+ v_slots=[
104
+ {
105
+ "name": "activator",
106
+ "children": solara.v.ListItemTitle(
107
+ children=[route.label],
108
+ style_="padding: 0 20px;",
109
+ ),
110
+ }
111
+ ],
112
+ value=router.path.startswith("/documentation/" + route.path),
113
+ ):
114
+ for item in route.children:
115
+ if item.path == "/":
116
+ continue
117
+ if item.children != [] and any([c.label is not None and c.path != "/" for c in item.children]):
118
+ with solara.v.ListGroup(
119
+ v_slots=[
120
+ {
121
+ "name": "activator",
122
+ "children": solara.v.ListItemTitle(
123
+ children=[item.label],
124
+ ),
125
+ }
126
+ ],
127
+ sub_group=True,
128
+ no_action=True,
129
+ value=router.path.startswith("/documentation/" + route.path + "/" + item.path),
130
+ ):
131
+ for subitem in item.children:
132
+ # skip pages that are only used to demonstrate Link or Router usage
133
+ if subitem.path == "/" or subitem.label is None:
134
+ continue
135
+ path = (
136
+ "/documentation/" + route.path + "/" + item.path + "/" + subitem.path
137
+ if item.path != "fullscreen"
138
+ else "/apps/" + subitem.path
139
+ )
140
+ with solara.Link(
141
+ path,
142
+ ):
143
+ with solara.v.ListItem(dense=True, style_="padding: 0 20px;", value=path):
144
+ solara.v.ListItemContent(
145
+ children=[subitem.label],
146
+ )
147
+ else:
148
+ with solara.v.ListItemGroup(value="/documentation/" + route.path + "/" + item.path):
149
+ with solara.Link(
150
+ "/documentation/" + route.path + "/" + item.path,
151
+ ):
152
+ with solara.v.ListItem(dense=True, style_="padding: 0 20px;"):
153
+ solara.v.ListItemContent(
154
+ children=[item.label],
155
+ )
156
+ solara.v.Spacer(style_="flex-grow: 1;")
157
+ with solara.v.ListItemGroup():
158
+ with solara.Link("/contact"):
159
+ with solara.v.ListItem():
160
+ solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-email"])])
161
+ solara.v.ListItemTitle(style_="padding: 0 20px;", children=["Contact"])
162
+ with solara.Link("/changelog"):
163
+ with solara.v.ListItem():
164
+ solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-history"])])
165
+ solara.v.ListItemTitle(style_="padding: 0 20px;", children=["Changelog"])
166
+
167
+ return main
168
+
169
+
170
+ @solara.component
171
+ def Layout(children=[]):
172
+ route_current, all_routes = solara.use_route()
173
+ if route_current is None:
174
+ return solara.Error("Page not found")
175
+
176
+ if route_current.path == "/":
177
+ return Page()
178
+ else:
179
+ return Page(children=children)
180
+
181
+
182
+ @solara.component
183
+ def Overview():
184
+ pass
@@ -1,9 +1,9 @@
1
1
  from pathlib import Path
2
2
 
3
3
  from solara.autorouting import generate_routes_directory
4
+ from solara.website.components.markdown import MarkdownWithMetadata
4
5
 
5
- title = "Docs"
6
6
  HERE = Path(__file__)
7
7
  # if we didn't put the content in the subdirectory, but pointed to the current file
8
8
  # we would include the current file recursively, causing an infinite loop
9
- routes = generate_routes_directory(HERE.parent / "content")
9
+ routes = generate_routes_directory(HERE.parent / "content", MarkdownWithMetadata)
@@ -0,0 +1 @@
1
+ The entries are meant as deeper dives into specific topics. Although we try to write each as a standalone document, some parts may build on previous ones.
@@ -1 +1,6 @@
1
+ ---
2
+ title: Overview of how-to articles
3
+ description: The how-tos are meant as deeper dives into specific topics from various perspectives
4
+ ---
5
+
1
6
  The how-tos are meant as deeper dives into specific topics. Although we try to write each how-to as a standalone document, some parts of a how-to may build on top of a previous one.
@@ -1,6 +1,11 @@
1
+ ---
2
+ title: Building multi-page apps in Solara
3
+ description: The simplest way to create a multi-page app is to create a directory with multiple scripts.
4
+ ---
5
+
1
6
  # Multi-page support
2
7
 
3
- In the [Web App tutorial](/docs/tutorial/web-app), we created an application consisting of a single page. Web applications generally have multiple pages, and Solara supports this as well.
8
+ In the [Web App tutorial](/documentation/getting_started/tutorials/web-app), we created an application consisting of a single page. Web applications generally have multiple pages, and Solara supports this as well.
4
9
 
5
10
 
6
11
  ## Multiple scripts
@@ -42,8 +47,7 @@ Solara now:
42
47
  * Generate a nice URL by stripping of prefix, splitting the filename taking out `-`, `_` and spaces, and join them together using a `-` (e.g. "/markdown-editor").
43
48
  * Generate a nice default title similar to the link, but now capitalize the first letter and join with a space instead (e.g. "Mardown Editor").
44
49
  * The first page will be the default (and its URL will be empty instead, i.e., the empty string `""`)
45
- * Since the first script does not define a `Layout` component, nor did we add a `__init__.py` with a `Layout` component, Solara will add a [default
46
- Layout component](/api/default_layout) which includes a navigation sidebar.
50
+ * Since the first script does not define a `Layout` component, nor did we add a `__init__.py` with a `Layout` component, Solara will add a [Layout component](/documentation/components/layout/app_layout) which includes a navigation sidebar.
47
51
  * If a path is a directory, Solara will recursively scan the subdirectory and include it in the navigation. Read more on this in the [Layout section](layout)
48
52
 
49
53
  Solara will render two pages:
@@ -148,7 +152,7 @@ routes = [
148
152
  ]
149
153
  ```
150
154
 
151
- See more details in the [Route section](/docs/understanding/routing).
155
+ See more details in the [Route section](/documentation/advanced/understanding/routing).
152
156
 
153
157
  ## Dynamic pages
154
158
 
@@ -189,4 +193,4 @@ By giving the name argument a default value of `"foo"`, Solara will also accept
189
193
 
190
194
  # What next?
191
195
 
192
- * Also check out the [Multipage example](/apps/multipage) for more inspiration.
196
+ * Also check out the [Multipage example](/documentation/examples/fullscreen/multipage) for more inspiration.
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Making different layouts in Solara
3
+ description: Solara comes with a layout system ideal for data apps. Learn how to use them in this short guide.
4
+ ---
5
+
1
6
  # Layout
2
7
 
3
8
  Solara comes with a layout system ideal for data apps.
@@ -33,29 +38,29 @@ def Page():
33
38
  solara.Info("two per column on small screens, three per column on large screens")
34
39
  ```
35
40
 
36
- [Navigate here to watch this layout in a full browser window](/apps/layout-demo)
41
+ [Navigate here to watch this layout in a full browser window](/documentation/examples/fullscreen/layout-demo)
37
42
 
38
43
  The key takeaways are:
39
44
 
40
- * By default, Solara will wrap your component in an [AppLayout](/api/app_layout), which will give you:
41
- * Room for a sidebar, that you can populate using the [Sidebar](/api/sidebar) component.
42
- * A toolbar showing the [Title](/api/title).
43
- * Not visible here: In the case of [multiple pages](/docs/howto/multipage) will include page navigation tabs. See [The multipage demo app](/app/multipage) for an example.
44
- * Use [Card](/api/card) to put related components together with a title.
45
- * Use [Column](/api/column) to simply layout components under each other.
46
- * Use [Columns](/api/columns) if you want to have a few columns with relative sizes next to each other.
47
- * Use [ColumnsResponsive](/api/columns_responsive) to have the column widths respond to screen size.
45
+ * By default, Solara will wrap your component in an [AppLayout](/documentation/components/layout/app_layout), which will give you:
46
+ * Room for a sidebar, that you can populate using the [Sidebar](/documentation/components/layout/sidebar) component.
47
+ * A toolbar showing the [Title](/documentation/components/page/title).
48
+ * Not visible here: In the case of [multiple pages](/documentation/advanced/howto/multipage) will include page navigation tabs. See [The multipage demo app](/documentation/examples/fullscreen/multipage) for an example.
49
+ * Use [Card](/documentation/components/layout/card) to put related components together with a title.
50
+ * Use [Column](/documentation/components/layout/column) to simply layout components under each other.
51
+ * Use [Columns](/documentation/components/layout/columns) if you want to have a few columns with relative sizes next to each other.
52
+ * Use [ColumnsResponsive](/documentation/components/layout/columns_responsive) to have the column widths respond to screen size.
48
53
 
49
54
 
50
55
 
51
56
  ## Changing the default layout
52
57
 
53
- While [AppLayout](/api/app_layout) may be sufficient in 80% of the cases. Solara provides a way to change this default layout in [Solara server](/docs/understanding/solara-server).
58
+ While [AppLayout](/documentation/components/layout/app_layout) may be sufficient in 80% of the cases. Solara provides a way to change this default layout in [Solara server](/documentation/advanced/understanding/solara-server).
54
59
 
55
60
  You can define your own `Layout` component in the `__init__.py` file in the same directory of your app script.
56
61
 
57
62
 
58
- For instance, putting the following `Layout` component in `__init__.py` will give you effectively the same [AppLayout](/api/app_layout):
63
+ For instance, putting the following `Layout` component in `__init__.py` will give you effectively the same [AppLayout](/documentation/components/layout/app_layout):
59
64
  ```python
60
65
  @solara.component
61
66
  def Layout(children=[]):
@@ -80,7 +85,7 @@ This layout leaves every page responsible for creating its own header, footer, a
80
85
  ### Layout with navigation
81
86
 
82
87
  In case you want to set up your own layout system, which sets up navigation as well, this example may get you started. It may help
83
- to [understand routing](/docs/understanding/routing).
88
+ to [understand routing](/documentation/advanced/understanding/routing).
84
89
  ```python
85
90
  @solara.component
86
91
  def Layout(children=[]):
@@ -108,13 +113,13 @@ This is useful for larger apps where each subdirectory may add a bit of layout/c
108
113
 
109
114
  ## Components
110
115
 
111
- The following [Container components](/docs/understanding/containers) can be used to define the layout of you app.
116
+ The following [Container components](/documentation/advanced/understanding/containers) can be used to define the layout of you app.
112
117
 
113
- * [Row](/api/row)
114
- * [Column](/api/column)
115
- * [ColumnsResponsive](/api/columns_responsive)
116
- * [GridFixed](/api/gridfixed)
117
- * [GridDraggable](/api/griddraggable)
118
- * [VBox](/api/vbox) (kept for ipywidgets compatibility, please use Column)
119
- * [HBox](/api/hbox) (kept for ipywidgets compatibility, please use Row)
120
- * [AppLayout](/api/app_layout) Not often used directly, since Solara will already wrap your page in it. Sometimes re-used in a new `Layout` component.
118
+ * [Row](/documentation/components/layout/row)
119
+ * [Column](/documentation/components/layout/column)
120
+ * [ColumnsResponsive](/documentation/components/layout/columns_responsive)
121
+ * [GridFixed](/documentation/components/layout/gridfixed)
122
+ * [GridDraggable](/documentation/components/layout/griddraggable)
123
+ * [VBox](/documentation/components/layout/vbox) (kept for ipywidgets compatibility, please use Column)
124
+ * [HBox](/documentation/components/layout/hbox) (kept for ipywidgets compatibility, please use Row)
125
+ * [AppLayout](/documentation/components/layout/app_layout) Not often used directly, since Solara will already wrap your page in it. Sometimes re-used in a new `Layout` component.
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Testing your Solara application, both front and back end
3
+ description: Using solara you can test both the front and back end functionalities of your application.
4
+ ---
5
+
1
6
  # Testing with Solara
2
7
  # Testing Application Logic
3
8
 
@@ -1,4 +1,7 @@
1
-
1
+ ---
2
+ title: Debugging Solara applications
3
+ description: You can use the Python debugger to debug your Solara app.
4
+ ---
2
5
  # Debugging
3
6
 
4
7
  ## PDB
@@ -1,3 +1,9 @@
1
+ ---
2
+ title: Embedding Solara applications into existing websites
3
+ description: Solara can be embedded into existing websites. Although it is technically possible to embed a Solara app into an existing webpage,
4
+ we currently support embedding primarily via iframes.
5
+ ---
6
+
1
7
  # Embedding in existing websites
2
8
 
3
9
  Solara can be embedded into existing websites. Although it is technically possible to embed a Solara app into an existing webpage, we currently support embedding primarily via iframes.
@@ -40,4 +46,4 @@ Solara uses a cookie to implement sessions. To support cookies settings in an if
40
46
 
41
47
  ## Embed into an existing page
42
48
 
43
- If embedding into an iframe does not suit your needs (for example, dialogs not being fullscreen), [please contact us](/docs/contact) and we can discuss other options.
49
+ If embedding into an iframe does not suit your needs (for example, dialogs not being fullscreen), [please contact us](/contact) and we can discuss other options.
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: Using various ipywidgets libraries within a Solara application
3
+ description: Solara can work with virtually any ipywidget library, and enables powerful interactivity with libraries like ipyleaflet, ipydatagrid, and bqplot.
4
+ ---
1
5
  # How can I use ipywidget library X?
2
6
 
3
7
  Solara can work with any ipywidget library, such as [ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet), [ipydatagrid](https://github.com/bloomberg/ipydatagrid) or [bqplot](https://github.com/bqplot/bqplot).
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: Understanding Solara's functionality
3
+ description: Solara builds on existing technologies. If you are new to Solara or some of the underlying technologies, you may feel lost at times.
4
+ These 'understanding' guides are meant to help you understand topics at a deeper level and how they connect to Solara.
5
+ ---
6
+
7
+ # Introduction
8
+
9
+ Solara builds on existing technologies. If you are new to Solara or some of the underlying technologies, you may feel lost at times.
10
+ These 'understanding' guides are meant to help you understand topics at a deeper level and how they connect to Solara.
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Understanding how ipywidgets work together with Solara
3
+ description: Solara's primarily standalone app approach differs from the ipywidgets one. This article dives deeper into the different approaches and adapting to using
4
+ ipywidgets within Solara.
5
+ ---
1
6
  # IPywidgets
2
7
 
3
8
  * [Documentation](https://ipywidgets.readthedocs.io/en/stable/)
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: Using ipyvuetify widgets with Solara
3
+ description: Ipyvuetify is an ipywidgets based library that wraps the Vuetify javascript framework for use with python widgets. Learn how to use these to build apps with Solara.
4
+ ---
1
5
  # ipyvuetify
2
6
 
3
7
  * [Documentation](https://ipyvuetify.readthedocs.io/)
@@ -11,7 +15,7 @@ material design based widgets.
11
15
 
12
16
  ## Reacton and ipyvuetify
13
17
 
14
- We consider ipyvuetify one of the most essential ipywidget libraries, and that is the reason why [Reacton](/docs/understanding/reacton) ships with
18
+ We consider ipyvuetify one of the most essential ipywidget libraries, and that is the reason why [Reacton](/documentation/advanced/understanding/reacton) ships with
15
19
  generated ipyvuetify components to make your app type safe.
16
20
 
17
21
  ```solara
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: Understanding how Solara builds on Reacton
3
+ description: Solara adapts the React way of using components declaratively to build UIs and brings it to Python.
4
+ ---
1
5
  # Reacton
2
6
 
3
7
  * [Documentation](https://reacton.solara.dev/)
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: Understanding the basics of Reacton
3
+ description: Using your favorite component, we try to understand better how it works to improve your understanding of Reacton and, thus, how to use Solara.
4
+ ---
1
5
  # Reacton basic understanding
2
6
 
3
7
 
@@ -90,7 +94,7 @@ In words
90
94
  1. Solara create `el = ButtonClick()` from your component.
91
95
  1. The `display(el)` triggers the call to Reacton.
92
96
  1. The render call enters the render phase, which will call the function body (which we call render function) of the `ButtonClick` component.
93
- 1. Our ButtonClick render function calls [`use_state`](/api/use_state). Because this is our first render phase, this returns the initial value (0).
97
+ 1. Our ButtonClick render function calls [`use_state`](/documentation/api/hooks/use_state). Because this is our first render phase, this returns the initial value (0).
94
98
  1. The ButtonClick render function returns a Button element (not a widget!) with `description="Clicked: 0 times"`.
95
99
  1. The Reacton render call is done with the render phase, and enters the reconciliation phase, where it looks at the difference between the real widgets and the virtual widgets tree (represented by the Reacton elements). We find there is no previous widget associated with the virtual widget (or element) and decide to create a widget.
96
100
  1. Asynchronously via the Jupyter protocol, a widget model and view are created and displayed to the user in the browser.
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: The anatomy of Solara's functionality
3
+ description: Dive deep into how Solara uses the technologies it builds on.
4
+ ---
1
5
  # Anatomy
2
6
 
3
7
  For communication, it is useful to speak the same language and use the same idiom.
@@ -9,10 +13,10 @@ As a reference, we provide this "anatomy" image of our favorite `ClickButton` co
9
13
 
10
14
  * Import `solara` and you also get the `reacton` namespace with it (saves typing, and finding/remembering which hooks is in which packages)
11
15
  * Add a `@solara.component` decorator to turn your function into a component.
12
- * Start with `use_state` hooks and other hooks. This avoids issues with [conditional hooks](/docs/understanding/rules-of-hooks) or hooks in loops.
16
+ * Start with `use_state` hooks and other hooks. This avoids issues with [conditional hooks](/documentation/advanced/understanding/rules-of-hooks) or hooks in loops.
13
17
  * Data/state flows down (to children)
14
18
  * Information (events, data) flows up from children via events and callbacks (`on_<some_event_name>=my_callback`).
15
- * If you need multiple components, use a [parent container component](/api#layout) as context manager. A good default name to give this context manager is `main`. Don't forget to return it in your render function!
19
+ * If you need multiple components, use a [parent container component](/documentation/components/layout/app_layout) as context manager. A good default name to give this context manager is `main`. Don't forget to return it in your render function!
16
20
  * The body of your component (the function you wrote) is called the render function.
17
21
  * In between the hooks as defining all your elements, you put your custom code, like checking variables, defining callbacks, and other logic.
18
22
  * The only way for a component to cause itself to rerender is to have state (using `use_state`) and change it (calling the second return value with a different value).
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: The rules of hooks in Solara
3
+ description: Learn the rules that govern the usage of hooks in your Solara application.
4
+ ----
5
+ # Rules of hooks
6
+
7
+ For now, we refer to the [ReactJS documentation](https://reactjs.org/docs/hooks-rules.html).
@@ -1,3 +1,9 @@
1
+ ---
2
+ title: Using Solara with containers to build complex UIs
3
+ description: Solara allows for using python with statements to populate your UIs in a structured manner. This makes it easy to compose different components to build cohesive
4
+ wholes.
5
+ ---
6
+
1
7
  # Laying out components with containers
2
8
 
3
9
  ## Introduction
@@ -51,7 +57,7 @@ Page = FancyClickButton
51
57
  ```
52
58
 
53
59
 
54
- Here we use an [HBox](/api/hbox) to lay out two child components horizontally.
60
+ Here we use an [HBox](/documentation/components/layout/hbox) to lay out two child components horizontally.
55
61
 
56
62
 
57
63
  ## Cleaner way to add children to containers
@@ -96,7 +102,7 @@ with some_named_context_manager() as this_is_my_name:
96
102
  print("some other code")
97
103
  ```
98
104
 
99
- Where the last example assigns the context manager to a variable. In Solara we only need to do that to the top context manager, since we need to return that in our [render function](/docs/understanding/anatomy).
105
+ Where the last example assigns the context manager to a variable. In Solara we only need to do that to the top context manager, since we need to return that in our [render function](/documentation/advanced/understanding/anatomy).
100
106
 
101
107
  All Reacton or Solara components return elements that can be used as context managers. Context managers allow for code to be executed before and after your code block inside of the context manager. This allows us to capture all elements created inside of the context manager. If you want to know more about context managers, consult the Python documentation since this is not Solara specific.
102
108
 
@@ -138,7 +144,7 @@ Page = FancyClickButton
138
144
  Instead of returning the main container, Solara also allows you to not have a return value (or return `None`).
139
145
  If that is the case, Solara will look at what elements you created. If you created one, that element will be taken
140
146
  as a return value instead. If you make more than one element, those elements will be automatically wrapped by
141
- a [Column](/api/column). The only benefit of returning an element, is that we can infer the correct return type,
147
+ a [Column](/documentation/components/layout/column). The only benefit of returning an element, is that we can infer the correct return type,
142
148
  which can be useful for testing purposes. Users should probably never return an element, but use the automatic
143
149
  container feature.
144
150
 
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Understanding different parts of Solara
3
+ description: Solara is made of two main components, the bulk of the Solara package with UI elements that can be used together with Jupyter, and Solara server, which
4
+ allows for these UI elements to be used in standalone apps and dashboards
5
+ ---
1
6
  # Solara
2
7
 
3
8
  Solara combines [ipywidgets](./ipywidgets), [reacton](./reacton) and puts it into a opinionated framework to make web apps with a focus on data (data apps for short).
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: Understanding routing in multi-page solara apps
3
+ description: Dive into Solara's routing, which provides a powerful way to compose multiple pages or dashboards into an integrated app.
4
+ ---
1
5
  # Routing
2
6
 
3
7
  Routing takes care of linking a web address (more specifically the [pathname](https://developer.mozilla.org/en-US/docs/Web/API/Location), e.g. "/docs/basics/solara") to a state of the UI,
@@ -13,15 +17,15 @@ Setting up routing can be repetitive, and therefore Solara comes also with a mor
13
17
 
14
18
  ### Based on a directory
15
19
 
16
- Using [`generate_routes_directory(path: Path) -> List[solara.Route]:`](/api/generate_routes_directory) we can request Solara to give us a list of
20
+ Using [`generate_routes_directory(path: Path) -> List[solara.Route]:`](/documentation/api/routing/generate_routes_directory) we can request Solara to give us a list of
17
21
  routes by scanning a directory for Python scripts, Notebooks and Markdown files.
18
22
 
19
- This function is being used by Solara if you run solara server with a directory as argument name, as used in [our Multi Page guide](/docs/howto/multipage). More details can be found there.
23
+ This function is being used by Solara if you run solara server with a directory as argument name, as used in [our Multi Page guide](/documentation/advanced/howto/multipage). More details can be found there.
20
24
 
21
25
 
22
26
  ### Based on a Python package
23
27
 
24
- Similar to the previous section [`generate_routes(module: ModuleType) -> List[solara.Route]:`](/api/generate_routes) will return a list of routes by scanning a Python package or module for `Page` components, or `app` elements. Again, more information can be found at [our Multi Page guide](/docs/howto/multipage).
28
+ Similar to the previous section [`generate_routes(module: ModuleType) -> List[solara.Route]:`](/documentation/api/routing/generate_routes) will return a list of routes by scanning a Python package or module for `Page` components, or `app` elements. Again, more information can be found at [our Multi Page guide](/documentation/advanced/howto/multipage).
25
29
 
26
30
  ## Manually defining routes
27
31
 
@@ -59,7 +63,7 @@ routes = [
59
63
 
60
64
  ### Defining route components
61
65
 
62
- If you do define a `Page` component, you are fully responsible for how routing is done, but we recommend using [use_route](/api/use_route).
66
+ If you do define a `Page` component, you are fully responsible for how routing is done, but we recommend using [use_route](/documentation/api/routing/use_route).
63
67
 
64
68
  An example route definition could be something like this:
65
69
 
@@ -180,9 +184,9 @@ routes = [
180
184
  ]
181
185
  ```
182
186
 
183
- In the case where you did not specify a `Page` component, label is used for the [Title](/api/title) component.
187
+ In the case where you did not specify a `Page` component, label is used for the [Title](/documentation/components/page/title) component.
184
188
 
185
- If you need to store more data in the route, you are free to put whatever you want in the `data` attribute, see also [Route](/api/route).
189
+ If you need to store more data in the route, you are free to put whatever you want in the `data` attribute, see also [Route](/documentation/api/routing/route).
186
190
 
187
191
 
188
192
 
@@ -194,14 +198,14 @@ Note that all routes are relative, since a component does not know if it is embe
194
198
  Therefore you should never use the `route.path` for navigation since the route object has no knowledge of the full url
195
199
  (e.g. `/docs/basics/ipywigets`) but only knows its small piece of the pathname (e.g. `ipywidgets`)
196
200
 
197
- Using [`resolve_path`](/api/resolve_path) we can request the full url for navigation.
201
+ Using [`resolve_path`](/documentation/api/routing/resolve_path) we can request the full url for navigation.
198
202
 
199
203
  ```python
200
204
  def resolve_path(path_or_route: Union[str, solara.Route], level=0) -> str:
201
205
  ...
202
206
  ```
203
207
 
204
- We can pass this full URL to the [`solara.Link`](/api/link) component, e.g. like:
208
+ We can pass this full URL to the [`solara.Link`](/documentation/components/advanced/link) component, e.g. like:
205
209
 
206
210
  ```python
207
211
  @solara.component
@@ -217,7 +221,7 @@ def LinkToIpywidgets():
217
221
 
218
222
  ## Fully manual routing
219
223
 
220
- If you want to do routing fully manually, you can use the [`solara.use_router`](/api/use_router) hook, and use the `.path` attribute.
224
+ If you want to do routing fully manually, you can use the [`solara.use_router`](/documentation/api/routing/use_router) hook, and use the `.path` attribute.
221
225
 
222
226
  ```python
223
227
  import solara
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Understanding the way Solara server works
3
+ description: Solara server enables running ipywidgets-based applications as standalone dashboards and apps, allowing multiple "Virtual kernels" to share
4
+ the same process for better performance and scalability.
5
+ ---
1
6
  # Solara server
2
7
 
3
8
  The solara server enables running ipywidgets based applications without a real Jupyter kernel, allowing multiple "Virtual kernels" to share the same process for better performance and scalability.
@@ -67,7 +72,7 @@ The JSON format may be subject to change.
67
72
 
68
73
  By default, solara runs in development mode. This means, it will:
69
74
 
70
- * Automatically [reload your project files](docs/reference/reloading) by watching files on the filesystemn
75
+ * Automatically [reload your project files](/documentation/getting_started/reference/reloading) by watching files on the filesystemn
71
76
  * Load debug version of the CSS files and JavaScript files for improved error messages (which leads to larger asset files).
72
77
 
73
78
  To disabled all of these option, pass the `--production` flag, or set the environment variable `SOLARA_MODE=production`.
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Working together with Voilà
3
+ description: Voilà, together with `voila-vuetify` is an alternative to Solara server. The most significant difference is that Voilà will start one kernel/process
4
+ per page request, while Solara server is more scalable.
5
+ ---
1
6
  # Voilà
2
7
 
3
8
  [Voilà](https://voila.readthedocs.io/) allows you to convert a Jupyter Notebook into an interactive dashboard that allows you to share your work with others.