streamlit-nightly 1.34.1.dev20240505__py2.py3-none-any.whl → 1.34.1.dev20240507__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/__init__.py +1 -0
- streamlit/commands/logo.py +107 -0
- streamlit/components/v1/component_registry.py +8 -3
- streamlit/proto/ForwardMsg_pb2.py +10 -9
- streamlit/proto/ForwardMsg_pb2.pyi +9 -3
- streamlit/proto/Logo_pb2.py +26 -0
- streamlit/proto/Logo_pb2.pyi +51 -0
- streamlit/runtime/app_session.py +2 -6
- streamlit/runtime/forward_msg_queue.py +23 -3
- streamlit/runtime/runtime.py +0 -2
- streamlit/runtime/state/query_params.py +4 -2
- streamlit/runtime/state/query_params_proxy.py +11 -5
- streamlit/runtime/state/session_state_proxy.py +11 -3
- streamlit/runtime/websocket_session_manager.py +0 -2
- streamlit/static/asset-manifest.json +23 -23
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/1168.7452e363.chunk.js +1 -0
- streamlit/static/static/js/1307.0f0cca93.chunk.js +1 -0
- streamlit/static/static/js/1792.8bd6ce2a.chunk.js +1 -0
- streamlit/static/static/js/1955.426e67ca.chunk.js +2 -0
- streamlit/static/static/js/2178.90362aae.chunk.js +1 -0
- streamlit/static/static/js/{2469.3e9c3ce9.chunk.js → 2469.09ea79bb.chunk.js} +1 -1
- streamlit/static/static/js/{7217.d970c074.chunk.js → 2736.4336e2b9.chunk.js} +1 -1
- streamlit/static/static/js/3092.21bb8f7b.chunk.js +1 -0
- streamlit/static/static/js/329.464ed8ec.chunk.js +2 -0
- streamlit/static/static/js/3513.ebc278c4.chunk.js +1 -0
- streamlit/static/static/js/4113.9b2db2e3.chunk.js +1 -0
- streamlit/static/static/js/{4477.e10e4373.chunk.js → 4477.1bd49702.chunk.js} +1 -1
- streamlit/static/static/js/5249.f2f4070d.chunk.js +1 -0
- streamlit/static/static/js/5441.5bacdeda.chunk.js +1 -0
- streamlit/static/static/js/6853.93dd1c4c.chunk.js +1 -0
- streamlit/static/static/js/{7323.2808d029.chunk.js → 7323.b74cc85b.chunk.js} +2 -2
- streamlit/static/static/js/7805.acc6316a.chunk.js +1 -0
- streamlit/static/static/js/8427.bd0a7cf3.chunk.js +1 -0
- streamlit/static/static/js/8477.de889fe5.chunk.js +1 -0
- streamlit/static/static/js/{8492.3e609489.chunk.js → 8492.0d93bd08.chunk.js} +1 -1
- streamlit/static/static/js/8536.f8de3d9a.chunk.js +1 -0
- streamlit/static/static/js/main.b84b6de2.js +2 -0
- {streamlit_nightly-1.34.1.dev20240505.dist-info → streamlit_nightly-1.34.1.dev20240507.dist-info}/METADATA +2 -2
- {streamlit_nightly-1.34.1.dev20240505.dist-info → streamlit_nightly-1.34.1.dev20240507.dist-info}/RECORD +48 -45
- streamlit/static/static/js/1168.fc5c673b.chunk.js +0 -1
- streamlit/static/static/js/1307.8ea033f1.chunk.js +0 -1
- streamlit/static/static/js/1792.b8efa879.chunk.js +0 -1
- streamlit/static/static/js/2736.914069e5.chunk.js +0 -2
- streamlit/static/static/js/3061.67758376.chunk.js +0 -1
- streamlit/static/static/js/3092.bc07c48b.chunk.js +0 -1
- streamlit/static/static/js/3513.e3e7300a.chunk.js +0 -1
- streamlit/static/static/js/4113.1e7eff4d.chunk.js +0 -1
- streamlit/static/static/js/4253.749d5244.chunk.js +0 -2
- streamlit/static/static/js/5441.71804c26.chunk.js +0 -1
- streamlit/static/static/js/6150.427a30f5.chunk.js +0 -1
- streamlit/static/static/js/6853.3cbd385e.chunk.js +0 -1
- streamlit/static/static/js/7805.51638fbc.chunk.js +0 -1
- streamlit/static/static/js/8427.65ddaf36.chunk.js +0 -1
- streamlit/static/static/js/8477.7419a0aa.chunk.js +0 -1
- streamlit/static/static/js/8536.f13dff49.chunk.js +0 -1
- streamlit/static/static/js/main.3b0201f6.js +0 -2
- /streamlit/static/static/js/{4253.749d5244.chunk.js.LICENSE.txt → 1955.426e67ca.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{2736.914069e5.chunk.js.LICENSE.txt → 329.464ed8ec.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{7323.2808d029.chunk.js.LICENSE.txt → 7323.b74cc85b.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{main.3b0201f6.js.LICENSE.txt → main.b84b6de2.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.34.1.dev20240505.data → streamlit_nightly-1.34.1.dev20240507.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.34.1.dev20240505.dist-info → streamlit_nightly-1.34.1.dev20240507.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.34.1.dev20240505.dist-info → streamlit_nightly-1.34.1.dev20240507.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.34.1.dev20240505.dist-info → streamlit_nightly-1.34.1.dev20240507.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[5441],{5441:(e,t,o)=>{o.r(t),o.d(t,{default:()=>W});var n=o(66845),i=o(25621),s=o(72965),a=o(94206),r=o(60784),l=o(23849),d=o(23593),c=o(63765),h=o(91191);const u={DATAFRAME_INDEX:"(index)"},m=new Set([h.GI.DatetimeIndex,h.GI.Float64Index,h.GI.Int64Index,h.GI.RangeIndex,h.GI.UInt64Index]);function g(e){var t;if(0===(null===(t=e.datasets)||void 0===t?void 0:t.length))return null;const o={};return e.datasets.forEach((e=>{if(!e)return;const t=e.hasName?e.name:null;o[t]=e.data})),o}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e.isEmpty())return[];const o=[],{dataRows:n,dataColumns:i}=e.dimensions,s=h.fu.getTypeName(e.types.index[0]),a=m.has(s);for(let r=t;r<n;r++){const t={};if(a){const o=e.getIndexValue(r,0);t[u.DATAFRAME_INDEX]="bigint"===typeof o?Number(o):o}for(let o=0;o<i;o++){const n=e.getDataValue(r,o),i=e.types.data[o],s=h.fu.getTypeName(i);if("datetimetz"!==s&&(n instanceof Date||Number.isFinite(n))&&(s.startsWith("datetime")||"date"===s)){const i=60*new Date(n).getTimezoneOffset()*1e3;t[e.columns[0][o]]=n.valueOf()+i}else t[e.columns[0][o]]="bigint"===typeof n?Number(n):n}o.push(t)}return o}var f=o(96825),b=o.n(f),w=o(99394),y=o.n(w),x=o(27466);function v(e,t){const o={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:t.fontSizes.smPx+2,orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.mdPx,titleColor:(0,x.Xy)(t),titleFontStyle:"normal",labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,x.Xy)(t),labelFontStyle:"normal"},axis:{labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,x.Xy)(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.smPx,titleColor:(0,x.Xy)(t),titleFontStyle:"normal",ticks:!1,gridColor:(0,x.ny)(t),domain:!1,domainWidth:1,domainColor:(0,x.ny)(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:t.spacing.lgPx,labelPadding:t.spacing.lgPx,labelSeparation:t.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:t.fontSizes.smPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,x.Xy)(t),titleFontSize:t.fontSizes.smPx,titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,x.Xy)(t),titlePadding:5,labelPadding:t.spacing.lgPx,columnPadding:t.spacing.smPx,rowPadding:t.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,x.iY)(t),diverging:(0,x.ru)(t),ramp:(0,x.Gy)(t),heatmap:(0,x.Gy)(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400,discreteHeight:350,discreteWidth:{step:20}},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,...(0,x.Iy)(t)?{color:"#0068C9"}:{color:"#83C9FF"}},bar:{binSpacing:t.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?y()({},o,e,((e,t)=>Array.isArray(t)?t:void 0)):o}const S=(0,o(1515).Z)("div",{target:"egd2k5h0"})((e=>{let{theme:t,useContainerWidth:o,isFullScreen:n}=e;return{width:o||n?"100%":"auto",height:n?"100%":"auto","&.vega-embed":{"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&.has-actions":{paddingRight:0},".vega-actions":{zIndex:t.zIndices.popupMenu,backgroundColor:t.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:"1px solid ".concat(t.colors.fadedText10),a:{fontFamily:t.genericFonts.bodyFont,fontWeight:t.fontWeights.normal,fontSize:t.fontSizes.md,margin:0,padding:"".concat(t.spacing.twoXS," ").concat(t.spacing.twoXL),color:t.colors.bodyText},"a:hover":{backgroundColor:t.colors.secondaryBg,color:t.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},summary:{opacity:0,height:"auto",zIndex:t.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:t.radii.lg,color:t.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms","&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:t.colors.bodyText,opacity:"1 !important",background:t.colors.darkenedBgMix25}}}}}),"");var F=o(40864);const z="source";class C extends n.PureComponent{constructor(){super(...arguments),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=z,this.element=null,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var e,t;const{element:o,theme:n,isFullScreen:i,width:s,height:a}=this.props,r=JSON.parse(o.spec),{useContainerWidth:l}=o;if("streamlit"===o.vegaLiteTheme?r.config=v(r.config,n):"streamlit"===(null===(e=r.usermeta)||void 0===e||null===(t=e.embedOptions)||void 0===t?void 0:t.theme)?(r.config=v(r.config,n),r.usermeta.embedOptions.theme=void 0):r.config=function(e,t){const{colors:o,fontSizes:n,genericFonts:i}=t,s={labelFont:i.bodyFont,titleFont:i.bodyFont,labelFontSize:n.twoSmPx,titleFontSize:n.twoSmPx},a={background:o.bgColor,axis:{labelColor:o.bodyText,titleColor:o.bodyText,gridColor:(0,x.ny)(t),...s},legend:{labelColor:o.bodyText,titleColor:o.bodyText,...s},title:{color:o.bodyText,subtitleColor:o.bodyText,...s},header:{labelColor:o.bodyText,titleColor:o.bodyText,...s},view:{stroke:(0,x.ny)(t),continuousHeight:350,continuousWidth:400,discreteHeight:350,discreteWidth:{step:20}},mark:{tooltip:!0}};return e?b()({},a,e):a}(r.config,n),i?(r.width=s,r.height=a,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))):l&&(r.width=s,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))),r.padding||(r.padding={}),null==r.padding.bottom&&(r.padding.bottom=20),r.datasets)throw new Error("Datasets should not be passed as part of the spec");return r}}async componentDidMount(){try{await this.createView()}catch(e){const t=(0,c.b)(e);this.setState({error:t})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(e){const{element:t,theme:o}=e,{element:n,theme:i}=this.props,s=t.spec,{spec:a}=n;if(!this.vegaView||s!==a||o!==i||e.width!==this.props.width||e.height!==this.props.height||e.element.vegaLiteTheme!==this.props.element.vegaLiteTheme){(0,l.ji)("Vega spec changed.");try{await this.createView()}catch(m){const e=(0,c.b)(m);this.setState({error:e})}return}const r=t.data,{data:d}=n;(r||d)&&this.updateData(this.defaultDataName,r,d);const h=g(t)||{},u=g(n)||{};for(const[l,c]of Object.entries(u)){const e=l||this.defaultDataName,t=h[e];this.updateData(e,t,c)}for(const l of Object.keys(h))u.hasOwnProperty(l)||l===this.defaultDataName||this.updateData(l,null,null);this.vegaView.resize().runAsync()}updateData(e,t,o){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!o||0===o.data.numRows){return void(this.vegaView._runtime.data.hasOwnProperty(e)&&this.vegaView.remove(e,a.truthy))}if(!t||0===t.data.numRows)return void this.vegaView.insert(e,p(o));const{dataRows:n,dataColumns:i}=t.dimensions,{dataRows:s,dataColumns:r}=o.dimensions;if(function(e,t,o,n,i,s){if(o!==s)return!1;if(t>=i)return!1;if(0===t)return!1;const a=s-1,r=t-1;return e.getDataValue(0,a)===n.getDataValue(0,a)&&e.getDataValue(r,a)===n.getDataValue(r,a)}(t,n,i,o,s,r))n<s&&this.vegaView.insert(e,p(o,n));else{const t=a.changeset().remove(a.truthy).insert(p(o));this.vegaView.change(e,t),(0,l.ji)("Had to clear the ".concat(e," dataset before inserting data through Vega view."))}}async createView(){if((0,l.ji)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const e=this.props.element,t=this.generateSpec(),o={ast:!0,expr:r.N,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:n,view:i,finalize:a}=await(0,s.ZP)(this.element,t,o);this.vegaView=i,this.vegaFinalizer=a;const d=function(e){const t=g(e);if(null==t)return null;const o={};for(const[n,i]of Object.entries(t))o[n]=p(i);return o}(e),c=d?Object.keys(d):[];if(1===c.length){const[e]=c;this.defaultDataName=e}else 0===c.length&&n.data&&(this.defaultDataName=z);const h=function(e){const t=e.data;return t&&0!==t.data.numRows?p(t):null}(e);if(h&&i.insert(this.defaultDataName,h),d)for(const[s,r]of Object.entries(d))i.insert(s,r);await i.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,F.jsx)(S,{"data-testid":"stArrowVegaLiteChart",useContainerWidth:this.props.element.useContainerWidth,isFullScreen:this.props.isFullScreen,ref:e=>{this.element=e}})}}const W=(0,i.b)((0,d.Z)(C))},23593:(e,t,o)=>{o.d(t,{Z:()=>b});var n=o(66845),i=o(13005),s=o.n(i),a=o(25621),r=o(82218),l=o(97781),d=o(46927),c=o(66694),h=o(1515);const u=(0,h.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:o}=e;const n=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:o.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:o.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:o.colors.fadedText60,borderRadius:"50%",...n,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:o.colors.bodyText,transition:"none"}}}),""),m=(0,h.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:o}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...o?{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 g=o(40864);class p extends n.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:o}=this.state,{children:n,width:i,height:s,disableFullscreenMode:a}=this.props;let c=r.d,h=this.zoomIn,p="View fullscreen";return e&&(c=l.m,h=this.zoomOut,p="Exit fullscreen"),(0,g.jsxs)(m,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!a&&(0,g.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:h,title:p,isExpanded:e,children:(0,g.jsx)(d.Z,{content:c})}),n(e?{width:t,height:o,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:i,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}p.contextType=c.E;const f=(0,a.b)(p);const b=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class o extends n.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:o,height:n,disableFullscreenMode:i}=this.props;return(0,g.jsx)(f,{width:o,height:n,disableFullscreenMode:t||i,children:t=>{let{width:o,height:n,expanded:i,expand:s,collapse:a}=t;return(0,g.jsx)(e,{...this.props,width:o,height:n,isFullScreen:i,expand:s,collapse:a})}})}}}return o.displayName="withFullScreenWrapper(".concat(e.displayName||e.name,")"),s()(o,e)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[6853],{76853:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var n=r(66845),o=r(23175),s=r.n(o),a=r(27466),i=r(63730),l=r(66694),c=r(1515),d=r(63637),h=r(60484);const p=(0,c.Z)(d.Q,{shouldForwardProp:h.Z,target:"e1se5lgy2"})((e=>{let{theme:t,usingCustomTheme:r}=e;return{fontSize:t.fontSizes.sm,width:"1.375rem",height:"1.375rem",borderWidth:"3px",radius:"4px",justifyContents:"center",padding:t.spacing.none,margin:t.spacing.none,borderColor:t.colors.fadedText10,borderTopColor:r?t.colors.primary:t.colors.blue70,flexGrow:0,flexShrink:0}}),""),m=(0,c.Z)("div",{target:"e1se5lgy1"})((e=>{let{theme:t,width:r,cache:n}=e;return{width:r,...n?{paddingBottom:"1rem",background:"linear-gradient(to bottom, ".concat(t.colors.bgColor," 0%, ").concat(t.colors.bgColor," 80%, transparent 100%)")}:null}}),""),u=(0,c.Z)("div",{target:"e1se5lgy0"})((e=>{let{theme:t}=e;return{display:"flex",gap:t.spacing.sm,alignItems:"center",width:"100%"}}),"");var g=r(40864);const x=function(e){let{width:t,element:r}=e;const{activeTheme:o}=n.useContext(l.E),c=!(0,a.MJ)(o),{cache:d}=r;return(0,g.jsx)(m,{className:s()({stSpinner:!0,cacheSpinner:d}),"data-testid":"stSpinner",width:t,cache:d,children:(0,g.jsxs)(u,{children:[(0,g.jsx)(p,{usingCustomTheme:c}),(0,g.jsx)(i.ZP,{source:r.text,allowHTML:!1})]})})}}}]);
|