streamlit-nightly 1.45.2.dev20250616__py3-none-any.whl → 1.46.1.dev20250618__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.
- streamlit/commands/navigation.py +39 -5
- streamlit/commands/page_config.py +48 -20
- streamlit/components/types/base_custom_component.py +3 -0
- streamlit/components/v1/custom_component.py +2 -0
- streamlit/config.py +73 -33
- streamlit/dataframe_util.py +2 -3
- streamlit/elements/alert.py +36 -28
- streamlit/elements/arrow.py +1 -1
- streamlit/elements/code.py +23 -8
- streamlit/elements/deck_gl_json_chart.py +1 -1
- streamlit/elements/doc_string.py +8 -2
- streamlit/elements/exception.py +9 -7
- streamlit/elements/form.py +28 -0
- streamlit/elements/heading.py +34 -13
- streamlit/elements/json.py +8 -3
- streamlit/elements/layouts.py +69 -13
- streamlit/elements/lib/color_util.py +1 -1
- streamlit/elements/lib/image_utils.py +3 -5
- streamlit/elements/markdown.py +57 -24
- streamlit/elements/media.py +31 -24
- streamlit/elements/metric.py +11 -4
- streamlit/elements/plotly_chart.py +1 -1
- streamlit/elements/progress.py +9 -3
- streamlit/elements/spinner.py +11 -3
- streamlit/elements/text.py +12 -4
- streamlit/elements/vega_charts.py +1 -1
- streamlit/elements/widgets/audio_input.py +8 -3
- streamlit/elements/widgets/button.py +7 -6
- streamlit/elements/widgets/camera_input.py +9 -3
- streamlit/elements/widgets/chat.py +23 -11
- streamlit/elements/widgets/checkbox.py +24 -6
- streamlit/elements/widgets/color_picker.py +13 -4
- streamlit/elements/widgets/file_uploader.py +9 -3
- streamlit/elements/widgets/number_input.py +10 -2
- streamlit/elements/widgets/radio.py +12 -3
- streamlit/elements/widgets/select_slider.py +9 -3
- streamlit/elements/widgets/selectbox.py +9 -3
- streamlit/elements/widgets/slider.py +10 -2
- streamlit/elements/widgets/text_widgets.py +20 -4
- streamlit/elements/widgets/time_widgets.py +17 -10
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +12 -2
- streamlit/proto/PageConfig_pb2.py +5 -5
- streamlit/proto/PageConfig_pb2.pyi +16 -0
- streamlit/runtime/context.py +22 -1
- streamlit/runtime/state/query_params_proxy.py +2 -0
- streamlit/runtime/state/session_state.py +4 -2
- streamlit/runtime/uploaded_file_manager.py +3 -0
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +214 -214
- streamlit/static/static/js/{ErrorOutline.esm.BBFVdWjb.js → ErrorOutline.esm.BmIZNTls.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DvdwDAxp.js → FileDownload.esm.BANz7qEu.js} +1 -1
- streamlit/static/static/js/{FileHelper.CjU1Ef50.js → FileHelper.Bn_I1AoA.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CIb6LGNE.js → FormClearHelper.DngQDUHj.js} +1 -1
- streamlit/static/static/js/{Hooks.GJR4p5ub.js → Hooks.BvgTYyDl.js} +1 -1
- streamlit/static/static/js/{InputInstructions.nsoutNDU.js → InputInstructions.Dz68Mi4g.js} +1 -1
- streamlit/static/static/js/{ProgressBar.DqtkCWgY.js → ProgressBar.CBQ2YdYU.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CocQHyjY.js → RenderInPortalIfExists.DbNxALcQ.js} +1 -1
- streamlit/static/static/js/{Toolbar.UeCiz5bZ.js → Toolbar.Be9ReaBo.js} +1 -1
- streamlit/static/static/js/{base-input.ChMOqefY.js → base-input.CuYAUcgr.js} +1 -1
- streamlit/static/static/js/{checkbox.mFAkcYlJ.js → checkbox.CHeWw9QN.js} +1 -1
- streamlit/static/static/js/{createSuper.CWlw4uuT.js → createSuper.cbLRgPSA.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BRuPFGVT.js → data-grid-overlay-editor.BtDffWRm.js} +1 -1
- streamlit/static/static/js/{downloader.D-JZV5KC.js → downloader.CqSIsk34.js} +1 -1
- streamlit/static/static/js/{es6.8aYd2mZD.js → es6.Cf5x23Le.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.jbTJNegv.js → iframeResizer.contentWindow.w5G78o8J.js} +1 -1
- streamlit/static/static/js/{index.MuhC3L76.js → index.3x2ivJwf.js} +1 -1
- streamlit/static/static/js/{index.Bll2-rP6.js → index.BThEsAWi.js} +1 -1
- streamlit/static/static/js/{index.C-qKPIAc.js → index.BY9g96EZ.js} +1 -1
- streamlit/static/static/js/{index.45n3hxWl.js → index.BYMqFCBA.js} +1 -1
- streamlit/static/static/js/{index._beSUPH2.js → index.BbnvJ70n.js} +1 -1
- streamlit/static/static/js/{index.g86WIJtm.js → index.Bi464CyL.js} +1 -1
- streamlit/static/static/js/{index.D2DTU1aY.js → index.C0eW2K8y.js} +1 -1
- streamlit/static/static/js/{index.gcWbHnPE.js → index.CAbis03n.js} +1 -1
- streamlit/static/static/js/{index.DcylHZOn.js → index.CBOeW9a3.js} +1 -1
- streamlit/static/static/js/{index.CQG85lDO.js → index.CDPtgf1I.js} +1 -1
- streamlit/static/static/js/{index.BuwwBXlt.js → index.CI8kv2N4.js} +1 -1
- streamlit/static/static/js/{index.C5Jk6yHy.js → index.CIa-BnGt.js} +1 -1
- streamlit/static/static/js/{index.Dat8JgZf.js → index.CO4lsynG.js} +5 -5
- streamlit/static/static/js/{index.CeJjESM2.js → index.CPAaINBO.js} +1 -1
- streamlit/static/static/js/{index.BrZrTW9I.js → index.CPybvB14.js} +1 -1
- streamlit/static/static/js/{index.CwtQIKUg.js → index.CSmW4aEL.js} +1 -1
- streamlit/static/static/js/{index.RqdD1cln.js → index.CsbNNPg-.js} +1 -1
- streamlit/static/static/js/{index.B_K-sbDk.js → index.CvAxzLGy.js} +1 -1
- streamlit/static/static/js/{index.Cf2Ujw1i.js → index.D3RUL8hc.js} +1 -1
- streamlit/static/static/js/{index.CrLOSpGd.js → index.D7skVg6V.js} +1 -1
- streamlit/static/static/js/{index.ZJ-p6xZJ.js → index.D9cNUJxT.js} +1 -1
- streamlit/static/static/js/{index.BSBLj6fd.js → index.D9rP3sec.js} +2 -2
- streamlit/static/static/js/{index.Ddznlirl.js → index.DFb8oLEy.js} +1 -1
- streamlit/static/static/js/{index.CmYORNI1.js → index.DUFSCgUU.js} +1 -1
- streamlit/static/static/js/{index.D9LSzO5n.js → index.DhOEtnPS.js} +1 -1
- streamlit/static/static/js/{index.DlBss_D9.js → index.Dka0l3y3.js} +1 -1
- streamlit/static/static/js/{index.D6aDPgRk.js → index.DqUqQYLj.js} +1 -1
- streamlit/static/static/js/{index.EmgmixKr.js → index.Dve6LvwK.js} +1 -1
- streamlit/static/static/js/{index.5VmqWrFJ.js → index.E59z5B9V.js} +1 -1
- streamlit/static/static/js/{index.2vhUbWYE.js → index.HCf1LzCz.js} +1 -1
- streamlit/static/static/js/{index.CBxfNa4S.js → index.IFt67CpH.js} +1 -1
- streamlit/static/static/js/{index.D7n0aj1W.js → index.Mr8WFWji.js} +1 -1
- streamlit/static/static/js/{index.TEOqOk4H.js → index.OWQJmAOF.js} +1 -1
- streamlit/static/static/js/{index.B_IVL8xE.js → index.kZ6mI-nG.js} +1 -1
- streamlit/static/static/js/{index.B5CU57Qf.js → index.u9xbgcFq.js} +113 -114
- streamlit/static/static/js/{index.DiKxaWW9.js → index.vMjoJQjc.js} +1 -1
- streamlit/static/static/js/{index.DwGCBH5W.js → index.xUOdHmh_.js} +1 -1
- streamlit/static/static/js/{input.DXa_gBzj.js → input.CI-6PkTz.js} +1 -1
- streamlit/static/static/js/{memory.D5rOUj2Y.js → memory.C3s3Nr3T.js} +1 -1
- streamlit/static/static/js/{mergeWith.DSXoP_ea.js → mergeWith.BaIFtAzQ.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DOlAMQ4z.js → number-overlay-editor.DG_TIpZI.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.C8PlFdhp.js → possibleConstructorReturn.DnjFJxG8.js} +1 -1
- streamlit/static/static/js/{sandbox.Cbgzd0RE.js → sandbox.DkNGv8rg.js} +1 -1
- streamlit/static/static/js/{textarea.CwmJHkZd.js → textarea.Wdt3uXnP.js} +1 -1
- streamlit/static/static/js/{timepicker.D-HemJVg.js → timepicker.BEyYdc_Z.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.K58gdyL6.js → toConsumableArray.CAwuKyRj.js} +1 -1
- streamlit/static/static/js/{uniqueId.D6CfbZfn.js → uniqueId.-FDr5eeU.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.t6CdhaX9.js → useBasicWidgetState.DOr4_K__.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.D_GNOmUw.js → useOnInputChange.KHtPR_lb.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.DILaf-7C.js → withFullScreenWrapper.CJ_ynFQD.js} +1 -1
- streamlit/testing/v1/element_tree.py +3 -0
- streamlit/watcher/event_based_path_watcher.py +18 -13
- streamlit/web/server/oidc_mixin.py +0 -1
- {streamlit_nightly-1.45.2.dev20250616.dist-info → streamlit_nightly-1.46.1.dev20250618.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.2.dev20250616.dist-info → streamlit_nightly-1.46.1.dev20250618.dist-info}/RECORD +125 -125
- {streamlit_nightly-1.45.2.dev20250616.data → streamlit_nightly-1.46.1.dev20250618.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.2.dev20250616.dist-info → streamlit_nightly-1.46.1.dev20250618.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.45.2.dev20250616.dist-info → streamlit_nightly-1.46.1.dev20250618.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.2.dev20250616.dist-info → streamlit_nightly-1.46.1.dev20250618.dist-info}/top_level.txt +0 -0
@@ -47,12 +47,20 @@ class PageConfig(google.protobuf.message.Message):
|
|
47
47
|
"""Render page elements in a centered block, roughly 730px wide."""
|
48
48
|
WIDE: PageConfig._Layout.ValueType # 1
|
49
49
|
"""Use the full browser width to render elements."""
|
50
|
+
LAYOUT_UNSET: PageConfig._Layout.ValueType # 2
|
51
|
+
"""Unset distinguishes that config was not provided - on initial call, will
|
52
|
+
set to centered as default. Otherwise, inherit value from previous call
|
53
|
+
"""
|
50
54
|
|
51
55
|
class Layout(_Layout, metaclass=_LayoutEnumTypeWrapper): ...
|
52
56
|
CENTERED: PageConfig.Layout.ValueType # 0
|
53
57
|
"""Render page elements in a centered block, roughly 730px wide."""
|
54
58
|
WIDE: PageConfig.Layout.ValueType # 1
|
55
59
|
"""Use the full browser width to render elements."""
|
60
|
+
LAYOUT_UNSET: PageConfig.Layout.ValueType # 2
|
61
|
+
"""Unset distinguishes that config was not provided - on initial call, will
|
62
|
+
set to centered as default. Otherwise, inherit value from previous call
|
63
|
+
"""
|
56
64
|
|
57
65
|
class _SidebarState:
|
58
66
|
ValueType = typing.NewType("ValueType", builtins.int)
|
@@ -66,6 +74,10 @@ class PageConfig(google.protobuf.message.Message):
|
|
66
74
|
"""Force the sidebar to be shown."""
|
67
75
|
COLLAPSED: PageConfig._SidebarState.ValueType # 2
|
68
76
|
"""Force the sidebar to be hidden."""
|
77
|
+
SIDEBAR_UNSET: PageConfig._SidebarState.ValueType # 3
|
78
|
+
"""Unset distinguishes that config was not provided - on initial call, will
|
79
|
+
set to auto as default. Otherwise, inherit value from previous call
|
80
|
+
"""
|
69
81
|
|
70
82
|
class SidebarState(_SidebarState, metaclass=_SidebarStateEnumTypeWrapper): ...
|
71
83
|
AUTO: PageConfig.SidebarState.ValueType # 0
|
@@ -74,6 +86,10 @@ class PageConfig(google.protobuf.message.Message):
|
|
74
86
|
"""Force the sidebar to be shown."""
|
75
87
|
COLLAPSED: PageConfig.SidebarState.ValueType # 2
|
76
88
|
"""Force the sidebar to be hidden."""
|
89
|
+
SIDEBAR_UNSET: PageConfig.SidebarState.ValueType # 3
|
90
|
+
"""Unset distinguishes that config was not provided - on initial call, will
|
91
|
+
set to auto as default. Otherwise, inherit value from previous call
|
92
|
+
"""
|
77
93
|
|
78
94
|
@typing.final
|
79
95
|
class MenuItems(google.protobuf.message.Message):
|
streamlit/runtime/context.py
CHANGED
@@ -239,7 +239,28 @@ class ContextProxy:
|
|
239
239
|
@property
|
240
240
|
@gather_metrics("context.theme")
|
241
241
|
def theme(self) -> StreamlitTheme:
|
242
|
-
"""A read-only object containing information
|
242
|
+
"""A read-only, dictionary-like object containing theme information.
|
243
|
+
|
244
|
+
Theme information is restricted to the ``type`` of the theme (dark or
|
245
|
+
light) and is inferred from the background color of the app.
|
246
|
+
|
247
|
+
.. note::
|
248
|
+
Changes made to the background color through CSS are not included.
|
249
|
+
|
250
|
+
Attributes
|
251
|
+
----------
|
252
|
+
type : "light", "dark"
|
253
|
+
The theme type inferred from the background color of the app.
|
254
|
+
|
255
|
+
Example
|
256
|
+
-------
|
257
|
+
Access the theme type of the app:
|
258
|
+
|
259
|
+
>>> import streamlit as st
|
260
|
+
>>>
|
261
|
+
>>> st.write(f"The current theme type is {st.context.theme.type}.")
|
262
|
+
|
263
|
+
"""
|
243
264
|
ctx = get_script_run_ctx()
|
244
265
|
|
245
266
|
if ctx is None or ctx.context_info is None:
|
@@ -213,8 +213,10 @@ class QueryParamsProxy(MutableMapping[str, str]):
|
|
213
213
|
|
214
214
|
@staticmethod
|
215
215
|
def missing_key_error_message(key: str) -> str:
|
216
|
+
"""Returns a formatted error message for missing keys."""
|
216
217
|
return f'st.query_params has no key "{key}".'
|
217
218
|
|
218
219
|
@staticmethod
|
219
220
|
def missing_attr_error_message(key: str) -> str:
|
221
|
+
"""Returns a formatted error message for missing attributes."""
|
220
222
|
return f'st.query_params has no attribute "{key}".'
|
@@ -318,7 +318,7 @@ class KeyIdMapper:
|
|
318
318
|
self._key_id_mapping = key_id_mapping
|
319
319
|
self._id_key_mapping = {v: k for k, v in key_id_mapping.items()}
|
320
320
|
|
321
|
-
def get_id_from_key(self, key: str, default:
|
321
|
+
def get_id_from_key(self, key: str, default: str | None = None) -> str | None:
|
322
322
|
return self._key_id_mapping.get(key, default)
|
323
323
|
|
324
324
|
def get_key_from_id(self, widget_id: str) -> str:
|
@@ -670,7 +670,9 @@ class SessionState:
|
|
670
670
|
"""Turns a value that might be a widget id or a user provided key into
|
671
671
|
an appropriate widget id.
|
672
672
|
"""
|
673
|
-
|
673
|
+
# It's guaranteed that the key is a string since the default is string,
|
674
|
+
# so we can cast it to str here:
|
675
|
+
return cast("str", self._key_id_mapper.get_id_from_key(k, k))
|
674
676
|
|
675
677
|
def _set_key_widget_mapping(self, widget_id: str, user_key: str) -> None:
|
676
678
|
self._key_id_mapper[user_key] = widget_id
|
streamlit/static/index.html
CHANGED
@@ -37,7 +37,7 @@
|
|
37
37
|
<script>
|
38
38
|
window.prerenderReady = false
|
39
39
|
</script>
|
40
|
-
<script type="module" crossorigin src="./static/js/index.
|
40
|
+
<script type="module" crossorigin src="./static/js/index.u9xbgcFq.js"></script>
|
41
41
|
<link rel="stylesheet" crossorigin href="./static/css/index.CJVRHjQZ.css">
|
42
42
|
</head>
|
43
43
|
<body>
|