streamlit 1.49.0__py3-none-any.whl → 1.50.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/column_config.py +2 -0
- streamlit/commands/navigation.py +3 -1
- streamlit/components/v1/custom_component.py +17 -42
- streamlit/config.py +306 -0
- streamlit/connections/base_connection.py +4 -2
- streamlit/dataframe_util.py +3 -2
- streamlit/delta_generator.py +2 -3
- streamlit/elements/arrow.py +63 -43
- streamlit/elements/deck_gl_json_chart.py +1 -0
- streamlit/elements/form.py +6 -6
- streamlit/elements/graphviz_chart.py +23 -6
- streamlit/elements/iframe.py +0 -2
- streamlit/elements/image.py +10 -9
- streamlit/elements/layouts.py +58 -11
- streamlit/elements/lib/built_in_chart_utils.py +95 -29
- streamlit/elements/lib/column_config_utils.py +5 -0
- streamlit/elements/lib/column_types.py +563 -144
- streamlit/elements/lib/dialog.py +1 -0
- streamlit/elements/lib/layout_utils.py +4 -4
- streamlit/elements/lib/pandas_styler_utils.py +30 -14
- streamlit/elements/lib/utils.py +17 -5
- streamlit/elements/map.py +1 -3
- streamlit/elements/media.py +2 -0
- streamlit/elements/metric.py +10 -32
- streamlit/elements/plotly_chart.py +17 -9
- streamlit/elements/pyplot.py +6 -6
- streamlit/elements/vega_charts.py +110 -44
- streamlit/elements/widgets/audio_input.py +48 -0
- streamlit/elements/widgets/button.py +27 -25
- streamlit/elements/widgets/button_group.py +1 -0
- streamlit/elements/widgets/camera_input.py +1 -0
- streamlit/elements/widgets/chat.py +1 -0
- streamlit/elements/widgets/checkbox.py +1 -0
- streamlit/elements/widgets/color_picker.py +1 -0
- streamlit/elements/widgets/data_editor.py +6 -5
- streamlit/elements/widgets/file_uploader.py +1 -0
- streamlit/elements/widgets/multiselect.py +10 -0
- streamlit/elements/widgets/number_input.py +3 -0
- streamlit/elements/widgets/radio.py +1 -0
- streamlit/elements/widgets/select_slider.py +1 -0
- streamlit/elements/widgets/selectbox.py +4 -0
- streamlit/elements/widgets/slider.py +1 -0
- streamlit/elements/widgets/text_widgets.py +6 -0
- streamlit/elements/widgets/time_widgets.py +9 -0
- streamlit/elements/write.py +1 -17
- streamlit/git_util.py +65 -43
- streamlit/material_icon_names.py +1 -1
- streamlit/proto/Arrow_pb2.py +10 -8
- streamlit/proto/Arrow_pb2.pyi +31 -2
- streamlit/proto/AudioInput_pb2.py +2 -2
- streamlit/proto/AudioInput_pb2.pyi +6 -2
- streamlit/proto/Block_pb2.py +11 -11
- streamlit/proto/Block_pb2.pyi +5 -0
- streamlit/proto/NewSession_pb2.py +18 -16
- streamlit/proto/NewSession_pb2.pyi +135 -2
- streamlit/runtime/app_session.py +18 -5
- streamlit/runtime/theme_util.py +148 -0
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +221 -221
- streamlit/static/static/css/index.CHEnSPGk.css +1 -0
- streamlit/static/static/css/{index.C8X8rNzw.css → index.CIiu7Ygf.css} +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.u9XvzxL8.js → ErrorOutline.esm.DUpR0_Ka.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.CaRyZ-b2.js → FileDownload.esm.CN4j9-1w.js} +1 -1
- streamlit/static/static/js/{FileHelper.Dk2SwIi3.js → FileHelper.CaIUKG91.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.l_UPPvkg.js → FormClearHelper.DTcdrasw.js} +1 -1
- streamlit/static/static/js/{Hooks.BxrVEftw.js → Hooks.BRba_Own.js} +1 -1
- streamlit/static/static/js/InputInstructions.xnSDuYeQ.js +1 -0
- streamlit/static/static/js/{Particles.DkY6FDnc.js → Particles.CElH0XX2.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BPtSM82n.js → ProgressBar.DetlP5aY.js} +2 -2
- streamlit/static/static/js/Toolbar.C77ar7rq.js +1 -0
- streamlit/static/static/js/{base-input.egUI4LjJ.js → base-input.BQft14La.js} +3 -3
- streamlit/static/static/js/{checkbox.ButpszcE.js → checkbox.yZOfXCeX.js} +1 -1
- streamlit/static/static/js/{createSuper.DYJA5xa6.js → createSuper.Dh9w1cs8.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.DcuHuCyW.js +1 -0
- streamlit/static/static/js/{downloader.B3TjsSPZ.js → downloader.MeHtkq8r.js} +1 -1
- streamlit/static/static/js/{es6.BYSNuG4D.js → es6.VpBPGCnM.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CNPHJsF2.js → iframeResizer.contentWindow.yMw_ARIL.js} +1 -1
- streamlit/static/static/js/{index.DgpIMUsr.js → index.64ejlaaT.js} +1 -1
- streamlit/static/static/js/{index.BBnWuh07.js → index.6xX1278W.js} +90 -91
- streamlit/static/static/js/index.B-hiXRzw.js +1 -0
- streamlit/static/static/js/{index.DtwkPJs5.js → index.B0H9IXUJ.js} +47 -47
- streamlit/static/static/js/{index.0tDq1WXk.js → index.B4cAbHP6.js} +1 -1
- streamlit/static/static/js/{index.CFjU0x00.js → index.B4dUQfni.js} +1 -1
- streamlit/static/static/js/{index.BrD9sbpx.js → index.BPQo7BKk.js} +1 -1
- streamlit/static/static/js/index.Baqa90pe.js +2 -0
- streamlit/static/static/js/{index.uInpwWAP.js → index.Bj9JgOEC.js} +1 -1
- streamlit/static/static/js/index.BjCwMzj4.js +3 -0
- streamlit/static/static/js/{index.C3EXAI-u.js → index.Bm3VbPB5.js} +1 -1
- streamlit/static/static/js/{index.DGcW849X.js → index.Bxz2yX3P.js} +1 -1
- streamlit/static/static/js/{index.CeXLlclc.js → index.BycLveZ4.js} +1 -1
- streamlit/static/static/js/{index.CjQnYKID.js → index.C9BdUqTi.js} +1 -1
- streamlit/static/static/js/index.CFMf5_ez.js +197 -0
- streamlit/static/static/js/index.CGYqqs6j.js +1 -0
- streamlit/static/static/js/{index.CFePF7s4.js → index.CH1tqnSs.js} +1 -1
- streamlit/static/static/js/{index.BoJaJReB.js → index.CMItVsFA.js} +1 -1
- streamlit/static/static/js/{index.CuEFSQ-o.js → index.CTBk8Vk2.js} +1 -1
- streamlit/static/static/js/index.CiAQIz1H.js +7 -0
- streamlit/static/static/js/index.Cj7DSzVR.js +73 -0
- streamlit/static/static/js/index.Ck8rQ9OL.js +1 -0
- streamlit/static/static/js/{index.CqSRo6zQ.js → index.ClELlchS.js} +2 -2
- streamlit/static/static/js/{index.DP1rDFP0.js → index.Cnpi3o3E.js} +1 -1
- streamlit/static/static/js/{index.Cl_966eE.js → index.Ctn27_AE.js} +1 -1
- streamlit/static/static/js/{index.D4jR1m1z.js → index.D2QEXQq_.js} +1 -1
- streamlit/static/static/js/index.DH71Ezyj.js +1 -0
- streamlit/static/static/js/{index.CfiZGqj3.js → index.DHh-U0dK.js} +2 -2
- streamlit/static/static/js/{index.Bp1Of6L8.js → index.DK7hD7_w.js} +1 -1
- streamlit/static/static/js/{index.MQLQLR5Z.js → index.DKv_lNO7.js} +1 -1
- streamlit/static/static/js/index.DNLrMXgm.js +12 -0
- streamlit/static/static/js/index.DW0Grddz.js +1 -0
- streamlit/static/static/js/{index.Cb9gN2T2.js → index.Dbe-Q3C-.js} +1 -1
- streamlit/static/static/js/index.DcPNYEUo.js +1 -0
- streamlit/static/static/js/index.DuxqVQpd.js +1 -0
- streamlit/static/static/js/{index.BH79B25f.js → index.FFOzOWzC.js} +1 -1
- streamlit/static/static/js/{index.DWedOrkQ.js → index.GRUzrudl.js} +1 -1
- streamlit/static/static/js/{input.CbP5ZuQ7.js → input.s6pjQ49A.js} +1 -1
- streamlit/static/static/js/{memory.BuacVo2L.js → memory.Cuvsdfrl.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.BZb9zRl_.js → number-overlay-editor.DdgVR5m3.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DSM84rOS.js → possibleConstructorReturn.CqidKeei.js} +1 -1
- streamlit/static/static/js/{sandbox.C480llMG.js → sandbox.CCQREcJx.js} +1 -1
- streamlit/static/static/js/{timepicker.BunxCVp7.js → timepicker.mkJF97Bb.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.B4o8rEx1.js → toConsumableArray.De7I7KVR.js} +1 -1
- streamlit/static/static/js/{uniqueId.tii0yosY.js → uniqueId.RI1LJdtz.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.Bnm4FD6K.js → useBasicWidgetState.CedkNjUW.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.Dgtwc1m0.js → useTextInputAutoExpand.Ca7w8dVs.js} +2 -2
- streamlit/static/static/js/{useUpdateUiValue.DjXdMFGw.js → useUpdateUiValue.DeXelfRH.js} +1 -1
- streamlit/static/static/js/withFullScreenWrapper.C3561XxJ.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.DeCZgS-4.woff2 +0 -0
- streamlit/string_util.py +58 -1
- streamlit/web/bootstrap.py +0 -31
- streamlit/web/server/routes.py +17 -4
- streamlit/web/server/server.py +1 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/METADATA +1 -1
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/RECORD +137 -136
- streamlit/static/static/css/index.COe1010n.css +0 -1
- streamlit/static/static/js/InputInstructions.C254RU9X.js +0 -1
- streamlit/static/static/js/Toolbar.BO_3WBaS.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.C9gQLEnU.js +0 -1
- streamlit/static/static/js/index.BDZorv41.js +0 -1
- streamlit/static/static/js/index.BeTC4Yl-.js +0 -197
- streamlit/static/static/js/index.BnOd05Ko.js +0 -2
- streamlit/static/static/js/index.Bpe4-O2W.js +0 -1
- streamlit/static/static/js/index.C1qCS-sd.js +0 -1
- streamlit/static/static/js/index.C77g9sAQ.js +0 -3
- streamlit/static/static/js/index.Ca3y4ztK.js +0 -1
- streamlit/static/static/js/index.CbwuUwu4.js +0 -12
- streamlit/static/static/js/index.DKb-BAE2.js +0 -1
- streamlit/static/static/js/index.DStzYLqM.js +0 -73
- streamlit/static/static/js/index.DVKQKDLu.js +0 -1
- streamlit/static/static/js/index.DYbRPmVF.js +0 -1
- streamlit/static/static/js/index.z992t-BQ.js +0 -7
- streamlit/static/static/js/withFullScreenWrapper.0cy2pVf5.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.CBxVaFdk.woff2 +0 -0
- {streamlit-1.49.0.data → streamlit-1.50.0.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/WHEEL +0 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/entry_points.txt +0 -0
- {streamlit-1.49.0.dist-info → streamlit-1.50.0.dist-info}/top_level.txt +0 -0
streamlit/column_config.py
CHANGED
|
@@ -30,6 +30,7 @@ __all__ = [
|
|
|
30
30
|
"LineChartColumn",
|
|
31
31
|
"LinkColumn",
|
|
32
32
|
"ListColumn",
|
|
33
|
+
"MultiselectColumn",
|
|
33
34
|
"NumberColumn",
|
|
34
35
|
"ProgressColumn",
|
|
35
36
|
"SelectboxColumn",
|
|
@@ -50,6 +51,7 @@ from streamlit.elements.lib.column_types import (
|
|
|
50
51
|
LineChartColumn,
|
|
51
52
|
LinkColumn,
|
|
52
53
|
ListColumn,
|
|
54
|
+
MultiselectColumn,
|
|
53
55
|
NumberColumn,
|
|
54
56
|
ProgressColumn,
|
|
55
57
|
SelectboxColumn,
|
streamlit/commands/navigation.py
CHANGED
|
@@ -121,7 +121,9 @@ def navigation(
|
|
|
121
121
|
menu, ``pages`` must be a dictionary. Each key is the label of a
|
|
122
122
|
section and each value is the list of page-like objects for
|
|
123
123
|
that section. If you use ``position="top"``, each grouping will be a
|
|
124
|
-
collapsible item in the navigation menu.
|
|
124
|
+
collapsible item in the navigation menu. For top navigation, if you use
|
|
125
|
+
an empty string as a section header, the pages in that section will be
|
|
126
|
+
displayed at the beginning of the menu before the collapsible sections.
|
|
125
127
|
|
|
126
128
|
When you use a string or path as a page-like object, they are
|
|
127
129
|
internally passed to ``st.Page`` and converted to ``StreamlitPage``
|
|
@@ -170,44 +170,22 @@ And if you're using Streamlit Cloud, add "pyarrow" to your requirements.txt."""
|
|
|
170
170
|
if tab_index is not None:
|
|
171
171
|
element.component_instance.tab_index = tab_index
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
ctx = get_script_run_ctx()
|
|
191
|
-
|
|
192
|
-
if key is None:
|
|
193
|
-
marshall_element_args()
|
|
194
|
-
computed_id = compute_and_register_element_id(
|
|
195
|
-
"component_instance",
|
|
196
|
-
user_key=key,
|
|
197
|
-
dg=dg,
|
|
198
|
-
name=self.name,
|
|
199
|
-
url=self.url,
|
|
200
|
-
json_args=serialized_json_args,
|
|
201
|
-
special_args=special_args,
|
|
202
|
-
)
|
|
203
|
-
else:
|
|
204
|
-
computed_id = compute_and_register_element_id(
|
|
205
|
-
"component_instance",
|
|
206
|
-
user_key=key,
|
|
207
|
-
dg=dg,
|
|
208
|
-
name=self.name,
|
|
209
|
-
url=self.url,
|
|
210
|
-
)
|
|
173
|
+
element.component_instance.json_args = serialized_json_args
|
|
174
|
+
element.component_instance.special_args.extend(special_args)
|
|
175
|
+
|
|
176
|
+
computed_id = compute_and_register_element_id(
|
|
177
|
+
"component_instance",
|
|
178
|
+
user_key=key,
|
|
179
|
+
# Ensure that the component identity is kept stable when key is provided,
|
|
180
|
+
# Only the name and url are whitelisted to result in a new identity
|
|
181
|
+
# if they are changed.
|
|
182
|
+
key_as_main_identity={"name", "url"},
|
|
183
|
+
dg=dg,
|
|
184
|
+
name=self.name,
|
|
185
|
+
url=self.url,
|
|
186
|
+
json_args=serialized_json_args,
|
|
187
|
+
special_args=special_args,
|
|
188
|
+
)
|
|
211
189
|
element.component_instance.id = computed_id
|
|
212
190
|
|
|
213
191
|
def deserialize_component(ui_value: Any) -> Any:
|
|
@@ -218,15 +196,12 @@ And if you're using Streamlit Cloud, add "pyarrow" to your requirements.txt."""
|
|
|
218
196
|
element.component_instance.id,
|
|
219
197
|
deserializer=deserialize_component,
|
|
220
198
|
serializer=lambda x: x,
|
|
221
|
-
ctx=
|
|
199
|
+
ctx=get_script_run_ctx(),
|
|
222
200
|
on_change_handler=on_change,
|
|
223
201
|
value_type="json_value",
|
|
224
202
|
)
|
|
225
203
|
widget_value = component_state.value
|
|
226
204
|
|
|
227
|
-
if key is not None:
|
|
228
|
-
marshall_element_args()
|
|
229
|
-
|
|
230
205
|
if widget_value is None:
|
|
231
206
|
widget_value = default
|
|
232
207
|
elif isinstance(widget_value, ArrowTableProto):
|
streamlit/config.py
CHANGED
|
@@ -1195,6 +1195,306 @@ _create_theme_options(
|
|
|
1195
1195
|
""",
|
|
1196
1196
|
)
|
|
1197
1197
|
|
|
1198
|
+
_create_theme_options(
|
|
1199
|
+
"redColor",
|
|
1200
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1201
|
+
description="""
|
|
1202
|
+
Red color used in the basic color palette.
|
|
1203
|
+
|
|
1204
|
+
By default, this is #ff4b4b for the light theme and #ff2b2b for the
|
|
1205
|
+
dark theme.
|
|
1206
|
+
|
|
1207
|
+
If `redColor` is provided, and `redBackgroundColor` isn't, then
|
|
1208
|
+
`redBackgroundColor` will be derived from `redColor` using 10%
|
|
1209
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1210
|
+
""",
|
|
1211
|
+
)
|
|
1212
|
+
|
|
1213
|
+
_create_theme_options(
|
|
1214
|
+
"orangeColor",
|
|
1215
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1216
|
+
description="""
|
|
1217
|
+
Orange color used in the basic color palette.
|
|
1218
|
+
|
|
1219
|
+
By default, this is #ffa421 for the light theme and #ff8700 for the
|
|
1220
|
+
dark theme.
|
|
1221
|
+
|
|
1222
|
+
If `orangeColor` is provided, and `orangeBackgroundColor` isn't, then
|
|
1223
|
+
`orangeBackgroundColor` will be derived from `orangeColor` using 10%
|
|
1224
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1225
|
+
""",
|
|
1226
|
+
)
|
|
1227
|
+
|
|
1228
|
+
_create_theme_options(
|
|
1229
|
+
"yellowColor",
|
|
1230
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1231
|
+
description="""
|
|
1232
|
+
Yellow color used in the basic color palette.
|
|
1233
|
+
|
|
1234
|
+
By default, this is #faca2b for the light theme and #ffe312 for the
|
|
1235
|
+
dark theme.
|
|
1236
|
+
|
|
1237
|
+
If `yellowColor` is provided, and `yellowBackgroundColor` isn't, then
|
|
1238
|
+
`yellowBackgroundColor` will be derived from `yellowColor` using 10%
|
|
1239
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1240
|
+
""",
|
|
1241
|
+
)
|
|
1242
|
+
|
|
1243
|
+
_create_theme_options(
|
|
1244
|
+
"blueColor",
|
|
1245
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1246
|
+
description="""
|
|
1247
|
+
Blue color used in the basic color palette.
|
|
1248
|
+
|
|
1249
|
+
By default, this is #1c83e1 for the light theme and #0068c9 for the
|
|
1250
|
+
dark theme.
|
|
1251
|
+
|
|
1252
|
+
If a `blueColor` is provided, and `blueBackgroundColor` isn't, then
|
|
1253
|
+
`blueBackgroundColor` will be derived from `blueColor` using 10%
|
|
1254
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1255
|
+
""",
|
|
1256
|
+
)
|
|
1257
|
+
|
|
1258
|
+
_create_theme_options(
|
|
1259
|
+
"greenColor",
|
|
1260
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1261
|
+
description="""
|
|
1262
|
+
Green color used in the basic color palette.
|
|
1263
|
+
|
|
1264
|
+
By default, this is #21c354 for the light theme and #09ab3b for the
|
|
1265
|
+
dark theme.
|
|
1266
|
+
|
|
1267
|
+
If `greenColor` is provided, and `greenBackgroundColor` isn't, then
|
|
1268
|
+
`greenBackgroundColor` will be derived from `greenColor` using 10%
|
|
1269
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1270
|
+
""",
|
|
1271
|
+
)
|
|
1272
|
+
|
|
1273
|
+
_create_theme_options(
|
|
1274
|
+
"violetColor",
|
|
1275
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1276
|
+
description="""
|
|
1277
|
+
Violet color used in the basic color palette.
|
|
1278
|
+
|
|
1279
|
+
By default, this is #803df5 for both the light and dark themes.
|
|
1280
|
+
|
|
1281
|
+
If a `violetColor` is provided, and `violetBackgroundColor` isn't, then
|
|
1282
|
+
`violetBackgroundColor` will be derived from `violetColor` using 10%
|
|
1283
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1284
|
+
""",
|
|
1285
|
+
)
|
|
1286
|
+
|
|
1287
|
+
_create_theme_options(
|
|
1288
|
+
"grayColor",
|
|
1289
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1290
|
+
description="""
|
|
1291
|
+
Gray color used in the basic color palette.
|
|
1292
|
+
|
|
1293
|
+
By default, this is #a3a8b8 for the light theme and #555867 for the
|
|
1294
|
+
dark theme.
|
|
1295
|
+
|
|
1296
|
+
If `grayColor` is provided, and `grayBackgroundColor` isn't, then
|
|
1297
|
+
`grayBackgroundColor` will be derived from `grayColor` using 10%
|
|
1298
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1299
|
+
""",
|
|
1300
|
+
)
|
|
1301
|
+
|
|
1302
|
+
_create_theme_options(
|
|
1303
|
+
"redBackgroundColor",
|
|
1304
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1305
|
+
description="""
|
|
1306
|
+
Red background color used in the basic color palette.
|
|
1307
|
+
|
|
1308
|
+
If `redColor` is provided, this defaults to `redColor` using 10%
|
|
1309
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1310
|
+
|
|
1311
|
+
Otherwise, this is #ff2b2b with 10% opacity for light theme and
|
|
1312
|
+
#ff6c6c with 20% opacity for dark theme.
|
|
1313
|
+
""",
|
|
1314
|
+
)
|
|
1315
|
+
|
|
1316
|
+
_create_theme_options(
|
|
1317
|
+
"orangeBackgroundColor",
|
|
1318
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1319
|
+
description="""
|
|
1320
|
+
Orange background color used for the basic color palette.
|
|
1321
|
+
|
|
1322
|
+
If `orangeColor` is provided, this defaults to `orangeColor` using 10%
|
|
1323
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1324
|
+
|
|
1325
|
+
Otherwise, this is #ffa421 with 10% opacity for the light theme and
|
|
1326
|
+
#ff8700 with 20% opacity for the dark theme.
|
|
1327
|
+
""",
|
|
1328
|
+
)
|
|
1329
|
+
|
|
1330
|
+
_create_theme_options(
|
|
1331
|
+
"yellowBackgroundColor",
|
|
1332
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1333
|
+
description="""
|
|
1334
|
+
Yellow background color used for the basic color palette.
|
|
1335
|
+
|
|
1336
|
+
If `yellowColor` is provided, this defaults to `yellowColor` using 10%
|
|
1337
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1338
|
+
|
|
1339
|
+
Otherwise, this is #ffff12 with 10% opacity for the light theme and
|
|
1340
|
+
#ffff12 with 20% opacity for the dark theme.
|
|
1341
|
+
""",
|
|
1342
|
+
)
|
|
1343
|
+
|
|
1344
|
+
_create_theme_options(
|
|
1345
|
+
"blueBackgroundColor",
|
|
1346
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1347
|
+
description="""
|
|
1348
|
+
Blue background color used for the basic color palette.
|
|
1349
|
+
|
|
1350
|
+
If `blueColor` is provided, this defaults to `blueColor` using 10%
|
|
1351
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1352
|
+
|
|
1353
|
+
Otherwise, this is #1c83ff with 10% opacity for the light theme and
|
|
1354
|
+
#3d9df3 with 20% opacity for the dark theme.
|
|
1355
|
+
""",
|
|
1356
|
+
)
|
|
1357
|
+
|
|
1358
|
+
_create_theme_options(
|
|
1359
|
+
"greenBackgroundColor",
|
|
1360
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1361
|
+
description="""
|
|
1362
|
+
Green background color used for the basic color palette.
|
|
1363
|
+
|
|
1364
|
+
If `greenColor` is provided, this defaults to `greenColor` using 10%
|
|
1365
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1366
|
+
|
|
1367
|
+
Otherwise, this is #21c354 with 10% opacity for the light theme and
|
|
1368
|
+
#3dd56d with 20% opacity for the dark theme.
|
|
1369
|
+
""",
|
|
1370
|
+
)
|
|
1371
|
+
|
|
1372
|
+
_create_theme_options(
|
|
1373
|
+
"violetBackgroundColor",
|
|
1374
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1375
|
+
description="""
|
|
1376
|
+
Violet background color used for the basic color palette.
|
|
1377
|
+
|
|
1378
|
+
If `violetColor` is provided, this defaults to `violetColor` using 10%
|
|
1379
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1380
|
+
|
|
1381
|
+
Otherwise, this is #9a5dff with 10% opacity for light theme and
|
|
1382
|
+
#9a5dff with 20% opacity for dark theme.
|
|
1383
|
+
""",
|
|
1384
|
+
)
|
|
1385
|
+
|
|
1386
|
+
_create_theme_options(
|
|
1387
|
+
"grayBackgroundColor",
|
|
1388
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1389
|
+
description="""
|
|
1390
|
+
Gray background color used for the basic color palette.
|
|
1391
|
+
|
|
1392
|
+
If `grayColor` is provided, this defaults to `grayColor` using 10%
|
|
1393
|
+
opacity for the light theme and 20% opacity for the dark theme.
|
|
1394
|
+
|
|
1395
|
+
Otherwise, this is #31333f with 10% opacity for the light theme and
|
|
1396
|
+
#808495 with 20% opacity for the dark theme.
|
|
1397
|
+
""",
|
|
1398
|
+
)
|
|
1399
|
+
|
|
1400
|
+
_create_theme_options(
|
|
1401
|
+
"redTextColor",
|
|
1402
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1403
|
+
description="""
|
|
1404
|
+
Red text color used for the basic color palette.
|
|
1405
|
+
|
|
1406
|
+
If `redColor` is provided, this defaults to `redColor`, darkened by 15%
|
|
1407
|
+
for the light theme and lightened by 15% for the dark theme.
|
|
1408
|
+
|
|
1409
|
+
Otherwise, this is #bd4043 for the light theme and #ff6c6c for the dark
|
|
1410
|
+
theme.
|
|
1411
|
+
""",
|
|
1412
|
+
)
|
|
1413
|
+
|
|
1414
|
+
_create_theme_options(
|
|
1415
|
+
"orangeTextColor",
|
|
1416
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1417
|
+
description="""
|
|
1418
|
+
Orange text color used for the basic color palette.
|
|
1419
|
+
|
|
1420
|
+
If `orangeColor` is provided, this defaults to `orangeColor`, darkened
|
|
1421
|
+
by 15% for the light theme and lightened by 15% for the dark theme.
|
|
1422
|
+
|
|
1423
|
+
Otherwise, this is #e2660c for the light theme and #ffbd45 for the dark
|
|
1424
|
+
theme.
|
|
1425
|
+
""",
|
|
1426
|
+
)
|
|
1427
|
+
|
|
1428
|
+
_create_theme_options(
|
|
1429
|
+
"yellowTextColor",
|
|
1430
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1431
|
+
description="""
|
|
1432
|
+
Yellow text color used for the basic color palette.
|
|
1433
|
+
|
|
1434
|
+
If `yellowColor` is provided, this defaults to `yellowColor`, darkened
|
|
1435
|
+
by 15% for the light theme and lightened by 15% for the dark theme.
|
|
1436
|
+
|
|
1437
|
+
Otherwise, this is #926c05 for the light theme and #ffffc2 for the dark
|
|
1438
|
+
theme.
|
|
1439
|
+
""",
|
|
1440
|
+
)
|
|
1441
|
+
|
|
1442
|
+
_create_theme_options(
|
|
1443
|
+
"blueTextColor",
|
|
1444
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1445
|
+
description="""
|
|
1446
|
+
Blue text color used for the basic color palette.
|
|
1447
|
+
|
|
1448
|
+
If `blueColor` is provided, this defaults to `blueColor`, darkened by
|
|
1449
|
+
15% for the light theme and lightened by 15% for the dark theme.
|
|
1450
|
+
|
|
1451
|
+
Otherwise, this is #0054a3 for the light theme and #3d9df3 for the dark
|
|
1452
|
+
theme.
|
|
1453
|
+
""",
|
|
1454
|
+
)
|
|
1455
|
+
|
|
1456
|
+
_create_theme_options(
|
|
1457
|
+
"greenTextColor",
|
|
1458
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1459
|
+
description="""
|
|
1460
|
+
Green text color used for the basic color palette.
|
|
1461
|
+
|
|
1462
|
+
If `greenColor` is provided, this defaults to `greenColor`, darkened by
|
|
1463
|
+
15% for the light theme and lightened by 15% for the dark theme.
|
|
1464
|
+
|
|
1465
|
+
Otherwise, this is #158237 for the light theme and #5ce488 for the dark
|
|
1466
|
+
theme.
|
|
1467
|
+
""",
|
|
1468
|
+
)
|
|
1469
|
+
|
|
1470
|
+
_create_theme_options(
|
|
1471
|
+
"violetTextColor",
|
|
1472
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1473
|
+
description="""
|
|
1474
|
+
Violet text color used for the basic color palette.
|
|
1475
|
+
|
|
1476
|
+
If `violetColor` is provided, this defaults to `violetColor`, darkened
|
|
1477
|
+
by 15% for the light theme and lightened by 15% for the dark theme.
|
|
1478
|
+
|
|
1479
|
+
Otherwise, this is #583f84 for the light theme and #b27eff for the dark
|
|
1480
|
+
theme.
|
|
1481
|
+
""",
|
|
1482
|
+
)
|
|
1483
|
+
|
|
1484
|
+
_create_theme_options(
|
|
1485
|
+
"grayTextColor",
|
|
1486
|
+
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
1487
|
+
description="""
|
|
1488
|
+
Gray text color used for the basic color palette.
|
|
1489
|
+
|
|
1490
|
+
If `grayColor` is provided, this defaults to `grayColor`, darkened by
|
|
1491
|
+
15% for the light theme and lightened by 15% for the dark theme.
|
|
1492
|
+
|
|
1493
|
+
Otherwise, this is #31333f with 60% opacity for the light theme and
|
|
1494
|
+
#fafafa with 60% opacity for the dark theme.
|
|
1495
|
+
""",
|
|
1496
|
+
)
|
|
1497
|
+
|
|
1198
1498
|
_create_theme_options(
|
|
1199
1499
|
"linkColor",
|
|
1200
1500
|
categories=["theme", CustomThemeCategories.SIDEBAR],
|
|
@@ -1231,6 +1531,8 @@ _create_theme_options(
|
|
|
1231
1531
|
- "serif"
|
|
1232
1532
|
- "monospace"
|
|
1233
1533
|
- The `family` value for a custom font table under [[theme.fontFaces]]
|
|
1534
|
+
- A URL to a CSS file in the format of "<font name>:<url>" (like
|
|
1535
|
+
"Nunito:https://fonts.googleapis.com/css2?family=Nunito&display=swap")
|
|
1234
1536
|
- A comma-separated list of these (as a single string) to specify
|
|
1235
1537
|
fallbacks
|
|
1236
1538
|
|
|
@@ -1310,6 +1612,8 @@ _create_theme_options(
|
|
|
1310
1612
|
- "serif"
|
|
1311
1613
|
- "monospace"
|
|
1312
1614
|
- The `family` value for a custom font table under [[theme.fontFaces]]
|
|
1615
|
+
- A URL to a CSS file in the format of "<font name>:<url>" (like
|
|
1616
|
+
"Nunito:https://fonts.googleapis.com/css2?family=Nunito&display=swap")
|
|
1313
1617
|
- A comma-separated list of these (as a single string) to specify
|
|
1314
1618
|
fallbacks
|
|
1315
1619
|
|
|
@@ -1390,6 +1694,8 @@ _create_theme_options(
|
|
|
1390
1694
|
- "serif"
|
|
1391
1695
|
- "monospace"
|
|
1392
1696
|
- The `family` value for a custom font table under [[theme.fontFaces]]
|
|
1697
|
+
- A URL to a CSS file in the format of "<font name>:<url>" (like
|
|
1698
|
+
"'Space Mono':https://fonts.googleapis.com/css2?family=Space+Mono&display=swap")
|
|
1393
1699
|
- A comma-separated list of these (as a single string) to specify
|
|
1394
1700
|
fallbacks
|
|
1395
1701
|
""",
|
|
@@ -16,7 +16,7 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
from abc import ABC, abstractmethod
|
|
19
|
-
from typing import Any, Generic, TypeVar
|
|
19
|
+
from typing import Any, Generic, TypeVar, cast
|
|
20
20
|
|
|
21
21
|
from streamlit.runtime.secrets import AttrDict, secrets_singleton
|
|
22
22
|
from streamlit.util import calc_md5
|
|
@@ -116,7 +116,9 @@ class BaseConnection(ABC, Generic[RawConnectionT]):
|
|
|
116
116
|
if connections_section is None or type(connections_section) is not AttrDict:
|
|
117
117
|
return AttrDict({})
|
|
118
118
|
|
|
119
|
-
return
|
|
119
|
+
return cast(
|
|
120
|
+
"AttrDict", connections_section.get(self._connection_name, AttrDict({}))
|
|
121
|
+
)
|
|
120
122
|
|
|
121
123
|
def reset(self) -> None:
|
|
122
124
|
"""Reset this connection so that it gets reinitialized the next time it's used.
|
streamlit/dataframe_util.py
CHANGED
|
@@ -74,7 +74,8 @@ _DASK_INDEX: Final = "dask.dataframe.dask_expr._collection.Index"
|
|
|
74
74
|
_DASK_DATAFRAME_LEGACY: Final = "dask.dataframe.core.DataFrame"
|
|
75
75
|
_DASK_SERIES_LEGACY: Final = "dask.dataframe.core.Series"
|
|
76
76
|
_DASK_INDEX_LEGACY: Final = "dask.dataframe.core.Index"
|
|
77
|
-
_DUCKDB_RELATION: Final = "
|
|
77
|
+
_DUCKDB_RELATION: Final = "_duckdb.DuckDBPyRelation"
|
|
78
|
+
_DUCKDB_RELATION_LEGACY: Final = "duckdb.duckdb.DuckDBPyRelation"
|
|
78
79
|
_MODIN_DF_TYPE_STR: Final = "modin.pandas.dataframe.DataFrame"
|
|
79
80
|
_MODIN_SERIES_TYPE_STR: Final = "modin.pandas.series.Series"
|
|
80
81
|
_PANDAS_STYLER_TYPE_STR: Final = "pandas.io.formats.style.Styler"
|
|
@@ -452,7 +453,7 @@ def is_duckdb_relation(obj: object) -> bool:
|
|
|
452
453
|
https://duckdb.org/docs/api/python/relational_api
|
|
453
454
|
"""
|
|
454
455
|
|
|
455
|
-
return is_type(obj, _DUCKDB_RELATION)
|
|
456
|
+
return is_type(obj, _DUCKDB_RELATION) or is_type(obj, _DUCKDB_RELATION_LEGACY)
|
|
456
457
|
|
|
457
458
|
|
|
458
459
|
def _is_list_of_scalars(data: Iterable[Any]) -> bool:
|
streamlit/delta_generator.py
CHANGED
|
@@ -485,12 +485,11 @@ class DeltaGenerator(
|
|
|
485
485
|
msg_el_proto.CopyFrom(element_proto)
|
|
486
486
|
|
|
487
487
|
if layout_config:
|
|
488
|
-
if layout_config.height:
|
|
488
|
+
if layout_config.height is not None:
|
|
489
489
|
msg.delta.new_element.height_config.CopyFrom(
|
|
490
490
|
get_height_config(layout_config.height)
|
|
491
491
|
)
|
|
492
|
-
|
|
493
|
-
if layout_config.width:
|
|
492
|
+
if layout_config.width is not None:
|
|
494
493
|
msg.delta.new_element.width_config.CopyFrom(
|
|
495
494
|
get_width_config(layout_config.width)
|
|
496
495
|
)
|