leesto-connect 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,7 +27,7 @@ sessions** of your pages.
27
27
  release needs a new tag. unpkg resolves the range by redirecting to the exact
28
28
  version, so the entry and its lazy chunks always come from the same build
29
29
  (avoid CDNs that serve ranges without redirecting). To freeze a build instead,
30
- pin it exactly: `https://unpkg.com/leesto-connect@0.5.0/dist/leesto-connect.js`.
30
+ pin it exactly: `https://unpkg.com/leesto-connect@0.6.0/dist/leesto-connect.js`.
31
31
 
32
32
  Options via data attributes:
33
33
 
@@ -75,6 +75,28 @@ markers always apply and no setting can lift them:
75
75
  Console and network diagnostics are redacted separately (emails, card numbers,
76
76
  tokens in URLs).
77
77
 
78
+ ## Ambient color
79
+
80
+ From 0.6.0 the connector also reports the page's background colors to the Leesto Lab, so
81
+ the Lab can paint its own backdrop in the opposite brightness and your app's dominant hue.
82
+ It reads only computed CSS background colors and gradients, on a grid of 16 × 10 points:
83
+ no text, no field values, no images, no URLs. Each message carries two numbers (average
84
+ lightness and a hue in degrees). It starts when the connector connects in an embedded page
85
+ (the Lab strips the referrer, so its origin may be unknown at first); messages only go to
86
+ the pinned origin or the allowlisted shell origins, so an app framed by any other site
87
+ delivers nothing. It measures at most 4 times
88
+ per second, never while the tab is hidden, and stops when the connector disconnects.
89
+
90
+ ## Scrollbars
91
+
92
+ Inside the Leesto Lab only, the connector makes your app's scrollbars thin and drops their
93
+ track, so they don't draw a wide strip along the Lab frame. It adds one `<style
94
+ data-leesto-scrollbars>` at the start of `<head>` and removes it when the connector
95
+ disconnects. Your own scrollbar styles always win: the sheet comes first in the document,
96
+ uses no stronger selectors than yours, and Chrome ignores it as soon as you set
97
+ `scrollbar-width` or `scrollbar-color`. Nothing changes with overlay scrollbars (trackpads,
98
+ mobile), nor when your page is framed by any other site.
99
+
78
100
  ## Security model
79
101
 
80
102
  The connector is keyless, so it does **not** authenticate the shell — it