bilitoolkit-ui 0.0.9 → 0.1.1

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.ts CHANGED
@@ -53,6 +53,8 @@ showDefaultActions: boolean;
53
53
  refList: HTMLDivElement;
54
54
  }, any>;
55
55
 
56
+ declare const __VLS_component_12: DefineComponent<__VLS_Props_22, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_22> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
57
+
56
58
  declare const __VLS_component_2: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
57
59
 
58
60
  declare const __VLS_component_3: DefineComponent<TooltipProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TooltipProps> & Readonly<{}>, {
@@ -152,6 +154,16 @@ declare type __VLS_Props_20 = {
152
154
  fields?: AvailableStat[];
153
155
  };
154
156
 
157
+ declare type __VLS_Props_21 = {
158
+ label: string;
159
+ value: string | number;
160
+ };
161
+
162
+ declare type __VLS_Props_22 = {
163
+ prefix: string;
164
+ small?: boolean;
165
+ };
166
+
155
167
  declare type __VLS_Props_3 = CountdownDialogProps;
156
168
 
157
169
  declare type __VLS_Props_4 = PageRangeDialogProps;
@@ -1112,6 +1124,15 @@ declare function __VLS_template_11(): {
1112
1124
  rootEl: any;
1113
1125
  };
1114
1126
 
1127
+ declare function __VLS_template_12(): {
1128
+ attrs: Partial<{}>;
1129
+ slots: {
1130
+ default?(_: {}): any;
1131
+ };
1132
+ refs: {};
1133
+ rootEl: HTMLDivElement;
1134
+ };
1135
+
1115
1136
  declare function __VLS_template_2(): {
1116
1137
  attrs: Partial<{}>;
1117
1138
  slots: {
@@ -1198,6 +1219,8 @@ declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
1198
1219
 
1199
1220
  declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
1200
1221
 
1222
+ declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
1223
+
1201
1224
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1202
1225
 
1203
1226
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -1232,6 +1255,12 @@ declare type __VLS_WithTemplateSlots_11<T, S> = T & {
1232
1255
  };
1233
1256
  };
1234
1257
 
1258
+ declare type __VLS_WithTemplateSlots_12<T, S> = T & {
1259
+ new (): {
1260
+ $slots: S;
1261
+ };
1262
+ };
1263
+
1235
1264
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1236
1265
  new (): {
1237
1266
  $slots: S;
@@ -1315,12 +1344,12 @@ export declare const blackColor = "#000000";
1315
1344
  declare const CountdownDialog_2: DefineComponent<__VLS_PublicProps, {
1316
1345
  show: () => void;
1317
1346
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1318
- onConfirm: (...args: any[]) => void;
1319
1347
  onCancel: (...args: any[]) => void;
1348
+ onConfirm: (...args: any[]) => void;
1320
1349
  "update:modelValue": (value: boolean) => void;
1321
1350
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
1322
- onOnConfirm?: ((...args: any[]) => any) | undefined;
1323
1351
  onOnCancel?: ((...args: any[]) => any) | undefined;
1352
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
1324
1353
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
1325
1354
  }>, {
1326
1355
  title: string;
@@ -1413,6 +1442,8 @@ export declare const formatSpeed: (speedKBps: number) => string;
1413
1442
 
1414
1443
  export declare const formatStatCount: (viewCount: number) => string;
1415
1444
 
1445
+ export declare function getUserAvatarThumbnail(face: string): string;
1446
+
1416
1447
  export declare const handleCancel: (task: DownloadTask) => Promise<void>;
1417
1448
 
1418
1449
  export declare const handleDelete: (task: DownloadTask) => Promise<void>;
@@ -1424,6 +1455,8 @@ export declare const handleError: (error: unknown) => void;
1424
1455
 
1425
1456
  export declare const handleOpenFolder: (task: DownloadTask) => Promise<void>;
1426
1457
 
1458
+ export declare const handleOpenSpace: (mid: number) => void;
1459
+
1427
1460
  export declare const handlePause: (task: DownloadTask) => Promise<void>;
1428
1461
 
1429
1462
  export declare const handleResume: (task: DownloadTask) => Promise<void>;
@@ -1477,17 +1510,20 @@ export declare const initTransparentColors: (primaryColor: string, vars: AppThem
1477
1510
  */
1478
1511
  export declare const isDarkTheme: (themeMode?: AppThemeMode) => Promise<boolean>;
1479
1512
 
1513
+ declare const KeyValueTag_2: DefineComponent<__VLS_Props_21, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_21> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1514
+ export { KeyValueTag_2 as KeyValueTag }
1515
+
1480
1516
  /**
1481
1517
  * 全局加载框
1482
1518
  */
1483
1519
  export declare const loadingDialog: {
1484
- show(options?: LoadingDialogOptions): void;
1520
+ show(options?: LoadingDialogOptions | string): void;
1485
1521
  update(message: string): void;
1486
1522
  close(): void;
1487
1523
  };
1488
1524
 
1489
1525
  declare const LoadingDialog_2: DefineComponent< {}, {
1490
- show: (options?: LoadingDialogOptions) => void;
1526
+ show: (options?: LoadingDialogOptions | string) => void;
1491
1527
  update: (text: string) => void;
1492
1528
  close: () => void;
1493
1529
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -1503,6 +1539,11 @@ export declare interface LoadingDialogOptions {
1503
1539
  autoCloseDelay?: number;
1504
1540
  }
1505
1541
 
1542
+ declare interface LoadingTaskContext {
1543
+ user: UserInfoWithCookie;
1544
+ signal: AbortSignal;
1545
+ }
1546
+
1506
1547
  declare const LogPrint_2: DefineComponent< {}, {
1507
1548
  addLog: typeof addLog;
1508
1549
  reset: () => void;
@@ -1689,6 +1730,9 @@ export declare interface ProcessDialogOptions {
1689
1730
 
1690
1731
  export declare type ProcessDialogStatus = 'loading' | 'success' | 'error';
1691
1732
 
1733
+ declare const QueryFormItem_2: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
1734
+ export { QueryFormItem_2 as QueryFormItem }
1735
+
1692
1736
  declare const SelectDialog_2: <T = unknown>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
1693
1737
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
1694
1738
  readonly onConfirm?: ((list: T[]) => any) | undefined;
@@ -1869,6 +1913,13 @@ export declare const useElementHeight: <H extends HTMLElement = HTMLElement>(ref
1869
1913
  updateHeight: () => void;
1870
1914
  };
1871
1915
 
1916
+ export declare function useElementScrollbar(el: MaybeRefOrGetter<HTMLElement | undefined>): {
1917
+ hasHorizontalScrollbar: Ref<boolean, boolean>;
1918
+ hasVerticalScrollbar: Ref<boolean, boolean>;
1919
+ hasScrollbar: Ref<boolean, boolean>;
1920
+ checkScrollbar: () => void;
1921
+ };
1922
+
1872
1923
  /**
1873
1924
  * 封装的数据加载函数,方便关联返回的 loading
1874
1925
  */
@@ -1884,6 +1935,21 @@ declare interface UseLoadingDataOptions {
1884
1935
  singleFlight?: boolean;
1885
1936
  }
1886
1937
 
1938
+ /**
1939
+ * 封装异步任务执行,自动管理加载状态
1940
+ */
1941
+ export declare const useLoadingTask: <TArgs extends any[] = [], TReturn = void>(task: (context: LoadingTaskContext, ...args: TArgs) => TReturn | Promise<TReturn>, options?: UseLoadingTaskOptions) => {
1942
+ loading: Ref<boolean, boolean>;
1943
+ execTask: (...args: TArgs) => Promise<TReturn>;
1944
+ isAborted: Ref<boolean, boolean>;
1945
+ };
1946
+
1947
+ declare interface UseLoadingTaskOptions {
1948
+ loading?: Ref<boolean>;
1949
+ initMsg?: string;
1950
+ disableCancel?: boolean;
1951
+ }
1952
+
1887
1953
  export declare const usePageTable: <D, Q = undefined>(options: UsePageTableOptions<D, Q>) => {
1888
1954
  pageData: Ref< {
1889
1955
  pageNum: number;