streamlit 1.45.0__py3-none-any.whl → 1.46.0__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 (336) hide show
  1. streamlit/__init__.py +5 -1
  2. streamlit/auth_util.py +12 -12
  3. streamlit/cli_util.py +4 -3
  4. streamlit/column_config.py +11 -9
  5. streamlit/commands/echo.py +6 -4
  6. streamlit/commands/execution_control.py +33 -32
  7. streamlit/commands/experimental_query_params.py +2 -2
  8. streamlit/commands/logo.py +9 -4
  9. streamlit/commands/navigation.py +61 -18
  10. streamlit/commands/page_config.py +57 -47
  11. streamlit/components/types/base_custom_component.py +7 -7
  12. streamlit/components/v1/component_registry.py +7 -3
  13. streamlit/components/v1/components.py +1 -1
  14. streamlit/components/v1/custom_component.py +8 -8
  15. streamlit/config.py +289 -144
  16. streamlit/config_option.py +19 -15
  17. streamlit/config_util.py +29 -23
  18. streamlit/connections/__init__.py +2 -2
  19. streamlit/connections/base_connection.py +5 -5
  20. streamlit/connections/snowflake_connection.py +13 -11
  21. streamlit/connections/snowpark_connection.py +3 -3
  22. streamlit/connections/sql_connection.py +20 -18
  23. streamlit/connections/util.py +2 -2
  24. streamlit/cursor.py +6 -6
  25. streamlit/dataframe_util.py +52 -52
  26. streamlit/delta_generator.py +46 -48
  27. streamlit/delta_generator_singletons.py +3 -3
  28. streamlit/deprecation_util.py +6 -6
  29. streamlit/elements/alert.py +37 -29
  30. streamlit/elements/arrow.py +40 -22
  31. streamlit/elements/code.py +46 -13
  32. streamlit/elements/deck_gl_json_chart.py +38 -27
  33. streamlit/elements/dialog_decorator.py +3 -4
  34. streamlit/elements/doc_string.py +64 -58
  35. streamlit/elements/exception.py +23 -27
  36. streamlit/elements/form.py +41 -0
  37. streamlit/elements/graphviz_chart.py +1 -1
  38. streamlit/elements/heading.py +60 -9
  39. streamlit/elements/html.py +3 -4
  40. streamlit/elements/image.py +8 -9
  41. streamlit/elements/json.py +21 -2
  42. streamlit/elements/layouts.py +120 -31
  43. streamlit/elements/lib/built_in_chart_utils.py +96 -73
  44. streamlit/elements/lib/color_util.py +3 -3
  45. streamlit/elements/lib/column_config_utils.py +2 -4
  46. streamlit/elements/lib/column_types.py +14 -8
  47. streamlit/elements/lib/dialog.py +9 -5
  48. streamlit/elements/lib/file_uploader_utils.py +7 -2
  49. streamlit/elements/lib/image_utils.py +39 -40
  50. streamlit/elements/lib/js_number.py +4 -4
  51. streamlit/elements/lib/layout_utils.py +65 -1
  52. streamlit/elements/lib/mutable_status_container.py +14 -3
  53. streamlit/elements/lib/options_selector_utils.py +22 -12
  54. streamlit/elements/lib/pandas_styler_utils.py +25 -21
  55. streamlit/elements/lib/policies.py +6 -5
  56. streamlit/elements/lib/streamlit_plotly_theme.py +54 -53
  57. streamlit/elements/lib/subtitle_utils.py +6 -9
  58. streamlit/elements/lib/utils.py +20 -5
  59. streamlit/elements/map.py +32 -56
  60. streamlit/elements/markdown.py +101 -12
  61. streamlit/elements/media.py +78 -21
  62. streamlit/elements/metric.py +32 -16
  63. streamlit/elements/plotly_chart.py +15 -15
  64. streamlit/elements/progress.py +33 -15
  65. streamlit/elements/spinner.py +31 -6
  66. streamlit/elements/text.py +21 -1
  67. streamlit/elements/toast.py +1 -2
  68. streamlit/elements/vega_charts.py +54 -23
  69. streamlit/elements/widgets/audio_input.py +24 -7
  70. streamlit/elements/widgets/button.py +26 -19
  71. streamlit/elements/widgets/button_group.py +10 -15
  72. streamlit/elements/widgets/camera_input.py +27 -7
  73. streamlit/elements/widgets/chat.py +91 -38
  74. streamlit/elements/widgets/checkbox.py +45 -4
  75. streamlit/elements/widgets/color_picker.py +40 -17
  76. streamlit/elements/widgets/data_editor.py +76 -37
  77. streamlit/elements/widgets/file_uploader.py +42 -13
  78. streamlit/elements/widgets/multiselect.py +7 -10
  79. streamlit/elements/widgets/number_input.py +123 -47
  80. streamlit/elements/widgets/radio.py +59 -13
  81. streamlit/elements/widgets/select_slider.py +35 -30
  82. streamlit/elements/widgets/selectbox.py +56 -9
  83. streamlit/elements/widgets/slider.py +190 -99
  84. streamlit/elements/widgets/text_widgets.py +54 -8
  85. streamlit/elements/widgets/time_widgets.py +53 -14
  86. streamlit/elements/write.py +5 -8
  87. streamlit/env_util.py +2 -7
  88. streamlit/error_util.py +16 -9
  89. streamlit/errors.py +69 -48
  90. streamlit/external/langchain/streamlit_callback_handler.py +10 -5
  91. streamlit/file_util.py +27 -10
  92. streamlit/git_util.py +29 -24
  93. streamlit/hello/animation_demo.py +9 -9
  94. streamlit/hello/dataframe_demo.py +5 -5
  95. streamlit/hello/hello.py +1 -0
  96. streamlit/hello/mapping_demo.py +7 -8
  97. streamlit/hello/plotting_demo.py +3 -3
  98. streamlit/hello/streamlit_app.py +28 -26
  99. streamlit/hello/utils.py +2 -1
  100. streamlit/logger.py +10 -11
  101. streamlit/navigation/page.py +11 -8
  102. streamlit/proto/Audio_pb2.py +4 -3
  103. streamlit/proto/Audio_pb2.pyi +8 -1
  104. streamlit/proto/Block_pb2.py +38 -29
  105. streamlit/proto/Block_pb2.pyi +72 -4
  106. streamlit/proto/ClientState_pb2.py +4 -4
  107. streamlit/proto/ClientState_pb2.pyi +7 -2
  108. streamlit/proto/Code_pb2.py +4 -2
  109. streamlit/proto/Code_pb2.pyi +1 -0
  110. streamlit/proto/DataFrame_pb2.pyi +1 -1
  111. streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
  112. streamlit/proto/Element_pb2.py +5 -3
  113. streamlit/proto/Element_pb2.pyi +20 -3
  114. streamlit/proto/GapSize_pb2.py +29 -0
  115. streamlit/proto/GapSize_pb2.pyi +70 -0
  116. streamlit/proto/HeightConfig_pb2.py +27 -0
  117. streamlit/proto/HeightConfig_pb2.pyi +48 -0
  118. streamlit/proto/NamedDataSet_pb2.pyi +1 -1
  119. streamlit/proto/Navigation_pb2.py +3 -3
  120. streamlit/proto/Navigation_pb2.pyi +4 -0
  121. streamlit/proto/NewSession_pb2.py +18 -16
  122. streamlit/proto/NewSession_pb2.pyi +29 -3
  123. streamlit/proto/PageConfig_pb2.py +7 -7
  124. streamlit/proto/PageConfig_pb2.pyi +21 -1
  125. streamlit/proto/Video_pb2.py +8 -7
  126. streamlit/proto/Video_pb2.pyi +8 -1
  127. streamlit/proto/WidthConfig_pb2.py +2 -2
  128. streamlit/proto/WidthConfig_pb2.pyi +15 -1
  129. streamlit/runtime/__init__.py +1 -1
  130. streamlit/runtime/app_session.py +53 -40
  131. streamlit/runtime/caching/__init__.py +9 -9
  132. streamlit/runtime/caching/cache_data_api.py +36 -30
  133. streamlit/runtime/caching/cache_errors.py +4 -4
  134. streamlit/runtime/caching/cache_resource_api.py +8 -8
  135. streamlit/runtime/caching/cache_utils.py +15 -14
  136. streamlit/runtime/caching/cached_message_replay.py +14 -8
  137. streamlit/runtime/caching/hashing.py +91 -97
  138. streamlit/runtime/caching/legacy_cache_api.py +2 -2
  139. streamlit/runtime/caching/storage/cache_storage_protocol.py +1 -1
  140. streamlit/runtime/caching/storage/dummy_cache_storage.py +1 -1
  141. streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +12 -14
  142. streamlit/runtime/caching/storage/local_disk_cache_storage.py +6 -6
  143. streamlit/runtime/connection_factory.py +36 -36
  144. streamlit/runtime/context.py +58 -9
  145. streamlit/runtime/credentials.py +29 -40
  146. streamlit/runtime/forward_msg_queue.py +11 -11
  147. streamlit/runtime/fragment.py +7 -7
  148. streamlit/runtime/media_file_manager.py +3 -4
  149. streamlit/runtime/memory_media_file_storage.py +6 -5
  150. streamlit/runtime/memory_uploaded_file_manager.py +2 -2
  151. streamlit/runtime/metrics_util.py +11 -12
  152. streamlit/runtime/pages_manager.py +4 -6
  153. streamlit/runtime/runtime.py +8 -6
  154. streamlit/runtime/runtime_util.py +7 -6
  155. streamlit/runtime/scriptrunner/__init__.py +4 -4
  156. streamlit/runtime/scriptrunner/exec_code.py +12 -5
  157. streamlit/runtime/scriptrunner/magic.py +16 -12
  158. streamlit/runtime/scriptrunner/script_cache.py +1 -1
  159. streamlit/runtime/scriptrunner/script_runner.py +55 -34
  160. streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
  161. streamlit/runtime/scriptrunner_utils/script_requests.py +7 -4
  162. streamlit/runtime/scriptrunner_utils/script_run_context.py +10 -23
  163. streamlit/runtime/secrets.py +40 -35
  164. streamlit/runtime/session_manager.py +2 -1
  165. streamlit/runtime/state/__init__.py +5 -5
  166. streamlit/runtime/state/common.py +2 -2
  167. streamlit/runtime/state/query_params.py +13 -15
  168. streamlit/runtime/state/query_params_proxy.py +17 -13
  169. streamlit/runtime/state/safe_session_state.py +2 -2
  170. streamlit/runtime/state/session_state.py +52 -34
  171. streamlit/runtime/stats.py +2 -2
  172. streamlit/runtime/uploaded_file_manager.py +1 -1
  173. streamlit/runtime/websocket_session_manager.py +10 -6
  174. streamlit/source_util.py +8 -6
  175. streamlit/static/index.html +3 -17
  176. streamlit/static/manifest.json +1180 -0
  177. streamlit/static/static/css/{index.DqDwtg6_.css → index.CJVRHjQZ.css} +1 -1
  178. streamlit/static/static/js/{ErrorOutline.esm.DyIfDYvY.js → ErrorOutline.esm.6PVAQvlT.js} +1 -1
  179. streamlit/static/static/js/{FileDownload.esm.kF1FCxeJ.js → FileDownload.esm.BZQHC61b.js} +1 -1
  180. streamlit/static/static/js/{FileHelper.DKt6tIeO.js → FileHelper.Bn1VShMJ.js} +5 -5
  181. streamlit/static/static/js/{FormClearHelper.DpJR9YCu.js → FormClearHelper.CsFEiTNN.js} +1 -1
  182. streamlit/static/static/js/{Hooks.BT6PF2Zi.js → Hooks.DguOHQL1.js} +1 -1
  183. streamlit/static/static/js/{InputInstructions.BmnD4oa3.js → InputInstructions.CTYn2BJQ.js} +1 -1
  184. streamlit/static/static/js/{ProgressBar.Ch7VNdkM.js → ProgressBar.CPOGBKCi.js} +2 -2
  185. streamlit/static/static/js/{RenderInPortalIfExists.43tDswzK.js → RenderInPortalIfExists.BYu_CZaF.js} +1 -1
  186. streamlit/static/static/js/Toolbar.gXKw7ANv.js +1 -0
  187. streamlit/static/static/js/UploadFileInfo.0DCkpDDf.js +6 -0
  188. streamlit/static/static/js/{base-input.BjeC3XFX.js → base-input.DBYPj91R.js} +4 -4
  189. streamlit/static/static/js/{checkbox.DIVN0GOS.js → checkbox.BUm2vnNv.js} +2 -2
  190. streamlit/static/static/js/{createSuper.CKyBiJe0.js → createSuper.KD4RuZ-W.js} +1 -1
  191. streamlit/static/static/js/{data-grid-overlay-editor.CXpaXRk5.js → data-grid-overlay-editor.CUwpDfvI.js} +1 -1
  192. streamlit/static/static/js/{downloader.B-uWAyLB.js → downloader.CkDtclup.js} +1 -1
  193. streamlit/static/static/js/{es6._eGNfJ2i.js → es6.Dlcvh_r0.js} +2 -2
  194. streamlit/static/static/js/{iframeResizer.contentWindow.CebQfV1Q.js → iframeResizer.contentWindow.DOXlFfve.js} +1 -1
  195. streamlit/static/static/js/{index.EbMzSayc.js → index.B0cuGMAB.js} +25 -25
  196. streamlit/static/static/js/index.BCWTclSV.js +73 -0
  197. streamlit/static/static/js/index.BJY_fap7.js +1 -0
  198. streamlit/static/static/js/index.BL3l6dnk.js +1 -0
  199. streamlit/static/static/js/{index.CpV1hnf8.js → index.BMZzRZjB.js} +1 -1
  200. streamlit/static/static/js/{index.l6QfBDTC.js → index.BOzUTGDe.js} +1 -1
  201. streamlit/static/static/js/index.BYI5iO-o.js +1 -0
  202. streamlit/static/static/js/index.BYo0ywlm.js +783 -0
  203. streamlit/static/static/js/{index.CuUJHsRK.js → index.BYz9btsY.js} +1 -1
  204. streamlit/static/static/js/{index.C_nMqHLH.js → index.CCVzQz0Z.js} +2 -2
  205. streamlit/static/static/js/index.CD6FydK9.js +1 -0
  206. streamlit/static/static/js/index.CDYEqgC8.js +2 -0
  207. streamlit/static/static/js/{index.BAdBHmJD.js → index.CMP9c4xA.js} +1 -1
  208. streamlit/static/static/js/index.CN30QAPD.js +1 -0
  209. streamlit/static/static/js/{index.CtTgot1Z.js → index.CNqWQkTe.js} +1 -1
  210. streamlit/static/static/js/index.CaxS67Xz.js +1 -0
  211. streamlit/static/static/js/{index.HsXxdgGd.js → index.CbsT4sGW.js} +1 -1
  212. streamlit/static/static/js/index.ChAVlxpQ.js +1 -0
  213. streamlit/static/static/js/{index.BaYSBSaz.js → index.ClLMMmDd.js} +1 -1
  214. streamlit/static/static/js/{index.CxxktCLw.js → index.D-O9rQmV.js} +1 -1
  215. streamlit/static/static/js/{index.Coc8OVG7.js → index.D4k7VZZL.js} +1 -1
  216. streamlit/static/static/js/index.DLBi0Ar1.js +1 -0
  217. streamlit/static/static/js/index.DVq5XmJo.js +197 -0
  218. streamlit/static/static/js/{index.ClX0ambk.js → index.DZKmKXWw.js} +1 -1
  219. streamlit/static/static/js/index.DkaVx80F.js +1 -0
  220. streamlit/static/static/js/index.Dr968Klx.js +1 -0
  221. streamlit/static/static/js/{index.BaozEIL-.js → index.DtUYLn9j.js} +20 -20
  222. streamlit/static/static/js/index.DwjYSyhs.js +1 -0
  223. streamlit/static/static/js/index.DzrImxu4.js +1 -0
  224. streamlit/static/static/js/index.HyGsn4VM.js +1 -0
  225. streamlit/static/static/js/index.OwxC65od.js +12 -0
  226. streamlit/static/static/js/index.PZs7VZkC.js +1 -0
  227. streamlit/static/static/js/index.Voiqpj4q.js +1 -0
  228. streamlit/static/static/js/index.bSROvR-J.js +3 -0
  229. streamlit/static/static/js/index.oT9GD3l4.js +1 -0
  230. streamlit/static/static/js/{index.schmj9D9.js → index.qb-yAPH6.js} +255 -255
  231. streamlit/static/static/js/index.rJFy_Ygy.js +2 -0
  232. streamlit/static/static/js/{input.VQEe_bZy.js → input.CwQtEnFN.js} +2 -2
  233. streamlit/static/static/js/{memory.DGVHab07.js → memory.C5XaFIjR.js} +1 -1
  234. streamlit/static/static/js/{mergeWith.-RIuUGoA.js → mergeWith.DzwwH6AG.js} +1 -1
  235. streamlit/static/static/js/{number-overlay-editor.wzFLIbEE.js → number-overlay-editor.Dx0XqCkD.js} +1 -1
  236. streamlit/static/static/js/{possibleConstructorReturn.GIObu6rf.js → possibleConstructorReturn.CVfSu9Ws.js} +1 -1
  237. streamlit/static/static/js/{sandbox.DpjSeqe2.js → sandbox.BT0gdMXk.js} +1 -1
  238. streamlit/static/static/js/{textarea.Dz0J9LZe.js → textarea.DNCbrtbM.js} +2 -2
  239. streamlit/static/static/js/{timepicker.BLgJZnzX.js → timepicker.4UYJD9Ts.js} +1 -1
  240. streamlit/static/static/js/{toConsumableArray.0OZlxz7U.js → toConsumableArray.DUmnaVWV.js} +1 -1
  241. streamlit/static/static/js/{uniqueId.DbzplC8D.js → uniqueId.DUvh-GL8.js} +1 -1
  242. streamlit/static/static/js/{useBasicWidgetState.COJZng1S.js → useBasicWidgetState.Cwd7-jJa.js} +1 -1
  243. streamlit/static/static/js/useOnInputChange.DvemQrOM.js +1 -0
  244. streamlit/static/static/js/{withFullScreenWrapper.CzWvNbvi.js → withFullScreenWrapper.CiQ10ByU.js} +1 -1
  245. streamlit/static/static/media/SourceCodeVF-Italic.ttf.Ba1oaZG1.woff2 +0 -0
  246. streamlit/static/static/media/SourceCodeVF-Upright.ttf.BjWn63N-.woff2 +0 -0
  247. streamlit/static/static/media/SourceSansVF-Italic.ttf.Bt9VkdQ3.woff2 +0 -0
  248. streamlit/static/static/media/SourceSansVF-Upright.ttf.BsWL4Kly.woff2 +0 -0
  249. streamlit/static/static/media/SourceSerifVariable-Italic.ttf.CVdzAtxO.woff2 +0 -0
  250. streamlit/static/static/media/SourceSerifVariable-Roman.ttf.mdpVL9bi.woff2 +0 -0
  251. streamlit/string_util.py +14 -19
  252. streamlit/temporary_directory.py +13 -4
  253. streamlit/testing/v1/app_test.py +15 -10
  254. streamlit/testing/v1/element_tree.py +157 -178
  255. streamlit/testing/v1/local_script_runner.py +11 -15
  256. streamlit/testing/v1/util.py +11 -4
  257. streamlit/type_util.py +8 -12
  258. streamlit/url_util.py +1 -1
  259. streamlit/user_info.py +6 -5
  260. streamlit/util.py +25 -1
  261. streamlit/vendor/pympler/asizeof.py +3 -2
  262. streamlit/watcher/event_based_path_watcher.py +15 -1
  263. streamlit/watcher/folder_black_list.py +2 -2
  264. streamlit/watcher/local_sources_watcher.py +64 -18
  265. streamlit/watcher/path_watcher.py +6 -10
  266. streamlit/watcher/polling_path_watcher.py +8 -7
  267. streamlit/watcher/util.py +7 -6
  268. streamlit/web/bootstrap.py +16 -14
  269. streamlit/web/cli.py +52 -45
  270. streamlit/web/server/__init__.py +7 -3
  271. streamlit/web/server/app_static_file_handler.py +1 -1
  272. streamlit/web/server/authlib_tornado_integration.py +9 -4
  273. streamlit/web/server/browser_websocket_handler.py +8 -2
  274. streamlit/web/server/component_request_handler.py +14 -10
  275. streamlit/web/server/media_file_handler.py +14 -7
  276. streamlit/web/server/oauth_authlib_routes.py +41 -9
  277. streamlit/web/server/oidc_mixin.py +35 -17
  278. streamlit/web/server/routes.py +32 -22
  279. streamlit/web/server/server.py +6 -18
  280. streamlit/web/server/server_util.py +19 -9
  281. streamlit/web/server/stats_request_handler.py +7 -5
  282. streamlit/web/server/upload_file_request_handler.py +22 -19
  283. streamlit/web/server/websocket_headers.py +1 -1
  284. {streamlit-1.45.0.dist-info → streamlit-1.46.0.dist-info}/METADATA +4 -4
  285. streamlit-1.46.0.dist-info/RECORD +559 -0
  286. {streamlit-1.45.0.dist-info → streamlit-1.46.0.dist-info}/WHEEL +1 -1
  287. streamlit/elements/lib/event_utils.py +0 -39
  288. streamlit/static/static/js/Toolbar.HTGsjfCP.js +0 -1
  289. streamlit/static/static/js/UploadFileInfo.C-jY39rj.js +0 -1
  290. streamlit/static/static/js/index.B5TWFN5r.js +0 -1
  291. streamlit/static/static/js/index.BI9-p_-s.js +0 -3
  292. streamlit/static/static/js/index.BYHnDZYn.js +0 -1
  293. streamlit/static/static/js/index.B_M97aPz.js +0 -1
  294. streamlit/static/static/js/index.BdN5swP0.js +0 -1
  295. streamlit/static/static/js/index.BfCAp_Sj.js +0 -1
  296. streamlit/static/static/js/index.BqDl3eRM.js +0 -779
  297. streamlit/static/static/js/index.C0VtYb3T.js +0 -2
  298. streamlit/static/static/js/index.C1qW_Owy.js +0 -1
  299. streamlit/static/static/js/index.C4AcBARa.js +0 -1
  300. streamlit/static/static/js/index.CCOiJRk1.js +0 -1
  301. streamlit/static/static/js/index.COvpza5W.js +0 -1
  302. streamlit/static/static/js/index.C_9qGjbK.js +0 -2
  303. streamlit/static/static/js/index.CqISBfsc.js +0 -197
  304. streamlit/static/static/js/index.D1WOs2Ce.js +0 -1
  305. streamlit/static/static/js/index.DQljs-9e.js +0 -1
  306. streamlit/static/static/js/index.DZqX4P_2.js +0 -1
  307. streamlit/static/static/js/index.DajIfBOb.js +0 -1
  308. streamlit/static/static/js/index.DuOXre0H.js +0 -1
  309. streamlit/static/static/js/index.EWD98YhP.js +0 -1
  310. streamlit/static/static/js/index.LaZloCTl.js +0 -73
  311. streamlit/static/static/js/index.S_1klBoy.js +0 -1
  312. streamlit/static/static/js/index.b0Gf958T.js +0 -12
  313. streamlit/static/static/js/index.t--hEgTQ.js +0 -6
  314. streamlit/static/static/js/useOnInputChange.CgOwAHyw.js +0 -1
  315. streamlit/static/static/media/SourceCodePro-Bold.CFEfr7-q.woff2 +0 -0
  316. streamlit/static/static/media/SourceCodePro-BoldItalic.C-LkFXxa.woff2 +0 -0
  317. streamlit/static/static/media/SourceCodePro-Italic.CxFOx7N-.woff2 +0 -0
  318. streamlit/static/static/media/SourceCodePro-Regular.CBOlD63d.woff2 +0 -0
  319. streamlit/static/static/media/SourceCodePro-SemiBold.CFHwW3Wd.woff2 +0 -0
  320. streamlit/static/static/media/SourceCodePro-SemiBoldItalic.Cg2yRu82.woff2 +0 -0
  321. streamlit/static/static/media/SourceSansPro-Bold.-6c9oR8J.woff2 +0 -0
  322. streamlit/static/static/media/SourceSansPro-BoldItalic.DmM_grLY.woff2 +0 -0
  323. streamlit/static/static/media/SourceSansPro-Italic.I1ipWe7Q.woff2 +0 -0
  324. streamlit/static/static/media/SourceSansPro-Regular.DZLUzqI4.woff2 +0 -0
  325. streamlit/static/static/media/SourceSansPro-SemiBold.sKQIyTMz.woff2 +0 -0
  326. streamlit/static/static/media/SourceSansPro-SemiBoldItalic.C0wP0icr.woff2 +0 -0
  327. streamlit/static/static/media/SourceSerifPro-Bold.8TUnKj4x.woff2 +0 -0
  328. streamlit/static/static/media/SourceSerifPro-BoldItalic.CBVO7Ve7.woff2 +0 -0
  329. streamlit/static/static/media/SourceSerifPro-Italic.DkFgL2HZ.woff2 +0 -0
  330. streamlit/static/static/media/SourceSerifPro-Regular.CNJNET2S.woff2 +0 -0
  331. streamlit/static/static/media/SourceSerifPro-SemiBold.CHyh9GC5.woff2 +0 -0
  332. streamlit/static/static/media/SourceSerifPro-SemiBoldItalic.CBtz8sWN.woff2 +0 -0
  333. streamlit-1.45.0.dist-info/RECORD +0 -568
  334. {streamlit-1.45.0.data → streamlit-1.46.0.data}/scripts/streamlit.cmd +0 -0
  335. {streamlit-1.45.0.dist-info → streamlit-1.46.0.dist-info}/entry_points.txt +0 -0
  336. {streamlit-1.45.0.dist-info → streamlit-1.46.0.dist-info}/top_level.txt +0 -0
@@ -52,34 +52,10 @@ _About: TypeAlias = Literal["About", "about"]
52
52
  MenuKey: TypeAlias = Literal[_GetHelp, _ReportABug, _About]
53
53
  MenuItems: TypeAlias = Mapping[MenuKey, Union[str, None]]
54
54
 
55
- # Emojis recommended by https://share.streamlit.io/rensdimmendaal/emoji-recommender/main/app/streamlit.py
56
- # for the term "streamlit". Watch out for zero-width joiners,
57
- # as they won't parse correctly in the list() call!
58
55
  RANDOM_EMOJIS: Final = list(
59
56
  "🔥™🎉🚀🌌💣✨🌙🎆🎇💥🤩🤙🌛🤘⬆💡🤪🥂⚡💨🌠🎊🍿😛🔮🤟🌃🍃🍾💫▪🌴🎈🎬🌀🎄😝☔⛽🍂💃😎🍸🎨🥳☀😍🅱🌞😻🌟😜💦💅🦄😋😉👻🍁🤤👯🌻‼🌈👌🎃💛😚🔫🙌👽🍬🌅☁🍷👭☕🌚💁👅🥰🍜😌🎥🕺❕🧡☄💕🍻✅🌸🚬🤓🍹®☺💪😙☘🤠✊🤗🍵🤞😂💯😏📻🎂💗💜🌊❣🌝😘💆🤑🌿🦋😈⛄🚿😊🌹🥴😽💋😭🖤🙆👐⚪💟☃🙈🍭💻🥀🚗🤧🍝💎💓🤝💄💖🔞⁉⏰🕊🎧☠♥🌳🏾🙉⭐💊🍳🌎🙊💸❤🔪😆🌾✈📚💀🏠✌🏃🌵🚨💂🤫🤭😗😄🍒👏🙃🖖💞😅🎅🍄🆓👉💩🔊🤷⌚👸😇🚮💏👳🏽💘💿💉👠🎼🎶🎤👗❄🔐🎵🤒🍰👓🏄🌲🎮🙂📈🚙📍😵🗣❗🌺🙄👄🚘🥺🌍🏡♦💍🌱👑👙☑👾🍩🥶📣🏼🤣☯👵🍫➡🎀😃✋🍞🙇😹🙏👼🐝⚫🎁🍪🔨🌼👆👀😳🌏📖👃🎸👧💇🔒💙😞⛅🏻🍴😼🗿🍗♠🦁✔🤖☮🐢🐎💤😀🍺😁😴📺☹😲👍🎭💚🍆🍋🔵🏁🔴🔔🧐👰☎🏆🤡🐠📲🙋📌🐬✍🔑📱💰🐱💧🎓🍕👟🐣👫🍑😸🍦👁🆗🎯📢🚶🦅🐧💢🏀🚫💑🐟🌽🏊🍟💝💲🐍🍥🐸☝♣👊⚓❌🐯🏈📰🌧👿🐳💷🐺📞🆒🍀🤐🚲🍔👹🙍🌷🙎🐥💵🔝📸⚠❓🎩✂🍼😑⬇⚾🍎💔🐔⚽💭🏌🐷🍍✖🍇📝🍊🐙👋🤔🥊🗽🐑🐘🐰💐🐴♀🐦🍓✏👂🏴👇🆘😡🏉👩💌😺✝🐼🐒🐶👺🖕👬🍉🐻🐾⬅⏬▶👮🍌♂🔸👶🐮👪⛳🐐🎾🐕👴🐨🐊🔹©🎣👦👣👨👈💬⭕📹📷"
60
57
  )
61
58
 
62
- # Also pick out some vanity emojis.
63
- ENG_EMOJIS: Final = [
64
- "🎈", # st.balloons 🎈🎈
65
- "🤓", # Abhi
66
- "🏈", # Amey
67
- "🚲", # Thiago
68
- "🐧", # Matteo
69
- "🦒", # Ken
70
- "🐳", # Karrie
71
- "🕹️", # Jonathan
72
- "🇦🇲", # Henrikh
73
- "🎸", # Guido
74
- "🦈", # Austin
75
- "💎", # Emiliano
76
- "👩‍🎤", # Naomi
77
- "🧙‍♂️", # Jon
78
- "🐻", # Brandon
79
- "🎎", # James
80
- # TODO: Solicit emojis from the rest of Streamlit
81
- ]
82
-
83
59
 
84
60
  def _lower_clean_dict_keys(dict: MenuItems) -> dict[str, Any]:
85
61
  return {str(k).lower().strip(): v for k, v in dict.items()}
@@ -134,26 +110,34 @@ def _get_favicon_string(page_icon: PageIcon) -> str:
134
110
  def set_page_config(
135
111
  page_title: str | None = None,
136
112
  page_icon: PageIcon | None = None,
137
- layout: Layout = "centered",
138
- initial_sidebar_state: InitialSideBarState = "auto",
113
+ layout: Layout | None = None,
114
+ initial_sidebar_state: InitialSideBarState | None = None,
139
115
  menu_items: MenuItems | None = None,
140
116
  ) -> None:
141
117
  """
142
- Configures the default settings of the page.
118
+ Configure the default settings of the page.
143
119
 
144
- .. note::
145
- This must be the first Streamlit command used on an app page, and must only
146
- be set once per page.
120
+ This command can be called multiple times in a script run to dynamically
121
+ change the page configuration. The calls are additive, with each successive
122
+ call overriding only the parameters that are specified.
147
123
 
148
124
  Parameters
149
125
  ----------
150
126
  page_title: str or None
151
- The page title, shown in the browser tab. If None, defaults to the
152
- filename of the script ("app.py" would show "app Streamlit").
127
+ The page title, shown in the browser tab. If this is ``None``
128
+ (default), the page title is inherited from the previous call of
129
+ ``st.set_page_config``. If this is ``None`` and no previous call
130
+ exists, the page title is inferred from the page source.
131
+
132
+ If a page source is a Python file, its inferred title is derived from
133
+ the filename. If a page source is a callable object, its inferred title
134
+ is derived from the callable's name.
153
135
 
154
136
  page_icon : Anything supported by st.image (except list), str, or None
155
- The page favicon. If ``page_icon`` is ``None`` (default), the favicon
156
- will be a monochrome Streamlit logo.
137
+ The page favicon. If ``page_icon`` is ``None`` (default), the page icon
138
+ is inherited from the previous call of ``st.set_page_config``. If this
139
+ is ``None`` and no previous call exists, the favicon is a monochrome
140
+ Streamlit logo.
157
141
 
158
142
  In addition to the types supported by |st.image|_ (except list), the
159
143
  following strings are valid:
@@ -184,17 +168,29 @@ def set_page_config(
184
168
  .. |st.image| replace:: ``st.image``
185
169
  .. _st.image: https://docs.streamlit.io/develop/api-reference/media/st.image
186
170
 
187
- layout: "centered" or "wide"
188
- How the page content should be laid out. Defaults to "centered",
189
- which constrains the elements into a centered column of fixed width;
190
- "wide" uses the entire screen.
171
+ layout: "centered", "wide", or None
172
+ How the page content should be laid out. If this is ``None`` (default),
173
+ the page layout is inherited from the previous call of
174
+ ``st.set_page_config``. If this is ``None`` and no previous call
175
+ exists, the page layout is ``"centered"``.
176
+
177
+ ``"centered"`` constrains the elements into a centered column of fixed
178
+ width. ``"wide"`` uses the entire screen.
179
+
180
+ initial_sidebar_state: "auto", "expanded", "collapsed", or None
181
+ How the sidebar should start out. If this is ``None`` (default), the
182
+ sidebar state is inherited from the previous call of
183
+ ``st.set_page_config``. If no previous call exists, the sidebar state
184
+ is ``"auto"``.
191
185
 
192
- initial_sidebar_state: "auto", "expanded", or "collapsed"
193
- How the sidebar should start out. Defaults to "auto",
194
- which hides the sidebar on small devices and shows it otherwise.
195
- "expanded" shows the sidebar initially; "collapsed" hides it.
196
- In most cases, you should just use "auto", otherwise the app will
197
- look bad when embedded and viewed on mobile.
186
+ The folowing states are supported:
187
+
188
+ - ``"auto"``: The sidebar is hidden on small devices and shown otherwise.
189
+ - ``"expanded"``: The sidebar is shown initially.
190
+ - ``"collapsed"``: The sidebar is hidden initially.
191
+
192
+ In most cases, ``"auto"`` provides the best user experience across
193
+ devices of different sizes.
198
194
 
199
195
  menu_items: dict
200
196
  Configure the menu that appears on the top-right side of this app.
@@ -211,6 +207,8 @@ def set_page_config(
211
207
  If None, only shows Streamlit's default About text.
212
208
 
213
209
  The URL may also refer to an email address e.g. ``mailto:john@example.com``.
210
+ To remove an item that was specified in a previous call to
211
+ ``st.set_page_config``, set its value to ``None`` in the dictionary.
214
212
 
215
213
  Example
216
214
  -------
@@ -242,7 +240,11 @@ def set_page_config(
242
240
  pb_layout = PageConfigProto.CENTERED
243
241
  elif layout == "wide":
244
242
  pb_layout = PageConfigProto.WIDE
243
+ elif layout is None:
244
+ # Allows for multiple (additive) calls to set_page_config
245
+ pb_layout = PageConfigProto.LAYOUT_UNSET
245
246
  else:
247
+ # Note: Pylance incorrectly notes this error as unreachable
246
248
  raise StreamlitInvalidPageLayoutError(layout=layout)
247
249
 
248
250
  msg.page_config_changed.layout = pb_layout
@@ -254,7 +256,11 @@ def set_page_config(
254
256
  pb_sidebar_state = PageConfigProto.EXPANDED
255
257
  elif initial_sidebar_state == "collapsed":
256
258
  pb_sidebar_state = PageConfigProto.COLLAPSED
259
+ elif initial_sidebar_state is None:
260
+ # Allows for multiple (additive) calls to set_page_config
261
+ pb_sidebar_state = PageConfigProto.SIDEBAR_UNSET
257
262
  else:
263
+ # Note: Pylance incorrectly notes this error as unreachable
258
264
  raise StreamlitInvalidSidebarStateError(
259
265
  initial_sidebar_state=initial_sidebar_state
260
266
  )
@@ -274,12 +280,13 @@ def set_page_config(
274
280
 
275
281
 
276
282
  def get_random_emoji() -> str:
277
- # Weigh our emojis 10x, cuz we're awesome!
278
283
  # TODO: fix the random seed with a hash of the user's app code, for stability?
279
- return random.choice(RANDOM_EMOJIS + 10 * ENG_EMOJIS)
284
+ return random.choice(RANDOM_EMOJIS) # noqa: S311
280
285
 
281
286
 
282
- def set_menu_items_proto(lowercase_menu_items, menu_items_proto) -> None:
287
+ def set_menu_items_proto(
288
+ lowercase_menu_items: MenuItems, menu_items_proto: PageConfigProto.MenuItems
289
+ ) -> None:
283
290
  if GET_HELP_KEY in lowercase_menu_items:
284
291
  if lowercase_menu_items[GET_HELP_KEY] is not None:
285
292
  menu_items_proto.get_help_url = lowercase_menu_items[GET_HELP_KEY]
@@ -295,6 +302,9 @@ def set_menu_items_proto(lowercase_menu_items, menu_items_proto) -> None:
295
302
  if ABOUT_KEY in lowercase_menu_items:
296
303
  if lowercase_menu_items[ABOUT_KEY] is not None:
297
304
  menu_items_proto.about_section_md = dedent(lowercase_menu_items[ABOUT_KEY])
305
+ else:
306
+ # For multiple calls to set_page_config, clears previously set about markdown
307
+ menu_items_proto.clear_about_md = True
298
308
 
299
309
 
300
310
  def validate_menu_items(menu_items: MenuItems) -> None:
@@ -40,7 +40,7 @@ class BaseCustomComponent(ABC):
40
40
  path: str | None = None,
41
41
  url: str | None = None,
42
42
  module_name: str | None = None,
43
- ):
43
+ ) -> None:
44
44
  if (path is None and url is None) or (path is not None and url is not None):
45
45
  raise StreamlitAPIException(
46
46
  "Either 'path' or 'url' must be set, but not both."
@@ -56,12 +56,12 @@ class BaseCustomComponent(ABC):
56
56
 
57
57
  def __call__(
58
58
  self,
59
- *args,
59
+ *args: Any,
60
60
  default: Any = None,
61
61
  key: str | None = None,
62
62
  on_change: WidgetCallback | None = None,
63
63
  tab_index: int | None = None,
64
- **kwargs,
64
+ **kwargs: Any,
65
65
  ) -> Any:
66
66
  """An alias for create_instance."""
67
67
  return self.create_instance(
@@ -99,24 +99,24 @@ class BaseCustomComponent(ABC):
99
99
  return f"'{self.name}': {self.path if self.path is not None else self.url}"
100
100
 
101
101
  @abstractmethod
102
- def __eq__(self, other) -> bool:
102
+ def __eq__(self, other: object) -> bool:
103
103
  """Equality operator."""
104
104
  return NotImplemented
105
105
 
106
106
  @abstractmethod
107
- def __ne__(self, other) -> bool:
107
+ def __ne__(self, other: object) -> bool:
108
108
  """Inequality operator."""
109
109
  return NotImplemented
110
110
 
111
111
  @abstractmethod
112
112
  def create_instance(
113
113
  self,
114
- *args,
114
+ *args: Any,
115
115
  default: Any = None,
116
116
  key: str | None = None,
117
117
  on_change: WidgetCallback | None = None,
118
118
  tab_index: int | None = None,
119
- **kwargs,
119
+ **kwargs: Any,
120
120
  ) -> Any:
121
121
  """Create a new instance of the component.
122
122
 
@@ -33,7 +33,8 @@ def _get_module_name(caller_frame: FrameType) -> str:
33
33
  # Get the caller's module name. `__name__` gives us the module's
34
34
  # fully-qualified name, which includes its package.
35
35
  module = inspect.getmodule(caller_frame)
36
- assert module is not None
36
+ if module is None:
37
+ raise RuntimeError("module is None. This should never happen.")
37
38
  module_name = module.__name__
38
39
 
39
40
  # If the caller was the main module that was executed (that is, if the
@@ -96,10 +97,13 @@ def declare_component(
96
97
 
97
98
  # Get our stack frame.
98
99
  current_frame: FrameType | None = inspect.currentframe()
99
- assert current_frame is not None
100
+ if current_frame is None:
101
+ raise RuntimeError("current_frame is None. This should never happen.")
100
102
  # Get the stack frame of our calling function.
101
103
  caller_frame = current_frame.f_back
102
- assert caller_frame is not None
104
+ if caller_frame is None:
105
+ raise RuntimeError("caller_frame is None. This should never happen.")
106
+
103
107
  module_name = _get_module_name(caller_frame)
104
108
 
105
109
  # Build the component name.
@@ -32,7 +32,7 @@ from streamlit.runtime.state import register_widget
32
32
 
33
33
  __all__ = [
34
34
  "CustomComponent",
35
- "declare_component",
36
35
  "MarshallComponentException",
36
+ "declare_component",
37
37
  "register_widget",
38
38
  ]
@@ -48,12 +48,12 @@ class CustomComponent(BaseCustomComponent):
48
48
 
49
49
  def __call__(
50
50
  self,
51
- *args,
51
+ *args: Any,
52
52
  default: Any = None,
53
53
  key: str | None = None,
54
54
  on_change: WidgetCallback | None = None,
55
55
  tab_index: int | None = None,
56
- **kwargs,
56
+ **kwargs: Any,
57
57
  ) -> Any:
58
58
  """An alias for create_instance."""
59
59
  return self.create_instance(
@@ -68,12 +68,12 @@ class CustomComponent(BaseCustomComponent):
68
68
  @gather_metrics("create_instance")
69
69
  def create_instance(
70
70
  self,
71
- *args,
71
+ *args: Any,
72
72
  default: Any = None,
73
73
  key: str | None = None,
74
74
  on_change: WidgetCallback | None = None,
75
75
  tab_index: int | None = None,
76
- **kwargs,
76
+ **kwargs: Any,
77
77
  ) -> Any:
78
78
  """Create a new instance of the component.
79
79
 
@@ -183,7 +183,7 @@ And if you're using Streamlit Cloud, add "pyarrow" to your requirements.txt."""
183
183
  # other arguments change, and the component's iframe won't be
184
184
  # remounted on the frontend.
185
185
 
186
- def marshall_element_args():
186
+ def marshall_element_args() -> None:
187
187
  element.component_instance.json_args = serialized_json_args
188
188
  element.component_instance.special_args.extend(special_args)
189
189
 
@@ -210,7 +210,7 @@ And if you're using Streamlit Cloud, add "pyarrow" to your requirements.txt."""
210
210
  )
211
211
  element.component_instance.id = computed_id
212
212
 
213
- def deserialize_component(ui_value, widget_id=""):
213
+ def deserialize_component(ui_value: Any) -> Any:
214
214
  # ui_value is an object from json, an ArrowTable proto, or a bytearray
215
215
  return ui_value
216
216
 
@@ -243,7 +243,7 @@ And if you're using Streamlit Cloud, add "pyarrow" to your requirements.txt."""
243
243
  dg._enqueue("component_instance", element.component_instance)
244
244
  return return_value
245
245
 
246
- def __eq__(self, other) -> bool:
246
+ def __eq__(self, other: object) -> bool:
247
247
  """Equality operator."""
248
248
  return (
249
249
  isinstance(other, CustomComponent)
@@ -253,7 +253,7 @@ And if you're using Streamlit Cloud, add "pyarrow" to your requirements.txt."""
253
253
  and self.module_name == other.module_name
254
254
  )
255
255
 
256
- def __ne__(self, other) -> bool:
256
+ def __ne__(self, other: object) -> bool:
257
257
  """Inequality operator."""
258
258
 
259
259
  # we have to use "not X == Y"" here because if we use "X != Y"