solara-ui 1.50.0__py3-none-any.whl → 1.51.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.
solara/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Build webapps using IPywidgets"""
2
2
 
3
- __version__ = "1.50.0"
3
+ __version__ = "1.51.0"
4
4
  github_url = "https://github.com/widgetti/solara"
5
5
  git_branch = "master"
6
6
 
@@ -137,7 +137,9 @@ def FileBrowser(
137
137
  # if we select a file, we need to make sure the directory is correct
138
138
  # NOTE: although we expect a Path, abuse might make it a string
139
139
  if isinstance(selected_private, Path):
140
- current_dir.value = selected_private.resolve().parent
140
+ # Note that we do not call .resolve() before using .parent, otherwise /some/path/.. will
141
+ # set the current directory to /, moving up two levels.
142
+ current_dir.value = selected_private.parent.resolve()
141
143
 
142
144
  solara.use_effect(sync_directory_from_selected, [selected_private])
143
145
 
@@ -1,4 +1,5 @@
1
1
  import datetime as dt
2
+ import logging
2
3
  from typing import Callable, Dict, List, Optional, Tuple, Union, cast
3
4
 
4
5
  import ipyvue
@@ -9,6 +10,9 @@ import solara.lab
9
10
  from solara.components.input import _use_input_type
10
11
 
11
12
 
13
+ logger = logging.getLogger(__name__)
14
+
15
+
12
16
  def use_close_menu(el: reacton.core.Element, is_open: solara.Reactive[bool]):
13
17
  is_open_ref = solara.use_ref(is_open)
14
18
  is_open_ref.current = is_open
@@ -17,7 +21,11 @@ def use_close_menu(el: reacton.core.Element, is_open: solara.Reactive[bool]):
17
21
  def close_menu(*ignore_args):
18
22
  is_open_ref.current.set(False)
19
23
 
20
- widget = cast(ipyvue.VueWidget, solara.get_widget(el))
24
+ try:
25
+ widget = cast(ipyvue.VueWidget, solara.get_widget(el))
26
+ except Exception:
27
+ logger.exception("Error getting widget for use_close_menu")
28
+ return
21
29
  widget.on_event("keyup.enter", close_menu)
22
30
  widget.on_event("keydown.tab", close_menu)
23
31
 
@@ -178,9 +186,9 @@ def InputDate(
178
186
  max=max_date, # type: ignore
179
187
  min=min_date, # type: ignore
180
188
  type=date_picker_type,
189
+ children=children,
181
190
  ):
182
- if len(children) > 0:
183
- solara.display(*children)
191
+ pass
184
192
 
185
193
 
186
194
  @solara.component
@@ -366,7 +374,6 @@ def InputDateRange(
366
374
  max=max_date, # type: ignore
367
375
  min=min_date, # type: ignore
368
376
  type=date_picker_type,
377
+ children=children,
369
378
  ):
370
- if len(children) > 0:
371
- for el in children:
372
- solara.display(el)
379
+ pass
solara/server/server.py CHANGED
@@ -371,7 +371,7 @@ def read_root(
371
371
  pre_rendered_html = ""
372
372
  pre_rendered_css = ""
373
373
  pre_rendered_metas = ""
374
- title = "Solara ☀️"
374
+ title = settings.theme.title
375
375
  if ssg_data is not None:
376
376
  pre_rendered_html = ssg_data["html"]
377
377
  pre_rendered_css = "\n".join(ssg_data["styles"])
solara/server/settings.py CHANGED
@@ -38,6 +38,7 @@ class ThemeSettings(BaseSettings):
38
38
  variant: ThemeVariant = ThemeVariant.light
39
39
  loader: str = "solara"
40
40
  show_banner: bool = True
41
+ title: str = "Solara ☀️"
41
42
 
42
43
  class Config:
43
44
  env_prefix = "solara_theme_"
@@ -119,7 +119,7 @@ async def main():
119
119
  ]
120
120
  for dep in requirements:
121
121
  await micropip.install(dep, keep_going=True)
122
- await micropip.install("/wheels/solara-1.50.0-py2.py3-none-any.whl", keep_going=True)
122
+ await micropip.install("/wheels/solara-1.51.0-py2.py3-none-any.whl", keep_going=True)
123
123
  import solara
124
124
 
125
125
  el = solara.Warning("lala")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solara-ui
3
- Version: 1.50.0
3
+ Version: 1.51.0
4
4
  Dynamic: Summary
5
5
  Project-URL: Home, https://www.github.com/widgetti/solara
6
6
  Project-URL: Documentation, https://solara.dev
@@ -1,6 +1,6 @@
1
1
  prefix/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
2
2
  prefix/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
3
- solara/__init__.py,sha256=sAwo5ilYgvykEmTDawkWICtbv2z1XUaEy1WglDsBrvM,3647
3
+ solara/__init__.py,sha256=Zu6LSrb1qgfl7PM3VPEd1douEumLCzgLPZYpG8ZctT8,3647
4
4
  solara/__main__.py,sha256=pm79jfba-0ZapLR0PtwZfMeiTHrLz8kEt79EygRyXxQ,24828
5
5
  solara/_stores.py,sha256=N2Ec-61XNFXwigBx8f5QYPx7gDXenCOBdmLPXiJB45E,12320
6
6
  solara/alias.py,sha256=9vfLzud77NP8in3OID9b5mmIO8NyrnFjN2_aE0lSb1k,216
@@ -43,7 +43,7 @@ solara/components/download.vue,sha256=xdh4olwVvGkQwGNRMU5eVUW1FGvcXrYrCyjddJbvH7
43
43
  solara/components/echarts.py,sha256=aAedLqKuVJnBi3FwhSdQIgAn-w55sNb_hGSmqkosfuA,3069
44
44
  solara/components/echarts.vue,sha256=7TGmxaRUmH-LeH16jHiUzyuZgebGu_JDiWsa2DBSWW4,4056
45
45
  solara/components/figure_altair.py,sha256=t4EEwXrdoisrbV5j2MS-HBlPc5HSFCK5r4mRXvYRH9w,1150
46
- solara/components/file_browser.py,sha256=x4NdYmazI2NChq9x_I7lqcpFOIdX_A4avRPjoB5bvKw,9585
46
+ solara/components/file_browser.py,sha256=vd9BRENagoxxL-RtH5HheQm_0zFrnBiipjtNNvJkIdU,9762
47
47
  solara/components/file_download.py,sha256=Lil0qyiozU_Pxyb_HgnJXOumrxMeDwwavEmZZw6kAs8,7475
48
48
  solara/components/file_drop.py,sha256=BA53EZsCzzPCS8i2ZH_S1NAkmmQlTOvNEoXAt0_1l4A,5239
49
49
  solara/components/file_drop.vue,sha256=7V6YjHhoqOCVDMVPtObNwfHz2MdXLCFlNEqK1brl3zI,2243
@@ -90,7 +90,7 @@ solara/lab/components/__init__.py,sha256=u723AESIHyInjD_7LaonMSheo3-6a-LOmrk6NGk
90
90
  solara/lab/components/chat.py,sha256=m2hW4CGkTjydN5p_CL_HAwtkl6t14psoSZrwlSMRvJc,9305
91
91
  solara/lab/components/confirmation_dialog.py,sha256=V48iN3SovPLLuYI0HVNGlSJ1jfyeCOK2BDFhLW3gg9Y,5822
92
92
  solara/lab/components/cross_filter.py,sha256=qJZTRDMCNGy8UuHzuDyWuGA_dU4pI8lzSCDw0hmN8I4,186
93
- solara/lab/components/input_date.py,sha256=ivbZZWr5SGF2W-TTwdM0WwtyeC2V3eHSZ-EKQCk36XI,15575
93
+ solara/lab/components/input_date.py,sha256=eMFITLWK50jMz6F3HjhzQkj32CD0L_DAw6NLZWYczw8,15674
94
94
  solara/lab/components/input_time.py,sha256=Lko7EhN6Ny68aiszwCu8dBVhAYXpLo2W0jLe1alU6EU,5399
95
95
  solara/lab/components/menu.py,sha256=Ig2icuftK5m27k5SUO-98hn6S6Ng4g6s4p_g5ccSkTw,5962
96
96
  solara/lab/components/menu.vue,sha256=wiHv6NP4LtCxdYHl62oz_3DiFoVzeRBdgL3be3p2bPo,1319
@@ -117,8 +117,8 @@ solara/server/kernel_context.py,sha256=C6ZIf7NTzDaQ2Z1tpDt0zcV0ZXsis2nUTKUQJ3F9F
117
117
  solara/server/patch.py,sha256=-00MlyWGIBw9tcDK9Cn0y-kWCI8LKP8sEsz-GAFKbgE,19871
118
118
  solara/server/qt.py,sha256=QdMxX2T0Ol_j3QHYwInDyT5Gy4sOhYljMPYfru5kwLg,3774
119
119
  solara/server/reload.py,sha256=BBH7QhrV1-e9RVyNE3uz1oPj1DagC3t_XSqGPNz0nJE,9747
120
- solara/server/server.py,sha256=9NQcg_ncrGPQUDs50-jJGdzhlub3G3dsgcBjxqrIxX0,17120
121
- solara/server/settings.py,sha256=tXXpoK5CBBDbuRSMiert6UKpzMQaDbsBfyoX1Hk8iLM,7599
120
+ solara/server/server.py,sha256=YbOVCeho_tmYC2xcrJTzDe62H_xTpwiMuqsBWvgN_2A,17125
121
+ solara/server/settings.py,sha256=TOtXN7R7Zz19APXlXpFCjh3Uk-U8u3HHpE56X09O6i0,7632
122
122
  solara/server/shell.py,sha256=eLrpTAw3j_1pU-2S7_Jzd4xkoSs_CA7Nv7w0Q7IVLUM,9333
123
123
  solara/server/starlette.py,sha256=gEBSJf-jZQ6Ep3HKIkcZNadpxgCp6VWdvlq67TjxJQ8,32934
124
124
  solara/server/telemetry.py,sha256=GPKGA5kCIqJb76wgxQ2_U2uV_s0r-1tKqv-GVxo5hs8,6038
@@ -146,7 +146,7 @@ solara/server/static/highlight-dark.css,sha256=xO8-vta9vG4s1OfJNHXWqiLWzx_gM03jo
146
146
  solara/server/static/highlight.css,sha256=k8ZdT5iwrGQ5tXTQHAXuxvZrSUq3kwCdEpy3mlFoZjs,2637
147
147
  solara/server/static/main-vuetify.js,sha256=R3qM4xMlstMpRUdRaul78p34z_Av2ONSTXksg2V9TqQ,9503
148
148
  solara/server/static/main.js,sha256=mcx4JNQ4Lg4pNdUIqMoZos1mZyYFS48yd_JNFFJUqIE,5679
149
- solara/server/static/solara_bootstrap.py,sha256=cIh-4dt_etWJrcPHobnu8SkhQ1PFrzzFYwXQ1kP0ZRc,3195
149
+ solara/server/static/solara_bootstrap.py,sha256=ipORZbxyK8a73g8vTWiAjj2NbWY2hwoi83zRmMpuShQ,3195
150
150
  solara/server/static/sun.svg,sha256=jEKBAGCr7b9zNYv0VUb7lMWKjnU2dX69_Ye_DZWGXJI,6855
151
151
  solara/server/static/webworker.js,sha256=cjAFz7-SygStHJnYlJUlJs-gE_7YQeQ-WBDcmKYyjvo,1372
152
152
  solara/server/templates/index.html.j2,sha256=JXQo1M-STFHLBOFetgG7509cAq8xUP0VAEtYDzz35fY,31
@@ -456,9 +456,9 @@ solara/widgets/vue/gridlayout.vue,sha256=LZk-YlqM7nv_7Y5TTq2xqfH1j2SLP1QOH5eiz7G
456
456
  solara/widgets/vue/html.vue,sha256=48K5rjp0AdJDeRV6F3nOHW3J0WXPeHn55r5pGClK2fU,112
457
457
  solara/widgets/vue/navigator.vue,sha256=7fkX-4_YSnnMIPUMKMvQVVEzrmhY9BFAYvHMqZqTXpI,4790
458
458
  solara/widgets/vue/vegalite.vue,sha256=zhocRsUCNIRQCEbD16er5sYnuHU0YThatRHnorA3P18,4596
459
- solara_ui-1.50.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
460
- solara_ui-1.50.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
461
- solara_ui-1.50.0.dist-info/METADATA,sha256=r0DTlg-HfHyjB5IT76jfwQZeeIIf3Kf4TswqHH6z5mI,7459
462
- solara_ui-1.50.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
463
- solara_ui-1.50.0.dist-info/licenses/LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
464
- solara_ui-1.50.0.dist-info/RECORD,,
459
+ solara_ui-1.51.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
460
+ solara_ui-1.51.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
461
+ solara_ui-1.51.0.dist-info/METADATA,sha256=Rov3kdktbmJl6EUOQ4vhpfN49M6xt5COtnu5cjoqb-g,7459
462
+ solara_ui-1.51.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
463
+ solara_ui-1.51.0.dist-info/licenses/LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
464
+ solara_ui-1.51.0.dist-info/RECORD,,