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
streamlit/config.py
CHANGED
|
@@ -24,13 +24,16 @@ import secrets
|
|
|
24
24
|
import threading
|
|
25
25
|
from collections import OrderedDict
|
|
26
26
|
from enum import Enum
|
|
27
|
-
from typing import
|
|
27
|
+
from typing import TYPE_CHECKING, Any, Final, Literal
|
|
28
28
|
|
|
29
29
|
from blinker import Signal
|
|
30
30
|
|
|
31
31
|
from streamlit import config_util, development, env_util, file_util, util
|
|
32
32
|
from streamlit.config_option import ConfigOption
|
|
33
|
-
from streamlit.errors import StreamlitAPIException
|
|
33
|
+
from streamlit.errors import StreamlitAPIException, StreamlitInvalidThemeSectionError
|
|
34
|
+
|
|
35
|
+
if TYPE_CHECKING:
|
|
36
|
+
from collections.abc import Callable
|
|
34
37
|
|
|
35
38
|
# Config System Global State #
|
|
36
39
|
|
|
@@ -98,6 +101,10 @@ class CustomThemeCategories(str, Enum):
|
|
|
98
101
|
"""Theme categories that can be set with custom theme config."""
|
|
99
102
|
|
|
100
103
|
SIDEBAR = "sidebar"
|
|
104
|
+
LIGHT = "light"
|
|
105
|
+
DARK = "dark"
|
|
106
|
+
LIGHT_SIDEBAR = "light.sidebar"
|
|
107
|
+
DARK_SIDEBAR = "dark.sidebar"
|
|
101
108
|
|
|
102
109
|
|
|
103
110
|
def set_option(key: str, value: Any, where_defined: str = _USER_DEFINED) -> None:
|
|
@@ -323,6 +330,8 @@ def _create_theme_options(
|
|
|
323
330
|
The same config option can be supported for multiple categories, e.g. "theme"
|
|
324
331
|
and "theme.sidebar".
|
|
325
332
|
"""
|
|
333
|
+
# Handle creation of the main theme config sections (e.g. theme, theme.sidebar, theme.light, theme.dark)
|
|
334
|
+
# as well as the nested subsections (e.g. theme.light.sidebar, theme.dark.sidebar)
|
|
326
335
|
for cat in categories:
|
|
327
336
|
section = cat if cat == "theme" else f"theme.{cat.value}"
|
|
328
337
|
|
|
@@ -1045,8 +1054,8 @@ def _browser_server_port() -> int:
|
|
|
1045
1054
|
|
|
1046
1055
|
_SSL_PRODUCTION_WARNING = [
|
|
1047
1056
|
"DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through "
|
|
1048
|
-
"security audits or performance tests. For
|
|
1049
|
-
"
|
|
1057
|
+
"security audits or performance tests. For a production environment, we "
|
|
1058
|
+
"recommend performing SSL termination through a load balancer or reverse proxy."
|
|
1050
1059
|
]
|
|
1051
1060
|
|
|
1052
1061
|
_create_option(
|
|
@@ -1148,24 +1157,66 @@ _create_section("theme", "Settings to define a custom theme for your Streamlit a
|
|
|
1148
1157
|
|
|
1149
1158
|
# Create a section for each custom theme element
|
|
1150
1159
|
for cat in list(CustomThemeCategories):
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1160
|
+
if cat == CustomThemeCategories.SIDEBAR:
|
|
1161
|
+
_create_section(
|
|
1162
|
+
f"theme.{cat.value}",
|
|
1163
|
+
f"Settings to define a custom {cat.value} theme in your Streamlit app.",
|
|
1164
|
+
)
|
|
1165
|
+
elif cat == CustomThemeCategories.LIGHT:
|
|
1166
|
+
_create_section(
|
|
1167
|
+
f"theme.{cat.value}",
|
|
1168
|
+
"Settings to define custom light theme properties that extend the defined [theme] properties.",
|
|
1169
|
+
)
|
|
1170
|
+
elif cat == CustomThemeCategories.DARK:
|
|
1171
|
+
_create_section(
|
|
1172
|
+
f"theme.{cat.value}",
|
|
1173
|
+
"Settings to define custom dark theme properties that extend the defined [theme] properties.",
|
|
1174
|
+
)
|
|
1175
|
+
|
|
1176
|
+
# Create nested sidebar sections
|
|
1177
|
+
elif cat == CustomThemeCategories.LIGHT_SIDEBAR:
|
|
1178
|
+
_create_section(
|
|
1179
|
+
f"theme.{cat.value}",
|
|
1180
|
+
"""Settings to define custom light theme properties for the sidebar that extend the defined
|
|
1181
|
+
[theme.sidebar] properties.""",
|
|
1182
|
+
)
|
|
1183
|
+
elif cat == CustomThemeCategories.DARK_SIDEBAR:
|
|
1184
|
+
_create_section(
|
|
1185
|
+
f"theme.{cat.value}",
|
|
1186
|
+
"""Settings to define custom dark theme properties for the sidebar that extend the defined
|
|
1187
|
+
[theme.sidebar] properties.""",
|
|
1188
|
+
)
|
|
1155
1189
|
|
|
1156
1190
|
_create_theme_options(
|
|
1157
1191
|
"base",
|
|
1158
1192
|
categories=["theme"],
|
|
1159
1193
|
description="""
|
|
1160
|
-
The
|
|
1194
|
+
The theme that your custom theme inherits from.
|
|
1161
1195
|
|
|
1162
|
-
This can be one of the following:
|
|
1196
|
+
This can be one of the following:
|
|
1197
|
+
- "light": Streamlit's default light theme.
|
|
1198
|
+
- "dark": Streamlit's default dark theme.
|
|
1199
|
+
- A local file path to a TOML theme file: A local custom theme, like
|
|
1200
|
+
"themes/custom.toml".
|
|
1201
|
+
- A URL to a TOML theme file: An externally hosted custom theme, like
|
|
1202
|
+
"https://example.com/theme.toml".
|
|
1203
|
+
|
|
1204
|
+
A TOML theme file must contain a [theme] table with theme options.
|
|
1205
|
+
Any theme options defined in the app's config.toml file will override
|
|
1206
|
+
those defined in the TOML theme file.
|
|
1163
1207
|
""",
|
|
1164
1208
|
)
|
|
1165
1209
|
|
|
1166
1210
|
_create_theme_options(
|
|
1167
1211
|
"primaryColor",
|
|
1168
|
-
categories=[
|
|
1212
|
+
categories=[
|
|
1213
|
+
"theme",
|
|
1214
|
+
CustomThemeCategories.SIDEBAR,
|
|
1215
|
+
CustomThemeCategories.LIGHT,
|
|
1216
|
+
CustomThemeCategories.DARK,
|
|
1217
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1218
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1219
|
+
],
|
|
1169
1220
|
description="""
|
|
1170
1221
|
Primary accent color.
|
|
1171
1222
|
""",
|
|
@@ -1173,7 +1224,14 @@ _create_theme_options(
|
|
|
1173
1224
|
|
|
1174
1225
|
_create_theme_options(
|
|
1175
1226
|
"backgroundColor",
|
|
1176
|
-
categories=[
|
|
1227
|
+
categories=[
|
|
1228
|
+
"theme",
|
|
1229
|
+
CustomThemeCategories.SIDEBAR,
|
|
1230
|
+
CustomThemeCategories.LIGHT,
|
|
1231
|
+
CustomThemeCategories.DARK,
|
|
1232
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1233
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1234
|
+
],
|
|
1177
1235
|
description="""
|
|
1178
1236
|
Background color of the app.
|
|
1179
1237
|
""",
|
|
@@ -1181,7 +1239,14 @@ _create_theme_options(
|
|
|
1181
1239
|
|
|
1182
1240
|
_create_theme_options(
|
|
1183
1241
|
"secondaryBackgroundColor",
|
|
1184
|
-
categories=[
|
|
1242
|
+
categories=[
|
|
1243
|
+
"theme",
|
|
1244
|
+
CustomThemeCategories.SIDEBAR,
|
|
1245
|
+
CustomThemeCategories.LIGHT,
|
|
1246
|
+
CustomThemeCategories.DARK,
|
|
1247
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1248
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1249
|
+
],
|
|
1185
1250
|
description="""
|
|
1186
1251
|
Background color used for most interactive widgets.
|
|
1187
1252
|
""",
|
|
@@ -1189,7 +1254,14 @@ _create_theme_options(
|
|
|
1189
1254
|
|
|
1190
1255
|
_create_theme_options(
|
|
1191
1256
|
"textColor",
|
|
1192
|
-
categories=[
|
|
1257
|
+
categories=[
|
|
1258
|
+
"theme",
|
|
1259
|
+
CustomThemeCategories.SIDEBAR,
|
|
1260
|
+
CustomThemeCategories.LIGHT,
|
|
1261
|
+
CustomThemeCategories.DARK,
|
|
1262
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1263
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1264
|
+
],
|
|
1193
1265
|
description="""
|
|
1194
1266
|
Color used for almost all text.
|
|
1195
1267
|
""",
|
|
@@ -1197,7 +1269,14 @@ _create_theme_options(
|
|
|
1197
1269
|
|
|
1198
1270
|
_create_theme_options(
|
|
1199
1271
|
"redColor",
|
|
1200
|
-
categories=[
|
|
1272
|
+
categories=[
|
|
1273
|
+
"theme",
|
|
1274
|
+
CustomThemeCategories.SIDEBAR,
|
|
1275
|
+
CustomThemeCategories.LIGHT,
|
|
1276
|
+
CustomThemeCategories.DARK,
|
|
1277
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1278
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1279
|
+
],
|
|
1201
1280
|
description="""
|
|
1202
1281
|
Red color used in the basic color palette.
|
|
1203
1282
|
|
|
@@ -1212,7 +1291,14 @@ _create_theme_options(
|
|
|
1212
1291
|
|
|
1213
1292
|
_create_theme_options(
|
|
1214
1293
|
"orangeColor",
|
|
1215
|
-
categories=[
|
|
1294
|
+
categories=[
|
|
1295
|
+
"theme",
|
|
1296
|
+
CustomThemeCategories.SIDEBAR,
|
|
1297
|
+
CustomThemeCategories.LIGHT,
|
|
1298
|
+
CustomThemeCategories.DARK,
|
|
1299
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1300
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1301
|
+
],
|
|
1216
1302
|
description="""
|
|
1217
1303
|
Orange color used in the basic color palette.
|
|
1218
1304
|
|
|
@@ -1227,7 +1313,14 @@ _create_theme_options(
|
|
|
1227
1313
|
|
|
1228
1314
|
_create_theme_options(
|
|
1229
1315
|
"yellowColor",
|
|
1230
|
-
categories=[
|
|
1316
|
+
categories=[
|
|
1317
|
+
"theme",
|
|
1318
|
+
CustomThemeCategories.SIDEBAR,
|
|
1319
|
+
CustomThemeCategories.LIGHT,
|
|
1320
|
+
CustomThemeCategories.DARK,
|
|
1321
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1322
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1323
|
+
],
|
|
1231
1324
|
description="""
|
|
1232
1325
|
Yellow color used in the basic color palette.
|
|
1233
1326
|
|
|
@@ -1242,7 +1335,14 @@ _create_theme_options(
|
|
|
1242
1335
|
|
|
1243
1336
|
_create_theme_options(
|
|
1244
1337
|
"blueColor",
|
|
1245
|
-
categories=[
|
|
1338
|
+
categories=[
|
|
1339
|
+
"theme",
|
|
1340
|
+
CustomThemeCategories.SIDEBAR,
|
|
1341
|
+
CustomThemeCategories.LIGHT,
|
|
1342
|
+
CustomThemeCategories.DARK,
|
|
1343
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1344
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1345
|
+
],
|
|
1246
1346
|
description="""
|
|
1247
1347
|
Blue color used in the basic color palette.
|
|
1248
1348
|
|
|
@@ -1257,7 +1357,14 @@ _create_theme_options(
|
|
|
1257
1357
|
|
|
1258
1358
|
_create_theme_options(
|
|
1259
1359
|
"greenColor",
|
|
1260
|
-
categories=[
|
|
1360
|
+
categories=[
|
|
1361
|
+
"theme",
|
|
1362
|
+
CustomThemeCategories.SIDEBAR,
|
|
1363
|
+
CustomThemeCategories.LIGHT,
|
|
1364
|
+
CustomThemeCategories.DARK,
|
|
1365
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1366
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1367
|
+
],
|
|
1261
1368
|
description="""
|
|
1262
1369
|
Green color used in the basic color palette.
|
|
1263
1370
|
|
|
@@ -1272,7 +1379,14 @@ _create_theme_options(
|
|
|
1272
1379
|
|
|
1273
1380
|
_create_theme_options(
|
|
1274
1381
|
"violetColor",
|
|
1275
|
-
categories=[
|
|
1382
|
+
categories=[
|
|
1383
|
+
"theme",
|
|
1384
|
+
CustomThemeCategories.SIDEBAR,
|
|
1385
|
+
CustomThemeCategories.LIGHT,
|
|
1386
|
+
CustomThemeCategories.DARK,
|
|
1387
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1388
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1389
|
+
],
|
|
1276
1390
|
description="""
|
|
1277
1391
|
Violet color used in the basic color palette.
|
|
1278
1392
|
|
|
@@ -1286,7 +1400,14 @@ _create_theme_options(
|
|
|
1286
1400
|
|
|
1287
1401
|
_create_theme_options(
|
|
1288
1402
|
"grayColor",
|
|
1289
|
-
categories=[
|
|
1403
|
+
categories=[
|
|
1404
|
+
"theme",
|
|
1405
|
+
CustomThemeCategories.SIDEBAR,
|
|
1406
|
+
CustomThemeCategories.LIGHT,
|
|
1407
|
+
CustomThemeCategories.DARK,
|
|
1408
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1409
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1410
|
+
],
|
|
1290
1411
|
description="""
|
|
1291
1412
|
Gray color used in the basic color palette.
|
|
1292
1413
|
|
|
@@ -1301,7 +1422,14 @@ _create_theme_options(
|
|
|
1301
1422
|
|
|
1302
1423
|
_create_theme_options(
|
|
1303
1424
|
"redBackgroundColor",
|
|
1304
|
-
categories=[
|
|
1425
|
+
categories=[
|
|
1426
|
+
"theme",
|
|
1427
|
+
CustomThemeCategories.SIDEBAR,
|
|
1428
|
+
CustomThemeCategories.LIGHT,
|
|
1429
|
+
CustomThemeCategories.DARK,
|
|
1430
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1431
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1432
|
+
],
|
|
1305
1433
|
description="""
|
|
1306
1434
|
Red background color used in the basic color palette.
|
|
1307
1435
|
|
|
@@ -1315,7 +1443,14 @@ _create_theme_options(
|
|
|
1315
1443
|
|
|
1316
1444
|
_create_theme_options(
|
|
1317
1445
|
"orangeBackgroundColor",
|
|
1318
|
-
categories=[
|
|
1446
|
+
categories=[
|
|
1447
|
+
"theme",
|
|
1448
|
+
CustomThemeCategories.SIDEBAR,
|
|
1449
|
+
CustomThemeCategories.LIGHT,
|
|
1450
|
+
CustomThemeCategories.DARK,
|
|
1451
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1452
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1453
|
+
],
|
|
1319
1454
|
description="""
|
|
1320
1455
|
Orange background color used for the basic color palette.
|
|
1321
1456
|
|
|
@@ -1329,7 +1464,14 @@ _create_theme_options(
|
|
|
1329
1464
|
|
|
1330
1465
|
_create_theme_options(
|
|
1331
1466
|
"yellowBackgroundColor",
|
|
1332
|
-
categories=[
|
|
1467
|
+
categories=[
|
|
1468
|
+
"theme",
|
|
1469
|
+
CustomThemeCategories.SIDEBAR,
|
|
1470
|
+
CustomThemeCategories.LIGHT,
|
|
1471
|
+
CustomThemeCategories.DARK,
|
|
1472
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1473
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1474
|
+
],
|
|
1333
1475
|
description="""
|
|
1334
1476
|
Yellow background color used for the basic color palette.
|
|
1335
1477
|
|
|
@@ -1343,7 +1485,14 @@ _create_theme_options(
|
|
|
1343
1485
|
|
|
1344
1486
|
_create_theme_options(
|
|
1345
1487
|
"blueBackgroundColor",
|
|
1346
|
-
categories=[
|
|
1488
|
+
categories=[
|
|
1489
|
+
"theme",
|
|
1490
|
+
CustomThemeCategories.SIDEBAR,
|
|
1491
|
+
CustomThemeCategories.LIGHT,
|
|
1492
|
+
CustomThemeCategories.DARK,
|
|
1493
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1494
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1495
|
+
],
|
|
1347
1496
|
description="""
|
|
1348
1497
|
Blue background color used for the basic color palette.
|
|
1349
1498
|
|
|
@@ -1357,7 +1506,14 @@ _create_theme_options(
|
|
|
1357
1506
|
|
|
1358
1507
|
_create_theme_options(
|
|
1359
1508
|
"greenBackgroundColor",
|
|
1360
|
-
categories=[
|
|
1509
|
+
categories=[
|
|
1510
|
+
"theme",
|
|
1511
|
+
CustomThemeCategories.SIDEBAR,
|
|
1512
|
+
CustomThemeCategories.LIGHT,
|
|
1513
|
+
CustomThemeCategories.DARK,
|
|
1514
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1515
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1516
|
+
],
|
|
1361
1517
|
description="""
|
|
1362
1518
|
Green background color used for the basic color palette.
|
|
1363
1519
|
|
|
@@ -1371,7 +1527,14 @@ _create_theme_options(
|
|
|
1371
1527
|
|
|
1372
1528
|
_create_theme_options(
|
|
1373
1529
|
"violetBackgroundColor",
|
|
1374
|
-
categories=[
|
|
1530
|
+
categories=[
|
|
1531
|
+
"theme",
|
|
1532
|
+
CustomThemeCategories.SIDEBAR,
|
|
1533
|
+
CustomThemeCategories.LIGHT,
|
|
1534
|
+
CustomThemeCategories.DARK,
|
|
1535
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1536
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1537
|
+
],
|
|
1375
1538
|
description="""
|
|
1376
1539
|
Violet background color used for the basic color palette.
|
|
1377
1540
|
|
|
@@ -1385,7 +1548,14 @@ _create_theme_options(
|
|
|
1385
1548
|
|
|
1386
1549
|
_create_theme_options(
|
|
1387
1550
|
"grayBackgroundColor",
|
|
1388
|
-
categories=[
|
|
1551
|
+
categories=[
|
|
1552
|
+
"theme",
|
|
1553
|
+
CustomThemeCategories.SIDEBAR,
|
|
1554
|
+
CustomThemeCategories.LIGHT,
|
|
1555
|
+
CustomThemeCategories.DARK,
|
|
1556
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1557
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1558
|
+
],
|
|
1389
1559
|
description="""
|
|
1390
1560
|
Gray background color used for the basic color palette.
|
|
1391
1561
|
|
|
@@ -1399,7 +1569,14 @@ _create_theme_options(
|
|
|
1399
1569
|
|
|
1400
1570
|
_create_theme_options(
|
|
1401
1571
|
"redTextColor",
|
|
1402
|
-
categories=[
|
|
1572
|
+
categories=[
|
|
1573
|
+
"theme",
|
|
1574
|
+
CustomThemeCategories.SIDEBAR,
|
|
1575
|
+
CustomThemeCategories.LIGHT,
|
|
1576
|
+
CustomThemeCategories.DARK,
|
|
1577
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1578
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1579
|
+
],
|
|
1403
1580
|
description="""
|
|
1404
1581
|
Red text color used for the basic color palette.
|
|
1405
1582
|
|
|
@@ -1413,7 +1590,14 @@ _create_theme_options(
|
|
|
1413
1590
|
|
|
1414
1591
|
_create_theme_options(
|
|
1415
1592
|
"orangeTextColor",
|
|
1416
|
-
categories=[
|
|
1593
|
+
categories=[
|
|
1594
|
+
"theme",
|
|
1595
|
+
CustomThemeCategories.SIDEBAR,
|
|
1596
|
+
CustomThemeCategories.LIGHT,
|
|
1597
|
+
CustomThemeCategories.DARK,
|
|
1598
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1599
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1600
|
+
],
|
|
1417
1601
|
description="""
|
|
1418
1602
|
Orange text color used for the basic color palette.
|
|
1419
1603
|
|
|
@@ -1427,7 +1611,14 @@ _create_theme_options(
|
|
|
1427
1611
|
|
|
1428
1612
|
_create_theme_options(
|
|
1429
1613
|
"yellowTextColor",
|
|
1430
|
-
categories=[
|
|
1614
|
+
categories=[
|
|
1615
|
+
"theme",
|
|
1616
|
+
CustomThemeCategories.SIDEBAR,
|
|
1617
|
+
CustomThemeCategories.LIGHT,
|
|
1618
|
+
CustomThemeCategories.DARK,
|
|
1619
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1620
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1621
|
+
],
|
|
1431
1622
|
description="""
|
|
1432
1623
|
Yellow text color used for the basic color palette.
|
|
1433
1624
|
|
|
@@ -1441,7 +1632,14 @@ _create_theme_options(
|
|
|
1441
1632
|
|
|
1442
1633
|
_create_theme_options(
|
|
1443
1634
|
"blueTextColor",
|
|
1444
|
-
categories=[
|
|
1635
|
+
categories=[
|
|
1636
|
+
"theme",
|
|
1637
|
+
CustomThemeCategories.SIDEBAR,
|
|
1638
|
+
CustomThemeCategories.LIGHT,
|
|
1639
|
+
CustomThemeCategories.DARK,
|
|
1640
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1641
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1642
|
+
],
|
|
1445
1643
|
description="""
|
|
1446
1644
|
Blue text color used for the basic color palette.
|
|
1447
1645
|
|
|
@@ -1455,7 +1653,14 @@ _create_theme_options(
|
|
|
1455
1653
|
|
|
1456
1654
|
_create_theme_options(
|
|
1457
1655
|
"greenTextColor",
|
|
1458
|
-
categories=[
|
|
1656
|
+
categories=[
|
|
1657
|
+
"theme",
|
|
1658
|
+
CustomThemeCategories.SIDEBAR,
|
|
1659
|
+
CustomThemeCategories.LIGHT,
|
|
1660
|
+
CustomThemeCategories.DARK,
|
|
1661
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1662
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1663
|
+
],
|
|
1459
1664
|
description="""
|
|
1460
1665
|
Green text color used for the basic color palette.
|
|
1461
1666
|
|
|
@@ -1469,7 +1674,14 @@ _create_theme_options(
|
|
|
1469
1674
|
|
|
1470
1675
|
_create_theme_options(
|
|
1471
1676
|
"violetTextColor",
|
|
1472
|
-
categories=[
|
|
1677
|
+
categories=[
|
|
1678
|
+
"theme",
|
|
1679
|
+
CustomThemeCategories.SIDEBAR,
|
|
1680
|
+
CustomThemeCategories.LIGHT,
|
|
1681
|
+
CustomThemeCategories.DARK,
|
|
1682
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1683
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1684
|
+
],
|
|
1473
1685
|
description="""
|
|
1474
1686
|
Violet text color used for the basic color palette.
|
|
1475
1687
|
|
|
@@ -1483,7 +1695,14 @@ _create_theme_options(
|
|
|
1483
1695
|
|
|
1484
1696
|
_create_theme_options(
|
|
1485
1697
|
"grayTextColor",
|
|
1486
|
-
categories=[
|
|
1698
|
+
categories=[
|
|
1699
|
+
"theme",
|
|
1700
|
+
CustomThemeCategories.SIDEBAR,
|
|
1701
|
+
CustomThemeCategories.LIGHT,
|
|
1702
|
+
CustomThemeCategories.DARK,
|
|
1703
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1704
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1705
|
+
],
|
|
1487
1706
|
description="""
|
|
1488
1707
|
Gray text color used for the basic color palette.
|
|
1489
1708
|
|
|
@@ -1497,24 +1716,64 @@ _create_theme_options(
|
|
|
1497
1716
|
|
|
1498
1717
|
_create_theme_options(
|
|
1499
1718
|
"linkColor",
|
|
1500
|
-
categories=[
|
|
1719
|
+
categories=[
|
|
1720
|
+
"theme",
|
|
1721
|
+
CustomThemeCategories.SIDEBAR,
|
|
1722
|
+
CustomThemeCategories.LIGHT,
|
|
1723
|
+
CustomThemeCategories.DARK,
|
|
1724
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1725
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1726
|
+
],
|
|
1501
1727
|
description="""
|
|
1502
1728
|
Color used for all links.
|
|
1729
|
+
|
|
1730
|
+
This defaults to the resolved value of `blueTextColor`.
|
|
1503
1731
|
""",
|
|
1504
1732
|
)
|
|
1505
1733
|
|
|
1506
1734
|
_create_theme_options(
|
|
1507
1735
|
"linkUnderline",
|
|
1508
|
-
categories=[
|
|
1736
|
+
categories=[
|
|
1737
|
+
"theme",
|
|
1738
|
+
CustomThemeCategories.SIDEBAR,
|
|
1739
|
+
CustomThemeCategories.LIGHT,
|
|
1740
|
+
CustomThemeCategories.DARK,
|
|
1741
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1742
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1743
|
+
],
|
|
1509
1744
|
description="""
|
|
1510
1745
|
Whether or not links should be displayed with an underline.
|
|
1511
1746
|
""",
|
|
1512
1747
|
type_=bool,
|
|
1513
1748
|
)
|
|
1514
1749
|
|
|
1750
|
+
_create_theme_options(
|
|
1751
|
+
"codeTextColor",
|
|
1752
|
+
categories=[
|
|
1753
|
+
"theme",
|
|
1754
|
+
CustomThemeCategories.SIDEBAR,
|
|
1755
|
+
CustomThemeCategories.LIGHT,
|
|
1756
|
+
CustomThemeCategories.DARK,
|
|
1757
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1758
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1759
|
+
],
|
|
1760
|
+
description="""
|
|
1761
|
+
Text color used for code blocks.
|
|
1762
|
+
|
|
1763
|
+
This defaults to the resolved value of `greenTextColor`.
|
|
1764
|
+
""",
|
|
1765
|
+
)
|
|
1766
|
+
|
|
1515
1767
|
_create_theme_options(
|
|
1516
1768
|
"codeBackgroundColor",
|
|
1517
|
-
categories=[
|
|
1769
|
+
categories=[
|
|
1770
|
+
"theme",
|
|
1771
|
+
CustomThemeCategories.SIDEBAR,
|
|
1772
|
+
CustomThemeCategories.LIGHT,
|
|
1773
|
+
CustomThemeCategories.DARK,
|
|
1774
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1775
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1776
|
+
],
|
|
1518
1777
|
description="""
|
|
1519
1778
|
Background color used for code blocks.
|
|
1520
1779
|
""",
|
|
@@ -1522,7 +1781,14 @@ _create_theme_options(
|
|
|
1522
1781
|
|
|
1523
1782
|
_create_theme_options(
|
|
1524
1783
|
"font",
|
|
1525
|
-
categories=[
|
|
1784
|
+
categories=[
|
|
1785
|
+
"theme",
|
|
1786
|
+
CustomThemeCategories.SIDEBAR,
|
|
1787
|
+
CustomThemeCategories.LIGHT,
|
|
1788
|
+
CustomThemeCategories.DARK,
|
|
1789
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1790
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1791
|
+
],
|
|
1526
1792
|
description="""
|
|
1527
1793
|
The font family for all text, except code blocks.
|
|
1528
1794
|
|
|
@@ -1603,7 +1869,14 @@ _create_theme_options(
|
|
|
1603
1869
|
|
|
1604
1870
|
_create_theme_options(
|
|
1605
1871
|
"headingFont",
|
|
1606
|
-
categories=[
|
|
1872
|
+
categories=[
|
|
1873
|
+
"theme",
|
|
1874
|
+
CustomThemeCategories.SIDEBAR,
|
|
1875
|
+
CustomThemeCategories.LIGHT,
|
|
1876
|
+
CustomThemeCategories.DARK,
|
|
1877
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1878
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1879
|
+
],
|
|
1607
1880
|
description="""
|
|
1608
1881
|
The font family to use for headings.
|
|
1609
1882
|
|
|
@@ -1623,7 +1896,14 @@ _create_theme_options(
|
|
|
1623
1896
|
|
|
1624
1897
|
_create_theme_options(
|
|
1625
1898
|
"headingFontSizes",
|
|
1626
|
-
categories=[
|
|
1899
|
+
categories=[
|
|
1900
|
+
"theme",
|
|
1901
|
+
CustomThemeCategories.SIDEBAR,
|
|
1902
|
+
CustomThemeCategories.LIGHT,
|
|
1903
|
+
CustomThemeCategories.DARK,
|
|
1904
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1905
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1906
|
+
],
|
|
1627
1907
|
description="""
|
|
1628
1908
|
One or more font sizes for h1-h6 headings.
|
|
1629
1909
|
|
|
@@ -1655,7 +1935,14 @@ _create_theme_options(
|
|
|
1655
1935
|
|
|
1656
1936
|
_create_theme_options(
|
|
1657
1937
|
"headingFontWeights",
|
|
1658
|
-
categories=[
|
|
1938
|
+
categories=[
|
|
1939
|
+
"theme",
|
|
1940
|
+
CustomThemeCategories.SIDEBAR,
|
|
1941
|
+
CustomThemeCategories.LIGHT,
|
|
1942
|
+
CustomThemeCategories.DARK,
|
|
1943
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1944
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1945
|
+
],
|
|
1659
1946
|
description="""
|
|
1660
1947
|
One or more font weights for h1-h6 headings.
|
|
1661
1948
|
|
|
@@ -1685,7 +1972,14 @@ _create_theme_options(
|
|
|
1685
1972
|
|
|
1686
1973
|
_create_theme_options(
|
|
1687
1974
|
"codeFont",
|
|
1688
|
-
categories=[
|
|
1975
|
+
categories=[
|
|
1976
|
+
"theme",
|
|
1977
|
+
CustomThemeCategories.SIDEBAR,
|
|
1978
|
+
CustomThemeCategories.LIGHT,
|
|
1979
|
+
CustomThemeCategories.DARK,
|
|
1980
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
1981
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
1982
|
+
],
|
|
1689
1983
|
description="""
|
|
1690
1984
|
The font family to use for code (monospace) in the sidebar.
|
|
1691
1985
|
|
|
@@ -1703,7 +1997,14 @@ _create_theme_options(
|
|
|
1703
1997
|
|
|
1704
1998
|
_create_theme_options(
|
|
1705
1999
|
"codeFontSize",
|
|
1706
|
-
categories=[
|
|
2000
|
+
categories=[
|
|
2001
|
+
"theme",
|
|
2002
|
+
CustomThemeCategories.SIDEBAR,
|
|
2003
|
+
CustomThemeCategories.LIGHT,
|
|
2004
|
+
CustomThemeCategories.DARK,
|
|
2005
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2006
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2007
|
+
],
|
|
1707
2008
|
description="""
|
|
1708
2009
|
The font size (in pixels or rem) for code blocks and code text.
|
|
1709
2010
|
|
|
@@ -1716,7 +2017,14 @@ _create_theme_options(
|
|
|
1716
2017
|
|
|
1717
2018
|
_create_theme_options(
|
|
1718
2019
|
"codeFontWeight",
|
|
1719
|
-
categories=[
|
|
2020
|
+
categories=[
|
|
2021
|
+
"theme",
|
|
2022
|
+
CustomThemeCategories.SIDEBAR,
|
|
2023
|
+
CustomThemeCategories.LIGHT,
|
|
2024
|
+
CustomThemeCategories.DARK,
|
|
2025
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2026
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2027
|
+
],
|
|
1720
2028
|
description="""
|
|
1721
2029
|
The font weight for code blocks and code text.
|
|
1722
2030
|
|
|
@@ -1731,7 +2039,14 @@ _create_theme_options(
|
|
|
1731
2039
|
|
|
1732
2040
|
_create_theme_options(
|
|
1733
2041
|
"baseRadius",
|
|
1734
|
-
categories=[
|
|
2042
|
+
categories=[
|
|
2043
|
+
"theme",
|
|
2044
|
+
CustomThemeCategories.SIDEBAR,
|
|
2045
|
+
CustomThemeCategories.LIGHT,
|
|
2046
|
+
CustomThemeCategories.DARK,
|
|
2047
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2048
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2049
|
+
],
|
|
1735
2050
|
description="""
|
|
1736
2051
|
The radius used as basis for the corners of most UI elements.
|
|
1737
2052
|
|
|
@@ -1750,7 +2065,14 @@ _create_theme_options(
|
|
|
1750
2065
|
|
|
1751
2066
|
_create_theme_options(
|
|
1752
2067
|
"buttonRadius",
|
|
1753
|
-
categories=[
|
|
2068
|
+
categories=[
|
|
2069
|
+
"theme",
|
|
2070
|
+
CustomThemeCategories.SIDEBAR,
|
|
2071
|
+
CustomThemeCategories.LIGHT,
|
|
2072
|
+
CustomThemeCategories.DARK,
|
|
2073
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2074
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2075
|
+
],
|
|
1754
2076
|
description="""
|
|
1755
2077
|
The radius used as basis for the corners of buttons.
|
|
1756
2078
|
|
|
@@ -1771,7 +2093,14 @@ _create_theme_options(
|
|
|
1771
2093
|
|
|
1772
2094
|
_create_theme_options(
|
|
1773
2095
|
"borderColor",
|
|
1774
|
-
categories=[
|
|
2096
|
+
categories=[
|
|
2097
|
+
"theme",
|
|
2098
|
+
CustomThemeCategories.SIDEBAR,
|
|
2099
|
+
CustomThemeCategories.LIGHT,
|
|
2100
|
+
CustomThemeCategories.DARK,
|
|
2101
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2102
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2103
|
+
],
|
|
1775
2104
|
description="""
|
|
1776
2105
|
The color of the border around elements.
|
|
1777
2106
|
""",
|
|
@@ -1779,7 +2108,14 @@ _create_theme_options(
|
|
|
1779
2108
|
|
|
1780
2109
|
_create_theme_options(
|
|
1781
2110
|
"dataframeBorderColor",
|
|
1782
|
-
categories=[
|
|
2111
|
+
categories=[
|
|
2112
|
+
"theme",
|
|
2113
|
+
CustomThemeCategories.SIDEBAR,
|
|
2114
|
+
CustomThemeCategories.LIGHT,
|
|
2115
|
+
CustomThemeCategories.DARK,
|
|
2116
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2117
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2118
|
+
],
|
|
1783
2119
|
description="""
|
|
1784
2120
|
The color of the border around dataframes and tables.
|
|
1785
2121
|
|
|
@@ -1789,7 +2125,14 @@ _create_theme_options(
|
|
|
1789
2125
|
|
|
1790
2126
|
_create_theme_options(
|
|
1791
2127
|
"dataframeHeaderBackgroundColor",
|
|
1792
|
-
categories=[
|
|
2128
|
+
categories=[
|
|
2129
|
+
"theme",
|
|
2130
|
+
CustomThemeCategories.SIDEBAR,
|
|
2131
|
+
CustomThemeCategories.LIGHT,
|
|
2132
|
+
CustomThemeCategories.DARK,
|
|
2133
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2134
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2135
|
+
],
|
|
1793
2136
|
description="""
|
|
1794
2137
|
The background color of the dataframe's header.
|
|
1795
2138
|
|
|
@@ -1803,7 +2146,14 @@ _create_theme_options(
|
|
|
1803
2146
|
|
|
1804
2147
|
_create_theme_options(
|
|
1805
2148
|
"showWidgetBorder",
|
|
1806
|
-
categories=[
|
|
2149
|
+
categories=[
|
|
2150
|
+
"theme",
|
|
2151
|
+
CustomThemeCategories.SIDEBAR,
|
|
2152
|
+
CustomThemeCategories.LIGHT,
|
|
2153
|
+
CustomThemeCategories.DARK,
|
|
2154
|
+
CustomThemeCategories.LIGHT_SIDEBAR,
|
|
2155
|
+
CustomThemeCategories.DARK_SIDEBAR,
|
|
2156
|
+
],
|
|
1807
2157
|
description="""
|
|
1808
2158
|
Whether to show a border around input widgets.
|
|
1809
2159
|
""",
|
|
@@ -2043,6 +2393,43 @@ def _update_config_with_sensitive_env_var(
|
|
|
2043
2393
|
_set_option(opt_name, env_var_value, _DEFINED_BY_ENV_VAR)
|
|
2044
2394
|
|
|
2045
2395
|
|
|
2396
|
+
def _is_valid_theme_section(section_path: str) -> bool:
|
|
2397
|
+
"""Check if a theme section path follows valid nesting rules, returns True if valid, False otherwise.
|
|
2398
|
+
|
|
2399
|
+
Valid patterns: theme.sidebar, theme.light, theme.dark, theme.light.sidebar, theme.dark.sidebar
|
|
2400
|
+
Invalid patterns: theme.sidebar.light, theme.sidebar.dark, theme.light.dark, theme.dark.light, etc.
|
|
2401
|
+
|
|
2402
|
+
Parameters
|
|
2403
|
+
----------
|
|
2404
|
+
section_path : str
|
|
2405
|
+
The dot-separated theme section path (e.g., "theme.light.sidebar").
|
|
2406
|
+
Will always have at least 2 parts and start with "theme".
|
|
2407
|
+
"""
|
|
2408
|
+
parts = section_path.split(".")
|
|
2409
|
+
|
|
2410
|
+
# theme.sidebar/light/dark is valid (2 parts: "theme" + section)
|
|
2411
|
+
if len(parts) == 2:
|
|
2412
|
+
return parts[1] in [
|
|
2413
|
+
CustomThemeCategories.SIDEBAR.value,
|
|
2414
|
+
CustomThemeCategories.LIGHT.value,
|
|
2415
|
+
CustomThemeCategories.DARK.value,
|
|
2416
|
+
]
|
|
2417
|
+
|
|
2418
|
+
# theme.light.sidebar/theme.dark.sidebar are the only valid 3-part patterns
|
|
2419
|
+
if len(parts) == 3:
|
|
2420
|
+
# Only allow light/dark as the middle level, with sidebar as the final level
|
|
2421
|
+
if parts[1] in [
|
|
2422
|
+
CustomThemeCategories.LIGHT.value,
|
|
2423
|
+
CustomThemeCategories.DARK.value,
|
|
2424
|
+
]:
|
|
2425
|
+
return parts[2] == CustomThemeCategories.SIDEBAR.value
|
|
2426
|
+
# sidebar cannot have nested sections (theme.sidebar.light/dark)
|
|
2427
|
+
return False
|
|
2428
|
+
|
|
2429
|
+
# Any nesting with 4+ parts is invalid (e.g., theme.light.sidebar.dark)
|
|
2430
|
+
return False
|
|
2431
|
+
|
|
2432
|
+
|
|
2046
2433
|
def _update_config_with_toml(raw_toml: str, where_defined: str) -> None:
|
|
2047
2434
|
"""Update the config system by parsing this string.
|
|
2048
2435
|
|
|
@@ -2105,8 +2492,17 @@ def _update_config_with_toml(raw_toml: str, where_defined: str) -> None:
|
|
|
2105
2492
|
|
|
2106
2493
|
for name, value in section_data.items():
|
|
2107
2494
|
option_name = f"{section_path}.{name}"
|
|
2108
|
-
#
|
|
2109
|
-
if name in [
|
|
2495
|
+
# Only check for nested sections when we're already in a theme section
|
|
2496
|
+
if section_path.startswith("theme") and name in [
|
|
2497
|
+
CustomThemeCategories.SIDEBAR.value,
|
|
2498
|
+
CustomThemeCategories.LIGHT.value,
|
|
2499
|
+
CustomThemeCategories.DARK.value,
|
|
2500
|
+
]:
|
|
2501
|
+
# Validate the theme section before processing
|
|
2502
|
+
if not _is_valid_theme_section(option_name):
|
|
2503
|
+
raise StreamlitInvalidThemeSectionError(
|
|
2504
|
+
option_name=option_name,
|
|
2505
|
+
)
|
|
2110
2506
|
process_section(option_name, value)
|
|
2111
2507
|
else:
|
|
2112
2508
|
# It's a regular config option, set it
|
|
@@ -2257,6 +2653,13 @@ def get_config_options(
|
|
|
2257
2653
|
for opt_name, opt_val in options_from_flags.items():
|
|
2258
2654
|
_set_option(opt_name, opt_val, _DEFINED_BY_FLAG)
|
|
2259
2655
|
|
|
2656
|
+
# Handle theme inheritance if theme.base points to a file
|
|
2657
|
+
# This happens AFTER all config sources (files, env vars, flags) are processed
|
|
2658
|
+
# so theme.base can be set via any of those
|
|
2659
|
+
config_util.process_theme_inheritance(
|
|
2660
|
+
_config_options, _config_options_template, _set_option
|
|
2661
|
+
)
|
|
2662
|
+
|
|
2260
2663
|
if old_options and config_util.server_option_changed(
|
|
2261
2664
|
old_options, _config_options
|
|
2262
2665
|
):
|