@wyxos/vibe 5.5.5 → 5.7.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/types.d.ts CHANGED
@@ -5,17 +5,20 @@ export type VibeItemId = string | number;
5
5
  export type VibeLayout = 'masonry' | 'reel';
6
6
  export type VibeLayoutMode = VibeLayout | 'responsive';
7
7
  export type VibeLifecycle = 'error' | 'loaded' | 'loading';
8
- export type VibeMediaSource = 'preview' | 'original';
8
+ export type VibeMediaSource = 'preview' | 'original' | 'mobile';
9
9
  export type VibeAutofillStrategy = 'backend' | 'frontend';
10
10
  export type VibeAutofillPageLimit = number | 'unlimited';
11
11
  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;
@@ -52,17 +55,21 @@ export interface VibeReelForwardState {
52
55
  error: unknown | null;
53
56
  status: VibeReelForwardStatus;
54
57
  }
55
- export interface VibePreview {
58
+ export interface VibeMediaVariant {
59
+ height: number | null;
56
60
  src: string;
61
+ type?: VibeMediaType;
57
62
  width: number | null;
58
- height: number | null;
59
63
  }
64
+ export type VibePreview = VibeMediaVariant;
60
65
  export interface VibeMediaAsset {
61
66
  mediaId?: VibeItemId;
62
67
  src: string;
63
68
  preview: VibePreview;
69
+ mobile?: VibeMediaVariant;
64
70
  width: number | null;
65
71
  height: number | null;
72
+ type?: VibeMediaType;
66
73
  }
67
74
  export interface VibeItem extends VibeMediaAsset {
68
75
  postId: VibeItemId;
@@ -134,6 +141,7 @@ export interface VibeFeedFooterActions {
134
141
  loadMore: () => Promise<void>;
135
142
  retry: () => Promise<void>;
136
143
  retryEnd: () => Promise<void>;
144
+ retryFill: () => Promise<void>;
137
145
  }
138
146
  export interface VibeFeedFooterProps {
139
147
  actions: VibeFeedFooterActions;
@@ -347,10 +355,15 @@ export interface CreateVibeOptions {
347
355
  onStateChange?: (state: VibeState) => void;
348
356
  removalHistoryLimit?: number;
349
357
  removalReconciliation?: VibeRemovalReconciliationOptions;
358
+ restoreBacklog?: (context: VibeBacklogRestoreContext) => Promise<void> | void;
350
359
  reelAutoAdvance?: VibeReelAutoAdvanceOptions;
351
360
  reelInfoSheet?: VibeReelInfoSheetOptions;
352
361
  routing?: VibeRoutingOptions;
353
362
  }
363
+ export interface VibeBacklogRestoreContext {
364
+ appendPage: (page: VibePage) => void;
365
+ signal: AbortSignal;
366
+ }
354
367
  export interface VibeState {
355
368
  activeReelPostId: VibeItemId | null;
356
369
  autoScroll: VibeAutoScrollState;
@@ -375,6 +388,7 @@ export interface VibeState {
375
388
  total: number | null;
376
389
  }
377
390
  export interface VibeInstance {
391
+ appendPage: (page: VibePage) => void;
378
392
  applyAutofillUpdate: (update: VibeBackendAutofillUpdate) => boolean;
379
393
  applyFillUpdate: (update: VibeBackendFillUpdate) => boolean;
380
394
  cancelAutofill: () => Promise<void>;
@@ -404,6 +418,7 @@ export interface VibeInstance {
404
418
  restoreMediaRemoval: (removal: VibeMediaRemoval) => boolean;
405
419
  restoreRemoval: (removal: VibeRemoval) => boolean;
406
420
  retryReelForward: () => Promise<void>;
421
+ retryFill: () => Promise<void>;
407
422
  setAutoScroll: (enabled: boolean, speedPxPerSecond?: number) => void;
408
423
  setAutoScrollSpeed: (speedPxPerSecond: number) => void;
409
424
  setInfiniteScroll: (enabled: boolean) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyxos/vibe",
3
- "version": "5.5.5",
3
+ "version": "5.7.0",
4
4
  "description": "An initializable Vue 3 media feed with virtualized masonry and reel layouts.",
5
5
  "keywords": [
6
6
  "vue",