File size: 5,897 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
/// <reference types="svelte" />
import { type CreateScrollAreaProps } from "@melt-ui/svelte";
import type { Writable } from "svelte/store";
type GetReturn = Omit<ReturnType<typeof setCtx>, "updateOption">;
export declare function setCtx(props: CreateScrollAreaProps): {
updateOption: <K extends string, V extends unknown>(key: K, value: V | undefined) => void;
getAttrs: (part: "content" | "root" | "viewport" | "scrollbar-x" | "scrollbar-y" | "thumb-x" | "thumb-y" | "corner") => Record<string, string>;
options: import("@melt-ui/svelte/internal/helpers").ToWritableStores<Omit<{
type: import("@melt-ui/svelte").ScrollAreaType;
hideDelay: number;
dir: import("@melt-ui/svelte/internal/types").TextDirection;
ids?: Partial<{
content: string;
viewport: string;
root: string;
scrollbarX: string;
scrollbarY: string;
thumbX: string;
thumbY: string;
}> | undefined;
}, "ids">>;
elements: {
root: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<Writable<number>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<number>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<string>>], <Node_1 extends unknown>(node: HTMLElement) => {
destroy(): void;
}, ([$cornerWidth, $cornderHeight, $rootId]: [number, number, string]) => {
style: string;
id: string;
}, string>;
viewport: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<string>>], <Node_2 extends unknown>(node: HTMLElement) => {
destroy(): void;
}, ([$scrollbarXEnabled, $scrollbarYEnabled, $viewportId]: [boolean, boolean, string]) => {
style: string;
id: string;
}, string>;
content: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<Writable<string>>], <Node_3 extends unknown>(node: HTMLElement) => {
destroy(): void;
}, ([$contentId]: [string]) => {
style: string;
id: string;
}, string>;
corner: import("@melt-ui/svelte/internal/helpers").MeltElement<[Writable<number>, Writable<number>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<import("@melt-ui/svelte/internal/types").TextDirection>>, import("svelte/store").Readable<boolean>], import("svelte/action").Action<any, any, Record<never, any>>, ([$width, $height, $dir, $shouldDisplay]: [number, number, import("@melt-ui/svelte/internal/types").TextDirection, boolean]) => {
style: string;
}, string>;
scrollbarX: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<Writable<import("@melt-ui/svelte/dist/builders/scroll-area/helpers").Sizes>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<import("@melt-ui/svelte/internal/types").TextDirection>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<boolean>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"pointerdown" | "pointermove" | "pointerup">, ([$sizes, $dir, $isVisible]: [import("@melt-ui/svelte/dist/builders/scroll-area/helpers").Sizes, import("@melt-ui/svelte/internal/types").TextDirection, boolean]) => {
style: string;
'data-state': string;
}, string>;
scrollbarY: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<Writable<import("@melt-ui/svelte/dist/builders/scroll-area/helpers").Sizes>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<import("@melt-ui/svelte/internal/types").TextDirection>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<boolean>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"pointerdown" | "pointermove" | "pointerup">, ([$sizes, $dir, $isVisible]: [import("@melt-ui/svelte/dist/builders/scroll-area/helpers").Sizes, import("@melt-ui/svelte/internal/types").TextDirection, boolean]) => {
style: string;
'data-state': string;
}, string>;
thumbX: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Readable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<number>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"pointerdown" | "pointerup">, ([$hasThumb, $isHorizontal, $offset]: [boolean, boolean, number]) => {
style: string;
'data-state': string;
}, string>;
thumbY: import("@melt-ui/svelte/internal/helpers").MeltElement<[import("@melt-ui/svelte/internal/helpers").WithGet<import("svelte/store").Readable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<boolean>>, import("@melt-ui/svelte/internal/helpers").WithGet<Writable<number>>], (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"pointerdown" | "pointerup">, ([$hasThumb, $isHorizontal, $offset]: [boolean, boolean, number]) => {
style: string;
'data-state': string;
}, string>;
};
};
export declare function getCtx(): GetReturn;
export declare function setScrollbarOrientation(orientation: Writable<"horizontal" | "vertical">): Writable<"horizontal" | "vertical">;
export declare function getScrollbarOrientation(): Writable<"horizontal" | "vertical">;
export {};
|