@wyxos/vibe 3.0.5 → 3.0.6
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/FullscreenSurface.vue.d.ts +4 -1
- package/lib/components/Layout.vue.d.ts +2 -1
- package/lib/components/ListSurface.vue.d.ts +4 -1
- package/lib/components/SurfaceEmptyState.vue.d.ts +21 -0
- package/lib/components/viewer-core/surfaceSlots.d.ts +8 -0
- package/lib/components/viewer-core/useDataSource.d.ts +2 -0
- package/lib/components/viewer-core/useEdgeBoundary.d.ts +1 -0
- package/lib/components/viewer-core/useFullscreenSurfaceMedia.d.ts +23 -0
- package/lib/components/viewer-core/useMasonryList.d.ts +34 -0
- package/lib/components/viewer-core/useMasonryMotion.d.ts +41 -0
- package/lib/components/viewer-core/useSurfaceEmptyState.d.ts +15 -0
- package/lib/components/viewer-core/useViewer.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +1256 -984
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
import type { VibeViewerItem } from './viewer';
|
|
3
3
|
import type { VibeAssetErrorReporter, VibeAssetLoadReporter } from './viewer-core/assetErrors';
|
|
4
|
-
import type { VibeFullscreenStatusSlotProps, VibeSurfaceSlotProps } from './viewer-core/surfaceSlots';
|
|
4
|
+
import type { VibeEmptyStateMode, VibeEmptyStateSlotProps, VibeFullscreenStatusSlotProps, VibeSurfaceSlotProps } from './viewer-core/surfaceSlots';
|
|
5
5
|
import type { VibeLoadPhase } from './viewer-core/useViewer';
|
|
6
6
|
import './viewer-core/fullscreenMediaBar.css';
|
|
7
7
|
interface FullscreenSurfaceProps {
|
|
8
8
|
active?: boolean;
|
|
9
9
|
activeIndex?: number;
|
|
10
|
+
emptyStateMode?: VibeEmptyStateMode;
|
|
10
11
|
errorMessage?: string | null;
|
|
11
12
|
hasNextPage?: boolean;
|
|
12
13
|
items: VibeViewerItem[];
|
|
@@ -20,6 +21,7 @@ interface FullscreenSurfaceProps {
|
|
|
20
21
|
showStatusBadges?: boolean;
|
|
21
22
|
}
|
|
22
23
|
type __VLS_Slots = {
|
|
24
|
+
'empty-state'?: (props: VibeEmptyStateSlotProps) => unknown;
|
|
23
25
|
'fullscreen-aside'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
24
26
|
'fullscreen-header-actions'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
25
27
|
'fullscreen-overlay'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
@@ -37,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<FullscreenSurfaceProps,
|
|
|
37
39
|
"onBack-to-list"?: (() => any) | undefined;
|
|
38
40
|
}>, {
|
|
39
41
|
loading: boolean;
|
|
42
|
+
emptyStateMode: VibeEmptyStateMode;
|
|
40
43
|
paginationDetail: string | null;
|
|
41
44
|
showEndBadge: boolean;
|
|
42
45
|
showStatusBadges: boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type Component } from 'vue';
|
|
2
2
|
import type { VibeViewerItem } from './viewer';
|
|
3
3
|
import { type VibeAssetErrorEvent, type VibeAssetLoadEvent } from './viewer-core/assetErrors';
|
|
4
|
-
import type { VibeFullscreenStatusSlotProps, VibeGridStatusSlotProps, VibeSurfaceSlotProps } from './viewer-core/surfaceSlots';
|
|
4
|
+
import type { VibeEmptyStateSlotProps, VibeFullscreenStatusSlotProps, VibeGridStatusSlotProps, VibeSurfaceSlotProps } from './viewer-core/surfaceSlots';
|
|
5
5
|
import type { VibeHandle, VibeProps } from './viewer-core/useViewer';
|
|
6
6
|
type __VLS_Slots = {
|
|
7
|
+
'empty-state'?: (props: VibeEmptyStateSlotProps) => unknown;
|
|
7
8
|
'fullscreen-aside'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
8
9
|
'fullscreen-header-actions'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
9
10
|
'fullscreen-overlay'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
import type { VibeViewerItem } from './viewer';
|
|
3
3
|
import type { VibeAssetErrorReporter, VibeAssetLoadReporter } from './viewer-core/assetErrors';
|
|
4
|
-
import type { VibeGridStatusSlotProps } from './viewer-core/surfaceSlots';
|
|
4
|
+
import type { VibeEmptyStateMode, VibeEmptyStateSlotProps, VibeGridStatusSlotProps } from './viewer-core/surfaceSlots';
|
|
5
5
|
import type { VibeLoadPhase } from './viewer-core/useViewer';
|
|
6
6
|
type __VLS_Props = {
|
|
7
7
|
active?: boolean;
|
|
8
8
|
activeIndex?: number;
|
|
9
9
|
allowExhaustedNextPageRefresh?: boolean;
|
|
10
10
|
commitPendingAppend?: (() => void | Promise<void>) | null;
|
|
11
|
+
emptyStateMode?: VibeEmptyStateMode;
|
|
11
12
|
errorMessage?: string | null;
|
|
12
13
|
hasNextPage?: boolean;
|
|
13
14
|
hasPreviousPage?: boolean;
|
|
@@ -23,6 +24,7 @@ type __VLS_Props = {
|
|
|
23
24
|
showStatusBadges?: boolean;
|
|
24
25
|
};
|
|
25
26
|
type __VLS_Slots = {
|
|
27
|
+
'empty-state'?: (props: VibeEmptyStateSlotProps) => unknown;
|
|
26
28
|
'grid-footer'?: () => unknown;
|
|
27
29
|
'grid-item-overlay'?: (props: {
|
|
28
30
|
active: boolean;
|
|
@@ -46,6 +48,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
46
48
|
"onOpen-fullscreen"?: ((index: number) => any) | undefined;
|
|
47
49
|
}>, {
|
|
48
50
|
loading: boolean;
|
|
51
|
+
emptyStateMode: VibeEmptyStateMode;
|
|
49
52
|
paginationDetail: string | null;
|
|
50
53
|
showStatusBadges: boolean;
|
|
51
54
|
activeIndex: number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { VibeEmptyStateSlotProps } from './viewer-core/surfaceSlots';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
message: string;
|
|
4
|
+
mode: VibeEmptyStateSlotProps['mode'];
|
|
5
|
+
surface: VibeEmptyStateSlotProps['surface'];
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_1) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_3) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: 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 __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -7,6 +7,14 @@ export type VibeSurfaceSlotProps = {
|
|
|
7
7
|
paginationDetail: string | null;
|
|
8
8
|
total: number;
|
|
9
9
|
};
|
|
10
|
+
export type VibeEmptyStateMode = 'inline' | 'badge' | 'hidden';
|
|
11
|
+
export type VibeEmptyStateSlotProps = {
|
|
12
|
+
loading: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
mode: Exclude<VibeEmptyStateMode, 'hidden'>;
|
|
15
|
+
surface: 'fullscreen' | 'grid';
|
|
16
|
+
total: number;
|
|
17
|
+
};
|
|
10
18
|
export type VibeSurfaceStatusKind = 'end' | 'failed' | 'filling' | 'initializing' | 'loading-more' | 'refreshing';
|
|
11
19
|
export type VibeFullscreenStatusSlotProps = VibeSurfaceSlotProps & {
|
|
12
20
|
kind: VibeSurfaceStatusKind;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { VibeViewerItem } from '../viewer';
|
|
2
|
+
import type { VibeEmptyStateMode } from './surfaceSlots';
|
|
2
3
|
export type { VibeHandle, VibeRemoveResult } from './removalState';
|
|
3
4
|
export type { VibeFeedMode, VibeLoadPhase, VibeSurfaceMode } from './removalState';
|
|
4
5
|
export interface VibeResolveParams {
|
|
@@ -19,6 +20,7 @@ export interface VibeInitialState {
|
|
|
19
20
|
activeIndex?: number;
|
|
20
21
|
}
|
|
21
22
|
export interface VibeProps {
|
|
23
|
+
emptyStateMode?: VibeEmptyStateMode;
|
|
22
24
|
fillDelayMs?: number;
|
|
23
25
|
fillDelayStepMs?: number;
|
|
24
26
|
initialCursor?: string | null;
|
|
@@ -2,6 +2,7 @@ import { type Ref } from 'vue';
|
|
|
2
2
|
export type VibeMasonryEdgeDirection = 'bottom' | 'top';
|
|
3
3
|
export declare function useEdgeBoundary(options: {
|
|
4
4
|
direction: VibeMasonryEdgeDirection;
|
|
5
|
+
interactionLocked?: Ref<boolean>;
|
|
5
6
|
hasPage: Ref<boolean>;
|
|
6
7
|
isAtBoundary: () => boolean;
|
|
7
8
|
loading: Ref<boolean>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { VibeViewerItem } from '../viewer';
|
|
3
|
+
export declare function useFullscreenSurfaceMedia(options: {
|
|
4
|
+
active: Ref<boolean | undefined>;
|
|
5
|
+
resolvedActiveIndex: Ref<number>;
|
|
6
|
+
viewer: {
|
|
7
|
+
getAssetErrorKind: (id: string) => unknown;
|
|
8
|
+
getAssetErrorLabel: (id: string) => string | null | undefined;
|
|
9
|
+
getImageSource: (item: VibeViewerItem) => string | undefined;
|
|
10
|
+
isImageReady: (id: string) => boolean;
|
|
11
|
+
isMediaReady: (id: string) => boolean;
|
|
12
|
+
};
|
|
13
|
+
}): {
|
|
14
|
+
getAssetErrorKind: (item: VibeViewerItem) => unknown;
|
|
15
|
+
getAssetErrorLabel: (item: VibeViewerItem) => string;
|
|
16
|
+
getFullscreenImageSource: (index: number, item: VibeViewerItem) => string | undefined;
|
|
17
|
+
getFullscreenMediaSource: (index: number, item: VibeViewerItem) => string | undefined;
|
|
18
|
+
getItemKey: (item: VibeViewerItem) => string;
|
|
19
|
+
getMediaActionLabel: (action: "Play" | "Pause", item: VibeViewerItem) => string;
|
|
20
|
+
isAssetErrored: (index: number, item: VibeViewerItem) => boolean;
|
|
21
|
+
isAssetLoading: (index: number, item: VibeViewerItem) => boolean;
|
|
22
|
+
shouldPreloadSlideAsset: (index: number) => boolean;
|
|
23
|
+
};
|
|
@@ -24,10 +24,44 @@ export declare function useVibeMasonryList(options: {
|
|
|
24
24
|
transitionDelay: string | undefined;
|
|
25
25
|
transform: string;
|
|
26
26
|
};
|
|
27
|
+
getLeavingCardStyle: (item: VibeViewerItem) => {
|
|
28
|
+
opacity: string;
|
|
29
|
+
transform: string;
|
|
30
|
+
transition: string;
|
|
31
|
+
height?: undefined;
|
|
32
|
+
width?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
height: string;
|
|
35
|
+
opacity: string;
|
|
36
|
+
transform: string;
|
|
37
|
+
transition: string;
|
|
38
|
+
width: string;
|
|
39
|
+
};
|
|
27
40
|
getScrollbarThumbStyle: () => {
|
|
28
41
|
height: string;
|
|
29
42
|
transform: string;
|
|
30
43
|
};
|
|
44
|
+
leavingItems: import("vue").ComputedRef<{
|
|
45
|
+
height: number;
|
|
46
|
+
item: {
|
|
47
|
+
[x: string]: unknown;
|
|
48
|
+
id: string;
|
|
49
|
+
type: import("../viewer").VibeViewerType;
|
|
50
|
+
title?: string | undefined;
|
|
51
|
+
url: string;
|
|
52
|
+
preview?: {
|
|
53
|
+
url: string;
|
|
54
|
+
width?: number | undefined;
|
|
55
|
+
height?: number | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
width?: number | undefined;
|
|
58
|
+
height?: number | undefined;
|
|
59
|
+
};
|
|
60
|
+
position: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
};
|
|
64
|
+
}[]>;
|
|
31
65
|
onScroll: () => void;
|
|
32
66
|
onWheel: (event: WheelEvent) => void;
|
|
33
67
|
paginationLabel: import("vue").ComputedRef<string>;
|
|
@@ -2,8 +2,14 @@ import { type ComputedRef, type Ref } from 'vue';
|
|
|
2
2
|
import type { VibeViewerItem } from '../viewer';
|
|
3
3
|
import type { LayoutPosition } from './masonryLayout';
|
|
4
4
|
export type VibeMasonryEnterDirection = 'bottom' | 'top';
|
|
5
|
+
export interface VibeMasonryLeavingItem {
|
|
6
|
+
height: number;
|
|
7
|
+
item: VibeViewerItem;
|
|
8
|
+
position: LayoutPosition;
|
|
9
|
+
}
|
|
5
10
|
export declare function getVibeMasonryEnterOrder(itemIds: string[], direction: VibeMasonryEnterDirection): string[];
|
|
6
11
|
export declare function getVibeMasonryEnterDuration(itemCount: number): number;
|
|
12
|
+
export declare function getVibeMasonryLeaveDuration(): number;
|
|
7
13
|
export declare function getVibeMasonryEnterStartY(options: {
|
|
8
14
|
direction: VibeMasonryEnterDirection;
|
|
9
15
|
itemHeight: number;
|
|
@@ -24,6 +30,41 @@ export declare function useMasonryMotion(options: {
|
|
|
24
30
|
getCardTransform: (index: number) => string;
|
|
25
31
|
getCardTransition: (itemId: string) => string | undefined;
|
|
26
32
|
getCardTransitionDelay: (itemId: string) => string | undefined;
|
|
33
|
+
getLeavingCardStyle: (item: VibeViewerItem) => {
|
|
34
|
+
opacity: string;
|
|
35
|
+
transform: string;
|
|
36
|
+
transition: string;
|
|
37
|
+
height?: undefined;
|
|
38
|
+
width?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
height: string;
|
|
41
|
+
opacity: string;
|
|
42
|
+
transform: string;
|
|
43
|
+
transition: string;
|
|
44
|
+
width: string;
|
|
45
|
+
};
|
|
46
|
+
leavingItems: 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
|
+
} | undefined;
|
|
59
|
+
width?: number | undefined;
|
|
60
|
+
height?: number | undefined;
|
|
61
|
+
};
|
|
62
|
+
position: {
|
|
63
|
+
x: number;
|
|
64
|
+
y: number;
|
|
65
|
+
};
|
|
66
|
+
}[]>;
|
|
27
67
|
markEnter: (items: VibeViewerItem[], direction?: VibeMasonryEnterDirection) => void;
|
|
68
|
+
markLeave: (items: VibeMasonryLeavingItem[]) => void;
|
|
28
69
|
playFlipMoveAnimation: (oldPositionsById: Map<string, LayoutPosition>, skipIds?: Set<string>, durationMs?: number) => void;
|
|
29
70
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
|
@@ -7,6 +7,7 @@ export type { VibeResolveParams, VibeResolveResult, VibeEmit, VibeFeedMode, Vibe
|
|
|
7
7
|
export type { VibeAssetErrorKind } from './loadError';
|
|
8
8
|
export type { VibeStatus } from './removalState';
|
|
9
9
|
export type { VibeAssetErrorEvent, VibeAssetErrorReporter, VibeAssetErrorSurface, VibeAssetLoadEvent, VibeAssetLoadReporter, VibeAssetLoadSurface } from './assetErrors';
|
|
10
|
+
export type { VibeEmptyStateMode, VibeEmptyStateSlotProps } from './surfaceSlots';
|
|
10
11
|
export interface VibeViewerProps {
|
|
11
12
|
activeIndex?: number;
|
|
12
13
|
errorMessage?: string | null;
|