@wardic/core 1.0.0-rc.2 → 1.0.0-rc.4
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/dist/Probe.d.ts +6 -3
- package/dist/Probe.d.ts.map +1 -1
- package/dist/Probe.js +3 -2
- package/dist/Probe.js.map +1 -1
- package/package.json +1 -1
- package/src/Probe.ts +11 -7
package/dist/Probe.d.ts
CHANGED
|
@@ -81,8 +81,11 @@ export interface ScrollOptions {
|
|
|
81
81
|
export interface IntersectionOptions {
|
|
82
82
|
/** The container it's observed against: the viewport when left out. */
|
|
83
83
|
readonly root?: unknown;
|
|
84
|
-
/**
|
|
85
|
-
|
|
84
|
+
/**
|
|
85
|
+
* How far the container's edges are grown, or shrunk, before it counts, in the Environment's own
|
|
86
|
+
* syntax: core passes it on, as it does `ScrollOptions.offset`.
|
|
87
|
+
*/
|
|
88
|
+
readonly margin?: unknown;
|
|
86
89
|
/** How much of the target must be in it to count: from 0, any of it, to 1, all of it. */
|
|
87
90
|
readonly amount?: number | undefined;
|
|
88
91
|
}
|
|
@@ -104,7 +107,7 @@ declare const Probe_base: Context.ServiceClass<Probe, "@wardic/core/Probe", {
|
|
|
104
107
|
* Whether the Environment is shown, live, as Motion's `usePageInView`: `false` while it's hidden, put
|
|
105
108
|
* in the background, say.
|
|
106
109
|
*/
|
|
107
|
-
readonly
|
|
110
|
+
readonly visible: Atom.Atom<boolean>;
|
|
108
111
|
/**
|
|
109
112
|
* A container's scroll, live: an Atom the Environment sets as the container scrolls or resizes, as it
|
|
110
113
|
* happens, so a value derived from it is written in the frame that shows the scroll. One listener a
|
package/dist/Probe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Probe.d.ts","sourceRoot":"","sources":["../src/Probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"Probe.d.ts","sourceRoot":"","sources":["../src/Probe.ts"],"names":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,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;IAClG,2CAA2C;4BACnB,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;IAClE;;;;OAIG;kCAE2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC;;AA7BrH,8BAA8B;AAC9B,qBAAa,KAAM,SAAQ,UA6BD;CAAG"}
|
package/dist/Probe.js
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* const bounds = yield* probe.measure(card)
|
|
12
12
|
* const scroll = yield* probe.scroll({ container: list })
|
|
13
13
|
*/
|
|
14
|
-
// ADR-0028, decision 11.
|
|
15
|
-
//
|
|
14
|
+
// ADR-0028, decision 11. #610 (ADR-0036 *Amendment (#610)*): `visible`, not the web's `pageVisible`;
|
|
15
|
+
// `margin` is `unknown`, the Environment's syntax; `prefersReducedMotion` keeps its name, plain words in
|
|
16
|
+
// any Environment, where `reducedMotion` is the provider's setting.
|
|
16
17
|
import * as Context from "effect/Context";
|
|
17
18
|
/** An Environment's Probe. */
|
|
18
19
|
export class Probe extends Context.Service()("@wardic/core/Probe") {
|
package/dist/Probe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Probe.js","sourceRoot":"","sources":["../src/Probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,
|
|
1
|
+
{"version":3,"file":"Probe.js","sourceRoot":"","sources":["../src/Probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,qGAAqG;AACrG,yGAAyG;AACzG,oEAAoE;AACpE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AAiGzC,8BAA8B;AAC9B,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EA6BtC,CAAC,oBAAoB,CAAC;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wardic/core",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Wardic's animation engine on Effect: springs, tweens, keyframes, variants, the projection geometry, and the services an environment provides.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animation",
|
package/src/Probe.ts
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* const bounds = yield* probe.measure(card)
|
|
12
12
|
* const scroll = yield* probe.scroll({ container: list })
|
|
13
13
|
*/
|
|
14
|
-
// ADR-0028, decision 11.
|
|
15
|
-
//
|
|
14
|
+
// ADR-0028, decision 11. #610 (ADR-0036 *Amendment (#610)*): `visible`, not the web's `pageVisible`;
|
|
15
|
+
// `margin` is `unknown`, the Environment's syntax; `prefersReducedMotion` keeps its name, plain words in
|
|
16
|
+
// any Environment, where `reducedMotion` is the provider's setting.
|
|
16
17
|
import * as Context from "effect/Context"
|
|
17
18
|
import type * as Effect from "effect/Effect"
|
|
18
19
|
import type * as Scope from "effect/Scope"
|
|
@@ -91,9 +92,12 @@ export interface ScrollOptions {
|
|
|
91
92
|
export interface IntersectionOptions {
|
|
92
93
|
/** The container it's observed against: the viewport when left out. */
|
|
93
94
|
readonly root?: unknown
|
|
94
|
-
/**
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
/**
|
|
96
|
+
* How far the container's edges are grown, or shrunk, before it counts, in the Environment's own
|
|
97
|
+
* syntax: core passes it on, as it does `ScrollOptions.offset`.
|
|
98
|
+
*/
|
|
99
|
+
// #610: `unknown`, as `offset` is; `@wardic/dom` takes the web's string (`rootMargin`).
|
|
100
|
+
readonly margin?: unknown
|
|
97
101
|
/** How much of the target must be in it to count: from 0, any of it, to 1, all of it. */
|
|
98
102
|
readonly amount?: number | undefined
|
|
99
103
|
}
|
|
@@ -119,8 +123,8 @@ export class Probe extends Context.Service<Probe, {
|
|
|
119
123
|
* Whether the Environment is shown, live, as Motion's `usePageInView`: `false` while it's hidden, put
|
|
120
124
|
* in the background, say.
|
|
121
125
|
*/
|
|
122
|
-
// #443.
|
|
123
|
-
readonly
|
|
126
|
+
// #443; `pageVisible` until #610.
|
|
127
|
+
readonly visible: Atom.Atom<boolean>
|
|
124
128
|
/**
|
|
125
129
|
* A container's scroll, live: an Atom the Environment sets as the container scrolls or resizes, as it
|
|
126
130
|
* happens, so a value derived from it is written in the frame that shows the scroll. One listener a
|