streamlit-nightly 1.38.1.dev20240910__py2.py3-none-any.whl → 1.38.1.dev20240912__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 (32) hide show
  1. streamlit/dataframe_util.py +1 -1
  2. streamlit/elements/doc_string.py +1 -9
  3. streamlit/elements/lib/policies.py +0 -5
  4. streamlit/elements/vega_charts.py +8 -3
  5. streamlit/runtime/caching/cache_utils.py +5 -1
  6. streamlit/runtime/credentials.py +2 -2
  7. streamlit/runtime/scriptrunner/magic.py +2 -20
  8. streamlit/static/asset-manifest.json +8 -8
  9. streamlit/static/index.html +1 -1
  10. streamlit/static/static/js/1086.b7ec1344.chunk.js +5 -0
  11. streamlit/static/static/js/1260.eaaa4e75.chunk.js +5 -0
  12. streamlit/static/static/js/5618.f7838309.chunk.js +5 -0
  13. streamlit/static/static/js/{5711.2f36e813.chunk.js → 5711.229cb7d0.chunk.js} +1 -1
  14. streamlit/static/static/js/7612.39e7938b.chunk.js +2 -0
  15. streamlit/static/static/js/954.88cae675.chunk.js +5 -0
  16. streamlit/static/static/js/{main.7b7fe9ac.js → main.536604a4.js} +2 -2
  17. streamlit/watcher/event_based_path_watcher.py +11 -2
  18. streamlit/watcher/folder_black_list.py +1 -0
  19. streamlit/watcher/path_watcher.py +5 -0
  20. {streamlit_nightly-1.38.1.dev20240910.dist-info → streamlit_nightly-1.38.1.dev20240912.dist-info}/METADATA +1 -1
  21. {streamlit_nightly-1.38.1.dev20240910.dist-info → streamlit_nightly-1.38.1.dev20240912.dist-info}/RECORD +27 -27
  22. streamlit/static/static/js/1086.1bb52316.chunk.js +0 -5
  23. streamlit/static/static/js/1260.4017a70f.chunk.js +0 -5
  24. streamlit/static/static/js/2266.48d2ebd0.chunk.js +0 -2
  25. streamlit/static/static/js/5618.08be9e66.chunk.js +0 -5
  26. streamlit/static/static/js/954.3cc76210.chunk.js +0 -5
  27. /streamlit/static/static/js/{2266.48d2ebd0.chunk.js.LICENSE.txt → 7612.39e7938b.chunk.js.LICENSE.txt} +0 -0
  28. /streamlit/static/static/js/{main.7b7fe9ac.js.LICENSE.txt → main.536604a4.js.LICENSE.txt} +0 -0
  29. {streamlit_nightly-1.38.1.dev20240910.data → streamlit_nightly-1.38.1.dev20240912.data}/scripts/streamlit.cmd +0 -0
  30. {streamlit_nightly-1.38.1.dev20240910.dist-info → streamlit_nightly-1.38.1.dev20240912.dist-info}/WHEEL +0 -0
  31. {streamlit_nightly-1.38.1.dev20240910.dist-info → streamlit_nightly-1.38.1.dev20240912.dist-info}/entry_points.txt +0 -0
  32. {streamlit_nightly-1.38.1.dev20240910.dist-info → streamlit_nightly-1.38.1.dev20240912.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,5 @@
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[954],{68035:(e,t,r)=>{r.d(t,{A:()=>d});r(58878);var o=r(25571),n=r(78286),i=r(89653);const l=r(60667).i7`
2
+ 50% {
3
+ color: rgba(0, 0, 0, 0);
4
+ }
5
+ `,a=(0,i.A)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:o}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:o.colors.gray,margin:"0 5px"}}:{},...r?{color:o.colors.red,animationName:`${l}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var s=r(90782);const d=e=>{let{dirty:t,value:r,inForm:i,maxLength:l,className:d,type:u="single",allowSubmitOnEnter:c=!0}=e;const p=[],m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p.push((0,s.jsx)(a,{includeDot:p.length>0,shouldBlink:t,children:e},p.length))};if(t&&c){const e=i?"submit form":"apply";if("multiline"===u){m(`Press ${(0,o.u_)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===u&&m(`Press Enter to ${e}`)}return l&&("chat"!==u||t)&&m(`${r.length}/${l}`,t&&r.length>=l),(0,s.jsx)(n.tp,{"data-testid":"InputInstructions",className:d,children:p})}},34752:(e,t,r)=>{r.d(t,{X:()=>l,o:()=>i});var o=r(58878),n=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function l(e){let{element:t,widgetMgr:r,onFormCleared:i}=e;(0,o.useEffect)((()=>{if(!(0,n._L)(t.formId))return;const e=r.addFormClearedListener(t.formId,i);return()=>{e.disconnect()}}),[t,r,i])}},10954:(e,t,r)=>{r.r(t),r.d(t,{default:()=>j});var o=r(58878),n=r(27774),i=r(94388),l=r(8151),a=r(34694),s=r(59095),d=r(32698),u=r.n(d),c=r(25571),p=r(34752),m=r(84996),h=r(29669),g=r(93480),b=r(997),f=r(64611),v=r(68035),y=r(70474),I=r(78286),w=r(89653);const x=(0,w.A)("div",{target:"e116k4er3"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}}}),""),C=(0,w.A)("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),k=(0,w.A)("button",{target:"e116k4er1"})((e=>{let{theme:t}=e;return{margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:"32px",justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}}}),""),T=(0,w.A)("div",{target:"e116k4er0"})((e=>{let{theme:t,clearable:r}=e;return{position:"absolute",marginRight:t.spacing.twoXS,left:0,right:64+(r?12:0)+"px"}}),"");var F=r(90782);const R=e=>{let{step:t,dataType:r}=e;return t||(r===h.Q7.DataType.INT?1:.01)},D=e=>{let{value:t,format:r,step:o,dataType:n}=e;if((0,c.hX)(t))return null;let i=function(e){return(0,c.hX)(e)||""===e?void 0:e}(r);if((0,c.hX)(i)&&(0,c.se)(o)){const e=o.toString();if(n===h.Q7.DataType.FLOAT&&0!==o&&e.includes(".")){i=`%0.${e.split(".")[1].length}f`}}if((0,c.hX)(i))return t.toString();try{return(0,a.sprintf)(i,t)}catch(l){return(0,m.FF)(`Error in sprintf(${i}, ${t}): ${l}`),String(t)}},j=(0,l.b)((e=>{var t;let{disabled:r,element:l,widgetMgr:a,width:d,theme:m,fragmentId:w}=e;const{dataType:j,id:L,formId:A,default:N,format:S}=l,W=l.hasMin?l.min:-1/0,E=l.hasMax?l.max:1/0,[M,B]=o.useState(R(l)),V=(e=>{var t;const r=e.element.dataType===h.Q7.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element);return null!==(t=null!==r&&void 0!==r?r:e.element.default)&&void 0!==t?t:null})({element:l,widgetMgr:a}),[X,$]=o.useState(!1),[_,U]=o.useState(V),[z,O]=o.useState(D({value:V,...l,step:M})),[Q,H]=o.useState(!1),P=o.useRef(null),G=o.useRef(new p.o),K=o.useRef(u()("number_input_")),q=((e,t,r)=>!(0,c.hX)(e)&&e-t>=r)(_,M,W),J=((e,t,r)=>!(0,c.hX)(e)&&e+t<=r)(_,M,E),Y=(0,c.Ml)({formId:A}),Z=a.allowFormSubmitOnEnter(A);o.useEffect((()=>{B(R({step:l.step,dataType:l.dataType}))}),[l.dataType,l.step]);const ee=o.useCallback((e=>{let{value:t,source:r}=e;if((0,c.se)(t)&&(W>t||t>E)){var o;null===(o=P.current)||void 0===o||o.reportValidity()}else{var n;const e=null!==(n=null!==t&&void 0!==t?t:N)&&void 0!==n?n:null;switch(j){case h.Q7.DataType.INT:a.setIntValue({id:L,formId:A},e,r,w);break;case h.Q7.DataType.FLOAT:a.setDoubleValue({id:L,formId:A},e,r,w);break;default:throw new Error("Invalid data type")}$(!1),U(e),O(D({value:e,dataType:j,format:S,step:M}))}}),[W,E,P,a,w,M,j,L,A,N,S]),te=()=>{const{value:e}=l;l.setValue=!1,U(null!==e&&void 0!==e?e:null),O(D({value:null!==e&&void 0!==e?e:null,...l,step:M})),ee({value:null!==e&&void 0!==e?e:null,source:{fromUi:!1}})};o.useEffect((()=>{const e=G.current;return l.setValue?te():ee({value:_,source:{fromUi:!1}}),()=>{e.disconnect()}}),[]),l.setValue&&te();const re=(0,c.hX)(l.default)&&!r;G.current.manageFormClearListener(a,l.formId,(()=>{var e;U(null!==(e=l.default)&&void 0!==e?e:null),ee({value:_,source:{fromUi:!0}})}));const oe=o.useCallback((()=>{J&&($(!0),ee({value:(null!==_&&void 0!==_?_:W)+M,source:{fromUi:!0}}))}),[_,W,M,J]),ne=o.useCallback((()=>{q&&($(!0),ee({value:(null!==_&&void 0!==_?_:E)-M,source:{fromUi:!0}}))}),[_,E,M,q]),ie=o.useCallback((e=>{const{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),oe();break;case"ArrowDown":e.preventDefault(),ne()}}),[oe,ne]),le=o.useCallback((e=>{"Enter"===e.key&&(X&&ee({value:_,source:{fromUi:!0}}),Z&&a.submitForm(A,w))}),[X,_,ee,a,A,w,Z]);return(0,F.jsxs)("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:d},children:[(0,F.jsx)(y.L,{label:l.label,disabled:r,labelVisibility:(0,c.yv)(null===(t=l.labelVisibility)||void 0===t?void 0:t.value),htmlFor:K.current,children:l.help&&(0,F.jsx)(I.j,{children:(0,F.jsx)(g.A,{content:l.help,placement:b.W.TOP_RIGHT})})}),(0,F.jsxs)(x,{className:Q?"focused":"","data-testid":"stNumberInputContainer",children:[(0,F.jsx)(s.A,{type:"number",inputRef:P,value:null!==z&&void 0!==z?z:"",placeholder:l.placeholder,onBlur:()=>(X&&ee({value:_,source:{fromUi:!0}}),void H(!1)),onFocus:()=>{H(!0)},onChange:e=>(e=>{const{value:t}=e.target;if(""===t)$(!0),U(null),O(null);else{let e;e=l.dataType===h.Q7.DataType.INT?parseInt(t,10):parseFloat(t),$(!0),U(e),O(t)}})(e),onKeyPress:e=>le(e),onKeyDown:e=>ie(e),clearable:re,clearOnEscape:re,disabled:r,"aria-label":l.label,id:K.current,overrides:{ClearIcon:{props:{overrides:{Svg:{style:{color:m.colors.darkGray,transform:"scale(1.4)",width:m.spacing.twoXL,marginRight:"-1.25em",":hover":{fill:m.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:M,min:W,max:E},style:{lineHeight:m.lineHeights.inputWidget,paddingRight:m.spacing.sm,paddingLeft:m.spacing.sm,paddingBottom:m.spacing.sm,paddingTop:m.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),d>m.breakpoints.hideNumberInputControls&&(0,F.jsxs)(C,{children:[(0,F.jsx)(k,{"data-testid":"stNumberInputStepDown",onClick:ne,disabled:!q||r,tabIndex:-1,children:(0,F.jsx)(f.A,{content:n.H,size:"xs",color:q?"inherit":"disabled"})}),(0,F.jsx)(k,{"data-testid":"stNumberInputStepUp",onClick:oe,disabled:!J||r,tabIndex:-1,children:(0,F.jsx)(f.A,{content:i.F,size:"xs",color:J?"inherit":"disabled"})})]})]}),d>m.breakpoints.hideWidgetDetails&&(0,F.jsx)(T,{clearable:re,children:(0,F.jsx)(v.A,{dirty:X,value:null!==z&&void 0!==z?z:"",inForm:Y,allowSubmitOnEnter:Z||!Y})})]})}))}}]);