solara 1.29.1__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.
- solara/__init__.py +5 -5
- solara/__main__.py +6 -2
- solara/autorouting.py +79 -38
- 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 +1 -1
- 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/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/server/app.py +44 -1
- solara/server/assets/style.css +6 -0
- solara/server/esm.py +28 -4
- solara/server/kernel_context.py +75 -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/pages/__init__.py +223 -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} +28 -2
- solara/website/pages/contact/__init__.py +8 -0
- solara/website/pages/documentation/__init__.py +184 -0
- solara/website/pages/documentation/advanced/__init__.py +36 -0
- solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
- solara/website/pages/{docs/content/10-howto/20-multipage.md → documentation/advanced/content/10-howto/10-multipage.md} +4 -5
- solara/website/pages/{docs/content/10-howto/30-layout.md → documentation/advanced/content/10-howto/20-layout.md} +21 -21
- solara/website/pages/{docs/content/10-howto/80-embed.md → documentation/advanced/content/10-howto/40-embed.md} +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/06-ipyvuetify.md +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/12-reacton-basics.md +1 -1
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/15-anatomy.md +2 -2
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/18-containers.md +3 -3
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/40-routing.md +9 -9
- solara/website/pages/{docs → documentation/advanced}/content/20-understanding/50-solara-server.md +1 -1
- solara/website/pages/{docs/content/50-enterprise → documentation/advanced/content/30-enterprise}/10-oauth.md +3 -3
- solara/website/pages/{docs/content/10-howto → documentation/advanced/content/40-development}/01-contribute.md +5 -5
- solara/website/pages/{docs/content/90-development → documentation/advanced/content/40-development}/10-setup.md +2 -2
- solara/website/pages/documentation/advanced/content/__init__.py +0 -0
- 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/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 +11 -0
- solara/website/pages/{docs → documentation/getting_started}/__init__.py +7 -1
- solara/website/pages/{docs/content/03-quickstart.md → documentation/getting_started/content/00-quickstart.md} +2 -2
- solara/website/pages/{docs/content/00-introduction.md → documentation/getting_started/content/01-introduction.md} +16 -16
- solara/website/pages/{docs → documentation/getting_started}/content/02-installing.md +1 -1
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +9 -0
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/20-web-app.md +4 -4
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/30-ipywidgets.md +9 -9
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/40-streamlit.md +13 -13
- solara/website/pages/{docs/content/04-tutorial → documentation/getting_started/content/04-tutorials}/50-dash.md +3 -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 +7 -0
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/10-components.md +2 -2
- solara/website/pages/{docs/content/07-fundamentals → documentation/getting_started/content/05-fundamentals}/50-state-management.md +3 -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}/41-asset-files.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/60-static-site-generation.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/70-search.md +1 -1
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/80-reloading.md +3 -3
- solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/95-caching.md +1 -1
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +3 -0
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/10-self-hosted.md +3 -3
- solara/website/pages/{docs/content/30-deploying → documentation/getting_started/content/07-deploying}/20-cloud-hosted.md +1 -1
- solara/website/pages/documentation/getting_started/content/__init__.py +0 -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.0.dist-info}/METADATA +8 -7
- solara-1.30.0.dist-info/RECORD +438 -0
- {solara-1.29.1.dist-info → solara-1.30.0.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/30-deploying/00-overview.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 → documentation/advanced}/content/10-howto/00-overview.md +0 -0
- /solara/website/pages/{docs/content/10-howto/50-testing.md → documentation/advanced/content/10-howto/30-testing.md} +0 -0
- /solara/website/pages/{docs/content/10-howto/51-debugging.md → documentation/advanced/content/10-howto/31-debugging.md} +0 -0
- /solara/website/pages/{docs/content/10-howto/ipywidget_libraries.md → documentation/advanced/content/10-howto/50-ipywidget_libraries.md} +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/00-introduction.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/05-ipywidgets.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/10-reacton.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/17-rules-of-hooks.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/20-solara.md +0 -0
- /solara/website/pages/{docs → documentation/advanced}/content/20-understanding/60-voila.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/custom_storage.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 → documentation/faq}/content/99-faq.md +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/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/40-static_files.md +0 -0
- /solara/website/pages/{docs/content/15-reference → documentation/getting_started/content/06-reference}/90-notebook-support.md +0 -0
- /solara/website/pages/{docs/content/lab → documentation/getting_started/content/08-lab}/00-what-is-lab.md +0 -0
- /solara/website/pages/{docs → documentation/getting_started}/content/90-troubleshoot.md +0 -0
- {solara-1.29.1.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -0
- {solara-1.29.1.data → solara-1.30.0.data}/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/entry_points.txt +0 -0
- {solara-1.29.1.dist-info → solara-1.30.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
# Overview
|
|
3
|
-
Click on one of the items on the left.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
import solara
|
|
7
|
-
from solara.alias import rv
|
|
8
|
-
|
|
9
|
-
from .. import List
|
|
10
|
-
from .. import SimpleListItem as ListItem
|
|
11
|
-
|
|
12
|
-
_title = "API"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
# @solara.component
|
|
16
|
-
# def Page():
|
|
17
|
-
# return solara.Markdown(__doc__)
|
|
18
|
-
|
|
19
|
-
items = [
|
|
20
|
-
{
|
|
21
|
-
"name": "Input",
|
|
22
|
-
"icon": "mdi-chevron-left-box",
|
|
23
|
-
"pages": ["button", "checkbox", "input", "select", "slider", "switch", "togglebuttons", "file_browser", "file_drop"],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "Output",
|
|
27
|
-
"icon": "mdi-chevron-right-box",
|
|
28
|
-
"pages": ["markdown", "markdown_editor", "html", "image", "sql_code", "file_download", "tooltip"],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "Status",
|
|
32
|
-
"icon": "mdi-information",
|
|
33
|
-
"pages": ["success", "info", "warning", "error", "spinner", "progress"],
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "Viz",
|
|
37
|
-
"icon": "mdi-chart-histogram",
|
|
38
|
-
"pages": ["altair", "echarts", "matplotlib", "plotly", "plotly_express"],
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "Layout",
|
|
42
|
-
"icon": "mdi-page-layout-sidebar-left",
|
|
43
|
-
"pages": [
|
|
44
|
-
"app_layout",
|
|
45
|
-
"app_bar",
|
|
46
|
-
"app_bar_title",
|
|
47
|
-
"card",
|
|
48
|
-
"card_actions",
|
|
49
|
-
"columns",
|
|
50
|
-
"columns_responsive",
|
|
51
|
-
"column",
|
|
52
|
-
"row",
|
|
53
|
-
"griddraggable",
|
|
54
|
-
"gridfixed",
|
|
55
|
-
"sidebar",
|
|
56
|
-
"hbox",
|
|
57
|
-
"vbox",
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "Data",
|
|
62
|
-
"icon": "mdi-database",
|
|
63
|
-
"pages": ["dataframe", "pivot_table"],
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"name": "Page",
|
|
67
|
-
"icon": "mdi-file-code",
|
|
68
|
-
"pages": ["head", "title"],
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "Hooks",
|
|
72
|
-
"icon": "mdi-hook",
|
|
73
|
-
"pages": [
|
|
74
|
-
"use_cross_filter",
|
|
75
|
-
"use_thread",
|
|
76
|
-
"use_exception",
|
|
77
|
-
"use_effect",
|
|
78
|
-
"use_memo",
|
|
79
|
-
"use_previous",
|
|
80
|
-
"use_reactive",
|
|
81
|
-
"use_state",
|
|
82
|
-
"use_state_or_update",
|
|
83
|
-
"use_trait_observe",
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"name": "Types",
|
|
88
|
-
"icon": "mdi-fingerprint",
|
|
89
|
-
"pages": ["route"],
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"name": "Routing",
|
|
93
|
-
"icon": "mdi-router",
|
|
94
|
-
"pages": ["use_route", "use_router", "resolve_path", "generate_routes", "generate_routes_directory", "link"],
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"name": "Utils",
|
|
98
|
-
"icon": "mdi-hammer-wrench",
|
|
99
|
-
"pages": [
|
|
100
|
-
"display",
|
|
101
|
-
"get_kernel_id",
|
|
102
|
-
"get_session_id",
|
|
103
|
-
"memoize",
|
|
104
|
-
"reactive",
|
|
105
|
-
"widget",
|
|
106
|
-
"component_vue",
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"name": "Advanced",
|
|
111
|
-
"icon": "mdi-head-cog-outline",
|
|
112
|
-
"pages": ["style", "meta"],
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"name": "Cross filter",
|
|
116
|
-
"icon": "mdi-filter-variant-remove",
|
|
117
|
-
"pages": ["cross_filter_dataframe", "cross_filter_report", "cross_filter_slider", "cross_filter_select"],
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"name": "Enterprise",
|
|
121
|
-
"icon": "mdi-office-building",
|
|
122
|
-
"pages": ["avatar", "avatar_menu"],
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"name": "Lab (experimental)",
|
|
126
|
-
"icon": "mdi-flask-outline",
|
|
127
|
-
"pages": [
|
|
128
|
-
"computed",
|
|
129
|
-
"chat",
|
|
130
|
-
"confirmation_dialog",
|
|
131
|
-
"cookies_headers",
|
|
132
|
-
"menu",
|
|
133
|
-
"input_date",
|
|
134
|
-
"on_kernel_start",
|
|
135
|
-
"tab",
|
|
136
|
-
"tabs",
|
|
137
|
-
"task",
|
|
138
|
-
"theming",
|
|
139
|
-
"use_task",
|
|
140
|
-
"use_dark_effective",
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
]
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
@solara.component
|
|
147
|
-
def Page():
|
|
148
|
-
# show a gallery of all the api pages
|
|
149
|
-
router = solara.use_router()
|
|
150
|
-
route_current = router.path_routes[-2]
|
|
151
|
-
|
|
152
|
-
routes = {r.path: r for r in route_current.children}
|
|
153
|
-
|
|
154
|
-
for item in items:
|
|
155
|
-
solara.Markdown(f"## {item['name']}")
|
|
156
|
-
with solara.ColumnsResponsive(12, 6, 6, 4, 4):
|
|
157
|
-
for page in item["pages"]:
|
|
158
|
-
if page not in routes:
|
|
159
|
-
continue
|
|
160
|
-
route = routes[page]
|
|
161
|
-
path = route.path
|
|
162
|
-
image_url = None
|
|
163
|
-
if page in [
|
|
164
|
-
"button",
|
|
165
|
-
"checkbox",
|
|
166
|
-
"confirmation_dialog",
|
|
167
|
-
"echarts",
|
|
168
|
-
"file_browser",
|
|
169
|
-
"file_download",
|
|
170
|
-
"matplotlib",
|
|
171
|
-
"select",
|
|
172
|
-
"switch",
|
|
173
|
-
"tooltip",
|
|
174
|
-
]:
|
|
175
|
-
image_url = "https://dxhl76zpt6fap.cloudfront.net/public/api/" + page + ".gif"
|
|
176
|
-
elif page in ["card", "dataframe", "pivot_table", "slider"]:
|
|
177
|
-
image_url = "https://dxhl76zpt6fap.cloudfront.net/public/api/" + page + ".png"
|
|
178
|
-
else:
|
|
179
|
-
image_url = "https://dxhl76zpt6fap.cloudfront.net/public/logo.svg"
|
|
180
|
-
|
|
181
|
-
path = getattr(route.module, "redirect", path)
|
|
182
|
-
if path:
|
|
183
|
-
with rv.Card(
|
|
184
|
-
elevation=2,
|
|
185
|
-
dark=False,
|
|
186
|
-
height="100%",
|
|
187
|
-
style_="display: flex; flex-direction: column; justify-content: space-between;",
|
|
188
|
-
):
|
|
189
|
-
rv.CardTitle(children=[route.label])
|
|
190
|
-
with rv.CardText():
|
|
191
|
-
with solara.Link(path):
|
|
192
|
-
with solara.Column(align="center"):
|
|
193
|
-
solara.Image(image_url, width="120px")
|
|
194
|
-
doc = route.module.__doc__ or ""
|
|
195
|
-
if doc:
|
|
196
|
-
lines = doc.split("\n")
|
|
197
|
-
lines = [line.strip() for line in lines if line.strip()]
|
|
198
|
-
first = lines[1]
|
|
199
|
-
|
|
200
|
-
rv.CardText(
|
|
201
|
-
children=[solara.Markdown(first)],
|
|
202
|
-
)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
@solara.component
|
|
206
|
-
def NoPage():
|
|
207
|
-
raise RuntimeError("This page should not be rendered")
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
@solara.component
|
|
211
|
-
def Sidebar(children=[], level=0):
|
|
212
|
-
# note that we don't use children here, but we used route.module instead to ge the module
|
|
213
|
-
# this is fine because all api/*.py files use the standard Page component, and do not add
|
|
214
|
-
# a new Layout component
|
|
215
|
-
route_current, all_routes = solara.use_route()
|
|
216
|
-
if route_current is None:
|
|
217
|
-
return solara.Error("Page not found")
|
|
218
|
-
|
|
219
|
-
# keeps track of which routes we includes
|
|
220
|
-
routes = {r.path: r for r in all_routes.copy()}
|
|
221
|
-
|
|
222
|
-
def add(path):
|
|
223
|
-
route = routes[path]
|
|
224
|
-
with solara.Link(route):
|
|
225
|
-
ListItem(route.label, class_="active" if route_current is not None and path == route_current.path else None)
|
|
226
|
-
del routes[path]
|
|
227
|
-
|
|
228
|
-
# with solara.HBox(grow=True) as main:
|
|
229
|
-
with rv.Col(tag="aside", md=4, lg=3, class_="sidebar bg-grey d-none d-md-block") as main:
|
|
230
|
-
with solara.Head():
|
|
231
|
-
name = route_current.label if route_current.label is not None else "No name"
|
|
232
|
-
if name == "API":
|
|
233
|
-
solara.Title("Solara » API overview")
|
|
234
|
-
else:
|
|
235
|
-
solara.Title("Solara » API » " + name)
|
|
236
|
-
with List():
|
|
237
|
-
add("/")
|
|
238
|
-
|
|
239
|
-
for item in items:
|
|
240
|
-
with ListItem(item["name"], icon_name=item["icon"]):
|
|
241
|
-
with List():
|
|
242
|
-
for component in item["pages"]:
|
|
243
|
-
add(component)
|
|
244
|
-
|
|
245
|
-
if routes:
|
|
246
|
-
print(f"Routes not used: {list(routes.keys())}") # noqa
|
|
247
|
-
|
|
248
|
-
return main
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
@solara.component
|
|
252
|
-
def Layout(children=[]):
|
|
253
|
-
route_current, all_routes = solara.use_route()
|
|
254
|
-
if route_current is None:
|
|
255
|
-
return solara.Error("Page not found")
|
|
256
|
-
|
|
257
|
-
if route_current.path == "/":
|
|
258
|
-
return Page()
|
|
259
|
-
else:
|
|
260
|
-
with solara.HBox(grow=True) as main:
|
|
261
|
-
with solara.Padding(4):
|
|
262
|
-
if route_current.module:
|
|
263
|
-
# we ignore children, and make the element again
|
|
264
|
-
WithCode(route_current.module)
|
|
265
|
-
return main
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
@solara.component
|
|
269
|
-
def WithCode(module):
|
|
270
|
-
# e = solara.use_exception_handler()
|
|
271
|
-
# if e is not None:
|
|
272
|
-
# return solara.Error("oops")
|
|
273
|
-
component = getattr(module, "Page", None)
|
|
274
|
-
with rv.Sheet() as main:
|
|
275
|
-
# It renders code better
|
|
276
|
-
solara.Markdown(
|
|
277
|
-
module.__doc__ or "# no docs yet",
|
|
278
|
-
unsafe_solara_execute=True,
|
|
279
|
-
)
|
|
280
|
-
if component and component != NoPage:
|
|
281
|
-
with solara.Card("Example", margin=0, classes=["mt-8"]):
|
|
282
|
-
component()
|
|
283
|
-
github_url = solara.util.github_url(module.__file__)
|
|
284
|
-
solara.Button(
|
|
285
|
-
label="View source",
|
|
286
|
-
icon_name="mdi-github-circle",
|
|
287
|
-
attributes={"href": github_url, "target": "_blank"},
|
|
288
|
-
text=True,
|
|
289
|
-
outlined=True,
|
|
290
|
-
class_="mt-8",
|
|
291
|
-
)
|
|
292
|
-
return main
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"""# DefaultLayout
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import solara
|
|
6
|
-
from solara.website.utils import apidoc
|
|
7
|
-
|
|
8
|
-
title = "DefaultLayout"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@solara.component
|
|
12
|
-
def Page():
|
|
13
|
-
return solara.Warning("This component does not render well as a child component. If you want to see it, you should follow the multipage guide above 🙂")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
__doc__ += apidoc(solara.DefaultLayout.f) # type: ignore
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
# FileDrop
|
|
3
|
-
"""
|
|
4
|
-
import textwrap
|
|
5
|
-
|
|
6
|
-
import solara
|
|
7
|
-
from solara.components.file_drop import FileInfo
|
|
8
|
-
from solara.website.utils import apidoc
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@solara.component
|
|
12
|
-
def Page():
|
|
13
|
-
content, set_content = solara.use_state(b"")
|
|
14
|
-
filename, set_filename = solara.use_state("")
|
|
15
|
-
size, set_size = solara.use_state(0)
|
|
16
|
-
|
|
17
|
-
def on_file(file: FileInfo):
|
|
18
|
-
set_filename(file["name"])
|
|
19
|
-
set_size(file["size"])
|
|
20
|
-
f = file["file_obj"]
|
|
21
|
-
set_content(f.read(100))
|
|
22
|
-
|
|
23
|
-
with solara.Div() as main:
|
|
24
|
-
solara.FileDrop(
|
|
25
|
-
label="Drag and drop a file here to read the first 100 bytes",
|
|
26
|
-
on_file=on_file,
|
|
27
|
-
lazy=True, # We will only read the first 100 bytes
|
|
28
|
-
)
|
|
29
|
-
if content:
|
|
30
|
-
solara.Info(f"File {filename} has total length: {size}\n, first 100 bytes:")
|
|
31
|
-
solara.Preformatted("\n".join(textwrap.wrap(repr(content))))
|
|
32
|
-
|
|
33
|
-
return main
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
__doc__ += apidoc(solara.FileDrop.f) # type: ignore
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Tutorials
|
|
2
|
-
|
|
3
|
-
Instead of having one tutorial, we have tutorials for different audiences.
|
|
4
|
-
|
|
5
|
-
* [Jupyter Dashboard](/docs/tutorial/jupyter-dashboard-part1): Learn to create a dashboard in the Jupyter notebook.
|
|
6
|
-
* [Data science](/docs/tutorial/data-science): In this tutorial, we will introduce Solara from the perspective of a data scientist or when you are thinking of using Solara for a data science app.
|
|
7
|
-
* [Web app](/docs/tutorial/web-app): You are not a data scientist, but you are interested in using Solara to create a web app using Pure Python.
|
|
8
|
-
* [IPywidgets user](/docs/tutorial/ipywidgets): If you are already using [ipywidgets](/docs/understanding/ipywidgets) you will learn how to use the [Solara server](/docs/understanding/solara-server) to render your regular ipywidget applications.
|
|
9
|
-
* [Streamlit](/docs/tutorial/streamlit): If you are an existing Streamlit user, this might appeal more to you.
|