streamlit-nightly 1.46.2.dev20250630__py3-none-any.whl → 1.46.2.dev20250702__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/config.py +21 -0
- streamlit/elements/doc_string.py +3 -0
- streamlit/elements/lib/column_types.py +37 -20
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +5 -1
- streamlit/runtime/app_session.py +49 -1
- streamlit/runtime/caching/cache_data_api.py +34 -55
- streamlit/runtime/caching/cache_errors.py +9 -9
- streamlit/runtime/caching/cache_resource_api.py +26 -44
- streamlit/runtime/caching/cache_utils.py +37 -24
- streamlit/runtime/caching/cached_message_replay.py +13 -6
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +219 -219
- streamlit/static/static/css/index.2-JSeiMQ.css +1 -0
- streamlit/static/static/js/{ErrorOutline.esm.Dxjg6IRT.js → ErrorOutline.esm.MhIoYdvl.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DUks_wV_.js → FileDownload.esm.MFVQ8TeX.js} +1 -1
- streamlit/static/static/js/{FileHelper.BbPTP1JB.js → FileHelper.4MaelLoM.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CPbpL4Iu.js → FormClearHelper.B0jg0hVR.js} +1 -1
- streamlit/static/static/js/{Hooks.CxUXOgrk.js → Hooks.BRUa3Uwi.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DJ1rHmtw.js → InputInstructions.DIDrjUfW.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CHuwkwTP.js → ProgressBar.D5j4Grse.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.D95lvcfx.js → RenderInPortalIfExists.DSEpNV6C.js} +1 -1
- streamlit/static/static/js/Toolbar.CQcJmHso.js +1 -0
- streamlit/static/static/js/{base-input.WYe9-ubW.js → base-input.BnnSlzQu.js} +1 -1
- streamlit/static/static/js/{checkbox.q85ZLs2m.js → checkbox.C3U3kKA7.js} +1 -1
- streamlit/static/static/js/{createSuper.B8q8YLDg.js → createSuper.Cy5MeyJ7.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.DfB1NFlz.js +1 -0
- streamlit/static/static/js/{downloader.DNzHzyGV.js → downloader.DJTt16dd.js} +1 -1
- streamlit/static/static/js/{es6.DspIW9uw.js → es6.wyhZ4wJk.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.r0RTNCiE.js → iframeResizer.contentWindow.DFyVP9Ig.js} +1 -1
- streamlit/static/static/js/{index.yF9-AUSb.js → index.B-X33K52.js} +1 -1
- streamlit/static/static/js/{index.BlCKLDOZ.js → index.B22EHN7-.js} +1 -1
- streamlit/static/static/js/{index.Da1q_KWc.js → index.B465_5qO.js} +1 -1
- streamlit/static/static/js/{index.CW9dTClp.js → index.BHoorvVC.js} +70 -70
- streamlit/static/static/js/{index.ChKqi4i3.js → index.BMd4yctQ.js} +1 -1
- streamlit/static/static/js/{index.Cu1q0VW4.js → index.BNiT2b3M.js} +1 -1
- streamlit/static/static/js/{index.Ca1oUX_q.js → index.BSHRz8-s.js} +1 -1
- streamlit/static/static/js/{index.fwPkRvFV.js → index.C2ZYRKqZ.js} +1 -1
- streamlit/static/static/js/{index.3xavF_0n.js → index.C4H2pObU.js} +1 -1
- streamlit/static/static/js/{index.CBTQKi-P.js → index.CDhJdsJ-.js} +1 -1
- streamlit/static/static/js/{index.CAv2zgjK.js → index.CDk53kDT.js} +1 -1
- streamlit/static/static/js/{index.1c3oM2N7.js → index.CG52VtIR.js} +1 -1
- streamlit/static/static/js/{index.DcWAX9sK.js → index.CLg6_EPb.js} +1 -1
- streamlit/static/static/js/{index.3gA1NIOE.js → index.C_ub2Pfc.js} +1 -1
- streamlit/static/static/js/{index.fMByvmk4.js → index.Cipw6ZXy.js} +1 -1
- streamlit/static/static/js/{index.Dl3PDYIm.js → index.CvEUwmm2.js} +1 -1
- streamlit/static/static/js/{index.DI6GST9u.js → index.Cx59kXcb.js} +1 -1
- streamlit/static/static/js/{index.CJVmqGWb.js → index.D-doFAXM.js} +1 -1
- streamlit/static/static/js/{index.JtAQSo4b.js → index.DEc9e9_6.js} +1 -1
- streamlit/static/static/js/index.DFtXcE7L.js +197 -0
- streamlit/static/static/js/{index.CVmI74U6.js → index.DJzsQdj5.js} +1 -1
- streamlit/static/static/js/{index.FoBY-QWg.js → index.DLQQdwIj.js} +1 -1
- streamlit/static/static/js/{index.CGyNHtSj.js → index.DRodAgy0.js} +1 -1
- streamlit/static/static/js/{index.AWNbYFrb.js → index.DT8f2xQ9.js} +1 -1
- streamlit/static/static/js/{index.BN07pOu4.js → index.DcEV00Pn.js} +1 -1
- streamlit/static/static/js/{index.BJraUn_t.js → index.Do1oo2Dl.js} +1 -1
- streamlit/static/static/js/{index.BxV4Hdx3.js → index.Dr7_LGVT.js} +1 -1
- streamlit/static/static/js/{index.QwG_LwRf.js → index.DsdPm0SS.js} +1 -1
- streamlit/static/static/js/{index.DAHN8zmn.js → index.Dsil7y_J.js} +1 -1
- streamlit/static/static/js/{index.-rWhcLJP.js → index.DtbQuv3u.js} +1 -1
- streamlit/static/static/js/{index.mPd_0hyY.js → index.DyTIPa0F.js} +1 -1
- streamlit/static/static/js/{index.CobtVpzC.js → index.DynUmaAG.js} +1 -1
- streamlit/static/static/js/{index.CZ4DY8ui.js → index.DzC4L_Us.js} +1 -1
- streamlit/static/static/js/{index.CwsfJRGf.js → index.UFChjuC3.js} +1 -1
- streamlit/static/static/js/{index.TRFuoL4h.js → index.gMS0zlRZ.js} +2 -2
- streamlit/static/static/js/{index.BRKsam4Y.js → index.lQYpmexK.js} +1 -1
- streamlit/static/static/js/{index.zK_Kki5l.js → index.z241Yt9a.js} +1 -1
- streamlit/static/static/js/{input.BblW0DV1.js → input.C8HOZnEd.js} +1 -1
- streamlit/static/static/js/{memory.BFpqnunH.js → memory.8fc2LDiK.js} +1 -1
- streamlit/static/static/js/{mergeWith.DMaSpMaL.js → mergeWith.xmxP-tqn.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Cr9sn26b.js → number-overlay-editor.DtoLRumH.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.B3NcCHDd.js → possibleConstructorReturn.DqUCGXEg.js} +1 -1
- streamlit/static/static/js/{sandbox.3jFBLWNf.js → sandbox.de7mpc93.js} +1 -1
- streamlit/static/static/js/{textarea.dsrIcAKo.js → textarea.9dU6cbLz.js} +1 -1
- streamlit/static/static/js/{timepicker.CbF35-hi.js → timepicker.DANyzCwb.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BqKiiQ0r.js → toConsumableArray.Bja4AaDo.js} +1 -1
- streamlit/static/static/js/{uniqueId.DrVTLd2c.js → uniqueId.q5r0gCRd.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.CTBqw8Kt.js → useBasicWidgetState.B0oxOutH.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.D1XRaVU2.js → useOnInputChange.XxzVJXCy.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CbCRhtqE.js → withFullScreenWrapper.eXXoswSf.js} +1 -1
- {streamlit_nightly-1.46.2.dev20250630.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.46.2.dev20250630.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/RECORD +86 -86
- streamlit/static/static/css/index.C5t3M85E.css +0 -1
- streamlit/static/static/js/Toolbar.BseShgV1.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.Dvyj9Tv8.js +0 -1
- streamlit/static/static/js/index.BlBZJ-Nr.js +0 -197
- {streamlit_nightly-1.46.2.dev20250630.data → streamlit_nightly-1.46.2.dev20250702.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.46.2.dev20250630.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.46.2.dev20250630.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.46.2.dev20250630.dist-info → streamlit_nightly-1.46.2.dev20250702.dist-info}/top_level.txt +0 -0
streamlit/config.py
CHANGED
@@ -1402,6 +1402,27 @@ _create_theme_options(
|
|
1402
1402
|
type_=int,
|
1403
1403
|
)
|
1404
1404
|
|
1405
|
+
_create_theme_options(
|
1406
|
+
"headingFontWeights",
|
1407
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
1408
|
+
description="""
|
1409
|
+
Sets the font weight for h1-h6 headings. Valid values are 100-900, in increments of 100.
|
1410
|
+
|
1411
|
+
When unset, the font weights will be set to defaults:
|
1412
|
+
- h1: bold 700
|
1413
|
+
- h2-h6: semi-bold 600
|
1414
|
+
|
1415
|
+
For example, you can use the following to set the font weight for h1 to 700 and h2-h6 to 600:
|
1416
|
+
headingFontWeights = [700, 600, 600, 600, 600, 600]
|
1417
|
+
|
1418
|
+
If you only want to set h1-h3:
|
1419
|
+
headingFontWeights = [700, 600, 500]
|
1420
|
+
|
1421
|
+
If you want to set the font weight for all headings to 700, you can do the following:
|
1422
|
+
headingFontWeights = 700
|
1423
|
+
""",
|
1424
|
+
)
|
1425
|
+
|
1405
1426
|
_create_theme_options(
|
1406
1427
|
"chartCategoricalColors",
|
1407
1428
|
categories=["theme"],
|
streamlit/elements/doc_string.py
CHANGED
@@ -27,6 +27,7 @@ import streamlit
|
|
27
27
|
from streamlit.elements.lib.layout_utils import LayoutConfig, validate_width
|
28
28
|
from streamlit.proto.DocString_pb2 import DocString as DocStringProto
|
29
29
|
from streamlit.proto.DocString_pb2 import Member as MemberProto
|
30
|
+
from streamlit.runtime.caching.cache_utils import CachedFunc
|
30
31
|
from streamlit.runtime.metrics_util import gather_metrics
|
31
32
|
from streamlit.runtime.scriptrunner.script_runner import (
|
32
33
|
__file__ as SCRIPTRUNNER_FILENAME, # noqa: N812
|
@@ -220,6 +221,7 @@ def _get_docstring(obj: object) -> str | None:
|
|
220
221
|
# If that's the case here, use the type's docstring.
|
221
222
|
# For objects where type is "type" we do not print the docs (e.g. int).
|
222
223
|
# We also do not print the docs for functions and methods if the docstring is empty.
|
224
|
+
# We treat CachedFunc objects in the same way as functions.
|
223
225
|
if doc_string is None:
|
224
226
|
obj_type = type(obj)
|
225
227
|
|
@@ -228,6 +230,7 @@ def _get_docstring(obj: object) -> str | None:
|
|
228
230
|
and obj_type is not types.ModuleType
|
229
231
|
and not inspect.isfunction(obj)
|
230
232
|
and not inspect.ismethod(obj)
|
233
|
+
and obj_type is not CachedFunc
|
231
234
|
):
|
232
235
|
doc_string = inspect.getdoc(obj_type)
|
233
236
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
from __future__ import annotations
|
19
19
|
|
20
20
|
import datetime
|
21
|
-
from typing import TYPE_CHECKING, Literal, TypedDict
|
21
|
+
from typing import TYPE_CHECKING, Literal, TypedDict, Union
|
22
22
|
|
23
23
|
from typing_extensions import NotRequired, TypeAlias
|
24
24
|
|
@@ -42,7 +42,7 @@ NumberFormat: TypeAlias = Literal[
|
|
42
42
|
"bytes",
|
43
43
|
]
|
44
44
|
|
45
|
-
ColumnWidth: TypeAlias = Literal["small", "medium", "large"]
|
45
|
+
ColumnWidth: TypeAlias = Union[Literal["small", "medium", "large"], int]
|
46
46
|
|
47
47
|
# Type alias that represents all available column types
|
48
48
|
# which are configurable by the user.
|
@@ -169,7 +169,7 @@ class ColumnConfig(TypedDict, total=False):
|
|
169
169
|
The label shown at the top of the column. If this is ``None``
|
170
170
|
(default), the column name is used.
|
171
171
|
|
172
|
-
width: "small", "medium", "large", or None
|
172
|
+
width: "small", "medium", "large", int, or None
|
173
173
|
The display width of the column. If this is ``None`` (default), the
|
174
174
|
column will be sized to fit the cell contents. Otherwise, this can be
|
175
175
|
one of the following:
|
@@ -177,6 +177,7 @@ class ColumnConfig(TypedDict, total=False):
|
|
177
177
|
- ``"small"``: 75px wide
|
178
178
|
- ``"medium"``: 200px wide
|
179
179
|
- ``"large"``: 400px wide
|
180
|
+
- An integer specifying the width in pixels.
|
180
181
|
|
181
182
|
help: str or None
|
182
183
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -273,7 +274,7 @@ def Column(
|
|
273
274
|
The label shown at the top of the column. If this is ``None``
|
274
275
|
(default), the column name is used.
|
275
276
|
|
276
|
-
width: "small", "medium", "large", or None
|
277
|
+
width: "small", "medium", "large", int, or None
|
277
278
|
The display width of the column. If this is ``None`` (default), the
|
278
279
|
column will be sized to fit the cell contents. Otherwise, this can be
|
279
280
|
one of the following:
|
@@ -281,6 +282,7 @@ def Column(
|
|
281
282
|
- ``"small"``: 75px wide
|
282
283
|
- ``"medium"``: 200px wide
|
283
284
|
- ``"large"``: 400px wide
|
285
|
+
- An integer specifying the width in pixels.
|
284
286
|
|
285
287
|
help: str or None
|
286
288
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -377,7 +379,7 @@ def NumberColumn(
|
|
377
379
|
The label shown at the top of the column. If this is ``None``
|
378
380
|
(default), the column name is used.
|
379
381
|
|
380
|
-
width: "small", "medium", "large", or None
|
382
|
+
width: "small", "medium", "large", int, or None
|
381
383
|
The display width of the column. If this is ``None`` (default), the
|
382
384
|
column will be sized to fit the cell contents. Otherwise, this can be
|
383
385
|
one of the following:
|
@@ -385,6 +387,7 @@ def NumberColumn(
|
|
385
387
|
- ``"small"``: 75px wide
|
386
388
|
- ``"medium"``: 200px wide
|
387
389
|
- ``"large"``: 400px wide
|
390
|
+
- An integer specifying the width in pixels.
|
388
391
|
|
389
392
|
help: str or None
|
390
393
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -459,7 +462,7 @@ def NumberColumn(
|
|
459
462
|
(default), integer columns will have a step of 1 and float columns will
|
460
463
|
have unrestricted precision. In this case, some floats may display like
|
461
464
|
integers. Setting ``step`` for float columns will ensure a consistent
|
462
|
-
number of digits after the decimal
|
465
|
+
number of digits after the decimal are displayed.
|
463
466
|
|
464
467
|
Examples
|
465
468
|
--------
|
@@ -535,7 +538,7 @@ def TextColumn(
|
|
535
538
|
The label shown at the top of the column. If this is ``None``
|
536
539
|
(default), the column name is used.
|
537
540
|
|
538
|
-
width: "small", "medium", "large", or None
|
541
|
+
width: "small", "medium", "large", int, or None
|
539
542
|
The display width of the column. If this is ``None`` (default), the
|
540
543
|
column will be sized to fit the cell contents. Otherwise, this can be
|
541
544
|
one of the following:
|
@@ -543,6 +546,7 @@ def TextColumn(
|
|
543
546
|
- ``"small"``: 75px wide
|
544
547
|
- ``"medium"``: 200px wide
|
545
548
|
- ``"large"``: 400px wide
|
549
|
+
- An integer specifying the width in pixels.
|
546
550
|
|
547
551
|
help: str or None
|
548
552
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -657,7 +661,7 @@ def LinkColumn(
|
|
657
661
|
The label shown at the top of the column. If this is ``None``
|
658
662
|
(default), the column name is used.
|
659
663
|
|
660
|
-
width: "small", "medium", "large", or None
|
664
|
+
width: "small", "medium", "large", int, or None
|
661
665
|
The display width of the column. If this is ``None`` (default), the
|
662
666
|
column will be sized to fit the cell contents. Otherwise, this can be
|
663
667
|
one of the following:
|
@@ -665,6 +669,7 @@ def LinkColumn(
|
|
665
669
|
- ``"small"``: 75px wide
|
666
670
|
- ``"medium"``: 200px wide
|
667
671
|
- ``"large"``: 400px wide
|
672
|
+
- An integer specifying the width in pixels.
|
668
673
|
|
669
674
|
help: str or None
|
670
675
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -815,7 +820,7 @@ def CheckboxColumn(
|
|
815
820
|
The label shown at the top of the column. If this is ``None``
|
816
821
|
(default), the column name is used.
|
817
822
|
|
818
|
-
width: "small", "medium", "large", or None
|
823
|
+
width: "small", "medium", "large", int, or None
|
819
824
|
The display width of the column. If this is ``None`` (default), the
|
820
825
|
column will be sized to fit the cell contents. Otherwise, this can be
|
821
826
|
one of the following:
|
@@ -823,6 +828,7 @@ def CheckboxColumn(
|
|
823
828
|
- ``"small"``: 75px wide
|
824
829
|
- ``"medium"``: 200px wide
|
825
830
|
- ``"large"``: 400px wide
|
831
|
+
- An integer specifying the width in pixels.
|
826
832
|
|
827
833
|
help: str or None
|
828
834
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -923,7 +929,7 @@ def SelectboxColumn(
|
|
923
929
|
The label shown at the top of the column. If this is ``None``
|
924
930
|
(default), the column name is used.
|
925
931
|
|
926
|
-
width: "small", "medium", "large", or None
|
932
|
+
width: "small", "medium", "large", int, or None
|
927
933
|
The display width of the column. If this is ``None`` (default), the
|
928
934
|
column will be sized to fit the cell contents. Otherwise, this can be
|
929
935
|
one of the following:
|
@@ -931,6 +937,7 @@ def SelectboxColumn(
|
|
931
937
|
- ``"small"``: 75px wide
|
932
938
|
- ``"medium"``: 200px wide
|
933
939
|
- ``"large"``: 400px wide
|
940
|
+
- An integer specifying the width in pixels.
|
934
941
|
|
935
942
|
help: str or None
|
936
943
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1046,7 +1053,7 @@ def BarChartColumn(
|
|
1046
1053
|
The label shown at the top of the column. If this is ``None``
|
1047
1054
|
(default), the column name is used.
|
1048
1055
|
|
1049
|
-
width: "small", "medium", "large", or None
|
1056
|
+
width: "small", "medium", "large", int, or None
|
1050
1057
|
The display width of the column. If this is ``None`` (default), the
|
1051
1058
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1052
1059
|
one of the following:
|
@@ -1054,6 +1061,7 @@ def BarChartColumn(
|
|
1054
1061
|
- ``"small"``: 75px wide
|
1055
1062
|
- ``"medium"``: 200px wide
|
1056
1063
|
- ``"large"``: 400px wide
|
1064
|
+
- An integer specifying the width in pixels.
|
1057
1065
|
|
1058
1066
|
help: str or None
|
1059
1067
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1142,7 +1150,7 @@ def LineChartColumn(
|
|
1142
1150
|
The label shown at the top of the column. If this is ``None``
|
1143
1151
|
(default), the column name is used.
|
1144
1152
|
|
1145
|
-
width: "small", "medium", "large", or None
|
1153
|
+
width: "small", "medium", "large", int, or None
|
1146
1154
|
The display width of the column. If this is ``None`` (default), the
|
1147
1155
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1148
1156
|
one of the following:
|
@@ -1150,6 +1158,7 @@ def LineChartColumn(
|
|
1150
1158
|
- ``"small"``: 75px wide
|
1151
1159
|
- ``"medium"``: 200px wide
|
1152
1160
|
- ``"large"``: 400px wide
|
1161
|
+
- An integer specifying the width in pixels.
|
1153
1162
|
|
1154
1163
|
help: str or None
|
1155
1164
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1239,7 +1248,7 @@ def AreaChartColumn(
|
|
1239
1248
|
The label shown at the top of the column. If this is ``None``
|
1240
1249
|
(default), the column name is used.
|
1241
1250
|
|
1242
|
-
width: "small", "medium", "large", or None
|
1251
|
+
width: "small", "medium", "large", int, or None
|
1243
1252
|
The display width of the column. If this is ``None`` (default), the
|
1244
1253
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1245
1254
|
one of the following:
|
@@ -1247,6 +1256,7 @@ def AreaChartColumn(
|
|
1247
1256
|
- ``"small"``: 75px wide
|
1248
1257
|
- ``"medium"``: 200px wide
|
1249
1258
|
- ``"large"``: 400px wide
|
1259
|
+
- An integer specifying the width in pixels.
|
1250
1260
|
|
1251
1261
|
help: str or None
|
1252
1262
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1342,7 +1352,7 @@ def ImageColumn(
|
|
1342
1352
|
The label shown at the top of the column. If this is ``None``
|
1343
1353
|
(default), the column name is used.
|
1344
1354
|
|
1345
|
-
width: "small", "medium", "large", or None
|
1355
|
+
width: "small", "medium", "large", int, or None
|
1346
1356
|
The display width of the column. If this is ``None`` (default), the
|
1347
1357
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1348
1358
|
one of the following:
|
@@ -1350,6 +1360,7 @@ def ImageColumn(
|
|
1350
1360
|
- ``"small"``: 75px wide
|
1351
1361
|
- ``"medium"``: 200px wide
|
1352
1362
|
- ``"large"``: 400px wide
|
1363
|
+
- An integer specifying the width in pixels.
|
1353
1364
|
|
1354
1365
|
help: str or None
|
1355
1366
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1424,7 +1435,7 @@ def ListColumn(
|
|
1424
1435
|
The label shown at the top of the column. If this is ``None``
|
1425
1436
|
(default), the column name is used.
|
1426
1437
|
|
1427
|
-
width: "small", "medium", "large", or None
|
1438
|
+
width: "small", "medium", "large", int, or None
|
1428
1439
|
The display width of the column. If this is ``None`` (default), the
|
1429
1440
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1430
1441
|
one of the following:
|
@@ -1432,6 +1443,7 @@ def ListColumn(
|
|
1432
1443
|
- ``"small"``: 75px wide
|
1433
1444
|
- ``"medium"``: 200px wide
|
1434
1445
|
- ``"large"``: 400px wide
|
1446
|
+
- An integer specifying the width in pixels.
|
1435
1447
|
|
1436
1448
|
help: str or None
|
1437
1449
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1517,7 +1529,7 @@ def DatetimeColumn(
|
|
1517
1529
|
The label shown at the top of the column. If this is ``None``
|
1518
1530
|
(default), the column name is used.
|
1519
1531
|
|
1520
|
-
width: "small", "medium", "large", or None
|
1532
|
+
width: "small", "medium", "large", int, or None
|
1521
1533
|
The display width of the column. If this is ``None`` (default), the
|
1522
1534
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1523
1535
|
one of the following:
|
@@ -1525,6 +1537,7 @@ def DatetimeColumn(
|
|
1525
1537
|
- ``"small"``: 75px wide
|
1526
1538
|
- ``"medium"``: 200px wide
|
1527
1539
|
- ``"large"``: 400px wide
|
1540
|
+
- An integer specifying the width in pixels.
|
1528
1541
|
|
1529
1542
|
help: str or None
|
1530
1543
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1679,7 +1692,7 @@ def TimeColumn(
|
|
1679
1692
|
The label shown at the top of the column. If this is ``None``
|
1680
1693
|
(default), the column name is used.
|
1681
1694
|
|
1682
|
-
width: "small", "medium", "large", or None
|
1695
|
+
width: "small", "medium", "large", int, or None
|
1683
1696
|
The display width of the column. If this is ``None`` (default), the
|
1684
1697
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1685
1698
|
one of the following:
|
@@ -1687,6 +1700,7 @@ def TimeColumn(
|
|
1687
1700
|
- ``"small"``: 75px wide
|
1688
1701
|
- ``"medium"``: 200px wide
|
1689
1702
|
- ``"large"``: 400px wide
|
1703
|
+
- An integer specifying the width in pixels.
|
1690
1704
|
|
1691
1705
|
help: str or None
|
1692
1706
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1832,7 +1846,7 @@ def DateColumn(
|
|
1832
1846
|
The label shown at the top of the column. If this is ``None``
|
1833
1847
|
(default), the column name is used.
|
1834
1848
|
|
1835
|
-
width: "small", "medium", "large", or None
|
1849
|
+
width: "small", "medium", "large", int, or None
|
1836
1850
|
The display width of the column. If this is ``None`` (default), the
|
1837
1851
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1838
1852
|
one of the following:
|
@@ -1840,6 +1854,7 @@ def DateColumn(
|
|
1840
1854
|
- ``"small"``: 75px wide
|
1841
1855
|
- ``"medium"``: 200px wide
|
1842
1856
|
- ``"large"``: 400px wide
|
1857
|
+
- An integer specifying the width in pixels.
|
1843
1858
|
|
1844
1859
|
help: str or None
|
1845
1860
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -1982,7 +1997,7 @@ def ProgressColumn(
|
|
1982
1997
|
The label shown at the top of the column. If this is ``None``
|
1983
1998
|
(default), the column name is used.
|
1984
1999
|
|
1985
|
-
width: "small", "medium", "large", or None
|
2000
|
+
width: "small", "medium", "large", int, or None
|
1986
2001
|
The display width of the column. If this is ``None`` (default), the
|
1987
2002
|
column will be sized to fit the cell contents. Otherwise, this can be
|
1988
2003
|
one of the following:
|
@@ -1990,6 +2005,7 @@ def ProgressColumn(
|
|
1990
2005
|
- ``"small"``: 75px wide
|
1991
2006
|
- ``"medium"``: 200px wide
|
1992
2007
|
- ``"large"``: 400px wide
|
2008
|
+
- An integer specifying the width in pixels.
|
1993
2009
|
|
1994
2010
|
help: str or None
|
1995
2011
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -2104,7 +2120,7 @@ def JsonColumn(
|
|
2104
2120
|
The label shown at the top of the column. If this is ``None``
|
2105
2121
|
(default), the column name is used.
|
2106
2122
|
|
2107
|
-
width: "small", "medium", "large", or None
|
2123
|
+
width: "small", "medium", "large", int, or None
|
2108
2124
|
The display width of the column. If this is ``None`` (default), the
|
2109
2125
|
column will be sized to fit the cell contents. Otherwise, this can be
|
2110
2126
|
one of the following:
|
@@ -2112,6 +2128,7 @@ def JsonColumn(
|
|
2112
2128
|
- ``"small"``: 75px wide
|
2113
2129
|
- ``"medium"``: 200px wide
|
2114
2130
|
- ``"large"``: 400px wide
|
2131
|
+
- An integer specifying the width in pixels.
|
2115
2132
|
|
2116
2133
|
help: str or None
|
2117
2134
|
A tooltip that gets displayed when hovering over the column label. If
|
@@ -16,7 +16,7 @@ from streamlit.proto import AppPage_pb2 as streamlit_dot_proto_dot_AppPage__pb2
|
|
16
16
|
from streamlit.proto import SessionStatus_pb2 as streamlit_dot_proto_dot_SessionStatus__pb2
|
17
17
|
|
18
18
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\x82\x0b\n\x11\x43ustomThemeConfig\x12\x15\n\rprimary_color\x18\x01 \x01(\t\x12\"\n\x1asecondary_background_color\x18\x02 \x01(\t\x12\x18\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\t\x12\x12\n\ntext_color\x18\x04 \x01(\t\x12+\n\x04\x66ont\x18\x05 \x01(\x0e\x32\x1d.CustomThemeConfig.FontFamily\x12*\n\x04\x62\x61se\x18\x06 \x01(\x0e\x32\x1c.CustomThemeConfig.BaseTheme\x12\x1f\n\x17widget_background_color\x18\x07 \x01(\t\x12\x1b\n\x13widget_border_color\x18\x08 \x01(\t\x12\x15\n\x05radii\x18\t \x01(\x0b\x32\x06.Radii\x12\x14\n\x0cheading_font\x18\x0c \x01(\t\x12\x11\n\tbody_font\x18\r \x01(\t\x12\x11\n\tcode_font\x18\x0e \x01(\t\x12\x1d\n\nfont_faces\x18\x0f \x03(\x0b\x32\t.FontFace\x12\x1e\n\nfont_sizes\x18\x10 \x01(\x0b\x32\n.FontSizes\x12!\n\x19skeleton_background_color\x18\x11 \x01(\t\x12\x18\n\x0b\x62\x61se_radius\x18\x12 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rbutton_radius\x18\x1a \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x62order_color\x18\x13 \x01(\tH\x02\x88\x01\x01\x12#\n\x16\x64\x61taframe_border_color\x18\x1b \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x12show_widget_border\x18\x14 \x01(\x08H\x04\x88\x01\x01\x12\x17\n\nlink_color\x18\x15 \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0elink_underline\x18\x1d \x01(\x08H\x06\x88\x01\x01\x12\x1b\n\x0e\x62\x61se_font_size\x18\x16 \x01(\x05H\x07\x88\x01\x01\x12\x1d\n\x10\x62\x61se_font_weight\x18\x1e \x01(\x05H\x08\x88\x01\x01\x12\x1d\n\x10\x63ode_font_weight\x18 \x01(\x05H\t\x88\x01\x01\x12\x1b\n\x0e\x63ode_font_size\x18\x1c \x01(\tH\n\x88\x01\x01\x12\x1c\n\x14heading_font_weights\x18\" \x03(\x05\x12 \n\x13show_sidebar_border\x18\x17 \x01(\x08H\x0b\x88\x01\x01\x12(\n\x07sidebar\x18\x18 \x01(\x0b\x32\x12.CustomThemeConfigH\x0c\x88\x01\x01\x12\"\n\x15\x63ode_background_color\x18\x19 \x01(\tH\r\x88\x01\x01\x12.\n!dataframe_header_background_color\x18\x1f \x01(\tH\x0e\x88\x01\x01\x12 \n\x18\x63hart_categorical_colors\x18! \x03(\t\" \n\tBaseTheme\x12\t\n\x05LIGHT\x10\x00\x12\x08\n\x04\x44\x41RK\x10\x01\"6\n\nFontFamily\x12\x0e\n\nSANS_SERIF\x10\x00\x12\t\n\x05SERIF\x10\x01\x12\r\n\tMONOSPACE\x10\x02\x42\x0e\n\x0c_base_radiusB\x10\n\x0e_button_radiusB\x0f\n\r_border_colorB\x19\n\x17_dataframe_border_colorB\x15\n\x13_show_widget_borderB\r\n\x0b_link_colorB\x11\n\x0f_link_underlineB\x11\n\x0f_base_font_sizeB\x13\n\x11_base_font_weightB\x13\n\x11_code_font_weightB\x11\n\x0f_code_font_sizeB\x16\n\x14_show_sidebar_borderB\n\n\x08_sidebarB\x18\n\x16_code_background_colorB$\n\"_dataframe_header_background_color\"w\n\x08\x46ontFace\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06\x66\x61mily\x18\x02 \x01(\t\x12\x12\n\x06weight\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x14\n\x0cweight_range\x18\x05 \x01(\t\x12\r\n\x05style\x18\x04 \x01(\t\x12\x15\n\runicode_range\x18\x06 \x01(\t\"<\n\x05Radii\x12\x1a\n\x12\x62\x61se_widget_radius\x18\x01 \x01(\x05\x12\x17\n\x0f\x63heckbox_radius\x18\x02 \x01(\x05\"T\n\tFontSizes\x12\x16\n\x0etiny_font_size\x18\x01 \x01(\x05\x12\x17\n\x0fsmall_font_size\x18\x02 \x01(\x05\x12\x16\n\x0e\x62\x61se_font_size\x18\x03 \x01(\x05\"a\n\x08UserInfo\x12\x17\n\x0finstallation_id\x18\x01 \x01(\t\x12\x1a\n\x12installation_id_v3\x18\x05 \x01(\t\x12\x1a\n\x12installation_id_v4\x18\x06 \x01(\tJ\x04\x08\x02\x10\x03\"l\n\x0f\x45nvironmentInfo\x12\x19\n\x11streamlit_version\x18\x01 \x01(\t\x12\x16\n\x0epython_version\x18\x02 \x01(\t\x12\x11\n\tserver_os\x18\x03 \x01(\t\x12\x13\n\x0bhas_display\x18\x04 \x01(\x08\x42/\n\x1c\x63om.snowflake.apps.streamlitB\x0fNewSessionProtob\x06proto3')
|
20
20
|
|
21
21
|
_globals = globals()
|
22
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -35,19 +35,19 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
35
|
_globals['_CONFIG_TOOLBARMODE']._serialized_start=800
|
36
36
|
_globals['_CONFIG_TOOLBARMODE']._serialized_end=863
|
37
37
|
_globals['_CUSTOMTHEMECONFIG']._serialized_start=872
|
38
|
-
_globals['_CUSTOMTHEMECONFIG']._serialized_end=
|
39
|
-
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_start=
|
40
|
-
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_end=
|
41
|
-
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_start=
|
42
|
-
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_end=
|
43
|
-
_globals['_FONTFACE']._serialized_start=
|
44
|
-
_globals['_FONTFACE']._serialized_end=
|
45
|
-
_globals['_RADII']._serialized_start=
|
46
|
-
_globals['_RADII']._serialized_end=
|
47
|
-
_globals['_FONTSIZES']._serialized_start=
|
48
|
-
_globals['_FONTSIZES']._serialized_end=
|
49
|
-
_globals['_USERINFO']._serialized_start=
|
50
|
-
_globals['_USERINFO']._serialized_end=
|
51
|
-
_globals['_ENVIRONMENTINFO']._serialized_start=
|
52
|
-
_globals['_ENVIRONMENTINFO']._serialized_end=
|
38
|
+
_globals['_CUSTOMTHEMECONFIG']._serialized_end=2282
|
39
|
+
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_start=1879
|
40
|
+
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_end=1911
|
41
|
+
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_start=1913
|
42
|
+
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_end=1967
|
43
|
+
_globals['_FONTFACE']._serialized_start=2284
|
44
|
+
_globals['_FONTFACE']._serialized_end=2403
|
45
|
+
_globals['_RADII']._serialized_start=2405
|
46
|
+
_globals['_RADII']._serialized_end=2465
|
47
|
+
_globals['_FONTSIZES']._serialized_start=2467
|
48
|
+
_globals['_FONTSIZES']._serialized_end=2551
|
49
|
+
_globals['_USERINFO']._serialized_start=2553
|
50
|
+
_globals['_USERINFO']._serialized_end=2650
|
51
|
+
_globals['_ENVIRONMENTINFO']._serialized_start=2652
|
52
|
+
_globals['_ENVIRONMENTINFO']._serialized_end=2760
|
53
53
|
# @@protoc_insertion_point(module_scope)
|
@@ -295,6 +295,7 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
295
295
|
BASE_FONT_WEIGHT_FIELD_NUMBER: builtins.int
|
296
296
|
CODE_FONT_WEIGHT_FIELD_NUMBER: builtins.int
|
297
297
|
CODE_FONT_SIZE_FIELD_NUMBER: builtins.int
|
298
|
+
HEADING_FONT_WEIGHTS_FIELD_NUMBER: builtins.int
|
298
299
|
SHOW_SIDEBAR_BORDER_FIELD_NUMBER: builtins.int
|
299
300
|
SIDEBAR_FIELD_NUMBER: builtins.int
|
300
301
|
CODE_BACKGROUND_COLOR_FIELD_NUMBER: builtins.int
|
@@ -340,6 +341,8 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
340
341
|
def font_sizes(self) -> global___FontSizes:
|
341
342
|
"""DEPRECATED: Please use the base_font_size theme config instead:"""
|
342
343
|
|
344
|
+
@property
|
345
|
+
def heading_font_weights(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
|
343
346
|
@property
|
344
347
|
def sidebar(self) -> global___CustomThemeConfig: ...
|
345
348
|
@property
|
@@ -373,6 +376,7 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
373
376
|
base_font_weight: builtins.int | None = ...,
|
374
377
|
code_font_weight: builtins.int | None = ...,
|
375
378
|
code_font_size: builtins.str | None = ...,
|
379
|
+
heading_font_weights: collections.abc.Iterable[builtins.int] | None = ...,
|
376
380
|
show_sidebar_border: builtins.bool | None = ...,
|
377
381
|
sidebar: global___CustomThemeConfig | None = ...,
|
378
382
|
code_background_color: builtins.str | None = ...,
|
@@ -380,7 +384,7 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
380
384
|
chart_categorical_colors: collections.abc.Iterable[builtins.str] | None = ...,
|
381
385
|
) -> None: ...
|
382
386
|
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", "_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", "_link_color", b"_link_color", "_link_underline", b"_link_underline", "_show_sidebar_border", b"_show_sidebar_border", "_show_widget_border", b"_show_widget_border", "_sidebar", b"_sidebar", "base_font_size", b"base_font_size", "base_font_weight", b"base_font_weight", "base_radius", b"base_radius", "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", "link_color", b"link_color", "link_underline", b"link_underline", "radii", b"radii", "show_sidebar_border", b"show_sidebar_border", "show_widget_border", b"show_widget_border", "sidebar", b"sidebar"]) -> builtins.bool: ...
|
383
|
-
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", "_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", "_link_color", b"_link_color", "_link_underline", b"_link_underline", "_show_sidebar_border", b"_show_sidebar_border", "_show_widget_border", b"_show_widget_border", "_sidebar", b"_sidebar", "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", "body_font", b"body_font", "border_color", b"border_color", "button_radius", b"button_radius", "chart_categorical_colors", b"chart_categorical_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", "heading_font", b"heading_font", "link_color", b"link_color", "link_underline", b"link_underline", "primary_color", b"primary_color", "radii", b"radii", "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", "widget_background_color", b"widget_background_color", "widget_border_color", b"widget_border_color"]) -> None: ...
|
387
|
+
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", "_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", "_link_color", b"_link_color", "_link_underline", b"_link_underline", "_show_sidebar_border", b"_show_sidebar_border", "_show_widget_border", b"_show_widget_border", "_sidebar", b"_sidebar", "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", "body_font", b"body_font", "border_color", b"border_color", "button_radius", b"button_radius", "chart_categorical_colors", b"chart_categorical_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", "heading_font", b"heading_font", "heading_font_weights", b"heading_font_weights", "link_color", b"link_color", "link_underline", b"link_underline", "primary_color", b"primary_color", "radii", b"radii", "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", "widget_background_color", b"widget_background_color", "widget_border_color", b"widget_border_color"]) -> None: ...
|
384
388
|
@typing.overload
|
385
389
|
def WhichOneof(self, oneof_group: typing.Literal["_base_font_size", b"_base_font_size"]) -> typing.Literal["base_font_size"] | None: ...
|
386
390
|
@typing.overload
|
streamlit/runtime/app_session.py
CHANGED
@@ -941,7 +941,14 @@ def _populate_theme_msg(msg: CustomThemeConfig, section: str = "theme") -> None:
|
|
941
941
|
# We need to ignore some config options here that need special handling
|
942
942
|
# and cannot directly be set on the protobuf.
|
943
943
|
if (
|
944
|
-
option_name
|
944
|
+
option_name
|
945
|
+
not in {
|
946
|
+
"base",
|
947
|
+
"font",
|
948
|
+
"fontFaces",
|
949
|
+
"headingFontWeights",
|
950
|
+
"chartCategoricalColors",
|
951
|
+
}
|
945
952
|
and option_val is not None
|
946
953
|
):
|
947
954
|
setattr(msg, to_snake_case(option_name), option_val)
|
@@ -1001,6 +1008,47 @@ def _populate_theme_msg(msg: CustomThemeConfig, section: str = "theme") -> None:
|
|
1001
1008
|
exc_info=e,
|
1002
1009
|
)
|
1003
1010
|
|
1011
|
+
heading_font_weights = theme_opts.get("headingFontWeights", None)
|
1012
|
+
# headingFontWeights is either an integer (set for all headings) or
|
1013
|
+
# a list of integers (set specific headings). However, if it was provided via env variable or via CLI arg,
|
1014
|
+
# it's a json string that needs to be parsed.
|
1015
|
+
if isinstance(heading_font_weights, str):
|
1016
|
+
try:
|
1017
|
+
heading_font_weights = json.loads(heading_font_weights)
|
1018
|
+
except Exception as e:
|
1019
|
+
_LOGGER.warning(
|
1020
|
+
"Failed to parse the theme.headingFontWeights config option with json.loads: %s.",
|
1021
|
+
heading_font_weights,
|
1022
|
+
exc_info=e,
|
1023
|
+
)
|
1024
|
+
heading_font_weights = None
|
1025
|
+
|
1026
|
+
if isinstance(heading_font_weights, int):
|
1027
|
+
# Set all heading font weights to the same value
|
1028
|
+
for _ in range(1, 7):
|
1029
|
+
msg.heading_font_weights.append(heading_font_weights)
|
1030
|
+
elif isinstance(heading_font_weights, list):
|
1031
|
+
# Check that the list has between 1 and 6 values
|
1032
|
+
if not heading_font_weights or len(heading_font_weights) > 6:
|
1033
|
+
raise ValueError(
|
1034
|
+
f"Config theme.headingFontWeights should have 1-6 values corresponding to h1-h6, "
|
1035
|
+
f"but got {len(heading_font_weights)}"
|
1036
|
+
)
|
1037
|
+
# Ensure we have exactly 6 heading font weights (h1-h6), padding with 600 as default
|
1038
|
+
heading_weights = heading_font_weights[:6] + [600] * (
|
1039
|
+
6 - len(heading_font_weights)
|
1040
|
+
)
|
1041
|
+
|
1042
|
+
for weight in heading_weights:
|
1043
|
+
try:
|
1044
|
+
msg.heading_font_weights.append(weight)
|
1045
|
+
except Exception as e: # noqa: PERF203
|
1046
|
+
_LOGGER.warning(
|
1047
|
+
"Failed to parse the theme.headingFontWeights config option: %s.",
|
1048
|
+
weight,
|
1049
|
+
exc_info=e,
|
1050
|
+
)
|
1051
|
+
|
1004
1052
|
chart_categorical_colors = theme_opts.get("chartCategoricalColors", None)
|
1005
1053
|
# If chartCategoricalColors was configured via config.toml, it's already a list of
|
1006
1054
|
# strings. However, if it was provided via env variable or via CLI arg,
|