streamlit-nightly 1.53.2.dev20260202__py3-none-any.whl → 1.54.1.dev20260204__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 +6 -10
- streamlit/components/v2/component_path_utils.py +17 -29
- streamlit/config.py +4 -2
- streamlit/elements/arrow.py +66 -26
- streamlit/elements/lib/built_in_chart_utils.py +1 -1
- streamlit/elements/lib/column_config_utils.py +4 -4
- streamlit/elements/lib/options_selector_utils.py +4 -0
- streamlit/elements/lib/pandas_styler_utils.py +22 -22
- streamlit/elements/widgets/button_group.py +221 -86
- streamlit/elements/widgets/data_editor.py +9 -9
- streamlit/elements/widgets/radio.py +8 -4
- streamlit/hello/dataframe_demo.py +1 -1
- streamlit/path_security.py +98 -0
- streamlit/proto/ArrowData_pb2.py +5 -3
- streamlit/proto/ArrowData_pb2.pyi +44 -4
- streamlit/proto/ArrowNamedDataSet_pb2.py +4 -4
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +3 -3
- streamlit/proto/ArrowVegaLiteChart_pb2.py +4 -4
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +3 -3
- streamlit/proto/ButtonGroup_pb2.py +8 -8
- streamlit/proto/ButtonGroup_pb2.pyi +9 -7
- streamlit/proto/Dataframe_pb2.py +31 -0
- streamlit/proto/{Arrow_pb2.pyi → Dataframe_pb2.pyi} +39 -102
- streamlit/proto/Element_pb2.py +5 -4
- streamlit/proto/Element_pb2.pyi +11 -10
- streamlit/proto/Table_pb2.py +29 -0
- streamlit/proto/Table_pb2.pyi +83 -0
- streamlit/runtime/app_session.py +9 -1
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +307 -307
- streamlit/static/static/js/{ErrorOutline.esm.CLuz0rSD.js → ErrorOutline.esm.DWBqsdHn.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.CO68LcnZ.js → FileDownload.esm.D5koxJhf.js} +1 -1
- streamlit/static/static/js/{FileHelper.DAXgY6Ug.js → FileHelper.kJKftfu4.js} +5 -5
- streamlit/static/static/js/{FormClearHelper.zxJ53Nym.js → FormClearHelper.CyGGPn10.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CCbg8esE.js → InputInstructions.oezYb8Lm.js} +1 -1
- streamlit/static/static/js/{Particles.BJw0A-zv.js → Particles.BIpBmEwi.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BrrHeAEh.js → ProgressBar.BRAS_FJc.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.DvPLy3zk.js → StreamlitSyntaxHighlighter.c2qcx-xG.js} +2 -2
- streamlit/static/static/js/{TableChart.esm.BawvAi5p.js → TableChart.esm.BuemQLVW.js} +1 -1
- streamlit/static/static/js/{Toolbar.CbpscbNb.js → Toolbar.mUe2Nmta.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.DA4S2HFP.js → WidgetLabelHelpIconInline.if89y2mu.js} +1 -1
- streamlit/static/static/js/{base-input.BKKl2eBF.js → base-input.AJ4KxBTh.js} +4 -4
- streamlit/static/static/js/{checkbox.CB43AKV4.js → checkbox.GY4JoJkM.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.jVwF96ey.js → createDownloadLinkElement.BWJh90jh.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.CxQizSv7.js → data-grid-overlay-editor.C9AINtRf.js} +1 -1
- streamlit/static/static/js/{downloader.CKlIgsy5.js → downloader.BZY8OE4f.js} +1 -1
- streamlit/static/static/js/{embed.BhRb_2n8.js → embed.BjO7Ez0y.js} +1 -1
- streamlit/static/static/js/{es6.DPyfPmWm.js → es6.eb5oR8iN.js} +2 -2
- streamlit/static/static/js/{formatNumber.DtfMnnPx.js → formatNumber.CCeQsvJQ.js} +1 -1
- streamlit/static/static/js/{iconPosition.DkZAlu_k.js → iconPosition.D6eEnKvO.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.l5sQWLra.js → iframeResizer.contentWindow.DTsWJRTo.js} +1 -1
- streamlit/static/static/js/{index.rvbQETlC.js → index.B6l4FdUv.js} +1 -1
- streamlit/static/static/js/{index.BUlT_mOL.js → index.B7H2q9vo.js} +2 -2
- streamlit/static/static/js/{index.CsIENsKH.js → index.BDdmrM58.js} +1 -1
- streamlit/static/static/js/{index.e6Ry6-Ft.js → index.BMbQnwRD.js} +1 -1
- streamlit/static/static/js/{index.CL_icBXS.js → index.BQ5MOzHu.js} +1 -1
- streamlit/static/static/js/{index.Ccye_uLl.js → index.BSgo_bkv.js} +1 -1
- streamlit/static/static/js/{index.LjqoQCm5.js → index.BU5M9DsN.js} +1 -1
- streamlit/static/static/js/{index.Bc_FQ4Wb.js → index.BYIxnU34.js} +1 -1
- streamlit/static/static/js/{index.y0h42OXL.js → index.BZL2hIBz.js} +1 -1
- streamlit/static/static/js/{index.Dac9Jib-.js → index.BZVrJlnq.js} +1 -1
- streamlit/static/static/js/{index.BLD3tJ2C.js → index.Bd7QK46M.js} +1 -1
- streamlit/static/static/js/{index.Ck64OQhV.js → index.BfHA_i34.js} +1 -1
- streamlit/static/static/js/{index.BpCj2-sQ.js → index.Bgry-Ek_.js} +1 -1
- streamlit/static/static/js/{index.D83azq2w.js → index.Bi25zaXA.js} +1 -1
- streamlit/static/static/js/{index.Cwg8nWw5.js → index.Bj3M1xBC.js} +1 -1
- streamlit/static/static/js/{index.DmWUXdjc.js → index.Bjrvlqx5.js} +16 -16
- streamlit/static/static/js/index.BnOSeM5K.js +11 -0
- streamlit/static/static/js/index.BoL6J1jK.js +2 -0
- streamlit/static/static/js/{index.yHLCvUGh.js → index.BoORyxOa.js} +1 -1
- streamlit/static/static/js/{index.DiBeetOH.js → index.Bpd7GPeH.js} +1 -1
- streamlit/static/static/js/{index.BzO83wKm.js → index.BpeJX018.js} +1 -1
- streamlit/static/static/js/{index.C_19KWNs.js → index.BriH7JVk.js} +1 -1
- streamlit/static/static/js/{index.DjuMEZ6m.js → index.BwkeObMo.js} +1 -1
- streamlit/static/static/js/{index.CiS4giQ2.js → index.C0o85qmd.js} +1 -1
- streamlit/static/static/js/{index.L9pOjBEn.js → index.C7_wNJTH.js} +2 -2
- streamlit/static/static/js/{index.DzdPUxsx.js → index.CGZP_w9b.js} +1 -1
- streamlit/static/static/js/{index.DKoJr0Se.js → index.CGw52-0-.js} +1 -1
- streamlit/static/static/js/{index.6J1N4is3.js → index.CUvtJj0a.js} +1 -1
- streamlit/static/static/js/{index.CBbYMKZp.js → index.Cfx1ZHWt.js} +1 -1
- streamlit/static/static/js/{index.BAK0CG1Q.js → index.Chl2kALe.js} +1 -1
- streamlit/static/static/js/index.Crlx_wdE.js +1 -0
- streamlit/static/static/js/{index.WIMtx3m0.js → index.D9A-8ebQ.js} +1 -1
- streamlit/static/static/js/{index.y5HxPwg9.js → index.DBIoNOen.js} +21 -21
- streamlit/static/static/js/{index.AZ9T4EqJ.js → index.DMKTAe4F.js} +1 -1
- streamlit/static/static/js/{index.YutgmD9x.js → index.DNrpqKVt.js} +2 -2
- streamlit/static/static/js/{index.Y9wPTZIf.js → index.DSRvF_8e.js} +1 -1
- streamlit/static/static/js/{index.DZOGT9vX.js → index.DhB1m_xG.js} +1 -1
- streamlit/static/static/js/{index.DR6V0uBJ.js → index.DiES30vM.js} +1 -1
- streamlit/static/static/js/{index.CmbqbRMZ.js → index.DlJ4Y1xc.js} +1 -1
- streamlit/static/static/js/{index.FioS1Y9m.js → index.J61yByUR.js} +1 -1
- streamlit/static/static/js/{index.hnu9U-5g.js → index.JxDTXE8N.js} +1 -1
- streamlit/static/static/js/{index.CaU3Uv_L.js → index.KGr28TP8.js} +1 -1
- streamlit/static/static/js/{index.465nmxtO.js → index.Pgm3rRpH.js} +1 -1
- streamlit/static/static/js/{index.DpSc4e1j.js → index.XzcYOc9I.js} +1 -1
- streamlit/static/static/js/{index.OizPL4jg.js → index.Z_u7ZS4h.js} +1 -1
- streamlit/static/static/js/{index.CL7it7tU.js → index.hDg7x0Tp.js} +1 -1
- streamlit/static/static/js/{index.b_f-McZ5.js → index.k7p0hmaU.js} +1 -1
- streamlit/static/static/js/{index.CsEZTo6L.js → index.syoxWolF.js} +1 -1
- streamlit/static/static/js/{index.Q2t_iBn0.js → index.xZ651bTg.js} +1 -1
- streamlit/static/static/js/{input.CAtwSQ27.js → input.C-PwAMG6.js} +1 -1
- streamlit/static/static/js/{main.VeMVx6VI.js → main.fMmyxXOf.js} +1 -1
- streamlit/static/static/js/{memory.CxS_lIUn.js → memory.BG__eDEj.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CoqRgZW_.js → number-overlay-editor.C0n-91sR.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.DGWgd5sM.js → pandasStylerUtils.BqWaUzvh.js} +1 -1
- streamlit/static/static/js/{sandbox.2mSqEau0.js → sandbox.CHhc-txg.js} +1 -1
- streamlit/static/static/js/{sprintfjs.CsoVVZ9k.js → sprintfjs.BlFBKfMf.js} +1 -1
- streamlit/static/static/js/{styled-components.BShfh7J8.js → styled-components.D5uOQqN2.js} +1 -1
- streamlit/static/static/js/{throttle.Fq1DQK4p.js → throttle.DlZC3xNA.js} +1 -1
- streamlit/static/static/js/{timepicker.DmyY-qtn.js → timepicker._TfRUaDL.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.Dvd9AIqV.js → toConsumableArray.CZW4AmuW.js} +2 -2
- streamlit/static/static/js/uniqueId.CTTDAAaF.js +1 -0
- streamlit/static/static/js/useBasicWidgetState.Bx27912z.js +1 -0
- streamlit/static/static/js/{useIntlLocale.kdIj0ego.js → useIntlLocale.DsOvysl7.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.DkuG1C1S.js → useTextInputAutoExpand.C9g8px1W.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.-UI_JsjT.js → useUpdateUiValue.fF-Cntkp.js} +1 -1
- streamlit/static/static/js/{useWaveformController.C5PTwL6I.js → useWaveformController.C5EtFoJE.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.BREyS0pJ.js → withCalculatedWidth.CcvaXQb0.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.DYDiEOrW.js → withFullScreenWrapper.DP61hzLF.js} +1 -1
- streamlit/testing/v1/element_tree.py +20 -15
- streamlit/web/server/app_static_file_handler.py +9 -0
- streamlit/web/server/bidi_component_request_handler.py +4 -4
- streamlit/web/server/component_file_utils.py +14 -6
- streamlit/web/server/component_request_handler.py +2 -2
- streamlit/web/server/routes.py +14 -0
- streamlit/web/server/server.py +4 -0
- streamlit/web/server/starlette/starlette_app.py +7 -1
- streamlit/web/server/starlette/starlette_path_security_middleware.py +97 -0
- streamlit/web/server/starlette/starlette_routes.py +6 -3
- streamlit/web/server/starlette/starlette_static_routes.py +14 -4
- {streamlit_nightly-1.53.2.dev20260202.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.53.2.dev20260202.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/RECORD +135 -131
- streamlit/proto/Arrow_pb2.py +0 -34
- streamlit/static/static/js/index.CAoX2tlo.js +0 -2
- streamlit/static/static/js/index.DDr-BLbJ.js +0 -1
- streamlit/static/static/js/index.DL_ywOgf.js +0 -11
- streamlit/static/static/js/uniqueId.CCajdEK8.js +0 -1
- streamlit/static/static/js/useBasicWidgetState.COLQ5AFB.js +0 -1
- {streamlit_nightly-1.53.2.dev20260202.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.53.2.dev20260202.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.53.2.dev20260202.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{V as Q,e as Z,bx as me,by as ge,z as he,r as d,l as ye,bz as k,al as _,j as A,aO as pe,bA as H,bB as Ee,a0 as be,a1 as Ce,o as Fe,$ as Se,aN as we,n as Ne,S as Oe}from"./index.y5HxPwg9.js";import{bC as nr}from"./index.y5HxPwg9.js";import{w as Ae}from"./withCalculatedWidth.BREyS0pJ.js";import{C as W,a as Y}from"./urls.BwSlolu9.js";import{D as Re,a as Ie}from"./IFrameUtil.DefezniK.js";const v="%[a-f0-9]{2}",G=new RegExp("("+v+")|([^%]+?)","gi"),B=new RegExp("("+v+")+","gi");function T(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;const t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],T(t),T(n))}function _e(e){try{return decodeURIComponent(e)}catch{let r=e.match(G)||[];for(let t=1;t<r.length;t++)e=T(r,t).join(""),r=e.match(G)||[];return e}}function Te(e){const r={"%FE%FF":"��","%FF%FE":"��"};let t=B.exec(e);for(;t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{const a=_e(t[0]);a!==t[0]&&(r[t[0]]=a)}t=B.exec(e)}r["%C2"]="�";const n=Object.keys(r);for(const a of n)e=e.replace(new RegExp(a,"g"),r[a]);return e}function xe(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return Te(e)}}function Ue(e,r){const t={};if(Array.isArray(r))for(const n of r){const a=Object.getOwnPropertyDescriptor(e,n);a?.enumerable&&Object.defineProperty(t,n,a)}else for(const n of Reflect.ownKeys(e)){const a=Object.getOwnPropertyDescriptor(e,n);if(a.enumerable){const s=e[n];r(n,s,e)&&Object.defineProperty(t,n,a)}}return t}function ee(e,r){if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||r==="")return[];const t=e.indexOf(r);return t===-1?[]:[e.slice(0,t),e.slice(t+r.length)]}const $e=e=>e==null,Me=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),x=Symbol("encodeFragmentIdentifier");function Le(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{const a=t.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[",a,"]"].join("")]:[...t,[c(r,e),"[",c(a,e),"]=",c(n,e)].join("")]};case"bracket":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[]"].join("")]:[...t,[c(r,e),"[]=",c(n,e)].join("")];case"colon-list-separator":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),":list="].join("")]:[...t,[c(r,e),":list=",c(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const r=e.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(n,a)=>a===void 0||e.skipNull&&a===null||e.skipEmptyString&&a===""?n:(a=a===null?"":a,n.length===0?[[c(t,e),r,c(a,e)].join("")]:[[n,c(a,e)].join(e.arrayFormatSeparator)])}default:return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,c(r,e)]:[...t,[c(r,e),"=",c(n,e)].join("")]}}function je(e){let r;switch(e.arrayFormat){case"index":return(t,n,a)=>{if(r=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!r){a[t]=n;return}a[t]===void 0&&(a[t]={}),a[t][r[1]]=n};case"bracket":return(t,n,a)=>{if(r=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!r){a[t]=n;return}if(a[t]===void 0){a[t]=[n];return}a[t]=[...a[t],n]};case"colon-list-separator":return(t,n,a)=>{if(r=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!r){a[t]=n;return}if(a[t]===void 0){a[t]=[n];return}a[t]=[...a[t],n]};case"comma":case"separator":return(t,n,a)=>{const o=typeof n=="string"&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(i=>h(i,e)):n===null?n:h(n,e);a[t]=o};case"bracket-separator":return(t,n,a)=>{const s=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!s){a[t]=n&&h(n,e);return}const o=n===null?[]:h(n,e).split(e.arrayFormatSeparator);if(a[t]===void 0){a[t]=o;return}a[t]=[...a[t],...o]};default:return(t,n,a)=>{if(a[t]===void 0){a[t]=n;return}a[t]=[...[a[t]].flat(),n]}}}function re(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,r){return r.encode?r.strict?Me(e):encodeURIComponent(e):e}function h(e,r){return r.decode?xe(e):e}function te(e){return Array.isArray(e)?e.sort():typeof e=="object"?te(Object.keys(e)).sort((r,t)=>Number(r)-Number(t)).map(r=>e[r]):e}function ne(e){const r=e.indexOf("#");return r!==-1&&(e=e.slice(0,r)),e}function De(e){let r="";const t=e.indexOf("#");return t!==-1&&(r=e.slice(t)),r}function q(e,r,t){return t==="string"&&typeof e=="string"?e:typeof t=="function"&&typeof e=="string"?t(e):t==="boolean"&&e===null?!0:t==="boolean"&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":t==="boolean"&&e!==null&&(e.toLowerCase()==="1"||e.toLowerCase()==="0")?e.toLowerCase()==="1":t==="string[]"&&r.arrayFormat!=="none"&&typeof e=="string"?[e]:t==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?[Number(e)]:t==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):r.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function U(e){e=ne(e);const r=e.indexOf("?");return r===-1?"":e.slice(r+1)}function $(e,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},re(r.arrayFormatSeparator);const t=je(r),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(const a of e.split("&")){if(a==="")continue;const s=r.decode?a.replaceAll("+"," "):a;let[o,i]=ee(s,"=");o===void 0&&(o=s),i=i===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?i:h(i,r),t(h(o,r),i,n)}for(const[a,s]of Object.entries(n))if(typeof s=="object"&&s!==null&&r.types[a]!=="string")for(const[o,i]of Object.entries(s)){const l=r.types[a],f=typeof l=="function"?l:l?l.replace("[]",""):void 0;s[o]=q(i,r,f)}else typeof s=="object"&&s!==null&&r.types[a]==="string"?n[a]=Object.values(s).join(r.arrayFormatSeparator):n[a]=q(s,r,r.types[a]);return r.sort===!1?n:(r.sort===!0?Object.keys(n).sort():Object.keys(n).sort(r.sort)).reduce((a,s)=>{const o=n[s];return a[s]=o&&typeof o=="object"&&!Array.isArray(o)?te(o):o,a},Object.create(null))}function ae(e,r){if(!e)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},re(r.arrayFormatSeparator);const t=o=>r.skipNull&&$e(e[o])||r.skipEmptyString&&e[o]==="",n=Le(r),a={};for(const[o,i]of Object.entries(e))t(o)||(a[o]=i);const s=Object.keys(a);return r.sort!==!1&&s.sort(r.sort),s.map(o=>{let i=e[o];if(r.replacer&&(i=r.replacer(o,i),i===void 0)||i===void 0)return"";if(i===null)return c(o,r);if(Array.isArray(i)){if(i.length===0&&r.arrayFormat==="bracket-separator")return c(o,r)+"[]";let l=i;return r.replacer&&(l=i.map((f,u)=>r.replacer(`${o}[${u}]`,f)).filter(f=>f!==void 0)),l.reduce(n(o),[]).join("&")}return c(o,r)+"="+c(i,r)}).filter(o=>o.length>0).join("&")}function se(e,r){r={decode:!0,...r};let[t,n]=ee(e,"#");return t===void 0&&(t=e),{url:t?.split("?")?.[0]??"",query:$(U(e),r),...r&&r.parseFragmentIdentifier&&n?{fragmentIdentifier:h(n,r)}:{}}}function oe(e,r){r={encode:!0,strict:!0,[x]:!0,...r};const t=ne(e.url).split("?")[0]||"",n=U(e.url),a={...$(n,{sort:!1,...r}),...e.query};let s=ae(a,r);s&&=`?${s}`;let o=De(e.url);if(typeof e.fragmentIdentifier=="string"){const i=new URL(t);i.hash=e.fragmentIdentifier,o=r[x]?i.hash:`#${e.fragmentIdentifier}`}return`${t}${s}${o}`}function ie(e,r,t){t={parseFragmentIdentifier:!0,[x]:!1,...t};const{url:n,query:a,fragmentIdentifier:s}=se(e,t);return oe({url:n,query:Ue(a,r),fragmentIdentifier:s},t)}function Pe(e,r,t){const n=Array.isArray(r)?a=>!r.includes(a):(a,s)=>!r(a,s);return ie(e,n,t)}const Ve=Object.freeze(Object.defineProperty({__proto__:null,exclude:Pe,extract:U,parse:$,parseUrl:se,pick:ie,stringify:ae,stringifyUrl:oe},Symbol.toStringTag,{value:"Module"}));var w=(function(e){return e.COMPONENT_READY="streamlit:componentReady",e.SET_COMPONENT_VALUE="streamlit:setComponentValue",e.SET_FRAME_HEIGHT="streamlit:setFrameHeight",e})({}),ke=(function(e){return e.RENDER="streamlit:render",e})({});const He=1,C=Q.getLogger("componentUtils");function We(e){return(r,t)=>{if(!e.current)return;const{isReady:n,element:a,widgetMgr:s,setComponentError:o,componentReadyCallback:i,frameHeightCallback:l,fragmentId:f}=e.current,u=n();switch(r){case w.COMPONENT_READY:{const{apiVersion:y}=t;y!==He?o(new Error(`Unrecognized component API version: '${y}'`)):i();break}case w.SET_COMPONENT_VALUE:u?Ge(K(t,"value"),t.dataType,{fromUi:!0},a,s,f):C.warn(`Got ${r} before ${w.COMPONENT_READY}!`);break;case w.SET_FRAME_HEIGHT:u?l(K(t,"height")):C.warn(`Got ${r} before ${w.COMPONENT_READY}!`);break;default:C.warn(`Unrecognized ComponentBackMsgType: ${r}`)}}}function Ye(e,r){const t=JSON.parse(e),n=[];for(const a of r){const{key:s}=a;switch(a.value?.toLowerCase()){case"arrowdataframe":n.push({key:s,value:ge.toObject(a.arrowDataframe)});break;case"bytes":t[s]=a.bytes;break;default:throw new Error(`Unrecognized SpecialArg type: ${a.value}`)}}return[t,n]}function z(e,r,t,n,a){if(!a){C.warn("Can't send ForwardMsg; missing our iframe!");return}if(Z(a.contentWindow)){C.warn("Can't send ForwardMsg; iframe has no contentWindow!");return}a.contentWindow.postMessage({type:ke.RENDER,args:e,dfs:r,disabled:t,theme:{...me(n),font:n.genericFonts.bodyFont}},"*")}function Ge(e,r,t,n,a,s){if(e===void 0){C.warn("handleSetComponentValue: missing 'value' prop");return}switch(r){case"dataframe":a.setArrowValue(n,e,t,s);break;case"bytes":a.setBytesValue(n,e,t,s);break;default:a.setJsonValue(n,e,t,s)}}function K(e,r,t=void 0){return Object.hasOwn(e,r)?e[r]:t}const Be=he("iframe",{target:"edxyb2x0"})(({theme:e,componentReady:r})=>({colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,display:r?"initial":"none"})),R=Q.getLogger("ComponentInstance"),J=6e4;function qe(e,r,t){let n;Ne(t)&&t!==""?n=t:n=r.getComponentURL(e,"index.html");const a=Oe.CUSTOM_COMPONENT_CLIENT_ID,s=new URL(window.location.href);return n=Ve.stringifyUrl({url:n,query:{streamlitUrl:s.origin+s.pathname,...a&&{__streamlit_parent_client_id:a}}}),n}function X(e,r){let t;return r&&r!==""?t=`Your app is having trouble loading the **${e}** component.
|
|
2
|
-
The app is attempting to load the component from **${r}**,
|
|
3
|
-
and hasn't received its \`Streamlit.setComponentReady()\` message.
|
|
4
|
-
|
|
5
|
-
If this is a development build, have you started the dev server?
|
|
6
|
-
|
|
7
|
-
For more troubleshooting help, please see the [Streamlit Component docs](${W}) or visit our [forums](${Y}).`:t=`Your app is having trouble loading the **${e}** component.
|
|
8
|
-
|
|
9
|
-
If this is an installed component that works locally, the app may be having trouble accessing the component frontend assets due to network latency or proxy settings in your app deployment.
|
|
10
|
-
|
|
11
|
-
For more troubleshooting help, please see the [Streamlit Component docs](${W}) or visit our [forums](${Y}).`,t}function ze(e,r,t,n){if(!n)try{return Ye(e,r)}catch(a){const s=we(a);t(s)}return[{},[]]}function Ke(e,r){return e===r||e.length===r.length&&e.every((t,n)=>{const a=r[n];return t.key===a.key&&t.value===a.value})}function Je(e){const r=ye(),[t,n]=d.useState(),{disabled:a,element:s,widgetMgr:o,width:i,fragmentId:l,componentRegistry:f}=e,{componentName:u,jsonArgs:y,specialArgs:ce,url:N}=s,[I,M]=ze(y,ce,n,t),F=d.useMemo(()=>qe(u,f,N),[u,f,N]),m=d.useRef({args:{},dataframeArgs:[]}),L=Ke(m.current.dataframeArgs,M);m.current.args=I,m.current.dataframeArgs=M;const[S,j]=d.useState(),[p,fe]=d.useState(()=>isNaN(I.height)?void 0:I.height),g=d.useRef(!1),E=d.useRef(null),D=d.useRef(),{clear:P}=k(()=>R.warn(X(u,N)),J/4),{clear:V}=k(()=>{_.flushSync(()=>{j(!0)})},J);if(d.useEffect(()=>{f.checkSourceUrlResponse(F,u)},[F,u,f]),d.useEffect(()=>{S&&!g.current&&(R.error(`Client Error: Custom Component ${u} timeout error`),f.sendTimeoutError(F,u))},[S,F,u,f]),d.useEffect(()=>{g.current&&z(m.current.args,m.current.dataframeArgs,a,r,E.current??void 0)},[a,p,L,y,r,i]),d.useEffect(()=>{const b=O=>{if(O===void 0){R.warn("handleSetFrameHeight: missing 'height' prop");return}if(O!==p){if(Z(E.current)){R.warn("handleSetFrameHeight: missing our iframeRef!");return}E.current.height=O.toString(),_.flushSync(()=>{fe(O)})}},le=()=>{z(m.current.args,m.current.dataframeArgs,a,r,E.current??void 0),P(),V(),g.current=!0,_.flushSync(()=>{j(!1)})};D.current={isReady:()=>g.current,element:s,widgetMgr:o,setComponentError:n,componentReadyCallback:le,frameHeightCallback:b,fragmentId:l}},[u,a,s,p,L,S,y,r,o,V,P,l]),d.useEffect(()=>{const b=E.current?.contentWindow??void 0;if(b)return f.registerListener(b,We(D)),()=>{b&&f.deregisterListener(b)}},[f,u]),t)return A(pe,{name:t.name,message:t.message});const ue=!g.current&&!S&&p!==0&&A(Ee,{element:H.create({height:p,style:H.SkeletonStyle.ELEMENT})}),de=!g.current&&S?A(Ce,{body:X(u,N),kind:be.WARNING}):null;return Fe(Se,{children:[ue,de,A(Be,{className:"stCustomComponentV1","data-testid":"stCustomComponentV1",allow:Ie,ref:E,src:F,width:i,height:p??0,scrolling:"no",sandbox:Re,title:u,componentReady:g.current,tabIndex:s.tabIndex??void 0})]})}const er=Ae(d.memo(Je));export{er as ComponentInstance,nr as ComponentRegistry};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as i}from"./index.y5HxPwg9.js";var n=0;function u(r){var t=++n;return i(r)+t}export{u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,e as C}from"./index.y5HxPwg9.js";import{u as h}from"./FormClearHelper.zxJ53Nym.js";function p({getStateFromWidgetMgr:i,getDefaultState:r,updateWidgetMgrState:l,element:s,widgetMgr:u,fragmentId:o,onFormCleared:f}){const[n,t]=e.useState(()=>i(u,s)??r(u,s)),[c,a]=e.useState({value:n,fromUi:!1});e.useEffect(()=>{C(c)||(a(null),t(c.value),l(s,u,c,o))},[c,l,s,u,o]);const V=e.useCallback(()=>{a({value:r(u,s),fromUi:!0}),f?.()},[a,s,r,u,f]);return h({widgetMgr:u,element:s,onFormCleared:V}),[n,a]}function W({getStateFromWidgetMgr:i,getDefaultStateFromProto:r,getCurrStateFromProto:l,updateWidgetMgrState:s,element:u,widgetMgr:o,fragmentId:f,onFormCleared:n}){const t=e.useCallback((V,x)=>r(x),[r]),[c,a]=p({getStateFromWidgetMgr:i,getDefaultState:t,updateWidgetMgrState:s,element:u,widgetMgr:o,fragmentId:f,onFormCleared:n});return e.useEffect(()=>{u.setValue&&(u.setValue=!1,a({value:l(u),fromUi:!1}))},[u,l,a]),[c,a]}export{p as a,W as u};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|