@wyxos/vibe 5.13.4 → 5.14.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/VibeSurface.vue.d.ts +4 -0
- package/lib/core/feed.d.ts +2 -0
- package/lib/core/loadingLock.d.ts +10 -0
- package/lib/core/pageReplacement.d.ts +22 -0
- package/lib/core/runtime.d.ts +2 -1
- package/lib/index.cjs +2 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +656 -566
- package/lib/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -20,7 +20,11 @@ declare function moveActiveReelPost(direction: -1 | 1): boolean;
|
|
|
20
20
|
declare function navigateToReelItem(target: VibeReelItemTarget): VibeReelNavigationResult;
|
|
21
21
|
declare function getAutoScrollElement(): HTMLElement | null;
|
|
22
22
|
declare function startItemRemoval(postIds: readonly VibeItemId[], options?: VibeItemRemovalOptions): number;
|
|
23
|
+
declare function cancelItemRemoval(): void;
|
|
24
|
+
declare function animateItemRemoval(postIds: readonly VibeItemId[], signal: AbortSignal): Promise<void>;
|
|
23
25
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
26
|
+
animateItemRemoval: typeof animateItemRemoval;
|
|
27
|
+
cancelItemRemoval: typeof cancelItemRemoval;
|
|
24
28
|
changeActiveReelMedia: typeof changeActiveReelMedia;
|
|
25
29
|
getAutoScrollElement: typeof getAutoScrollElement;
|
|
26
30
|
loadIfNearBottom: typeof loadIfNearBottom;
|
package/lib/core/feed.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ export interface ReelLayoutProps extends ReelFeedProps {
|
|
|
53
53
|
origin: VibeReelOrigin;
|
|
54
54
|
}
|
|
55
55
|
export interface VibeSurfaceExpose {
|
|
56
|
+
animateItemRemoval: (postIds: readonly VibeItemId[], signal: AbortSignal) => Promise<void>;
|
|
57
|
+
cancelItemRemoval: () => void;
|
|
56
58
|
changeActiveReelMedia: (direction: -1 | 1) => boolean;
|
|
57
59
|
getAutoScrollElement: () => HTMLElement | null;
|
|
58
60
|
loadIfNearBottom: () => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VibeRuntimeState } from './runtime';
|
|
2
|
+
interface LoadingLockActions {
|
|
3
|
+
getPending: () => Promise<void> | null;
|
|
4
|
+
hasPendingSession: () => boolean;
|
|
5
|
+
loadIfNearBottom: () => Promise<void> | undefined;
|
|
6
|
+
loadNext: () => Promise<void>;
|
|
7
|
+
resumeFill: () => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function setLoadingLock(state: VibeRuntimeState, locked: boolean, actions: LoadingLockActions): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { VibeSurfaceExpose } from './feed';
|
|
2
|
+
import type { VibeRuntimeState } from './runtime';
|
|
3
|
+
import type { VibePage } from '../types';
|
|
4
|
+
export interface VibePageReplacementOptions {
|
|
5
|
+
/** Scroll masonry to its beginning after the outgoing cards leave. */
|
|
6
|
+
resetScroll?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface PageReplacementOptions {
|
|
9
|
+
commit: (page: VibePage) => void;
|
|
10
|
+
prepare: () => Promise<void>;
|
|
11
|
+
state: VibeRuntimeState;
|
|
12
|
+
surface: () => VibeSurfaceExpose | null;
|
|
13
|
+
}
|
|
14
|
+
export declare class PageReplacementController {
|
|
15
|
+
private readonly options;
|
|
16
|
+
private controller;
|
|
17
|
+
constructor(options: PageReplacementOptions);
|
|
18
|
+
isActive(): boolean;
|
|
19
|
+
cancel(): void;
|
|
20
|
+
replace(pageValue: VibePage, options?: VibePageReplacementOptions): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
package/lib/core/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComputedRef } from 'vue';
|
|
1
|
+
import { type ComputedRef, type WatchHandle } from 'vue';
|
|
2
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;
|
|
@@ -28,4 +28,5 @@ export interface VibeRuntimeState {
|
|
|
28
28
|
total: number | null;
|
|
29
29
|
}
|
|
30
30
|
export declare function createItemSnapshot(state: VibeRuntimeState): ComputedRef<readonly VibeItem[]>;
|
|
31
|
+
export declare function watchStateSnapshots(state: VibeRuntimeState, items: ComputedRef<readonly VibeItem[]>, onStateChange: (state: VibeState) => void): WatchHandle;
|
|
31
32
|
export declare function snapshotState(state: VibeRuntimeState, items?: readonly VibeItem[]): VibeState;
|