@flemo/core 2.3.1 → 2.5.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/dist/core/engine/__tests__/createSwipeController.decoratorReplacement.test.d.ts +1 -0
- package/dist/core/engine/riderSwipe.d.ts +28 -2
- package/dist/dom/attributes.d.ts +1 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +1588 -1537
- package/dist/transition/__tests__/resolveSwipeOptions.test.d.ts +1 -0
- package/dist/transition/partTransition/createPartTransition.d.ts +2 -1
- package/dist/transition/resolveSwipeOptions.d.ts +76 -0
- package/dist/transition/swipeSettle.d.ts +32 -12
- package/dist/transition/typing.d.ts +158 -19
- package/dist/transition/variantMotion.d.ts +4 -0
- package/package.json +5 -5
- package/dist/core/engine/compositorWarmUp.d.ts +0 -3
- /package/dist/core/engine/__tests__/{compositorWarmUp.test.d.ts → createSwipeController.declaredSwipe.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,6 +2,18 @@ import { VariantMotion } from '../../transition/variantMotion';
|
|
|
2
2
|
export interface RiderSwipe {
|
|
3
3
|
/** Whether anything is actually being driven. */
|
|
4
4
|
readonly active: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Whether any element this staged has left the document.
|
|
7
|
+
*
|
|
8
|
+
* A gesture stages against the elements that exist when it begins, and a
|
|
9
|
+
* drag's own wake can REPLACE one of them a frame later — a covered screen's
|
|
10
|
+
* dim moves between its container and the layer host as that screen's
|
|
11
|
+
* `<Layer>` slots unmount and re-mount (see resolvePrevDecorator in
|
|
12
|
+
* createSwipeController). The animations stay on the node that left, so the
|
|
13
|
+
* one on screen never moves. Reported for the hook-driven dim; the same wake
|
|
14
|
+
* reaches a pose-only one, which is what this is for.
|
|
15
|
+
*/
|
|
16
|
+
readonly stale: boolean;
|
|
5
17
|
/** Move every rider to this fraction of its travel (0 → 1). */
|
|
6
18
|
scrub: (progress: number) => void;
|
|
7
19
|
/**
|
|
@@ -12,8 +24,14 @@ export interface RiderSwipe {
|
|
|
12
24
|
* pose — the contract the swipe already applies to the screen and the dim.
|
|
13
25
|
* Otherwise they run backwards and the compiled rest rule takes them over
|
|
14
26
|
* again.
|
|
27
|
+
*
|
|
28
|
+
* RESOLVES WHEN THE LANDING HAS LANDED. A caller that commits a navigation
|
|
29
|
+
* off the back of a release has to wait for it: the screens are staged
|
|
30
|
+
* animations now, so committing while they still play removes the screen
|
|
31
|
+
* mid-flight and it vanishes rather than leaving. Device-reported the first
|
|
32
|
+
* time the declarative path shipped without this.
|
|
15
33
|
*/
|
|
16
|
-
settle: (commit: boolean, seconds: number) => void
|
|
34
|
+
settle: (commit: boolean, seconds: number) => Promise<void>;
|
|
17
35
|
}
|
|
18
36
|
export interface RiderMotion {
|
|
19
37
|
readonly element: HTMLElement;
|
|
@@ -24,5 +42,13 @@ export interface RiderMotion {
|
|
|
24
42
|
* nothing to drive, so a gesture over chrome that declares no motion costs
|
|
25
43
|
* nothing.
|
|
26
44
|
*/
|
|
27
|
-
export declare const beginRiderSwipe: (riders: readonly RiderMotion[]
|
|
45
|
+
export declare const beginRiderSwipe: (riders: readonly RiderMotion[], options?: {
|
|
46
|
+
/**
|
|
47
|
+
* The writer staking the landed pose this hands back (see the note in
|
|
48
|
+
* `settle`). A caller whose own cleanup is owner-scoped — the swipe's
|
|
49
|
+
* riding bars are — has to be the one on the lease, or its clear will not
|
|
50
|
+
* release what was written here.
|
|
51
|
+
*/
|
|
52
|
+
writer?: symbol;
|
|
53
|
+
}) => RiderSwipe | null;
|
|
28
54
|
export default beginRiderSwipe;
|
package/dist/dom/attributes.d.ts
CHANGED
|
@@ -293,12 +293,6 @@ export declare const DESK_HEAD_ATTR = "data-flemo-desk-head";
|
|
|
293
293
|
* the old off-screen head rather than showing a ghost.
|
|
294
294
|
*/
|
|
295
295
|
export declare const PARK_HEAD_ATTR = "data-flemo-park-head";
|
|
296
|
-
/**
|
|
297
|
-
* The compositor warm-up element. Its VALUE says whether the warm-up is
|
|
298
|
-
* currently forcing frames (`"on"`) or resident but idle (`"idle"`) — the
|
|
299
|
-
* element outlives every hold, so its presence alone no longer answers that.
|
|
300
|
-
*/
|
|
301
|
-
export declare const WARM_ATTR = "data-flemo-warm";
|
|
302
296
|
/** The one-shot GPU pipeline prewarm element. */
|
|
303
297
|
export declare const GPU_PREWARM_ATTR = "data-flemo-gpu-prewarm";
|
|
304
298
|
/**
|
|
@@ -320,4 +314,4 @@ export declare const attrValueSelector: (attribute: string, value: string) => st
|
|
|
320
314
|
* a devtools build can assert against the shipped set instead of a hand-kept
|
|
321
315
|
* copy — the drift this module exists to end.
|
|
322
316
|
*/
|
|
323
|
-
export declare const FLEMO_ATTRIBUTES: readonly ["data-flemo-screen", "data-flemo-status", "data-flemo-active", "data-flemo-transition", "data-flemo-router", "data-flemo-skip-animation", "data-flemo-bar", "data-flemo-bar-active", "data-flemo-bar-status", "data-flemo-bar-riding", "data-flemo-bar-id", "data-flemo-bar-id-type", "data-flemo-bar-transition", "data-flemo-bar-spacer", "data-flemo-decorator", "data-flemo-decorator-name", "data-flemo-decorator-owner", "data-flemo-layer-host", "data-flemo-layer-owner", "data-flemo-layer-slot", "data-flemo-part-name", "data-flemo-part-layer", "data-flemo-part-home", "data-flemo-part-stand-in", "data-flemo-morph", "data-flemo-morph-camera", "data-flemo-morph-ghost", "data-flemo-morph-id", "data-flemo-morph-layer", "data-flemo-morph-name", "data-flemo-morph-slot", "data-flemo-morph-stand-in", "data-flemo-morph-sheet", "data-flemo-anim-hold", "data-flemo-held-arrival", "data-flemo-img-hold", "data-flemo-governed", "data-flemo-creep", "data-flemo-desk-head", "data-flemo-park-head", "data-flemo-
|
|
317
|
+
export declare const FLEMO_ATTRIBUTES: readonly ["data-flemo-screen", "data-flemo-status", "data-flemo-active", "data-flemo-transition", "data-flemo-router", "data-flemo-skip-animation", "data-flemo-bar", "data-flemo-bar-active", "data-flemo-bar-status", "data-flemo-bar-riding", "data-flemo-bar-id", "data-flemo-bar-id-type", "data-flemo-bar-transition", "data-flemo-bar-spacer", "data-flemo-decorator", "data-flemo-decorator-name", "data-flemo-decorator-owner", "data-flemo-layer-host", "data-flemo-layer-owner", "data-flemo-layer-slot", "data-flemo-part-name", "data-flemo-part-layer", "data-flemo-part-home", "data-flemo-part-stand-in", "data-flemo-morph", "data-flemo-morph-camera", "data-flemo-morph-ghost", "data-flemo-morph-id", "data-flemo-morph-layer", "data-flemo-morph-name", "data-flemo-morph-slot", "data-flemo-morph-stand-in", "data-flemo-morph-sheet", "data-flemo-anim-hold", "data-flemo-held-arrival", "data-flemo-img-hold", "data-flemo-governed", "data-flemo-creep", "data-flemo-desk-head", "data-flemo-park-head", "data-flemo-gpu-prewarm", "data-flemo-image-src", "data-flemo-devtools-panel"];
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export { default as createTransitionEngine } from './core/engine/createTransitio
|
|
|
51
51
|
export { governedCompiledActive } from './platform/governedCompiled';
|
|
52
52
|
export { startFlemoRuntime } from './runtime/flemoRuntime';
|
|
53
53
|
export { resolvePlatformProfile, type PlatformProfile, type PlatformProfileInput } from './platform/profile';
|
|
54
|
-
export { FLEMO_ATTR_PREFIX, FLEMO_ATTRIBUTES, attrSelector, attrValueSelector, ANIM_HOLD, ANIM_HOLD_ATTR, ANIM_HOLD_PAUSED_VALUES, ACTIVE_ATTR, BAR_ACTIVE_ATTR, BAR_ATTR, BAR_ID_ATTR, BAR_ID_TYPE_ATTR, BAR_RIDING_ATTR, BAR_SPACER_ATTR, BAR_STATUS_ATTR, BAR_TRANSITION_ATTR, CREEP_ATTR, DECORATOR_ATTR, DECORATOR_NAME_ATTR, DESK_HEAD_ATTR, DEVTOOLS_PANEL_ATTR, GOVERNED_ATTR, GPU_PREWARM_ATTR, HELD_ARRIVAL_ATTR, IMAGE_HOLD_ATTR, LAYER_HOST_ATTR, LAYER_OWNER_ATTR, LAYER_SLOT_ATTR, MORPH_ATTR, MORPH_CAMERA_ATTR, MORPH_GHOST_ATTR, MORPH_ID_ATTR, MORPH_LAYER_ATTR, MORPH_NAME_ATTR, MORPH_ROLE, MORPH_SLOT_ATTR, MORPH_SHEET_ATTR, MORPH_STAND_IN_ATTR, PARK_HEAD_ATTR, PART_HOME_ATTR, PART_LAYER_ATTR, PART_NAME_ATTR, ROUTER_ATTR, SCREEN_ATTR, STATUS_ATTR, TRANSITION_ATTR
|
|
54
|
+
export { FLEMO_ATTR_PREFIX, FLEMO_ATTRIBUTES, attrSelector, attrValueSelector, ANIM_HOLD, ANIM_HOLD_ATTR, ANIM_HOLD_PAUSED_VALUES, ACTIVE_ATTR, BAR_ACTIVE_ATTR, BAR_ATTR, BAR_ID_ATTR, BAR_ID_TYPE_ATTR, BAR_RIDING_ATTR, BAR_SPACER_ATTR, BAR_STATUS_ATTR, BAR_TRANSITION_ATTR, CREEP_ATTR, DECORATOR_ATTR, DECORATOR_NAME_ATTR, DESK_HEAD_ATTR, DEVTOOLS_PANEL_ATTR, GOVERNED_ATTR, GPU_PREWARM_ATTR, HELD_ARRIVAL_ATTR, IMAGE_HOLD_ATTR, LAYER_HOST_ATTR, LAYER_OWNER_ATTR, LAYER_SLOT_ATTR, MORPH_ATTR, MORPH_CAMERA_ATTR, MORPH_GHOST_ATTR, MORPH_ID_ATTR, MORPH_LAYER_ATTR, MORPH_NAME_ATTR, MORPH_ROLE, MORPH_SLOT_ATTR, MORPH_SHEET_ATTR, MORPH_STAND_IN_ATTR, PARK_HEAD_ATTR, PART_HOME_ATTR, PART_LAYER_ATTR, PART_NAME_ATTR, ROUTER_ATTR, SCREEN_ATTR, STATUS_ATTR, TRANSITION_ATTR } from './dom/attributes';
|
|
55
55
|
export { OVERLAY_LEVEL, SCREEN_STACKING_ORDER, UNNUMBERED_LEVEL } from './dom/stacking';
|
|
56
56
|
export { TRANSITIONAL_STATUS_VALUES } from './navigate/store';
|
|
57
57
|
export { SKIP_ANIMATION_ATTR, type TransitionEngine, type TransitionEngineDeps, type ScreenLifecycleInput } from './core/engine/types';
|
|
@@ -61,12 +61,13 @@ export { default as computeBarRiding, sharedBarsMatch, type BarRidingInput } fro
|
|
|
61
61
|
export { animHoldKey, scheduleAnimHoldRelease, createAnimHoldCoordinator, eagerlyDecodeImages, ANIM_HOLD_RELEASE_BACKSTOP_MS, type AnimHoldInput, type AnimHoldCoordinator } from './screen/animStartAnchor';
|
|
62
62
|
export { detectBlinkEngine, isDesktopBlink, isLegacyAndroidBlink } from './platform/engineProbes';
|
|
63
63
|
export { steadySixtyDesktopProfile } from './platform/steadySixtyCadence';
|
|
64
|
+
export { resolveSwipeOptions, DEFAULT_COMMIT_FRACTION, DEFAULT_COMMIT_VELOCITY, type ResolvedSwipe } from './transition/resolveSwipeOptions';
|
|
65
|
+
export type { SwipeOptions, SwipeStop } from './transition/typing';
|
|
64
66
|
export { swipeSettleSeconds, MIN_SETTLE_SECONDS, type SwipeSettleInput } from './transition/swipeSettle';
|
|
65
67
|
export { default as observeBarHeight } from './screen/observeBarHeight';
|
|
66
68
|
export { default as publishRideBox } from './screen/publishRideBox';
|
|
67
69
|
export { percentRatio, resolveRideTarget, rideLength, RIDE_HEIGHT_VAR } from './transition/rideOffset';
|
|
68
70
|
export { default as observeViewportScrollHeight } from './screen/observeViewportScrollHeight';
|
|
69
|
-
export { default as holdCompositorWarm } from './core/engine/compositorWarmUp';
|
|
70
71
|
export { default as ensureGpuPipelinePrewarm } from './core/engine/gpuPipelinePrewarm';
|
|
71
72
|
export { default as ensureImageDecodeOffloader, createImageDecodeOffloader, shouldOffloadImage, OVERSIZE_AREA_RATIO, OFFLOADED_SRC_ATTR, type OversizeInput } from './core/engine/imageDecodeOffloader';
|
|
72
73
|
export type { RegisterTransition, TransitionName, TransitionVariant, TransitionVariantValue, TransitionOptions, BaseTransition, Transition, SwipeInfo, SwipeAnimate } from './transition/typing';
|