@wyxos/vibe 4.5.2 → 4.5.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/lib/components/MediaCard.vue.d.ts +3 -0
- package/lib/components/ReelFeed.vue.d.ts +4 -0
- package/lib/components/ReelLayout.vue.d.ts +4 -0
- package/lib/components/VibeSurface.vue.d.ts +2 -0
- package/lib/core/feed.d.ts +10 -0
- package/lib/core/itemRemovalController.d.ts +1 -0
- package/lib/core/reelRemovalTransitionController.d.ts +21 -0
- package/lib/core/reelScrollTransition.d.ts +1 -0
- package/lib/core/removalControllers.d.ts +4 -1
- package/lib/index.cjs +1 -1
- package/lib/index.js +984 -863
- package/lib/style.css +1 -1
- package/lib/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { type CSSProperties } from 'vue';
|
|
|
2
2
|
import { type MediaPreviewState } from '../core/mediaPreview';
|
|
3
3
|
import type { VibeCardRegion, VibeItem, VibeLayout, VibeMediaSource, VibeMediaCardOptions } from '../types';
|
|
4
4
|
type __VLS_Props = {
|
|
5
|
+
active?: boolean;
|
|
5
6
|
advanceOnMediaEnd?: boolean;
|
|
6
7
|
cardFooter?: VibeCardRegion;
|
|
7
8
|
cardHeader?: VibeCardRegion;
|
|
@@ -18,6 +19,8 @@ type __VLS_Props = {
|
|
|
18
19
|
mediaCard?: VibeMediaCardOptions;
|
|
19
20
|
mediaSource?: VibeMediaSource;
|
|
20
21
|
previewState: MediaPreviewState;
|
|
22
|
+
reelControlsTarget?: HTMLElement | null;
|
|
23
|
+
stationaryReelControls?: boolean;
|
|
21
24
|
total: number | null;
|
|
22
25
|
};
|
|
23
26
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -3,12 +3,16 @@ import type { VibeItemId } from '../types';
|
|
|
3
3
|
declare function loadIfNearBottom(): void;
|
|
4
4
|
declare function changeActiveMedia(direction: -1 | 1): boolean;
|
|
5
5
|
declare function moveActivePost(direction: -1 | 1): boolean;
|
|
6
|
+
declare function transitionActivePost(postId: VibeItemId): Promise<boolean>;
|
|
7
|
+
declare function transitionActiveMedia(direction: -1 | 1): Promise<boolean>;
|
|
6
8
|
declare const __VLS_export: import("vue").DefineComponent<ReelFeedProps, {
|
|
7
9
|
activeIndex: import("vue").ShallowRef<number, number>;
|
|
8
10
|
activePostId: import("vue").ComputedRef<VibeItemId>;
|
|
9
11
|
changeActiveMedia: typeof changeActiveMedia;
|
|
10
12
|
loadIfNearBottom: typeof loadIfNearBottom;
|
|
11
13
|
moveActivePost: typeof moveActivePost;
|
|
14
|
+
transitionActiveMedia: typeof transitionActiveMedia;
|
|
15
|
+
transitionActivePost: typeof transitionActivePost;
|
|
12
16
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
17
|
ready: (postId: VibeItemId, mediaIndex: number) => any;
|
|
14
18
|
error: (postId: VibeItemId, mediaIndex: number) => any;
|
|
@@ -3,10 +3,14 @@ import type { VibeItemId } from '../types';
|
|
|
3
3
|
declare function changeActiveMedia(direction: -1 | 1): boolean;
|
|
4
4
|
declare function loadIfNearBottom(): void;
|
|
5
5
|
declare function moveActivePost(direction: -1 | 1): boolean;
|
|
6
|
+
declare function transitionActiveMedia(direction: -1 | 1): Promise<boolean>;
|
|
7
|
+
declare function transitionActivePost(postId: VibeItemId): Promise<boolean>;
|
|
6
8
|
declare const __VLS_export: import("vue").DefineComponent<ReelLayoutProps, {
|
|
7
9
|
changeActiveMedia: typeof changeActiveMedia;
|
|
8
10
|
loadIfNearBottom: typeof loadIfNearBottom;
|
|
9
11
|
moveActivePost: typeof moveActivePost;
|
|
12
|
+
transitionActiveMedia: typeof transitionActiveMedia;
|
|
13
|
+
transitionActivePost: typeof transitionActivePost;
|
|
10
14
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
15
|
ready: (postId: VibeItemId, mediaIndex: number) => any;
|
|
12
16
|
error: (postId: VibeItemId, mediaIndex: number) => any;
|
|
@@ -21,6 +21,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
21
21
|
loadIfNearBottom: typeof loadIfNearBottom;
|
|
22
22
|
moveActiveReelPost: typeof moveActiveReelPost;
|
|
23
23
|
startItemRemoval: typeof startItemRemoval;
|
|
24
|
+
transitionActiveReelMedia: (direction: -1 | 1) => Promise<boolean>;
|
|
25
|
+
transitionActiveReelPost: (postId: VibeItemId) => Promise<boolean>;
|
|
24
26
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
27
|
loadMore: () => any;
|
|
26
28
|
retryEnd: () => any;
|
package/lib/core/feed.d.ts
CHANGED
|
@@ -25,6 +25,14 @@ export interface MasonryFeedProps extends FeedRendererProps {
|
|
|
25
25
|
removalDelays?: ReadonlyMap<VibeItemId, number>;
|
|
26
26
|
suspended?: boolean;
|
|
27
27
|
}
|
|
28
|
+
export interface FeedRendererExpose {
|
|
29
|
+
changeActiveMedia?: (direction: -1 | 1) => boolean;
|
|
30
|
+
getScrollElement?: () => HTMLElement | null;
|
|
31
|
+
loadIfNearBottom: () => void;
|
|
32
|
+
moveActivePost?: (direction: -1 | 1) => boolean;
|
|
33
|
+
transitionActiveMedia?: (direction: -1 | 1) => Promise<boolean>;
|
|
34
|
+
transitionActivePost?: (postId: VibeItemId) => Promise<boolean>;
|
|
35
|
+
}
|
|
28
36
|
export interface ReelFeedProps extends FeedRendererProps {
|
|
29
37
|
initialPostId?: VibeItemId | null;
|
|
30
38
|
mediaSource?: VibeMediaSource;
|
|
@@ -45,6 +53,8 @@ export interface VibeSurfaceExpose {
|
|
|
45
53
|
loadIfNearBottom: () => Promise<void>;
|
|
46
54
|
moveActiveReelPost: (direction: -1 | 1) => boolean;
|
|
47
55
|
startItemRemoval: (postIds: readonly VibeItemId[]) => number;
|
|
56
|
+
transitionActiveReelMedia: (direction: -1 | 1) => Promise<boolean>;
|
|
57
|
+
transitionActiveReelPost: (postId: VibeItemId) => Promise<boolean>;
|
|
48
58
|
}
|
|
49
59
|
export declare const LOAD_MORE_THRESHOLD = 240;
|
|
50
60
|
export declare function isNearFeedBottom(element: HTMLElement): boolean;
|
|
@@ -4,6 +4,7 @@ interface ItemRemovalControllerOptions {
|
|
|
4
4
|
historyLimit?: number;
|
|
5
5
|
onItemsRemoved: (removal: VibeRemoval, placements: readonly VibeItemPlacement[], activeIndex: number) => void;
|
|
6
6
|
onRemovalRestored: (removal: VibeRemoval) => void;
|
|
7
|
+
prepareRemoval: (postIds: readonly VibeItemId[]) => Promise<void>;
|
|
7
8
|
startRemoval: (postIds: readonly VibeItemId[]) => number;
|
|
8
9
|
state: VibeRuntimeState;
|
|
9
10
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { VibeRuntimeState } from './runtime';
|
|
2
|
+
import type { VibeItemId, VibeMediaTarget } from '../types';
|
|
3
|
+
interface ReelRemovalTransitionControllerOptions {
|
|
4
|
+
state: VibeRuntimeState;
|
|
5
|
+
transitionMedia: (direction: -1 | 1) => Promise<boolean>;
|
|
6
|
+
transitionPost: (postId: VibeItemId) => Promise<boolean>;
|
|
7
|
+
}
|
|
8
|
+
export declare class ReelRemovalTransitionController {
|
|
9
|
+
private readonly options;
|
|
10
|
+
private generation;
|
|
11
|
+
private pending;
|
|
12
|
+
constructor(options: ReelRemovalTransitionControllerOptions);
|
|
13
|
+
prepareItems(postIds: readonly VibeItemId[]): Promise<void>;
|
|
14
|
+
prepareMedia(target: VibeMediaTarget): Promise<void>;
|
|
15
|
+
reset(): void;
|
|
16
|
+
private preparePosts;
|
|
17
|
+
private isReelActive;
|
|
18
|
+
private nextSurvivor;
|
|
19
|
+
private serialize;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function transitionReelScroll(element: HTMLElement, top: number, immediate: boolean): Promise<void>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ExactMediaRemovalController } from './exactMediaRemovalController';
|
|
2
2
|
import { ItemRemovalController } from './itemRemovalController';
|
|
3
3
|
import { ReelForwardController } from './reelForwardController';
|
|
4
|
+
import { ReelRemovalTransitionController } from './reelRemovalTransitionController';
|
|
5
|
+
import type { VibeSurfaceExpose } from './feed';
|
|
4
6
|
import type { VibeRuntimeState } from './runtime';
|
|
5
7
|
import type { VibeItemId } from '../types';
|
|
6
8
|
interface RemovalControllerOptions {
|
|
@@ -8,13 +10,14 @@ interface RemovalControllerOptions {
|
|
|
8
10
|
loadNext: () => Promise<void>;
|
|
9
11
|
onActivate: (postId: VibeItemId) => void;
|
|
10
12
|
retryEnd: () => Promise<void>;
|
|
11
|
-
startRemoval: (postIds: readonly VibeItemId[]) => number;
|
|
12
13
|
state: VibeRuntimeState;
|
|
14
|
+
surface: () => VibeSurfaceExpose | null;
|
|
13
15
|
}
|
|
14
16
|
export interface RemovalControllers {
|
|
15
17
|
exactMediaRemoval: ExactMediaRemovalController;
|
|
16
18
|
itemRemoval: ItemRemovalController;
|
|
17
19
|
reelForward: ReelForwardController;
|
|
20
|
+
reelRemoval: ReelRemovalTransitionController;
|
|
18
21
|
}
|
|
19
22
|
export declare function createRemovalControllers(options: RemovalControllerOptions): RemovalControllers;
|
|
20
23
|
export {};
|