@stlite/desktop 0.36.0 → 0.37.0

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.
package/README.md CHANGED
@@ -24,7 +24,7 @@ Convert your [Streamlit](https://streamlit.io/) application into a desktop app w
24
24
  }
25
25
  },
26
26
  "devDependencies": {
27
- "@stlite/desktop": "0.34.0",
27
+ "@stlite/desktop": "0.36.0",
28
28
  "cross-env": "^7.0.3",
29
29
  "electron": "^25.2.0",
30
30
  "electron-builder": "^24.4.0"
@@ -56,6 +56,21 @@ Convert your [Streamlit](https://streamlit.io/) application into a desktop app w
56
56
  To make your app secure, be sure to use the latest version of Electron.
57
57
  This is [announced](https://www.electronjs.org/docs/latest/tutorial/security#16-use-a-current-version-of-electron) as one of the security best practices in the Electron document too.
58
58
 
59
+ ## Hide the toolbar, hamburger menu, and the footer
60
+
61
+ If you want to hide the toolbar, hamburger menu, and the footer, add the following to your `package.json` file and run the `dump` command again. By adding the `stlite.desktop.embed` field, the dumped Streamlit app will work in the [embed mode](https://docs.streamlit.io/streamlit-community-cloud/get-started/embed-your-app#embedding-with-iframes) which hides the toolbar, hamburger menu, and the footer.
62
+
63
+ ```json
64
+ {
65
+ // ...other fields...
66
+ "stlite": {
67
+ "desktop": {
68
+ "embed": true
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
59
74
  ## Limitations
60
75
 
61
76
  - Navigation to external resources like `st.markdown("[link](https://streamlit.io/)")` does not work for security. See https://github.com/whitphx/stlite/pull/445 and let us know if you have use cases where you have to use such external links.
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "/static/css/main.b43a24ba.css",
4
- "main.js": "/static/js/main.259af25f.js",
4
+ "main.js": "/static/js/main.798bbf8c.js",
5
5
  "static/js/7073.d0bf438f.chunk.js": "/static/js/7073.d0bf438f.chunk.js",
6
6
  "static/js/4994.551c87ac.chunk.js": "/static/js/4994.551c87ac.chunk.js",
7
- "static/js/792.45efff32.chunk.js": "/static/js/792.45efff32.chunk.js",
7
+ "static/js/792.2e8015a9.chunk.js": "/static/js/792.2e8015a9.chunk.js",
8
8
  "static/js/4141.a101e33c.chunk.js": "/static/js/4141.a101e33c.chunk.js",
9
9
  "static/js/6913.094a45e2.chunk.js": "/static/js/6913.094a45e2.chunk.js",
10
10
  "static/css/5099.60b7ada4.chunk.css": "/static/css/5099.60b7ada4.chunk.css",
@@ -15,12 +15,12 @@
15
15
  "static/js/8418.aed275df.chunk.js": "/static/js/8418.aed275df.chunk.js",
16
16
  "static/js/8295.c3cd87de.chunk.js": "/static/js/8295.c3cd87de.chunk.js",
17
17
  "static/js/8486.e56533d6.chunk.js": "/static/js/8486.e56533d6.chunk.js",
18
- "static/js/9615.82cf4bfb.chunk.js": "/static/js/9615.82cf4bfb.chunk.js",
18
+ "static/js/9615.b2a2aa6f.chunk.js": "/static/js/9615.b2a2aa6f.chunk.js",
19
19
  "static/js/6557.fd2f35c8.chunk.js": "/static/js/6557.fd2f35c8.chunk.js",
20
20
  "static/js/9382.c417d448.chunk.js": "/static/js/9382.c417d448.chunk.js",
21
- "static/js/3580.e292972c.chunk.js": "/static/js/3580.e292972c.chunk.js",
21
+ "static/js/3580.06d6525d.chunk.js": "/static/js/3580.06d6525d.chunk.js",
22
22
  "static/js/2327.b8572a38.chunk.js": "/static/js/2327.b8572a38.chunk.js",
23
- "static/js/787.30ab7f34.chunk.js": "/static/js/787.30ab7f34.chunk.js",
23
+ "static/js/787.6799b9ba.chunk.js": "/static/js/787.6799b9ba.chunk.js",
24
24
  "static/js/5241.0326c97c.chunk.js": "/static/js/5241.0326c97c.chunk.js",
25
25
  "static/js/172.599dcb6e.chunk.js": "/static/js/172.599dcb6e.chunk.js",
26
26
  "static/js/4140.edb6c36a.chunk.js": "/static/js/4140.edb6c36a.chunk.js",
@@ -45,7 +45,7 @@
45
45
  "static/js/5177.3eb35171.chunk.js": "/static/js/5177.3eb35171.chunk.js",
46
46
  "static/js/1839.410079bf.chunk.js": "/static/js/1839.410079bf.chunk.js",
47
47
  "static/css/4320.1edfa457.chunk.css": "/static/css/4320.1edfa457.chunk.css",
48
- "static/js/4320.8fa60786.chunk.js": "/static/js/4320.8fa60786.chunk.js",
48
+ "static/js/4320.4daf4ee0.chunk.js": "/static/js/4320.4daf4ee0.chunk.js",
49
49
  "static/js/1579.10c95eae.chunk.js": "/static/js/1579.10c95eae.chunk.js",
50
50
  "static/js/3744.93bd4bad.chunk.js": "/static/js/3744.93bd4bad.chunk.js",
51
51
  "static/js/9733.0d6a1712.chunk.js": "/static/js/9733.0d6a1712.chunk.js",
@@ -55,7 +55,7 @@
55
55
  "static/js/9166.1a468fb9.chunk.js": "/static/js/9166.1a468fb9.chunk.js",
56
56
  "static/js/6865.b0803b6b.chunk.js": "/static/js/6865.b0803b6b.chunk.js",
57
57
  "static/js/6679.859559e9.chunk.js": "/static/js/6679.859559e9.chunk.js",
58
- "pypi/streamlit-1.24.0-py2.py3-none-any.whl": "/pypi/streamlit-1.24.0-py2.py3-none-any.whl",
58
+ "pypi/streamlit-1.24.0-cp311-none-any.whl": "/pypi/streamlit-1.24.0-cp311-none-any.whl",
59
59
  "static/media/SourceSansPro-Regular.ttf": "/static/media/SourceSansPro-Regular.efa76f8326aa5cee3bdd.ttf",
60
60
  "static/media/SourceSansPro-SemiBold.ttf": "/static/media/SourceSansPro-SemiBold.43cc81b496222dc9ce3c.ttf",
61
61
  "static/media/SourceSansPro-Bold.ttf": "/static/media/SourceSansPro-Bold.12e6acd2589d00c9d0aa.ttf",
@@ -154,6 +154,6 @@
154
154
  },
155
155
  "entrypoints": [
156
156
  "static/css/main.b43a24ba.css",
157
- "static/js/main.259af25f.js"
157
+ "static/js/main.798bbf8c.js"
158
158
  ]
159
159
  }
package/build/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"/><title>stlite</title><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'wasm-unsafe-eval' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src 'self' blob:; script-src-elem 'self' 'unsafe-inline' https:; style-src-elem 'self' 'unsafe-inline' https:; font-src 'self' data: https:; connect-src https://data.streamlit.io/ https://*.mapbox.com/ 'self' https:; img-src https: blob: data: file:; media-src https: blob:; frame-src https:"><script defer="defer" src="/static/js/main.259af25f.js"></script><link href="/static/css/main.b43a24ba.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"/><title>stlite</title><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'wasm-unsafe-eval' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src 'self' blob:; script-src-elem 'self' 'unsafe-inline' https:; style-src-elem 'self' 'unsafe-inline' https:; font-src 'self' data: https:; connect-src https://data.streamlit.io/ https://*.mapbox.com/ 'self' https:; img-src https: blob: data: file:; media-src https: blob:; frame-src https:"><script defer="defer" src="/static/js/main.798bbf8c.js"></script><link href="/static/css/main.b43a24ba.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[3580],{83580:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var s=r(5057),a=r(98927),n=r(98093),i=r(96266);const l=528;function d({element:e,width:t,endpoints:r}){const d=(0,s.useRef)(null),{type:o,url:c}=e,u=(0,n.O0)(c);(0,s.useEffect)((()=>{const t=d.current,r=()=>{t&&(t.currentTime=e.startTime)};return t&&t.addEventListener("loadedmetadata",r),()=>{t&&t.removeEventListener("loadedmetadata",r)}}),[e]);const h=t=>{const{startTime:r}=e;return r?`${t}?start=${r}`:t};if(o===a.nk.Type.YOUTUBE_IFRAME){const e=0!==t?.75*t:l;return(0,i.jsx)("iframe",{title:u,src:h(u),width:t,height:e,frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{ref:d,controls:!0,src:r.buildMediaURL(u),className:"stVideo",style:{width:t,height:0===t?l:void 0}})}}}]);
1
+ "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[3580],{83580:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var s=r(5057),a=r(98927),n=r(99811),i=r(96266);const l=528;function d({element:e,width:t,endpoints:r}){const d=(0,s.useRef)(null),{type:o,url:c}=e,u=(0,n.O0)(c);(0,s.useEffect)((()=>{const t=d.current,r=()=>{t&&(t.currentTime=e.startTime)};return t&&t.addEventListener("loadedmetadata",r),()=>{t&&t.removeEventListener("loadedmetadata",r)}}),[e]);const h=t=>{const{startTime:r}=e;return r?`${t}?start=${r}`:t};if(o===a.nk.Type.YOUTUBE_IFRAME){const e=0!==t?.75*t:l;return(0,i.jsx)("iframe",{title:u,src:h(u),width:t,height:e,frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{ref:d,controls:!0,src:r.buildMediaURL(u),className:"stVideo",style:{width:t,height:0===t?l:void 0}})}}}]);