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.
- solara/__init__.py +5 -5
- solara/__main__.py +6 -2
- solara/autorouting.py +88 -56
- solara/cache.py +2 -2
- solara/checks.html +1 -1
- solara/components/__init__.py +1 -1
- solara/components/applayout.py +5 -5
- solara/components/button.py +4 -4
- solara/components/card.py +1 -2
- solara/components/component_vue.py +9 -8
- solara/components/cross_filter.py +6 -7
- solara/components/datatable.py +2 -3
- solara/components/figure_altair.py +1 -1
- solara/components/file_download.py +2 -2
- solara/components/file_drop.py +76 -33
- solara/components/file_drop.vue +24 -10
- solara/components/head.py +1 -2
- solara/components/head_tag.py +2 -3
- solara/components/image.py +1 -1
- solara/components/link.py +3 -4
- solara/components/meta.py +1 -1
- solara/components/misc.py +5 -9
- solara/datatypes.py +2 -2
- solara/hooks/use_reactive.py +2 -2
- solara/lab/components/confirmation_dialog.py +1 -1
- solara/lab/components/tabs.py +6 -6
- solara/reactive.py +1 -1
- solara/routing.py +9 -8
- solara/scope/__init__.py +3 -2
- solara/server/app.py +44 -1
- solara/server/assets/style.css +6 -0
- solara/server/esm.py +28 -4
- solara/server/kernel_context.py +78 -7
- solara/server/patch.py +3 -0
- solara/server/reload.py +2 -2
- solara/server/server.py +3 -3
- solara/server/settings.py +1 -0
- solara/server/starlette.py +66 -33
- solara/server/static/solara_bootstrap.py +1 -1
- solara/server/templates/solara.html.j2 +62 -42
- solara/tasks.py +1 -6
- solara/util.py +23 -1
- solara/website/assets/custom.css +56 -0
- solara/website/components/__init__.py +1 -0
- solara/website/components/algolia_api.vue +157 -0
- solara/website/components/docs.py +118 -0
- solara/website/components/header.py +20 -10
- solara/website/components/hero.py +1 -1
- solara/website/components/markdown.py +30 -0
- solara/website/pages/__init__.py +234 -20
- solara/website/pages/apps/jupyter-dashboard-1.py +1 -1
- solara/website/pages/apps/multipage/__init__.py +1 -1
- solara/website/pages/apps/multipage/page2.py +1 -1
- solara/website/pages/apps/scatter.py +21 -7
- solara/website/pages/changelog/__init__.py +8 -0
- solara/website/pages/{docs/content/95-changelog.md → changelog/changelog.md} +43 -2
- solara/website/pages/contact/__init__.py +8 -0
- solara/website/pages/documentation/__init__.py +184 -0
- solara/website/pages/{docs → documentation/advanced}/__init__.py +2 -2
- solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
- solara/website/pages/{docs → documentation/advanced}/content/10-howto/00-overview.md +5 -0
- solara/website/pages/{docs/content/10-howto/20-multipage.md → documentation/advanced/content/10-howto/10-multipage.md} +9 -5
- solara/website/pages/{docs/content/10-howto/30-layout.md → documentation/advanced/content/10-howto/20-layout.md} +26 -21
- solara/website/pages/{docs/content/10-howto/50-testing.md → documentation/advanced/content/10-howto/30-testing.md} +5 -0
- solara/website/pages/{docs/content/10-howto/51-debugging.md → documentation/advanced/content/10-howto/31-debugging.md} +4 -1
- solara/website/pages/{docs/content/10-howto/80-embed.md → documentation/advanced/content/10-howto/40-embed.md} +7 -1
- solara/website/pages/{docs/content/10-howto/ipywidget_libraries.md → documentation/advanced/content/10-howto/50-ipywidget_libraries.md} +4 -0
- solara/website/pages/documentation/advanced/content/20-understanding/00-introduction.md +10 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/05-ipywidgets.md +5 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md +5 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/10-reacton.md +4 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md +5 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/15-anatomy.md +6 -2
- solara/website/pages/documentation/advanced/content/20-understanding/17-rules-of-hooks.md +7 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md +9 -3
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/20-solara.md +5 -0
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/40-routing.md +13 -9
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md +6 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/60-voila.md +5 -0
- solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/10-oauth.md +7 -3
- solara/website/pages/{docs/content/10-howto → documentation/advanced/content/40-development}/01-contribute.md +9 -5
- solara/website/pages/{docs/content/90-development → documentation/advanced/content/40-development}/10-setup.md +6 -2
- solara/website/pages/documentation/api/__init__.py +19 -0
- solara/website/pages/documentation/api/cross_filter/__init__.py +9 -0
- solara/website/pages/documentation/api/hooks/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/hooks}/use_effect.md +3 -3
- solara/website/pages/{api → documentation/api/hooks}/use_effect.py +2 -1
- solara/website/pages/{api → documentation/api/hooks}/use_memo.md +2 -2
- solara/website/pages/{api → documentation/api/hooks}/use_memo.py +2 -1
- solara/website/pages/{api → documentation/api/hooks}/use_reactive.py +1 -2
- solara/website/pages/{api → documentation/api/hooks}/use_state.py +1 -2
- solara/website/pages/documentation/api/routing/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/routing}/generate_routes.py +1 -2
- solara/website/pages/{api → documentation/api/routing}/generate_routes_directory.py +1 -2
- solara/website/pages/{api → documentation/api/routing}/use_route.py +2 -2
- solara/website/pages/{api → documentation/api/routing}/use_router.py +1 -2
- solara/website/pages/documentation/api/utilities/__init__.py +9 -0
- solara/website/pages/{api → documentation/api/utilities}/component_vue.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/computed.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/display.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/get_kernel_id.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/get_session_id.py +2 -2
- solara/website/pages/{api → documentation/api/utilities}/on_kernel_start.py +9 -3
- solara/website/pages/{api → documentation/api/utilities}/reactive.py +1 -2
- solara/website/pages/{api → documentation/api/utilities}/widget.py +2 -2
- solara/website/pages/documentation/components/__init__.py +12 -0
- solara/website/pages/documentation/components/advanced/__init__.py +9 -0
- solara/website/pages/documentation/components/data/__init__.py +9 -0
- solara/website/pages/documentation/components/enterprise/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/enterprise}/avatar.py +1 -2
- solara/website/pages/{api → documentation/components/enterprise}/avatar_menu.py +1 -2
- solara/website/pages/documentation/components/input/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/input}/checkbox.py +1 -2
- solara/website/pages/documentation/components/input/file_drop.py +75 -0
- solara/website/pages/{api → documentation/components/input}/input.py +1 -2
- solara/website/pages/{api → documentation/components/input}/select.py +1 -2
- solara/website/pages/{api → documentation/components/input}/slider.py +1 -2
- solara/website/pages/{api → documentation/components/input}/switch.py +1 -2
- solara/website/pages/{api → documentation/components/input}/togglebuttons.py +1 -2
- solara/website/pages/documentation/components/lab/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/lab}/chat.py +2 -3
- solara/website/pages/{api → documentation/components/lab}/cookies_headers.py +1 -1
- solara/website/pages/{api → documentation/components/lab}/input_date.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/menu.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/task.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/theming.py +1 -2
- solara/website/pages/{api → documentation/components/lab}/use_task.py +1 -2
- solara/website/pages/documentation/components/layout/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/layout}/app_bar.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/app_bar_title.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/card.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/card_actions.py +1 -2
- solara/website/pages/{api → documentation/components/layout}/griddraggable.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/gridfixed.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/hbox.py +1 -1
- solara/website/pages/{api → documentation/components/layout}/vbox.py +1 -1
- solara/website/pages/documentation/components/output/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/output}/file_download.py +1 -2
- solara/website/pages/{api → documentation/components/output}/image.py +1 -2
- solara/website/pages/{api → documentation/components/output}/tooltip.py +1 -2
- solara/website/pages/documentation/components/page/__init__.py +9 -0
- solara/website/pages/documentation/components/status/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/status}/error.py +3 -3
- solara/website/pages/{api → documentation/components/status}/info.py +3 -3
- solara/website/pages/{api → documentation/components/status}/progress.py +1 -2
- solara/website/pages/{api → documentation/components/status}/spinner.py +1 -2
- solara/website/pages/{api → documentation/components/status}/success.py +3 -3
- solara/website/pages/{api → documentation/components/status}/warning.py +3 -3
- solara/website/pages/documentation/components/viz/__init__.py +9 -0
- solara/website/pages/{api → documentation/components/viz}/plotly.py +1 -0
- solara/website/pages/{examples → documentation/examples}/__init__.py +3 -43
- solara/website/pages/{examples → documentation/examples}/general/custom_storage.py +1 -1
- solara/website/pages/{examples → documentation/examples}/general/deploy_model.py +3 -3
- solara/website/pages/{examples → documentation/examples}/general/login_oauth.py +1 -1
- solara/website/pages/{examples → documentation/examples}/general/vue_component.py +1 -2
- solara/website/pages/{examples → documentation/examples}/libraries/altair.py +2 -3
- solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet_advanced.py +1 -1
- solara/website/pages/{examples → documentation/examples}/utilities/countdown_timer.py +1 -1
- solara/website/pages/{examples → documentation/examples}/visualization/plotly.py +1 -2
- solara/website/pages/documentation/faq/__init__.py +12 -0
- solara/website/pages/{docs → documentation/faq}/content/99-faq.md +4 -1
- solara/website/pages/documentation/getting_started/__init__.py +9 -0
- solara/website/pages/{docs/content/03-quickstart.md → documentation/getting_started/content/00-quickstart.md} +7 -2
- solara/website/pages/{docs/content/00-introduction.md → documentation/getting_started/content/01-introduction.md} +20 -16
- solara/website/pages/{docs → documentation/getting_started}/content/02-installing.md +5 -1
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +14 -0
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/20-web-app.md +9 -4
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/30-ipywidgets.md +13 -9
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/40-streamlit.md +17 -12
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/50-dash.md +7 -3
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_data_science.ipynb +5 -5
- solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +11 -0
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/10-components.md +7 -2
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/50-state-management.md +8 -3
- solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +3 -0
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/40-static_files.md +4 -0
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/41-asset-files.md +5 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/60-static-site-generation.md +5 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/70-search.md +5 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/80-reloading.md +7 -3
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/90-notebook-support.md +4 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/95-caching.md +6 -1
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +7 -0
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/10-self-hosted.md +7 -3
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/20-cloud-hosted.md +5 -1
- solara/website/pages/documentation/getting_started/content/80-what-is-lab.md +7 -0
- solara/website/pages/{docs → documentation/getting_started}/content/90-troubleshoot.md +4 -0
- solara/website/pages/showcase/__init__.py +1 -1
- solara/website/pages/showcase/domino_code_assist.py +1 -1
- solara/website/pages/showcase/solara_dev.py +1 -1
- solara/website/public/social/discord.svg +1 -0
- solara/website/public/social/github.svg +1 -0
- solara/website/public/social/twitter.svg +3 -0
- {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/METADATA +8 -7
- solara-1.30.1.dist-info/RECORD +437 -0
- {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/WHEEL +1 -1
- solara/website/pages/api/__init__.py +0 -292
- solara/website/pages/api/default_layout.py +0 -16
- solara/website/pages/api/file_drop.py +0 -36
- solara/website/pages/docs/content/04-tutorial/00-overview.md +0 -9
- solara/website/pages/docs/content/07-fundamentals/00-overview.md +0 -7
- solara/website/pages/docs/content/15-reference/00-overview.md +0 -6
- solara/website/pages/docs/content/20-understanding/00-introduction.md +0 -4
- solara/website/pages/docs/content/20-understanding/17-rules-of-hooks.md +0 -3
- solara/website/pages/docs/content/30-deploying/00-overview.md +0 -3
- solara/website/pages/docs/content/lab/00-what-is-lab.md +0 -3
- solara-1.29.1.dist-info/RECORD +0 -411
- /solara/website/pages/{docs/content/99-contact.md → contact/contact.md} +0 -0
- /solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/00-overview.md +0 -0
- /solara/website/pages/{docs/content/__init__.py → documentation/advanced/content/40-development/00-overview.md} +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_dataframe.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_report.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_select.py +0 -0
- /solara/website/pages/{api → documentation/api/cross_filter}/cross_filter_slider.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_cross_filter.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_dark_effective.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_exception.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_previous.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_state_or_update.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_thread.md +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_thread.py +0 -0
- /solara/website/pages/{api → documentation/api/hooks}/use_trait_observe.py +0 -0
- /solara/website/pages/{api → documentation/api/routing}/resolve_path.py +0 -0
- /solara/website/pages/{api → documentation/api/routing}/route.py +0 -0
- /solara/website/pages/{api → documentation/api/utilities}/memoize.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/link.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/meta.py +0 -0
- /solara/website/pages/{api → documentation/components/advanced}/style.py +0 -0
- /solara/website/pages/{api → documentation/components}/common.py +0 -0
- /solara/website/pages/{api → documentation/components/data}/dataframe.py +0 -0
- /solara/website/pages/{api → documentation/components/data}/pivot_table.py +0 -0
- /solara/website/pages/{api → documentation/components/input}/button.py +0 -0
- /solara/website/pages/{api → documentation/components/input}/file_browser.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/confirmation_dialog.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/tab.py +0 -0
- /solara/website/pages/{api → documentation/components/lab}/tabs.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/app_layout.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/column.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/columns.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/columns_responsive.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/row.py +0 -0
- /solara/website/pages/{api → documentation/components/layout}/sidebar.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/html.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/markdown.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/markdown_editor.py +0 -0
- /solara/website/pages/{api → documentation/components/output}/sql_code.py +0 -0
- /solara/website/pages/{api → documentation/components/page}/head.py +0 -0
- /solara/website/pages/{api → documentation/components/page}/title.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/altair.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/echarts.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/matplotlib.py +0 -0
- /solara/website/pages/{api → documentation/components/viz}/plotly_express.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/chatbot.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ai/tokenizer.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/basics/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/basics/sine.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/authorization.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/layout_demo.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/multipage.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/scatter.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/scrolling.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/fullscreen/tutorial_streamlit.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/live_update.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/mycard.vue +0 -0
- /solara/website/pages/{examples → documentation/examples}/general/pokemon_search.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/ipycanvas.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/bqplot.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/libraries/ipyleaflet.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/calculator.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/utilities/todo.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/__init__.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/annotator.py +0 -0
- /solara/website/pages/{examples → documentation/examples}/visualization/linked_views.py +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/10_data_science.py +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/60-jupyter-dashboard-part1.py +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/SF_crime_sample.csv.gz +0 -0
- /solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/_jupyter_dashboard_1.ipynb +0 -0
- {solara-1.29.1.data → solara-1.30.1.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
- {solara-1.29.1.data → solara-1.30.1.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
- {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/entry_points.txt +0 -0
- {solara-1.29.1.dist-info → solara-1.30.1.dist-info}/licenses/LICENSE +0 -0
solara/website/assets/custom.css
CHANGED
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
--dark-color-text: hsla(0,0%,100%,.7);
|
|
28
28
|
--dark-color-grey: #ababab;
|
|
29
29
|
--dark-color-grey-light: #202020;
|
|
30
|
+
|
|
31
|
+
--docs-color-grey: #40362E;
|
|
32
|
+
--docs-social-discord: #5865F2;
|
|
33
|
+
--docs-social-github: #333;
|
|
34
|
+
--docs-social-twitter: #000000;
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
html,
|
|
@@ -178,6 +183,56 @@ blockquote p:last-child {
|
|
|
178
183
|
background-color: var(--dark-color-primary-lightest);
|
|
179
184
|
}
|
|
180
185
|
|
|
186
|
+
/* API PAGE REFACTOR STYLE */
|
|
187
|
+
|
|
188
|
+
.v-sheet.api-search-container{
|
|
189
|
+
flex-grow: 1;
|
|
190
|
+
}
|
|
191
|
+
.v-sheet.api-search-container .v-input{
|
|
192
|
+
flex-grow: 0;
|
|
193
|
+
}
|
|
194
|
+
.v-sheet.docs-card-container{
|
|
195
|
+
width: 100%;
|
|
196
|
+
padding: 0 10%;
|
|
197
|
+
justify-content: start;
|
|
198
|
+
align-content: center;
|
|
199
|
+
flex-wrap: wrap !important;
|
|
200
|
+
flex-grow: 1;
|
|
201
|
+
row-gap: 20px;
|
|
202
|
+
}
|
|
203
|
+
.v-sheet.docs-card-container > a{
|
|
204
|
+
height: fit-content;
|
|
205
|
+
}
|
|
206
|
+
.v-sheet.docs-card-container > a > .docs-card{
|
|
207
|
+
display: flex;
|
|
208
|
+
width: 20rem;
|
|
209
|
+
height: 12rem;
|
|
210
|
+
border-radius: 16px !important;
|
|
211
|
+
color: var(--color-grey-light);
|
|
212
|
+
}
|
|
213
|
+
.v-sheet.docs-card-container > a .docs-card-icon{
|
|
214
|
+
padding-right: 1.5rem;
|
|
215
|
+
transition: ease padding 0.25s;
|
|
216
|
+
}
|
|
217
|
+
.v-sheet.docs-card-container > a:hover .docs-card-icon{
|
|
218
|
+
color: var(--color-primary);
|
|
219
|
+
padding-right: 0.5rem;
|
|
220
|
+
transition: ease padding 0.25s;
|
|
221
|
+
}
|
|
222
|
+
.component-card{
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
width: 19rem;
|
|
226
|
+
}
|
|
227
|
+
.social-logo-container{
|
|
228
|
+
display: flex;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
align-items: center;
|
|
231
|
+
width: 4rem;
|
|
232
|
+
height: 4rem;
|
|
233
|
+
border-radius: 8px;
|
|
234
|
+
}
|
|
235
|
+
|
|
181
236
|
/* vuetify component overrides */
|
|
182
237
|
|
|
183
238
|
.v-btn.solara-docs-button {
|
|
@@ -354,6 +409,7 @@ blockquote p:last-child {
|
|
|
354
409
|
}
|
|
355
410
|
|
|
356
411
|
.solara-autorouter-content {
|
|
412
|
+
padding-top: 2rem;
|
|
357
413
|
max-width: 100%;
|
|
358
414
|
}
|
|
359
415
|
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-menu
|
|
3
|
+
v-model="show_results"
|
|
4
|
+
offset-y>
|
|
5
|
+
<template v-slot:activator="{ on }">
|
|
6
|
+
<v-text-field
|
|
7
|
+
v-model="query"
|
|
8
|
+
prepend-inner-icon="mdi-magnify"
|
|
9
|
+
hide-details
|
|
10
|
+
:placeholder="mac ? '⌘K to search' : 'Ctrl+K to search'"
|
|
11
|
+
outlined
|
|
12
|
+
rounded
|
|
13
|
+
clearable
|
|
14
|
+
ref="search"
|
|
15
|
+
style="max-width: 50%; flex-grow: 1;"
|
|
16
|
+
@click="show($event, on);"
|
|
17
|
+
@keyup.enter="item = 0"
|
|
18
|
+
></v-text-field>
|
|
19
|
+
</template>
|
|
20
|
+
<v-list v-if="results != null && results.length == 0">
|
|
21
|
+
<v-list-item>
|
|
22
|
+
<v-list-item-content>
|
|
23
|
+
{{this.query == "" ? "Start Typing to Search" : "No search results found."}}
|
|
24
|
+
</v-list-item-content>
|
|
25
|
+
</v-list-item>
|
|
26
|
+
</v-list>
|
|
27
|
+
<v-list v-else>
|
|
28
|
+
<v-list-item-group v-model="item">
|
|
29
|
+
<v-list-item v-for="(element, index) in this.results.hits" :key="element['url']">
|
|
30
|
+
<v-list-item-content>
|
|
31
|
+
<v-list-item-title>{{ element.hierarchy[element.type] }}</v-list-item-title>
|
|
32
|
+
</v-list-item-content>
|
|
33
|
+
</v-list-item>
|
|
34
|
+
</v-list-item-group>
|
|
35
|
+
<v-list-item>
|
|
36
|
+
<v-list-item-content>
|
|
37
|
+
<v-list-item-title>And {{ this.results.nbHits - 10}} More...</v-list-item-title>
|
|
38
|
+
</v-list-item-content>
|
|
39
|
+
</v-list-item>
|
|
40
|
+
</v-list>
|
|
41
|
+
</v-menu>
|
|
42
|
+
</template>
|
|
43
|
+
<script>
|
|
44
|
+
const search = ref(null);
|
|
45
|
+
module.exports = {
|
|
46
|
+
async mounted() {
|
|
47
|
+
window.search = this;
|
|
48
|
+
await this.loadRequire();
|
|
49
|
+
this.algoliasearch = (await this.import([`https://cdn.jsdelivr.net/npm/algoliasearch@4.20.0/dist/algoliasearch-lite.umd.js`]))[0];
|
|
50
|
+
this.initSearch();
|
|
51
|
+
window.search = this;
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
query ( value ) {
|
|
55
|
+
this.show_results = true;
|
|
56
|
+
this.search();
|
|
57
|
+
},
|
|
58
|
+
item ( value ) {
|
|
59
|
+
if ( this.results.hits != null && this.results.hits.length > 0 ) {
|
|
60
|
+
let url = this.results.hits[value].url;
|
|
61
|
+
if (url.startsWith("https://solara.dev")) {
|
|
62
|
+
url = url.slice(18);
|
|
63
|
+
}
|
|
64
|
+
solara.router.push( url );
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
show( e, on ) {
|
|
70
|
+
this.show_results = false;
|
|
71
|
+
this.$nextTick( () => {
|
|
72
|
+
on.click( e )
|
|
73
|
+
} );
|
|
74
|
+
},
|
|
75
|
+
initSearch() {
|
|
76
|
+
this.client = this.algoliasearch( '9KW9L7O5EQ', '647ca12ba642437cc40c2adee4a78d08' );
|
|
77
|
+
this.index = this.client.initIndex( 'solara' );
|
|
78
|
+
this.mac = window.navigator.userAgent.indexOf("Mac") != -1;
|
|
79
|
+
document.addEventListener( 'keydown', ( e ) => {
|
|
80
|
+
|
|
81
|
+
if (this.mac) {
|
|
82
|
+
if ( this.$refs.search && e.metaKey && e.key === 'k' ) {
|
|
83
|
+
this.$refs.search.focus();
|
|
84
|
+
}
|
|
85
|
+
}else{
|
|
86
|
+
if ( this.$refs.search && e.ctrlKey && e.key === 'k' ) {
|
|
87
|
+
this.$refs.search.focus();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
async search() {
|
|
93
|
+
results = await this.index.search( this.query, { hitsPerPage: 10 } );
|
|
94
|
+
if (results) {
|
|
95
|
+
this.results = results;
|
|
96
|
+
}else{
|
|
97
|
+
this.$set(this.results, []);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
import(dependencies) {
|
|
101
|
+
return this.loadRequire().then(
|
|
102
|
+
() => {
|
|
103
|
+
if (window.jupyterVue) {
|
|
104
|
+
// in jupyterlab, we take Vue from ipyvue/jupyterVue
|
|
105
|
+
define("vue", [], () => window.jupyterVue.Vue);
|
|
106
|
+
} else {
|
|
107
|
+
define("vue", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);
|
|
108
|
+
}
|
|
109
|
+
return new Promise((resolve, reject) => {
|
|
110
|
+
requirejs(dependencies, (...modules) => resolve(modules));
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
},
|
|
115
|
+
loadRequire() {
|
|
116
|
+
return new Promise((resolve, reject) => {
|
|
117
|
+
const script = document.createElement('script');
|
|
118
|
+
script.src = `${this.getCdn()}/requirejs@2.3.6/require.js`;
|
|
119
|
+
script.onload = resolve;
|
|
120
|
+
script.onerror = reject;
|
|
121
|
+
document.head.appendChild(script);
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
getBaseUrl() {
|
|
125
|
+
if (window.solara && window.solara.rootPath !== undefined) {
|
|
126
|
+
return solara.rootPath + "/";
|
|
127
|
+
}
|
|
128
|
+
// if base url is set, we use ./ for relative paths compared to the base url
|
|
129
|
+
if (document.getElementsByTagName("base").length) {
|
|
130
|
+
return document.baseURI;
|
|
131
|
+
}
|
|
132
|
+
const labConfigData = document.getElementById('jupyter-config-data');
|
|
133
|
+
if (labConfigData) {
|
|
134
|
+
/* lab and Voila */
|
|
135
|
+
return JSON.parse(labConfigData.textContent).baseUrl;
|
|
136
|
+
}
|
|
137
|
+
let base = document.body.dataset.baseUrl || document.baseURI;
|
|
138
|
+
if (!base.endsWith('/')) {
|
|
139
|
+
base += '/';
|
|
140
|
+
}
|
|
141
|
+
return base
|
|
142
|
+
},
|
|
143
|
+
getCdn() {
|
|
144
|
+
return (typeof solara_cdn !== "undefined" && solara_cdn) || `${this.getBaseUrl()}_solara/cdn`;
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
data(){
|
|
148
|
+
return {
|
|
149
|
+
query: '',
|
|
150
|
+
results: [],
|
|
151
|
+
item: null,
|
|
152
|
+
show_results: false,
|
|
153
|
+
mac: false,
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
}
|
|
157
|
+
</script>
|
|
@@ -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.
|
|
10
|
-
def Algolia(
|
|
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
|
|
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
|
|
41
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
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.
|
|
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("/
|
|
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
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from typing import Dict, List, Union
|
|
2
|
+
|
|
3
|
+
import yaml
|
|
4
|
+
|
|
5
|
+
import solara
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# We want to separate metadata from the markdown files before rendering them, which solara.Markdown doesn't support
|
|
9
|
+
@solara.component
|
|
10
|
+
def MarkdownWithMetadata(content: str, unsafe_solara_execute=True):
|
|
11
|
+
if "---" in content:
|
|
12
|
+
pre_content, raw_metadata, post_content = content.split("---")
|
|
13
|
+
metadata: Dict[str, Union[str, List[str]]] = yaml.safe_load(raw_metadata)
|
|
14
|
+
|
|
15
|
+
if len(pre_content) == 0:
|
|
16
|
+
content = post_content
|
|
17
|
+
else:
|
|
18
|
+
content = pre_content + post_content
|
|
19
|
+
|
|
20
|
+
if "title" not in metadata.keys():
|
|
21
|
+
metadata["title"] = content.split("#")[1].split("\n")[0]
|
|
22
|
+
|
|
23
|
+
for key, value in metadata.items():
|
|
24
|
+
if key == "title":
|
|
25
|
+
solara.Title(value)
|
|
26
|
+
elif ":" in key:
|
|
27
|
+
solara.Meta(property=key, content=value)
|
|
28
|
+
else:
|
|
29
|
+
solara.Meta(name=key, content=value)
|
|
30
|
+
solara.Markdown(content, unsafe_solara_execute=unsafe_solara_execute)
|