@hoci/core 0.8.1 → 0.10.0

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.cts DELETED
@@ -1,873 +0,0 @@
1
- import * as _hoci_shared from '@hoci/shared';
2
- import { SharedConfig, ElementLike, ActivateEvent } from '@hoci/shared';
3
- export * from '@hoci/shared';
4
- import * as vue from 'vue';
5
- import { PropType, InjectionKey, MaybeRefOrGetter, Ref, CSSProperties as CSSProperties$1 } from 'vue';
6
- import { CSSProperties } from 'tslx';
7
- import { PartialKeys, VirtualizerOptions as VirtualizerOptions$1, VirtualItem, Virtualizer, ScrollToOptions } from '@tanstack/virtual-core';
8
- export { ScrollToOptions, VirtualItem } from '@tanstack/virtual-core';
9
-
10
- declare const affixProps: {
11
- fixedClass: {
12
- type: StringConstructor;
13
- default: string;
14
- };
15
- /**
16
- * @zh 距离窗口顶部达到指定偏移量后触发
17
- * @en Triggered when the specified offset is reached from the top of the window
18
- */
19
- offset: {
20
- type: NumberConstructor;
21
- default: number;
22
- };
23
- /**
24
- * @zh 固定的相对方向
25
- */
26
- position: {
27
- type: PropType<"top" | "bottom">;
28
- default: string;
29
- };
30
- /**
31
- * @zh 滚动容器,默认是 `window`
32
- * @en Scroll container, default is `window`
33
- */
34
- target: {
35
- type: PropType<string | Element | (() => Element | null | undefined)>;
36
- };
37
- /**
38
- * @zh z-index 值
39
- * @en Z index value
40
- */
41
- zIndex: {
42
- type: NumberConstructor;
43
- default: number;
44
- };
45
- };
46
- type AffixProps = typeof affixProps;
47
- declare const affixEmits: ("scroll" | "change")[];
48
- declare const AFFIX_TARGET_KEY: InjectionKey<MaybeRefOrGetter<Element | null | undefined>>;
49
- declare const useAffix: _hoci_shared.HookComponent<{
50
- className: vue.ComputedRef<string>;
51
- wrapperRef: _hoci_shared.ElementRef<HTMLElement>;
52
- containerRef: vue.ComputedRef<Element | (Window & typeof globalThis) | null>;
53
- isFixed: Ref<boolean, boolean>;
54
- placeholderStyle: Ref<CSSProperties, CSSProperties>;
55
- fixedStyle: Ref<CSSProperties, CSSProperties>;
56
- updatePosition: _hoci_shared.ThrottledCancelableFn<[]>;
57
- }, vue.EmitsOptions, {
58
- fixedClass: {
59
- type: StringConstructor;
60
- default: string;
61
- };
62
- /**
63
- * @zh 距离窗口顶部达到指定偏移量后触发
64
- * @en Triggered when the specified offset is reached from the top of the window
65
- */
66
- offset: {
67
- type: NumberConstructor;
68
- default: number;
69
- };
70
- /**
71
- * @zh 固定的相对方向
72
- */
73
- position: {
74
- type: PropType<"top" | "bottom">;
75
- default: string;
76
- };
77
- /**
78
- * @zh 滚动容器,默认是 `window`
79
- * @en Scroll container, default is `window`
80
- */
81
- target: {
82
- type: PropType<string | Element | (() => Element | null | undefined)>;
83
- };
84
- /**
85
- * @zh z-index 值
86
- * @en Z index value
87
- */
88
- zIndex: {
89
- type: NumberConstructor;
90
- default: number;
91
- };
92
- }, vue.ExtractPropTypes<{
93
- fixedClass: {
94
- type: StringConstructor;
95
- default: string;
96
- };
97
- /**
98
- * @zh 距离窗口顶部达到指定偏移量后触发
99
- * @en Triggered when the specified offset is reached from the top of the window
100
- */
101
- offset: {
102
- type: NumberConstructor;
103
- default: number;
104
- };
105
- /**
106
- * @zh 固定的相对方向
107
- */
108
- position: {
109
- type: PropType<"top" | "bottom">;
110
- default: string;
111
- };
112
- /**
113
- * @zh 滚动容器,默认是 `window`
114
- * @en Scroll container, default is `window`
115
- */
116
- target: {
117
- type: PropType<string | Element | (() => Element | null | undefined)>;
118
- };
119
- /**
120
- * @zh z-index 值
121
- * @en Z index value
122
- */
123
- zIndex: {
124
- type: NumberConstructor;
125
- default: number;
126
- };
127
- }>, {
128
- position: "bottom" | "top";
129
- zIndex: number;
130
- offset: number;
131
- fixedClass: string;
132
- }>;
133
- declare function provideAffixTarget(target: MaybeRefOrGetter<Element | null | undefined>): void;
134
-
135
- declare const configProviderProps: {
136
- icon: {
137
- type: PropType<Partial<SharedConfig["icon"]>>;
138
- };
139
- activateEvent: {
140
- type: PropType<Partial<SharedConfig["activateEvent"]>>;
141
- };
142
- };
143
-
144
- declare const fileUploadProps: {
145
- modelValue: {
146
- type: PropType<File | File[]>;
147
- default: () => never[];
148
- };
149
- multiple: {
150
- type: BooleanConstructor;
151
- default: boolean;
152
- };
153
- };
154
- declare const fileUploadEmits: ("update:modelValue" | "change")[];
155
- type HiFileUploadProps = typeof fileUploadProps;
156
- interface HiFileUploadSlotData {
157
- files: File[];
158
- }
159
- declare const useFileUpload: _hoci_shared.HookComponent<{
160
- fileInputRef: _hoci_shared.ElementRef<HTMLInputElement>;
161
- files: vue.Ref<{
162
- readonly lastModified: number;
163
- readonly name: string;
164
- readonly webkitRelativePath: string;
165
- readonly size: number;
166
- readonly type: string;
167
- arrayBuffer: () => Promise<ArrayBuffer>;
168
- bytes: () => Promise<Uint8Array<ArrayBuffer>>;
169
- slice: (start?: number, end?: number, contentType?: string) => Blob;
170
- stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
171
- text: () => Promise<string>;
172
- }[], File[] | {
173
- readonly lastModified: number;
174
- readonly name: string;
175
- readonly webkitRelativePath: string;
176
- readonly size: number;
177
- readonly type: string;
178
- arrayBuffer: () => Promise<ArrayBuffer>;
179
- bytes: () => Promise<Uint8Array<ArrayBuffer>>;
180
- slice: (start?: number, end?: number, contentType?: string) => Blob;
181
- stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
182
- text: () => Promise<string>;
183
- }[]>;
184
- openFileInput: () => void;
185
- }, ("update:modelValue" | "change")[], {
186
- modelValue: {
187
- type: PropType<File | File[]>;
188
- default: () => never[];
189
- };
190
- multiple: {
191
- type: BooleanConstructor;
192
- default: boolean;
193
- };
194
- }, vue.ExtractPropTypes<{
195
- modelValue: {
196
- type: PropType<File | File[]>;
197
- default: () => never[];
198
- };
199
- multiple: {
200
- type: BooleanConstructor;
201
- default: boolean;
202
- };
203
- }>, {
204
- multiple: boolean;
205
- modelValue: File | File[];
206
- }>;
207
-
208
- declare const iconProps: {
209
- src: {
210
- type: StringConstructor;
211
- required: true;
212
- };
213
- size: {
214
- type: (StringConstructor | NumberConstructor)[];
215
- };
216
- width: {
217
- type: (StringConstructor | NumberConstructor)[];
218
- };
219
- height: {
220
- type: (StringConstructor | NumberConstructor)[];
221
- };
222
- color: {
223
- type: StringConstructor;
224
- default: string;
225
- };
226
- mask: {
227
- type: PropType<boolean | "auto">;
228
- default: () => "auto";
229
- };
230
- };
231
- type HiIconProps = typeof iconProps;
232
- declare const useIcon: _hoci_shared.HookComponent<{
233
- style: vue.ComputedRef<CSSProperties$1>;
234
- }, vue.EmitsOptions, {
235
- src: {
236
- type: StringConstructor;
237
- required: true;
238
- };
239
- size: {
240
- type: (StringConstructor | NumberConstructor)[];
241
- };
242
- width: {
243
- type: (StringConstructor | NumberConstructor)[];
244
- };
245
- height: {
246
- type: (StringConstructor | NumberConstructor)[];
247
- };
248
- color: {
249
- type: StringConstructor;
250
- default: string;
251
- };
252
- mask: {
253
- type: PropType<boolean | "auto">;
254
- default: () => "auto";
255
- };
256
- }, vue.ExtractPropTypes<{
257
- src: {
258
- type: StringConstructor;
259
- required: true;
260
- };
261
- size: {
262
- type: (StringConstructor | NumberConstructor)[];
263
- };
264
- width: {
265
- type: (StringConstructor | NumberConstructor)[];
266
- };
267
- height: {
268
- type: (StringConstructor | NumberConstructor)[];
269
- };
270
- color: {
271
- type: StringConstructor;
272
- default: string;
273
- };
274
- mask: {
275
- type: PropType<boolean | "auto">;
276
- default: () => "auto";
277
- };
278
- }>, {
279
- color: string;
280
- mask: boolean | "auto";
281
- }>;
282
-
283
- declare const itemProps: {
284
- value: {
285
- type: PropType<any>;
286
- default(): string;
287
- };
288
- label: {
289
- type: PropType<string | ((val: any) => string) | ElementLike | null>;
290
- };
291
- keepAlive: {
292
- type: BooleanConstructor;
293
- default: () => true;
294
- };
295
- activateEvent: {
296
- type: PropType<ActivateEvent>;
297
- };
298
- disabled: {
299
- type: BooleanConstructor;
300
- default: boolean;
301
- };
302
- };
303
- declare const itemEmits: "reject"[];
304
- declare const useSelectionItem: _hoci_shared.HookComponent<{
305
- activate: () => void;
306
- render: () => ElementLike;
307
- isActive: vue.ComputedRef<boolean>;
308
- isDisabled: vue.ComputedRef<boolean>;
309
- className: vue.ComputedRef<string>;
310
- activateEvent: vue.ComputedRef<ActivateEvent>;
311
- label: vue.ComputedRef<ElementLike[] | (string | vue.VNode<vue.RendererNode, vue.RendererElement, {
312
- [key: string]: any;
313
- }> | null | undefined)[]>;
314
- }, "reject"[], {
315
- value: {
316
- type: PropType<any>;
317
- default(): string;
318
- };
319
- label: {
320
- type: PropType<string | ((val: any) => string) | ElementLike | null>;
321
- };
322
- keepAlive: {
323
- type: BooleanConstructor;
324
- default: () => true;
325
- };
326
- activateEvent: {
327
- type: PropType<ActivateEvent>;
328
- };
329
- disabled: {
330
- type: BooleanConstructor;
331
- default: boolean;
332
- };
333
- }, vue.ExtractPropTypes<{
334
- value: {
335
- type: PropType<any>;
336
- default(): string;
337
- };
338
- label: {
339
- type: PropType<string | ((val: any) => string) | ElementLike | null>;
340
- };
341
- keepAlive: {
342
- type: BooleanConstructor;
343
- default: () => true;
344
- };
345
- activateEvent: {
346
- type: PropType<ActivateEvent>;
347
- };
348
- disabled: {
349
- type: BooleanConstructor;
350
- default: boolean;
351
- };
352
- }>, {
353
- value: any;
354
- keepAlive: boolean;
355
- disabled: boolean;
356
- }>;
357
- interface HiItemSlotsData {
358
- active: boolean;
359
- activate: () => void;
360
- }
361
-
362
- type Placement = "bottom" | "top" | "left" | "right" | "auto" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-top" | "left-bottom" | "right-top" | "right-bottom";
363
- type TriggerEvent = "click" | "mousedown" | "dblclick" | "hover" | "contextmenu" | "focus" | "touch";
364
- declare const popoverProps: {
365
- popupClass: {
366
- type: StringConstructor;
367
- };
368
- placement: {
369
- type: PropType<Placement>;
370
- default: () => "auto";
371
- };
372
- triggerEvent: {
373
- type: PropType<TriggerEvent>;
374
- default: () => "hover";
375
- };
376
- offset: {
377
- type: NumberConstructor;
378
- default: () => 8;
379
- };
380
- lazy: {
381
- type: BooleanConstructor;
382
- default: () => false;
383
- };
384
- visible: {
385
- type: BooleanConstructor;
386
- default: () => false;
387
- };
388
- disabled: {
389
- type: BooleanConstructor;
390
- default: () => false;
391
- };
392
- teleport: {
393
- type: PropType<string | HTMLElement | boolean>;
394
- default: () => true;
395
- };
396
- };
397
- declare const popoverEmits: ("change" | "update:visible")[];
398
- declare const usePopover: _hoci_shared.HookComponent<{
399
- events: {
400
- onMouseover: () => void;
401
- onMouseout: () => void;
402
- onMousedown: () => void;
403
- onMouseup: () => void;
404
- onContextmenu: (e: MouseEvent) => void;
405
- onClick: (e: MouseEvent) => void;
406
- onDblclick: () => void;
407
- onFocusin: () => void;
408
- onFocusout: () => void;
409
- onTouchend: () => void;
410
- };
411
- dropdownPosition: {
412
- x: number;
413
- y: number;
414
- };
415
- triggerRef: _hoci_shared.ElementRef<HTMLElement>;
416
- popupRef: _hoci_shared.ElementRef<HTMLElement>;
417
- popupClass: vue.ComputedRef<string | undefined>;
418
- popupStyle: vue.ComputedRef<{
419
- left: string;
420
- top: string;
421
- visibility: string;
422
- position: string;
423
- }>;
424
- }, ("change" | "update:visible")[], {
425
- popupClass: {
426
- type: StringConstructor;
427
- };
428
- placement: {
429
- type: PropType<Placement>;
430
- default: () => "auto";
431
- };
432
- triggerEvent: {
433
- type: PropType<TriggerEvent>;
434
- default: () => "hover";
435
- };
436
- offset: {
437
- type: NumberConstructor;
438
- default: () => 8;
439
- };
440
- lazy: {
441
- type: BooleanConstructor;
442
- default: () => false;
443
- };
444
- visible: {
445
- type: BooleanConstructor;
446
- default: () => false;
447
- };
448
- disabled: {
449
- type: BooleanConstructor;
450
- default: () => false;
451
- };
452
- teleport: {
453
- type: PropType<string | HTMLElement | boolean>;
454
- default: () => true;
455
- };
456
- }, vue.ExtractPropTypes<{
457
- popupClass: {
458
- type: StringConstructor;
459
- };
460
- placement: {
461
- type: PropType<Placement>;
462
- default: () => "auto";
463
- };
464
- triggerEvent: {
465
- type: PropType<TriggerEvent>;
466
- default: () => "hover";
467
- };
468
- offset: {
469
- type: NumberConstructor;
470
- default: () => 8;
471
- };
472
- lazy: {
473
- type: BooleanConstructor;
474
- default: () => false;
475
- };
476
- visible: {
477
- type: BooleanConstructor;
478
- default: () => false;
479
- };
480
- disabled: {
481
- type: BooleanConstructor;
482
- default: () => false;
483
- };
484
- teleport: {
485
- type: PropType<string | HTMLElement | boolean>;
486
- default: () => true;
487
- };
488
- }>, {
489
- disabled: boolean;
490
- visible: boolean;
491
- offset: number;
492
- placement: Placement;
493
- triggerEvent: TriggerEvent;
494
- lazy: boolean;
495
- teleport: string | boolean | HTMLElement;
496
- }>;
497
-
498
- type InitFunction = (option: Option) => () => void;
499
- interface Option {
500
- id?: string;
501
- label?: string;
502
- value: any | null;
503
- render: () => ElementLike;
504
- }
505
- interface HiSelectionContext {
506
- activate: (_: any) => void;
507
- reject: (_: any) => void;
508
- /**
509
- * @deprecated
510
- * use activate instead
511
- */
512
- changeActive: (_: any) => void;
513
- isActive: (_: any) => boolean;
514
- init?: InitFunction;
515
- activateEvent: ActivateEvent;
516
- activeClass: string;
517
- itemClass: string;
518
- unactiveClass: string;
519
- disabledClass: string;
520
- label: string | ((_: any) => ElementLike | null | undefined) | null | undefined;
521
- multiple: boolean;
522
- limit: [number, number];
523
- }
524
- declare const selectionProps: {
525
- modelValue: {
526
- type: PropType<any>;
527
- default: () => null;
528
- };
529
- /**
530
- * 选中时的 class
531
- */
532
- activeClass: {
533
- type: PropType<string | string[] | Record<string, boolean>>;
534
- default: string;
535
- };
536
- /**
537
- * 每个选项的 class
538
- */
539
- itemClass: {
540
- type: PropType<string | string[] | Record<string, boolean>>;
541
- default: string;
542
- };
543
- disabledClass: {
544
- type: PropType<string | string[] | Record<string, boolean>>;
545
- default: string;
546
- };
547
- unactiveClass: {
548
- type: PropType<string | string[] | Record<string, boolean>>;
549
- default: string;
550
- };
551
- label: {
552
- type: PropType<string | ((val?: any) => string) | null>;
553
- };
554
- /**
555
- * 多选模式
556
- */
557
- multiple: {
558
- type: PropType<boolean | number | [number, number?]>;
559
- default: () => false;
560
- };
561
- /**
562
- * 可清除
563
- */
564
- clearable: {
565
- type: BooleanConstructor;
566
- };
567
- defaultValue: {
568
- type: PropType<any>;
569
- default: () => null;
570
- };
571
- activateEvent: {
572
- type: PropType<ActivateEvent>;
573
- };
574
- };
575
- type SelectionProps = typeof selectionProps;
576
- declare const selectionEmits: ("reject" | "update:modelValue" | "change" | "load" | "unload")[];
577
- declare function useSelectionContext(): HiSelectionContext;
578
- declare const useSelectionList: _hoci_shared.HookComponent<{
579
- options: vue.Reactive<Option[]>;
580
- actives: any[];
581
- isActive: (value: any) => boolean;
582
- changeActive: (value: any) => void;
583
- renderItem: () => ElementLike;
584
- render: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
585
- [key: string]: any;
586
- }>;
587
- }, ("reject" | "update:modelValue" | "change" | "load" | "unload")[], {
588
- modelValue: {
589
- type: PropType<any>;
590
- default: () => null;
591
- };
592
- /**
593
- * 选中时的 class
594
- */
595
- activeClass: {
596
- type: PropType<string | string[] | Record<string, boolean>>;
597
- default: string;
598
- };
599
- /**
600
- * 每个选项的 class
601
- */
602
- itemClass: {
603
- type: PropType<string | string[] | Record<string, boolean>>;
604
- default: string;
605
- };
606
- disabledClass: {
607
- type: PropType<string | string[] | Record<string, boolean>>;
608
- default: string;
609
- };
610
- unactiveClass: {
611
- type: PropType<string | string[] | Record<string, boolean>>;
612
- default: string;
613
- };
614
- label: {
615
- type: PropType<string | ((val?: any) => string) | null>;
616
- };
617
- /**
618
- * 多选模式
619
- */
620
- multiple: {
621
- type: PropType<boolean | number | [number, number?]>;
622
- default: () => false;
623
- };
624
- /**
625
- * 可清除
626
- */
627
- clearable: {
628
- type: BooleanConstructor;
629
- };
630
- defaultValue: {
631
- type: PropType<any>;
632
- default: () => null;
633
- };
634
- activateEvent: {
635
- type: PropType<ActivateEvent>;
636
- };
637
- }, vue.ExtractPropTypes<{
638
- modelValue: {
639
- type: PropType<any>;
640
- default: () => null;
641
- };
642
- /**
643
- * 选中时的 class
644
- */
645
- activeClass: {
646
- type: PropType<string | string[] | Record<string, boolean>>;
647
- default: string;
648
- };
649
- /**
650
- * 每个选项的 class
651
- */
652
- itemClass: {
653
- type: PropType<string | string[] | Record<string, boolean>>;
654
- default: string;
655
- };
656
- disabledClass: {
657
- type: PropType<string | string[] | Record<string, boolean>>;
658
- default: string;
659
- };
660
- unactiveClass: {
661
- type: PropType<string | string[] | Record<string, boolean>>;
662
- default: string;
663
- };
664
- label: {
665
- type: PropType<string | ((val?: any) => string) | null>;
666
- };
667
- /**
668
- * 多选模式
669
- */
670
- multiple: {
671
- type: PropType<boolean | number | [number, number?]>;
672
- default: () => false;
673
- };
674
- /**
675
- * 可清除
676
- */
677
- clearable: {
678
- type: BooleanConstructor;
679
- };
680
- defaultValue: {
681
- type: PropType<any>;
682
- default: () => null;
683
- };
684
- activateEvent: {
685
- type: PropType<ActivateEvent>;
686
- };
687
- }>, {
688
- multiple: number | boolean | [number, (number | undefined)?];
689
- modelValue: any;
690
- activeClass: string | string[] | Record<string, boolean>;
691
- itemClass: string | string[] | Record<string, boolean>;
692
- disabledClass: string | string[] | Record<string, boolean>;
693
- unactiveClass: string | string[] | Record<string, boolean>;
694
- clearable: boolean;
695
- defaultValue: any;
696
- }>;
697
- interface HiSelectionSlotData extends Record<string, unknown> {
698
- isActive: (value: any) => boolean;
699
- changeActive: (value: any) => void;
700
- renderItem: () => ElementLike;
701
- }
702
-
703
- declare const switchProps: {
704
- modelValue: {
705
- type: BooleanConstructor;
706
- default: () => false;
707
- };
708
- class: {
709
- type: PropType<string | string[] | Record<string, boolean>>;
710
- };
711
- activeClass: {
712
- type: PropType<string | string[] | Record<string, boolean>>;
713
- };
714
- unactiveClass: {
715
- type: PropType<string | string[] | Record<string, boolean>>;
716
- };
717
- activateEvent: {
718
- type: PropType<ActivateEvent>;
719
- };
720
- disabled: {
721
- type: BooleanConstructor;
722
- default: () => false;
723
- };
724
- disabledClass: {
725
- type: PropType<string | string[] | Record<string, boolean>>;
726
- };
727
- };
728
- type HiSwitchProps = typeof switchProps;
729
- declare const switchEmits: ("reject" | "update:modelValue" | "change")[];
730
- declare const useSwitch: _hoci_shared.HookComponent<{
731
- toggle: (value?: any) => void;
732
- modelValue: vue.Ref<boolean, boolean>;
733
- className: vue.ComputedRef<string>;
734
- isDisabled: vue.ComputedRef<boolean>;
735
- activateEvent: vue.ComputedRef<ActivateEvent>;
736
- }, ("reject" | "update:modelValue" | "change")[], {
737
- modelValue: {
738
- type: BooleanConstructor;
739
- default: () => false;
740
- };
741
- class: {
742
- type: PropType<string | string[] | Record<string, boolean>>;
743
- };
744
- activeClass: {
745
- type: PropType<string | string[] | Record<string, boolean>>;
746
- };
747
- unactiveClass: {
748
- type: PropType<string | string[] | Record<string, boolean>>;
749
- };
750
- activateEvent: {
751
- type: PropType<ActivateEvent>;
752
- };
753
- disabled: {
754
- type: BooleanConstructor;
755
- default: () => false;
756
- };
757
- disabledClass: {
758
- type: PropType<string | string[] | Record<string, boolean>>;
759
- };
760
- }, vue.ExtractPropTypes<{
761
- modelValue: {
762
- type: BooleanConstructor;
763
- default: () => false;
764
- };
765
- class: {
766
- type: PropType<string | string[] | Record<string, boolean>>;
767
- };
768
- activeClass: {
769
- type: PropType<string | string[] | Record<string, boolean>>;
770
- };
771
- unactiveClass: {
772
- type: PropType<string | string[] | Record<string, boolean>>;
773
- };
774
- activateEvent: {
775
- type: PropType<ActivateEvent>;
776
- };
777
- disabled: {
778
- type: BooleanConstructor;
779
- default: () => false;
780
- };
781
- disabledClass: {
782
- type: PropType<string | string[] | Record<string, boolean>>;
783
- };
784
- }>, {
785
- disabled: boolean;
786
- modelValue: boolean;
787
- }>;
788
-
789
- type VirtualizerOptions<TScrollElement extends Element, TItemElement extends Element = Element> = PartialKeys<VirtualizerOptions$1<TScrollElement, TItemElement>, "observeElementRect" | "observeElementOffset" | "scrollToFn" | "getScrollElement" | "initialOffset">;
790
- declare const virtualListProps: {
791
- options: {
792
- type: PropType<PartialKeys<VirtualizerOptions<HTMLElement, HTMLElement>, "observeElementRect" | "observeElementOffset" | "scrollToFn" | "getScrollElement">>;
793
- default: () => {};
794
- };
795
- count: {
796
- type: NumberConstructor;
797
- default: () => 0;
798
- };
799
- estimateSize: {
800
- type: PropType<((index: number) => number) | number>;
801
- default: () => 50;
802
- };
803
- horizontal: {
804
- type: BooleanConstructor;
805
- default: () => false;
806
- };
807
- };
808
- declare const virtualListEmits: {
809
- scrollEnd: () => boolean;
810
- scrollStart: () => boolean;
811
- scroll: (_: number[]) => boolean;
812
- };
813
- interface VirtualListSlotData extends VirtualItem, Record<string, unknown> {
814
- style: CSSProperties$1;
815
- }
816
-
817
- declare const useVirtualList: _hoci_shared.HookComponent<{
818
- virtualizer: Virtualizer<HTMLElement, HTMLElement>;
819
- virtualItems: vue.ComputedRef<VirtualItem[]>;
820
- virtualIndexes: vue.ComputedRef<number[]>;
821
- totalSize: vue.ComputedRef<number>;
822
- scrollElementRef: _hoci_shared.ElementRef<HTMLElement>;
823
- measureElement: (el: HTMLElement | null) => void;
824
- scrollToIndex: (index: number, options?: ScrollToOptions) => void;
825
- scrollToStart: (options?: ScrollToOptions) => void;
826
- scrollToEnd: (options?: ScrollToOptions) => void;
827
- }, {
828
- scrollEnd: () => boolean;
829
- scrollStart: () => boolean;
830
- scroll: (_: number[]) => boolean;
831
- }, {
832
- options: {
833
- type: PropType<PartialKeys<VirtualizerOptions<HTMLElement, HTMLElement>, "observeElementRect" | "observeElementOffset" | "scrollToFn" | "getScrollElement">>;
834
- default: () => {};
835
- };
836
- count: {
837
- type: NumberConstructor;
838
- default: () => 0;
839
- };
840
- estimateSize: {
841
- type: PropType<((index: number) => number) | number>;
842
- default: () => 50;
843
- };
844
- horizontal: {
845
- type: BooleanConstructor;
846
- default: () => false;
847
- };
848
- }, vue.ExtractPropTypes<{
849
- options: {
850
- type: PropType<PartialKeys<VirtualizerOptions<HTMLElement, HTMLElement>, "observeElementRect" | "observeElementOffset" | "scrollToFn" | "getScrollElement">>;
851
- default: () => {};
852
- };
853
- count: {
854
- type: NumberConstructor;
855
- default: () => 0;
856
- };
857
- estimateSize: {
858
- type: PropType<((index: number) => number) | number>;
859
- default: () => 50;
860
- };
861
- horizontal: {
862
- type: BooleanConstructor;
863
- default: () => false;
864
- };
865
- }>, {
866
- horizontal: boolean;
867
- options: PartialKeys<VirtualizerOptions<HTMLElement, HTMLElement>, "observeElementRect" | "observeElementOffset" | "scrollToFn" | "getScrollElement">;
868
- count: number;
869
- estimateSize: number | ((index: number) => number);
870
- }>;
871
-
872
- export { AFFIX_TARGET_KEY, affixEmits, affixProps, configProviderProps, fileUploadEmits, fileUploadProps, iconProps, itemEmits, itemProps, popoverEmits, popoverProps, provideAffixTarget, selectionEmits, selectionProps, switchEmits, switchProps, useAffix, useFileUpload, useIcon, usePopover, useSelectionContext, useSelectionItem, useSelectionList, useSwitch, useVirtualList, virtualListEmits, virtualListProps };
873
- export type { AffixProps, HiFileUploadProps, HiFileUploadSlotData, HiIconProps, HiItemSlotsData, HiSelectionContext, HiSelectionSlotData, HiSwitchProps, InitFunction, Option, Placement, SelectionProps, TriggerEvent, VirtualListSlotData, VirtualizerOptions };