streamlit-nightly 1.36.1.dev20240717__py2.py3-none-any.whl → 1.36.1.dev20240718__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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.29bca1b5.css",
4
- "main.js": "./static/js/main.917a5920.js",
4
+ "main.js": "./static/js/main.2df78c6a.js",
5
5
  "static/js/9336.3e046ad7.chunk.js": "./static/js/9336.3e046ad7.chunk.js",
6
6
  "static/js/9330.2b4c99e0.chunk.js": "./static/js/9330.2b4c99e0.chunk.js",
7
7
  "static/js/2736.7d516fcc.chunk.js": "./static/js/2736.7d516fcc.chunk.js",
@@ -12,7 +12,7 @@
12
12
  "static/js/5441.324eb9ab.chunk.js": "./static/js/5441.324eb9ab.chunk.js",
13
13
  "static/js/8427.5192ee0c.chunk.js": "./static/js/8427.5192ee0c.chunk.js",
14
14
  "static/js/7323.b74cc85b.chunk.js": "./static/js/7323.b74cc85b.chunk.js",
15
- "static/js/8536.f7b26b02.chunk.js": "./static/js/8536.f7b26b02.chunk.js",
15
+ "static/js/8536.44f53d6e.chunk.js": "./static/js/8536.44f53d6e.chunk.js",
16
16
  "static/js/7805.acc6316a.chunk.js": "./static/js/7805.acc6316a.chunk.js",
17
17
  "static/js/4500.be0eb305.chunk.js": "./static/js/4500.be0eb305.chunk.js",
18
18
  "static/js/1307.36b77087.chunk.js": "./static/js/1307.36b77087.chunk.js",
@@ -152,6 +152,6 @@
152
152
  },
153
153
  "entrypoints": [
154
154
  "static/css/main.29bca1b5.css",
155
- "static/js/main.917a5920.js"
155
+ "static/js/main.2df78c6a.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.917a5920.js"></script><link href="./static/css/main.29bca1b5.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.2df78c6a.js"></script><link href="./static/css/main.29bca1b5.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
+ (self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8536],{72394:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>K});var o=i(66845),n=i(70145),s=i(97365),r=i(62813),a=i.n(r),l=i(3717),c=i(25621),h=i(27466),d=i(88766),p=i(699),m=i(96260),u=i(24002),g=i(29378),x=i(80248),w=i(87072),b=i(12879),y=i(47203),S=i(61355),v=i(56264),f=i(19754),k=i(23593),j=i(63765),T=i(13005),C=i.n(T),z=i(82309),E=i(40864);const F=e=>{let{error:t,width:i,deltaType:o}=e;return t instanceof D?(0,E.jsx)(z.Z,{width:i,name:"No Mapbox token provided",message:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("p",{children:["To use ",(0,E.jsxs)("code",{children:["st.",o]})," or ",(0,E.jsx)("code",{children:"st.map"})," you need to set up a Mapbox access token."]}),(0,E.jsxs)("p",{children:["To get a token, create an account at"," ",(0,E.jsx)("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),(0,E.jsxs)("p",{children:["Once you have a token, just set it using the Streamlit config option ",(0,E.jsx)("code",{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),(0,E.jsxs)("p",{children:["See"," ",(0,E.jsx)("a",{href:"https://docs.streamlit.io/develop/api-reference/configuration/config.toml",children:"our documentation"})," ","for more info on how to set config options."]})]})}):t instanceof M?(0,E.jsx)(z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("p",{children:"This app requires an internet connection."}),(0,E.jsx)("p",{children:"Please check your connection and try again."}),(0,E.jsxs)("p",{children:["If you think this is a bug, please file bug report"," ",(0,E.jsx)("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):(0,E.jsx)(z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:t.message})};var V=i(18080),Z=i(16295),I=i(72012),O=i(66694);class D extends Error{}class M extends Error{}const P="https://data.streamlit.io/tokens.json",W="mapbox",J=e=>t=>{class i extends o.PureComponent{constructor(i){super(i),this.context=void 0,this.initMapboxToken=async()=>{try{const e=await V.Z.get(P),{[W]:t}=e.data;if(!t)throw new Error("Missing token ".concat(W));this.setState({mapboxToken:t,isFetching:!1})}catch(e){const t=(0,j.b)(e);throw this.setState({mapboxTokenError:t,isFetching:!1}),new M("".concat(t.message," (").concat(P,")"))}},this.render=()=>{const{mapboxToken:i,mapboxTokenError:o,isFetching:n}=this.state,{width:s}=this.props;return o?(0,E.jsx)(F,{width:s,error:o,deltaType:e}):n?(0,E.jsx)(I.O,{element:Z.Od.create({style:Z.Od.SkeletonStyle.ELEMENT})}):(0,E.jsx)(t,{...this.props,mapboxToken:i,width:s})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0}}componentDidMount(){const e=this.props.element.mapboxToken||this.context.libConfig.mapboxToken;e?this.setState({mapboxToken:e,isFetching:!1}):this.initMapboxToken()}}return i.displayName="withMapboxToken(".concat(t.displayName||t.name,")"),i.contextType=O.E,C()(i,t)};var L=i(1515);const N=(0,L.Z)("div",{target:"e1az0zs51"})((e=>{let{width:t,height:i,theme:o}=e;return{marginTop:o.spacing.sm,position:"relative",height:i,width:t}}),""),B=(0,L.Z)("div",{target:"e1az0zs50"})((e=>{let{theme:t}=e;return{position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:1,"button:not(:disabled)":{background:t.colors.bgColor,"& + button":{borderTopColor:t.colors.secondaryBg},"& span":{filter:(0,h.Iy)(t)?"":"invert(100%)"}}}}),"");i(79259);const _={classes:{...g,...b,...w,...y,CartoLayer:d.Z},functions:{colorBins:p.Z,colorCategories:m.Z,colorContinuous:u.Z}};(0,f.fh)([S.w,v.E]);const R=new x.Z({configuration:_});class H extends o.PureComponent{constructor(){super(...arguments),this.state={viewState:{bearing:0,pitch:0,zoom:11},initialized:!1,initialViewState:{},id:void 0,pydeckJson:void 0,isFullScreen:!1,isLightTheme:(0,h.Iy)(this.props.theme)},this.componentDidMount=()=>{this.setState({initialized:!0})},this.createTooltip=e=>{const{element:t}=this.props;if(!e||!e.object||!t.tooltip)return!1;const i=s.Z.parse(t.tooltip);return i.html?i.html=this.interpolate(e,i.html):i.text=this.interpolate(e,i.text),i},this.interpolate=(e,t)=>{const i=t.match(/{(.*?)}/g);return i&&i.forEach((i=>{const o=i.substring(1,i.length-1);e.object.hasOwnProperty(o)?t=t.replace(i,e.object[o]):e.object.hasOwnProperty("properties")&&e.object.properties.hasOwnProperty(o)&&(t=t.replace(i,e.object.properties[o]))})),t},this.onViewStateChange=e=>{let{viewState:t}=e;this.setState({viewState:t})}}static getDerivedStateFromProps(e,t){const i=H.getDeckObject(e,t);if(!a()(i.initialViewState,t.initialViewState)){const e=Object.keys(i.initialViewState).reduce(((e,o)=>i.initialViewState[o]===t.initialViewState[o]?e:{...e,[o]:i.initialViewState[o]}),{});return{viewState:{...t.viewState,...e},initialViewState:i.initialViewState}}return null}render(){const e=H.getDeckObject(this.props,this.state),{viewState:t}=this.state,{width:i}=this.props;return(0,E.jsx)(N,{className:"stDeckGlJsonChart",width:i,height:e.initialViewState.height,"data-testid":"stDeckGlJsonChart",children:(0,E.jsxs)(n.Z,{viewState:t,onViewStateChange:this.onViewStateChange,height:e.initialViewState.height,width:i,layers:this.state.initialized?e.layers:[],getTooltip:this.createTooltip,ContextProvider:l.X$.Provider,controller:!0,children:[(0,E.jsx)(l.Z3,{height:e.initialViewState.height,width:i,mapStyle:e.mapStyle&&("string"===typeof e.mapStyle?e.mapStyle:e.mapStyle[0]),mapboxApiAccessToken:this.props.element.mapboxToken||this.props.mapboxToken}),(0,E.jsx)(B,{children:(0,E.jsx)(l.Pv,{className:"zoomButton",showCompass:!1})})]})})}}H.getDeckObject=(e,t)=>{var i,o;const{element:n,width:r,height:a,theme:l,isFullScreen:c}=e,d=null!==c&&void 0!==c&&c;var p,m,u;(n.id===t.id&&t.isFullScreen===d&&t.isLightTheme===(0,h.Iy)(l)||(t.pydeckJson=s.Z.parse(n.json),t.id=n.id),null!==(i=t.pydeckJson)&&void 0!==i&&i.mapStyle||(t.pydeckJson.mapStyle="mapbox://styles/mapbox/".concat((0,h.Iy)(l)?"light":"dark","-v9")),c)?Object.assign(null===(p=t.pydeckJson)||void 0===p?void 0:p.initialViewState,{width:r,height:a}):(null!==(m=t.pydeckJson)&&void 0!==m&&null!==(u=m.initialViewState)&&void 0!==u&&u.height||(t.pydeckJson.initialViewState.height=500),n.useContainerWidth&&(t.pydeckJson.initialViewState.width=r));return t.isFullScreen=c,t.isLightTheme=(0,h.Iy)(l),null===(o=t.pydeckJson)||void 0===o||delete o.views,R.convert(t.pydeckJson)};const K=(0,c.b)(J("st.pydeck_chart")((0,k.Z)(H)))},23593:(e,t,i)=>{"use strict";i.d(t,{Z:()=>w});var o=i(66845),n=i(13005),s=i.n(n),r=i(25621),a=i(82218),l=i(97781),c=i(46927),h=i(66694),d=i(1515);const p=(0,d.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:i}=e;const o=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:i.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:i.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:i.colors.fadedText60,borderRadius:"50%",...o,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:i.colors.bodyText,transition:"none"}}}),""),m=(0,d.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:i}=e;return{"&:hover":{[p]:{opacity:1,transform:"scale(1)",transition:"none"}},...i?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var u=i(40864);class g 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("2.875rem");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:i}=this.state,{children:o,width:n,height:s,disableFullscreenMode:r}=this.props;let h=a.d,d=this.zoomIn,g="View fullscreen";return e&&(h=l.m,d=this.zoomOut,g="Exit fullscreen"),(0,u.jsxs)(m,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,u.jsx)(p,{"data-testid":"StyledFullScreenButton",onClick:d,title:g,isExpanded:e,children:(0,u.jsx)(c.Z,{content:h})}),o(e?{width:t,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=h.E;const x=(0,r.b)(g);const w=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class i extends o.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:i,height:o,disableFullscreenMode:n}=this.props;return(0,u.jsx)(x,{width:i,height:o,disableFullscreenMode:t||n,children:t=>{let{width:i,height:o,expanded:n,expand:s,collapse:r}=t;return(0,u.jsx)(e,{...this.props,width:i,height:o,isFullScreen:n,expand:s,collapse:r})}})}}}return i.displayName="withFullScreenWrapper(".concat(e.displayName||e.name,")"),s()(i,e)}},72709:()=>{},72672:()=>{}}]);