prop-for-that 0.7.0 → 0.7.1
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/CHANGELOG.md +10 -0
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/chunk-2LAVIUIS.cjs +1 -0
- package/dist/chunk-UQW7YOHI.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.global.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AMVS7PIC.cjs +0 -1
- package/dist/chunk-JSHKY54Y.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ backwards-compatible change (semver's `1.0.0`+ rules kick in at v1).
|
|
|
8
8
|
Only the published library (`dist/`) is versioned here; the demo and docs site
|
|
9
9
|
are repo-only and not part of the npm package.
|
|
10
10
|
|
|
11
|
+
## [0.7.1]
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **`visibility` now tolerates near-1 intersection ratios.** The shared
|
|
15
|
+
`IntersectionObserver` requests callbacks just below full containment, and the
|
|
16
|
+
`visibility` source confirms full visibility from the entry geometry instead of
|
|
17
|
+
requiring an exact `intersectionRatio === 1`. This fixes scroll-triggered
|
|
18
|
+
reveal examples that could get stuck on Firefox mobile when the browser reports
|
|
19
|
+
a ratio fractionally below 1.
|
|
20
|
+
|
|
11
21
|
## [0.7.0]
|
|
12
22
|
|
|
13
23
|
Breaking release (0.x minor): leaner defaults, viewport-aware sources, and a
|
package/dist/auto.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk2LAVIUIS_cjs=require('./chunk-2LAVIUIS.cjs');require('./chunk-HHINWX7L.cjs'),require('./chunk-EOPF4ZLZ.cjs'),require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs'),require('./chunk-QHHF5SEL.cjs');var u={"scroll-velocity":()=>import('./scroll-velocity-FBORAQ7L.cjs').then(t=>t.scrollVelocity),online:()=>import('./online-KTMCBCXT.cjs').then(t=>t.online),"page-focused":()=>import('./page-focused-3WLSZDV4.cjs').then(t=>t.pageFocused),"page-visible":()=>import('./page-visible-6PMX575B.cjs').then(t=>t.pageVisible),"nav-type":()=>import('./nav-type-MFJJDDPZ.cjs').then(t=>t.navType),network:()=>import('./network-DPAAEK2S.cjs').then(t=>t.network),battery:()=>import('./battery-DQQ2NOGC.cjs').then(t=>t.battery),clock:()=>import('./clock-EVSBOOMJ.cjs').then(t=>t.clock),fps:()=>import('./fps-TZQLC5MI.cjs').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-MKUHWUQT.cjs').then(t=>t.visualViewport),pointer:()=>import('./pointer-DJSMZGSV.cjs').then(t=>t.pointer),"pointer-local":()=>import('./pointer-local-6JKSOJZV.cjs').then(t=>t.pointerLocal),media:()=>import('./media-XS6ADFFY.cjs').then(t=>t.media),field:()=>import('./field-MPAB2GPW.cjs').then(t=>t.field),"field-state":()=>import('./field-state-LUVDPYVB.cjs').then(t=>t.fieldState),"form-state":()=>import('./form-state-OQCU5JIW.cjs').then(t=>t.formState),select:()=>import('./select-VOFG6POI.cjs').then(t=>t.select),"color-input":()=>import('./color-input-ISNND62O.cjs').then(t=>t.colorInput),orientation:()=>import('./orientation-7UDEAKUV.cjs').then(t=>t.orientation),motion:()=>import('./motion-XN5OMPI3.cjs').then(t=>t.motion),geo:()=>import('./geo-CMG7QJ6S.cjs').then(t=>t.geo),"cpu-pressure":()=>import('./cpu-pressure-FXZDL5IE.cjs').then(t=>t.cpuPressure),img:()=>import('./img-QU7AEFQR.cjs').then(t=>t.img),"img-color":()=>import('./img-color-MBEU42DF.cjs').then(t=>t.imgColor),"video-color":()=>import('./video-color-B37Z5OBY.cjs').then(t=>t.videoColor)};var n=new WeakMap,a=new Map;function v(t){return (t.dataset.propsFor??"").split(/\s+/).filter(Boolean)}function E(t){if(chunk2LAVIUIS_cjs.c(t))return null;let e=u[t];if(!e)return null;let o=a.get(t);return o||(o=e().then(r=>{chunk2LAVIUIS_cjs.a(r);}).catch(r=>{a.delete(t),console.error(`[prop-for-that] failed to load plugin "${t}"`,r);}),a.set(t,o)),o}function L(t,e){let o=E(e);if(!o){chunk2LAVIUIS_cjs.e(t,[e]);return}o.then(()=>{chunk2LAVIUIS_cjs.c(e)&&(n.get(t)??[]).includes(e)&&chunk2LAVIUIS_cjs.e(t,[e]);});}function s(t){let e=v(t),o=n.get(t)??[],r=o.filter(i=>!e.includes(i)),g=e.filter(i=>!o.includes(i));r.length&&chunk2LAVIUIS_cjs.f(t,r),e.length?n.set(t,e):n.delete(t);for(let i of g)L(t,i);}function f(t){let e=n.get(t);e&&(chunk2LAVIUIS_cjs.f(t,e),n.delete(t));}function M(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&s(t),t.querySelectorAll("[data-props-for]").forEach(s));}function b(t){t instanceof HTMLElement&&(f(t),t.querySelectorAll("[data-props-for]").forEach(f));}function h(){document.documentElement.hasAttribute("data-props-typed")&&chunk2LAVIUIS_cjs.d({typed:true}),document.querySelectorAll("[data-props-for]").forEach(s),new MutationObserver(t=>{for(let e of t){if(e.type==="attributes"&&e.target instanceof HTMLElement){s(e.target);continue}e.removedNodes.forEach(b),e.addedNodes.forEach(M);}}).observe(document.documentElement,{subtree:true,childList:true,attributes:true,attributeFilter:["data-props-for"]});}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h,{once:true}):h());
|
package/dist/auto.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d,f as f$1,e,c,a as a$1}from'./chunk-
|
|
1
|
+
import {d,f as f$1,e,c,a as a$1}from'./chunk-UQW7YOHI.js';import'./chunk-LTJ2VKVY.js';import'./chunk-LF4OE7IL.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import'./chunk-EEMKKLRF.js';var u={"scroll-velocity":()=>import('./scroll-velocity-3LOHC3FK.js').then(t=>t.scrollVelocity),online:()=>import('./online-MGYZDLCQ.js').then(t=>t.online),"page-focused":()=>import('./page-focused-LBKD6QXG.js').then(t=>t.pageFocused),"page-visible":()=>import('./page-visible-27YKTHKU.js').then(t=>t.pageVisible),"nav-type":()=>import('./nav-type-S4MHMDHS.js').then(t=>t.navType),network:()=>import('./network-BHUTXTX7.js').then(t=>t.network),battery:()=>import('./battery-CDMJLP4C.js').then(t=>t.battery),clock:()=>import('./clock-LYF2IHGE.js').then(t=>t.clock),fps:()=>import('./fps-OLN52HAI.js').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-GNJTAHPT.js').then(t=>t.visualViewport),pointer:()=>import('./pointer-3O7MGTQD.js').then(t=>t.pointer),"pointer-local":()=>import('./pointer-local-X5TVNEEJ.js').then(t=>t.pointerLocal),media:()=>import('./media-RDQ3WR22.js').then(t=>t.media),field:()=>import('./field-N3X45MAG.js').then(t=>t.field),"field-state":()=>import('./field-state-CW4AHAD4.js').then(t=>t.fieldState),"form-state":()=>import('./form-state-43U225CL.js').then(t=>t.formState),select:()=>import('./select-EU62RW5T.js').then(t=>t.select),"color-input":()=>import('./color-input-UT32SY4G.js').then(t=>t.colorInput),orientation:()=>import('./orientation-WJTK5VKX.js').then(t=>t.orientation),motion:()=>import('./motion-BIOKXRRD.js').then(t=>t.motion),geo:()=>import('./geo-MXO5OMVO.js').then(t=>t.geo),"cpu-pressure":()=>import('./cpu-pressure-WCDHVDRP.js').then(t=>t.cpuPressure),img:()=>import('./img-ZKCK5FYH.js').then(t=>t.img),"img-color":()=>import('./img-color-VW3XMATY.js').then(t=>t.imgColor),"video-color":()=>import('./video-color-ZMRKDZFO.js').then(t=>t.videoColor)};var n=new WeakMap,a=new Map;function v(t){return (t.dataset.propsFor??"").split(/\s+/).filter(Boolean)}function E(t){if(c(t))return null;let e=u[t];if(!e)return null;let o=a.get(t);return o||(o=e().then(r=>{a$1(r);}).catch(r=>{a.delete(t),console.error(`[prop-for-that] failed to load plugin "${t}"`,r);}),a.set(t,o)),o}function L(t,e$1){let o=E(e$1);if(!o){e(t,[e$1]);return}o.then(()=>{c(e$1)&&(n.get(t)??[]).includes(e$1)&&e(t,[e$1]);});}function s(t){let e=v(t),o=n.get(t)??[],r=o.filter(i=>!e.includes(i)),g=e.filter(i=>!o.includes(i));r.length&&f$1(t,r),e.length?n.set(t,e):n.delete(t);for(let i of g)L(t,i);}function f(t){let e=n.get(t);e&&(f$1(t,e),n.delete(t));}function M(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&s(t),t.querySelectorAll("[data-props-for]").forEach(s));}function b(t){t instanceof HTMLElement&&(f(t),t.querySelectorAll("[data-props-for]").forEach(f));}function h(){document.documentElement.hasAttribute("data-props-typed")&&d({typed:true}),document.querySelectorAll("[data-props-for]").forEach(s),new MutationObserver(t=>{for(let e of t){if(e.type==="attributes"&&e.target instanceof HTMLElement){s(e.target);continue}e.removedNodes.forEach(b),e.addedNodes.forEach(M);}}).observe(document.documentElement,{subtree:true,childList:true,attributes:true,attributeFilter:["data-props-for"]});}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h,{once:true}):h());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunkEOPF4ZLZ_cjs=require('./chunk-EOPF4ZLZ.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs'),chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs'),chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var u;function K(){if(u!==void 0||(u=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return u;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],u=e.cssRules[0].style;}catch{u=null;}return u}function y(e){if(typeof document<"u"&&e===document.documentElement){let t=K();if(t)return t}return e.style}var E=class{pending=new Map;last=new WeakMap;set(t,r,n){let o=this.pending.get(t);if(o?.has(r)){o.set(r,n);return}this.last.get(t)?.get(r)!==n&&(o?o.set(r,n):this.pending.set(t,new Map([[r,n]])),chunkEOPF4ZLZ_cjs.a());}forget(t,r){this.last.get(t)?.delete(r),this.pending.get(t)?.delete(r);}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let n=this.last.get(t);n||this.last.set(t,n=new Map);let o=y(t);for(let[s,i]of r)n.get(s)!==i&&(o.setProperty(s,i),n.set(s,i));}this.pending.clear();}}},g=new E;chunkEOPF4ZLZ_cjs.b(g.flush);var S,d=new WeakMap,T=new WeakMap;function R(e,t){S||(S=new ResizeObserver(o=>{for(let s of o){T.set(s.target,s);let i=d.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=d.get(e);r||(d.set(e,r=new Set),S.observe(e)),r.add(t);let n=T.get(e);return n&&t(n),()=>{let o=d.get(e);o&&(o.delete(t),o.size===0&&(d.delete(e),S.unobserve(e)));}}var v,m=new WeakMap,H=new WeakMap,A=[0,.98,.99,.995,.999,1];function w(e,t){v||(v=new IntersectionObserver(o=>{for(let s of o){H.set(s.target,s);let i=m.get(s.target);if(i)for(let p of [...i])p(s);}},{threshold:A}));let r=m.get(e);r||(m.set(e,r=new Set),v.observe(e)),r.add(t);let n=H.get(e);return n&&t(n),()=>{let o=m.get(e);o&&(o.delete(t),o.size===0&&(m.delete(e),v.unobserve(e)));}}var z=new Set;function I(e,t,r){if(z.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;z.add(e);let n=t?r?.[t]:void 0,o=t?chunk7L35N3N3_cjs.a.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:n?.syntax??"<number>",inherits:n?.inherits??!0,initialValue:o!=null?String(o):n?.initial??"0"});}catch{}}var D={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),chunkQHHF5SEL_cjs.a("resize",t)}};var O={key:"size",scope:"element",start(e){return R(e.target,t=>{let r=t.borderBoxSize?.[0],n=r?r.inlineSize:t.contentRect.width,o=r?r.blockSize:t.contentRect.height;e.write("w",chunk65MXZJBD_cjs.a(n)),e.write("h",chunk65MXZJBD_cjs.a(o)),e.write("aspect",o>0?chunk65MXZJBD_cjs.a(n/o):0);})}};var h=1;function B(e){let t=e.rootBounds;if(!t)return e.intersectionRatio>=1;let r=e.boundingClientRect;return r.top>=t.top-h&&r.right<=t.right+h&&r.bottom<=t.bottom+h&&r.left>=t.left-h}var P={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),w(e.target,r=>{let n=B(r);e.write("visible",n?1:0),n&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var F={key:"range",scope:"element",start(e){let t=chunkHHINWX7L_cjs.a(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let n=t.min===""?0:Number(t.min),o=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",o>n?chunk65MXZJBD_cjs.a((s-n)/(o-n)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var W={viewport:D,size:O,visibility:P,range:F};var N=()=>{},f=new Map,b={...W};function Me(e){b[e.key]=e;}function ke(e){delete b[e];}function Le(e){return e in b}function xe(e){Object.assign(chunk7L35N3N3_cjs.a,e);}function V(e,t,r){return {target:e,config:chunk7L35N3N3_cjs.a,write(n,o,s="live"){let i=(s==="const"?chunk7L35N3N3_cjs.a.constPrefix:chunk7L35N3N3_cjs.a.livePrefix)+n;t.add(i),chunk7L35N3N3_cjs.a.typed&&I(i,n,r),g.set(e,i,String(o));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==chunk7L35N3N3_cjs.a.root&&typeof IntersectionObserver<"u"))return e.start(t);let o=null,s=()=>{if(!o)try{o=e.start(t);}catch(a){console.error(`[prop-for-that] source "${e.key}" failed to start`,a);}},i=()=>{o?.(),o=null;},p=w(r,a=>{a.isIntersecting?s():i();});return ()=>{p(),i();}}function C(e,t,r){let n=r.get(t);if(!n)return;n.dispose();let o=y(e);for(let s of n.written)o.removeProperty(s),g.forget(e,s);r.delete(t);}function _(e,t){let r=f.get(e);r||f.set(e,r=new Map);let n=[];for(let o of t){if(r.has(o))continue;let s=b[o];if(!s){console.warn(`[prop-for-that] unknown source "${o}"`);continue}let i=new Set,p;try{p=$(s,V(e,i,s.props),e);}catch(a){console.error(`[prop-for-that] source "${o}" failed to start`,a);continue}r.set(o,{dispose:p,written:i}),n.push(o);}return ()=>{let o=f.get(e);if(o){for(let s of n)C(e,s,o);o.size===0&&f.delete(e);}}}function j(e){return e instanceof Element?[e]:typeof NodeList<"u"&&e instanceof NodeList||typeof HTMLCollection<"u"&&e instanceof HTMLCollection||Array.isArray(e)?Array.from(e).filter(t=>t instanceof Element):[]}function q(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function Te(e,t){let r,n;if(t===void 0&&q(e)?(r=chunk7L35N3N3_cjs.a.root?[chunk7L35N3N3_cjs.a.root]:[],n=e):(r=j(e),n=t??[]),!r.length||!n.length)return N;let o=r.map(s=>_(s,n));return ()=>{for(let s of o)s();}}function He(e,t){let r=f.get(e);if(r){for(let n of t??[...r.keys()])C(e,n,r);r.size===0&&f.delete(e);}}function Re(){for(let[e,t]of f)for(let r of [...t.keys()])C(e,r,t);f.clear();}exports.a=Me;exports.b=ke;exports.c=Le;exports.d=xe;exports.e=Te;exports.f=He;exports.g=Re;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-LTJ2VKVY.js';import {b as b$1,a}from'./chunk-LF4OE7IL.js';import {a as a$4}from'./chunk-T4N6AEOZ.js';import {a as a$1}from'./chunk-LWKH66VY.js';import {a as a$3}from'./chunk-EEMKKLRF.js';var u;function K(){if(u!==void 0||(u=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return u;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],u=e.cssRules[0].style;}catch{u=null;}return u}function y(e){if(typeof document<"u"&&e===document.documentElement){let t=K();if(t)return t}return e.style}var E=class{pending=new Map;last=new WeakMap;set(t,r,n){let o=this.pending.get(t);if(o?.has(r)){o.set(r,n);return}this.last.get(t)?.get(r)!==n&&(o?o.set(r,n):this.pending.set(t,new Map([[r,n]])),a());}forget(t,r){this.last.get(t)?.delete(r),this.pending.get(t)?.delete(r);}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let n=this.last.get(t);n||this.last.set(t,n=new Map);let o=y(t);for(let[s,i]of r)n.get(s)!==i&&(o.setProperty(s,i),n.set(s,i));}this.pending.clear();}}},g=new E;b$1(g.flush);var S,d=new WeakMap,T=new WeakMap;function R(e,t){S||(S=new ResizeObserver(o=>{for(let s of o){T.set(s.target,s);let i=d.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=d.get(e);r||(d.set(e,r=new Set),S.observe(e)),r.add(t);let n=T.get(e);return n&&t(n),()=>{let o=d.get(e);o&&(o.delete(t),o.size===0&&(d.delete(e),S.unobserve(e)));}}var v,m=new WeakMap,H=new WeakMap,A=[0,.98,.99,.995,.999,1];function w(e,t){v||(v=new IntersectionObserver(o=>{for(let s of o){H.set(s.target,s);let i=m.get(s.target);if(i)for(let p of [...i])p(s);}},{threshold:A}));let r=m.get(e);r||(m.set(e,r=new Set),v.observe(e)),r.add(t);let n=H.get(e);return n&&t(n),()=>{let o=m.get(e);o&&(o.delete(t),o.size===0&&(m.delete(e),v.unobserve(e)));}}var z=new Set;function I(e,t,r){if(z.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;z.add(e);let n=t?r?.[t]:void 0,o=t?a$1.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:n?.syntax??"<number>",inherits:n?.inherits??!0,initialValue:o!=null?String(o):n?.initial??"0"});}catch{}}var D={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),a$3("resize",t)}};var O={key:"size",scope:"element",start(e){return R(e.target,t=>{let r=t.borderBoxSize?.[0],n=r?r.inlineSize:t.contentRect.width,o=r?r.blockSize:t.contentRect.height;e.write("w",a$4(n)),e.write("h",a$4(o)),e.write("aspect",o>0?a$4(n/o):0);})}};var h=1;function B(e){let t=e.rootBounds;if(!t)return e.intersectionRatio>=1;let r=e.boundingClientRect;return r.top>=t.top-h&&r.right<=t.right+h&&r.bottom<=t.bottom+h&&r.left>=t.left-h}var P={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),w(e.target,r=>{let n=B(r);e.write("visible",n?1:0),n&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var F={key:"range",scope:"element",start(e){let t=a$2(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let n=t.min===""?0:Number(t.min),o=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",o>n?a$4((s-n)/(o-n)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var W={viewport:D,size:O,visibility:P,range:F};var N=()=>{},f=new Map,b={...W};function Me(e){b[e.key]=e;}function ke(e){delete b[e];}function Le(e){return e in b}function xe(e){Object.assign(a$1,e);}function V(e,t,r){return {target:e,config:a$1,write(n,o,s="live"){let i=(s==="const"?a$1.constPrefix:a$1.livePrefix)+n;t.add(i),a$1.typed&&I(i,n,r),g.set(e,i,String(o));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==a$1.root&&typeof IntersectionObserver<"u"))return e.start(t);let o=null,s=()=>{if(!o)try{o=e.start(t);}catch(a){console.error(`[prop-for-that] source "${e.key}" failed to start`,a);}},i=()=>{o?.(),o=null;},p=w(r,a=>{a.isIntersecting?s():i();});return ()=>{p(),i();}}function C(e,t,r){let n=r.get(t);if(!n)return;n.dispose();let o=y(e);for(let s of n.written)o.removeProperty(s),g.forget(e,s);r.delete(t);}function _(e,t){let r=f.get(e);r||f.set(e,r=new Map);let n=[];for(let o of t){if(r.has(o))continue;let s=b[o];if(!s){console.warn(`[prop-for-that] unknown source "${o}"`);continue}let i=new Set,p;try{p=$(s,V(e,i,s.props),e);}catch(a){console.error(`[prop-for-that] source "${o}" failed to start`,a);continue}r.set(o,{dispose:p,written:i}),n.push(o);}return ()=>{let o=f.get(e);if(o){for(let s of n)C(e,s,o);o.size===0&&f.delete(e);}}}function j(e){return e instanceof Element?[e]:typeof NodeList<"u"&&e instanceof NodeList||typeof HTMLCollection<"u"&&e instanceof HTMLCollection||Array.isArray(e)?Array.from(e).filter(t=>t instanceof Element):[]}function q(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function Te(e,t){let r,n;if(t===void 0&&q(e)?(r=a$1.root?[a$1.root]:[],n=e):(r=j(e),n=t??[]),!r.length||!n.length)return N;let o=r.map(s=>_(s,n));return ()=>{for(let s of o)s();}}function He(e,t){let r=f.get(e);if(r){for(let n of t??[...r.keys()])C(e,n,r);r.size===0&&f.delete(e);}}function Re(){for(let[e,t]of f)for(let r of [...t.keys()])C(e,r,t);f.clear();}export{Me as a,ke as b,Le as c,xe as d,Te as e,He as f,Re as g};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk2LAVIUIS_cjs=require('./chunk-2LAVIUIS.cjs');require('./chunk-HHINWX7L.cjs');var chunkEOPF4ZLZ_cjs=require('./chunk-EOPF4ZLZ.cjs');require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs'),require('./chunk-QHHF5SEL.cjs');Object.defineProperty(exports,"configure",{enumerable:true,get:function(){return chunk2LAVIUIS_cjs.d}});Object.defineProperty(exports,"isRegistered",{enumerable:true,get:function(){return chunk2LAVIUIS_cjs.c}});Object.defineProperty(exports,"propsFor",{enumerable:true,get:function(){return chunk2LAVIUIS_cjs.e}});Object.defineProperty(exports,"register",{enumerable:true,get:function(){return chunk2LAVIUIS_cjs.a}});Object.defineProperty(exports,"reset",{enumerable:true,get:function(){return chunk2LAVIUIS_cjs.g}});Object.defineProperty(exports,"unbind",{enumerable:true,get:function(){return chunk2LAVIUIS_cjs.f}});Object.defineProperty(exports,"unregister",{enumerable:true,get:function(){return chunk2LAVIUIS_cjs.b}});Object.defineProperty(exports,"pause",{enumerable:true,get:function(){return chunkEOPF4ZLZ_cjs.d}});Object.defineProperty(exports,"resume",{enumerable:true,get:function(){return chunkEOPF4ZLZ_cjs.e}});
|
package/dist/index.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var PropForThat=(function(exports){'use strict';var c={livePrefix:"--live-",constPrefix:"--const-",root:typeof document<"u"?document.documentElement:void 0,typed:false};var
|
|
1
|
+
var PropForThat=(function(exports){'use strict';var c={livePrefix:"--live-",constPrefix:"--const-",root:typeof document<"u"?document.documentElement:void 0,typed:false};var L=new Set,R=null,u=0,C=false,d=false,D=0,M=()=>typeof requestAnimationFrame=="function";function k(e){if(u=0,d)return;let t=c.liveHz;if(M()&&t&&t>0&&e-D<1e3/t){u=requestAnimationFrame(k);return}if(D=e,C=true,L.size)for(let n of [...L])n(e);R?.(),C=false,L.size&&M()&&T();}function T(){u||C||d||(M()?u=requestAnimationFrame(k):k(0));}function I(){T();}function P(e){R=e;}function O(){d||(d=true,u&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(u),u=0);}function A(){d&&(d=false,T());}typeof document<"u"&&typeof document.addEventListener=="function"&&document.addEventListener("visibilitychange",()=>{document.hidden?O():A();});var l;function J(){if(l!==void 0||(l=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return l;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],l=e.cssRules[0].style;}catch{l=null;}return l}function S(e){if(typeof document<"u"&&e===document.documentElement){let t=J();if(t)return t}return e.style}var H=class{pending=new Map;last=new WeakMap;set(t,n,o){let r=this.pending.get(t);if(r?.has(n)){r.set(n,o);return}this.last.get(t)?.get(n)!==o&&(r?r.set(n,o):this.pending.set(t,new Map([[n,o]])),I());}forget(t,n){this.last.get(t)?.delete(n),this.pending.get(t)?.delete(n);}flush=()=>{if(this.pending.size!==0){for(let[t,n]of this.pending){let o=this.last.get(t);o||this.last.set(t,o=new Map);let r=S(t);for(let[i,s]of n)o.get(i)!==s&&(r.setProperty(i,s),o.set(i,s));}this.pending.clear();}}},v=new H;P(v.flush);var h,y=new WeakMap,W=new WeakMap;function q(e,t){h||(h=new ResizeObserver(r=>{for(let i of r){W.set(i.target,i);let s=y.get(i.target);if(s)for(let f of [...s])f(i);}}));let n=y.get(e);n||(y.set(e,n=new Set),h.observe(e)),n.add(t);let o=W.get(e);return o&&t(o),()=>{let r=y.get(e);r&&(r.delete(t),r.size===0&&(y.delete(e),h.unobserve(e)));}}var w,g=new WeakMap,K=new WeakMap,Q=[0,.98,.99,.995,.999,1];function b(e,t){w||(w=new IntersectionObserver(r=>{for(let i of r){K.set(i.target,i);let s=g.get(i.target);if(s)for(let f of [...s])f(i);}},{threshold:Q}));let n=g.get(e);n||(g.set(e,n=new Set),w.observe(e)),n.add(t);let o=K.get(e);return o&&t(o),()=>{let r=g.get(e);r&&(r.delete(t),r.size===0&&(g.delete(e),w.unobserve(e)));}}var B=new Set;function N(e,t,n){if(B.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;B.add(e);let o=t?n?.[t]:void 0,r=t?c.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:o?.syntax??"<number>",inherits:o?.inherits??!0,initialValue:r!=null?String(r):o?.initial??"0"});}catch{}}var z=new Map;function V(e,t){let n=z.get(e);if(!n){let o=new Set,r=i=>{for(let s of [...o])s(i);};n={handlers:o,dispatch:r},z.set(e,n),window.addEventListener(e,r,{passive:true});}return n.handlers.add(t),()=>{n.handlers.delete(t),n.handlers.size===0&&(window.removeEventListener(e,n.dispatch),z.delete(e));}}var $={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),V("resize",t)}};function a(e){return Math.round(e*1e4)/1e4}var _={key:"size",scope:"element",start(e){return q(e.target,t=>{let n=t.borderBoxSize?.[0],o=n?n.inlineSize:t.contentRect.width,r=n?n.blockSize:t.contentRect.height;e.write("w",a(o)),e.write("h",a(r)),e.write("aspect",r>0?a(o/r):0);})}};var E=1;function X(e){let t=e.rootBounds;if(!t)return e.intersectionRatio>=1;let n=e.boundingClientRect;return n.top>=t.top-E&&n.right<=t.right+E&&n.bottom<=t.bottom+E&&n.left>=t.left-E}var j={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),b(e.target,n=>{let o=X(n);e.write("visible",o?1:0),o&&!t&&(t=true,e.write("has-entered",1,"const"));})}};function G(e,t){return e.matches(t)?e:e.querySelector(t)}var U={key:"range",scope:"element",start(e){let t=G(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let n=()=>{let o=t.min===""?0:Number(t.min),r=t.max===""?100:Number(t.max),i=Number(t.value);e.write("value",i),e.write("value-pct",r>o?a((i-o)/(r-o)):0);};return n(),t.addEventListener("input",n,{passive:true}),()=>t.removeEventListener("input",n)}};var Y={viewport:$,size:_,visibility:j,range:U};var Z=()=>{},p=new Map,x={...Y};function qe(e){x[e.key]=e;}function Be(e){delete x[e];}function Ne(e){return e in x}function Ve(e){Object.assign(c,e);}function ee(e,t,n){return {target:e,config:c,write(o,r,i="live"){let s=(i==="const"?c.constPrefix:c.livePrefix)+o;t.add(s),c.typed&&N(s,o,n),v.set(e,s,String(r));}}}function te(e,t,n){if(!(e.scope==="element"&&e.gate!==false&&n!==c.root&&typeof IntersectionObserver<"u"))return e.start(t);let r=null,i=()=>{if(!r)try{r=e.start(t);}catch(m){console.error(`[prop-for-that] source "${e.key}" failed to start`,m);}},s=()=>{r?.(),r=null;},f=b(n,m=>{m.isIntersecting?i():s();});return ()=>{f(),s();}}function F(e,t,n){let o=n.get(t);if(!o)return;o.dispose();let r=S(e);for(let i of o.written)r.removeProperty(i),v.forget(e,i);n.delete(t);}function ne(e,t){let n=p.get(e);n||p.set(e,n=new Map);let o=[];for(let r of t){if(n.has(r))continue;let i=x[r];if(!i){console.warn(`[prop-for-that] unknown source "${r}"`);continue}let s=new Set,f;try{f=te(i,ee(e,s,i.props),e);}catch(m){console.error(`[prop-for-that] source "${r}" failed to start`,m);continue}n.set(r,{dispose:f,written:s}),o.push(r);}return ()=>{let r=p.get(e);if(r){for(let i of o)F(e,i,r);r.size===0&&p.delete(e);}}}function re(e){return e instanceof Element?[e]:typeof NodeList<"u"&&e instanceof NodeList||typeof HTMLCollection<"u"&&e instanceof HTMLCollection||Array.isArray(e)?Array.from(e).filter(t=>t instanceof Element):[]}function oe(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function $e(e,t){let n,o;if(t===void 0&&oe(e)?(n=c.root?[c.root]:[],o=e):(n=re(e),o=t??[]),!n.length||!o.length)return Z;let r=n.map(i=>ne(i,o));return ()=>{for(let i of r)i();}}function _e(e,t){let n=p.get(e);if(n){for(let o of t??[...n.keys()])F(e,o,n);n.size===0&&p.delete(e);}}function je(){for(let[e,t]of p)for(let n of [...t.keys()])F(e,n,t);p.clear();}exports.configure=Ve;exports.isRegistered=Ne;exports.pause=O;exports.propsFor=$e;exports.register=qe;exports.reset=je;exports.resume=A;exports.unbind=_e;exports.unregister=Be;return exports;})({});
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as configure,c as isRegistered,e as propsFor,a as register,g as reset,f as unbind,b as unregister}from'./chunk-
|
|
1
|
+
export{d as configure,c as isRegistered,e as propsFor,a as register,g as reset,f as unbind,b as unregister}from'./chunk-UQW7YOHI.js';import'./chunk-LTJ2VKVY.js';export{d as pause,e as resume}from'./chunk-LF4OE7IL.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import'./chunk-EEMKKLRF.js';
|
package/dist/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkUALPUR2L_cjs=require('./chunk-UALPUR2L.cjs'),chunk2H5YFW6O_cjs=require('./chunk-2H5YFW6O.cjs'),chunk6FIY4G6K_cjs=require('./chunk-6FIY4G6K.cjs'),chunkFKBHTKZH_cjs=require('./chunk-FKBHTKZH.cjs'),chunkHYVT6V4Z_cjs=require('./chunk-HYVT6V4Z.cjs'),chunk63C3RCO2_cjs=require('./chunk-63C3RCO2.cjs'),chunkYXQTZ7WB_cjs=require('./chunk-YXQTZ7WB.cjs'),chunkCGNMHQYQ_cjs=require('./chunk-CGNMHQYQ.cjs'),chunkCQQV55KU_cjs=require('./chunk-CQQV55KU.cjs');require('./chunk-L4SCOKPV.cjs');var chunkBH7EQDLL_cjs=require('./chunk-BH7EQDLL.cjs'),chunkX5SADKXG_cjs=require('./chunk-X5SADKXG.cjs');require('./chunk-A6JDSQWH.cjs');var chunkMJJCQRTF_cjs=require('./chunk-MJJCQRTF.cjs'),chunkLULEQHRM_cjs=require('./chunk-LULEQHRM.cjs'),chunkMGZTR3X6_cjs=require('./chunk-MGZTR3X6.cjs'),chunkRT47EE2L_cjs=require('./chunk-RT47EE2L.cjs'),chunk7CDVAP3H_cjs=require('./chunk-7CDVAP3H.cjs'),chunk6LTQ7ISE_cjs=require('./chunk-6LTQ7ISE.cjs'),chunkSBF6XS5A_cjs=require('./chunk-SBF6XS5A.cjs'),chunkXQOUJEVE_cjs=require('./chunk-XQOUJEVE.cjs'),chunk3W7CXUWN_cjs=require('./chunk-3W7CXUWN.cjs'),chunkSYKMPPTY_cjs=require('./chunk-SYKMPPTY.cjs'),
|
|
1
|
+
'use strict';var chunkUALPUR2L_cjs=require('./chunk-UALPUR2L.cjs'),chunk2H5YFW6O_cjs=require('./chunk-2H5YFW6O.cjs'),chunk6FIY4G6K_cjs=require('./chunk-6FIY4G6K.cjs'),chunkFKBHTKZH_cjs=require('./chunk-FKBHTKZH.cjs'),chunkHYVT6V4Z_cjs=require('./chunk-HYVT6V4Z.cjs'),chunk63C3RCO2_cjs=require('./chunk-63C3RCO2.cjs'),chunkYXQTZ7WB_cjs=require('./chunk-YXQTZ7WB.cjs'),chunkCGNMHQYQ_cjs=require('./chunk-CGNMHQYQ.cjs'),chunkCQQV55KU_cjs=require('./chunk-CQQV55KU.cjs');require('./chunk-L4SCOKPV.cjs');var chunkBH7EQDLL_cjs=require('./chunk-BH7EQDLL.cjs'),chunkX5SADKXG_cjs=require('./chunk-X5SADKXG.cjs');require('./chunk-A6JDSQWH.cjs');var chunkMJJCQRTF_cjs=require('./chunk-MJJCQRTF.cjs'),chunkLULEQHRM_cjs=require('./chunk-LULEQHRM.cjs'),chunkMGZTR3X6_cjs=require('./chunk-MGZTR3X6.cjs'),chunkRT47EE2L_cjs=require('./chunk-RT47EE2L.cjs'),chunk7CDVAP3H_cjs=require('./chunk-7CDVAP3H.cjs'),chunk6LTQ7ISE_cjs=require('./chunk-6LTQ7ISE.cjs'),chunkSBF6XS5A_cjs=require('./chunk-SBF6XS5A.cjs'),chunkXQOUJEVE_cjs=require('./chunk-XQOUJEVE.cjs'),chunk3W7CXUWN_cjs=require('./chunk-3W7CXUWN.cjs'),chunkSYKMPPTY_cjs=require('./chunk-SYKMPPTY.cjs'),chunk2LAVIUIS_cjs=require('./chunk-2LAVIUIS.cjs');require('./chunk-HHINWX7L.cjs');var chunkS2QXIZB2_cjs=require('./chunk-S2QXIZB2.cjs');require('./chunk-EOPF4ZLZ.cjs'),require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs');var chunkOVF4XN2H_cjs=require('./chunk-OVF4XN2H.cjs'),chunkWIPJMLJJ_cjs=require('./chunk-WIPJMLJJ.cjs');require('./chunk-QHHF5SEL.cjs');var chunk3MK6Q7DX_cjs=require('./chunk-3MK6Q7DX.cjs');var I=[chunkS2QXIZB2_cjs.a,chunkOVF4XN2H_cjs.a,chunkWIPJMLJJ_cjs.a,chunk3MK6Q7DX_cjs.a,chunkMGZTR3X6_cjs.a,chunkRT47EE2L_cjs.b,chunk7CDVAP3H_cjs.a,chunk6LTQ7ISE_cjs.a,chunkSBF6XS5A_cjs.a,chunkXQOUJEVE_cjs.a,chunk3W7CXUWN_cjs.a,chunkSYKMPPTY_cjs.a,chunk63C3RCO2_cjs.a,chunkYXQTZ7WB_cjs.a,chunkCGNMHQYQ_cjs.a,chunkCQQV55KU_cjs.a,chunkBH7EQDLL_cjs.a,chunkX5SADKXG_cjs.a,chunkMJJCQRTF_cjs.a,chunkLULEQHRM_cjs.a,chunkUALPUR2L_cjs.a,chunk2H5YFW6O_cjs.a,chunk6FIY4G6K_cjs.a,chunkFKBHTKZH_cjs.a,chunkHYVT6V4Z_cjs.a];function ro(...o){for(let F of o.length?o:I)chunk2LAVIUIS_cjs.a(F);}Object.defineProperty(exports,"geo",{enumerable:true,get:function(){return chunkUALPUR2L_cjs.a}});Object.defineProperty(exports,"cpuPressure",{enumerable:true,get:function(){return chunk2H5YFW6O_cjs.a}});Object.defineProperty(exports,"img",{enumerable:true,get:function(){return chunk6FIY4G6K_cjs.a}});Object.defineProperty(exports,"imgColor",{enumerable:true,get:function(){return chunkFKBHTKZH_cjs.a}});Object.defineProperty(exports,"videoColor",{enumerable:true,get:function(){return chunkHYVT6V4Z_cjs.a}});Object.defineProperty(exports,"media",{enumerable:true,get:function(){return chunk63C3RCO2_cjs.a}});Object.defineProperty(exports,"field",{enumerable:true,get:function(){return chunkYXQTZ7WB_cjs.a}});Object.defineProperty(exports,"fieldState",{enumerable:true,get:function(){return chunkCGNMHQYQ_cjs.a}});Object.defineProperty(exports,"formState",{enumerable:true,get:function(){return chunkCQQV55KU_cjs.a}});Object.defineProperty(exports,"select",{enumerable:true,get:function(){return chunkBH7EQDLL_cjs.a}});Object.defineProperty(exports,"colorInput",{enumerable:true,get:function(){return chunkX5SADKXG_cjs.a}});Object.defineProperty(exports,"orientation",{enumerable:true,get:function(){return chunkMJJCQRTF_cjs.a}});Object.defineProperty(exports,"motion",{enumerable:true,get:function(){return chunkLULEQHRM_cjs.a}});Object.defineProperty(exports,"navType",{enumerable:true,get:function(){return chunkMGZTR3X6_cjs.a}});Object.defineProperty(exports,"network",{enumerable:true,get:function(){return chunkRT47EE2L_cjs.b}});Object.defineProperty(exports,"battery",{enumerable:true,get:function(){return chunk7CDVAP3H_cjs.a}});Object.defineProperty(exports,"clock",{enumerable:true,get:function(){return chunk6LTQ7ISE_cjs.a}});Object.defineProperty(exports,"fps",{enumerable:true,get:function(){return chunkSBF6XS5A_cjs.a}});Object.defineProperty(exports,"visualViewport",{enumerable:true,get:function(){return chunkXQOUJEVE_cjs.a}});Object.defineProperty(exports,"pointer",{enumerable:true,get:function(){return chunk3W7CXUWN_cjs.a}});Object.defineProperty(exports,"pointerLocal",{enumerable:true,get:function(){return chunkSYKMPPTY_cjs.a}});Object.defineProperty(exports,"scrollVelocity",{enumerable:true,get:function(){return chunkS2QXIZB2_cjs.a}});Object.defineProperty(exports,"online",{enumerable:true,get:function(){return chunkOVF4XN2H_cjs.a}});Object.defineProperty(exports,"pageFocused",{enumerable:true,get:function(){return chunkWIPJMLJJ_cjs.a}});Object.defineProperty(exports,"pageVisible",{enumerable:true,get:function(){return chunk3MK6Q7DX_cjs.a}});exports.allPlugins=I;exports.registerPlugins=ro;
|
package/dist/plugins.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$j}from'./chunk-FOHEZJHF.js';export{a as geo}from'./chunk-FOHEZJHF.js';import {a as a$k}from'./chunk-5JZBLUQK.js';export{a as cpuPressure}from'./chunk-5JZBLUQK.js';import {a as a$l}from'./chunk-KMPRPVIO.js';export{a as img}from'./chunk-KMPRPVIO.js';import {a as a$m}from'./chunk-A7GWTDM7.js';export{a as imgColor}from'./chunk-A7GWTDM7.js';import {a as a$n}from'./chunk-ZQTU5EW7.js';export{a as videoColor}from'./chunk-ZQTU5EW7.js';import {a as a$b}from'./chunk-UHGW7AXC.js';export{a as media}from'./chunk-UHGW7AXC.js';import {a as a$c}from'./chunk-2C7ZUOOR.js';export{a as field}from'./chunk-2C7ZUOOR.js';import {a as a$d}from'./chunk-YXEERKSK.js';export{a as fieldState}from'./chunk-YXEERKSK.js';import {a as a$e}from'./chunk-SRQQTNRZ.js';export{a as formState}from'./chunk-SRQQTNRZ.js';import'./chunk-QIUPJ6MF.js';import {a as a$f}from'./chunk-IJDX3MYP.js';export{a as select}from'./chunk-IJDX3MYP.js';import {a as a$g}from'./chunk-QRIZE6VL.js';export{a as colorInput}from'./chunk-QRIZE6VL.js';import'./chunk-A2ETARW3.js';import {a as a$h}from'./chunk-Y7HUY6HR.js';export{a as orientation}from'./chunk-Y7HUY6HR.js';import {a as a$i}from'./chunk-WUGCASE4.js';export{a as motion}from'./chunk-WUGCASE4.js';import {a as a$4}from'./chunk-H7X35UB4.js';export{a as navType}from'./chunk-H7X35UB4.js';import {b}from'./chunk-JB72QLD6.js';export{b as network}from'./chunk-JB72QLD6.js';import {a as a$5}from'./chunk-DQJQEWPS.js';export{a as battery}from'./chunk-DQJQEWPS.js';import {a as a$6}from'./chunk-7U544OAJ.js';export{a as clock}from'./chunk-7U544OAJ.js';import {a as a$7}from'./chunk-IKOVFAJO.js';export{a as fps}from'./chunk-IKOVFAJO.js';import {a as a$8}from'./chunk-F5H2O3AR.js';export{a as visualViewport}from'./chunk-F5H2O3AR.js';import {a as a$9}from'./chunk-KAK6WZS7.js';export{a as pointer}from'./chunk-KAK6WZS7.js';import {a as a$a}from'./chunk-2E2JQAHI.js';export{a as pointerLocal}from'./chunk-2E2JQAHI.js';import {a as a$o}from'./chunk-
|
|
1
|
+
import {a as a$j}from'./chunk-FOHEZJHF.js';export{a as geo}from'./chunk-FOHEZJHF.js';import {a as a$k}from'./chunk-5JZBLUQK.js';export{a as cpuPressure}from'./chunk-5JZBLUQK.js';import {a as a$l}from'./chunk-KMPRPVIO.js';export{a as img}from'./chunk-KMPRPVIO.js';import {a as a$m}from'./chunk-A7GWTDM7.js';export{a as imgColor}from'./chunk-A7GWTDM7.js';import {a as a$n}from'./chunk-ZQTU5EW7.js';export{a as videoColor}from'./chunk-ZQTU5EW7.js';import {a as a$b}from'./chunk-UHGW7AXC.js';export{a as media}from'./chunk-UHGW7AXC.js';import {a as a$c}from'./chunk-2C7ZUOOR.js';export{a as field}from'./chunk-2C7ZUOOR.js';import {a as a$d}from'./chunk-YXEERKSK.js';export{a as fieldState}from'./chunk-YXEERKSK.js';import {a as a$e}from'./chunk-SRQQTNRZ.js';export{a as formState}from'./chunk-SRQQTNRZ.js';import'./chunk-QIUPJ6MF.js';import {a as a$f}from'./chunk-IJDX3MYP.js';export{a as select}from'./chunk-IJDX3MYP.js';import {a as a$g}from'./chunk-QRIZE6VL.js';export{a as colorInput}from'./chunk-QRIZE6VL.js';import'./chunk-A2ETARW3.js';import {a as a$h}from'./chunk-Y7HUY6HR.js';export{a as orientation}from'./chunk-Y7HUY6HR.js';import {a as a$i}from'./chunk-WUGCASE4.js';export{a as motion}from'./chunk-WUGCASE4.js';import {a as a$4}from'./chunk-H7X35UB4.js';export{a as navType}from'./chunk-H7X35UB4.js';import {b}from'./chunk-JB72QLD6.js';export{b as network}from'./chunk-JB72QLD6.js';import {a as a$5}from'./chunk-DQJQEWPS.js';export{a as battery}from'./chunk-DQJQEWPS.js';import {a as a$6}from'./chunk-7U544OAJ.js';export{a as clock}from'./chunk-7U544OAJ.js';import {a as a$7}from'./chunk-IKOVFAJO.js';export{a as fps}from'./chunk-IKOVFAJO.js';import {a as a$8}from'./chunk-F5H2O3AR.js';export{a as visualViewport}from'./chunk-F5H2O3AR.js';import {a as a$9}from'./chunk-KAK6WZS7.js';export{a as pointer}from'./chunk-KAK6WZS7.js';import {a as a$a}from'./chunk-2E2JQAHI.js';export{a as pointerLocal}from'./chunk-2E2JQAHI.js';import {a as a$o}from'./chunk-UQW7YOHI.js';import'./chunk-LTJ2VKVY.js';import {a}from'./chunk-RI7ZNKJ4.js';export{a as scrollVelocity}from'./chunk-RI7ZNKJ4.js';import'./chunk-LF4OE7IL.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import {a as a$1}from'./chunk-MDKLN42L.js';export{a as online}from'./chunk-MDKLN42L.js';import {a as a$2}from'./chunk-HKCTBVQT.js';export{a as pageFocused}from'./chunk-HKCTBVQT.js';import'./chunk-EEMKKLRF.js';import {a as a$3}from'./chunk-SFO6H2DN.js';export{a as pageVisible}from'./chunk-SFO6H2DN.js';var I=[a,a$1,a$2,a$3,a$4,b,a$5,a$6,a$7,a$8,a$9,a$a,a$b,a$c,a$d,a$e,a$f,a$g,a$h,a$i,a$j,a$k,a$l,a$m,a$n];function ro(...o){for(let F of o.length?o:I)a$o(F);}export{I as allPlugins,ro as registerPlugins};
|
package/package.json
CHANGED
package/dist/chunk-AMVS7PIC.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunkEOPF4ZLZ_cjs=require('./chunk-EOPF4ZLZ.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs'),chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs'),chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var u;function F(){if(u!==void 0||(u=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return u;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],u=e.cssRules[0].style;}catch{u=null;}return u}function m(e){if(typeof document<"u"&&e===document.documentElement){let t=F();if(t)return t}return e.style}var b=class{pending=new Map;last=new WeakMap;set(t,r,n){let o=this.pending.get(t);if(o?.has(r)){o.set(r,n);return}this.last.get(t)?.get(r)!==n&&(o?o.set(r,n):this.pending.set(t,new Map([[r,n]])),chunkEOPF4ZLZ_cjs.a());}forget(t,r){this.last.get(t)?.delete(r),this.pending.get(t)?.delete(r);}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let n=this.last.get(t);n||this.last.set(t,n=new Map);let o=m(t);for(let[s,i]of r)n.get(s)!==i&&(o.setProperty(s,i),n.set(s,i));}this.pending.clear();}}},g=new b;chunkEOPF4ZLZ_cjs.b(g.flush);var S,d=new WeakMap,x=new WeakMap;function H(e,t){S||(S=new ResizeObserver(o=>{for(let s of o){x.set(s.target,s);let i=d.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=d.get(e);r||(d.set(e,r=new Set),S.observe(e)),r.add(t);let n=x.get(e);return n&&t(n),()=>{let o=d.get(e);o&&(o.delete(t),o.size===0&&(d.delete(e),S.unobserve(e)));}}var v,y=new WeakMap,T=new WeakMap;function w(e,t){v||(v=new IntersectionObserver(o=>{for(let s of o){T.set(s.target,s);let i=y.get(s.target);if(i)for(let p of [...i])p(s);}},{threshold:[0,1]}));let r=y.get(e);r||(y.set(e,r=new Set),v.observe(e)),r.add(t);let n=T.get(e);return n&&t(n),()=>{let o=y.get(e);o&&(o.delete(t),o.size===0&&(y.delete(e),v.unobserve(e)));}}var z=new Set;function R(e,t,r){if(z.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;z.add(e);let n=t?r?.[t]:void 0,o=t?chunk7L35N3N3_cjs.a.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:n?.syntax??"<number>",inherits:n?.inherits??!0,initialValue:o!=null?String(o):n?.initial??"0"});}catch{}}var D={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),chunkQHHF5SEL_cjs.a("resize",t)}};var I={key:"size",scope:"element",start(e){return H(e.target,t=>{let r=t.borderBoxSize?.[0],n=r?r.inlineSize:t.contentRect.width,o=r?r.blockSize:t.contentRect.height;e.write("w",chunk65MXZJBD_cjs.a(n)),e.write("h",chunk65MXZJBD_cjs.a(o)),e.write("aspect",o>0?chunk65MXZJBD_cjs.a(n/o):0);})}};var O={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),w(e.target,r=>{let n=r.intersectionRatio>=1;e.write("visible",n?1:0),n&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var P={key:"range",scope:"element",start(e){let t=chunkHHINWX7L_cjs.a(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let n=t.min===""?0:Number(t.min),o=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",o>n?chunk65MXZJBD_cjs.a((s-n)/(o-n)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var W={viewport:D,size:I,visibility:O,range:P};var K=()=>{},f=new Map,h={...W};function be(e){h[e.key]=e;}function Ee(e){delete h[e];}function Ce(e){return e in h}function Me(e){Object.assign(chunk7L35N3N3_cjs.a,e);}function A(e,t,r){return {target:e,config:chunk7L35N3N3_cjs.a,write(n,o,s="live"){let i=(s==="const"?chunk7L35N3N3_cjs.a.constPrefix:chunk7L35N3N3_cjs.a.livePrefix)+n;t.add(i),chunk7L35N3N3_cjs.a.typed&&R(i,n,r),g.set(e,i,String(o));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==chunk7L35N3N3_cjs.a.root&&typeof IntersectionObserver<"u"))return e.start(t);let o=null,s=()=>{if(!o)try{o=e.start(t);}catch(a){console.error(`[prop-for-that] source "${e.key}" failed to start`,a);}},i=()=>{o?.(),o=null;},p=w(r,a=>{a.isIntersecting?s():i();});return ()=>{p(),i();}}function E(e,t,r){let n=r.get(t);if(!n)return;n.dispose();let o=m(e);for(let s of n.written)o.removeProperty(s),g.forget(e,s);r.delete(t);}function N(e,t){let r=f.get(e);r||f.set(e,r=new Map);let n=[];for(let o of t){if(r.has(o))continue;let s=h[o];if(!s){console.warn(`[prop-for-that] unknown source "${o}"`);continue}let i=new Set,p;try{p=$(s,A(e,i,s.props),e);}catch(a){console.error(`[prop-for-that] source "${o}" failed to start`,a);continue}r.set(o,{dispose:p,written:i}),n.push(o);}return ()=>{let o=f.get(e);if(o){for(let s of n)E(e,s,o);o.size===0&&f.delete(e);}}}function j(e){return e instanceof Element?[e]:typeof NodeList<"u"&&e instanceof NodeList||typeof HTMLCollection<"u"&&e instanceof HTMLCollection||Array.isArray(e)?Array.from(e).filter(t=>t instanceof Element):[]}function q(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function ke(e,t){let r,n;if(t===void 0&&q(e)?(r=chunk7L35N3N3_cjs.a.root?[chunk7L35N3N3_cjs.a.root]:[],n=e):(r=j(e),n=t??[]),!r.length||!n.length)return K;let o=r.map(s=>N(s,n));return ()=>{for(let s of o)s();}}function Le(e,t){let r=f.get(e);if(r){for(let n of t??[...r.keys()])E(e,n,r);r.size===0&&f.delete(e);}}function xe(){for(let[e,t]of f)for(let r of [...t.keys()])E(e,r,t);f.clear();}exports.a=be;exports.b=Ee;exports.c=Ce;exports.d=Me;exports.e=ke;exports.f=Le;exports.g=xe;
|
package/dist/chunk-JSHKY54Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-LTJ2VKVY.js';import {b as b$1,a}from'./chunk-LF4OE7IL.js';import {a as a$4}from'./chunk-T4N6AEOZ.js';import {a as a$1}from'./chunk-LWKH66VY.js';import {a as a$3}from'./chunk-EEMKKLRF.js';var u;function F(){if(u!==void 0||(u=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return u;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],u=e.cssRules[0].style;}catch{u=null;}return u}function m(e){if(typeof document<"u"&&e===document.documentElement){let t=F();if(t)return t}return e.style}var b=class{pending=new Map;last=new WeakMap;set(t,r,n){let o=this.pending.get(t);if(o?.has(r)){o.set(r,n);return}this.last.get(t)?.get(r)!==n&&(o?o.set(r,n):this.pending.set(t,new Map([[r,n]])),a());}forget(t,r){this.last.get(t)?.delete(r),this.pending.get(t)?.delete(r);}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let n=this.last.get(t);n||this.last.set(t,n=new Map);let o=m(t);for(let[s,i]of r)n.get(s)!==i&&(o.setProperty(s,i),n.set(s,i));}this.pending.clear();}}},g=new b;b$1(g.flush);var S,d=new WeakMap,x=new WeakMap;function H(e,t){S||(S=new ResizeObserver(o=>{for(let s of o){x.set(s.target,s);let i=d.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=d.get(e);r||(d.set(e,r=new Set),S.observe(e)),r.add(t);let n=x.get(e);return n&&t(n),()=>{let o=d.get(e);o&&(o.delete(t),o.size===0&&(d.delete(e),S.unobserve(e)));}}var v,y=new WeakMap,T=new WeakMap;function w(e,t){v||(v=new IntersectionObserver(o=>{for(let s of o){T.set(s.target,s);let i=y.get(s.target);if(i)for(let p of [...i])p(s);}},{threshold:[0,1]}));let r=y.get(e);r||(y.set(e,r=new Set),v.observe(e)),r.add(t);let n=T.get(e);return n&&t(n),()=>{let o=y.get(e);o&&(o.delete(t),o.size===0&&(y.delete(e),v.unobserve(e)));}}var z=new Set;function R(e,t,r){if(z.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;z.add(e);let n=t?r?.[t]:void 0,o=t?a$1.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:n?.syntax??"<number>",inherits:n?.inherits??!0,initialValue:o!=null?String(o):n?.initial??"0"});}catch{}}var D={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),a$3("resize",t)}};var I={key:"size",scope:"element",start(e){return H(e.target,t=>{let r=t.borderBoxSize?.[0],n=r?r.inlineSize:t.contentRect.width,o=r?r.blockSize:t.contentRect.height;e.write("w",a$4(n)),e.write("h",a$4(o)),e.write("aspect",o>0?a$4(n/o):0);})}};var O={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),w(e.target,r=>{let n=r.intersectionRatio>=1;e.write("visible",n?1:0),n&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var P={key:"range",scope:"element",start(e){let t=a$2(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let n=t.min===""?0:Number(t.min),o=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",o>n?a$4((s-n)/(o-n)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var W={viewport:D,size:I,visibility:O,range:P};var K=()=>{},f=new Map,h={...W};function be(e){h[e.key]=e;}function Ee(e){delete h[e];}function Ce(e){return e in h}function Me(e){Object.assign(a$1,e);}function A(e,t,r){return {target:e,config:a$1,write(n,o,s="live"){let i=(s==="const"?a$1.constPrefix:a$1.livePrefix)+n;t.add(i),a$1.typed&&R(i,n,r),g.set(e,i,String(o));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==a$1.root&&typeof IntersectionObserver<"u"))return e.start(t);let o=null,s=()=>{if(!o)try{o=e.start(t);}catch(a){console.error(`[prop-for-that] source "${e.key}" failed to start`,a);}},i=()=>{o?.(),o=null;},p=w(r,a=>{a.isIntersecting?s():i();});return ()=>{p(),i();}}function E(e,t,r){let n=r.get(t);if(!n)return;n.dispose();let o=m(e);for(let s of n.written)o.removeProperty(s),g.forget(e,s);r.delete(t);}function N(e,t){let r=f.get(e);r||f.set(e,r=new Map);let n=[];for(let o of t){if(r.has(o))continue;let s=h[o];if(!s){console.warn(`[prop-for-that] unknown source "${o}"`);continue}let i=new Set,p;try{p=$(s,A(e,i,s.props),e);}catch(a){console.error(`[prop-for-that] source "${o}" failed to start`,a);continue}r.set(o,{dispose:p,written:i}),n.push(o);}return ()=>{let o=f.get(e);if(o){for(let s of n)E(e,s,o);o.size===0&&f.delete(e);}}}function j(e){return e instanceof Element?[e]:typeof NodeList<"u"&&e instanceof NodeList||typeof HTMLCollection<"u"&&e instanceof HTMLCollection||Array.isArray(e)?Array.from(e).filter(t=>t instanceof Element):[]}function q(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function ke(e,t){let r,n;if(t===void 0&&q(e)?(r=a$1.root?[a$1.root]:[],n=e):(r=j(e),n=t??[]),!r.length||!n.length)return K;let o=r.map(s=>N(s,n));return ()=>{for(let s of o)s();}}function Le(e,t){let r=f.get(e);if(r){for(let n of t??[...r.keys()])E(e,n,r);r.size===0&&f.delete(e);}}function xe(){for(let[e,t]of f)for(let r of [...t.keys()])E(e,r,t);f.clear();}export{be as a,Ee as b,Ce as c,Me as d,ke as e,Le as f,xe as g};
|