streamlit-nightly 1.45.2.dev20250528__py3-none-any.whl → 1.45.2.dev20250531__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 (138) hide show
  1. streamlit/config.py +18 -0
  2. streamlit/delta_generator.py +10 -14
  3. streamlit/elements/doc_string.py +7 -15
  4. streamlit/elements/form.py +14 -0
  5. streamlit/elements/json.py +7 -6
  6. streamlit/elements/layouts.py +21 -3
  7. streamlit/elements/lib/layout_utils.py +24 -0
  8. streamlit/elements/lib/mutable_status_container.py +9 -0
  9. streamlit/elements/markdown.py +33 -3
  10. streamlit/elements/progress.py +3 -12
  11. streamlit/elements/widgets/audio_input.py +3 -10
  12. streamlit/elements/widgets/camera_input.py +5 -9
  13. streamlit/elements/widgets/chat.py +9 -12
  14. streamlit/elements/widgets/data_editor.py +6 -3
  15. streamlit/elements/widgets/file_uploader.py +9 -9
  16. streamlit/elements/widgets/number_input.py +11 -12
  17. streamlit/elements/widgets/select_slider.py +3 -10
  18. streamlit/elements/widgets/selectbox.py +9 -12
  19. streamlit/elements/widgets/slider.py +3 -9
  20. streamlit/elements/widgets/text_widgets.py +13 -22
  21. streamlit/elements/widgets/time_widgets.py +13 -22
  22. streamlit/hello/hello.py +1 -0
  23. streamlit/hello/streamlit_app.py +27 -25
  24. streamlit/proto/AudioInput_pb2.py +3 -4
  25. streamlit/proto/AudioInput_pb2.pyi +2 -7
  26. streamlit/proto/Block_pb2.py +27 -27
  27. streamlit/proto/Block_pb2.pyi +3 -17
  28. streamlit/proto/CameraInput_pb2.py +3 -4
  29. streamlit/proto/CameraInput_pb2.pyi +2 -8
  30. streamlit/proto/ChatInput_pb2.py +7 -8
  31. streamlit/proto/ChatInput_pb2.pyi +1 -10
  32. streamlit/proto/Code_pb2.py +3 -4
  33. streamlit/proto/DateInput_pb2.py +3 -4
  34. streamlit/proto/DateInput_pb2.pyi +2 -8
  35. streamlit/proto/DocString_pb2.py +5 -6
  36. streamlit/proto/DocString_pb2.pyi +1 -9
  37. streamlit/proto/FileUploader_pb2.py +3 -4
  38. streamlit/proto/FileUploader_pb2.pyi +2 -8
  39. streamlit/proto/Json_pb2.py +3 -4
  40. streamlit/proto/Json_pb2.pyi +2 -9
  41. streamlit/proto/NewSession_pb2.py +16 -16
  42. streamlit/proto/NewSession_pb2.pyi +7 -2
  43. streamlit/proto/NumberInput_pb2.py +5 -6
  44. streamlit/proto/NumberInput_pb2.pyi +2 -9
  45. streamlit/proto/Progress_pb2.py +3 -4
  46. streamlit/proto/Progress_pb2.pyi +1 -7
  47. streamlit/proto/Selectbox_pb2.py +3 -4
  48. streamlit/proto/Selectbox_pb2.pyi +2 -9
  49. streamlit/proto/Slider_pb2.py +7 -8
  50. streamlit/proto/Slider_pb2.pyi +2 -8
  51. streamlit/proto/TextArea_pb2.py +3 -4
  52. streamlit/proto/TextArea_pb2.pyi +2 -9
  53. streamlit/proto/TextInput_pb2.py +5 -6
  54. streamlit/proto/TextInput_pb2.pyi +2 -9
  55. streamlit/proto/TimeInput_pb2.py +3 -4
  56. streamlit/proto/TimeInput_pb2.pyi +2 -9
  57. streamlit/static/index.html +1 -1
  58. streamlit/static/manifest.json +1240 -0
  59. streamlit/static/static/js/{ErrorOutline.esm.CtshIbC5.js → ErrorOutline.esm.D5NgCh5m.js} +1 -1
  60. streamlit/static/static/js/{FileDownload.esm.A0XrMp_A.js → FileDownload.esm.NuObx1Tl.js} +1 -1
  61. streamlit/static/static/js/{FileHelper.BkYmOfR4.js → FileHelper.BH7o4_P9.js} +5 -5
  62. streamlit/static/static/js/{FormClearHelper.DvUrjO5s.js → FormClearHelper.BAxB8JFY.js} +1 -1
  63. streamlit/static/static/js/{Hooks.Dw0PPeMp.js → Hooks.Bjt8oBOT.js} +1 -1
  64. streamlit/static/static/js/{InputInstructions.BwkpOG-3.js → InputInstructions.BZZLp6t9.js} +1 -1
  65. streamlit/static/static/js/{ProgressBar.Po8toa5U.js → ProgressBar.BwRgGfI0.js} +2 -2
  66. streamlit/static/static/js/{RenderInPortalIfExists.DG7izwhP.js → RenderInPortalIfExists.C_c286r8.js} +1 -1
  67. streamlit/static/static/js/{Toolbar.zoRxypF9.js → Toolbar.5tXjF_eX.js} +1 -1
  68. streamlit/static/static/js/{base-input.3hmq5vR4.js → base-input.wfBDFTlB.js} +1 -1
  69. streamlit/static/static/js/{checkbox.DHVebTBP.js → checkbox.D1GhNngU.js} +1 -1
  70. streamlit/static/static/js/{createSuper.CCzF882j.js → createSuper.CudEEVs2.js} +1 -1
  71. streamlit/static/static/js/{data-grid-overlay-editor.CRIS0V5u.js → data-grid-overlay-editor.DUTI_Rbg.js} +1 -1
  72. streamlit/static/static/js/{downloader.DOuJ7F43.js → downloader.BwLpAoXN.js} +1 -1
  73. streamlit/static/static/js/{es6.BojNhy97.js → es6.B_HLnUb9.js} +2 -2
  74. streamlit/static/static/js/{iframeResizer.contentWindow.CmN7IDO7.js → iframeResizer.contentWindow.BNcjOcan.js} +1 -1
  75. streamlit/static/static/js/{index.VVmp3qV7.js → index.3WJoJFGb.js} +1 -1
  76. streamlit/static/static/js/{index.CTVSiPCo.js → index.B0h616Th.js} +1 -1
  77. streamlit/static/static/js/{index.CLFnBokZ.js → index.B0paBg5x.js} +1 -1
  78. streamlit/static/static/js/index.B3vWaIrN.js +1 -0
  79. streamlit/static/static/js/{index.CdgLDqMc.js → index.B4PbMsBe.js} +1 -1
  80. streamlit/static/static/js/{index.BV-8GugV.js → index.BGKVW2u9.js} +1 -1
  81. streamlit/static/static/js/index.BJQPxOFd.js +12 -0
  82. streamlit/static/static/js/{index.B3Y99Usz.js → index.BOHEcsVb.js} +1 -1
  83. streamlit/static/static/js/{index.CZ6f-p0K.js → index.BPGAPI9w.js} +1 -1
  84. streamlit/static/static/js/{index.BXfm7UZe.js → index.Bj6uLiaA.js} +1 -1
  85. streamlit/static/static/js/{index.BvWDoWjf.js → index.BkvVxUIW.js} +1 -1
  86. streamlit/static/static/js/{index.kWUcv9pK.js → index.Bs0m0eUy.js} +1 -1
  87. streamlit/static/static/js/{index.YePOPnW6.js → index.BtpsTdHN.js} +176 -173
  88. streamlit/static/static/js/index.C1GNiWbH.js +1 -0
  89. streamlit/static/static/js/{index.Ih0EXMso.js → index.CL0UH4WF.js} +1 -1
  90. streamlit/static/static/js/{index.DkNaEiLi.js → index.CXP5ffxh.js} +1 -1
  91. streamlit/static/static/js/{index.Cpz3pp0B.js → index.Ca-9xoC2.js} +1 -1
  92. streamlit/static/static/js/{index.BgmEuudT.js → index.Cdd7Ri21.js} +1 -1
  93. streamlit/static/static/js/index.Cf8KcH2X.js +1 -0
  94. streamlit/static/static/js/{index.CWweAMBx.js → index.CfzaRR6P.js} +1 -1
  95. streamlit/static/static/js/{index.muQ-sA7D.js → index.CjRwuAdg.js} +1 -1
  96. streamlit/static/static/js/{index.BEfxU01i.js → index.CkOUlPYT.js} +1 -1
  97. streamlit/static/static/js/{index.BsiojTxz.js → index.CxtkoiKl.js} +1 -1
  98. streamlit/static/static/js/index.D3wYqvI6.js +1 -0
  99. streamlit/static/static/js/index.D8i27llu.js +3 -0
  100. streamlit/static/static/js/{index.BMWx_YQD.js → index.DA7wmIe4.js} +1 -1
  101. streamlit/static/static/js/index.DIG9Mo9J.js +1 -0
  102. streamlit/static/static/js/index.DNR4wKJg.js +1 -0
  103. streamlit/static/static/js/{index.DcLQo3NB.js → index.DNS8a-dx.js} +20 -20
  104. streamlit/static/static/js/{index.YtwVjbe-.js → index.NveskZ7j.js} +1 -1
  105. streamlit/static/static/js/{index.BfcdLS9y.js → index.PR2mcvVR.js} +1 -1
  106. streamlit/static/static/js/{index.CzMgwzgb.js → index.df4uuSoD.js} +1 -1
  107. streamlit/static/static/js/{index.3HscCA0Q.js → index.flyQEkeT.js} +1 -1
  108. streamlit/static/static/js/{index.R5J-UXhx.js → index.iF9jUtwl.js} +1 -1
  109. streamlit/static/static/js/{index.p5qVS5RU.js → index.jyqBAhvH.js} +1 -1
  110. streamlit/static/static/js/{index.HdiDLe37.js → index.sYLAHlH0.js} +1 -1
  111. streamlit/static/static/js/{index.whcmqOYZ.js → index.zq3LdRhj.js} +1 -1
  112. streamlit/static/static/js/{input.C95vVzrH.js → input.CtZjQ6Pv.js} +1 -1
  113. streamlit/static/static/js/{memory.lfILky3m.js → memory.Ddl3R0up.js} +1 -1
  114. streamlit/static/static/js/{mergeWith.CdpKbzWl.js → mergeWith.D-TqDY0-.js} +1 -1
  115. streamlit/static/static/js/{number-overlay-editor.D2TjUrKf.js → number-overlay-editor.Dndf05Hx.js} +1 -1
  116. streamlit/static/static/js/{possibleConstructorReturn.DQV58bYB.js → possibleConstructorReturn.DNEY6J9G.js} +1 -1
  117. streamlit/static/static/js/{sandbox.R1dhBCnm.js → sandbox.B_XDPkfx.js} +1 -1
  118. streamlit/static/static/js/{textarea.t5D4QCw3.js → textarea.BZ9lTMhV.js} +1 -1
  119. streamlit/static/static/js/{timepicker.BI9iPIxz.js → timepicker.D9UUwpRT.js} +1 -1
  120. streamlit/static/static/js/{toConsumableArray.COyXrPhy.js → toConsumableArray.DNJjbOUS.js} +1 -1
  121. streamlit/static/static/js/{uniqueId.CaWObuU_.js → uniqueId.psBJ_tSg.js} +1 -1
  122. streamlit/static/static/js/{useBasicWidgetState.Wd2TSACf.js → useBasicWidgetState.CTpx4w-3.js} +1 -1
  123. streamlit/static/static/js/{useOnInputChange.CUFXty-S.js → useOnInputChange.WKTDSC4O.js} +1 -1
  124. streamlit/static/static/js/{withFullScreenWrapper.wgkD5MeK.js → withFullScreenWrapper.oyWCn2-3.js} +1 -1
  125. {streamlit_nightly-1.45.2.dev20250528.dist-info → streamlit_nightly-1.45.2.dev20250531.dist-info}/METADATA +1 -1
  126. {streamlit_nightly-1.45.2.dev20250528.dist-info → streamlit_nightly-1.45.2.dev20250531.dist-info}/RECORD +130 -129
  127. streamlit/static/static/js/index.B0GUCtHl.js +0 -1
  128. streamlit/static/static/js/index.B6guKn0h.js +0 -1
  129. streamlit/static/static/js/index.CPiByGGr.js +0 -3
  130. streamlit/static/static/js/index.CVxkW_lc.js +0 -12
  131. streamlit/static/static/js/index.DH2YAEv6.js +0 -1
  132. streamlit/static/static/js/index.DNlMgaSP.js +0 -1
  133. streamlit/static/static/js/index.DP7RHJHC.js +0 -1
  134. streamlit/static/static/js/index.DtpZrdsz.js +0 -1
  135. {streamlit_nightly-1.45.2.dev20250528.data → streamlit_nightly-1.45.2.dev20250531.data}/scripts/streamlit.cmd +0 -0
  136. {streamlit_nightly-1.45.2.dev20250528.dist-info → streamlit_nightly-1.45.2.dev20250531.dist-info}/WHEEL +0 -0
  137. {streamlit_nightly-1.45.2.dev20250528.dist-info → streamlit_nightly-1.45.2.dev20250531.dist-info}/entry_points.txt +0 -0
  138. {streamlit_nightly-1.45.2.dev20250528.dist-info → streamlit_nightly-1.45.2.dev20250531.dist-info}/top_level.txt +0 -0
@@ -23,7 +23,11 @@ from typing_extensions import TypeAlias
23
23
 
24
24
  from streamlit.elements.lib.form_utils import current_form_id
25
25
  from streamlit.elements.lib.js_number import JSNumber, JSNumberBoundsException
26
- from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
26
+ from streamlit.elements.lib.layout_utils import (
27
+ LayoutConfig,
28
+ WidthWithoutContent,
29
+ validate_width,
30
+ )
27
31
  from streamlit.elements.lib.policies import (
28
32
  check_widget_policies,
29
33
  maybe_raise_label_warnings,
@@ -43,7 +47,6 @@ from streamlit.errors import (
43
47
  StreamlitValueBelowMinError,
44
48
  )
45
49
  from streamlit.proto.NumberInput_pb2 import NumberInput as NumberInputProto
46
- from streamlit.proto.WidthConfig_pb2 import WidthConfig
47
50
  from streamlit.runtime.metrics_util import gather_metrics
48
51
  from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
49
52
  from streamlit.runtime.state import (
@@ -437,7 +440,6 @@ class NumberInputMixin:
437
440
  default_value=value if value != "min" else None,
438
441
  )
439
442
  maybe_raise_label_warnings(label, label_visibility)
440
- validate_width(width)
441
443
 
442
444
  element_id = compute_and_register_element_id(
443
445
  "number_input",
@@ -606,14 +608,6 @@ class NumberInputMixin:
606
608
  if icon is not None:
607
609
  number_input_proto.icon = validate_icon_or_emoji(icon)
608
610
 
609
- # Set up width configuration
610
- width_config = WidthConfig()
611
- if isinstance(width, int):
612
- width_config.pixel_width = width
613
- else:
614
- width_config.use_stretch = True
615
- number_input_proto.width_config.CopyFrom(width_config)
616
-
617
611
  serde = NumberInputSerde(value, data_type)
618
612
  widget_state = register_widget(
619
613
  number_input_proto.id,
@@ -648,7 +642,12 @@ class NumberInputMixin:
648
642
  number_input_proto.value = widget_state.value
649
643
  number_input_proto.set_value = True
650
644
 
651
- self.dg._enqueue("number_input", number_input_proto)
645
+ validate_width(width)
646
+ layout_config = LayoutConfig(width=width)
647
+
648
+ self.dg._enqueue(
649
+ "number_input", number_input_proto, layout_config=layout_config
650
+ )
652
651
  return widget_state.value
653
652
 
654
653
  @property
@@ -29,7 +29,7 @@ from typing_extensions import TypeGuard
29
29
 
30
30
  from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
31
31
  from streamlit.elements.lib.form_utils import current_form_id
32
- from streamlit.elements.lib.layout_utils import validate_width
32
+ from streamlit.elements.lib.layout_utils import LayoutConfig, validate_width
33
33
  from streamlit.elements.lib.options_selector_utils import (
34
34
  index_,
35
35
  maybe_coerce_enum,
@@ -49,7 +49,6 @@ from streamlit.elements.lib.utils import (
49
49
  )
50
50
  from streamlit.errors import StreamlitAPIException
51
51
  from streamlit.proto.Slider_pb2 import Slider as SliderProto
52
- from streamlit.proto.WidthConfig_pb2 import WidthConfig
53
52
  from streamlit.runtime.metrics_util import gather_metrics
54
53
  from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
55
54
  from streamlit.runtime.state import (
@@ -397,14 +396,8 @@ class SelectSliderMixin:
397
396
  if help is not None:
398
397
  slider_proto.help = dedent(help)
399
398
 
400
- # Set width config
401
399
  validate_width(width)
402
- width_config = WidthConfig()
403
- if isinstance(width, int):
404
- width_config.pixel_width = width
405
- else:
406
- width_config.use_stretch = True
407
- slider_proto.width_config.CopyFrom(width_config)
400
+ layout_config = LayoutConfig(width=width)
408
401
 
409
402
  serde = SelectSliderSerde(opt, slider_value, _is_range_value(value))
410
403
 
@@ -432,7 +425,7 @@ class SelectSliderMixin:
432
425
  if ctx:
433
426
  save_for_app_testing(ctx, element_id, format_func)
434
427
 
435
- self.dg._enqueue("slider", slider_proto)
428
+ self.dg._enqueue("slider", slider_proto, layout_config=layout_config)
436
429
  return widget_state.value
437
430
 
438
431
  @property
@@ -20,7 +20,11 @@ from typing_extensions import Never
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 WidthWithoutContent, validate_width
23
+ from streamlit.elements.lib.layout_utils import (
24
+ LayoutConfig,
25
+ WidthWithoutContent,
26
+ validate_width,
27
+ )
24
28
  from streamlit.elements.lib.options_selector_utils import (
25
29
  create_mappings,
26
30
  index_,
@@ -40,7 +44,6 @@ from streamlit.elements.lib.utils import (
40
44
  )
41
45
  from streamlit.errors import StreamlitAPIException
42
46
  from streamlit.proto.Selectbox_pb2 import Selectbox as SelectboxProto
43
- from streamlit.proto.WidthConfig_pb2 import WidthConfig
44
47
  from streamlit.runtime.metrics_util import gather_metrics
45
48
  from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
46
49
  from streamlit.runtime.state import (
@@ -488,7 +491,6 @@ class SelectboxMixin:
488
491
  default_value=None if index == 0 else index,
489
492
  )
490
493
  maybe_raise_label_warnings(label, label_visibility)
491
- validate_width(width)
492
494
 
493
495
  opt = convert_anything_to_list(options)
494
496
  check_python_comparable(opt)
@@ -550,14 +552,6 @@ class SelectboxMixin:
550
552
  if help is not None:
551
553
  selectbox_proto.help = dedent(help)
552
554
 
553
- # Set up width configuration
554
- width_config = WidthConfig()
555
- if isinstance(width, int):
556
- width_config.pixel_width = width
557
- else:
558
- width_config.use_stretch = True
559
- selectbox_proto.width_config.CopyFrom(width_config)
560
-
561
555
  serde = SelectboxSerde(
562
556
  opt,
563
557
  formatted_options=formatted_options,
@@ -582,9 +576,12 @@ class SelectboxMixin:
582
576
  selectbox_proto.raw_value = serialized_value
583
577
  selectbox_proto.set_value = True
584
578
 
579
+ validate_width(width)
580
+ layout_config = LayoutConfig(width=width)
581
+
585
582
  if ctx:
586
583
  save_for_app_testing(ctx, element_id, format_func)
587
- self.dg._enqueue("selectbox", selectbox_proto)
584
+ self.dg._enqueue("selectbox", selectbox_proto, layout_config=layout_config)
588
585
  return widget_state.value
589
586
 
590
587
  @property
@@ -34,7 +34,7 @@ from typing_extensions import TypeAlias
34
34
 
35
35
  from streamlit.elements.lib.form_utils import current_form_id
36
36
  from streamlit.elements.lib.js_number import JSNumber, JSNumberBoundsException
37
- from streamlit.elements.lib.layout_utils import validate_width
37
+ from streamlit.elements.lib.layout_utils import LayoutConfig, validate_width
38
38
  from streamlit.elements.lib.policies import (
39
39
  check_widget_policies,
40
40
  maybe_raise_label_warnings,
@@ -52,7 +52,6 @@ from streamlit.errors import (
52
52
  StreamlitValueBelowMinError,
53
53
  )
54
54
  from streamlit.proto.Slider_pb2 import Slider as SliderProto
55
- from streamlit.proto.WidthConfig_pb2 import WidthConfig
56
55
  from streamlit.runtime.metrics_util import gather_metrics
57
56
  from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
58
57
  from streamlit.runtime.state import (
@@ -965,14 +964,9 @@ class SliderMixin:
965
964
  slider_proto.set_value = True
966
965
 
967
966
  validate_width(width)
968
- width_config = WidthConfig()
969
- if isinstance(width, int):
970
- width_config.pixel_width = width
971
- else:
972
- width_config.use_stretch = True
973
- slider_proto.width_config.CopyFrom(width_config)
967
+ layout_config = LayoutConfig(width=width)
974
968
 
975
- self.dg._enqueue("slider", slider_proto)
969
+ self.dg._enqueue("slider", slider_proto, layout_config=layout_config)
976
970
  return cast("SliderReturn", widget_state.value)
977
971
 
978
972
  @property
@@ -19,7 +19,11 @@ from textwrap import dedent
19
19
  from typing import TYPE_CHECKING, Literal, cast, overload
20
20
 
21
21
  from streamlit.elements.lib.form_utils import current_form_id
22
- from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
22
+ from streamlit.elements.lib.layout_utils import (
23
+ LayoutConfig,
24
+ WidthWithoutContent,
25
+ validate_width,
26
+ )
23
27
  from streamlit.elements.lib.policies import (
24
28
  check_widget_policies,
25
29
  maybe_raise_label_warnings,
@@ -34,7 +38,6 @@ from streamlit.elements.lib.utils import (
34
38
  from streamlit.errors import StreamlitAPIException
35
39
  from streamlit.proto.TextArea_pb2 import TextArea as TextAreaProto
36
40
  from streamlit.proto.TextInput_pb2 import TextInput as TextInputProto
37
- from streamlit.proto.WidthConfig_pb2 import WidthConfig
38
41
  from streamlit.runtime.metrics_util import gather_metrics
39
42
  from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
40
43
  from streamlit.runtime.state import (
@@ -308,7 +311,6 @@ class TextWidgetsMixin:
308
311
  default_value=None if value == "" else value,
309
312
  )
310
313
  maybe_raise_label_warnings(label, label_visibility)
311
- validate_width(width)
312
314
 
313
315
  # Make sure value is always string or None:
314
316
  value = str(value) if value is not None else None
@@ -356,14 +358,6 @@ class TextWidgetsMixin:
356
358
  if icon is not None:
357
359
  text_input_proto.icon = validate_icon_or_emoji(icon)
358
360
 
359
- # Set up width configuration
360
- width_config = WidthConfig()
361
- if isinstance(width, int):
362
- width_config.pixel_width = width
363
- else:
364
- width_config.use_stretch = True
365
- text_input_proto.width_config.CopyFrom(width_config)
366
-
367
361
  if type == "default":
368
362
  text_input_proto.type = TextInputProto.DEFAULT
369
363
  elif type == "password":
@@ -397,7 +391,10 @@ class TextWidgetsMixin:
397
391
  text_input_proto.value = widget_state.value
398
392
  text_input_proto.set_value = True
399
393
 
400
- self.dg._enqueue("text_input", text_input_proto)
394
+ validate_width(width)
395
+ layout_config = LayoutConfig(width=width)
396
+
397
+ self.dg._enqueue("text_input", text_input_proto, layout_config=layout_config)
401
398
  return widget_state.value
402
399
 
403
400
  @overload
@@ -614,7 +611,6 @@ class TextWidgetsMixin:
614
611
  default_value=None if value == "" else value,
615
612
  )
616
613
  maybe_raise_label_warnings(label, label_visibility)
617
- validate_width(width)
618
614
 
619
615
  value = str(value) if value is not None else None
620
616
 
@@ -659,14 +655,6 @@ class TextWidgetsMixin:
659
655
  if placeholder is not None:
660
656
  text_area_proto.placeholder = str(placeholder)
661
657
 
662
- # Set up width configuration
663
- width_config = WidthConfig()
664
- if isinstance(width, int):
665
- width_config.pixel_width = width
666
- else:
667
- width_config.use_stretch = True
668
- text_area_proto.width_config.CopyFrom(width_config)
669
-
670
658
  serde = TextAreaSerde(value)
671
659
  widget_state = register_widget(
672
660
  text_area_proto.id,
@@ -684,7 +672,10 @@ class TextWidgetsMixin:
684
672
  text_area_proto.value = widget_state.value
685
673
  text_area_proto.set_value = True
686
674
 
687
- self.dg._enqueue("text_area", text_area_proto)
675
+ validate_width(width)
676
+ layout_config = LayoutConfig(width=width)
677
+
678
+ self.dg._enqueue("text_area", text_area_proto, layout_config=layout_config)
688
679
  return widget_state.value
689
680
 
690
681
  @property
@@ -31,7 +31,11 @@ from typing import (
31
31
  from typing_extensions import TypeAlias
32
32
 
33
33
  from streamlit.elements.lib.form_utils import current_form_id
34
- from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
34
+ from streamlit.elements.lib.layout_utils import (
35
+ LayoutConfig,
36
+ WidthWithoutContent,
37
+ validate_width,
38
+ )
35
39
  from streamlit.elements.lib.policies import (
36
40
  check_widget_policies,
37
41
  maybe_raise_label_warnings,
@@ -46,7 +50,6 @@ from streamlit.elements.lib.utils import (
46
50
  from streamlit.errors import StreamlitAPIException
47
51
  from streamlit.proto.DateInput_pb2 import DateInput as DateInputProto
48
52
  from streamlit.proto.TimeInput_pb2 import TimeInput as TimeInputProto
49
- from streamlit.proto.WidthConfig_pb2 import WidthConfig
50
53
  from streamlit.runtime.metrics_util import gather_metrics
51
54
  from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
52
55
  from streamlit.runtime.state import (
@@ -514,7 +517,6 @@ class TimeWidgetsMixin:
514
517
  default_value=value if value != "now" else None,
515
518
  )
516
519
  maybe_raise_label_warnings(label, label_visibility)
517
- validate_width(width)
518
520
 
519
521
  parsed_time: time | None
520
522
  parsed_time = None if value is None else _convert_timelike_to_time(value)
@@ -561,14 +563,6 @@ class TimeWidgetsMixin:
561
563
  if help is not None:
562
564
  time_input_proto.help = dedent(help)
563
565
 
564
- # Set up width configuration
565
- width_config = WidthConfig()
566
- if isinstance(width, int):
567
- width_config.pixel_width = width
568
- else:
569
- width_config.use_stretch = True
570
- time_input_proto.width_config.CopyFrom(width_config)
571
-
572
566
  serde = TimeInputSerde(parsed_time)
573
567
  widget_state = register_widget(
574
568
  time_input_proto.id,
@@ -586,7 +580,10 @@ class TimeWidgetsMixin:
586
580
  time_input_proto.value = serialized_value
587
581
  time_input_proto.set_value = True
588
582
 
589
- self.dg._enqueue("time_input", time_input_proto)
583
+ validate_width(width)
584
+ layout_config = LayoutConfig(width=width)
585
+
586
+ self.dg._enqueue("time_input", time_input_proto, layout_config=layout_config)
590
587
  return widget_state.value
591
588
 
592
589
  @overload
@@ -874,7 +871,6 @@ class TimeWidgetsMixin:
874
871
  default_value=value if value != "today" else None,
875
872
  )
876
873
  maybe_raise_label_warnings(label, label_visibility)
877
- validate_width(width)
878
874
 
879
875
  def parse_date_deterministic_for_id(v: NullableScalarDateValue) -> str | None:
880
876
  if v == "today":
@@ -975,14 +971,6 @@ class TimeWidgetsMixin:
975
971
  if help is not None:
976
972
  date_input_proto.help = dedent(help)
977
973
 
978
- # Set up width configuration
979
- width_config = WidthConfig()
980
- if isinstance(width, int):
981
- width_config.pixel_width = width
982
- else:
983
- width_config.use_stretch = True
984
- date_input_proto.width_config.CopyFrom(width_config)
985
-
986
974
  serde = DateInputSerde(parsed_values)
987
975
 
988
976
  widget_state = register_widget(
@@ -1000,7 +988,10 @@ class TimeWidgetsMixin:
1000
988
  date_input_proto.value[:] = serde.serialize(widget_state.value)
1001
989
  date_input_proto.set_value = True
1002
990
 
1003
- self.dg._enqueue("date_input", date_input_proto)
991
+ validate_width(width)
992
+ layout_config = LayoutConfig(width=width)
993
+
994
+ self.dg._enqueue("date_input", date_input_proto, layout_config=layout_config)
1004
995
  return widget_state.value
1005
996
 
1006
997
  @property
streamlit/hello/hello.py CHANGED
@@ -20,6 +20,7 @@ st.write(
20
20
  """
21
21
  Streamlit is an open-source app framework built specifically for
22
22
  machine learning and data science projects.
23
+
23
24
  **👈 Select a demo from the sidebar** to see some examples
24
25
  of what Streamlit can do!
25
26
 
@@ -22,31 +22,33 @@ dir_path = Path(__file__).parent
22
22
  # Note that this needs to be in a method so we can have an e2e playwright test.
23
23
  def run() -> None:
24
24
  page = st.navigation(
25
- [
26
- st.Page(
27
- dir_path / "hello.py", title="Hello", icon=":material/waving_hand:"
28
- ),
29
- st.Page(
30
- dir_path / "dataframe_demo.py",
31
- title="DataFrame demo",
32
- icon=":material/table:",
33
- ),
34
- st.Page(
35
- dir_path / "plotting_demo.py",
36
- title="Plotting demo",
37
- icon=":material/show_chart:",
38
- ),
39
- st.Page(
40
- dir_path / "mapping_demo.py",
41
- title="Mapping demo",
42
- icon=":material/public:",
43
- ),
44
- st.Page(
45
- dir_path / "animation_demo.py",
46
- title="Animation demo",
47
- icon=":material/animation:",
48
- ),
49
- ]
25
+ {
26
+ "Pages": [
27
+ st.Page(
28
+ dir_path / "hello.py", title="Hello", icon=":material/waving_hand:"
29
+ ),
30
+ st.Page(
31
+ dir_path / "dataframe_demo.py",
32
+ title="DataFrame demo",
33
+ icon=":material/table:",
34
+ ),
35
+ st.Page(
36
+ dir_path / "plotting_demo.py",
37
+ title="Plotting demo",
38
+ icon=":material/show_chart:",
39
+ ),
40
+ st.Page(
41
+ dir_path / "mapping_demo.py",
42
+ title="Mapping demo",
43
+ icon=":material/public:",
44
+ ),
45
+ st.Page(
46
+ dir_path / "animation_demo.py",
47
+ title="Animation demo",
48
+ icon=":material/animation:",
49
+ ),
50
+ ]
51
+ }
50
52
  )
51
53
  page.run()
52
54
 
@@ -13,10 +13,9 @@ _sym_db = _symbol_database.Default()
13
13
 
14
14
 
15
15
  from streamlit.proto import LabelVisibilityMessage_pb2 as streamlit_dot_proto_dot_LabelVisibilityMessage__pb2
16
- from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
17
16
 
18
17
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/AudioInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\xb9\x01\n\nAudioInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x04 \x01(\t\x12\x10\n\x08\x64isabled\x18\x05 \x01(\x08\x12\x31\n\x10label_visibility\x18\x06 \x01(\x0b\x32\x17.LabelVisibilityMessage\x12,\n\x0cwidth_config\x18\x07 \x01(\x0b\x32\x16.streamlit.WidthConfigB/\n\x1c\x63om.snowflake.apps.streamlitB\x0f\x41udioInputProtob\x06proto3')
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/AudioInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\x8b\x01\n\nAudioInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x04 \x01(\t\x12\x10\n\x08\x64isabled\x18\x05 \x01(\x08\x12\x31\n\x10label_visibility\x18\x06 \x01(\x0b\x32\x17.LabelVisibilityMessageB/\n\x1c\x63om.snowflake.apps.streamlitB\x0f\x41udioInputProtob\x06proto3')
20
19
 
21
20
  _globals = globals()
22
21
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -24,6 +23,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.AudioInput_
24
23
  if not _descriptor._USE_C_DESCRIPTORS:
25
24
  _globals['DESCRIPTOR']._loaded_options = None
26
25
  _globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\017AudioInputProto'
27
- _globals['_AUDIOINPUT']._serialized_start=118
28
- _globals['_AUDIOINPUT']._serialized_end=303
26
+ _globals['_AUDIOINPUT']._serialized_start=83
27
+ _globals['_AUDIOINPUT']._serialized_end=222
29
28
  # @@protoc_insertion_point(module_scope)
@@ -21,7 +21,6 @@ import builtins
21
21
  import google.protobuf.descriptor
22
22
  import google.protobuf.message
23
23
  import streamlit.proto.LabelVisibilityMessage_pb2
24
- import streamlit.proto.WidthConfig_pb2
25
24
  import typing
26
25
 
27
26
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
@@ -36,7 +35,6 @@ class AudioInput(google.protobuf.message.Message):
36
35
  FORM_ID_FIELD_NUMBER: builtins.int
37
36
  DISABLED_FIELD_NUMBER: builtins.int
38
37
  LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
39
- WIDTH_CONFIG_FIELD_NUMBER: builtins.int
40
38
  id: builtins.str
41
39
  label: builtins.str
42
40
  help: builtins.str
@@ -44,8 +42,6 @@ class AudioInput(google.protobuf.message.Message):
44
42
  disabled: builtins.bool
45
43
  @property
46
44
  def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
47
- @property
48
- def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
49
45
  def __init__(
50
46
  self,
51
47
  *,
@@ -55,9 +51,8 @@ class AudioInput(google.protobuf.message.Message):
55
51
  form_id: builtins.str = ...,
56
52
  disabled: builtins.bool = ...,
57
53
  label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
58
- width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
59
54
  ) -> None: ...
60
- def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility", "width_config", b"width_config"]) -> builtins.bool: ...
61
- def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "width_config", b"width_config"]) -> None: ...
55
+ def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility"]) -> builtins.bool: ...
56
+ def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility"]) -> None: ...
62
57
 
63
58
  global___AudioInput = AudioInput
@@ -17,7 +17,7 @@ from streamlit.proto import HeightConfig_pb2 as streamlit_dot_proto_dot_HeightCo
17
17
  from streamlit.proto import GapSize_pb2 as streamlit_dot_proto_dot_GapSize__pb2
18
18
 
19
19
 
20
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\x1a!streamlit/proto/WidthConfig.proto\x1a\"streamlit/proto/HeightConfig.proto\x1a\x1dstreamlit/proto/GapSize.proto\"\xd7\x0e\n\x05\x42lock\x12#\n\x08vertical\x18\x01 \x01(\x0b\x32\x0f.Block.VerticalH\x00\x12\'\n\nhorizontal\x18\x02 \x01(\x0b\x32\x11.Block.HorizontalH\x00\x12\x1f\n\x06\x63olumn\x18\x03 \x01(\x0b\x32\r.Block.ColumnH\x00\x12\'\n\nexpandable\x18\x04 \x01(\x0b\x32\x11.Block.ExpandableH\x00\x12\x1b\n\x04\x66orm\x18\x05 \x01(\x0b\x32\x0b.Block.FormH\x00\x12,\n\rtab_container\x18\x06 \x01(\x0b\x32\x13.Block.TabContainerH\x00\x12\x19\n\x03tab\x18\x07 \x01(\x0b\x32\n.Block.TabH\x00\x12*\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x12.Block.ChatMessageH\x00\x12!\n\x07popover\x18\n \x01(\x0b\x32\x0e.Block.PopoverH\x00\x12\x1f\n\x06\x64ialog\x18\x0b \x01(\x0b\x32\r.Block.DialogH\x00\x12.\n\x0e\x66lex_container\x18\r \x01(\x0b\x32\x14.Block.FlexContainerH\x00\x12\x13\n\x0b\x61llow_empty\x18\x08 \x01(\x08\x12\x0f\n\x02id\x18\x0c \x01(\tH\x01\x88\x01\x01\x12\x33\n\rheight_config\x18\x0e \x01(\x0b\x32\x17.streamlit.HeightConfigH\x02\x88\x01\x01\x12\x31\n\x0cwidth_config\x18\x0f \x01(\x0b\x32\x16.streamlit.WidthConfigH\x03\x88\x01\x01\x1a*\n\x08Vertical\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12\x0e\n\x06height\x18\x02 \x01(\r\x1a\x19\n\nHorizontal\x12\x0b\n\x03gap\x18\x01 \x01(\t\x1a\x8d\x02\n\rFlexContainer\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12.\n\rheight_config\x18\x02 \x01(\x0b\x32\x17.streamlit.HeightConfig\x12(\n\ngap_config\x18\x04 \x01(\x0b\x32\x14.streamlit.GapConfig\x12\r\n\x05scale\x18\x05 \x01(\x02\x12\x31\n\tdirection\x18\x06 \x01(\x0e\x32\x1e.Block.FlexContainer.Direction\x12\x0c\n\x04wrap\x18\x07 \x01(\x08\"B\n\tDirection\x12\x17\n\x13\x44IRECTION_UNDEFINED\x10\x00\x12\x0c\n\x08VERTICAL\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02\x1a\xef\x01\n\x06\x43olumn\x12\x0e\n\x06weight\x18\x01 \x01(\x01\x12\x0f\n\x03gap\x18\x02 \x01(\tB\x02\x18\x01\x12;\n\x12vertical_alignment\x18\x03 \x01(\x0e\x32\x1f.Block.Column.VerticalAlignment\x12\x13\n\x0bshow_border\x18\x04 \x01(\x08\x12-\n\ngap_config\x18\x05 \x01(\x0b\x32\x14.streamlit.GapConfigH\x00\x88\x01\x01\"4\n\x11VerticalAlignment\x12\x07\n\x03TOP\x10\x00\x12\n\n\x06\x43\x45NTER\x10\x01\x12\n\n\x06\x42OTTOM\x10\x02\x42\r\n\x0b_gap_config\x1aM\n\nExpandable\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\x08\x65xpanded\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x0c\n\x04icon\x18\x03 \x01(\tB\x0b\n\t_expanded\x1a\x9d\x01\n\x06\x44ialog\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64ismissible\x18\x02 \x01(\x08\x12(\n\x05width\x18\x03 \x01(\x0e\x32\x19.Block.Dialog.DialogWidth\x12\x14\n\x07is_open\x18\x04 \x01(\x08H\x00\x88\x01\x01\"#\n\x0b\x44ialogWidth\x12\t\n\x05SMALL\x10\x00\x12\t\n\x05LARGE\x10\x01\x42\n\n\x08_is_open\x1aY\n\x04\x46orm\x12\x0f\n\x07\x66orm_id\x18\x01 \x01(\t\x12\x17\n\x0f\x63lear_on_submit\x18\x02 \x01(\x08\x12\x0e\n\x06\x62order\x18\x03 \x01(\x08\x12\x17\n\x0f\x65nter_to_submit\x18\x04 \x01(\x08\x1a\x0e\n\x0cTabContainer\x1a\x14\n\x03Tab\x12\r\n\x05label\x18\x01 \x01(\t\x1a\x63\n\x07Popover\x12\r\n\x05label\x18\x01 \x01(\t\x12\x1b\n\x13use_container_width\x18\x02 \x01(\x08\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12\x0c\n\x04icon\x18\x05 \x01(\t\x1a\xd1\x01\n\x0b\x43hatMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x61vatar\x18\x02 \x01(\t\x12\x32\n\x0b\x61vatar_type\x18\x03 \x01(\x0e\x32\x1d.Block.ChatMessage.AvatarType\x12\x31\n\x0cwidth_config\x18\x04 \x01(\x0b\x32\x16.streamlit.WidthConfigH\x00\x88\x01\x01\",\n\nAvatarType\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05\x45MOJI\x10\x01\x12\x08\n\x04ICON\x10\x02\x42\x0f\n\r_width_configB\x06\n\x04typeB\x05\n\x03_idB\x10\n\x0e_height_configB\x0f\n\r_width_configB*\n\x1c\x63om.snowflake.apps.streamlitB\nBlockProtob\x06proto3')
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\x1a!streamlit/proto/WidthConfig.proto\x1a\"streamlit/proto/HeightConfig.proto\x1a\x1dstreamlit/proto/GapSize.proto\"\xe3\r\n\x05\x42lock\x12#\n\x08vertical\x18\x01 \x01(\x0b\x32\x0f.Block.VerticalH\x00\x12\'\n\nhorizontal\x18\x02 \x01(\x0b\x32\x11.Block.HorizontalH\x00\x12\x1f\n\x06\x63olumn\x18\x03 \x01(\x0b\x32\r.Block.ColumnH\x00\x12\'\n\nexpandable\x18\x04 \x01(\x0b\x32\x11.Block.ExpandableH\x00\x12\x1b\n\x04\x66orm\x18\x05 \x01(\x0b\x32\x0b.Block.FormH\x00\x12,\n\rtab_container\x18\x06 \x01(\x0b\x32\x13.Block.TabContainerH\x00\x12\x19\n\x03tab\x18\x07 \x01(\x0b\x32\n.Block.TabH\x00\x12*\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x12.Block.ChatMessageH\x00\x12!\n\x07popover\x18\n \x01(\x0b\x32\x0e.Block.PopoverH\x00\x12\x1f\n\x06\x64ialog\x18\x0b \x01(\x0b\x32\r.Block.DialogH\x00\x12.\n\x0e\x66lex_container\x18\r \x01(\x0b\x32\x14.Block.FlexContainerH\x00\x12\x13\n\x0b\x61llow_empty\x18\x08 \x01(\x08\x12\x0f\n\x02id\x18\x0c \x01(\tH\x01\x88\x01\x01\x12\x33\n\rheight_config\x18\x0e \x01(\x0b\x32\x17.streamlit.HeightConfigH\x02\x88\x01\x01\x12\x31\n\x0cwidth_config\x18\x0f \x01(\x0b\x32\x16.streamlit.WidthConfigH\x03\x88\x01\x01\x1a*\n\x08Vertical\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12\x0e\n\x06height\x18\x02 \x01(\r\x1a\x19\n\nHorizontal\x12\x0b\n\x03gap\x18\x01 \x01(\t\x1a\xdd\x01\n\rFlexContainer\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12(\n\ngap_config\x18\x02 \x01(\x0b\x32\x14.streamlit.GapConfig\x12\r\n\x05scale\x18\x03 \x01(\x02\x12\x31\n\tdirection\x18\x04 \x01(\x0e\x32\x1e.Block.FlexContainer.Direction\x12\x0c\n\x04wrap\x18\x05 \x01(\x08\"B\n\tDirection\x12\x17\n\x13\x44IRECTION_UNDEFINED\x10\x00\x12\x0c\n\x08VERTICAL\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02\x1a\xef\x01\n\x06\x43olumn\x12\x0e\n\x06weight\x18\x01 \x01(\x01\x12\x0f\n\x03gap\x18\x02 \x01(\tB\x02\x18\x01\x12;\n\x12vertical_alignment\x18\x03 \x01(\x0e\x32\x1f.Block.Column.VerticalAlignment\x12\x13\n\x0bshow_border\x18\x04 \x01(\x08\x12-\n\ngap_config\x18\x05 \x01(\x0b\x32\x14.streamlit.GapConfigH\x00\x88\x01\x01\"4\n\x11VerticalAlignment\x12\x07\n\x03TOP\x10\x00\x12\n\n\x06\x43\x45NTER\x10\x01\x12\n\n\x06\x42OTTOM\x10\x02\x42\r\n\x0b_gap_config\x1aM\n\nExpandable\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\x08\x65xpanded\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x0c\n\x04icon\x18\x03 \x01(\tB\x0b\n\t_expanded\x1a\x9d\x01\n\x06\x44ialog\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64ismissible\x18\x02 \x01(\x08\x12(\n\x05width\x18\x03 \x01(\x0e\x32\x19.Block.Dialog.DialogWidth\x12\x14\n\x07is_open\x18\x04 \x01(\x08H\x00\x88\x01\x01\"#\n\x0b\x44ialogWidth\x12\t\n\x05SMALL\x10\x00\x12\t\n\x05LARGE\x10\x01\x42\n\n\x08_is_open\x1aY\n\x04\x46orm\x12\x0f\n\x07\x66orm_id\x18\x01 \x01(\t\x12\x17\n\x0f\x63lear_on_submit\x18\x02 \x01(\x08\x12\x0e\n\x06\x62order\x18\x03 \x01(\x08\x12\x17\n\x0f\x65nter_to_submit\x18\x04 \x01(\x08\x1a\x0e\n\x0cTabContainer\x1a\x14\n\x03Tab\x12\r\n\x05label\x18\x01 \x01(\t\x1a\x63\n\x07Popover\x12\r\n\x05label\x18\x01 \x01(\t\x12\x1b\n\x13use_container_width\x18\x02 \x01(\x08\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12\x0c\n\x04icon\x18\x05 \x01(\t\x1a\x8d\x01\n\x0b\x43hatMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x61vatar\x18\x02 \x01(\t\x12\x32\n\x0b\x61vatar_type\x18\x03 \x01(\x0e\x32\x1d.Block.ChatMessage.AvatarType\",\n\nAvatarType\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05\x45MOJI\x10\x01\x12\x08\n\x04ICON\x10\x02\x42\x06\n\x04typeB\x05\n\x03_idB\x10\n\x0e_height_configB\x0f\n\r_width_configB*\n\x1c\x63om.snowflake.apps.streamlitB\nBlockProtob\x06proto3')
21
21
 
22
22
  _globals = globals()
23
23
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -28,35 +28,35 @@ if not _descriptor._USE_C_DESCRIPTORS:
28
28
  _globals['_BLOCK_COLUMN'].fields_by_name['gap']._loaded_options = None
29
29
  _globals['_BLOCK_COLUMN'].fields_by_name['gap']._serialized_options = b'\030\001'
30
30
  _globals['_BLOCK']._serialized_start=134
31
- _globals['_BLOCK']._serialized_end=2013
31
+ _globals['_BLOCK']._serialized_end=1897
32
32
  _globals['_BLOCK_VERTICAL']._serialized_start=699
33
33
  _globals['_BLOCK_VERTICAL']._serialized_end=741
34
34
  _globals['_BLOCK_HORIZONTAL']._serialized_start=743
35
35
  _globals['_BLOCK_HORIZONTAL']._serialized_end=768
36
36
  _globals['_BLOCK_FLEXCONTAINER']._serialized_start=771
37
- _globals['_BLOCK_FLEXCONTAINER']._serialized_end=1040
38
- _globals['_BLOCK_FLEXCONTAINER_DIRECTION']._serialized_start=974
39
- _globals['_BLOCK_FLEXCONTAINER_DIRECTION']._serialized_end=1040
40
- _globals['_BLOCK_COLUMN']._serialized_start=1043
41
- _globals['_BLOCK_COLUMN']._serialized_end=1282
42
- _globals['_BLOCK_COLUMN_VERTICALALIGNMENT']._serialized_start=1215
43
- _globals['_BLOCK_COLUMN_VERTICALALIGNMENT']._serialized_end=1267
44
- _globals['_BLOCK_EXPANDABLE']._serialized_start=1284
45
- _globals['_BLOCK_EXPANDABLE']._serialized_end=1361
46
- _globals['_BLOCK_DIALOG']._serialized_start=1364
47
- _globals['_BLOCK_DIALOG']._serialized_end=1521
48
- _globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_start=1474
49
- _globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_end=1509
50
- _globals['_BLOCK_FORM']._serialized_start=1523
51
- _globals['_BLOCK_FORM']._serialized_end=1612
52
- _globals['_BLOCK_TABCONTAINER']._serialized_start=1614
53
- _globals['_BLOCK_TABCONTAINER']._serialized_end=1628
54
- _globals['_BLOCK_TAB']._serialized_start=1630
55
- _globals['_BLOCK_TAB']._serialized_end=1650
56
- _globals['_BLOCK_POPOVER']._serialized_start=1652
57
- _globals['_BLOCK_POPOVER']._serialized_end=1751
58
- _globals['_BLOCK_CHATMESSAGE']._serialized_start=1754
59
- _globals['_BLOCK_CHATMESSAGE']._serialized_end=1963
60
- _globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_start=1902
61
- _globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_end=1946
37
+ _globals['_BLOCK_FLEXCONTAINER']._serialized_end=992
38
+ _globals['_BLOCK_FLEXCONTAINER_DIRECTION']._serialized_start=926
39
+ _globals['_BLOCK_FLEXCONTAINER_DIRECTION']._serialized_end=992
40
+ _globals['_BLOCK_COLUMN']._serialized_start=995
41
+ _globals['_BLOCK_COLUMN']._serialized_end=1234
42
+ _globals['_BLOCK_COLUMN_VERTICALALIGNMENT']._serialized_start=1167
43
+ _globals['_BLOCK_COLUMN_VERTICALALIGNMENT']._serialized_end=1219
44
+ _globals['_BLOCK_EXPANDABLE']._serialized_start=1236
45
+ _globals['_BLOCK_EXPANDABLE']._serialized_end=1313
46
+ _globals['_BLOCK_DIALOG']._serialized_start=1316
47
+ _globals['_BLOCK_DIALOG']._serialized_end=1473
48
+ _globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_start=1426
49
+ _globals['_BLOCK_DIALOG_DIALOGWIDTH']._serialized_end=1461
50
+ _globals['_BLOCK_FORM']._serialized_start=1475
51
+ _globals['_BLOCK_FORM']._serialized_end=1564
52
+ _globals['_BLOCK_TABCONTAINER']._serialized_start=1566
53
+ _globals['_BLOCK_TABCONTAINER']._serialized_end=1580
54
+ _globals['_BLOCK_TAB']._serialized_start=1582
55
+ _globals['_BLOCK_TAB']._serialized_end=1602
56
+ _globals['_BLOCK_POPOVER']._serialized_start=1604
57
+ _globals['_BLOCK_POPOVER']._serialized_end=1703
58
+ _globals['_BLOCK_CHATMESSAGE']._serialized_start=1706
59
+ _globals['_BLOCK_CHATMESSAGE']._serialized_end=1847
60
+ _globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_start=1803
61
+ _globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_end=1847
62
62
  # @@protoc_insertion_point(module_scope)
@@ -88,7 +88,6 @@ class Block(google.protobuf.message.Message):
88
88
  HORIZONTAL: Block.FlexContainer.Direction.ValueType # 2
89
89
 
90
90
  BORDER_FIELD_NUMBER: builtins.int
91
- HEIGHT_CONFIG_FIELD_NUMBER: builtins.int
92
91
  GAP_CONFIG_FIELD_NUMBER: builtins.int
93
92
  SCALE_FIELD_NUMBER: builtins.int
94
93
  DIRECTION_FIELD_NUMBER: builtins.int
@@ -97,24 +96,19 @@ class Block(google.protobuf.message.Message):
97
96
  scale: builtins.float
98
97
  direction: global___Block.FlexContainer.Direction.ValueType
99
98
  wrap: builtins.bool
100
- @property
101
- def height_config(self) -> streamlit.proto.HeightConfig_pb2.HeightConfig:
102
- """TODO (lwilby): move this to use block level field."""
103
-
104
99
  @property
105
100
  def gap_config(self) -> streamlit.proto.GapSize_pb2.GapConfig: ...
106
101
  def __init__(
107
102
  self,
108
103
  *,
109
104
  border: builtins.bool = ...,
110
- height_config: streamlit.proto.HeightConfig_pb2.HeightConfig | None = ...,
111
105
  gap_config: streamlit.proto.GapSize_pb2.GapConfig | None = ...,
112
106
  scale: builtins.float = ...,
113
107
  direction: global___Block.FlexContainer.Direction.ValueType = ...,
114
108
  wrap: builtins.bool = ...,
115
109
  ) -> None: ...
116
- def HasField(self, field_name: typing.Literal["gap_config", b"gap_config", "height_config", b"height_config"]) -> builtins.bool: ...
117
- def ClearField(self, field_name: typing.Literal["border", b"border", "direction", b"direction", "gap_config", b"gap_config", "height_config", b"height_config", "scale", b"scale", "wrap", b"wrap"]) -> None: ...
110
+ def HasField(self, field_name: typing.Literal["gap_config", b"gap_config"]) -> builtins.bool: ...
111
+ def ClearField(self, field_name: typing.Literal["border", b"border", "direction", b"direction", "gap_config", b"gap_config", "scale", b"scale", "wrap", b"wrap"]) -> None: ...
118
112
 
119
113
  @typing.final
120
114
  class Column(google.protobuf.message.Message):
@@ -308,25 +302,17 @@ class Block(google.protobuf.message.Message):
308
302
  NAME_FIELD_NUMBER: builtins.int
309
303
  AVATAR_FIELD_NUMBER: builtins.int
310
304
  AVATAR_TYPE_FIELD_NUMBER: builtins.int
311
- WIDTH_CONFIG_FIELD_NUMBER: builtins.int
312
305
  name: builtins.str
313
306
  avatar: builtins.str
314
307
  avatar_type: global___Block.ChatMessage.AvatarType.ValueType
315
- @property
316
- def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig:
317
- """TODO (lwilby): move this to use block level field."""
318
-
319
308
  def __init__(
320
309
  self,
321
310
  *,
322
311
  name: builtins.str = ...,
323
312
  avatar: builtins.str = ...,
324
313
  avatar_type: global___Block.ChatMessage.AvatarType.ValueType = ...,
325
- width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
326
314
  ) -> None: ...
327
- def HasField(self, field_name: typing.Literal["_width_config", b"_width_config", "width_config", b"width_config"]) -> builtins.bool: ...
328
- def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "avatar", b"avatar", "avatar_type", b"avatar_type", "name", b"name", "width_config", b"width_config"]) -> None: ...
329
- def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
315
+ def ClearField(self, field_name: typing.Literal["avatar", b"avatar", "avatar_type", b"avatar_type", "name", b"name"]) -> None: ...
330
316
 
331
317
  VERTICAL_FIELD_NUMBER: builtins.int
332
318
  HORIZONTAL_FIELD_NUMBER: builtins.int