@wyxos/vibe 5.5.4 → 5.6.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/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/mediaType.d.ts +2 -0
- package/lib/core/page.d.ts +2 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +913 -737
- package/lib/types.d.ts +14 -1
- package/package.json +1 -1
package/lib/types.d.ts
CHANGED
|
@@ -12,10 +12,13 @@ export type VibeFillStrategy = 'backend' | 'frontend';
|
|
|
12
12
|
export type VibeAutofillStatus = 'cancelled' | 'cancelling' | 'complete' | 'error' | 'exhausted' | 'filling' | 'idle' | 'paused' | 'restoring' | 'waiting';
|
|
13
13
|
export type VibeFillStatus = 'cancelled' | 'cancelling' | 'complete' | 'error' | 'exhausted' | 'filling' | 'idle' | 'paused' | 'restoring' | 'waiting';
|
|
14
14
|
export type VibeFillTarget = {
|
|
15
|
+
items: number;
|
|
16
|
+
} | {
|
|
15
17
|
pages: number;
|
|
16
18
|
} | {
|
|
17
19
|
until: 'end';
|
|
18
20
|
};
|
|
21
|
+
export type VibeMediaType = 'image' | 'video';
|
|
19
22
|
export interface VibeAutoScrollOptions {
|
|
20
23
|
enabled?: boolean;
|
|
21
24
|
maxSpeedPxPerSecond?: number;
|
|
@@ -53,9 +56,10 @@ export interface VibeReelForwardState {
|
|
|
53
56
|
status: VibeReelForwardStatus;
|
|
54
57
|
}
|
|
55
58
|
export interface VibePreview {
|
|
59
|
+
height: number | null;
|
|
56
60
|
src: string;
|
|
61
|
+
type?: VibeMediaType;
|
|
57
62
|
width: number | null;
|
|
58
|
-
height: number | null;
|
|
59
63
|
}
|
|
60
64
|
export interface VibeMediaAsset {
|
|
61
65
|
mediaId?: VibeItemId;
|
|
@@ -63,6 +67,7 @@ export interface VibeMediaAsset {
|
|
|
63
67
|
preview: VibePreview;
|
|
64
68
|
width: number | null;
|
|
65
69
|
height: number | null;
|
|
70
|
+
type?: VibeMediaType;
|
|
66
71
|
}
|
|
67
72
|
export interface VibeItem extends VibeMediaAsset {
|
|
68
73
|
postId: VibeItemId;
|
|
@@ -134,6 +139,7 @@ export interface VibeFeedFooterActions {
|
|
|
134
139
|
loadMore: () => Promise<void>;
|
|
135
140
|
retry: () => Promise<void>;
|
|
136
141
|
retryEnd: () => Promise<void>;
|
|
142
|
+
retryFill: () => Promise<void>;
|
|
137
143
|
}
|
|
138
144
|
export interface VibeFeedFooterProps {
|
|
139
145
|
actions: VibeFeedFooterActions;
|
|
@@ -347,10 +353,15 @@ export interface CreateVibeOptions {
|
|
|
347
353
|
onStateChange?: (state: VibeState) => void;
|
|
348
354
|
removalHistoryLimit?: number;
|
|
349
355
|
removalReconciliation?: VibeRemovalReconciliationOptions;
|
|
356
|
+
restoreBacklog?: (context: VibeBacklogRestoreContext) => Promise<void> | void;
|
|
350
357
|
reelAutoAdvance?: VibeReelAutoAdvanceOptions;
|
|
351
358
|
reelInfoSheet?: VibeReelInfoSheetOptions;
|
|
352
359
|
routing?: VibeRoutingOptions;
|
|
353
360
|
}
|
|
361
|
+
export interface VibeBacklogRestoreContext {
|
|
362
|
+
appendPage: (page: VibePage) => void;
|
|
363
|
+
signal: AbortSignal;
|
|
364
|
+
}
|
|
354
365
|
export interface VibeState {
|
|
355
366
|
activeReelPostId: VibeItemId | null;
|
|
356
367
|
autoScroll: VibeAutoScrollState;
|
|
@@ -375,6 +386,7 @@ export interface VibeState {
|
|
|
375
386
|
total: number | null;
|
|
376
387
|
}
|
|
377
388
|
export interface VibeInstance {
|
|
389
|
+
appendPage: (page: VibePage) => void;
|
|
378
390
|
applyAutofillUpdate: (update: VibeBackendAutofillUpdate) => boolean;
|
|
379
391
|
applyFillUpdate: (update: VibeBackendFillUpdate) => boolean;
|
|
380
392
|
cancelAutofill: () => Promise<void>;
|
|
@@ -404,6 +416,7 @@ export interface VibeInstance {
|
|
|
404
416
|
restoreMediaRemoval: (removal: VibeMediaRemoval) => boolean;
|
|
405
417
|
restoreRemoval: (removal: VibeRemoval) => boolean;
|
|
406
418
|
retryReelForward: () => Promise<void>;
|
|
419
|
+
retryFill: () => Promise<void>;
|
|
407
420
|
setAutoScroll: (enabled: boolean, speedPxPerSecond?: number) => void;
|
|
408
421
|
setAutoScrollSpeed: (speedPxPerSecond: number) => void;
|
|
409
422
|
setInfiniteScroll: (enabled: boolean) => void;
|