prop-for-that 0.7.3 → 0.7.5
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 +38 -0
- package/README.md +2 -2
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/chunk-IPYBSM34.cjs +1 -0
- package/dist/chunk-IVUTABRM.js +1 -0
- package/dist/chunk-K2YWGXLP.cjs +1 -0
- package/dist/chunk-TEPMM5DH.js +1 -0
- package/dist/head.cjs +1 -1
- package/dist/head.global.js +1 -1
- package/dist/head.js +1 -1
- package/dist/keyboard-6ZGB2LAD.cjs +1 -0
- package/dist/keyboard-YJ7S6XPJ.js +1 -0
- package/dist/meta-U2EHV4AM.cjs +1 -0
- package/dist/meta-VSAZR4JL.js +1 -0
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.cts +29 -1
- package/dist/plugins.d.ts +29 -1
- package/dist/plugins.js +1 -1
- package/llms.txt +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,44 @@ 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.5]
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **`head`: `--const-scrollbar-overlay`** — the user's scrollbar preference,
|
|
15
|
+
derived from the scrollbar-width probe already taken in `<head>`: `1` when
|
|
16
|
+
scrollbars overlay content (reserve no layout space, appear on interaction),
|
|
17
|
+
`0` when they're classic/inline (always shown, take up width). Lets CSS reserve
|
|
18
|
+
a gutter only when it's actually needed —
|
|
19
|
+
`padding-inline-end: calc((1 - var(--const-scrollbar-overlay)) * 12px)`. (#8)
|
|
20
|
+
|
|
21
|
+
## [0.7.4]
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- **`keyboard` plugin** (global) — exposes the soft (on-screen) keyboard's
|
|
25
|
+
geometry on `:root`: `--live-keyboard-open` (`1`/`0`), `--live-keyboard-height`,
|
|
26
|
+
`--live-keyboard-width`, and `--live-keyboard-x` / `-y` / `-right` / `-bottom`
|
|
27
|
+
(px, client coordinates), so layout can reflow around the keyboard with pure
|
|
28
|
+
CSS — `padding-block-end: calc(var(--live-keyboard-height) * 1px)`. Reads exact
|
|
29
|
+
geometry from the VirtualKeyboard API on Chromium/Android (it sets
|
|
30
|
+
`navigator.virtualKeyboard.overlaysContent = true` while bound — so the
|
|
31
|
+
keyboard overlays content instead of resizing the viewport — and restores it on
|
|
32
|
+
dispose), and falls back to inferring the height from `visualViewport` shrink on
|
|
33
|
+
iOS/Safari (approximate: a pinch-zoom can read as a keyboard). Seeds zeros where
|
|
34
|
+
neither API is available. (#6)
|
|
35
|
+
- **`meta` plugin** (global) — writes every `<meta name|property + content>` on
|
|
36
|
+
the page as a write-once `--const-meta-<slug>` (the slug lowercases the name and
|
|
37
|
+
collapses runs of non-alphanumerics to a single dash): `--const-meta-theme-color`,
|
|
38
|
+
`--const-meta-og-image`, `--const-meta-color-scheme`, etc. — so CSS can read page
|
|
39
|
+
metadata directly (`background: var(--const-meta-theme-color)`,
|
|
40
|
+
`background-image: url(var(--const-meta-og-image))`). First match wins per name,
|
|
41
|
+
and a `media`-conditional meta is skipped when its query doesn't currently match,
|
|
42
|
+
so the active `theme-color` variant is the one written. Read once at bind on the
|
|
43
|
+
`const` cadence, so meta tags swapped in by a framework *after* bind aren't
|
|
44
|
+
tracked. (#7)
|
|
45
|
+
|
|
46
|
+
Both are tree-shakeable opt-in plugins — import from `prop-for-that/plugins`, or
|
|
47
|
+
let `auto` load them on demand via `data-props-for`.
|
|
48
|
+
|
|
11
49
|
## [0.7.3]
|
|
12
50
|
|
|
13
51
|
### Changed
|
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, FPS, clock, scroll velocity, device orientation / motion, geolocation, CPU pressure, 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, 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.
|
|
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, 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) 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),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),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
|
|
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());
|
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),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),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
|
|
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());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var y=1,u={key:"keyboard",scope:"global",start(n){let s=(e,t,r,d,v)=>{n.write("keyboard-open",v?1:0),n.write("keyboard-x",chunk65MXZJBD_cjs.a(e)),n.write("keyboard-y",chunk65MXZJBD_cjs.a(t)),n.write("keyboard-width",chunk65MXZJBD_cjs.a(r)),n.write("keyboard-height",chunk65MXZJBD_cjs.a(d)),n.write("keyboard-right",chunk65MXZJBD_cjs.a(e+r)),n.write("keyboard-bottom",chunk65MXZJBD_cjs.a(t+d));},i=navigator.virtualKeyboard;if(i){let e=i.overlaysContent;i.overlaysContent=true;let t=()=>{let r=i.boundingRect;s(r.x,r.y,r.width,r.height,r.width>0&&r.height>0);};return t(),i.addEventListener("geometrychange",t),()=>{i.removeEventListener("geometrychange",t),i.overlaysContent=e;}}let o=typeof window<"u"?window.visualViewport:null;if(o){let e=()=>{let t=window.innerHeight-o.height-o.offsetTop;t>y?s(0,window.innerHeight-t,o.width,t,true):s(0,0,0,0,false);};return e(),o.addEventListener("resize",e,{passive:true}),o.addEventListener("scroll",e,{passive:true}),()=>{o.removeEventListener("resize",e),o.removeEventListener("scroll",e);}}return s(0,0,0,0,false),()=>{}}};exports.a=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-T4N6AEOZ.js';var y=1,u={key:"keyboard",scope:"global",start(n){let s=(e,t,r,d,v)=>{n.write("keyboard-open",v?1:0),n.write("keyboard-x",a(e)),n.write("keyboard-y",a(t)),n.write("keyboard-width",a(r)),n.write("keyboard-height",a(d)),n.write("keyboard-right",a(e+r)),n.write("keyboard-bottom",a(t+d));},i=navigator.virtualKeyboard;if(i){let e=i.overlaysContent;i.overlaysContent=true;let t=()=>{let r=i.boundingRect;s(r.x,r.y,r.width,r.height,r.width>0&&r.height>0);};return t(),i.addEventListener("geometrychange",t),()=>{i.removeEventListener("geometrychange",t),i.overlaysContent=e;}}let o=typeof window<"u"?window.visualViewport:null;if(o){let e=()=>{let t=window.innerHeight-o.height-o.offsetTop;t>y?s(0,window.innerHeight-t,o.width,t,true):s(0,0,0,0,false);};return e(),o.addEventListener("resize",e,{passive:true}),o.addEventListener("scroll",e,{passive:true}),()=>{o.removeEventListener("resize",e),o.removeEventListener("scroll",e);}}return s(0,0,0,0,false),()=>{}}};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var s=n=>n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),m={key:"meta",scope:"global",start(n){if(typeof document>"u")return ()=>{};let o=new Set,i=document.querySelectorAll("meta[name], meta[property]");for(let t of i){let r=t.getAttribute("name")??t.getAttribute("property"),c=t.getAttribute("content");if(!r||!c)continue;let a=t.getAttribute("media");if(a&&typeof matchMedia=="function"&&!matchMedia(a).matches)continue;let e=s(r);!e||o.has(e)||(o.add(e),n.write("meta-"+e,c,"const"));}return ()=>{}}};exports.a=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=n=>n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),m={key:"meta",scope:"global",start(n){if(typeof document>"u")return ()=>{};let o=new Set,i=document.querySelectorAll("meta[name], meta[property]");for(let t of i){let r=t.getAttribute("name")??t.getAttribute("property"),c=t.getAttribute("content");if(!r||!c)continue;let a=t.getAttribute("media");if(a&&typeof matchMedia=="function"&&!matchMedia(a).matches)continue;let e=s(r);!e||o.has(e)||(o.add(e),n.write("meta-"+e,c,"const"));}return ()=>{}}};export{m as a};
|
package/dist/head.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs');function
|
|
1
|
+
'use strict';var chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs');function c(){let i=chunk7L35N3N3_cjs.a.root,o=(n,s)=>i.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",(document.body??i).appendChild(t);let r=t.offsetWidth-t.clientWidth;o("scrollbar-w",r),o("scrollbar-overlay",r===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();
|
package/dist/head.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){'use strict';var o={constPrefix:"--const-",root:typeof document<"u"?document.documentElement:void 0};function
|
|
1
|
+
(function(){'use strict';var o={constPrefix:"--const-",root:typeof document<"u"?document.documentElement:void 0};function c(){let i=o.root,t=(r,s)=>i.style.setProperty(o.constPrefix+r,String(s)),e=document.createElement("div");e.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden",(document.body??i).appendChild(e);let n=e.offsetWidth-e.clientWidth;t("scrollbar-w",n),t("scrollbar-overlay",n===0?1:0),e.style.scrollbarWidth="thin",t("scrollbar-thin-w",e.offsetWidth-e.clientWidth),e.remove(),t("dpr",window.devicePixelRatio||1),t("cores",navigator.hardwareConcurrency||0),t("mem",navigator.deviceMemory||0);}typeof document<"u"&&c();})();
|
package/dist/head.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-LWKH66VY.js';function
|
|
1
|
+
import {a}from'./chunk-LWKH66VY.js';function c(){let i=a.root,o=(n,s)=>i.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",(document.body??i).appendChild(t);let r=t.offsetWidth-t.clientWidth;o("scrollbar-w",r),o("scrollbar-overlay",r===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();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkIPYBSM34_cjs=require('./chunk-IPYBSM34.cjs');require('./chunk-65MXZJBD.cjs');Object.defineProperty(exports,"keyboard",{enumerable:true,get:function(){return chunkIPYBSM34_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as keyboard}from'./chunk-IVUTABRM.js';import'./chunk-T4N6AEOZ.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkK2YWGXLP_cjs=require('./chunk-K2YWGXLP.cjs');Object.defineProperty(exports,"meta",{enumerable:true,get:function(){return chunkK2YWGXLP_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as meta}from'./chunk-TEPMM5DH.js';
|
package/dist/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var 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'),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
|
|
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;
|
package/dist/plugins.d.cts
CHANGED
|
@@ -56,6 +56,32 @@ declare const pageVisible: Source;
|
|
|
56
56
|
*/
|
|
57
57
|
declare const navType: Source;
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Every `<meta>` value on the page that JavaScript can read but CSS can't,
|
|
61
|
+
* exposed as write-once `--const-meta-*` properties on `:root`. Each meta with a
|
|
62
|
+
* `name` (or `property`, for Open Graph / Twitter) plus `content` becomes
|
|
63
|
+
* `--const-meta-<slug>`, where the slug lowercases the name and turns any run of
|
|
64
|
+
* non-alphanumerics into a single dash:
|
|
65
|
+
*
|
|
66
|
+
* <meta name="theme-color" content="#3367d6"> → --const-meta-theme-color
|
|
67
|
+
* <meta property="og:image" content="/cover.jpg"> → --const-meta-og-image
|
|
68
|
+
* <meta name="color-scheme" content="dark light"> → --const-meta-color-scheme
|
|
69
|
+
*
|
|
70
|
+
* so CSS can read page metadata directly:
|
|
71
|
+
*
|
|
72
|
+
* .bar { background: var(--const-meta-theme-color); }
|
|
73
|
+
* .hero { background-image: url(var(--const-meta-og-image)); }
|
|
74
|
+
* @container style(--const-meta-color-scheme: dark) { … }
|
|
75
|
+
*
|
|
76
|
+
* **First match wins** for a repeated name, and a meta with a `media` attribute
|
|
77
|
+
* is skipped when that query doesn't currently match — so the *active*
|
|
78
|
+
* `theme-color` variant (light vs dark) is the one written. Values are read once
|
|
79
|
+
* at bind on the `const` cadence (these don't change), so meta tags a framework
|
|
80
|
+
* swaps in *after* bind aren't tracked; for a value needed before first paint,
|
|
81
|
+
* read it in a `<head>` script instead. Global source — bind once.
|
|
82
|
+
*/
|
|
83
|
+
declare const meta: Source;
|
|
84
|
+
|
|
59
85
|
/**
|
|
60
86
|
* `--live-net-downlink`, `--live-net-rtt`, `--live-net-save-data` (0/1),
|
|
61
87
|
* `--live-net-type` (slow-2g=1, 2g=2, 3g=3, 4g=4, else 0).
|
|
@@ -79,6 +105,8 @@ declare const fps: Source;
|
|
|
79
105
|
*/
|
|
80
106
|
declare const visualViewport: Source;
|
|
81
107
|
|
|
108
|
+
declare const keyboard: Source;
|
|
109
|
+
|
|
82
110
|
/**
|
|
83
111
|
* `--live-pointer-x/y` (px) and `--live-pointer-x/y-ratio` (0–1 across viewport),
|
|
84
112
|
* written to `:root`.
|
|
@@ -331,4 +359,4 @@ declare const allPlugins: Source[];
|
|
|
331
359
|
*/
|
|
332
360
|
declare function registerPlugins(...sources: Source[]): void;
|
|
333
361
|
|
|
334
|
-
export { allPlugins, battery, clock, colorInput, cpuPressure, field, fieldState, formState, fps, geo, img, imgColor, media, motion, navType, network, online, orientation, pageFocused, pageVisible, pointer, pointerLocal, registerPlugins, scrollVelocity, select, videoColor, visualViewport };
|
|
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 };
|
package/dist/plugins.d.ts
CHANGED
|
@@ -56,6 +56,32 @@ declare const pageVisible: Source;
|
|
|
56
56
|
*/
|
|
57
57
|
declare const navType: Source;
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Every `<meta>` value on the page that JavaScript can read but CSS can't,
|
|
61
|
+
* exposed as write-once `--const-meta-*` properties on `:root`. Each meta with a
|
|
62
|
+
* `name` (or `property`, for Open Graph / Twitter) plus `content` becomes
|
|
63
|
+
* `--const-meta-<slug>`, where the slug lowercases the name and turns any run of
|
|
64
|
+
* non-alphanumerics into a single dash:
|
|
65
|
+
*
|
|
66
|
+
* <meta name="theme-color" content="#3367d6"> → --const-meta-theme-color
|
|
67
|
+
* <meta property="og:image" content="/cover.jpg"> → --const-meta-og-image
|
|
68
|
+
* <meta name="color-scheme" content="dark light"> → --const-meta-color-scheme
|
|
69
|
+
*
|
|
70
|
+
* so CSS can read page metadata directly:
|
|
71
|
+
*
|
|
72
|
+
* .bar { background: var(--const-meta-theme-color); }
|
|
73
|
+
* .hero { background-image: url(var(--const-meta-og-image)); }
|
|
74
|
+
* @container style(--const-meta-color-scheme: dark) { … }
|
|
75
|
+
*
|
|
76
|
+
* **First match wins** for a repeated name, and a meta with a `media` attribute
|
|
77
|
+
* is skipped when that query doesn't currently match — so the *active*
|
|
78
|
+
* `theme-color` variant (light vs dark) is the one written. Values are read once
|
|
79
|
+
* at bind on the `const` cadence (these don't change), so meta tags a framework
|
|
80
|
+
* swaps in *after* bind aren't tracked; for a value needed before first paint,
|
|
81
|
+
* read it in a `<head>` script instead. Global source — bind once.
|
|
82
|
+
*/
|
|
83
|
+
declare const meta: Source;
|
|
84
|
+
|
|
59
85
|
/**
|
|
60
86
|
* `--live-net-downlink`, `--live-net-rtt`, `--live-net-save-data` (0/1),
|
|
61
87
|
* `--live-net-type` (slow-2g=1, 2g=2, 3g=3, 4g=4, else 0).
|
|
@@ -79,6 +105,8 @@ declare const fps: Source;
|
|
|
79
105
|
*/
|
|
80
106
|
declare const visualViewport: Source;
|
|
81
107
|
|
|
108
|
+
declare const keyboard: Source;
|
|
109
|
+
|
|
82
110
|
/**
|
|
83
111
|
* `--live-pointer-x/y` (px) and `--live-pointer-x/y-ratio` (0–1 across viewport),
|
|
84
112
|
* written to `:root`.
|
|
@@ -331,4 +359,4 @@ declare const allPlugins: Source[];
|
|
|
331
359
|
*/
|
|
332
360
|
declare function registerPlugins(...sources: Source[]): void;
|
|
333
361
|
|
|
334
|
-
export { allPlugins, battery, clock, colorInput, cpuPressure, field, fieldState, formState, fps, geo, img, imgColor, media, motion, navType, network, online, orientation, pageFocused, pageVisible, pointer, pointerLocal, registerPlugins, scrollVelocity, select, videoColor, visualViewport };
|
|
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 };
|
package/dist/plugins.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$j}from'./chunk-FOHEZJHF.js';export{a as geo}from'./chunk-FOHEZJHF.js';import {a as a$
|
|
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};
|
package/llms.txt
CHANGED
|
@@ -102,6 +102,7 @@ prefix; constants use `--const-`. Values are unitless numbers unless noted.
|
|
|
102
102
|
| --- | --- |
|
|
103
103
|
| `--const-scrollbar-w` | scrollbar width in px |
|
|
104
104
|
| `--const-scrollbar-thin-w` | scrollbar width in px with `scrollbar-width: thin` (= `--const-scrollbar-w` where unsupported) |
|
|
105
|
+
| `--const-scrollbar-overlay` | user's scrollbar preference: `1` = overlay (floats over content, appears on interaction, `--const-scrollbar-w` is `0`), `0` = classic/inline (always shown, reserves width) |
|
|
105
106
|
| `--const-dpr` | `devicePixelRatio` |
|
|
106
107
|
| `--const-cores` | `navigator.hardwareConcurrency` |
|
|
107
108
|
| `--const-mem` | `navigator.deviceMemory` in GiB (Chromium-only, coarse; `0` elsewhere) |
|
|
@@ -118,11 +119,13 @@ Import name is camelCase; the key for `propsFor`/`data-props-for` is the dashed
|
|
|
118
119
|
| `pageFocused` | `page-focused` | global | `--live-page-focused` (1/0 — tab frontmost and window focused; `0` when switched away) |
|
|
119
120
|
| `pageVisible` | `page-visible` | global | `--live-page-visible` (1/0 — tab foreground vs hidden/backgrounded; `document.visibilityState`. A visible tab can still be unfocused) |
|
|
120
121
|
| `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
|
+
| `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) |
|
|
121
123
|
| `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) |
|
|
122
124
|
| `battery` | `battery` | global | `--live-battery-level` (0–1), `--live-battery-charging` (1/0) |
|
|
123
125
|
| `clock` | `clock` | global | `--live-now` (epoch seconds), `--live-hours`, `--live-minutes`, `--live-seconds` |
|
|
124
126
|
| `fps` | `fps` | global | `--live-fps` |
|
|
125
127
|
| `visualViewport` | `visual-viewport` | global | `--live-vvp-scale`, `--live-vvp-offset-top`, `--live-vvp-height` |
|
|
128
|
+
| `keyboard` | `keyboard` | global | soft-keyboard geometry: `--live-keyboard-open` (1/0), `--live-keyboard-height`, `--live-keyboard-width`, `--live-keyboard-x`/`-y`/`-right`/`-bottom` (px, client coords). Uses the VirtualKeyboard API (sets `navigator.virtualKeyboard.overlaysContent = true` while bound, reverts on dispose) on Chromium/Android; falls back to inferring height from `visualViewport` shrink on iOS (approximate — pinch-zoom can read as a keyboard). Seeds zeros where unsupported |
|
|
126
129
|
| `orientation` | `orientation` | global | `--live-orient-alpha`, `--live-orient-beta`, `--live-orient-gamma` (deg) |
|
|
127
130
|
| `motion` | `motion` | global | `--live-accel-x`, `--live-accel-y`, `--live-accel-z` (m/s²) |
|
|
128
131
|
| `geo` | `geo` | global | `--live-geo-lat`, `--live-geo-lng`, `--live-geo-accuracy` (m) |
|