streamlit-nightly 1.53.1.dev20260114__py3-none-any.whl → 1.53.1.dev20260116__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 (184) hide show
  1. streamlit/__init__.py +0 -26
  2. streamlit/auth_util.py +90 -1
  3. streamlit/cli_util.py +2 -1
  4. streamlit/commands/echo.py +2 -2
  5. streamlit/commands/execution_control.py +1 -1
  6. streamlit/commands/navigation.py +1 -1
  7. streamlit/components/types/base_custom_component.py +0 -2
  8. streamlit/components/v1/custom_component.py +0 -2
  9. streamlit/components/v2/component_path_utils.py +1 -1
  10. streamlit/components/v2/manifest_scanner.py +8 -3
  11. streamlit/components/v2/presentation.py +1 -1
  12. streamlit/config.py +44 -13
  13. streamlit/config_util.py +5 -5
  14. streamlit/dataframe_util.py +5 -5
  15. streamlit/elements/arrow.py +11 -6
  16. streamlit/elements/deck_gl_json_chart.py +1 -1
  17. streamlit/elements/exception.py +4 -2
  18. streamlit/elements/form.py +1 -1
  19. streamlit/elements/layouts.py +1 -1
  20. streamlit/elements/lib/built_in_chart_utils.py +7 -7
  21. streamlit/elements/lib/column_config_utils.py +6 -6
  22. streamlit/elements/lib/dialog.py +1 -1
  23. streamlit/elements/lib/image_utils.py +4 -4
  24. streamlit/elements/lib/layout_utils.py +1 -1
  25. streamlit/elements/lib/policies.py +1 -1
  26. streamlit/elements/lib/streamlit_plotly_theme.py +9 -11
  27. streamlit/elements/lib/utils.py +1 -1
  28. streamlit/elements/map.py +6 -6
  29. streamlit/elements/plotly_chart.py +2 -2
  30. streamlit/elements/toast.py +1 -1
  31. streamlit/elements/vega_charts.py +2 -2
  32. streamlit/elements/widgets/button.py +3 -3
  33. streamlit/elements/widgets/button_group.py +3 -3
  34. streamlit/elements/widgets/chat.py +1 -1
  35. streamlit/elements/widgets/data_editor.py +6 -6
  36. streamlit/elements/widgets/number_input.py +1 -1
  37. streamlit/elements/widgets/slider.py +5 -5
  38. streamlit/elements/widgets/time_widgets.py +91 -10
  39. streamlit/elements/write.py +1 -1
  40. streamlit/env_util.py +1 -1
  41. streamlit/errors.py +0 -14
  42. streamlit/proto/NewSession_pb2.py +18 -18
  43. streamlit/proto/NewSession_pb2.pyi +5 -1
  44. streamlit/runtime/app_session.py +78 -59
  45. streamlit/runtime/caching/cache_data_api.py +3 -3
  46. streamlit/runtime/caching/cache_errors.py +0 -2
  47. streamlit/runtime/caching/cache_resource_api.py +1 -1
  48. streamlit/runtime/caching/cache_utils.py +2 -2
  49. streamlit/runtime/caching/hashing.py +1 -3
  50. streamlit/runtime/caching/storage/cache_storage_protocol.py +0 -3
  51. streamlit/runtime/connection_factory.py +1 -1
  52. streamlit/runtime/runtime.py +6 -6
  53. streamlit/runtime/scriptrunner_utils/exceptions.py +0 -4
  54. streamlit/runtime/scriptrunner_utils/script_run_context.py +0 -21
  55. streamlit/runtime/secrets.py +2 -3
  56. streamlit/runtime/state/query_params.py +0 -19
  57. streamlit/runtime/state/session_state.py +1 -1
  58. streamlit/runtime/stats.py +0 -7
  59. streamlit/static/index.html +1 -1
  60. streamlit/static/manifest.json +299 -299
  61. streamlit/static/static/js/{ErrorOutline.esm.BAZUU4id.js → ErrorOutline.esm.CiSfK8ht.js} +1 -1
  62. streamlit/static/static/js/{FileDownload.esm.C6tTTniR.js → FileDownload.esm.ItNjcEfs.js} +1 -1
  63. streamlit/static/static/js/{FileHelper.BOHlwlc9.js → FileHelper.xS7f19FE.js} +1 -1
  64. streamlit/static/static/js/{FormClearHelper.D4lty7rT.js → FormClearHelper.N8_BCinn.js} +1 -1
  65. streamlit/static/static/js/{InputInstructions.BWw9lhud.js → InputInstructions.CrsdK7CQ.js} +1 -1
  66. streamlit/static/static/js/Particles.BDlTHC3I.js +1 -0
  67. streamlit/static/static/js/{ProgressBar.DCHh4N3P.js → ProgressBar.Bk2qeHfS.js} +2 -2
  68. streamlit/static/static/js/{StreamlitSyntaxHighlighter.BRydQwEj.js → StreamlitSyntaxHighlighter.BcuPrPcw.js} +1 -1
  69. streamlit/static/static/js/{TableChart.esm.7KFX5I_G.js → TableChart.esm.CP7XPz8I.js} +1 -1
  70. streamlit/static/static/js/Toolbar.DCJcLwve.js +1 -0
  71. streamlit/static/static/js/{WidgetLabelHelpIconInline.CzodezAH.js → WidgetLabelHelpIconInline.BPqxu1b-.js} +1 -1
  72. streamlit/static/static/js/{base-input.Cg7NpsfS.js → base-input.x4muJJ13.js} +4 -4
  73. streamlit/static/static/js/{checkbox.Bs20OTna.js → checkbox.C5r4AIaH.js} +1 -1
  74. streamlit/static/static/js/{createDownloadLinkElement.DSqCyu38.js → createDownloadLinkElement.C83kkEeT.js} +1 -1
  75. streamlit/static/static/js/{data-grid-overlay-editor.Ch4SqNfY.js → data-grid-overlay-editor.0sOWm4IB.js} +1 -1
  76. streamlit/static/static/js/{downloader.Oj5CTGJA.js → downloader.C_6FfoEv.js} +1 -1
  77. streamlit/static/static/js/{embed.CqzzUq73.js → embed.BnJ6-SK4.js} +14 -14
  78. streamlit/static/static/js/{es6.CYrlw0Vn.js → es6.44_BWfFd.js} +2 -2
  79. streamlit/static/static/js/{formatNumber.CT_v8e75.js → formatNumber.DhHZAosz.js} +1 -1
  80. streamlit/static/static/js/{iconPosition.DPAvXTmd.js → iconPosition.shOoQuRR.js} +1 -1
  81. streamlit/static/static/js/{iframeResizer.contentWindow.T4DvQsIf.js → iframeResizer.contentWindow.savEE5Vs.js} +1 -1
  82. streamlit/static/static/js/{index.BoWBzl6h.js → index.AdijUi9Z.js} +1 -1
  83. streamlit/static/static/js/{index.Dtd5z2rM.js → index.B5HlOnvq.js} +1 -1
  84. streamlit/static/static/js/{index.MtwRNvlS.js → index.B6ewTTej.js} +1 -1
  85. streamlit/static/static/js/{index.D7KbBAWb.js → index.B8Of3XXR.js} +1 -1
  86. streamlit/static/static/js/{index.xCV2qwtw.js → index.BCaCSVj6.js} +1 -1
  87. streamlit/static/static/js/index.BE7Rhig1.js +1 -0
  88. streamlit/static/static/js/{index.DL_Ooizi.js → index.BHpLZ7X6.js} +2 -2
  89. streamlit/static/static/js/{index.BPxuKK0S.js → index.BNvP8E5Q.js} +1 -1
  90. streamlit/static/static/js/{index.LOA31DFn.js → index.BNzuyXeN.js} +2 -2
  91. streamlit/static/static/js/{index.Cfe-tCQJ.js → index.BT7o4A9V.js} +1 -1
  92. streamlit/static/static/js/{index.BZ8xp-w9.js → index.BYY3iuVE.js} +1 -1
  93. streamlit/static/static/js/index.BZI7jTDf.js +1 -0
  94. streamlit/static/static/js/{index.CGRIbGGV.js → index.BZXk3Qxq.js} +1 -1
  95. streamlit/static/static/js/{index.CVXiBeDI.js → index.BhQvq6YD.js} +1 -1
  96. streamlit/static/static/js/{index.CnXxoVEM.js → index.BkIReLGJ.js} +3 -3
  97. streamlit/static/static/js/{index.AGYZDQZm.js → index.Bl7SMZUw.js} +1 -1
  98. streamlit/static/static/js/{index.b-MrPulo.js → index.BqtgAGnG.js} +2 -2
  99. streamlit/static/static/js/{index.B3HdcUdo.js → index.BwnLQnAk.js} +1 -1
  100. streamlit/static/static/js/index.C1coXTgf.js +2 -0
  101. streamlit/static/static/js/{index.DXRGd--0.js → index.C6uOmY9O.js} +1 -1
  102. streamlit/static/static/js/index.CF88nImM.js +1 -0
  103. streamlit/static/static/js/{index.B9Oowxt8.js → index.CFlGfFvq.js} +1 -1
  104. streamlit/static/static/js/{index.wngeYhKj.js → index.CQgiNpC7.js} +1 -1
  105. streamlit/static/static/js/{index.D84XHt50.js → index.CZJkiRFm.js} +1 -1
  106. streamlit/static/static/js/index.Ch1TdQMG.js +1 -0
  107. streamlit/static/static/js/{index.Yj6vcyFD.js → index.Ck2mQvBi.js} +1 -1
  108. streamlit/static/static/js/{index.DPlPEuq6.js → index.CrD2lwZG.js} +1 -1
  109. streamlit/static/static/js/index.CySNwKoN.js +2 -0
  110. streamlit/static/static/js/index.D3LEkXqN.js +1 -0
  111. streamlit/static/static/js/{index.BTA0d5oq.js → index.D8BQH06Z.js} +1 -1
  112. streamlit/static/static/js/{index.B8ZZdPqF.js → index.DBtWixG1.js} +1 -1
  113. streamlit/static/static/js/{index.CVKk1nkB.js → index.DIsNrJpC.js} +1 -1
  114. streamlit/static/static/js/{index.CPYB1awG.js → index.DO3HICut.js} +1 -1
  115. streamlit/static/static/js/{index.D6HCANv6.js → index.D_ziFad8.js} +1 -1
  116. streamlit/static/static/js/{index.BTqav7_K.js → index.Dblsdn8d.js} +1 -1
  117. streamlit/static/static/js/{index.Dg9k4R8B.js → index.DcdD0ROn.js} +2 -2
  118. streamlit/static/static/js/{index.tLZuZM89.js → index.DfHm3P22.js} +51 -51
  119. streamlit/static/static/js/{index.CXVpBAvU.js → index.DiwhD0Ic.js} +46 -46
  120. streamlit/static/static/js/index.DvZDNiBV.js +11 -0
  121. streamlit/static/static/js/{index.DQzRwgrT.js → index.HjydQ4bj.js} +1 -1
  122. streamlit/static/static/js/{index.XHtvnZ0-.js → index.HsxzYHNf.js} +1 -1
  123. streamlit/static/static/js/{index.DesNeXSA.js → index.SVJGpnpy.js} +1 -1
  124. streamlit/static/static/js/index.SjKkVSL7.js +1 -0
  125. streamlit/static/static/js/index.hX8_3tMP.js +1 -0
  126. streamlit/static/static/js/{index.BEzgNZOm.js → index.jZin0w6_.js} +1 -1
  127. streamlit/static/static/js/{index.DzldU3Hy.js → index.pQvPlPcA.js} +4 -4
  128. streamlit/static/static/js/index.pzQTLx9j.js +1 -0
  129. streamlit/static/static/js/{index.ClFk8x0U.js → index.s44_OVd6.js} +33 -33
  130. streamlit/static/static/js/{input.CYXuTqoa.js → input.jAD-v9D6.js} +2 -2
  131. streamlit/static/static/js/{main.BE-siVKv.js → main.Cas0fuOs.js} +1 -1
  132. streamlit/static/static/js/{memory.V554ztRg.js → memory.ENruL8Qk.js} +1 -1
  133. streamlit/static/static/js/{number-overlay-editor.BiUTOXIl.js → number-overlay-editor.DAOTdulh.js} +2 -2
  134. streamlit/static/static/js/{pandasStylerUtils.Dej3Tstq.js → pandasStylerUtils.DChYgcPq.js} +1 -1
  135. streamlit/static/static/js/{sandbox.gpd7KGMo.js → sandbox.DWZYRCm0.js} +1 -1
  136. streamlit/static/static/js/{styled-components.Coj4dr6D.js → styled-components.3lwVqgRW.js} +1 -1
  137. streamlit/static/static/js/{throttle.gZUdtYp7.js → throttle.DfOW1Cns.js} +1 -1
  138. streamlit/static/static/js/{timepicker.B-Y4aU15.js → timepicker.CXHgL5f9.js} +1 -1
  139. streamlit/static/static/js/{toConsumableArray.CcKcKvEd.js → toConsumableArray.DiW0GSDV.js} +1 -1
  140. streamlit/static/static/js/uniqueId.Dfi3SGKZ.js +1 -0
  141. streamlit/static/static/js/{useBasicWidgetState.D-fc_aIL.js → useBasicWidgetState.DnPEt_f3.js} +1 -1
  142. streamlit/static/static/js/{useIntlLocale.CY32IeNt.js → useIntlLocale.BZEGSOVD.js} +8 -8
  143. streamlit/static/static/js/{useTextInputAutoExpand.C0jK7TwF.js → useTextInputAutoExpand.MGVZMqyt.js} +1 -1
  144. streamlit/static/static/js/useUpdateUiValue.CPl6CEx3.js +1 -0
  145. streamlit/static/static/js/{useWaveformController.BLEIAIDo.js → useWaveformController.DOpzDyZu.js} +1 -1
  146. streamlit/static/static/js/{withCalculatedWidth.B3oSlRC0.js → withCalculatedWidth.DgKFTeif.js} +1 -1
  147. streamlit/static/static/js/{withFullScreenWrapper.Cw_ebNmr.js → withFullScreenWrapper.K1jkwhPu.js} +1 -1
  148. streamlit/string_util.py +2 -2
  149. streamlit/testing/v1/element_tree.py +8 -10
  150. streamlit/type_util.py +2 -2
  151. streamlit/url_util.py +2 -2
  152. streamlit/user_info.py +2 -2
  153. streamlit/util.py +1 -1
  154. streamlit/watcher/path_watcher.py +1 -1
  155. streamlit/web/cli.py +1 -4
  156. streamlit/web/server/app_discovery.py +2 -1
  157. streamlit/web/server/oauth_authlib_routes.py +14 -42
  158. streamlit/web/server/server.py +1 -1
  159. streamlit/web/server/server_util.py +1 -1
  160. streamlit/web/server/starlette/starlette_auth_routes.py +94 -16
  161. streamlit/web/server/starlette/starlette_routes.py +9 -3
  162. streamlit/web/server/starlette/starlette_server.py +2 -2
  163. {streamlit_nightly-1.53.1.dev20260114.dist-info → streamlit_nightly-1.53.1.dev20260116.dist-info}/METADATA +1 -1
  164. {streamlit_nightly-1.53.1.dev20260114.dist-info → streamlit_nightly-1.53.1.dev20260116.dist-info}/RECORD +168 -169
  165. streamlit/commands/experimental_query_params.py +0 -169
  166. streamlit/static/static/js/Particles.BDi7fIn-.js +0 -1
  167. streamlit/static/static/js/Toolbar.guIuiwEF.js +0 -1
  168. streamlit/static/static/js/index.BJnWg9Jq.js +0 -1
  169. streamlit/static/static/js/index.Bqgt60FU.js +0 -1
  170. streamlit/static/static/js/index.BsYYrijt.js +0 -11
  171. streamlit/static/static/js/index.CJQq5LcR.js +0 -2
  172. streamlit/static/static/js/index.Cw4eSvJ7.js +0 -1
  173. streamlit/static/static/js/index.DNyw7S7Z.js +0 -1
  174. streamlit/static/static/js/index.DZDt5hYD.js +0 -1
  175. streamlit/static/static/js/index.Do9A7QCt.js +0 -1
  176. streamlit/static/static/js/index.DrSH3pK3.js +0 -2
  177. streamlit/static/static/js/index.GZi6GTJa.js +0 -1
  178. streamlit/static/static/js/index.hcUYvTqs.js +0 -1
  179. streamlit/static/static/js/uniqueId.PRn3V1WU.js +0 -1
  180. streamlit/static/static/js/useUpdateUiValue.CDQloDgB.js +0 -1
  181. {streamlit_nightly-1.53.1.dev20260114.data → streamlit_nightly-1.53.1.dev20260116.data}/scripts/streamlit.cmd +0 -0
  182. {streamlit_nightly-1.53.1.dev20260114.dist-info → streamlit_nightly-1.53.1.dev20260116.dist-info}/WHEEL +0 -0
  183. {streamlit_nightly-1.53.1.dev20260114.dist-info → streamlit_nightly-1.53.1.dev20260116.dist-info}/entry_points.txt +0 -0
  184. {streamlit_nightly-1.53.1.dev20260114.dist-info → streamlit_nightly-1.53.1.dev20260116.dist-info}/top_level.txt +0 -0
@@ -80,7 +80,7 @@ its column width"""
80
80
 
81
81
 
82
82
  def _image_may_have_alpha_channel(image: PILImage) -> bool:
83
- return image.mode in ("RGBA", "LA", "P")
83
+ return image.mode in {"RGBA", "LA", "P"}
84
84
 
85
85
 
86
86
  def _image_is_gif(image: PILImage) -> bool:
@@ -155,9 +155,9 @@ def _np_array_to_bytes(array: npt.NDArray[Any], output_format: str = "JPEG") ->
155
155
 
156
156
  def _verify_np_shape(array: npt.NDArray[Any]) -> npt.NDArray[Any]:
157
157
  shape: NumpyShape = array.shape
158
- if len(shape) not in (2, 3):
158
+ if len(shape) not in {2, 3}:
159
159
  raise StreamlitAPIException("Numpy shape has to be of length 2 or 3.")
160
- if len(shape) == 3 and shape[-1] not in (1, 3, 4):
160
+ if len(shape) == 3 and shape[-1] not in {1, 3, 4}:
161
161
  raise StreamlitAPIException(
162
162
  f"Channel can only be 1, 3, or 4 got {shape[-1]}. Shape is {shape}"
163
163
  )
@@ -224,7 +224,7 @@ def _clip_image(image: npt.NDArray[Any], clamp: bool) -> npt.NDArray[Any]:
224
224
  data = np.clip(image, 0, 1.0)
225
225
  elif np.amin(image) < 0.0 or np.amax(image) > 1.0:
226
226
  raise RuntimeError("Data is outside [0.0, 1.0] and clamp is not set.")
227
- data = data * 255
227
+ data = data * 255 # noqa: PLR6104
228
228
  elif clamp:
229
229
  data = np.clip(image, 0, 255)
230
230
  elif np.amin(image) < 0 or np.amax(image) > 255:
@@ -273,7 +273,7 @@ def get_justify(
273
273
  justify = map_to_flex_terminology[alignment]
274
274
  if justify not in valid_justify:
275
275
  return Block.FlexContainer.Justify.JUSTIFY_UNDEFINED
276
- if justify in ["start", "end", "center"]:
276
+ if justify in {"start", "end", "center"}:
277
277
  return cast(
278
278
  "Block.FlexContainer.Justify.ValueType",
279
279
  getattr(Block.FlexContainer.Justify, f"JUSTIFY_{justify.upper()}"),
@@ -188,7 +188,7 @@ def maybe_raise_label_warnings(label: str | None, label_visibility: str | None)
188
188
  "if needed.",
189
189
  stack_info=True,
190
190
  )
191
- if label_visibility not in ("visible", "hidden", "collapsed"):
191
+ if label_visibility not in {"visible", "hidden", "collapsed"}:
192
192
  raise errors.StreamlitAPIException(
193
193
  f"Unsupported label_visibility option '{label_visibility}'. "
194
194
  f"Valid values are 'visible', 'hidden' or 'collapsed'."
@@ -58,7 +58,6 @@ DIVERGING_6: Final = "#000027"
58
58
  DIVERGING_7: Final = "#000028"
59
59
  DIVERGING_8: Final = "#000029"
60
60
  DIVERGING_9: Final = "#000030"
61
- DIVERGING_10: Final = "#000031"
62
61
 
63
62
  INCREASING: Final = "#000032"
64
63
  DECREASING: Final = "#000033"
@@ -189,16 +188,15 @@ def configure_streamlit_plotly_theme() -> None:
189
188
  sequentialminus=streamlit_colorscale,
190
189
  diverging=[
191
190
  [0.0, DIVERGING_0],
192
- [0.1, DIVERGING_1],
193
- [0.2, DIVERGING_2],
194
- [0.3, DIVERGING_3],
195
- [0.4, DIVERGING_4],
196
- [0.5, DIVERGING_5],
197
- [0.6, DIVERGING_6],
198
- [0.7, DIVERGING_7],
199
- [0.8, DIVERGING_8],
200
- [0.9, DIVERGING_9],
201
- [1.0, DIVERGING_10],
191
+ [0.1111111111111111, DIVERGING_1],
192
+ [0.2222222222222222, DIVERGING_2],
193
+ [0.3333333333333333, DIVERGING_3],
194
+ [0.4444444444444444, DIVERGING_4],
195
+ [0.5555555555555556, DIVERGING_5],
196
+ [0.6666666666666666, DIVERGING_6],
197
+ [0.7777777777777778, DIVERGING_7],
198
+ [0.8888888888888888, DIVERGING_8],
199
+ [1.0, DIVERGING_9],
202
200
  ],
203
201
  ),
204
202
  coloraxis=go.layout.Coloraxis(colorscale=streamlit_colorscale),
@@ -59,10 +59,10 @@ SAFE_VALUES: TypeAlias = Union[
59
59
  time,
60
60
  datetime,
61
61
  timedelta,
62
- None,
63
62
  "ellipsis",
64
63
  Message,
65
64
  PROTO_SCALAR_VALUE,
65
+ None,
66
66
  ]
67
67
 
68
68
 
streamlit/elements/map.py CHANGED
@@ -93,8 +93,8 @@ class MapMixin:
93
93
  *,
94
94
  latitude: str | None = None,
95
95
  longitude: str | None = None,
96
- color: None | str | Color = None,
97
- size: None | str | float = None,
96
+ color: str | Color | None = None,
97
+ size: str | float | None = None,
98
98
  zoom: int | None = None,
99
99
  width: WidthWithoutContent = "stretch",
100
100
  height: HeightWithoutContent = 500,
@@ -296,8 +296,8 @@ def to_deckgl_json(
296
296
  data: Data,
297
297
  lat: str | None,
298
298
  lon: str | None,
299
- size: None | str | float,
300
- color: None | str | Collection[float],
299
+ size: str | float | None,
300
+ color: str | Collection[float] | None,
301
301
  zoom: int | None,
302
302
  ) -> str:
303
303
  if data is None:
@@ -432,7 +432,7 @@ def _convert_color_arg_or_column(
432
432
  data: DataFrame,
433
433
  color_arg: str,
434
434
  color_col_name: str | None,
435
- ) -> None | str | IntColorTuple:
435
+ ) -> str | IntColorTuple | None:
436
436
  """Converts color to a format accepted by PyDeck.
437
437
 
438
438
  For example:
@@ -443,7 +443,7 @@ def _convert_color_arg_or_column(
443
443
  NOTE: This function mutates the data argument.
444
444
  """
445
445
 
446
- color_arg_out: None | str | IntColorTuple = None
446
+ color_arg_out: str | IntColorTuple | None = None
447
447
 
448
448
  if color_col_name is not None:
449
449
  # Convert color column to the right format.
@@ -677,14 +677,14 @@ class PlotlyMixin:
677
677
  "options."
678
678
  )
679
679
 
680
- if theme not in ["streamlit", None]:
680
+ if theme not in {"streamlit", None}:
681
681
  raise StreamlitAPIException(
682
682
  f'You set theme="{theme}" while Streamlit charts only support '
683
683
  "theme=”streamlit” or theme=None to fallback to the default "
684
684
  "library theme."
685
685
  )
686
686
 
687
- if on_select not in ["ignore", "rerun"] and not callable(on_select):
687
+ if on_select not in {"ignore", "rerun"} and not callable(on_select):
688
688
  raise StreamlitAPIException(
689
689
  f"You have passed {on_select} to `on_select`. But only 'ignore', "
690
690
  "'rerun', or a callable is supported."
@@ -151,7 +151,7 @@ class ToastMixin:
151
151
  toast_proto.body = clean_text(validate_text(body))
152
152
  toast_proto.icon = validate_icon_or_emoji(icon)
153
153
 
154
- if duration in ["short", "long", "infinite"] or (
154
+ if duration in {"short", "long", "infinite"} or (
155
155
  isinstance(duration, int) and duration > 0
156
156
  ):
157
157
  if duration == "short":
@@ -2282,14 +2282,14 @@ class VegaChartsMixin:
2282
2282
 
2283
2283
  See the `vega_lite_chart` method docstring for more information.
2284
2284
  """
2285
- if theme not in ["streamlit", None]:
2285
+ if theme not in {"streamlit", None}:
2286
2286
  raise StreamlitAPIException(
2287
2287
  f'You set theme="{theme}" while Streamlit charts only support '
2288
2288
  "theme=”streamlit” or theme=None to fallback to the default "
2289
2289
  "library theme."
2290
2290
  )
2291
2291
 
2292
- if on_select not in ["ignore", "rerun"] and not callable(on_select):
2292
+ if on_select not in {"ignore", "rerun"} and not callable(on_select):
2293
2293
  raise StreamlitAPIException(
2294
2294
  f"You have passed {on_select} to `on_select`. But only 'ignore', "
2295
2295
  "'rerun', or a callable is supported."
@@ -356,7 +356,7 @@ class ButtonMixin:
356
356
  width = "stretch" if use_container_width else "content"
357
357
 
358
358
  # Checks whether the entered button type is one of the allowed options
359
- if type not in ["primary", "secondary", "tertiary"]:
359
+ if type not in {"primary", "secondary", "tertiary"}:
360
360
  raise StreamlitAPIException(
361
361
  'The type argument to st.button must be "primary", "secondary", or "tertiary". '
362
362
  f'\nThe argument passed was "{type}".'
@@ -736,7 +736,7 @@ class ButtonMixin:
736
736
  if use_container_width is not None:
737
737
  width = "stretch" if use_container_width else "content"
738
738
 
739
- if type not in ["primary", "secondary", "tertiary"]:
739
+ if type not in {"primary", "secondary", "tertiary"}:
740
740
  raise StreamlitAPIException(
741
741
  'The type argument to st.download_button must be "primary", "secondary", or "tertiary". \n'
742
742
  f'The argument passed was "{type}".'
@@ -915,7 +915,7 @@ class ButtonMixin:
915
915
 
916
916
  """
917
917
  # Checks whether the entered button type is one of the allowed options - either "primary" or "secondary"
918
- if type not in ["primary", "secondary", "tertiary"]:
918
+ if type not in {"primary", "secondary", "tertiary"}:
919
919
  raise StreamlitAPIException(
920
920
  'The type argument to st.link_button must be "primary", "secondary", or "tertiary". '
921
921
  f'\nThe argument passed was "{type}".'
@@ -255,7 +255,7 @@ def _build_proto(
255
255
 
256
256
  def _maybe_raise_selection_mode_warning(selection_mode: SelectionMode) -> None:
257
257
  """Check if the selection_mode value is valid or raise exception otherwise."""
258
- if selection_mode not in ["single", "multi"]:
258
+ if selection_mode not in {"single", "multi"}:
259
259
  raise StreamlitAPIException(
260
260
  "The selection_mode argument must be one of ['single', 'multi']. "
261
261
  f"The argument passed was '{selection_mode}'."
@@ -410,7 +410,7 @@ class ButtonGroupMixin:
410
410
 
411
411
  """
412
412
 
413
- if options not in ["thumbs", "faces", "stars"]:
413
+ if options not in {"thumbs", "faces", "stars"}:
414
414
  raise StreamlitAPIException(
415
415
  "The options argument to st.feedback must be one of "
416
416
  "['thumbs', 'faces', 'stars']. "
@@ -1062,7 +1062,7 @@ class ButtonGroupMixin:
1062
1062
  "`selection_mode='single'`."
1063
1063
  )
1064
1064
 
1065
- if style not in ["borderless", "pills", "segmented_control"]:
1065
+ if style not in {"borderless", "pills", "segmented_control"}:
1066
1066
  raise StreamlitAPIException(
1067
1067
  "The style argument must be one of ['borderless', 'pills', 'segmented_control']. "
1068
1068
  f"The argument passed was '{style}'."
@@ -223,7 +223,7 @@ def _process_avatar_input(
223
223
  AvatarType.ICON,
224
224
  (
225
225
  "assistant"
226
- if avatar in [PresetNames.AI, PresetNames.ASSISTANT]
226
+ if avatar in {PresetNames.AI, PresetNames.ASSISTANT}
227
227
  else "user"
228
228
  ),
229
229
  )
@@ -238,11 +238,11 @@ def _parse_value(
238
238
  if column_data_kind == ColumnDataKind.TIMEDELTA:
239
239
  return pd.Timedelta(value)
240
240
 
241
- if column_data_kind in [
241
+ if column_data_kind in {
242
242
  ColumnDataKind.DATETIME,
243
243
  ColumnDataKind.DATE,
244
244
  ColumnDataKind.TIME,
245
- ]:
245
+ }:
246
246
  datetime_value = pd.Timestamp(value)
247
247
 
248
248
  if pd.isna(datetime_value):
@@ -481,7 +481,7 @@ def _is_supported_index(df_index: pd.Index[Any]) -> bool:
481
481
 
482
482
  return (
483
483
  type(df_index)
484
- in [
484
+ in {
485
485
  pd.RangeIndex,
486
486
  pd.Index,
487
487
  pd.DatetimeIndex,
@@ -490,7 +490,7 @@ def _is_supported_index(df_index: pd.Index[Any]) -> bool:
490
490
  # pd.IntervalIndex,
491
491
  # Period type isn't editable currently:
492
492
  # pd.PeriodIndex,
493
- ]
493
+ }
494
494
  # We need to check these index types without importing, since they are
495
495
  # deprecated and planned to be removed soon.
496
496
  or is_type(df_index, "pandas.core.indexes.numeric.Int64Index")
@@ -1029,7 +1029,7 @@ class DataEditorMixin:
1029
1029
  update_column_config(
1030
1030
  column_config_mapping, INDEX_IDENTIFIER, {"required": True}
1031
1031
  )
1032
- if num_rows in ("dynamic", "add") and hide_index is True:
1032
+ if num_rows in {"dynamic", "add"} and hide_index is True:
1033
1033
  _LOGGER.warning(
1034
1034
  "Setting `hide_index=True` in data editor with a non-range index will not have any effect "
1035
1035
  "when `num_rows` is '%s'. It is required for the user to fill in index values for "
@@ -1038,7 +1038,7 @@ class DataEditorMixin:
1038
1038
  num_rows,
1039
1039
  )
1040
1040
 
1041
- if hide_index is None and has_range_index and num_rows in ("dynamic", "add"):
1041
+ if hide_index is None and has_range_index and num_rows in {"dynamic", "add"}:
1042
1042
  # Temporary workaround:
1043
1043
  # We hide range indices if num_rows allows adding rows.
1044
1044
  # since the current way of handling this index during editing is a
@@ -512,7 +512,7 @@ class NumberInputMixin:
512
512
  number_format = ("%d" if int_value else "%0.2f") if format is None else format
513
513
 
514
514
  # Warn user if they format an int type as a float or vice versa.
515
- if number_format in ["%d", "%u", "%i"] and float_value:
515
+ if number_format in {"%d", "%u", "%i"} and float_value:
516
516
  import streamlit as st
517
517
 
518
518
  st.warning(
@@ -739,7 +739,7 @@ class SliderMixin:
739
739
 
740
740
  # Ensure that the value is either a single value or a range of values.
741
741
  single_value = isinstance(value, tuple(SUPPORTED_TYPES.keys()))
742
- range_value = isinstance(value, (list, tuple)) and len(value) in (0, 1, 2)
742
+ range_value = isinstance(value, (list, tuple)) and len(value) in {0, 1, 2}
743
743
  if not single_value and not range_value:
744
744
  raise StreamlitAPIException(
745
745
  "Slider value should either be an int/float/datetime or a list/tuple of "
@@ -778,7 +778,7 @@ class SliderMixin:
778
778
 
779
779
  datetime_min = time.min.replace(tzinfo=prepared_value[0].tzinfo)
780
780
  datetime_max = time.max.replace(tzinfo=prepared_value[0].tzinfo)
781
- if data_type in (SliderProto.DATETIME, SliderProto.DATE):
781
+ if data_type in {SliderProto.DATETIME, SliderProto.DATE}:
782
782
  prepared_value = cast("Sequence[datetime]", prepared_value)
783
783
 
784
784
  datetime_min = prepared_value[0] - timedelta(days=14)
@@ -823,10 +823,10 @@ class SliderMixin:
823
823
  max_value = defaults[data_type]["max_value"]
824
824
  if step is None:
825
825
  step = defaults[data_type]["step"]
826
- if data_type in (
826
+ if data_type in {
827
827
  SliderProto.DATETIME,
828
828
  SliderProto.DATE,
829
- ) and max_value - min_value < timedelta(days=1):
829
+ } and max_value - min_value < timedelta(days=1):
830
830
  step = timedelta(minutes=15)
831
831
  if format is None:
832
832
  format = cast("str", defaults[data_type]["format"]) # noqa: A001
@@ -945,7 +945,7 @@ class SliderMixin:
945
945
  # Restore times/datetimes to original timezone (dates are always naive)
946
946
  orig_tz = (
947
947
  prepared_value[0].tzinfo
948
- if data_type in (SliderProto.TIME, SliderProto.DATETIME)
948
+ if data_type in {SliderProto.TIME, SliderProto.DATETIME}
949
949
  else None
950
950
  )
951
951
 
@@ -472,6 +472,73 @@ class TimeInputSerde:
472
472
  return time.strftime(v, "%H:%M")
473
473
 
474
474
 
475
+ def _validate_date_value(
476
+ current_value: DateWidgetReturn,
477
+ parsed_values: _DateInputValues,
478
+ has_explicit_bounds: bool,
479
+ ) -> tuple[DateWidgetReturn, bool]:
480
+ """Validate current value against min/max bounds and reset if needed.
481
+
482
+ Only validates when has_explicit_bounds is True (user provided min_value or max_value).
483
+ This avoids incorrectly resetting values against computed default bounds.
484
+
485
+ Parameters
486
+ ----------
487
+ current_value : DateWidgetReturn
488
+ The current value of the date input widget. Can be a single date, a tuple of
489
+ dates (for range mode), or None.
490
+ parsed_values : _DateInputValues
491
+ Parsed configuration containing min, max, default value, and whether the widget
492
+ is in range mode.
493
+ has_explicit_bounds : bool
494
+ Whether the user explicitly provided min_value or max_value. If False, validation
495
+ is skipped to avoid resetting against computed default bounds.
496
+
497
+ Returns
498
+ -------
499
+ tuple[DateWidgetReturn, bool]
500
+ A tuple of (validated_value, was_reset) where validated_value is either the
501
+ original value (if valid) or the default value (if reset was needed), and
502
+ was_reset indicates whether a reset occurred.
503
+ """
504
+ value_needs_reset = False
505
+
506
+ if current_value is None or not has_explicit_bounds:
507
+ return current_value, value_needs_reset
508
+
509
+ # For range inputs, current_value is a tuple; for single inputs, it's a date
510
+ if (
511
+ parsed_values.is_range
512
+ and isinstance(current_value, tuple)
513
+ and len(current_value) > 0
514
+ ):
515
+ # For range mode, check if any date in the tuple is outside bounds.
516
+ # Cast to tuple[date, ...] to satisfy the type checker after the length check.
517
+ non_empty_value = cast("tuple[date, ...]", current_value)
518
+ start_date = non_empty_value[0]
519
+ end_date = non_empty_value[-1] if len(non_empty_value) > 1 else start_date
520
+ if start_date < parsed_values.min or end_date > parsed_values.max:
521
+ value_needs_reset = True
522
+ elif not parsed_values.is_range and isinstance(current_value, date):
523
+ # For single date mode
524
+ if current_value < parsed_values.min or current_value > parsed_values.max:
525
+ value_needs_reset = True
526
+ else:
527
+ # Type mismatch: widget mode doesn't match current value type (e.g., range mode
528
+ # with a single date value or single mode with a tuple). Reset to match the mode.
529
+ value_needs_reset = True
530
+
531
+ if not value_needs_reset:
532
+ return current_value, value_needs_reset
533
+
534
+ # Reset to the default value from parsed_values
535
+ if parsed_values.value is None or len(parsed_values.value) == 0:
536
+ return (() if parsed_values.is_range else None), True
537
+ if not parsed_values.is_range:
538
+ return parsed_values.value[0], True
539
+ return cast("DateWidgetReturn", tuple(parsed_values.value)), True
540
+
541
+
475
542
  @dataclass
476
543
  class DateInputSerde:
477
544
  value: _DateInputValues
@@ -1467,7 +1534,7 @@ class TimeWidgetsMixin:
1467
1534
  parsed_min_date = parse_date_deterministic_for_id(min_value)
1468
1535
  parsed_max_date = parse_date_deterministic_for_id(max_value)
1469
1536
 
1470
- parsed: str | None | list[str | None]
1537
+ parsed: str | list[str | None] | None
1471
1538
  if value == "today":
1472
1539
  parsed = None
1473
1540
  elif isinstance(value, Sequence):
@@ -1480,12 +1547,10 @@ class TimeWidgetsMixin:
1480
1547
  element_id = compute_and_register_element_id(
1481
1548
  "date_input",
1482
1549
  user_key=key,
1483
- # Ensure stable ID when key is provided; explicitly whitelist parameters
1484
- # that might invalidate the current widget state.
1485
- # format should be supported. However, there is a bug in baseweb where
1486
- # changing the format dynamically leads to a wrongly formatted date.
1487
- # So, we whitelist it for now until we migrate this away from baseweb.
1488
- key_as_main_identity={"min_value", "max_value", "format"},
1550
+ # Ensure stable ID when key is provided. Only format is whitelisted because
1551
+ # there is a bug in baseweb where changing the format dynamically leads to
1552
+ # a wrongly formatted date. min_value and max_value support dynamic changes.
1553
+ key_as_main_identity={"format"},
1489
1554
  dg=self.dg,
1490
1555
  label=label,
1491
1556
  value=parsed,
@@ -1508,6 +1573,9 @@ class TimeWidgetsMixin:
1508
1573
  max_value=max_value,
1509
1574
  )
1510
1575
 
1576
+ # Track if user explicitly set bounds (before del)
1577
+ has_explicit_bounds = min_value is not None or max_value is not None
1578
+
1511
1579
  if value == "today":
1512
1580
  # We need to know if this is a single or range date_input, but don't have
1513
1581
  # a default value, so we check if session_state can tell us.
@@ -1564,15 +1632,28 @@ class TimeWidgetsMixin:
1564
1632
  value_type="string_array_value",
1565
1633
  )
1566
1634
 
1567
- if widget_state.value_changed:
1568
- date_input_proto.value[:] = serde.serialize(widget_state.value)
1635
+ # Validate the current value against the new min/max bounds.
1636
+ # Only validate when user explicitly provided min_value or max_value.
1637
+ current_value, value_needs_reset = _validate_date_value(
1638
+ widget_state.value, parsed_values, has_explicit_bounds
1639
+ )
1640
+
1641
+ # Reset if needed.
1642
+ if value_needs_reset and key is not None:
1643
+ # Update session_state so subsequent accesses in this run
1644
+ # return the corrected value. Use reset_state_value to avoid
1645
+ # the "cannot be modified after widget instantiated" error.
1646
+ get_session_state().reset_state_value(key, current_value)
1647
+
1648
+ if value_needs_reset or widget_state.value_changed:
1649
+ date_input_proto.value[:] = serde.serialize(current_value)
1569
1650
  date_input_proto.set_value = True
1570
1651
 
1571
1652
  validate_width(width)
1572
1653
  layout_config = LayoutConfig(width=width)
1573
1654
 
1574
1655
  self.dg._enqueue("date_input", date_input_proto, layout_config=layout_config)
1575
- return widget_state.value
1656
+ return current_value
1576
1657
 
1577
1658
  @property
1578
1659
  def dg(self) -> DeltaGenerator:
@@ -56,7 +56,7 @@ HELP_TYPES: Final[tuple[type[Any], ...]] = (
56
56
  )
57
57
 
58
58
 
59
- class StreamingOutput(list[Any]):
59
+ class StreamingOutput(list[Any]): # noqa: FURB189
60
60
  pass
61
61
 
62
62
 
streamlit/env_util.py CHANGED
@@ -46,7 +46,7 @@ def is_repl() -> bool:
46
46
 
47
47
  # <stdin> is what the basic Python REPL calls the root frame's
48
48
  # filename, and <string> is what iPython sometimes calls it.
49
- return filename in ("<stdin>", "<string>")
49
+ return filename in {"<stdin>", "<string>"}
50
50
 
51
51
 
52
52
  def is_executable_in_path(name: str) -> bool:
streamlit/errors.py CHANGED
@@ -34,14 +34,10 @@ class Error(Exception):
34
34
  code.
35
35
  """
36
36
 
37
- pass
38
-
39
37
 
40
38
  class CustomComponentError(Error):
41
39
  """Exceptions thrown in the custom components code path."""
42
40
 
43
- pass
44
-
45
41
 
46
42
  class StreamlitComponentRegistryError(Error):
47
43
  """Exceptions raised while discovering or registering Streamlit components.
@@ -51,8 +47,6 @@ class StreamlitComponentRegistryError(Error):
51
47
  registry.
52
48
  """
53
49
 
54
- pass
55
-
56
50
 
57
51
  class DeprecationError(Error):
58
52
  pass
@@ -63,16 +57,12 @@ class FragmentStorageKeyError(Error, KeyError):
63
57
  operation.
64
58
  """
65
59
 
66
- pass
67
-
68
60
 
69
61
  class FragmentHandledException(Exception): # noqa: N818
70
62
  """An exception that is raised by the fragment
71
63
  when it has handled the exception itself.
72
64
  """
73
65
 
74
- pass
75
-
76
66
 
77
67
  class NoStaticFiles(Error): # noqa: N818
78
68
  pass
@@ -89,14 +79,10 @@ class MarkdownFormattedException(Error): # noqa: N818
89
79
  nicely formatted on the frontend.
90
80
  """
91
81
 
92
- pass
93
-
94
82
 
95
83
  class StreamlitMaxRetriesError(Error):
96
84
  """An exception raised when a file or folder cannot be accessed after multiple retries."""
97
85
 
98
- pass
99
-
100
86
 
101
87
  class StreamlitAPIException(MarkdownFormattedException):
102
88
  """Base class for Streamlit API exceptions.
@@ -16,7 +16,7 @@ from streamlit.proto import AppPage_pb2 as streamlit_dot_proto_dot_AppPage__pb2
16
16
  from streamlit.proto import SessionStatus_pb2 as streamlit_dot_proto_dot_SessionStatus__pb2
17
17
 
18
18
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\xc2\x15\n\x11\x43ustomThemeConfig\x12\x15\n\rprimary_color\x18\x01 \x01(\t\x12\"\n\x1asecondary_background_color\x18\x02 \x01(\t\x12\x18\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\t\x12\x12\n\ntext_color\x18\x04 \x01(\t\x12+\n\x04\x66ont\x18\x05 \x01(\x0e\x32\x1d.CustomThemeConfig.FontFamily\x12*\n\x04\x62\x61se\x18\x06 \x01(\x0e\x32\x1c.CustomThemeConfig.BaseTheme\x12\x1f\n\x17widget_background_color\x18\x07 \x01(\t\x12\x1b\n\x13widget_border_color\x18\x08 \x01(\t\x12\x15\n\x05radii\x18\t \x01(\x0b\x32\x06.Radii\x12\x14\n\x0cheading_font\x18\x0c \x01(\t\x12\x11\n\tbody_font\x18\r \x01(\t\x12\x11\n\tcode_font\x18\x0e \x01(\t\x12\x1d\n\nfont_faces\x18\x0f \x03(\x0b\x32\t.FontFace\x12!\n\x0c\x66ont_sources\x18% \x03(\x0b\x32\x0b.FontSource\x12\x1e\n\nfont_sizes\x18\x10 \x01(\x0b\x32\n.FontSizes\x12!\n\x19skeleton_background_color\x18\x11 \x01(\t\x12\x18\n\x0b\x62\x61se_radius\x18\x12 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rbutton_radius\x18\x1a \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x62order_color\x18\x13 \x01(\tH\x02\x88\x01\x01\x12#\n\x16\x64\x61taframe_border_color\x18\x1b \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x12show_widget_border\x18\x14 \x01(\x08H\x04\x88\x01\x01\x12\x17\n\nlink_color\x18\x15 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0elink_underline\x18\x1d \x01(\x08H\x06\x88\x01\x01\x12\x1b\n\x0e\x62\x61se_font_size\x18\x16 \x01(\x05H\x07\x88\x01\x01\x12\x1d\n\x10\x62\x61se_font_weight\x18\x1e \x01(\x05H\x08\x88\x01\x01\x12\x1d\n\x10\x63ode_font_weight\x18 \x01(\x05H\t\x88\x01\x01\x12\x1b\n\x0e\x63ode_font_size\x18\x1c \x01(\tH\n\x88\x01\x01\x12\x1a\n\x12heading_font_sizes\x18# \x03(\t\x12\x1c\n\x14heading_font_weights\x18\" \x03(\x05\x12 \n\x13show_sidebar_border\x18\x17 \x01(\x08H\x0b\x88\x01\x01\x12\x1c\n\x0f\x63ode_text_color\x18; \x01(\tH\x0c\x88\x01\x01\x12\"\n\x15\x63ode_background_color\x18\x19 \x01(\tH\r\x88\x01\x01\x12.\n!dataframe_header_background_color\x18\x1f \x01(\tH\x0e\x88\x01\x01\x12 \n\x18\x63hart_categorical_colors\x18! \x03(\t\x12\x1f\n\x17\x63hart_sequential_colors\x18$ \x03(\t\x12\x16\n\tred_color\x18& \x01(\tH\x0f\x88\x01\x01\x12\x19\n\x0corange_color\x18\' \x01(\tH\x10\x88\x01\x01\x12\x19\n\x0cyellow_color\x18( \x01(\tH\x11\x88\x01\x01\x12\x17\n\nblue_color\x18) \x01(\tH\x12\x88\x01\x01\x12\x18\n\x0bgreen_color\x18* \x01(\tH\x13\x88\x01\x01\x12\x19\n\x0cviolet_color\x18+ \x01(\tH\x14\x88\x01\x01\x12\x17\n\ngray_color\x18, \x01(\tH\x15\x88\x01\x01\x12!\n\x14red_background_color\x18- \x01(\tH\x16\x88\x01\x01\x12$\n\x17orange_background_color\x18. \x01(\tH\x17\x88\x01\x01\x12$\n\x17yellow_background_color\x18/ \x01(\tH\x18\x88\x01\x01\x12\"\n\x15\x62lue_background_color\x18\x30 \x01(\tH\x19\x88\x01\x01\x12#\n\x16green_background_color\x18\x31 \x01(\tH\x1a\x88\x01\x01\x12$\n\x17violet_background_color\x18\x32 \x01(\tH\x1b\x88\x01\x01\x12\"\n\x15gray_background_color\x18\x33 \x01(\tH\x1c\x88\x01\x01\x12\x1b\n\x0ered_text_color\x18\x34 \x01(\tH\x1d\x88\x01\x01\x12\x1e\n\x11orange_text_color\x18\x35 \x01(\tH\x1e\x88\x01\x01\x12\x1e\n\x11yellow_text_color\x18\x36 \x01(\tH\x1f\x88\x01\x01\x12\x1c\n\x0f\x62lue_text_color\x18\x37 \x01(\tH \x88\x01\x01\x12\x1d\n\x10green_text_color\x18\x38 \x01(\tH!\x88\x01\x01\x12\x1e\n\x11violet_text_color\x18\x39 \x01(\tH\"\x88\x01\x01\x12\x1c\n\x0fgray_text_color\x18: \x01(\tH#\x88\x01\x01\x12(\n\x07sidebar\x18\x18 \x01(\x0b\x32\x12.CustomThemeConfigH$\x88\x01\x01\x12&\n\x05light\x18< \x01(\x0b\x32\x12.CustomThemeConfigH%\x88\x01\x01\x12%\n\x04\x64\x61rk\x18= \x01(\x0b\x32\x12.CustomThemeConfigH&\x88\x01\x01\" \n\tBaseTheme\x12\t\n\x05LIGHT\x10\x00\x12\x08\n\x04\x44\x41RK\x10\x01\"6\n\nFontFamily\x12\x0e\n\nSANS_SERIF\x10\x00\x12\t\n\x05SERIF\x10\x01\x12\r\n\tMONOSPACE\x10\x02\x42\x0e\n\x0c_base_radiusB\x10\n\x0e_button_radiusB\x0f\n\r_border_colorB\x19\n\x17_dataframe_border_colorB\x15\n\x13_show_widget_borderB\r\n\x0b_link_colorB\x11\n\x0f_link_underlineB\x11\n\x0f_base_font_sizeB\x13\n\x11_base_font_weightB\x13\n\x11_code_font_weightB\x11\n\x0f_code_font_sizeB\x16\n\x14_show_sidebar_borderB\x12\n\x10_code_text_colorB\x18\n\x16_code_background_colorB$\n\"_dataframe_header_background_colorB\x0c\n\n_red_colorB\x0f\n\r_orange_colorB\x0f\n\r_yellow_colorB\r\n\x0b_blue_colorB\x0e\n\x0c_green_colorB\x0f\n\r_violet_colorB\r\n\x0b_gray_colorB\x17\n\x15_red_background_colorB\x1a\n\x18_orange_background_colorB\x1a\n\x18_yellow_background_colorB\x18\n\x16_blue_background_colorB\x19\n\x17_green_background_colorB\x1a\n\x18_violet_background_colorB\x18\n\x16_gray_background_colorB\x11\n\x0f_red_text_colorB\x14\n\x12_orange_text_colorB\x14\n\x12_yellow_text_colorB\x12\n\x10_blue_text_colorB\x13\n\x11_green_text_colorB\x14\n\x12_violet_text_colorB\x12\n\x10_gray_text_colorB\n\n\x08_sidebarB\x08\n\x06_lightB\x07\n\x05_dark\"w\n\x08\x46ontFace\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06\x66\x61mily\x18\x02 \x01(\t\x12\x12\n\x06weight\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x14\n\x0cweight_range\x18\x05 \x01(\t\x12\r\n\x05style\x18\x04 \x01(\t\x12\x15\n\runicode_range\x18\x06 \x01(\t\"5\n\nFontSource\x12\x13\n\x0b\x63onfig_name\x18\x01 \x01(\t\x12\x12\n\nsource_url\x18\x02 \x01(\t\"<\n\x05Radii\x12\x1a\n\x12\x62\x61se_widget_radius\x18\x01 \x01(\x05\x12\x17\n\x0f\x63heckbox_radius\x18\x02 \x01(\x05\"T\n\tFontSizes\x12\x16\n\x0etiny_font_size\x18\x01 \x01(\x05\x12\x17\n\x0fsmall_font_size\x18\x02 \x01(\x05\x12\x16\n\x0e\x62\x61se_font_size\x18\x03 \x01(\x05\"a\n\x08UserInfo\x12\x17\n\x0finstallation_id\x18\x01 \x01(\t\x12\x1a\n\x12installation_id_v3\x18\x05 \x01(\t\x12\x1a\n\x12installation_id_v4\x18\x06 \x01(\tJ\x04\x08\x02\x10\x03\"l\n\x0f\x45nvironmentInfo\x12\x19\n\x11streamlit_version\x18\x01 \x01(\t\x12\x16\n\x0epython_version\x18\x02 \x01(\t\x12\x11\n\tserver_os\x18\x03 \x01(\t\x12\x13\n\x0bhas_display\x18\x04 \x01(\x08\x42/\n\x1c\x63om.snowflake.apps.streamlitB\x0fNewSessionProtob\x06proto3')
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\xe2\x15\n\x11\x43ustomThemeConfig\x12\x15\n\rprimary_color\x18\x01 \x01(\t\x12\"\n\x1asecondary_background_color\x18\x02 \x01(\t\x12\x18\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\t\x12\x12\n\ntext_color\x18\x04 \x01(\t\x12+\n\x04\x66ont\x18\x05 \x01(\x0e\x32\x1d.CustomThemeConfig.FontFamily\x12*\n\x04\x62\x61se\x18\x06 \x01(\x0e\x32\x1c.CustomThemeConfig.BaseTheme\x12\x1f\n\x17widget_background_color\x18\x07 \x01(\t\x12\x1b\n\x13widget_border_color\x18\x08 \x01(\t\x12\x15\n\x05radii\x18\t \x01(\x0b\x32\x06.Radii\x12\x14\n\x0cheading_font\x18\x0c \x01(\t\x12\x11\n\tbody_font\x18\r \x01(\t\x12\x11\n\tcode_font\x18\x0e \x01(\t\x12\x1d\n\nfont_faces\x18\x0f \x03(\x0b\x32\t.FontFace\x12!\n\x0c\x66ont_sources\x18% \x03(\x0b\x32\x0b.FontSource\x12\x1e\n\nfont_sizes\x18\x10 \x01(\x0b\x32\n.FontSizes\x12!\n\x19skeleton_background_color\x18\x11 \x01(\t\x12\x18\n\x0b\x62\x61se_radius\x18\x12 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rbutton_radius\x18\x1a \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x62order_color\x18\x13 \x01(\tH\x02\x88\x01\x01\x12#\n\x16\x64\x61taframe_border_color\x18\x1b \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x12show_widget_border\x18\x14 \x01(\x08H\x04\x88\x01\x01\x12\x17\n\nlink_color\x18\x15 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0elink_underline\x18\x1d \x01(\x08H\x06\x88\x01\x01\x12\x1b\n\x0e\x62\x61se_font_size\x18\x16 \x01(\x05H\x07\x88\x01\x01\x12\x1d\n\x10\x62\x61se_font_weight\x18\x1e \x01(\x05H\x08\x88\x01\x01\x12\x1d\n\x10\x63ode_font_weight\x18 \x01(\x05H\t\x88\x01\x01\x12\x1b\n\x0e\x63ode_font_size\x18\x1c \x01(\tH\n\x88\x01\x01\x12\x1a\n\x12heading_font_sizes\x18# \x03(\t\x12\x1c\n\x14heading_font_weights\x18\" \x03(\x05\x12 \n\x13show_sidebar_border\x18\x17 \x01(\x08H\x0b\x88\x01\x01\x12\x1c\n\x0f\x63ode_text_color\x18; \x01(\tH\x0c\x88\x01\x01\x12\"\n\x15\x63ode_background_color\x18\x19 \x01(\tH\r\x88\x01\x01\x12.\n!dataframe_header_background_color\x18\x1f \x01(\tH\x0e\x88\x01\x01\x12 \n\x18\x63hart_categorical_colors\x18! \x03(\t\x12\x1f\n\x17\x63hart_sequential_colors\x18$ \x03(\t\x12\x1e\n\x16\x63hart_diverging_colors\x18> \x03(\t\x12\x16\n\tred_color\x18& \x01(\tH\x0f\x88\x01\x01\x12\x19\n\x0corange_color\x18\' \x01(\tH\x10\x88\x01\x01\x12\x19\n\x0cyellow_color\x18( \x01(\tH\x11\x88\x01\x01\x12\x17\n\nblue_color\x18) \x01(\tH\x12\x88\x01\x01\x12\x18\n\x0bgreen_color\x18* \x01(\tH\x13\x88\x01\x01\x12\x19\n\x0cviolet_color\x18+ \x01(\tH\x14\x88\x01\x01\x12\x17\n\ngray_color\x18, \x01(\tH\x15\x88\x01\x01\x12!\n\x14red_background_color\x18- \x01(\tH\x16\x88\x01\x01\x12$\n\x17orange_background_color\x18. \x01(\tH\x17\x88\x01\x01\x12$\n\x17yellow_background_color\x18/ \x01(\tH\x18\x88\x01\x01\x12\"\n\x15\x62lue_background_color\x18\x30 \x01(\tH\x19\x88\x01\x01\x12#\n\x16green_background_color\x18\x31 \x01(\tH\x1a\x88\x01\x01\x12$\n\x17violet_background_color\x18\x32 \x01(\tH\x1b\x88\x01\x01\x12\"\n\x15gray_background_color\x18\x33 \x01(\tH\x1c\x88\x01\x01\x12\x1b\n\x0ered_text_color\x18\x34 \x01(\tH\x1d\x88\x01\x01\x12\x1e\n\x11orange_text_color\x18\x35 \x01(\tH\x1e\x88\x01\x01\x12\x1e\n\x11yellow_text_color\x18\x36 \x01(\tH\x1f\x88\x01\x01\x12\x1c\n\x0f\x62lue_text_color\x18\x37 \x01(\tH \x88\x01\x01\x12\x1d\n\x10green_text_color\x18\x38 \x01(\tH!\x88\x01\x01\x12\x1e\n\x11violet_text_color\x18\x39 \x01(\tH\"\x88\x01\x01\x12\x1c\n\x0fgray_text_color\x18: \x01(\tH#\x88\x01\x01\x12(\n\x07sidebar\x18\x18 \x01(\x0b\x32\x12.CustomThemeConfigH$\x88\x01\x01\x12&\n\x05light\x18< \x01(\x0b\x32\x12.CustomThemeConfigH%\x88\x01\x01\x12%\n\x04\x64\x61rk\x18= \x01(\x0b\x32\x12.CustomThemeConfigH&\x88\x01\x01\" \n\tBaseTheme\x12\t\n\x05LIGHT\x10\x00\x12\x08\n\x04\x44\x41RK\x10\x01\"6\n\nFontFamily\x12\x0e\n\nSANS_SERIF\x10\x00\x12\t\n\x05SERIF\x10\x01\x12\r\n\tMONOSPACE\x10\x02\x42\x0e\n\x0c_base_radiusB\x10\n\x0e_button_radiusB\x0f\n\r_border_colorB\x19\n\x17_dataframe_border_colorB\x15\n\x13_show_widget_borderB\r\n\x0b_link_colorB\x11\n\x0f_link_underlineB\x11\n\x0f_base_font_sizeB\x13\n\x11_base_font_weightB\x13\n\x11_code_font_weightB\x11\n\x0f_code_font_sizeB\x16\n\x14_show_sidebar_borderB\x12\n\x10_code_text_colorB\x18\n\x16_code_background_colorB$\n\"_dataframe_header_background_colorB\x0c\n\n_red_colorB\x0f\n\r_orange_colorB\x0f\n\r_yellow_colorB\r\n\x0b_blue_colorB\x0e\n\x0c_green_colorB\x0f\n\r_violet_colorB\r\n\x0b_gray_colorB\x17\n\x15_red_background_colorB\x1a\n\x18_orange_background_colorB\x1a\n\x18_yellow_background_colorB\x18\n\x16_blue_background_colorB\x19\n\x17_green_background_colorB\x1a\n\x18_violet_background_colorB\x18\n\x16_gray_background_colorB\x11\n\x0f_red_text_colorB\x14\n\x12_orange_text_colorB\x14\n\x12_yellow_text_colorB\x12\n\x10_blue_text_colorB\x13\n\x11_green_text_colorB\x14\n\x12_violet_text_colorB\x12\n\x10_gray_text_colorB\n\n\x08_sidebarB\x08\n\x06_lightB\x07\n\x05_dark\"w\n\x08\x46ontFace\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06\x66\x61mily\x18\x02 \x01(\t\x12\x12\n\x06weight\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x14\n\x0cweight_range\x18\x05 \x01(\t\x12\r\n\x05style\x18\x04 \x01(\t\x12\x15\n\runicode_range\x18\x06 \x01(\t\"5\n\nFontSource\x12\x13\n\x0b\x63onfig_name\x18\x01 \x01(\t\x12\x12\n\nsource_url\x18\x02 \x01(\t\"<\n\x05Radii\x12\x1a\n\x12\x62\x61se_widget_radius\x18\x01 \x01(\x05\x12\x17\n\x0f\x63heckbox_radius\x18\x02 \x01(\x05\"T\n\tFontSizes\x12\x16\n\x0etiny_font_size\x18\x01 \x01(\x05\x12\x17\n\x0fsmall_font_size\x18\x02 \x01(\x05\x12\x16\n\x0e\x62\x61se_font_size\x18\x03 \x01(\x05\"a\n\x08UserInfo\x12\x17\n\x0finstallation_id\x18\x01 \x01(\t\x12\x1a\n\x12installation_id_v3\x18\x05 \x01(\t\x12\x1a\n\x12installation_id_v4\x18\x06 \x01(\tJ\x04\x08\x02\x10\x03\"l\n\x0f\x45nvironmentInfo\x12\x19\n\x11streamlit_version\x18\x01 \x01(\t\x12\x16\n\x0epython_version\x18\x02 \x01(\t\x12\x11\n\tserver_os\x18\x03 \x01(\t\x12\x13\n\x0bhas_display\x18\x04 \x01(\x08\x42/\n\x1c\x63om.snowflake.apps.streamlitB\x0fNewSessionProtob\x06proto3')
20
20
 
21
21
  _globals = globals()
22
22
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -35,21 +35,21 @@ if not _descriptor._USE_C_DESCRIPTORS:
35
35
  _globals['_CONFIG_TOOLBARMODE']._serialized_start=800
36
36
  _globals['_CONFIG_TOOLBARMODE']._serialized_end=863
37
37
  _globals['_CUSTOMTHEMECONFIG']._serialized_start=872
38
- _globals['_CUSTOMTHEMECONFIG']._serialized_end=3626
39
- _globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_start=2739
40
- _globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_end=2771
41
- _globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_start=2773
42
- _globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_end=2827
43
- _globals['_FONTFACE']._serialized_start=3628
44
- _globals['_FONTFACE']._serialized_end=3747
45
- _globals['_FONTSOURCE']._serialized_start=3749
46
- _globals['_FONTSOURCE']._serialized_end=3802
47
- _globals['_RADII']._serialized_start=3804
48
- _globals['_RADII']._serialized_end=3864
49
- _globals['_FONTSIZES']._serialized_start=3866
50
- _globals['_FONTSIZES']._serialized_end=3950
51
- _globals['_USERINFO']._serialized_start=3952
52
- _globals['_USERINFO']._serialized_end=4049
53
- _globals['_ENVIRONMENTINFO']._serialized_start=4051
54
- _globals['_ENVIRONMENTINFO']._serialized_end=4159
38
+ _globals['_CUSTOMTHEMECONFIG']._serialized_end=3658
39
+ _globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_start=2771
40
+ _globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_end=2803
41
+ _globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_start=2805
42
+ _globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_end=2859
43
+ _globals['_FONTFACE']._serialized_start=3660
44
+ _globals['_FONTFACE']._serialized_end=3779
45
+ _globals['_FONTSOURCE']._serialized_start=3781
46
+ _globals['_FONTSOURCE']._serialized_end=3834
47
+ _globals['_RADII']._serialized_start=3836
48
+ _globals['_RADII']._serialized_end=3896
49
+ _globals['_FONTSIZES']._serialized_start=3898
50
+ _globals['_FONTSIZES']._serialized_end=3982
51
+ _globals['_USERINFO']._serialized_start=3984
52
+ _globals['_USERINFO']._serialized_end=4081
53
+ _globals['_ENVIRONMENTINFO']._serialized_start=4083
54
+ _globals['_ENVIRONMENTINFO']._serialized_end=4191
55
55
  # @@protoc_insertion_point(module_scope)