@wyxos/vibe 3.0.3 → 3.0.4
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 +8 -2
- package/lib/components/FullscreenSurface.vue.d.ts +1 -1
- package/lib/components/Layout.vue.d.ts +12 -3
- package/lib/components/ListCard.vue.d.ts +0 -3
- package/lib/components/ListSurface.vue.d.ts +2 -3
- package/lib/components/viewer-core/fillDelay.d.ts +2 -2
- package/lib/components/viewer-core/removalState.d.ts +1 -2
- package/lib/components/viewer-core/surfaceSlots.d.ts +0 -5
- package/lib/components/viewer-core/useAssetLoadQueue.d.ts +5 -6
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +1 -0
- package/lib/components/viewer-core/useController.d.ts +5 -5
- package/lib/components/viewer-core/useDataSource.d.ts +2 -4
- package/lib/components/viewer-core/useMasonryList.d.ts +1 -0
- package/lib/components/viewer-core/useViewer.d.ts +1 -2
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +34 -3
- package/lib/index.js +836 -888
- package/package.json +1 -1
- package/lib/components/viewer-core/createFrameScheduler.d.ts +0 -4
package/README.md
CHANGED
|
@@ -70,13 +70,18 @@ Optional auto-mode pacing props:
|
|
|
70
70
|
```vue
|
|
71
71
|
<VibeLayout
|
|
72
72
|
:resolve="resolve"
|
|
73
|
-
:fill-delay-ms="
|
|
74
|
-
:fill-delay-step-ms="
|
|
73
|
+
:fill-delay-ms="2000"
|
|
74
|
+
:fill-delay-step-ms="1000"
|
|
75
|
+
:show-end-badge="false"
|
|
76
|
+
:show-status-badges="false"
|
|
75
77
|
/>
|
|
76
78
|
```
|
|
77
79
|
|
|
78
80
|
- `fill-delay-ms`: base delay before the first chained fill request
|
|
79
81
|
- `fill-delay-step-ms`: extra delay added for each additional chained fill request in the same fill cycle
|
|
82
|
+
- defaults: `2000` and `1000`
|
|
83
|
+
- `show-end-badge`: controls the fullscreen `End reached` badge when the feed is exhausted
|
|
84
|
+
- `show-status-badges`: controls the built-in loading/end status overlays in list and fullscreen
|
|
80
85
|
|
|
81
86
|
Optional auto-mode feed strategy:
|
|
82
87
|
|
|
@@ -184,6 +189,7 @@ Auto mode also supports two feed strategies:
|
|
|
184
189
|
- it waits `fillDelayMs`, then `fillDelayMs + fillDelayStepMs`, and so on for each chained request
|
|
185
190
|
- it keeps accumulating results until the collected count reaches `pageSize` or there is no further cursor
|
|
186
191
|
- then it commits that batch into the layout once
|
|
192
|
+
- when the trailing edge is exhausted, another bottom-edge attempt reloads the trailing cursor so newly available pages can be discovered
|
|
187
193
|
- `static`:
|
|
188
194
|
- before advancing at the bottom or top, Vibe checks whether the current boundary page is underfilled after local removals
|
|
189
195
|
- if it is, Vibe reloads that same cursor in place first
|
|
@@ -9,7 +9,6 @@ type __VLS_Props = VibeControlledProps & {
|
|
|
9
9
|
reportAssetError?: VibeAssetErrorReporter | null;
|
|
10
10
|
reportAssetLoad?: VibeAssetLoadReporter | null;
|
|
11
11
|
showBackToList?: boolean;
|
|
12
|
-
showStatusBadges?: boolean;
|
|
13
12
|
};
|
|
14
13
|
type __VLS_Slots = {
|
|
15
14
|
'fullscreen-aside'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
@@ -32,6 +31,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
32
31
|
activeIndex: number;
|
|
33
32
|
hasNextPage: boolean;
|
|
34
33
|
paginationDetail: string | null;
|
|
34
|
+
showEndBadge: boolean;
|
|
35
35
|
showStatusBadges: boolean;
|
|
36
36
|
showBackToList: boolean;
|
|
37
37
|
active: boolean;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type Component } from 'vue';
|
|
2
2
|
import type { VibeViewerItem } from './viewer';
|
|
3
|
-
import
|
|
3
|
+
import { type VibeAssetErrorEvent, type VibeAssetLoadEvent } from './viewer-core/assetErrors';
|
|
4
|
+
import type { VibeFullscreenStatusSlotProps, VibeGridStatusSlotProps, VibeSurfaceSlotProps } from './viewer-core/surfaceSlots';
|
|
5
|
+
import type { VibeHandle } from './viewer-core/useViewer';
|
|
4
6
|
type __VLS_Slots = {
|
|
5
7
|
'fullscreen-aside'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
6
8
|
'fullscreen-header-actions'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
7
9
|
'fullscreen-overlay'?: (props: VibeSurfaceSlotProps) => unknown;
|
|
8
10
|
'fullscreen-status'?: (props: VibeFullscreenStatusSlotProps) => unknown;
|
|
9
|
-
'empty-state'?: (props: VibeEmptyStateSlotProps) => unknown;
|
|
10
11
|
'grid-footer'?: () => unknown;
|
|
11
12
|
'grid-item-overlay'?: (props: {
|
|
12
13
|
active: boolean;
|
|
@@ -22,7 +23,15 @@ type __VLS_Slots = {
|
|
|
22
23
|
item: VibeViewerItem;
|
|
23
24
|
}) => unknown;
|
|
24
25
|
};
|
|
25
|
-
declare const __VLS_base: import("vue").
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<import("..").VibeControlledProps | import("..").VibeAutoProps, VibeHandle, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"update:activeIndex": (value: number) => any;
|
|
28
|
+
"asset-errors": (errors: VibeAssetErrorEvent[]) => any;
|
|
29
|
+
"asset-loads": (loads: VibeAssetLoadEvent[]) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<import("..").VibeControlledProps | import("..").VibeAutoProps> & Readonly<{
|
|
31
|
+
"onUpdate:activeIndex"?: ((value: number) => any) | undefined;
|
|
32
|
+
"onAsset-errors"?: ((errors: VibeAssetErrorEvent[]) => any) | undefined;
|
|
33
|
+
"onAsset-loads"?: ((loads: VibeAssetLoadEvent[]) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
36
|
declare const _default: typeof __VLS_export;
|
|
28
37
|
export default _default;
|
|
@@ -1,10 +1,8 @@
|
|
|
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 VibeAssetLoadQueue } from './viewer-core/useAssetLoadQueue';
|
|
5
4
|
type __VLS_Props = {
|
|
6
5
|
active?: boolean;
|
|
7
|
-
assetLoadQueue?: VibeAssetLoadQueue | null;
|
|
8
6
|
index?: number;
|
|
9
7
|
item: VibeViewerItem;
|
|
10
8
|
reportAssetError?: VibeAssetErrorReporter | null;
|
|
@@ -34,7 +32,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
34
32
|
reportAssetError: VibeAssetErrorReporter | null;
|
|
35
33
|
reportAssetLoad: VibeAssetLoadReporter | null;
|
|
36
34
|
index: number;
|
|
37
|
-
assetLoadQueue: VibeAssetLoadQueue | null;
|
|
38
35
|
surfaceActive: boolean;
|
|
39
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
37
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,11 +2,10 @@ import type { Component } from 'vue';
|
|
|
2
2
|
import type { VibeViewerItem } from './viewer';
|
|
3
3
|
import type { VibeAssetErrorReporter, VibeAssetLoadReporter } from './viewer-core/assetErrors';
|
|
4
4
|
import type { VibeGridStatusSlotProps } from './viewer-core/surfaceSlots';
|
|
5
|
-
import type { VibeAssetLoadQueue } from './viewer-core/useAssetLoadQueue';
|
|
6
5
|
type __VLS_Props = {
|
|
7
6
|
active?: boolean;
|
|
8
7
|
activeIndex?: number;
|
|
9
|
-
|
|
8
|
+
allowExhaustedNextPageRefresh?: boolean;
|
|
10
9
|
commitPendingAppend?: (() => void | Promise<void>) | null;
|
|
11
10
|
hasNextPage?: boolean;
|
|
12
11
|
hasPreviousPage?: boolean;
|
|
@@ -55,7 +54,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
55
54
|
active: boolean;
|
|
56
55
|
reportAssetError: VibeAssetErrorReporter | null;
|
|
57
56
|
reportAssetLoad: VibeAssetLoadReporter | null;
|
|
58
|
-
|
|
57
|
+
allowExhaustedNextPageRefresh: boolean;
|
|
59
58
|
commitPendingAppend: (() => void | Promise<void>) | null;
|
|
60
59
|
pendingAppendItems: VibeViewerItem[];
|
|
61
60
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const DEFAULT_DYNAMIC_FILL_DELAY_MS =
|
|
2
|
-
export declare const DEFAULT_DYNAMIC_FILL_DELAY_STEP_MS =
|
|
1
|
+
export declare const DEFAULT_DYNAMIC_FILL_DELAY_MS = 2000;
|
|
2
|
+
export declare const DEFAULT_DYNAMIC_FILL_DELAY_STEP_MS = 1000;
|
|
3
3
|
export declare function getDynamicFillDelayMs(fillRequestIndex: number, baseDelayMs?: number, stepDelayMs?: number): number;
|
|
4
4
|
export declare function normalizeDynamicFillDelayMs(value: number | undefined, fallback: number): number;
|
|
5
5
|
export declare function useFillDelayCountdown(): {
|
|
@@ -3,7 +3,6 @@ export interface VibeRemoveResult {
|
|
|
3
3
|
}
|
|
4
4
|
export type VibeFeedMode = 'dynamic' | 'static';
|
|
5
5
|
export type VibeLoadPhase = 'failed' | 'filling' | 'idle' | 'loading' | 'reloading';
|
|
6
|
-
export type VibeSurfaceMode = 'fullscreen' | 'list';
|
|
7
6
|
export interface VibeStatus {
|
|
8
7
|
activeIndex: number;
|
|
9
8
|
currentCursor: string | null;
|
|
@@ -21,7 +20,7 @@ export interface VibeStatus {
|
|
|
21
20
|
phase: VibeLoadPhase;
|
|
22
21
|
previousCursor: string | null;
|
|
23
22
|
removedCount: number;
|
|
24
|
-
surfaceMode:
|
|
23
|
+
surfaceMode: 'fullscreen' | 'list';
|
|
25
24
|
}
|
|
26
25
|
export interface VibeHandle {
|
|
27
26
|
cancel: () => void;
|
|
@@ -14,10 +14,9 @@ export interface VibeAssetLoadLease {
|
|
|
14
14
|
refresh: () => void;
|
|
15
15
|
release: () => void;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
18
|
-
getLimits: () => VibeAssetLoadQueueLimits;
|
|
17
|
+
export declare function createAssetLoadQueue(limits?: VibeAssetLoadQueueLimits): {
|
|
19
18
|
request: (options: VibeAssetLoadRequest) => VibeAssetLoadLease;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
};
|
|
20
|
+
export declare const defaultAssetLoadQueue: {
|
|
21
|
+
request: (options: VibeAssetLoadRequest) => VibeAssetLoadLease;
|
|
22
|
+
};
|
|
@@ -23,6 +23,7 @@ export declare function useAutoResolveSource(options: {
|
|
|
23
23
|
activeIndex: import("vue").ComputedRef<number>;
|
|
24
24
|
canRetryInitialLoad: import("vue").ComputedRef<boolean>;
|
|
25
25
|
cancel: () => void;
|
|
26
|
+
canRefreshTrailingBoundary: import("vue").ComputedRef<boolean>;
|
|
26
27
|
commitPendingAppend: () => Promise<void>;
|
|
27
28
|
currentCursor: import("vue").ComputedRef<string | null>;
|
|
28
29
|
errorMessage: Ref<string | null, string | null>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { VibeSurfaceMode } from './removalState';
|
|
2
1
|
import { type VibeEmit, type VibeProps } from './useDataSource';
|
|
3
2
|
export declare const DESKTOP_BREAKPOINT_PX = 1024;
|
|
4
|
-
type
|
|
5
|
-
export declare function useController(props: Readonly<VibeProps>, emit:
|
|
3
|
+
type VibeDesktopSurface = 'fullscreen' | 'list';
|
|
4
|
+
export declare function useController(props: Readonly<VibeProps>, emit: VibeEmit): {
|
|
6
5
|
cancel: () => void;
|
|
7
6
|
isDesktop: import("vue").ComputedRef<boolean>;
|
|
8
7
|
listRestoreToken: import("vue").Ref<number, number>;
|
|
@@ -29,10 +28,11 @@ export declare function useController(props: Readonly<VibeProps>, emit: VibeCont
|
|
|
29
28
|
readonly phase: import("./removalState").VibeLoadPhase;
|
|
30
29
|
readonly previousCursor: string | null;
|
|
31
30
|
readonly removedCount: number;
|
|
32
|
-
readonly surfaceMode:
|
|
31
|
+
readonly surfaceMode: "fullscreen" | "list";
|
|
33
32
|
};
|
|
34
|
-
surfaceMode: import("vue").ComputedRef<
|
|
33
|
+
surfaceMode: import("vue").ComputedRef<VibeDesktopSurface>;
|
|
35
34
|
activeIndex: import("vue").ComputedRef<number>;
|
|
35
|
+
canRefreshExhaustedNextPage: import("vue").ComputedRef<boolean>;
|
|
36
36
|
canRetryInitialLoad: import("vue").ComputedRef<boolean>;
|
|
37
37
|
clearRemoved: () => void;
|
|
38
38
|
commitPendingAppend: () => Promise<void>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { VibeViewerItem } from '../viewer';
|
|
2
|
-
import { type VibeSurfaceMode } from './removalState';
|
|
3
|
-
import type { VibeAssetLoadQueueLimits } from './useAssetLoadQueue';
|
|
4
2
|
export type { VibeHandle, VibeRemoveResult } from './removalState';
|
|
5
3
|
export type { VibeFeedMode, VibeLoadPhase } from './removalState';
|
|
6
4
|
export interface VibeResolveParams {
|
|
@@ -21,13 +19,12 @@ export interface VibeInitialState {
|
|
|
21
19
|
activeIndex?: number;
|
|
22
20
|
}
|
|
23
21
|
interface VibeSharedProps {
|
|
24
|
-
assetLoadLimits?: Partial<VibeAssetLoadQueueLimits>;
|
|
25
22
|
hasPreviousPage?: boolean;
|
|
26
23
|
paginationDetail?: string | null;
|
|
27
24
|
requestNextPage?: (() => void | Promise<void>) | null;
|
|
28
25
|
requestPreviousPage?: (() => void | Promise<void>) | null;
|
|
26
|
+
showEndBadge?: boolean;
|
|
29
27
|
showStatusBadges?: boolean;
|
|
30
|
-
surfaceMode?: VibeSurfaceMode;
|
|
31
28
|
}
|
|
32
29
|
export interface VibeControlledProps extends VibeSharedProps {
|
|
33
30
|
items: VibeViewerItem[];
|
|
@@ -63,6 +60,7 @@ export type VibeProps = VibeControlledProps | VibeAutoProps;
|
|
|
63
60
|
export type VibeEmit = (event: 'update:activeIndex', value: number) => void;
|
|
64
61
|
export declare function useDataSource(props: Readonly<VibeProps>, emit: VibeEmit): {
|
|
65
62
|
activeIndex: import("vue").ComputedRef<number>;
|
|
63
|
+
canRefreshExhaustedNextPage: import("vue").ComputedRef<boolean>;
|
|
66
64
|
canRetryInitialLoad: import("vue").ComputedRef<boolean>;
|
|
67
65
|
cancel: () => void;
|
|
68
66
|
clearRemoved: () => void;
|
|
@@ -2,6 +2,7 @@ import { type Ref } from 'vue';
|
|
|
2
2
|
import type { VibeViewerItem } from '../viewer';
|
|
3
3
|
export declare function useVibeMasonryList(options: {
|
|
4
4
|
active: Ref<boolean>;
|
|
5
|
+
allowExhaustedNextPageRefresh: Ref<boolean>;
|
|
5
6
|
items: Ref<VibeViewerItem[]>;
|
|
6
7
|
activeIndex: Ref<number>;
|
|
7
8
|
loading: Ref<boolean>;
|
|
@@ -4,8 +4,7 @@ import { formatPlaybackTime } from './format';
|
|
|
4
4
|
import { type VibeProps } from './useDataSource';
|
|
5
5
|
export type { VibeResolveParams, VibeResolveResult, VibeAutoProps, VibeControlledProps, VibeEmit, VibeFeedMode, VibeHandle, VibeInitialState, VibeLoadPhase, VibeProps, } from './useDataSource';
|
|
6
6
|
export type { VibeAssetErrorKind } from './loadError';
|
|
7
|
-
export type { VibeStatus
|
|
8
|
-
export type { VibeAssetLoadQueueLimits } from './useAssetLoadQueue';
|
|
7
|
+
export type { VibeStatus } from './removalState';
|
|
9
8
|
export type { VibeAssetErrorEvent, VibeAssetErrorReporter, VibeAssetErrorSurface, VibeAssetLoadEvent, VibeAssetLoadReporter, VibeAssetLoadSurface } from './assetErrors';
|
|
10
9
|
export declare function useViewer(props: Readonly<VibeProps>, emit: (event: 'update:activeIndex', value: number) => void, options?: {
|
|
11
10
|
enabled?: Ref<boolean>;
|