@delta-comic/db 2.2.0 → 3.0.0-next.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/dist/index.d.mts +516 -0
- package/dist/index.mjs +705 -0
- package/dist/index.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/web-Bv0LYYK_.mjs +91 -0
- package/dist/web-Bv0LYYK_.mjs.map +1 -0
- package/package.json +22 -25
- package/README.md +0 -42
- package/dist/esm-DHmh9Ibw.js +0 -2
- package/dist/esm-DrkZJn8m.js +0 -7902
- package/dist/esm-DrkZJn8m.js.map +0 -1
- package/dist/index.js +0 -968
- package/dist/index.js.map +0 -1
- package/dist/lib/favourite.d.ts +0 -100
- package/dist/lib/history.d.ts +0 -60
- package/dist/lib/index.d.ts +0 -25
- package/dist/lib/itemStore.d.ts +0 -37
- package/dist/lib/migrations/1_initial.d.ts +0 -8
- package/dist/lib/migrations/2_fix-display_name.d.ts +0 -8
- package/dist/lib/migrations/3_fix_fvi_foreign_key.d.ts +0 -8
- package/dist/lib/nativeStore/index.d.ts +0 -2
- package/dist/lib/plugin.d.ts +0 -109
- package/dist/lib/recentView.d.ts +0 -59
- package/dist/lib/subscribe.d.ts +0 -75
- package/dist/lib/utils.d.ts +0 -7
- package/dist/pack.tgz +0 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
import { isTauri } from "@tauri-apps/api/core";
|
|
2
|
+
import { JSONColumnType, Kysely, SelectQueryBuilder, Selectable } from "kysely";
|
|
3
|
+
import { FormResult, FormSingleConfigure, SourcedKeyType, SourcedValue, uni } from "@delta-comic/model";
|
|
4
|
+
import { MaybeRefOrGetter, Ref } from "vue";
|
|
5
|
+
|
|
6
|
+
//#region lib/utils.d.ts
|
|
7
|
+
declare namespace utils_d_exports {
|
|
8
|
+
export { CommonQueryKey, countDb, withTransition };
|
|
9
|
+
}
|
|
10
|
+
declare const withTransition: <T>(handler: (trx: Kysely<DB>) => Promise<T>, trx?: Kysely<DB>) => Promise<T>;
|
|
11
|
+
declare function countDb(sql: SelectQueryBuilder<DB, any, object>): Promise<number>;
|
|
12
|
+
declare enum CommonQueryKey {
|
|
13
|
+
common = "db"
|
|
14
|
+
}
|
|
15
|
+
declare namespace itemStore_d_exports {
|
|
16
|
+
export { QueryKey$5 as QueryKey, StorableItem, StoredItem, Table$6 as Table, itemKey, useUpsert$4 as useUpsert };
|
|
17
|
+
}
|
|
18
|
+
interface Table$6 {
|
|
19
|
+
/** @description primary key */
|
|
20
|
+
key: string;
|
|
21
|
+
item: JSONColumnType<uni.item.RawItem>;
|
|
22
|
+
}
|
|
23
|
+
type StorableItem = uni.item.Item | uni.item.RawItem;
|
|
24
|
+
type StoredItem = Selectable<Table$6>;
|
|
25
|
+
declare const itemKey: SourcedValue<[string, string]>;
|
|
26
|
+
declare enum QueryKey$5 {
|
|
27
|
+
item = "db:itemStore:"
|
|
28
|
+
}
|
|
29
|
+
declare const useUpsert$4: () => {
|
|
30
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<string, Error, undefined>>;
|
|
31
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
32
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
33
|
+
data: import("vue").ShallowRef<string | undefined>;
|
|
34
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
35
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
36
|
+
variables: import("vue").ShallowRef<{
|
|
37
|
+
item: StorableItem;
|
|
38
|
+
trx?: Kysely<DB>;
|
|
39
|
+
} | undefined>;
|
|
40
|
+
mutate: (vars: {
|
|
41
|
+
item: StorableItem;
|
|
42
|
+
trx?: Kysely<DB>;
|
|
43
|
+
}) => void;
|
|
44
|
+
reset: () => void;
|
|
45
|
+
upsert: (vars: {
|
|
46
|
+
item: StorableItem;
|
|
47
|
+
trx?: Kysely<DB>;
|
|
48
|
+
}) => Promise<string>;
|
|
49
|
+
key: (CommonQueryKey | QueryKey$5)[];
|
|
50
|
+
};
|
|
51
|
+
declare namespace favourite_d_exports {
|
|
52
|
+
export { Card, CardTable, Item$3 as Item, ItemTable, QueryKey$4 as QueryKey, useCreateCard, useMoveItem, useQueryCard, useQueryItem, useUpsertItem };
|
|
53
|
+
}
|
|
54
|
+
interface CardTable {
|
|
55
|
+
title: string;
|
|
56
|
+
private: boolean;
|
|
57
|
+
description: string;
|
|
58
|
+
/** @description primary key */
|
|
59
|
+
createAt: number;
|
|
60
|
+
}
|
|
61
|
+
type Card = Selectable<CardTable>;
|
|
62
|
+
interface ItemTable {
|
|
63
|
+
itemKey: string;
|
|
64
|
+
/** @description foreign key */
|
|
65
|
+
belongTo: CardTable['createAt'];
|
|
66
|
+
addTime: number;
|
|
67
|
+
}
|
|
68
|
+
type Item$3 = Selectable<ItemTable>;
|
|
69
|
+
declare enum QueryKey$4 {
|
|
70
|
+
item = "db:favouriteItem:",
|
|
71
|
+
card = "db:favouriteCard:"
|
|
72
|
+
}
|
|
73
|
+
declare const useUpsertItem: () => {
|
|
74
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
75
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
76
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
77
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
78
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
79
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
80
|
+
variables: import("vue").ShallowRef<{
|
|
81
|
+
item: StorableItem;
|
|
82
|
+
belongTos: Item$3['belongTo'][];
|
|
83
|
+
trx?: Kysely<DB>;
|
|
84
|
+
} | undefined>;
|
|
85
|
+
mutate: (vars: {
|
|
86
|
+
item: StorableItem;
|
|
87
|
+
belongTos: Item$3['belongTo'][];
|
|
88
|
+
trx?: Kysely<DB>;
|
|
89
|
+
}) => void;
|
|
90
|
+
reset: () => void;
|
|
91
|
+
upsert: (vars: {
|
|
92
|
+
item: StorableItem;
|
|
93
|
+
belongTos: Item$3['belongTo'][];
|
|
94
|
+
trx?: Kysely<DB>;
|
|
95
|
+
}) => Promise<void>;
|
|
96
|
+
key: (CommonQueryKey | QueryKey$5 | QueryKey$4)[];
|
|
97
|
+
};
|
|
98
|
+
declare const useMoveItem: () => {
|
|
99
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
100
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
101
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
102
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
103
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
104
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
105
|
+
variables: import("vue").ShallowRef<{
|
|
106
|
+
item: StorableItem;
|
|
107
|
+
from: Item$3['belongTo'];
|
|
108
|
+
aims: Item$3['belongTo'][];
|
|
109
|
+
trx?: Kysely<DB>;
|
|
110
|
+
} | undefined>;
|
|
111
|
+
mutate: (vars: {
|
|
112
|
+
item: StorableItem;
|
|
113
|
+
from: Item$3['belongTo'];
|
|
114
|
+
aims: Item$3['belongTo'][];
|
|
115
|
+
trx?: Kysely<DB>;
|
|
116
|
+
}) => void;
|
|
117
|
+
reset: () => void;
|
|
118
|
+
move: (vars: {
|
|
119
|
+
item: StorableItem;
|
|
120
|
+
from: Item$3['belongTo'];
|
|
121
|
+
aims: Item$3['belongTo'][];
|
|
122
|
+
trx?: Kysely<DB>;
|
|
123
|
+
}) => Promise<void>;
|
|
124
|
+
key: QueryKey$4[];
|
|
125
|
+
};
|
|
126
|
+
declare const useCreateCard: () => {
|
|
127
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
128
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
129
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
130
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
131
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
132
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
133
|
+
variables: import("vue").ShallowRef<{
|
|
134
|
+
card: Card;
|
|
135
|
+
trx?: Kysely<DB>;
|
|
136
|
+
} | undefined>;
|
|
137
|
+
mutate: (vars: {
|
|
138
|
+
card: Card;
|
|
139
|
+
trx?: Kysely<DB>;
|
|
140
|
+
}) => void;
|
|
141
|
+
reset: () => void;
|
|
142
|
+
createCard: (vars: {
|
|
143
|
+
card: Card;
|
|
144
|
+
trx?: Kysely<DB>;
|
|
145
|
+
}) => Promise<void>;
|
|
146
|
+
key: QueryKey$4[];
|
|
147
|
+
};
|
|
148
|
+
declare const useQueryItem: <T>(query: (db: SelectQueryBuilder<DB, 'favouriteItem', {}>) => Promise<T>, otherKeys?: any[], initialData?: () => T) => import("@pinia/colada").UseQueryReturn<T, Error, T>;
|
|
149
|
+
declare const useQueryCard: <T>(query: (db: SelectQueryBuilder<DB, 'favouriteCard', {}>) => Promise<T>, otherKeys?: any[], initialData?: () => T) => import("@pinia/colada").UseQueryReturn<T, Error, T>;
|
|
150
|
+
declare namespace plugin_d_exports {
|
|
151
|
+
export { Archive, Meta, QueryKey$3 as QueryKey, Table$5 as Table, removeByNames, useQuery$3 as useQuery, useRemove$3 as useRemove, useSetKind, useToggleEnable, useUpsert$3 as useUpsert };
|
|
152
|
+
}
|
|
153
|
+
interface Meta {
|
|
154
|
+
name: {
|
|
155
|
+
display: string;
|
|
156
|
+
id: string;
|
|
157
|
+
};
|
|
158
|
+
version: {
|
|
159
|
+
plugin: string;
|
|
160
|
+
supportCore: string;
|
|
161
|
+
};
|
|
162
|
+
author: string;
|
|
163
|
+
description: string;
|
|
164
|
+
/** An HTTP(S) URL or a path relative to the installed plugin root. */
|
|
165
|
+
icon?: string;
|
|
166
|
+
require: {
|
|
167
|
+
id: string;
|
|
168
|
+
download?: string | undefined;
|
|
169
|
+
}[];
|
|
170
|
+
entry?: {
|
|
171
|
+
jsPath: string;
|
|
172
|
+
cssPath?: string;
|
|
173
|
+
};
|
|
174
|
+
kind?: 'normal' | 'preboot';
|
|
175
|
+
integrity?: {
|
|
176
|
+
algorithm: 'blake3' | 'sha256';
|
|
177
|
+
digest: string;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
interface Table$5 {
|
|
181
|
+
installerName: string;
|
|
182
|
+
loaderName: string;
|
|
183
|
+
/** @description primary key */
|
|
184
|
+
pluginName: string;
|
|
185
|
+
meta: JSONColumnType<Meta>;
|
|
186
|
+
enable: boolean;
|
|
187
|
+
installInput: string;
|
|
188
|
+
displayName: string;
|
|
189
|
+
}
|
|
190
|
+
/** @description Not Blue */
|
|
191
|
+
type Archive = Selectable<Table$5>;
|
|
192
|
+
declare enum QueryKey$3 {
|
|
193
|
+
item = "db:plugin:"
|
|
194
|
+
}
|
|
195
|
+
declare const removeByNames: (keys: Archive['pluginName'][], trx: Kysely<DB>) => Promise<void>;
|
|
196
|
+
declare const useUpsert$3: () => {
|
|
197
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
198
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
199
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
200
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
201
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
202
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
203
|
+
variables: import("vue").ShallowRef<{
|
|
204
|
+
archives: Archive[];
|
|
205
|
+
trx?: Kysely<DB>;
|
|
206
|
+
} | undefined>;
|
|
207
|
+
mutate: (vars: {
|
|
208
|
+
archives: Archive[];
|
|
209
|
+
trx?: Kysely<DB>;
|
|
210
|
+
}) => void;
|
|
211
|
+
reset: () => void;
|
|
212
|
+
upsert: (vars: {
|
|
213
|
+
archives: Archive[];
|
|
214
|
+
trx?: Kysely<DB>;
|
|
215
|
+
}) => Promise<void>;
|
|
216
|
+
key: (CommonQueryKey | QueryKey$3)[];
|
|
217
|
+
};
|
|
218
|
+
declare const useRemove$3: () => {
|
|
219
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
220
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
221
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
222
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
223
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
224
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
225
|
+
variables: import("vue").ShallowRef<{
|
|
226
|
+
keys: Archive['pluginName'][];
|
|
227
|
+
trx?: Kysely<DB>;
|
|
228
|
+
} | undefined>;
|
|
229
|
+
mutate: (vars: {
|
|
230
|
+
keys: Archive['pluginName'][];
|
|
231
|
+
trx?: Kysely<DB>;
|
|
232
|
+
}) => void;
|
|
233
|
+
reset: () => void;
|
|
234
|
+
remove: (vars: {
|
|
235
|
+
keys: Archive['pluginName'][];
|
|
236
|
+
trx?: Kysely<DB>;
|
|
237
|
+
}) => Promise<void>;
|
|
238
|
+
key: (CommonQueryKey | QueryKey$3)[];
|
|
239
|
+
};
|
|
240
|
+
declare const useToggleEnable: () => {
|
|
241
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<import("kysely").UpdateResult[] | undefined, Error, undefined>>;
|
|
242
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
243
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
244
|
+
data: import("vue").ShallowRef<import("kysely").UpdateResult[] | undefined>;
|
|
245
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
246
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
247
|
+
variables: import("vue").ShallowRef<{
|
|
248
|
+
keys: Archive['pluginName'][];
|
|
249
|
+
trx?: Kysely<DB>;
|
|
250
|
+
} | undefined>;
|
|
251
|
+
mutate: (vars: {
|
|
252
|
+
keys: Archive['pluginName'][];
|
|
253
|
+
trx?: Kysely<DB>;
|
|
254
|
+
}) => void;
|
|
255
|
+
reset: () => void;
|
|
256
|
+
toggle: (vars: {
|
|
257
|
+
keys: Archive['pluginName'][];
|
|
258
|
+
trx?: Kysely<DB>;
|
|
259
|
+
}) => Promise<import("kysely").UpdateResult[] | undefined>;
|
|
260
|
+
key: (CommonQueryKey | QueryKey$3)[];
|
|
261
|
+
};
|
|
262
|
+
declare const useSetKind: () => {
|
|
263
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
264
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
265
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
266
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
267
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
268
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
269
|
+
variables: import("vue").ShallowRef<{
|
|
270
|
+
pluginName: string;
|
|
271
|
+
kind: NonNullable<Meta['kind']>;
|
|
272
|
+
} | undefined>;
|
|
273
|
+
mutate: (vars: {
|
|
274
|
+
pluginName: string;
|
|
275
|
+
kind: NonNullable<Meta['kind']>;
|
|
276
|
+
}) => void;
|
|
277
|
+
reset: () => void;
|
|
278
|
+
setKind: (vars: {
|
|
279
|
+
pluginName: string;
|
|
280
|
+
kind: NonNullable<Meta['kind']>;
|
|
281
|
+
}) => Promise<void>;
|
|
282
|
+
key: (CommonQueryKey | QueryKey$3)[];
|
|
283
|
+
};
|
|
284
|
+
declare const useQuery$3: <T>(query: (db: SelectQueryBuilder<DB, 'plugin', {}>) => Promise<T>, otherKeys?: any[], initialData?: () => T) => import("@pinia/colada").UseQueryReturn<T, Error, T>;
|
|
285
|
+
declare namespace history_d_exports {
|
|
286
|
+
export { Item$2 as Item, QueryKey$2 as QueryKey, Table$4 as Table, useQuery$2 as useQuery, useRemove$2 as useRemove, useUpsert$2 as useUpsert };
|
|
287
|
+
}
|
|
288
|
+
interface Table$4 {
|
|
289
|
+
/** @description primary key */
|
|
290
|
+
timestamp: number;
|
|
291
|
+
itemKey: string;
|
|
292
|
+
ep: JSONColumnType<uni.ep.RawEp>;
|
|
293
|
+
}
|
|
294
|
+
type Item$2 = Selectable<Table$4>;
|
|
295
|
+
declare enum QueryKey$2 {
|
|
296
|
+
item = "db:history:"
|
|
297
|
+
}
|
|
298
|
+
declare const useUpsert$2: () => {
|
|
299
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
300
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
301
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
302
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
303
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
304
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
305
|
+
variables: import("vue").ShallowRef<{
|
|
306
|
+
item: StorableItem;
|
|
307
|
+
trx?: Kysely<DB>;
|
|
308
|
+
} | undefined>;
|
|
309
|
+
mutate: (vars: {
|
|
310
|
+
item: StorableItem;
|
|
311
|
+
trx?: Kysely<DB>;
|
|
312
|
+
}) => void;
|
|
313
|
+
reset: () => void;
|
|
314
|
+
upsert: (vars: {
|
|
315
|
+
item: StorableItem;
|
|
316
|
+
trx?: Kysely<DB>;
|
|
317
|
+
}) => Promise<void>;
|
|
318
|
+
key: (CommonQueryKey | QueryKey$5 | QueryKey$2)[];
|
|
319
|
+
};
|
|
320
|
+
declare const useRemove$2: () => {
|
|
321
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
322
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
323
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
324
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
325
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
326
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
327
|
+
variables: import("vue").ShallowRef<{
|
|
328
|
+
keys: Item$2['timestamp'][];
|
|
329
|
+
trx?: Kysely<DB>;
|
|
330
|
+
} | undefined>;
|
|
331
|
+
mutate: (vars: {
|
|
332
|
+
keys: Item$2['timestamp'][];
|
|
333
|
+
trx?: Kysely<DB>;
|
|
334
|
+
}) => void;
|
|
335
|
+
reset: () => void;
|
|
336
|
+
remove: (vars: {
|
|
337
|
+
keys: Item$2['timestamp'][];
|
|
338
|
+
trx?: Kysely<DB>;
|
|
339
|
+
}) => Promise<void>;
|
|
340
|
+
key: (CommonQueryKey | QueryKey$2)[];
|
|
341
|
+
};
|
|
342
|
+
declare const useQuery$2: <T>(query: (db: SelectQueryBuilder<DB, 'history', {}>) => Promise<T>, otherKeys?: any[], initialData?: () => T) => import("@pinia/colada").UseQueryReturn<T, Error, T>;
|
|
343
|
+
declare namespace config_d_exports {
|
|
344
|
+
export { ConfigDescription, ConfigRef, Table$3 as Table, useConfig };
|
|
345
|
+
}
|
|
346
|
+
type ConfigDescription = Record<string, Required<Pick<FormSingleConfigure, 'defaultValue'>> & FormSingleConfigure>;
|
|
347
|
+
interface Table$3 {
|
|
348
|
+
/** @description config owner, usually plugin name */
|
|
349
|
+
belongTo: string;
|
|
350
|
+
/** @description serialized form structure */
|
|
351
|
+
form: string;
|
|
352
|
+
/** @description serialized config data */
|
|
353
|
+
data: string;
|
|
354
|
+
}
|
|
355
|
+
type ConfigRef<T> = Ref<T> & {
|
|
356
|
+
readonly ready: Promise<void>;
|
|
357
|
+
};
|
|
358
|
+
declare const useConfig: <T extends ConfigDescription>(belongTo: string, form: T) => ConfigRef<FormResult<T>>;
|
|
359
|
+
//#endregion
|
|
360
|
+
//#region lib/nativeStore/index.d.ts
|
|
361
|
+
interface Table {
|
|
362
|
+
namespace: string;
|
|
363
|
+
key: string;
|
|
364
|
+
value: string;
|
|
365
|
+
}
|
|
366
|
+
declare const useNativeStore: <T extends object>(namespace: string, key: MaybeRefOrGetter<string>, defaultValue: MaybeRefOrGetter<T>) => Ref<T, T>;
|
|
367
|
+
declare namespace recentView_d_exports {
|
|
368
|
+
export { Item$1 as Item, QueryKey$1 as QueryKey, Table$2 as Table, useQuery$1 as useQuery, useRemove$1 as useRemove, useUpsert$1 as useUpsert };
|
|
369
|
+
}
|
|
370
|
+
interface Table$2 {
|
|
371
|
+
/** @description primary key */
|
|
372
|
+
timestamp: number;
|
|
373
|
+
itemKey: string;
|
|
374
|
+
isViewed: boolean;
|
|
375
|
+
}
|
|
376
|
+
type Item$1 = Selectable<Table$2>;
|
|
377
|
+
declare enum QueryKey$1 {
|
|
378
|
+
item = "db:recentView:"
|
|
379
|
+
}
|
|
380
|
+
declare const useUpsert$1: () => {
|
|
381
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
382
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
383
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
384
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
385
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
386
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
387
|
+
variables: import("vue").ShallowRef<{
|
|
388
|
+
item: StorableItem;
|
|
389
|
+
trx?: Kysely<DB>;
|
|
390
|
+
} | undefined>;
|
|
391
|
+
mutate: (vars: {
|
|
392
|
+
item: StorableItem;
|
|
393
|
+
trx?: Kysely<DB>;
|
|
394
|
+
}) => void;
|
|
395
|
+
reset: () => void;
|
|
396
|
+
upsert: (vars: {
|
|
397
|
+
item: StorableItem;
|
|
398
|
+
trx?: Kysely<DB>;
|
|
399
|
+
}) => Promise<void>;
|
|
400
|
+
key: (CommonQueryKey | QueryKey$5 | QueryKey$1)[];
|
|
401
|
+
};
|
|
402
|
+
declare const useRemove$1: () => {
|
|
403
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
404
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
405
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
406
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
407
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
408
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
409
|
+
variables: import("vue").ShallowRef<{
|
|
410
|
+
items: Item$1['timestamp'][];
|
|
411
|
+
trx?: Kysely<DB>;
|
|
412
|
+
} | undefined>;
|
|
413
|
+
mutate: (vars: {
|
|
414
|
+
items: Item$1['timestamp'][];
|
|
415
|
+
trx?: Kysely<DB>;
|
|
416
|
+
}) => void;
|
|
417
|
+
reset: () => void;
|
|
418
|
+
remove: (vars: {
|
|
419
|
+
items: Item$1['timestamp'][];
|
|
420
|
+
trx?: Kysely<DB>;
|
|
421
|
+
}) => Promise<void>;
|
|
422
|
+
key: (CommonQueryKey | QueryKey$1)[];
|
|
423
|
+
};
|
|
424
|
+
declare const useQuery$1: <T>(query: (db: SelectQueryBuilder<DB, 'recentView', {}>) => Promise<T>, otherKeys?: any[], initialData?: () => T) => import("@pinia/colada").UseQueryReturn<T, Error, T>;
|
|
425
|
+
declare namespace subscribe_d_exports {
|
|
426
|
+
export { AuthorItem, AuthorTable, EpItem, EpTable, Item, Key, Key_, QueryKey, Table$1 as Table, key, useQuery, useRemove, useUpsert };
|
|
427
|
+
}
|
|
428
|
+
declare const key: SourcedValue<[plugin: string, label: string]>;
|
|
429
|
+
type Key_ = SourcedKeyType<typeof key>;
|
|
430
|
+
type Key = Exclude<Key_, string>;
|
|
431
|
+
interface AuthorTable {
|
|
432
|
+
author: JSONColumnType<uni.item.Author>;
|
|
433
|
+
itemKey: null;
|
|
434
|
+
type: 'author';
|
|
435
|
+
/** @description primary key */
|
|
436
|
+
key: string;
|
|
437
|
+
plugin: string;
|
|
438
|
+
}
|
|
439
|
+
type AuthorItem = Selectable<AuthorTable>;
|
|
440
|
+
interface EpTable {
|
|
441
|
+
author: null;
|
|
442
|
+
itemKey: string;
|
|
443
|
+
type: 'ep';
|
|
444
|
+
/** @description primary key */
|
|
445
|
+
key: string;
|
|
446
|
+
plugin: string;
|
|
447
|
+
}
|
|
448
|
+
type EpItem = Selectable<EpTable>;
|
|
449
|
+
type Table$1 = AuthorTable | EpTable;
|
|
450
|
+
type Item = AuthorItem | EpItem;
|
|
451
|
+
declare enum QueryKey {
|
|
452
|
+
item = "db:subscribe:"
|
|
453
|
+
}
|
|
454
|
+
declare const useUpsert: () => {
|
|
455
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
456
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
457
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
458
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
459
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
460
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
461
|
+
variables: import("vue").ShallowRef<{
|
|
462
|
+
items: Item[];
|
|
463
|
+
trx?: Kysely<DB>;
|
|
464
|
+
} | undefined>;
|
|
465
|
+
mutate: (vars: {
|
|
466
|
+
items: Item[];
|
|
467
|
+
trx?: Kysely<DB>;
|
|
468
|
+
}) => void;
|
|
469
|
+
reset: () => void;
|
|
470
|
+
upsert: (vars: {
|
|
471
|
+
items: Item[];
|
|
472
|
+
trx?: Kysely<DB>;
|
|
473
|
+
}) => Promise<void>;
|
|
474
|
+
key: (CommonQueryKey | QueryKey)[];
|
|
475
|
+
};
|
|
476
|
+
declare const useRemove: () => {
|
|
477
|
+
state: import("vue").ComputedRef<import("@pinia/colada").DataState<void, Error, undefined>>;
|
|
478
|
+
status: import("vue").ShallowRef<import("@pinia/colada").DataStateStatus>;
|
|
479
|
+
asyncStatus: import("vue").ShallowRef<import("@pinia/colada").AsyncStatus>;
|
|
480
|
+
data: import("vue").ShallowRef<void | undefined>;
|
|
481
|
+
error: import("vue").ShallowRef<Error | null>;
|
|
482
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
483
|
+
variables: import("vue").ShallowRef<{
|
|
484
|
+
keys: Item['key'][];
|
|
485
|
+
trx?: Kysely<DB>;
|
|
486
|
+
} | undefined>;
|
|
487
|
+
mutate: (vars: {
|
|
488
|
+
keys: Item['key'][];
|
|
489
|
+
trx?: Kysely<DB>;
|
|
490
|
+
}) => void;
|
|
491
|
+
reset: () => void;
|
|
492
|
+
remove: (vars: {
|
|
493
|
+
keys: Item['key'][];
|
|
494
|
+
trx?: Kysely<DB>;
|
|
495
|
+
}) => Promise<void>;
|
|
496
|
+
key: (CommonQueryKey | QueryKey)[];
|
|
497
|
+
};
|
|
498
|
+
declare const useQuery: <T>(query: (db: SelectQueryBuilder<DB, 'subscribe', {}>) => Promise<T>, otherKeys?: any[], initialData?: () => T) => import("@pinia/colada").UseQueryReturn<T, Error, T>;
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region lib/index.d.ts
|
|
501
|
+
interface DB {
|
|
502
|
+
itemStore: Table$6;
|
|
503
|
+
favouriteCard: CardTable;
|
|
504
|
+
favouriteItem: ItemTable;
|
|
505
|
+
history: Table$4;
|
|
506
|
+
recentView: Table$2;
|
|
507
|
+
subscribe: Table$1;
|
|
508
|
+
plugin: Table$5;
|
|
509
|
+
nativeStore: Table;
|
|
510
|
+
config: Table$3;
|
|
511
|
+
}
|
|
512
|
+
declare const isTauriRuntime: typeof isTauri;
|
|
513
|
+
declare const db: Kysely<DB>;
|
|
514
|
+
//#endregion
|
|
515
|
+
export { config_d_exports as ConfigDB, DB, utils_d_exports as DBUtils, favourite_d_exports as FavouriteDB, history_d_exports as HistoryDB, itemStore_d_exports as ItemStoreDB, plugin_d_exports as PluginArchiveDB, recentView_d_exports as RecentDB, subscribe_d_exports as SubscribeDB, Table, db, isTauriRuntime, useConfig, useNativeStore };
|
|
516
|
+
//# sourceMappingURL=index.d.mts.map
|