@wyxos/vibe 5.13.3 → 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.
@@ -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;
@@ -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>;
@@ -8,9 +8,10 @@ interface FillReconciliationOptions {
8
8
  isCurrent: () => boolean;
9
9
  loadPage: VibePageLoader;
10
10
  onDelayChange: (snapshot: RequestDelaySnapshot) => void;
11
+ pauseWhenManual?: boolean;
11
12
  setLastCursor: (cursor: VibeCursor) => void;
12
13
  signal: AbortSignal;
13
14
  state: VibeRuntimeState;
14
15
  }
15
- export declare function reconcileBeforeFill({ controller, isCurrent, loadPage, onDelayChange, setLastCursor, signal, state, }: FillReconciliationOptions): Promise<FillReconciliationStatus>;
16
+ export declare function reconcileBeforeFill({ controller, isCurrent, loadPage, onDelayChange, pauseWhenManual, setLastCursor, signal, state, }: FillReconciliationOptions): Promise<FillReconciliationStatus>;
16
17
  export {};
@@ -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 {};
@@ -3,7 +3,7 @@ import type { VibeItem, VibeItemId } from '../types';
3
3
  interface ReelForwardControllerOptions {
4
4
  onActivate: (postId: VibeItemId) => void;
5
5
  onCloseReel: () => void;
6
- replenishAfterRemoval: () => Promise<void>;
6
+ replenishAfterRemoval: (allowManualPaging: boolean) => Promise<void>;
7
7
  state: VibeRuntimeState;
8
8
  }
9
9
  export declare class ReelForwardController {
@@ -18,7 +18,7 @@ export declare class ReelForwardController {
18
18
  reset(): void;
19
19
  retry(): Promise<void>;
20
20
  private clearState;
21
- private stopAtLock;
21
+ private stopAtPaginationBoundary;
22
22
  private startForwardRequest;
23
23
  private loadForward;
24
24
  }
@@ -11,7 +11,7 @@ interface RemovalControllerOptions {
11
11
  onCloseReel: () => void;
12
12
  onItemsRemoved: (postIds: readonly VibeItemId[]) => void;
13
13
  onItemsRestored: (postIds: readonly VibeItemId[]) => void;
14
- replenishAfterRemoval: () => Promise<void>;
14
+ replenishAfterRemoval: (allowManualPaging: boolean) => Promise<void>;
15
15
  state: VibeRuntimeState;
16
16
  surface: () => VibeSurfaceExpose | null;
17
17
  }
@@ -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;