streamlit-nightly 1.34.1.dev20240513__py2.py3-none-any.whl → 1.34.1.dev20240514__py2.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/delta_generator.py +4 -4
- streamlit/elements/arrow.py +4 -4
- streamlit/elements/plotly_chart.py +4 -4
- streamlit/elements/vega_charts.py +410 -47
- streamlit/proto/ArrowVegaLiteChart_pb2.py +2 -2
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +15 -2
- streamlit/runtime/state/common.py +3 -1
- streamlit/runtime/state/widgets.py +1 -0
- streamlit/static/asset-manifest.json +5 -5
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/1168.14f7c6ff.chunk.js +1 -0
- streamlit/static/static/js/5441.1b94928f.chunk.js +1 -0
- streamlit/static/static/js/{8148.cc5b50d8.chunk.js → 8148.a5f74d47.chunk.js} +1 -1
- streamlit/static/static/js/{main.45247b52.js → main.32c71338.js} +2 -2
- {streamlit_nightly-1.34.1.dev20240513.dist-info → streamlit_nightly-1.34.1.dev20240514.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.34.1.dev20240513.dist-info → streamlit_nightly-1.34.1.dev20240514.dist-info}/RECORD +21 -21
- streamlit/static/static/js/1168.7452e363.chunk.js +0 -1
- streamlit/static/static/js/5441.5bacdeda.chunk.js +0 -1
- /streamlit/static/static/js/{main.45247b52.js.LICENSE.txt → main.32c71338.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.34.1.dev20240513.data → streamlit_nightly-1.34.1.dev20240514.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.34.1.dev20240513.dist-info → streamlit_nightly-1.34.1.dev20240514.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.34.1.dev20240513.dist-info → streamlit_nightly-1.34.1.dev20240514.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.34.1.dev20240513.dist-info → streamlit_nightly-1.34.1.dev20240514.dist-info}/top_level.txt +0 -0
streamlit/delta_generator.py
CHANGED
@@ -587,7 +587,7 @@ class DeltaGenerator(
|
|
587
587
|
... np.random.randn(50, 20),
|
588
588
|
... columns=('col %d' % i for i in range(20)))
|
589
589
|
...
|
590
|
-
>>> my_table.
|
590
|
+
>>> my_table.add_rows(df2)
|
591
591
|
>>> # Now the table shown in the Streamlit app contains the data for
|
592
592
|
>>> # df1 followed by the data for df2.
|
593
593
|
|
@@ -596,14 +596,14 @@ class DeltaGenerator(
|
|
596
596
|
|
597
597
|
>>> # Assuming df1 and df2 from the example above still exist...
|
598
598
|
>>> my_chart = st.line_chart(df1)
|
599
|
-
>>> my_chart.
|
599
|
+
>>> my_chart.add_rows(df2)
|
600
600
|
>>> # Now the chart shown in the Streamlit app contains the data for
|
601
601
|
>>> # df1 followed by the data for df2.
|
602
602
|
|
603
603
|
And for plots whose datasets are named, you can pass the data with a
|
604
604
|
keyword argument where the key is the name:
|
605
605
|
|
606
|
-
>>> my_chart = st.
|
606
|
+
>>> my_chart = st.vega_lite_chart({
|
607
607
|
... 'mark': 'line',
|
608
608
|
... 'encoding': {'x': 'a', 'y': 'b'},
|
609
609
|
... 'datasets': {
|
@@ -611,7 +611,7 @@ class DeltaGenerator(
|
|
611
611
|
... },
|
612
612
|
... 'data': {'name': 'some_fancy_name'},
|
613
613
|
... }),
|
614
|
-
>>> my_chart.
|
614
|
+
>>> my_chart.add_rows(some_fancy_name=df2) # <-- name used as keyword
|
615
615
|
|
616
616
|
"""
|
617
617
|
if self._root_container is None or self._cursor is None:
|
streamlit/elements/arrow.py
CHANGED
@@ -105,11 +105,11 @@ class DataframeState(TypedDict, total=False):
|
|
105
105
|
|
106
106
|
Attributes
|
107
107
|
----------
|
108
|
-
|
108
|
+
selection : DataframeSelectionState
|
109
109
|
The state of the `on_select` event.
|
110
110
|
"""
|
111
111
|
|
112
|
-
|
112
|
+
selection: DataframeSelectionState
|
113
113
|
|
114
114
|
|
115
115
|
@dataclass
|
@@ -118,7 +118,7 @@ class DataframeSelectionSerde:
|
|
118
118
|
|
119
119
|
def deserialize(self, ui_value: str | None, widget_id: str = "") -> DataframeState:
|
120
120
|
empty_selection_state: DataframeState = {
|
121
|
-
"
|
121
|
+
"selection": {
|
122
122
|
"rows": [],
|
123
123
|
"columns": [],
|
124
124
|
},
|
@@ -127,7 +127,7 @@ class DataframeSelectionSerde:
|
|
127
127
|
empty_selection_state if ui_value is None else json.loads(ui_value)
|
128
128
|
)
|
129
129
|
|
130
|
-
if "
|
130
|
+
if "selection" not in selection_state:
|
131
131
|
selection_state = empty_selection_state
|
132
132
|
|
133
133
|
return cast(DataframeState, AttributeDictionary(selection_state))
|
@@ -114,11 +114,11 @@ class PlotlyState(TypedDict, total=False):
|
|
114
114
|
|
115
115
|
Attributes
|
116
116
|
----------
|
117
|
-
|
117
|
+
selection : PlotlySelectionState
|
118
118
|
The state of the `on_select` event.
|
119
119
|
"""
|
120
120
|
|
121
|
-
|
121
|
+
selection: PlotlySelectionState
|
122
122
|
|
123
123
|
|
124
124
|
@dataclass
|
@@ -127,7 +127,7 @@ class PlotlyChartSelectionSerde:
|
|
127
127
|
|
128
128
|
def deserialize(self, ui_value: str | None, widget_id: str = "") -> PlotlyState:
|
129
129
|
empty_selection_state: PlotlyState = {
|
130
|
-
"
|
130
|
+
"selection": {
|
131
131
|
"points": [],
|
132
132
|
"point_indices": [],
|
133
133
|
"box": [],
|
@@ -141,7 +141,7 @@ class PlotlyChartSelectionSerde:
|
|
141
141
|
else cast(PlotlyState, AttributeDictionary(json.loads(ui_value)))
|
142
142
|
)
|
143
143
|
|
144
|
-
if "
|
144
|
+
if "selection" not in selection_state:
|
145
145
|
selection_state = empty_selection_state
|
146
146
|
|
147
147
|
return cast(PlotlyState, AttributeDictionary(selection_state))
|