streamlit-nightly 1.53.2.dev20260128__py3-none-any.whl → 1.53.2.dev20260202__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 (271) hide show
  1. streamlit/commands/execution_control.py +2 -2
  2. streamlit/config.py +3 -2
  3. streamlit/config_util.py +63 -8
  4. streamlit/delta_generator.py +2 -0
  5. streamlit/elements/deck_gl_json_chart.py +5 -1
  6. streamlit/elements/lib/built_in_chart_utils.py +24 -4
  7. streamlit/elements/lib/color_util.py +20 -1
  8. streamlit/elements/lib/column_types.py +6 -2
  9. streamlit/elements/lib/utils.py +6 -6
  10. streamlit/elements/markdown.py +0 -1
  11. streamlit/elements/metric.py +2 -1
  12. streamlit/elements/vega_charts.py +24 -4
  13. streamlit/elements/widgets/button_group.py +6 -276
  14. streamlit/elements/widgets/feedback.py +322 -0
  15. streamlit/elements/widgets/number_input.py +2 -1
  16. streamlit/elements/widgets/slider.py +2 -1
  17. streamlit/material_icon_names.py +1 -1
  18. streamlit/proto/Alert_pb2.py +2 -3
  19. streamlit/proto/AppPage_pb2.py +2 -3
  20. streamlit/proto/ArrowData_pb2.py +2 -3
  21. streamlit/proto/ArrowNamedDataSet_pb2.py +2 -3
  22. streamlit/proto/ArrowVegaLiteChart_pb2.py +2 -3
  23. streamlit/proto/Arrow_pb2.py +11 -18
  24. streamlit/proto/Arrow_pb2.pyi +1 -42
  25. streamlit/proto/AudioInput_pb2.py +5 -6
  26. streamlit/proto/AudioInput_pb2.pyi +3 -3
  27. streamlit/proto/Audio_pb2.py +3 -4
  28. streamlit/proto/AuthRedirect_pb2.py +2 -3
  29. streamlit/proto/AutoRerun_pb2.py +2 -3
  30. streamlit/proto/BackMsg_pb2.py +2 -3
  31. streamlit/proto/BackMsg_pb2.pyi +2 -10
  32. streamlit/proto/Balloons_pb2.py +2 -3
  33. streamlit/proto/Balloons_pb2.pyi +0 -2
  34. streamlit/proto/BidiComponent_pb2.py +2 -3
  35. streamlit/proto/Block_pb2.py +36 -43
  36. streamlit/proto/Block_pb2.pyi +3 -48
  37. streamlit/proto/ButtonGroup_pb2.py +11 -14
  38. streamlit/proto/ButtonGroup_pb2.pyi +6 -41
  39. streamlit/proto/ButtonLikeIconPosition_pb2.py +2 -3
  40. streamlit/proto/Button_pb2.py +3 -6
  41. streamlit/proto/Button_pb2.pyi +1 -18
  42. streamlit/proto/CameraInput_pb2.py +5 -6
  43. streamlit/proto/CameraInput_pb2.pyi +3 -3
  44. streamlit/proto/ChatInput_pb2.py +5 -8
  45. streamlit/proto/ChatInput_pb2.pyi +1 -17
  46. streamlit/proto/Checkbox_pb2.py +7 -8
  47. streamlit/proto/Checkbox_pb2.pyi +3 -3
  48. streamlit/proto/ClientState_pb2.py +2 -3
  49. streamlit/proto/Code_pb2.py +3 -6
  50. streamlit/proto/Code_pb2.pyi +1 -18
  51. streamlit/proto/ColorPicker_pb2.py +5 -6
  52. streamlit/proto/ColorPicker_pb2.pyi +3 -3
  53. streamlit/proto/Common_pb2.py +7 -8
  54. streamlit/proto/Common_pb2.pyi +2 -10
  55. streamlit/proto/Components_pb2.py +2 -3
  56. streamlit/proto/DateInput_pb2.py +5 -6
  57. streamlit/proto/DateInput_pb2.pyi +3 -3
  58. streamlit/proto/DateTimeInput_pb2.py +5 -6
  59. streamlit/proto/DateTimeInput_pb2.pyi +3 -3
  60. streamlit/proto/DeckGlJsonChart_pb2.py +5 -12
  61. streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -54
  62. streamlit/proto/Delta_pb2.py +4 -6
  63. streamlit/proto/Delta_pb2.pyi +5 -14
  64. streamlit/proto/DocString_pb2.py +2 -3
  65. streamlit/proto/DownloadButton_pb2.py +2 -3
  66. streamlit/proto/Element_pb2.py +5 -8
  67. streamlit/proto/Element_pb2.pyi +9 -29
  68. streamlit/proto/Empty_pb2.py +2 -3
  69. streamlit/proto/Exception_pb2.py +2 -3
  70. streamlit/proto/Favicon_pb2.py +2 -3
  71. streamlit/proto/Feedback_pb2.py +28 -0
  72. streamlit/proto/Feedback_pb2.pyi +93 -0
  73. streamlit/proto/FileUploader_pb2.py +5 -6
  74. streamlit/proto/FileUploader_pb2.pyi +3 -3
  75. streamlit/proto/ForwardMsg_pb2.py +12 -18
  76. streamlit/proto/ForwardMsg_pb2.pyi +4 -48
  77. streamlit/proto/GapSize_pb2.py +2 -3
  78. streamlit/proto/GitInfo_pb2.py +2 -3
  79. streamlit/proto/GraphVizChart_pb2.py +3 -6
  80. streamlit/proto/GraphVizChart_pb2.pyi +1 -18
  81. streamlit/proto/Heading_pb2.py +2 -3
  82. streamlit/proto/HeightConfig_pb2.py +2 -3
  83. streamlit/proto/Html_pb2.py +2 -3
  84. streamlit/proto/IFrame_pb2.py +4 -11
  85. streamlit/proto/IFrame_pb2.pyi +1 -42
  86. streamlit/proto/Image_pb2.py +5 -8
  87. streamlit/proto/Image_pb2.pyi +2 -25
  88. streamlit/proto/Json_pb2.py +2 -3
  89. streamlit/proto/LabelVisibility_pb2.py +28 -0
  90. streamlit/proto/{LabelVisibilityMessage_pb2.pyi → LabelVisibility_pb2.pyi} +14 -14
  91. streamlit/proto/LinkButton_pb2.py +2 -3
  92. streamlit/proto/Logo_pb2.py +2 -3
  93. streamlit/proto/Markdown_pb2.py +5 -6
  94. streamlit/proto/Markdown_pb2.pyi +1 -5
  95. streamlit/proto/Metric_pb2.py +11 -12
  96. streamlit/proto/Metric_pb2.pyi +3 -3
  97. streamlit/proto/MetricsEvent_pb2.py +2 -3
  98. streamlit/proto/MultiSelect_pb2.py +5 -8
  99. streamlit/proto/MultiSelect_pb2.pyi +4 -14
  100. streamlit/proto/Navigation_pb2.py +2 -3
  101. streamlit/proto/NewSession_pb2.py +39 -28
  102. streamlit/proto/NewSession_pb2.pyi +44 -20
  103. streamlit/proto/NumberInput_pb2.py +7 -8
  104. streamlit/proto/NumberInput_pb2.pyi +3 -3
  105. streamlit/proto/PageConfig_pb2.py +2 -3
  106. streamlit/proto/PageInfo_pb2.py +2 -3
  107. streamlit/proto/PageLink_pb2.py +2 -3
  108. streamlit/proto/PageNotFound_pb2.py +2 -3
  109. streamlit/proto/PageProfile_pb2.py +2 -3
  110. streamlit/proto/ParentMessage_pb2.py +2 -3
  111. streamlit/proto/PlotlyChart_pb2.py +5 -10
  112. streamlit/proto/PlotlyChart_pb2.pyi +1 -58
  113. streamlit/proto/Progress_pb2.py +2 -3
  114. streamlit/proto/Radio_pb2.py +5 -8
  115. streamlit/proto/Radio_pb2.pyi +5 -22
  116. streamlit/proto/RootContainer_pb2.py +2 -3
  117. streamlit/proto/Selectbox_pb2.py +5 -8
  118. streamlit/proto/Selectbox_pb2.pyi +5 -25
  119. streamlit/proto/SessionEvent_pb2.py +2 -3
  120. streamlit/proto/SessionStatus_pb2.py +2 -3
  121. streamlit/proto/Skeleton_pb2.py +2 -3
  122. streamlit/proto/Slider_pb2.py +9 -10
  123. streamlit/proto/Slider_pb2.pyi +3 -3
  124. streamlit/proto/Snow_pb2.py +2 -3
  125. streamlit/proto/Snow_pb2.pyi +0 -2
  126. streamlit/proto/Space_pb2.py +2 -3
  127. streamlit/proto/Spinner_pb2.py +2 -3
  128. streamlit/proto/TextAlignmentConfig_pb2.py +2 -3
  129. streamlit/proto/TextArea_pb2.py +5 -8
  130. streamlit/proto/TextArea_pb2.pyi +4 -21
  131. streamlit/proto/TextInput_pb2.py +7 -8
  132. streamlit/proto/TextInput_pb2.pyi +3 -3
  133. streamlit/proto/Text_pb2.py +2 -3
  134. streamlit/proto/TimeInput_pb2.py +5 -6
  135. streamlit/proto/TimeInput_pb2.pyi +3 -3
  136. streamlit/proto/Toast_pb2.py +2 -3
  137. streamlit/proto/Transient_pb2.py +2 -3
  138. streamlit/proto/Video_pb2.py +3 -4
  139. streamlit/proto/WidgetStates_pb2.py +2 -3
  140. streamlit/proto/WidthConfig_pb2.py +2 -3
  141. streamlit/proto/openmetrics_data_model_pb2.py +2 -3
  142. streamlit/runtime/runtime.py +0 -4
  143. streamlit/static/index.html +2 -2
  144. streamlit/static/manifest.json +327 -312
  145. streamlit/static/static/css/{index.BUP6fTcR.css → index.C8MrxwGF.css} +1 -1
  146. streamlit/static/static/js/{ErrorOutline.esm.D71F8ziR.js → ErrorOutline.esm.CLuz0rSD.js} +1 -1
  147. streamlit/static/static/js/{FileDownload.esm.yTkppsJy.js → FileDownload.esm.CO68LcnZ.js} +1 -1
  148. streamlit/static/static/js/{FileHelper.hUOqtbwa.js → FileHelper.DAXgY6Ug.js} +1 -1
  149. streamlit/static/static/js/{FormClearHelper.DN8D_YXO.js → FormClearHelper.zxJ53Nym.js} +1 -1
  150. streamlit/static/static/js/{InputInstructions.DbssY6d4.js → InputInstructions.CCbg8esE.js} +1 -1
  151. streamlit/static/static/js/{Particles.BznyVdfo.js → Particles.BJw0A-zv.js} +1 -1
  152. streamlit/static/static/js/{ProgressBar.C5uBOtcx.js → ProgressBar.BrrHeAEh.js} +2 -2
  153. streamlit/static/static/js/{StreamlitSyntaxHighlighter.Nf1895x-.js → StreamlitSyntaxHighlighter.DvPLy3zk.js} +1 -1
  154. streamlit/static/static/js/{TableChart.esm.DHKzVs3a.js → TableChart.esm.BawvAi5p.js} +1 -1
  155. streamlit/static/static/js/{Toolbar.CQsWYXer.js → Toolbar.CbpscbNb.js} +1 -1
  156. streamlit/static/static/js/{WidgetLabelHelpIconInline.6xCU76OE.js → WidgetLabelHelpIconInline.DA4S2HFP.js} +1 -1
  157. streamlit/static/static/js/{base-input.Cs-E6S71.js → base-input.BKKl2eBF.js} +4 -4
  158. streamlit/static/static/js/{checkbox.OTGupu18.js → checkbox.CB43AKV4.js} +1 -1
  159. streamlit/static/static/js/{createDownloadLinkElement.DnBEQQbK.js → createDownloadLinkElement.jVwF96ey.js} +1 -1
  160. streamlit/static/static/js/data-grid-overlay-editor.CxQizSv7.js +1 -0
  161. streamlit/static/static/js/{downloader.K0GUNeuj.js → downloader.CKlIgsy5.js} +1 -1
  162. streamlit/static/static/js/{embed.o8HvK3mH.js → embed.BhRb_2n8.js} +1 -1
  163. streamlit/static/static/js/{es6.BHy5pqTP.js → es6.DPyfPmWm.js} +2 -2
  164. streamlit/static/static/js/formatNumber.DtfMnnPx.js +1 -0
  165. streamlit/static/static/js/{iconPosition.2YynQUxu.js → iconPosition.DkZAlu_k.js} +1 -1
  166. streamlit/static/static/js/{iframeResizer.contentWindow.D5h3hQuU.js → iframeResizer.contentWindow.l5sQWLra.js} +1 -1
  167. streamlit/static/static/js/{index.BZ-GJVxB.js → index.465nmxtO.js} +2 -2
  168. streamlit/static/static/js/{index.BPdmXoYW.js → index.6J1N4is3.js} +1 -1
  169. streamlit/static/static/js/{index.Bfo1cXfC.js → index.AZ9T4EqJ.js} +1 -1
  170. streamlit/static/static/js/{index.cfuZ69LI.js → index.BAK0CG1Q.js} +1 -1
  171. streamlit/static/static/js/{index.5zqfJ-in.js → index.BLD3tJ2C.js} +1 -1
  172. streamlit/static/static/js/{index.CxWzt6oi.js → index.BUlT_mOL.js} +3 -3
  173. streamlit/static/static/js/{index.DxGXuhh6.js → index.Bc_FQ4Wb.js} +1 -1
  174. streamlit/static/static/js/{index.DJfMW0Gy.js → index.BpCj2-sQ.js} +1 -1
  175. streamlit/static/static/js/{index.DLUSo6de.js → index.BzO83wKm.js} +1 -1
  176. streamlit/static/static/js/index.CAoX2tlo.js +2 -0
  177. streamlit/static/static/js/{index.CwtpGPHA.js → index.CBbYMKZp.js} +1 -1
  178. streamlit/static/static/js/{index.Bgf49D1Z.js → index.CL7it7tU.js} +222 -222
  179. streamlit/static/static/js/{index.DxfYCrPp.js → index.CL_icBXS.js} +1 -1
  180. streamlit/static/static/js/index.C_19KWNs.js +2 -0
  181. streamlit/static/static/js/index.CaU3Uv_L.js +1 -0
  182. streamlit/static/static/js/{index.Dh3PJIlq.js → index.Ccye_uLl.js} +1 -1
  183. streamlit/static/static/js/{index.C65jHNhe.js → index.CiS4giQ2.js} +1 -1
  184. streamlit/static/static/js/{index.hlAfdSqC.js → index.Ck64OQhV.js} +1 -1
  185. streamlit/static/static/js/{index.HmRK3HyC.js → index.CmbqbRMZ.js} +1 -1
  186. streamlit/static/static/js/{index.8MlRyIxN.js → index.CsEZTo6L.js} +2 -2
  187. streamlit/static/static/js/{index.DVRCyxMp.js → index.CsIENsKH.js} +1 -1
  188. streamlit/static/static/js/{index.Bqmx23jK.js → index.Cwg8nWw5.js} +1 -1
  189. streamlit/static/static/js/{index.CZf7Go1Z.js → index.D83azq2w.js} +1 -1
  190. streamlit/static/static/js/{index.CUkhn-vu.js → index.DDr-BLbJ.js} +1 -1
  191. streamlit/static/static/js/{index.iUV9rb8C.js → index.DKoJr0Se.js} +1 -1
  192. streamlit/static/static/js/{index.C2EoeVjP.js → index.DL_ywOgf.js} +2 -2
  193. streamlit/static/static/js/{index.q0ceUXt6.js → index.DR6V0uBJ.js} +1 -1
  194. streamlit/static/static/js/index.DZOGT9vX.js +1 -0
  195. streamlit/static/static/js/{index.BtuskCwg.js → index.Dac9Jib-.js} +1 -1
  196. streamlit/static/static/js/{index.6c-qDsD7.js → index.DiBeetOH.js} +1 -1
  197. streamlit/static/static/js/{index.DlgcEr0f.js → index.DjuMEZ6m.js} +1 -1
  198. streamlit/static/static/js/{index.DBPWUJsj.js → index.DmWUXdjc.js} +54 -54
  199. streamlit/static/static/js/{index.DL_yE83J.js → index.DpSc4e1j.js} +2 -2
  200. streamlit/static/static/js/{index.CgVv04GM.js → index.DzdPUxsx.js} +2 -2
  201. streamlit/static/static/js/{index.BtRWcqZV.js → index.FioS1Y9m.js} +1 -1
  202. streamlit/static/static/js/{index.BfMPq234.js → index.L9pOjBEn.js} +3 -3
  203. streamlit/static/static/js/{index.TjMWsKSH.js → index.LjqoQCm5.js} +3 -3
  204. streamlit/static/static/js/index.OizPL4jg.js +1 -0
  205. streamlit/static/static/js/{index.Cb03y5I8.js → index.Q2t_iBn0.js} +1 -1
  206. streamlit/static/static/js/index.WIMtx3m0.js +2 -0
  207. streamlit/static/static/js/index.Y9wPTZIf.js +1 -0
  208. streamlit/static/static/js/{index.COh5V_89.js → index.YutgmD9x.js} +2 -2
  209. streamlit/static/static/js/{index.BIqcOZ_u.js → index.b_f-McZ5.js} +1 -1
  210. streamlit/static/static/js/{index.BzTVI_BY.js → index.e6Ry6-Ft.js} +1 -1
  211. streamlit/static/static/js/index.hnu9U-5g.js +1 -0
  212. streamlit/static/static/js/{index.C6wyTXhz.js → index.rvbQETlC.js} +1 -1
  213. streamlit/static/static/js/index.w7yKy9fh.js +6 -0
  214. streamlit/static/static/js/{index.C7wst9Tm.js → index.y0h42OXL.js} +1 -1
  215. streamlit/static/static/js/{index.aCorc3Yt.js → index.y5HxPwg9.js} +48 -48
  216. streamlit/static/static/js/{index.CX0KdFyR.js → index.yHLCvUGh.js} +1 -1
  217. streamlit/static/static/js/{input.CXGIJ7D6.js → input.CAtwSQ27.js} +1 -1
  218. streamlit/static/static/js/{main.CCVkbuxC.js → main.VeMVx6VI.js} +1 -1
  219. streamlit/static/static/js/{memory.CNbnYs2A.js → memory.CxS_lIUn.js} +1 -1
  220. streamlit/static/static/js/number-overlay-editor.CoqRgZW_.js +9 -0
  221. streamlit/static/static/js/{pandasStylerUtils.CFSReOTm.js → pandasStylerUtils.DGWgd5sM.js} +1 -1
  222. streamlit/static/static/js/{sandbox.Bld0L3us.js → sandbox.2mSqEau0.js} +1 -1
  223. streamlit/static/static/js/sprintfjs.CsoVVZ9k.js +1 -0
  224. streamlit/static/static/js/{styled-components.BoUHK6TA.js → styled-components.BShfh7J8.js} +1 -1
  225. streamlit/static/static/js/{throttle.ByDFm7WV.js → throttle.Fq1DQK4p.js} +1 -1
  226. streamlit/static/static/js/{timepicker.CN6CUZEL.js → timepicker.DmyY-qtn.js} +1 -1
  227. streamlit/static/static/js/{toConsumableArray.DwMycSpg.js → toConsumableArray.Dvd9AIqV.js} +1 -1
  228. streamlit/static/static/js/uniqueId.CCajdEK8.js +1 -0
  229. streamlit/static/static/js/{useBasicWidgetState.Bg0ZMUt5.js → useBasicWidgetState.COLQ5AFB.js} +1 -1
  230. streamlit/static/static/js/{useIntlLocale.DgBUDcPA.js → useIntlLocale.kdIj0ego.js} +1 -1
  231. streamlit/static/static/js/{useTextInputAutoExpand.DDBezxks.js → useTextInputAutoExpand.DkuG1C1S.js} +1 -1
  232. streamlit/static/static/js/{useUpdateUiValue.Df1h6fXC.js → useUpdateUiValue.-UI_JsjT.js} +1 -1
  233. streamlit/static/static/js/{useWaveformController.DbWw5MEk.js → useWaveformController.C5PTwL6I.js} +1 -1
  234. streamlit/static/static/js/{withCalculatedWidth.YaK0HIIP.js → withCalculatedWidth.BREyS0pJ.js} +1 -1
  235. streamlit/static/static/js/{withFullScreenWrapper.CcWCKoY8.js → withFullScreenWrapper.DYDiEOrW.js} +1 -1
  236. streamlit/static/static/media/MaterialSymbols-Rounded.CnH1S47a.woff2 +0 -0
  237. streamlit/testing/v1/app_test.py +21 -5
  238. streamlit/testing/v1/element_tree.py +81 -4
  239. streamlit/web/server/server.py +0 -1
  240. streamlit/web/server/starlette/starlette_app.py +0 -1
  241. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/METADATA +10 -25
  242. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/RECORD +245 -252
  243. streamlit/proto/BokehChart_pb2.py +0 -27
  244. streamlit/proto/BokehChart_pb2.pyi +0 -56
  245. streamlit/proto/DataFrame_pb2.py +0 -56
  246. streamlit/proto/DataFrame_pb2.pyi +0 -430
  247. streamlit/proto/LabelVisibilityMessage_pb2.py +0 -29
  248. streamlit/proto/NamedDataSet_pb2.py +0 -28
  249. streamlit/proto/NamedDataSet_pb2.pyi +0 -67
  250. streamlit/proto/PagesChanged_pb2.py +0 -28
  251. streamlit/proto/PagesChanged_pb2.pyi +0 -55
  252. streamlit/proto/VegaLiteChart_pb2.py +0 -29
  253. streamlit/proto/VegaLiteChart_pb2.pyi +0 -79
  254. streamlit/static/static/js/data-grid-overlay-editor.COiiMi5r.js +0 -1
  255. streamlit/static/static/js/formatNumber.BK7h0k2z.js +0 -1
  256. streamlit/static/static/js/index.BBTKOM0z.js +0 -6
  257. streamlit/static/static/js/index.CSPY26T2.js +0 -1
  258. streamlit/static/static/js/index.CYhhEdja.js +0 -1
  259. streamlit/static/static/js/index.CdsyTabv.js +0 -1
  260. streamlit/static/static/js/index.CjRU8O1O.js +0 -2
  261. streamlit/static/static/js/index.Dc5-tFdw.js +0 -2
  262. streamlit/static/static/js/index.DcngUOyD.js +0 -2
  263. streamlit/static/static/js/index.VwDKazgt.js +0 -1
  264. streamlit/static/static/js/number-overlay-editor.CvI6wkld.js +0 -9
  265. streamlit/static/static/js/sprintf.DpPCfzXw.js +0 -1
  266. streamlit/static/static/js/uniqueId.DcCWa2cf.js +0 -1
  267. streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
  268. streamlit_nightly-1.53.2.dev20260128.data/scripts/streamlit.cmd +0 -16
  269. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/WHEEL +0 -0
  270. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/entry_points.txt +0 -0
  271. {streamlit_nightly-1.53.2.dev20260128.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/top_level.txt +0 -0
@@ -133,7 +133,7 @@ def _set_query_params_for_switch(
133
133
  def rerun( # type: ignore[misc]
134
134
  *, # The scope argument can only be passed via keyword.
135
135
  scope: Literal["app", "fragment"] = "app",
136
- ) -> NoReturn: # ty: ignore[invalid-return-type]
136
+ ) -> NoReturn: # ty: ignore[empty-body]
137
137
  """Rerun the script immediately.
138
138
 
139
139
  When ``st.rerun()`` is called, Streamlit halts the current script run and
@@ -189,7 +189,7 @@ def switch_page( # type: ignore[misc]
189
189
  page: str | Path | StreamlitPage,
190
190
  *,
191
191
  query_params: QueryParamsInput | None = None,
192
- ) -> NoReturn: # ty: ignore[invalid-return-type]
192
+ ) -> NoReturn: # ty: ignore[empty-body]
193
193
  """Programmatically switch the current page in a multipage app.
194
194
 
195
195
  When ``st.switch_page`` is called, the current page execution stops and
streamlit/config.py CHANGED
@@ -2705,7 +2705,8 @@ def get_config_options(
2705
2705
 
2706
2706
  # Values set in files later in the CONFIG_FILENAMES list overwrite those
2707
2707
  # set earlier.
2708
- for filename in get_config_files("config.toml"):
2708
+ config_files = get_config_files("config.toml")
2709
+ for filename in config_files:
2709
2710
  if not os.path.exists(filename):
2710
2711
  continue
2711
2712
 
@@ -2723,7 +2724,7 @@ def get_config_options(
2723
2724
  # This happens AFTER all config sources (files, env vars, flags) are processed
2724
2725
  # so theme.base can be set via any of those
2725
2726
  config_util.process_theme_inheritance(
2726
- _config_options, _config_options_template, _set_option
2727
+ _config_options, _config_options_template, _set_option, config_files
2727
2728
  )
2728
2729
 
2729
2730
  if old_options and config_util.server_option_changed(
streamlit/config_util.py CHANGED
@@ -19,10 +19,10 @@ import os
19
19
  import re
20
20
  import urllib.error
21
21
  import urllib.request
22
- from typing import TYPE_CHECKING, Any
22
+ from typing import TYPE_CHECKING, Any, TypedDict
23
23
 
24
24
  if TYPE_CHECKING:
25
- from collections.abc import Iterator
25
+ from collections.abc import Iterator, Sequence
26
26
 
27
27
  from streamlit import cli_util, url_util
28
28
  from streamlit.config_option import ConfigOption
@@ -36,6 +36,31 @@ from streamlit.errors import (
36
36
  # Maximum size for theme files (1MB). Theme files should be small configuration
37
37
  # files containing only theme options, not large data files.
38
38
  _MAX_THEME_FILE_SIZE_BYTES = 1024 * 1024 # 1MB
39
+ _CONFIG_FILE_SCOPES = ("global", "project", "script")
40
+
41
+
42
+ class _ThemeOverride(TypedDict):
43
+ value: Any
44
+ where_defined: str
45
+
46
+
47
+ def _format_config_file_label(
48
+ where_defined: str | None, config_file_paths: Sequence[str] | None
49
+ ) -> str | None:
50
+ """Return a scope-labeled config.toml path if where_defined matches a config file."""
51
+ if not where_defined or not config_file_paths:
52
+ return None
53
+
54
+ for index, path in enumerate(config_file_paths):
55
+ if where_defined == path:
56
+ scope = (
57
+ _CONFIG_FILE_SCOPES[index] if index < len(_CONFIG_FILE_SCOPES) else None
58
+ )
59
+ if scope:
60
+ return f"config.toml ({scope}): {path}"
61
+ return f"config.toml: {path}"
62
+
63
+ return None
39
64
 
40
65
 
41
66
  def _get_logger() -> Any:
@@ -720,6 +745,7 @@ def process_theme_inheritance(
720
745
  config_options: dict[str, ConfigOption] | None,
721
746
  config_options_template: dict[str, ConfigOption],
722
747
  set_option_func: Any,
748
+ config_file_paths: Sequence[str] | None = None,
723
749
  ) -> None:
724
750
  """
725
751
  Process theme inheritance if theme.base points to a theme file.
@@ -729,6 +755,18 @@ def process_theme_inheritance(
729
755
  current config.toml values override the theme.base file values.
730
756
 
731
757
  Sets the merged theme options to the config.
758
+
759
+ Parameters
760
+ ----------
761
+ config_options : dict[str, ConfigOption] | None
762
+ Current configuration options.
763
+ config_options_template : dict[str, ConfigOption]
764
+ Template of all valid config options.
765
+ set_option_func : Any
766
+ Function to set config option values.
767
+ config_file_paths : Sequence[str] | None, optional
768
+ Ordered list of config.toml file paths (global, project, script).
769
+ Used to label where_defined with scope for clearer provenance.
732
770
  """
733
771
  # Get the current theme.base value
734
772
  if config_options is None:
@@ -770,7 +808,8 @@ def process_theme_inheritance(
770
808
  )
771
809
 
772
810
  # Preserve theme options set by env vars and command line flags (higher precedence)
773
- high_precedence_theme_options = {}
811
+ high_precedence_theme_options: dict[str, _ThemeOverride] = {}
812
+ config_theme_overrides: dict[str, _ThemeOverride] = {}
774
813
  if config_options is not None:
775
814
  for opt_name, opt_config in config_options.items():
776
815
  if (
@@ -786,6 +825,18 @@ def process_theme_inheritance(
786
825
  "value": opt_config.value,
787
826
  "where_defined": opt_config.where_defined,
788
827
  }
828
+ config_label = _format_config_file_label(
829
+ opt_config.where_defined, config_file_paths
830
+ )
831
+ if (
832
+ opt_name.startswith("theme.")
833
+ and opt_name != "theme.base"
834
+ and config_label is not None
835
+ ):
836
+ config_theme_overrides[opt_name] = {
837
+ "value": opt_config.value,
838
+ "where_defined": config_label,
839
+ }
789
840
 
790
841
  # Clear existing theme options (except base) to prepare for inheritance
791
842
  theme_options_to_remove = [
@@ -799,19 +850,23 @@ def process_theme_inheritance(
799
850
  # Handle theme.base - always set it to a valid value ("light" or "dark", not a path/URL)
800
851
  theme_file_base = theme_file_content.get("theme", {}).get("base")
801
852
  if theme_file_base:
802
- set_option_func("theme.base", theme_file_base, f"theme file: {base_value}")
803
- else:
804
- # Theme file doesn't specify a base, default to "light"
805
853
  set_option_func(
806
- "theme.base", "light", f"theme file: {base_value} (default)"
854
+ "theme.base", theme_file_base, f"base theme file: {base_value}"
807
855
  )
856
+ else:
857
+ # Theme file doesn't specify a base, default to "light"
858
+ set_option_func("theme.base", "light", "default light theme")
808
859
 
809
860
  # Set the merged theme options using recursive helper
810
861
  theme_section = merged_theme.get("theme", {})
811
862
  _set_theme_options_recursive(
812
- theme_section, "theme", set_option_func, f"theme file: {base_value}"
863
+ theme_section, "theme", set_option_func, f"base theme file: {base_value}"
813
864
  )
814
865
 
866
+ # Restore theme options set in config.toml (override base theme file)
867
+ for opt_name, opt_data in config_theme_overrides.items():
868
+ set_option_func(opt_name, opt_data["value"], opt_data["where_defined"])
869
+
815
870
  # Finally, restore theme options set by env vars and command line flags (highest precedence)
816
871
  for opt_name, opt_data in high_precedence_theme_options.items():
817
872
  set_option_func(opt_name, opt_data["value"], opt_data["where_defined"])
@@ -91,6 +91,7 @@ from streamlit.elements.widgets.chat import ChatMixin
91
91
  from streamlit.elements.widgets.checkbox import CheckboxMixin
92
92
  from streamlit.elements.widgets.color_picker import ColorPickerMixin
93
93
  from streamlit.elements.widgets.data_editor import DataEditorMixin
94
+ from streamlit.elements.widgets.feedback import FeedbackMixin
94
95
  from streamlit.elements.widgets.file_uploader import FileUploaderMixin
95
96
  from streamlit.elements.widgets.multiselect import MultiSelectMixin
96
97
  from streamlit.elements.widgets.number_input import NumberInputMixin
@@ -189,6 +190,7 @@ class DeltaGenerator(
189
190
  ColorPickerMixin,
190
191
  EmptyMixin,
191
192
  ExceptionMixin,
193
+ FeedbackMixin,
192
194
  FileUploaderMixin,
193
195
  FormMixin,
194
196
  GraphvizMixin,
@@ -556,7 +556,11 @@ class PydeckMixin:
556
556
  pydeck_proto.id = compute_and_register_element_id(
557
557
  "deck_gl_json_chart",
558
558
  user_key=key,
559
- key_as_main_identity=False,
559
+ # When a key is provided, only selection_mode affects the element ID.
560
+ # This allows selection state to persist across data/spec changes.
561
+ # Note: This can lead to orphaned selections if data length shrinks,
562
+ # but the frontend handles this by sanitizing invalid indices.
563
+ key_as_main_identity={"selection_mode"},
560
564
  dg=self.dg,
561
565
  is_selection_activated=is_selection_activated,
562
566
  selection_mode=selection_mode,
@@ -24,6 +24,7 @@ from typing import TYPE_CHECKING, Any, Final, Literal, TypeAlias, TypedDict, cas
24
24
  from streamlit import dataframe_util, type_util
25
25
  from streamlit.elements.lib.color_util import (
26
26
  Color,
27
+ is_builtin_color_name,
27
28
  is_color_like,
28
29
  is_color_tuple_like,
29
30
  is_hex_color_like,
@@ -1080,6 +1081,14 @@ def _get_color_encoding(
1080
1081
 
1081
1082
  return alt.ColorValue(to_css_color(cast("Any", color_value)))
1082
1083
 
1084
+ # Check for built-in color names (resolved on frontend, not converted here)
1085
+ if isinstance(color_value, str) and is_builtin_color_name(color_value):
1086
+ if len(y_column_list) != 1:
1087
+ raise StreamlitColorLengthError(
1088
+ [color_value] if color_value else [], y_column_list
1089
+ )
1090
+ return alt.ColorValue(color_value)
1091
+
1083
1092
  # If the color value is a list of colors of appropriate length, return that.
1084
1093
  if isinstance(color_value, (list, tuple)):
1085
1094
  color_values = cast("Collection[Color]", color_value)
@@ -1088,12 +1097,23 @@ def _get_color_encoding(
1088
1097
  raise StreamlitColorLengthError(color_values, y_column_list)
1089
1098
 
1090
1099
  if len(color_values) == 1:
1091
- return alt.ColorValue(to_css_color(cast("Any", color_value[0])))
1100
+ first_color = cast("Any", color_value[0])
1101
+ # Pass through built-in color names as-is (resolved on frontend)
1102
+ if isinstance(first_color, str) and is_builtin_color_name(first_color):
1103
+ return alt.ColorValue(first_color)
1104
+ return alt.ColorValue(to_css_color(first_color))
1105
+
1106
+ # Convert colors, but pass through built-in color names as-is
1107
+ resolved_colors: list[Color] = []
1108
+ for c in color_values:
1109
+ if isinstance(c, str) and is_builtin_color_name(c):
1110
+ resolved_colors.append(c)
1111
+ else:
1112
+ resolved_colors.append(to_css_color(c))
1113
+
1092
1114
  return alt.Color(
1093
1115
  field=color_column if color_column is not None else alt.Undefined,
1094
- scale=alt.Scale(
1095
- domain=y_column_list, range=[to_css_color(c) for c in color_values]
1096
- ),
1116
+ scale=alt.Scale(domain=y_column_list, range=resolved_colors),
1097
1117
  legend=_COLOR_LEGEND_SETTINGS,
1098
1118
  type="nominal",
1099
1119
  title=" ",
@@ -15,10 +15,16 @@
15
15
  from __future__ import annotations
16
16
 
17
17
  from collections.abc import Callable, Collection
18
- from typing import Any, TypeAlias, cast
18
+ from typing import Any, Final, TypeAlias, cast
19
19
 
20
20
  from streamlit.errors import StreamlitInvalidColorError
21
21
 
22
+ # Built-in color names that map to Streamlit theme colors.
23
+ # These are resolved to actual color values on the frontend.
24
+ BUILTIN_COLOR_NAMES: Final[frozenset[str]] = frozenset(
25
+ {"red", "orange", "yellow", "green", "blue", "violet", "gray", "grey", "primary"}
26
+ )
27
+
22
28
  # components go from 0.0 to 1.0
23
29
  # Supported by Pillow and pretty common.
24
30
  FloatRGBColorTuple: TypeAlias = tuple[float, float, float]
@@ -131,11 +137,24 @@ def is_color_tuple_like(color: MaybeColor) -> bool:
131
137
  )
132
138
 
133
139
 
140
+ def is_builtin_color_name(color: MaybeColor) -> bool:
141
+ """Check whether the input is a built-in Streamlit color name.
142
+
143
+ Built-in color names (red, orange, yellow, green, blue, violet, gray/grey, primary)
144
+ are resolved to theme colors on the frontend.
145
+ """
146
+ return isinstance(color, str) and color.lower() in BUILTIN_COLOR_NAMES
147
+
148
+
134
149
  def is_color_like(color: MaybeColor) -> bool:
135
150
  """A fairly lightweight check of whether the input is a color.
136
151
 
137
152
  This isn't meant to be a definitive answer. The definitive solution is to
138
153
  try to convert and see if an error is thrown.
154
+
155
+ NOTE: This does NOT include built-in color names (red, blue, etc.) because
156
+ those require special handling and cannot be converted via to_css_color().
157
+ Use is_builtin_color_name() separately when validating color parameter arguments.
139
158
  """
140
159
  return is_css_color_like(color) or is_color_tuple_like(color)
141
160
 
@@ -529,7 +529,9 @@ def NumberColumn(
529
529
  specifier, like ``"%d"`` to show a signed integer (e.g. "1234") or
530
530
  ``"%X"`` to show an unsigned hexadecimal integer (e.g. "4D2"). You
531
531
  can also add prefixes and suffixes. To show British pounds, use
532
- ``"£ %.2f"`` (e.g. "£ 1234.57"). For more information, see `sprint-js
532
+ ``"£ %.2f"`` (e.g. "£ 1234.57"). Use ``,`` for thousand separators
533
+ (e.g. ``"%,d"`` yields ``"1,234"``). For more information, see
534
+ `sprintf-js
533
535
  <https://github.com/alexei/sprintf.js?tab=readme-ov-file#format-specification>`_.
534
536
 
535
537
  Formatting from ``column_config`` always takes precedence over
@@ -2517,7 +2519,9 @@ def ProgressColumn(
2517
2519
  specifier, like ``"%d"`` to show a signed integer (e.g. "1234") or
2518
2520
  ``"%X"`` to show an unsigned hexadecimal integer (e.g. "4D2"). You
2519
2521
  can also add prefixes and suffixes. To show British pounds, use
2520
- ``"£ %.2f"`` (e.g. "£ 1234.57"). For more information, see `sprint-js
2522
+ ``"£ %.2f"`` (e.g. "£ 1234.57"). Use ``,`` for thousand separators
2523
+ (e.g. ``"%,d"`` yields ``"1,234"``). For more information, see
2524
+ `sprintf-js
2521
2525
  <https://github.com/alexei/sprintf.js?tab=readme-ov-file#format-specification>`_.
2522
2526
 
2523
2527
  Number formatting from ``column_config`` always takes precedence over
@@ -31,7 +31,7 @@ from streamlit import config
31
31
  from streamlit.elements.lib.form_utils import current_form_id
32
32
  from streamlit.errors import StreamlitDuplicateElementId, StreamlitDuplicateElementKey
33
33
  from streamlit.proto.ChatInput_pb2 import ChatInput
34
- from streamlit.proto.LabelVisibilityMessage_pb2 import LabelVisibilityMessage
34
+ from streamlit.proto.LabelVisibility_pb2 import LabelVisibility as LabelVisibilityProto
35
35
  from streamlit.runtime.scriptrunner_utils.script_run_context import (
36
36
  ScriptRunContext,
37
37
  get_script_run_ctx,
@@ -68,15 +68,15 @@ SAFE_VALUES: TypeAlias = Union[
68
68
 
69
69
  def get_label_visibility_proto_value(
70
70
  label_visibility_string: LabelVisibility,
71
- ) -> LabelVisibilityMessage.LabelVisibilityOptions.ValueType:
72
- """Returns one of LabelVisibilityMessage enum constants.py based on string value."""
71
+ ) -> LabelVisibilityProto.LabelVisibilityOptions.ValueType:
72
+ """Returns one of LabelVisibilityProto enum constants based on string value."""
73
73
 
74
74
  if label_visibility_string == "visible":
75
- return LabelVisibilityMessage.LabelVisibilityOptions.VISIBLE
75
+ return LabelVisibilityProto.LabelVisibilityOptions.VISIBLE
76
76
  if label_visibility_string == "hidden":
77
- return LabelVisibilityMessage.LabelVisibilityOptions.HIDDEN
77
+ return LabelVisibilityProto.LabelVisibilityOptions.HIDDEN
78
78
  if label_visibility_string == "collapsed":
79
- return LabelVisibilityMessage.LabelVisibilityOptions.COLLAPSED
79
+ return LabelVisibilityProto.LabelVisibilityOptions.COLLAPSED
80
80
 
81
81
  raise ValueError(f"Unknown label visibility value: {label_visibility_string}")
82
82
 
@@ -270,7 +270,6 @@ class MarkdownMixin:
270
270
  caption_proto = MarkdownProto()
271
271
  caption_proto.body = clean_text(body)
272
272
  caption_proto.allow_html = unsafe_allow_html
273
- caption_proto.is_caption = True
274
273
  caption_proto.element_type = MarkdownProto.Type.CAPTION
275
274
  if help:
276
275
  caption_proto.help = help
@@ -259,7 +259,8 @@ class MetricMixin:
259
259
  - ``"engineering"``: Show the number in engineering notation (e.g. "1.235E3").
260
260
  - printf-style format string: Format the number with a printf
261
261
  specifier, like ``"%d"`` to show a signed integer (e.g. "1234") or
262
- ``"%.2f"`` to show a float with 2 decimal places.
262
+ ``"%.2f"`` to show a float with 2 decimal places. Use ``,`` for
263
+ thousand separators (e.g. ``"%,d"`` yields ``"1,234"``).
263
264
 
264
265
  Examples
265
266
  --------
@@ -725,6 +725,10 @@ class VegaChartsMixin:
725
725
  - An RGB or RGBA tuple with the red, green, blue, and alpha
726
726
  components specified as ints from 0 to 255 or floats from 0.0 to
727
727
  1.0.
728
+ - A built-in color name: "red", "orange", "yellow", "green",
729
+ "blue", "violet", "gray"/"grey", or "primary". These map to
730
+ theme colors that you can customize using ``theme.<color>Color``
731
+ configuration options.
728
732
 
729
733
  For a line chart with multiple lines, where the dataframe is in
730
734
  long format (that is, y is None or just one column), this can be:
@@ -753,7 +757,8 @@ class VegaChartsMixin:
753
757
  - A list of string colors or color tuples to be used for each of
754
758
  the lines in the chart. This list should have the same length
755
759
  as the number of y values (e.g. ``color=["#fd0", "#f0f", "#04f"]``
756
- for three lines).
760
+ for three lines). You can also use built-in color names in the
761
+ list (e.g. ``color=["red", "blue", "green"]``).
757
762
 
758
763
  You can set the default colors in the ``theme.chartCategoryColors``
759
764
  configuration option.
@@ -959,6 +964,10 @@ class VegaChartsMixin:
959
964
  - An RGB or RGBA tuple with the red, green, blue, and alpha
960
965
  components specified as ints from 0 to 255 or floats from 0.0 to
961
966
  1.0.
967
+ - A built-in color name: "red", "orange", "yellow", "green",
968
+ "blue", "violet", "gray"/"grey", or "primary". These map to
969
+ theme colors that you can customize using ``theme.<color>Color``
970
+ configuration options.
962
971
 
963
972
  For an area chart with multiple series, where the dataframe is in
964
973
  long format (that is, y is None or just one column), this can be:
@@ -987,7 +996,8 @@ class VegaChartsMixin:
987
996
  - A list of string colors or color tuples to be used for each of
988
997
  the series in the chart. This list should have the same length
989
998
  as the number of y values (e.g. ``color=["#fd0", "#f0f", "#04f"]``
990
- for three lines).
999
+ for three lines). You can also use built-in color names in the
1000
+ list (e.g. ``color=["red", "blue", "green"]``).
991
1001
 
992
1002
  You can set the default colors in the ``theme.chartCategoryColors``
993
1003
  configuration option.
@@ -1248,6 +1258,10 @@ class VegaChartsMixin:
1248
1258
  - An RGB or RGBA tuple with the red, green, blue, and alpha
1249
1259
  components specified as ints from 0 to 255 or floats from 0.0 to
1250
1260
  1.0.
1261
+ - A built-in color name: "red", "orange", "yellow", "green",
1262
+ "blue", "violet", "gray"/"grey", or "primary". These map to
1263
+ theme colors that you can customize using ``theme.<color>Color``
1264
+ configuration options.
1251
1265
 
1252
1266
  For a bar chart with multiple series, where the dataframe is in
1253
1267
  long format (that is, y is None or just one column), this can be:
@@ -1276,7 +1290,8 @@ class VegaChartsMixin:
1276
1290
  - A list of string colors or color tuples to be used for each of
1277
1291
  the series in the chart. This list should have the same length
1278
1292
  as the number of y values (e.g. ``color=["#fd0", "#f0f", "#04f"]``
1279
- for three lines).
1293
+ for three lines). You can also use built-in color names in the
1294
+ list (e.g. ``color=["red", "blue", "green"]``).
1280
1295
 
1281
1296
  You can set the default colors in the ``theme.chartCategoryColors``
1282
1297
  configuration option.
@@ -1575,6 +1590,10 @@ class VegaChartsMixin:
1575
1590
  - An RGB or RGBA tuple with the red, green, blue, and alpha
1576
1591
  components specified as ints from 0 to 255 or floats from 0.0 to
1577
1592
  1.0.
1593
+ - A built-in color name: "red", "orange", "yellow", "green",
1594
+ "blue", "violet", "gray"/"grey", or "primary". These map to
1595
+ theme colors that you can customize using ``theme.<color>Color``
1596
+ configuration options.
1578
1597
  - The name of a column in the dataset where the color of that
1579
1598
  datapoint will come from.
1580
1599
 
@@ -1602,7 +1621,8 @@ class VegaChartsMixin:
1602
1621
  - A list of string colors or color tuples to be used for each of
1603
1622
  the series in the chart. This list should have the same length
1604
1623
  as the number of y values (e.g. ``color=["#fd0", "#f0f", "#04f"]``
1605
- for three series).
1624
+ for three series). You can also use built-in color names in the
1625
+ list (e.g. ``color=["red", "blue", "green"]``).
1606
1626
 
1607
1627
  size : str, float, int, or None
1608
1628
  The size of the circles representing each point.