streamlit-nightly 1.33.1.dev20240422__py2.py3-none-any.whl → 1.33.1.dev20240424__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.
Files changed (40) hide show
  1. streamlit/elements/heading.py +9 -6
  2. streamlit/elements/layouts.py +13 -9
  3. streamlit/elements/markdown.py +6 -4
  4. streamlit/elements/media.py +71 -1
  5. streamlit/elements/metric.py +3 -2
  6. streamlit/elements/progress.py +3 -2
  7. streamlit/elements/toast.py +3 -2
  8. streamlit/elements/widgets/button.py +12 -8
  9. streamlit/elements/widgets/camera_input.py +3 -2
  10. streamlit/elements/widgets/checkbox.py +6 -4
  11. streamlit/elements/widgets/color_picker.py +3 -2
  12. streamlit/elements/widgets/file_uploader.py +3 -2
  13. streamlit/elements/widgets/multiselect.py +3 -2
  14. streamlit/elements/widgets/number_input.py +3 -2
  15. streamlit/elements/widgets/radio.py +3 -2
  16. streamlit/elements/widgets/select_slider.py +3 -2
  17. streamlit/elements/widgets/selectbox.py +3 -2
  18. streamlit/elements/widgets/slider.py +3 -2
  19. streamlit/elements/widgets/text_widgets.py +6 -4
  20. streamlit/elements/widgets/time_widgets.py +6 -4
  21. streamlit/elements/write.py +11 -3
  22. streamlit/proto/Audio_pb2.py +3 -3
  23. streamlit/proto/Audio_pb2.pyi +7 -1
  24. streamlit/proto/Video_pb2.py +4 -4
  25. streamlit/proto/Video_pb2.pyi +10 -1
  26. streamlit/static/asset-manifest.json +4 -4
  27. streamlit/static/index.html +1 -1
  28. streamlit/static/static/js/178.7bea8c5d.chunk.js +1 -0
  29. streamlit/static/static/js/9330.2b4c99e0.chunk.js +1 -0
  30. streamlit/static/static/js/main.3d71c26f.js +2 -0
  31. {streamlit_nightly-1.33.1.dev20240422.dist-info → streamlit_nightly-1.33.1.dev20240424.dist-info}/METADATA +1 -1
  32. {streamlit_nightly-1.33.1.dev20240422.dist-info → streamlit_nightly-1.33.1.dev20240424.dist-info}/RECORD +37 -37
  33. streamlit/static/static/js/178.b5384fd0.chunk.js +0 -1
  34. streamlit/static/static/js/9330.d29313d4.chunk.js +0 -1
  35. streamlit/static/static/js/main.8fc4565f.js +0 -2
  36. /streamlit/static/static/js/{main.8fc4565f.js.LICENSE.txt → main.3d71c26f.js.LICENSE.txt} +0 -0
  37. {streamlit_nightly-1.33.1.dev20240422.data → streamlit_nightly-1.33.1.dev20240424.data}/scripts/streamlit.cmd +0 -0
  38. {streamlit_nightly-1.33.1.dev20240422.dist-info → streamlit_nightly-1.33.1.dev20240424.dist-info}/WHEEL +0 -0
  39. {streamlit_nightly-1.33.1.dev20240422.dist-info → streamlit_nightly-1.33.1.dev20240424.dist-info}/entry_points.txt +0 -0
  40. {streamlit_nightly-1.33.1.dev20240422.dist-info → streamlit_nightly-1.33.1.dev20240424.dist-info}/top_level.txt +0 -0
@@ -35,6 +35,8 @@ class Audio(google.protobuf.message.Message):
35
35
  START_TIME_FIELD_NUMBER: builtins.int
36
36
  END_TIME_FIELD_NUMBER: builtins.int
37
37
  LOOP_FIELD_NUMBER: builtins.int
38
+ AUTOPLAY_FIELD_NUMBER: builtins.int
39
+ ID_FIELD_NUMBER: builtins.int
38
40
  url: builtins.str
39
41
  start_time: builtins.int
40
42
  """The currentTime attribute of the HTML <audio> tag's <source> subtag."""
@@ -42,6 +44,8 @@ class Audio(google.protobuf.message.Message):
42
44
  """The time at which the audio should stop playing. If not specified, plays to the end."""
43
45
  loop: builtins.bool
44
46
  """Indicates whether the audio should start over from the beginning once it ends."""
47
+ autoplay: builtins.bool
48
+ id: builtins.str
45
49
  def __init__(
46
50
  self,
47
51
  *,
@@ -49,7 +53,9 @@ class Audio(google.protobuf.message.Message):
49
53
  start_time: builtins.int = ...,
50
54
  end_time: builtins.int = ...,
51
55
  loop: builtins.bool = ...,
56
+ autoplay: builtins.bool = ...,
57
+ id: builtins.str = ...,
52
58
  ) -> None: ...
53
- def ClearField(self, field_name: typing_extensions.Literal["end_time", b"end_time", "loop", b"loop", "start_time", b"start_time", "url", b"url"]) -> None: ...
59
+ def ClearField(self, field_name: typing_extensions.Literal["autoplay", b"autoplay", "end_time", b"end_time", "id", b"id", "loop", b"loop", "start_time", b"start_time", "url", b"url"]) -> None: ...
54
60
 
55
61
  global___Audio = Audio
@@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
13
13
 
14
14
 
15
15
 
16
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Video.proto\"+\n\rSubtitleTrack\x12\r\n\x05label\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\xda\x01\n\x05Video\x12\x0b\n\x03url\x18\x06 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x05\x12\x19\n\x04type\x18\x05 \x01(\x0e\x32\x0b.Video.Type\x12!\n\tsubtitles\x18\x07 \x03(\x0b\x32\x0e.SubtitleTrack\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x05\x12\x0c\n\x04loop\x18\t \x01(\x08\"2\n\x04Type\x12\n\n\x06UNUSED\x10\x00\x12\n\n\x06NATIVE\x10\x01\x12\x12\n\x0eYOUTUBE_IFRAME\x10\x02J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05R\x06\x66ormatR\x04\x64\x61taB*\n\x1c\x63om.snowflake.apps.streamlitB\nVideoProtob\x06proto3')
16
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Video.proto\"+\n\rSubtitleTrack\x12\r\n\x05label\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\x87\x02\n\x05Video\x12\x0b\n\x03url\x18\x06 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x05\x12\x19\n\x04type\x18\x05 \x01(\x0e\x32\x0b.Video.Type\x12!\n\tsubtitles\x18\x07 \x03(\x0b\x32\x0e.SubtitleTrack\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x05\x12\x0c\n\x04loop\x18\t \x01(\x08\x12\x10\n\x08\x61utoplay\x18\n \x01(\x08\x12\r\n\x05muted\x18\x0b \x01(\x08\x12\n\n\x02id\x18\x0c \x01(\t\"2\n\x04Type\x12\n\n\x06UNUSED\x10\x00\x12\n\n\x06NATIVE\x10\x01\x12\x12\n\x0eYOUTUBE_IFRAME\x10\x02J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05R\x06\x66ormatR\x04\x64\x61taB*\n\x1c\x63om.snowflake.apps.streamlitB\nVideoProtob\x06proto3')
17
17
 
18
18
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
19
19
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Video_pb2', globals())
@@ -24,7 +24,7 @@ if _descriptor._USE_C_DESCRIPTORS == False:
24
24
  _SUBTITLETRACK._serialized_start=31
25
25
  _SUBTITLETRACK._serialized_end=74
26
26
  _VIDEO._serialized_start=77
27
- _VIDEO._serialized_end=295
28
- _VIDEO_TYPE._serialized_start=213
29
- _VIDEO_TYPE._serialized_end=263
27
+ _VIDEO._serialized_end=340
28
+ _VIDEO_TYPE._serialized_start=258
29
+ _VIDEO_TYPE._serialized_end=308
30
30
  # @@protoc_insertion_point(module_scope)
@@ -76,6 +76,9 @@ class Video(google.protobuf.message.Message):
76
76
  SUBTITLES_FIELD_NUMBER: builtins.int
77
77
  END_TIME_FIELD_NUMBER: builtins.int
78
78
  LOOP_FIELD_NUMBER: builtins.int
79
+ AUTOPLAY_FIELD_NUMBER: builtins.int
80
+ MUTED_FIELD_NUMBER: builtins.int
81
+ ID_FIELD_NUMBER: builtins.int
79
82
  url: builtins.str
80
83
  """A url pointing to a video file"""
81
84
  start_time: builtins.int
@@ -89,6 +92,9 @@ class Video(google.protobuf.message.Message):
89
92
  """The time at which the video should stop playing. If not specified, plays to the end."""
90
93
  loop: builtins.bool
91
94
  """Indicates whether the video should start over from the beginning once it ends."""
95
+ autoplay: builtins.bool
96
+ muted: builtins.bool
97
+ id: builtins.str
92
98
  def __init__(
93
99
  self,
94
100
  *,
@@ -98,7 +104,10 @@ class Video(google.protobuf.message.Message):
98
104
  subtitles: collections.abc.Iterable[global___SubtitleTrack] | None = ...,
99
105
  end_time: builtins.int = ...,
100
106
  loop: builtins.bool = ...,
107
+ autoplay: builtins.bool = ...,
108
+ muted: builtins.bool = ...,
109
+ id: builtins.str = ...,
101
110
  ) -> None: ...
102
- def ClearField(self, field_name: typing_extensions.Literal["end_time", b"end_time", "loop", b"loop", "start_time", b"start_time", "subtitles", b"subtitles", "type", b"type", "url", b"url"]) -> None: ...
111
+ def ClearField(self, field_name: typing_extensions.Literal["autoplay", b"autoplay", "end_time", b"end_time", "id", b"id", "loop", b"loop", "muted", b"muted", "start_time", b"start_time", "subtitles", b"subtitles", "type", b"type", "url", b"url"]) -> None: ...
103
112
 
104
113
  global___Video = Video
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.bf304093.css",
4
- "main.js": "./static/js/main.8fc4565f.js",
4
+ "main.js": "./static/js/main.3d71c26f.js",
5
5
  "static/js/9336.2d95d840.chunk.js": "./static/js/9336.2d95d840.chunk.js",
6
- "static/js/9330.d29313d4.chunk.js": "./static/js/9330.d29313d4.chunk.js",
6
+ "static/js/9330.2b4c99e0.chunk.js": "./static/js/9330.2b4c99e0.chunk.js",
7
7
  "static/js/7217.d970c074.chunk.js": "./static/js/7217.d970c074.chunk.js",
8
8
  "static/js/3301.1d1b10bb.chunk.js": "./static/js/3301.1d1b10bb.chunk.js",
9
9
  "static/css/3092.95a45cfe.chunk.css": "./static/css/3092.95a45cfe.chunk.css",
@@ -19,7 +19,7 @@
19
19
  "static/js/2469.3e9c3ce9.chunk.js": "./static/js/2469.3e9c3ce9.chunk.js",
20
20
  "static/js/4113.1e7eff4d.chunk.js": "./static/js/4113.1e7eff4d.chunk.js",
21
21
  "static/js/1168.1d6408e6.chunk.js": "./static/js/1168.1d6408e6.chunk.js",
22
- "static/js/178.b5384fd0.chunk.js": "./static/js/178.b5384fd0.chunk.js",
22
+ "static/js/178.7bea8c5d.chunk.js": "./static/js/178.7bea8c5d.chunk.js",
23
23
  "static/js/1792.b8efa879.chunk.js": "./static/js/1792.b8efa879.chunk.js",
24
24
  "static/js/3513.e3e7300a.chunk.js": "./static/js/3513.e3e7300a.chunk.js",
25
25
  "static/js/7602.6175e969.chunk.js": "./static/js/7602.6175e969.chunk.js",
@@ -152,6 +152,6 @@
152
152
  },
153
153
  "entrypoints": [
154
154
  "static/css/main.bf304093.css",
155
- "static/js/main.8fc4565f.js"
155
+ "static/js/main.3d71c26f.js"
156
156
  ]
157
157
  }
@@ -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.8fc4565f.js"></script><link href="./static/css/main.bf304093.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
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.3d71c26f.js"></script><link href="./static/css/main.bf304093.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([[178],{178:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var a=r(66845),n=r(16295),s=r(68785),i=r(40864);const d=528;function l(e){let{element:t,width:r,endpoints:l,elementMgr:o}=e;const u=(0,a.useRef)(null),{type:c,url:p,startTime:m,subtitles:f,endTime:h,loop:v,autoplay:y,muted:E}=t,T=(0,a.useMemo)((()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,o]);(0,a.useEffect)((()=>{u.current&&(u.current.currentTime=m)}),[m]),(0,a.useEffect)((()=>{const e=u.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,a.useEffect)((()=>{const e=u.current;if(!e)return;let t=!1;const r=()=>{h>0&&e.currentTime>=h&&(v?(e.currentTime=m||0,e.play()):t||(t=!0,e.pause()))};return h>0&&e.addEventListener("timeupdate",r),()=>{e&&h>0&&e.removeEventListener("timeupdate",r)}}),[h,v,m]),(0,a.useEffect)((()=>{const e=u.current;if(!e)return;const t=()=>{v&&(e.currentTime=m||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[v,m]);const g=e=>{const{startTime:r,endTime:a,loop:n,autoplay:s,muted:i}=t,d=new URL(e);if(r&&!isNaN(r)&&d.searchParams.append("start",r.toString()),a&&!isNaN(a)&&d.searchParams.append("end",a.toString()),n){d.searchParams.append("loop","1");const e=d.pathname.split("/").pop();e&&d.searchParams.append("playlist",e)}return s&&d.searchParams.append("autoplay","1"),i&&d.searchParams.append("mute","1"),d.toString()};if(c===n.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:d;return(0,i.jsx)("iframe",{"data-testid":"stVideo",title:p,src:g(p),width:r,height:e,style:{colorScheme:"normal"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{"data-testid":"stVideo",ref:u,controls:!0,muted:E,autoPlay:y&&!T,src:l.buildMediaURL(p),className:"stVideo",style:{width:r,height:0===r?d:void 0},crossOrigin:s.td&&f.length>0?"anonymous":void 0,children:f&&f.map(((e,t)=>(0,i.jsx)("track",{kind:"captions",src:l.buildMediaURL(e.url),label:e.label,default:0===t},t)))})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[9330],{69330:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(66845),u=r(40864);function a(e){let{element:t,width:r,endpoints:a,elementMgr:s}=e;const i=(0,n.useRef)(null),{startTime:d,endTime:c,loop:l,autoplay:o}=t,m=(0,n.useMemo)((()=>{if(!t.id)return!0;const e=s.getElementState(t.id,"preventAutoplay");return e||s.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,s]);(0,n.useEffect)((()=>{i.current&&(i.current.currentTime=d)}),[d]),(0,n.useEffect)((()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,n.useEffect)((()=>{const e=i.current;if(!e)return;let t=!1;const r=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=d||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",r),()=>{e&&c>0&&e.removeEventListener("timeupdate",r)}}),[c,l,d]),(0,n.useEffect)((()=>{const e=i.current;if(!e)return;const t=()=>{l&&(e.currentTime=d||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[l,d]);const p=a.buildMediaURL(t.url);return(0,u.jsx)("audio",{"data-testid":"stAudio",id:"audio",ref:i,controls:!0,autoPlay:o&&!m,src:p,className:"stAudio",style:{width:r}})}}}]);