@ctrl/dom 0.1.15 → 0.2.0
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.
- package/README.md +44 -0
- package/dist/bridge/internal.js +1 -1
- package/dist/dom/_chunks/src-CaVKwScX.js +49 -0
- package/dist/dom/index.js +1 -1
- package/dist/dom/internal.js +1 -1
- package/dist/dom/types/css/cascade.d.ts +10 -3
- package/dist/dom/types/css/cssom.d.ts +9 -3
- package/dist/dom/types/css/parser.d.ts +27 -0
- package/dist/dom/types/css/style-deps.d.ts +11 -0
- package/dist/dom/types/events/listeners.d.ts +24 -2
- package/dist/dom/types/html/elements.d.ts +3 -2
- package/dist/dom/types/html/forms/HTMLButtonElement.d.ts +4 -3
- package/dist/dom/types/html/forms/HTMLFieldSetElement.d.ts +3 -2
- package/dist/dom/types/html/forms/HTMLInputElement.d.ts +11 -36
- package/dist/dom/types/html/forms/HTMLOutputElement.d.ts +6 -5
- package/dist/dom/types/html/forms/HTMLSelectElement.d.ts +6 -5
- package/dist/dom/types/html/forms/HTMLTextAreaElement.d.ts +10 -15
- package/dist/dom/types/html/forms/control-state.d.ts +33 -0
- package/dist/dom/types/html/forms/face.d.ts +3 -2
- package/dist/dom/types/html/forms/form-associated.d.ts +15 -3
- package/dist/dom/types/html/forms/user-validity.d.ts +2 -2
- package/dist/dom/types/html/forms/validation.d.ts +2 -2
- package/dist/dom/types/internal.d.ts +3 -2
- package/dist/dom/types/keys.d.ts +9 -16
- package/dist/dom/types/nodes/Document.d.ts +6 -2
- package/dist/dom/types/nodes/attributes.d.ts +1 -1
- package/dist/dom/types/nodes/cache.d.ts +1 -1
- package/dist/dom/types/nodes/constants.d.ts +5 -0
- package/dist/dom/types/selectors/compile.d.ts +8 -0
- package/dist/dom/types/selectors/internal.d.ts +3 -1
- package/dist/dom/types/window/clock.d.ts +30 -0
- package/dist/dom/types/window/file-reset.d.ts +22 -0
- package/dist/jest-dom/_chunks/{matchers-CkxM783o.cjs → matchers-CZ6Smfw9.cjs} +2 -2
- package/dist/jest-dom/_chunks/{matchers-Dt7W4g5X.js → matchers-CwGF61j-.js} +2 -2
- package/dist/jest-dom/index.cjs +1 -1
- package/dist/jest-dom/index.js +1 -1
- package/dist/jest-dom/jest-globals.cjs +1 -1
- package/dist/jest-dom/jest-globals.js +1 -1
- package/dist/jest-dom/matchers.cjs +1 -1
- package/dist/jest-dom/matchers.js +1 -1
- package/dist/jest-dom/vitest.cjs +1 -1
- package/dist/jest-dom/vitest.js +1 -1
- package/dist/react/_chunks/pure-CYb0HgYU.js +1 -0
- package/dist/react/_chunks/pure-DRugbA0j.cjs +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/pure.cjs +1 -1
- package/dist/react/pure.js +1 -1
- package/dist/testing-library/index.cjs +2 -2
- package/dist/testing-library/index.js +7 -7
- package/dist/user-event/index.cjs +15 -15
- package/dist/user-event/index.js +15 -15
- package/dist/user-event/types/ctrl-dom.d.ts +8 -0
- package/dist/vitest-environment/_chunks/rolldown-runtime-H3fMLYWS.js +1 -0
- package/dist/vitest-environment/failure-snapshot.js +1 -1
- package/dist/vitest-environment/index.js +1 -1
- package/dist/vitest-environment/jsx-dev-runtime.js +1 -0
- package/dist/vitest-environment/jsx-runtime.js +1 -0
- package/dist/vitest-environment/plugin.js +1 -1
- package/dist/vitest-environment/shared-workers.js +1 -0
- package/dist/vitest-environment/types/jsx-dev-runtime.d.ts +3 -0
- package/dist/vitest-environment/types/jsx-runtime.d.ts +4 -0
- package/dist/vitest-environment/types/plugin.d.ts +19 -0
- package/dist/vitest-environment/types/shared-workers.d.ts +1 -0
- package/package.json +13 -1
- package/dist/dom/_chunks/src-C4oa-U7z.js +0 -49
- package/dist/react/_chunks/pure-D7Z4g4oF.js +0 -1
- package/dist/react/_chunks/pure-DOgNQrwu.cjs +0 -1
- package/dist/vitest-environment/_chunks/rolldown-runtime-BhWHdk3m.js +0 -1
package/dist/dom/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{wr as AbstractRange,fs as AnimationEvent,Ga as Attr,Zt as Audio,ps as BeforeUnloadEvent,eo as CDATASection,t as CSS,fi as CSSConditionRule,pi as CSSContainerRule,mi as CSSFontFaceRule,hi as CSSGroupingRule,gi as CSSImportRule,_i as CSSKeyframeRule,vi as CSSKeyframesRule,yi as CSSLayerBlockRule,bi as CSSLayerStatementRule,xi as CSSMediaRule,Si as CSSNamespaceRule,Ci as CSSNestedDeclarations,wi as CSSPageRule,Ti as CSSPropertyRule,Ei as CSSRule,Di as CSSRuleList,Oi as CSSScopeRule,ki as CSSStartingStyleRule,Xi as CSSStyleDeclaration,Ai as CSSStyleRule,ji as CSSStyleSheet,Mi as CSSSupportsRule,to as CharacterData,lr as Clipboard,Os as ClipboardEvent,ur as ClipboardItem,ms as CloseEvent,kr as CommandEvent,no as Comment,ks as CompositionEvent,xa as CustomElementRegistry,hs as CustomEvent,Yn as CustomStateSet,gr as DOMImplementation,Ma as DOMMatrix,Na as DOMMatrixReadOnly,mr as DOMParser,Pa as DOMPoint,Fa as DOMPointReadOnly,Ia as DOMRect,La as DOMRectList,Ra as DOMRectReadOnly,Ka as DOMStringMap,qa as DOMTokenList,T as DataTransfer,E as DataTransferItem,D as DataTransferItemList,_r as Document,_r as HTMLDocument,$a as DocumentFragment,Qa as DocumentType,As as DragEvent,Da as Element,Xn as ElementInternals,gs as ErrorEvent,Ys as Event,es as EventTarget,et as FileList,A as FileReader,js as FocusEvent,F as FormData,_s as FormDataEvent,rn as HTMLAnchorElement,in as HTMLAreaElement,Qt as HTMLAudioElement,an as HTMLBRElement,on as HTMLBaseElement,sn as HTMLBodyElement,G as HTMLButtonElement,cn as HTMLCanvasElement,ao as HTMLCollection,ln as HTMLDListElement,un as HTMLDataElement,R as HTMLDataListElement,Yt as HTMLDetailsElement,Xt as HTMLDialogElement,dn as HTMLDirectoryElement,fn as HTMLDivElement,Zn as HTMLElement,pn as HTMLEmbedElement,H as HTMLFieldSetElement,mn as HTMLFontElement,na as HTMLFormControlsCollection,L as HTMLFormElement,hn as HTMLFrameElement,gn as HTMLFrameSetElement,_n as HTMLHRElement,vn as HTMLHeadElement,yn as HTMLHeadingElement,bn as HTMLHtmlElement,xn as HTMLIFrameElement,Sn as HTMLImageElement,Q as HTMLInputElement,Cn as HTMLLIElement,W as HTMLLabelElement,U as HTMLLegendElement,Ut as HTMLLinkElement,wn as HTMLMapElement,Tn as HTMLMarqueeElement,$t as HTMLMediaElement,En as HTMLMenuElement,Dn as HTMLMetaElement,z as HTMLMeterElement,On as HTMLModElement,kn as HTMLOListElement,An as HTMLObjectElement,K as HTMLOptGroupElement,q as HTMLOptionElement,ra as HTMLOptionsCollection,B as HTMLOutputElement,jn as HTMLParagraphElement,Mn as HTMLParamElement,Nn as HTMLPictureElement,Pn as HTMLPreElement,V as HTMLProgressElement,Fn as HTMLQuoteElement,Wt as HTMLScriptElement,X as HTMLSelectElement,qt as HTMLSlotElement,In as HTMLSourceElement,Ln as HTMLSpanElement,Gt as HTMLStyleElement,Rn as HTMLTableCaptionElement,zn as HTMLTableCellElement,Bn as HTMLTableColElement,Vn as HTMLTableElement,Hn as HTMLTableRowElement,Un as HTMLTableSectionElement,Jt as HTMLTemplateElement,Z as HTMLTextAreaElement,Wn as HTMLTimeElement,Kt as HTMLTitleElement,Gn as HTMLTrackElement,Kn as HTMLUListElement,qn as HTMLUnknownElement,en as HTMLVideoElement,vs as HashChangeEvent,fr as History,Jn as Image,Ms as InputEvent,O as IntersectionObserver,Ns as KeyboardEvent,pr as Location,nt as MathMLElement,tn as MediaError,Ni as MediaList,si as MediaQueryList,ui as MediaQueryListEvent,ys as MessageEvent,Ps as MouseEvent,w as MutationObserver,Po as MutationRecord,Ua as NamedNodeMap,dr as Navigator,fo as Node,xr as NodeFilter,Sr as NodeIterator,Fo as NodeList,J as Option,bs as PageTransitionEvent,Fs as PointerEvent,xs as PopStateEvent,ro as ProcessingInstruction,Ss as ProgressEvent,Cs as PromiseRejectionEvent,ia as RadioNodeList,Tr as Range,k as ResizeObserver,rt as SVGAElement,it as SVGAnimatedString,at as SVGCircleElement,ot as SVGClipPathElement,st as SVGDefsElement,ct as SVGDescElement,lt as SVGElement,ut as SVGEllipseElement,dt as SVGFilterElement,ft as SVGForeignObjectElement,pt as SVGGElement,mt as SVGGeometryElement,ht as SVGGradientElement,gt as SVGGraphicsElement,_t as SVGImageElement,vt as SVGLineElement,yt as SVGLinearGradientElement,bt as SVGMarkerElement,xt as SVGMaskElement,St as SVGMetadataElement,Ct as SVGPathElement,wt as SVGPatternElement,Tt as SVGPolygonElement,Et as SVGPolylineElement,Dt as SVGRadialGradientElement,Ot as SVGRectElement,kt as SVGSVGElement,At as SVGScriptElement,jt as SVGStopElement,Mt as SVGStyleElement,Nt as SVGSwitchElement,Pt as SVGSymbolElement,Ft as SVGTSpanElement,It as SVGTextContentElement,Lt as SVGTextElement,Rt as SVGTextPathElement,zt as SVGTextPositioningElement,Bt as SVGTitleElement,Vt as SVGUseElement,Ht as SVGViewElement,sr as Screen,br as Selection,Ja as ShadowRoot,Er as StaticRange,or as Storage,ws as StorageEvent,Pi as StyleSheet,Fi as StyleSheetList,Ts as SubmitEvent,io as Text,Is as TextEvent,nn as TimeRanges,Es as ToggleEvent,Ls as Touch,Rs as TouchEvent,zs as TouchList,Ds as TransitionEvent,Cr as TreeWalker,Bs as UIEvent,ta as ValidityState,cr as VisualViewport,Vs as WheelEvent,tr as Window,vr as XMLDocument,j as XMLHttpRequest,M as XMLHttpRequestEventTarget,N as XMLHttpRequestUpload,hr as XMLSerializer,nr as createWindow,cs as currentDocument,ls as currentWindow,us as currentWindowOrNull,Rr as getComputedStyle,P as installGlobals,ds as setCurrentWindow}from"./_chunks/src-CaVKwScX.js";
|
package/dist/dom/internal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,$c as t,$d as n,$i as r,$l as i,$n as a,$r as o,$s as s,$u as c,Aa as ee,Ac as te,Ad as l,Af as ne,Al as re,Ao as ie,Ar as ae,Au as u,Ba as oe,Bc as se,Bd as ce,Bf as le,Bi as ue,Bl as de,Bo as fe,Br as pe,Bu as me,C as he,Ca as ge,Cc as _e,Cd as ve,Cf as ye,Cl as be,Co as xe,Cu as Se,Da as Ce,Dc as we,Dd as Te,Df as Ee,Dl as De,Do as Oe,Dr as ke,Du as Ae,Ec as je,Ed as Me,Ef as Ne,El as Pe,Eo as d,Er as f,Eu as p,Fc as m,Fd as h,Ff as g,Fi as _,Fl as v,Fo as y,Fr as Fe,Fu as Ie,Gc as Le,Gd as Re,Gf as ze,Gi as Be,Gl as Ve,Go as He,Gr as Ue,Gs as We,Gu as Ge,Hc as Ke,Hd as qe,Hf as Je,Hi as Ye,Hl as Xe,Ho as Ze,Hr as Qe,Hs as $e,Hu as et,I as tt,Ic as nt,Id as rt,If as it,Ii as at,Il as ot,Io as st,Ir as ct,Iu as lt,Ja as ut,Jc as b,Jd as dt,Ji as ft,Jl as pt,Jo as mt,Jr as ht,Js as gt,Ju as x,Kc as S,Kd as _t,Kf as vt,Ki as yt,Kl as bt,Ko as xt,Kr as St,Ku as Ct,Lc as wt,Ld as Tt,Lf as Et,Li as Dt,Ll as Ot,Lo as kt,Lr as At,Lu as jt,Mc as Mt,Md as Nt,Mf as Pt,Ml as C,Mo as Ft,Mr as It,Mu as Lt,Nc as Rt,Nd as w,Nf as zt,Nl as Bt,Nr as Vt,Nu as Ht,Oa as Ut,Oc as Wt,Od as Gt,Of as Kt,Ol as qt,Oo as Jt,Ou as Yt,Pc as Xt,Pd as T,Pf as Zt,Pl as Qt,Po as $t,Pr as en,Pu as tn,Qc as nn,Qd as rn,Qi as an,Ql as on,Qn as sn,Qo as cn,Qr as ln,Qs as un,Qu as dn,Ra as fn,Rc as pn,Rd as mn,Rf as hn,Ri as gn,Rl as _n,Ro as vn,Rr as yn,Ru as bn,S as xn,Sa as Sn,Sc as Cn,Sd as wn,Sf as Tn,Sl as En,So as Dn,Su as On,Ta as kn,Tc as An,Td as jn,Tf as Mn,Tl as Nn,To as Pn,Tu as Fn,Ua as In,Uc as Ln,Ud as Rn,Uf as zn,Ui as Bn,Ul as Vn,Uo as Hn,Ur as Un,Us as Wn,Uu as Gn,Va as Kn,Vc as qn,Vd as Jn,Vf as Yn,Vi as Xn,Vl as Zn,Vo as Qn,Vr as $n,Vs as E,Vu as er,Wc as tr,Wd as nr,Wf as rr,Wi as ir,Wl as ar,Wo as or,Wr as sr,Ws as cr,Wu as lr,Xa as ur,Xc as dr,Xd as D,Xi as fr,Xl as pr,Xo as mr,Xr as hr,Xs as gr,Xu as _r,Y as vr,Ya as yr,Yc as br,Yd as xr,Yl as Sr,Yo as Cr,Yr as wr,Ys as Tr,Yu as O,Zc as Er,Zd as k,Zi as Dr,Zl as Or,Zo as kr,Zr as Ar,Zs as jr,Zu as A,_ as Mr,_a as j,_c as Nr,_d as Pr,_f as Fr,_l as Ir,_o as Lr,_u as Rr,a as zr,aa as Br,ac as Vr,ad as Hr,af as Ur,ai as Wr,al as Gr,ao as Kr,as as qr,au as Jr,b as Yr,bc as Xr,bd as Zr,bf as Qr,bl as $r,bo as ei,bu as ti,c as ni,ca as ri,cc as ii,cd as ai,cf as oi,ci as si,cl as ci,co as li,cu as ui,d as di,da as fi,dc as M,dd as pi,df as mi,dl as hi,du as gi,ec as _i,ed as vi,ef as yi,ei as bi,el as xi,er as Si,es as Ci,eu as wi,f as Ti,fa as Ei,fc as Di,fd as Oi,ff as ki,fl as Ai,fo as ji,fu as Mi,g as Ni,ga as Pi,gc as Fi,gd as Ii,gf as Li,gl as Ri,go as zi,gu as Bi,h as Vi,ha as Hi,hc as Ui,hd as Wi,hf as Gi,hl as Ki,ho as qi,hu as Ji,i as Yi,ia as Xi,ic as Zi,id as Qi,if as $i,ii as ea,il as ta,io as na,ir as ra,is as ia,iu as aa,jc as oa,jd as sa,jf as ca,jl as la,jo as ua,jr as da,ju as fa,ka as pa,kc as ma,kd as ha,kf as ga,kl as _a,ko as va,kr as ya,ku as ba,l as xa,la as Sa,lc as Ca,ld as wa,lf as Ta,ll as Ea,lo as Da,lu as Oa,m as N,ma as P,mc as ka,md as Aa,mf as ja,ml as Ma,mo as Na,mu as Pa,n as Fa,nc as F,nd as Ia,nf as La,ni as Ra,nl as za,ns as Ba,nu as Va,o as Ha,oa as Ua,oc as Wa,od as Ga,of as Ka,ol as qa,oo as Ja,os as Ya,ou as Xa,p as Za,pa as Qa,pc as $a,pd as eo,pf as to,pl as no,po as ro,pu as io,qc as ao,qd as oo,qf as so,qi as co,ql as lo,qo as uo,qr as fo,qs as po,qu as mo,r as ho,rc as go,rd as _o,rf as vo,ri as yo,rl as bo,rr as I,rs as xo,ru as So,s as Co,sa as wo,sc as To,sd as Eo,sf as Do,si as Oo,sl as L,so as ko,su as Ao,tc as jo,td as Mo,tf as No,ti as Po,tl as Fo,tr as R,ts as Io,tt as z,tu as Lo,u as Ro,ua as zo,uc as Bo,ud as Vo,uf as Ho,ui as Uo,ul as Wo,uo as Go,uu as Ko,v as qo,va as B,vc as Jo,vd as Yo,vf as Xo,vl as Zo,vo as Qo,vr as $o,vu as es,wa as ts,wc as ns,wd as V,wf as rs,wl as is,wo as as,wu as os,x as ss,xa as cs,xc as ls,xd as us,xf as ds,xl as fs,xo as ps,xu as ms,y as hs,ya as H,yc as gs,yd as _s,yf as vs,yl as ys,yo as bs,yu as xs,za as Ss,zc as Cs,zd as ws,zf as Ts,zi as Es,zl as Ds,zo as Os,zr as ks,zu as As}from"./_chunks/src-C4oa-U7z.js";import{constants as js,createContext as Ms,runInContext as Ns}from"node:vm";import*as U from"node:diagnostics_channel";let W=null;function targets(){let e=/* @__PURE__ */ new Set,t=I();for(let n in t){let r=t[n];if(r===null||typeof r!=`object`&&typeof r!=`function`)continue;e.add(r);let i=r.prototype;typeof r==`function`&&typeof i==`object`&&i&&e.add(i)}return e.add(R.prototype),[...e]}function snapshot(e){let t=Reflect.ownKeys(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=isArrayIndex(i)?null:Object.getOwnPropertyDescriptor(e,i)}return{target:e,keys:t,descriptors:n,keySet:null}}let G=null;function captureInterfaceBaseline(){if(W===null){W=[],G=/* @__PURE__ */ new WeakSet;for(let e of targets())W.push(snapshot(e)),G.add(e);ownObjectCreateMaps()}}let Ps=null;function ownObjectCreateMaps(){if(W===null)return;let e=Ps??=Ns(`(prototypes) => prototypes.map((p) => Object.create(p))`,Ms(js.DONT_CONTEXTIFY)),t=[Object.prototype];for(let e=0;e<W.length;e++){let n=W[e].target;typeof n!=`function`&&t.push(n)}e(t)}function configurableDescriptor(e){return typeof e==`object`&&e&&e.configurable!==!0?{...e,configurable:!0}:e}function guardInterfaceDefinitions(e){let t=G;if(t===null)return;let n=e.Object,r=e.Reflect,i=n.defineProperty,a=n.defineProperties,o=r.defineProperty,s={defineProperty(e,n,r){return i(e,n,t.has(e)?configurableDescriptor(r):r)},defineProperties(e,n){if(!t.has(e)||typeof n!=`object`||!n)return a(e,n);let r={};for(let e of Reflect.ownKeys(n))Object.getOwnPropertyDescriptor(n,e)?.enumerable&&(r[e]=configurableDescriptor(n[e]));return a(e,r)},reflectDefineProperty(e,n,r){return o(e,n,t.has(e)?configurableDescriptor(r):r)}};Object.defineProperty(s.reflectDefineProperty,"name",{value:`defineProperty`}),Object.defineProperty(n,"defineProperty",{value:s.defineProperty,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(n,"defineProperties",{value:s.defineProperties,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(r,"defineProperty",{value:s.reflectDefineProperty,writable:!0,configurable:!0,enumerable:!1})}function isArrayIndex(e){if(typeof e!=`string`||e===``||e.length>10)return!1;let t=Number(e);return t>>>0===t&&t!==4294967295&&String(t)===e}function sameDescriptor(e,t){return e.value===t.value&&e.get===t.get&&e.set===t.set&&e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable}function restoreInterfaces(){if(W===null)return 0;let e=0;for(let t=0;t<W.length;t++){let n=W[t],r=n.target,i=Reflect.ownKeys(r);for(let t=0;t<i.length;t++){let a=i[t];a===n.keys[t]||(n.keySet??=new Set(n.keys)).has(a)||isArrayIndex(a)||Reflect.deleteProperty(r,a)&&e++}for(let t=0;t<n.keys.length;t++){let i=n.keys[t],a=n.descriptors[t];if(a===null)continue;let o=Object.getOwnPropertyDescriptor(r,i);if(!(o!==void 0&&sameDescriptor(o,a)))try{Object.defineProperty(r,i,a),e++}catch{}}}return ownObjectCreateMaps(),e}const K=`ctrl-dom:span`,q=typeof U.tracingChannel==`function`?U.tracingChannel(K):null;function spanChannel(){return q}function tracing(){return q!==null&&q.hasSubscribers}function traceSync(e,t,n){let r={op:e,description:t,data:{},async:!1},i=D();return q.traceSync(e=>{try{return n(e)}finally{recordSkipped(e,i)}},r,void 0,r)}function tracePromise(e,t,n){let r={op:e,description:t,data:{},async:!0},i=D();return q.tracePromise(e=>n(e).finally(()=>recordSkipped(e,i)),r,void 0,r)}function recordSkipped(e,t){let n=D()-t;n>0&&(e.data[`clock.skipped_ms`]=Math.round(n))}function describeCall(e,t){let n=`${e}(`;for(let e=0;e<t.length&&(t[e]!==void 0||e!==t.length-1);e++)if(n+=(e>0?`, `:``)+describeValue(t[e],0),n.length>160)return`${n.slice(0,159)}…)`;return`${n})`}function describeValue(e,t){if(typeof e==`string`)return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e);if(typeof e==`function`)return e.name?`${e.name}()`:`fn`;if(e instanceof RegExp||typeof e!=`object`||!e)return String(e);if(e[C]!==void 0)return describeNode(e);if(Array.isArray(e))return t>0?`[…]`:`[${e.slice(0,3).map(e=>describeValue(e,t+1)).join(`, `)}${e.length>3?`, …`:``}]`;if(t>0)return`{…}`;let n=Object.entries(e).slice(0,4);return n.length===0?`{}`:`{ ${n.map(([e,n])=>`${e}: ${describeValue(n,t+1)}`).join(`, `)} }`}let J=null;function setNodeDescriber(e){J=e}function describeNode(e){let t=e;if(t.nodeType===9)return`document`;if(t.nodeType!==1||typeof t.localName!=`string`)return t.nodeType===3?`#text`:`node`;if(J!==null)try{let t=J(e);if(t)return t}catch{}if(t.localName===`body`||t.localName===`html`)return`<${t.localName}>`;let n=t.getAttribute?.(`aria-label`)||t.textContent?.trim().replace(/\s+/g,` `)||t.getAttribute?.(`placeholder`)||t.getAttribute?.(`name`)||``;return n===``?`<${t.localName}>`:`<${t.localName} ${quote(n)}>`}function quote(e){return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e)}const Y=`sentry-tests:failure`;let X=null;function setFailureSnapshot(e){X=e}function subscribeTestFailures(e){let t=U.channel(Y),onFailure=t=>{let n=t,r=e();if(r==null||n.document!==r)return;let i=k();if(i!==null&&(n.contexts.clock={skipped_ms:Math.round(i.skippedMs),pending_timers:i.pendingTimers}),X!==null&&r.body!=null)try{n.attachments.push({filename:`accessibility-snapshot.txt`,contentType:`text/plain`,data:X(r.body)})}catch{}};return t.subscribe(onFailure),()=>t.unsubscribe(onFailure)}function implOf(e){return e[C]??e}function isTypingType(e){return j(e)||e===12||e>=7&&e<=11}function isEditable(e){let t=implOf(e);return t.tag===E.input?isTypingType(P(t))&&N(t):t.tag===E.textarea?N(t):en(t)}function supportsSelection(e){let t=implOf(e);return t.tag===E.textarea||t.tag===E.input&&B(P(t))}function hasUIValue(e){let t=implOf(e);return t.tag===E.textarea||t.tag===E.input&&H(P(t))===0}function getUIValue(e){let t=implOf(e);if(t.tag===E.input){let e=t.node;return e[V]??e.value}return t.tag===E.textarea?t.node.value:``}function setUIValue(t,n){let r=implOf(t);if(r.tag===E.input){let t=r.node,i=P(r);if(H(i)!==0)return;let a=e(i,n,r);r.doc[T]++,t[w]=a,t[b]=!0,t[l]=!0,t[V]=a===n?null:n,t[F]=a===``&&n!==``&&i!==5&&!j(i);let o=n.length;t[A]>o&&(t[A]=o),t[O]>o&&(t[O]=o)}else if(r.tag===E.textarea){let e=r.node;r.doc[T]++,e[u]=n,e[b]=!0,e[l]=!0}}function clearUIValue(e){let t=implOf(e);if(t.tag===E.input){let e=t.node;e[V]=null,e[F]=!1}}function getUISelection(e){let t=implOf(e).node,n=getUIValue(e).length;return{start:Math.min(t[A],n),end:Math.min(t[O],n),direction:t[x]}}function setUISelection(e,t,n=t,r=`none`){let i=implOf(e);if(i.tag!==E.input&&i.tag!==E.textarea)return;let a=i.node,o=getUIValue(e).length,s=Math.max(0,Math.min(t,n)),c=Math.max(t,n);c>o&&(c=o),s>c&&(s=c),a[A]=s,a[O]=c,a[x]=r}function setFilesFromUI(e,t){let n=implOf(e);n.tag===E.input&&P(n)===17&&(n.doc[T]++,n.node[L]=z(t))}function setOptionSelectedFromUI(e,t){let n=implOf(e);if(n.tag!==E.option)return;let r=n.node;r._setSelectedness(t),r[S]=!0;let i=vr(n);if(i!==null){let e=i.node;t&&e._deselectOthers(n),e._updateSelectedContent()}}function setCheckedFromUI(e,t){let n=implOf(e);n.tag===E.input&&n.node._setCheckedness(t,!0)}const Fs=R.prototype.getComputedStyle;let Z=null,Q=null,$=null;function getComputedStyleOverride(e){let t=e.doc.defaultView;if(t==null)return null;let n=t.getComputedStyle;if(n===Fs||typeof n!=`function`||tt.has(n))return null;if(Q?.deref()===n&&Z?.deref()===t){let e=$.deref();if(e!==void 0)return e}let r=n.bind(t);return Z=new WeakRef(t),Q=new WeakRef(n),$=new WeakRef(r),r}export{Tr as $_proto__,gr as $aboutBase,jr as $active,un as $assocGen,s as $attr,_i as $attributes,jo as $availableToElementInternals,F as $badInput,go as $baseFor,Zi as $baseOverride,Vr as $baseURL,Wa as $baseVersion,To as $block,ii as $byCtor,Ca as $byName,Bo as $cache,M as $callback,Di as $checked,$a as $checkedSet,ka as $childNodes,Ui as $childWindows,Fi as $children,Nr as $classList,Jo as $clipboard,gs as $clonable,Xr as $closed,ls as $coll,Cn as $compiled,_e as $compiledFor,ns as $condition,An as $constructed,je as $constructingEntryList,we as $contentType,Wt as $controlsCache,ma as $controlsDoc,te as $controlsVersion,oa as $cookieJar,Mt as $cookies,Rt as $css,Xt as $current,m as $customElements,nt as $customValidity,wt as $cx,pn as $data,Cs as $dataset,se as $declarative,qn as $defaultNamespace,Ke as $defaultValueOverride,Ln as $delegatesFocus,tr as $derived,Le as $devicePixelRatio,S as $dirtiness,ao as $dirtyChecked,b as $dirtyValue,br as $disabled,dr as $disallowModification,Er as $doc,nn as $dropEffect,t as $ec,xi as $effectAllowed,Fo as $el,za as $elements,bo as $entries,ta as $eo,Gr as $error,qa as $file,L as $files,ci as $fill,Ea as $filter,Wo as $firingSubmissionEvents,hi as $focused,Ai as $forLabels,no as $form,Ma as $forms,Ki as $frameCallbacks,Ri as $frameElement,Ir as $frameId,Zo as $frameTask,ys as $frameTime,$r as $generation,fs as $globalObject,En as $hasTransients,be as $height,is as $history,Nn as $home,Pe as $host,De as $href,qt as $id,_a as $idleCallbacks,re as $idleId,la as $ids,C as $impl,Bt as $implementation,Qt as $indeterminate,v as $index,ot as $indexed,Ot as $inflight,_n as $info,Ds as $innerHeight,de as $innerWidth,Zn as $is2D,Xe as $isHTML,Vn as $items,ar as $keyText,Ve as $kind,bt as $labels,lo as $layerName,pt as $list,Sr as $listeners,pr as $localStorage,Or as $location,on as $lockedForReset,i as $m,wi as $matches,Lo as $media,Va as $mediaQueryLists,So as $mode,aa as $name,Jr as $names,Xa as $namespaces,Ao as $navigator,ui as $nodes,Oa as $onchange,Ko as $options,gi as $owner,Mi as $ownerNode,io as $ownerRule,Pa as $parent,Ji as $parentRule,Bi as $parentWindow,Rr as $pastNames,es as $pointerBeforeReference,xs as $preApplied,ti as $preChecked,ms as $preCheckedRadio,On as $preIndeterminate,Se as $prefix,os as $prelude,Fn as $presentationStyle,p as $pseudo,Ae as $queries,Yt as $radios,ba as $ranges,u as $rawValue,fa as $readonly,Lt as $readyState,Ht as $rebuildVersion,tn as $record,Ie as $records,lt as $rects,jt as $reference,bn as $result,As as $root,me as $rules,er as $running,et as $runningFrame,Gn as $sc,lr as $screen,Ge as $scrollRestoration,Ct as $scrollX,mo as $scrollY,x as $selDir,O as $selEnd,_r as $selSet,A as $selStart,dn as $selectedOptions,c as $selectedness,vi as $selection,Mo as $selector,Ia as $serializable,_o as $sessionStorage,Qi as $settled,Hr as $shadowRoot,Ga as $shed,Eo as $sheet,ai as $sheets,wa as $slotAssignment,Vo as $so,pi as $states,Oi as $style,eo as $styleVersion,Aa as $supportsText,Wi as $systemId,Ii as $target,Pr as $targets,Yo as $tasks,_s as $timers,Zr as $title,us as $treeVersion,wn as $type,ve as $types,V as $uiValue,jn as $updating,Me as $updatingSelectedContent,Te as $uri,Gt as $url,ha as $userActivation,l as $userEdited,sa as $userValidity,Nt as $validity,w as $value,T as $version,h as $visualViewport,rt as $w,Tt as $whatToShow,mn as $whenDefined,ws as $width,ce as $window,Jn as $writeBuffer,qe as $x,Rn as $xhr,nr as $y,Re as $z,Ur as ATTRIBUTE_NODE,kr as AttrRecord,Ka as CDATA_SECTION_NODE,Do as COMMENT_NODE,Ye as COMPAT,Bn as COMPAT_PROFILES,ir as DEFAULT_COMPAT,oi as DOCUMENT_FRAGMENT_NODE,Ta as DOCUMENT_NODE,Ho as DOCUMENT_POSITION_CONTAINED_BY,mi as DOCUMENT_POSITION_CONTAINS,ki as DOCUMENT_POSITION_DISCONNECTED,to as DOCUMENT_POSITION_FOLLOWING,ja as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,Gi as DOCUMENT_POSITION_PRECEDING,Li as DOCUMENT_TYPE_NODE,fr as DeclBlock,Fr as ELEMENT_NODE,Xo as ENTITY_NODE,vs as ENTITY_REFERENCE_NODE,po as EventState,Y as FAILURE_CHANNEL,Qr as F_ADOPT_HOOK,ds as F_ARIA_ATTRS,Tn as F_ATTR_HOOK,ye as F_CE_CUSTOM,rs as F_CHILDREN_HOOK,Mn as F_CHILD_LIST,Ne as F_CONNECTED,Ee as F_CONNECT_HOOK,Kt as F_CONTENTEDITABLE_ATTR,ga as F_CUSTOM,ne as F_DATA_ATTRS,ca as F_FACE,Pt as F_HAS_SHADOW,zt as F_HAS_STYLE_ATTR,Zt as F_HTML,g as F_INERT_ATTR,it as F_MO_REGISTERED,Et as F_SHADOW_ROOT,hn as F_TABINDEX_ATTR,cs as GLOBAL_EVENT_HANDLER_EVENTS,na as HTMLCollection,Ts as HTML_NS,Qa as INPUT_TYPE_NAMES,le as MATHML_NS,Yn as NOTATION_NODE,Dt as NodeCache,cn as NodeImpl,$t as NodeList,Je as PROCESSING_INSTRUCTION_NODE,K as SPAN_CHANNEL,zn as SVG_NS,E as T,rr as TEXT_NODE,_t as VirtualClock,oo as VirtualTimeout,Sn as WINDOW_EVENT_HANDLER_EVENTS,ze as XLINK_NS,vt as XMLNS_NS,so as XML_NS,ln as adoptedStyleSheetsOf,ps as ariaAttr,Dn as asciiLowercase,qi as assignManually,zi as assignedElements,Lr as assignedNodes,Qo as assignedSlot,Ce as attachShadowRoot,xe as attr,sn as attrAssociatedElement,a as attrAssociatedElements,In as attrNode,dt as canSkipZeroDelayWait,captureInterfaceBaseline,Os as childAt,as as classTokens,clearUIValue,xr as clockNow,k as clockStats,ko as closest,f as compareBoundaryPoints,Be as compatExposes,yn as computedDisplay,ks as computedValue,pe as computedVisibility,ya as constructEntryList,Fa as controlValue,$o as createEvent,z as createFileList,o as createLinkSheet,$n as currentStyleVersion,ae as defaultButton,yt as deferredCompatMembers,kt as derivedCache,describeCall,describeNode,Ci as dispatch,Es as dispatchTrusted,Kr as ensureCollectionIndexGetters,y as ensureIndexGetters,Oo as evaluateMediaQueryList,an as faceState,bs as findFlattenedSlottables,ei as findSlot,ue as fireAnEvent,Xn as fireSyntheticPointerEvent,fe as firstElementChild,rn as foreignImmediatesPending,Br as formOwner,Pn as getAttribute,At as getComputedStyle,getComputedStyleOverride,Io as getCurrentEvent,Ut as getElementsByClassName,pa as getElementsByTagName,ee as getElementsByTagNameNS,ge as getEventHandler,getUISelection,getUIValue,guardInterfaceDefinitions,d as hasAttr,Qe as hasAuthorStyles,Si as hasExplicitAttrElements,cr as hasListeners,ho as hasReadonlyAttribute,hasUIValue,co as hiddenGlobals,da as implicitSubmission,st as indexGetterTable,Qn as indexOf,Yi as inputChecked,zr as inputIndeterminate,P as inputType,Hi as inputTypeFromAttr,ji as inspectNode,n as installClock,ts as installEventHandlers,Ua as isActuallyDisabled,Oe as isAsciiWhitespace,Ha as isAutofilled,Co as isChecked,yi as isClockTimer,ni as isDefault,xa as isDisabled,Un as isDisplayNone,sr as isDisplayNoneInclusive,isEditable as isEditableControl,Ro as isEnabled,r as isFACE,di as isInRange,Ze as isInclusiveAncestor,Ti as isIndeterminate,Za as isInvalid,wo as isLabelable,ri as isListed,N as isMutable,Pi as isNumericType,Vi as isOptional,Ni as isOutOfRange,Mr as isPlaceholderShown,qo as isReadOnly,hs as isReadWrite,Yr as isRequired,Sa as isResettable,It as isSubmitButton,zo as isSubmittable,ss as isTextControl,j as isTextualType,xn as isValid,fn as isValidDoctypeName,Ss as isValidElementLocalName,oe as isValidNamespacePrefix,Ue as isVisibilityHidden,fi as labeledControl,Ei as labelsFor,Hn as lastElementChild,Xi as listOfOptions,_ as matchMediaText,li as matches,si as mediaEnvironment,or as nextElementInTree,He as nextElementSibling,xt as nextInTree,uo as nextSkippingChildren,gn as nodeCache,Ba as nodeGetTheParent,ke as nodeLength,Ft as notifyMutationObservers,he as optionSelected,Dr as parseDeclBlock,ur as parseFragment,at as parseMediaQueryList,vn as peekDerivedCache,St as pointerEvents,fo as pointerEventsNone,Jt as prefixFlag,mt as previousElementSibling,Cr as previousInTree,ht as pseudoContent,Da as querySelector,Go as querySelectorAll,quote,Po as registerOwnerSheet,We as removeAllEventListeners,va as removeAttribute,Ra as removeOwnerSheet,ro as replaceData,qr as reportException,ft as resolveCompat,restoreInterfaces,xo as retarget,ut as serializeChildren,yr as serializeNode,yo as setAdoptedStyleSheets,ia as setAssignedSlotLookup,ie as setAttribute,setCheckedFromUI,wr as setComputedColorMode,kn as setEventHandler,setFailureSnapshot,setFilesFromUI,setNodeDescriber,Vt as setNotImplementedHandler,setOptionSelectedFromUI,gt as setTrusted,setUISelection,setUIValue,Ya as setUncaughtExceptionHandler,No as skipIdleTime,La as skipZeroDelayWait,spanChannel,ua as splitOnAsciiWhitespace,Na as splitText,Fe as styleElementRemoved,bi as styleElementSheet,ct as styleElementUpdated,ea as styleSheetsOf,hr as styledDisplay,subscribeTestFailures,supportsSelection,B as supportsSelectionType,$e as tagId,Wn as tagName,tracePromise,traceSync,tracing,ra as trackGlobalTimers,mr as treeRoot,Ar as uaDisplay,Wr as unregisterOwnerSheet,Kn as validateAndExtract,H as valueMode,vo as virtualDate,$i as virtualPerformance,Uo as windowHooks,I as windowInterfaces,Ja as withNamedProperties};
|
|
1
|
+
import{$ as e,$c as t,$d as n,$i as r,$l as i,$n as a,$o as o,$r as s,$s as c,$u as ee,Aa as l,Ac as u,Ad as te,Af as ne,Al as re,Ao as ie,Ar as ae,Au as oe,Ba as se,Bc as ce,Bd as le,Bf as ue,Bi as de,Bl as fe,Bo as pe,Br as me,Bu as he,C as ge,Ca as _e,Cc as ve,Cd as ye,Cf as be,Cl as xe,Co as Se,Cu as Ce,Dc as we,Dd as Te,Df as Ee,Dl as De,Do as Oe,Dr as ke,Du as Ae,Ea as je,Ec as Me,Ed as d,Ef as Ne,El as Pe,Eo as f,Eu as p,Fc as m,Fd as h,Ff as g,Fl as _,Fo as v,Fr as y,Fu as Fe,Gc as Ie,Gd as Le,Gi as Re,Gl as ze,Go as Be,Gr as Ve,Gs as He,Gu as Ue,Ha as We,Hc as Ge,Hd as Ke,Hf as qe,Hi as Je,Hl as Ye,Ho as Xe,Hr as Ze,Hs as b,Hu as Qe,I as $e,Ic as et,Id as tt,If as nt,Ii as rt,Il as it,Io as at,Ir as ot,Iu as st,Jc as ct,Jd as lt,Ji as ut,Jl as dt,Jo as ft,Jr as pt,Js as mt,Ju as ht,Kc as gt,Kd as _t,Ki as vt,Kl as yt,Ko as bt,Kr as xt,Ks as St,Ku as Ct,Lc as wt,Ld as Tt,Lf as Et,Li as Dt,Ll as x,Lo as Ot,Lr as kt,Lu as At,Mc as jt,Md as Mt,Mf as Nt,Ml as S,Mo as Pt,Mr as Ft,Mu as It,Nc as Lt,Nd as Rt,Nf as zt,Nl as Bt,No as Vt,Nr as Ht,Nu as Ut,Oa as Wt,Oc as Gt,Od as Kt,Of as qt,Ol as Jt,Oo as Yt,Or as Xt,Ou as Zt,Pc as Qt,Pd as $t,Pf as en,Pl as tn,Pr as nn,Pu as rn,Qc as an,Qd as on,Qi as sn,Ql as cn,Qn as ln,Qo as un,Qr as dn,Qs as fn,Qu as pn,Rc as mn,Rd as hn,Rf as gn,Ri as _n,Rl as vn,Ro as yn,Rr as bn,Ru as xn,S as Sn,Sa as Cn,Sc as wn,Sd as Tn,Sf as En,Sl as Dn,So as On,Su as kn,Ta as An,Tc as jn,Td as Mn,Tf as Nn,Tl as Pn,To as Fn,Tu as In,Uc as Ln,Ud as C,Ui as Rn,Ul as zn,Uo as Bn,Ur as Vn,Us as Hn,Uu as Un,Va as Wn,Vc as Gn,Vd as Kn,Vf as qn,Vi as Jn,Vl as Yn,Vo as Xn,Vr as Zn,Vu as Qn,Wa as $n,Wc as er,Wd as w,Wi as tr,Wl as nr,Wo as rr,Wr as ir,Ws as ar,Wu as or,Xa as sr,Xc as T,Xd as cr,Xl as lr,Xo as ur,Xr as dr,Xs as fr,Xu as pr,Y as mr,Ya as hr,Yc as gr,Yd as _r,Yi as vr,Yl as yr,Yo as br,Yr as xr,Yu as Sr,Za as Cr,Zc as wr,Zd as Tr,Zi as Er,Zl as Dr,Zo as Or,Zr as kr,Zs as Ar,Zu as jr,_ as Mr,_a as Nr,_c as Pr,_d as Fr,_f as Ir,_l as Lr,_o as Rr,_u as zr,a as Br,aa as Vr,ac as Hr,ad as Ur,af as Wr,ai as Gr,al as E,ao as Kr,ar as qr,as as Jr,au as Yr,b as Xr,ba as D,bc as Zr,bd as Qr,bf as $r,bl as ei,bo as ti,bu as ni,c as ri,ca as ii,cc as ai,cd as oi,cf as si,ci,cl as li,co as ui,cu as di,d as fi,da as pi,dc as mi,dd as hi,df as gi,di as _i,dl as vi,do as yi,du as bi,ea as xi,ec as Si,ed as Ci,ef as wi,ei as Ti,el as Ei,er as Di,eu as Oi,f as ki,fa as Ai,fc as ji,fd as O,ff as Mi,fl as Ni,fu as Pi,g as Fi,ga as Ii,gc as Li,gd as Ri,gf as zi,gl as Bi,go as Vi,gu as Hi,h as Ui,ha as k,hc as Wi,hd as Gi,hf as Ki,hl as qi,ho as Ji,hu as Yi,i as Xi,ic as Zi,id as Qi,if as $i,ii as ea,il as ta,ir as na,is as ra,iu as ia,ja as aa,jc as A,jd as oa,jf as sa,jl as ca,jo as la,jr as ua,ju as da,ka as fa,kc as pa,kd as ma,kf as ha,kl as ga,ko as _a,ku as va,l as ya,la as ba,lc as xa,ld as Sa,lf as Ca,li as wa,ll as Ta,lo as Ea,lu as Da,m as j,ma as Oa,mc as ka,md as Aa,mf as ja,ml as Ma,mo as Na,mu as Pa,n as Fa,nc as Ia,nd as La,nf as Ra,ni as za,nl as Ba,ns as Va,nu as Ha,o as Ua,oa as Wa,oc as Ga,od as Ka,of as qa,oi as Ja,ol as Ya,oo as Xa,os as Za,ou as Qa,p as $a,pa as eo,pc as to,pd as no,pf as ro,pl as io,po as ao,pu as oo,qc as so,qd as co,qi as lo,ql as uo,qo as fo,qr as po,qs as mo,qu as ho,r as go,rc as _o,rd as vo,rf as yo,ri as bo,rl as xo,rr as M,rs as So,ru as Co,s as wo,sa as To,sc as Eo,sd as Do,sf as Oo,sl as ko,so as Ao,ss as jo,su as Mo,tc as No,td as Po,tf as Fo,ti as Io,tl as Lo,tr as N,ts as Ro,tt as P,tu as zo,u as Bo,ua as Vo,uc as Ho,ud as Uo,uf as Wo,ul as Go,uo as Ko,us as F,uu as qo,v as Jo,va as I,vc as Yo,vd as Xo,vf as Zo,vl as L,vo as Qo,vu as $o,wa as es,wc as ts,wd as ns,wf as rs,wl as is,wo as as,wu as os,x as ss,xc as cs,xd as ls,xf as us,xl as R,xo as ds,xu as z,y as fs,ya as B,yc as ps,yd as ms,yf as hs,yl as gs,yo as _s,yr as vs,yu as ys,za as bs,zc as xs,zd as Ss,zf as Cs,zi as ws,zl as Ts,zo as Es,zr as Ds,zu as V}from"./_chunks/src-CaVKwScX.js";import{constants as Os,createContext as ks,runInContext as As}from"node:vm";import*as H from"node:diagnostics_channel";let U=null;function targets(){let e=/* @__PURE__ */ new Set,t=M();for(let n in t){let r=t[n];if(r===null||typeof r!=`object`&&typeof r!=`function`)continue;e.add(r);let i=r.prototype;typeof r==`function`&&typeof i==`object`&&i&&e.add(i)}return e.add(N.prototype),[...e]}function snapshot(e){let t=Reflect.ownKeys(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=isArrayIndex(i)?null:Object.getOwnPropertyDescriptor(e,i)}return{target:e,keys:t,descriptors:n,keySet:null}}let W=null;function captureInterfaceBaseline(){if(U===null){U=[],W=/* @__PURE__ */ new WeakSet;for(let e of targets())U.push(snapshot(e)),W.add(e);ownObjectCreateMaps()}}let js=null;function ownObjectCreateMaps(){if(U===null)return;let e=js??=As(`(prototypes) => prototypes.map((p) => Object.create(p))`,ks(Os.DONT_CONTEXTIFY)),t=[Object.prototype];for(let e=0;e<U.length;e++){let n=U[e].target;typeof n!=`function`&&t.push(n)}e(t)}function configurableDescriptor(e){return typeof e==`object`&&e&&e.configurable!==!0?{...e,configurable:!0}:e}function guardInterfaceDefinitions(e){let t=W;if(t===null)return;let n=e.Object,r=e.Reflect,i=n.defineProperty,a=n.defineProperties,o=r.defineProperty,s={defineProperty(e,n,r){return i(e,n,t.has(e)?configurableDescriptor(r):r)},defineProperties(e,n){if(!t.has(e)||typeof n!=`object`||!n)return a(e,n);let r={};for(let e of Reflect.ownKeys(n))Object.getOwnPropertyDescriptor(n,e)?.enumerable&&(r[e]=configurableDescriptor(n[e]));return a(e,r)},reflectDefineProperty(e,n,r){return o(e,n,t.has(e)?configurableDescriptor(r):r)}};Object.defineProperty(s.reflectDefineProperty,"name",{value:`defineProperty`}),Object.defineProperty(n,"defineProperty",{value:s.defineProperty,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(n,"defineProperties",{value:s.defineProperties,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(r,"defineProperty",{value:s.reflectDefineProperty,writable:!0,configurable:!0,enumerable:!1})}function isArrayIndex(e){if(typeof e!=`string`||e===``||e.length>10)return!1;let t=Number(e);return t>>>0===t&&t!==4294967295&&String(t)===e}function sameDescriptor(e,t){return e.value===t.value&&e.get===t.get&&e.set===t.set&&e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable}function restoreInterfaces(){if(U===null)return 0;let e=0;for(let t=0;t<U.length;t++){let n=U[t],r=n.target,i=Reflect.ownKeys(r);for(let t=0;t<i.length;t++){let a=i[t];a===n.keys[t]||(n.keySet??=new Set(n.keys)).has(a)||isArrayIndex(a)||Reflect.deleteProperty(r,a)&&e++}for(let t=0;t<n.keys.length;t++){let i=n.keys[t],a=n.descriptors[t];if(a===null)continue;let o=Object.getOwnPropertyDescriptor(r,i);if(!(o!==void 0&&sameDescriptor(o,a)))try{Object.defineProperty(r,i,a),e++}catch{}}}return ownObjectCreateMaps(),e}const G=`ctrl-dom:span`,K=typeof H.tracingChannel==`function`?H.tracingChannel(G):null;function spanChannel(){return K}function tracing(){return K!==null&&K.hasSubscribers}function traceSync(e,t,n){let r={op:e,description:t,data:{},async:!1},i=C();return K.traceSync(e=>{try{return n(e)}finally{recordSkipped(e,i)}},r,void 0,r)}function tracePromise(e,t,n){let r={op:e,description:t,data:{},async:!0},i=C();return K.tracePromise(e=>n(e).finally(()=>recordSkipped(e,i)),r,void 0,r)}function recordSkipped(e,t){let n=C()-t;n>0&&(e.data[`clock.skipped_ms`]=Math.round(n))}function describeCall(e,t){let n=`${e}(`;for(let e=0;e<t.length&&(t[e]!==void 0||e!==t.length-1);e++)if(n+=(e>0?`, `:``)+describeValue(t[e],0),n.length>160)return`${n.slice(0,159)}…)`;return`${n})`}function describeValue(e,t){if(typeof e==`string`)return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e);if(typeof e==`function`)return e.name?`${e.name}()`:`fn`;if(e instanceof RegExp||typeof e!=`object`||!e)return String(e);if(e[_]!==void 0)return describeNode(e);if(Array.isArray(e))return t>0?`[…]`:`[${e.slice(0,3).map(e=>describeValue(e,t+1)).join(`, `)}${e.length>3?`, …`:``}]`;if(t>0)return`{…}`;let n=Object.entries(e).slice(0,4);return n.length===0?`{}`:`{ ${n.map(([e,n])=>`${e}: ${describeValue(n,t+1)}`).join(`, `)} }`}let q=null;function setNodeDescriber(e){q=e}function describeNode(e){let t=e;if(t.nodeType===9)return`document`;if(t.nodeType!==1||typeof t.localName!=`string`)return t.nodeType===3?`#text`:`node`;if(q!==null)try{let t=q(e);if(t)return t}catch{}if(t.localName===`body`||t.localName===`html`)return`<${t.localName}>`;let n=t.getAttribute?.(`aria-label`)||t.textContent?.trim().replace(/\s+/g,` `)||t.getAttribute?.(`placeholder`)||t.getAttribute?.(`name`)||``;return n===``?`<${t.localName}>`:`<${t.localName} ${quote(n)}>`}function quote(e){return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e)}const J=`sentry-tests:failure`;let Y=null;function setFailureSnapshot(e){Y=e}function subscribeTestFailures(e){let t=H.channel(J),onFailure=t=>{let n=t,r=e();if(r==null||n.document!==r)return;let i=w();if(i!==null&&(n.contexts.clock={skipped_ms:Math.round(i.skippedMs),pending_timers:i.pendingTimers}),Y!==null&&r.body!=null)try{n.attachments.push({filename:`accessibility-snapshot.txt`,contentType:`text/plain`,data:Y(r.body)})}catch{}};return t.subscribe(onFailure),()=>t.unsubscribe(onFailure)}var FileState=class{hooks;url;constructor(){this.hooks=/* @__PURE__ */ new Map,this.url=null}};const X=/* @__PURE__ */ new WeakMap;function stateOf(e){let t=X.get(e);return t===void 0&&X.set(e,t=new FileState),t}function registerTestHooks(e,t){let n=F();if(n===null)return;let r=stateOf(n).hooks;r.set(e,{...r.get(e),...t})}function testHooks(){let e=F(),t=e===null?void 0:X.get(e);return t===void 0?[]:[...t.hooks.values()]}function resetWindowBetweenFiles(e){let t=stateOf(e);for(let e of t.hooks.values())try{e.fileEnd?.()}catch{}Kn(),na(e);let n=e[O];if(n!==null){for(let e of n)e.clear(e.handle);n.clear()}e[L]=null,e[V]=null,e[R]=null,e[S]=null;let r=e.document;r.getSelection()?.removeAllRanges();let i=r.body;i!==null&&(i.replaceChildren(),removeAttributes(i)),r.documentElement!==null&&removeAttributes(r.documentElement),e.localStorage.clear(),e.sessionStorage.clear(),e[m]=null;let a=t.url??=e.location.href;e.location.href!==a&&e._setURL(new URL(a));let o=e.history;o[E]=[{url:a,state:null}],o[x]=0}function removeAttributes(e){let t=e.getAttributeNames();for(let n=0;n<t.length;n++)e.removeAttribute(t[n])}function implOf(e){return e[_]??e}function isTypingType(e){return I(e)||e===12||e>=7&&e<=11}function isEditable(e){let t=implOf(e);return t.tag===b.input?isTypingType(k(t))&&j(t):t.tag===b.textarea?j(t):y(t)}function supportsSelection(e){let t=implOf(e);return t.tag===b.textarea||t.tag===b.input&&B(k(t))}function hasUIValue(e){let t=implOf(e);return t.tag===b.textarea||t.tag===b.input&&D(k(t))===0}function getUIValue(e){let t=implOf(e);if(t.tag===b.input){let e=t.node;return e[A].uiValue??e.value}return t.tag===b.textarea?t.node.value:``}function setUIValue(t,n){let r=implOf(t);if(r.tag===b.input){let t=r.node,i=k(r);if(D(i)!==0)return;let a=e(i,n,r);r.doc[d]++,t[A].value=a,t[A].dirtyValue=!0,t[A].userEdited=!0,t[A].uiValue=a===n?null:n,t[A].badInput=a===``&&n!==``&&i!==5&&!I(i);let o=n.length;t[A].selStart>o&&(t[A].selStart=o),t[A].selEnd>o&&(t[A].selEnd=o)}else if(r.tag===b.textarea){let e=r.node;r.doc[d]++,e[A].value=n,e[A].dirtyValue=!0,e[A].userEdited=!0}}function clearUIValue(e){let t=implOf(e);if(t.tag===b.input){let e=t.node;e[A].uiValue=null,e[A].badInput=!1}}function getUISelection(e){let t=implOf(e).node,n=getUIValue(e).length;return{start:Math.min(t[A].selStart,n),end:Math.min(t[A].selEnd,n),direction:t[A].selDir}}function setUISelection(e,t,n=t,r=`none`){let i=implOf(e);if(i.tag!==b.input&&i.tag!==b.textarea)return;let a=i.node,o=getUIValue(e).length,s=Math.max(0,Math.min(t,n)),c=Math.max(t,n);c>o&&(c=o),s>c&&(s=c),a[A].selStart=s,a[A].selEnd=c,a[A].selDir=r}function setFilesFromUI(e,t){let n=implOf(e);n.tag===b.input&&k(n)===17&&(n.doc[d]++,n.node[A].files=P(t))}function setOptionSelectedFromUI(e,t){let n=implOf(e);if(n.tag!==b.option)return;let r=n.node;r._setSelectedness(t),r[T]=!0;let i=mr(n);if(i!==null){let e=i.node;t&&e._deselectOthers(n),e._updateSelectedContent()}}function setCheckedFromUI(e,t){let n=implOf(e);n.tag===b.input&&n.node._setCheckedness(t,!0)}const Ms=N.prototype.getComputedStyle;let Z=null,Q=null,$=null;function getComputedStyleOverride(e){let t=e.doc.defaultView;if(t==null)return null;let n=t.getComputedStyle;if(n===Ms||typeof n!=`function`||$e.has(n))return null;if(Q?.deref()===n&&Z?.deref()===t){let e=$.deref();if(e!==void 0)return e}let r=n.bind(t);return Z=new WeakRef(t),Q=new WeakRef(n),$=new WeakRef(r),r}export{fn as $_proto__,c as $aboutBase,Si as $active,No as $assocGen,Ia as $attr,_o as $attributes,Zi as $availableToElementInternals,Hr as $baseFor,Ga as $baseOverride,Eo as $baseURL,ai as $baseVersion,xa as $benign,Ho as $block,mi as $blockParsed,ji as $blockText,to as $byCtor,ka as $byName,Wi as $cache,Li as $callback,Pr as $childNodes,Yo as $childWindows,ps as $children,Zr as $classList,cs as $clipboard,wn as $clonable,ve as $closed,ts as $coll,jn as $compiled,Me as $compiledFor,we as $condition,Gt as $constructed,pa as $constructingEntryList,u as $contentType,A as $control,jt as $controlsCache,Lt as $controlsDoc,Qt as $controlsVersion,m as $cookieJar,et as $cookies,wt as $css,mn as $current,xs as $customElements,ce as $customValidity,Gn as $cx,Ge as $data,Ln as $dataset,er as $declarative,Ie as $defaultNamespace,gt as $defaultValueOverride,so as $delegatesFocus,ct as $derived,gr as $devicePixelRatio,T as $dirtiness,wr as $disabled,an as $disallowModification,t as $doc,Ei as $dropEffect,Lo as $ec,Ba as $effectAllowed,xo as $el,ta as $elements,E as $entries,Ya as $eo,ko as $error,li as $file,Ta as $files,Go as $fill,vi as $filter,Ni as $firingSubmissionEvents,io as $focused,Ma as $forLabels,qi as $form,Bi as $formAttrSeen,Lr as $forms,L as $frameCallbacks,gs as $frameElement,ei as $frameId,R as $frameTask,Dn as $frameTime,xe as $generation,is as $globalObject,Pn as $hasTransients,Pe as $height,De as $history,Jt as $home,ga as $host,re as $href,ca as $id,S as $idleCallbacks,Bt as $idleId,tn as $ids,_ as $impl,it as $implementation,x as $index,vn as $indexed,Ts as $inflight,fe as $info,Yn as $innerHeight,Ye as $innerWidth,zn as $is2D,nr as $isHTML,ze as $items,yt as $keyText,uo as $kind,dt as $labels,yr as $layerName,lr as $list,Dr as $listeners,cn as $localStorage,i as $location,Oi as $lockedForReset,zo as $m,Ha as $matches,Co as $media,ia as $mediaQueryLists,Yr as $mode,Qa as $name,Mo as $names,di as $namespaces,Da as $navigator,qo as $nodes,bi as $onchange,Pi as $options,oo as $owner,Pa as $ownerNode,Yi as $ownerRule,Hi as $parent,zr as $parentRule,$o as $parentWindow,ys as $pastNames,ni as $pointerBeforeReference,z as $prefix,kn as $prelude,Ce as $presentationStyle,os as $pseudo,In as $queries,p as $radios,Ae as $ranges,Zt as $readonly,va as $readyState,oe as $rebuildVersion,da as $record,It as $records,Ut as $rects,rn as $reference,Fe as $result,st as $root,At as $rules,xn as $running,V as $runningFrame,he as $sc,Qn as $screen,Qe as $scrollRestoration,Un as $scrollX,or as $scrollY,Ue as $selSet,Ct as $selectedOptions,ho as $selectedness,ht as $selection,Sr as $selector,pr as $serializable,jr as $sessionStorage,pn as $settled,ee as $shadowRoot,Ci as $shed,Po as $sheet,La as $sheets,vo as $slotAssignment,Qi as $so,Ur as $states,Ka as $style,Do as $styleVersion,oi as $supportsText,Sa as $systemId,Uo as $target,hi as $targets,O as $tasks,no as $timers,Aa as $title,Gi as $treeVersion,Ri as $type,Fr as $types,Xo as $updating,ms as $updatingSelectedContent,Qr as $uri,ls as $url,Tn as $userActivation,ye as $userValidity,ns as $validity,Mn as $value,d as $version,Te as $visualViewport,Kt as $w,ma as $whatToShow,te as $whenDefined,oa as $width,Mt as $window,Rt as $writeBuffer,$t as $x,h as $xhr,tt as $y,Tt as $z,n as ATTRIBUTE_NODE,un as AttrRecord,wi as CDATA_SECTION_NODE,Fo as COMMENT_NODE,Rn as COMPAT,tr as COMPAT_PROFILES,Re as DEFAULT_COMPAT,Ra as DOCUMENT_FRAGMENT_NODE,yo as DOCUMENT_NODE,$i as DOCUMENT_POSITION_CONTAINED_BY,Wr as DOCUMENT_POSITION_CONTAINS,qa as DOCUMENT_POSITION_DISCONNECTED,Oo as DOCUMENT_POSITION_FOLLOWING,si as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,Ca as DOCUMENT_POSITION_PRECEDING,Wo as DOCUMENT_TYPE_NODE,Er as DeclBlock,gi as ELEMENT_NODE,Mi as ENTITY_NODE,ro as ENTITY_REFERENCE_NODE,fr as EventState,J as FAILURE_CHANNEL,ja as F_ADOPT_HOOK,Ki as F_ARIA_ATTRS,zi as F_ATTR_HOOK,Ir as F_CE_CUSTOM,Zo as F_CHILDREN_HOOK,hs as F_CHILD_LIST,$r as F_CONNECTED,us as F_CONNECT_HOOK,En as F_CONTENTEDITABLE_ATTR,be as F_CUSTOM,rs as F_DATA_ATTRS,Nn as F_FACE,Ne as F_FORM_ATTR,Ee as F_HAS_SHADOW,qt as F_HAS_STYLE_ATTR,ha as F_HTML,ne as F_INERT_ATTR,sa as F_MO_REGISTERED,Nt as F_SHADOW_ROOT,zt as F_TABINDEX_ATTR,Cn as GLOBAL_EVENT_HANDLER_EVENTS,Kr as HTMLCollection,en as HTML_NS,Oa as INPUT_TYPE_NAMES,g as MATHML_NS,nt as NOTATION_NODE,_n as NodeCache,o as NodeImpl,v as NodeList,Et as PROCESSING_INSTRUCTION_NODE,G as SPAN_CHANNEL,gn as SVG_NS,b as T,Cs as TEXT_NODE,hn as VirtualClock,Ss as VirtualTimeout,_e as WINDOW_EVENT_HANDLER_EVENTS,ue as XLINK_NS,qn as XMLNS_NS,qe as XML_NS,s as adoptedStyleSheetsOf,On as ariaAttr,Se as asciiLowercase,Vi as assignManually,Rr as assignedElements,Qo as assignedNodes,_s as assignedSlot,Wt as attachShadowRoot,as as attr,ln as attrAssociatedElement,a as attrAssociatedElements,$n as attrNode,le as canSkipZeroDelayWait,captureInterfaceBaseline,pe as childAt,Fn as classTokens,clearUIValue,Ke as clockNow,w as clockStats,ui as closest,ke as compareBoundaryPoints,vt as compatExposes,Ds as computedDisplay,me as computedValue,Zn as computedVisibility,ae as constructEntryList,Fa as controlValue,vs as createEvent,P as createFileList,Ti as createLinkSheet,Ze as currentStyleVersion,ua as defaultButton,lo as deferredCompatMembers,yn as derivedCache,describeCall,describeNode,Ro as dispatch,de as dispatchTrusted,Xa as ensureCollectionIndexGetters,at as ensureIndexGetters,ci as evaluateMediaQueryList,r as faceState,ti as findFlattenedSlottables,ds as findSlot,Jn as fireAnEvent,Je as fireSyntheticPointerEvent,Xn as firstElementChild,Le as foreignImmediatesPending,Wa as formOwner,f as getAttribute,bn as getComputedStyle,getComputedStyleOverride,Va as getCurrentEvent,fa as getElementsByClassName,l as getElementsByTagName,aa as getElementsByTagNameNS,es as getEventHandler,getUISelection,getUIValue,guardInterfaceDefinitions,Oe as hasAttr,Vn as hasAuthorStyles,Di as hasExplicitAttrElements,He as hasListeners,go as hasReadonlyAttribute,hasUIValue,ut as hiddenGlobals,Ft as implicitSubmission,Ot as indexGetterTable,Xe as indexOf,Xi as inputChecked,Br as inputIndeterminate,k as inputType,Ii as inputTypeFromAttr,ao as inspectNode,_t as installClock,An as installEventHandlers,To as isActuallyDisabled,Yt as isAsciiWhitespace,Ua as isAutofilled,wo as isChecked,co as isClockTimer,ri as isDefault,ya as isDisabled,ir as isDisplayNone,Ve as isDisplayNoneInclusive,isEditable as isEditableControl,Bo as isEnabled,xi as isFACE,fi as isInRange,Bn as isInclusiveAncestor,ki as isIndeterminate,$a as isInvalid,ii as isLabelable,ba as isListed,j as isMutable,Nr as isNumericType,Ui as isOptional,Fi as isOutOfRange,Mr as isPlaceholderShown,Jo as isReadOnly,fs as isReadWrite,Xr as isRequired,Vo as isResettable,Ht as isSubmitButton,pi as isSubmittable,ss as isTextControl,I as isTextualType,Sn as isValid,bs as isValidDoctypeName,se as isValidElementLocalName,Wn as isValidNamespacePrefix,xt as isVisibilityHidden,Ai as labeledControl,eo as labelsFor,rr as lastElementChild,Vr as listOfOptions,St as listenerCount,lt as loopTurn,rt as matchMediaText,Ea as matches,wa as mediaEnvironment,Be as nextElementInTree,bt as nextElementSibling,fo as nextInTree,ft as nextSkippingChildren,ws as nodeCache,So as nodeGetTheParent,Xt as nodeLength,Vt as notifyMutationObservers,ge as optionSelected,sn as parseDeclBlock,Cr as parseFragment,Dt as parseMediaQueryList,Es as peekDerivedCache,po as pointerEvents,pt as pointerEventsNone,_a as prefixFlag,br as previousElementSibling,ur as previousInTree,xr as pseudoContent,Ko as querySelector,yi as querySelectorAll,quote,za as registerOwnerSheet,registerTestHooks,mo as removeAllEventListeners,ie as removeAttribute,bo as removeOwnerSheet,Na as replaceData,Za as reportException,resetWindowBetweenFiles,vr as resolveCompat,restoreInterfaces,ra as retarget,mt as reusableElement,hr as serializeChildren,sr as serializeNode,ea as setAdoptedStyleSheets,Jr as setAssignedSlotLookup,la as setAttribute,setCheckedFromUI,dr as setComputedColorMode,je as setEventHandler,setFailureSnapshot,setFilesFromUI,setNodeDescriber,nn as setNotImplementedHandler,setOptionSelectedFromUI,Ar as setTrusted,setUISelection,setUIValue,jo as setUncaughtExceptionHandler,_r as skipIdleTime,cr as skipZeroDelayWait,spanChannel,Pt as splitOnAsciiWhitespace,Ji as splitText,ot as styleElementRemoved,Io as styleElementSheet,kt as styleElementUpdated,Gr as styleSheetsOf,kr as styledDisplay,subscribeTestFailures,supportsSelection,B as supportsSelectionType,Hn as tagId,ar as tagName,testHooks,tracePromise,traceSync,tracing,qr as trackGlobalTimers,Or as treeRoot,dn as uaDisplay,Ja as unregisterOwnerSheet,We as validateAndExtract,D as valueMode,Tr as virtualDate,on as virtualPerformance,_i as windowHooks,M as windowInterfaces,Ao as withNamedProperties};
|
|
@@ -5,6 +5,7 @@ import { CSSStyleRule, CSSStyleSheet, type CSSRule } from "./cssom.js";
|
|
|
5
5
|
import { DeclBlock } from "./declarations.js";
|
|
6
6
|
import { type MediaEnvironment } from "./media.js";
|
|
7
7
|
import { type RootStyles } from "./stylesheets.js";
|
|
8
|
+
import { $block } from "../keys.js";
|
|
8
9
|
export declare class IndexedRule {
|
|
9
10
|
sel: CompiledSelector;
|
|
10
11
|
specificity: number;
|
|
@@ -14,14 +15,20 @@ export declare class IndexedRule {
|
|
|
14
15
|
order: number;
|
|
15
16
|
/** Layer rank: higher wins for normal declarations; unlayered rules have the highest rank. */
|
|
16
17
|
layer: number;
|
|
17
|
-
|
|
18
|
+
/** The declarations; null until the rule first matches, for a rule whose `owner` has not parsed them. */
|
|
19
|
+
block: DeclBlock | null;
|
|
20
|
+
owner: BlockOwner | null;
|
|
18
21
|
layerNode: LayerNode;
|
|
19
22
|
/** Copied from `sel` so the cascade's loop reads them without a pointer hop (as Blink's RuleData). */
|
|
20
23
|
h0: number;
|
|
21
24
|
h1: number;
|
|
22
25
|
h2: number;
|
|
23
26
|
h3: number;
|
|
24
|
-
constructor(sel: CompiledSelector, sheetIndex: number, order: number, block: DeclBlock, layerNode: LayerNode);
|
|
27
|
+
constructor(sel: CompiledSelector, sheetIndex: number, order: number, block: DeclBlock | null, layerNode: LayerNode, owner: BlockOwner | null);
|
|
28
|
+
}
|
|
29
|
+
/** A rule that holds declarations: asking for them parses a style rule's block if nothing has yet. */
|
|
30
|
+
interface BlockOwner {
|
|
31
|
+
readonly [$block]: DeclBlock;
|
|
25
32
|
}
|
|
26
33
|
/** The rules that share one subject key. */
|
|
27
34
|
export declare class Bucket {
|
|
@@ -97,7 +104,7 @@ declare class IndexBuilder {
|
|
|
97
104
|
rules(rules: CSSRule[], layer: LayerNode, parentStyle: CSSStyleRule | null): void;
|
|
98
105
|
style(rule: CSSStyleRule, block: DeclBlock, layer: LayerNode): void;
|
|
99
106
|
/** Indexes a style rule's selectors with its declarations. */
|
|
100
|
-
add(compiled: CompiledSelectorList | null, block: DeclBlock, layer: LayerNode): void;
|
|
107
|
+
add(compiled: CompiledSelectorList | null, block: DeclBlock | null, layer: LayerNode, owner?: BlockOwner | null): void;
|
|
101
108
|
/**
|
|
102
109
|
* Indexes a sheet's top-level rules from `from` on (from 0: a new sheet, checked like sheet())
|
|
103
110
|
* into an index finish() already ranked. They hold no layers (appendableRule), so the layer
|
|
@@ -5,7 +5,7 @@ import { DeclBlock } from "./declarations.js";
|
|
|
5
5
|
import { CSSStyleDeclaration, type DeclarationOwnerRule } from "./CSSStyleDeclaration.js";
|
|
6
6
|
import { type MediaQuery } from "./media.js";
|
|
7
7
|
import { type CompiledSelectorList } from "../selectors/internal.js";
|
|
8
|
-
import { $block, $compiled, $compiledFor, $condition, $constructed, $defaultNamespace, $disabled, $disallowModification, $doc, $href, $indexed, $keyText, $layerName, $list, $matches, $media, $name, $names, $namespaces, $owner, $ownerNode, $ownerRule, $parent, $prefix, $prelude, $queries, $rebuildVersion, $rules, $selector, $sheet, $sheets, $style, $supportsText, $title, $uri, $version } from "../keys.js";
|
|
8
|
+
import { $block, $blockParsed, $blockText, $compiled, $compiledFor, $condition, $constructed, $defaultNamespace, $disabled, $disallowModification, $doc, $href, $indexed, $keyText, $layerName, $list, $matches, $media, $name, $names, $namespaces, $owner, $ownerNode, $ownerRule, $parent, $prefix, $prelude, $queries, $rebuildVersion, $rules, $selector, $sheet, $sheets, $style, $supportsText, $title, $uri, $version } from "../keys.js";
|
|
9
9
|
/** https://drafts.csswg.org/cssom/#the-cssrulelist-interface — live view over a rule array. */
|
|
10
10
|
export declare class CSSRuleList {
|
|
11
11
|
[$rules]: CSSRule[];
|
|
@@ -186,13 +186,19 @@ export declare class CSSGroupingRule extends CSSRule {
|
|
|
186
186
|
/** https://drafts.csswg.org/cssom/#the-cssstylerule-interface (+ CSS Nesting: nested cssRules) */
|
|
187
187
|
export declare class CSSStyleRule extends CSSGroupingRule implements DeclarationOwnerRule {
|
|
188
188
|
[$selector]: string;
|
|
189
|
-
[$block]
|
|
189
|
+
/** The declarations, once something asked for them (`[$block]`). */
|
|
190
|
+
[$blockParsed]: DeclBlock | null;
|
|
191
|
+
/** The block as written, until then: parsed for the first element the rule matches (parser.ts flatBlockEnd). */
|
|
192
|
+
[$blockText]: string | null;
|
|
190
193
|
[$style]: CSSStyleDeclaration | null;
|
|
191
194
|
/** Compiled (nesting-resolved) selector list, cached until selectorText or an ancestor selector changes. */
|
|
192
195
|
[$compiled]: CompiledSelectorList | null;
|
|
193
196
|
[$compiledFor]: string;
|
|
194
|
-
constructor(selector: string, block: DeclBlock);
|
|
197
|
+
constructor(selector: string, block: DeclBlock | null, text?: string | null);
|
|
195
198
|
get type(): number;
|
|
199
|
+
get [$block](): DeclBlock;
|
|
200
|
+
/** Whether the rule declares anything, without parsing a block nothing has asked for: one with text in it may. */
|
|
201
|
+
_mayDeclare(): boolean;
|
|
196
202
|
/** https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext */
|
|
197
203
|
get selectorText(): string;
|
|
198
204
|
set selectorText(value: string);
|
|
@@ -31,8 +31,33 @@ export declare class RawRule {
|
|
|
31
31
|
leading: number;
|
|
32
32
|
/** Rules found directly in the block, with RULE_DECLS runs between and after them. */
|
|
33
33
|
rules: RawRule[];
|
|
34
|
+
/**
|
|
35
|
+
* A qualified rule's block when it holds nothing but declarations, as written and not parsed
|
|
36
|
+
* yet (see `flatBlockEnd`); `decls` is empty until `rawDecls()` parses it. Null otherwise.
|
|
37
|
+
*/
|
|
38
|
+
lazy: string | null;
|
|
34
39
|
constructor(kind: number, name: string, prelude: string, hasBlock: boolean);
|
|
35
40
|
}
|
|
41
|
+
/** A rule's declarations, parsing its block now if that was put off. */
|
|
42
|
+
export declare function rawDecls(rule: RawRule): RawDecl[];
|
|
43
|
+
/**
|
|
44
|
+
* Where the block that starts at `from` (just after its "{") ends, when it can only hold
|
|
45
|
+
* declarations: the offset of its "}", or -1 when it needs the parser (a nested rule or at-rule,
|
|
46
|
+
* or anything this scan does not read exactly as the tokenizer would).
|
|
47
|
+
*
|
|
48
|
+
* Most of a style sheet is rules no element of a test ever matches, and most of parsing one was
|
|
49
|
+
* their declarations: tokenizing each value, normalizing it, expanding shorthands and building the
|
|
50
|
+
* block (a 5,000-rule sheet: 10.5 ms, of which the selectors and this scan are a third). Blink
|
|
51
|
+
* defers the same work (its lazy property parsing). Flat blocks are found by characters alone:
|
|
52
|
+
*
|
|
53
|
+
* - strings and comments are skipped; one that does not end before a newline or the end of the
|
|
54
|
+
* text gives up, as does an unquoted `url(` holding anything a URL token may not;
|
|
55
|
+
* - "{" and "@" give up (a nested rule, an at-rule), wherever they are;
|
|
56
|
+
* - a "}" inside parentheses or brackets gives up: there it is part of a value.
|
|
57
|
+
*
|
|
58
|
+
* Giving up costs nothing but the scan: the tokenizer parses the block as before.
|
|
59
|
+
*/
|
|
60
|
+
export declare function flatBlockEnd(src: string, from: number): number;
|
|
36
61
|
/** Removes comments from a source slice by re-tokenizing it (only called when the range contained comments). */
|
|
37
62
|
export declare function stripComments(text: string): string;
|
|
38
63
|
export declare class CSSParser {
|
|
@@ -49,6 +74,8 @@ export declare class CSSParser {
|
|
|
49
74
|
important: boolean;
|
|
50
75
|
valueHasBlock: boolean;
|
|
51
76
|
valueOtherCount: number;
|
|
77
|
+
/** Leave a flat block of a qualified rule unparsed (RawRule.lazy); false parses every block now. */
|
|
78
|
+
lazyBlocks: boolean;
|
|
52
79
|
constructor(src: string);
|
|
53
80
|
advance(): number;
|
|
54
81
|
reconsume(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether any style record has been cached in this process. Until one has, nothing reads the
|
|
3
|
+
* count, and an attribute write skips the check (4 ns of a 19 ns write in `dom/attr-revisions`).
|
|
4
|
+
*/
|
|
5
|
+
export declare let styleRecordsCached: boolean;
|
|
6
|
+
/** css/cascade.ts is about to stamp a style record. */
|
|
7
|
+
export declare function noteStyleRecordCached(): void;
|
|
8
|
+
/** A style rule with `name` in an attribute selector was indexed (css/cascade.ts). */
|
|
9
|
+
export declare function noteSelectorAttribute(name: string): void;
|
|
10
|
+
/** Whether a change to attribute `localName` (no namespace) leaves every computed style as it was. */
|
|
11
|
+
export declare function styleBlindAttribute(localName: string): boolean;
|
|
@@ -27,8 +27,21 @@ export declare class Listener {
|
|
|
27
27
|
abort: AbortBinding | null;
|
|
28
28
|
constructor(callback: EventListenerOrEventListenerObject, flags: number);
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* A target's listeners, in one of two layouts:
|
|
32
|
+
*
|
|
33
|
+
* - compact, while it has listened for at most COMPACT_TYPES event types: `[id, head, id, head…]`,
|
|
34
|
+
* exactly as long as its pairs. Nearly every target with a listener has one or two types (React
|
|
35
|
+
* adds `invalid` to every input, select and textarea, `load`/`error` to images, `toggle` to
|
|
36
|
+
* details), and an array indexed by type id is as long as that id plus V8's growth slack: one
|
|
37
|
+
* `invalid` listener cost 641 B, 64 B of it the listener. Compact, 128 B.
|
|
38
|
+
* - indexed by type id (a hole or undefined: no listener of that type), from the type after that:
|
|
39
|
+
* React's root container, with 87.
|
|
40
|
+
*
|
|
41
|
+
* A compact array's first element is a number, an indexed one's never is. Adding a type to a
|
|
42
|
+
* compact target replaces the array; removing one leaves its pair with an undefined head.
|
|
43
|
+
*/
|
|
44
|
+
export type ListenerSlots = (Listener | number | undefined)[];
|
|
32
45
|
/** `type`'s id, or -1 when nothing has ever listened for it (so no target has a listener). */
|
|
33
46
|
export declare function typeIdOf(type: string): number;
|
|
34
47
|
/** The first listener for type id `id` (-1 included) on a target whose slots are `slots`. */
|
|
@@ -52,6 +65,15 @@ export declare function removeListener(target: EventTarget, type: string, listen
|
|
|
52
65
|
export declare function removeAllEventListeners(target: EventTarget): void;
|
|
53
66
|
/** Whether `target` has at least one listener for `type` (internal fast check for other areas). */
|
|
54
67
|
export declare function hasListeners(target: EventTarget, type: string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether a detached element is a new element in every way but its event listeners, of which it
|
|
70
|
+
* has `listeners`: no parent, children, attributes, shadow root or mutation observers. For
|
|
71
|
+
* @ctrl/dom/react, which gives such a container to the next render() (packages/react/src/pure.ts).
|
|
72
|
+
* False for another DOM's nodes.
|
|
73
|
+
*/
|
|
74
|
+
export declare function reusableElement(element: EventTarget, listeners: number): boolean;
|
|
75
|
+
/** How many listeners `target` has, over every type. */
|
|
76
|
+
export declare function listenerCount(target: EventTarget): number;
|
|
55
77
|
/** Whether `target` has any listener at all. */
|
|
56
78
|
export declare function hasAnyListener(target: EventTarget): boolean;
|
|
57
79
|
export {};
|
|
@@ -108,8 +108,9 @@ export declare class HTMLEmbedElement extends HTMLElement {
|
|
|
108
108
|
* validation (willValidate false), but setCustomValidity still sets validity.customError.
|
|
109
109
|
*/
|
|
110
110
|
export declare class HTMLObjectElement extends HTMLElement {
|
|
111
|
-
|
|
112
|
-
[$
|
|
111
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
112
|
+
[$customValidity]?: string;
|
|
113
|
+
[$validity]?: ValidityState | null;
|
|
113
114
|
get contentDocument(): null;
|
|
114
115
|
get contentWindow(): null;
|
|
115
116
|
getSVGDocument(): null;
|
|
@@ -6,9 +6,10 @@ import { LabelsNodeList } from "./collections.js";
|
|
|
6
6
|
import { type ConstraintValidation, type ValidityState } from "./validation.js";
|
|
7
7
|
import { $customValidity, $labels, $validity } from "../../keys.js";
|
|
8
8
|
export declare class HTMLButtonElement extends HTMLElement {
|
|
9
|
-
|
|
10
|
-
[$
|
|
11
|
-
[$
|
|
9
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
10
|
+
[$customValidity]?: string;
|
|
11
|
+
[$validity]?: ValidityState | null;
|
|
12
|
+
[$labels]?: LabelsNodeList | null;
|
|
12
13
|
/** @internal Use Document.createElement. */
|
|
13
14
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
14
15
|
/** https://html.spec.whatwg.org/#dom-button-type */
|
|
@@ -5,8 +5,9 @@ import { HTMLCollection } from "../../collections/HTMLCollection.js";
|
|
|
5
5
|
import { type ConstraintValidation, type ValidityState } from "./validation.js";
|
|
6
6
|
import { $customValidity, $elements, $validity } from "../../keys.js";
|
|
7
7
|
export declare class HTMLFieldSetElement extends HTMLElement {
|
|
8
|
-
|
|
9
|
-
[$
|
|
8
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
9
|
+
[$customValidity]?: string;
|
|
10
|
+
[$validity]?: ValidityState | null;
|
|
10
11
|
[$elements]: HTMLCollection | null;
|
|
11
12
|
/** @internal Use Document.createElement. */
|
|
12
13
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
@@ -5,7 +5,8 @@ import type { Element } from "../../nodes/Element.js";
|
|
|
5
5
|
import type { Event } from "../../events/Event.js";
|
|
6
6
|
import { LabelsNodeList } from "./collections.js";
|
|
7
7
|
import { FileList } from "../../window/FileList.js";
|
|
8
|
-
import { $
|
|
8
|
+
import { $control, $customValidity, $labels, $userValidity, $validity } from "../../keys.js";
|
|
9
|
+
import { ControlState } from "./control-state.js";
|
|
9
10
|
import { type ConstraintValidation, type ValidityState } from "./validation.js";
|
|
10
11
|
/** https://html.spec.whatwg.org/#value-sanitization-algorithm for each type. */
|
|
11
12
|
export declare function sanitizeValue(type: number, value: string, impl: NodeImpl): string;
|
|
@@ -13,39 +14,15 @@ export declare function sanitizeValue(type: number, value: string, impl: NodeImp
|
|
|
13
14
|
export declare function stringToNumber(type: number, s: string): number;
|
|
14
15
|
/** https://html.spec.whatwg.org/#concept-input-value-number-string */
|
|
15
16
|
export declare function numberToString(type: number, n: number): string;
|
|
16
|
-
declare const DIRECTIONS: readonly ["forward", "backward", "none"];
|
|
17
|
-
type SelectionDirection = (typeof DIRECTIONS)[number];
|
|
18
17
|
export declare class HTMLInputElement extends HTMLElement {
|
|
19
|
-
/**
|
|
20
|
-
[$
|
|
21
|
-
/**
|
|
22
|
-
[$
|
|
23
|
-
|
|
24
|
-
[$
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[$dirtyChecked]: boolean;
|
|
28
|
-
[$indeterminate]: boolean;
|
|
29
|
-
[$files]: FileList | null;
|
|
30
|
-
[$selStart]: number;
|
|
31
|
-
[$selEnd]: number;
|
|
32
|
-
[$selDir]: SelectionDirection;
|
|
33
|
-
[$customValidity]: string;
|
|
34
|
-
[$validity]: ValidityState | null;
|
|
35
|
-
[$labels]: LabelsNodeList | null;
|
|
36
|
-
/** The value was last changed by a user edit (tooLong/tooShort only apply then). */
|
|
37
|
-
[$userEdited]: boolean;
|
|
38
|
-
/** The user typed something the type cannot represent (e.g. "1e" in a number field). */
|
|
39
|
-
[$badInput]: boolean;
|
|
40
|
-
/** User-event's UI value (raw typed text) — null when it equals the value. See ui.ts. */
|
|
41
|
-
[$uiValue]: string | null;
|
|
42
|
-
[$preChecked]: boolean;
|
|
43
|
-
[$preIndeterminate]: boolean;
|
|
44
|
-
[$preCheckedRadio]: NodeImpl | null;
|
|
45
|
-
/** Legacy-pre-activation ran (and changed state) for the current dispatch. */
|
|
46
|
-
[$preApplied]: boolean;
|
|
47
|
-
/** https://html.spec.whatwg.org/#user-validity (forms/user-validity.ts). */
|
|
48
|
-
[$userValidity]: boolean;
|
|
18
|
+
/** Value, checkedness, selection and UI state (./control-state.ts). */
|
|
19
|
+
[$control]: ControlState;
|
|
20
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
21
|
+
[$customValidity]?: string;
|
|
22
|
+
[$validity]?: ValidityState | null;
|
|
23
|
+
[$labels]?: LabelsNodeList | null;
|
|
24
|
+
/** https://html.spec.whatwg.org/#user-validity (forms/user-validity.ts); absent while false. */
|
|
25
|
+
[$userValidity]?: boolean;
|
|
49
26
|
/** @internal Use Document.createElement. */
|
|
50
27
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
51
28
|
/** https://html.spec.whatwg.org/#dom-input-type */
|
|
@@ -177,9 +154,7 @@ export declare class HTMLInputElement extends HTMLElement {
|
|
|
177
154
|
export interface HTMLInputElement extends ConstraintValidation {
|
|
178
155
|
}
|
|
179
156
|
interface SelectionHost {
|
|
180
|
-
[$
|
|
181
|
-
[$selEnd]: number;
|
|
182
|
-
[$selDir]: SelectionDirection;
|
|
157
|
+
[$control]: ControlState;
|
|
183
158
|
_selectionLength(): number;
|
|
184
159
|
}
|
|
185
160
|
/**
|
|
@@ -8,9 +8,10 @@ import { $customValidity, $defaultValueOverride, $labels, $options, $validity }
|
|
|
8
8
|
export declare class HTMLOutputElement extends HTMLElement {
|
|
9
9
|
/** https://html.spec.whatwg.org/#concept-output-default-value-override (null = none). */
|
|
10
10
|
[$defaultValueOverride]: string | null;
|
|
11
|
-
|
|
12
|
-
[$
|
|
13
|
-
[$
|
|
11
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
12
|
+
[$customValidity]?: string;
|
|
13
|
+
[$validity]?: ValidityState | null;
|
|
14
|
+
[$labels]?: LabelsNodeList | null;
|
|
14
15
|
/** @internal Use Document.createElement. */
|
|
15
16
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
16
17
|
get type(): string;
|
|
@@ -33,7 +34,7 @@ export declare class HTMLOutputElement extends HTMLElement {
|
|
|
33
34
|
export interface HTMLOutputElement extends ConstraintValidation {
|
|
34
35
|
}
|
|
35
36
|
export declare class HTMLProgressElement extends HTMLElement {
|
|
36
|
-
[$labels]
|
|
37
|
+
[$labels]?: LabelsNodeList | null;
|
|
37
38
|
/** @internal Use Document.createElement. */
|
|
38
39
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
39
40
|
/** https://html.spec.whatwg.org/#dom-progress-max */
|
|
@@ -48,7 +49,7 @@ export declare class HTMLProgressElement extends HTMLElement {
|
|
|
48
49
|
}
|
|
49
50
|
/** https://html.spec.whatwg.org/#the-meter-element — the clamped values of the meter algorithm. */
|
|
50
51
|
export declare class HTMLMeterElement extends HTMLElement {
|
|
51
|
-
[$labels]
|
|
52
|
+
[$labels]?: LabelsNodeList | null;
|
|
52
53
|
/** @internal Use Document.createElement. */
|
|
53
54
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
54
55
|
get min(): number;
|
|
@@ -7,9 +7,10 @@ import { HTMLOptionsCollection, LabelsNodeList } from "./collections.js";
|
|
|
7
7
|
import { type ConstraintValidation, type ValidityState } from "./validation.js";
|
|
8
8
|
import { $customValidity, $labels, $options, $selectedOptions, $settled, $updatingSelectedContent, $userValidity, $validity } from "../../keys.js";
|
|
9
9
|
export declare class HTMLSelectElement extends HTMLElement {
|
|
10
|
-
|
|
11
|
-
[$
|
|
12
|
-
[$
|
|
10
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
11
|
+
[$customValidity]?: string;
|
|
12
|
+
[$validity]?: ValidityState | null;
|
|
13
|
+
[$labels]?: LabelsNodeList | null;
|
|
13
14
|
[$options]: HTMLOptionsCollection | null;
|
|
14
15
|
[$selectedOptions]: HTMLCollection | null;
|
|
15
16
|
/**
|
|
@@ -19,8 +20,8 @@ export declare class HTMLSelectElement extends HTMLElement {
|
|
|
19
20
|
[$settled]: boolean;
|
|
20
21
|
/** Re-entrancy guard for `_updateSelectedContent` (it mutates the select's subtree). */
|
|
21
22
|
[$updatingSelectedContent]: boolean;
|
|
22
|
-
/** https://html.spec.whatwg.org/#user-validity (forms/user-validity.ts). */
|
|
23
|
-
[$userValidity]
|
|
23
|
+
/** https://html.spec.whatwg.org/#user-validity (forms/user-validity.ts); absent while false. */
|
|
24
|
+
[$userValidity]?: boolean;
|
|
24
25
|
/** @internal Use Document.createElement. */
|
|
25
26
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
26
27
|
_ensureSettled(): void;
|
|
@@ -3,22 +3,17 @@ import type { Document } from "../../nodes/Document.js";
|
|
|
3
3
|
import type { Element } from "../../nodes/Element.js";
|
|
4
4
|
import { LabelsNodeList } from "./collections.js";
|
|
5
5
|
import { type ConstraintValidation, type ValidityState } from "./validation.js";
|
|
6
|
-
import { $
|
|
6
|
+
import { $control, $customValidity, $labels, $userValidity, $validity } from "../../keys.js";
|
|
7
|
+
import { ControlState } from "./control-state.js";
|
|
7
8
|
export declare class HTMLTextAreaElement extends HTMLElement {
|
|
8
|
-
/**
|
|
9
|
-
[$
|
|
10
|
-
/**
|
|
11
|
-
[$
|
|
12
|
-
[$
|
|
13
|
-
[$
|
|
14
|
-
|
|
15
|
-
[$
|
|
16
|
-
[$validity]: ValidityState | null;
|
|
17
|
-
[$labels]: LabelsNodeList | null;
|
|
18
|
-
/** The value was last changed by a user edit (tooLong/tooShort only apply then). */
|
|
19
|
-
[$userEdited]: boolean;
|
|
20
|
-
/** https://html.spec.whatwg.org/#user-validity (forms/user-validity.ts). */
|
|
21
|
-
[$userValidity]: boolean;
|
|
9
|
+
/** Value, checkedness, selection and UI state (./control-state.ts). */
|
|
10
|
+
[$control]: ControlState;
|
|
11
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
12
|
+
[$customValidity]?: string;
|
|
13
|
+
[$validity]?: ValidityState | null;
|
|
14
|
+
[$labels]?: LabelsNodeList | null;
|
|
15
|
+
/** https://html.spec.whatwg.org/#user-validity (forms/user-validity.ts); absent while false. */
|
|
16
|
+
[$userValidity]?: boolean;
|
|
22
17
|
/** @internal Use Document.createElement. */
|
|
23
18
|
constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
|
|
24
19
|
get type(): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { NodeImpl } from "../../nodes/NodeImpl.js";
|
|
2
|
+
import type { FileList } from "../../window/FileList.js";
|
|
3
|
+
export declare class ControlState {
|
|
4
|
+
/**
|
|
5
|
+
* The value while the dirty value flag is set: an input's in value mode "value", a textarea's
|
|
6
|
+
* raw value.
|
|
7
|
+
*/
|
|
8
|
+
value: string;
|
|
9
|
+
/** https://html.spec.whatwg.org/#concept-input-value-dirty-flag, https://html.spec.whatwg.org/#concept-textarea-dirty */
|
|
10
|
+
dirtyValue: boolean;
|
|
11
|
+
/** Checkedness, authoritative only when `checkedSet` (otherwise derived from the checked attribute). */
|
|
12
|
+
checked: boolean;
|
|
13
|
+
checkedSet: boolean;
|
|
14
|
+
/** https://html.spec.whatwg.org/#concept-input-checked-dirty-flag */
|
|
15
|
+
dirtyChecked: boolean;
|
|
16
|
+
indeterminate: boolean;
|
|
17
|
+
files: FileList | null;
|
|
18
|
+
selStart: number;
|
|
19
|
+
selEnd: number;
|
|
20
|
+
selDir: "forward" | "backward" | "none";
|
|
21
|
+
/** The value was last changed by a user edit (tooLong/tooShort only apply then). */
|
|
22
|
+
userEdited: boolean;
|
|
23
|
+
/** The user typed something the type cannot represent (e.g. "1e" in a number field). */
|
|
24
|
+
badInput: boolean;
|
|
25
|
+
/** User-event's UI value (raw typed text) — null when it equals the value. See ui.ts. */
|
|
26
|
+
uiValue: string | null;
|
|
27
|
+
preChecked: boolean;
|
|
28
|
+
preIndeterminate: boolean;
|
|
29
|
+
preCheckedRadio: NodeImpl | null;
|
|
30
|
+
/** Legacy-pre-activation ran (and changed state) for the current dispatch. */
|
|
31
|
+
preApplied: boolean;
|
|
32
|
+
constructor();
|
|
33
|
+
}
|
|
@@ -21,8 +21,9 @@ export declare class FaceState {
|
|
|
21
21
|
/** Last form owner / disabledness reported through the callbacks. */
|
|
22
22
|
lastOwner: NodeImpl | null;
|
|
23
23
|
lastDisabled: boolean;
|
|
24
|
-
|
|
25
|
-
[$
|
|
24
|
+
/** The custom validity error message; absent while it is the empty string. */
|
|
25
|
+
[$customValidity]?: string;
|
|
26
|
+
[$validity]?: ValidityState | null;
|
|
26
27
|
constructor(impl: NodeImpl);
|
|
27
28
|
_validityFlags(): number;
|
|
28
29
|
/** https://html.spec.whatwg.org/#barred-from-constraint-validation (FACE: disabled, readonly, datalist). */
|
|
@@ -27,6 +27,9 @@ export declare function clearParserAssociation(el: NodeImpl): void;
|
|
|
27
27
|
* The subtree holding every element whose form owner is `form` (https://html.spec.whatwg.org/#form-owner).
|
|
28
28
|
* Outside it only the parser's form element pointer or, for listed elements, a `form` attribute
|
|
29
29
|
* naming the form's ID can associate an element, so without either the form itself is enough.
|
|
30
|
+
* Forms usually have an ID and `form` attributes are rare: a document none of whose elements has
|
|
31
|
+
* ever had one (Document[$formAttrSeen]) needs no walk of the whole tree for a form with an ID
|
|
32
|
+
* (in a 10,000-node page, `form.elements` after a mutation 119 → 4 µs).
|
|
30
33
|
*/
|
|
31
34
|
export declare function formOwnerScope(form: NodeImpl, listed: boolean): NodeImpl;
|
|
32
35
|
/** All listed elements (excluding image buttons) whose form owner is `form`, in tree order: form.elements. */
|
|
@@ -49,12 +52,21 @@ export declare function hasDatalistAncestor(el: NodeImpl): boolean;
|
|
|
49
52
|
/** https://html.spec.whatwg.org/#labeled-control */
|
|
50
53
|
export declare function labeledControl(label: NodeImpl): NodeImpl | null;
|
|
51
54
|
/**
|
|
52
|
-
* Per-document indexes of connected elements by a string key
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
+
* Per-document indexes of connected elements by a string key, in no particular order, kept by the
|
|
56
|
+
* elements' connected, disconnected and attribute change steps: Document[$forLabels], the labels
|
|
57
|
+
* by `for` value, and Document[$radios], the radios by name.
|
|
58
|
+
*
|
|
59
|
+
* A `for` value nearly always has one label, which never moves: an array. A radio leaves and
|
|
60
|
+
* rejoins its group constantly: on every update React sets its `name` to "" and back
|
|
61
|
+
* (react-dom's updateInput, so the radio is out of its group while its checkedness changes), and
|
|
62
|
+
* splicing each one out of an array made a re-render of a group of 500 radios 250,000 element
|
|
63
|
+
* moves (8% of a click's CPU there). A set, which costs a few hundred bytes per name: fine for
|
|
64
|
+
* radio groups, 11% more allocation building 1,000 labelled rows when the labels had one each.
|
|
55
65
|
*/
|
|
56
66
|
export declare function indexAdd(index: Map<string, NodeImpl[]>, key: string, el: NodeImpl): void;
|
|
57
67
|
export declare function indexRemove(index: Map<string, NodeImpl[]>, key: string, el: NodeImpl): void;
|
|
68
|
+
export declare function radioIndexAdd(index: Map<string, Set<NodeImpl>>, name: string, el: NodeImpl): void;
|
|
69
|
+
export declare function radioIndexRemove(index: Map<string, Set<NodeImpl>>, name: string, el: NodeImpl): void;
|
|
58
70
|
/**
|
|
59
71
|
* Label elements whose labeled control is `el`, in tree order. https://html.spec.whatwg.org/#dom-lfe-labels
|
|
60
72
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NodeImpl } from "../../nodes/NodeImpl.js";
|
|
2
2
|
import { $userValidity } from "../../keys.js";
|
|
3
|
-
/** A control with a user validity flag (input, textarea, select). */
|
|
3
|
+
/** A control with a user validity flag (input, textarea, select): an own property once it is true. */
|
|
4
4
|
export interface UserValidityHolder {
|
|
5
|
-
[$userValidity]
|
|
5
|
+
[$userValidity]?: boolean;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Called by the event dispatch algorithm (events/dispatch.ts) with the target of a `change`
|
|
@@ -12,8 +12,8 @@ export declare const V_BAD_INPUT: number;
|
|
|
12
12
|
export declare const V_CUSTOM_ERROR: number;
|
|
13
13
|
/** Internal contract every element with the constraint validation API implements. */
|
|
14
14
|
export interface Validatable extends Element {
|
|
15
|
-
[$customValidity]
|
|
16
|
-
[$validity]
|
|
15
|
+
[$customValidity]?: string;
|
|
16
|
+
[$validity]?: ValidityState | null;
|
|
17
17
|
/** Bit set of V_* flags describing the current validity state. */
|
|
18
18
|
_validityFlags(): number;
|
|
19
19
|
/** https://html.spec.whatwg.org/#barred-from-constraint-validation */
|