prop-for-that 0.7.6 → 0.7.8

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 CHANGED
@@ -8,6 +8,40 @@ 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.8]
12
+
13
+ ### Added
14
+ - **`ua` plugin** (global) + **`head` constants** — low-entropy device & browser
15
+ identity JS can read but CSS can't, written **once** as `--const-ua-*`:
16
+ `--const-ua-platform` (`macos` / `windows` / `linux` / `android` / `ios` /
17
+ `chromeos` / `unknown`), `--const-ua-browser` (`chrome` / `edge` / `firefox` /
18
+ `safari` / `opera` / `samsung` / `unknown`), `--const-ua-engine` (`blink` /
19
+ `gecko` / `webkit` / `unknown`), `--const-ua-version` (browser major, `0` if
20
+ unknown), `--const-ua-mobile` (`1` / `0`). Branch on the client with no JS or
21
+ media query — `@container style(--const-ua-engine: webkit) { … }`. Prefers
22
+ structured UA Client Hints (`navigator.userAgentData`, Chromium) and falls back
23
+ to a best-effort `userAgent`-string sniff on Firefox / Safari. **Low-entropy
24
+ only** — no `getHighEntropyValues`, device model, full version, or architecture,
25
+ so it adds no fingerprinting surface beyond what request headers already expose.
26
+ The same five constants are also written **synchronously** by the `head` entry
27
+ (`import 'prop-for-that/head'`) for FOUC-safe, pre-paint branching. Typed mode
28
+ registers the strings as `<custom-ident>` and the numbers as `<integer>`.
29
+
30
+ ## [0.7.7]
31
+
32
+ ### Added
33
+ - **`truncated` plugin** (element) — whether an element's own text is being
34
+ clipped right now, the "is the ellipsis showing?" question CSS can ask a scroll
35
+ container (`scroll-state()`) but never overflowing text. All `1`/`0`:
36
+ `--live-truncated` (clipped on either axis), `--live-truncated-x` (inline clip —
37
+ the classic `text-overflow: ellipsis` line, `scrollWidth > clientWidth`),
38
+ `--live-truncated-y` (block clip — a `-webkit-line-clamp` / fixed-height
39
+ `overflow: hidden` box, `scrollHeight > clientHeight`). Reveal a "more"
40
+ affordance, tooltip trigger, or expand control only while text is actually cut
41
+ off — `@container style(--live-truncated: 1) { … }` — and have it vanish the
42
+ moment a wider box fits. Recomputed whenever the box resizes (the shared
43
+ `ResizeObserver`); gated, so it pauses off screen like `size`. (#11)
44
+
11
45
  ## [0.7.6]
12
46
 
13
47
  ### Fixed
package/README.md CHANGED
@@ -52,7 +52,7 @@ Bind any element with `data-props-for="key …"` and read its `--live-*` propert
52
52
 
53
53
  **Core** (built in): viewport, element size, visibility, and `<input type="range">` values.
54
54
 
55
- **Plugins** (opt-in): pointer position, battery, network, online status, page focus & visibility, navigation type, page meta tags, FPS, clock, scroll velocity, device orientation / motion, geolocation, CPU pressure, soft-keyboard geometry, media playback, form & field state, select & color-picker values, and dominant + accent colors extracted from images and video — 20+ in all.
55
+ **Plugins** (opt-in): pointer position, battery, network, online status, page focus & visibility, navigation type, page meta tags, low-entropy user-agent (OS / browser / engine / version / mobile), FPS, clock, scroll velocity, device orientation / motion, geolocation, CPU pressure, soft-keyboard geometry, media playback, form & field state, select & color-picker values, text-truncation (ellipsis) detection, and dominant + accent colors extracted from images and video — 20+ in all.
56
56
 
57
57
  → Every source, every property, and live demos are in the **[docs](https://prop-for-that.netlify.app/docsite/reference/plugins/)**.
58
58
 
@@ -62,7 +62,7 @@ Bind any element with `data-props-for="key …"` and read its `--live-*` propert
62
62
  | --- | --- |
63
63
  | `prop-for-that/auto` | Zero-config & declarative: binds every `data-props-for` element — globals included, via `<html data-props-for="…">` — loading plugin sources on demand, kept in sync with the DOM. Use as `<script type="module">`. |
64
64
  | `prop-for-that` | Imperative API — `propsFor()`, `register()`, `configure()` — for explicit control and teardown. |
65
- | `prop-for-that/head` | Synchronous, FOUC-safe constants (scrollbar width & overlay preference, DPR, core count, device memory) before first paint. |
65
+ | `prop-for-that/head` | Synchronous, FOUC-safe constants (scrollbar width & overlay preference, DPR, core count, device memory, low-entropy user-agent) before first paint. |
66
66
  | `prop-for-that/plugins` | The opt-in plugin catalog. |
67
67
 
68
68
  > `auto` sees the **light DOM only** (not shadow roots — bind those with `propsFor(el, …)`), and lazy-loads plugin chunks, so from a CDN use one that serves the `dist` files verbatim (unpkg / jsDelivr), not a rewriting CDN.
package/dist/auto.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkWZXNO2W7_cjs=require('./chunk-WZXNO2W7.cjs');require('./chunk-HHINWX7L.cjs'),require('./chunk-EYDIF3NM.cjs'),require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs'),require('./chunk-QHHF5SEL.cjs');var u={"scroll-velocity":()=>import('./scroll-velocity-DGZNNO73.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),meta:()=>import('./meta-U2EHV4AM.cjs').then(t=>t.meta),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-Q3ITXSJO.cjs').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-MKUHWUQT.cjs').then(t=>t.visualViewport),keyboard:()=>import('./keyboard-6ZGB2LAD.cjs').then(t=>t.keyboard),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-4MBM2R7N.cjs').then(t=>t.field),"field-state":()=>import('./field-state-NXSK6ZZW.cjs').then(t=>t.fieldState),"form-state":()=>import('./form-state-FJZINKN7.cjs').then(t=>t.formState),select:()=>import('./select-LMRGCCLB.cjs').then(t=>t.select),"color-input":()=>import('./color-input-SYYBVLZM.cjs').then(t=>t.colorInput),orientation:()=>import('./orientation-JD23MYZR.cjs').then(t=>t.orientation),motion:()=>import('./motion-GMUGWJN3.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-6F5QAPW3.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(chunkWZXNO2W7_cjs.c(t))return null;let e=u[t];if(!e)return null;let o=a.get(t);return o||(o=e().then(r=>{chunkWZXNO2W7_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 b(t,e){let o=E(e);if(!o){chunkWZXNO2W7_cjs.e(t,[e]);return}o.then(()=>{chunkWZXNO2W7_cjs.c(e)&&(n.get(t)??[]).includes(e)&&chunkWZXNO2W7_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&&chunkWZXNO2W7_cjs.f(t,r),e.length?n.set(t,e):n.delete(t);for(let i of g)b(t,i);}function f(t){let e=n.get(t);e&&(chunkWZXNO2W7_cjs.f(t,e),n.delete(t));}function y(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&s(t),t.querySelectorAll("[data-props-for]").forEach(s));}function L(t){t instanceof HTMLElement&&(f(t),t.querySelectorAll("[data-props-for]").forEach(f));}function h(){document.documentElement.hasAttribute("data-props-typed")&&chunkWZXNO2W7_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(L),e.addedNodes.forEach(y);}}).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());
1
+ 'use strict';var chunkOVCZMPYV_cjs=require('./chunk-OVCZMPYV.cjs');require('./chunk-PQVNJZUW.cjs'),require('./chunk-HHINWX7L.cjs'),require('./chunk-EYDIF3NM.cjs'),require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs'),require('./chunk-QHHF5SEL.cjs');var u={"scroll-velocity":()=>import('./scroll-velocity-DGZNNO73.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),meta:()=>import('./meta-U2EHV4AM.cjs').then(t=>t.meta),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-Q3ITXSJO.cjs').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-MKUHWUQT.cjs').then(t=>t.visualViewport),keyboard:()=>import('./keyboard-6ZGB2LAD.cjs').then(t=>t.keyboard),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-4MBM2R7N.cjs').then(t=>t.field),"field-state":()=>import('./field-state-NXSK6ZZW.cjs').then(t=>t.fieldState),"form-state":()=>import('./form-state-FJZINKN7.cjs').then(t=>t.formState),select:()=>import('./select-LMRGCCLB.cjs').then(t=>t.select),"color-input":()=>import('./color-input-SYYBVLZM.cjs').then(t=>t.colorInput),orientation:()=>import('./orientation-JD23MYZR.cjs').then(t=>t.orientation),motion:()=>import('./motion-GMUGWJN3.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-6F5QAPW3.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),truncated:()=>import('./truncated-RUY3JNAX.cjs').then(t=>t.truncated),ua:()=>import('./ua-3MLUBLSV.cjs').then(t=>t.ua)};var n=new WeakMap,l=new Map;function v(t){return (t.dataset.propsFor??"").split(/\s+/).filter(Boolean)}function E(t){if(chunkOVCZMPYV_cjs.c(t))return null;let e=u[t];if(!e)return null;let o=l.get(t);return o||(o=e().then(r=>{chunkOVCZMPYV_cjs.a(r);}).catch(r=>{l.delete(t),console.error(`[prop-for-that] failed to load plugin "${t}"`,r);}),l.set(t,o)),o}function b(t,e){let o=E(e);if(!o){chunkOVCZMPYV_cjs.e(t,[e]);return}o.then(()=>{chunkOVCZMPYV_cjs.c(e)&&(n.get(t)??[]).includes(e)&&chunkOVCZMPYV_cjs.e(t,[e]);});}function p(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&&chunkOVCZMPYV_cjs.f(t,r),e.length?n.set(t,e):n.delete(t);for(let i of g)b(t,i);}function f(t){let e=n.get(t);e&&(chunkOVCZMPYV_cjs.f(t,e),n.delete(t));}function y(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&p(t),t.querySelectorAll("[data-props-for]").forEach(p));}function L(t){t instanceof HTMLElement&&(f(t),t.querySelectorAll("[data-props-for]").forEach(f));}function h(){document.documentElement.hasAttribute("data-props-typed")&&chunkOVCZMPYV_cjs.d({typed:true}),document.querySelectorAll("[data-props-for]").forEach(p),new MutationObserver(t=>{for(let e of t){if(e.type==="attributes"&&e.target instanceof HTMLElement){p(e.target);continue}e.removedNodes.forEach(L),e.addedNodes.forEach(y);}}).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-BVU5BAWU.js';import'./chunk-LTJ2VKVY.js';import'./chunk-KG3EF456.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import'./chunk-EEMKKLRF.js';var u={"scroll-velocity":()=>import('./scroll-velocity-ZRXPNZG7.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),meta:()=>import('./meta-VSAZR4JL.js').then(t=>t.meta),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-IGSZPFLV.js').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-GNJTAHPT.js').then(t=>t.visualViewport),keyboard:()=>import('./keyboard-YJ7S6XPJ.js').then(t=>t.keyboard),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-6USMKGKM.js').then(t=>t.field),"field-state":()=>import('./field-state-YLUDK3XS.js').then(t=>t.fieldState),"form-state":()=>import('./form-state-Q4SCA6TH.js').then(t=>t.formState),select:()=>import('./select-H3CFIVK3.js').then(t=>t.select),"color-input":()=>import('./color-input-STV57DGE.js').then(t=>t.colorInput),orientation:()=>import('./orientation-27ULVQVJ.js').then(t=>t.orientation),motion:()=>import('./motion-GHDWROM2.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-PYBNG6OU.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 b(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)b(t,i);}function f(t){let e=n.get(t);e&&(f$1(t,e),n.delete(t));}function y(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&s(t),t.querySelectorAll("[data-props-for]").forEach(s));}function L(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(L),e.addedNodes.forEach(y);}}).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());
1
+ import {d,f as f$1,e,c,a}from'./chunk-D24E2DBW.js';import'./chunk-V4OTPLOQ.js';import'./chunk-LTJ2VKVY.js';import'./chunk-KG3EF456.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import'./chunk-EEMKKLRF.js';var u={"scroll-velocity":()=>import('./scroll-velocity-ZRXPNZG7.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),meta:()=>import('./meta-VSAZR4JL.js').then(t=>t.meta),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-IGSZPFLV.js').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-GNJTAHPT.js').then(t=>t.visualViewport),keyboard:()=>import('./keyboard-YJ7S6XPJ.js').then(t=>t.keyboard),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-6USMKGKM.js').then(t=>t.field),"field-state":()=>import('./field-state-YLUDK3XS.js').then(t=>t.fieldState),"form-state":()=>import('./form-state-Q4SCA6TH.js').then(t=>t.formState),select:()=>import('./select-H3CFIVK3.js').then(t=>t.select),"color-input":()=>import('./color-input-STV57DGE.js').then(t=>t.colorInput),orientation:()=>import('./orientation-27ULVQVJ.js').then(t=>t.orientation),motion:()=>import('./motion-GHDWROM2.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-PYBNG6OU.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),truncated:()=>import('./truncated-MDPFWGSI.js').then(t=>t.truncated),ua:()=>import('./ua-3RC4SBYB.js').then(t=>t.ua)};var n=new WeakMap,l=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=l.get(t);return o||(o=e().then(r=>{a(r);}).catch(r=>{l.delete(t),console.error(`[prop-for-that] failed to load plugin "${t}"`,r);}),l.set(t,o)),o}function b(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 p(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)b(t,i);}function f(t){let e=n.get(t);e&&(f$1(t,e),n.delete(t));}function y(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&p(t),t.querySelectorAll("[data-props-for]").forEach(p));}function L(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(p),new MutationObserver(t=>{for(let e of t){if(e.type==="attributes"&&e.target instanceof HTMLElement){p(e.target);continue}e.removedNodes.forEach(L),e.addedNodes.forEach(y);}}).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 chunkPQVNJZUW_cjs=require('./chunk-PQVNJZUW.cjs');var i={key:"truncated",scope:"element",start(t){let e=t.target,r=()=>{let o=e.scrollWidth>e.clientWidth?1:0,c=e.scrollHeight>e.clientHeight?1:0;t.write("truncated",o||c?1:0),t.write("truncated-x",o),t.write("truncated-y",c);};return r(),chunkPQVNJZUW_cjs.a(e,r)}};exports.a=i;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkKSKAQMWJ_cjs=require('./chunk-KSKAQMWJ.cjs');var u={key:"ua",scope:"global",props:{"ua-platform":{syntax:"<custom-ident>",initial:"unknown"},"ua-browser":{syntax:"<custom-ident>",initial:"unknown"},"ua-engine":{syntax:"<custom-ident>",initial:"unknown"},"ua-version":{syntax:"<integer>",initial:"0"},"ua-mobile":{syntax:"<integer>",initial:"0"}},start(n){let{platform:t,browser:i,engine:o,version:r,mobile:a}=chunkKSKAQMWJ_cjs.a();return n.write("ua-platform",t,"const"),n.write("ua-browser",i,"const"),n.write("ua-engine",o,"const"),n.write("ua-version",r,"const"),n.write("ua-mobile",a,"const"),()=>{}}};exports.a=u;
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-EXPE3C6O.js';var u={key:"ua",scope:"global",props:{"ua-platform":{syntax:"<custom-ident>",initial:"unknown"},"ua-browser":{syntax:"<custom-ident>",initial:"unknown"},"ua-engine":{syntax:"<custom-ident>",initial:"unknown"},"ua-version":{syntax:"<integer>",initial:"0"},"ua-mobile":{syntax:"<integer>",initial:"0"}},start(n){let{platform:t,browser:i,engine:o,version:r,mobile:a$1}=a();return n.write("ua-platform",t,"const"),n.write("ua-browser",i,"const"),n.write("ua-engine",o,"const"),n.write("ua-version",r,"const"),n.write("ua-mobile",a$1,"const"),()=>{}}};export{u as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-V4OTPLOQ.js';var i={key:"truncated",scope:"element",start(t){let e=t.target,r=()=>{let o=e.scrollWidth>e.clientWidth?1:0,c=e.scrollHeight>e.clientHeight?1:0;t.write("truncated",o||c?1:0),t.write("truncated-x",o),t.write("truncated-y",c);};return r(),a(e,r)}};export{i as a};
@@ -0,0 +1 @@
1
+ import {b as b$1,a as a$3}from'./chunk-V4OTPLOQ.js';import {a as a$2}from'./chunk-LTJ2VKVY.js';import {b,a}from'./chunk-KG3EF456.js';import {a as a$4}from'./chunk-T4N6AEOZ.js';import {a as a$1}from'./chunk-LWKH66VY.js';import {a as a$5}from'./chunk-EEMKKLRF.js';var f;function P(){if(f!==void 0||(f=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return f;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],f=e.cssRules[0].style;}catch{f=null;}return f}function m(e){if(typeof document<"u"&&e===document.documentElement){let t=P();if(t)return t}return e.style}var h=class{pending=new Map;last=new WeakMap;set(t,r,o){let n=this.pending.get(t);if(n?.has(r)){n.set(r,o);return}this.last.get(t)?.get(r)!==o&&(n?n.set(r,o):this.pending.set(t,new Map([[r,o]])),a());}forget(t,r){this.last.get(t)?.delete(r);let o=this.pending.get(t);o&&(o.delete(r),o.size===0&&this.pending.delete(t));}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let o=this.last.get(t);o||this.last.set(t,o=new Map);let n=m(t);for(let[i,s]of r)o.get(i)!==s&&(n.setProperty(i,s),o.set(i,s));}this.pending.clear();}}},y=new h;b(y.flush);var k=new Set;function C(e,t,r){if(k.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;k.add(e);let o=t?r?.[t]:void 0,n=t?a$1.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:o?.syntax??"<number>",inherits:o?.inherits??!0,initialValue:n!=null?String(n):o?.initial??"0"});}catch{}}var T={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),a$5("resize",t)}};var x={key:"size",scope:"element",start(e){return a$3(e.target,t=>{let r=t.borderBoxSize?.[0],o=r?r.inlineSize:t.contentRect.width,n=r?r.blockSize:t.contentRect.height;e.write("w",a$4(o)),e.write("h",a$4(n)),e.write("aspect",n>0?a$4(o/n):0);})}};var g=1;function R(e){let t=e.rootBounds;if(!t)return e.intersectionRatio>=1;let r=e.boundingClientRect;return r.top>=t.top-g&&r.right<=t.right+g&&r.bottom<=t.bottom+g&&r.left>=t.left-g}var H={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),b$1(e.target,r=>{let o=R(r);e.write("visible",o?1:0),o&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var D={key:"range",scope:"element",gate:false,start(e){let t=a$2(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let o=t.min===""?0:Number(t.min),n=t.max===""?100:Number(t.max),i=Number(t.value);e.write("value",i),e.write("value-pct",n>o?a$4((i-o)/(n-o)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var z={viewport:T,size:x,visibility:H,range:D};var I=()=>{},p=new Map,S={...z};function ge(e){S[e.key]=e;}function Se(e){delete S[e];}function he(e){return e in S}function we(e){Object.assign(a$1,e);}function F(e,t,r){return {target:e,config:a$1,write(o,n,i="live"){let s=(i==="const"?a$1.constPrefix:a$1.livePrefix)+o;t.add(s),a$1.typed&&C(s,o,r),y.set(e,s,String(n));}}}function K(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==a$1.root&&typeof IntersectionObserver<"u"))return e.start(t);let n=null,i=()=>{if(!n)try{n=e.start(t);}catch(l){console.error(`[prop-for-that] source "${e.key}" failed to start`,l);}},s=()=>{n?.(),n=null;},d=b$1(r,l=>{l.isIntersecting?i():s();});return ()=>{d(),s();}}function w(e,t,r){let o=r.get(t);if(!o)return;o.dispose();let n=m(e);for(let i of o.written)n.removeProperty(i),y.forget(e,i);r.delete(t);}function A(e,t){let r=p.get(e);r||p.set(e,r=new Map);let o=[];for(let n of t){if(r.has(n))continue;let i=S[n];if(!i){console.warn(`[prop-for-that] unknown source "${n}"`);continue}let s=new Set,d;try{d=K(i,F(e,s,i.props),e);}catch(l){console.error(`[prop-for-that] source "${n}" failed to start`,l);continue}r.set(n,{dispose:d,written:s}),o.push(n);}return ()=>{let n=p.get(e);if(n){for(let i of o)w(e,i,n);n.size===0&&p.delete(e);}}}function O(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 W(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function ve(e,t){let r,o;if(t===void 0&&W(e)?(r=a$1.root?[a$1.root]:[],o=e):(r=O(e),o=t??[]),!r.length||!o.length)return I;let n=r.map(i=>A(i,o));return ()=>{for(let i of n)i();}}function Ee(e,t){let r=p.get(e);if(r){for(let o of t??[...r.keys()])w(e,o,r);r.size===0&&p.delete(e);}}function be(){for(let[e,t]of p)for(let r of [...t.keys()])w(e,r,t);p.clear();}export{ge as a,Se as b,he as c,we as d,ve as e,Ee as f,be as g};
@@ -0,0 +1,2 @@
1
+ var d={platform:"unknown",browser:"unknown",engine:"unknown",version:0,mobile:0},c={android:"android","chrome-os":"chromeos","chromium-os":"chromeos",ios:"ios",linux:"linux",macos:"macos",windows:"windows"},u=n=>n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");function f(n){let r=n.toLowerCase();return r.includes("edge")||r.includes("edg")?"edge":r.includes("opera")||r.includes("opr")?"opera":r.includes("samsung")?"samsung":r.includes("firefox")?"firefox":r.includes("chrome")||r.includes("chromium")?"chrome":r.includes("safari")?"safari":"unknown"}function g(n){let r=n.brands;if(!r||!r.length)return null;let i=r.filter(o=>!/not.?a.?brand/i.test(o.brand)),e=i.find(o=>!/chromium/i.test(o.brand))??i[0];return e?{platform:c[u(n.platform??"")]??"unknown",browser:f(e.brand),engine:"blink",version:parseInt(e.version,10)||0,mobile:n.mobile?1:0}:null}var l=[{id:"edge",test:/Edg(?:iOS|A)?\//,ver:/Edg(?:iOS|A)?\/(\d+)/},{id:"opera",test:/OPR\/|OPiOS\/|Opera\//,ver:/(?:OPR|OPiOS|Opera)\/(\d+)/},{id:"samsung",test:/SamsungBrowser\//,ver:/SamsungBrowser\/(\d+)/},{id:"firefox",test:/Firefox\/|FxiOS\//,ver:/(?:Firefox|FxiOS)\/(\d+)/},{id:"chrome",test:/Chrome\/|CriOS\//,ver:/(?:Chrome|CriOS)\/(\d+)/},{id:"safari",test:/Safari\//,ver:/Version\/(\d+)/}];function m(n){let r=/Android/.test(n)?"android":/iPhone|iPad|iPod/.test(n)?"ios":/Macintosh|Mac OS X/.test(n)?"macos":/Windows/.test(n)?"windows":/CrOS/.test(n)?"chromeos":/Linux/.test(n)?"linux":"unknown",i=l.find(a=>a.test.test(n)),e=i?.id??"unknown",o=i&&parseInt(n.match(i.ver)?.[1]??"",10)||0,t=r==="ios"?"webkit":e==="firefox"?"gecko":e==="safari"?"webkit":e==="unknown"?"unknown":"blink",s=/Mobi|Android|iPhone|iPod/.test(n)?1:0;return {platform:r,browser:e,engine:t,version:o,mobile:s}}function b(){if(typeof navigator>"u")return d;let n=navigator.userAgentData;return (n?g(n):null)??m(navigator.userAgent||"")}
2
+ export{b as a};
@@ -0,0 +1,2 @@
1
+ 'use strict';var d={platform:"unknown",browser:"unknown",engine:"unknown",version:0,mobile:0},c={android:"android","chrome-os":"chromeos","chromium-os":"chromeos",ios:"ios",linux:"linux",macos:"macos",windows:"windows"},u=n=>n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");function f(n){let r=n.toLowerCase();return r.includes("edge")||r.includes("edg")?"edge":r.includes("opera")||r.includes("opr")?"opera":r.includes("samsung")?"samsung":r.includes("firefox")?"firefox":r.includes("chrome")||r.includes("chromium")?"chrome":r.includes("safari")?"safari":"unknown"}function g(n){let r=n.brands;if(!r||!r.length)return null;let i=r.filter(o=>!/not.?a.?brand/i.test(o.brand)),e=i.find(o=>!/chromium/i.test(o.brand))??i[0];return e?{platform:c[u(n.platform??"")]??"unknown",browser:f(e.brand),engine:"blink",version:parseInt(e.version,10)||0,mobile:n.mobile?1:0}:null}var l=[{id:"edge",test:/Edg(?:iOS|A)?\//,ver:/Edg(?:iOS|A)?\/(\d+)/},{id:"opera",test:/OPR\/|OPiOS\/|Opera\//,ver:/(?:OPR|OPiOS|Opera)\/(\d+)/},{id:"samsung",test:/SamsungBrowser\//,ver:/SamsungBrowser\/(\d+)/},{id:"firefox",test:/Firefox\/|FxiOS\//,ver:/(?:Firefox|FxiOS)\/(\d+)/},{id:"chrome",test:/Chrome\/|CriOS\//,ver:/(?:Chrome|CriOS)\/(\d+)/},{id:"safari",test:/Safari\//,ver:/Version\/(\d+)/}];function m(n){let r=/Android/.test(n)?"android":/iPhone|iPad|iPod/.test(n)?"ios":/Macintosh|Mac OS X/.test(n)?"macos":/Windows/.test(n)?"windows":/CrOS/.test(n)?"chromeos":/Linux/.test(n)?"linux":"unknown",i=l.find(a=>a.test.test(n)),e=i?.id??"unknown",o=i&&parseInt(n.match(i.ver)?.[1]??"",10)||0,t=r==="ios"?"webkit":e==="firefox"?"gecko":e==="safari"?"webkit":e==="unknown"?"unknown":"blink",s=/Mobi|Android|iPhone|iPod/.test(n)?1:0;return {platform:r,browser:e,engine:t,version:o,mobile:s}}function b(){if(typeof navigator>"u")return d;let n=navigator.userAgentData;return (n?g(n):null)??m(navigator.userAgent||"")}
2
+ exports.a=b;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkPQVNJZUW_cjs=require('./chunk-PQVNJZUW.cjs'),chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunkEYDIF3NM_cjs=require('./chunk-EYDIF3NM.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs'),chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs'),chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var f;function P(){if(f!==void 0||(f=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return f;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],f=e.cssRules[0].style;}catch{f=null;}return f}function m(e){if(typeof document<"u"&&e===document.documentElement){let t=P();if(t)return t}return e.style}var h=class{pending=new Map;last=new WeakMap;set(t,r,o){let n=this.pending.get(t);if(n?.has(r)){n.set(r,o);return}this.last.get(t)?.get(r)!==o&&(n?n.set(r,o):this.pending.set(t,new Map([[r,o]])),chunkEYDIF3NM_cjs.a());}forget(t,r){this.last.get(t)?.delete(r);let o=this.pending.get(t);o&&(o.delete(r),o.size===0&&this.pending.delete(t));}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let o=this.last.get(t);o||this.last.set(t,o=new Map);let n=m(t);for(let[i,s]of r)o.get(i)!==s&&(n.setProperty(i,s),o.set(i,s));}this.pending.clear();}}},y=new h;chunkEYDIF3NM_cjs.b(y.flush);var k=new Set;function C(e,t,r){if(k.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;k.add(e);let o=t?r?.[t]:void 0,n=t?chunk7L35N3N3_cjs.a.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:o?.syntax??"<number>",inherits:o?.inherits??!0,initialValue:n!=null?String(n):o?.initial??"0"});}catch{}}var T={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 x={key:"size",scope:"element",start(e){return chunkPQVNJZUW_cjs.a(e.target,t=>{let r=t.borderBoxSize?.[0],o=r?r.inlineSize:t.contentRect.width,n=r?r.blockSize:t.contentRect.height;e.write("w",chunk65MXZJBD_cjs.a(o)),e.write("h",chunk65MXZJBD_cjs.a(n)),e.write("aspect",n>0?chunk65MXZJBD_cjs.a(o/n):0);})}};var g=1;function R(e){let t=e.rootBounds;if(!t)return e.intersectionRatio>=1;let r=e.boundingClientRect;return r.top>=t.top-g&&r.right<=t.right+g&&r.bottom<=t.bottom+g&&r.left>=t.left-g}var H={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),chunkPQVNJZUW_cjs.b(e.target,r=>{let o=R(r);e.write("visible",o?1:0),o&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var D={key:"range",scope:"element",gate:false,start(e){let t=chunkHHINWX7L_cjs.a(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let o=t.min===""?0:Number(t.min),n=t.max===""?100:Number(t.max),i=Number(t.value);e.write("value",i),e.write("value-pct",n>o?chunk65MXZJBD_cjs.a((i-o)/(n-o)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var z={viewport:T,size:x,visibility:H,range:D};var I=()=>{},p=new Map,S={...z};function ge(e){S[e.key]=e;}function Se(e){delete S[e];}function he(e){return e in S}function we(e){Object.assign(chunk7L35N3N3_cjs.a,e);}function F(e,t,r){return {target:e,config:chunk7L35N3N3_cjs.a,write(o,n,i="live"){let s=(i==="const"?chunk7L35N3N3_cjs.a.constPrefix:chunk7L35N3N3_cjs.a.livePrefix)+o;t.add(s),chunk7L35N3N3_cjs.a.typed&&C(s,o,r),y.set(e,s,String(n));}}}function K(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==chunk7L35N3N3_cjs.a.root&&typeof IntersectionObserver<"u"))return e.start(t);let n=null,i=()=>{if(!n)try{n=e.start(t);}catch(l){console.error(`[prop-for-that] source "${e.key}" failed to start`,l);}},s=()=>{n?.(),n=null;},d=chunkPQVNJZUW_cjs.b(r,l=>{l.isIntersecting?i():s();});return ()=>{d(),s();}}function w(e,t,r){let o=r.get(t);if(!o)return;o.dispose();let n=m(e);for(let i of o.written)n.removeProperty(i),y.forget(e,i);r.delete(t);}function A(e,t){let r=p.get(e);r||p.set(e,r=new Map);let o=[];for(let n of t){if(r.has(n))continue;let i=S[n];if(!i){console.warn(`[prop-for-that] unknown source "${n}"`);continue}let s=new Set,d;try{d=K(i,F(e,s,i.props),e);}catch(l){console.error(`[prop-for-that] source "${n}" failed to start`,l);continue}r.set(n,{dispose:d,written:s}),o.push(n);}return ()=>{let n=p.get(e);if(n){for(let i of o)w(e,i,n);n.size===0&&p.delete(e);}}}function O(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 W(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function ve(e,t){let r,o;if(t===void 0&&W(e)?(r=chunk7L35N3N3_cjs.a.root?[chunk7L35N3N3_cjs.a.root]:[],o=e):(r=O(e),o=t??[]),!r.length||!o.length)return I;let n=r.map(i=>A(i,o));return ()=>{for(let i of n)i();}}function Ee(e,t){let r=p.get(e);if(r){for(let o of t??[...r.keys()])w(e,o,r);r.size===0&&p.delete(e);}}function be(){for(let[e,t]of p)for(let r of [...t.keys()])w(e,r,t);p.clear();}exports.a=ge;exports.b=Se;exports.c=he;exports.d=we;exports.e=ve;exports.f=Ee;exports.g=be;
@@ -0,0 +1 @@
1
+ 'use strict';var a,f=new WeakMap,v=new WeakMap;function y(e,n){a||(a=new ResizeObserver(t=>{for(let s of t){v.set(s.target,s);let i=f.get(s.target);if(i)for(let d of [...i])d(s);}}));let r=f.get(e);r||(f.set(e,r=new Set),a.observe(e)),r.add(n);let o=v.get(e);return o&&n(o),()=>{let t=f.get(e);t&&(t.delete(n),t.size===0&&(f.delete(e),a.unobserve(e)));}}var b,c=new WeakMap,p=new WeakMap,g=[0,.98,.99,.995,.999,1];function l(e,n){b||(b=new IntersectionObserver(t=>{for(let s of t){p.set(s.target,s);let i=c.get(s.target);if(i)for(let d of [...i])d(s);}},{threshold:g}));let r=c.get(e);r||(c.set(e,r=new Set),b.observe(e)),r.add(n);let o=p.get(e);return o&&n(o),()=>{let t=c.get(e);t&&(t.delete(n),t.size===0&&(c.delete(e),b.unobserve(e)));}}exports.a=y;exports.b=l;
@@ -0,0 +1 @@
1
+ var a,f=new WeakMap,v=new WeakMap;function y(e,n){a||(a=new ResizeObserver(t=>{for(let s of t){v.set(s.target,s);let i=f.get(s.target);if(i)for(let d of [...i])d(s);}}));let r=f.get(e);r||(f.set(e,r=new Set),a.observe(e)),r.add(n);let o=v.get(e);return o&&n(o),()=>{let t=f.get(e);t&&(t.delete(n),t.size===0&&(f.delete(e),a.unobserve(e)));}}var b,c=new WeakMap,p=new WeakMap,g=[0,.98,.99,.995,.999,1];function l(e,n){b||(b=new IntersectionObserver(t=>{for(let s of t){p.set(s.target,s);let i=c.get(s.target);if(i)for(let d of [...i])d(s);}},{threshold:g}));let r=c.get(e);r||(c.set(e,r=new Set),b.observe(e)),r.add(n);let o=p.get(e);return o&&n(o),()=>{let t=c.get(e);t&&(t.delete(n),t.size===0&&(c.delete(e),b.unobserve(e)));}}export{y as a,l as b};
package/dist/head.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs');function c(){let r=chunk7L35N3N3_cjs.a.root,o=(n,s)=>r.style.setProperty(chunk7L35N3N3_cjs.a.constPrefix+n,String(s)),t=document.createElement("div");t.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden;scrollbar-width:auto",(document.body??r).appendChild(t);let i=t.offsetWidth-t.clientWidth;o("scrollbar-w",i),o("scrollbar-overlay",i===0?1:0),t.style.scrollbarWidth="thin",o("scrollbar-thin-w",t.offsetWidth-t.clientWidth),t.remove(),o("dpr",window.devicePixelRatio||1),o("cores",navigator.hardwareConcurrency||0),o("mem",navigator.deviceMemory||0);}typeof document<"u"&&c();
1
+ 'use strict';var chunkKSKAQMWJ_cjs=require('./chunk-KSKAQMWJ.cjs'),chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs');function c(){let i=chunk7L35N3N3_cjs.a.root,o=(a,l)=>i.style.setProperty(chunk7L35N3N3_cjs.a.constPrefix+a,String(l)),e=document.createElement("div");e.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden;scrollbar-width:auto",(document.body??i).appendChild(e);let n=e.offsetWidth-e.clientWidth;o("scrollbar-w",n),o("scrollbar-overlay",n===0?1:0),e.style.scrollbarWidth="thin",o("scrollbar-thin-w",e.offsetWidth-e.clientWidth),e.remove(),o("dpr",window.devicePixelRatio||1),o("cores",navigator.hardwareConcurrency||0),o("mem",navigator.deviceMemory||0);let t=chunkKSKAQMWJ_cjs.a();o("ua-platform",t.platform),o("ua-browser",t.browser),o("ua-engine",t.engine),o("ua-version",t.version),o("ua-mobile",t.mobile);}typeof document<"u"&&c();
@@ -1 +1,2 @@
1
- (function(){'use strict';var o={constPrefix:"--const-",root:typeof document<"u"?document.documentElement:void 0};function c(){let i=o.root,e=(r,s)=>i.style.setProperty(o.constPrefix+r,String(s)),t=document.createElement("div");t.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden;scrollbar-width:auto",(document.body??i).appendChild(t);let n=t.offsetWidth-t.clientWidth;e("scrollbar-w",n),e("scrollbar-overlay",n===0?1:0),t.style.scrollbarWidth="thin",e("scrollbar-thin-w",t.offsetWidth-t.clientWidth),t.remove(),e("dpr",window.devicePixelRatio||1),e("cores",navigator.hardwareConcurrency||0),e("mem",navigator.deviceMemory||0);}typeof document<"u"&&c();})();
1
+ (function(){'use strict';var d={constPrefix:"--const-",root:typeof document<"u"?document.documentElement:void 0};var l={platform:"unknown",browser:"unknown",engine:"unknown",version:0,mobile:0},f={android:"android","chrome-os":"chromeos","chromium-os":"chromeos",ios:"ios",linux:"linux",macos:"macos",windows:"windows"},u=n=>n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");function m(n){let e=n.toLowerCase();return e.includes("edge")||e.includes("edg")?"edge":e.includes("opera")||e.includes("opr")?"opera":e.includes("samsung")?"samsung":e.includes("firefox")?"firefox":e.includes("chrome")||e.includes("chromium")?"chrome":e.includes("safari")?"safari":"unknown"}function g(n){let e=n.brands;if(!e||!e.length)return null;let r=e.filter(t=>!/not.?a.?brand/i.test(t.brand)),o=r.find(t=>!/chromium/i.test(t.brand))??r[0];return o?{platform:f[u(n.platform??"")]??"unknown",browser:m(o.brand),engine:"blink",version:parseInt(o.version,10)||0,mobile:n.mobile?1:0}:null}var b=[{id:"edge",test:/Edg(?:iOS|A)?\//,ver:/Edg(?:iOS|A)?\/(\d+)/},{id:"opera",test:/OPR\/|OPiOS\/|Opera\//,ver:/(?:OPR|OPiOS|Opera)\/(\d+)/},{id:"samsung",test:/SamsungBrowser\//,ver:/SamsungBrowser\/(\d+)/},{id:"firefox",test:/Firefox\/|FxiOS\//,ver:/(?:Firefox|FxiOS)\/(\d+)/},{id:"chrome",test:/Chrome\/|CriOS\//,ver:/(?:Chrome|CriOS)\/(\d+)/},{id:"safari",test:/Safari\//,ver:/Version\/(\d+)/}];function p(n){let e=/Android/.test(n)?"android":/iPhone|iPad|iPod/.test(n)?"ios":/Macintosh|Mac OS X/.test(n)?"macos":/Windows/.test(n)?"windows":/CrOS/.test(n)?"chromeos":/Linux/.test(n)?"linux":"unknown",r=b.find(a=>a.test.test(n)),o=r?.id??"unknown",t=r&&parseInt(n.match(r.ver)?.[1]??"",10)||0,i=e==="ios"?"webkit":o==="firefox"?"gecko":o==="safari"?"webkit":o==="unknown"?"unknown":"blink",s=/Mobi|Android|iPhone|iPod/.test(n)?1:0;return {platform:e,browser:o,engine:i,version:t,mobile:s}}function c(){if(typeof navigator>"u")return l;let n=navigator.userAgentData;return (n?g(n):null)??p(navigator.userAgent||"")}function w(){let n=d.root,e=(s,a)=>n.style.setProperty(d.constPrefix+s,String(a)),r=document.createElement("div");r.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden;scrollbar-width:auto",(document.body??n).appendChild(r);let t=r.offsetWidth-r.clientWidth;e("scrollbar-w",t),e("scrollbar-overlay",t===0?1:0),r.style.scrollbarWidth="thin",e("scrollbar-thin-w",r.offsetWidth-r.clientWidth),r.remove(),e("dpr",window.devicePixelRatio||1),e("cores",navigator.hardwareConcurrency||0),e("mem",navigator.deviceMemory||0);let i=c();e("ua-platform",i.platform),e("ua-browser",i.browser),e("ua-engine",i.engine),e("ua-version",i.version),e("ua-mobile",i.mobile);}typeof document<"u"&&w();
2
+ })();
package/dist/head.js CHANGED
@@ -1 +1 @@
1
- import {a}from'./chunk-LWKH66VY.js';function c(){let r=a.root,o=(n,s)=>r.style.setProperty(a.constPrefix+n,String(s)),t=document.createElement("div");t.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden;scrollbar-width:auto",(document.body??r).appendChild(t);let i=t.offsetWidth-t.clientWidth;o("scrollbar-w",i),o("scrollbar-overlay",i===0?1:0),t.style.scrollbarWidth="thin",o("scrollbar-thin-w",t.offsetWidth-t.clientWidth),t.remove(),o("dpr",window.devicePixelRatio||1),o("cores",navigator.hardwareConcurrency||0),o("mem",navigator.deviceMemory||0);}typeof document<"u"&&c();
1
+ import {a as a$1}from'./chunk-EXPE3C6O.js';import {a}from'./chunk-LWKH66VY.js';function c(){let i=a.root,o=(a$1,l)=>i.style.setProperty(a.constPrefix+a$1,String(l)),e=document.createElement("div");e.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden;scrollbar-width:auto",(document.body??i).appendChild(e);let n=e.offsetWidth-e.clientWidth;o("scrollbar-w",n),o("scrollbar-overlay",n===0?1:0),e.style.scrollbarWidth="thin",o("scrollbar-thin-w",e.offsetWidth-e.clientWidth),e.remove(),o("dpr",window.devicePixelRatio||1),o("cores",navigator.hardwareConcurrency||0),o("mem",navigator.deviceMemory||0);let t=a$1();o("ua-platform",t.platform),o("ua-browser",t.browser),o("ua-engine",t.engine),o("ua-version",t.version),o("ua-mobile",t.mobile);}typeof document<"u"&&c();
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkWZXNO2W7_cjs=require('./chunk-WZXNO2W7.cjs');require('./chunk-HHINWX7L.cjs');var chunkEYDIF3NM_cjs=require('./chunk-EYDIF3NM.cjs');require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs'),require('./chunk-QHHF5SEL.cjs');Object.defineProperty(exports,"configure",{enumerable:true,get:function(){return chunkWZXNO2W7_cjs.d}});Object.defineProperty(exports,"isRegistered",{enumerable:true,get:function(){return chunkWZXNO2W7_cjs.c}});Object.defineProperty(exports,"propsFor",{enumerable:true,get:function(){return chunkWZXNO2W7_cjs.e}});Object.defineProperty(exports,"register",{enumerable:true,get:function(){return chunkWZXNO2W7_cjs.a}});Object.defineProperty(exports,"reset",{enumerable:true,get:function(){return chunkWZXNO2W7_cjs.g}});Object.defineProperty(exports,"unbind",{enumerable:true,get:function(){return chunkWZXNO2W7_cjs.f}});Object.defineProperty(exports,"unregister",{enumerable:true,get:function(){return chunkWZXNO2W7_cjs.b}});Object.defineProperty(exports,"pause",{enumerable:true,get:function(){return chunkEYDIF3NM_cjs.d}});Object.defineProperty(exports,"resume",{enumerable:true,get:function(){return chunkEYDIF3NM_cjs.e}});
1
+ 'use strict';var chunkOVCZMPYV_cjs=require('./chunk-OVCZMPYV.cjs');require('./chunk-PQVNJZUW.cjs'),require('./chunk-HHINWX7L.cjs');var chunkEYDIF3NM_cjs=require('./chunk-EYDIF3NM.cjs');require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs'),require('./chunk-QHHF5SEL.cjs');Object.defineProperty(exports,"configure",{enumerable:true,get:function(){return chunkOVCZMPYV_cjs.d}});Object.defineProperty(exports,"isRegistered",{enumerable:true,get:function(){return chunkOVCZMPYV_cjs.c}});Object.defineProperty(exports,"propsFor",{enumerable:true,get:function(){return chunkOVCZMPYV_cjs.e}});Object.defineProperty(exports,"register",{enumerable:true,get:function(){return chunkOVCZMPYV_cjs.a}});Object.defineProperty(exports,"reset",{enumerable:true,get:function(){return chunkOVCZMPYV_cjs.g}});Object.defineProperty(exports,"unbind",{enumerable:true,get:function(){return chunkOVCZMPYV_cjs.f}});Object.defineProperty(exports,"unregister",{enumerable:true,get:function(){return chunkOVCZMPYV_cjs.b}});Object.defineProperty(exports,"pause",{enumerable:true,get:function(){return chunkEYDIF3NM_cjs.d}});Object.defineProperty(exports,"resume",{enumerable:true,get:function(){return chunkEYDIF3NM_cjs.e}});
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-BVU5BAWU.js';import'./chunk-LTJ2VKVY.js';export{d as pause,e as resume}from'./chunk-KG3EF456.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import'./chunk-EEMKKLRF.js';
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-D24E2DBW.js';import'./chunk-V4OTPLOQ.js';import'./chunk-LTJ2VKVY.js';export{d as pause,e as resume}from'./chunk-KG3EF456.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import'./chunk-EEMKKLRF.js';
package/dist/plugins.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkHTKGZP36_cjs=require('./chunk-HTKGZP36.cjs'),chunkG2BOTBBH_cjs=require('./chunk-G2BOTBBH.cjs'),chunkUALPUR2L_cjs=require('./chunk-UALPUR2L.cjs'),chunk2H5YFW6O_cjs=require('./chunk-2H5YFW6O.cjs'),chunk2YHGSLQQ_cjs=require('./chunk-2YHGSLQQ.cjs'),chunkFKBHTKZH_cjs=require('./chunk-FKBHTKZH.cjs'),chunkHYVT6V4Z_cjs=require('./chunk-HYVT6V4Z.cjs'),chunk3W7CXUWN_cjs=require('./chunk-3W7CXUWN.cjs'),chunkSYKMPPTY_cjs=require('./chunk-SYKMPPTY.cjs'),chunk63C3RCO2_cjs=require('./chunk-63C3RCO2.cjs'),chunkFZYB3P7L_cjs=require('./chunk-FZYB3P7L.cjs'),chunkIIQP3BYA_cjs=require('./chunk-IIQP3BYA.cjs'),chunkQFJ6SZ2H_cjs=require('./chunk-QFJ6SZ2H.cjs');require('./chunk-L4SCOKPV.cjs');var chunkODPCQAKC_cjs=require('./chunk-ODPCQAKC.cjs'),chunk3REDV2FZ_cjs=require('./chunk-3REDV2FZ.cjs');require('./chunk-A6JDSQWH.cjs');var chunkMGZTR3X6_cjs=require('./chunk-MGZTR3X6.cjs'),chunkK2YWGXLP_cjs=require('./chunk-K2YWGXLP.cjs'),chunkRT47EE2L_cjs=require('./chunk-RT47EE2L.cjs'),chunk7CDVAP3H_cjs=require('./chunk-7CDVAP3H.cjs'),chunk6LTQ7ISE_cjs=require('./chunk-6LTQ7ISE.cjs'),chunk2OYRAOTM_cjs=require('./chunk-2OYRAOTM.cjs'),chunkXQOUJEVE_cjs=require('./chunk-XQOUJEVE.cjs'),chunkIPYBSM34_cjs=require('./chunk-IPYBSM34.cjs'),chunkWZXNO2W7_cjs=require('./chunk-WZXNO2W7.cjs');require('./chunk-HHINWX7L.cjs');var chunkLP3QQ33O_cjs=require('./chunk-LP3QQ33O.cjs');require('./chunk-EYDIF3NM.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 T=[chunkLP3QQ33O_cjs.a,chunkOVF4XN2H_cjs.a,chunkWIPJMLJJ_cjs.a,chunk3MK6Q7DX_cjs.a,chunkMGZTR3X6_cjs.a,chunkK2YWGXLP_cjs.a,chunkRT47EE2L_cjs.b,chunk7CDVAP3H_cjs.a,chunk6LTQ7ISE_cjs.a,chunk2OYRAOTM_cjs.a,chunkXQOUJEVE_cjs.a,chunkIPYBSM34_cjs.a,chunk3W7CXUWN_cjs.a,chunkSYKMPPTY_cjs.a,chunk63C3RCO2_cjs.a,chunkFZYB3P7L_cjs.a,chunkIIQP3BYA_cjs.a,chunkQFJ6SZ2H_cjs.a,chunkODPCQAKC_cjs.a,chunk3REDV2FZ_cjs.a,chunkHTKGZP36_cjs.a,chunkG2BOTBBH_cjs.a,chunkUALPUR2L_cjs.a,chunk2H5YFW6O_cjs.a,chunk2YHGSLQQ_cjs.a,chunkFKBHTKZH_cjs.a,chunkHYVT6V4Z_cjs.a];function po(...o){for(let L of o.length?o:T)chunkWZXNO2W7_cjs.a(L);}Object.defineProperty(exports,"orientation",{enumerable:true,get:function(){return chunkHTKGZP36_cjs.a}});Object.defineProperty(exports,"motion",{enumerable:true,get:function(){return chunkG2BOTBBH_cjs.a}});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 chunk2YHGSLQQ_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,"pointer",{enumerable:true,get:function(){return chunk3W7CXUWN_cjs.a}});Object.defineProperty(exports,"pointerLocal",{enumerable:true,get:function(){return chunkSYKMPPTY_cjs.a}});Object.defineProperty(exports,"media",{enumerable:true,get:function(){return chunk63C3RCO2_cjs.a}});Object.defineProperty(exports,"field",{enumerable:true,get:function(){return chunkFZYB3P7L_cjs.a}});Object.defineProperty(exports,"fieldState",{enumerable:true,get:function(){return chunkIIQP3BYA_cjs.a}});Object.defineProperty(exports,"formState",{enumerable:true,get:function(){return chunkQFJ6SZ2H_cjs.a}});Object.defineProperty(exports,"select",{enumerable:true,get:function(){return chunkODPCQAKC_cjs.a}});Object.defineProperty(exports,"colorInput",{enumerable:true,get:function(){return chunk3REDV2FZ_cjs.a}});Object.defineProperty(exports,"navType",{enumerable:true,get:function(){return chunkMGZTR3X6_cjs.a}});Object.defineProperty(exports,"meta",{enumerable:true,get:function(){return chunkK2YWGXLP_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 chunk2OYRAOTM_cjs.a}});Object.defineProperty(exports,"visualViewport",{enumerable:true,get:function(){return chunkXQOUJEVE_cjs.a}});Object.defineProperty(exports,"keyboard",{enumerable:true,get:function(){return chunkIPYBSM34_cjs.a}});Object.defineProperty(exports,"scrollVelocity",{enumerable:true,get:function(){return chunkLP3QQ33O_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=T;exports.registerPlugins=po;
1
+ 'use strict';var chunk3QHCKCTX_cjs=require('./chunk-3QHCKCTX.cjs'),chunkHTKGZP36_cjs=require('./chunk-HTKGZP36.cjs'),chunkG2BOTBBH_cjs=require('./chunk-G2BOTBBH.cjs'),chunkUALPUR2L_cjs=require('./chunk-UALPUR2L.cjs'),chunk2H5YFW6O_cjs=require('./chunk-2H5YFW6O.cjs'),chunk2YHGSLQQ_cjs=require('./chunk-2YHGSLQQ.cjs'),chunkFKBHTKZH_cjs=require('./chunk-FKBHTKZH.cjs'),chunkHYVT6V4Z_cjs=require('./chunk-HYVT6V4Z.cjs'),chunk37L73RJL_cjs=require('./chunk-37L73RJL.cjs'),chunk3W7CXUWN_cjs=require('./chunk-3W7CXUWN.cjs'),chunkSYKMPPTY_cjs=require('./chunk-SYKMPPTY.cjs'),chunk63C3RCO2_cjs=require('./chunk-63C3RCO2.cjs'),chunkFZYB3P7L_cjs=require('./chunk-FZYB3P7L.cjs'),chunkIIQP3BYA_cjs=require('./chunk-IIQP3BYA.cjs'),chunkQFJ6SZ2H_cjs=require('./chunk-QFJ6SZ2H.cjs');require('./chunk-L4SCOKPV.cjs');var chunkODPCQAKC_cjs=require('./chunk-ODPCQAKC.cjs'),chunk3REDV2FZ_cjs=require('./chunk-3REDV2FZ.cjs');require('./chunk-A6JDSQWH.cjs');var chunkMGZTR3X6_cjs=require('./chunk-MGZTR3X6.cjs'),chunkK2YWGXLP_cjs=require('./chunk-K2YWGXLP.cjs'),chunkRT47EE2L_cjs=require('./chunk-RT47EE2L.cjs'),chunk7CDVAP3H_cjs=require('./chunk-7CDVAP3H.cjs'),chunk6LTQ7ISE_cjs=require('./chunk-6LTQ7ISE.cjs'),chunk2OYRAOTM_cjs=require('./chunk-2OYRAOTM.cjs'),chunkXQOUJEVE_cjs=require('./chunk-XQOUJEVE.cjs'),chunkIPYBSM34_cjs=require('./chunk-IPYBSM34.cjs'),chunkOVCZMPYV_cjs=require('./chunk-OVCZMPYV.cjs');require('./chunk-PQVNJZUW.cjs'),require('./chunk-HHINWX7L.cjs'),require('./chunk-KSKAQMWJ.cjs');var chunkLP3QQ33O_cjs=require('./chunk-LP3QQ33O.cjs');require('./chunk-EYDIF3NM.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 q=[chunkLP3QQ33O_cjs.a,chunkOVF4XN2H_cjs.a,chunkWIPJMLJJ_cjs.a,chunk3MK6Q7DX_cjs.a,chunkMGZTR3X6_cjs.a,chunkK2YWGXLP_cjs.a,chunkRT47EE2L_cjs.b,chunk7CDVAP3H_cjs.a,chunk6LTQ7ISE_cjs.a,chunk2OYRAOTM_cjs.a,chunkXQOUJEVE_cjs.a,chunkIPYBSM34_cjs.a,chunk3W7CXUWN_cjs.a,chunkSYKMPPTY_cjs.a,chunk63C3RCO2_cjs.a,chunkFZYB3P7L_cjs.a,chunkIIQP3BYA_cjs.a,chunkQFJ6SZ2H_cjs.a,chunkODPCQAKC_cjs.a,chunk3REDV2FZ_cjs.a,chunkHTKGZP36_cjs.a,chunkG2BOTBBH_cjs.a,chunkUALPUR2L_cjs.a,chunk2H5YFW6O_cjs.a,chunk2YHGSLQQ_cjs.a,chunkFKBHTKZH_cjs.a,chunkHYVT6V4Z_cjs.a,chunk37L73RJL_cjs.a,chunk3QHCKCTX_cjs.a];function no(...o){for(let j of o.length?o:q)chunkOVCZMPYV_cjs.a(j);}Object.defineProperty(exports,"ua",{enumerable:true,get:function(){return chunk3QHCKCTX_cjs.a}});Object.defineProperty(exports,"orientation",{enumerable:true,get:function(){return chunkHTKGZP36_cjs.a}});Object.defineProperty(exports,"motion",{enumerable:true,get:function(){return chunkG2BOTBBH_cjs.a}});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 chunk2YHGSLQQ_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,"truncated",{enumerable:true,get:function(){return chunk37L73RJL_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,"media",{enumerable:true,get:function(){return chunk63C3RCO2_cjs.a}});Object.defineProperty(exports,"field",{enumerable:true,get:function(){return chunkFZYB3P7L_cjs.a}});Object.defineProperty(exports,"fieldState",{enumerable:true,get:function(){return chunkIIQP3BYA_cjs.a}});Object.defineProperty(exports,"formState",{enumerable:true,get:function(){return chunkQFJ6SZ2H_cjs.a}});Object.defineProperty(exports,"select",{enumerable:true,get:function(){return chunkODPCQAKC_cjs.a}});Object.defineProperty(exports,"colorInput",{enumerable:true,get:function(){return chunk3REDV2FZ_cjs.a}});Object.defineProperty(exports,"navType",{enumerable:true,get:function(){return chunkMGZTR3X6_cjs.a}});Object.defineProperty(exports,"meta",{enumerable:true,get:function(){return chunkK2YWGXLP_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 chunk2OYRAOTM_cjs.a}});Object.defineProperty(exports,"visualViewport",{enumerable:true,get:function(){return chunkXQOUJEVE_cjs.a}});Object.defineProperty(exports,"keyboard",{enumerable:true,get:function(){return chunkIPYBSM34_cjs.a}});Object.defineProperty(exports,"scrollVelocity",{enumerable:true,get:function(){return chunkLP3QQ33O_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=q;exports.registerPlugins=no;
@@ -347,6 +347,56 @@ declare const imgColor: Source;
347
347
  */
348
348
  declare const videoColor: Source;
349
349
 
350
+ /**
351
+ * Whether an element's own text is being clipped right now — the "is the
352
+ * ellipsis showing?" question CSS can ask of a scroll container (`scroll-state()`)
353
+ * but never of overflowing text. Bind it to the element whose overflow you care
354
+ * about; all `1`/`0`:
355
+ *
356
+ * - `--live-truncated` — clipped on *either* axis.
357
+ * - `--live-truncated-x` — inline clip: the classic `text-overflow: ellipsis` on
358
+ * a `white-space: nowrap; overflow: hidden` line (`scrollWidth > clientWidth`).
359
+ * - `--live-truncated-y` — block clip: a `-webkit-line-clamp` / fixed-height
360
+ * `overflow: hidden` box whose lines run past it (`scrollHeight > clientHeight`).
361
+ *
362
+ * Reveal a "more" affordance, a tooltip trigger, or an expand control only while
363
+ * text is actually cut off — `@container style(--live-truncated: 1) { … }` — and
364
+ * have it disappear the moment a wider box fits the text. Recomputed whenever the
365
+ * box resizes (the shared `ResizeObserver`), so responsive truncation flips both
366
+ * ways as the layout reflows.
367
+ */
368
+ declare const truncated: Source;
369
+
370
+ /**
371
+ * `--const-ua-*` — low-entropy device & browser identity JS can read but CSS
372
+ * can't, written **once** as strings/numbers on the `const` cadence:
373
+ *
374
+ * - `--const-ua-platform` — `macos` / `windows` / `linux` / `android` / `ios` /
375
+ * `chromeos` / `unknown`
376
+ * - `--const-ua-browser` — `chrome` / `edge` / `firefox` / `safari` / `opera` /
377
+ * `samsung` / `unknown`
378
+ * - `--const-ua-engine` — `blink` / `gecko` / `webkit` / `unknown`
379
+ * - `--const-ua-version` — the browser's major version (number, `0` if unknown)
380
+ * - `--const-ua-mobile` — `1` on a phone-class device, else `0`
381
+ *
382
+ * so CSS can branch on the client without JS or a media query —
383
+ * `@container style(--const-ua-engine: webkit) { … }`,
384
+ * `@container style(--const-ua-platform: ios) { … }` — or gate on the version
385
+ * with `calc(var(--const-ua-version))`.
386
+ *
387
+ * Prefers structured UA Client Hints (`navigator.userAgentData`, Chromium) and
388
+ * falls back to a minimal (best-effort) `userAgent`-string sniff on Firefox /
389
+ * Safari. **Low-entropy only** — no high-entropy hints, device model, or full
390
+ * version, so it adds no fingerprinting surface beyond the request headers.
391
+ *
392
+ * Typed (`configure({ typed: true })`) registers the strings as `<custom-ident>`
393
+ * and the numbers as `<integer>` so they survive `@property`. Rides the writer,
394
+ * so it lands the frame *after* bind; the same constants are available before
395
+ * first paint via the `head` entry (`import 'prop-for-that/head'`). Global source
396
+ * — bind once.
397
+ */
398
+ declare const ua: Source;
399
+
350
400
  /** Every plugin source, for `registerPlugins()` / bulk registration. */
351
401
  declare const allPlugins: Source[];
352
402
  /**
@@ -359,4 +409,4 @@ declare const allPlugins: Source[];
359
409
  */
360
410
  declare function registerPlugins(...sources: Source[]): void;
361
411
 
362
- export { allPlugins, battery, clock, colorInput, cpuPressure, field, fieldState, formState, fps, geo, img, imgColor, keyboard, media, meta, motion, navType, network, online, orientation, pageFocused, pageVisible, pointer, pointerLocal, registerPlugins, scrollVelocity, select, videoColor, visualViewport };
412
+ export { allPlugins, battery, clock, colorInput, cpuPressure, field, fieldState, formState, fps, geo, img, imgColor, keyboard, media, meta, motion, navType, network, online, orientation, pageFocused, pageVisible, pointer, pointerLocal, registerPlugins, scrollVelocity, select, truncated, ua, videoColor, visualViewport };
package/dist/plugins.d.ts CHANGED
@@ -347,6 +347,56 @@ declare const imgColor: Source;
347
347
  */
348
348
  declare const videoColor: Source;
349
349
 
350
+ /**
351
+ * Whether an element's own text is being clipped right now — the "is the
352
+ * ellipsis showing?" question CSS can ask of a scroll container (`scroll-state()`)
353
+ * but never of overflowing text. Bind it to the element whose overflow you care
354
+ * about; all `1`/`0`:
355
+ *
356
+ * - `--live-truncated` — clipped on *either* axis.
357
+ * - `--live-truncated-x` — inline clip: the classic `text-overflow: ellipsis` on
358
+ * a `white-space: nowrap; overflow: hidden` line (`scrollWidth > clientWidth`).
359
+ * - `--live-truncated-y` — block clip: a `-webkit-line-clamp` / fixed-height
360
+ * `overflow: hidden` box whose lines run past it (`scrollHeight > clientHeight`).
361
+ *
362
+ * Reveal a "more" affordance, a tooltip trigger, or an expand control only while
363
+ * text is actually cut off — `@container style(--live-truncated: 1) { … }` — and
364
+ * have it disappear the moment a wider box fits the text. Recomputed whenever the
365
+ * box resizes (the shared `ResizeObserver`), so responsive truncation flips both
366
+ * ways as the layout reflows.
367
+ */
368
+ declare const truncated: Source;
369
+
370
+ /**
371
+ * `--const-ua-*` — low-entropy device & browser identity JS can read but CSS
372
+ * can't, written **once** as strings/numbers on the `const` cadence:
373
+ *
374
+ * - `--const-ua-platform` — `macos` / `windows` / `linux` / `android` / `ios` /
375
+ * `chromeos` / `unknown`
376
+ * - `--const-ua-browser` — `chrome` / `edge` / `firefox` / `safari` / `opera` /
377
+ * `samsung` / `unknown`
378
+ * - `--const-ua-engine` — `blink` / `gecko` / `webkit` / `unknown`
379
+ * - `--const-ua-version` — the browser's major version (number, `0` if unknown)
380
+ * - `--const-ua-mobile` — `1` on a phone-class device, else `0`
381
+ *
382
+ * so CSS can branch on the client without JS or a media query —
383
+ * `@container style(--const-ua-engine: webkit) { … }`,
384
+ * `@container style(--const-ua-platform: ios) { … }` — or gate on the version
385
+ * with `calc(var(--const-ua-version))`.
386
+ *
387
+ * Prefers structured UA Client Hints (`navigator.userAgentData`, Chromium) and
388
+ * falls back to a minimal (best-effort) `userAgent`-string sniff on Firefox /
389
+ * Safari. **Low-entropy only** — no high-entropy hints, device model, or full
390
+ * version, so it adds no fingerprinting surface beyond the request headers.
391
+ *
392
+ * Typed (`configure({ typed: true })`) registers the strings as `<custom-ident>`
393
+ * and the numbers as `<integer>` so they survive `@property`. Rides the writer,
394
+ * so it lands the frame *after* bind; the same constants are available before
395
+ * first paint via the `head` entry (`import 'prop-for-that/head'`). Global source
396
+ * — bind once.
397
+ */
398
+ declare const ua: Source;
399
+
350
400
  /** Every plugin source, for `registerPlugins()` / bulk registration. */
351
401
  declare const allPlugins: Source[];
352
402
  /**
@@ -359,4 +409,4 @@ declare const allPlugins: Source[];
359
409
  */
360
410
  declare function registerPlugins(...sources: Source[]): void;
361
411
 
362
- export { allPlugins, battery, clock, colorInput, cpuPressure, field, fieldState, formState, fps, geo, img, imgColor, keyboard, media, meta, motion, navType, network, online, orientation, pageFocused, pageVisible, pointer, pointerLocal, registerPlugins, scrollVelocity, select, videoColor, visualViewport };
412
+ export { allPlugins, battery, clock, colorInput, cpuPressure, field, fieldState, formState, fps, geo, img, imgColor, keyboard, media, meta, motion, navType, network, online, orientation, pageFocused, pageVisible, pointer, pointerLocal, registerPlugins, scrollVelocity, select, truncated, ua, videoColor, visualViewport };
package/dist/plugins.js CHANGED
@@ -1 +1 @@
1
- import {a as a$j}from'./chunk-TRMZLMNW.js';export{a as orientation}from'./chunk-TRMZLMNW.js';import {a as a$k}from'./chunk-SKEEFKDT.js';export{a as motion}from'./chunk-SKEEFKDT.js';import {a as a$l}from'./chunk-FOHEZJHF.js';export{a as geo}from'./chunk-FOHEZJHF.js';import {a as a$m}from'./chunk-5JZBLUQK.js';export{a as cpuPressure}from'./chunk-5JZBLUQK.js';import {a as a$n}from'./chunk-YARRV66T.js';export{a as img}from'./chunk-YARRV66T.js';import {a as a$o}from'./chunk-A7GWTDM7.js';export{a as imgColor}from'./chunk-A7GWTDM7.js';import {a as a$p}from'./chunk-ZQTU5EW7.js';export{a as videoColor}from'./chunk-ZQTU5EW7.js';import {a as a$b}from'./chunk-KAK6WZS7.js';export{a as pointer}from'./chunk-KAK6WZS7.js';import {a as a$c}from'./chunk-2E2JQAHI.js';export{a as pointerLocal}from'./chunk-2E2JQAHI.js';import {a as a$d}from'./chunk-UHGW7AXC.js';export{a as media}from'./chunk-UHGW7AXC.js';import {a as a$e}from'./chunk-COGNT6R5.js';export{a as field}from'./chunk-COGNT6R5.js';import {a as a$f}from'./chunk-BTKSOVH3.js';export{a as fieldState}from'./chunk-BTKSOVH3.js';import {a as a$g}from'./chunk-LBK3257B.js';export{a as formState}from'./chunk-LBK3257B.js';import'./chunk-QIUPJ6MF.js';import {a as a$h}from'./chunk-M65LNJXV.js';export{a as select}from'./chunk-M65LNJXV.js';import {a as a$i}from'./chunk-QTM2FDUV.js';export{a as colorInput}from'./chunk-QTM2FDUV.js';import'./chunk-A2ETARW3.js';import {a as a$4}from'./chunk-H7X35UB4.js';export{a as navType}from'./chunk-H7X35UB4.js';import {a as a$5}from'./chunk-TEPMM5DH.js';export{a as meta}from'./chunk-TEPMM5DH.js';import {b}from'./chunk-JB72QLD6.js';export{b as network}from'./chunk-JB72QLD6.js';import {a as a$6}from'./chunk-DQJQEWPS.js';export{a as battery}from'./chunk-DQJQEWPS.js';import {a as a$7}from'./chunk-7U544OAJ.js';export{a as clock}from'./chunk-7U544OAJ.js';import {a as a$8}from'./chunk-M7FMWTDF.js';export{a as fps}from'./chunk-M7FMWTDF.js';import {a as a$9}from'./chunk-F5H2O3AR.js';export{a as visualViewport}from'./chunk-F5H2O3AR.js';import {a as a$a}from'./chunk-IVUTABRM.js';export{a as keyboard}from'./chunk-IVUTABRM.js';import {a as a$q}from'./chunk-BVU5BAWU.js';import'./chunk-LTJ2VKVY.js';import {a}from'./chunk-SV76E7NI.js';export{a as scrollVelocity}from'./chunk-SV76E7NI.js';import'./chunk-KG3EF456.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 T=[a,a$1,a$2,a$3,a$4,a$5,b,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,a$o,a$p];function po(...o){for(let L of o.length?o:T)a$q(L);}export{T as allPlugins,po as registerPlugins};
1
+ import {a as a$r}from'./chunk-5VXDAWUI.js';export{a as ua}from'./chunk-5VXDAWUI.js';import {a as a$j}from'./chunk-TRMZLMNW.js';export{a as orientation}from'./chunk-TRMZLMNW.js';import {a as a$k}from'./chunk-SKEEFKDT.js';export{a as motion}from'./chunk-SKEEFKDT.js';import {a as a$l}from'./chunk-FOHEZJHF.js';export{a as geo}from'./chunk-FOHEZJHF.js';import {a as a$m}from'./chunk-5JZBLUQK.js';export{a as cpuPressure}from'./chunk-5JZBLUQK.js';import {a as a$n}from'./chunk-YARRV66T.js';export{a as img}from'./chunk-YARRV66T.js';import {a as a$o}from'./chunk-A7GWTDM7.js';export{a as imgColor}from'./chunk-A7GWTDM7.js';import {a as a$p}from'./chunk-ZQTU5EW7.js';export{a as videoColor}from'./chunk-ZQTU5EW7.js';import {a as a$q}from'./chunk-BS2XX4G3.js';export{a as truncated}from'./chunk-BS2XX4G3.js';import {a as a$b}from'./chunk-KAK6WZS7.js';export{a as pointer}from'./chunk-KAK6WZS7.js';import {a as a$c}from'./chunk-2E2JQAHI.js';export{a as pointerLocal}from'./chunk-2E2JQAHI.js';import {a as a$d}from'./chunk-UHGW7AXC.js';export{a as media}from'./chunk-UHGW7AXC.js';import {a as a$e}from'./chunk-COGNT6R5.js';export{a as field}from'./chunk-COGNT6R5.js';import {a as a$f}from'./chunk-BTKSOVH3.js';export{a as fieldState}from'./chunk-BTKSOVH3.js';import {a as a$g}from'./chunk-LBK3257B.js';export{a as formState}from'./chunk-LBK3257B.js';import'./chunk-QIUPJ6MF.js';import {a as a$h}from'./chunk-M65LNJXV.js';export{a as select}from'./chunk-M65LNJXV.js';import {a as a$i}from'./chunk-QTM2FDUV.js';export{a as colorInput}from'./chunk-QTM2FDUV.js';import'./chunk-A2ETARW3.js';import {a as a$4}from'./chunk-H7X35UB4.js';export{a as navType}from'./chunk-H7X35UB4.js';import {a as a$5}from'./chunk-TEPMM5DH.js';export{a as meta}from'./chunk-TEPMM5DH.js';import {b}from'./chunk-JB72QLD6.js';export{b as network}from'./chunk-JB72QLD6.js';import {a as a$6}from'./chunk-DQJQEWPS.js';export{a as battery}from'./chunk-DQJQEWPS.js';import {a as a$7}from'./chunk-7U544OAJ.js';export{a as clock}from'./chunk-7U544OAJ.js';import {a as a$8}from'./chunk-M7FMWTDF.js';export{a as fps}from'./chunk-M7FMWTDF.js';import {a as a$9}from'./chunk-F5H2O3AR.js';export{a as visualViewport}from'./chunk-F5H2O3AR.js';import {a as a$a}from'./chunk-IVUTABRM.js';export{a as keyboard}from'./chunk-IVUTABRM.js';import {a as a$s}from'./chunk-D24E2DBW.js';import'./chunk-V4OTPLOQ.js';import'./chunk-LTJ2VKVY.js';import'./chunk-EXPE3C6O.js';import {a}from'./chunk-SV76E7NI.js';export{a as scrollVelocity}from'./chunk-SV76E7NI.js';import'./chunk-KG3EF456.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 q=[a,a$1,a$2,a$3,a$4,a$5,b,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,a$o,a$p,a$q,a$r];function no(...o){for(let j of o.length?o:q)a$s(j);}export{q as allPlugins,no as registerPlugins};
@@ -0,0 +1 @@
1
+ export{a as truncated}from'./chunk-BS2XX4G3.js';import'./chunk-V4OTPLOQ.js';
@@ -0,0 +1 @@
1
+ 'use strict';var chunk37L73RJL_cjs=require('./chunk-37L73RJL.cjs');require('./chunk-PQVNJZUW.cjs');Object.defineProperty(exports,"truncated",{enumerable:true,get:function(){return chunk37L73RJL_cjs.a}});
@@ -0,0 +1 @@
1
+ 'use strict';var chunk3QHCKCTX_cjs=require('./chunk-3QHCKCTX.cjs');require('./chunk-KSKAQMWJ.cjs');Object.defineProperty(exports,"ua",{enumerable:true,get:function(){return chunk3QHCKCTX_cjs.a}});
@@ -0,0 +1 @@
1
+ export{a as ua}from'./chunk-5VXDAWUI.js';import'./chunk-EXPE3C6O.js';
package/llms.txt CHANGED
@@ -106,6 +106,11 @@ prefix; constants use `--const-`. Values are unitless numbers unless noted.
106
106
  | `--const-dpr` | `devicePixelRatio` |
107
107
  | `--const-cores` | `navigator.hardwareConcurrency` |
108
108
  | `--const-mem` | `navigator.deviceMemory` in GiB (Chromium-only, coarse; `0` elsewhere) |
109
+ | `--const-ua-platform` | low-entropy OS: `macos` / `windows` / `linux` / `android` / `ios` / `chromeos` / `unknown` |
110
+ | `--const-ua-browser` | `chrome` / `edge` / `firefox` / `safari` / `opera` / `samsung` / `unknown` |
111
+ | `--const-ua-engine` | `blink` / `gecko` / `webkit` / `unknown` |
112
+ | `--const-ua-version` | browser major version (number, `0` if unknown) |
113
+ | `--const-ua-mobile` | `1` on a phone-class device, else `0` |
109
114
 
110
115
  ### Plugins (`prop-for-that/plugins`)
111
116
 
@@ -120,6 +125,7 @@ Import name is camelCase; the key for `propsFor`/`data-props-for` is the dashed
120
125
  | `pageVisible` | `page-visible` | global | `--live-page-visible` (1/0 — tab foreground vs hidden/backgrounded; `document.visibilityState`. A visible tab can still be unfocused) |
121
126
  | `navType` | `nav-type` | global | `--const-nav-type` (write-once string — how the user arrived: `navigate` / `reload` / `back_forward` / `prerender`, from `performance.getEntriesByType('navigation')[0].type`. Pairs with `@container style(--const-nav-type: reload)`) |
122
127
  | `meta` | `meta` | global | every `<meta name\|property + content>` as a write-once `--const-meta-<slug>` (slug = lowercased name, non-alphanumerics → `-`): e.g. `--const-meta-theme-color`, `--const-meta-og-image`, `--const-meta-color-scheme`. First match wins; a `media`-conditional meta is skipped when it doesn't match, so the active `theme-color` variant lands. Read once at bind (const) |
128
+ | `ua` | `ua` | global | low-entropy device/browser identity, write-once: `--const-ua-platform` (macos/windows/linux/android/ios/chromeos/unknown), `--const-ua-browser` (chrome/edge/firefox/safari/opera/samsung/unknown), `--const-ua-engine` (blink/gecko/webkit/unknown), `--const-ua-version` (browser major, 0 if unknown), `--const-ua-mobile` (1/0). Prefers UA Client Hints (`navigator.userAgentData`, Chromium), falls back to a best-effort userAgent sniff (Firefox/Safari). Low-entropy only — no fingerprinting surface beyond request headers. Also written pre-paint by the `head` entry |
123
129
  | `network` | `network` | global | `--live-net-downlink`, `--live-net-rtt`, `--live-net-save-data` (1/0), `--live-net-type` (slow-2g=1…4g=4, else 0) |
124
130
  | `battery` | `battery` | global | `--live-battery-level` (0–1), `--live-battery-charging` (1/0) |
125
131
  | `clock` | `clock` | global | `--live-now` (epoch seconds), `--live-hours`, `--live-minutes`, `--live-seconds` |
@@ -140,6 +146,7 @@ Import name is camelCase; the key for `propsFor`/`data-props-for` is the dashed
140
146
  | `img` | `img` | element | `--live-natural-w`, `--live-natural-h` (intrinsic px), `--live-loaded` (1/0), `--live-broken` (1/0). Bind the `<img>` or a container holding one. |
141
147
  | `imgColor` | `img-color` | element | a palette from an `<img>`, all from one 16×16 bucketing pass (createImageBitmap+OffscreenCanvas). Each swatch is a single sRGB hex colour (no channel props — use relative colour syntax / color-mix to extract): `--live-img` (dominant), `--live-img-accent` (most vibrant), `--live-img-dark` (darkest non-black), `--live-img-light` (lightest non-white), `--live-img-avg` (mean). Plus `--live-img-temp` (−1 cool…+1 warm). Accent reuses the dominant for grayscale. Cross-origin needs `crossorigin` + CORS, else no-ops. Bind the `<img>` or a container. |
142
148
  | `videoColor` | `video-color` | element | live colours of a playing `<video>`, each a single sRGB hex colour: `--live-video` (dominant) + `--live-video-accent` (most vibrant; reuses the dominant for a grayscale frame). Both from one 16×16 read on `requestVideoFrameCallback` (stops when paused/offscreen/backgrounded), throttled to ~4 Hz; seeds a paused/poster frame; falls back to `timeupdate`. Cross-origin needs `crossorigin` + CORS, else no-ops. Bind the `<video>` or a container. |
149
+ | `truncated` | `truncated` | element | whether the element's own text is clipped right now — the "is the ellipsis showing?" CSS can ask a scroll container but not overflowing text (all 1/0): `--live-truncated` (either axis), `--live-truncated-x` (inline clip, `scrollWidth > clientWidth` — the `text-overflow: ellipsis` case), `--live-truncated-y` (block clip, `scrollHeight > clientHeight` — `-webkit-line-clamp` / fixed-height box). Drives `@container style(--live-truncated: 1)` to reveal a "more"/tooltip/expand affordance only while text is cut off. Recomputed on resize (shared `ResizeObserver`), flips both ways as layout reflows. Bind the element whose overflow you care about. |
143
150
 
144
151
  ## Recipes
145
152
 
@@ -199,7 +206,7 @@ Discrete reaction with a style query:
199
206
  - **Typed properties are opt-in.** `configure({ typed: true })` (before attaching) registers each written `--live-*` with `@property` so it interpolates (consumers add `transition`/`@keyframes`) and resolves to `0` before a value arrives. With the `auto` entry, `<html data-props-typed>` is the markup equivalent (boolean, read once on load; typing is global per `@property` name, so no per-key subset). It is a one-way door (no unregister), uses `inherits: true`, is feature-detected, and skips names already registered. Sources can declare per-property `props: { name: { syntax, initial, inherits } }` (default `<number>` / `0` / inherited); consumers can set initials with `configure({ typed: true, defaults: { 'pointer-x-ratio': 0.5 } })` (keyed by local name).
200
207
  - **Permission-gated plugins** (`orientation`, `motion`, `geo`) and unsupported APIs feature-detect and no-op; registering them is always safe. On iOS some need a user-gesture permission grant before values arrive. `cpuPressure` is Chromium-only and needs a secure context + the `compute-pressure` Permissions Policy; it seeds `--live-cpu-pressure: 0` where supported, writes nothing where not.
201
208
  - **Global writes land in an adopted stylesheet, not `<html>` inline style.** Root `--live-*` go into one constructable, adopted `:root {}` rule (element-scoped writes stay inline; the `head` entry still writes `--const-*` inline for first paint). Keeps the DevTools Styles panel usable under per-frame churn; `var()`/`calc()` consumption is identical (still inherits). Reading `documentElement.style` directly won't show them — read computed style. Falls back to inline where constructable stylesheets are unsupported.
202
- - **Continuously-sampling element sources pause off screen.** Under both the imperative API and `auto`, a *gated* `element`-scoped source runs only while its element intersects the viewport (via the shared `IntersectionObserver`); off screen its work (listeners/observers/timers) is torn down and its last-written values freeze in place, resuming + re-seeding on re-entry. This covers the sources that do continuous/heavy work: `size`, `pointer-local`, `media`, `img-color`, `video-color`. `global` sources and `:root` bindings are never gated. Opt out with `gate: false`: `visibility` does (it must keep observing to *report* visibility), and so do the **event-driven** sources `range`, `field`, `field-state`, `form-state`, `select`, `color-input`, `img` — they only write on user interaction or `load` (impossible off screen), so they seed once at bind and run ungated rather than paying for an `IntersectionObserver` subscription that saves nothing.
209
+ - **Continuously-sampling element sources pause off screen.** Under both the imperative API and `auto`, a *gated* `element`-scoped source runs only while its element intersects the viewport (via the shared `IntersectionObserver`); off screen its work (listeners/observers/timers) is torn down and its last-written values freeze in place, resuming + re-seeding on re-entry. This covers the sources that do continuous/heavy work: `size`, `truncated`, `pointer-local`, `media`, `img-color`, `video-color`. `global` sources and `:root` bindings are never gated. Opt out with `gate: false`: `visibility` does (it must keep observing to *report* visibility), and so do the **event-driven** sources `range`, `field`, `field-state`, `form-state`, `select`, `color-input`, `img` — they only write on user interaction or `load` (impossible off screen), so they seed once at bind and run ungated rather than paying for an `IntersectionObserver` subscription that saves nothing.
203
210
  - **Freeze or throttle the loop.** The whole loop also freezes automatically while the tab is hidden (`document.hidden`). `pause()` / `resume()` stop and restart sampling+flushing (values hold steady; bindings stay attached). `configure({ liveHz: 30 })` caps the rate to reduce mutations/recalc, throttling samplers (`fps`, `scroll-velocity`) too.
204
211
 
205
212
  ## Links
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prop-for-that",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "Expose what JavaScript knows but CSS can't see, as batched, diffed CSS custom properties.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import {a as a$3}from'./chunk-LTJ2VKVY.js';import {b as b$1,a as a$1}from'./chunk-KG3EF456.js';import {a as a$5}from'./chunk-T4N6AEOZ.js';import {a as a$2}from'./chunk-LWKH66VY.js';import {a as a$4}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,o){let n=this.pending.get(t);if(n?.has(r)){n.set(r,o);return}this.last.get(t)?.get(r)!==o&&(n?n.set(r,o):this.pending.set(t,new Map([[r,o]])),a$1());}forget(t,r){this.last.get(t)?.delete(r);let o=this.pending.get(t);o&&(o.delete(r),o.size===0&&this.pending.delete(t));}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let o=this.last.get(t);o||this.last.set(t,o=new Map);let n=y(t);for(let[s,i]of r)o.get(s)!==i&&(n.setProperty(s,i),o.set(s,i));}this.pending.clear();}}},g=new E;b$1(g.flush);var S,a=new WeakMap,T=new WeakMap;function H(e,t){S||(S=new ResizeObserver(n=>{for(let s of n){T.set(s.target,s);let i=a.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=a.get(e);r||(a.set(e,r=new Set),S.observe(e)),r.add(t);let o=T.get(e);return o&&t(o),()=>{let n=a.get(e);n&&(n.delete(t),n.size===0&&(a.delete(e),S.unobserve(e)));}}var v,m=new WeakMap,z=new WeakMap,A=[0,.98,.99,.995,.999,1];function w(e,t){v||(v=new IntersectionObserver(n=>{for(let s of n){z.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 o=z.get(e);return o&&t(o),()=>{let n=m.get(e);n&&(n.delete(t),n.size===0&&(m.delete(e),v.unobserve(e)));}}var R=new Set;function I(e,t,r){if(R.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;R.add(e);let o=t?r?.[t]:void 0,n=t?a$2.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:o?.syntax??"<number>",inherits:o?.inherits??!0,initialValue:n!=null?String(n):o?.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$4("resize",t)}};var O={key:"size",scope:"element",start(e){return H(e.target,t=>{let r=t.borderBoxSize?.[0],o=r?r.inlineSize:t.contentRect.width,n=r?r.blockSize:t.contentRect.height;e.write("w",a$5(o)),e.write("h",a$5(n)),e.write("aspect",n>0?a$5(o/n):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 o=B(r);e.write("visible",o?1:0),o&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var F={key:"range",scope:"element",gate:false,start(e){let t=a$3(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let o=t.min===""?0:Number(t.min),n=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",n>o?a$5((s-o)/(n-o)):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$2,e);}function V(e,t,r){return {target:e,config:a$2,write(o,n,s="live"){let i=(s==="const"?a$2.constPrefix:a$2.livePrefix)+o;t.add(i),a$2.typed&&I(i,o,r),g.set(e,i,String(n));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==a$2.root&&typeof IntersectionObserver<"u"))return e.start(t);let n=null,s=()=>{if(!n)try{n=e.start(t);}catch(d){console.error(`[prop-for-that] source "${e.key}" failed to start`,d);}},i=()=>{n?.(),n=null;},p=w(r,d=>{d.isIntersecting?s():i();});return ()=>{p(),i();}}function C(e,t,r){let o=r.get(t);if(!o)return;o.dispose();let n=y(e);for(let s of o.written)n.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 o=[];for(let n of t){if(r.has(n))continue;let s=b[n];if(!s){console.warn(`[prop-for-that] unknown source "${n}"`);continue}let i=new Set,p;try{p=$(s,V(e,i,s.props),e);}catch(d){console.error(`[prop-for-that] source "${n}" failed to start`,d);continue}r.set(n,{dispose:p,written:i}),o.push(n);}return ()=>{let n=f.get(e);if(n){for(let s of o)C(e,s,n);n.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,o;if(t===void 0&&q(e)?(r=a$2.root?[a$2.root]:[],o=e):(r=j(e),o=t??[]),!r.length||!o.length)return N;let n=r.map(s=>_(s,o));return ()=>{for(let s of n)s();}}function ze(e,t){let r=f.get(e);if(r){for(let o of t??[...r.keys()])C(e,o,r);r.size===0&&f.delete(e);}}function He(){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,ze as f,He as g};
@@ -1 +0,0 @@
1
- 'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunkEYDIF3NM_cjs=require('./chunk-EYDIF3NM.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,o){let n=this.pending.get(t);if(n?.has(r)){n.set(r,o);return}this.last.get(t)?.get(r)!==o&&(n?n.set(r,o):this.pending.set(t,new Map([[r,o]])),chunkEYDIF3NM_cjs.a());}forget(t,r){this.last.get(t)?.delete(r);let o=this.pending.get(t);o&&(o.delete(r),o.size===0&&this.pending.delete(t));}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let o=this.last.get(t);o||this.last.set(t,o=new Map);let n=y(t);for(let[s,i]of r)o.get(s)!==i&&(n.setProperty(s,i),o.set(s,i));}this.pending.clear();}}},g=new E;chunkEYDIF3NM_cjs.b(g.flush);var S,a=new WeakMap,T=new WeakMap;function H(e,t){S||(S=new ResizeObserver(n=>{for(let s of n){T.set(s.target,s);let i=a.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=a.get(e);r||(a.set(e,r=new Set),S.observe(e)),r.add(t);let o=T.get(e);return o&&t(o),()=>{let n=a.get(e);n&&(n.delete(t),n.size===0&&(a.delete(e),S.unobserve(e)));}}var v,m=new WeakMap,z=new WeakMap,A=[0,.98,.99,.995,.999,1];function w(e,t){v||(v=new IntersectionObserver(n=>{for(let s of n){z.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 o=z.get(e);return o&&t(o),()=>{let n=m.get(e);n&&(n.delete(t),n.size===0&&(m.delete(e),v.unobserve(e)));}}var R=new Set;function I(e,t,r){if(R.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;R.add(e);let o=t?r?.[t]:void 0,n=t?chunk7L35N3N3_cjs.a.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:o?.syntax??"<number>",inherits:o?.inherits??!0,initialValue:n!=null?String(n):o?.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 H(e.target,t=>{let r=t.borderBoxSize?.[0],o=r?r.inlineSize:t.contentRect.width,n=r?r.blockSize:t.contentRect.height;e.write("w",chunk65MXZJBD_cjs.a(o)),e.write("h",chunk65MXZJBD_cjs.a(n)),e.write("aspect",n>0?chunk65MXZJBD_cjs.a(o/n):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 o=B(r);e.write("visible",o?1:0),o&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var F={key:"range",scope:"element",gate:false,start(e){let t=chunkHHINWX7L_cjs.a(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let o=t.min===""?0:Number(t.min),n=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",n>o?chunk65MXZJBD_cjs.a((s-o)/(n-o)):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(o,n,s="live"){let i=(s==="const"?chunk7L35N3N3_cjs.a.constPrefix:chunk7L35N3N3_cjs.a.livePrefix)+o;t.add(i),chunk7L35N3N3_cjs.a.typed&&I(i,o,r),g.set(e,i,String(n));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==chunk7L35N3N3_cjs.a.root&&typeof IntersectionObserver<"u"))return e.start(t);let n=null,s=()=>{if(!n)try{n=e.start(t);}catch(d){console.error(`[prop-for-that] source "${e.key}" failed to start`,d);}},i=()=>{n?.(),n=null;},p=w(r,d=>{d.isIntersecting?s():i();});return ()=>{p(),i();}}function C(e,t,r){let o=r.get(t);if(!o)return;o.dispose();let n=y(e);for(let s of o.written)n.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 o=[];for(let n of t){if(r.has(n))continue;let s=b[n];if(!s){console.warn(`[prop-for-that] unknown source "${n}"`);continue}let i=new Set,p;try{p=$(s,V(e,i,s.props),e);}catch(d){console.error(`[prop-for-that] source "${n}" failed to start`,d);continue}r.set(n,{dispose:p,written:i}),o.push(n);}return ()=>{let n=f.get(e);if(n){for(let s of o)C(e,s,n);n.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,o;if(t===void 0&&q(e)?(r=chunk7L35N3N3_cjs.a.root?[chunk7L35N3N3_cjs.a.root]:[],o=e):(r=j(e),o=t??[]),!r.length||!o.length)return N;let n=r.map(s=>_(s,o));return ()=>{for(let s of n)s();}}function ze(e,t){let r=f.get(e);if(r){for(let o of t??[...r.keys()])C(e,o,r);r.size===0&&f.delete(e);}}function He(){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=ze;exports.g=He;