solara-ui 1.45.0__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.
- prefix/etc/jupyter/jupyter_notebook_config.d/solara.json +7 -0
- prefix/etc/jupyter/jupyter_server_config.d/solara.json +7 -0
- solara/__init__.py +124 -0
- solara/__main__.py +765 -0
- solara/_stores.py +297 -0
- solara/alias.py +6 -0
- solara/autorouting.py +555 -0
- solara/cache.py +305 -0
- solara/checks.html +71 -0
- solara/checks.py +227 -0
- solara/comm.py +28 -0
- solara/components/__init__.py +77 -0
- solara/components/alert.py +155 -0
- solara/components/applayout.py +397 -0
- solara/components/button.py +85 -0
- solara/components/card.py +87 -0
- solara/components/checkbox.py +50 -0
- solara/components/code_highlight_css.py +11 -0
- solara/components/code_highlight_css.vue +63 -0
- solara/components/columns.py +159 -0
- solara/components/component_vue.py +134 -0
- solara/components/cross_filter.py +335 -0
- solara/components/dataframe.py +546 -0
- solara/components/datatable.py +214 -0
- solara/components/datatable.vue +175 -0
- solara/components/details.py +56 -0
- solara/components/download.vue +35 -0
- solara/components/echarts.py +86 -0
- solara/components/echarts.vue +139 -0
- solara/components/figure_altair.py +39 -0
- solara/components/file_browser.py +181 -0
- solara/components/file_download.py +199 -0
- solara/components/file_drop.py +159 -0
- solara/components/file_drop.vue +83 -0
- solara/components/file_list_widget.vue +78 -0
- solara/components/head.py +27 -0
- solara/components/head_tag.py +49 -0
- solara/components/head_tag.vue +60 -0
- solara/components/image.py +173 -0
- solara/components/input.py +456 -0
- solara/components/input_text_area.py +86 -0
- solara/components/link.py +55 -0
- solara/components/markdown.py +441 -0
- solara/components/markdown_editor.py +33 -0
- solara/components/markdown_editor.vue +359 -0
- solara/components/matplotlib.py +74 -0
- solara/components/meta.py +47 -0
- solara/components/misc.py +333 -0
- solara/components/pivot_table.py +258 -0
- solara/components/pivot_table.vue +158 -0
- solara/components/progress.py +47 -0
- solara/components/select.py +182 -0
- solara/components/select.vue +27 -0
- solara/components/slider.py +442 -0
- solara/components/slider_date.vue +56 -0
- solara/components/spinner-solara.vue +105 -0
- solara/components/spinner.py +45 -0
- solara/components/sql_code.py +41 -0
- solara/components/sql_code.vue +125 -0
- solara/components/style.py +105 -0
- solara/components/switch.py +71 -0
- solara/components/tab_navigation.py +37 -0
- solara/components/title.py +90 -0
- solara/components/title.vue +38 -0
- solara/components/togglebuttons.py +200 -0
- solara/components/tooltip.py +61 -0
- solara/core.py +42 -0
- solara/datatypes.py +143 -0
- solara/express.py +241 -0
- solara/hooks/__init__.py +4 -0
- solara/hooks/dataframe.py +99 -0
- solara/hooks/misc.py +263 -0
- solara/hooks/use_reactive.py +151 -0
- solara/hooks/use_thread.py +129 -0
- solara/kitchensink.py +8 -0
- solara/lab/__init__.py +34 -0
- solara/lab/components/__init__.py +7 -0
- solara/lab/components/chat.py +215 -0
- solara/lab/components/confirmation_dialog.py +163 -0
- solara/lab/components/cross_filter.py +7 -0
- solara/lab/components/input_date.py +339 -0
- solara/lab/components/input_time.py +133 -0
- solara/lab/components/menu.py +181 -0
- solara/lab/components/menu.vue +38 -0
- solara/lab/components/tabs.py +274 -0
- solara/lab/components/theming.py +98 -0
- solara/lab/components/theming.vue +72 -0
- solara/lab/hooks/__init__.py +0 -0
- solara/lab/hooks/dataframe.py +2 -0
- solara/lab/toestand.py +3 -0
- solara/lab/utils/__init__.py +2 -0
- solara/lab/utils/cookies.py +5 -0
- solara/lab/utils/dataframe.py +165 -0
- solara/lab/utils/headers.py +5 -0
- solara/layout.py +44 -0
- solara/lifecycle.py +46 -0
- solara/minisettings.py +141 -0
- solara/py.typed +0 -0
- solara/reactive.py +99 -0
- solara/routing.py +268 -0
- solara/scope/__init__.py +88 -0
- solara/scope/types.py +55 -0
- solara/server/__init__.py +0 -0
- solara/server/app.py +527 -0
- solara/server/assets/custom.css +1 -0
- solara/server/assets/custom.js +1 -0
- solara/server/assets/favicon.png +0 -0
- solara/server/assets/favicon.svg +5 -0
- solara/server/assets/style.css +1681 -0
- solara/server/assets/theme-dark.css +437 -0
- solara/server/assets/theme-light.css +420 -0
- solara/server/assets/theme.js +3 -0
- solara/server/cdn_helper.py +91 -0
- solara/server/esm.py +71 -0
- solara/server/fastapi.py +5 -0
- solara/server/flask.py +297 -0
- solara/server/jupyter/__init__.py +2 -0
- solara/server/jupyter/cdn_handler.py +28 -0
- solara/server/jupyter/server_extension.py +40 -0
- solara/server/jupyter/solara.py +91 -0
- solara/server/jupytertools.py +46 -0
- solara/server/kernel.py +388 -0
- solara/server/kernel_context.py +467 -0
- solara/server/patch.py +564 -0
- solara/server/pyinstaller/__init__.py +9 -0
- solara/server/pyinstaller/hook-ipyreact.py +5 -0
- solara/server/pyinstaller/hook-ipyvuetify.py +5 -0
- solara/server/pyinstaller/hook-solara.py +9 -0
- solara/server/qt.py +113 -0
- solara/server/reload.py +251 -0
- solara/server/server.py +484 -0
- solara/server/settings.py +249 -0
- solara/server/shell.py +269 -0
- solara/server/starlette.py +770 -0
- solara/server/static/ansi.js +270 -0
- solara/server/static/highlight-dark.css +82 -0
- solara/server/static/highlight.css +43 -0
- solara/server/static/main-vuetify.js +272 -0
- solara/server/static/main.js +163 -0
- solara/server/static/solara_bootstrap.py +129 -0
- solara/server/static/sun.svg +23 -0
- solara/server/static/webworker.js +42 -0
- solara/server/telemetry.py +212 -0
- solara/server/templates/index.html.j2 +1 -0
- solara/server/templates/loader-plain.css +11 -0
- solara/server/templates/loader-plain.html +20 -0
- solara/server/templates/loader-solara.css +111 -0
- solara/server/templates/loader-solara.html +40 -0
- solara/server/templates/plain.html +82 -0
- solara/server/templates/solara.html.j2 +486 -0
- solara/server/threaded.py +84 -0
- solara/server/utils.py +44 -0
- solara/server/websocket.py +45 -0
- solara/settings.py +86 -0
- solara/tasks.py +893 -0
- solara/template/button.py +16 -0
- solara/template/markdown.py +42 -0
- solara/template/portal/.flake8 +6 -0
- solara/template/portal/.pre-commit-config.yaml +28 -0
- solara/template/portal/LICENSE +21 -0
- solara/template/portal/Procfile +7 -0
- solara/template/portal/mypy.ini +3 -0
- solara/template/portal/pyproject.toml +26 -0
- solara/template/portal/solara_portal/__init__.py +4 -0
- solara/template/portal/solara_portal/components/__init__.py +2 -0
- solara/template/portal/solara_portal/components/article.py +28 -0
- solara/template/portal/solara_portal/components/data.py +28 -0
- solara/template/portal/solara_portal/components/header.py +6 -0
- solara/template/portal/solara_portal/components/layout.py +6 -0
- solara/template/portal/solara_portal/content/articles/equis-in-vidi.md +85 -0
- solara/template/portal/solara_portal/content/articles/substiterat-vati.md +70 -0
- solara/template/portal/solara_portal/data.py +60 -0
- solara/template/portal/solara_portal/pages/__init__.py +67 -0
- solara/template/portal/solara_portal/pages/article/__init__.py +26 -0
- solara/template/portal/solara_portal/pages/tabular.py +29 -0
- solara/template/portal/solara_portal/pages/viz/__init__.py +70 -0
- solara/template/portal/solara_portal/pages/viz/overview.py +14 -0
- solara/test/__init__.py +0 -0
- solara/test/pytest_plugin.py +783 -0
- solara/toestand.py +998 -0
- solara/util.py +348 -0
- solara/validate_hooks.py +258 -0
- solara/website/__init__.py +0 -0
- solara/website/assets/custom.css +444 -0
- solara/website/assets/images/logo-small.png +0 -0
- solara/website/assets/images/logo.svg +17 -0
- solara/website/assets/images/logo_white.svg +50 -0
- solara/website/assets/theme.js +8 -0
- solara/website/components/__init__.py +5 -0
- solara/website/components/algolia.py +6 -0
- solara/website/components/algolia.vue +24 -0
- solara/website/components/algolia_api.vue +202 -0
- solara/website/components/breadcrumbs.py +28 -0
- solara/website/components/contact.py +144 -0
- solara/website/components/docs.py +143 -0
- solara/website/components/header.py +75 -0
- solara/website/components/mailchimp.py +12 -0
- solara/website/components/mailchimp.vue +47 -0
- solara/website/components/markdown.py +99 -0
- solara/website/components/markdown_nav.vue +34 -0
- solara/website/components/notebook.py +171 -0
- solara/website/components/sidebar.py +105 -0
- solara/website/pages/__init__.py +370 -0
- solara/website/pages/about/__init__.py +9 -0
- solara/website/pages/about/about.md +3 -0
- solara/website/pages/apps/__init__.py +16 -0
- solara/website/pages/apps/authorization/__init__.py +119 -0
- solara/website/pages/apps/authorization/admin.py +12 -0
- solara/website/pages/apps/authorization/users.py +12 -0
- solara/website/pages/apps/jupyter-dashboard-1.py +116 -0
- solara/website/pages/apps/layout-demo.py +40 -0
- solara/website/pages/apps/multipage/__init__.py +38 -0
- solara/website/pages/apps/multipage/page1.py +26 -0
- solara/website/pages/apps/multipage/page2.py +34 -0
- solara/website/pages/apps/scatter.py +136 -0
- solara/website/pages/apps/scrolling.py +63 -0
- solara/website/pages/apps/tutorial-streamlit.py +18 -0
- solara/website/pages/careers/__init__.py +27 -0
- solara/website/pages/changelog/__init__.py +10 -0
- solara/website/pages/changelog/changelog.md +372 -0
- solara/website/pages/contact/__init__.py +34 -0
- solara/website/pages/doc_use_download.py +85 -0
- solara/website/pages/documentation/__init__.py +90 -0
- solara/website/pages/documentation/advanced/__init__.py +9 -0
- solara/website/pages/documentation/advanced/content/00-overview.md +1 -0
- solara/website/pages/documentation/advanced/content/10-howto/00-overview.md +6 -0
- solara/website/pages/documentation/advanced/content/10-howto/10-multipage.md +196 -0
- solara/website/pages/documentation/advanced/content/10-howto/20-layout.md +125 -0
- solara/website/pages/documentation/advanced/content/10-howto/30-testing.md +417 -0
- solara/website/pages/documentation/advanced/content/10-howto/31-debugging.md +69 -0
- solara/website/pages/documentation/advanced/content/10-howto/40-embed.md +50 -0
- solara/website/pages/documentation/advanced/content/10-howto/50-ipywidget_libraries.md +124 -0
- solara/website/pages/documentation/advanced/content/15-reference/00-overview.md +3 -0
- solara/website/pages/documentation/advanced/content/15-reference/40-static_files.md +31 -0
- solara/website/pages/documentation/advanced/content/15-reference/41-asset-files.md +72 -0
- solara/website/pages/documentation/advanced/content/15-reference/60-static-site-generation.md +59 -0
- solara/website/pages/documentation/advanced/content/15-reference/70-search.md +34 -0
- solara/website/pages/documentation/advanced/content/15-reference/80-reloading.md +34 -0
- solara/website/pages/documentation/advanced/content/15-reference/90-notebook-support.md +7 -0
- solara/website/pages/documentation/advanced/content/15-reference/95-caching.md +148 -0
- solara/website/pages/documentation/advanced/content/20-understanding/00-introduction.md +10 -0
- solara/website/pages/documentation/advanced/content/20-understanding/05-ipywidgets.md +35 -0
- solara/website/pages/documentation/advanced/content/20-understanding/06-ipyvuetify.md +42 -0
- solara/website/pages/documentation/advanced/content/20-understanding/10-reacton.md +28 -0
- solara/website/pages/documentation/advanced/content/20-understanding/12-reacton-basics.md +108 -0
- solara/website/pages/documentation/advanced/content/20-understanding/15-anatomy.md +23 -0
- solara/website/pages/documentation/advanced/content/20-understanding/17-rules-of-hooks.md +192 -0
- solara/website/pages/documentation/advanced/content/20-understanding/18-containers.md +166 -0
- solara/website/pages/documentation/advanced/content/20-understanding/20-solara.md +18 -0
- solara/website/pages/documentation/advanced/content/20-understanding/40-routing.md +256 -0
- solara/website/pages/documentation/advanced/content/20-understanding/50-solara-server.md +108 -0
- solara/website/pages/documentation/advanced/content/20-understanding/60-voila.md +12 -0
- solara/website/pages/documentation/advanced/content/30-enterprise/00-overview.md +7 -0
- solara/website/pages/documentation/advanced/content/30-enterprise/10-oauth.md +187 -0
- solara/website/pages/documentation/advanced/content/40-development/00-overview.md +0 -0
- solara/website/pages/documentation/advanced/content/40-development/01-contribute.md +45 -0
- solara/website/pages/documentation/advanced/content/40-development/10-setup.md +76 -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/cross_filter/cross_filter_dataframe.py +22 -0
- solara/website/pages/documentation/api/cross_filter/cross_filter_report.py +20 -0
- solara/website/pages/documentation/api/cross_filter/cross_filter_select.py +20 -0
- solara/website/pages/documentation/api/cross_filter/cross_filter_slider.py +20 -0
- solara/website/pages/documentation/api/hooks/__init__.py +9 -0
- solara/website/pages/documentation/api/hooks/use_cross_filter.py +23 -0
- solara/website/pages/documentation/api/hooks/use_dark_effective.py +12 -0
- solara/website/pages/documentation/api/hooks/use_effect.md +43 -0
- solara/website/pages/documentation/api/hooks/use_effect.py +9 -0
- solara/website/pages/documentation/api/hooks/use_exception.py +31 -0
- solara/website/pages/documentation/api/hooks/use_memo.md +16 -0
- solara/website/pages/documentation/api/hooks/use_memo.py +9 -0
- solara/website/pages/documentation/api/hooks/use_previous.py +30 -0
- solara/website/pages/documentation/api/hooks/use_reactive.py +16 -0
- solara/website/pages/documentation/api/hooks/use_state.py +10 -0
- solara/website/pages/documentation/api/hooks/use_state_or_update.py +66 -0
- solara/website/pages/documentation/api/hooks/use_thread.md +64 -0
- solara/website/pages/documentation/api/hooks/use_thread.py +42 -0
- solara/website/pages/documentation/api/hooks/use_trait_observe.py +12 -0
- solara/website/pages/documentation/api/routing/__init__.py +9 -0
- solara/website/pages/documentation/api/routing/generate_routes.py +10 -0
- solara/website/pages/documentation/api/routing/generate_routes_directory.py +10 -0
- solara/website/pages/documentation/api/routing/resolve_path.py +35 -0
- solara/website/pages/documentation/api/routing/route.py +29 -0
- solara/website/pages/documentation/api/routing/use_route.py +76 -0
- solara/website/pages/documentation/api/routing/use_router.py +16 -0
- solara/website/pages/documentation/api/utilities/__init__.py +9 -0
- solara/website/pages/documentation/api/utilities/component_vue.py +10 -0
- solara/website/pages/documentation/api/utilities/computed.py +16 -0
- solara/website/pages/documentation/api/utilities/display.py +16 -0
- solara/website/pages/documentation/api/utilities/get_kernel_id.py +16 -0
- solara/website/pages/documentation/api/utilities/get_session_id.py +16 -0
- solara/website/pages/documentation/api/utilities/memoize.py +35 -0
- solara/website/pages/documentation/api/utilities/on_kernel_start.py +44 -0
- solara/website/pages/documentation/api/utilities/reactive.py +16 -0
- solara/website/pages/documentation/api/utilities/widget.py +104 -0
- solara/website/pages/documentation/components/__init__.py +12 -0
- solara/website/pages/documentation/components/advanced/__init__.py +9 -0
- solara/website/pages/documentation/components/advanced/link.py +25 -0
- solara/website/pages/documentation/components/advanced/meta.py +17 -0
- solara/website/pages/documentation/components/advanced/style.py +43 -0
- solara/website/pages/documentation/components/common.py +9 -0
- solara/website/pages/documentation/components/data/__init__.py +9 -0
- solara/website/pages/documentation/components/data/dataframe.py +44 -0
- solara/website/pages/documentation/components/data/pivot_table.py +81 -0
- solara/website/pages/documentation/components/enterprise/__init__.py +9 -0
- solara/website/pages/documentation/components/enterprise/avatar.py +24 -0
- solara/website/pages/documentation/components/enterprise/avatar_menu.py +25 -0
- solara/website/pages/documentation/components/input/__init__.py +9 -0
- solara/website/pages/documentation/components/input/button.py +23 -0
- solara/website/pages/documentation/components/input/checkbox.py +10 -0
- solara/website/pages/documentation/components/input/file_browser.py +30 -0
- solara/website/pages/documentation/components/input/file_drop.py +76 -0
- solara/website/pages/documentation/components/input/input.py +43 -0
- solara/website/pages/documentation/components/input/select.py +22 -0
- solara/website/pages/documentation/components/input/slider.py +29 -0
- solara/website/pages/documentation/components/input/switch.py +10 -0
- solara/website/pages/documentation/components/input/togglebuttons.py +21 -0
- solara/website/pages/documentation/components/lab/__init__.py +9 -0
- solara/website/pages/documentation/components/lab/chat.py +109 -0
- solara/website/pages/documentation/components/lab/confirmation_dialog.py +55 -0
- solara/website/pages/documentation/components/lab/cookies_headers.py +48 -0
- solara/website/pages/documentation/components/lab/input_date.py +20 -0
- solara/website/pages/documentation/components/lab/input_time.py +15 -0
- solara/website/pages/documentation/components/lab/menu.py +22 -0
- solara/website/pages/documentation/components/lab/tab.py +25 -0
- solara/website/pages/documentation/components/lab/tabs.py +45 -0
- solara/website/pages/documentation/components/lab/task.py +11 -0
- solara/website/pages/documentation/components/lab/theming.py +74 -0
- solara/website/pages/documentation/components/lab/use_task.py +11 -0
- solara/website/pages/documentation/components/layout/__init__.py +9 -0
- solara/website/pages/documentation/components/layout/app_bar.py +16 -0
- solara/website/pages/documentation/components/layout/app_bar_title.py +16 -0
- solara/website/pages/documentation/components/layout/app_layout.py +24 -0
- solara/website/pages/documentation/components/layout/card.py +15 -0
- solara/website/pages/documentation/components/layout/card_actions.py +16 -0
- solara/website/pages/documentation/components/layout/column.py +30 -0
- solara/website/pages/documentation/components/layout/columns.py +27 -0
- solara/website/pages/documentation/components/layout/columns_responsive.py +66 -0
- solara/website/pages/documentation/components/layout/details.py +13 -0
- solara/website/pages/documentation/components/layout/griddraggable.py +62 -0
- solara/website/pages/documentation/components/layout/gridfixed.py +19 -0
- solara/website/pages/documentation/components/layout/hbox.py +18 -0
- solara/website/pages/documentation/components/layout/row.py +30 -0
- solara/website/pages/documentation/components/layout/sidebar.py +24 -0
- solara/website/pages/documentation/components/layout/vbox.py +19 -0
- solara/website/pages/documentation/components/output/__init__.py +9 -0
- solara/website/pages/documentation/components/output/file_download.py +11 -0
- solara/website/pages/documentation/components/output/html.py +19 -0
- solara/website/pages/documentation/components/output/image.py +11 -0
- solara/website/pages/documentation/components/output/markdown.py +57 -0
- solara/website/pages/documentation/components/output/markdown_editor.py +51 -0
- solara/website/pages/documentation/components/output/sql_code.py +83 -0
- solara/website/pages/documentation/components/output/tooltip.py +11 -0
- solara/website/pages/documentation/components/page/__init__.py +9 -0
- solara/website/pages/documentation/components/page/head.py +15 -0
- solara/website/pages/documentation/components/page/title.py +25 -0
- solara/website/pages/documentation/components/status/__init__.py +9 -0
- solara/website/pages/documentation/components/status/error.py +39 -0
- solara/website/pages/documentation/components/status/info.py +39 -0
- solara/website/pages/documentation/components/status/progress.py +10 -0
- solara/website/pages/documentation/components/status/spinner.py +11 -0
- solara/website/pages/documentation/components/status/success.py +40 -0
- solara/website/pages/documentation/components/status/warning.py +47 -0
- solara/website/pages/documentation/components/viz/__init__.py +9 -0
- solara/website/pages/documentation/components/viz/altair.py +42 -0
- solara/website/pages/documentation/components/viz/echarts.py +77 -0
- solara/website/pages/documentation/components/viz/matplotlib.py +30 -0
- solara/website/pages/documentation/components/viz/plotly.py +63 -0
- solara/website/pages/documentation/components/viz/plotly_express.py +41 -0
- solara/website/pages/documentation/examples/__init__.py +54 -0
- solara/website/pages/documentation/examples/ai/__init__.py +11 -0
- solara/website/pages/documentation/examples/ai/chatbot.py +113 -0
- solara/website/pages/documentation/examples/ai/tokenizer.py +107 -0
- solara/website/pages/documentation/examples/basics/__init__.py +10 -0
- solara/website/pages/documentation/examples/basics/sine.py +28 -0
- solara/website/pages/documentation/examples/fullscreen/__init__.py +10 -0
- solara/website/pages/documentation/examples/fullscreen/authorization.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/layout_demo.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/multipage.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/scatter.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/scrolling.py +3 -0
- solara/website/pages/documentation/examples/fullscreen/tutorial_streamlit.py +3 -0
- solara/website/pages/documentation/examples/general/__init__.py +10 -0
- solara/website/pages/documentation/examples/general/custom_storage.py +70 -0
- solara/website/pages/documentation/examples/general/deploy_model.py +115 -0
- solara/website/pages/documentation/examples/general/live_update.py +32 -0
- solara/website/pages/documentation/examples/general/login_oauth.py +81 -0
- solara/website/pages/documentation/examples/general/mycard.vue +58 -0
- solara/website/pages/documentation/examples/general/pokemon_search.py +51 -0
- solara/website/pages/documentation/examples/general/vue_component.py +50 -0
- solara/website/pages/documentation/examples/ipycanvas.py +49 -0
- solara/website/pages/documentation/examples/libraries/__init__.py +10 -0
- solara/website/pages/documentation/examples/libraries/altair.py +65 -0
- solara/website/pages/documentation/examples/libraries/bqplot.py +39 -0
- solara/website/pages/documentation/examples/libraries/ipyleaflet.py +33 -0
- solara/website/pages/documentation/examples/libraries/ipyleaflet_advanced.py +66 -0
- solara/website/pages/documentation/examples/utilities/__init__.py +10 -0
- solara/website/pages/documentation/examples/utilities/calculator.py +157 -0
- solara/website/pages/documentation/examples/utilities/countdown_timer.py +62 -0
- solara/website/pages/documentation/examples/utilities/todo.py +196 -0
- solara/website/pages/documentation/examples/visualization/__init__.py +6 -0
- solara/website/pages/documentation/examples/visualization/annotator.py +67 -0
- solara/website/pages/documentation/examples/visualization/linked_views.py +81 -0
- solara/website/pages/documentation/examples/visualization/plotly.py +44 -0
- solara/website/pages/documentation/faq/__init__.py +12 -0
- solara/website/pages/documentation/faq/content/99-faq.md +112 -0
- solara/website/pages/documentation/getting_started/__init__.py +9 -0
- solara/website/pages/documentation/getting_started/content/00-quickstart.md +107 -0
- solara/website/pages/documentation/getting_started/content/01-introduction.md +125 -0
- solara/website/pages/documentation/getting_started/content/02-installing.md +134 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/00-overview.md +14 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/10_data_science.py +13 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/20-web-app.md +89 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/30-ipywidgets.md +124 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/40-streamlit.md +146 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/50-dash.md +144 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/60-jupyter-dashboard-part1.py +65 -0
- 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 +445 -0
- solara/website/pages/documentation/getting_started/content/04-tutorials/_jupyter_dashboard_1.ipynb +1021 -0
- solara/website/pages/documentation/getting_started/content/05-fundamentals/00-overview.md +11 -0
- solara/website/pages/documentation/getting_started/content/05-fundamentals/10-components.md +228 -0
- solara/website/pages/documentation/getting_started/content/05-fundamentals/50-state-management.md +278 -0
- solara/website/pages/documentation/getting_started/content/07-deploying/00-overview.md +7 -0
- solara/website/pages/documentation/getting_started/content/07-deploying/10-self-hosted.md +305 -0
- solara/website/pages/documentation/getting_started/content/07-deploying/20-cloud-hosted.md +80 -0
- solara/website/pages/documentation/getting_started/content/80-what-is-lab.md +7 -0
- solara/website/pages/documentation/getting_started/content/90-troubleshoot.md +26 -0
- solara/website/pages/docutils.py +38 -0
- solara/website/pages/home.vue +1199 -0
- solara/website/pages/our_team/__init__.py +83 -0
- solara/website/pages/pricing/__init__.py +31 -0
- solara/website/pages/roadmap/__init__.py +11 -0
- solara/website/pages/roadmap/roadmap.md +47 -0
- solara/website/pages/scale_ipywidgets.py +45 -0
- solara/website/pages/showcase/__init__.py +105 -0
- solara/website/pages/showcase/domino_code_assist.py +60 -0
- solara/website/pages/showcase/planeto_tessa.py +19 -0
- solara/website/pages/showcase/solara_dev.py +54 -0
- solara/website/pages/showcase/solarathon_2023_team_2.py +22 -0
- solara/website/pages/showcase/solarathon_2023_team_4.py +22 -0
- solara/website/pages/showcase/solarathon_2023_team_5.py +23 -0
- solara/website/pages/showcase/solarathon_2023_team_6.py +34 -0
- solara/website/pages/showcase/wanderlust.py +27 -0
- solara/website/public/beach.jpeg +0 -0
- solara/website/public/logo.svg +6 -0
- 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/website/public/success.html +25 -0
- solara/website/templates/index.html.j2 +117 -0
- solara/website/utils.py +51 -0
- solara/widgets/__init__.py +1 -0
- solara/widgets/vue/gridlayout.vue +107 -0
- solara/widgets/vue/html.vue +4 -0
- solara/widgets/vue/navigator.vue +134 -0
- solara/widgets/vue/vegalite.vue +130 -0
- solara/widgets/widgets.py +74 -0
- solara_ui-1.45.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json +7 -0
- solara_ui-1.45.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json +7 -0
- solara_ui-1.45.0.dist-info/METADATA +162 -0
- solara_ui-1.45.0.dist-info/RECORD +464 -0
- solara_ui-1.45.0.dist-info/WHEEL +4 -0
- solara_ui-1.45.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
ref="editor"
|
|
5
|
+
class="
|
|
6
|
+
solara-milkdown solara-markdown
|
|
7
|
+
rendered_html
|
|
8
|
+
jp-RenderedHTMLCommon
|
|
9
|
+
"
|
|
10
|
+
></div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script>
|
|
14
|
+
module.exports = {
|
|
15
|
+
mounted() {
|
|
16
|
+
const version = "6.3.0";
|
|
17
|
+
console.log(this);
|
|
18
|
+
(async () => {
|
|
19
|
+
console.log(this);
|
|
20
|
+
const {
|
|
21
|
+
Editor,
|
|
22
|
+
nord,
|
|
23
|
+
commonmark,
|
|
24
|
+
rootCtx,
|
|
25
|
+
defaultValueCtx,
|
|
26
|
+
menu,
|
|
27
|
+
listenerCtx,
|
|
28
|
+
listener,
|
|
29
|
+
ThemeGlobal,
|
|
30
|
+
ThemeIcon,
|
|
31
|
+
ThemeColor,
|
|
32
|
+
ThemeSize,
|
|
33
|
+
history,
|
|
34
|
+
} = (
|
|
35
|
+
await this.import([
|
|
36
|
+
`${this.getCdn()}/@widgetti/solara-milkdown@${version}/dist/index.min.js`,
|
|
37
|
+
])
|
|
38
|
+
)[0];
|
|
39
|
+
|
|
40
|
+
const iconMapping = {
|
|
41
|
+
h1: {
|
|
42
|
+
label: "h1",
|
|
43
|
+
icon: "",
|
|
44
|
+
},
|
|
45
|
+
h2: {
|
|
46
|
+
label: "h2",
|
|
47
|
+
icon: "",
|
|
48
|
+
},
|
|
49
|
+
h3: {
|
|
50
|
+
label: "h3",
|
|
51
|
+
icon: "",
|
|
52
|
+
},
|
|
53
|
+
loading: {
|
|
54
|
+
label: "loading",
|
|
55
|
+
icon: "",
|
|
56
|
+
},
|
|
57
|
+
quote: {
|
|
58
|
+
label: "quote",
|
|
59
|
+
icon: "mdi-format-quote-close",
|
|
60
|
+
},
|
|
61
|
+
code: {
|
|
62
|
+
label: "code",
|
|
63
|
+
icon: "mdi-code-braces",
|
|
64
|
+
},
|
|
65
|
+
table: {
|
|
66
|
+
label: "table",
|
|
67
|
+
icon: "mdi-table",
|
|
68
|
+
},
|
|
69
|
+
divider: {
|
|
70
|
+
label: "divider",
|
|
71
|
+
icon: "mdi-minus",
|
|
72
|
+
},
|
|
73
|
+
image: {
|
|
74
|
+
label: "image",
|
|
75
|
+
icon: "mdi-image",
|
|
76
|
+
},
|
|
77
|
+
brokenImage: {
|
|
78
|
+
label: "broken image",
|
|
79
|
+
icon: "",
|
|
80
|
+
},
|
|
81
|
+
bulletList: {
|
|
82
|
+
label: "bullet list",
|
|
83
|
+
icon: "mdi-format-list-bulleted",
|
|
84
|
+
},
|
|
85
|
+
orderedList: {
|
|
86
|
+
label: "ordered list",
|
|
87
|
+
icon: "mdi-format-list-numbered",
|
|
88
|
+
},
|
|
89
|
+
taskList: {
|
|
90
|
+
label: "task list",
|
|
91
|
+
icon: "",
|
|
92
|
+
},
|
|
93
|
+
bold: {
|
|
94
|
+
label: "bold",
|
|
95
|
+
icon: "mdi-format-bold",
|
|
96
|
+
},
|
|
97
|
+
italic: {
|
|
98
|
+
label: "italic",
|
|
99
|
+
icon: "mdi-format-italic",
|
|
100
|
+
},
|
|
101
|
+
inlineCode: {
|
|
102
|
+
label: "inline code",
|
|
103
|
+
icon: "mdi-code-braces-box",
|
|
104
|
+
},
|
|
105
|
+
strikeThrough: {
|
|
106
|
+
label: "strike through",
|
|
107
|
+
icon: "mdi-format-strikethrough",
|
|
108
|
+
},
|
|
109
|
+
link: {
|
|
110
|
+
label: "link",
|
|
111
|
+
icon: "mdi-link",
|
|
112
|
+
},
|
|
113
|
+
leftArrow: {
|
|
114
|
+
label: "left arrow",
|
|
115
|
+
icon: "chevron_left",
|
|
116
|
+
},
|
|
117
|
+
rightArrow: {
|
|
118
|
+
label: "right arrow",
|
|
119
|
+
icon: "",
|
|
120
|
+
},
|
|
121
|
+
upArrow: {
|
|
122
|
+
label: "up arrow",
|
|
123
|
+
icon: "",
|
|
124
|
+
},
|
|
125
|
+
downArrow: {
|
|
126
|
+
label: "down arrow",
|
|
127
|
+
icon: "mdi-menu-down",
|
|
128
|
+
},
|
|
129
|
+
alignLeft: {
|
|
130
|
+
label: "align left",
|
|
131
|
+
icon: "",
|
|
132
|
+
},
|
|
133
|
+
alignRight: {
|
|
134
|
+
label: "align right",
|
|
135
|
+
icon: "",
|
|
136
|
+
},
|
|
137
|
+
alignCenter: {
|
|
138
|
+
label: "align center",
|
|
139
|
+
icon: "",
|
|
140
|
+
},
|
|
141
|
+
delete: {
|
|
142
|
+
label: "delete",
|
|
143
|
+
icon: "",
|
|
144
|
+
},
|
|
145
|
+
select: {
|
|
146
|
+
label: "select",
|
|
147
|
+
icon: "mdi-select",
|
|
148
|
+
},
|
|
149
|
+
unchecked: {
|
|
150
|
+
label: "unchecked",
|
|
151
|
+
icon: "",
|
|
152
|
+
},
|
|
153
|
+
checked: {
|
|
154
|
+
label: "checked",
|
|
155
|
+
icon: "",
|
|
156
|
+
},
|
|
157
|
+
undo: {
|
|
158
|
+
label: "undo",
|
|
159
|
+
icon: "mdi-undo",
|
|
160
|
+
},
|
|
161
|
+
redo: {
|
|
162
|
+
label: "redo",
|
|
163
|
+
icon: "mdi-redo",
|
|
164
|
+
},
|
|
165
|
+
liftList: {
|
|
166
|
+
label: "unindent",
|
|
167
|
+
icon: "mdi-format-indent-decrease",
|
|
168
|
+
},
|
|
169
|
+
sinkList: {
|
|
170
|
+
label: "indent",
|
|
171
|
+
icon: "mdi-format-indent-increase",
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const extendedNord = nord.override((emotion, manager) => {
|
|
176
|
+
// resets css styling
|
|
177
|
+
manager.set(ThemeColor, ([key, opacity]) => {
|
|
178
|
+
return null;
|
|
179
|
+
});
|
|
180
|
+
manager.set(ThemeGlobal, () => {});
|
|
181
|
+
manager.set(ThemeSize, () => {});
|
|
182
|
+
manager.set(ThemeIcon, (key) => {
|
|
183
|
+
const target = iconMapping[key];
|
|
184
|
+
if (!target) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (!target.icon) {
|
|
188
|
+
console.log(key, "missing");
|
|
189
|
+
target.icon = "mdi-alert-circle";
|
|
190
|
+
}
|
|
191
|
+
const { icon, label } = target;
|
|
192
|
+
const span = document.createElement("span");
|
|
193
|
+
span.className = `mdi v-icon ${icon}`;
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
dom: span,
|
|
197
|
+
label,
|
|
198
|
+
};
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
Editor.make()
|
|
203
|
+
.config((ctx) => {
|
|
204
|
+
ctx.set(rootCtx, this.$refs.editor);
|
|
205
|
+
ctx.set(defaultValueCtx, this.value);
|
|
206
|
+
ctx
|
|
207
|
+
.get(listenerCtx)
|
|
208
|
+
.markdownUpdated((ctx, markdown, prevMarkdown) => {
|
|
209
|
+
this.value = markdown;
|
|
210
|
+
});
|
|
211
|
+
})
|
|
212
|
+
.use(extendedNord)
|
|
213
|
+
.use(commonmark)
|
|
214
|
+
.use(menu)
|
|
215
|
+
.use(listener)
|
|
216
|
+
.use(history)
|
|
217
|
+
.create();
|
|
218
|
+
})();
|
|
219
|
+
},
|
|
220
|
+
methods: {
|
|
221
|
+
import(deps) {
|
|
222
|
+
return this.loadRequire().then(
|
|
223
|
+
() => {
|
|
224
|
+
if(window.jupyterVue) {
|
|
225
|
+
// in jupyterlab, we take Vue from ipyvue/jupyterVue
|
|
226
|
+
define("vue", [], () => window.jupyterVue.Vue);
|
|
227
|
+
} else {
|
|
228
|
+
define("vue", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);
|
|
229
|
+
}
|
|
230
|
+
return new Promise((resolve, reject) => {
|
|
231
|
+
requirejs(deps, (...modules) => resolve(modules));
|
|
232
|
+
})
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
},
|
|
236
|
+
loadRequire() {
|
|
237
|
+
/* Needed in lab */
|
|
238
|
+
if (window.requirejs) {
|
|
239
|
+
console.log("require found");
|
|
240
|
+
return Promise.resolve();
|
|
241
|
+
}
|
|
242
|
+
return new Promise((resolve, reject) => {
|
|
243
|
+
const script = document.createElement("script");
|
|
244
|
+
script.src = `${this.getCdn()}/requirejs@2.3.6/require.js`;
|
|
245
|
+
script.onload = resolve;
|
|
246
|
+
script.onerror = reject;
|
|
247
|
+
document.head.appendChild(script);
|
|
248
|
+
});
|
|
249
|
+
},
|
|
250
|
+
getJupyterBaseUrl() {
|
|
251
|
+
// if base url is set, we use ./ for relative paths compared to the base url
|
|
252
|
+
if (document.getElementsByTagName("base").length) {
|
|
253
|
+
return "./";
|
|
254
|
+
}
|
|
255
|
+
const labConfigData = document.getElementById('jupyter-config-data');
|
|
256
|
+
if(labConfigData) {
|
|
257
|
+
/* lab and Voila */
|
|
258
|
+
return JSON.parse(labConfigData.textContent).baseUrl;
|
|
259
|
+
}
|
|
260
|
+
let base = document.body.dataset.baseUrl || document.baseURI;
|
|
261
|
+
if(!base.endsWith('/')) {
|
|
262
|
+
base += '/';
|
|
263
|
+
}
|
|
264
|
+
return base
|
|
265
|
+
},
|
|
266
|
+
getCdn() {
|
|
267
|
+
return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
</script>
|
|
272
|
+
|
|
273
|
+
<style id="solara-markdown-editor">
|
|
274
|
+
.solara-milkdown {
|
|
275
|
+
position: relative; /* since the dropdown uses position absolute */
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
div.solara-milkdown {
|
|
279
|
+
padding-right: 0px; /* just the top element, otherwise the menu is not full width. */
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.solara-markdown strong {
|
|
283
|
+
font-weight: bold;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* Milkdown produces a p element in the li, while in the notebook that does not happen, by removing the bottom margin it looks the same.
|
|
287
|
+
v6.3 puts another div in it it seems, therefore we have the second rule
|
|
288
|
+
*/
|
|
289
|
+
.solara-markdown li > p,
|
|
290
|
+
.solara-markdown li > .list-item_body > p {
|
|
291
|
+
margin: 0;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* not sure why these get added, so we 'remove' them */
|
|
295
|
+
.solara-milkdown .list-item_label {
|
|
296
|
+
display: none;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* easiest way to remove the table button, which we do not support yet, only using the 'gfm' preset */
|
|
300
|
+
.solara-milkdown button[aria-label~="table"] {
|
|
301
|
+
display: none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* .jp-RenderedHTMLCommon blockquote was less specific than what vuetify did, so make this rule more specific */
|
|
305
|
+
.jp-RenderedHTMLCommon .blockquote {
|
|
306
|
+
margin: 1em 2em;
|
|
307
|
+
padding: 0 1em;
|
|
308
|
+
border-left: 5px solid var(--jp-border-color2);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.solara-milkdown .milkdown-menu {
|
|
312
|
+
border-color: var(--jp-content-font-color3);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.solara-milkdown button {
|
|
316
|
+
color: var(--jp-content-font-color2);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.solara-milkdown .menu-selector-list,
|
|
320
|
+
.solara-milkdown .code-fence_selector-list {
|
|
321
|
+
background-color: var(--jp-layout-color0);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.solara-milkdown .code-fence {
|
|
325
|
+
background-color: var(--jp-layout-color2);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.solara-milkdown .code-fence_selector,
|
|
329
|
+
.solara-milkdown .image-container.empty {
|
|
330
|
+
background-color: var(--jp-layout-color3);
|
|
331
|
+
border: 0;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.solara-markdown .tooltip-input {
|
|
335
|
+
background-color: var(--jp-layout-color0);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* get classic notebook consistent */
|
|
339
|
+
.solara-milkdown .menu-selector-wrapper,
|
|
340
|
+
.solara-milkdown button {
|
|
341
|
+
font-size: 12.25px;
|
|
342
|
+
}
|
|
343
|
+
.solara-milkdown .image-container .placeholder {
|
|
344
|
+
font-size: 20px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.solara-markdown ul {
|
|
348
|
+
margin-block-start: 1em;
|
|
349
|
+
margin-block-end: 1em;
|
|
350
|
+
margin-inline-start: 0px;
|
|
351
|
+
margin-inline-end: 0px;
|
|
352
|
+
padding-inline-start: 40px;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* classic notebook shows a blue border otherwise */
|
|
356
|
+
.solara-milkdown [contenteditable] {
|
|
357
|
+
outline: 0px solid transparent;
|
|
358
|
+
}
|
|
359
|
+
</style>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import io
|
|
2
|
+
from typing import Any, List
|
|
3
|
+
|
|
4
|
+
import solara
|
|
5
|
+
from solara.alias import rw
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@solara.component
|
|
9
|
+
def FigureMatplotlib(
|
|
10
|
+
figure,
|
|
11
|
+
dependencies: List[Any] = None,
|
|
12
|
+
format: str = "svg",
|
|
13
|
+
**kwargs,
|
|
14
|
+
):
|
|
15
|
+
"""Display a matplotlib figure.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```solara
|
|
21
|
+
import solara
|
|
22
|
+
from matplotlib.figure import Figure
|
|
23
|
+
|
|
24
|
+
@solara.component
|
|
25
|
+
def Page():
|
|
26
|
+
fig = Figure()
|
|
27
|
+
ax = fig.subplots()
|
|
28
|
+
ax.plot([1, 2, 3], [1, 4, 9])
|
|
29
|
+
return solara.FigureMatplotlib(fig)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
When running under solara-server, we by default configure the same 'inline' backend as in the Jupyter notebook.
|
|
33
|
+
|
|
34
|
+
For performance reasons, you might want to pass in a list of dependencies that indicate when
|
|
35
|
+
the figure changed, to avoid re-rendering it on every render.
|
|
36
|
+
|
|
37
|
+
## Example using pyplot
|
|
38
|
+
|
|
39
|
+
Note that it is also possible to use the pyplot interface, but be sure to close the figure not to leak memory.
|
|
40
|
+
|
|
41
|
+
```solara
|
|
42
|
+
import solara
|
|
43
|
+
import matplotlib.pyplot as plt
|
|
44
|
+
|
|
45
|
+
@solara.component
|
|
46
|
+
def Page():
|
|
47
|
+
plt.figure()
|
|
48
|
+
plt.plot([1, 2, 3], [1, 4, 9])
|
|
49
|
+
plt.show()
|
|
50
|
+
plt.close()
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Note that the figure is not the same size using the pyplot interface, due to the default figure size being different.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## Arguments
|
|
57
|
+
|
|
58
|
+
* `figure`: Matplotlib figure.
|
|
59
|
+
* `dependencies`: List of dependencies to watch for changes, if None, will convert the figure to a static image on each render.
|
|
60
|
+
* `format`: The image format to to convert the Matplotlib figure to (png, jpg, svg, etc.)
|
|
61
|
+
* `kwargs`: Additional arguments to passed to figure.savefig
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
def make_image():
|
|
65
|
+
f = io.BytesIO()
|
|
66
|
+
figure.savefig(f, format=format, **kwargs)
|
|
67
|
+
return f.getvalue()
|
|
68
|
+
|
|
69
|
+
value = solara.use_memo(make_image, dependencies)
|
|
70
|
+
# mime type name is different from format name of matplotlib
|
|
71
|
+
format_mime = format
|
|
72
|
+
if format_mime == "svg":
|
|
73
|
+
format_mime = "svg+xml"
|
|
74
|
+
return rw.Image(value=value, format=format_mime)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import solara
|
|
4
|
+
|
|
5
|
+
from .head_tag import HeadTag
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@solara.component
|
|
9
|
+
def Meta(name: Optional[str] = None, property: Optional[str] = None, content: Optional[str] = None):
|
|
10
|
+
"""Add a meta tag to the head element, or replace a meta tag with the same name and or property.
|
|
11
|
+
|
|
12
|
+
This component should be used inside a [Head](/documentation/components/page/head) component, e.g.:
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
import solara
|
|
16
|
+
|
|
17
|
+
@solara.component
|
|
18
|
+
def Page():
|
|
19
|
+
with solara.VBox() as main:
|
|
20
|
+
MyAwesomeComponent()
|
|
21
|
+
with solara.Head():
|
|
22
|
+
solara.Meta(name="description", property="og:description", content="My page description")
|
|
23
|
+
solara.Meta(property="og:title", content="My page title for social media")
|
|
24
|
+
solara.Meta(property="og:image", content="https://solara.dev/static/assets/images/logo.svg")
|
|
25
|
+
solara.Meta(property="og:type", content="website")
|
|
26
|
+
return main
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If multiple Meta components are used with the same name+description, the 'deepest' child will take precedence.
|
|
30
|
+
|
|
31
|
+
## Arguments
|
|
32
|
+
|
|
33
|
+
* name: The name of the meta tag, used in standard meta tags
|
|
34
|
+
* property: the property of the meta tag, used in Open Graph tags.
|
|
35
|
+
* content: The content of the meta tag.
|
|
36
|
+
"""
|
|
37
|
+
attributes = {}
|
|
38
|
+
key = ""
|
|
39
|
+
if name is not None:
|
|
40
|
+
attributes["name"] = name
|
|
41
|
+
key += "-" + name
|
|
42
|
+
if property is not None:
|
|
43
|
+
attributes["property"] = property
|
|
44
|
+
key += "-" + property
|
|
45
|
+
if content is not None:
|
|
46
|
+
attributes["content"] = content
|
|
47
|
+
return HeadTag(tagname="meta", attributes=attributes, key=key)
|