@wyxos/vibe 3.0.6 → 3.0.7
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 +10 -0
- package/lib/components/viewer-core/removalState.d.ts +3 -0
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +3 -0
- package/lib/components/viewer-core/useController.d.ts +4 -0
- package/lib/components/viewer-core/useDataSource.d.ts +3 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +589 -570
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -305,6 +305,12 @@ const vibe = ref<VibeHandle | null>(null)
|
|
|
305
305
|
|
|
306
306
|
Available methods:
|
|
307
307
|
|
|
308
|
+
- `lockPageLoading()`
|
|
309
|
+
- `unlockPageLoading()`
|
|
310
|
+
- `loadNext()`
|
|
311
|
+
- `loadPrevious()`
|
|
312
|
+
- `retry()`
|
|
313
|
+
- `cancel()`
|
|
308
314
|
- `remove(ids)`
|
|
309
315
|
- `restore(ids)`
|
|
310
316
|
- `undo()`
|
|
@@ -327,6 +333,7 @@ type VibeStatus = {
|
|
|
327
333
|
loadState: 'failed' | 'loaded' | 'loading'
|
|
328
334
|
mode: 'dynamic' | 'static'
|
|
329
335
|
nextCursor: string | null
|
|
336
|
+
pageLoadingLocked: boolean
|
|
330
337
|
phase: 'failed' | 'filling' | 'idle' | 'initializing' | 'loading' | 'refreshing'
|
|
331
338
|
previousCursor: string | null
|
|
332
339
|
removedCount: number
|
|
@@ -338,9 +345,12 @@ type VibeStatus = {
|
|
|
338
345
|
Example:
|
|
339
346
|
|
|
340
347
|
```ts
|
|
348
|
+
vibe.value?.lockPageLoading()
|
|
341
349
|
vibe.value?.remove(['item-2', 'item-5'])
|
|
342
350
|
vibe.value?.undo()
|
|
351
|
+
vibe.value?.unlockPageLoading()
|
|
343
352
|
console.log(vibe.value?.status.itemCount)
|
|
353
|
+
console.log(vibe.value?.status.pageLoadingLocked)
|
|
344
354
|
console.log(vibe.value?.status.removedIds)
|
|
345
355
|
```
|
|
346
356
|
|
|
@@ -17,6 +17,7 @@ export interface VibeStatus {
|
|
|
17
17
|
loadState: 'failed' | 'loaded' | 'loading';
|
|
18
18
|
mode: VibeFeedMode;
|
|
19
19
|
nextCursor: string | null;
|
|
20
|
+
pageLoadingLocked: boolean;
|
|
20
21
|
phase: VibeLoadPhase;
|
|
21
22
|
previousCursor: string | null;
|
|
22
23
|
removedCount: number;
|
|
@@ -27,6 +28,7 @@ export interface VibeHandle {
|
|
|
27
28
|
cancel: () => void;
|
|
28
29
|
clearRemoved: () => void;
|
|
29
30
|
getRemovedIds: () => string[];
|
|
31
|
+
lockPageLoading: () => void;
|
|
30
32
|
loadNext: () => Promise<void>;
|
|
31
33
|
loadPrevious: () => Promise<void>;
|
|
32
34
|
remove: (ids: string | string[]) => VibeRemoveResult;
|
|
@@ -34,6 +36,7 @@ export interface VibeHandle {
|
|
|
34
36
|
retry: () => Promise<void>;
|
|
35
37
|
status: Readonly<VibeStatus>;
|
|
36
38
|
undo: () => VibeRemoveResult | null;
|
|
39
|
+
unlockPageLoading: () => void;
|
|
37
40
|
}
|
|
38
41
|
export declare function useVibeRemovalState(): {
|
|
39
42
|
clearRemoved: () => void;
|
|
@@ -32,7 +32,9 @@ export declare function useAutoResolveSource(options: {
|
|
|
32
32
|
fillTargetCount: Ref<number | null, number | null>;
|
|
33
33
|
hasNextPage: import("vue").ComputedRef<boolean>;
|
|
34
34
|
hasPreviousPage: import("vue").ComputedRef<boolean>;
|
|
35
|
+
isPageLoadingLocked: Ref<boolean, boolean>;
|
|
35
36
|
items: import("vue").ComputedRef<VibeViewerItem[]>;
|
|
37
|
+
lockPageLoading: () => void;
|
|
36
38
|
loading: import("vue").ComputedRef<boolean>;
|
|
37
39
|
mode: import("vue").ComputedRef<VibeFeedMode>;
|
|
38
40
|
nextCursor: import("vue").ComputedRef<string | null>;
|
|
@@ -46,6 +48,7 @@ export declare function useAutoResolveSource(options: {
|
|
|
46
48
|
setActiveIndex: (nextIndex: number) => void;
|
|
47
49
|
setAutoPrefetchEnabled: (nextValue: boolean) => void;
|
|
48
50
|
syncActiveIndexAfterVisibilityChange: (anchorOccurrenceKey?: string | null) => void;
|
|
51
|
+
unlockPageLoading: () => void;
|
|
49
52
|
getActiveOccurrenceKey: () => string | null;
|
|
50
53
|
maybeCommitPendingAppendWhenFilteredOut: () => void;
|
|
51
54
|
};
|
|
@@ -4,6 +4,7 @@ export declare const DESKTOP_BREAKPOINT_PX = 1024;
|
|
|
4
4
|
export declare function useController(props: Readonly<VibeProps>, emit: VibeEmit): {
|
|
5
5
|
cancel: () => void;
|
|
6
6
|
isDesktop: import("vue").ComputedRef<boolean>;
|
|
7
|
+
lockPageLoading: () => void;
|
|
7
8
|
loadNext: () => Promise<void>;
|
|
8
9
|
loadPrevious: () => Promise<void>;
|
|
9
10
|
openFullscreen: (index: number) => void;
|
|
@@ -23,6 +24,7 @@ export declare function useController(props: Readonly<VibeProps>, emit: VibeEmit
|
|
|
23
24
|
readonly loadState: "failed" | "loaded" | "loading";
|
|
24
25
|
readonly mode: import("./removalState").VibeFeedMode;
|
|
25
26
|
readonly nextCursor: string | null;
|
|
27
|
+
readonly pageLoadingLocked: boolean;
|
|
26
28
|
readonly phase: import("./removalState").VibeLoadPhase;
|
|
27
29
|
readonly previousCursor: string | null;
|
|
28
30
|
readonly removedCount: number;
|
|
@@ -30,6 +32,7 @@ export declare function useController(props: Readonly<VibeProps>, emit: VibeEmit
|
|
|
30
32
|
readonly surfaceMode: VibeSurfaceMode;
|
|
31
33
|
};
|
|
32
34
|
surfaceMode: import("vue").ComputedRef<VibeSurfaceMode>;
|
|
35
|
+
unlockPageLoading: () => void;
|
|
33
36
|
activeIndex: import("vue").ComputedRef<number>;
|
|
34
37
|
canRefreshExhaustedNextPage: import("vue").ComputedRef<boolean>;
|
|
35
38
|
canRetryInitialLoad: import("vue").ComputedRef<boolean>;
|
|
@@ -43,6 +46,7 @@ export declare function useController(props: Readonly<VibeProps>, emit: VibeEmit
|
|
|
43
46
|
getRemovedIds: () => string[];
|
|
44
47
|
hasNextPage: import("vue").ComputedRef<boolean>;
|
|
45
48
|
hasPreviousPage: import("vue").ComputedRef<boolean>;
|
|
49
|
+
isPageLoadingLocked: import("vue").Ref<boolean, boolean>;
|
|
46
50
|
items: import("vue").ComputedRef<import("../viewer").VibeViewerItem[]>;
|
|
47
51
|
loading: import("vue").ComputedRef<boolean>;
|
|
48
52
|
mode: import("vue").ComputedRef<import("./removalState").VibeFeedMode>;
|
|
@@ -52,7 +52,9 @@ export declare function useDataSource(props: Readonly<VibeProps>, emit: VibeEmit
|
|
|
52
52
|
getRemovedIds: () => string[];
|
|
53
53
|
hasNextPage: import("vue").ComputedRef<boolean>;
|
|
54
54
|
hasPreviousPage: import("vue").ComputedRef<boolean>;
|
|
55
|
+
isPageLoadingLocked: import("vue").Ref<boolean, boolean>;
|
|
55
56
|
items: import("vue").ComputedRef<VibeViewerItem[]>;
|
|
57
|
+
lockPageLoading: () => void;
|
|
56
58
|
loading: import("vue").ComputedRef<boolean>;
|
|
57
59
|
loadNext: () => Promise<void>;
|
|
58
60
|
loadPrevious: () => Promise<void>;
|
|
@@ -78,4 +80,5 @@ export declare function useDataSource(props: Readonly<VibeProps>, emit: VibeEmit
|
|
|
78
80
|
undo: () => {
|
|
79
81
|
ids: string[];
|
|
80
82
|
} | null;
|
|
83
|
+
unlockPageLoading: () => void;
|
|
81
84
|
};
|