solara 1.30.0__py2.py3-none-any.whl → 1.31.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-1.30.0.dist-info → solara-1.31.0.dist-info}/METADATA +7 -42
- solara-1.31.0.dist-info/RECORD +5 -0
- {solara-1.30.0.dist-info → solara-1.31.0.dist-info}/WHEEL +1 -1
- {solara/template/portal → solara-1.31.0.dist-info/licenses}/LICENSE +1 -1
- solara/__init__.py +0 -123
- solara/__main__.py +0 -734
- solara/alias.py +0 -6
- solara/autorouting.py +0 -554
- solara/cache.py +0 -294
- solara/checks.html +0 -71
- solara/checks.py +0 -224
- solara/comm.py +0 -28
- solara/components/__init__.py +0 -59
- solara/components/alert.py +0 -155
- solara/components/applayout.py +0 -393
- solara/components/button.py +0 -85
- solara/components/card.py +0 -87
- solara/components/checkbox.py +0 -50
- solara/components/code_highlight_css.py +0 -11
- solara/components/code_highlight_css.vue +0 -63
- solara/components/columns.py +0 -159
- solara/components/component_vue.py +0 -109
- solara/components/cross_filter.py +0 -335
- solara/components/dataframe.py +0 -546
- solara/components/datatable.py +0 -221
- solara/components/datatable.vue +0 -175
- solara/components/details.py +0 -21
- solara/components/download.vue +0 -35
- solara/components/echarts.py +0 -75
- solara/components/echarts.vue +0 -128
- solara/components/figure_altair.py +0 -39
- solara/components/file_browser.py +0 -182
- solara/components/file_download.py +0 -199
- solara/components/file_drop.py +0 -139
- solara/components/file_drop.vue +0 -83
- solara/components/file_list_widget.vue +0 -78
- solara/components/head.py +0 -27
- solara/components/head_tag.py +0 -49
- solara/components/head_tag.vue +0 -60
- solara/components/image.py +0 -173
- solara/components/input.py +0 -440
- solara/components/link.py +0 -55
- solara/components/markdown.py +0 -371
- solara/components/markdown_editor.py +0 -25
- solara/components/markdown_editor.vue +0 -362
- solara/components/matplotlib.py +0 -74
- solara/components/meta.py +0 -47
- solara/components/misc.py +0 -333
- solara/components/pivot_table.py +0 -258
- solara/components/pivot_table.vue +0 -158
- solara/components/progress.py +0 -47
- solara/components/select.py +0 -186
- solara/components/select.vue +0 -27
- solara/components/slider.py +0 -442
- solara/components/slider_date.vue +0 -56
- solara/components/spinner-solara.vue +0 -105
- solara/components/spinner.py +0 -30
- solara/components/sql_code.py +0 -33
- solara/components/sql_code.vue +0 -128
- solara/components/style.py +0 -105
- solara/components/switch.py +0 -68
- solara/components/tab_navigation.py +0 -37
- solara/components/title.py +0 -90
- solara/components/title.vue +0 -38
- solara/components/togglebuttons.py +0 -202
- solara/components/tooltip.py +0 -61
- solara/datatypes.py +0 -143
- solara/express.py +0 -241
- solara/hooks/__init__.py +0 -4
- solara/hooks/dataframe.py +0 -99
- solara/hooks/misc.py +0 -263
- solara/hooks/use_reactive.py +0 -129
- solara/hooks/use_thread.py +0 -129
- solara/kitchensink.py +0 -8
- solara/lab/__init__.py +0 -34
- solara/lab/components/__init__.py +0 -6
- solara/lab/components/chat.py +0 -203
- solara/lab/components/confirmation_dialog.py +0 -165
- solara/lab/components/cross_filter.py +0 -7
- solara/lab/components/input_date.py +0 -298
- solara/lab/components/menu.py +0 -181
- solara/lab/components/menu.vue +0 -38
- solara/lab/components/tabs.py +0 -274
- solara/lab/components/theming.py +0 -98
- solara/lab/components/theming.vue +0 -72
- solara/lab/hooks/__init__.py +0 -0
- solara/lab/hooks/dataframe.py +0 -12
- solara/lab/toestand.py +0 -3
- solara/lab/utils/__init__.py +0 -2
- solara/lab/utils/cookies.py +0 -5
- solara/lab/utils/dataframe.py +0 -115
- solara/lab/utils/headers.py +0 -5
- solara/layout.py +0 -44
- solara/minisettings.py +0 -133
- solara/py.typed +0 -0
- solara/reactive.py +0 -93
- solara/routing.py +0 -268
- solara/scope/__init__.py +0 -87
- solara/scope/types.py +0 -55
- solara/server/__init__.py +0 -0
- solara/server/app.py +0 -490
- solara/server/assets/custom.css +0 -1
- solara/server/assets/custom.js +0 -1
- solara/server/assets/favicon.png +0 -0
- solara/server/assets/favicon.svg +0 -5
- solara/server/assets/style.css +0 -1665
- solara/server/assets/theme-dark.css +0 -437
- solara/server/assets/theme-light.css +0 -420
- solara/server/assets/theme.js +0 -3
- solara/server/cdn_helper.py +0 -77
- solara/server/esm.py +0 -69
- solara/server/fastapi.py +0 -5
- solara/server/flask.py +0 -286
- solara/server/jupyter/__init__.py +0 -2
- solara/server/jupyter/cdn_handler.py +0 -28
- solara/server/jupyter/server_extension.py +0 -29
- solara/server/jupytertools.py +0 -46
- solara/server/kernel.py +0 -319
- solara/server/kernel_context.py +0 -393
- solara/server/patch.py +0 -552
- solara/server/reload.py +0 -242
- solara/server/server.py +0 -437
- solara/server/settings.py +0 -212
- solara/server/shell.py +0 -240
- solara/server/starlette.py +0 -597
- solara/server/static/ansi.js +0 -270
- solara/server/static/highlight-dark.css +0 -82
- solara/server/static/highlight.css +0 -43
- solara/server/static/main-vuetify.js +0 -260
- solara/server/static/main.js +0 -163
- solara/server/static/solara_bootstrap.py +0 -129
- solara/server/static/sun.svg +0 -23
- solara/server/static/webworker.js +0 -42
- solara/server/telemetry.py +0 -212
- solara/server/templates/index.html.j2 +0 -1
- solara/server/templates/loader-plain.css +0 -11
- solara/server/templates/loader-plain.html +0 -20
- solara/server/templates/loader-solara.css +0 -111
- solara/server/templates/loader-solara.html +0 -40
- solara/server/templates/plain.html +0 -82
- solara/server/templates/solara.html.j2 +0 -446
- solara/server/threaded.py +0 -75
- solara/server/utils.py +0 -30
- solara/server/websocket.py +0 -44
- solara/settings.py +0 -56
- solara/tasks.py +0 -847
- solara/template/button.py +0 -16
- solara/template/markdown.py +0 -42
- solara/template/portal/.flake8 +0 -6
- solara/template/portal/.pre-commit-config.yaml +0 -28
- solara/template/portal/Procfile +0 -7
- solara/template/portal/mypy.ini +0 -3
- solara/template/portal/pyproject.toml +0 -26
- solara/template/portal/solara_portal/__init__.py +0 -3
- solara/template/portal/solara_portal/components/__init__.py +0 -2
- solara/template/portal/solara_portal/components/article.py +0 -28
- solara/template/portal/solara_portal/components/data.py +0 -28
- solara/template/portal/solara_portal/components/header.py +0 -6
- solara/template/portal/solara_portal/components/layout.py +0 -6
- solara/template/portal/solara_portal/content/articles/equis-in-vidi.md +0 -85
- solara/template/portal/solara_portal/content/articles/substiterat-vati.md +0 -70
- solara/template/portal/solara_portal/data.py +0 -60
- solara/template/portal/solara_portal/pages/__init__.py +0 -67
- solara/template/portal/solara_portal/pages/article/__init__.py +0 -26
- solara/template/portal/solara_portal/pages/tabular.py +0 -29
- solara/template/portal/solara_portal/pages/viz/__init__.py +0 -69
- solara/template/portal/solara_portal/pages/viz/overview.py +0 -14
- solara/test/__init__.py +0 -0
- solara/test/pytest_plugin.py +0 -698
- solara/toestand.py +0 -772
- solara/util.py +0 -308
- solara/website/__init__.py +0 -0
- solara/website/assets/custom.css +0 -462
- solara/website/assets/images/logo-small.png +0 -0
- solara/website/assets/images/logo.svg +0 -17
- solara/website/assets/images/logo_white.svg +0 -50
- solara/website/assets/theme.js +0 -8
- solara/website/components/__init__.py +0 -5
- solara/website/components/algolia.vue +0 -24
- solara/website/components/algolia_api.vue +0 -157
- solara/website/components/docs.py +0 -118
- solara/website/components/header.py +0 -72
- solara/website/components/hero.py +0 -15
- solara/website/components/mailchimp.py +0 -12
- solara/website/components/mailchimp.vue +0 -47
- solara/website/components/notebook.py +0 -172
- solara/website/pages/__init__.py +0 -564
- solara/website/pages/apps/__init__.py +0 -16
- solara/website/pages/apps/authorization/__init__.py +0 -118
- solara/website/pages/apps/authorization/admin.py +0 -12
- solara/website/pages/apps/authorization/users.py +0 -12
- solara/website/pages/apps/jupyter-dashboard-1.py +0 -116
- solara/website/pages/apps/layout-demo.py +0 -40
- solara/website/pages/apps/multipage/__init__.py +0 -38
- solara/website/pages/apps/multipage/page1.py +0 -26
- solara/website/pages/apps/multipage/page2.py +0 -34
- solara/website/pages/apps/scatter.py +0 -136
- solara/website/pages/apps/scrolling.py +0 -63
- solara/website/pages/apps/tutorial-streamlit.py +0 -18
- solara/website/pages/changelog/__init__.py +0 -8
- solara/website/pages/changelog/changelog.md +0 -180
- solara/website/pages/contact/__init__.py +0 -8
- solara/website/pages/contact/contact.md +0 -17
- solara/website/pages/doc_use_download.py +0 -85
- solara/website/pages/documentation/__init__.py +0 -184
- solara/website/pages/documentation/advanced/__init__.py +0 -36
- solara/website/pages/documentation/advanced/content/00-overview.md +0 -1
- solara/website/pages/documentation/advanced/content/10-howto/00-overview.md +0 -1
- solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md +0 -191
- solara/website/pages/documentation/advanced/content/10-howto/20-layout.md +0 -120
- solara/website/pages/documentation/advanced/content/10-howto/30-testing.md +0 -149
- solara/website/pages/documentation/advanced/content/10-howto/31-debugging.md +0 -66
- solara/website/pages/documentation/advanced/content/10-howto/40-embed.md +0 -43
- solara/website/pages/documentation/advanced/content/10-howto/50-ipywidget_libraries.md +0 -120
- solara/website/pages/documentation/advanced/content/20-understanding/00-introduction.md +0 -4
- solara/website/pages/documentation/advanced/content/20-understanding/05-ipywidgets.md +0 -30
- solara/website/pages/documentation/advanced/content/20-understanding/06-ipyvuetify.md +0 -38
- solara/website/pages/documentation/advanced/content/20-understanding/10-reacton.md +0 -24
- solara/website/pages/documentation/advanced/content/20-understanding/12-reacton-basics.md +0 -104
- solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md +0 -19
- solara/website/pages/documentation/advanced/content/20-understanding/17-rules-of-hooks.md +0 -3
- solara/website/pages/documentation/advanced/content/20-understanding/18-containers.md +0 -160
- solara/website/pages/documentation/advanced/content/20-understanding/20-solara.md +0 -13
- solara/website/pages/documentation/advanced/content/20-understanding/40-routing.md +0 -236
- solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md +0 -81
- solara/website/pages/documentation/advanced/content/20-understanding/60-voila.md +0 -7
- solara/website/pages/documentation/advanced/content/30-enterprise/00-overview.md +0 -1
- solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md +0 -167
- solara/website/pages/documentation/advanced/content/40-development/00-overview.md +0 -0
- solara/website/pages/documentation/advanced/content/40-development/01-contribute.md +0 -41
- solara/website/pages/documentation/advanced/content/40-development/10-setup.md +0 -72
- solara/website/pages/documentation/advanced/content/__init__.py +0 -0
- solara/website/pages/documentation/api/__init__.py +0 -19
- solara/website/pages/documentation/api/cross_filter/__init__.py +0 -9
- solara/website/pages/documentation/api/cross_filter/cross_filter_dataframe.py +0 -23
- solara/website/pages/documentation/api/cross_filter/cross_filter_report.py +0 -22
- solara/website/pages/documentation/api/cross_filter/cross_filter_select.py +0 -22
- solara/website/pages/documentation/api/cross_filter/cross_filter_slider.py +0 -22
- solara/website/pages/documentation/api/hooks/__init__.py +0 -9
- solara/website/pages/documentation/api/hooks/use_cross_filter.py +0 -25
- solara/website/pages/documentation/api/hooks/use_dark_effective.py +0 -13
- solara/website/pages/documentation/api/hooks/use_effect.md +0 -43
- solara/website/pages/documentation/api/hooks/use_effect.py +0 -9
- solara/website/pages/documentation/api/hooks/use_exception.py +0 -33
- solara/website/pages/documentation/api/hooks/use_memo.md +0 -16
- solara/website/pages/documentation/api/hooks/use_memo.py +0 -9
- solara/website/pages/documentation/api/hooks/use_previous.py +0 -32
- solara/website/pages/documentation/api/hooks/use_reactive.py +0 -15
- solara/website/pages/documentation/api/hooks/use_state.py +0 -11
- solara/website/pages/documentation/api/hooks/use_state_or_update.py +0 -68
- solara/website/pages/documentation/api/hooks/use_thread.md +0 -58
- solara/website/pages/documentation/api/hooks/use_thread.py +0 -44
- solara/website/pages/documentation/api/hooks/use_trait_observe.py +0 -13
- solara/website/pages/documentation/api/routing/__init__.py +0 -9
- solara/website/pages/documentation/api/routing/generate_routes.py +0 -11
- solara/website/pages/documentation/api/routing/generate_routes_directory.py +0 -11
- solara/website/pages/documentation/api/routing/resolve_path.py +0 -36
- solara/website/pages/documentation/api/routing/route.py +0 -32
- solara/website/pages/documentation/api/routing/use_route.py +0 -80
- solara/website/pages/documentation/api/routing/use_router.py +0 -15
- solara/website/pages/documentation/api/utilities/__init__.py +0 -9
- solara/website/pages/documentation/api/utilities/component_vue.py +0 -11
- solara/website/pages/documentation/api/utilities/computed.py +0 -16
- solara/website/pages/documentation/api/utilities/display.py +0 -15
- solara/website/pages/documentation/api/utilities/get_kernel_id.py +0 -16
- solara/website/pages/documentation/api/utilities/get_session_id.py +0 -16
- solara/website/pages/documentation/api/utilities/memoize.py +0 -36
- solara/website/pages/documentation/api/utilities/on_kernel_start.py +0 -27
- solara/website/pages/documentation/api/utilities/reactive.py +0 -15
- solara/website/pages/documentation/api/utilities/widget.py +0 -104
- solara/website/pages/documentation/components/__init__.py +0 -12
- solara/website/pages/documentation/components/advanced/__init__.py +0 -9
- solara/website/pages/documentation/components/advanced/link.py +0 -28
- solara/website/pages/documentation/components/advanced/meta.py +0 -21
- solara/website/pages/documentation/components/advanced/style.py +0 -44
- solara/website/pages/documentation/components/common.py +0 -9
- solara/website/pages/documentation/components/data/__init__.py +0 -9
- solara/website/pages/documentation/components/data/dataframe.py +0 -44
- solara/website/pages/documentation/components/data/pivot_table.py +0 -81
- solara/website/pages/documentation/components/enterprise/__init__.py +0 -9
- solara/website/pages/documentation/components/enterprise/avatar.py +0 -19
- solara/website/pages/documentation/components/enterprise/avatar_menu.py +0 -20
- solara/website/pages/documentation/components/input/__init__.py +0 -9
- solara/website/pages/documentation/components/input/button.py +0 -22
- solara/website/pages/documentation/components/input/checkbox.py +0 -12
- solara/website/pages/documentation/components/input/file_browser.py +0 -33
- solara/website/pages/documentation/components/input/file_drop.py +0 -75
- solara/website/pages/documentation/components/input/input.py +0 -18
- solara/website/pages/documentation/components/input/select.py +0 -21
- solara/website/pages/documentation/components/input/slider.py +0 -28
- solara/website/pages/documentation/components/input/switch.py +0 -12
- solara/website/pages/documentation/components/input/togglebuttons.py +0 -20
- solara/website/pages/documentation/components/lab/__init__.py +0 -9
- solara/website/pages/documentation/components/lab/chat.py +0 -108
- solara/website/pages/documentation/components/lab/confirmation_dialog.py +0 -55
- solara/website/pages/documentation/components/lab/cookies_headers.py +0 -48
- solara/website/pages/documentation/components/lab/input_date.py +0 -19
- solara/website/pages/documentation/components/lab/menu.py +0 -21
- solara/website/pages/documentation/components/lab/tab.py +0 -24
- solara/website/pages/documentation/components/lab/tabs.py +0 -44
- solara/website/pages/documentation/components/lab/task.py +0 -12
- solara/website/pages/documentation/components/lab/theming.py +0 -72
- solara/website/pages/documentation/components/lab/use_task.py +0 -12
- solara/website/pages/documentation/components/layout/__init__.py +0 -9
- solara/website/pages/documentation/components/layout/app_bar.py +0 -15
- solara/website/pages/documentation/components/layout/app_bar_title.py +0 -15
- solara/website/pages/documentation/components/layout/app_layout.py +0 -23
- solara/website/pages/documentation/components/layout/card.py +0 -14
- solara/website/pages/documentation/components/layout/card_actions.py +0 -15
- solara/website/pages/documentation/components/layout/column.py +0 -29
- solara/website/pages/documentation/components/layout/columns.py +0 -26
- solara/website/pages/documentation/components/layout/columns_responsive.py +0 -67
- solara/website/pages/documentation/components/layout/griddraggable.py +0 -61
- solara/website/pages/documentation/components/layout/gridfixed.py +0 -21
- solara/website/pages/documentation/components/layout/hbox.py +0 -17
- solara/website/pages/documentation/components/layout/row.py +0 -29
- solara/website/pages/documentation/components/layout/sidebar.py +0 -23
- solara/website/pages/documentation/components/layout/vbox.py +0 -19
- solara/website/pages/documentation/components/output/__init__.py +0 -9
- solara/website/pages/documentation/components/output/file_download.py +0 -12
- solara/website/pages/documentation/components/output/html.py +0 -22
- solara/website/pages/documentation/components/output/image.py +0 -12
- solara/website/pages/documentation/components/output/markdown.py +0 -59
- solara/website/pages/documentation/components/output/markdown_editor.py +0 -53
- solara/website/pages/documentation/components/output/sql_code.py +0 -84
- solara/website/pages/documentation/components/output/tooltip.py +0 -12
- solara/website/pages/documentation/components/page/__init__.py +0 -9
- solara/website/pages/documentation/components/page/head.py +0 -19
- solara/website/pages/documentation/components/page/title.py +0 -28
- solara/website/pages/documentation/components/status/__init__.py +0 -9
- solara/website/pages/documentation/components/status/error.py +0 -40
- solara/website/pages/documentation/components/status/info.py +0 -40
- solara/website/pages/documentation/components/status/progress.py +0 -10
- solara/website/pages/documentation/components/status/spinner.py +0 -10
- solara/website/pages/documentation/components/status/success.py +0 -40
- solara/website/pages/documentation/components/status/warning.py +0 -47
- solara/website/pages/documentation/components/viz/__init__.py +0 -9
- solara/website/pages/documentation/components/viz/altair.py +0 -44
- solara/website/pages/documentation/components/viz/echarts.py +0 -78
- solara/website/pages/documentation/components/viz/matplotlib.py +0 -32
- solara/website/pages/documentation/components/viz/plotly.py +0 -63
- solara/website/pages/documentation/components/viz/plotly_express.py +0 -41
- solara/website/pages/documentation/examples/__init__.py +0 -52
- solara/website/pages/documentation/examples/ai/__init__.py +0 -10
- solara/website/pages/documentation/examples/ai/chatbot.py +0 -96
- solara/website/pages/documentation/examples/ai/tokenizer.py +0 -106
- solara/website/pages/documentation/examples/basics/__init__.py +0 -2
- solara/website/pages/documentation/examples/basics/sine.py +0 -28
- solara/website/pages/documentation/examples/fullscreen/__init__.py +0 -9
- solara/website/pages/documentation/examples/fullscreen/authorization.py +0 -3
- solara/website/pages/documentation/examples/fullscreen/layout_demo.py +0 -3
- solara/website/pages/documentation/examples/fullscreen/multipage.py +0 -3
- solara/website/pages/documentation/examples/fullscreen/scatter.py +0 -3
- solara/website/pages/documentation/examples/fullscreen/scrolling.py +0 -3
- solara/website/pages/documentation/examples/fullscreen/tutorial_streamlit.py +0 -3
- solara/website/pages/documentation/examples/general/__init__.py +0 -9
- solara/website/pages/documentation/examples/general/custom_storage.py +0 -69
- solara/website/pages/documentation/examples/general/deploy_model.py +0 -114
- solara/website/pages/documentation/examples/general/live_update.py +0 -38
- solara/website/pages/documentation/examples/general/login_oauth.py +0 -76
- solara/website/pages/documentation/examples/general/mycard.vue +0 -58
- solara/website/pages/documentation/examples/general/pokemon_search.py +0 -51
- solara/website/pages/documentation/examples/general/vue_component.py +0 -50
- solara/website/pages/documentation/examples/ipycanvas.py +0 -49
- solara/website/pages/documentation/examples/libraries/__init__.py +0 -9
- solara/website/pages/documentation/examples/libraries/altair.py +0 -63
- solara/website/pages/documentation/examples/libraries/bqplot.py +0 -39
- solara/website/pages/documentation/examples/libraries/ipyleaflet.py +0 -32
- solara/website/pages/documentation/examples/libraries/ipyleaflet_advanced.py +0 -65
- solara/website/pages/documentation/examples/utilities/__init__.py +0 -9
- solara/website/pages/documentation/examples/utilities/calculator.py +0 -157
- solara/website/pages/documentation/examples/utilities/countdown_timer.py +0 -64
- solara/website/pages/documentation/examples/utilities/todo.py +0 -195
- solara/website/pages/documentation/examples/visualization/__init__.py +0 -6
- solara/website/pages/documentation/examples/visualization/annotator.py +0 -68
- solara/website/pages/documentation/examples/visualization/linked_views.py +0 -84
- solara/website/pages/documentation/examples/visualization/plotly.py +0 -43
- solara/website/pages/documentation/faq/__init__.py +0 -11
- solara/website/pages/documentation/faq/content/99-faq.md +0 -73
- solara/website/pages/documentation/getting_started/__init__.py +0 -15
- solara/website/pages/documentation/getting_started/content/00-quickstart.md +0 -84
- solara/website/pages/documentation/getting_started/content/01-introduction.md +0 -121
- solara/website/pages/documentation/getting_started/content/02-installing.md +0 -81
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +0 -9
- solara/website/pages/documentation/getting_started/content/04-tutorials/10_data_science.py +0 -13
- solara/website/pages/documentation/getting_started/content/04-tutorials/20-web-app.md +0 -84
- solara/website/pages/documentation/getting_started/content/04-tutorials/30-ipywidgets.md +0 -120
- solara/website/pages/documentation/getting_started/content/04-tutorials/40-streamlit.md +0 -141
- solara/website/pages/documentation/getting_started/content/04-tutorials/50-dash.md +0 -140
- solara/website/pages/documentation/getting_started/content/04-tutorials/60-jupyter-dashboard-part1.py +0 -64
- solara/website/pages/documentation/getting_started/content/04-tutorials/SF_crime_sample.csv.gz +0 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/_data_science.ipynb +0 -445
- solara/website/pages/documentation/getting_started/content/04-tutorials/_jupyter_dashboard_1.ipynb +0 -1000
- solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +0 -7
- solara/website/pages/documentation/getting_started/content/05-fundamentals/10-components.md +0 -218
- solara/website/pages/documentation/getting_started/content/05-fundamentals/50-state-management.md +0 -83
- solara/website/pages/documentation/getting_started/content/06-reference/00-overview.md +0 -3
- solara/website/pages/documentation/getting_started/content/06-reference/40-static_files.md +0 -27
- solara/website/pages/documentation/getting_started/content/06-reference/41-asset-files.md +0 -32
- solara/website/pages/documentation/getting_started/content/06-reference/60-static-site-generation.md +0 -55
- solara/website/pages/documentation/getting_started/content/06-reference/70-search.md +0 -30
- solara/website/pages/documentation/getting_started/content/06-reference/80-reloading.md +0 -30
- solara/website/pages/documentation/getting_started/content/06-reference/90-notebook-support.md +0 -4
- solara/website/pages/documentation/getting_started/content/06-reference/95-caching.md +0 -143
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +0 -3
- solara/website/pages/documentation/getting_started/content/07-deploying/10-self-hosted.md +0 -269
- solara/website/pages/documentation/getting_started/content/07-deploying/20-cloud-hosted.md +0 -76
- solara/website/pages/documentation/getting_started/content/08-lab/00-what-is-lab.md +0 -3
- solara/website/pages/documentation/getting_started/content/90-troubleshoot.md +0 -22
- solara/website/pages/documentation/getting_started/content/__init__.py +0 -0
- solara/website/pages/docutils.py +0 -38
- solara/website/pages/showcase/__init__.py +0 -105
- solara/website/pages/showcase/domino_code_assist.py +0 -60
- solara/website/pages/showcase/planeto_tessa.py +0 -19
- solara/website/pages/showcase/solara_dev.py +0 -54
- solara/website/pages/showcase/solarathon_2023_team_2.py +0 -22
- solara/website/pages/showcase/solarathon_2023_team_4.py +0 -22
- solara/website/pages/showcase/solarathon_2023_team_5.py +0 -23
- solara/website/pages/showcase/solarathon_2023_team_6.py +0 -34
- solara/website/pages/showcase/wanderlust.py +0 -27
- solara/website/public/beach.jpeg +0 -0
- solara/website/public/logo.svg +0 -6
- solara/website/public/social/discord.svg +0 -1
- solara/website/public/social/github.svg +0 -1
- solara/website/public/social/twitter.svg +0 -3
- solara/website/public/success.html +0 -25
- solara/website/templates/index.html.j2 +0 -117
- solara/website/utils.py +0 -51
- solara/widgets/__init__.py +0 -1
- solara/widgets/vue/gridlayout.vue +0 -110
- solara/widgets/vue/html.vue +0 -4
- solara/widgets/vue/navigator.vue +0 -104
- solara/widgets/vue/vegalite.vue +0 -115
- solara/widgets/widgets.py +0 -65
- solara-1.30.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json +0 -7
- solara-1.30.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json +0 -7
- solara-1.30.0.dist-info/RECORD +0 -438
- solara-1.30.0.dist-info/entry_points.txt +0 -5
- /solara-1.30.0.dist-info/licenses/LICENSE → /LICENSE +0 -0
solara/components/slider.py
DELETED
|
@@ -1,442 +0,0 @@
|
|
|
1
|
-
import math
|
|
2
|
-
import os
|
|
3
|
-
from datetime import date, datetime, timedelta
|
|
4
|
-
from typing import Callable, List, Optional, Tuple, TypeVar, Union, cast
|
|
5
|
-
|
|
6
|
-
import ipyvue
|
|
7
|
-
import ipyvuetify
|
|
8
|
-
import reacton.core
|
|
9
|
-
import traitlets
|
|
10
|
-
from typing_extensions import Literal
|
|
11
|
-
|
|
12
|
-
import solara
|
|
13
|
-
from solara.alias import rv
|
|
14
|
-
|
|
15
|
-
T = TypeVar("T")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@solara.value_component(int)
|
|
19
|
-
def SliderInt(
|
|
20
|
-
label: str,
|
|
21
|
-
value: Union[int, solara.Reactive[int]] = 0,
|
|
22
|
-
min: int = 0,
|
|
23
|
-
max: int = 10,
|
|
24
|
-
step: int = 1,
|
|
25
|
-
on_value: Optional[Callable[[int], None]] = None,
|
|
26
|
-
thumb_label: Union[bool, Literal["always"]] = True,
|
|
27
|
-
tick_labels: Union[List[str], Literal["end_points"], bool] = False,
|
|
28
|
-
disabled: bool = False,
|
|
29
|
-
):
|
|
30
|
-
"""Slider for controlling an integer value.
|
|
31
|
-
|
|
32
|
-
### Basic example:
|
|
33
|
-
|
|
34
|
-
```solara
|
|
35
|
-
import solara
|
|
36
|
-
|
|
37
|
-
int_value = solara.reactive(42)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@solara.component
|
|
41
|
-
def Page():
|
|
42
|
-
solara.SliderInt("Some integer", value=int_value, min=-10, max=120)
|
|
43
|
-
solara.Markdown(f"**Int value**: {int_value.value}")
|
|
44
|
-
with solara.Row():
|
|
45
|
-
solara.Button("Reset", on_click=lambda: int_value.set(42))
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Arguments
|
|
50
|
-
|
|
51
|
-
* `label`: Label to display next to the slider.
|
|
52
|
-
* `value`: The currently selected value.
|
|
53
|
-
* `min`: Minimum value.
|
|
54
|
-
* `max`: Maximum value.
|
|
55
|
-
* `step`: Step size.
|
|
56
|
-
* `on_value`: Callback to call when the value changes.
|
|
57
|
-
* `thumb_label`: Show a thumb label when sliding (True), always ("always"), or never (False).
|
|
58
|
-
* `tick_labels`: Show tick labels corresponding to the values (True),
|
|
59
|
-
custom tick labels by passing a list of strings, only end_points ("end_points"),
|
|
60
|
-
or no labels at all (False, the default).
|
|
61
|
-
* `disabled`: Whether the slider is disabled.
|
|
62
|
-
"""
|
|
63
|
-
reactive_value = solara.use_reactive(value, on_value)
|
|
64
|
-
del value, on_value
|
|
65
|
-
|
|
66
|
-
def set_value_cast(value):
|
|
67
|
-
reactive_value.value = int(value)
|
|
68
|
-
|
|
69
|
-
updated_tick_labels = _produce_tick_labels(tick_labels, min, max, step)
|
|
70
|
-
|
|
71
|
-
return rv.Slider(
|
|
72
|
-
v_model=reactive_value.value,
|
|
73
|
-
on_v_model=set_value_cast,
|
|
74
|
-
label=label,
|
|
75
|
-
min=min,
|
|
76
|
-
max=max,
|
|
77
|
-
step=step,
|
|
78
|
-
thumb_label=thumb_label,
|
|
79
|
-
tick_labels=updated_tick_labels,
|
|
80
|
-
dense=False,
|
|
81
|
-
hide_details=True,
|
|
82
|
-
disabled=disabled,
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
@solara.value_component(None)
|
|
87
|
-
def SliderRangeInt(
|
|
88
|
-
label: str,
|
|
89
|
-
value: Union[Tuple[int, int], solara.Reactive[Tuple[int, int]]] = (1, 3),
|
|
90
|
-
min: int = 0,
|
|
91
|
-
max: int = 10,
|
|
92
|
-
step: int = 1,
|
|
93
|
-
on_value: Callable[[Tuple[int, int]], None] = None,
|
|
94
|
-
thumb_label: Union[bool, Literal["always"]] = True,
|
|
95
|
-
tick_labels: Union[List[str], Literal["end_points"], bool] = False,
|
|
96
|
-
disabled: bool = False,
|
|
97
|
-
) -> reacton.core.ValueElement[ipyvuetify.RangeSlider, Tuple[int, int]]:
|
|
98
|
-
"""Slider for controlling a range of integer values.
|
|
99
|
-
|
|
100
|
-
### Basic example:
|
|
101
|
-
|
|
102
|
-
```solara
|
|
103
|
-
import solara
|
|
104
|
-
|
|
105
|
-
int_range = solara.reactive((0, 42))
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
@solara.component
|
|
109
|
-
def Page():
|
|
110
|
-
solara.SliderRangeInt("Some integer range", value=int_range, min=-10, max=120)
|
|
111
|
-
solara.Markdown(f"**Int range value**: {int_range.value}")
|
|
112
|
-
with solara.Row():
|
|
113
|
-
solara.Button("Reset", on_click=lambda: int_range.set((0, 42)))
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Arguments
|
|
117
|
-
* `label`: Label to display next to the slider.
|
|
118
|
-
* `value`: The currently selected value.
|
|
119
|
-
* `min`: Minimum value.
|
|
120
|
-
* `max`: Maximum value.
|
|
121
|
-
* `step`: Step size.
|
|
122
|
-
* `on_value`: Callback to call when the value changes.
|
|
123
|
-
* `thumb_label`: Show a thumb label when sliding (True), always ("always"), or never (False).
|
|
124
|
-
* `tick_labels`: Show tick labels corresponding to the values (True),
|
|
125
|
-
custom tick labels by passing a list of strings, only end_points ("end_points"),
|
|
126
|
-
or no labels at all (False, the default).
|
|
127
|
-
* `disabled`: Whether the slider is disabled.
|
|
128
|
-
"""
|
|
129
|
-
reactive_value = solara.use_reactive(value, on_value)
|
|
130
|
-
del value, on_value
|
|
131
|
-
|
|
132
|
-
def set_value_cast(value):
|
|
133
|
-
v1, v2 = value
|
|
134
|
-
reactive_value.set((int(v1), int(v2)))
|
|
135
|
-
|
|
136
|
-
updated_tick_labels = _produce_tick_labels(tick_labels, min, max, step)
|
|
137
|
-
|
|
138
|
-
return cast(
|
|
139
|
-
reacton.core.ValueElement[ipyvuetify.RangeSlider, Tuple[int, int]],
|
|
140
|
-
rv.RangeSlider(
|
|
141
|
-
v_model=reactive_value.value,
|
|
142
|
-
on_v_model=set_value_cast,
|
|
143
|
-
label=label,
|
|
144
|
-
min=min,
|
|
145
|
-
max=max,
|
|
146
|
-
step=step,
|
|
147
|
-
thumb_label=thumb_label,
|
|
148
|
-
tick_labels=updated_tick_labels,
|
|
149
|
-
dense=False,
|
|
150
|
-
hide_details=True,
|
|
151
|
-
disabled=disabled,
|
|
152
|
-
),
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
@solara.value_component(float)
|
|
157
|
-
def SliderFloat(
|
|
158
|
-
label: str,
|
|
159
|
-
value: Union[float, solara.Reactive[float]] = 0,
|
|
160
|
-
min: float = 0,
|
|
161
|
-
max: float = 10.0,
|
|
162
|
-
step: float = 0.1,
|
|
163
|
-
on_value: Callable[[float], None] = None,
|
|
164
|
-
thumb_label: Union[bool, Literal["always"]] = True,
|
|
165
|
-
tick_labels: Union[List[str], Literal["end_points"], bool] = False,
|
|
166
|
-
disabled: bool = False,
|
|
167
|
-
):
|
|
168
|
-
"""Slider for controlling a float value.
|
|
169
|
-
|
|
170
|
-
### Basic example:
|
|
171
|
-
|
|
172
|
-
```solara
|
|
173
|
-
import solara
|
|
174
|
-
|
|
175
|
-
float_value = solara.reactive(42.4)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
@solara.component
|
|
179
|
-
def Page():
|
|
180
|
-
solara.SliderFloat("Some integer", value=float_value, min=-10, max=120)
|
|
181
|
-
solara.Markdown(f"**Float value**: {float_value.value}")
|
|
182
|
-
with solara.Row():
|
|
183
|
-
solara.Button("Reset", on_click=lambda: float_value.set(42.5))
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## Arguments
|
|
187
|
-
* `label`: Label to display next to the slider.
|
|
188
|
-
* `value`: The current value.
|
|
189
|
-
* `min`: The minimum value.
|
|
190
|
-
* `max`: The maximum value.
|
|
191
|
-
* `step`: The step size.
|
|
192
|
-
* `on_value`: Callback to call when the value changes.
|
|
193
|
-
* `thumb_label`: Show a thumb label when sliding (True), always ("always"), or never (False).
|
|
194
|
-
* `tick_labels`: Show tick labels corresponding to the values (True),
|
|
195
|
-
custom tick labels by passing a list of strings, only end_points ("end_points"),
|
|
196
|
-
or no labels at all (False, the default).
|
|
197
|
-
* `disabled`: Whether the slider is disabled.
|
|
198
|
-
"""
|
|
199
|
-
reactive_value = solara.use_reactive(value, on_value)
|
|
200
|
-
del value, on_value
|
|
201
|
-
|
|
202
|
-
def set_value_cast(value):
|
|
203
|
-
reactive_value.set(float(value))
|
|
204
|
-
|
|
205
|
-
updated_tick_labels = _produce_tick_labels(tick_labels, min, max, step)
|
|
206
|
-
|
|
207
|
-
return rv.Slider(
|
|
208
|
-
v_model=reactive_value.value,
|
|
209
|
-
on_v_model=set_value_cast,
|
|
210
|
-
label=label,
|
|
211
|
-
min=min,
|
|
212
|
-
max=max,
|
|
213
|
-
step=step,
|
|
214
|
-
thumb_label=thumb_label,
|
|
215
|
-
tick_labels=updated_tick_labels,
|
|
216
|
-
dense=False,
|
|
217
|
-
hide_details=True,
|
|
218
|
-
disabled=disabled,
|
|
219
|
-
)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
@solara.value_component(None)
|
|
223
|
-
def SliderRangeFloat(
|
|
224
|
-
label: str,
|
|
225
|
-
value: Union[Tuple[float, float], solara.Reactive[Tuple[float, float]]] = (1.0, 3.0),
|
|
226
|
-
min: float = 0.0,
|
|
227
|
-
max: float = 10.0,
|
|
228
|
-
step: float = 0.1,
|
|
229
|
-
on_value: Callable[[Tuple[float, float]], None] = None,
|
|
230
|
-
thumb_label: Union[bool, Literal["always"]] = True,
|
|
231
|
-
tick_labels: Union[List[str], Literal["end_points"], bool] = False,
|
|
232
|
-
disabled: bool = False,
|
|
233
|
-
) -> reacton.core.ValueElement[ipyvuetify.RangeSlider, Tuple[float, float]]:
|
|
234
|
-
"""Slider for controlling a range of float values.
|
|
235
|
-
|
|
236
|
-
### Basic example:
|
|
237
|
-
|
|
238
|
-
```solara
|
|
239
|
-
import solara
|
|
240
|
-
|
|
241
|
-
float_range = solara.reactive((0.1, 42.4))
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
@solara.component
|
|
245
|
-
def Page():
|
|
246
|
-
solara.SliderRangeFloat("Some float range", value=float_range, min=-10, max=120)
|
|
247
|
-
solara.Markdown(f"**Float range value**: {float_range.value}")
|
|
248
|
-
with solara.Row():
|
|
249
|
-
solara.Button("Reset", on_click=lambda: float_range.set((0.1, 42.4)))
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
## Arguments
|
|
253
|
-
* `label`: Label to display next to the slider.
|
|
254
|
-
* `value`: The current value.
|
|
255
|
-
* `min`: The minimum value.
|
|
256
|
-
* `max`: The maximum value.
|
|
257
|
-
* `step`: The step size.
|
|
258
|
-
* `on_value`: Callback to call when the value changes.
|
|
259
|
-
* `thumb_label`: Show a thumb label when sliding (True), always ("always"), or never (False).
|
|
260
|
-
* `tick_labels`: Show tick labels corresponding to the values (True),
|
|
261
|
-
custom tick labels by passing a list of strings, only end_points ("end_points"),
|
|
262
|
-
or no labels at all (False, the default).
|
|
263
|
-
* `disabled`: Whether the slider is disabled.
|
|
264
|
-
"""
|
|
265
|
-
reactive_value = solara.use_reactive(value, on_value)
|
|
266
|
-
del value, on_value
|
|
267
|
-
|
|
268
|
-
def set_value_cast(value):
|
|
269
|
-
v1, v2 = value
|
|
270
|
-
reactive_value.set((float(v1), float(v2)))
|
|
271
|
-
|
|
272
|
-
updated_tick_labels = _produce_tick_labels(tick_labels, min, max, step)
|
|
273
|
-
|
|
274
|
-
return cast(
|
|
275
|
-
reacton.core.ValueElement[ipyvuetify.RangeSlider, Tuple[float, float]],
|
|
276
|
-
rv.RangeSlider(
|
|
277
|
-
v_model=reactive_value.value,
|
|
278
|
-
on_v_model=set_value_cast,
|
|
279
|
-
label=label,
|
|
280
|
-
min=min,
|
|
281
|
-
max=max,
|
|
282
|
-
step=step,
|
|
283
|
-
thumb_label=thumb_label,
|
|
284
|
-
tick_labels=updated_tick_labels,
|
|
285
|
-
dense=False,
|
|
286
|
-
hide_details=True,
|
|
287
|
-
disabled=disabled,
|
|
288
|
-
),
|
|
289
|
-
)
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
@solara.value_component(None)
|
|
293
|
-
def SliderValue(
|
|
294
|
-
label: str,
|
|
295
|
-
value: Union[T, solara.Reactive[T]],
|
|
296
|
-
values: List[T],
|
|
297
|
-
on_value: Callable[[T], None] = None,
|
|
298
|
-
disabled: bool = False,
|
|
299
|
-
) -> reacton.core.ValueElement[ipyvuetify.Slider, T]:
|
|
300
|
-
"""Slider for selecting a value from a list of values.
|
|
301
|
-
|
|
302
|
-
### Basic example:
|
|
303
|
-
|
|
304
|
-
```solara
|
|
305
|
-
import solara
|
|
306
|
-
|
|
307
|
-
foods = ["Kiwi", "Banana", "Apple"]
|
|
308
|
-
food = solara.reactive("Banana")
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
@solara.component
|
|
312
|
-
def Page():
|
|
313
|
-
solara.SliderValue(label="Food", value=food, values=foods)
|
|
314
|
-
solara.Markdown(f"**Selected**: {food.value}")
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
## Arguments
|
|
318
|
-
* `label`: Label to display next to the slider.
|
|
319
|
-
* `value`: The currently selected value.
|
|
320
|
-
* `values`: List of values to select from.
|
|
321
|
-
* `on_value`: Callback to call when the value changes.
|
|
322
|
-
* `disabled`: Whether the slider is disabled.
|
|
323
|
-
|
|
324
|
-
"""
|
|
325
|
-
reactive_value = solara.use_reactive(value, on_value)
|
|
326
|
-
del value, on_value
|
|
327
|
-
index, set_index = solara.use_state(values.index(reactive_value.value), key="index")
|
|
328
|
-
|
|
329
|
-
def on_index(index):
|
|
330
|
-
set_index(index)
|
|
331
|
-
value = values[index]
|
|
332
|
-
reactive_value.set(value)
|
|
333
|
-
|
|
334
|
-
return cast(
|
|
335
|
-
reacton.core.ValueElement[ipyvuetify.Slider, T],
|
|
336
|
-
rv.Slider(
|
|
337
|
-
v_model=index,
|
|
338
|
-
on_v_model=on_index,
|
|
339
|
-
ticks=True,
|
|
340
|
-
tick_labels=values,
|
|
341
|
-
label=label,
|
|
342
|
-
min=0,
|
|
343
|
-
max=len(values) - 1,
|
|
344
|
-
dense=False,
|
|
345
|
-
hide_details=True,
|
|
346
|
-
disabled=disabled,
|
|
347
|
-
),
|
|
348
|
-
)
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
class DateSliderWidget(ipyvue.VueTemplate):
|
|
352
|
-
template_file = os.path.realpath(os.path.join(os.path.dirname(__file__), "slider_date.vue"))
|
|
353
|
-
|
|
354
|
-
min = traitlets.CFloat(0).tag(sync=True)
|
|
355
|
-
days = traitlets.CFloat(0).tag(sync=True)
|
|
356
|
-
value = traitlets.Any(0).tag(sync=True)
|
|
357
|
-
|
|
358
|
-
label = traitlets.Unicode("").tag(sync=True)
|
|
359
|
-
disabled = traitlets.Bool(False).tag(sync=True)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
@solara.value_component(date)
|
|
363
|
-
def SliderDate(
|
|
364
|
-
label: str,
|
|
365
|
-
value: Union[date, solara.Reactive[date]] = date(2010, 7, 28),
|
|
366
|
-
min: date = date(1981, 1, 1),
|
|
367
|
-
max: date = date(2050, 12, 30),
|
|
368
|
-
on_value: Callable[[date], None] = None,
|
|
369
|
-
disabled: bool = False,
|
|
370
|
-
):
|
|
371
|
-
"""Slider for controlling a date value.
|
|
372
|
-
|
|
373
|
-
### Basic example:
|
|
374
|
-
|
|
375
|
-
```solara
|
|
376
|
-
import solara
|
|
377
|
-
import datetime
|
|
378
|
-
|
|
379
|
-
date_value = solara.reactive(datetime.date(2010, 7, 28))
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
@solara.component
|
|
383
|
-
def Page():
|
|
384
|
-
solara.SliderDate("Some date", value=date_value)
|
|
385
|
-
solara.Markdown(f"**Date value**: {date_value.value.strftime('%Y-%b-%d')}")
|
|
386
|
-
with solara.Row():
|
|
387
|
-
solara.Button("Reset", on_click=lambda: date_value.set(datetime.date(2010, 7, 28)))
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
## Arguments
|
|
391
|
-
* `label`: Label to display next to the slider.
|
|
392
|
-
* `value`: The current value.
|
|
393
|
-
* `min`: The minimum value.
|
|
394
|
-
* `max`: The maximum value.
|
|
395
|
-
* `on_value`: Callback to call when the value changes.
|
|
396
|
-
* `disabled`: Whether the slider is disabled.
|
|
397
|
-
"""
|
|
398
|
-
reactive_value = solara.use_reactive(value, on_value)
|
|
399
|
-
del value, on_value
|
|
400
|
-
|
|
401
|
-
def format(d: date):
|
|
402
|
-
return float(datetime(d.year, d.month, d.day).timestamp())
|
|
403
|
-
|
|
404
|
-
dt_min = format(min)
|
|
405
|
-
delta: timedelta = max - min
|
|
406
|
-
days = delta.days
|
|
407
|
-
|
|
408
|
-
delta_value: timedelta = reactive_value.value - min
|
|
409
|
-
days_value = delta_value.days
|
|
410
|
-
if days_value < 0:
|
|
411
|
-
days_value = 0
|
|
412
|
-
|
|
413
|
-
def set_value_cast(value):
|
|
414
|
-
date = min + timedelta(days=value)
|
|
415
|
-
reactive_value.set(date)
|
|
416
|
-
|
|
417
|
-
return DateSliderWidget.element(label=label, min=dt_min, days=days, on_value=set_value_cast, value=days_value, disabled=disabled)
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
def _produce_tick_labels(tick_labels: Union[List[str], Literal["end_points"], bool], min: float, max: float, step: float) -> Optional[List[str]]:
|
|
421
|
-
if tick_labels == "end_points":
|
|
422
|
-
num_repeats = int(math.ceil((max - min) / step)) - 1
|
|
423
|
-
_tick_labels = [str(min), *([""] * num_repeats), str(max)]
|
|
424
|
-
elif tick_labels is False:
|
|
425
|
-
_tick_labels = None
|
|
426
|
-
elif tick_labels is True:
|
|
427
|
-
_tick_labels, start = [], min
|
|
428
|
-
|
|
429
|
-
while start < max:
|
|
430
|
-
_tick_labels.append(str(start))
|
|
431
|
-
start += step
|
|
432
|
-
_tick_labels.append(str(max))
|
|
433
|
-
else:
|
|
434
|
-
_tick_labels = tick_labels
|
|
435
|
-
|
|
436
|
-
return _tick_labels
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
FloatSlider = SliderFloat
|
|
440
|
-
IntSlider = SliderInt
|
|
441
|
-
ValueSlider = SliderValue
|
|
442
|
-
DateSlider = SliderDate
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<v-slider :label="label" :min="0" :max="days" v-model="value" :disabled="disabled">
|
|
4
|
-
<template v-slot:append>
|
|
5
|
-
<!-- give it a fixed with so the slider doesn't move around -->
|
|
6
|
-
<div class="solara-fixedwidth">
|
|
7
|
-
<div class="solara-makespace">2000-mmm-99</div>
|
|
8
|
-
<div class="solara-realvalue">
|
|
9
|
-
{{ valueDate }}
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
</v-slider>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script>
|
|
17
|
-
module.exports = {
|
|
18
|
-
mounted() {},
|
|
19
|
-
computed: {
|
|
20
|
-
startDate() {
|
|
21
|
-
return new Date(this.min * 1000);
|
|
22
|
-
},
|
|
23
|
-
date() {
|
|
24
|
-
const date = new Date(this.startDate);
|
|
25
|
-
date.setDate(date.getDate() + this.value);
|
|
26
|
-
return date;
|
|
27
|
-
},
|
|
28
|
-
valueDate() {
|
|
29
|
-
const date = this.date;
|
|
30
|
-
if (date) {
|
|
31
|
-
const year = date.toLocaleDateString(undefined, { year: "numeric" });
|
|
32
|
-
const month = date.toLocaleDateString(undefined, { month: "short" });
|
|
33
|
-
const day = date.toLocaleDateString(undefined, { day: "numeric" });
|
|
34
|
-
return `${year}-${month}-${day}`;
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
watch: {},
|
|
39
|
-
};
|
|
40
|
-
</script>
|
|
41
|
-
<style id="solara-slider-date">
|
|
42
|
-
.v-input__append-outer {
|
|
43
|
-
white-space: nowrap;
|
|
44
|
-
}
|
|
45
|
-
.solara-fixedwidth {
|
|
46
|
-
position: relative;
|
|
47
|
-
}
|
|
48
|
-
.solara-makespace {
|
|
49
|
-
visibility: hidden;
|
|
50
|
-
}
|
|
51
|
-
.solara-realvalue {
|
|
52
|
-
position: absolute;
|
|
53
|
-
left: 0;
|
|
54
|
-
top: 0;
|
|
55
|
-
}
|
|
56
|
-
</style>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="solara-sun-spinner-container">
|
|
3
|
-
<!-- <img id="sun-spinner" height="100px" src="static/assets/favicon.svg" /> -->
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
5
|
-
xmlns:svgjs="http://svgjs.com/svgjs" :width="size" :height="size" viewBox="0 0 65 65" fill="none">
|
|
6
|
-
<path id="sun-spinner1" style="transform-origin: center;"
|
|
7
|
-
d="M57.11 30.64L61.47 17.87L48.7 13.51L42.76 1.39999L30.65 7.34999L17.87 2.97999L13.51 15.75L1.40002 21.7L7.35002 33.81L2.99002 46.58L15.76 50.94L21.71 63.06L33.82 57.11L46.59 61.47L50.95 48.7L63.06 42.75L57.11 30.64ZM54.26 34.39L34.39 54.26C33.19 55.46 31.25 55.46 30.05 54.26L10.2 34.4C9.00002 33.2 9.00002 31.26 10.2 30.07L30.06 10.2C31.26 8.99999 33.2 8.99999 34.4 10.2L54.27 30.07C55.47 31.27 55.47 33.21 54.27 34.4L54.26 34.39Z"
|
|
8
|
-
fill="#FFCF64"></path>
|
|
9
|
-
<path id="sun-spinner2" style="transform-origin: center;"
|
|
10
|
-
d="M53.62 19.42L51.65 6.07L38.3 8.04L27.46 0L19.42 10.84L6.07 12.82L8.04 26.17L0 37L10.84 45.04L12.81 58.39L26.16 56.42L37 64.46L45.04 53.62L58.39 51.64L56.42 38.29L64.46 27.45L53.62 19.4V19.42ZM52.8 24.06L44.24 50.82C43.72 52.43 42 53.32 40.39 52.81L13.63 44.25C12.02 43.74 11.13 42.01 11.64 40.4L20.21 13.64C20.72 12.03 22.45 11.14 24.06 11.65L50.82 20.21C52.43 20.72 53.32 22.45 52.81 24.06H52.8Z"
|
|
11
|
-
fill="#FF8C3E"></path>
|
|
12
|
-
</svg>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<style id="solara-spinner">
|
|
17
|
-
@keyframes spin {
|
|
18
|
-
0% {
|
|
19
|
-
transform: rotate(0deg);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
100% {
|
|
23
|
-
transform: rotate(359deg);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@keyframes oscillate {
|
|
28
|
-
0% {
|
|
29
|
-
transform: scale(0.8);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
50% {
|
|
33
|
-
transform: scale(1.0);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
100% {
|
|
37
|
-
transform: scale(0.8);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
#sun-spinner1 {
|
|
42
|
-
animation: spin 6s linear infinite;
|
|
43
|
-
padding: 10px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
#sun-spinner2 {
|
|
47
|
-
animation: spin 2s cubic-bezier(.79, .14, .15, .86) infinite;
|
|
48
|
-
padding: 10px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.solara-sun-spinner-container {
|
|
52
|
-
animation: oscillate 2s linear infinite;
|
|
53
|
-
display: inline-block;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@keyframes bounce-in {
|
|
57
|
-
0% {
|
|
58
|
-
transform: scale(0);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
100% {
|
|
62
|
-
transform: scale(1);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@keyframes bounce-out {
|
|
67
|
-
0% {
|
|
68
|
-
transform: translateZ(0) scale(1);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
100% {
|
|
72
|
-
transform: translateZ(0) scale(50);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.solara-transition-enter-active {
|
|
77
|
-
transition: opacity 0.5s ease;
|
|
78
|
-
/* animation: bounce-in 0.5s ease; */
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.solara-transition-leave-active {
|
|
82
|
-
transition: opacity 0.5s ease;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.solara-transition-leave-active .solara-loader {
|
|
86
|
-
animation: bounce-out 0.5s ease;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.solara-transition-leave-active .solara-sun-spinner-container {
|
|
90
|
-
animation: unset;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.solara-transition-leave-active h1 {
|
|
94
|
-
visibility: hidden;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.solara-transition-enter,
|
|
98
|
-
.solara-transition-leave-to {
|
|
99
|
-
opacity: 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.solara-sun-spinner-container {
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
}
|
|
105
|
-
</style>
|
solara/components/spinner.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import ipyvue
|
|
2
|
-
import traitlets
|
|
3
|
-
|
|
4
|
-
import solara
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class SpinnerSolaraWidget(ipyvue.VueTemplate):
|
|
8
|
-
template_file = (__file__, "spinner-solara.vue")
|
|
9
|
-
|
|
10
|
-
size = traitlets.Unicode("64px").tag(sync=True)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@solara.component
|
|
14
|
-
def SpinnerSolara(size="64px"):
|
|
15
|
-
"""Spinner component with the Solara logo to indicate the app is busy.
|
|
16
|
-
|
|
17
|
-
### Basic example
|
|
18
|
-
|
|
19
|
-
```solara
|
|
20
|
-
import solara
|
|
21
|
-
|
|
22
|
-
@solara.component
|
|
23
|
-
def Page():
|
|
24
|
-
solara.SpinnerSolara(size="100px")
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Arguments
|
|
28
|
-
* `size`: Size of the spinner.
|
|
29
|
-
"""
|
|
30
|
-
return SpinnerSolaraWidget.element(size=size)
|
solara/components/sql_code.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
from typing import Dict, List
|
|
2
|
-
|
|
3
|
-
import ipyvue
|
|
4
|
-
import traitlets
|
|
5
|
-
|
|
6
|
-
import solara
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class SqlCodeWidget(ipyvue.VueTemplate):
|
|
10
|
-
template_file = (__file__, "sql_code.vue")
|
|
11
|
-
|
|
12
|
-
label = traitlets.Unicode("").tag(sync=True)
|
|
13
|
-
query = traitlets.Unicode(allow_none=True, default_value=None).tag(sync=True)
|
|
14
|
-
tables = traitlets.Dict(allow_none=True, default_value=None).tag(sync=True)
|
|
15
|
-
height = traitlets.Unicode("180px").tag(sync=True)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@solara.component
|
|
19
|
-
def SqlCode(label="Query", query: str = None, tables: Dict[str, List[str]] = None, on_query=None, height="180px"):
|
|
20
|
-
"""SQL textfield input with auto complete and SQL syntax highlighting.
|
|
21
|
-
|
|
22
|
-
To get auto complete for the column names, prefix it with the table name, i.e. "titanic.sur ctrl+space"
|
|
23
|
-
|
|
24
|
-
## Arguments
|
|
25
|
-
|
|
26
|
-
* `label`: Label for the textfield.
|
|
27
|
-
* `query`: SQL query.
|
|
28
|
-
* `tables`: Dictionary with table names as keys and list of column names as values (used for auto complete).
|
|
29
|
-
* `on_query`: Callback function that is called when the query is changed
|
|
30
|
-
* `height`: Height of the textfield
|
|
31
|
-
|
|
32
|
-
"""
|
|
33
|
-
return SqlCodeWidget.element(label=label, query=query, tables=tables, on_query=on_query, height=height)
|