streamlit-nightly 1.46.1.dev20250624__py3-none-any.whl → 1.46.1.dev20250625__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.
Files changed (83) hide show
  1. streamlit/elements/arrow.py +5 -5
  2. streamlit/elements/code.py +6 -4
  3. streamlit/elements/metric.py +20 -2
  4. streamlit/elements/widgets/multiselect.py +27 -1
  5. streamlit/static/index.html +1 -1
  6. streamlit/static/manifest.json +214 -214
  7. streamlit/static/static/js/{ErrorOutline.esm.DcGodXA0.js → ErrorOutline.esm.Ca4_C74G.js} +1 -1
  8. streamlit/static/static/js/{FileDownload.esm.BtTSWyv0.js → FileDownload.esm.BEXpx-NN.js} +1 -1
  9. streamlit/static/static/js/{FileHelper.BOV_ijyF.js → FileHelper.B4GGzKqK.js} +1 -1
  10. streamlit/static/static/js/{FormClearHelper.YYlwo10a.js → FormClearHelper.CpsBciie.js} +1 -1
  11. streamlit/static/static/js/{Hooks.BoB69I0K.js → Hooks.DsIXUDOP.js} +1 -1
  12. streamlit/static/static/js/{InputInstructions.B5C3dEon.js → InputInstructions.Dh8ccyYH.js} +1 -1
  13. streamlit/static/static/js/{ProgressBar.2T39z4H_.js → ProgressBar.C57HogTe.js} +2 -2
  14. streamlit/static/static/js/{RenderInPortalIfExists.Dr06opo0.js → RenderInPortalIfExists.JT5A_75h.js} +1 -1
  15. streamlit/static/static/js/{Toolbar.BRouzc5U.js → Toolbar.BZBwHk6r.js} +1 -1
  16. streamlit/static/static/js/{base-input.PyN4CoyX.js → base-input.C3m059Ja.js} +4 -4
  17. streamlit/static/static/js/{checkbox.CpyGalPT.js → checkbox.Bz1HY8hS.js} +1 -1
  18. streamlit/static/static/js/{createSuper.Jon9k3Yt.js → createSuper.BgXZoFPR.js} +1 -1
  19. streamlit/static/static/js/{data-grid-overlay-editor.D4ghymBb.js → data-grid-overlay-editor.DHAXzOWr.js} +1 -1
  20. streamlit/static/static/js/{downloader.FX1msyAN.js → downloader.DXmvN319.js} +1 -1
  21. streamlit/static/static/js/{es6.QGDMdnvM.js → es6.Dg-Jfu-r.js} +2 -2
  22. streamlit/static/static/js/{iframeResizer.contentWindow.t8qLRzyv.js → iframeResizer.contentWindow.BqWlTWPM.js} +1 -1
  23. streamlit/static/static/js/{index.BG2gdqVa.js → index.04JkG8Km.js} +1 -1
  24. streamlit/static/static/js/{index.B_pohBxx.js → index.1o7GFmH9.js} +1 -1
  25. streamlit/static/static/js/{index.Bzp1Qysi.js → index.B-IWkE_m.js} +1 -1
  26. streamlit/static/static/js/{index.PsjpMKwq.js → index.B5HCKYGs.js} +2 -2
  27. streamlit/static/static/js/{index.C-vLCSJp.js → index.BEHais2d.js} +58 -59
  28. streamlit/static/static/js/{index.B5UnBp6n.js → index.BSduVAl-.js} +1 -1
  29. streamlit/static/static/js/{index.CZttj0Fd.js → index.BUpHFScA.js} +1 -1
  30. streamlit/static/static/js/{index.By43fiCF.js → index.B_GGKi7h.js} +1 -1
  31. streamlit/static/static/js/{index.C8r7DD-9.js → index.BgcFXG8Y.js} +1 -1
  32. streamlit/static/static/js/{index.kEHB5PaN.js → index.BgoLThsY.js} +1 -1
  33. streamlit/static/static/js/{index.BJhXUMZ4.js → index.Bpq_TVP8.js} +1 -1
  34. streamlit/static/static/js/{index.Dz6zHKtI.js → index.BqfEAvp0.js} +1 -1
  35. streamlit/static/static/js/{index.Dieu6abC.js → index.C-C4puTW.js} +1 -1
  36. streamlit/static/static/js/{index.BTUUpB01.js → index.C6WBb5UI.js} +1 -1
  37. streamlit/static/static/js/{index.BM1_hMg8.js → index.C8kJiudO.js} +1 -1
  38. streamlit/static/static/js/{index.B2Y8O1Wt.js → index.C9-NSIWy.js} +1 -1
  39. streamlit/static/static/js/{index.DgNa_UKX.js → index.CF7xf0Kc.js} +60 -60
  40. streamlit/static/static/js/{index.CUBt4-Uz.js → index.CIgyykei.js} +2 -2
  41. streamlit/static/static/js/{index.ArgFGqRm.js → index.CL0g79ua.js} +1 -1
  42. streamlit/static/static/js/{index.CdJwjLfQ.js → index.CLutgZmA.js} +1 -1
  43. streamlit/static/static/js/{index.B-vIEt1m.js → index.CWNrL7gF.js} +1 -1
  44. streamlit/static/static/js/{index.B7osuoZN.js → index.Cob2CEOY.js} +2 -2
  45. streamlit/static/static/js/{index.CU45_Nrh.js → index.CuNbzfuD.js} +1 -1
  46. streamlit/static/static/js/{index.BXxgCK9y.js → index.CxdFkXN7.js} +1 -1
  47. streamlit/static/static/js/{index.CuLeR7Zz.js → index.D6NDAr7R.js} +1 -1
  48. streamlit/static/static/js/{index.DdfoIDPC.js → index.D8Opklrn.js} +1 -1
  49. streamlit/static/static/js/{index.DthY-obI.js → index.DPwE86ME.js} +2 -2
  50. streamlit/static/static/js/index.DSVau5_M.js +1 -0
  51. streamlit/static/static/js/{index.IZ-swmmu.js → index.D_AaeKaM.js} +1 -1
  52. streamlit/static/static/js/{index.cLUrTr09.js → index.De84gVwH.js} +1 -1
  53. streamlit/static/static/js/{index.C4qeNI_i.js → index.DkawoLEN.js} +1 -1
  54. streamlit/static/static/js/index.DyESyaCa.js +1 -0
  55. streamlit/static/static/js/index.PYYOff5g.js +1 -0
  56. streamlit/static/static/js/{index.COUW2Eq4.js → index.Q4yOipZt.js} +2 -2
  57. streamlit/static/static/js/{index.D4M62uXW.js → index.lctgkaZQ.js} +1 -1
  58. streamlit/static/static/js/index.tO_5FrTQ.js +1 -0
  59. streamlit/static/static/js/{index.CwKcK2uB.js → index.wwMXYz4o.js} +1 -1
  60. streamlit/static/static/js/{input.mfVbl2I5.js → input.G0_SQaLD.js} +2 -2
  61. streamlit/static/static/js/{memory.B-p09GS3.js → memory.B6tpNh1r.js} +1 -1
  62. streamlit/static/static/js/{mergeWith.D6q7TPdQ.js → mergeWith.BIMOGvX0.js} +1 -1
  63. streamlit/static/static/js/{number-overlay-editor.QOWTlq5z.js → number-overlay-editor.BGVzFv7I.js} +1 -1
  64. streamlit/static/static/js/{possibleConstructorReturn.DO-pRPNX.js → possibleConstructorReturn.Bk9dXD1L.js} +1 -1
  65. streamlit/static/static/js/{sandbox.DREGkhZ5.js → sandbox.DWWQ1lBu.js} +1 -1
  66. streamlit/static/static/js/{textarea.RxMqblTR.js → textarea.FHoad42C.js} +2 -2
  67. streamlit/static/static/js/{timepicker.BSrUPnyZ.js → timepicker.yc5xqDUF.js} +1 -1
  68. streamlit/static/static/js/{toConsumableArray.BkyyIrpf.js → toConsumableArray.DfbSd22b.js} +1 -1
  69. streamlit/static/static/js/{uniqueId.CXqhuYjv.js → uniqueId.C03hvAF0.js} +1 -1
  70. streamlit/static/static/js/{useBasicWidgetState.QQhMYIp5.js → useBasicWidgetState.DxtD7xs-.js} +1 -1
  71. streamlit/static/static/js/{useOnInputChange.DvWbafRm.js → useOnInputChange.DqPkFylT.js} +1 -1
  72. streamlit/static/static/js/{withFullScreenWrapper.CX_bKrfm.js → withFullScreenWrapper.CAwHwFP9.js} +1 -1
  73. streamlit/web/server/server.py +5 -6
  74. {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.1.dev20250625.dist-info}/METADATA +1 -1
  75. {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.1.dev20250625.dist-info}/RECORD +79 -79
  76. streamlit/static/static/js/index.2JQx94HQ.js +0 -1
  77. streamlit/static/static/js/index.C78GEvay.js +0 -1
  78. streamlit/static/static/js/index.CvFBPhOY.js +0 -1
  79. streamlit/static/static/js/index.GgMflWG-.js +0 -1
  80. {streamlit_nightly-1.46.1.dev20250624.data → streamlit_nightly-1.46.1.dev20250625.data}/scripts/streamlit.cmd +0 -0
  81. {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.1.dev20250625.dist-info}/WHEEL +0 -0
  82. {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.1.dev20250625.dist-info}/entry_points.txt +0 -0
  83. {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.1.dev20250625.dist-info}/top_level.txt +0 -0
@@ -305,11 +305,11 @@ class ArrowMixin:
305
305
 
306
306
  If ``data`` is a ``pandas.Styler``, it will be used to style its
307
307
  underlying ``pandas.DataFrame``. Streamlit supports custom cell
308
- values and colors. It does not support some of the more exotic
309
- styling options, like bar charts, hovering, and captions. For
310
- these styling options, use column configuration instead. Text and
311
- number formatting from ``column_config`` always takes precedence
312
- over text and number formatting from ``pandas.Styler``.
308
+ values, colors, and font weights. It does not support some of the
309
+ more exotic styling options, like bar charts, hovering, and
310
+ captions. For these styling options, use column configuration
311
+ instead. Text and number formatting from ``column_config`` always
312
+ takes precedence over text and number formatting from ``pandas.Styler``.
313
313
 
314
314
  Collection-like objects include all Python-native ``Collection``
315
315
  types, such as ``dict``, ``list``, and ``set``.
@@ -20,7 +20,7 @@ from typing import TYPE_CHECKING, cast
20
20
  from streamlit.elements.lib.layout_utils import (
21
21
  Height,
22
22
  LayoutConfig,
23
- WidthWithoutContent,
23
+ Width,
24
24
  validate_height,
25
25
  validate_width,
26
26
  )
@@ -42,7 +42,7 @@ class CodeMixin:
42
42
  line_numbers: bool = False,
43
43
  wrap_lines: bool = False,
44
44
  height: Height | None = "content",
45
- width: WidthWithoutContent = "stretch",
45
+ width: Width = "stretch",
46
46
  ) -> DeltaGenerator:
47
47
  """Display a code block with optional syntax highlighting.
48
48
 
@@ -85,11 +85,13 @@ class CodeMixin:
85
85
  the screen on mobile devices, which makes it hard to scroll the
86
86
  rest of the app.
87
87
 
88
- width : "stretch" or int
88
+ width : "stretch", "content", or int
89
89
  The width of the code block element. This can be one of the following:
90
90
 
91
91
  - ``"stretch"`` (default): The width of the element matches the
92
92
  width of the parent container.
93
+ - ``"content"``: The width of the element matches the width of its
94
+ content, but doesn't exceed the width of the parent container.
93
95
  - An integer specifying the width in pixels: The element has a
94
96
  fixed width. If the specified width is greater than the width of
95
97
  the parent container, the width of the element matches the width
@@ -137,7 +139,7 @@ class CodeMixin:
137
139
  height = "content"
138
140
  else:
139
141
  validate_height(height, allow_content=True)
140
- validate_width(width)
142
+ validate_width(width, allow_content=True)
141
143
  layout_config = LayoutConfig(height=height, width=width)
142
144
 
143
145
  return self.dg._enqueue("code", code_proto, layout_config=layout_config)
@@ -20,7 +20,13 @@ from typing import TYPE_CHECKING, Any, Literal, Union, cast
20
20
 
21
21
  from typing_extensions import TypeAlias
22
22
 
23
- from streamlit.elements.lib.layout_utils import LayoutConfig, Width, validate_width
23
+ from streamlit.elements.lib.layout_utils import (
24
+ Height,
25
+ LayoutConfig,
26
+ Width,
27
+ validate_height,
28
+ validate_width,
29
+ )
24
30
  from streamlit.elements.lib.policies import maybe_raise_label_warnings
25
31
  from streamlit.elements.lib.utils import (
26
32
  LabelVisibility,
@@ -60,6 +66,7 @@ class MetricMixin:
60
66
  label_visibility: LabelVisibility = "visible",
61
67
  border: bool = False,
62
68
  width: Width = "stretch",
69
+ height: Height = "content",
63
70
  ) -> DeltaGenerator:
64
71
  r"""Display a metric in big bold font, with an optional indicator of how the metric changed.
65
72
 
@@ -124,6 +131,16 @@ class MetricMixin:
124
131
  ``False`` (default), no border is shown. If this is ``True``, a
125
132
  border is shown.
126
133
 
134
+ height : "content", "stretch", or int
135
+ The height of the metric element. This can be one of the following:
136
+
137
+ - ``"content"`` (default): The height of the element matches the
138
+ height of its content, but doesn't exceed the height of the
139
+ parent container.
140
+ - ``"stretch"``: The height of the element matches the height of the
141
+ parent container.
142
+ - An integer specifying the height in pixels.
143
+
127
144
  width : "stretch", "content", or int
128
145
  The width of the metric element. This can be one of the following:
129
146
 
@@ -218,8 +235,9 @@ class MetricMixin:
218
235
  label_visibility
219
236
  )
220
237
 
238
+ validate_height(height, allow_content=True)
221
239
  validate_width(width, allow_content=True)
222
- layout_config = LayoutConfig(width=width)
240
+ layout_config = LayoutConfig(width=width, height=height)
223
241
 
224
242
  return self.dg._enqueue("metric", metric_proto, layout_config=layout_config)
225
243
 
@@ -20,6 +20,11 @@ from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, cast, overloa
20
20
 
21
21
  from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
22
22
  from streamlit.elements.lib.form_utils import current_form_id
23
+ from streamlit.elements.lib.layout_utils import (
24
+ LayoutConfig,
25
+ WidthWithoutContent,
26
+ validate_width,
27
+ )
23
28
  from streamlit.elements.lib.options_selector_utils import (
24
29
  convert_to_sequence_and_check_comparable,
25
30
  create_mappings,
@@ -170,6 +175,7 @@ class MultiSelectMixin:
170
175
  disabled: bool = False,
171
176
  label_visibility: LabelVisibility = "visible",
172
177
  accept_new_options: Literal[False] = False,
178
+ width: WidthWithoutContent = "stretch",
173
179
  ) -> list[T]: ...
174
180
 
175
181
  @overload
@@ -190,6 +196,7 @@ class MultiSelectMixin:
190
196
  disabled: bool = False,
191
197
  label_visibility: LabelVisibility = "visible",
192
198
  accept_new_options: Literal[True] = True,
199
+ width: WidthWithoutContent = "stretch",
193
200
  ) -> list[T | str]: ...
194
201
 
195
202
  @overload
@@ -210,6 +217,7 @@ class MultiSelectMixin:
210
217
  disabled: bool = False,
211
218
  label_visibility: LabelVisibility = "visible",
212
219
  accept_new_options: bool = False,
220
+ width: WidthWithoutContent = "stretch",
213
221
  ) -> list[T] | list[T | str]: ...
214
222
 
215
223
  @gather_metrics("multiselect")
@@ -230,6 +238,7 @@ class MultiSelectMixin:
230
238
  disabled: bool = False,
231
239
  label_visibility: LabelVisibility = "visible",
232
240
  accept_new_options: Literal[False, True] | bool = False,
241
+ width: WidthWithoutContent = "stretch",
233
242
  ) -> list[T] | list[T | str]:
234
243
  r"""Display a multiselect widget.
235
244
  The multiselect widget starts as empty.
@@ -332,6 +341,17 @@ class MultiSelectMixin:
332
341
  can't be added if a case-insensitive match is already selected. The
333
342
  ``max_selections`` argument is still enforced.
334
343
 
344
+ width : "stretch" or int
345
+ The width of the multiselect widget. This can be one of the
346
+ following:
347
+
348
+ - ``"stretch"`` (default): The width of the widget matches the
349
+ width of the parent container.
350
+ - An integer specifying the width in pixels: The widget has a
351
+ fixed width. If the specified width is greater than the width of
352
+ the parent container, the width of the widget matches the width
353
+ of the parent container.
354
+
335
355
  Returns
336
356
  -------
337
357
  list
@@ -397,6 +417,7 @@ class MultiSelectMixin:
397
417
  disabled=disabled,
398
418
  label_visibility=label_visibility,
399
419
  accept_new_options=accept_new_options,
420
+ width=width,
400
421
  ctx=ctx,
401
422
  )
402
423
 
@@ -417,6 +438,7 @@ class MultiSelectMixin:
417
438
  disabled: bool = False,
418
439
  label_visibility: LabelVisibility = "visible",
419
440
  accept_new_options: bool = False,
441
+ width: WidthWithoutContent = "stretch",
420
442
  ctx: ScriptRunContext | None = None,
421
443
  ) -> list[T] | list[T | str]:
422
444
  key = to_key(key)
@@ -457,6 +479,7 @@ class MultiSelectMixin:
457
479
  max_selections=max_selections,
458
480
  placeholder=placeholder,
459
481
  accept_new_options=accept_new_options,
482
+ width=width,
460
483
  )
461
484
 
462
485
  proto = MultiSelectProto()
@@ -503,10 +526,13 @@ class MultiSelectMixin:
503
526
  proto.raw_values[:] = serde.serialize(widget_state.value)
504
527
  proto.set_value = True
505
528
 
529
+ validate_width(width)
530
+ layout_config = LayoutConfig(width=width)
531
+
506
532
  if ctx:
507
533
  save_for_app_testing(ctx, element_id, format_func)
508
534
 
509
- self.dg._enqueue(widget_name, proto)
535
+ self.dg._enqueue(widget_name, proto, layout_config=layout_config)
510
536
 
511
537
  return widget_state.value
512
538
 
@@ -37,7 +37,7 @@
37
37
  <script>
38
38
  window.prerenderReady = false
39
39
  </script>
40
- <script type="module" crossorigin src="./static/js/index.C-vLCSJp.js"></script>
40
+ <script type="module" crossorigin src="./static/js/index.BEHais2d.js"></script>
41
41
  <link rel="stylesheet" crossorigin href="./static/css/index.CJVRHjQZ.css">
42
42
  </head>
43
43
  <body>