streamlit-nightly 1.53.2.dev20260125__py3-none-any.whl → 1.53.2.dev20260127__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/commands/logo.py +81 -25
- streamlit/deprecation_util.py +19 -1
- streamlit/elements/arrow.py +2 -1
- streamlit/elements/lib/built_in_chart_utils.py +2 -2
- streamlit/elements/lib/options_selector_utils.py +72 -22
- streamlit/elements/widgets/select_slider.py +123 -37
- streamlit/hello/plotting_demo.py +19 -12
- streamlit/proto/Logo_pb2.py +5 -3
- streamlit/proto/Logo_pb2.pyi +25 -1
- streamlit/proto/Slider_pb2.py +6 -6
- streamlit/proto/Slider_pb2.pyi +9 -1
- streamlit/runtime/scriptrunner/script_runner.py +17 -0
- streamlit/runtime/scriptrunner_utils/script_run_context.py +13 -10
- streamlit/runtime/state/__init__.py +7 -1
- streamlit/runtime/state/common.py +13 -0
- streamlit/runtime/state/query_params.py +494 -6
- streamlit/runtime/state/session_state.py +178 -3
- streamlit/runtime/state/widgets.py +26 -1
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +304 -304
- streamlit/static/static/js/{ErrorOutline.esm.CIFYUdwC.js → ErrorOutline.esm.DiaGWPsE.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DWVTnTHm.js → FileDownload.esm.D-Qgpk5d.js} +1 -1
- streamlit/static/static/js/{FileHelper.BPYQIPd1.js → FileHelper.DmtDDGp0.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CypmvhYZ.js → FormClearHelper.BM3uDLnU.js} +1 -1
- streamlit/static/static/js/{InputInstructions.Bi62hDTQ.js → InputInstructions.B2YZ5Lle.js} +1 -1
- streamlit/static/static/js/{Particles.yebG0VuV.js → Particles.BzfZrl-0.js} +1 -1
- streamlit/static/static/js/{ProgressBar.Dy9CI6w4.js → ProgressBar.DWErD3j3.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.Btk92CPv.js → StreamlitSyntaxHighlighter.DB31rUPf.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.DBeVaFNt.js → TableChart.esm.D3oUYYYd.js} +1 -1
- streamlit/static/static/js/{Toolbar.DC2Tp-qb.js → Toolbar.CPyjMABY.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.3DnEd9BK.js → WidgetLabelHelpIconInline.C1NBCx-y.js} +1 -1
- streamlit/static/static/js/{base-input.7Sj6pVk0.js → base-input.C_CrNgNd.js} +1 -1
- streamlit/static/static/js/{checkbox.CcUx3XuQ.js → checkbox.S6O8DPFl.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.DZuwkCqy.js → createDownloadLinkElement.B-5tIJBw.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.Dw-AewlN.js → data-grid-overlay-editor.BW5aAEJN.js} +1 -1
- streamlit/static/static/js/{downloader.Bsx5M2Du.js → downloader.BswLlj7p.js} +1 -1
- streamlit/static/static/js/embed.QjYZXbaW.js +193 -0
- streamlit/static/static/js/{es6.BpAqZaR_.js → es6.Dm_kl6Cp.js} +2 -2
- streamlit/static/static/js/{formatNumber.DjehVPVS.js → formatNumber.CH39oSMw.js} +1 -1
- streamlit/static/static/js/{iconPosition.D02OPE-d.js → iconPosition.Dp9f2jam.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.xtstqPd7.js → iframeResizer.contentWindow.DOprY46-.js} +1 -1
- streamlit/static/static/js/{index.S-mjkUeF.js → index.-7yn3zqE.js} +1 -1
- streamlit/static/static/js/{index.Bri1T2TS.js → index.4QSKV4yi.js} +1 -1
- streamlit/static/static/js/{index.ZIA43eTF.js → index.6OwBTJdz.js} +1 -1
- streamlit/static/static/js/{index.x1B588Xu.js → index.6UQ__fP7.js} +1 -1
- streamlit/static/static/js/{index.CEwnDCn9.js → index.6iOQDEVC.js} +1 -1
- streamlit/static/static/js/index.B0Wcvg8a.js +2 -0
- streamlit/static/static/js/{index.DO2T-QzF.js → index.B6Sk5Jwr.js} +1 -1
- streamlit/static/static/js/{index.D_TIyPF4.js → index.B9XI6y3j.js} +1 -1
- streamlit/static/static/js/{index.B9gbSNsw.js → index.BBVcEzWu.js} +1 -1
- streamlit/static/static/js/{index.CA0RmxJF.js → index.BFxjXeYb.js} +1 -1
- streamlit/static/static/js/{index.B5tD5YeV.js → index.BNsCI-Q1.js} +1 -1
- streamlit/static/static/js/{index.DJjSqPAx.js → index.BQu5Qf_i.js} +1 -1
- streamlit/static/static/js/{index.BvZbnSMC.js → index.BUOjbZl6.js} +1 -1
- streamlit/static/static/js/{index.XFMDBL5n.js → index.BUbgW8RJ.js} +1 -1
- streamlit/static/static/js/{index.BOkpEbJS.js → index.BYjec3-R.js} +1 -1
- streamlit/static/static/js/{index.D6Z9hKJY.js → index.BaKZ4ira.js} +1 -1
- streamlit/static/static/js/{index.BIcJe97b.js → index.BcUwq6kI.js} +1 -1
- streamlit/static/static/js/{index.C9v49R-a.js → index.BlchQrZL.js} +1 -1
- streamlit/static/static/js/{index.D9RL5sRp.js → index.BlgpfTUq.js} +1 -1
- streamlit/static/static/js/{index.BV6XgCij.js → index.Bwaj-9Zv.js} +1 -1
- streamlit/static/static/js/{index.DDu_qTm0.js → index.BxtweGcn.js} +1 -1
- streamlit/static/static/js/{index.CGbvkEtg.js → index.C57ViuAX.js} +1 -1
- streamlit/static/static/js/{index.CdRwiHPm.js → index.CAzk7fUP.js} +1 -1
- streamlit/static/static/js/{index.BK9S5qug.js → index.CDZffl1q.js} +1 -1
- streamlit/static/static/js/{index.JL0uGAeJ.js → index.CYxcFtYt.js} +1 -1
- streamlit/static/static/js/index.Cb7V19H9.js +2 -0
- streamlit/static/static/js/{index.CgARjn28.js → index.CfXTal6g.js} +1 -1
- streamlit/static/static/js/{index.CyDHwK5P.js → index.Ci3x7GcT.js} +1 -1
- streamlit/static/static/js/{index.BVhVdVeE.js → index.CivdhE_9.js} +1 -1
- streamlit/static/static/js/{index.m3dn5Bai.js → index.CkSzTTpO.js} +5 -5
- streamlit/static/static/js/{index.8FPw0_gD.js → index.CuJ82OKQ.js} +1 -1
- streamlit/static/static/js/{index.BDlI2pRp.js → index.Cw5Xlisw.js} +1 -1
- streamlit/static/static/js/{index.DdxofXV8.js → index.D1tkD8Lg.js} +3 -3
- streamlit/static/static/js/{index.iXzAofuY.js → index.DK9Im19R.js} +2 -2
- streamlit/static/static/js/{index.iF5zYERg.js → index.DMwRlpNi.js} +1 -1
- streamlit/static/static/js/index.DTUAvbJ0.js +1 -0
- streamlit/static/static/js/{index.DSSapl3Q.js → index.DoRYpzHm.js} +1 -1
- streamlit/static/static/js/{index.D6J2UPzF.js → index.DsZNm1_D.js} +1 -1
- streamlit/static/static/js/{index.5H98WqjT.js → index.DypwtfIh.js} +1 -1
- streamlit/static/static/js/{index.DgLRJfs3.js → index.JKOtpaMf.js} +1 -1
- streamlit/static/static/js/{index.B8-HOwf1.js → index.OI2eh_me.js} +1 -1
- streamlit/static/static/js/{index.CKUBdVQ9.js → index.TTO_Lb69.js} +1 -1
- streamlit/static/static/js/{index.-faJDV20.js → index.X1r5cenD.js} +1 -1
- streamlit/static/static/js/{index.BqfJJr3c.js → index.gsc49XzN.js} +1 -1
- streamlit/static/static/js/{index.BB_iwaVr.js → index.lMhsw-5K.js} +32 -32
- streamlit/static/static/js/{index.DZv5AoR1.js → index.s9zpEF8P.js} +1 -1
- streamlit/static/static/js/{index.BGTMh3Uu.js → index.tjRGlTlQ.js} +1 -1
- streamlit/static/static/js/{index.Bo1ztye0.js → index.wKGUZfH4.js} +1 -1
- streamlit/static/static/js/{input.VYKyGuhi.js → input.CIKqvWjB.js} +1 -1
- streamlit/static/static/js/{main.u5Bb3MY7.js → main.BkNqoTrd.js} +1 -1
- streamlit/static/static/js/{memory.BOMt4yAV.js → memory.DNcbFok2.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CihlAHgl.js → number-overlay-editor.DwjiYKav.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.BuqSgXpk.js → pandasStylerUtils.BSc50we3.js} +1 -1
- streamlit/static/static/js/{sandbox.COGR4pqz.js → sandbox.DJL9Gdcf.js} +1 -1
- streamlit/static/static/js/{styled-components.BEf3c4IJ.js → styled-components.D4jE1G9j.js} +1 -1
- streamlit/static/static/js/{throttle.Bl-XsA9N.js → throttle.dHeXiPIK.js} +1 -1
- streamlit/static/static/js/{timepicker.B-HgBYlK.js → timepicker.CIpoSUyW.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BrQebwtE.js → toConsumableArray.AOXQx2YY.js} +1 -1
- streamlit/static/static/js/uniqueId.DRPc21MO.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.8WwISl9r.js → useBasicWidgetState.BwQxG7iA.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.D37LWdCR.js → useIntlLocale.JXPZPWaJ.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.Bb_KqJvq.js → useTextInputAutoExpand.CD_nhoE_.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.D1BLS5t7.js → useUpdateUiValue.Cl1Y22Ao.js} +1 -1
- streamlit/static/static/js/{useWaveformController.Ce0-qTws.js → useWaveformController.DJhScSDn.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.BX2K3UVv.js → withCalculatedWidth.CrAfFzO9.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CqfGs8T2.js → withFullScreenWrapper.EdE3zOz5.js} +1 -1
- streamlit/testing/v1/element_tree.py +23 -8
- {streamlit_nightly-1.53.2.dev20260125.dist-info → streamlit_nightly-1.53.2.dev20260127.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.53.2.dev20260125.dist-info → streamlit_nightly-1.53.2.dev20260127.dist-info}/RECORD +114 -114
- streamlit/static/static/js/embed.C7by6AoE.js +0 -195
- streamlit/static/static/js/index.Bhy8EBYI.js +0 -2
- streamlit/static/static/js/index.C5ehUqNt.js +0 -2
- streamlit/static/static/js/index.m4WkwGMu.js +0 -1
- streamlit/static/static/js/uniqueId.8R4hbkYl.js +0 -1
- {streamlit_nightly-1.53.2.dev20260125.data → streamlit_nightly-1.53.2.dev20260127.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.53.2.dev20260125.dist-info → streamlit_nightly-1.53.2.dev20260127.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.53.2.dev20260125.dist-info → streamlit_nightly-1.53.2.dev20260127.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.53.2.dev20260125.dist-info → streamlit_nightly-1.53.2.dev20260127.dist-info}/top_level.txt +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{J as P,r as u,V as ao,
|
|
1
|
+
import{J as P,r as u,V as ao,cs as L,ct as co,aL as io,l as lo,j as m,W as U,R as fo,cu as go,z as _,aM as V}from"./index.lMhsw-5K.js";function Co(o,e,r,n){for(var t=-1,s=o==null?0:o.length;++t<s;)r=e(r,o[t],t,o);return r}function xo(o){return function(e){return o?.[e]}}var po={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ho=xo(po),mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bo="\\u0300-\\u036f",So="\\ufe20-\\ufe2f",Ro="\\u20d0-\\u20ff",yo=bo+So+Ro,Eo="["+yo+"]",Fo=RegExp(Eo,"g");function wo(o){return o=P(o),o&&o.replace(mo,ho).replace(Fo,"")}var vo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ko(o){return o.match(vo)||[]}var Bo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function To(o){return Bo.test(o)}var H="\\ud800-\\udfff",zo="\\u0300-\\u036f",Ao="\\ufe20-\\ufe2f",Uo="\\u20d0-\\u20ff",Io=zo+Ao+Uo,J="\\u2700-\\u27bf",Z="a-z\\xdf-\\xf6\\xf8-\\xff",Wo="\\xac\\xb1\\xd7\\xf7",Lo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oo="\\u2000-\\u206f",Mo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",G="A-Z\\xc0-\\xd6\\xd8-\\xde",jo="\\ufe0e\\ufe0f",Y=Wo+Lo+Oo+Mo,q="['’]",O="["+Y+"]",$o="["+Io+"]",K="\\d+",No="["+J+"]",X="["+Z+"]",Q="[^"+H+Y+K+J+Z+G+"]",Do="\\ud83c[\\udffb-\\udfff]",Po="(?:"+$o+"|"+Do+")",_o="[^"+H+"]",oo="(?:\\ud83c[\\udde6-\\uddff]){2}",eo="[\\ud800-\\udbff][\\udc00-\\udfff]",w="["+G+"]",Vo="\\u200d",M="(?:"+X+"|"+Q+")",Ho="(?:"+w+"|"+Q+")",j="(?:"+q+"(?:d|ll|m|re|s|t|ve))?",$="(?:"+q+"(?:D|LL|M|RE|S|T|VE))?",ro=Po+"?",to="["+jo+"]?",Jo="(?:"+Vo+"(?:"+[_o,oo,eo].join("|")+")"+to+ro+")*",Zo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Go="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Yo=to+ro+Jo,qo="(?:"+[No,oo,eo].join("|")+")"+Yo,Ko=RegExp([w+"?"+X+"+"+j+"(?="+[O,w,"$"].join("|")+")",Ho+"+"+$+"(?="+[O,w+M,"$"].join("|")+")",w+"?"+M+"+"+j,w+"+"+$,Go,Zo,K,qo].join("|"),"g");function Xo(o){return o.match(Ko)||[]}function Qo(o,e,r){return o=P(o),e=e,e===void 0?To(o)?Xo(o):ko(o):o.match(e)||[]}var oe="['’]",ee=RegExp(oe,"g");function re(o){return function(e){return Co(Qo(wo(e).replace(ee,"")),o,"")}}var te=re(function(o,e,r){return o+(r?"-":"")+e.toLowerCase()});const k=u.createContext(null);k.displayName="BidiComponentContext";const v=ao.getLogger("BidiComponent"),N="__",z="__streamlit_arrow_ref__",ne="$$STREAMLIT_INTERNAL_KEY",se=(o,e)=>{if(o&&typeof o=="object"&&!Array.isArray(o)){if(typeof o[z]=="string"){const n=o[z],t=e[n];if(t)try{return L(t)}catch{return null}return null}const r={};for(const[n,t]of Object.entries(o))if(t&&typeof t=="object"&&!Array.isArray(t)&&typeof t[z]=="string"){const s=t[z],a=e[s];if(a)try{r[n]=L(a)}catch{r[n]=null}else r[n]=null}else r[n]=t;return r}return o},ue=({arrowBlobs:o,arrowData:e,bytes:r,data:n,json:t,mixedJson:s})=>{switch(n){case"json":return t?JSON.parse(t):null;case"arrowData":return e??null;case"bytes":return r??null;case"mixed":{if(s&&o){const a=JSON.parse(s),i={};return Object.entries(o).forEach(([l,d])=>{d?.data&&(i[l]=d.data)}),se(a,i)}return null}case"any":case void 0:return null;default:co(n)}},ae=(o,e="--st")=>{const r={};return Object.entries(o).forEach(([n,t])=>{const s=te(n),a=`${e}-${s}`;if(typeof t=="boolean"){r[a]=t?"1":"0";return}if(t==null){r[a]="unset";return}if(Array.isArray(t)){r[a]=t.join(",");return}if(typeof t=="number"||typeof t=="string"){r[a]=String(t);return}r[a]="unset"}),r},ce=o=>{const e=[o.fontSizes.h1FontSize,o.fontSizes.h2FontSize,o.fontSizes.h3FontSize,o.fontSizes.h4FontSize,o.fontSizes.h5FontSize,o.fontSizes.h6FontSize],r=[o.fontWeights.h1FontWeight,o.fontWeights.h2FontWeight,o.fontWeights.h3FontWeight,o.fontWeights.h4FontWeight,o.fontWeights.h5FontWeight,o.fontWeights.h6FontWeight];return{primaryColor:o.colors.primary,backgroundColor:o.colors.bgColor,secondaryBackgroundColor:o.colors.secondaryBg,textColor:o.colors.bodyText,linkColor:o.colors.link,linkUnderline:o.linkUnderline,headingFont:o.genericFonts.headingFont,codeFont:o.genericFonts.codeFont,baseRadius:o.radii.default,buttonRadius:o.radii.button,baseFontSize:typeof o.fontSizes.baseFontSize=="number"?`${o.fontSizes.baseFontSize}px`:String(o.fontSizes.baseFontSize),baseFontWeight:o.fontWeights.normal,codeFontWeight:o.fontWeights.code,codeFontSize:o.fontSizes.codeFontSize,headingFontSizes:e,headingFontSize1:e[0],headingFontSize2:e[1],headingFontSize3:e[2],headingFontSize4:e[3],headingFontSize5:e[4],headingFontSize6:e[5],headingFontWeights:r,headingFontWeight1:r[0],headingFontWeight2:r[1],headingFontWeight3:r[2],headingFontWeight4:r[3],headingFontWeight5:r[4],headingFontWeight6:r[5],borderColor:o.colors.borderColor,dataframeBorderColor:o.colors.dataframeBorderColor,dataframeHeaderBackgroundColor:o.colors.dataframeHeaderBackgroundColor,codeBackgroundColor:o.colors.codeBackgroundColor,font:o.genericFonts.bodyFont,chartCategoricalColors:o.colors.chartCategoricalColors,chartSequentialColors:o.colors.chartSequentialColors,chartDivergingColors:o.colors.chartDivergingColors,headingColor:o.colors.headingColor,borderColorLight:o.colors.borderColorLight,codeTextColor:o.colors.codeTextColor,widgetBorderColor:o.colors.widgetBorderColor||"transparent",redColor:o.colors.redColor,orangeColor:o.colors.orangeColor,yellowColor:o.colors.yellowColor,blueColor:o.colors.blueColor,greenColor:o.colors.greenColor,violetColor:o.colors.violetColor,grayColor:o.colors.grayColor,redBackgroundColor:o.colors.redBackgroundColor,orangeBackgroundColor:o.colors.orangeBackgroundColor,yellowBackgroundColor:o.colors.yellowBackgroundColor,blueBackgroundColor:o.colors.blueBackgroundColor,greenBackgroundColor:o.colors.greenBackgroundColor,violetBackgroundColor:o.colors.violetBackgroundColor,grayBackgroundColor:o.colors.grayBackgroundColor,redTextColor:o.colors.redTextColor,orangeTextColor:o.colors.orangeTextColor,yellowTextColor:o.colors.yellowTextColor,blueTextColor:o.colors.blueTextColor,greenTextColor:o.colors.greenTextColor,violetTextColor:o.colors.violetTextColor,grayTextColor:o.colors.grayTextColor}},ie=u.memo(({element:o,children:e,widgetMgr:r,fragmentId:n,componentRegistry:t})=>{const{arrowData:s,bytes:a,componentName:i,cssContent:l,cssSourcePath:d,data:f,htmlContent:g,id:c,jsContent:b,json:p,jsSourcePath:h,mixed:C}=o,y=u.useMemo(()=>({id:o.id,formId:o.formId}),[o.id,o.formId]),B=u.useCallback(()=>{const F=r.getJsonValue(y);if(!F)return{};try{return JSON.parse(F)}catch(I){const R=io(I);return v.warn("Failed to parse widget JSON value; returning empty object.",{widgetId:y.id,formId:y.formId,error:R.message}),{}}},[y,r]),T=u.useMemo(()=>ue({arrowBlobs:C?.arrowBlobs||void 0,arrowData:s?.data||void 0,bytes:a,data:f,json:p,mixedJson:C?.json||void 0}),[f,p,s?.data,a,C?.json,C?.arrowBlobs]),S=lo(),E=u.useMemo(()=>ce(S),[S]),x=u.useMemo(()=>({componentName:i,componentRegistry:t,cssContent:l?.trim(),cssSourcePath:d||void 0,data:T,fragmentId:n,getWidgetValue:B,htmlContent:g?.trim(),id:c,formId:o.formId||void 0,jsContent:b||void 0,jsSourcePath:h||void 0,theme:E,widgetMgr:r}),[i,t,l,d,n,B,g,c,o.formId,b,h,T,E,r]);return m(k.Provider,{value:x,children:e})}),no=(o,e)=>{if(o instanceof Error)return o;const r=e?`${e}: ${String(o)}`:String(o);return new Error(r)},A=(o,e,r)=>{const n=no(o,r);v.error(`BidiComponent Error: ${n.message}`,o),e(n)},de=(o,e)=>{try{const n=document.createRange().createContextualFragment(o);e.appendChild(n)}catch(r){v.warn("createContextualFragment failed, falling back to innerHTML",r),e.innerHTML=o}},so=({containerRef:o,setError:e,skip:r=!1})=>{const n=u.useRef(null),{htmlContent:t,cssContent:s,cssSourcePath:a,componentName:i,componentRegistry:{getBidiComponentURL:l}}=U(k),d=u.useMemo(()=>{if(a)return l(i,a)},[i,a,l]),f=fo(d);return u.useEffect(()=>{if(r)return;const g=o.current;if(g)try{if(n.current?.parentNode===g&&g.removeChild(n.current),n.current=document.createElement("div"),t){const c=document.createElement("div");de(t,c),n.current.appendChild(c)}if(s){const c=document.createElement("style");c.textContent=s,n.current.appendChild(c)}else if(d){const c=document.createElement("link");c.href=d,c.rel="stylesheet",f&&(c.crossOrigin=f),c.onerror=()=>{A(new Error(`Failed to load CSS from ${d}`),e)},n.current.appendChild(c)}g.appendChild(n.current)}catch(c){A(c,e,"Failed to process HTML/CSS content")}},[t,s,o,f,d,e,r]),n};class le{constructor(){this.hashSeed=2166136261,this.hashPrime=16777619,this.cache=new Map}computeHash(e){let r=this.hashSeed;for(let n=0;n<e.length;n++)r^=e.charCodeAt(n),r=Math.imul(r>>>0,this.hashPrime)>>>0;return(r>>>0).toString(16)}getOrCreateUrlForJs(e,r){const n=this.computeHash(e),t=this.cache.get(n);if(t)return{url:t,hash:n};const s=`${e}
|
|
2
2
|
//# sourceURL=${r}-${n}.js`,a=new Blob([s],{type:"text/javascript"}),i=URL.createObjectURL(a);return this.cache.set(n,i),{url:i,hash:n}}}const fe=new le,ge="events";function Ce(o){if(o.includes(N))throw new Error("Base component id must not contain the delimiter sequence");return`${ne}_${o}${N}${ge}`}const D=async({componentId:o,componentIdForWidgetMgr:e,componentName:r,data:n,formId:t,fragmentId:s,getWidgetValue:a,moduleUrl:i,parentElement:l,widgetMgr:d})=>{const f=await import(i);if(!f)throw new Error("JS module does not exist.");if(!f.default||typeof f.default!="function")throw new Error("JS module does not have a default export function.");const g=(b,p)=>{let h={};try{h={...a(),[b]:p}}catch(C){v.error(`Failed to get existing value for ${b}`,C),h={[b]:p}}d.setJsonValue({id:e,formId:t},h,{fromUi:!0},s)},c=(b,p)=>{if(t){v.warn("BidiComponent: setTriggerValue ignored inside st.form. Triggers are not allowed in forms; use setStateValue and form submit instead.");return}const h=Ce(e);d.setTriggerValue({id:h,formId:t},{fromUi:!0},s,{event:b,value:p})};return f.default({name:r,data:n,key:o,parentElement:l,setStateValue:g,setTriggerValue:c})},uo=({containerRef:o,setError:e,skip:r=!1})=>{const t=`st-bidi-component-${u.useMemo(()=>go(),[])}`,{componentName:s,data:a,formId:i,fragmentId:l,getWidgetValue:d,id:f,jsContent:g,jsSourcePath:c,theme:b,widgetMgr:p,componentRegistry:{getBidiComponentURL:h}}=U(k),C=u.useMemo(()=>{if(c)return h(s,c)},[s,c,h]),y=u.useRef(),B=u.useRef(),T=u.useRef(!1);u.useEffect(()=>{const{current:S}=o;if(r||!g&&!C||!S)return;(async()=>{try{if(g){const{url:x}=fe.getOrCreateUrlForJs(g,`st-bidi-${s}`);y.current=await D({componentId:t,componentIdForWidgetMgr:f,componentName:s,data:a,formId:i,fragmentId:l,getWidgetValue:d,moduleUrl:x,parentElement:S,widgetMgr:p})}else if(C){const x=C;try{await new Promise((F,I)=>{const R=document.createElement("script");R.type="module",R.src=x,R.async=!0,R.onload=()=>F(),R.onerror=()=>I(new Error(`Failed to load script from ${C}`)),document.head.appendChild(R),B.current=R}),y.current=await D({componentId:t,componentIdForWidgetMgr:f,componentName:s,data:a,formId:i,fragmentId:l,getWidgetValue:d,moduleUrl:x,parentElement:S,widgetMgr:p})}catch(F){throw no(F,`Failed to load or execute script from ${C}`)}}}catch(x){T.current||A(x,e)}})()},[t,s,o,a,i,l,d,f,g,C,e,r,p,b]),u.useEffect(()=>()=>{T.current=!0;const S=y.current;S&&Promise.resolve(S).then(x=>{x?.()}).catch(x=>{v.error("Failed to run custom component cleanup",x)});const E=B.current;E?.parentNode&&E.parentNode.removeChild(E)},[])},xe=_("div",{target:"epzkg1s0"})(({cssCustomProperties:o})=>({...o,display:"contents"})),W=_("div",{target:"epzkg1s1"})({width:"100%",height:"100%"}),pe=u.memo(()=>{const o=u.useRef(null),e=u.useRef(null),[r,n]=u.useState(!1),[t,s]=u.useState(null),{id:a}=U(k);u.useEffect(()=>{if(o.current)try{if(o.current.shadowRoot){e.current=o.current.shadowRoot,n(!0);return}e.current=o.current.attachShadow({mode:"open"}),n(!0)}catch(l){A(l,s,"Failed to create shadow DOM")}},[a]);const i=!r||!!t;return so({containerRef:e,setError:s,skip:i}),uo({containerRef:e,setError:s,skip:i}),t?m(V,{name:"BidiComponent Error",message:t.message,stack:t.stack}):m(W,{ref:o,"data-testid":"stBidiComponentIsolated"})}),he=u.memo(()=>{const o=u.useRef(null),[e,r]=u.useState(null),n=!!e;return so({containerRef:o,setError:r,skip:n}),uo({containerRef:o,setError:r,skip:n}),e?m(V,{name:"BidiComponent Error",message:e.message,stack:e.stack}):m(W,{ref:o,"data-testid":"stBidiComponentRegular"})}),me=({children:o})=>{const{theme:e}=U(k),r=u.useMemo(()=>ae(e),[e]);return m(xe,{cssCustomProperties:r,children:o})},be=({element:o,widgetMgr:e,fragmentId:r,componentRegistry:n})=>{const{isolateStyles:t}=o;return m(ie,{element:o,widgetMgr:e,fragmentId:r,componentRegistry:n,children:m(W,{className:"stBidiComponent",children:m(me,{children:t?m(pe,{}):m(he,{})})})})},Re=u.memo(be);export{k as BidiComponentContext,Re as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as f,r as o,R as g,j as l,V as v}from"./index.
|
|
1
|
+
import{z as f,r as o,R as g,j as l,V as v}from"./index.lMhsw-5K.js";const T=f("div",{target:"e1z085g90"})(()=>({lineHeight:0})),y=f("audio",{target:"e1z085g91"})(({theme:t})=>({width:"100%",height:t.sizes.minElementHeight,margin:0,padding:0})),h=v.getLogger("Audio");function L({element:t,endpoints:a,elementMgr:s}){const i=o.useRef(null),{startTime:n,endTime:d,loop:u,autoplay:p}=t,E=o.useMemo(()=>{if(!t.id)return!0;const e=s.getElementState(t.id,"preventAutoplay");return e||s.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,s]);o.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),o.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),o.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const c=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):r||(r=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",c),()=>{e&&d>0&&e.removeEventListener("timeupdate",c)}},[d,u,n]),o.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[u,n]);const m=g(t.url),A=a.buildMediaURL(t.url);return l(T,{children:l(y,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!E,src:A,onError:e=>{const r=e.currentTarget.src;h.error(`Client Error: Audio source error - ${r}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",r)},crossOrigin:m})})}const z=o.memo(L);export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as D,r as a,k as P,l as U,a9 as S,aa as j,o as H,j as l,p as q,ab as K,ac as O,ad as _,ae as $,Y as w,af as A}from"./index.
|
|
1
|
+
import{z as D,r as a,k as P,l as U,a9 as S,aa as j,o as H,j as l,p as q,ab as K,ac as O,ad as _,ae as $,Y as w,af as A}from"./index.lMhsw-5K.js";import{I as N}from"./InputInstructions.B2YZ5Lle.js";import{u as Y}from"./useBasicWidgetState.BwQxG7iA.js";import{u as G,a as J,b as M}from"./useUpdateUiValue.Cl1Y22Ao.js";import{u as Q}from"./uniqueId.DRPc21MO.js";import{I as X}from"./input.CIKqvWjB.js";import"./FormClearHelper.BM3uDLnU.js";import"./inputUtils.CptNuJwn.js";import"./base-input.C_CrNgNd.js";const Z=D("div",{target:"eiqkja70"})("position:relative;");function tt({disabled:o,element:t,widgetMgr:s,fragmentId:u}){const[r,p]=a.useState(()=>W(s,t)??null),{width:T,elementRef:x}=P(),[i,m]=a.useState(!1),y=a.useCallback(()=>{p(t.default??null),m(!0)},[t.default]),[C,h]=Y({getStateFromWidgetMgr:W,getDefaultStateFromProto:et,getCurrStateFromProto:ot,updateWidgetMgrState:at,element:t,widgetMgr:s,fragmentId:u,onFormCleared:y});G(C,r,p,i);const[V,f]=a.useState(!1),e=U(),[b]=a.useState(()=>Q("text_input_")),{placeholder:F,formId:n,icon:d,maxChars:I}=t,g=a.useCallback(()=>{m(!1),h({value:r,fromUi:!0})},[r,h]),v=S({formId:n})?s.allowFormEnterToSubmit(n):i,E=V&&T>j(e.breakpoints.hideWidgetDetails),R=a.useCallback(()=>{i&&g(),f(!1)},[i,g]),z=a.useCallback(()=>{f(!0)},[]),L=J({formId:n,maxChars:I,setDirty:m,setUiValue:p,setValueWithSource:h}),k=M(n,g,i,s,u);return H(Z,{className:"stTextInput","data-testid":"stTextInput",ref:x,children:[l(O,{label:t.label,disabled:o,labelVisibility:q(t.labelVisibility?.value),htmlFor:b,children:t.help&&l(K,{content:t.help,label:t.label})}),l(X,{value:r??"",placeholder:F,onBlur:R,onFocus:z,onChange:L,onKeyPress:k,"aria-label":t.label,disabled:o,id:b,type:st(t),autoComplete:t.autocomplete,startEnhancer:d&&l(w,{"data-testid":"stTextInputIcon",iconValue:d,size:"lg"}),overrides:{Input:{style:{fontWeight:e.fontWeights.normal,minWidth:0,lineHeight:e.lineHeights.inputWidget,paddingRight:e.spacing.sm,paddingLeft:e.spacing.md,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,"::placeholder":{color:e.colors.fadedText60}}},Root:{props:{"data-testid":"stTextInputRootElement"},style:({$isFocused:B})=>{const c=$(e.colors,B);return{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,borderTopColor:c,borderRightColor:c,borderBottomColor:c,borderLeftColor:c,paddingLeft:d?e.spacing.sm:0}}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:e.iconSizes.lg,color:_(d)?e.colors.fadedText60:"inherit"}}}}),E&&l(N,{dirty:i,value:r??"",maxLength:I,inForm:S({formId:n}),allowEnterToSubmit:v})]})}function W(o,t){return o.getStringValue(t)??null}function et(o){return o.default??null}function ot(o){return o.value??null}function at(o,t,s,u){t.setStringValue(o,s.value,{fromUi:s.fromUi},u)}function st(o){return o.type===A.Type.PASSWORD?"password":"text"}const ht=a.memo(tt);export{ht as default};
|