streamlit-nightly 1.45.2.dev20250603__py3-none-any.whl → 1.45.2.dev20250606__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 (95) hide show
  1. streamlit/config.py +48 -26
  2. streamlit/config_option.py +4 -2
  3. streamlit/elements/arrow.py +2 -4
  4. streamlit/elements/deck_gl_json_chart.py +1 -1
  5. streamlit/elements/heading.py +32 -0
  6. streamlit/elements/metric.py +11 -1
  7. streamlit/elements/plotly_chart.py +1 -1
  8. streamlit/elements/text.py +13 -1
  9. streamlit/elements/vega_charts.py +27 -2
  10. streamlit/elements/widgets/checkbox.py +23 -1
  11. streamlit/elements/widgets/color_picker.py +20 -1
  12. streamlit/file_util.py +14 -0
  13. streamlit/proto/ClientState_pb2.py +4 -4
  14. streamlit/proto/ClientState_pb2.pyi +7 -2
  15. streamlit/runtime/context.py +33 -1
  16. streamlit/static/index.html +1 -1
  17. streamlit/static/manifest.json +214 -214
  18. streamlit/static/static/js/{ErrorOutline.esm.Bfpjrj26.js → ErrorOutline.esm.BPlheRUg.js} +1 -1
  19. streamlit/static/static/js/{FileDownload.esm.9E906xp6.js → FileDownload.esm.DBPvJlIO.js} +1 -1
  20. streamlit/static/static/js/{FileHelper.BwJyAyYc.js → FileHelper.D7hqm1rs.js} +1 -1
  21. streamlit/static/static/js/{FormClearHelper.DKWfAZUz.js → FormClearHelper.CiuGPbiw.js} +1 -1
  22. streamlit/static/static/js/{Hooks.CLNEjW_X.js → Hooks.i-LEuQVS.js} +1 -1
  23. streamlit/static/static/js/{InputInstructions.DNGWQ-gb.js → InputInstructions.DiyV2lfI.js} +1 -1
  24. streamlit/static/static/js/{ProgressBar.vKQoChc9.js → ProgressBar.DsZbmX1F.js} +1 -1
  25. streamlit/static/static/js/{RenderInPortalIfExists.CNfKmzx_.js → RenderInPortalIfExists.BMEXbaG1.js} +1 -1
  26. streamlit/static/static/js/{Toolbar.DBzS4M8S.js → Toolbar.DOqF9PKk.js} +1 -1
  27. streamlit/static/static/js/{base-input.DVJiuxd7.js → base-input.BYC-_bsx.js} +1 -1
  28. streamlit/static/static/js/{checkbox.9jCcLfk1.js → checkbox.DnegvBUn.js} +1 -1
  29. streamlit/static/static/js/{createSuper.BUXBPPVF.js → createSuper.Dcf6Du3v.js} +1 -1
  30. streamlit/static/static/js/{data-grid-overlay-editor.1uYlocVl.js → data-grid-overlay-editor.ODa6iMNd.js} +1 -1
  31. streamlit/static/static/js/{downloader.D_vX5B4c.js → downloader.CUFbUoPx.js} +1 -1
  32. streamlit/static/static/js/{es6.D66Htlyt.js → es6.BX8MS_9G.js} +2 -2
  33. streamlit/static/static/js/{iframeResizer.contentWindow.CbjlJ-ZT.js → iframeResizer.contentWindow.Bu7_8x8S.js} +1 -1
  34. streamlit/static/static/js/{index.CVhW1v0o.js → index.-reZVx4t.js} +1 -1
  35. streamlit/static/static/js/{index.D6XZzpGR.js → index.1wqJoatM.js} +1 -1
  36. streamlit/static/static/js/{index.DbQkXMqm.js → index.5kO-eVzI.js} +1 -1
  37. streamlit/static/static/js/{index.CArGRXiE.js → index.6U8xZd9t.js} +1 -1
  38. streamlit/static/static/js/{index.D1p_pkNQ.js → index.BRC4CPJr.js} +1 -1
  39. streamlit/static/static/js/{index.CrRSt6hY.js → index.BSLU45nm.js} +1 -1
  40. streamlit/static/static/js/{index.CWWKttXO.js → index.BSvv4neZ.js} +25 -25
  41. streamlit/static/static/js/{index.DqyaQf-I.js → index.BTofb2AK.js} +1 -1
  42. streamlit/static/static/js/{index.x8hBWtG-.js → index.BaPm_YQ4.js} +1 -1
  43. streamlit/static/static/js/{index.Y17NfsOc.js → index.Bf7OiFUq.js} +1 -1
  44. streamlit/static/static/js/{index.DTCFiAIJ.js → index.BpQQaYsH.js} +1 -1
  45. streamlit/static/static/js/{index.z1G-ZB5x.js → index.C1Ax3fWo.js} +1 -1
  46. streamlit/static/static/js/{index.CC40gtzv.js → index.C35iYNLZ.js} +1 -1
  47. streamlit/static/static/js/{index.CBi2jDww.js → index.C5MN-1yU.js} +1 -1
  48. streamlit/static/static/js/{index.CRA-UpDd.js → index.CF1yxAvR.js} +1 -1
  49. streamlit/static/static/js/{index.Ctkgfv3A.js → index.CF6QAdiF.js} +1 -1
  50. streamlit/static/static/js/{index.CqZpIMf8.js → index.CfYt2tbH.js} +1 -1
  51. streamlit/static/static/js/{index.D62CRVd4.js → index.ChqQHZSD.js} +1 -1
  52. streamlit/static/static/js/{index.BT2fVI4G.js → index.ClhWXWt6.js} +1 -1
  53. streamlit/static/static/js/{index.DTAPCqI1.js → index.Ctp7gmwv.js} +1 -1
  54. streamlit/static/static/js/{index.aN5Zhf0G.js → index.CxgTbOOW.js} +1 -1
  55. streamlit/static/static/js/{index.lmQsI-4I.js → index.CzjTnGFD.js} +1 -1
  56. streamlit/static/static/js/{index.CaBeVtRC.js → index.D3prumL7.js} +1 -1
  57. streamlit/static/static/js/{index.ChqUQN4w.js → index.D45QkWY6.js} +1 -1
  58. streamlit/static/static/js/{index.CI_GvMLr.js → index.D9XODeBi.js} +1 -1
  59. streamlit/static/static/js/{index.CoO6bBXd.js → index.DK6Kov-Y.js} +1 -1
  60. streamlit/static/static/js/{index.Pf0PG6vt.js → index.DT_2un9f.js} +1 -1
  61. streamlit/static/static/js/{index.CcHSyqu5.js → index.DZvJRRXE.js} +5 -5
  62. streamlit/static/static/js/{index.CXqiaLYQ.js → index.DoOOYKo6.js} +1 -1
  63. streamlit/static/static/js/{index.D56Yebl4.js → index.Dupfq6Y_.js} +1 -1
  64. streamlit/static/static/js/{index.D9IbqIW2.js → index.HnTahnXx.js} +81 -81
  65. streamlit/static/static/js/{index.BD7305Ja.js → index.UEvOImwt.js} +1 -1
  66. streamlit/static/static/js/{index.BCiMep4f.js → index.cClaHld2.js} +1 -1
  67. streamlit/static/static/js/{index.D5sEFtBw.js → index.htD_aLlM.js} +1 -1
  68. streamlit/static/static/js/{index.CjxQTNo9.js → index.kmRXFfH8.js} +1 -1
  69. streamlit/static/static/js/{index.PIsOTOZY.js → index.pJ5b-MCg.js} +1 -1
  70. streamlit/static/static/js/{index.uLSJ03Gr.js → index.x6To5k1N.js} +1 -1
  71. streamlit/static/static/js/{input.Bks1hFtu.js → input.BbTx2QYD.js} +1 -1
  72. streamlit/static/static/js/{memory.z8o1B_Bu.js → memory.B6iT9_rU.js} +1 -1
  73. streamlit/static/static/js/{mergeWith.BPxInS7m.js → mergeWith.DixCnRNB.js} +1 -1
  74. streamlit/static/static/js/{number-overlay-editor.BjNP-2bT.js → number-overlay-editor.Q7y8nwGm.js} +1 -1
  75. streamlit/static/static/js/{possibleConstructorReturn.C5FVGa4d.js → possibleConstructorReturn.BIBtSx1r.js} +1 -1
  76. streamlit/static/static/js/{sandbox.B2_OndT9.js → sandbox.C2ZPzr_l.js} +1 -1
  77. streamlit/static/static/js/{textarea.CvF1PhB-.js → textarea.BMQ_ba_z.js} +1 -1
  78. streamlit/static/static/js/{timepicker.6rOtmECx.js → timepicker.dDYgD4FB.js} +1 -1
  79. streamlit/static/static/js/{toConsumableArray.CyqA4EsF.js → toConsumableArray.D25TFALF.js} +1 -1
  80. streamlit/static/static/js/{uniqueId.Dcl-0nrj.js → uniqueId.D0Y_FD3n.js} +1 -1
  81. streamlit/static/static/js/{useBasicWidgetState.BAsbqija.js → useBasicWidgetState.mCO15TrK.js} +1 -1
  82. streamlit/static/static/js/{useOnInputChange.DXwGoRDu.js → useOnInputChange.D2L-eHJs.js} +1 -1
  83. streamlit/static/static/js/{withFullScreenWrapper.JDv1yXh0.js → withFullScreenWrapper.D8Fqz3rF.js} +1 -1
  84. streamlit/util.py +24 -0
  85. streamlit/web/bootstrap.py +2 -2
  86. streamlit/web/cli.py +8 -5
  87. streamlit/web/server/server.py +0 -12
  88. streamlit/web/server/server_util.py +1 -1
  89. {streamlit_nightly-1.45.2.dev20250603.dist-info → streamlit_nightly-1.45.2.dev20250606.dist-info}/METADATA +1 -1
  90. {streamlit_nightly-1.45.2.dev20250603.dist-info → streamlit_nightly-1.45.2.dev20250606.dist-info}/RECORD +94 -95
  91. streamlit/elements/lib/event_utils.py +0 -39
  92. {streamlit_nightly-1.45.2.dev20250603.data → streamlit_nightly-1.45.2.dev20250606.data}/scripts/streamlit.cmd +0 -0
  93. {streamlit_nightly-1.45.2.dev20250603.dist-info → streamlit_nightly-1.45.2.dev20250606.dist-info}/WHEEL +0 -0
  94. {streamlit_nightly-1.45.2.dev20250603.dist-info → streamlit_nightly-1.45.2.dev20250606.dist-info}/entry_points.txt +0 -0
  95. {streamlit_nightly-1.45.2.dev20250603.dist-info → streamlit_nightly-1.45.2.dev20250606.dist-info}/top_level.txt +0 -0
@@ -20,6 +20,11 @@ from textwrap import dedent
20
20
  from typing import TYPE_CHECKING, cast
21
21
 
22
22
  from streamlit.elements.lib.form_utils import current_form_id
23
+ from streamlit.elements.lib.layout_utils import (
24
+ LayoutConfig,
25
+ Width,
26
+ validate_width,
27
+ )
23
28
  from streamlit.elements.lib.policies import (
24
29
  check_widget_policies,
25
30
  maybe_raise_label_warnings,
@@ -71,6 +76,7 @@ class ColorPickerMixin:
71
76
  *, # keyword-only arguments:
72
77
  disabled: bool = False,
73
78
  label_visibility: LabelVisibility = "visible",
79
+ width: Width = "content",
74
80
  ) -> str:
75
81
  r"""Display a color picker widget.
76
82
 
@@ -136,6 +142,11 @@ class ColorPickerMixin:
136
142
  label, which can help keep the widget aligned with other widgets.
137
143
  If this is ``"collapsed"``, Streamlit displays no label or spacer.
138
144
 
145
+ width : int or "stretch" or "content"
146
+ The width of the color picker. Can be an integer (pixels),
147
+ "stretch" to use the full width of the container, or "content"
148
+ (default) to size based on the content.
149
+
139
150
  Returns
140
151
  -------
141
152
  str
@@ -164,6 +175,7 @@ class ColorPickerMixin:
164
175
  kwargs=kwargs,
165
176
  disabled=disabled,
166
177
  label_visibility=label_visibility,
178
+ width=width,
167
179
  ctx=ctx,
168
180
  )
169
181
 
@@ -179,6 +191,7 @@ class ColorPickerMixin:
179
191
  *, # keyword-only arguments:
180
192
  disabled: bool = False,
181
193
  label_visibility: LabelVisibility = "visible",
194
+ width: Width = "content",
182
195
  ctx: ScriptRunContext | None = None,
183
196
  ) -> str:
184
197
  key = to_key(key)
@@ -191,6 +204,9 @@ class ColorPickerMixin:
191
204
  )
192
205
  maybe_raise_label_warnings(label, label_visibility)
193
206
 
207
+ validate_width(width, allow_content=True)
208
+ layout_config = LayoutConfig(width=width)
209
+
194
210
  element_id = compute_and_register_element_id(
195
211
  "color_picker",
196
212
  user_key=key,
@@ -199,6 +215,7 @@ class ColorPickerMixin:
199
215
  label=label,
200
216
  value=str(value),
201
217
  help=help,
218
+ width=width,
202
219
  )
203
220
 
204
221
  # set value default
@@ -251,7 +268,9 @@ like '#00FFAA' or '#000'.
251
268
  color_picker_proto.value = widget_state.value
252
269
  color_picker_proto.set_value = True
253
270
 
254
- self.dg._enqueue("color_picker", color_picker_proto)
271
+ self.dg._enqueue(
272
+ "color_picker", color_picker_proto, layout_config=layout_config
273
+ )
255
274
  return widget_state.value
256
275
 
257
276
  @property
streamlit/file_util.py CHANGED
@@ -156,6 +156,20 @@ def get_project_streamlit_file_path(*filepath: str) -> str:
156
156
  return str(Path.cwd() / CONFIG_FOLDER_NAME / Path(*filepath))
157
157
 
158
158
 
159
+ def get_main_script_streamlit_file_path(main_script_path: str, filename: str) -> str:
160
+ """Return the full path to a file in the .streamlit folder relative to the
161
+ main script's path.
162
+
163
+ This doesn't guarantee that the file (or its directory) exists.
164
+ """
165
+
166
+ return str(
167
+ Path(os.path.abspath(os.path.dirname(main_script_path)))
168
+ / CONFIG_FOLDER_NAME
169
+ / filename
170
+ )
171
+
172
+
159
173
  def file_is_in_folder_glob(filepath: str, folderpath_glob: str) -> bool:
160
174
  """Test whether a file is in some folder with globbing support.
161
175
 
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
15
15
  from streamlit.proto import WidgetStates_pb2 as streamlit_dot_proto_dot_WidgetStates__pb2
16
16
 
17
17
 
18
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/ClientState.proto\x1a\"streamlit/proto/WidgetStates.proto\"\xc7\x01\n\x0b\x43ontextInfo\x12\x15\n\x08timezone\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0ftimezone_offset\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x13\n\x06locale\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x03url\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0bis_embedded\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\x0b\n\t_timezoneB\x12\n\x10_timezone_offsetB\t\n\x07_localeB\x06\n\x04_urlB\x0e\n\x0c_is_embedded\"\xe5\x01\n\x0b\x43lientState\x12\x14\n\x0cquery_string\x18\x01 \x01(\t\x12$\n\rwidget_states\x18\x02 \x01(\x0b\x32\r.WidgetStates\x12\x18\n\x10page_script_hash\x18\x03 \x01(\t\x12\x11\n\tpage_name\x18\x04 \x01(\t\x12\x13\n\x0b\x66ragment_id\x18\x05 \x01(\t\x12\x15\n\ris_auto_rerun\x18\x06 \x01(\x08\x12\x1d\n\x15\x63\x61\x63hed_message_hashes\x18\x07 \x03(\t\x12\"\n\x0c\x63ontext_info\x18\x08 \x01(\x0b\x32\x0c.ContextInfoB0\n\x1c\x63om.snowflake.apps.streamlitB\x10\x43lientStateProtob\x06proto3')
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/ClientState.proto\x1a\"streamlit/proto/WidgetStates.proto\"\xf3\x01\n\x0b\x43ontextInfo\x12\x15\n\x08timezone\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0ftimezone_offset\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x13\n\x06locale\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x03url\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0bis_embedded\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x19\n\x0c\x63olor_scheme\x18\x06 \x01(\tH\x05\x88\x01\x01\x42\x0b\n\t_timezoneB\x12\n\x10_timezone_offsetB\t\n\x07_localeB\x06\n\x04_urlB\x0e\n\x0c_is_embeddedB\x0f\n\r_color_scheme\"\xe5\x01\n\x0b\x43lientState\x12\x14\n\x0cquery_string\x18\x01 \x01(\t\x12$\n\rwidget_states\x18\x02 \x01(\x0b\x32\r.WidgetStates\x12\x18\n\x10page_script_hash\x18\x03 \x01(\t\x12\x11\n\tpage_name\x18\x04 \x01(\t\x12\x13\n\x0b\x66ragment_id\x18\x05 \x01(\t\x12\x15\n\ris_auto_rerun\x18\x06 \x01(\x08\x12\x1d\n\x15\x63\x61\x63hed_message_hashes\x18\x07 \x03(\t\x12\"\n\x0c\x63ontext_info\x18\x08 \x01(\x0b\x32\x0c.ContextInfoB0\n\x1c\x63om.snowflake.apps.streamlitB\x10\x43lientStateProtob\x06proto3')
19
19
 
20
20
  _globals = globals()
21
21
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -24,7 +24,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
24
24
  _globals['DESCRIPTOR']._loaded_options = None
25
25
  _globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020ClientStateProto'
26
26
  _globals['_CONTEXTINFO']._serialized_start=74
27
- _globals['_CONTEXTINFO']._serialized_end=273
28
- _globals['_CLIENTSTATE']._serialized_start=276
29
- _globals['_CLIENTSTATE']._serialized_end=505
27
+ _globals['_CONTEXTINFO']._serialized_end=317
28
+ _globals['_CLIENTSTATE']._serialized_start=320
29
+ _globals['_CLIENTSTATE']._serialized_end=549
30
30
  # @@protoc_insertion_point(module_scope)
@@ -36,11 +36,13 @@ class ContextInfo(google.protobuf.message.Message):
36
36
  LOCALE_FIELD_NUMBER: builtins.int
37
37
  URL_FIELD_NUMBER: builtins.int
38
38
  IS_EMBEDDED_FIELD_NUMBER: builtins.int
39
+ COLOR_SCHEME_FIELD_NUMBER: builtins.int
39
40
  timezone: builtins.str
40
41
  timezone_offset: builtins.int
41
42
  locale: builtins.str
42
43
  url: builtins.str
43
44
  is_embedded: builtins.bool
45
+ color_scheme: builtins.str
44
46
  def __init__(
45
47
  self,
46
48
  *,
@@ -49,9 +51,12 @@ class ContextInfo(google.protobuf.message.Message):
49
51
  locale: builtins.str | None = ...,
50
52
  url: builtins.str | None = ...,
51
53
  is_embedded: builtins.bool | None = ...,
54
+ color_scheme: builtins.str | None = ...,
52
55
  ) -> None: ...
53
- def HasField(self, field_name: typing.Literal["_is_embedded", b"_is_embedded", "_locale", b"_locale", "_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "_url", b"_url", "is_embedded", b"is_embedded", "locale", b"locale", "timezone", b"timezone", "timezone_offset", b"timezone_offset", "url", b"url"]) -> builtins.bool: ...
54
- def ClearField(self, field_name: typing.Literal["_is_embedded", b"_is_embedded", "_locale", b"_locale", "_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "_url", b"_url", "is_embedded", b"is_embedded", "locale", b"locale", "timezone", b"timezone", "timezone_offset", b"timezone_offset", "url", b"url"]) -> None: ...
56
+ def HasField(self, field_name: typing.Literal["_color_scheme", b"_color_scheme", "_is_embedded", b"_is_embedded", "_locale", b"_locale", "_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "_url", b"_url", "color_scheme", b"color_scheme", "is_embedded", b"is_embedded", "locale", b"locale", "timezone", b"timezone", "timezone_offset", b"timezone_offset", "url", b"url"]) -> builtins.bool: ...
57
+ def ClearField(self, field_name: typing.Literal["_color_scheme", b"_color_scheme", "_is_embedded", b"_is_embedded", "_locale", b"_locale", "_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "_url", b"_url", "color_scheme", b"color_scheme", "is_embedded", b"is_embedded", "locale", b"locale", "timezone", b"timezone", "timezone_offset", b"timezone_offset", "url", b"url"]) -> None: ...
58
+ @typing.overload
59
+ def WhichOneof(self, oneof_group: typing.Literal["_color_scheme", b"_color_scheme"]) -> typing.Literal["color_scheme"] | None: ...
55
60
  @typing.overload
56
61
  def WhichOneof(self, oneof_group: typing.Literal["_is_embedded", b"_is_embedded"]) -> typing.Literal["is_embedded"] | None: ...
57
62
  @typing.overload
@@ -17,12 +17,13 @@ from __future__ import annotations
17
17
  from collections.abc import Iterable, Iterator, Mapping
18
18
  from functools import lru_cache
19
19
  from types import MappingProxyType
20
- from typing import TYPE_CHECKING, Any, cast
20
+ from typing import TYPE_CHECKING, Any, Literal, cast
21
21
 
22
22
  from streamlit import runtime
23
23
  from streamlit.runtime.context_util import maybe_add_page_path, maybe_trim_page_path
24
24
  from streamlit.runtime.metrics_util import gather_metrics
25
25
  from streamlit.runtime.scriptrunner_utils.script_run_context import get_script_run_ctx
26
+ from streamlit.util import AttributeDictionary
26
27
 
27
28
  if TYPE_CHECKING:
28
29
  from http.cookies import Morsel
@@ -63,6 +64,26 @@ def _normalize_header(name: str) -> str:
63
64
  return "-".join(w.capitalize() for w in name.split("-"))
64
65
 
65
66
 
67
+ class StreamlitTheme(AttributeDictionary):
68
+ """A dictionary-like object containing theme information.
69
+
70
+ This class extends the functionality of a standard dictionary to allow items
71
+ to be accessed via attribute-style dot notation in addition to the traditional
72
+ key-based access. If a dictionary item is accessed and is itself a dictionary,
73
+ it is automatically wrapped in another `AttributeDictionary`, enabling recursive
74
+ attribute-style access.
75
+ """
76
+
77
+ type: Literal["dark", "light"] | None
78
+
79
+ def __init__(self, theme_info: dict[str, str | None]):
80
+ super().__init__(theme_info)
81
+
82
+ @classmethod
83
+ def from_context_info(cls, context_dict: dict[str, str | None]) -> StreamlitTheme:
84
+ return cls(context_dict)
85
+
86
+
66
87
  class StreamlitHeaders(Mapping[str, str]):
67
88
  def __init__(self, headers: Iterable[tuple[str, str]]) -> None:
68
89
  dict_like_headers: dict[str, list[str]] = {}
@@ -215,6 +236,17 @@ class ContextProxy:
215
236
  cookies = session_client_request.cookies
216
237
  return StreamlitCookies.from_tornado_cookies(cookies)
217
238
 
239
+ @property
240
+ @gather_metrics("context.theme")
241
+ def theme(self) -> StreamlitTheme:
242
+ """A read-only object containing information about the current Streamlit app theme."""
243
+ ctx = get_script_run_ctx()
244
+
245
+ if ctx is None or ctx.context_info is None:
246
+ return StreamlitTheme({"type": None})
247
+
248
+ return StreamlitTheme.from_context_info({"type": ctx.context_info.color_scheme})
249
+
218
250
  @property
219
251
  @gather_metrics("context.timezone")
220
252
  def timezone(self) -> str | None:
@@ -51,7 +51,7 @@
51
51
  <script>
52
52
  window.prerenderReady = false
53
53
  </script>
54
- <script type="module" crossorigin src="./static/js/index.D9IbqIW2.js"></script>
54
+ <script type="module" crossorigin src="./static/js/index.HnTahnXx.js"></script>
55
55
  <link rel="stylesheet" crossorigin href="./static/css/index.C6rq3aMZ.css">
56
56
  </head>
57
57
  <body>