streamlit 1.50.0__py3-none-any.whl → 1.51.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.
- streamlit/__init__.py +4 -1
- streamlit/commands/navigation.py +4 -6
- streamlit/commands/page_config.py +4 -6
- streamlit/components/v2/__init__.py +458 -0
- streamlit/components/v2/bidi_component/__init__.py +20 -0
- streamlit/components/v2/bidi_component/constants.py +29 -0
- streamlit/components/v2/bidi_component/main.py +386 -0
- streamlit/components/v2/bidi_component/serialization.py +265 -0
- streamlit/components/v2/bidi_component/state.py +92 -0
- streamlit/components/v2/component_definition_resolver.py +143 -0
- streamlit/components/v2/component_file_watcher.py +403 -0
- streamlit/components/v2/component_manager.py +431 -0
- streamlit/components/v2/component_manifest_handler.py +122 -0
- streamlit/components/v2/component_path_utils.py +245 -0
- streamlit/components/v2/component_registry.py +409 -0
- streamlit/components/v2/get_bidi_component_manager.py +51 -0
- streamlit/components/v2/manifest_scanner.py +615 -0
- streamlit/components/v2/presentation.py +198 -0
- streamlit/components/v2/types.py +324 -0
- streamlit/config.py +456 -53
- streamlit/config_option.py +4 -1
- streamlit/config_util.py +650 -1
- streamlit/dataframe_util.py +15 -8
- streamlit/delta_generator.py +6 -4
- streamlit/delta_generator_singletons.py +3 -1
- streamlit/deprecation_util.py +17 -6
- streamlit/elements/arrow.py +37 -9
- streamlit/elements/deck_gl_json_chart.py +97 -39
- streamlit/elements/dialog_decorator.py +2 -1
- streamlit/elements/exception.py +3 -1
- streamlit/elements/graphviz_chart.py +1 -3
- streamlit/elements/heading.py +3 -5
- streamlit/elements/image.py +2 -4
- streamlit/elements/layouts.py +31 -11
- streamlit/elements/lib/built_in_chart_utils.py +1 -3
- streamlit/elements/lib/color_util.py +8 -18
- streamlit/elements/lib/column_config_utils.py +4 -8
- streamlit/elements/lib/column_types.py +40 -12
- streamlit/elements/lib/dialog.py +2 -2
- streamlit/elements/lib/image_utils.py +3 -5
- streamlit/elements/lib/layout_utils.py +50 -13
- streamlit/elements/lib/mutable_status_container.py +2 -2
- streamlit/elements/lib/options_selector_utils.py +2 -2
- streamlit/elements/lib/utils.py +4 -4
- streamlit/elements/map.py +80 -37
- streamlit/elements/media.py +5 -7
- streamlit/elements/metric.py +3 -5
- streamlit/elements/pdf.py +2 -4
- streamlit/elements/plotly_chart.py +125 -17
- streamlit/elements/progress.py +2 -4
- streamlit/elements/space.py +113 -0
- streamlit/elements/vega_charts.py +339 -148
- streamlit/elements/widgets/audio_input.py +5 -5
- streamlit/elements/widgets/button.py +2 -4
- streamlit/elements/widgets/button_group.py +33 -7
- streamlit/elements/widgets/camera_input.py +2 -4
- streamlit/elements/widgets/chat.py +7 -1
- streamlit/elements/widgets/color_picker.py +1 -1
- streamlit/elements/widgets/data_editor.py +28 -24
- streamlit/elements/widgets/file_uploader.py +5 -10
- streamlit/elements/widgets/multiselect.py +4 -3
- streamlit/elements/widgets/number_input.py +2 -4
- streamlit/elements/widgets/radio.py +10 -3
- streamlit/elements/widgets/select_slider.py +8 -5
- streamlit/elements/widgets/selectbox.py +6 -3
- streamlit/elements/widgets/slider.py +38 -42
- streamlit/elements/widgets/time_widgets.py +6 -12
- streamlit/elements/write.py +27 -6
- streamlit/emojis.py +1 -1
- streamlit/errors.py +115 -0
- streamlit/hello/hello.py +8 -0
- streamlit/hello/utils.py +2 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/navigation/page.py +4 -1
- streamlit/proto/ArrowData_pb2.py +27 -0
- streamlit/proto/ArrowData_pb2.pyi +46 -0
- streamlit/proto/BidiComponent_pb2.py +34 -0
- streamlit/proto/BidiComponent_pb2.pyi +153 -0
- streamlit/proto/Block_pb2.py +7 -7
- streamlit/proto/Block_pb2.pyi +4 -1
- streamlit/proto/DeckGlJsonChart_pb2.py +10 -4
- streamlit/proto/DeckGlJsonChart_pb2.pyi +9 -3
- streamlit/proto/Element_pb2.py +5 -3
- streamlit/proto/Element_pb2.pyi +14 -4
- streamlit/proto/HeightConfig_pb2.py +2 -2
- streamlit/proto/HeightConfig_pb2.pyi +6 -3
- streamlit/proto/NewSession_pb2.py +18 -18
- streamlit/proto/NewSession_pb2.pyi +25 -6
- streamlit/proto/PlotlyChart_pb2.py +8 -6
- streamlit/proto/PlotlyChart_pb2.pyi +3 -1
- streamlit/proto/Space_pb2.py +27 -0
- streamlit/proto/Space_pb2.pyi +42 -0
- streamlit/proto/WidgetStates_pb2.py +2 -2
- streamlit/proto/WidgetStates_pb2.pyi +13 -3
- streamlit/proto/WidthConfig_pb2.py +2 -2
- streamlit/proto/WidthConfig_pb2.pyi +6 -3
- streamlit/runtime/app_session.py +27 -1
- streamlit/runtime/caching/cache_data_api.py +4 -4
- streamlit/runtime/caching/cache_errors.py +4 -1
- streamlit/runtime/caching/cache_resource_api.py +3 -2
- streamlit/runtime/caching/cache_utils.py +2 -1
- streamlit/runtime/caching/cached_message_replay.py +3 -3
- streamlit/runtime/caching/hashing.py +3 -4
- streamlit/runtime/caching/legacy_cache_api.py +2 -1
- streamlit/runtime/connection_factory.py +1 -3
- streamlit/runtime/forward_msg_queue.py +4 -1
- streamlit/runtime/fragment.py +2 -1
- streamlit/runtime/memory_media_file_storage.py +1 -1
- streamlit/runtime/metrics_util.py +6 -2
- streamlit/runtime/runtime.py +14 -0
- streamlit/runtime/scriptrunner/exec_code.py +2 -1
- streamlit/runtime/scriptrunner/script_runner.py +2 -2
- streamlit/runtime/scriptrunner_utils/script_run_context.py +3 -6
- streamlit/runtime/secrets.py +2 -4
- streamlit/runtime/session_manager.py +3 -1
- streamlit/runtime/state/common.py +30 -5
- streamlit/runtime/state/presentation.py +85 -0
- streamlit/runtime/state/safe_session_state.py +2 -2
- streamlit/runtime/state/session_state.py +220 -16
- streamlit/runtime/state/widgets.py +19 -3
- streamlit/runtime/websocket_session_manager.py +3 -1
- streamlit/source_util.py +2 -2
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +243 -226
- streamlit/static/static/css/{index.CIiu7Ygf.css → index.BpABIXK9.css} +1 -1
- streamlit/static/static/css/index.DgR7E2CV.css +1 -0
- streamlit/static/static/js/{ErrorOutline.esm.DUpR0_Ka.js → ErrorOutline.esm.YoJdlW1p.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.CN4j9-1w.js → FileDownload.esm.Ddx8VEYy.js} +1 -1
- streamlit/static/static/js/{FileHelper.CaIUKG91.js → FileHelper.90EtOmj9.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DTcdrasw.js → FormClearHelper.BB1Km6eP.js} +1 -1
- streamlit/static/static/js/InputInstructions.jhH15PqV.js +1 -0
- streamlit/static/static/js/{Particles.CElH0XX2.js → Particles.DUsputn1.js} +1 -1
- streamlit/static/static/js/{ProgressBar.DetlP5aY.js → ProgressBar.DLY8H6nE.js} +1 -1
- streamlit/static/static/js/{Toolbar.C77ar7rq.js → Toolbar.D8nHCkuz.js} +1 -1
- streamlit/static/static/js/{base-input.BQft14La.js → base-input.CJGiNqed.js} +3 -3
- streamlit/static/static/js/{checkbox.yZOfXCeX.js → checkbox.Cpdd482O.js} +1 -1
- streamlit/static/static/js/{createSuper.Dh9w1cs8.js → createSuper.CuQIogbW.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DcuHuCyW.js → data-grid-overlay-editor.2Ufgxc6y.js} +1 -1
- streamlit/static/static/js/{downloader.MeHtkq8r.js → downloader.CN0K7xlu.js} +1 -1
- streamlit/static/static/js/{es6.VpBPGCnM.js → es6.BJcsVXQ0.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.yMw_ARIL.js → iframeResizer.contentWindow.XzUvQqcZ.js} +1 -1
- streamlit/static/static/js/index.B1ZQh4P1.js +1 -0
- streamlit/static/static/js/index.BKstZk0M.js +27 -0
- streamlit/static/static/js/{index.Cnpi3o3E.js → index.BMcFsUee.js} +1 -1
- streamlit/static/static/js/{index.DKv_lNO7.js → index.BR-IdcTb.js} +1 -1
- streamlit/static/static/js/{index.FFOzOWzC.js → index.B_dWA3vd.js} +1 -1
- streamlit/static/static/js/{index.Bj9JgOEC.js → index.BgnZEMVh.js} +1 -1
- streamlit/static/static/js/{index.Bxz2yX3P.js → index.BohqXifI.js} +1 -1
- streamlit/static/static/js/{index.Dbe-Q3C-.js → index.Br5nxKNj.js} +1 -1
- streamlit/static/static/js/{index.BjCwMzj4.js → index.BrIKVbNc.js} +2 -2
- streamlit/static/static/js/index.BtWUPzle.js +1 -0
- streamlit/static/static/js/{index.CGYqqs6j.js → index.C0RLraek.js} +1 -1
- streamlit/static/static/js/{index.D2QEXQq_.js → index.CAIjskgG.js} +1 -1
- streamlit/static/static/js/{index.6xX1278W.js → index.CAj-7vWz.js} +131 -157
- streamlit/static/static/js/{index.DK7hD7_w.js → index.CMtEit2O.js} +1 -1
- streamlit/static/static/js/{index.DNLrMXgm.js → index.CkRlykEE.js} +1 -1
- streamlit/static/static/js/{index.ClELlchS.js → index.CmN3FXfI.js} +1 -1
- streamlit/static/static/js/{index.GRUzrudl.js → index.CwbFI1_-.js} +1 -1
- streamlit/static/static/js/{index.Ctn27_AE.js → index.CxIUUfab.js} +27 -27
- streamlit/static/static/js/index.D2KPNy7e.js +1 -0
- streamlit/static/static/js/{index.B0H9IXUJ.js → index.D3GPA5k4.js} +3 -3
- streamlit/static/static/js/{index.BycLveZ4.js → index.DGAh7DMq.js} +1 -1
- streamlit/static/static/js/index.DKb_NvmG.js +197 -0
- streamlit/static/static/js/{index.BPQo7BKk.js → index.DMqgUYKq.js} +1 -1
- streamlit/static/static/js/{index.CH1tqnSs.js → index.DOFlg3dS.js} +1 -1
- streamlit/static/static/js/{index.64ejlaaT.js → index.DPUXkcQL.js} +1 -1
- streamlit/static/static/js/{index.B-hiXRzw.js → index.DX1xY89g.js} +1 -1
- streamlit/static/static/js/index.DYATBCsq.js +2 -0
- streamlit/static/static/js/{index.DHh-U0dK.js → index.DaSmGJ76.js} +3 -3
- streamlit/static/static/js/{index.DuxqVQpd.js → index.Dd7bMeLP.js} +1 -1
- streamlit/static/static/js/{index.B4cAbHP6.js → index.DjmmgI5U.js} +1 -1
- streamlit/static/static/js/{index.DcPNYEUo.js → index.Dq56CyM2.js} +1 -1
- streamlit/static/static/js/{index.CiAQIz1H.js → index.DuiXaS5_.js} +1 -1
- streamlit/static/static/js/index.DvFidMLe.js +2 -0
- streamlit/static/static/js/{index.C9BdUqTi.js → index.DwkhC5Pc.js} +1 -1
- streamlit/static/static/js/{index.B4dUQfni.js → index.Q-3sFn1v.js} +1 -1
- streamlit/static/static/js/{index.CMItVsFA.js → index.QJ5QO9sJ.js} +1 -1
- streamlit/static/static/js/{index.CTBk8Vk2.js → index.VwTaeety.js} +1 -1
- streamlit/static/static/js/{index.Ck8rQ9OL.js → index.YOqQbeX8.js} +1 -1
- streamlit/static/static/js/{input.s6pjQ49A.js → input.D4MN_FzN.js} +1 -1
- streamlit/static/static/js/{memory.Cuvsdfrl.js → memory.DrZjtdGT.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DdgVR5m3.js → number-overlay-editor.DRwAw1In.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.CqidKeei.js → possibleConstructorReturn.exeeJQEP.js} +1 -1
- streamlit/static/static/js/record.B-tDciZb.js +1 -0
- streamlit/static/static/js/{sandbox.CCQREcJx.js → sandbox.ClO3IuUr.js} +1 -1
- streamlit/static/static/js/{timepicker.mkJF97Bb.js → timepicker.DAhu-vcF.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.De7I7KVR.js → toConsumableArray.DNbljYEC.js} +1 -1
- streamlit/static/static/js/{uniqueId.RI1LJdtz.js → uniqueId.oG4Gvj1v.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.CedkNjUW.js → useBasicWidgetState.D6sOH6oI.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.Ca7w8dVs.js → useTextInputAutoExpand.4u3_GcuN.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.DeXelfRH.js → useUpdateUiValue.F2R3eTeR.js} +1 -1
- streamlit/static/static/js/wavesurfer.esm.vI8Eid4k.js +73 -0
- streamlit/static/static/js/{withFullScreenWrapper.C3561XxJ.js → withFullScreenWrapper.zothJIsI.js} +1 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
- streamlit/string_util.py +1 -3
- streamlit/testing/v1/app_test.py +2 -2
- streamlit/testing/v1/element_tree.py +23 -9
- streamlit/testing/v1/util.py +2 -2
- streamlit/type_util.py +3 -4
- streamlit/url_util.py +1 -3
- streamlit/user_info.py +1 -2
- streamlit/util.py +3 -1
- streamlit/watcher/event_based_path_watcher.py +23 -12
- streamlit/watcher/local_sources_watcher.py +11 -1
- streamlit/watcher/path_watcher.py +9 -6
- streamlit/watcher/polling_path_watcher.py +4 -1
- streamlit/watcher/util.py +2 -2
- streamlit/web/cli.py +51 -22
- streamlit/web/server/bidi_component_request_handler.py +193 -0
- streamlit/web/server/component_file_utils.py +97 -0
- streamlit/web/server/component_request_handler.py +8 -21
- streamlit/web/server/oidc_mixin.py +3 -1
- streamlit/web/server/routes.py +2 -2
- streamlit/web/server/server.py +9 -0
- streamlit/web/server/server_util.py +3 -1
- streamlit/web/server/upload_file_request_handler.py +3 -1
- {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/METADATA +4 -5
- {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/RECORD +222 -194
- streamlit/static/static/css/index.CHEnSPGk.css +0 -1
- streamlit/static/static/js/Hooks.BRba_Own.js +0 -1
- streamlit/static/static/js/InputInstructions.xnSDuYeQ.js +0 -1
- streamlit/static/static/js/index.Baqa90pe.js +0 -2
- streamlit/static/static/js/index.Bm3VbPB5.js +0 -1
- streamlit/static/static/js/index.CFMf5_ez.js +0 -197
- streamlit/static/static/js/index.Cj7DSzVR.js +0 -73
- streamlit/static/static/js/index.DH71Ezyj.js +0 -1
- streamlit/static/static/js/index.DW0Grddz.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DeCZgS-4.woff2 +0 -0
- {streamlit-1.50.0.data → streamlit-1.51.0.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/WHEEL +0 -0
- {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/entry_points.txt +0 -0
- {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/top_level.txt +0 -0
|
@@ -299,7 +299,7 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
299
299
|
HEADING_FONT_SIZES_FIELD_NUMBER: builtins.int
|
|
300
300
|
HEADING_FONT_WEIGHTS_FIELD_NUMBER: builtins.int
|
|
301
301
|
SHOW_SIDEBAR_BORDER_FIELD_NUMBER: builtins.int
|
|
302
|
-
|
|
302
|
+
CODE_TEXT_COLOR_FIELD_NUMBER: builtins.int
|
|
303
303
|
CODE_BACKGROUND_COLOR_FIELD_NUMBER: builtins.int
|
|
304
304
|
DATAFRAME_HEADER_BACKGROUND_COLOR_FIELD_NUMBER: builtins.int
|
|
305
305
|
CHART_CATEGORICAL_COLORS_FIELD_NUMBER: builtins.int
|
|
@@ -325,6 +325,9 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
325
325
|
GREEN_TEXT_COLOR_FIELD_NUMBER: builtins.int
|
|
326
326
|
VIOLET_TEXT_COLOR_FIELD_NUMBER: builtins.int
|
|
327
327
|
GRAY_TEXT_COLOR_FIELD_NUMBER: builtins.int
|
|
328
|
+
SIDEBAR_FIELD_NUMBER: builtins.int
|
|
329
|
+
LIGHT_FIELD_NUMBER: builtins.int
|
|
330
|
+
DARK_FIELD_NUMBER: builtins.int
|
|
328
331
|
primary_color: builtins.str
|
|
329
332
|
secondary_background_color: builtins.str
|
|
330
333
|
background_color: builtins.str
|
|
@@ -353,6 +356,7 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
353
356
|
code_font_weight: builtins.int
|
|
354
357
|
code_font_size: builtins.str
|
|
355
358
|
show_sidebar_border: builtins.bool
|
|
359
|
+
code_text_color: builtins.str
|
|
356
360
|
code_background_color: builtins.str
|
|
357
361
|
dataframe_header_background_color: builtins.str
|
|
358
362
|
red_color: builtins.str
|
|
@@ -396,11 +400,17 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
396
400
|
@property
|
|
397
401
|
def heading_font_weights(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
|
|
398
402
|
@property
|
|
399
|
-
def sidebar(self) -> global___CustomThemeConfig: ...
|
|
400
|
-
@property
|
|
401
403
|
def chart_categorical_colors(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
|
402
404
|
@property
|
|
403
405
|
def chart_sequential_colors(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
|
406
|
+
@property
|
|
407
|
+
def sidebar(self) -> global___CustomThemeConfig:
|
|
408
|
+
"""Theme sections:"""
|
|
409
|
+
|
|
410
|
+
@property
|
|
411
|
+
def light(self) -> global___CustomThemeConfig: ...
|
|
412
|
+
@property
|
|
413
|
+
def dark(self) -> global___CustomThemeConfig: ...
|
|
404
414
|
def __init__(
|
|
405
415
|
self,
|
|
406
416
|
*,
|
|
@@ -434,7 +444,7 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
434
444
|
heading_font_sizes: collections.abc.Iterable[builtins.str] | None = ...,
|
|
435
445
|
heading_font_weights: collections.abc.Iterable[builtins.int] | None = ...,
|
|
436
446
|
show_sidebar_border: builtins.bool | None = ...,
|
|
437
|
-
|
|
447
|
+
code_text_color: builtins.str | None = ...,
|
|
438
448
|
code_background_color: builtins.str | None = ...,
|
|
439
449
|
dataframe_header_background_color: builtins.str | None = ...,
|
|
440
450
|
chart_categorical_colors: collections.abc.Iterable[builtins.str] | None = ...,
|
|
@@ -460,9 +470,12 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
460
470
|
green_text_color: builtins.str | None = ...,
|
|
461
471
|
violet_text_color: builtins.str | None = ...,
|
|
462
472
|
gray_text_color: builtins.str | None = ...,
|
|
473
|
+
sidebar: global___CustomThemeConfig | None = ...,
|
|
474
|
+
light: global___CustomThemeConfig | None = ...,
|
|
475
|
+
dark: global___CustomThemeConfig | None = ...,
|
|
463
476
|
) -> None: ...
|
|
464
|
-
def HasField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "_base_font_weight", b"_base_font_weight", "_base_radius", b"_base_radius", "_blue_background_color", b"_blue_background_color", "_blue_color", b"_blue_color", "_blue_text_color", b"_blue_text_color", "_border_color", b"_border_color", "_button_radius", b"_button_radius", "_code_background_color", b"_code_background_color", "_code_font_size", b"_code_font_size", "_code_font_weight", b"_code_font_weight", "_dataframe_border_color", b"_dataframe_border_color", "_dataframe_header_background_color", b"_dataframe_header_background_color", "_gray_background_color", b"_gray_background_color", "_gray_color", b"_gray_color", "_gray_text_color", b"_gray_text_color", "_green_background_color", b"_green_background_color", "_green_color", b"_green_color", "_green_text_color", b"_green_text_color", "_link_color", b"_link_color", "_link_underline", b"_link_underline", "_orange_background_color", b"_orange_background_color", "_orange_color", b"_orange_color", "_orange_text_color", b"_orange_text_color", "_red_background_color", b"_red_background_color", "_red_color", b"_red_color", "_red_text_color", b"_red_text_color", "_show_sidebar_border", b"_show_sidebar_border", "_show_widget_border", b"_show_widget_border", "_sidebar", b"_sidebar", "_violet_background_color", b"_violet_background_color", "_violet_color", b"_violet_color", "_violet_text_color", b"_violet_text_color", "_yellow_background_color", b"_yellow_background_color", "_yellow_color", b"_yellow_color", "_yellow_text_color", b"_yellow_text_color", "base_font_size", b"base_font_size", "base_font_weight", b"base_font_weight", "base_radius", b"base_radius", "blue_background_color", b"blue_background_color", "blue_color", b"blue_color", "blue_text_color", b"blue_text_color", "border_color", b"border_color", "button_radius", b"button_radius", "code_background_color", b"code_background_color", "code_font_size", b"code_font_size", "code_font_weight", b"code_font_weight", "dataframe_border_color", b"dataframe_border_color", "dataframe_header_background_color", b"dataframe_header_background_color", "font_sizes", b"font_sizes", "gray_background_color", b"gray_background_color", "gray_color", b"gray_color", "gray_text_color", b"gray_text_color", "green_background_color", b"green_background_color", "green_color", b"green_color", "green_text_color", b"green_text_color", "link_color", b"link_color", "link_underline", b"link_underline", "orange_background_color", b"orange_background_color", "orange_color", b"orange_color", "orange_text_color", b"orange_text_color", "radii", b"radii", "red_background_color", b"red_background_color", "red_color", b"red_color", "red_text_color", b"red_text_color", "show_sidebar_border", b"show_sidebar_border", "show_widget_border", b"show_widget_border", "sidebar", b"sidebar", "violet_background_color", b"violet_background_color", "violet_color", b"violet_color", "violet_text_color", b"violet_text_color", "yellow_background_color", b"yellow_background_color", "yellow_color", b"yellow_color", "yellow_text_color", b"yellow_text_color"]) -> builtins.bool: ...
|
|
465
|
-
def ClearField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "_base_font_weight", b"_base_font_weight", "_base_radius", b"_base_radius", "_blue_background_color", b"_blue_background_color", "_blue_color", b"_blue_color", "_blue_text_color", b"_blue_text_color", "_border_color", b"_border_color", "_button_radius", b"_button_radius", "_code_background_color", b"_code_background_color", "_code_font_size", b"_code_font_size", "_code_font_weight", b"_code_font_weight", "_dataframe_border_color", b"_dataframe_border_color", "_dataframe_header_background_color", b"_dataframe_header_background_color", "_gray_background_color", b"_gray_background_color", "_gray_color", b"_gray_color", "_gray_text_color", b"_gray_text_color", "_green_background_color", b"_green_background_color", "_green_color", b"_green_color", "_green_text_color", b"_green_text_color", "_link_color", b"_link_color", "_link_underline", b"_link_underline", "_orange_background_color", b"_orange_background_color", "_orange_color", b"_orange_color", "_orange_text_color", b"_orange_text_color", "_red_background_color", b"_red_background_color", "_red_color", b"_red_color", "_red_text_color", b"_red_text_color", "_show_sidebar_border", b"_show_sidebar_border", "_show_widget_border", b"_show_widget_border", "_sidebar", b"_sidebar", "_violet_background_color", b"_violet_background_color", "_violet_color", b"_violet_color", "_violet_text_color", b"_violet_text_color", "_yellow_background_color", b"_yellow_background_color", "_yellow_color", b"_yellow_color", "_yellow_text_color", b"_yellow_text_color", "background_color", b"background_color", "base", b"base", "base_font_size", b"base_font_size", "base_font_weight", b"base_font_weight", "base_radius", b"base_radius", "blue_background_color", b"blue_background_color", "blue_color", b"blue_color", "blue_text_color", b"blue_text_color", "body_font", b"body_font", "border_color", b"border_color", "button_radius", b"button_radius", "chart_categorical_colors", b"chart_categorical_colors", "chart_sequential_colors", b"chart_sequential_colors", "code_background_color", b"code_background_color", "code_font", b"code_font", "code_font_size", b"code_font_size", "code_font_weight", b"code_font_weight", "dataframe_border_color", b"dataframe_border_color", "dataframe_header_background_color", b"dataframe_header_background_color", "font", b"font", "font_faces", b"font_faces", "font_sizes", b"font_sizes", "font_sources", b"font_sources", "gray_background_color", b"gray_background_color", "gray_color", b"gray_color", "gray_text_color", b"gray_text_color", "green_background_color", b"green_background_color", "green_color", b"green_color", "green_text_color", b"green_text_color", "heading_font", b"heading_font", "heading_font_sizes", b"heading_font_sizes", "heading_font_weights", b"heading_font_weights", "link_color", b"link_color", "link_underline", b"link_underline", "orange_background_color", b"orange_background_color", "orange_color", b"orange_color", "orange_text_color", b"orange_text_color", "primary_color", b"primary_color", "radii", b"radii", "red_background_color", b"red_background_color", "red_color", b"red_color", "red_text_color", b"red_text_color", "secondary_background_color", b"secondary_background_color", "show_sidebar_border", b"show_sidebar_border", "show_widget_border", b"show_widget_border", "sidebar", b"sidebar", "skeleton_background_color", b"skeleton_background_color", "text_color", b"text_color", "violet_background_color", b"violet_background_color", "violet_color", b"violet_color", "violet_text_color", b"violet_text_color", "widget_background_color", b"widget_background_color", "widget_border_color", b"widget_border_color", "yellow_background_color", b"yellow_background_color", "yellow_color", b"yellow_color", "yellow_text_color", b"yellow_text_color"]) -> None: ...
|
|
477
|
+
def HasField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "_base_font_weight", b"_base_font_weight", "_base_radius", b"_base_radius", "_blue_background_color", b"_blue_background_color", "_blue_color", b"_blue_color", "_blue_text_color", b"_blue_text_color", "_border_color", b"_border_color", "_button_radius", b"_button_radius", "_code_background_color", b"_code_background_color", "_code_font_size", b"_code_font_size", "_code_font_weight", b"_code_font_weight", "_code_text_color", b"_code_text_color", "_dark", b"_dark", "_dataframe_border_color", b"_dataframe_border_color", "_dataframe_header_background_color", b"_dataframe_header_background_color", "_gray_background_color", b"_gray_background_color", "_gray_color", b"_gray_color", "_gray_text_color", b"_gray_text_color", "_green_background_color", b"_green_background_color", "_green_color", b"_green_color", "_green_text_color", b"_green_text_color", "_light", b"_light", "_link_color", b"_link_color", "_link_underline", b"_link_underline", "_orange_background_color", b"_orange_background_color", "_orange_color", b"_orange_color", "_orange_text_color", b"_orange_text_color", "_red_background_color", b"_red_background_color", "_red_color", b"_red_color", "_red_text_color", b"_red_text_color", "_show_sidebar_border", b"_show_sidebar_border", "_show_widget_border", b"_show_widget_border", "_sidebar", b"_sidebar", "_violet_background_color", b"_violet_background_color", "_violet_color", b"_violet_color", "_violet_text_color", b"_violet_text_color", "_yellow_background_color", b"_yellow_background_color", "_yellow_color", b"_yellow_color", "_yellow_text_color", b"_yellow_text_color", "base_font_size", b"base_font_size", "base_font_weight", b"base_font_weight", "base_radius", b"base_radius", "blue_background_color", b"blue_background_color", "blue_color", b"blue_color", "blue_text_color", b"blue_text_color", "border_color", b"border_color", "button_radius", b"button_radius", "code_background_color", b"code_background_color", "code_font_size", b"code_font_size", "code_font_weight", b"code_font_weight", "code_text_color", b"code_text_color", "dark", b"dark", "dataframe_border_color", b"dataframe_border_color", "dataframe_header_background_color", b"dataframe_header_background_color", "font_sizes", b"font_sizes", "gray_background_color", b"gray_background_color", "gray_color", b"gray_color", "gray_text_color", b"gray_text_color", "green_background_color", b"green_background_color", "green_color", b"green_color", "green_text_color", b"green_text_color", "light", b"light", "link_color", b"link_color", "link_underline", b"link_underline", "orange_background_color", b"orange_background_color", "orange_color", b"orange_color", "orange_text_color", b"orange_text_color", "radii", b"radii", "red_background_color", b"red_background_color", "red_color", b"red_color", "red_text_color", b"red_text_color", "show_sidebar_border", b"show_sidebar_border", "show_widget_border", b"show_widget_border", "sidebar", b"sidebar", "violet_background_color", b"violet_background_color", "violet_color", b"violet_color", "violet_text_color", b"violet_text_color", "yellow_background_color", b"yellow_background_color", "yellow_color", b"yellow_color", "yellow_text_color", b"yellow_text_color"]) -> builtins.bool: ...
|
|
478
|
+
def ClearField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "_base_font_weight", b"_base_font_weight", "_base_radius", b"_base_radius", "_blue_background_color", b"_blue_background_color", "_blue_color", b"_blue_color", "_blue_text_color", b"_blue_text_color", "_border_color", b"_border_color", "_button_radius", b"_button_radius", "_code_background_color", b"_code_background_color", "_code_font_size", b"_code_font_size", "_code_font_weight", b"_code_font_weight", "_code_text_color", b"_code_text_color", "_dark", b"_dark", "_dataframe_border_color", b"_dataframe_border_color", "_dataframe_header_background_color", b"_dataframe_header_background_color", "_gray_background_color", b"_gray_background_color", "_gray_color", b"_gray_color", "_gray_text_color", b"_gray_text_color", "_green_background_color", b"_green_background_color", "_green_color", b"_green_color", "_green_text_color", b"_green_text_color", "_light", b"_light", "_link_color", b"_link_color", "_link_underline", b"_link_underline", "_orange_background_color", b"_orange_background_color", "_orange_color", b"_orange_color", "_orange_text_color", b"_orange_text_color", "_red_background_color", b"_red_background_color", "_red_color", b"_red_color", "_red_text_color", b"_red_text_color", "_show_sidebar_border", b"_show_sidebar_border", "_show_widget_border", b"_show_widget_border", "_sidebar", b"_sidebar", "_violet_background_color", b"_violet_background_color", "_violet_color", b"_violet_color", "_violet_text_color", b"_violet_text_color", "_yellow_background_color", b"_yellow_background_color", "_yellow_color", b"_yellow_color", "_yellow_text_color", b"_yellow_text_color", "background_color", b"background_color", "base", b"base", "base_font_size", b"base_font_size", "base_font_weight", b"base_font_weight", "base_radius", b"base_radius", "blue_background_color", b"blue_background_color", "blue_color", b"blue_color", "blue_text_color", b"blue_text_color", "body_font", b"body_font", "border_color", b"border_color", "button_radius", b"button_radius", "chart_categorical_colors", b"chart_categorical_colors", "chart_sequential_colors", b"chart_sequential_colors", "code_background_color", b"code_background_color", "code_font", b"code_font", "code_font_size", b"code_font_size", "code_font_weight", b"code_font_weight", "code_text_color", b"code_text_color", "dark", b"dark", "dataframe_border_color", b"dataframe_border_color", "dataframe_header_background_color", b"dataframe_header_background_color", "font", b"font", "font_faces", b"font_faces", "font_sizes", b"font_sizes", "font_sources", b"font_sources", "gray_background_color", b"gray_background_color", "gray_color", b"gray_color", "gray_text_color", b"gray_text_color", "green_background_color", b"green_background_color", "green_color", b"green_color", "green_text_color", b"green_text_color", "heading_font", b"heading_font", "heading_font_sizes", b"heading_font_sizes", "heading_font_weights", b"heading_font_weights", "light", b"light", "link_color", b"link_color", "link_underline", b"link_underline", "orange_background_color", b"orange_background_color", "orange_color", b"orange_color", "orange_text_color", b"orange_text_color", "primary_color", b"primary_color", "radii", b"radii", "red_background_color", b"red_background_color", "red_color", b"red_color", "red_text_color", b"red_text_color", "secondary_background_color", b"secondary_background_color", "show_sidebar_border", b"show_sidebar_border", "show_widget_border", b"show_widget_border", "sidebar", b"sidebar", "skeleton_background_color", b"skeleton_background_color", "text_color", b"text_color", "violet_background_color", b"violet_background_color", "violet_color", b"violet_color", "violet_text_color", b"violet_text_color", "widget_background_color", b"widget_background_color", "widget_border_color", b"widget_border_color", "yellow_background_color", b"yellow_background_color", "yellow_color", b"yellow_color", "yellow_text_color", b"yellow_text_color"]) -> None: ...
|
|
466
479
|
@typing.overload
|
|
467
480
|
def WhichOneof(self, oneof_group: typing.Literal["_base_font_size", b"_base_font_size"]) -> typing.Literal["base_font_size"] | None: ...
|
|
468
481
|
@typing.overload
|
|
@@ -486,6 +499,10 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
486
499
|
@typing.overload
|
|
487
500
|
def WhichOneof(self, oneof_group: typing.Literal["_code_font_weight", b"_code_font_weight"]) -> typing.Literal["code_font_weight"] | None: ...
|
|
488
501
|
@typing.overload
|
|
502
|
+
def WhichOneof(self, oneof_group: typing.Literal["_code_text_color", b"_code_text_color"]) -> typing.Literal["code_text_color"] | None: ...
|
|
503
|
+
@typing.overload
|
|
504
|
+
def WhichOneof(self, oneof_group: typing.Literal["_dark", b"_dark"]) -> typing.Literal["dark"] | None: ...
|
|
505
|
+
@typing.overload
|
|
489
506
|
def WhichOneof(self, oneof_group: typing.Literal["_dataframe_border_color", b"_dataframe_border_color"]) -> typing.Literal["dataframe_border_color"] | None: ...
|
|
490
507
|
@typing.overload
|
|
491
508
|
def WhichOneof(self, oneof_group: typing.Literal["_dataframe_header_background_color", b"_dataframe_header_background_color"]) -> typing.Literal["dataframe_header_background_color"] | None: ...
|
|
@@ -502,6 +519,8 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
|
502
519
|
@typing.overload
|
|
503
520
|
def WhichOneof(self, oneof_group: typing.Literal["_green_text_color", b"_green_text_color"]) -> typing.Literal["green_text_color"] | None: ...
|
|
504
521
|
@typing.overload
|
|
522
|
+
def WhichOneof(self, oneof_group: typing.Literal["_light", b"_light"]) -> typing.Literal["light"] | None: ...
|
|
523
|
+
@typing.overload
|
|
505
524
|
def WhichOneof(self, oneof_group: typing.Literal["_link_color", b"_link_color"]) -> typing.Literal["link_color"] | None: ...
|
|
506
525
|
@typing.overload
|
|
507
526
|
def WhichOneof(self, oneof_group: typing.Literal["_link_underline", b"_link_underline"]) -> typing.Literal["link_underline"] | None: ...
|
|
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/PlotlyChart.proto\"\
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/PlotlyChart.proto\"\x9c\x02\n\x0bPlotlyChart\x12\x1f\n\x13use_container_width\x18\x05 \x01(\x08\x42\x02\x18\x01\x12\r\n\x05theme\x18\x06 \x01(\t\x12\n\n\x02id\x18\x07 \x01(\t\x12\x32\n\x0eselection_mode\x18\x08 \x03(\x0e\x32\x1a.PlotlyChart.SelectionMode\x12\x0f\n\x07\x66orm_id\x18\t \x01(\t\x12\x0c\n\x04spec\x18\n \x01(\t\x12\x0e\n\x06\x63onfig\x18\x0b \x01(\t\x12\r\n\x03url\x18\x01 \x01(\tH\x00\x12\x19\n\x06\x66igure\x18\x02 \x01(\x0b\x32\x07.FigureH\x00\"/\n\rSelectionMode\x12\n\n\x06POINTS\x10\x00\x12\x07\n\x03\x42OX\x10\x01\x12\t\n\x05LASSO\x10\x02\x42\x07\n\x05\x63hartJ\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"&\n\x06\x46igure\x12\x0c\n\x04spec\x18\x01 \x01(\t\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\tB0\n\x1c\x63om.snowflake.apps.streamlitB\x10PlotlyChartProtob\x06proto3')
|
|
18
18
|
|
|
19
19
|
_globals = globals()
|
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -22,10 +22,12 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.PlotlyChart
|
|
|
22
22
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
24
24
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020PlotlyChartProto'
|
|
25
|
+
_globals['_PLOTLYCHART'].fields_by_name['use_container_width']._loaded_options = None
|
|
26
|
+
_globals['_PLOTLYCHART'].fields_by_name['use_container_width']._serialized_options = b'\030\001'
|
|
25
27
|
_globals['_PLOTLYCHART']._serialized_start=38
|
|
26
|
-
_globals['_PLOTLYCHART']._serialized_end=
|
|
27
|
-
_globals['_PLOTLYCHART_SELECTIONMODE']._serialized_start=
|
|
28
|
-
_globals['_PLOTLYCHART_SELECTIONMODE']._serialized_end=
|
|
29
|
-
_globals['_FIGURE']._serialized_start=
|
|
30
|
-
_globals['_FIGURE']._serialized_end=
|
|
28
|
+
_globals['_PLOTLYCHART']._serialized_end=322
|
|
29
|
+
_globals['_PLOTLYCHART_SELECTIONMODE']._serialized_start=254
|
|
30
|
+
_globals['_PLOTLYCHART_SELECTIONMODE']._serialized_end=301
|
|
31
|
+
_globals['_FIGURE']._serialized_start=324
|
|
32
|
+
_globals['_FIGURE']._serialized_end=362
|
|
31
33
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -70,7 +70,9 @@ class PlotlyChart(google.protobuf.message.Message):
|
|
|
70
70
|
URL_FIELD_NUMBER: builtins.int
|
|
71
71
|
FIGURE_FIELD_NUMBER: builtins.int
|
|
72
72
|
use_container_width: builtins.bool
|
|
73
|
-
"""If True, will overwrite the chart width spec to fit to container.
|
|
73
|
+
"""DEPRECATED: If True, will overwrite the chart width spec to fit to container.
|
|
74
|
+
Use widthConfig in layout configuration instead.
|
|
75
|
+
"""
|
|
74
76
|
theme: builtins.str
|
|
75
77
|
"""override the properties with a theme. Currently, only "streamlit" or None are accepted."""
|
|
76
78
|
id: builtins.str
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: streamlit/proto/Space.proto
|
|
4
|
+
# Protobuf Python Version: 5.26.1
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Space.proto\"\x07\n\x05SpaceB*\n\x1c\x63om.snowflake.apps.streamlitB\nSpaceProtob\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Space_pb2', _globals)
|
|
22
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
23
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
24
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\nSpaceProto'
|
|
25
|
+
_globals['_SPACE']._serialized_start=31
|
|
26
|
+
_globals['_SPACE']._serialized_end=38
|
|
27
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
*!
|
|
5
|
+
Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import google.protobuf.descriptor
|
|
21
|
+
import google.protobuf.message
|
|
22
|
+
import typing
|
|
23
|
+
|
|
24
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
25
|
+
|
|
26
|
+
@typing.final
|
|
27
|
+
class Space(google.protobuf.message.Message):
|
|
28
|
+
"""A space element for adding vertical or horizontal spacing.
|
|
29
|
+
The size and direction are controlled via Element.width_config and
|
|
30
|
+
Element.height_config. The frontend uses FlexContext to determine which
|
|
31
|
+
dimension to apply based on the parent container's direction.
|
|
32
|
+
Space element has no content - layout is controlled via
|
|
33
|
+
Element.width_config and Element.height_config
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
37
|
+
|
|
38
|
+
def __init__(
|
|
39
|
+
self,
|
|
40
|
+
) -> None: ...
|
|
41
|
+
|
|
42
|
+
global___Space = Space
|
|
@@ -16,7 +16,7 @@ from streamlit.proto import Common_pb2 as streamlit_dot_proto_dot_Common__pb2
|
|
|
16
16
|
from streamlit.proto import Components_pb2 as streamlit_dot_proto_dot_Components__pb2
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/WidgetStates.proto\x1a\x1cstreamlit/proto/Common.proto\x1a streamlit/proto/Components.proto\"-\n\x0cWidgetStates\x12\x1d\n\x07widgets\x18\x01 \x03(\x0b\x32\x0c.WidgetState\"\
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/WidgetStates.proto\x1a\x1cstreamlit/proto/Common.proto\x1a streamlit/proto/Components.proto\"-\n\x0cWidgetStates\x12\x1d\n\x07widgets\x18\x01 \x03(\x0b\x32\x0c.WidgetState\"\xa5\x04\n\x0bWidgetState\x12\n\n\x02id\x18\x01 \x01(\t\x12\x17\n\rtrigger_value\x18\x02 \x01(\x08H\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12\x13\n\tint_value\x18\x05 \x01(\x12H\x00\x12\x16\n\x0cstring_value\x18\x06 \x01(\tH\x00\x12*\n\x12\x64ouble_array_value\x18\x07 \x01(\x0b\x32\x0c.DoubleArrayH\x00\x12\'\n\x0fint_array_value\x18\x08 \x01(\x0b\x32\x0c.SInt64ArrayH\x00\x12*\n\x12string_array_value\x18\t \x01(\x0b\x32\x0c.StringArrayH\x00\x12\x14\n\njson_value\x18\n \x01(\tH\x00\x12\"\n\x0b\x61rrow_value\x18\x0b \x01(\x0b\x32\x0b.ArrowTableH\x00\x12\x15\n\x0b\x62ytes_value\x18\x0c \x01(\x0cH\x00\x12\x37\n\x19\x66ile_uploader_state_value\x18\r \x01(\x0b\x32\x12.FileUploaderStateH\x00\x12\x37\n\x14string_trigger_value\x18\x0e \x01(\x0b\x32\x13.StringTriggerValueB\x02\x18\x01H\x00\x12+\n\x10\x63hat_input_value\x18\x0f \x01(\x0b\x32\x0f.ChatInputValueH\x00\x12\x1c\n\x12json_trigger_value\x18\x10 \x01(\tH\x00\x42\x07\n\x05valueB1\n\x1c\x63om.snowflake.apps.streamlitB\x11WidgetStatesProtob\x06proto3')
|
|
20
20
|
|
|
21
21
|
_globals = globals()
|
|
22
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -29,5 +29,5 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
29
29
|
_globals['_WIDGETSTATES']._serialized_start=102
|
|
30
30
|
_globals['_WIDGETSTATES']._serialized_end=147
|
|
31
31
|
_globals['_WIDGETSTATE']._serialized_start=150
|
|
32
|
-
_globals['_WIDGETSTATE']._serialized_end=
|
|
32
|
+
_globals['_WIDGETSTATE']._serialized_end=699
|
|
33
33
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -67,6 +67,7 @@ class WidgetState(google.protobuf.message.Message):
|
|
|
67
67
|
FILE_UPLOADER_STATE_VALUE_FIELD_NUMBER: builtins.int
|
|
68
68
|
STRING_TRIGGER_VALUE_FIELD_NUMBER: builtins.int
|
|
69
69
|
CHAT_INPUT_VALUE_FIELD_NUMBER: builtins.int
|
|
70
|
+
JSON_TRIGGER_VALUE_FIELD_NUMBER: builtins.int
|
|
70
71
|
id: builtins.str
|
|
71
72
|
trigger_value: builtins.bool
|
|
72
73
|
"""trigger_value is for buttons. A button's value needs to
|
|
@@ -82,6 +83,14 @@ class WidgetState(google.protobuf.message.Message):
|
|
|
82
83
|
string_value: builtins.str
|
|
83
84
|
json_value: builtins.str
|
|
84
85
|
bytes_value: builtins.bytes
|
|
86
|
+
json_trigger_value: builtins.str
|
|
87
|
+
"""Transient trigger payload transport (JSON-stringified).
|
|
88
|
+
- Purpose: carry per-run, non-persistent trigger data across the wire.
|
|
89
|
+
- Shape: JSON object or JSON array (batched within a single update).
|
|
90
|
+
- Lifecycle: treated as a trigger; cleared after each script run.
|
|
91
|
+
Use json_value for persistent state; use json_trigger_value for
|
|
92
|
+
auto-resetting payloads.
|
|
93
|
+
"""
|
|
85
94
|
@property
|
|
86
95
|
def double_array_value(self) -> streamlit.proto.Common_pb2.DoubleArray: ...
|
|
87
96
|
@property
|
|
@@ -122,9 +131,10 @@ class WidgetState(google.protobuf.message.Message):
|
|
|
122
131
|
file_uploader_state_value: streamlit.proto.Common_pb2.FileUploaderState | None = ...,
|
|
123
132
|
string_trigger_value: streamlit.proto.Common_pb2.StringTriggerValue | None = ...,
|
|
124
133
|
chat_input_value: streamlit.proto.Common_pb2.ChatInputValue | None = ...,
|
|
134
|
+
json_trigger_value: builtins.str = ...,
|
|
125
135
|
) -> None: ...
|
|
126
|
-
def HasField(self, field_name: typing.Literal["arrow_value", b"arrow_value", "bool_value", b"bool_value", "bytes_value", b"bytes_value", "chat_input_value", b"chat_input_value", "double_array_value", b"double_array_value", "double_value", b"double_value", "file_uploader_state_value", b"file_uploader_state_value", "int_array_value", b"int_array_value", "int_value", b"int_value", "json_value", b"json_value", "string_array_value", b"string_array_value", "string_trigger_value", b"string_trigger_value", "string_value", b"string_value", "trigger_value", b"trigger_value", "value", b"value"]) -> builtins.bool: ...
|
|
127
|
-
def ClearField(self, field_name: typing.Literal["arrow_value", b"arrow_value", "bool_value", b"bool_value", "bytes_value", b"bytes_value", "chat_input_value", b"chat_input_value", "double_array_value", b"double_array_value", "double_value", b"double_value", "file_uploader_state_value", b"file_uploader_state_value", "id", b"id", "int_array_value", b"int_array_value", "int_value", b"int_value", "json_value", b"json_value", "string_array_value", b"string_array_value", "string_trigger_value", b"string_trigger_value", "string_value", b"string_value", "trigger_value", b"trigger_value", "value", b"value"]) -> None: ...
|
|
128
|
-
def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["trigger_value", "bool_value", "double_value", "int_value", "string_value", "double_array_value", "int_array_value", "string_array_value", "json_value", "arrow_value", "bytes_value", "file_uploader_state_value", "string_trigger_value", "chat_input_value"] | None: ...
|
|
136
|
+
def HasField(self, field_name: typing.Literal["arrow_value", b"arrow_value", "bool_value", b"bool_value", "bytes_value", b"bytes_value", "chat_input_value", b"chat_input_value", "double_array_value", b"double_array_value", "double_value", b"double_value", "file_uploader_state_value", b"file_uploader_state_value", "int_array_value", b"int_array_value", "int_value", b"int_value", "json_trigger_value", b"json_trigger_value", "json_value", b"json_value", "string_array_value", b"string_array_value", "string_trigger_value", b"string_trigger_value", "string_value", b"string_value", "trigger_value", b"trigger_value", "value", b"value"]) -> builtins.bool: ...
|
|
137
|
+
def ClearField(self, field_name: typing.Literal["arrow_value", b"arrow_value", "bool_value", b"bool_value", "bytes_value", b"bytes_value", "chat_input_value", b"chat_input_value", "double_array_value", b"double_array_value", "double_value", b"double_value", "file_uploader_state_value", b"file_uploader_state_value", "id", b"id", "int_array_value", b"int_array_value", "int_value", b"int_value", "json_trigger_value", b"json_trigger_value", "json_value", b"json_value", "string_array_value", b"string_array_value", "string_trigger_value", b"string_trigger_value", "string_value", b"string_value", "trigger_value", b"trigger_value", "value", b"value"]) -> None: ...
|
|
138
|
+
def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["trigger_value", "bool_value", "double_value", "int_value", "string_value", "double_array_value", "int_array_value", "string_array_value", "json_value", "arrow_value", "bytes_value", "file_uploader_state_value", "string_trigger_value", "chat_input_value", "json_trigger_value"] | None: ...
|
|
129
139
|
|
|
130
140
|
global___WidgetState = WidgetState
|
|
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/WidthConfig.proto\x12\tstreamlit\"
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/WidthConfig.proto\x12\tstreamlit\"u\n\x0bWidthConfig\x12\x15\n\x0buse_stretch\x18\x01 \x01(\x08H\x00\x12\x15\n\x0buse_content\x18\x02 \x01(\x08H\x00\x12\x15\n\x0bpixel_width\x18\x03 \x01(\rH\x00\x12\x13\n\trem_width\x18\x04 \x01(\x02H\x00\x42\x0c\n\nwidth_specB0\n\x1c\x63om.snowflake.apps.streamlitB\x10WidthConfigProtob\x06proto3')
|
|
18
18
|
|
|
19
19
|
_globals = globals()
|
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -23,5 +23,5 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
24
24
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020WidthConfigProto'
|
|
25
25
|
_globals['_WIDTHCONFIG']._serialized_start=48
|
|
26
|
-
_globals['_WIDTHCONFIG']._serialized_end=
|
|
26
|
+
_globals['_WIDTHCONFIG']._serialized_end=165
|
|
27
27
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -31,18 +31,21 @@ class WidthConfig(google.protobuf.message.Message):
|
|
|
31
31
|
USE_STRETCH_FIELD_NUMBER: builtins.int
|
|
32
32
|
USE_CONTENT_FIELD_NUMBER: builtins.int
|
|
33
33
|
PIXEL_WIDTH_FIELD_NUMBER: builtins.int
|
|
34
|
+
REM_WIDTH_FIELD_NUMBER: builtins.int
|
|
34
35
|
use_stretch: builtins.bool
|
|
35
36
|
use_content: builtins.bool
|
|
36
37
|
pixel_width: builtins.int
|
|
38
|
+
rem_width: builtins.float
|
|
37
39
|
def __init__(
|
|
38
40
|
self,
|
|
39
41
|
*,
|
|
40
42
|
use_stretch: builtins.bool = ...,
|
|
41
43
|
use_content: builtins.bool = ...,
|
|
42
44
|
pixel_width: builtins.int = ...,
|
|
45
|
+
rem_width: builtins.float = ...,
|
|
43
46
|
) -> None: ...
|
|
44
|
-
def HasField(self, field_name: typing.Literal["pixel_width", b"pixel_width", "use_content", b"use_content", "use_stretch", b"use_stretch", "width_spec", b"width_spec"]) -> builtins.bool: ...
|
|
45
|
-
def ClearField(self, field_name: typing.Literal["pixel_width", b"pixel_width", "use_content", b"use_content", "use_stretch", b"use_stretch", "width_spec", b"width_spec"]) -> None: ...
|
|
46
|
-
def WhichOneof(self, oneof_group: typing.Literal["width_spec", b"width_spec"]) -> typing.Literal["use_stretch", "use_content", "pixel_width"] | None: ...
|
|
47
|
+
def HasField(self, field_name: typing.Literal["pixel_width", b"pixel_width", "rem_width", b"rem_width", "use_content", b"use_content", "use_stretch", b"use_stretch", "width_spec", b"width_spec"]) -> builtins.bool: ...
|
|
48
|
+
def ClearField(self, field_name: typing.Literal["pixel_width", b"pixel_width", "rem_width", b"rem_width", "use_content", b"use_content", "use_stretch", b"use_stretch", "width_spec", b"width_spec"]) -> None: ...
|
|
49
|
+
def WhichOneof(self, oneof_group: typing.Literal["width_spec", b"width_spec"]) -> typing.Literal["use_stretch", "use_content", "pixel_width", "rem_width"] | None: ...
|
|
47
50
|
|
|
48
51
|
global___WidthConfig = WidthConfig
|
streamlit/runtime/app_session.py
CHANGED
|
@@ -20,7 +20,7 @@ import os
|
|
|
20
20
|
import sys
|
|
21
21
|
import uuid
|
|
22
22
|
from enum import Enum
|
|
23
|
-
from typing import TYPE_CHECKING, Any,
|
|
23
|
+
from typing import TYPE_CHECKING, Any, Final
|
|
24
24
|
|
|
25
25
|
from google.protobuf.json_format import ParseDict
|
|
26
26
|
|
|
@@ -51,6 +51,8 @@ from streamlit.version import STREAMLIT_VERSION_STRING
|
|
|
51
51
|
from streamlit.watcher import LocalSourcesWatcher
|
|
52
52
|
|
|
53
53
|
if TYPE_CHECKING:
|
|
54
|
+
from collections.abc import Callable
|
|
55
|
+
|
|
54
56
|
from streamlit.proto.BackMsg_pb2 import BackMsg
|
|
55
57
|
from streamlit.runtime.script_data import ScriptData
|
|
56
58
|
from streamlit.runtime.scriptrunner.script_cache import ScriptCache
|
|
@@ -736,11 +738,35 @@ class AppSession:
|
|
|
736
738
|
msg.new_session, pages or self._pages_manager.get_pages()
|
|
737
739
|
)
|
|
738
740
|
_populate_config_msg(msg.new_session.config)
|
|
741
|
+
|
|
742
|
+
# Handles theme sections
|
|
743
|
+
# [theme] configs
|
|
739
744
|
_populate_theme_msg(msg.new_session.custom_theme)
|
|
745
|
+
# [theme.light] configs
|
|
746
|
+
_populate_theme_msg(
|
|
747
|
+
msg.new_session.custom_theme.light,
|
|
748
|
+
f"theme.{config.CustomThemeCategories.LIGHT.value}",
|
|
749
|
+
)
|
|
750
|
+
# [theme.dark] configs
|
|
751
|
+
_populate_theme_msg(
|
|
752
|
+
msg.new_session.custom_theme.dark,
|
|
753
|
+
f"theme.{config.CustomThemeCategories.DARK.value}",
|
|
754
|
+
)
|
|
755
|
+
# [theme.sidebar] configs
|
|
740
756
|
_populate_theme_msg(
|
|
741
757
|
msg.new_session.custom_theme.sidebar,
|
|
742
758
|
f"theme.{config.CustomThemeCategories.SIDEBAR.value}",
|
|
743
759
|
)
|
|
760
|
+
# [theme.light.sidebar] configs
|
|
761
|
+
_populate_theme_msg(
|
|
762
|
+
msg.new_session.custom_theme.light.sidebar,
|
|
763
|
+
f"theme.{config.CustomThemeCategories.LIGHT_SIDEBAR.value}",
|
|
764
|
+
)
|
|
765
|
+
# [theme.dark.sidebar] configs
|
|
766
|
+
_populate_theme_msg(
|
|
767
|
+
msg.new_session.custom_theme.dark.sidebar,
|
|
768
|
+
f"theme.{config.CustomThemeCategories.DARK_SIDEBAR.value}",
|
|
769
|
+
)
|
|
744
770
|
|
|
745
771
|
# Immutable session data. We send this every time a new session is
|
|
746
772
|
# started, to avoid having to track whether the client has already
|
|
@@ -21,15 +21,14 @@ import threading
|
|
|
21
21
|
from typing import (
|
|
22
22
|
TYPE_CHECKING,
|
|
23
23
|
Any,
|
|
24
|
-
Callable,
|
|
25
24
|
Final,
|
|
26
25
|
Literal,
|
|
26
|
+
TypeAlias,
|
|
27
27
|
TypeVar,
|
|
28
|
-
Union,
|
|
29
28
|
overload,
|
|
30
29
|
)
|
|
31
30
|
|
|
32
|
-
from typing_extensions import ParamSpec
|
|
31
|
+
from typing_extensions import ParamSpec
|
|
33
32
|
|
|
34
33
|
import streamlit as st
|
|
35
34
|
from streamlit import runtime
|
|
@@ -66,6 +65,7 @@ from streamlit.runtime.stats import CacheStat, CacheStatsProvider, group_stats
|
|
|
66
65
|
from streamlit.time_util import time_to_seconds
|
|
67
66
|
|
|
68
67
|
if TYPE_CHECKING:
|
|
68
|
+
from collections.abc import Callable
|
|
69
69
|
from datetime import timedelta
|
|
70
70
|
|
|
71
71
|
from streamlit.runtime.caching.hashing import HashFuncsDict
|
|
@@ -75,7 +75,7 @@ _LOGGER: Final = get_logger(__name__)
|
|
|
75
75
|
CACHE_DATA_MESSAGE_REPLAY_CTX = CachedMessageReplayContext(CacheType.DATA)
|
|
76
76
|
|
|
77
77
|
# The cache persistence options we support: "disk" or None
|
|
78
|
-
CachePersistType: TypeAlias =
|
|
78
|
+
CachePersistType: TypeAlias = Literal["disk"] | None
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
P = ParamSpec("P")
|
|
@@ -14,12 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
-
from typing import
|
|
17
|
+
from typing import TYPE_CHECKING, Any, Generic, TypeVar
|
|
18
18
|
|
|
19
19
|
from streamlit import type_util
|
|
20
20
|
from streamlit.errors import MarkdownFormattedException, StreamlitAPIException
|
|
21
21
|
from streamlit.runtime.caching.cache_type import CacheType, get_decorator_api_name
|
|
22
22
|
|
|
23
|
+
if TYPE_CHECKING:
|
|
24
|
+
from collections.abc import Callable
|
|
25
|
+
|
|
23
26
|
CACHE_DOCS_URL = "https://docs.streamlit.io/develop/concepts/architecture/caching"
|
|
24
27
|
|
|
25
28
|
|
|
@@ -19,17 +19,18 @@ from __future__ import annotations
|
|
|
19
19
|
|
|
20
20
|
import math
|
|
21
21
|
import threading
|
|
22
|
+
from collections.abc import Callable
|
|
22
23
|
from typing import (
|
|
23
24
|
TYPE_CHECKING,
|
|
24
25
|
Any,
|
|
25
|
-
Callable,
|
|
26
26
|
Final,
|
|
27
|
+
TypeAlias,
|
|
27
28
|
TypeVar,
|
|
28
29
|
overload,
|
|
29
30
|
)
|
|
30
31
|
|
|
31
32
|
from cachetools import TTLCache
|
|
32
|
-
from typing_extensions import ParamSpec
|
|
33
|
+
from typing_extensions import ParamSpec
|
|
33
34
|
|
|
34
35
|
import streamlit as st
|
|
35
36
|
from streamlit.logger import get_logger
|
|
@@ -24,7 +24,7 @@ import threading
|
|
|
24
24
|
import time
|
|
25
25
|
from abc import abstractmethod
|
|
26
26
|
from collections import defaultdict
|
|
27
|
-
from typing import TYPE_CHECKING, Any,
|
|
27
|
+
from typing import TYPE_CHECKING, Any, Final, Generic, TypeVar, cast, overload
|
|
28
28
|
|
|
29
29
|
from typing_extensions import ParamSpec
|
|
30
30
|
|
|
@@ -54,6 +54,7 @@ from streamlit.runtime.scriptrunner_utils.script_run_context import (
|
|
|
54
54
|
|
|
55
55
|
if TYPE_CHECKING:
|
|
56
56
|
import types
|
|
57
|
+
from collections.abc import Callable
|
|
57
58
|
|
|
58
59
|
from streamlit.runtime.caching.cache_type import CacheType
|
|
59
60
|
|
|
@@ -17,7 +17,7 @@ from __future__ import annotations
|
|
|
17
17
|
import contextlib
|
|
18
18
|
import threading
|
|
19
19
|
from dataclasses import dataclass
|
|
20
|
-
from typing import TYPE_CHECKING, Any,
|
|
20
|
+
from typing import TYPE_CHECKING, Any, Generic, TypeAlias, TypeVar
|
|
21
21
|
|
|
22
22
|
from typing_extensions import ParamSpec
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ from streamlit.runtime.scriptrunner_utils.script_run_context import (
|
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
if TYPE_CHECKING:
|
|
32
|
-
from collections.abc import Iterator
|
|
32
|
+
from collections.abc import Callable, Iterator
|
|
33
33
|
|
|
34
34
|
from google.protobuf.message import Message
|
|
35
35
|
|
|
@@ -69,7 +69,7 @@ class BlockMsgData:
|
|
|
69
69
|
returned_dgs_id: str
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
MsgData =
|
|
72
|
+
MsgData: TypeAlias = ElementMsgData | BlockMsgData
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
R = TypeVar("R")
|
|
@@ -31,12 +31,11 @@ import tempfile
|
|
|
31
31
|
import threading
|
|
32
32
|
import uuid
|
|
33
33
|
import weakref
|
|
34
|
+
from collections.abc import Callable
|
|
34
35
|
from enum import Enum
|
|
35
36
|
from re import Pattern
|
|
36
37
|
from types import MappingProxyType
|
|
37
|
-
from typing import TYPE_CHECKING, Any,
|
|
38
|
-
|
|
39
|
-
from typing_extensions import TypeAlias
|
|
38
|
+
from typing import TYPE_CHECKING, Any, Final, TypeAlias, cast
|
|
40
39
|
|
|
41
40
|
from streamlit import logger, type_util, util
|
|
42
41
|
from streamlit.errors import StreamlitAPIException
|
|
@@ -59,7 +58,7 @@ _PANDAS_SAMPLE_SIZE: Final = 10_000
|
|
|
59
58
|
_NP_SIZE_LARGE: Final = 500_000
|
|
60
59
|
_NP_SAMPLE_SIZE: Final = 100_000
|
|
61
60
|
|
|
62
|
-
HashFuncsDict: TypeAlias = dict[
|
|
61
|
+
HashFuncsDict: TypeAlias = dict[str | type[Any], Callable[[Any], Any]]
|
|
63
62
|
|
|
64
63
|
# Arbitrary item to denote where we found a cycle in a hashed object.
|
|
65
64
|
# This allows us to hash self-referencing lists, dictionaries, etc.
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
|
-
from
|
|
19
|
+
from collections.abc import Callable
|
|
20
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
20
21
|
|
|
21
22
|
from streamlit import deprecation_util
|
|
22
23
|
from streamlit.runtime.caching import CACHE_DOCS_URL
|
|
@@ -369,9 +369,7 @@ def connection_factory( # type: ignore
|
|
|
369
369
|
"""
|
|
370
370
|
|
|
371
371
|
if name.startswith(_USE_ENV_PREFIX):
|
|
372
|
-
|
|
373
|
-
# until the minimum Python version we support is 3.9.
|
|
374
|
-
envvar_name = name[len(_USE_ENV_PREFIX) :]
|
|
372
|
+
envvar_name = name.removeprefix(_USE_ENV_PREFIX)
|
|
375
373
|
name = os.environ[envvar_name]
|
|
376
374
|
|
|
377
375
|
# type is a nice kwarg name for the st.connection user but is annoying to work with
|
|
@@ -14,10 +14,13 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
-
from typing import
|
|
17
|
+
from typing import TYPE_CHECKING, Any
|
|
18
18
|
|
|
19
19
|
from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
|
|
20
20
|
|
|
21
|
+
if TYPE_CHECKING:
|
|
22
|
+
from collections.abc import Callable
|
|
23
|
+
|
|
21
24
|
|
|
22
25
|
class ForwardMsgQueue:
|
|
23
26
|
"""Accumulates a session's outgoing ForwardMsgs.
|
streamlit/runtime/fragment.py
CHANGED
|
@@ -17,9 +17,10 @@ from __future__ import annotations
|
|
|
17
17
|
import contextlib
|
|
18
18
|
import inspect
|
|
19
19
|
from abc import abstractmethod
|
|
20
|
+
from collections.abc import Callable
|
|
20
21
|
from copy import deepcopy
|
|
21
22
|
from functools import wraps
|
|
22
|
-
from typing import TYPE_CHECKING, Any,
|
|
23
|
+
from typing import TYPE_CHECKING, Any, Protocol, TypeVar, overload
|
|
23
24
|
|
|
24
25
|
from streamlit.error_util import handle_uncaught_app_exception
|
|
25
26
|
from streamlit.errors import FragmentHandledException, FragmentStorageKeyError
|
|
@@ -34,7 +34,7 @@ _LOGGER: Final = get_logger(__name__)
|
|
|
34
34
|
|
|
35
35
|
# Mimetype -> filename extension map for the `get_extension_for_mimetype`
|
|
36
36
|
# function. We use Python's `mimetypes.guess_extension` for most mimetypes,
|
|
37
|
-
# but (as of Python 3.
|
|
37
|
+
# but (as of Python 3.12) `mimetypes.guess_extension("audio/wav")` returns None,
|
|
38
38
|
# so we handle it ourselves.
|
|
39
39
|
PREFERRED_MIMETYPE_EXTENSION_MAP: Final = {
|
|
40
40
|
"audio/wav": ".wav",
|
|
@@ -21,9 +21,9 @@ import sys
|
|
|
21
21
|
import threading
|
|
22
22
|
import time
|
|
23
23
|
import uuid
|
|
24
|
-
from collections.abc import Sized
|
|
24
|
+
from collections.abc import Callable, Sized
|
|
25
25
|
from functools import wraps
|
|
26
|
-
from typing import Any,
|
|
26
|
+
from typing import Any, Final, TypeVar, cast, overload
|
|
27
27
|
|
|
28
28
|
from streamlit import config, file_util, util
|
|
29
29
|
from streamlit.logger import get_logger
|
|
@@ -331,6 +331,10 @@ def _get_command_telemetry(
|
|
|
331
331
|
):
|
|
332
332
|
name = f"component:{self_arg.name}"
|
|
333
333
|
|
|
334
|
+
if name == "_bidi_component" and len(args) > 0 and isinstance(args[0], str):
|
|
335
|
+
component_name = args[0]
|
|
336
|
+
name = f"component_v2:{component_name}"
|
|
337
|
+
|
|
334
338
|
return Command(name=name, args=arguments)
|
|
335
339
|
|
|
336
340
|
|