@wyxos/vibe 5.5.5 → 5.7.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 +4 -2
- package/lib/components/useMediaLoading.d.ts +3 -1
- package/lib/components/useMediaReadiness.d.ts +19 -0
- package/lib/core/appendPage.d.ts +4 -0
- package/lib/core/backlogRestore.d.ts +2 -0
- package/lib/core/feedFooter.d.ts +1 -0
- package/lib/core/fillController.d.ts +1 -0
- package/lib/core/mediaAsset.d.ts +2 -1
- package/lib/core/mediaType.d.ts +2 -0
- package/lib/core/page.d.ts +1 -0
- package/lib/core/runtime.d.ts +2 -2
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +980 -790
- package/lib/types.d.ts +18 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,9 +41,11 @@ In responsive layout, Vibe observes the target and uses reels on phones while
|
|
|
41
41
|
keeping tablets and desktops in masonry. Use `masonry` or `reel` to force a
|
|
42
42
|
renderer instead.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Masonry loads `preview`. Reels on tablets and desktops load the canonical
|
|
45
45
|
`src`, including a reel forced with `layout: 'reel'` and a reel opened from a
|
|
46
|
-
masonry card.
|
|
46
|
+
masonry card. Phone reels load the optional `mobile` variant when supplied and
|
|
47
|
+
otherwise fall back to the canonical `src`; feed previews are never promoted to
|
|
48
|
+
reel playback sources.
|
|
47
49
|
|
|
48
50
|
`loadPage` receives `cursor: null` for the initial request. It returns normalized Vibe items, the next opaque cursor, and an optional total:
|
|
49
51
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type ShallowRef } from 'vue';
|
|
2
|
-
import type { VibeLayout } from '../types';
|
|
2
|
+
import type { VibeLayout, VibeMediaType } from '../types';
|
|
3
3
|
interface MediaLoadingOptions {
|
|
4
|
+
active: () => boolean | undefined;
|
|
4
5
|
fetchPriority: () => 'high' | 'low';
|
|
5
6
|
layout: () => VibeLayout;
|
|
6
7
|
mediaSource: () => string;
|
|
8
|
+
mediaType: () => VibeMediaType | undefined;
|
|
7
9
|
videoElement: ShallowRef<HTMLVideoElement | null>;
|
|
8
10
|
}
|
|
9
11
|
export declare function useMediaLoading(options: MediaLoadingOptions): {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { MediaPreviewState } from '../core/mediaPreview';
|
|
2
|
+
interface MediaReadinessOptions {
|
|
3
|
+
identity: () => string;
|
|
4
|
+
mediaIndex: () => number;
|
|
5
|
+
onError: (mediaIndex: number) => void;
|
|
6
|
+
onReady: (mediaIndex: number) => void;
|
|
7
|
+
previewState: () => MediaPreviewState;
|
|
8
|
+
}
|
|
9
|
+
export declare function useMediaReadiness(options: MediaReadinessOptions): {
|
|
10
|
+
effectivePreviewState: import("vue").ComputedRef<MediaPreviewState>;
|
|
11
|
+
failSourceAttempt: (event?: Event) => void;
|
|
12
|
+
imageElement: import("vue").ShallowRef<HTMLImageElement | null, HTMLImageElement | null>;
|
|
13
|
+
markSourceReady: (event?: Event) => void;
|
|
14
|
+
noteSourceActivity: (event: Event) => void;
|
|
15
|
+
retrySource: () => void;
|
|
16
|
+
sourceGeneration: import("vue").ShallowRef<number, number>;
|
|
17
|
+
videoElement: import("vue").ShallowRef<HTMLVideoElement | null, HTMLVideoElement | null>;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { VibeCursor, VibePage } from '../types';
|
|
2
|
+
import type { RemovalReconciliationController } from './removalReconciliationController';
|
|
3
|
+
import type { VibeRuntimeState } from './runtime';
|
|
4
|
+
export declare function appendPageToState(pageValue: VibePage, state: VibeRuntimeState, reconciliation: RemovalReconciliationController, setCursor: (cursor: VibeCursor) => void): void;
|
package/lib/core/feedFooter.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ interface FeedFooterActionTarget {
|
|
|
5
5
|
loadNext: () => Promise<void>;
|
|
6
6
|
reload: () => Promise<void>;
|
|
7
7
|
retryEnd: () => Promise<void>;
|
|
8
|
+
retryFill: () => Promise<void>;
|
|
8
9
|
}
|
|
9
10
|
export declare function createFeedFooterActions(target: FeedFooterActionTarget): VibeFeedFooterActions;
|
|
10
11
|
export {};
|
|
@@ -36,6 +36,7 @@ export declare class VibeFillController {
|
|
|
36
36
|
start(targetValue: VibeFillTarget, startOptions?: FillStartOptions): Promise<void>;
|
|
37
37
|
cancel(): Promise<void>;
|
|
38
38
|
resume(prepareFrontend: boolean): Promise<void>;
|
|
39
|
+
retry(prepareFrontend: boolean): Promise<void>;
|
|
39
40
|
reset(): void;
|
|
40
41
|
destroy(): void;
|
|
41
42
|
private abortLocalRequest;
|
package/lib/core/mediaAsset.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { VibeItem, VibeItemId, VibeMediaAsset } from '../types';
|
|
1
|
+
import type { VibeItem, VibeItemId, VibeMediaAsset, VibeMediaSource, VibeMediaVariant } from '../types';
|
|
2
|
+
export declare function mediaVariantForSource(asset: VibeMediaAsset, source: VibeMediaSource): VibeMediaVariant;
|
|
2
3
|
export declare function mediaAssets(item: VibeItem): readonly VibeMediaAsset[];
|
|
3
4
|
export declare function clampMediaIndex(item: VibeItem, index: number): number;
|
|
4
5
|
export declare function mediaAssetAt(item: VibeItem, index: number): VibeMediaAsset;
|
package/lib/core/mediaType.d.ts
CHANGED
package/lib/core/page.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export interface LoadedPageRecord {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function validatePage(page: VibePage): VibePage;
|
|
9
9
|
export declare function appendUniqueItems(current: readonly VibeItem[], incoming: readonly VibeItem[]): VibeItem[];
|
|
10
|
+
export declare function reconcilePageItems(current: readonly VibeItem[], incoming: readonly VibeItem[]): VibeItem[];
|
|
10
11
|
export declare function pageCurrentCursor(page: VibePage): VibeCursor;
|
package/lib/core/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComputedRef } from 'vue';
|
|
2
|
-
import type { VibeAutoScrollState, VibeAutofillState, VibeCursor, VibeFillState, VibeItem, VibeItemId, VibeLayout, VibeReelAutoAdvanceState, VibeReelForwardState, VibeReelInfoSheetState, VibeState } from '../types';
|
|
2
|
+
import type { VibeAutoScrollState, VibeAutofillState, VibeCursor, VibeFillState, VibeItem, VibeItemId, VibeLayout, VibeMediaSource, VibeReelAutoAdvanceState, VibeReelForwardState, VibeReelInfoSheetState, VibeState } from '../types';
|
|
3
3
|
export interface VibeRuntimeState {
|
|
4
4
|
activeReelPostId: VibeItemId | null;
|
|
5
5
|
autoScroll: VibeAutoScrollState;
|
|
@@ -23,7 +23,7 @@ export interface VibeRuntimeState {
|
|
|
23
23
|
reelForwardItem: VibeItem | null;
|
|
24
24
|
reelInfoSheet: VibeReelInfoSheetState;
|
|
25
25
|
reelInfoSheetOverlay: boolean;
|
|
26
|
-
reelMediaSource:
|
|
26
|
+
reelMediaSource: VibeMediaSource;
|
|
27
27
|
reelOrigin: 'masonry' | null;
|
|
28
28
|
total: number | null;
|
|
29
29
|
}
|