streamlit-nightly 1.38.1.dev20240918__py2.py3-none-any.whl → 1.38.1.dev20240919__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/elements/deck_gl_json_chart.py +26 -2
- streamlit/elements/map.py +27 -1
- streamlit/navigation/page.py +10 -6
- streamlit/proto/DeckGlJsonChart_pb2.py +3 -3
- streamlit/proto/DeckGlJsonChart_pb2.pyi +9 -1
- streamlit/static/asset-manifest.json +8 -7
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/2055.bca43613.chunk.js +1 -0
- streamlit/static/static/js/{7077.e21833ae.chunk.js → 6789.f8dde736.chunk.js} +2 -2
- streamlit/static/static/js/8485.81bdf474.chunk.js +1 -0
- streamlit/static/static/js/9943.d18fdff1.chunk.js +1 -0
- streamlit/static/static/js/{main.e8447cae.js → main.61ca8755.js} +2 -2
- {streamlit_nightly-1.38.1.dev20240918.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.38.1.dev20240918.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/RECORD +22 -21
- streamlit/static/static/js/3156.002c6ee0.chunk.js +0 -1
- streamlit/static/static/js/7493.95e79b96.chunk.js +0 -1
- /streamlit/static/static/css/{7077.81b3d18f.chunk.css → 6789.81b3d18f.chunk.css} +0 -0
- /streamlit/static/static/css/{3156.93909c7e.chunk.css → 9943.93909c7e.chunk.css} +0 -0
- /streamlit/static/static/js/{7077.e21833ae.chunk.js.LICENSE.txt → 6789.f8dde736.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{main.e8447cae.js.LICENSE.txt → main.61ca8755.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.38.1.dev20240918.data → streamlit_nightly-1.38.1.dev20240919.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.38.1.dev20240918.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.38.1.dev20240918.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.38.1.dev20240918.dist-info → streamlit_nightly-1.38.1.dev20240919.dist-info}/top_level.txt +0 -0
@@ -39,6 +39,8 @@ class PydeckMixin:
|
|
39
39
|
self,
|
40
40
|
pydeck_obj: Deck | None = None,
|
41
41
|
use_container_width: bool = False,
|
42
|
+
width: int | None = None,
|
43
|
+
height: int | None = None,
|
42
44
|
) -> DeltaGenerator:
|
43
45
|
"""Draw a chart using the PyDeck library.
|
44
46
|
|
@@ -68,7 +70,7 @@ class PydeckMixin:
|
|
68
70
|
|
69
71
|
Parameters
|
70
72
|
----------
|
71
|
-
pydeck_obj: pydeck.Deck or None
|
73
|
+
pydeck_obj : pydeck.Deck or None
|
72
74
|
Object specifying the PyDeck chart to draw.
|
73
75
|
use_container_width : bool
|
74
76
|
Whether to override the figure's native width with the width of
|
@@ -77,6 +79,19 @@ class PydeckMixin:
|
|
77
79
|
according to the plotting library, up to the width of the parent
|
78
80
|
container. If ``use_container_width`` is ``True``, Streamlit sets
|
79
81
|
the width of the figure to match the width of the parent container.
|
82
|
+
width : int or None
|
83
|
+
Desired width of the chart expressed in pixels. If ``width`` is
|
84
|
+
``None`` (default), Streamlit sets the width of the chart to fit
|
85
|
+
its contents according to the plotting library, up to the width of
|
86
|
+
the parent container. If ``width`` is greater than the width of the
|
87
|
+
parent container, Streamlit sets the chart width to match the width
|
88
|
+
of the parent container.
|
89
|
+
|
90
|
+
To use ``width``, you must set ``use_container_width=False``.
|
91
|
+
height : int or None
|
92
|
+
Desired height of the chart expressed in pixels. If ``height`` is
|
93
|
+
``None`` (default), Streamlit sets the height of the chart to fit
|
94
|
+
its contents according to the plotting library.
|
80
95
|
|
81
96
|
Example
|
82
97
|
-------
|
@@ -134,7 +149,9 @@ class PydeckMixin:
|
|
134
149
|
|
135
150
|
"""
|
136
151
|
pydeck_proto = PydeckProto()
|
137
|
-
marshall(
|
152
|
+
marshall(
|
153
|
+
pydeck_proto, pydeck_obj, use_container_width, width=width, height=height
|
154
|
+
)
|
138
155
|
return self.dg._enqueue("deck_gl_json_chart", pydeck_proto)
|
139
156
|
|
140
157
|
@property
|
@@ -165,6 +182,8 @@ def marshall(
|
|
165
182
|
pydeck_proto: PydeckProto,
|
166
183
|
pydeck_obj: Deck | None,
|
167
184
|
use_container_width: bool,
|
185
|
+
width: int | None = None,
|
186
|
+
height: int | None = None,
|
168
187
|
) -> None:
|
169
188
|
if pydeck_obj is None:
|
170
189
|
spec = json.dumps(EMPTY_MAP)
|
@@ -174,6 +193,11 @@ def marshall(
|
|
174
193
|
pydeck_proto.json = spec
|
175
194
|
pydeck_proto.use_container_width = use_container_width
|
176
195
|
|
196
|
+
if width:
|
197
|
+
pydeck_proto.width = width
|
198
|
+
if height:
|
199
|
+
pydeck_proto.height = height
|
200
|
+
|
177
201
|
pydeck_proto.id = ""
|
178
202
|
|
179
203
|
tooltip = _get_pydeck_tooltip(pydeck_obj)
|
streamlit/elements/map.py
CHANGED
@@ -84,6 +84,8 @@ class MapMixin:
|
|
84
84
|
size: None | str | float = None,
|
85
85
|
zoom: int | None = None,
|
86
86
|
use_container_width: bool = True,
|
87
|
+
width: int | None = None,
|
88
|
+
height: int | None = None,
|
87
89
|
) -> DeltaGenerator:
|
88
90
|
"""Display a map with a scatterplot overlaid onto it.
|
89
91
|
|
@@ -162,6 +164,21 @@ class MapMixin:
|
|
162
164
|
Streamlit sets the width of the chart to fit its contents according
|
163
165
|
to the plotting library, up to the width of the parent container.
|
164
166
|
|
167
|
+
width : int or None
|
168
|
+
Desired width of the chart expressed in pixels. If ``width`` is
|
169
|
+
``None`` (default), Streamlit sets the width of the chart to fit
|
170
|
+
its contents according to the plotting library, up to the width of
|
171
|
+
the parent container. If ``width`` is greater than the width of the
|
172
|
+
parent container, Streamlit sets the chart width to match the width
|
173
|
+
of the parent container.
|
174
|
+
|
175
|
+
To use ``width``, you must set ``use_container_width=False``.
|
176
|
+
|
177
|
+
height : int or None
|
178
|
+
Desired height of the chart expressed in pixels. If ``height`` is
|
179
|
+
``None`` (default), Streamlit sets the height of the chart to fit
|
180
|
+
its contents according to the plotting library.
|
181
|
+
|
165
182
|
Examples
|
166
183
|
--------
|
167
184
|
>>> import streamlit as st
|
@@ -223,7 +240,9 @@ class MapMixin:
|
|
223
240
|
deck_gl_json = to_deckgl_json(
|
224
241
|
data, latitude, longitude, size, color, map_style, zoom
|
225
242
|
)
|
226
|
-
marshall(
|
243
|
+
marshall(
|
244
|
+
map_proto, deck_gl_json, use_container_width, width=width, height=height
|
245
|
+
)
|
227
246
|
return self.dg._enqueue("deck_gl_json_chart", map_proto)
|
228
247
|
|
229
248
|
@property
|
@@ -471,8 +490,15 @@ def marshall(
|
|
471
490
|
pydeck_proto: DeckGlJsonChartProto,
|
472
491
|
pydeck_json: str,
|
473
492
|
use_container_width: bool,
|
493
|
+
height: int | None = None,
|
494
|
+
width: int | None = None,
|
474
495
|
) -> None:
|
475
496
|
pydeck_proto.json = pydeck_json
|
476
497
|
pydeck_proto.use_container_width = use_container_width
|
477
498
|
|
499
|
+
if width:
|
500
|
+
pydeck_proto.width = width
|
501
|
+
if height:
|
502
|
+
pydeck_proto.height = height
|
503
|
+
|
478
504
|
pydeck_proto.id = ""
|
streamlit/navigation/page.py
CHANGED
@@ -212,14 +212,18 @@ class StreamlitPage:
|
|
212
212
|
"The title of the page cannot be empty or consist of underscores/spaces only"
|
213
213
|
)
|
214
214
|
|
215
|
-
if url_path is not None and url_path.strip() == "" and not default:
|
216
|
-
raise StreamlitAPIException(
|
217
|
-
"The URL path cannot be an empty string unless the page is the default page."
|
218
|
-
)
|
219
|
-
|
220
215
|
self._url_path: str = inferred_name
|
221
216
|
if url_path is not None:
|
222
|
-
|
217
|
+
if url_path.strip() == "" and not default:
|
218
|
+
raise StreamlitAPIException(
|
219
|
+
"The URL path cannot be an empty string unless the page is the default page."
|
220
|
+
)
|
221
|
+
|
222
|
+
self._url_path = url_path.strip("/")
|
223
|
+
if "/" in self._url_path:
|
224
|
+
raise StreamlitAPIException(
|
225
|
+
"The URL path cannot contain a nested path (e.g. foo/bar)."
|
226
|
+
)
|
223
227
|
|
224
228
|
if self._icon:
|
225
229
|
validate_icon_or_emoji(self._icon)
|
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%streamlit/proto/DeckGlJsonChart.proto\"
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%streamlit/proto/DeckGlJsonChart.proto\"\x8e\x01\n\x0f\x44\x65\x63kGlJsonChart\x12\x0c\n\x04json\x18\x01 \x01(\t\x12\x0f\n\x07tooltip\x18\x02 \x01(\t\x12\x1b\n\x13use_container_width\x18\x04 \x01(\x08\x12\n\n\x02id\x18\x05 \x01(\t\x12\x14\n\x0cmapbox_token\x18\x06 \x01(\t\x12\r\n\x05width\x18\x07 \x01(\r\x12\x0e\n\x06height\x18\x08 \x01(\rB4\n\x1c\x63om.snowflake.apps.streamlitB\x14\x44\x65\x63kGlJsonChartProtob\x06proto3')
|
18
18
|
|
19
19
|
_globals = globals()
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +22,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.DeckGlJsonC
|
|
22
22
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
24
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\024DeckGlJsonChartProto'
|
25
|
-
_globals['_DECKGLJSONCHART']._serialized_start=
|
26
|
-
_globals['_DECKGLJSONCHART']._serialized_end=
|
25
|
+
_globals['_DECKGLJSONCHART']._serialized_start=42
|
26
|
+
_globals['_DECKGLJSONCHART']._serialized_end=184
|
27
27
|
# @@protoc_insertion_point(module_scope)
|
@@ -33,6 +33,8 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
33
33
|
USE_CONTAINER_WIDTH_FIELD_NUMBER: builtins.int
|
34
34
|
ID_FIELD_NUMBER: builtins.int
|
35
35
|
MAPBOX_TOKEN_FIELD_NUMBER: builtins.int
|
36
|
+
WIDTH_FIELD_NUMBER: builtins.int
|
37
|
+
HEIGHT_FIELD_NUMBER: builtins.int
|
36
38
|
json: builtins.str
|
37
39
|
"""The json of the pydeck object (https://deckgl.readthedocs.io/en/latest/deck.html)"""
|
38
40
|
tooltip: builtins.str
|
@@ -42,6 +44,10 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
42
44
|
"""ID"""
|
43
45
|
mapbox_token: builtins.str
|
44
46
|
"""The user-configured Mapbox token. If empty, the token id fetched from https://data.streamlit.io/tokens.json"""
|
47
|
+
width: builtins.int
|
48
|
+
"""Width in pixels"""
|
49
|
+
height: builtins.int
|
50
|
+
"""Height in pixels"""
|
45
51
|
def __init__(
|
46
52
|
self,
|
47
53
|
*,
|
@@ -50,7 +56,9 @@ class DeckGlJsonChart(google.protobuf.message.Message):
|
|
50
56
|
use_container_width: builtins.bool = ...,
|
51
57
|
id: builtins.str = ...,
|
52
58
|
mapbox_token: builtins.str = ...,
|
59
|
+
width: builtins.int = ...,
|
60
|
+
height: builtins.int = ...,
|
53
61
|
) -> None: ...
|
54
|
-
def ClearField(self, field_name: typing.Literal["id", b"id", "json", b"json", "mapbox_token", b"mapbox_token", "tooltip", b"tooltip", "use_container_width", b"use_container_width"]) -> None: ...
|
62
|
+
def ClearField(self, field_name: typing.Literal["height", b"height", "id", b"id", "json", b"json", "mapbox_token", b"mapbox_token", "tooltip", b"tooltip", "use_container_width", b"use_container_width", "width", b"width"]) -> None: ...
|
55
63
|
|
56
64
|
global___DeckGlJsonChart = DeckGlJsonChart
|
@@ -1,18 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
3
|
"main.css": "./static/css/main.5513bd04.css",
|
4
|
-
"main.js": "./static/js/main.
|
4
|
+
"main.js": "./static/js/main.61ca8755.js",
|
5
5
|
"static/js/6679.265ca09c.chunk.js": "./static/js/6679.265ca09c.chunk.js",
|
6
6
|
"static/js/9464.7e9a3c0a.chunk.js": "./static/js/9464.7e9a3c0a.chunk.js",
|
7
7
|
"static/js/9077.e0a8db2a.chunk.js": "./static/js/9077.e0a8db2a.chunk.js",
|
8
8
|
"static/js/3391.663b9d47.chunk.js": "./static/js/3391.663b9d47.chunk.js",
|
9
|
-
"static/css/
|
10
|
-
"static/js/
|
9
|
+
"static/css/9943.93909c7e.chunk.css": "./static/css/9943.93909c7e.chunk.css",
|
10
|
+
"static/js/9943.d18fdff1.chunk.js": "./static/js/9943.d18fdff1.chunk.js",
|
11
11
|
"static/css/5711.c24b25fa.chunk.css": "./static/css/5711.c24b25fa.chunk.css",
|
12
12
|
"static/js/5711.229cb7d0.chunk.js": "./static/js/5711.229cb7d0.chunk.js",
|
13
13
|
"static/js/3861.0dedcd19.chunk.js": "./static/js/3861.0dedcd19.chunk.js",
|
14
14
|
"static/js/8642.dfef7dcb.chunk.js": "./static/js/8642.dfef7dcb.chunk.js",
|
15
|
-
"static/js/
|
15
|
+
"static/js/8485.81bdf474.chunk.js": "./static/js/8485.81bdf474.chunk.js",
|
16
16
|
"static/js/8148.f51df66c.chunk.js": "./static/js/8148.f51df66c.chunk.js",
|
17
17
|
"static/js/84.414fa87b.chunk.js": "./static/js/84.414fa87b.chunk.js",
|
18
18
|
"static/js/9923.7061d124.chunk.js": "./static/js/9923.7061d124.chunk.js",
|
@@ -51,8 +51,8 @@
|
|
51
51
|
"static/js/766.e3700e32.chunk.js": "./static/js/766.e3700e32.chunk.js",
|
52
52
|
"static/js/783.788bb3ab.chunk.js": "./static/js/783.788bb3ab.chunk.js",
|
53
53
|
"static/js/5544.2769497c.chunk.js": "./static/js/5544.2769497c.chunk.js",
|
54
|
-
"static/css/
|
55
|
-
"static/js/
|
54
|
+
"static/css/6789.81b3d18f.chunk.css": "./static/css/6789.81b3d18f.chunk.css",
|
55
|
+
"static/js/6789.f8dde736.chunk.js": "./static/js/6789.f8dde736.chunk.js",
|
56
56
|
"static/js/7612.39e7938b.chunk.js": "./static/js/7612.39e7938b.chunk.js",
|
57
57
|
"static/js/3389.71902a75.chunk.js": "./static/js/3389.71902a75.chunk.js",
|
58
58
|
"static/js/4297.3afbdd03.chunk.js": "./static/js/4297.3afbdd03.chunk.js",
|
@@ -63,6 +63,7 @@
|
|
63
63
|
"static/js/6198.956025ac.chunk.js": "./static/js/6198.956025ac.chunk.js",
|
64
64
|
"static/js/1674.86aea8e0.chunk.js": "./static/js/1674.86aea8e0.chunk.js",
|
65
65
|
"static/js/7591.b3928443.chunk.js": "./static/js/7591.b3928443.chunk.js",
|
66
|
+
"static/js/2055.bca43613.chunk.js": "./static/js/2055.bca43613.chunk.js",
|
66
67
|
"static/media/MaterialSymbols-Rounded.woff2": "./static/media/MaterialSymbols-Rounded.ec07649f7a20048d5730.woff2",
|
67
68
|
"static/media/fireworks.gif": "./static/media/fireworks.0906f02ea43f1018a6d2.gif",
|
68
69
|
"static/media/flake-2.png": "./static/media/flake-2.e3f07d06933dd0e84c24.png",
|
@@ -153,6 +154,6 @@
|
|
153
154
|
},
|
154
155
|
"entrypoints": [
|
155
156
|
"static/css/main.5513bd04.css",
|
156
|
-
"static/js/main.
|
157
|
+
"static/js/main.61ca8755.js"
|
157
158
|
]
|
158
159
|
}
|
streamlit/static/index.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.61ca8755.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2055],{22044:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(58878),s=n(53124),i=n.n(s),r=n(8151),l=n(41514),d=n(67214),a=n(64611),c=n(84152),h=n(89653);const p=(0,h.A)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const o=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...o,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),u=(0,h.A)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[p]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=n(90782);class x extends o.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:o,width:s,height:i,disableFullscreenMode:r}=this.props;let c=l.u,h=this.zoomIn,x="View fullscreen";return e&&(c=d.Q,h=this.zoomOut,x="Exit fullscreen"),(0,m.jsxs)(u,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,m.jsx)(p,{"data-testid":"StyledFullScreenButton",onClick:h,title:x,isExpanded:e,children:(0,m.jsx)(a.A,{content:c})}),o(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:s,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}x.contextType=c.n;const g=(0,r.b)(x);const f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends o.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:o,disableFullscreenMode:s}=this.props;return(0,m.jsx)(g,{width:n,height:o,disableFullscreenMode:t||s,children:t=>{let{width:n,height:o,expanded:s,expand:i,collapse:r}=t;return(0,m.jsx)(e,{...this.props,width:n,height:o,isFullScreen:s,expand:i,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,i()(n,e)}},85850:(e,t,n)=>{n.d(t,{K:()=>f,A:()=>w});n(58878);var o=n(8151),s=n(12274),i=n(63186),r=n(34914),l=n(997),d=n(36459),a=n(84720),c=n(64611),h=n(89653),p=n(58144);const u="-2.4rem",m=(0,h.A)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:n,target:o}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:n?u:"-1rem",right:t.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:u},...o&&{[`${o}:hover &, ${o}:active &, ${o}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:u}}}}}),""),x=(0,h.A)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,p.iq)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var g=n(90782);function f(e){let{label:t,show_label:n,icon:s,onClick:i}=e;const h=(0,o.u)(),p=n?t:"";return(0,g.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,g.jsx)(l.A,{content:(0,g.jsx)(r.Ay,{source:t,allowHTML:!1,style:{fontSize:h.fontSizes.sm}}),placement:l.W.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,g.jsxs)(d.Ay,{onClick:e=>{i&&i(),e.stopPropagation()},kind:a.KX.ELEMENT_TOOLBAR,children:[s&&(0,g.jsx)(c.A,{content:s,size:"md",testid:"stElementToolbarButtonIcon"}),p&&(0,g.jsx)("span",{children:p})]})})})}const w=e=>{let{onExpand:t,onCollapse:n,isFullScreen:o,locked:r,children:l,target:d,disableFullscreenMode:a}=e;return(0,g.jsx)(m,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:r||o,target:d,children:(0,g.jsxs)(x,{children:[l,t&&!a&&!o&&(0,g.jsx)(f,{label:"Fullscreen",icon:s.g,onClick:()=>t()}),n&&!a&&o&&(0,g.jsx)(f,{label:"Close fullscreen",icon:i.Q,onClick:()=>n()})]})})}}}]);
|