@wyxos/vibe 5.8.0 → 5.8.1
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 +5 -0
- package/lib/components/useFeedReplacementPreload.d.ts +11 -0
- package/lib/components/useMediaLoading.d.ts +1 -1
- package/lib/core/feedReplacementPreload.d.ts +3 -0
- package/lib/core/mediaCardOptions.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +711 -681
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,6 +99,7 @@ const vibe = createVibe({
|
|
|
99
99
|
height: 48,
|
|
100
100
|
},
|
|
101
101
|
mediaCard: {
|
|
102
|
+
feedPreload: 'replacement',
|
|
102
103
|
videoMuted: true,
|
|
103
104
|
},
|
|
104
105
|
})
|
|
@@ -121,6 +122,10 @@ active again. Set `mediaCard.videoMuted` to explicitly override the initial
|
|
|
121
122
|
state in either layout. Users can still change mute and volume through the
|
|
122
123
|
timed-media controls.
|
|
123
124
|
|
|
125
|
+
Set `mediaCard.feedPreload` to `replacement` to warm the exact preview source
|
|
126
|
+
that a grouped masonry card will show after its current media item is removed.
|
|
127
|
+
The default is `none`, so consumers opt in to the additional request.
|
|
128
|
+
|
|
124
129
|
Applications that need audio continuity can pass `initialReelAudioState` with
|
|
125
130
|
`volume`, `muted`, and `lastAudibleVolume`, then persist user changes through
|
|
126
131
|
`onReelAudioStateChange`. Every reel card in that Vibe instance shares the
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { VibeItem, VibeLayout, VibeMediaCardOptions, VibeMediaSource } from '../types';
|
|
2
|
+
interface FeedReplacementPreloadOptions {
|
|
3
|
+
item: () => VibeItem;
|
|
4
|
+
layout: () => VibeLayout;
|
|
5
|
+
mediaCard: () => VibeMediaCardOptions | undefined;
|
|
6
|
+
mediaIndex: () => number;
|
|
7
|
+
mediaReady: () => boolean;
|
|
8
|
+
mediaSource: () => VibeMediaSource;
|
|
9
|
+
}
|
|
10
|
+
export declare function useFeedReplacementPreload(options: FeedReplacementPreloadOptions): void;
|
|
11
|
+
export {};
|
|
@@ -11,6 +11,6 @@ interface MediaLoadingOptions {
|
|
|
11
11
|
export declare function useMediaLoading(options: MediaLoadingOptions): {
|
|
12
12
|
imageLoading: import("vue").ComputedRef<"lazy" | "eager">;
|
|
13
13
|
mediaIsTimed: import("vue").ComputedRef<boolean>;
|
|
14
|
-
videoPreload: import("vue").ComputedRef<"
|
|
14
|
+
videoPreload: import("vue").ComputedRef<"none" | "metadata" | "auto">;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { VibeItem, VibeMediaSource, VibeMediaVariant } from '../types';
|
|
2
|
+
export declare function replacementFeedVariant(item: VibeItem, mediaIndex: number, mediaSource: VibeMediaSource): VibeMediaVariant | null;
|
|
3
|
+
export declare function preloadFeedVariant(variant: VibeMediaVariant): () => void;
|