@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.
- package/README.md +531 -308
- package/lib/components/CardRegion.vue.d.ts +15 -0
- package/lib/components/GalleryFooter.vue.d.ts +17 -0
- package/lib/components/GalleryScrollbar.vue.d.ts +9 -0
- package/lib/components/MasonryFeed.vue.d.ts +24 -0
- package/lib/components/MediaCard.vue.d.ts +35 -0
- package/lib/components/MediaControls.vue.d.ts +22 -0
- package/lib/components/ReelAutoAdvanceProgress.vue.d.ts +11 -0
- package/lib/components/ReelFeed.vue.d.ts +28 -0
- package/lib/components/ReelLayout.vue.d.ts +28 -0
- package/lib/components/VibeSurface.vue.d.ts +35 -0
- package/lib/core/autoScroll.d.ts +26 -0
- package/lib/core/autofill.d.ts +35 -0
- package/lib/core/backendAutofill.d.ts +5 -0
- package/lib/core/backendFill.d.ts +5 -0
- package/lib/core/createVibe.d.ts +2 -0
- package/lib/core/feed.d.ts +40 -0
- package/lib/core/fill.d.ts +29 -0
- package/lib/core/fillController.d.ts +28 -0
- package/lib/core/initialAutofill.d.ts +12 -0
- package/lib/core/initialRuntimeState.d.ts +3 -0
- package/lib/core/masonry.d.ts +37 -0
- package/lib/core/mediaAsset.d.ts +5 -0
- package/lib/core/mediaPreview.d.ts +3 -0
- package/lib/core/mediaType.d.ts +1 -0
- package/lib/core/options.d.ts +3 -0
- package/lib/core/page.d.ts +3 -0
- package/lib/core/reelAutoAdvance.d.ts +5 -0
- package/lib/core/reelInfoSheet.d.ts +3 -0
- package/lib/core/requestDelay.d.ts +24 -0
- package/lib/core/responsiveLayout.d.ts +13 -0
- package/lib/core/runtime.d.ts +23 -0
- package/lib/core/scrollbar.d.ts +15 -0
- package/lib/core/vibeRouting.d.ts +11 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +3 -73
- package/lib/index.js +2586 -4949
- package/lib/style.css +1 -2
- package/lib/types.d.ts +323 -0
- package/package.json +13 -7
- package/lib/components/FullscreenFooter.vue.d.ts +0 -22
- package/lib/components/FullscreenForwardFillPlaceholder.vue.d.ts +0 -29
- package/lib/components/FullscreenHeader.vue.d.ts +0 -25
- package/lib/components/FullscreenMediaBar.vue.d.ts +0 -26
- package/lib/components/FullscreenSurface.vue.d.ts +0 -83
- package/lib/components/Layout.vue.d.ts +0 -48
- package/lib/components/ListCard.vue.d.ts +0 -44
- package/lib/components/ListSurface.vue.d.ts +0 -87
- package/lib/components/SurfaceEmptyState.vue.d.ts +0 -21
- package/lib/components/viewer-core/assetErrors.d.ts +0 -30
- package/lib/components/viewer-core/assetState.d.ts +0 -14
- package/lib/components/viewer-core/autoBuckets.d.ts +0 -24
- package/lib/components/viewer-core/autoResolveBucketFactory.d.ts +0 -15
- package/lib/components/viewer-core/autoResolveCursors.d.ts +0 -15
- package/lib/components/viewer-core/autoResolveFillUntil.d.ts +0 -46
- package/lib/components/viewer-core/autoResolveHelpers.d.ts +0 -20
- package/lib/components/viewer-core/autoResolveLoading.d.ts +0 -44
- package/lib/components/viewer-core/autoResolveState.d.ts +0 -72
- package/lib/components/viewer-core/dom.d.ts +0 -2
- package/lib/components/viewer-core/dominantImageTone.d.ts +0 -6
- package/lib/components/viewer-core/emptyVisiblePrefetch.d.ts +0 -18
- package/lib/components/viewer-core/fillDelay.d.ts +0 -9
- package/lib/components/viewer-core/fillProgress.d.ts +0 -12
- package/lib/components/viewer-core/format.d.ts +0 -1
- package/lib/components/viewer-core/fullscreenPreviews.d.ts +0 -8
- package/lib/components/viewer-core/itemIdentity.d.ts +0 -6
- package/lib/components/viewer-core/listCardAsset.d.ts +0 -4
- package/lib/components/viewer-core/listPreview.d.ts +0 -10
- package/lib/components/viewer-core/loadError.d.ts +0 -5
- package/lib/components/viewer-core/masonryBoundaryLock.d.ts +0 -5
- package/lib/components/viewer-core/masonryItemMutation.d.ts +0 -35
- package/lib/components/viewer-core/masonryLayout.d.ts +0 -64
- package/lib/components/viewer-core/masonryLayoutState.d.ts +0 -22
- package/lib/components/viewer-core/masonryPendingAppend.d.ts +0 -19
- package/lib/components/viewer-core/masonryScrollBehavior.d.ts +0 -37
- package/lib/components/viewer-core/masonryViewport.d.ts +0 -7
- package/lib/components/viewer-core/media.d.ts +0 -4
- package/lib/components/viewer-core/mediaPlayback.d.ts +0 -1
- package/lib/components/viewer-core/nativeVideoFullscreen.d.ts +0 -2
- package/lib/components/viewer-core/removalState.d.ts +0 -71
- package/lib/components/viewer-core/slotContent.d.ts +0 -2
- package/lib/components/viewer-core/surfaceSlots.d.ts +0 -33
- package/lib/components/viewer-core/surfaceStatus.d.ts +0 -18
- package/lib/components/viewer-core/theme.d.ts +0 -3
- package/lib/components/viewer-core/useActivation.d.ts +0 -8
- package/lib/components/viewer-core/useAssetLoadQueue.d.ts +0 -17
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +0 -67
- package/lib/components/viewer-core/useController.d.ts +0 -98
- package/lib/components/viewer-core/useDataSource.d.ts +0 -98
- package/lib/components/viewer-core/useEdgeBoundary.d.ts +0 -18
- package/lib/components/viewer-core/useFullscreen.d.ts +0 -1
- package/lib/components/viewer-core/useFullscreenAssetEvents.d.ts +0 -24
- package/lib/components/viewer-core/useFullscreenDominantTone.d.ts +0 -12
- package/lib/components/viewer-core/useFullscreenPreloadController.d.ts +0 -18
- package/lib/components/viewer-core/useFullscreenSurfaceMedia.d.ts +0 -32
- package/lib/components/viewer-core/useListCardHealthCheck.d.ts +0 -20
- package/lib/components/viewer-core/useMasonryList.d.ts +0 -85
- package/lib/components/viewer-core/useMasonryMotion.d.ts +0 -76
- package/lib/components/viewer-core/useMedia.d.ts +0 -44
- package/lib/components/viewer-core/useSurfaceEmptyState.d.ts +0 -15
- package/lib/components/viewer-core/useVideoFullscreen.d.ts +0 -9
- package/lib/components/viewer-core/useViewer.d.ts +0 -78
- package/lib/components/viewer-core/virtualization.d.ts +0 -18
- package/lib/components/viewer.d.ts +0 -23
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
export type VibeMasonryEdgeDirection = 'bottom' | 'top';
|
|
3
|
-
export type VibeMasonryBoundarySyncSource = 'layout' | 'scroll';
|
|
4
|
-
export declare function useEdgeBoundary(options: {
|
|
5
|
-
direction: VibeMasonryEdgeDirection;
|
|
6
|
-
interactionLocked?: Ref<boolean>;
|
|
7
|
-
hasPage: Ref<boolean>;
|
|
8
|
-
isAtBoundary: () => boolean;
|
|
9
|
-
loading: Ref<boolean>;
|
|
10
|
-
requestPage: Ref<(() => void | Promise<void>) | null | undefined>;
|
|
11
|
-
getAnimationLockMs: (addedItemCount: number) => number;
|
|
12
|
-
}): {
|
|
13
|
-
maybeRequestPage: () => void;
|
|
14
|
-
onItemsMutated: (addedItemCount: number) => void;
|
|
15
|
-
onLoadingChange: (isLoading: boolean) => void;
|
|
16
|
-
onWheel: (event: WheelEvent) => void;
|
|
17
|
-
syncBoundary: (source?: VibeMasonryBoundarySyncSource) => void;
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useViewer as useFullscreen } from './useViewer';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { VibeViewerItem } from '../viewer';
|
|
2
|
-
interface FullscreenAssetMediaController {
|
|
3
|
-
getItemKey: (item: VibeViewerItem) => string;
|
|
4
|
-
settleAssetPreload: (id: string) => void;
|
|
5
|
-
shouldHandleSlideAssetEvent: (index: number, item: VibeViewerItem) => boolean;
|
|
6
|
-
}
|
|
7
|
-
interface FullscreenAssetViewer {
|
|
8
|
-
onImageError: (id: string, url: string) => Promise<void>;
|
|
9
|
-
onImageLoad: (id: string, url: string) => void;
|
|
10
|
-
onMediaError: (id: string, url: string) => Promise<void>;
|
|
11
|
-
onMediaEvent: (id: string, event: Event) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function useFullscreenAssetEvents(options: {
|
|
14
|
-
fullscreenMedia: FullscreenAssetMediaController;
|
|
15
|
-
updateDominantToneFromImageElement: (id: string, image: HTMLImageElement) => void;
|
|
16
|
-
viewer: FullscreenAssetViewer;
|
|
17
|
-
}): {
|
|
18
|
-
getHandledItemKey: (index: number, item: VibeViewerItem) => string | null;
|
|
19
|
-
onFullscreenImageError: (index: number, item: VibeViewerItem) => Promise<void>;
|
|
20
|
-
onFullscreenImageLoad: (event: Event, index: number, item: VibeViewerItem) => void;
|
|
21
|
-
onFullscreenMediaError: (index: number, item: VibeViewerItem) => Promise<void>;
|
|
22
|
-
onFullscreenMediaEvent: (index: number, item: VibeViewerItem, event: Event) => string | null;
|
|
23
|
-
};
|
|
24
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
export declare function useFullscreenDominantTone(options: {
|
|
4
|
-
activeItem: Ref<VibeViewerItem | null>;
|
|
5
|
-
getItemKey: (item: VibeViewerItem) => string;
|
|
6
|
-
isImageReady: (id: string) => boolean;
|
|
7
|
-
showDominantImageTone: Ref<boolean | undefined>;
|
|
8
|
-
}): {
|
|
9
|
-
activeStageToneStyle: import("vue").ComputedRef<Record<string, string> | undefined>;
|
|
10
|
-
activeSlideToneStyle: import("vue").ComputedRef<Record<string, string> | undefined>;
|
|
11
|
-
updateFromImageElement: (id: string, image: HTMLImageElement) => void;
|
|
12
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
export type FullscreenSlidePreloadState = 'idle' | 'queued' | 'loading' | 'ready';
|
|
4
|
-
export declare function useFullscreenPreloadController(options: {
|
|
5
|
-
active: Ref<boolean | undefined>;
|
|
6
|
-
items: Ref<VibeViewerItem[]>;
|
|
7
|
-
resolvedActiveIndex: Ref<number>;
|
|
8
|
-
getItemKey: (item: VibeViewerItem) => string;
|
|
9
|
-
isAssetReady: (id: string, item: VibeViewerItem) => boolean;
|
|
10
|
-
onResetAssetState: (id: string) => void;
|
|
11
|
-
}): {
|
|
12
|
-
clearPreloads: () => void;
|
|
13
|
-
getSlidePreloadState: (index: number) => FullscreenSlidePreloadState;
|
|
14
|
-
registerImageElement: (id: string, element: unknown) => void;
|
|
15
|
-
registerMediaElement: (id: string, element: unknown) => void;
|
|
16
|
-
settleAssetPreload: (id: string) => void;
|
|
17
|
-
shouldAttachSlideAsset: (index: number) => boolean;
|
|
18
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
export declare function useFullscreenSurfaceMedia(options: {
|
|
4
|
-
active: Ref<boolean | undefined>;
|
|
5
|
-
items: Ref<VibeViewerItem[]>;
|
|
6
|
-
resolvedActiveIndex: Ref<number>;
|
|
7
|
-
viewer: {
|
|
8
|
-
getAssetErrorKind: (id: string) => unknown;
|
|
9
|
-
getAssetErrorLabel: (id: string) => string | null | undefined;
|
|
10
|
-
getImageSource: (item: VibeViewerItem) => string | undefined;
|
|
11
|
-
isImageReady: (id: string) => boolean;
|
|
12
|
-
isMediaReady: (id: string) => boolean;
|
|
13
|
-
resetAssetState: (id: string) => void;
|
|
14
|
-
};
|
|
15
|
-
}): {
|
|
16
|
-
getAssetErrorKind: (item: VibeViewerItem) => unknown;
|
|
17
|
-
getAssetErrorLabel: (item: VibeViewerItem) => string;
|
|
18
|
-
getFullscreenAudioCoverSource: (item: VibeViewerItem) => string | null;
|
|
19
|
-
getFullscreenImageSource: (index: number, item: VibeViewerItem) => string | undefined;
|
|
20
|
-
getFullscreenMediaPreload: (index: number) => "none" | "metadata";
|
|
21
|
-
getFullscreenMediaSource: (index: number, item: VibeViewerItem) => string | undefined;
|
|
22
|
-
getItemKey: (item: VibeViewerItem) => string;
|
|
23
|
-
getMediaActionLabel: (action: "Play" | "Pause", item: VibeViewerItem) => string;
|
|
24
|
-
getSlidePreloadState: (index: number) => import("./useFullscreenPreloadController").FullscreenSlidePreloadState;
|
|
25
|
-
isAssetErrored: (index: number, item: VibeViewerItem) => boolean;
|
|
26
|
-
isAssetLoading: (index: number, item: VibeViewerItem) => boolean;
|
|
27
|
-
registerImageElement: (id: string, element: unknown) => void;
|
|
28
|
-
registerMediaElement: (id: string, element: unknown) => void;
|
|
29
|
-
settleAssetPreload: (id: string) => void;
|
|
30
|
-
shouldHandleSlideAssetEvent: (index: number, item: VibeViewerItem) => boolean;
|
|
31
|
-
shouldPreloadSlideAsset: (index: number) => boolean;
|
|
32
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
import type { VibeAssetErrorReporter } from './assetErrors';
|
|
4
|
-
import { type VibeAssetErrorKind } from './loadError';
|
|
5
|
-
type UseListCardHealthCheckOptions = {
|
|
6
|
-
attachedAssetUrl: ComputedRef<string | null>;
|
|
7
|
-
getPriority: () => number;
|
|
8
|
-
isInView: Ref<boolean>;
|
|
9
|
-
isReady: Ref<boolean>;
|
|
10
|
-
item: ComputedRef<VibeViewerItem>;
|
|
11
|
-
loadErrorKind: Ref<VibeAssetErrorKind | null>;
|
|
12
|
-
reportAssetError?: VibeAssetErrorReporter | null;
|
|
13
|
-
surfaceActive: ComputedRef<boolean>;
|
|
14
|
-
};
|
|
15
|
-
export declare function useListCardHealthCheck(options: UseListCardHealthCheckOptions): {
|
|
16
|
-
errorKind: Ref<VibeAssetErrorKind | null, VibeAssetErrorKind | null>;
|
|
17
|
-
release: () => void;
|
|
18
|
-
retry: () => boolean;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
export declare function useVibeMasonryList(options: {
|
|
4
|
-
active: Ref<boolean>;
|
|
5
|
-
allowExhaustedNextPageRefresh: Ref<boolean>;
|
|
6
|
-
bottomLoadBufferPx: Ref<number | undefined>;
|
|
7
|
-
items: Ref<VibeViewerItem[]>;
|
|
8
|
-
activeIndex: Ref<number>;
|
|
9
|
-
loading: Ref<boolean>;
|
|
10
|
-
hasNextPage: Ref<boolean>;
|
|
11
|
-
hasPreviousPage: Ref<boolean>;
|
|
12
|
-
paginationDetail: Ref<string | null>;
|
|
13
|
-
pendingAppendItems: Ref<VibeViewerItem[]>;
|
|
14
|
-
commitPendingAppend: Ref<(() => void | Promise<void>) | null | undefined>;
|
|
15
|
-
requestNextPage: Ref<(() => void | Promise<void>) | null | undefined>;
|
|
16
|
-
requestPreviousPage: Ref<(() => void | Promise<void>) | null | undefined>;
|
|
17
|
-
setActiveIndex: (index: number) => void;
|
|
18
|
-
}): {
|
|
19
|
-
autoScroll: (speed: number) => void;
|
|
20
|
-
columnWidth: import("vue").ComputedRef<number>;
|
|
21
|
-
containerHeight: import("vue").ComputedRef<number>;
|
|
22
|
-
getCardStyle: (index: number) => {
|
|
23
|
-
height: string;
|
|
24
|
-
width: string;
|
|
25
|
-
transition: string | undefined;
|
|
26
|
-
transitionDelay: string | undefined;
|
|
27
|
-
transform: string;
|
|
28
|
-
};
|
|
29
|
-
getLeavingCardStyle: (item: VibeViewerItem) => {
|
|
30
|
-
opacity: string;
|
|
31
|
-
transform: string;
|
|
32
|
-
transition: string;
|
|
33
|
-
height?: undefined;
|
|
34
|
-
width?: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
height: string;
|
|
37
|
-
opacity: string;
|
|
38
|
-
transform: string;
|
|
39
|
-
transition: string;
|
|
40
|
-
width: string;
|
|
41
|
-
};
|
|
42
|
-
getScrollbarThumbStyle: () => {
|
|
43
|
-
height: string;
|
|
44
|
-
transform: string;
|
|
45
|
-
};
|
|
46
|
-
leavingItems: import("vue").ComputedRef<{
|
|
47
|
-
height: number;
|
|
48
|
-
item: {
|
|
49
|
-
[x: string]: unknown;
|
|
50
|
-
id: string;
|
|
51
|
-
type: import("../viewer").VibeViewerType;
|
|
52
|
-
title?: string | undefined;
|
|
53
|
-
url: string;
|
|
54
|
-
preview?: {
|
|
55
|
-
url: string;
|
|
56
|
-
width?: number | undefined;
|
|
57
|
-
height?: number | undefined;
|
|
58
|
-
mediaType?: import("../viewer").VibeRenderableMediaType | undefined;
|
|
59
|
-
} | undefined;
|
|
60
|
-
healthCheck?: {
|
|
61
|
-
kind?: "playback" | undefined;
|
|
62
|
-
url: string;
|
|
63
|
-
} | null | undefined;
|
|
64
|
-
width?: number | undefined;
|
|
65
|
-
height?: number | undefined;
|
|
66
|
-
};
|
|
67
|
-
position: {
|
|
68
|
-
x: number;
|
|
69
|
-
y: number;
|
|
70
|
-
};
|
|
71
|
-
}[]>;
|
|
72
|
-
nextBoundaryLoadProgress: import("vue").ComputedRef<number>;
|
|
73
|
-
onScroll: () => void;
|
|
74
|
-
onWheel: (event: WheelEvent) => void;
|
|
75
|
-
paginationLabel: import("vue").ComputedRef<string>;
|
|
76
|
-
previousBoundaryLoadProgress: import("vue").ComputedRef<number>;
|
|
77
|
-
renderedItems: import("vue").ComputedRef<{
|
|
78
|
-
item: VibeViewerItem;
|
|
79
|
-
index: number;
|
|
80
|
-
}[]>;
|
|
81
|
-
resolvedActiveIndex: import("vue").ComputedRef<number>;
|
|
82
|
-
scrollToIndex: (index: number, alignment: "center" | "nearest") => void;
|
|
83
|
-
showScrollbar: import("vue").ComputedRef<boolean>;
|
|
84
|
-
scrollViewportRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
85
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
import type { LayoutPosition } from './masonryLayout';
|
|
4
|
-
export type VibeMasonryEnterDirection = 'bottom' | 'top';
|
|
5
|
-
export interface VibeMasonryLeavingItem {
|
|
6
|
-
height: number;
|
|
7
|
-
item: VibeViewerItem;
|
|
8
|
-
position: LayoutPosition;
|
|
9
|
-
}
|
|
10
|
-
export declare function getVibeMasonryEnterOrder(itemIds: string[], direction: VibeMasonryEnterDirection): string[];
|
|
11
|
-
export declare function getVibeMasonryEnterDuration(itemCount: number): number;
|
|
12
|
-
export declare function shouldWindowVibeMasonryEnterTracking(pendingCount: number, addedCount: number, maxPendingItems?: number): boolean;
|
|
13
|
-
export declare function getVibeMasonryLeaveDuration(): number;
|
|
14
|
-
export declare function getVibeMasonryEnterStartY(options: {
|
|
15
|
-
direction: VibeMasonryEnterDirection;
|
|
16
|
-
itemHeight: number;
|
|
17
|
-
columnWidth: number;
|
|
18
|
-
scrollTop: number;
|
|
19
|
-
viewportHeight: number;
|
|
20
|
-
}): number;
|
|
21
|
-
export declare function useMasonryMotion(options: {
|
|
22
|
-
items: Ref<VibeViewerItem[]>;
|
|
23
|
-
visibleIndices: ComputedRef<number[]>;
|
|
24
|
-
positions: Ref<LayoutPosition[]>;
|
|
25
|
-
heights: Ref<number[]>;
|
|
26
|
-
indexById: Ref<Map<string, number>>;
|
|
27
|
-
columnWidth: ComputedRef<number>;
|
|
28
|
-
scrollTop: Ref<number>;
|
|
29
|
-
viewportHeight: Ref<number>;
|
|
30
|
-
}): {
|
|
31
|
-
getCardTransform: (index: number) => string;
|
|
32
|
-
getCardTransition: (itemId: string) => string | undefined;
|
|
33
|
-
getCardTransitionDelay: (itemId: string) => string | undefined;
|
|
34
|
-
getLeavingCardStyle: (item: VibeViewerItem) => {
|
|
35
|
-
opacity: string;
|
|
36
|
-
transform: string;
|
|
37
|
-
transition: string;
|
|
38
|
-
height?: undefined;
|
|
39
|
-
width?: undefined;
|
|
40
|
-
} | {
|
|
41
|
-
height: string;
|
|
42
|
-
opacity: string;
|
|
43
|
-
transform: string;
|
|
44
|
-
transition: string;
|
|
45
|
-
width: string;
|
|
46
|
-
};
|
|
47
|
-
leavingItems: ComputedRef<{
|
|
48
|
-
height: number;
|
|
49
|
-
item: {
|
|
50
|
-
[x: string]: unknown;
|
|
51
|
-
id: string;
|
|
52
|
-
type: import("../viewer").VibeViewerType;
|
|
53
|
-
title?: string | undefined;
|
|
54
|
-
url: string;
|
|
55
|
-
preview?: {
|
|
56
|
-
url: string;
|
|
57
|
-
width?: number | undefined;
|
|
58
|
-
height?: number | undefined;
|
|
59
|
-
mediaType?: import("../viewer").VibeRenderableMediaType | undefined;
|
|
60
|
-
} | undefined;
|
|
61
|
-
healthCheck?: {
|
|
62
|
-
kind?: "playback" | undefined;
|
|
63
|
-
url: string;
|
|
64
|
-
} | null | undefined;
|
|
65
|
-
width?: number | undefined;
|
|
66
|
-
height?: number | undefined;
|
|
67
|
-
};
|
|
68
|
-
position: {
|
|
69
|
-
x: number;
|
|
70
|
-
y: number;
|
|
71
|
-
};
|
|
72
|
-
}[]>;
|
|
73
|
-
markEnter: (items: VibeViewerItem[], direction?: VibeMasonryEnterDirection) => void;
|
|
74
|
-
markLeave: (items: VibeMasonryLeavingItem[]) => void;
|
|
75
|
-
playFlipMoveAnimation: (oldPositionsById: Map<string, LayoutPosition>, skipIds?: Set<string>, durationMs?: number) => void;
|
|
76
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
import type { VibeAssetErrorReporter, VibeAssetLoadReporter } from './assetErrors';
|
|
4
|
-
import { type MediaUiState } from './assetState';
|
|
5
|
-
import { type VibeAssetErrorKind } from './loadError';
|
|
6
|
-
export declare function useMedia(options: {
|
|
7
|
-
items: Ref<VibeViewerItem[]>;
|
|
8
|
-
activeItem: Ref<VibeViewerItem | null>;
|
|
9
|
-
activeMediaItem: Ref<VibeViewerItem | null>;
|
|
10
|
-
isEnabled: Ref<boolean>;
|
|
11
|
-
itemCount: Ref<number>;
|
|
12
|
-
loopFullscreenVideo: Ref<boolean>;
|
|
13
|
-
onAssetError?: VibeAssetErrorReporter;
|
|
14
|
-
onAssetLoad?: VibeAssetLoadReporter;
|
|
15
|
-
}): {
|
|
16
|
-
activeAssetErrorKind: import("vue").ComputedRef<VibeAssetErrorKind | null>;
|
|
17
|
-
activeMediaDuration: import("vue").ComputedRef<number>;
|
|
18
|
-
activeMediaProgress: import("vue").ComputedRef<number>;
|
|
19
|
-
activeMediaState: import("vue").ComputedRef<MediaUiState>;
|
|
20
|
-
getAssetErrorKind: (id: string) => VibeAssetErrorKind | null;
|
|
21
|
-
getAssetErrorLabel: (id: string) => "404" | "Load error" | null;
|
|
22
|
-
getAssetRenderKey: (id: string) => string;
|
|
23
|
-
getImageSource: (item: VibeViewerItem) => string;
|
|
24
|
-
isImageReady: (id: string) => boolean;
|
|
25
|
-
isMediaReady: (id: string) => boolean;
|
|
26
|
-
canRetryAsset: (id: string) => boolean;
|
|
27
|
-
mediaStates: Ref<Record<string, MediaUiState>, Record<string, MediaUiState>>;
|
|
28
|
-
onAudioCoverClick: (event: MouseEvent, id: string, suppressMediaToggleUntil: number) => void;
|
|
29
|
-
onImageError: (id: string, url: string) => Promise<void>;
|
|
30
|
-
onImageLoad: (id: string, url: string) => void;
|
|
31
|
-
onMediaError: (id: string, url: string) => Promise<void>;
|
|
32
|
-
onMediaEvent: (id: string, event: Event) => void;
|
|
33
|
-
onMediaSeekInput: (event: Event) => void;
|
|
34
|
-
onMediaVolumeInput: (event: Event) => void;
|
|
35
|
-
onMediaVolumeToggle: () => void;
|
|
36
|
-
onVideoClick: (event: MouseEvent, id: string, suppressMediaToggleUntil: number) => void;
|
|
37
|
-
registerAudioElement: (id: string, element: unknown) => void;
|
|
38
|
-
registerImageElement: (id: string, element: unknown) => void;
|
|
39
|
-
registerVideoElement: (id: string, element: unknown) => void;
|
|
40
|
-
resetAssetState: (id: string) => void;
|
|
41
|
-
resetMediaState: () => void;
|
|
42
|
-
retryAsset: (id: string) => Promise<void>;
|
|
43
|
-
syncMediaPlayback: () => Promise<void>;
|
|
44
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
import type { VibeEmptyStateMode, VibeEmptyStateSlotProps } from './surfaceSlots';
|
|
3
|
-
export declare const DEFAULT_VIBE_EMPTY_STATE_MESSAGE = "no items available";
|
|
4
|
-
export declare function useSurfaceEmptyState(options: {
|
|
5
|
-
emptyStateMode: Ref<VibeEmptyStateMode | undefined>;
|
|
6
|
-
itemCount: Ref<number>;
|
|
7
|
-
loading: Ref<boolean | undefined>;
|
|
8
|
-
renderSlot?: ((props: VibeEmptyStateSlotProps) => unknown) | undefined;
|
|
9
|
-
surface: VibeEmptyStateSlotProps['surface'];
|
|
10
|
-
}): {
|
|
11
|
-
emptyStateProps: import("vue").ComputedRef<VibeEmptyStateSlotProps | null>;
|
|
12
|
-
showBadgeEmptyState: import("vue").ComputedRef<boolean>;
|
|
13
|
-
showCustomEmptyState: import("vue").ComputedRef<boolean>;
|
|
14
|
-
showInlineEmptyState: import("vue").ComputedRef<boolean>;
|
|
15
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
export declare function useVideoFullscreen(options: {
|
|
4
|
-
activeItem: Ref<VibeViewerItem | null>;
|
|
5
|
-
getItemKey: (item: VibeViewerItem) => string;
|
|
6
|
-
}): {
|
|
7
|
-
registerElement: (id: string, element: unknown) => void;
|
|
8
|
-
request: () => void;
|
|
9
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
import type { VibeAssetErrorReporter, VibeAssetLoadReporter } from './assetErrors';
|
|
4
|
-
import { formatPlaybackTime } from './format';
|
|
5
|
-
import type { VibeLoadPhase } from './removalState';
|
|
6
|
-
export type { VibeResolveParams, VibeResolveResult, VibeEmit, VibeHandle, VibeInitialState, VibeFillMode, VibeLoadPhase, VibeProps, VibeSurfaceMode, } from './useDataSource';
|
|
7
|
-
export type { VibeAssetErrorKind } from './loadError';
|
|
8
|
-
export type { VibeStatus } from './removalState';
|
|
9
|
-
export type { VibeAssetErrorEvent, VibeAssetErrorReporter, VibeAssetErrorSurface, VibeAssetLoadEvent, VibeAssetLoadReporter, VibeAssetLoadSurface } from './assetErrors';
|
|
10
|
-
export type { VibeEmptyStateMode, VibeEmptyStateSlotProps } from './surfaceSlots';
|
|
11
|
-
export interface VibeViewerProps {
|
|
12
|
-
activeIndex?: number;
|
|
13
|
-
errorMessage?: string | null;
|
|
14
|
-
hasNextPage?: boolean;
|
|
15
|
-
items: VibeViewerItem[];
|
|
16
|
-
loading?: boolean;
|
|
17
|
-
loopFullscreenVideo?: boolean;
|
|
18
|
-
paginationDetail?: string | null;
|
|
19
|
-
phase?: VibeLoadPhase | null;
|
|
20
|
-
}
|
|
21
|
-
export declare function useViewer(props: Readonly<VibeViewerProps>, emit: (event: 'update:activeIndex', value: number) => void, options?: {
|
|
22
|
-
enabled?: Ref<boolean>;
|
|
23
|
-
onAssetError?: VibeAssetErrorReporter;
|
|
24
|
-
onAssetLoad?: VibeAssetLoadReporter;
|
|
25
|
-
}): {
|
|
26
|
-
activeItem: import("vue").ComputedRef<VibeViewerItem>;
|
|
27
|
-
activeAssetErrorKind: import("vue").ComputedRef<import("./loadError").VibeAssetErrorKind | null>;
|
|
28
|
-
activeMediaDuration: import("vue").ComputedRef<number>;
|
|
29
|
-
activeMediaItem: import("vue").ComputedRef<VibeViewerItem | null>;
|
|
30
|
-
activeMediaProgress: import("vue").ComputedRef<number>;
|
|
31
|
-
activeMediaState: import("vue").ComputedRef<import("./assetState").MediaUiState>;
|
|
32
|
-
canRetryAsset: (id: string) => boolean;
|
|
33
|
-
canRetryInitialLoad: import("vue").ComputedRef<boolean>;
|
|
34
|
-
errorMessage: import("vue").ComputedRef<string | null>;
|
|
35
|
-
getAssetErrorKind: (id: string) => import("./loadError").VibeAssetErrorKind | null;
|
|
36
|
-
getAssetErrorLabel: (id: string) => "404" | "Load error" | null;
|
|
37
|
-
getAssetRenderKey: (id: string) => string;
|
|
38
|
-
formatPlaybackTime: typeof formatPlaybackTime;
|
|
39
|
-
getImageSource: (item: VibeViewerItem) => string;
|
|
40
|
-
getSlideStyle: (index: number) => import("vue").CSSProperties;
|
|
41
|
-
hasNextPage: import("vue").ComputedRef<boolean>;
|
|
42
|
-
isAtEnd: import("vue").ComputedRef<boolean>;
|
|
43
|
-
isAudio: (item: VibeViewerItem) => boolean;
|
|
44
|
-
isVisual: (item: VibeViewerItem) => boolean;
|
|
45
|
-
items: import("vue").ComputedRef<VibeViewerItem[]>;
|
|
46
|
-
loading: import("vue").ComputedRef<boolean>;
|
|
47
|
-
mediaStates: Ref<Record<string, import("./assetState").MediaUiState>, Record<string, import("./assetState").MediaUiState>>;
|
|
48
|
-
isImageReady: (id: string) => boolean;
|
|
49
|
-
isMediaReady: (id: string) => boolean;
|
|
50
|
-
onAudioCoverClick: (event: MouseEvent, id: string) => void;
|
|
51
|
-
onImageError: (id: string, url: string) => Promise<void>;
|
|
52
|
-
onImageLoad: (id: string, url: string) => void;
|
|
53
|
-
onMediaEvent: (id: string, event: Event) => void;
|
|
54
|
-
onMediaError: (id: string, url: string) => Promise<void>;
|
|
55
|
-
onMediaSeekInput: (event: Event) => void;
|
|
56
|
-
onMediaVolumeInput: (event: Event) => void;
|
|
57
|
-
onMediaVolumeToggle: () => void;
|
|
58
|
-
onPointerCancel: (event: PointerEvent) => void;
|
|
59
|
-
onPointerDown: (event: PointerEvent) => void;
|
|
60
|
-
onPointerMove: (event: PointerEvent) => void;
|
|
61
|
-
onPointerUp: (event: PointerEvent) => void;
|
|
62
|
-
onVideoClick: (event: MouseEvent, id: string) => void;
|
|
63
|
-
onWheel: (event: WheelEvent) => void;
|
|
64
|
-
registerAudioElement: (id: string, element: unknown) => void;
|
|
65
|
-
registerImageElement: (id: string, element: unknown) => void;
|
|
66
|
-
registerVideoElement: (id: string, element: unknown) => void;
|
|
67
|
-
renderedItems: import("vue").ComputedRef<import("./virtualization").VibeRenderedItem[]>;
|
|
68
|
-
renderedRange: import("vue").ComputedRef<import("./virtualization").VibeRenderedRange>;
|
|
69
|
-
resolvedActiveIndex: import("vue").ComputedRef<number>;
|
|
70
|
-
resetAssetState: (id: string) => void;
|
|
71
|
-
retryInitialLoad: () => Promise<void>;
|
|
72
|
-
retryAsset: (id: string) => Promise<void>;
|
|
73
|
-
stageRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
74
|
-
statusKind: import("vue").ComputedRef<import("./surfaceSlots").VibeSurfaceStatusKind | null>;
|
|
75
|
-
statusMessage: import("vue").ComputedRef<string | null>;
|
|
76
|
-
paginationDetail: import("vue").ComputedRef<string | null>;
|
|
77
|
-
phase: import("vue").ComputedRef<VibeLoadPhase>;
|
|
78
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue';
|
|
2
|
-
import type { VibeViewerItem } from '../viewer';
|
|
3
|
-
export interface VibeRenderedRange {
|
|
4
|
-
start: number;
|
|
5
|
-
end: number;
|
|
6
|
-
}
|
|
7
|
-
export interface VibeRenderedItem {
|
|
8
|
-
item: VibeViewerItem;
|
|
9
|
-
index: number;
|
|
10
|
-
}
|
|
11
|
-
export interface VibeRenderedOverscan {
|
|
12
|
-
backward: number;
|
|
13
|
-
forward: number;
|
|
14
|
-
}
|
|
15
|
-
export declare const VIBE_WINDOW_OVERSCAN: VibeRenderedOverscan;
|
|
16
|
-
export declare function getRenderedRange(activeIndex: number, totalItems: number, overscan?: VibeRenderedOverscan): VibeRenderedRange;
|
|
17
|
-
export declare function getRenderedItems(items: VibeViewerItem[], activeIndex: number, overscan?: VibeRenderedOverscan): VibeRenderedItem[];
|
|
18
|
-
export declare function getVirtualSlideStyle(index: number, activeIndex: number, viewportHeight: number, dragOffset: number, isDragging: boolean): CSSProperties;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type VibeViewerType = 'image' | 'video' | 'audio' | 'other';
|
|
2
|
-
export type VibeRenderableMediaType = 'image' | 'video';
|
|
3
|
-
export interface VibeViewerAsset {
|
|
4
|
-
url: string;
|
|
5
|
-
width?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
mediaType?: VibeRenderableMediaType;
|
|
8
|
-
}
|
|
9
|
-
export interface VibeViewerHealthCheck {
|
|
10
|
-
kind?: 'playback';
|
|
11
|
-
url: string;
|
|
12
|
-
}
|
|
13
|
-
export interface VibeViewerItem {
|
|
14
|
-
id: string;
|
|
15
|
-
type: VibeViewerType;
|
|
16
|
-
title?: string;
|
|
17
|
-
url: string;
|
|
18
|
-
preview?: VibeViewerAsset;
|
|
19
|
-
healthCheck?: VibeViewerHealthCheck | null;
|
|
20
|
-
width?: number;
|
|
21
|
-
height?: number;
|
|
22
|
-
[key: string]: unknown;
|
|
23
|
-
}
|