solara 1.29.0__py2.py3-none-any.whl → 1.30.0__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 (284) hide show
  1. solara/__init__.py +5 -5
  2. solara/__main__.py +6 -2
  3. solara/autorouting.py +79 -38
  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 +1 -1
  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/link.py +3 -4
  20. solara/components/meta.py +1 -1
  21. solara/components/misc.py +5 -9
  22. solara/datatypes.py +2 -2
  23. solara/hooks/use_reactive.py +2 -2
  24. solara/lab/components/confirmation_dialog.py +1 -1
  25. solara/lab/components/tabs.py +6 -6
  26. solara/reactive.py +1 -1
  27. solara/routing.py +9 -8
  28. solara/server/app.py +44 -1
  29. solara/server/assets/style.css +6 -0
  30. solara/server/esm.py +28 -4
  31. solara/server/kernel_context.py +75 -7
  32. solara/server/patch.py +3 -0
  33. solara/server/reload.py +2 -2
  34. solara/server/server.py +3 -3
  35. solara/server/settings.py +1 -0
  36. solara/server/starlette.py +66 -33
  37. solara/server/static/solara_bootstrap.py +1 -1
  38. solara/server/templates/solara.html.j2 +62 -42
  39. solara/tasks.py +1 -6
  40. solara/util.py +23 -1
  41. solara/website/assets/custom.css +56 -0
  42. solara/website/components/__init__.py +1 -0
  43. solara/website/components/algolia_api.vue +157 -0
  44. solara/website/components/docs.py +118 -0
  45. solara/website/components/header.py +20 -10
  46. solara/website/components/hero.py +1 -1
  47. solara/website/pages/__init__.py +223 -20
  48. solara/website/pages/apps/jupyter-dashboard-1.py +1 -1
  49. solara/website/pages/apps/multipage/__init__.py +1 -1
  50. solara/website/pages/apps/multipage/page2.py +1 -1
  51. solara/website/pages/apps/scatter.py +21 -7
  52. solara/website/pages/changelog/__init__.py +8 -0
  53. solara/website/pages/{docs/content/95-changelog.md → changelog/changelog.md} +28 -2
  54. solara/website/pages/contact/__init__.py +8 -0
  55. solara/website/pages/documentation/__init__.py +184 -0
  56. solara/website/pages/documentation/advanced/__init__.py +36 -0
  57. solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
  58. solara/website/pages/{docs/content/10-howto/20-multipage.md → documentation/advanced/content/10-howto/10-multipage.md} +4 -5
  59. solara/website/pages/{docs/content/10-howto/30-layout.md → documentation/advanced/content/10-howto/20-layout.md} +21 -21
  60. solara/website/pages/{docs/content/10-howto/80-embed.md → documentation/advanced/content/10-howto/40-embed.md} +1 -1
  61. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md +1 -1
  62. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md +1 -1
  63. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/15-anatomy.md +2 -2
  64. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md +3 -3
  65. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/40-routing.md +9 -9
  66. solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md +1 -1
  67. solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/10-oauth.md +3 -3
  68. solara/website/pages/{docs/content/10-howto → documentation/advanced/content/40-development}/01-contribute.md +5 -5
  69. solara/website/pages/{docs/content/90-development → documentation/advanced/content/40-development}/10-setup.md +2 -2
  70. solara/website/pages/documentation/advanced/content/__init__.py +0 -0
  71. solara/website/pages/documentation/api/__init__.py +19 -0
  72. solara/website/pages/documentation/api/cross_filter/__init__.py +9 -0
  73. solara/website/pages/documentation/api/hooks/__init__.py +9 -0
  74. solara/website/pages/{api → documentation/api/hooks}/use_effect.md +3 -3
  75. solara/website/pages/{api → documentation/api/hooks}/use_effect.py +2 -1
  76. solara/website/pages/{api → documentation/api/hooks}/use_memo.md +2 -2
  77. solara/website/pages/{api → documentation/api/hooks}/use_memo.py +2 -1
  78. solara/website/pages/{api → documentation/api/hooks}/use_reactive.py +1 -2
  79. solara/website/pages/{api → documentation/api/hooks}/use_state.py +1 -2
  80. solara/website/pages/documentation/api/routing/__init__.py +9 -0
  81. solara/website/pages/{api → documentation/api/routing}/generate_routes.py +1 -2
  82. solara/website/pages/{api → documentation/api/routing}/generate_routes_directory.py +1 -2
  83. solara/website/pages/{api → documentation/api/routing}/use_route.py +2 -2
  84. solara/website/pages/{api → documentation/api/routing}/use_router.py +1 -2
  85. solara/website/pages/documentation/api/utilities/__init__.py +9 -0
  86. solara/website/pages/{api → documentation/api/utilities}/component_vue.py +1 -2
  87. solara/website/pages/{api → documentation/api/utilities}/computed.py +2 -2
  88. solara/website/pages/{api → documentation/api/utilities}/display.py +1 -2
  89. solara/website/pages/{api → documentation/api/utilities}/get_kernel_id.py +2 -2
  90. solara/website/pages/{api → documentation/api/utilities}/get_session_id.py +2 -2
  91. solara/website/pages/{api → documentation/api/utilities}/on_kernel_start.py +9 -3
  92. solara/website/pages/{api → documentation/api/utilities}/reactive.py +1 -2
  93. solara/website/pages/{api → documentation/api/utilities}/widget.py +2 -2
  94. solara/website/pages/documentation/components/__init__.py +12 -0
  95. solara/website/pages/documentation/components/advanced/__init__.py +9 -0
  96. solara/website/pages/documentation/components/data/__init__.py +9 -0
  97. solara/website/pages/documentation/components/enterprise/__init__.py +9 -0
  98. solara/website/pages/{api → documentation/components/enterprise}/avatar.py +1 -2
  99. solara/website/pages/{api → documentation/components/enterprise}/avatar_menu.py +1 -2
  100. solara/website/pages/documentation/components/input/__init__.py +9 -0
  101. solara/website/pages/{api → documentation/components/input}/checkbox.py +1 -2
  102. solara/website/pages/documentation/components/input/file_drop.py +75 -0
  103. solara/website/pages/{api → documentation/components/input}/input.py +1 -2
  104. solara/website/pages/{api → documentation/components/input}/select.py +1 -2
  105. solara/website/pages/{api → documentation/components/input}/slider.py +1 -2
  106. solara/website/pages/{api → documentation/components/input}/switch.py +1 -2
  107. solara/website/pages/{api → documentation/components/input}/togglebuttons.py +1 -2
  108. solara/website/pages/documentation/components/lab/__init__.py +9 -0
  109. solara/website/pages/{api → documentation/components/lab}/chat.py +2 -3
  110. solara/website/pages/{api → documentation/components/lab}/cookies_headers.py +1 -1
  111. solara/website/pages/{api → documentation/components/lab}/input_date.py +1 -2
  112. solara/website/pages/{api → documentation/components/lab}/menu.py +1 -2
  113. solara/website/pages/{api → documentation/components/lab}/task.py +1 -2
  114. solara/website/pages/{api → documentation/components/lab}/theming.py +1 -2
  115. solara/website/pages/{api → documentation/components/lab}/use_task.py +1 -2
  116. solara/website/pages/documentation/components/layout/__init__.py +9 -0
  117. solara/website/pages/{api → documentation/components/layout}/app_bar.py +1 -2
  118. solara/website/pages/{api → documentation/components/layout}/app_bar_title.py +1 -2
  119. solara/website/pages/{api → documentation/components/layout}/card.py +1 -2
  120. solara/website/pages/{api → documentation/components/layout}/card_actions.py +1 -2
  121. solara/website/pages/{api → documentation/components/layout}/griddraggable.py +1 -1
  122. solara/website/pages/{api → documentation/components/layout}/gridfixed.py +1 -1
  123. solara/website/pages/{api → documentation/components/layout}/hbox.py +1 -1
  124. solara/website/pages/{api → documentation/components/layout}/vbox.py +1 -1
  125. solara/website/pages/documentation/components/output/__init__.py +9 -0
  126. solara/website/pages/{api → documentation/components/output}/file_download.py +1 -2
  127. solara/website/pages/{api → documentation/components/output}/image.py +1 -2
  128. solara/website/pages/{api → documentation/components/output}/tooltip.py +1 -2
  129. solara/website/pages/documentation/components/page/__init__.py +9 -0
  130. solara/website/pages/documentation/components/status/__init__.py +9 -0
  131. solara/website/pages/{api → documentation/components/status}/error.py +3 -3
  132. solara/website/pages/{api → documentation/components/status}/info.py +3 -3
  133. solara/website/pages/{api → documentation/components/status}/progress.py +1 -2
  134. solara/website/pages/{api → documentation/components/status}/spinner.py +1 -2
  135. solara/website/pages/{api → documentation/components/status}/success.py +3 -3
  136. solara/website/pages/{api → documentation/components/status}/warning.py +3 -3
  137. solara/website/pages/documentation/components/viz/__init__.py +9 -0
  138. solara/website/pages/{api → documentation/components/viz}/plotly.py +1 -0
  139. solara/website/pages/{examples → documentation/examples}/__init__.py +3 -43
  140. solara/website/pages/{examples → documentation/examples}/general/deploy_model.py +3 -3
  141. solara/website/pages/{examples → documentation/examples}/general/login_oauth.py +1 -1
  142. solara/website/pages/{examples → documentation/examples}/general/vue_component.py +1 -2
  143. solara/website/pages/{examples → documentation/examples}/libraries/altair.py +2 -3
  144. solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet_advanced.py +1 -1
  145. solara/website/pages/{examples → documentation/examples}/utilities/countdown_timer.py +1 -1
  146. solara/website/pages/{examples → documentation/examples}/visualization/plotly.py +1 -2
  147. solara/website/pages/documentation/faq/__init__.py +11 -0
  148. solara/website/pages/{docs → documentation/getting_started}/__init__.py +7 -1
  149. solara/website/pages/{docs/content/03-quickstart.md → documentation/getting_started/content/00-quickstart.md} +2 -2
  150. solara/website/pages/{docs/content/00-introduction.md → documentation/getting_started/content/01-introduction.md} +16 -16
  151. solara/website/pages/{docs → documentation/getting_started}/content/02-installing.md +1 -1
  152. solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +9 -0
  153. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/20-web-app.md +4 -4
  154. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/30-ipywidgets.md +9 -9
  155. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/40-streamlit.md +13 -13
  156. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/50-dash.md +3 -3
  157. solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_data_science.ipynb +5 -5
  158. solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +7 -0
  159. solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/10-components.md +2 -2
  160. solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/50-state-management.md +3 -3
  161. solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +3 -0
  162. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/41-asset-files.md +1 -1
  163. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/60-static-site-generation.md +1 -1
  164. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/70-search.md +1 -1
  165. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/80-reloading.md +3 -3
  166. solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/95-caching.md +1 -1
  167. solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +3 -0
  168. solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/10-self-hosted.md +3 -3
  169. solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/20-cloud-hosted.md +1 -1
  170. solara/website/pages/documentation/getting_started/content/__init__.py +0 -0
  171. solara/website/pages/showcase/__init__.py +1 -1
  172. solara/website/pages/showcase/domino_code_assist.py +1 -1
  173. solara/website/pages/showcase/solara_dev.py +1 -1
  174. solara/website/public/social/discord.svg +1 -0
  175. solara/website/public/social/github.svg +1 -0
  176. solara/website/public/social/twitter.svg +3 -0
  177. {solara-1.29.0.dist-info → solara-1.30.0.dist-info}/METADATA +8 -7
  178. solara-1.30.0.dist-info/RECORD +438 -0
  179. {solara-1.29.0.dist-info → solara-1.30.0.dist-info}/WHEEL +1 -1
  180. solara/website/pages/api/__init__.py +0 -292
  181. solara/website/pages/api/default_layout.py +0 -16
  182. solara/website/pages/api/file_drop.py +0 -36
  183. solara/website/pages/docs/content/04-tutorial/00-overview.md +0 -9
  184. solara/website/pages/docs/content/07-fundamentals/00-overview.md +0 -7
  185. solara/website/pages/docs/content/15-reference/00-overview.md +0 -6
  186. solara/website/pages/docs/content/30-deploying/00-overview.md +0 -3
  187. solara-1.29.0.data/data/prefix/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -7
  188. solara-1.29.0.data/data/prefix/etc/jupyter/jupyter_server_config.d/solara.json +0 -7
  189. solara-1.29.0.dist-info/RECORD +0 -413
  190. /solara/website/pages/{docs/content/99-contact.md → contact/contact.md} +0 -0
  191. /solara/website/pages/{docs → documentation/advanced}/content/10-howto/00-overview.md +0 -0
  192. /solara/website/pages/{docs/content/10-howto/50-testing.md → documentation/advanced/content/10-howto/30-testing.md} +0 -0
  193. /solara/website/pages/{docs/content/10-howto/51-debugging.md → documentation/advanced/content/10-howto/31-debugging.md} +0 -0
  194. /solara/website/pages/{docs/content/10-howto/ipywidget_libraries.md → documentation/advanced/content/10-howto/50-ipywidget_libraries.md} +0 -0
  195. /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/00-introduction.md +0 -0
  196. /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/05-ipywidgets.md +0 -0
  197. /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/10-reacton.md +0 -0
  198. /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/17-rules-of-hooks.md +0 -0
  199. /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/20-solara.md +0 -0
  200. /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/60-voila.md +0 -0
  201. /solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/00-overview.md +0 -0
  202. /solara/website/pages/{docs/content/__init__.py → documentation/advanced/content/40-development/00-overview.md} +0 -0
  203. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_dataframe.py +0 -0
  204. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_report.py +0 -0
  205. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_select.py +0 -0
  206. /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_slider.py +0 -0
  207. /solara/website/pages/{api → documentation/api/hooks}/use_cross_filter.py +0 -0
  208. /solara/website/pages/{api → documentation/api/hooks}/use_dark_effective.py +0 -0
  209. /solara/website/pages/{api → documentation/api/hooks}/use_exception.py +0 -0
  210. /solara/website/pages/{api → documentation/api/hooks}/use_previous.py +0 -0
  211. /solara/website/pages/{api → documentation/api/hooks}/use_state_or_update.py +0 -0
  212. /solara/website/pages/{api → documentation/api/hooks}/use_thread.md +0 -0
  213. /solara/website/pages/{api → documentation/api/hooks}/use_thread.py +0 -0
  214. /solara/website/pages/{api → documentation/api/hooks}/use_trait_observe.py +0 -0
  215. /solara/website/pages/{api → documentation/api/routing}/resolve_path.py +0 -0
  216. /solara/website/pages/{api → documentation/api/routing}/route.py +0 -0
  217. /solara/website/pages/{api → documentation/api/utilities}/memoize.py +0 -0
  218. /solara/website/pages/{api → documentation/components/advanced}/link.py +0 -0
  219. /solara/website/pages/{api → documentation/components/advanced}/meta.py +0 -0
  220. /solara/website/pages/{api → documentation/components/advanced}/style.py +0 -0
  221. /solara/website/pages/{api → documentation/components}/common.py +0 -0
  222. /solara/website/pages/{api → documentation/components/data}/dataframe.py +0 -0
  223. /solara/website/pages/{api → documentation/components/data}/pivot_table.py +0 -0
  224. /solara/website/pages/{api → documentation/components/input}/button.py +0 -0
  225. /solara/website/pages/{api → documentation/components/input}/file_browser.py +0 -0
  226. /solara/website/pages/{api → documentation/components/lab}/confirmation_dialog.py +0 -0
  227. /solara/website/pages/{api → documentation/components/lab}/tab.py +0 -0
  228. /solara/website/pages/{api → documentation/components/lab}/tabs.py +0 -0
  229. /solara/website/pages/{api → documentation/components/layout}/app_layout.py +0 -0
  230. /solara/website/pages/{api → documentation/components/layout}/column.py +0 -0
  231. /solara/website/pages/{api → documentation/components/layout}/columns.py +0 -0
  232. /solara/website/pages/{api → documentation/components/layout}/columns_responsive.py +0 -0
  233. /solara/website/pages/{api → documentation/components/layout}/row.py +0 -0
  234. /solara/website/pages/{api → documentation/components/layout}/sidebar.py +0 -0
  235. /solara/website/pages/{api → documentation/components/output}/html.py +0 -0
  236. /solara/website/pages/{api → documentation/components/output}/markdown.py +0 -0
  237. /solara/website/pages/{api → documentation/components/output}/markdown_editor.py +0 -0
  238. /solara/website/pages/{api → documentation/components/output}/sql_code.py +0 -0
  239. /solara/website/pages/{api → documentation/components/page}/head.py +0 -0
  240. /solara/website/pages/{api → documentation/components/page}/title.py +0 -0
  241. /solara/website/pages/{api → documentation/components/viz}/altair.py +0 -0
  242. /solara/website/pages/{api → documentation/components/viz}/echarts.py +0 -0
  243. /solara/website/pages/{api → documentation/components/viz}/matplotlib.py +0 -0
  244. /solara/website/pages/{api → documentation/components/viz}/plotly_express.py +0 -0
  245. /solara/website/pages/{examples → documentation/examples}/ai/__init__.py +0 -0
  246. /solara/website/pages/{examples → documentation/examples}/ai/chatbot.py +0 -0
  247. /solara/website/pages/{examples → documentation/examples}/ai/tokenizer.py +0 -0
  248. /solara/website/pages/{examples → documentation/examples}/basics/__init__.py +0 -0
  249. /solara/website/pages/{examples → documentation/examples}/basics/sine.py +0 -0
  250. /solara/website/pages/{examples → documentation/examples}/fullscreen/__init__.py +0 -0
  251. /solara/website/pages/{examples → documentation/examples}/fullscreen/authorization.py +0 -0
  252. /solara/website/pages/{examples → documentation/examples}/fullscreen/layout_demo.py +0 -0
  253. /solara/website/pages/{examples → documentation/examples}/fullscreen/multipage.py +0 -0
  254. /solara/website/pages/{examples → documentation/examples}/fullscreen/scatter.py +0 -0
  255. /solara/website/pages/{examples → documentation/examples}/fullscreen/scrolling.py +0 -0
  256. /solara/website/pages/{examples → documentation/examples}/fullscreen/tutorial_streamlit.py +0 -0
  257. /solara/website/pages/{examples → documentation/examples}/general/__init__.py +0 -0
  258. /solara/website/pages/{examples → documentation/examples}/general/custom_storage.py +0 -0
  259. /solara/website/pages/{examples → documentation/examples}/general/live_update.py +0 -0
  260. /solara/website/pages/{examples → documentation/examples}/general/mycard.vue +0 -0
  261. /solara/website/pages/{examples → documentation/examples}/general/pokemon_search.py +0 -0
  262. /solara/website/pages/{examples → documentation/examples}/ipycanvas.py +0 -0
  263. /solara/website/pages/{examples → documentation/examples}/libraries/__init__.py +0 -0
  264. /solara/website/pages/{examples → documentation/examples}/libraries/bqplot.py +0 -0
  265. /solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet.py +0 -0
  266. /solara/website/pages/{examples → documentation/examples}/utilities/__init__.py +0 -0
  267. /solara/website/pages/{examples → documentation/examples}/utilities/calculator.py +0 -0
  268. /solara/website/pages/{examples → documentation/examples}/utilities/todo.py +0 -0
  269. /solara/website/pages/{examples → documentation/examples}/visualization/__init__.py +0 -0
  270. /solara/website/pages/{examples → documentation/examples}/visualization/annotator.py +0 -0
  271. /solara/website/pages/{examples → documentation/examples}/visualization/linked_views.py +0 -0
  272. /solara/website/pages/{docs → documentation/faq}/content/99-faq.md +0 -0
  273. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/10_data_science.py +0 -0
  274. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/60-jupyter-dashboard-part1.py +0 -0
  275. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/SF_crime_sample.csv.gz +0 -0
  276. /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_jupyter_dashboard_1.ipynb +0 -0
  277. /solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/40-static_files.md +0 -0
  278. /solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/90-notebook-support.md +0 -0
  279. /solara/website/pages/{docs/content/lab → documentation/getting_started/content/08-lab}/00-what-is-lab.md +0 -0
  280. /solara/website/pages/{docs → documentation/getting_started}/content/90-troubleshoot.md +0 -0
  281. {solara-1.29.0.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
  282. {solara-1.29.0.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
  283. {solara-1.29.0.dist-info → solara-1.30.0.dist-info}/entry_points.txt +0 -0
  284. {solara-1.29.0.dist-info → solara-1.30.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,118 @@
1
+ import solara
2
+ from solara.alias import rv
3
+
4
+
5
+ @solara.component
6
+ def Gallery(route_external=None):
7
+ if route_external is not None:
8
+ route_current = route_external
9
+ else:
10
+ # show a gallery of all the examples
11
+ router = solara.use_router()
12
+ route_current = router.path_routes[-2]
13
+
14
+ with solara.Column(gap="75px", align="center"):
15
+ with solara.Row(justify="center", gap="30px", style={"margin": "30px 0 !important", "flex-wrap": "wrap", "align-items": "start", "row-gap": "30px"}):
16
+ for child in route_current.children:
17
+ if child.path == "/":
18
+ continue
19
+ with solara.v.Html(tag="a", attributes={"href": "#" + child.path}):
20
+ solara.Button(
21
+ child.label,
22
+ color="primary",
23
+ classes=["v-btn--rounded", "v-size--x-large"],
24
+ )
25
+
26
+ with solara.Column(gap="75px", style={"padding-bottom": "75px"}):
27
+ for route in route_current.children:
28
+ if route.children:
29
+ with solara.Column(classes=["subcategory-row", "ps-md-10"]):
30
+ solara.HTML(tag="h2", unsafe_innerHTML=route.label, attributes={"id": route.path}, style="padding-left: 10%;")
31
+ with solara.Row(justify="center", gap="20px", style={"flex-wrap": "wrap", "row-gap": "20px", "max-width": "90rem"}):
32
+ for child in route.children:
33
+ if child.path == "/":
34
+ continue
35
+ path = route.path + "/" + child.path
36
+ if child.path in [
37
+ "button",
38
+ "checkbox",
39
+ "confirmation_dialog",
40
+ "echarts",
41
+ "file_browser",
42
+ "file_download",
43
+ "matplotlib",
44
+ "select",
45
+ "switch",
46
+ "tooltip",
47
+ ]:
48
+ image_url = "https://dxhl76zpt6fap.cloudfront.net/public/api/" + child.path + ".gif"
49
+ elif child.path in ["card", "dataframe", "pivot_table", "slider"]:
50
+ image_url = "https://dxhl76zpt6fap.cloudfront.net/public/api/" + child.path + ".png"
51
+ else:
52
+ image_url = "https://dxhl76zpt6fap.cloudfront.net/public/logo.svg"
53
+
54
+ if path:
55
+ path = path if route_external is None else route_current.path + "/" + path
56
+ title = solara.Link(path, children=[child.label])
57
+ with solara.Card(title, classes=["component-card"], margin=0):
58
+ with solara.Column(align="center"):
59
+ with solara.Link(path):
60
+ solara.Image(image_url, width="12rem")
61
+
62
+
63
+ @solara.component
64
+ def NoPage():
65
+ raise RuntimeError("This page should not be rendered")
66
+
67
+
68
+ @solara.component
69
+ def WithCode(module):
70
+ component = getattr(module, "Page", None)
71
+ with rv.Sheet() as main:
72
+ # It renders code better
73
+ solara.Markdown(
74
+ module.__doc__ or "# no docs yet",
75
+ unsafe_solara_execute=True,
76
+ )
77
+ if component and component != NoPage:
78
+ with solara.Card("Example", margin=0, classes=["mt-8"]):
79
+ component()
80
+ github_url = solara.util.github_url(module.__file__)
81
+ solara.Button(
82
+ label="View source",
83
+ icon_name="mdi-github-circle",
84
+ attributes={"href": github_url, "target": "_blank"},
85
+ text=True,
86
+ outlined=True,
87
+ class_="mt-8",
88
+ )
89
+ return main
90
+
91
+
92
+ @solara.component
93
+ def SubCategoryLayout(children=[]):
94
+ route_current, all_routes = solara.use_route()
95
+ if route_current is None:
96
+ return solara.Error("Page not found")
97
+ elif route_current.path == "/":
98
+ return solara.Error("Not supposed to be rendered")
99
+ elif route_current.module:
100
+ WithCode(route_current.module)
101
+ else:
102
+ with solara.Column(align="center", children=children, style={"flex-grow": 1, "padding": "0"}) as main:
103
+ pass
104
+ return main
105
+
106
+
107
+ @solara.component
108
+ def CategoryLayout(children=[]):
109
+ route_current, all_routes = solara.use_route()
110
+ if route_current is None:
111
+ return solara.Error("Page not found")
112
+
113
+ if route_current.path == "/":
114
+ return Gallery()
115
+ else:
116
+ with solara.Column(align="stretch", style={"width": "1024px", "flex-grow": 1}, children=children) as main:
117
+ pass
118
+ return main
@@ -6,8 +6,8 @@ from solara.alias import rv
6
6
  from solara.server import settings
7
7
 
8
8
 
9
- @solara._component_vue("algolia.vue")
10
- def Algolia(app_id: str, index_name: str, api_key: str, debug=False):
9
+ @solara.component_vue("algolia_api.vue")
10
+ def Algolia():
11
11
  pass
12
12
 
13
13
 
@@ -18,6 +18,7 @@ def Header(
18
18
  ):
19
19
  # use routes of parent (assuming we are a child of a layout)
20
20
  route_current, all_routes = solara.use_route(level=-1)
21
+ route_current_with_children, all_routes_with_children = solara.use_route()
21
22
  router = solara.use_router()
22
23
  dark_effective = solara.lab.use_dark_effective()
23
24
 
@@ -28,7 +29,7 @@ def Header(
28
29
  "div",
29
30
  unsafe_innerHTML="<a href='https://github.com/widgetti/solara' target='_blank' >Star us on github 🤩</a>",
30
31
  )
31
- with rv.AppBar(tag="header", flat=True, class_="bg-primary-fade padding-40", height="auto"):
32
+ with solara.v.AppBar(tag="header", flat=True, class_="bg-primary-fade padding-40", height="auto", clipped_left=True):
32
33
  with rv.ToolbarTitle(class_="d-flex", style_="align-items:center"):
33
34
  if route_current and len(route_current.children) > 0:
34
35
  with solara.Button(icon=True, class_="hidden-md-and-up", on_click=lambda: on_toggle_left_menu and on_toggle_left_menu()):
@@ -37,15 +38,24 @@ def Header(
37
38
  solara.Image(router.root_path + f"/static/assets/images/logo{'_white' if dark_effective else ''}.svg")
38
39
  rv.Spacer()
39
40
 
40
- if settings.search.enabled:
41
- from solara_enterprise.search.search import Search
41
+ if (
42
+ route_current_with_children is not None
43
+ and route_current is not None
44
+ and route_current.path == "documentation"
45
+ and route_current_with_children.path == "/"
46
+ ):
47
+ solara.v.Spacer()
48
+ else:
49
+ if settings.search.enabled:
50
+ from solara_enterprise.search.search import Search
42
51
 
43
- Search()
44
- Algolia(app_id="9KW9L7O5EQ", api_key="ef7495102afff1e16d1b7cf6ec2ab2d0", index_name="solara", debug=True)
45
- # menu
52
+ Search()
53
+ else:
54
+ with solara.Row(justify="end", style={"align-items": "center", "flex-grow": "1", "background-color": "transparent"}):
55
+ Algolia()
46
56
  with rv.Html(tag="ul", class_="main-menu menu d-none d-md-flex"):
47
57
  for route in all_routes:
48
- if route.path == "apps":
58
+ if route.path in ["apps", "contact", "changelog"]:
49
59
  continue
50
60
  current = route_current == route
51
61
  with rv.Html(tag="li", class_="active" if current else None):
@@ -53,7 +63,7 @@ def Header(
53
63
  with rv.Btn(icon=True, tag="a", class_="d-none d-md-flex", attributes={"href": solara.github_url, "target": "_blank"}):
54
64
  rv.Icon(children=["mdi-github-circle"])
55
65
 
56
- with rv.Btn(icon=True, tag="a", class_="d-none d-md-flex", attributes={"href": "https://discord.gg/dm4GKNDjXN", "target": "_blank"}):
66
+ with rv.Btn(icon=True, tag="a", class_="d-none d-md-flex", attributes={"href": "https://discord.solara.dev", "target": "_blank"}):
57
67
  rv.Icon(children=["mdi-discord"])
58
68
 
59
69
  solara.lab.ThemeToggle()
@@ -10,6 +10,6 @@ def Hero(title, sub_title, button_text):
10
10
  with rv.Col(md=8, offset_md=2, sm=10, offset_sm=1):
11
11
  rv.Html(tag="h1", children=[title], class_="mb-4"),
12
12
  solara.HTML(tag="div", unsafe_innerHTML=f"<h2>{sub_title}</h2>", class_="mb-4"),
13
- with solara.Link("/docs/quickstart"):
13
+ with solara.Link("/documentation/getting_started"):
14
14
  solara.Button(label=button_text, elevation=0, large=True, class_="btn-size--xlarge solara-docs-button")
15
15
  return main
@@ -3,13 +3,208 @@ import contextlib
3
3
  import solara
4
4
  from solara.alias import rv
5
5
  from solara.components.title import Title
6
+ from solara.server import server
6
7
 
7
8
  from ..components import Header, Hero
8
9
  from ..components.mailchimp import MailChimp
9
10
 
10
11
  title = "Home"
11
12
 
12
- route_order = ["/", "showcase", "docs", "api", "examples", "apps"]
13
+ route_order = ["/", "showcase", "documentation", "apps", "contact", "changelog"]
14
+
15
+
16
+ server._redirects = {
17
+ "/docs": "/documentation/getting_started/introduction",
18
+ "/docs/installing": "/documentation/getting_started/installing",
19
+ "/docs/quickstart": "/documentation/getting_started",
20
+ "/docs/tutorial": "/documentation/getting_started/tutorials",
21
+ "/docs/tutorial/data-science": "/documentation/getting_started/tutorials/data-science",
22
+ "/docs/tutorial/web-app": "/documentation/getting_started/tutorials/web-app",
23
+ "/docs/tutorial/ipywidgets": "/documentation/getting_started/tutorials/ipywidgets",
24
+ "/docs/tutorial/streamlit": "/documentation/getting_started/tutorials/streamlit",
25
+ "/docs/tutorial/dash": "/documentation/getting_started/tutorials/dash",
26
+ "/docs/tutorial/jupyter-dashboard-part1": "/documentation/getting_started/tutorials/jupyter-dashboard-part1",
27
+ "/docs/fundamentals": "/documentation/getting_started/fundamentals",
28
+ "/docs/fundamentals/components": "/documentation/getting_started/fundamentals/components",
29
+ "/docs/fundamentals/state-management": "/documentation/getting_started/fundamentals/state-management",
30
+ "/docs/howto": "/documentation/advanced/howto",
31
+ "/docs/howto/contribute": "/documentation/advanced/development/contribute",
32
+ "/docs/howto/multipage": "/documentation/advanced/howto/multipage",
33
+ "/docs/howto/layout": "/documentation/advanced/howto/layout",
34
+ "/docs/howto/testing": "/documentation/advanced/howto/testing",
35
+ "/docs/howto/debugging": "/documentation/advanced/howto/debugging",
36
+ "/docs/howto/embed": "/documentation/advanced/howto/embed",
37
+ "/docs/howto/ipywidget-libraries": "/documentation/advanced/howto/ipywidget-libraries",
38
+ "/docs/reference": "/documentation/getting_started/reference",
39
+ "/docs/reference/static-files": "/documentation/getting_started/reference/static-files",
40
+ "/docs/reference/asset-files": "/documentation/getting_started/reference/asset-files",
41
+ "/docs/reference/static-site-generation": "/documentation/getting_started/reference/static-site-generation",
42
+ "/docs/reference/search": "/documentation/getting_started/reference/search",
43
+ "/docs/reference/reloading": "/documentation/getting_started/reference/reloading",
44
+ "/docs/reference/notebook-support": "/documentation/getting_started/reference/notebook-support",
45
+ "/docs/reference/caching": "/documentation/getting_started/reference/caching",
46
+ "/docs/understanding": "/documentation/advanced/understanding",
47
+ "/docs/understanding/ipywidgets": "/documentation/advanced/understanding/ipywidgets",
48
+ "/docs/understanding/ipyvuetify": "/documentation/advanced/understanding/ipyvuetify",
49
+ "/docs/understanding/reacton": "/documentation/advanced/understanding/reacton",
50
+ "/docs/understanding/reacton-basics": "/documentation/advanced/understanding/reacton-basics",
51
+ "/docs/understanding/anatomy": "/documentation/advanced/understanding/anatomy",
52
+ "/docs/understanding/rules-of-hooks": "/documentation/advanced/understanding/rules-of-hooks",
53
+ "/docs/understanding/containers": "/documentation/advanced/understanding/containers",
54
+ "/docs/understanding/solara": "/documentation/advanced/understanding/solara",
55
+ "/docs/understanding/routing": "/documentation/advanced/understanding/routing",
56
+ "/docs/understanding/solara-server": "/documentation/advanced/understanding/solara-server",
57
+ "/docs/understanding/voila": "/documentation/advanced/understanding/voila",
58
+ "/docs/deploying": "/documentation/getting_started/deploying",
59
+ "/docs/deploying/self-hosted": "/documentation/getting_started/deploying/self-hosted",
60
+ "/docs/deploying/cloud-hosted": "/documentation/getting_started/deploying/cloud-hosted",
61
+ "/docs/enterprise": "/documentation/advanced/enterprise",
62
+ "/docs/enterprise/oauth": "/documentation/advanced/enterprise/oauth",
63
+ "/docs/development": "/documentation/advanced/development/setup",
64
+ "/docs/troubleshoot": "/documentation/getting_started/troubleshoot",
65
+ "/docs/changelog": "/changelog",
66
+ "/docs/contact": "/contact",
67
+ "/docs/faq": "/documentation/faq",
68
+ "/docs/lab": "/documentation/getting_started/lab",
69
+ "/api": "/documentation/api",
70
+ "/api/altair": "/documentation/components/viz/altair",
71
+ "/api/app_bar": "/documentation/components/layout/app_bar",
72
+ "/api/app_bar_title": "/documentation/components/layout/app_bar_title",
73
+ "/api/app_layout": "/documentation/components/layout/app_layout",
74
+ "/api/avatar": "/documentation/components/enterprise/avatar",
75
+ "/api/avatar_menu": "/documentation/components/enterprise/avatar_menu",
76
+ "/api/card": "/documentation/components/layout/card",
77
+ "/api/card_actions": "/documentation/components/layout/card_actions",
78
+ "/api/column": "/documentation/components/layout/column",
79
+ "/api/columns": "/documentation/components/layout/columns",
80
+ "/api/columns_responsive": "/documentation/components/layout/columns_responsive",
81
+ "/api/cross_filter_dataframe": "/documentation/api/cross_filter/cross_filter_dataframe",
82
+ "/api/cross_filter_report": "/documentation/api/cross_filter/cross_filter_report",
83
+ "/api/cross_filter_select": "/documentation/api/cross_filter/cross_filter_select",
84
+ "/api/cross_filter_slider": "/documentation/api/cross_filter/cross_filter_slider",
85
+ "/api/generate_routes": "/documentation/api/routing/generate_routes",
86
+ "/api/generate_routes_directory": "/documentation/api/routing/generate_routes_directory",
87
+ "/api/resolve_path": "/documentation/api/routing/resolve_path",
88
+ "/api/resolve_path/kiwi": "/documentation/api/routing/resolve_path/kiwi",
89
+ "/api/resolve_path/banana": "/documentation/api/routing/resolve_path/banana",
90
+ "/api/resolve_path/apple": "/documentation/api/routing/resolve_path/apple",
91
+ "/api/link": "/documentation/components/advanced/link",
92
+ "/api/link/kiwi": "/documentation/components/advanced/link/kiwi",
93
+ "/api/link/banana": "/documentation/components/advanced/link/banana",
94
+ "/api/link/apple": "/documentation/components/advanced/link/apple",
95
+ "/api/use_route": "/documentation/api/routing/use_route",
96
+ "/api/use_route/fruit": "/documentation/api/routing/use_route/fruit",
97
+ "/api/use_route/fruit/kiwi": "/documentation/api/routing/use_route/fruit/kiwi",
98
+ "/api/use_route/fruit/banana": "/documentation/api/routing/use_route/fruit/banana",
99
+ "/api/use_route/fruit/apple": "/documentation/api/routing/use_route/fruit/apple",
100
+ "/api/use_router": "/documentation/api/routing/use_router",
101
+ "/api/use_cross_filter": "/documentation/api/hooks/use_cross_filter",
102
+ "/api/use_dark_effective": "/documentation/api/hooks/use_dark_effective",
103
+ "/api/use_effect": "/documentation/api/hooks/use_effect",
104
+ "/api/use_exception": "/documentation/api/hooks/use_exception",
105
+ "/api/use_memo": "/documentation/api/hooks/use_memo",
106
+ "/api/use_previous": "/documentation/api/hooks/use_previous",
107
+ "/api/use_reactive": "/documentation/api/hooks/use_reactive",
108
+ "/api/use_state": "/documentation/api/hooks/use_state",
109
+ "/api/use_state_or_update": "/documentation/api/hooks/use_state_or_update",
110
+ "/api/use_task": "/documentation/components/lab/use_task",
111
+ "/api/use_thread": "/documentation/api/hooks/use_thread",
112
+ "/api/use_trait_observe": "/documentation/api/hooks/use_trait_observe",
113
+ "/examples/fullscreen": "/documentation/examples/fullscreen",
114
+ "/examples/fullscreen/authorization": "/documentation/examples/fullscreen/authorization",
115
+ "/examples/fullscreen/layout_demo": "/documentation/examples/fullscreen/layout_demo",
116
+ "/examples/fullscreen/multipage": "/documentation/examples/fullscreen/multipage",
117
+ "/examples/fullscreen/scatter": "/documentation/examples/fullscreen/scatter",
118
+ "/examples/fullscreen/scrolling": "/documentation/examples/fullscreen/scrolling",
119
+ "/examples/fullscreen/tutorial_streamlit": "/documentation/examples/fullscreen/tutorial_streamlit",
120
+ "/api/route": "/documentation/api/routing/route",
121
+ "/api/route/kiwi": "/documentation/api/routing/route/kiwi",
122
+ "/api/route/banana": "/documentation/api/routing/route/banana",
123
+ "/api/route/apple": "/documentation/api/routing/route/apple",
124
+ "/examples/libraries": "/documentation/examples/libraries",
125
+ "/examples/libraries/altair": "/documentation/examples/libraries/altair",
126
+ "/examples/libraries/bqplot": "/documentation/examples/libraries/bqplot",
127
+ "/examples/libraries/ipyleaflet": "/documentation/examples/libraries/ipyleaflet",
128
+ "/examples/libraries/ipyleaflet_advanced": "/documentation/examples/libraries/ipyleaflet_advanced",
129
+ "/examples/utilities": "/documentation/examples/utilities",
130
+ "/examples/utilities/calculator": "/documentation/examples/utilities/calculator",
131
+ "/examples/utilities/countdown_timer": "/documentation/examples/utilities/countdown_timer",
132
+ "/examples/utilities/todo": "/documentation/examples/utilities/todo",
133
+ "/examples/visualization": "/documentation/examples/visualization",
134
+ "/examples/visualization/annotator": "/documentation/examples/visualization/annotator",
135
+ "/examples/visualization/linked_views": "/documentation/examples/visualization/linked_views",
136
+ "/examples/visualization/plotly": "/documentation/examples/visualization/plotly",
137
+ "/examples/general": "/documentation/examples/general",
138
+ "/examples/general/custom_storage": "/documentation/examples/general/custom_storage",
139
+ "/examples/general/deploy_model": "/documentation/examples/general/deploy_model",
140
+ "/examples/general/live_update": "/documentation/examples/general/live_update",
141
+ "/examples/general/login_oauth": "/documentation/examples/general/login_oauth",
142
+ "/examples/general/pokemon_search": "/documentation/examples/general/pokemon_search",
143
+ "/examples/general/vue_component": "/documentation/examples/general/vue_component",
144
+ "/examples": "/documentation/examples",
145
+ "/examples/ai": "/documentation/examples/ai",
146
+ "/examples/ai/chatbot": "/documentation/examples/ai/chatbot",
147
+ "/examples/ai/tokenizer": "/documentation/examples/ai/tokenizer",
148
+ "/examples/basics": "/documentation/examples/basics",
149
+ "/examples/basics/sine": "/documentation/examples/basics/sine",
150
+ "/api/get_kernel_id": "/documentation/api/utilities/get_kernel_id",
151
+ "/api/get_session_id": "/documentation/api/utilities/get_session_id",
152
+ "/api/on_kernel_start": "/documentation/api/utilities/on_kernel_start",
153
+ "/api/component_vue": "/documentation/api/utilities/component_vue",
154
+ "/api/plotly": "/documentation/components/viz/plotly",
155
+ "/api/plotly_express": "/documentation/components/viz/plotly_express",
156
+ "/api/tab": "/documentation/components/lab/tab",
157
+ "/api/tabs": "/documentation/components/lab/tabs",
158
+ "/api/task": "/documentation/components/lab/task",
159
+ "/api/computed": "/documentation/api/utilities/computed",
160
+ "/api/markdown": "/documentation/components/output/markdown",
161
+ "/api/markdown_editor": "/documentation/components/output/markdown_editor",
162
+ "/api/matplotlib": "/documentation/components/viz/matplotlib",
163
+ "/api/echarts": "/documentation/components/viz/echarts",
164
+ "/api/theming": "/documentation/components/lab/theming",
165
+ "/api/griddraggable": "/documentation/components/layout/griddraggable",
166
+ "/api/gridfixed": "/documentation/components/layout/gridfixed",
167
+ "/api/html": "/documentation/components/output/html",
168
+ "/api/file_download": "/documentation/components/output/file_download",
169
+ "/api/hbox": "/documentation/components/layout/hbox",
170
+ "/api/vbox": "/documentation/components/layout/vbox",
171
+ "/api/sidebar": "/documentation/components/layout/sidebar",
172
+ "/api/row": "/documentation/components/layout/row",
173
+ "/api/error": "/documentation/components/status/error",
174
+ "/api/info": "/documentation/components/status/info",
175
+ "/api/progress": "/documentation/components/status/progress",
176
+ "/api/spinner": "/documentation/components/status/spinner",
177
+ "/api/success": "/documentation/components/status/success",
178
+ "/api/warning": "/documentation/components/status/warning",
179
+ "/api/image": "/documentation/components/output/image",
180
+ "/api/sql_code": "/documentation/components/output/sql_code",
181
+ "/api/tooltip": "/documentation/components/output/tooltip",
182
+ "/api/chat": "/documentation/components/lab/chat",
183
+ "/api/confirmation_dialog": "/documentation/components/lab/confirmation_dialog",
184
+ "/api/cookies_headers": "/documentation/components/lab/cookies_headers",
185
+ "/api/input_date": "/documentation/components/lab/input_date",
186
+ "/api/button": "/documentation/components/input/button",
187
+ "/api/checkbox": "/documentation/components/input/checkbox",
188
+ "/api/file_browser": "/documentation/components/input/file_browser",
189
+ "/api/file_drop": "/documentation/components/input/file_drop",
190
+ "/api/meta": "/documentation/components/advanced/meta",
191
+ "/api/style": "/documentation/components/advanced/style",
192
+ "/api/menu": "/documentation/components/lab/menu",
193
+ "/api/head": "/documentation/components/page/head",
194
+ "/api/input": "/documentation/components/input/input",
195
+ "/api/select": "/documentation/components/input/select",
196
+ "/api/slider": "/documentation/components/input/slider",
197
+ "/api/switch": "/documentation/components/input/switch",
198
+ "/api/togglebuttons": "/documentation/components/input/togglebuttons",
199
+ "/api/dataframe": "/documentation/components/data/dataframe",
200
+ "/api/pivot_table": "/documentation/components/data/pivot_table",
201
+ "/api/display": "/documentation/api/utilities/display",
202
+ "/api/memoize": "/documentation/api/utilities/memoize",
203
+ "/api/reactive": "/documentation/api/utilities/reactive",
204
+ "/api/widget": "/documentation/api/utilities/widget",
205
+ "/api/default_layout": "/documentation/components/layout",
206
+ "/api/title": "/documentation/components/page/title",
207
+ }
13
208
 
14
209
 
15
210
  @solara.component
@@ -96,8 +291,10 @@ def Layout(children=[]):
96
291
  button_text="Quickstart",
97
292
  )
98
293
 
99
- with rv.Container(tag="section", fluid=True, ma_0=True, pa_0=True, class_="fill-height mb-8 solara-content-main"):
100
- if route_current is not None and route_current.path == "/":
294
+ with rv.Container(tag="section", fluid=True, ma_0=True, pa_0=True, class_="fill-height solara-content-main"):
295
+ if route_current is None:
296
+ return solara.Error("Page not found")
297
+ elif route_current.path == "/":
101
298
  description = "Use ipywidgets with Solara to build powerful and scalable web apps for Jupyter and production in Python."
102
299
  # both tags in one
103
300
  solara.Meta(name="description", property="og:description", content=description)
@@ -123,9 +320,9 @@ def Layout(children=[]):
123
320
  """
124
321
  )
125
322
  with solara.HBox():
126
- with solara.Link("/docs"):
127
- solara.Button(label="Read more", class_="ma-1 homepage-button", href="/docs", color="primary", dark=True)
128
- with solara.Link("/docs/quickstart"):
323
+ with solara.Link("/documentation"):
324
+ solara.Button(label="Read more", class_="ma-1 homepage-button", href="/documentation", color="primary", dark=True)
325
+ with solara.Link("/documentation/getting_started"):
129
326
  solara.Button(label="Quickstart", class_="ma-1 homepage-button", color="primary", dark=True)
130
327
  # with rv.Col(md=4, sm=5):
131
328
  # rv.Img(src="https://dxhl76zpt6fap.cloudfront.net/public/landing/what.webp", style_="width:900px")
@@ -181,7 +378,7 @@ def Layout(children=[]):
181
378
  text=True,
182
379
  outlined=False,
183
380
  )
184
- with solara.Link("/examples"):
381
+ with solara.Link("/documentation/examples"):
185
382
  with solara.Column(style="width: 100%;"):
186
383
  solara.Button(
187
384
  label="More examples",
@@ -197,7 +394,7 @@ def Layout(children=[]):
197
394
  In Jupyter or standalone, and run them in production
198
395
  using FastAPI or starlette.
199
396
 
200
- Get more inspiration from our [examples](/examples).
397
+ Get more inspiration from our [examples](/documentation/examples).
201
398
  """
202
399
  )
203
400
  with rv.ExpansionPanels(v_model=target, on_v_model=set_target, mandatory=True, flat=True):
@@ -209,7 +406,8 @@ def Layout(children=[]):
209
406
  rv.ExpansionPanelHeader(children=["FastAPI"])
210
407
  with rv.ExpansionPanelContent():
211
408
  solara.Markdown(
212
- "Using [solara-server](/docs/understanding/solara-server), we can run our app in production using FastAPI."
409
+ """Using [solara-server](documentation/advanced/understanding/solara-server),
410
+ we can run our app in production using FastAPI."""
213
411
  )
214
412
 
215
413
  with solara.Column(style={"width": "100%"}):
@@ -262,26 +460,32 @@ def Layout(children=[]):
262
460
  solara.Markdown("#### Join our Mailing list to get the latest news")
263
461
  with solara.Div(style={"width": "80%"}):
264
462
  MailChimp(location=router.path)
265
-
266
463
  else:
267
464
  with rv.Row(
268
- style_="gap:6rem; flex-wrap: nowrap;", justify="center" if route_current is not None and route_current.path == "showcase" else "start"
465
+ style_="flex-wrap: nowrap; margin: 0; min-height: calc(100vh - 215.5px);",
466
+ justify="center" if route_current is not None and route_current.path in ["documentation", "showcase"] else "start",
269
467
  ):
270
468
  if route_current is not None and hasattr(route_current.module, "Sidebar"):
271
469
  route_current.module.Sidebar() # type: ignore
272
470
  else:
273
- if route_current is not None and route_current.path != "showcase":
471
+ if route_current is not None and route_current.path not in ["documentation", "showcase", "contact", "changelog"]:
274
472
  Sidebar()
275
- with rv.Col(tag="main", md=True, class_="pt-12 pl-12 pr-10", style_="max-width: 1024px; overflow: auto;"):
473
+ with rv.Col(
474
+ tag="main",
475
+ md=True,
476
+ class_="pa-0",
477
+ style_=f"""max-width: {'1024px' if route_current.path not in ['documentation', 'contact', 'changelog']
478
+ else 'unset'}; overflow: hidden auto;""",
479
+ ):
276
480
  if route_current is not None and route_current.path == "/":
277
481
  with rv.Row(align="center"):
278
482
  pass
279
- # with rv.Col(md=6, class_="pa-0"):
280
- # rv.Html(tag="h1", children=["Live Demo"])
281
- # with rv.Col(md=6, class_="d-flex", style_="justify-content: end"):
282
- # rv.Btn(elevation=0, large=True, children=["Running App"], color="primary", class_="btn-size--xlarge")
283
- # solara.Padding(6)
284
- with rv.Row(children=children, class_="solara-page-content-search"):
483
+ with solara.Row(
484
+ children=children,
485
+ justify="center",
486
+ classes=["solara-page-content-search"],
487
+ style=f"height: {'100%' if route_current.path == 'documentation' else 'unset'};",
488
+ ):
285
489
  pass
286
490
 
287
491
  # absolute = True prevents the drawer from being below the overlay it generates
@@ -344,7 +548,6 @@ def Testimonial(text, name, position, img):
344
548
  max_width=max_width,
345
549
  class_="testimonial-card",
346
550
  ):
347
- # rv.CardTitle(children=["Former Plotly CEO"])
348
551
  with rv.CardActions():
349
552
  with rv.ListItem(class_="grow"):
350
553
  with rv.ListItemAvatar(color="grey darken-3"):
@@ -14,7 +14,7 @@ categories = solara.reactive(["Vandalism", "Assault", "Robbery"])
14
14
  limit = solara.reactive(100)
15
15
 
16
16
 
17
- ROOT = Path(solara.__file__).parent / "website" / "pages" / "docs" / "content" / "04-tutorial"
17
+ ROOT = Path(solara.__file__).parent / "website" / "pages" / "documentation" / "getting_started" / "content" / "04-tutorials"
18
18
  path = ROOT / Path("SF_crime_sample.csv.gz")
19
19
  url = "https://raw.githubusercontent.com/widgetti/solara/master/solara/website/pages/docs/content/04-tutorial/SF_crime_sample.csv"
20
20
 
@@ -12,7 +12,7 @@ def SharedComponent():
12
12
  f"""
13
13
  This component will be used on each page.
14
14
 
15
- It uses the `app_state` [reactive variable](https://solara.dev/api/reactive)
15
+ It uses the `app_state` [reactive variable](https://solara.dev/documentation/api/utilities/reactive)
16
16
  so that the state outlives each page
17
17
 
18
18
 
@@ -23,7 +23,7 @@ def Page():
23
23
  It creates the `component_state` [using the use_reactive hook](https://solara.dev/api/use_reactive)
24
24
  so that the state is bound to the component.
25
25
 
26
- See also [about state management](https://solara.dev/docs/fundamentals/state-management) for more information.
26
+ See also [about state management](https://solara.dev/documentation/getting_started/fundamentals/state-management) for more information.
27
27
 
28
28
 
29
29
  component_state: {component_state.value}
@@ -1,3 +1,5 @@
1
+ import pathlib
2
+ import sys
1
3
  from typing import Optional, cast
2
4
 
3
5
  import pandas as pd
@@ -9,11 +11,11 @@ from solara.components.columns import Columns
9
11
  from solara.components.file_drop import FileDrop
10
12
 
11
13
  github_url = solara.util.github_url(__file__)
12
- try:
13
- # fails on pyodide
14
- df_sample = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv")
15
- except: # noqa
16
- df_sample = None
14
+ if sys.platform != "emscripten":
15
+ pycafe_url = solara.util.pycafe_url(path=pathlib.Path(__file__), requirements=["solara", "pandas", "plotly"])
16
+ else:
17
+ pycafe_url = None
18
+ df_sample = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv")
17
19
 
18
20
 
19
21
  class State:
@@ -72,7 +74,10 @@ def Page():
72
74
  with solara.Row():
73
75
  solara.Button("Sample dataset", color="primary", text=True, outlined=True, on_click=State.load_sample, disabled=df is not None)
74
76
  solara.Button("Clear dataset", color="primary", text=True, outlined=True, on_click=State.reset)
75
- FileDrop(on_file=State.load_from_file, on_total_progress=lambda *args: None, label="Drag file here")
77
+ if sys.platform != "emscripten":
78
+ FileDrop(on_file=State.load_from_file, on_total_progress=lambda *args: None, label="Drag file here")
79
+ else:
80
+ solara.Info("File upload not supported in this environment")
76
81
 
77
82
  if df is not None:
78
83
  solara.SliderFloat(label="Size", value=State.size_max, min=1, max=100)
@@ -112,7 +117,16 @@ def Page():
112
117
  else:
113
118
  solara.Info("No data loaded, click on the sample dataset button to load a sample dataset, or upload a file.")
114
119
 
115
- solara.Button(label="View source", icon_name="mdi-github-circle", attributes={"href": github_url, "target": "_blank"}, text=True, outlined=True)
120
+ with solara.Column(style={"max-width": "400px"}):
121
+ solara.Button(label="View source", icon_name="mdi-github-circle", attributes={"href": github_url, "target": "_blank"}, text=True, outlined=True)
122
+ if sys.platform != "emscripten":
123
+ solara.Button(
124
+ label="Edit this example live on py.cafe",
125
+ icon_name="mdi-coffee-to-go-outline",
126
+ attributes={"href": pycafe_url, "target": "_blank"},
127
+ text=True,
128
+ outlined=True,
129
+ )
116
130
 
117
131
 
118
132
  @solara.component
@@ -0,0 +1,8 @@
1
+ from pathlib import Path
2
+
3
+ import solara
4
+
5
+ title = "Changelog"
6
+ HERE = Path(__file__)
7
+
8
+ Page = solara.Markdown(Path(HERE.parent / "changelog.md").read_text())