streamlit-nightly 1.41.2.dev20250108__py2.py3-none-any.whl → 1.41.2.dev20250110__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 (104) hide show
  1. streamlit/config.py +3 -2
  2. streamlit/config_option.py +9 -18
  3. streamlit/dataframe_util.py +2 -2
  4. streamlit/delta_generator.py +6 -2
  5. streamlit/elements/exception.py +7 -9
  6. streamlit/elements/widgets/button_group.py +5 -3
  7. streamlit/elements/widgets/data_editor.py +4 -1
  8. streamlit/emojis.py +1 -1
  9. streamlit/proto/ForwardMsg_pb2.py +3 -1
  10. streamlit/proto/ForwardMsg_pb2.pyi +23 -0
  11. streamlit/runtime/app_session.py +23 -3
  12. streamlit/runtime/caching/cache_data_api.py +2 -2
  13. streamlit/runtime/caching/cache_utils.py +4 -3
  14. streamlit/runtime/caching/storage/local_disk_cache_storage.py +4 -4
  15. streamlit/runtime/credentials.py +4 -4
  16. streamlit/runtime/forward_msg_cache.py +3 -1
  17. streamlit/runtime/forward_msg_queue.py +32 -4
  18. streamlit/runtime/fragment.py +1 -1
  19. streamlit/runtime/pages_manager.py +3 -1
  20. streamlit/runtime/scriptrunner/exec_code.py +33 -0
  21. streamlit/runtime/scriptrunner/script_runner.py +5 -3
  22. streamlit/runtime/scriptrunner_utils/script_requests.py +1 -0
  23. streamlit/static/index.html +1 -1
  24. streamlit/static/static/js/{FileDownload.esm.CXWFIN7B.js → FileDownload.esm.DgMBFvxE.js} +1 -1
  25. streamlit/static/static/js/{FormClearHelper.dauERNYc.js → FormClearHelper.C-kz8EZa.js} +1 -1
  26. streamlit/static/static/js/{Hooks.CqBCxxzg.js → Hooks.BaEjlpBt.js} +1 -1
  27. streamlit/static/static/js/{InputInstructions.Dm8zppD9.js → InputInstructions.2kJ3lLP5.js} +1 -1
  28. streamlit/static/static/js/{ProgressBar.CQTs8xxT.js → ProgressBar.BmX5Bd8z.js} +2 -2
  29. streamlit/static/static/js/{RenderInPortalIfExists.BIVWPcSk.js → RenderInPortalIfExists.DvbHx6rz.js} +1 -1
  30. streamlit/static/static/js/{Toolbar.D_9Mp69H.js → Toolbar.Cs7p2Lp9.js} +1 -1
  31. streamlit/static/static/js/{base-input.JrivAGt5.js → base-input.CmWUWSJc.js} +4 -4
  32. streamlit/static/static/js/{createSuper.BLkfEjg8.js → createSuper.D46anxnG.js} +1 -1
  33. streamlit/static/static/js/{data-grid-overlay-editor.4d_NBoKr.js → data-grid-overlay-editor.BspRPTtu.js} +1 -1
  34. streamlit/static/static/js/{downloader.i394ggfM.js → downloader.BX0QN5eD.js} +1 -1
  35. streamlit/static/static/js/{es6.BPf5kpFH.js → es6.BlW--gnF.js} +2 -2
  36. streamlit/static/static/js/{getPrototypeOf.DcAVjrh9.js → getPrototypeOf.BYTPPQIp.js} +1 -1
  37. streamlit/static/static/js/{iframeResizer.contentWindow.YDN8GVx9.js → iframeResizer.contentWindow.CNHQyyTg.js} +1 -1
  38. streamlit/static/static/js/{index.DxsOgtLc.js → index.-JIbeXZC.js} +11 -11
  39. streamlit/static/static/js/{index.Bj7LBigw.js → index.2kexLuIU.js} +62 -62
  40. streamlit/static/static/js/{index.D1qR2sOA.js → index.5f81IBZP.js} +1 -1
  41. streamlit/static/static/js/{index.HktO7F0v.js → index.7441r-sL.js} +1 -1
  42. streamlit/static/static/js/index.AzFWl1A_.js +3 -0
  43. streamlit/static/static/js/{index.Df7nX4KF.js → index.B1RTO67W.js} +1 -1
  44. streamlit/static/static/js/{index.CSmBE6cg.js → index.B2lUWG_g.js} +1 -1
  45. streamlit/static/static/js/{index.g_BxiUns.js → index.B3F-o9ex.js} +1 -1
  46. streamlit/static/static/js/{index.DgOwxLz5.js → index.BBK0SZBc.js} +3 -3
  47. streamlit/static/static/js/{index.DsKBnIk-.js → index.BBQgDj4i.js} +16 -16
  48. streamlit/static/static/js/{index.SKaK1lYU.js → index.BHVs7_wn.js} +1 -1
  49. streamlit/static/static/js/{index.kc3Ycvjj.js → index.BRwmGBP4.js} +10 -10
  50. streamlit/static/static/js/{index.Dz6VQ3qN.js → index.BSabhp-S.js} +2 -2
  51. streamlit/static/static/js/{index.YfuWGKrN.js → index.BX4DPcrq.js} +1 -1
  52. streamlit/static/static/js/{index.DyNkf5tM.js → index.BhQrqdv2.js} +1 -1
  53. streamlit/static/static/js/index.BhRQ3Irc.js +1 -0
  54. streamlit/static/static/js/index.BqCCfwZM.js +1 -0
  55. streamlit/static/static/js/{index.BidgRpd5.js → index.BtaWfSZN.js} +1 -1
  56. streamlit/static/static/js/{index.D7EG5vd0.js → index.BwvnBWfd.js} +2 -2
  57. streamlit/static/static/js/{index.PriAkdhw.js → index.CAmkSLgk.js} +1 -1
  58. streamlit/static/static/js/{index.BB2p9KgS.js → index.CKhEFCMB.js} +1 -1
  59. streamlit/static/static/js/index.CdjxQOw-.js +1 -0
  60. streamlit/static/static/js/index.ClU6Toj3.js +1 -0
  61. streamlit/static/static/js/{index.C-TBipT2.js → index.D4cEoG-b.js} +3 -3
  62. streamlit/static/static/js/{index.D_bHPQ8s.js → index.D7zDVCSD.js} +1 -1
  63. streamlit/static/static/js/{index.DWU1GWqY.js → index.D8V0ZERG.js} +1 -1
  64. streamlit/static/static/js/{index.CgkfCbvP.js → index.DAlH7XAu.js} +1 -1
  65. streamlit/static/static/js/index.DGXjFinj.js +1 -0
  66. streamlit/static/static/js/{index.B3dyGG7q.js → index.DKFY5Ha1.js} +3 -3
  67. streamlit/static/static/js/{index.D1CJOG3s.js → index.DRm6hoq7.js} +1 -1
  68. streamlit/static/static/js/index.DhCGDinQ.js +2 -0
  69. streamlit/static/static/js/index.Drqk1Tqs.js +1 -0
  70. streamlit/static/static/js/{index.CMAjN-j5.js → index.DuEIfrbC.js} +1 -1
  71. streamlit/static/static/js/{index.B6GM885g.js → index.a4u3c2yA.js} +1 -1
  72. streamlit/static/static/js/{index.DE-FOSSU.js → index.d1dU1FHw.js} +1 -1
  73. streamlit/static/static/js/{index.B_o9A-oO.js → index.tQ3BfkaX.js} +1 -1
  74. streamlit/static/static/js/{index.DmHQeMtj.js → index.y-VLJ65m.js} +1 -1
  75. streamlit/static/static/js/{input.CqdNsSbL.js → input.C7wSNGte.js} +2 -2
  76. streamlit/static/static/js/{memory.Bkvk-eRa.js → memory.BF0Xc-rJ.js} +1 -1
  77. streamlit/static/static/js/{mergeWith.DtsbyD6H.js → mergeWith.CHIovAKI.js} +1 -1
  78. streamlit/static/static/js/{number-overlay-editor.CR4D4kK1.js → number-overlay-editor.DfAWep9y.js} +1 -1
  79. streamlit/static/static/js/{sandbox.C5M8yw5Z.js → sandbox.CM0H2h0v.js} +1 -1
  80. streamlit/static/static/js/{slicedToArray.BL5-s74J.js → slicedToArray.BOBOh4VJ.js} +1 -1
  81. streamlit/static/static/js/{textarea.DrGlWUDC.js → textarea.CINkGDSQ.js} +2 -2
  82. streamlit/static/static/js/{timepicker.Bdf2lGHx.js → timepicker.eZuQgQCF.js} +1 -1
  83. streamlit/static/static/js/{uniqueId.LGvQ35eR.js → uniqueId.vdNgUDff.js} +1 -1
  84. streamlit/static/static/js/{useBasicWidgetState.TTzKcGCs.js → useBasicWidgetState.De0NYf9Y.js} +1 -1
  85. streamlit/static/static/js/{useOnInputChange.ChvkrwHU.js → useOnInputChange.cRNtiNHf.js} +1 -1
  86. streamlit/static/static/js/{withFullScreenWrapper.ChQqb1TZ.js → withFullScreenWrapper.D4HXFzaF.js} +1 -1
  87. streamlit/watcher/local_sources_watcher.py +4 -2
  88. streamlit/web/server/browser_websocket_handler.py +1 -1
  89. {streamlit_nightly-1.41.2.dev20250108.dist-info → streamlit_nightly-1.41.2.dev20250110.dist-info}/METADATA +1 -1
  90. {streamlit_nightly-1.41.2.dev20250108.dist-info → streamlit_nightly-1.41.2.dev20250110.dist-info}/RECORD +94 -96
  91. streamlit/static/static/js/index.57g5CAPC.js +0 -1
  92. streamlit/static/static/js/index.BOBIcAmK.js +0 -1
  93. streamlit/static/static/js/index.BfABFd7-.js +0 -3
  94. streamlit/static/static/js/index.C4muCvfN.js +0 -1
  95. streamlit/static/static/js/index.CAZAG6f3.js +0 -2
  96. streamlit/static/static/js/index.CJlBME-_.js +0 -1
  97. streamlit/static/static/js/index.DalTq5GL.js +0 -1
  98. streamlit/static/static/js/index.V5OLP0n7.js +0 -1
  99. streamlit/vendor/ipython/__init__.py +0 -0
  100. streamlit/vendor/ipython/modified_sys_path.py +0 -67
  101. {streamlit_nightly-1.41.2.dev20250108.data → streamlit_nightly-1.41.2.dev20250110.data}/scripts/streamlit.cmd +0 -0
  102. {streamlit_nightly-1.41.2.dev20250108.dist-info → streamlit_nightly-1.41.2.dev20250110.dist-info}/WHEEL +0 -0
  103. {streamlit_nightly-1.41.2.dev20250108.dist-info → streamlit_nightly-1.41.2.dev20250110.dist-info}/entry_points.txt +0 -0
  104. {streamlit_nightly-1.41.2.dev20250108.dist-info → streamlit_nightly-1.41.2.dev20250110.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- import{R as B,al as h,aU as i,j as e,aV as p,ba as w,aT as b,aW as D}from"./index.kc3Ycvjj.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=B.useContext(h);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},m=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(p,{help:t.help,children:e(w,{kind:o,size:b.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?m:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};
@@ -1,2 +0,0 @@
1
- import{bg as Z,bh as J,r as f,bi as Q,a0 as ee,bj as s,j as b,am as F,bc as te,bk as re,bl as ne,bd as oe,aY as ie,be as ae,ba as ue,aU as B,aT as W,aA as le,ag as ce,F as se}from"./index.kc3Ycvjj.js";import{a as fe}from"./useBasicWidgetState.TTzKcGCs.js";import"./FormClearHelper.dauERNYc.js";var pe={primary:"primary",secondary:"secondary",tertiary:"tertiary"},G={default:"default",pill:"pill",round:"round",circle:"circle",square:"square"},de={mini:"mini",default:"default",compact:"compact",large:"large"},C=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function D(e){"@babel/helpers - typeof";return D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(e)}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function me(e,t){return ve(e)||ge(e,t)||he(e,t)||be()}function be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function he(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ge(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,p;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,p=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw p}}return n}}function ve(e){if(Array.isArray(e))return e}function Se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _e(e,t,r){return t&&Oe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$(e,t)}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(e,t)}function we(e){var t=Re();return function(){var n=k(e),o;if(t){var i=k(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Le(this,o)}}function Le(e,t){if(t&&(D(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Re(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pe(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var H=function(e){Ee(r,e);var t=we(r);function r(){var n;Se(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),N(K(n),"childRefs",{}),n}return _e(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,p=a===void 0?{}:a,c=i.mode,P=c===void 0?C.checkbox:c,d=i.children,y=i.selected,h=i.disabled,l=i.onClick,E=i.kind,g=i.shape,w=i.size,A=J(p.Root,z),O=me(A,2),_=O[0],L=O[1],q=this.props["aria-label"]||this.props.ariaLabel,v=P===C.radio,V=f.Children.count(d);return f.createElement(Q.Consumer,null,function(Y){return f.createElement(_,M({"aria-label":q||Y.buttongroup.ariaLabel,"data-baseweb":"button-group",role:v?"radiogroup":"group",$shape:g,$length:d.length},L),f.Children.map(d,function(m,R){if(!f.isValidElement(m))return null;var I=m.props.isSelected?m.props.isSelected:Pe(y,R);return v&&(o.childRefs[R]=f.createRef()),f.cloneElement(m,{disabled:h||m.props.disabled,isSelected:I,ref:v?o.childRefs[R]:void 0,tabIndex:!v||I||v&&(!y||y===-1)&&R===0?0:-1,onKeyDown:function(u){if(v){var S=Number(y)?Number(y):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var T=S-1<0?V-1:S-1;l&&l(u,T),o.childRefs[T].current&&o.childRefs[T].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var j=S+1>V-1?0:S+1;l&&l(u,j),o.childRefs[j].current&&o.childRefs[j].current.focus()}}},kind:E,onClick:function(u){h||(m.props.onClick&&m.props.onClick(u),l&&l(u,R))},shape:g,size:w,overrides:ye({BaseButton:{style:function(u){var S=u.$theme;return d.length===1?{}:g!==G.default?{marginLeft:S.sizing.scale100,marginRight:S.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":I,role:v?"radio":"checkbox"}}},m.props.overrides)})}))})}}]),r}(f.Component);N(H,"defaultProps",{disabled:!1,onClick:function(){},shape:G.default,size:de.default,kind:pe.secondary});function Ce(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function ke(e,t,r){return e==s.ClickMode.MULTI_SELECT?Ce(t,r??[]):r!=null&&r.includes(t)?[]:[t]}function Ae(e){return e.length===0?-1:e[0]}function Ie(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Te(e,t,r){const n=r===s.Style.PILLS?B.PILLS:r===s.Style.BORDERLESS?B.BORDERLESS_ICON:B.SEGMENTED_CONTROL,o=r===s.Style.BORDERLESS?W.XSMALL:W.MEDIUM,i=r===s.Style.BORDERLESS?"lg":"base";return{element:F(se,{children:[t&&b(le,{size:i,iconValue:t}),e&&b(ce,{source:e,allowHTML:!1})]}),kind:n,size:o}}function je(e,t,r,n){return r.indexOf(n)>-1?!0:t!==s.ClickMode.SINGLE_SELECT||e!==s.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Be(e,t){return e&&(t=`${t}Active`),t}function De(e,t){const r={flexWrap:"wrap",maxWidth:"fit-content"};switch(e){case s.Style.BORDERLESS:return{...r,columnGap:t.threeXS,rowGap:t.threeXS};case s.Style.PILLS:return{...r,columnGap:t.twoXS,rowGap:t.twoXS};case s.Style.SEGMENTED_CONTROL:return{...r,columnGap:t.none,rowGap:t.twoXS,"::after":{content:"''",flex:1e4}};default:return r}}function Me(e,t,r,n,o,i){const a=je(r,n,o,t);let p=e.content,c=e.contentIcon;return a&&(p=e.selectedContent?e.selectedContent:p,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(d,y){const{element:h,kind:l,size:E}=Te(p??"",c??void 0,i),g=Be(!!(a&&!e.selectedContent&&!e.selectedContentIcon),l);return b(ue,{...d,size:E,kind:g,children:h})})}function $e(e,t){return e.getIntArrayValue(t)}function Ge(e){return e.default??null}function ze(e){return e.value??null}function Ne(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o}=e,{clickMode:i,options:a,selectionVisualization:p,style:c,label:P,labelVisibility:d,help:y}=r,h=ee(),[l,E]=fe({getStateFromWidgetMgr:$e,getDefaultStateFromProto:Ge,getCurrStateFromProto:ze,updateWidgetMgrState:Ie,element:r,widgetMgr:o,fragmentId:n}),g=(O,_)=>{const L=ke(i,_,l);E({value:L,fromUi:!0})};let w;i===s.ClickMode.SINGLE_SELECT?w=C.radio:i===s.ClickMode.MULTI_SELECT&&(w=C.checkbox);const A=f.useMemo(()=>a.map((O,_)=>{const L=Me(O,_,p,i,l,c);return b(L,{},`${O.content}-${_}`)}),[i,a,p,c,l]);return F("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[b(ae,{label:P,disabled:t,labelVisibility:te((d==null?void 0:d.value)??re.LabelVisibilityOptions.COLLAPSED),children:y&&b(ne,{children:b(oe,{content:y,placement:ie.TOP})})}),b(H,{disabled:t,mode:w,onClick:g,selected:i===s.ClickMode.MULTI_SELECT?l:Ae(l),overrides:{Root:{style:f.useCallback(()=>De(c,h.spacing),[c,h.spacing])}},children:A})]})}const xe=f.memo(Ne);export{xe as default};
@@ -1 +0,0 @@
1
- import{r as s,A as d,j as S,bc as x,bP as U}from"./index.kc3Ycvjj.js";import{a as V}from"./useBasicWidgetState.TTzKcGCs.js";import"./FormClearHelper.dauERNYc.js";const v=(t,e)=>t.getIntValue(e),P=t=>t.default??null,h=t=>t.value??null,C=(t,e,o,a)=>{e.setIntValue(t,o.value,{fromUi:o.fromUi},a)},F=({disabled:t,element:e,widgetMgr:o,width:a,fragmentId:u})=>{const{options:n,help:c,label:i,labelVisibility:r,placeholder:m}=e,[f,l]=V({getStateFromWidgetMgr:v,getDefaultStateFromProto:P,getCurrStateFromProto:h,updateWidgetMgrState:C,element:e,widgetMgr:o,fragmentId:u}),g=s.useCallback(p=>{l({value:p,fromUi:!0})},[l]),b=d(e.default)&&!t;return S(U,{label:i,labelVisibility:x(r==null?void 0:r.value),options:n,disabled:t,width:a,onChange:g,value:f,help:c,placeholder:m,clearable:b})},E=s.memo(F);export{E as default};
@@ -1 +0,0 @@
1
- import{aU as i,j as e,aV as c,ba as B,aT as f,aW as h}from"./index.kc3Ycvjj.js";function m(s){const{disabled:l,element:t,widgetMgr:o,width:n,fragmentId:r}=s,d={width:n};let a=i.SECONDARY;t.type==="primary"?a=i.PRIMARY:t.type==="tertiary"&&(a=i.TERTIARY);const u=t.help?n:!0;return e("div",{className:"stButton","data-testid":"stButton",style:d,children:e(c,{help:t.help,children:e(B,{kind:a,size:f.SMALL,disabled:l,fluidWidth:t.useContainerWidth?u:!1,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(h,{icon:t.icon,label:t.label})})})})}export{m as default};
@@ -1 +0,0 @@
1
- import{n as t,aZ as e,am as o,j as s,ag as i}from"./index.kc3Ycvjj.js";import{P as l}from"./ProgressBar.CQTs8xxT.js";const d=t("div",{target:"e1eqiuxd0"})(({theme:a})=>({paddingBottom:a.spacing.sm,lineHeight:"normal",color:e(a)}));function c({element:a,width:r}){return o("div",{className:"stProgress","data-testid":"stProgress",children:[s(d,{children:s(i,{source:a.text,allowHTML:!1,isLabel:!0})}),s(l,{value:a.value,width:r})]})}export{c as default};
File without changes
@@ -1,67 +0,0 @@
1
- # BSD 3-Clause License
2
- #
3
- # - Copyright (c) 2008-Present, IPython Development Team
4
- # - Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu>
5
- # - Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
6
- # - Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
7
- #
8
- # All rights reserved.
9
- #
10
- # Redistribution and use in source and binary forms, with or without
11
- # modification, are permitted provided that the following conditions are met:
12
- #
13
- # * Redistributions of source code must retain the above copyright notice, this
14
- # list of conditions and the following disclaimer.
15
-
16
- # * Redistributions in binary form must reproduce the above copyright notice,
17
- # this list of conditions and the following disclaimer in the documentation
18
- # and/or other materials provided with the distribution.
19
-
20
- # * Neither the name of the copyright holder nor the names of its
21
- # contributors may be used to endorse or promote products derived from
22
- # this software without specific prior written permission.
23
-
24
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
- # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28
- # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
- # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
- # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32
- # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
- # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
-
35
- # Code modified from IPython (BSD license)
36
- # Source: https://github.com/ipython/ipython/blob/master/IPython/utils/syspathcontext.py#L42
37
-
38
- import sys
39
-
40
- from streamlit import util
41
-
42
-
43
- class modified_sys_path:
44
- """A context for prepending a directory to sys.path for a second."""
45
-
46
- def __init__(self, main_script_path: str):
47
- self._main_script_path = main_script_path
48
- self._added_path = False
49
-
50
- def __repr__(self) -> str:
51
- return util.repr_(self)
52
-
53
- def __enter__(self):
54
- if self._main_script_path not in sys.path:
55
- sys.path.insert(0, self._main_script_path)
56
- self._added_path = True
57
-
58
- def __exit__(self, type, value, traceback):
59
- if self._added_path:
60
- try:
61
- sys.path.remove(self._main_script_path)
62
- except ValueError:
63
- # It's already removed.
64
- pass
65
-
66
- # Returning False causes any exceptions to be re-raised.
67
- return False