@wyxos/vibe 5.14.0 → 5.15.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/lib/components/MasonryFeed.vue.d.ts +3 -0
- package/lib/components/MediaCard.vue.d.ts +3 -0
- package/lib/components/ReelFeed.vue.d.ts +3 -0
- package/lib/components/ReelLayout.vue.d.ts +3 -0
- package/lib/components/VibeSurface.vue.d.ts +3 -1
- package/lib/components/useMediaLifecycle.d.ts +4 -1
- package/lib/components/useMediaReadiness.d.ts +2 -2
- package/lib/core/mediaFailure.d.ts +6 -0
- package/lib/index.cjs +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +388 -346
- package/lib/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaFailure } from '../core/mediaFailure';
|
|
1
2
|
import type { MasonryFeedProps } from '../core/feed';
|
|
2
3
|
import type { VibeItemId } from '../types';
|
|
3
4
|
declare function loadIfNearBottom(): void;
|
|
@@ -11,6 +12,7 @@ declare const __VLS_export: import("vue").DefineComponent<MasonryFeedProps, {
|
|
|
11
12
|
loadMore: () => any;
|
|
12
13
|
retryEnd: () => any;
|
|
13
14
|
activate: (postId: VibeItemId, input: "keyboard" | "pointer") => any;
|
|
15
|
+
mediaError: (postId: VibeItemId, failure: MediaFailure) => any;
|
|
14
16
|
mediaChange: (postId: VibeItemId, mediaIndex: number) => any;
|
|
15
17
|
fullyVisible: (postId: VibeItemId, mediaIndex: number) => any;
|
|
16
18
|
visible: (postId: VibeItemId, mediaIndex: number) => any;
|
|
@@ -20,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<MasonryFeedProps, {
|
|
|
20
22
|
onLoadMore?: (() => any) | undefined;
|
|
21
23
|
onRetryEnd?: (() => any) | undefined;
|
|
22
24
|
onActivate?: ((postId: VibeItemId, input: "keyboard" | "pointer") => any) | undefined;
|
|
25
|
+
onMediaError?: ((postId: VibeItemId, failure: MediaFailure) => any) | undefined;
|
|
23
26
|
onMediaChange?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
|
|
24
27
|
onFullyVisible?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
|
|
25
28
|
onVisible?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaFailure } from '../core/mediaFailure';
|
|
1
2
|
import { type CSSProperties } from 'vue';
|
|
2
3
|
import { type MediaPreviewState } from '../core/mediaPreview';
|
|
3
4
|
import type { VibeCardRegion, VibeItem, VibeLayout, VibeMediaSource, VibeMediaCardOptions, VibeReelAudioState } from '../types';
|
|
@@ -30,6 +31,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
30
31
|
error: (mediaIndex: number) => any;
|
|
31
32
|
ended: (mediaIndex: number) => any;
|
|
32
33
|
activate: (input: "keyboard" | "pointer") => any;
|
|
34
|
+
mediaError: (failure: MediaFailure) => any;
|
|
33
35
|
mediaChange: (mediaIndex: number) => any;
|
|
34
36
|
reelAudioChange: (state: VibeReelAudioState) => any;
|
|
35
37
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
@@ -37,6 +39,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
37
39
|
onError?: ((mediaIndex: number) => any) | undefined;
|
|
38
40
|
onEnded?: ((mediaIndex: number) => any) | undefined;
|
|
39
41
|
onActivate?: ((input: "keyboard" | "pointer") => any) | undefined;
|
|
42
|
+
onMediaError?: ((failure: MediaFailure) => any) | undefined;
|
|
40
43
|
onMediaChange?: ((mediaIndex: number) => any) | undefined;
|
|
41
44
|
onReelAudioChange?: ((state: VibeReelAudioState) => any) | undefined;
|
|
42
45
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaFailure } from '../core/mediaFailure';
|
|
1
2
|
import { type ReelFeedProps } from '../core/feed';
|
|
2
3
|
import type { VibeItemId, VibeReelAudioState } from '../types';
|
|
3
4
|
declare function loadIfNearBottom(): void;
|
|
@@ -20,6 +21,7 @@ declare const __VLS_export: import("vue").DefineComponent<ReelFeedProps, {
|
|
|
20
21
|
error: (postId: VibeItemId, mediaIndex: number) => any;
|
|
21
22
|
loadMore: () => any;
|
|
22
23
|
retryEnd: () => any;
|
|
24
|
+
mediaError: (postId: VibeItemId, failure: MediaFailure) => any;
|
|
23
25
|
mediaChange: (postId: VibeItemId, mediaIndex: number) => any;
|
|
24
26
|
reelAudioChange: (state: VibeReelAudioState) => any;
|
|
25
27
|
activeChange: (postId: VibeItemId) => any;
|
|
@@ -29,6 +31,7 @@ declare const __VLS_export: import("vue").DefineComponent<ReelFeedProps, {
|
|
|
29
31
|
onError?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
|
|
30
32
|
onLoadMore?: (() => any) | undefined;
|
|
31
33
|
onRetryEnd?: (() => any) | undefined;
|
|
34
|
+
onMediaError?: ((postId: VibeItemId, failure: MediaFailure) => any) | undefined;
|
|
32
35
|
onMediaChange?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
|
|
33
36
|
onReelAudioChange?: ((state: VibeReelAudioState) => any) | undefined;
|
|
34
37
|
onActiveChange?: ((postId: VibeItemId) => any) | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaFailure } from '../core/mediaFailure';
|
|
1
2
|
import type { ReelLayoutProps } from '../core/feed';
|
|
2
3
|
import type { VibeItemId, VibeReelAudioState } from '../types';
|
|
3
4
|
declare function changeActiveMedia(direction: -1 | 1): boolean;
|
|
@@ -18,6 +19,7 @@ declare const __VLS_export: import("vue").DefineComponent<ReelLayoutProps, {
|
|
|
18
19
|
error: (postId: VibeItemId, mediaIndex: number) => any;
|
|
19
20
|
loadMore: () => any;
|
|
20
21
|
retryEnd: () => any;
|
|
22
|
+
mediaError: (postId: VibeItemId, failure: MediaFailure) => any;
|
|
21
23
|
mediaChange: (postId: VibeItemId, mediaIndex: number) => any;
|
|
22
24
|
reelAudioChange: (state: VibeReelAudioState) => any;
|
|
23
25
|
activeChange: (postId: VibeItemId) => any;
|
|
@@ -28,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<ReelLayoutProps, {
|
|
|
28
30
|
onError?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
|
|
29
31
|
onLoadMore?: (() => any) | undefined;
|
|
30
32
|
onRetryEnd?: (() => any) | undefined;
|
|
33
|
+
onMediaError?: ((postId: VibeItemId, failure: MediaFailure) => any) | undefined;
|
|
31
34
|
onMediaChange?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
|
|
32
35
|
onReelAudioChange?: ((state: VibeReelAudioState) => any) | undefined;
|
|
33
36
|
onActiveChange?: ((postId: VibeItemId) => any) | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VibeMasonryOptions } from '../core/masonryOptions';
|
|
2
2
|
import { type VibeRuntimeState } from '../core/runtime';
|
|
3
|
-
import type { VibeCardRegion, VibeFeedFooter, VibeFeedFooterActions, VibeItemId, VibeMediaCardOptions, VibeMediaLifecycleContext, VibeReelInfoSheetOptions, VibeReelAudioState, VibeReelItemTarget, VibeReelNavigationResult } from '../types';
|
|
3
|
+
import type { VibeCardRegion, VibeFeedFooter, VibeFeedFooterActions, VibeItemId, VibeMediaCardOptions, VibeMediaErrorContext, VibeMediaLifecycleContext, VibeReelInfoSheetOptions, VibeReelAudioState, VibeReelItemTarget, VibeReelNavigationResult } from '../types';
|
|
4
4
|
import type { VibeItemRemovalOptions } from '../core/itemRemovalOptions';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
canRetryEnd: boolean;
|
|
@@ -37,6 +37,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
37
37
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
38
|
loadMore: () => any;
|
|
39
39
|
retryEnd: () => any;
|
|
40
|
+
mediaError: (context: VibeMediaErrorContext) => any;
|
|
40
41
|
reelAudioChange: (state: VibeReelAudioState) => any;
|
|
41
42
|
retryForward: () => any;
|
|
42
43
|
activeReelChange: (postId: VibeItemId) => any;
|
|
@@ -50,6 +51,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
50
51
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
51
52
|
onLoadMore?: (() => any) | undefined;
|
|
52
53
|
onRetryEnd?: (() => any) | undefined;
|
|
54
|
+
onMediaError?: ((context: VibeMediaErrorContext) => any) | undefined;
|
|
53
55
|
onReelAudioChange?: ((state: VibeReelAudioState) => any) | undefined;
|
|
54
56
|
onRetryForward?: (() => any) | undefined;
|
|
55
57
|
onActiveReelChange?: ((postId: VibeItemId) => any) | undefined;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import type { MediaFailure } from '../core/mediaFailure';
|
|
1
2
|
import type { MediaPreviewState } from '../core/mediaPreview';
|
|
2
3
|
import type { VibeRuntimeState } from '../core/runtime';
|
|
3
|
-
import type { VibeItemId, VibeMediaLifecycleContext } from '../types';
|
|
4
|
+
import type { VibeItemId, VibeLayout, VibeMediaErrorContext, VibeMediaLifecycleContext } from '../types';
|
|
4
5
|
interface MediaLifecycleEvents {
|
|
6
|
+
error: (context: VibeMediaErrorContext) => void;
|
|
5
7
|
fullyVisible: (context: VibeMediaLifecycleContext) => void;
|
|
6
8
|
ready: (context: VibeMediaLifecycleContext) => void;
|
|
7
9
|
reelChange: (context: VibeMediaLifecycleContext) => void;
|
|
8
10
|
visible: (context: VibeMediaLifecycleContext) => void;
|
|
9
11
|
}
|
|
10
12
|
export declare function useMediaLifecycle(state: VibeRuntimeState, events: MediaLifecycleEvents): {
|
|
13
|
+
markMediaError: (postId: VibeItemId, failure: MediaFailure, layout: VibeLayout) => void;
|
|
11
14
|
markMasonryFullyVisible: (postId: VibeItemId, mediaIndex: number) => void;
|
|
12
15
|
markMasonryVisible: (postId: VibeItemId, mediaIndex: number) => void;
|
|
13
16
|
markPreviewError: (postId: VibeItemId, mediaIndex: number) => void;
|
|
@@ -2,13 +2,13 @@ import type { MediaPreviewState } from '../core/mediaPreview';
|
|
|
2
2
|
interface MediaReadinessOptions {
|
|
3
3
|
identity: () => string;
|
|
4
4
|
mediaIndex: () => number;
|
|
5
|
-
onError: (mediaIndex: number) => void;
|
|
5
|
+
onError: (mediaIndex: number, confirmedFailure: boolean) => void;
|
|
6
6
|
onReady: (mediaIndex: number) => void;
|
|
7
7
|
previewState: () => MediaPreviewState;
|
|
8
8
|
}
|
|
9
9
|
export declare function useMediaReadiness(options: MediaReadinessOptions): {
|
|
10
10
|
effectivePreviewState: import("vue").ComputedRef<MediaPreviewState>;
|
|
11
|
-
failSourceAttempt: (event?: Event) => void;
|
|
11
|
+
failSourceAttempt: (event?: Event, confirmedFailure?: boolean) => void;
|
|
12
12
|
imageElement: import("vue").ShallowRef<HTMLImageElement | null, HTMLImageElement | null>;
|
|
13
13
|
markSourceReady: (event?: Event) => void;
|
|
14
14
|
noteSourceActivity: (event: Event) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VibeMediaLifecycleContext, VibeMediaSource } from '../types';
|
|
2
|
+
export interface VibeMediaErrorContext extends VibeMediaLifecycleContext {
|
|
3
|
+
source: VibeMediaSource;
|
|
4
|
+
src: string;
|
|
5
|
+
}
|
|
6
|
+
export type MediaFailure = Pick<VibeMediaErrorContext, 'mediaIndex' | 'source' | 'src'>;
|