@toife/vue 3.5.2 → 3.5.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/components/action/action.vue.d.ts +1 -1
- package/dist/components/decision-modal/decision-modal.vue.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/modal/modal.vue.d.ts +1 -1
- package/dist/components/present/present.vue.d.ts +1 -1
- package/dist/components/route/route-wrapper/route-wrapper.composable.d.ts +1 -1
- package/dist/components/virtual-list/index.d.ts +1 -0
- package/dist/components/virtual-list/virtual-list.vue.d.ts +49 -0
- package/dist/core/features/index.d.ts +1 -0
- package/dist/core/features/route/route.type.d.ts +6 -0
- package/dist/core/features/virtual-list/index.d.ts +3 -0
- package/dist/core/features/virtual-list/virtual-list.constants.d.ts +15 -0
- package/dist/core/features/virtual-list/virtual-list.logic.d.ts +32 -0
- package/dist/core/features/virtual-list/virtual-list.type.d.ts +49 -0
- package/dist/index.es.js +2361 -2074
- package/dist/index.umd.js +1 -1
- package/dist/styles/index.css +1 -0
- package/dist/styles/route-navigator.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/virtual-list.css +1 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ declare const _default: import('vue').DefineComponent<ActionProps, {}, {}, {}, {
|
|
|
9
9
|
role: string;
|
|
10
10
|
shape: string;
|
|
11
11
|
divider: boolean;
|
|
12
|
-
placement: import('../../core').ActionPlacement;
|
|
13
12
|
visible: boolean;
|
|
13
|
+
placement: import('../../core').ActionPlacement;
|
|
14
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
export default _default;
|
|
@@ -10,8 +10,8 @@ declare const _default: import('vue').DefineComponent<DecisionModalProps, {}, {}
|
|
|
10
10
|
shape: string;
|
|
11
11
|
divider: boolean;
|
|
12
12
|
direction: import('../../core').DecisionModalDirection;
|
|
13
|
+
visible: boolean;
|
|
13
14
|
placement: string;
|
|
14
15
|
keepalive: boolean;
|
|
15
|
-
visible: boolean;
|
|
16
16
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
export default _default;
|
|
@@ -7,9 +7,9 @@ declare const _default: import('vue').DefineComponent<ModalProps, {}, {}, {}, {}
|
|
|
7
7
|
duration: number;
|
|
8
8
|
backdrop: "display" | "none" | "transparent";
|
|
9
9
|
bounce: number | string;
|
|
10
|
+
visible: boolean;
|
|
10
11
|
placement: "top" | "left" | "right" | "center" | "bottom";
|
|
11
12
|
keepalive: boolean;
|
|
12
|
-
visible: boolean;
|
|
13
13
|
gesture: boolean;
|
|
14
14
|
fullscreen: boolean;
|
|
15
15
|
indicator: boolean;
|
|
@@ -11,8 +11,8 @@ declare const _default: import('vue').DefineComponent<PresentProps, {
|
|
|
11
11
|
duration: number;
|
|
12
12
|
backdrop: "display" | "none" | "transparent";
|
|
13
13
|
bounce: number | string | boolean;
|
|
14
|
+
visible: boolean;
|
|
14
15
|
placement: import('../../core').PresentPlacement;
|
|
15
16
|
keepalive: boolean;
|
|
16
|
-
visible: boolean;
|
|
17
17
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
export default _default;
|
|
@@ -2,5 +2,5 @@ import { RouteLocationMatched } from 'vue-router';
|
|
|
2
2
|
import { RouteStack } from '../../../core';
|
|
3
3
|
export declare const useRouteWrapper: () => {
|
|
4
4
|
stack: import('vue').ShallowRef<RouteStack[], RouteStack[]>;
|
|
5
|
-
updateRoutes: (matched: RouteLocationMatched[]) => void;
|
|
5
|
+
updateRoutes: (matched: RouteLocationMatched[], fullPath?: string) => void;
|
|
6
6
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VirtualList } from './virtual-list.vue';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { VirtualListAlign, VirtualListProps } from '../../core';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
item(props: {
|
|
6
|
+
item: unknown;
|
|
7
|
+
index: number;
|
|
8
|
+
}): unknown;
|
|
9
|
+
}> & {
|
|
10
|
+
item(props: {
|
|
11
|
+
item: unknown;
|
|
12
|
+
index: number;
|
|
13
|
+
}): unknown;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<VirtualListProps, {
|
|
20
|
+
/** Ancestor that actually scrolls. */
|
|
21
|
+
scrollport: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
22
|
+
scrollToIndex: (index: number, align?: VirtualListAlign) => void;
|
|
23
|
+
scrollToOffset: (offset: number) => void;
|
|
24
|
+
/** Recompute the window after a change no observer can see. */
|
|
25
|
+
update: () => void;
|
|
26
|
+
range: {
|
|
27
|
+
start: number;
|
|
28
|
+
end: number;
|
|
29
|
+
offset: number;
|
|
30
|
+
size: number;
|
|
31
|
+
};
|
|
32
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
33
|
+
visible: (range: import('../../core').VirtualListVisibleRange) => any;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<VirtualListProps> & Readonly<{
|
|
35
|
+
onVisible?: ((range: import('../../core').VirtualListVisibleRange) => any) | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
direction: import('../../core').VirtualListDirection;
|
|
38
|
+
gap: number;
|
|
39
|
+
estimate: number;
|
|
40
|
+
overscan: number;
|
|
41
|
+
measure: boolean;
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -2,4 +2,10 @@ export type RouteStack = {
|
|
|
2
2
|
name: string;
|
|
3
3
|
component: unknown;
|
|
4
4
|
stack: RouteStack[];
|
|
5
|
+
/** Unique identity: leaf pages use `fullPath`, layouts use route `name`. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Location `fullPath` when this entry was last activated. */
|
|
8
|
+
fullPath: string;
|
|
5
9
|
};
|
|
10
|
+
/** Leaf pages are unique by full URL; layout segments stay unique by route name. */
|
|
11
|
+
export declare const getRouteStackKey: (name: string, isLeaf: boolean, fullPath: string) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Virtual List Default Props
|
|
3
|
+
*/
|
|
4
|
+
export declare const VIRTUAL_LIST_DEFAULT_PROPS: {
|
|
5
|
+
readonly estimate: 48;
|
|
6
|
+
readonly overscan: 4;
|
|
7
|
+
readonly gap: 0;
|
|
8
|
+
readonly direction: "vertical";
|
|
9
|
+
readonly measure: true;
|
|
10
|
+
};
|
|
11
|
+
/** Unmeasured items must not collapse to 0 or the window search cannot move. */
|
|
12
|
+
export declare const VIRTUAL_LIST_MIN_ESTIMATE = 1;
|
|
13
|
+
/** Sub-pixel resize noise is not a real size change. */
|
|
14
|
+
export declare const VIRTUAL_LIST_SIZE_EPSILON = 0.5;
|
|
15
|
+
export declare const VIRTUAL_LIST_OVERFLOW_RE: RegExp;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VirtualListAlign, VirtualListAttrOptions, VirtualListDirection, VirtualListItemAttrOptions, VirtualListItemKey, VirtualListMetrics, VirtualListWindow, VirtualListWindowOptions } from './virtual-list.type';
|
|
2
|
+
export declare const getVirtualListItemSize: (index: number, sizes: Array<number | undefined>, estimate: number) => number;
|
|
3
|
+
export declare const getVirtualListAttrs: (options: VirtualListAttrOptions) => {
|
|
4
|
+
class: (string | {
|
|
5
|
+
[x: string]: boolean;
|
|
6
|
+
})[];
|
|
7
|
+
style: {
|
|
8
|
+
[x: string]: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const getVirtualListItemAttrs: (options: VirtualListItemAttrOptions) => {
|
|
12
|
+
class: string[];
|
|
13
|
+
style: {
|
|
14
|
+
[x: string]: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const getVirtualListItemKey: (item: unknown, index: number, itemKey?: VirtualListItemKey) => PropertyKey;
|
|
18
|
+
/**
|
|
19
|
+
* Prefix offsets: `offsets[i]` is the start of item `i`, `offsets[count]` is
|
|
20
|
+
* the end of the last item plus a trailing `gap` that callers must subtract.
|
|
21
|
+
*/
|
|
22
|
+
export declare const buildVirtualListOffsets: (count: number, sizes: Array<number | undefined>, estimate: number, gap: number) => number[];
|
|
23
|
+
export declare const getVirtualListTotalSize: (offsets: number[], gap: number) => number;
|
|
24
|
+
/** Largest `i` whose item starts at or before `offset`. */
|
|
25
|
+
export declare const findVirtualListIndex: (offsets: number[], offset: number) => number;
|
|
26
|
+
export declare const getVirtualListWindow: (offsets: number[], metrics: VirtualListMetrics, options: VirtualListWindowOptions) => VirtualListWindow;
|
|
27
|
+
export declare const getVirtualListScrollToOffset: (offsets: number[], index: number, viewport: number, align: VirtualListAlign, current: number, gap: number) => number;
|
|
28
|
+
export declare const getVirtualListMetrics: (scrollport: HTMLElement, direction: VirtualListDirection) => VirtualListMetrics;
|
|
29
|
+
export declare const getVirtualListItemExtent: (element: HTMLElement, direction: VirtualListDirection) => number;
|
|
30
|
+
/** Closest overflow ancestor — `.t-scrollbar-content` when nested in `t-scrollbar`. */
|
|
31
|
+
export declare const getVirtualListScrollport: (element: Element | null, direction: VirtualListDirection) => HTMLElement | null;
|
|
32
|
+
export declare const scrollVirtualListTo: (scrollport: HTMLElement, direction: VirtualListDirection, offset: number, behavior?: ScrollBehavior) => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type VirtualListDirection = "vertical" | "horizontal";
|
|
2
|
+
export type VirtualListAlign = "start" | "center" | "end" | "auto";
|
|
3
|
+
export type VirtualListItemKey = string | ((item: unknown, index: number) => PropertyKey);
|
|
4
|
+
export type VirtualListProps = {
|
|
5
|
+
items?: unknown[];
|
|
6
|
+
/** Estimated (or fixed) item size in px along the scroll axis. */
|
|
7
|
+
estimate?: number;
|
|
8
|
+
/** Extra items rendered before and after the viewport. */
|
|
9
|
+
overscan?: number;
|
|
10
|
+
/** Space between items in px. Not applied after the last item. */
|
|
11
|
+
gap?: number;
|
|
12
|
+
direction?: VirtualListDirection;
|
|
13
|
+
/** Measure rendered items and remember their sizes. */
|
|
14
|
+
measure?: boolean;
|
|
15
|
+
/** Field name or getter used as the Vue/Lit item key. Defaults to the index. */
|
|
16
|
+
itemKey?: VirtualListItemKey;
|
|
17
|
+
};
|
|
18
|
+
export type VirtualListVisibleRange = {
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
};
|
|
22
|
+
export type VirtualListEvent = {
|
|
23
|
+
(e: "visible", range: VirtualListVisibleRange): void;
|
|
24
|
+
};
|
|
25
|
+
export type VirtualListMetrics = {
|
|
26
|
+
scrollOffset: number;
|
|
27
|
+
viewport: number;
|
|
28
|
+
};
|
|
29
|
+
/** One window of `items` that should be in the DOM. `end` is exclusive. */
|
|
30
|
+
export type VirtualListWindow = {
|
|
31
|
+
start: number;
|
|
32
|
+
end: number;
|
|
33
|
+
/** Offset of `items[start]` from the start of the list. */
|
|
34
|
+
offset: number;
|
|
35
|
+
/** Total size of the list along the scroll axis — what the scrollport must see. */
|
|
36
|
+
size: number;
|
|
37
|
+
};
|
|
38
|
+
export type VirtualListAttrOptions = {
|
|
39
|
+
direction: VirtualListDirection;
|
|
40
|
+
size: number;
|
|
41
|
+
};
|
|
42
|
+
export type VirtualListItemAttrOptions = {
|
|
43
|
+
direction: VirtualListDirection;
|
|
44
|
+
offset: number;
|
|
45
|
+
};
|
|
46
|
+
export type VirtualListWindowOptions = {
|
|
47
|
+
overscan: number;
|
|
48
|
+
gap: number;
|
|
49
|
+
};
|