@solidrt/components 0.0.64 → 0.0.66
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 +1 -1
- package/docs/window.md +1 -1
- package/package.json +3 -3
- package/src/scroll-view.tsx +8 -7
package/README.md
CHANGED
|
@@ -195,7 +195,7 @@ function App() {
|
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
The window takes the theme's finish (see Theming) whenever the theme has one; a theme without a finish declares no shader at all. `shader` is the window's own finish, a core window shader declaration forwarded as-is; set, it replaces the theme's, and `shader={null}` opts out of it. A window shader runs past the point snapshots read, so a finish is checked with `
|
|
198
|
+
The window takes the theme's finish (see Theming) whenever the theme has one; a theme without a finish declares no shader at all. `shader` is the window's own finish, a core window shader declaration forwarded as-is; set, it replaces the theme's, and `shader={null}` opts out of it. A window shader runs past the point snapshots read, so a finish is checked with `sol render`, not `get_snapshot`.
|
|
199
199
|
|
|
200
200
|
API: `Window`, `WindowProps` - typed and commented in [src/window.tsx](./src/window.tsx).
|
|
201
201
|
|
package/docs/window.md
CHANGED
|
@@ -14,4 +14,4 @@ function App() {
|
|
|
14
14
|
}
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
The window takes the theme's finish (see Theming) whenever the theme has one; a theme without a finish declares no shader at all. `shader` is the window's own finish, a core window shader declaration forwarded as-is; set, it replaces the theme's, and `shader={null}` opts out of it. A window shader runs past the point snapshots read, so a finish is checked with `
|
|
17
|
+
The window takes the theme's finish (see Theming) whenever the theme has one; a theme without a finish declares no shader at all. `shader` is the window's own finish, a core window shader declaration forwarded as-is; set, it replaces the theme's, and `shader={null}` opts out of it. A window shader runs past the point snapshots read, so a finish is checked with `sol render`, not `get_snapshot`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidrt/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.66",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"funding": "https://github.com/sponsors/wellawaretech",
|
|
6
6
|
"author": "Antoine van Wel",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"qrcode-generator": "^2.0.4"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@solidjs/signals": "2.0.0-rc.
|
|
24
|
-
"@solidrt/core": "0.0.
|
|
23
|
+
"@solidjs/signals": "2.0.0-rc.13",
|
|
24
|
+
"@solidrt/core": "0.0.66"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/src/scroll-view.tsx
CHANGED
|
@@ -47,13 +47,14 @@ const SCROLL_SPRING = { duration: 250 }
|
|
|
47
47
|
// normal deceleration rate of 0.998 per ms). A fling travels its release
|
|
48
48
|
// speed over this.
|
|
49
49
|
const MOMENTUM_DECAY = 2
|
|
50
|
-
// The curve a fling glides on:
|
|
51
|
-
//
|
|
52
|
-
const MOMENTUM_CURVE
|
|
53
|
-
// The tween's length, ms:
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
|
|
50
|
+
// The curve a fling glides on: the cubic-bezier closest to an exponential
|
|
51
|
+
// decay (within 0.4% of the distance) when timed as below.
|
|
52
|
+
const MOMENTUM_CURVE = [0.15, 1, 0.36, 1] satisfies TransitionCurve
|
|
53
|
+
// The tween's length, ms: the curve leaves at slope y1/x1, so over this
|
|
54
|
+
// length the glide leaves at exactly the release speed and decays at
|
|
55
|
+
// MOMENTUM_DECAY. Constant on purpose: a faster fling travels farther, not
|
|
56
|
+
// longer, as a decay does; the tail is sub-pixel.
|
|
57
|
+
const MOMENTUM_MS = Math.round((MOMENTUM_CURVE[1] / MOMENTUM_CURVE[0] / MOMENTUM_DECAY) * 1000)
|
|
57
58
|
// A read-back offset this close to the written one means nothing is in
|
|
58
59
|
// flight: no instant write.
|
|
59
60
|
const LIVE_EPSILON = 0.5
|