fix(frontend): 修复 manualChunks 循环依赖导致生产白屏
仅拆分 codemirror/xterm/icons 独立库,避免 vendor-charts 与 vendor-react 循环引用。
This commit is contained in:
1 parent
d0cf71b05a
commit
bdf1f41464
219 files changed
+357
-414
No files matched your search
@@ -0,0 +1 @@
|
||||
import{r as n,j as l}from"./vendor-codemirror-C7mXSpXt.js";import{O as ot,Q as Ee,J as nt,v as be,T as rt,r as st,K as Ie,U as lt,w as L,V as at,s as j,x as P,W as $,X as ct,Y as Re,Z as it,$ as dt,a0 as ut,a1 as pt,a2 as ft,a3 as mt,a4 as ht,a5 as gt,a6 as Pe,a7 as vt,m as te}from"./index-BZzvNKfa.js";import{u as xt}from"./index-CYARH0Cq.js";import{Q as Ne,w as St,O as wt}from"./vendor-icons-DIDdqO_o.js";function yt(t){const o=Ct(t),e=n.forwardRef((s,r)=>{const{children:d,...a}=s,c=n.Children.toArray(d),i=c.find(Tt);if(i){const p=i.props.children,g=c.map(x=>x===i?n.Children.count(p)>1?n.Children.only(null):n.isValidElement(p)?p.props.children:null:x);return l.jsx(o,{...a,ref:r,children:n.isValidElement(p)?n.cloneElement(p,void 0,g):null})}return l.jsx(o,{...a,ref:r,children:d})});return e.displayName=`${t}.Slot`,e}function Ct(t){const o=n.forwardRef((e,s)=>{const{children:r,...d}=e;if(n.isValidElement(r)){const a=Pt(r),c=bt(d,r.props);return r.type!==n.Fragment&&(c.ref=s?ot(s,a):a),n.cloneElement(r,c)}return n.Children.count(r)>1?n.Children.only(null):null});return o.displayName=`${t}.SlotClone`,o}var It=Symbol("radix.slottable");function Tt(t){return n.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===It}function bt(t,o){const e={...o};for(const s in o){const r=t[s],d=o[s];/^on[A-Z]/.test(s)?r&&d?e[s]=(...c)=>{const i=d(...c);return r(...c),i}:r&&(e[s]=r):s==="style"?e[s]={...r,...d}:s==="className"&&(e[s]=[r,d].filter(Boolean).join(" "))}return{...t,...e}}function Pt(t){let o=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,e=o&&"isReactWarning"in o&&o.isReactWarning;return e?t.ref:(o=Object.getOwnPropertyDescriptor(t,"ref")?.get,e=o&&"isReactWarning"in o&&o.isReactWarning,e?t.props.ref:t.props.ref||t.ref)}var Et=[" ","Enter","ArrowUp","ArrowDown"],Rt=[" ","Enter"],Q="Select",[ie,de,Nt]=lt(Q),[oe]=st(Q,[Nt,Ee]),ue=Ee(),[_t,G]=oe(Q),[jt,Mt]=oe(Q),_e=t=>{const{__scopeSelect:o,children:e,open:s,defaultOpen:r,onOpenChange:d,value:a,defaultValue:c,onValueChange:i,dir:p,name:g,autoComplete:x,disabled:E,required:T,form:C}=t,u=ue(o),[h,S]=n.useState(null),[m,v]=n.useState(null),[F,M]=n.useState(!1),ne=nt(p),[R,A]=be({prop:s,defaultProp:r??!1,onChange:d,caller:Q}),[U,Z]=be({prop:a,defaultProp:c,onChange:i,caller:Q}),k=n.useRef(null),V=h?C||!!h.closest("form"):!0,[z,B]=n.useState(new Set),H=Array.from(z).map(N=>N.props.value).join(";");return l.jsx(rt,{...u,children:l.jsxs(_t,{required:T,scope:o,trigger:h,onTriggerChange:S,valueNode:m,onValueNodeChange:v,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:Z,open:R,onOpenChange:A,dir:ne,triggerPointerDownPosRef:k,disabled:E,children:[l.jsx(ie.Provider,{scope:o,children:l.jsx(jt,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(N=>{B(D=>new Set(D).add(N))},[]),onNativeOptionRemove:n.useCallback(N=>{B(D=>{const W=new Set(D);return W.delete(N),W})},[]),children:e})}),V?l.jsxs(Qe,{"aria-hidden":!0,required:T,tabIndex:-1,name:g,autoComplete:x,value:U,onChange:N=>Z(N.target.value),disabled:E,form:C,children:[U===void 0?l.jsx("option",{value:""}):null,Array.from(z)]},H):null]})})};_e.displayName=Q;var je="SelectTrigger",Me=n.forwardRef((t,o)=>{const{__scopeSelect:e,disabled:s=!1,...r}=t,d=ue(e),a=G(je,e),c=a.disabled||s,i=L(o,a.onTriggerChange),p=de(e),g=n.useRef("touch"),[x,E,T]=et(u=>{const h=p().filter(v=>!v.disabled),S=h.find(v=>v.value===a.value),m=tt(h,u,S);m!==void 0&&a.onValueChange(m.value)}),C=u=>{c||(a.onOpenChange(!0),T()),u&&(a.triggerPointerDownPosRef.current={x:Math.round(u.pageX),y:Math.round(u.pageY)})};return l.jsx(at,{asChild:!0,...d,children:l.jsx(j.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Je(a.value)?"":void 0,...r,ref:i,onClick:P(r.onClick,u=>{u.currentTarget.focus(),g.current!=="mouse"&&C(u)}),onPointerDown:P(r.onPointerDown,u=>{g.current=u.pointerType;const h=u.target;h.hasPointerCapture(u.pointerId)&&h.releasePointerCapture(u.pointerId),u.button===0&&u.ctrlKey===!1&&u.pointerType==="mouse"&&(C(u),u.preventDefault())}),onKeyDown:P(r.onKeyDown,u=>{const h=x.current!=="";!(u.ctrlKey||u.altKey||u.metaKey)&&u.key.length===1&&E(u.key),!(h&&u.key===" ")&&Et.includes(u.key)&&(C(),u.preventDefault())})})})});Me.displayName=je;var Oe="SelectValue",Ae=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:r,children:d,placeholder:a="",...c}=t,i=G(Oe,e),{onValueNodeHasChildrenChange:p}=i,g=d!==void 0,x=L(o,i.onValueNodeChange);return $(()=>{p(g)},[p,g]),l.jsx(j.span,{...c,ref:x,style:{pointerEvents:"none"},children:Je(i.value)?l.jsx(l.Fragment,{children:a}):d})});Ae.displayName=Oe;var Ot="SelectIcon",De=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:s,...r}=t;return l.jsx(j.span,{"aria-hidden":!0,...r,ref:o,children:s||"▼"})});De.displayName=Ot;var At="SelectPoLine truncated
|
||||
Reference in new issue
Block a user