@wyxos/vibe 3.1.34 → 4.0.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.
Files changed (104) hide show
  1. package/README.md +531 -308
  2. package/lib/components/CardRegion.vue.d.ts +15 -0
  3. package/lib/components/GalleryFooter.vue.d.ts +17 -0
  4. package/lib/components/GalleryScrollbar.vue.d.ts +9 -0
  5. package/lib/components/MasonryFeed.vue.d.ts +24 -0
  6. package/lib/components/MediaCard.vue.d.ts +35 -0
  7. package/lib/components/MediaControls.vue.d.ts +22 -0
  8. package/lib/components/ReelAutoAdvanceProgress.vue.d.ts +11 -0
  9. package/lib/components/ReelFeed.vue.d.ts +28 -0
  10. package/lib/components/ReelLayout.vue.d.ts +28 -0
  11. package/lib/components/VibeSurface.vue.d.ts +35 -0
  12. package/lib/core/autoScroll.d.ts +26 -0
  13. package/lib/core/autofill.d.ts +35 -0
  14. package/lib/core/backendAutofill.d.ts +5 -0
  15. package/lib/core/backendFill.d.ts +5 -0
  16. package/lib/core/createVibe.d.ts +2 -0
  17. package/lib/core/feed.d.ts +40 -0
  18. package/lib/core/fill.d.ts +29 -0
  19. package/lib/core/fillController.d.ts +28 -0
  20. package/lib/core/initialAutofill.d.ts +12 -0
  21. package/lib/core/initialRuntimeState.d.ts +3 -0
  22. package/lib/core/masonry.d.ts +37 -0
  23. package/lib/core/mediaAsset.d.ts +5 -0
  24. package/lib/core/mediaPreview.d.ts +3 -0
  25. package/lib/core/mediaType.d.ts +1 -0
  26. package/lib/core/options.d.ts +3 -0
  27. package/lib/core/page.d.ts +3 -0
  28. package/lib/core/reelAutoAdvance.d.ts +5 -0
  29. package/lib/core/reelInfoSheet.d.ts +3 -0
  30. package/lib/core/requestDelay.d.ts +24 -0
  31. package/lib/core/responsiveLayout.d.ts +13 -0
  32. package/lib/core/runtime.d.ts +23 -0
  33. package/lib/core/scrollbar.d.ts +15 -0
  34. package/lib/core/vibeRouting.d.ts +11 -0
  35. package/lib/index.cjs +1 -1
  36. package/lib/index.d.ts +3 -73
  37. package/lib/index.js +2586 -4949
  38. package/lib/style.css +1 -2
  39. package/lib/types.d.ts +323 -0
  40. package/package.json +13 -7
  41. package/lib/components/FullscreenFooter.vue.d.ts +0 -22
  42. package/lib/components/FullscreenForwardFillPlaceholder.vue.d.ts +0 -29
  43. package/lib/components/FullscreenHeader.vue.d.ts +0 -25
  44. package/lib/components/FullscreenMediaBar.vue.d.ts +0 -26
  45. package/lib/components/FullscreenSurface.vue.d.ts +0 -83
  46. package/lib/components/Layout.vue.d.ts +0 -48
  47. package/lib/components/ListCard.vue.d.ts +0 -44
  48. package/lib/components/ListSurface.vue.d.ts +0 -87
  49. package/lib/components/SurfaceEmptyState.vue.d.ts +0 -21
  50. package/lib/components/viewer-core/assetErrors.d.ts +0 -30
  51. package/lib/components/viewer-core/assetState.d.ts +0 -14
  52. package/lib/components/viewer-core/autoBuckets.d.ts +0 -24
  53. package/lib/components/viewer-core/autoResolveBucketFactory.d.ts +0 -15
  54. package/lib/components/viewer-core/autoResolveCursors.d.ts +0 -15
  55. package/lib/components/viewer-core/autoResolveFillUntil.d.ts +0 -46
  56. package/lib/components/viewer-core/autoResolveHelpers.d.ts +0 -20
  57. package/lib/components/viewer-core/autoResolveLoading.d.ts +0 -44
  58. package/lib/components/viewer-core/autoResolveState.d.ts +0 -72
  59. package/lib/components/viewer-core/dom.d.ts +0 -2
  60. package/lib/components/viewer-core/dominantImageTone.d.ts +0 -6
  61. package/lib/components/viewer-core/emptyVisiblePrefetch.d.ts +0 -18
  62. package/lib/components/viewer-core/fillDelay.d.ts +0 -9
  63. package/lib/components/viewer-core/fillProgress.d.ts +0 -12
  64. package/lib/components/viewer-core/format.d.ts +0 -1
  65. package/lib/components/viewer-core/fullscreenPreviews.d.ts +0 -8
  66. package/lib/components/viewer-core/itemIdentity.d.ts +0 -6
  67. package/lib/components/viewer-core/listCardAsset.d.ts +0 -4
  68. package/lib/components/viewer-core/listPreview.d.ts +0 -10
  69. package/lib/components/viewer-core/loadError.d.ts +0 -5
  70. package/lib/components/viewer-core/masonryBoundaryLock.d.ts +0 -5
  71. package/lib/components/viewer-core/masonryItemMutation.d.ts +0 -35
  72. package/lib/components/viewer-core/masonryLayout.d.ts +0 -64
  73. package/lib/components/viewer-core/masonryLayoutState.d.ts +0 -22
  74. package/lib/components/viewer-core/masonryPendingAppend.d.ts +0 -19
  75. package/lib/components/viewer-core/masonryScrollBehavior.d.ts +0 -37
  76. package/lib/components/viewer-core/masonryViewport.d.ts +0 -7
  77. package/lib/components/viewer-core/media.d.ts +0 -4
  78. package/lib/components/viewer-core/mediaPlayback.d.ts +0 -1
  79. package/lib/components/viewer-core/nativeVideoFullscreen.d.ts +0 -2
  80. package/lib/components/viewer-core/removalState.d.ts +0 -71
  81. package/lib/components/viewer-core/slotContent.d.ts +0 -2
  82. package/lib/components/viewer-core/surfaceSlots.d.ts +0 -33
  83. package/lib/components/viewer-core/surfaceStatus.d.ts +0 -18
  84. package/lib/components/viewer-core/theme.d.ts +0 -3
  85. package/lib/components/viewer-core/useActivation.d.ts +0 -8
  86. package/lib/components/viewer-core/useAssetLoadQueue.d.ts +0 -17
  87. package/lib/components/viewer-core/useAutoResolveSource.d.ts +0 -67
  88. package/lib/components/viewer-core/useController.d.ts +0 -98
  89. package/lib/components/viewer-core/useDataSource.d.ts +0 -98
  90. package/lib/components/viewer-core/useEdgeBoundary.d.ts +0 -18
  91. package/lib/components/viewer-core/useFullscreen.d.ts +0 -1
  92. package/lib/components/viewer-core/useFullscreenAssetEvents.d.ts +0 -24
  93. package/lib/components/viewer-core/useFullscreenDominantTone.d.ts +0 -12
  94. package/lib/components/viewer-core/useFullscreenPreloadController.d.ts +0 -18
  95. package/lib/components/viewer-core/useFullscreenSurfaceMedia.d.ts +0 -32
  96. package/lib/components/viewer-core/useListCardHealthCheck.d.ts +0 -20
  97. package/lib/components/viewer-core/useMasonryList.d.ts +0 -85
  98. package/lib/components/viewer-core/useMasonryMotion.d.ts +0 -76
  99. package/lib/components/viewer-core/useMedia.d.ts +0 -44
  100. package/lib/components/viewer-core/useSurfaceEmptyState.d.ts +0 -15
  101. package/lib/components/viewer-core/useVideoFullscreen.d.ts +0 -9
  102. package/lib/components/viewer-core/useViewer.d.ts +0 -78
  103. package/lib/components/viewer-core/virtualization.d.ts +0 -18
  104. package/lib/components/viewer.d.ts +0 -23
@@ -0,0 +1,15 @@
1
+ import type { VibeCardRegion, VibeItem, VibeLayout, VibeMediaSource } from '../types';
2
+ type __VLS_Props = {
3
+ index: number;
4
+ item: VibeItem;
5
+ layout: VibeLayout;
6
+ loadedCount: number;
7
+ mediaIndex: number;
8
+ mediaSource?: VibeMediaSource;
9
+ placement: 'footer' | 'header';
10
+ region: VibeCardRegion;
11
+ total: number | null;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ canRetryEnd: boolean;
3
+ hasError: boolean;
4
+ hasNext: boolean;
5
+ infiniteScroll: boolean;
6
+ isLoading: boolean;
7
+ loadMoreLocked: boolean;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ loadMore: () => any;
11
+ retryEnd: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onLoadMore?: (() => any) | undefined;
14
+ onRetryEnd?: (() => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ contentSize: number;
3
+ controlsId: string;
4
+ scrollElement: HTMLElement | null;
5
+ suspended?: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import type { MasonryFeedProps } from '../core/feed';
2
+ import type { VibeItemId } from '../types';
3
+ declare function loadIfNearBottom(): void;
4
+ declare function getScrollElement(): HTMLElement | null;
5
+ declare const __VLS_export: import("vue").DefineComponent<MasonryFeedProps, {
6
+ getScrollElement: typeof getScrollElement;
7
+ loadIfNearBottom: typeof loadIfNearBottom;
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ ready: (postId: VibeItemId, mediaIndex: number) => any;
10
+ error: (postId: VibeItemId, mediaIndex: number) => any;
11
+ loadMore: () => any;
12
+ retryEnd: () => any;
13
+ activate: (postId: VibeItemId, input: "keyboard" | "pointer") => any;
14
+ mediaChange: (postId: VibeItemId, mediaIndex: number) => any;
15
+ }, string, import("vue").PublicProps, Readonly<MasonryFeedProps> & Readonly<{
16
+ onReady?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
17
+ onError?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
18
+ onLoadMore?: (() => any) | undefined;
19
+ onRetryEnd?: (() => any) | undefined;
20
+ onActivate?: ((postId: VibeItemId, input: "keyboard" | "pointer") => any) | undefined;
21
+ onMediaChange?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { type CSSProperties } from 'vue';
2
+ import { type MediaPreviewState } from '../core/mediaPreview';
3
+ import type { VibeCardRegion, VibeItem, VibeLayout, VibeMediaSource } from '../types';
4
+ type __VLS_Props = {
5
+ advanceOnMediaEnd?: boolean;
6
+ cardFooter?: VibeCardRegion;
7
+ cardHeader?: VibeCardRegion;
8
+ entering: boolean;
9
+ fetchPriority: 'high' | 'low';
10
+ index: number;
11
+ item: VibeItem;
12
+ itemStyle?: CSSProperties;
13
+ interactive?: boolean;
14
+ layout: VibeLayout;
15
+ loadedCount: number;
16
+ mediaIndex: number;
17
+ mediaSource?: VibeMediaSource;
18
+ previewState: MediaPreviewState;
19
+ total: number | null;
20
+ };
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ ready: (mediaIndex: number) => any;
23
+ error: (mediaIndex: number) => any;
24
+ ended: (mediaIndex: number) => any;
25
+ activate: (input: "keyboard" | "pointer") => any;
26
+ mediaChange: (mediaIndex: number) => any;
27
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
28
+ onReady?: ((mediaIndex: number) => any) | undefined;
29
+ onError?: ((mediaIndex: number) => any) | undefined;
30
+ onEnded?: ((mediaIndex: number) => any) | undefined;
31
+ onActivate?: ((input: "keyboard" | "pointer") => any) | undefined;
32
+ onMediaChange?: ((mediaIndex: number) => any) | undefined;
33
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const _default: typeof __VLS_export;
35
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import type { VibeLayout } from '../types';
2
+ type __VLS_Props = {
3
+ currentTime: number;
4
+ duration: number;
5
+ layout: VibeLayout;
6
+ muted: boolean;
7
+ playing: boolean;
8
+ volume: number;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ seek: (time: number) => any;
12
+ toggleMute: () => any;
13
+ togglePlayback: () => any;
14
+ volumeChange: (volume: number) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ onSeek?: ((time: number) => any) | undefined;
17
+ onToggleMute?: (() => any) | undefined;
18
+ onTogglePlayback?: (() => any) | undefined;
19
+ onVolumeChange?: ((volume: number) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ durationMs: number;
3
+ label: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ complete: () => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onComplete?: (() => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import type { ReelFeedProps } from '../core/feed';
2
+ import type { VibeItemId } from '../types';
3
+ declare function loadIfNearBottom(): void;
4
+ declare function changeActiveMedia(direction: -1 | 1): boolean;
5
+ declare function moveActivePost(direction: -1 | 1): boolean;
6
+ declare const __VLS_export: import("vue").DefineComponent<ReelFeedProps, {
7
+ activeIndex: import("vue").ShallowRef<number, number>;
8
+ activePostId: import("vue").ComputedRef<VibeItemId>;
9
+ changeActiveMedia: typeof changeActiveMedia;
10
+ loadIfNearBottom: typeof loadIfNearBottom;
11
+ moveActivePost: typeof moveActivePost;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ ready: (postId: VibeItemId, mediaIndex: number) => any;
14
+ error: (postId: VibeItemId, mediaIndex: number) => any;
15
+ loadMore: () => any;
16
+ retryEnd: () => any;
17
+ mediaChange: (postId: VibeItemId, mediaIndex: number) => any;
18
+ activeChange: (postId: VibeItemId) => any;
19
+ }, string, import("vue").PublicProps, Readonly<ReelFeedProps> & Readonly<{
20
+ onReady?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
21
+ onError?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
22
+ onLoadMore?: (() => any) | undefined;
23
+ onRetryEnd?: (() => any) | undefined;
24
+ onMediaChange?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
25
+ onActiveChange?: ((postId: VibeItemId) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import type { ReelLayoutProps } from '../core/feed';
2
+ import type { VibeItemId } from '../types';
3
+ declare function changeActiveMedia(direction: -1 | 1): boolean;
4
+ declare function loadIfNearBottom(): void;
5
+ declare function moveActivePost(direction: -1 | 1): boolean;
6
+ declare const __VLS_export: import("vue").DefineComponent<ReelLayoutProps, {
7
+ changeActiveMedia: typeof changeActiveMedia;
8
+ loadIfNearBottom: typeof loadIfNearBottom;
9
+ moveActivePost: typeof moveActivePost;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ ready: (postId: VibeItemId, mediaIndex: number) => any;
12
+ error: (postId: VibeItemId, mediaIndex: number) => any;
13
+ loadMore: () => any;
14
+ retryEnd: () => any;
15
+ mediaChange: (postId: VibeItemId, mediaIndex: number) => any;
16
+ activeChange: (postId: VibeItemId) => any;
17
+ closeInfoSheet: () => any;
18
+ }, string, import("vue").PublicProps, Readonly<ReelLayoutProps> & Readonly<{
19
+ onReady?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
20
+ onError?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
21
+ onLoadMore?: (() => any) | undefined;
22
+ onRetryEnd?: (() => any) | undefined;
23
+ onMediaChange?: ((postId: VibeItemId, mediaIndex: number) => any) | undefined;
24
+ onActiveChange?: ((postId: VibeItemId) => any) | undefined;
25
+ onCloseInfoSheet?: (() => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import type { VibeRuntimeState } from '../core/runtime';
2
+ import type { VibeCardRegion, VibeItemId, VibeReelInfoSheetOptions } from '../types';
3
+ type __VLS_Props = {
4
+ canRetryEnd: boolean;
5
+ cardFooter?: VibeCardRegion;
6
+ cardHeader?: VibeCardRegion;
7
+ reelInfoSheet?: VibeReelInfoSheetOptions;
8
+ state: VibeRuntimeState;
9
+ };
10
+ declare function loadIfNearBottom(): Promise<void>;
11
+ declare function changeActiveReelMedia(direction: -1 | 1): boolean;
12
+ declare function moveActiveReelPost(direction: -1 | 1): boolean;
13
+ declare function getAutoScrollElement(): HTMLElement | null;
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
15
+ changeActiveReelMedia: typeof changeActiveReelMedia;
16
+ getAutoScrollElement: typeof getAutoScrollElement;
17
+ loadIfNearBottom: typeof loadIfNearBottom;
18
+ moveActiveReelPost: typeof moveActiveReelPost;
19
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ loadMore: () => any;
21
+ retryEnd: () => any;
22
+ activeReelChange: (postId: VibeItemId) => any;
23
+ closeReel: () => any;
24
+ openReel: (postId: VibeItemId) => any;
25
+ reelInfoSheetChange: (enabled: boolean) => any;
26
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ onLoadMore?: (() => any) | undefined;
28
+ onRetryEnd?: (() => any) | undefined;
29
+ onActiveReelChange?: ((postId: VibeItemId) => any) | undefined;
30
+ onCloseReel?: (() => any) | undefined;
31
+ onOpenReel?: ((postId: VibeItemId) => any) | undefined;
32
+ onReelInfoSheetChange?: ((enabled: boolean) => any) | undefined;
33
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const _default: typeof __VLS_export;
35
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import type { VibeAutoScrollOptions, VibeAutoScrollState } from '../types';
2
+ export declare const DEFAULT_AUTO_SCROLL_MIN_SPEED = 20;
3
+ export declare const DEFAULT_AUTO_SCROLL_MAX_SPEED = 240;
4
+ export declare const DEFAULT_AUTO_SCROLL_SPEED = 80;
5
+ export declare function validateAutoScrollOptions(options?: VibeAutoScrollOptions): void;
6
+ export declare function createAutoScrollState(options?: VibeAutoScrollOptions): VibeAutoScrollState;
7
+ interface VibeAutoScrollControllerOptions {
8
+ getScrollElement: () => HTMLElement | null;
9
+ state: VibeAutoScrollState;
10
+ }
11
+ export declare class VibeAutoScrollController {
12
+ private readonly options;
13
+ private frame;
14
+ private lastTimestamp;
15
+ private mounted;
16
+ constructor(options: VibeAutoScrollControllerOptions);
17
+ mount(): void;
18
+ destroy(): void;
19
+ setEnabled(enabled: boolean, speedPxPerSecond?: number): void;
20
+ setPaused(paused: boolean): void;
21
+ setSpeed(speedPxPerSecond: number): void;
22
+ private readonly tick;
23
+ private schedule;
24
+ private cancelFrame;
25
+ }
26
+ export {};
@@ -0,0 +1,35 @@
1
+ import type { VibeAutofillOptions, VibeAutofillSessionSnapshot, VibeAutofillState, VibeCursor, VibeFrontendAutofillOptions, VibeItem, VibePageLoader } from '../types';
2
+ import type { VibeRuntimeState } from './runtime';
3
+ import { type RequestDelaySnapshot } from './requestDelay';
4
+ export declare const DEFAULT_MAX_ADDITIONAL_PAGES = 10;
5
+ export interface FrontendAutofillProgress {
6
+ missing: number;
7
+ next: VibeCursor;
8
+ received: number;
9
+ requests: number;
10
+ }
11
+ export interface FrontendAutofillResult extends FrontendAutofillProgress {
12
+ items: VibeItem[];
13
+ lastCursor: VibeCursor;
14
+ status: 'complete' | 'exhausted';
15
+ total?: number;
16
+ }
17
+ interface CollectFrontendAutofillOptions {
18
+ existingItems: readonly VibeItem[];
19
+ initialCursor: VibeCursor;
20
+ loadPage: VibePageLoader;
21
+ maximumRequests?: number;
22
+ onDelayChange: (snapshot: RequestDelaySnapshot) => void;
23
+ onProgress: (progress: FrontendAutofillProgress) => void;
24
+ options: VibeFrontendAutofillOptions;
25
+ receivedOffset?: number;
26
+ requestOffset?: number;
27
+ signal: AbortSignal;
28
+ }
29
+ export declare function validateAutofillOptions(options?: VibeAutofillOptions): void;
30
+ export declare function createAutofillState(options?: VibeAutofillOptions, initialSession?: VibeAutofillSessionSnapshot, useConfiguredSession?: boolean): VibeAutofillState;
31
+ export declare function isAutofillActive(state: VibeAutofillState): boolean;
32
+ export declare function cancelAutofill(options: VibeAutofillOptions | undefined, state: VibeRuntimeState, cancelRequest: () => void): Promise<void>;
33
+ export declare function isMatchingBackendSession(options: VibeAutofillOptions | undefined, update: Pick<VibeAutofillSessionSnapshot, 'feedKey' | 'sessionId'>, state: VibeAutofillState): boolean;
34
+ export declare function collectFrontendAutofill({ existingItems, initialCursor, loadPage, maximumRequests: configuredMaximumRequests, onDelayChange, onProgress, options, receivedOffset, requestOffset, signal, }: CollectFrontendAutofillOptions): Promise<FrontendAutofillResult>;
35
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { VibeRuntimeState } from './runtime';
2
+ import type { VibeAutofillOptions, VibeAutofillSessionSnapshot, VibeBackendAutofillOptions, VibeBackendAutofillStartContext, VibeBackendAutofillUpdate } from '../types';
3
+ export declare function startBackendAutofill(options: VibeBackendAutofillOptions, state: VibeRuntimeState, context: VibeBackendAutofillStartContext, isCurrent: () => boolean): Promise<void>;
4
+ export declare function applyBackendAutofillUpdate(options: VibeAutofillOptions | undefined, state: VibeRuntimeState, update: VibeBackendAutofillUpdate): boolean;
5
+ export declare function restoreBackendAutofillSession(options: VibeAutofillOptions | undefined, state: VibeRuntimeState, snapshot: VibeAutofillSessionSnapshot): boolean;
@@ -0,0 +1,5 @@
1
+ import type { VibeRuntimeState } from './runtime';
2
+ import type { VibeBackendFillOptions, VibeBackendFillStartContext, VibeBackendFillUpdate, VibeFillOptions, VibeFillSessionSnapshot, VibeCursor } from '../types';
3
+ export declare function startBackendFill(options: VibeBackendFillOptions, state: VibeRuntimeState, context: VibeBackendFillStartContext, isCurrent: () => boolean): Promise<void>;
4
+ export declare function applyBackendFillUpdate(options: VibeFillOptions | undefined, state: VibeRuntimeState, update: VibeBackendFillUpdate, onLastCursor: (cursor: VibeCursor) => void): boolean;
5
+ export declare function restoreBackendFillSession(options: VibeFillOptions | undefined, state: VibeRuntimeState, snapshot: VibeFillSessionSnapshot, onLastCursor: (cursor: VibeCursor) => void): boolean;
@@ -0,0 +1,2 @@
1
+ import type { CreateVibeOptions, VibeInstance } from '../types';
2
+ export declare function createVibe(options: CreateVibeOptions): VibeInstance;
@@ -0,0 +1,40 @@
1
+ import type { VibeCardRegion, VibeItem, VibeItemId, VibeMediaSource, VibeReelAutoAdvanceState, VibeReelInfoSheetOptions, VibeReelOrigin } from '../types';
2
+ import type { MediaPreviewState } from './mediaPreview';
3
+ export interface FeedRendererProps {
4
+ canRetryEnd: boolean;
5
+ cardFooter?: VibeCardRegion;
6
+ cardHeader?: VibeCardRegion;
7
+ hasNext: boolean;
8
+ infiniteScroll: boolean;
9
+ isLoadingMore: boolean;
10
+ items: readonly VibeItem[];
11
+ loadMoreLocked: boolean;
12
+ mediaIndices: ReadonlyMap<VibeItemId, number>;
13
+ nextPageError: boolean;
14
+ previewStates: ReadonlyMap<string, MediaPreviewState>;
15
+ total: number | null;
16
+ }
17
+ export interface MasonryFeedProps extends FeedRendererProps {
18
+ enteringPostIds: ReadonlySet<VibeItemId>;
19
+ entryDelays: ReadonlyMap<VibeItemId, number>;
20
+ suspended?: boolean;
21
+ }
22
+ export interface ReelFeedProps extends FeedRendererProps {
23
+ initialPostId?: VibeItemId | null;
24
+ mediaSource?: VibeMediaSource;
25
+ reelAutoAdvance: VibeReelAutoAdvanceState;
26
+ }
27
+ export interface ReelLayoutProps extends ReelFeedProps {
28
+ infoSheet?: VibeReelInfoSheetOptions;
29
+ infoSheetEnabled: boolean;
30
+ infoSheetOverlay: boolean;
31
+ origin: VibeReelOrigin;
32
+ }
33
+ export interface VibeSurfaceExpose {
34
+ changeActiveReelMedia: (direction: -1 | 1) => boolean;
35
+ getAutoScrollElement: () => HTMLElement | null;
36
+ loadIfNearBottom: () => Promise<void>;
37
+ moveActiveReelPost: (direction: -1 | 1) => boolean;
38
+ }
39
+ export declare const LOAD_MORE_THRESHOLD = 240;
40
+ export declare function isNearFeedBottom(element: HTMLElement): boolean;
@@ -0,0 +1,29 @@
1
+ import type { VibeFillOptions, VibeFillSessionSnapshot, VibeFillState, VibeFillTarget, VibeCursor, VibeFrontendFillOptions, VibeItem, VibePageLoader } from '../types';
2
+ import { type RequestDelaySnapshot } from './requestDelay';
3
+ export interface FrontendFillProgress {
4
+ completedPages: number;
5
+ next: VibeCursor;
6
+ received: number;
7
+ }
8
+ export interface FrontendFillResult extends FrontendFillProgress {
9
+ items: VibeItem[];
10
+ lastCursor: VibeCursor;
11
+ status: 'complete' | 'exhausted';
12
+ total?: number;
13
+ }
14
+ interface CollectFrontendFillOptions {
15
+ existingItems: readonly VibeItem[];
16
+ initialCursor: VibeCursor;
17
+ loadPage: VibePageLoader;
18
+ onDelayChange: (snapshot: RequestDelaySnapshot) => void;
19
+ onProgress: (progress: FrontendFillProgress) => void;
20
+ options: VibeFrontendFillOptions;
21
+ signal: AbortSignal;
22
+ target: VibeFillTarget;
23
+ }
24
+ export declare function validateFillTarget(target: VibeFillTarget): VibeFillTarget;
25
+ export declare function validateFillOptions(options?: VibeFillOptions): void;
26
+ export declare function createFillState(options?: VibeFillOptions, initialSession?: VibeFillSessionSnapshot, useConfiguredSession?: boolean): VibeFillState;
27
+ export declare function isFillActive(state: VibeFillState): boolean;
28
+ export declare function collectFrontendFill({ existingItems, initialCursor, loadPage, onDelayChange, onProgress, options, signal, target, }: CollectFrontendFillOptions): Promise<FrontendFillResult>;
29
+ export {};
@@ -0,0 +1,28 @@
1
+ import type { VibeRuntimeState } from './runtime';
2
+ import type { VibeBackendFillUpdate, VibeCursor, VibeFillOptions, VibeFillSessionSnapshot, VibeFillTarget, VibePageLoader } from '../types';
3
+ interface FillControllerOptions {
4
+ fill?: VibeFillOptions;
5
+ loadPage?: VibePageLoader;
6
+ onLastCursor: (cursor: VibeCursor) => void;
7
+ state: VibeRuntimeState;
8
+ }
9
+ export declare class VibeFillController {
10
+ private readonly options;
11
+ private abortController;
12
+ private cycle;
13
+ private readonly delayCountdown;
14
+ private requestVersion;
15
+ constructor(options: FillControllerOptions);
16
+ isActive(): boolean;
17
+ applyUpdate(update: VibeBackendFillUpdate): boolean;
18
+ restoreSession(snapshot: VibeFillSessionSnapshot): boolean;
19
+ start(targetValue: VibeFillTarget): Promise<void>;
20
+ cancel(): Promise<void>;
21
+ reset(): void;
22
+ destroy(): void;
23
+ private abortLocalRequest;
24
+ private isCurrent;
25
+ private startFrontend;
26
+ private syncBackendCountdown;
27
+ }
28
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { VibeRuntimeState } from './runtime';
2
+ import type { CreateVibeOptions, VibeCursor } from '../types';
3
+ interface InitialAutofillContext {
4
+ cycleId: string;
5
+ isCurrent: () => boolean;
6
+ onLastCursor: (cursor: VibeCursor) => void;
7
+ options: CreateVibeOptions;
8
+ signal: AbortSignal;
9
+ state: VibeRuntimeState;
10
+ }
11
+ export declare function autofillInitialPage({ cycleId, isCurrent, onLastCursor, options, signal, state, }: InitialAutofillContext): Promise<void>;
12
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { CreateVibeOptions, VibeLayoutMode } from '../types';
2
+ import type { VibeRuntimeState } from './runtime';
3
+ export declare function createInitialRuntimeState(options: CreateVibeOptions, layoutMode: VibeLayoutMode): VibeRuntimeState;
@@ -0,0 +1,37 @@
1
+ export interface MasonryMediaDimensions {
2
+ width: number | null;
3
+ height: number | null;
4
+ preview: {
5
+ width: number | null;
6
+ height: number | null;
7
+ };
8
+ }
9
+ export interface MasonryPosition {
10
+ x: number;
11
+ y: number;
12
+ width: number;
13
+ height: number;
14
+ }
15
+ export interface MasonryLayout {
16
+ columns: number;
17
+ height: number;
18
+ items: MasonryPosition[];
19
+ }
20
+ export interface MasonryEntryOptions {
21
+ containerHeight: number;
22
+ gap: number;
23
+ }
24
+ export interface MasonryViewportOptions {
25
+ scrollTop: number;
26
+ viewportHeight: number;
27
+ overscan: number;
28
+ }
29
+ interface MasonryOptions {
30
+ additionalHeight?: number;
31
+ gap: number;
32
+ minColumnWidth: number;
33
+ }
34
+ export declare function calculateMasonryEntryOffset(options: MasonryEntryOptions): number;
35
+ export declare function calculateVisibleMasonryIndices(items: MasonryPosition[], options: MasonryViewportOptions): number[];
36
+ export declare function calculateMasonryLayout(media: readonly MasonryMediaDimensions[], containerWidth: number, options: MasonryOptions): MasonryLayout;
37
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { VibeItem, VibeItemId, VibeMediaAsset } from '../types';
2
+ export declare function mediaAssets(item: VibeItem): readonly VibeMediaAsset[];
3
+ export declare function clampMediaIndex(item: VibeItem, index: number): number;
4
+ export declare function mediaAssetAt(item: VibeItem, index: number): VibeMediaAsset;
5
+ export declare function mediaStateKey(postId: VibeItemId, mediaIndex: number): string;
@@ -0,0 +1,3 @@
1
+ export type MediaPreviewState = 'loading' | 'ready' | 'error';
2
+ export declare function mediaErrorStatus(src: string): string;
3
+ export declare function mediaErrorLabel(src: string): string;
@@ -0,0 +1 @@
1
+ export declare function isTimedMediaSource(src: string): boolean;
@@ -0,0 +1,3 @@
1
+ import type { CreateVibeOptions } from '../types';
2
+ export declare function validateOptions(options: CreateVibeOptions): void;
3
+ export declare function resolveVibeTarget(target: CreateVibeOptions['target']): Element;
@@ -0,0 +1,3 @@
1
+ import type { VibeItem, VibePage } from '../types';
2
+ export declare function validatePage(page: VibePage): VibePage;
3
+ export declare function appendUniqueItems(current: readonly VibeItem[], incoming: readonly VibeItem[]): VibeItem[];
@@ -0,0 +1,5 @@
1
+ import type { VibeReelAutoAdvanceOptions, VibeReelAutoAdvanceState } from '../types';
2
+ export declare const DEFAULT_REEL_AUTO_ADVANCE_INTERVAL_MS = 5000;
3
+ export declare function validateReelAutoAdvanceOptions(options?: VibeReelAutoAdvanceOptions): void;
4
+ export declare function createReelAutoAdvanceState(options?: VibeReelAutoAdvanceOptions): VibeReelAutoAdvanceState;
5
+ export declare function updateReelAutoAdvanceState(state: VibeReelAutoAdvanceState, update: boolean | VibeReelAutoAdvanceOptions): void;
@@ -0,0 +1,3 @@
1
+ import type { VibeReelInfoSheetOptions, VibeReelInfoSheetState } from '../types';
2
+ export declare function createReelInfoSheetState(options?: VibeReelInfoSheetOptions): VibeReelInfoSheetState;
3
+ export declare function setReelInfoSheetEnabled(state: VibeReelInfoSheetState, options: VibeReelInfoSheetOptions | undefined, enabled: boolean): void;
@@ -0,0 +1,24 @@
1
+ import type { VibeRequestDelayOptions } from '../types';
2
+ export declare const DEFAULT_REQUEST_DELAY_STEP_MS = 2000;
3
+ export declare const DEFAULT_REQUEST_DELAY_MAX_MS = 10000;
4
+ export interface RequestDelaySnapshot {
5
+ delayRemainingMs: number | null;
6
+ nextRequestAt: number | null;
7
+ }
8
+ interface WaitForRequestDelayOptions {
9
+ delayMs: number;
10
+ onChange: (snapshot: RequestDelaySnapshot) => void;
11
+ signal: AbortSignal;
12
+ }
13
+ export declare function validateRequestDelayOptions(options: VibeRequestDelayOptions, name: string): void;
14
+ export declare function getRequestDelayMs(completedRequests: number, options?: VibeRequestDelayOptions): number;
15
+ export declare function getRequestDelaySnapshot(nextRequestAt?: number | null): RequestDelaySnapshot;
16
+ export declare function waitForRequestDelay({ delayMs, onChange, signal, }: WaitForRequestDelayOptions): Promise<void>;
17
+ export declare class RequestDelayCountdown {
18
+ private readonly onChange;
19
+ private interval;
20
+ constructor(onChange: (snapshot: RequestDelaySnapshot) => void);
21
+ clear(): void;
22
+ sync(nextRequestAt?: number | null): void;
23
+ }
24
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { VibeLayout } from '../types';
2
+ export declare const TABLET_SHORT_EDGE = 600;
3
+ export interface ResponsiveLayoutOptions {
4
+ hasHover: boolean;
5
+ screenHeight: number;
6
+ screenWidth: number;
7
+ viewportHeight: number;
8
+ viewportWidth: number;
9
+ }
10
+ export declare function resolvePhoneMode(options: ResponsiveLayoutOptions): boolean;
11
+ export declare function resolveResponsiveLayout(options: ResponsiveLayoutOptions): VibeLayout;
12
+ export declare function resolvePhoneModeForElement(element: Element): boolean;
13
+ export declare function resolveResponsiveLayoutForElement(element: Element): VibeLayout;
@@ -0,0 +1,23 @@
1
+ import type { VibeAutoScrollState, VibeAutofillState, VibeCursor, VibeFillState, VibeItem, VibeItemId, VibeLayout, VibeReelAutoAdvanceState, VibeReelInfoSheetState, VibeState } from '../types';
2
+ export interface VibeRuntimeState {
3
+ activeReelPostId: VibeItemId | null;
4
+ autoScroll: VibeAutoScrollState;
5
+ autofill: VibeAutofillState;
6
+ error: unknown | null;
7
+ fill: VibeFillState;
8
+ infiniteScroll: boolean;
9
+ isLoading: boolean;
10
+ isLoadingMore: boolean;
11
+ items: VibeItem[];
12
+ layout: VibeLayout;
13
+ loadMoreLocked: boolean;
14
+ next: VibeCursor;
15
+ nextPageError: unknown | null;
16
+ reelAutoAdvance: VibeReelAutoAdvanceState;
17
+ reelInfoSheet: VibeReelInfoSheetState;
18
+ reelInfoSheetOverlay: boolean;
19
+ reelMediaSource: 'original' | 'preview';
20
+ reelOrigin: 'masonry' | null;
21
+ total: number | null;
22
+ }
23
+ export declare function snapshotState(state: VibeRuntimeState): VibeState;
@@ -0,0 +1,15 @@
1
+ export interface ScrollbarGeometryOptions {
2
+ contentSize: number;
3
+ minimumThumbSize: number;
4
+ scrollPosition: number;
5
+ trackSize: number;
6
+ viewportSize: number;
7
+ }
8
+ export interface ScrollbarGeometry {
9
+ maximumScrollPosition: number;
10
+ scrollable: boolean;
11
+ thumbOffset: number;
12
+ thumbSize: number;
13
+ thumbTravel: number;
14
+ }
15
+ export declare function calculateScrollbarGeometry({ contentSize, minimumThumbSize, scrollPosition, trackSize, viewportSize, }: ScrollbarGeometryOptions): ScrollbarGeometry;
@@ -0,0 +1,11 @@
1
+ import type { VibeRuntimeState } from './runtime';
2
+ import type { VibeItemId, VibeRoutingOptions } from '../types';
3
+ export declare class VibeRouteSync {
4
+ private readonly options;
5
+ private readonly state;
6
+ private routedReelPostId;
7
+ private reelRouteIsActive;
8
+ constructor(options: VibeRoutingOptions | undefined, state: VibeRuntimeState);
9
+ syncFeed(): void;
10
+ syncReel(postId: VibeItemId): void;
11
+ }