streamlit-nightly 1.45.2.dev20250606__py3-none-any.whl → 1.45.2.dev20250609__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/execution_control.py +1 -0
- streamlit/elements/code.py +2 -2
- streamlit/elements/lib/pandas_styler_utils.py +9 -1
- streamlit/elements/map.py +5 -25
- streamlit/runtime/scriptrunner/script_runner.py +2 -0
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +218 -218
- streamlit/static/static/js/{ErrorOutline.esm.BPlheRUg.js → ErrorOutline.esm.DPSvnAZl.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DBPvJlIO.js → FileDownload.esm.Dq4gf5Ma.js} +1 -1
- streamlit/static/static/js/{FileHelper.D7hqm1rs.js → FileHelper.CGlOwDmI.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CiuGPbiw.js → FormClearHelper.Bzr0lxz8.js} +1 -1
- streamlit/static/static/js/{Hooks.i-LEuQVS.js → Hooks.XjcePFDz.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DiyV2lfI.js → InputInstructions.B4r5deJK.js} +1 -1
- streamlit/static/static/js/{ProgressBar.DsZbmX1F.js → ProgressBar.BpLfvKEk.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.BMEXbaG1.js → RenderInPortalIfExists.s9TJxze4.js} +1 -1
- streamlit/static/static/js/{Toolbar.DOqF9PKk.js → Toolbar.CpN1Y8Ph.js} +1 -1
- streamlit/static/static/js/{base-input.BYC-_bsx.js → base-input.BJ4xTy-v.js} +1 -1
- streamlit/static/static/js/{checkbox.DnegvBUn.js → checkbox.DE-YA6Ye.js} +1 -1
- streamlit/static/static/js/{createSuper.Dcf6Du3v.js → createSuper.HyIBMcPl.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.ODa6iMNd.js → data-grid-overlay-editor.BmMK_3hp.js} +1 -1
- streamlit/static/static/js/{downloader.CUFbUoPx.js → downloader.Cx_bgHAi.js} +1 -1
- streamlit/static/static/js/{es6.BX8MS_9G.js → es6.CQlJWXgz.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.Bu7_8x8S.js → iframeResizer.contentWindow.YSe-ULR9.js} +1 -1
- streamlit/static/static/js/{index.D9XODeBi.js → index.2tjJrlKf.js} +1 -1
- streamlit/static/static/js/{index.6U8xZd9t.js → index.4DOWGwr3.js} +1 -1
- streamlit/static/static/js/{index.C1Ax3fWo.js → index.B4zNurye.js} +1 -1
- streamlit/static/static/js/{index.D3prumL7.js → index.BF7WGy0A.js} +1 -1
- streamlit/static/static/js/{index.Ctp7gmwv.js → index.BJrS5MAH.js} +1 -1
- streamlit/static/static/js/{index.BTofb2AK.js → index.BPnusRc_.js} +1 -1
- streamlit/static/static/js/{index.DZvJRRXE.js → index.BXcwjtgF.js} +6 -6
- streamlit/static/static/js/{index.CxgTbOOW.js → index.B_FFd4-h.js} +1 -1
- streamlit/static/static/js/{index.ClhWXWt6.js → index.Br_6W7Ok.js} +1 -1
- streamlit/static/static/js/{index.BSvv4neZ.js → index.Brb2rwe5.js} +1 -1
- streamlit/static/static/js/{index.UEvOImwt.js → index.Bu00INAj.js} +1 -1
- streamlit/static/static/js/{index.DT_2un9f.js → index.C-vuyKHe.js} +12 -12
- streamlit/static/static/js/{index.BSLU45nm.js → index.C4K_J-xT.js} +1 -1
- streamlit/static/static/js/{index.DoOOYKo6.js → index.CRqlHLrY.js} +1 -1
- streamlit/static/static/js/{index.CfYt2tbH.js → index.CW7dpSHW.js} +1 -1
- streamlit/static/static/js/{index.5kO-eVzI.js → index.CYOKgsAX.js} +1 -1
- streamlit/static/static/js/{index.BRC4CPJr.js → index.C_c8e-5A.js} +1 -1
- streamlit/static/static/js/{index.CzjTnGFD.js → index.CcXxnSCT.js} +1 -1
- streamlit/static/static/js/{index.cClaHld2.js → index.Ch9d9jgn.js} +1 -1
- streamlit/static/static/js/{index.BaPm_YQ4.js → index.Cp05GLXV.js} +1 -1
- streamlit/static/static/js/{index.DK6Kov-Y.js → index.Cpqc7tRy.js} +1 -1
- streamlit/static/static/js/{index.Dupfq6Y_.js → index.CuDJY4WR.js} +1 -1
- streamlit/static/static/js/{index.BpQQaYsH.js → index.CxRHV8UN.js} +1 -1
- streamlit/static/static/js/{index.ChqQHZSD.js → index.CzBLcg5Y.js} +1 -1
- streamlit/static/static/js/{index.Bf7OiFUq.js → index.DHK750uA.js} +1 -1
- streamlit/static/static/js/{index.CF1yxAvR.js → index.DK0XGBKq.js} +1 -1
- streamlit/static/static/js/{index.C35iYNLZ.js → index.DKGPAEFz.js} +20 -20
- streamlit/static/static/js/{index.HnTahnXx.js → index.DT7-7fMk.js} +11 -11
- streamlit/static/static/js/{index.kmRXFfH8.js → index.Dn_0PWc5.js} +1 -1
- streamlit/static/static/js/{index.htD_aLlM.js → index.DtG6Z3MJ.js} +1 -1
- streamlit/static/static/js/{index.1wqJoatM.js → index.DwQ4wXWh.js} +1 -1
- streamlit/static/static/js/{index.D45QkWY6.js → index.DxpoRtMm.js} +1 -1
- streamlit/static/static/js/{index.C5MN-1yU.js → index.ErO4BalD.js} +1 -1
- streamlit/static/static/js/{index.pJ5b-MCg.js → index.SdjZDfiz.js} +1 -1
- streamlit/static/static/js/{index.x6To5k1N.js → index.TltPE7XP.js} +1 -1
- streamlit/static/static/js/{index.-reZVx4t.js → index.bnbHIlia.js} +1 -1
- streamlit/static/static/js/{index.CF6QAdiF.js → index.paoSwA79.js} +1 -1
- streamlit/static/static/js/{input.BbTx2QYD.js → input.aAklmoZJ.js} +1 -1
- streamlit/static/static/js/{memory.B6iT9_rU.js → memory.2F8FWva7.js} +1 -1
- streamlit/static/static/js/{mergeWith.DixCnRNB.js → mergeWith.Y1UWKEuM.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Q7y8nwGm.js → number-overlay-editor.Bje9ferA.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BIBtSx1r.js → possibleConstructorReturn.CFo__Sc1.js} +1 -1
- streamlit/static/static/js/{sandbox.C2ZPzr_l.js → sandbox.CXYFQ0n9.js} +1 -1
- streamlit/static/static/js/{textarea.BMQ_ba_z.js → textarea.CpyUweiS.js} +1 -1
- streamlit/static/static/js/{timepicker.dDYgD4FB.js → timepicker.DGJQS8FC.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.D25TFALF.js → toConsumableArray.Coqsx-A_.js} +1 -1
- streamlit/static/static/js/{uniqueId.D0Y_FD3n.js → uniqueId.YqFJqzby.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.mCO15TrK.js → useBasicWidgetState.DmT-fPrJ.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.D2L-eHJs.js → useOnInputChange.ahkIk-J7.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.D8Fqz3rF.js → withFullScreenWrapper.CQYaVcKq.js} +1 -1
- streamlit/watcher/local_sources_watcher.py +11 -3
- {streamlit_nightly-1.45.2.dev20250606.dist-info → streamlit_nightly-1.45.2.dev20250609.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.2.dev20250606.dist-info → streamlit_nightly-1.45.2.dev20250609.dist-info}/RECORD +80 -80
- {streamlit_nightly-1.45.2.dev20250606.data → streamlit_nightly-1.45.2.dev20250609.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.2.dev20250606.dist-info → streamlit_nightly-1.45.2.dev20250609.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.45.2.dev20250606.dist-info → streamlit_nightly-1.45.2.dev20250609.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.2.dev20250606.dist-info → streamlit_nightly-1.45.2.dev20250609.dist-info}/top_level.txt +0 -0
@@ -236,6 +236,7 @@ def switch_page(page: str | Path | StreamlitPage) -> NoReturn: # type: ignore[m
|
|
236
236
|
query_string=ctx.query_string,
|
237
237
|
page_script_hash=page_script_hash,
|
238
238
|
cached_message_hashes=ctx.cached_message_hashes,
|
239
|
+
context_info=ctx.context_info,
|
239
240
|
)
|
240
241
|
)
|
241
242
|
# Force a yield point so the runner can do the rerun
|
streamlit/elements/code.py
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
+
import re
|
17
18
|
from typing import TYPE_CHECKING, cast
|
18
19
|
|
19
20
|
from streamlit.elements.lib.layout_utils import (
|
@@ -25,7 +26,6 @@ from streamlit.elements.lib.layout_utils import (
|
|
25
26
|
)
|
26
27
|
from streamlit.proto.Code_pb2 import Code as CodeProto
|
27
28
|
from streamlit.runtime.metrics_util import gather_metrics
|
28
|
-
from streamlit.string_util import clean_text
|
29
29
|
|
30
30
|
if TYPE_CHECKING:
|
31
31
|
from streamlit.delta_generator import DeltaGenerator
|
@@ -113,7 +113,7 @@ class CodeMixin:
|
|
113
113
|
height: 380px
|
114
114
|
"""
|
115
115
|
code_proto = CodeProto()
|
116
|
-
code_proto.code_text =
|
116
|
+
code_proto.code_text = re.sub(r"\n\Z", "", re.sub(r"\A\n", "", str(body)))
|
117
117
|
code_proto.language = language or "plaintext"
|
118
118
|
code_proto.show_line_numbers = line_numbers
|
119
119
|
code_proto.wrap_lines = wrap_lines
|
@@ -26,6 +26,8 @@ if TYPE_CHECKING:
|
|
26
26
|
|
27
27
|
from streamlit.proto.Arrow_pb2 import Arrow as ArrowProto
|
28
28
|
|
29
|
+
from enum import Enum
|
30
|
+
|
29
31
|
|
30
32
|
def marshall_styler(proto: ArrowProto, styler: Styler, default_uuid: str) -> None:
|
31
33
|
"""Marshall pandas.Styler into an Arrow proto.
|
@@ -265,6 +267,12 @@ def _use_display_values(df: DataFrame, styles: Mapping[str, Any]) -> DataFrame:
|
|
265
267
|
for cell in row:
|
266
268
|
if "id" in cell and (match := cell_selector_regex.match(cell["id"])):
|
267
269
|
r, c = map(int, match.groups())
|
268
|
-
|
270
|
+
# Check if the display value is an Enum type. Enum values need to be
|
271
|
+
# converted to their `.value` attribute to ensure proper serialization
|
272
|
+
# and display logic.
|
273
|
+
if isinstance(cell["display_value"], Enum):
|
274
|
+
new_df.iloc[r, c] = str(cell["display_value"].value)
|
275
|
+
else:
|
276
|
+
new_df.iloc[r, c] = str(cell["display_value"])
|
269
277
|
|
270
278
|
return new_df
|
streamlit/elements/map.py
CHANGED
@@ -230,23 +230,8 @@ class MapMixin:
|
|
230
230
|
height: 600px
|
231
231
|
|
232
232
|
"""
|
233
|
-
# This feature was turned off while we investigate why different
|
234
|
-
# map styles cause DeckGL to crash.
|
235
|
-
#
|
236
|
-
# For reference, this was the docstring for map_style:
|
237
|
-
#
|
238
|
-
# map_style : str, None
|
239
|
-
# One of Mapbox's map style URLs. A full list can be found here:
|
240
|
-
# https://docs.mapbox.com/api/maps/styles/#mapbox-styles
|
241
|
-
#
|
242
|
-
# This feature requires a Mapbox token. See the top of these docs
|
243
|
-
# for information on how to get one and set it up in Streamlit.
|
244
|
-
#
|
245
|
-
map_style = None
|
246
233
|
map_proto = DeckGlJsonChartProto()
|
247
|
-
deck_gl_json = to_deckgl_json(
|
248
|
-
data, latitude, longitude, size, color, map_style, zoom
|
249
|
-
)
|
234
|
+
deck_gl_json = to_deckgl_json(data, latitude, longitude, size, color, zoom)
|
250
235
|
marshall(
|
251
236
|
map_proto, deck_gl_json, use_container_width, width=width, height=height
|
252
237
|
)
|
@@ -264,7 +249,6 @@ def to_deckgl_json(
|
|
264
249
|
lon: str | None,
|
265
250
|
size: None | str | float,
|
266
251
|
color: None | str | Collection[float],
|
267
|
-
map_style: str | None,
|
268
252
|
zoom: int | None,
|
269
253
|
) -> str:
|
270
254
|
if data is None:
|
@@ -318,14 +302,6 @@ def to_deckgl_json(
|
|
318
302
|
}
|
319
303
|
]
|
320
304
|
|
321
|
-
if map_style:
|
322
|
-
if not config.get_option("mapbox.token"):
|
323
|
-
raise StreamlitAPIException(
|
324
|
-
"You need a Mapbox token in order to select a map type. "
|
325
|
-
"Refer to the docs for st.map for more information."
|
326
|
-
)
|
327
|
-
default["mapStyle"] = map_style
|
328
|
-
|
329
305
|
return json.dumps(default)
|
330
306
|
|
331
307
|
|
@@ -502,3 +478,7 @@ def marshall(
|
|
502
478
|
pydeck_proto.height = height
|
503
479
|
|
504
480
|
pydeck_proto.id = ""
|
481
|
+
|
482
|
+
mapbox_token = config.get_option("mapbox.token")
|
483
|
+
if mapbox_token:
|
484
|
+
pydeck_proto.mapbox_token = mapbox_token
|
@@ -388,6 +388,8 @@ class ScriptRunner:
|
|
388
388
|
client_state = ClientState()
|
389
389
|
client_state.query_string = ctx.query_string
|
390
390
|
client_state.page_script_hash = ctx.page_script_hash
|
391
|
+
if ctx.context_info:
|
392
|
+
client_state.context_info.CopyFrom(ctx.context_info)
|
391
393
|
self.on_event.send(
|
392
394
|
self, event=ScriptRunnerEvent.SHUTDOWN, client_state=client_state
|
393
395
|
)
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.DT7-7fMk.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.C6rq3aMZ.css">
|
56
56
|
</head>
|
57
57
|
<body>
|