Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Aug 6, 2024
1 parent 7ebe641 commit 98da6e3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions packages/vaul-svelte/src/lib/components/drawer/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Dialog as DialogPrimitive, PrimitiveDivAttributes, WithChild } from "bits-ui";
import type { WithChildren, Without } from "svelte-toolbelt";
import type { DrawerDirection, OnChangeFn } from "$lib/types.js";
import type { OnDrag, OnRelease } from "$lib/vaul.svelte.js";
import type { DrawerDirection, OnChangeFn, OnDrag, OnRelease } from "$lib/types.js";

export type BaseDrawerRootPropsWithoutHTML = WithChildren<{
/**
Expand Down
2 changes: 2 additions & 0 deletions packages/vaul-svelte/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from "./components/index.js";
export * from "./components/drawer/index.js";
export * from "./types.js";
export type { OnDrag, OnRelease } from "./vaul.svelte.js";
2 changes: 2 additions & 0 deletions packages/vaul-svelte/src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export type * from "./components/drawer/types.js";
export type DrawerDirection = "left" | "right" | "top" | "bottom";
export type OnChangeFn<T> = (value: T) => void;
export type OnDrag = (event: PointerEvent, percentageDragged: number) => void;
export type OnRelease = (event: PointerEvent, open: boolean) => void;
7 changes: 1 addition & 6 deletions packages/vaul-svelte/src/lib/vaul.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { PositionFixed } from "./position-fixed.svelte.js";
import { createContext } from "./internal/createContext.js";
import { noop } from "./internal/helpers/noop.js";
import { SnapPoints } from "./snap-points.svelte.js";
import type { DrawerDirection, OnDrag, OnRelease } from "./types.js";

export const DEFAULT_CLOSE_THRESHOLD = 0.25;
export const DEFAULT_SCROLL_LOCK_TIMEOUT = 100;
Expand All @@ -23,12 +24,6 @@ const NESTED_DISPLACEMENT = 16;
const WINDOW_TOP_OFFSET = 26;
const DRAG_CLASS = "vaul-dragging";

export type DrawerDirection = "left" | "right" | "top" | "bottom";

export type OnDrag = (event: PointerEvent, percentageDragged: number) => void;
export type OnReleaseEvent = PointerEvent | MouseEvent | TouchEvent;
export type OnRelease = (event: PointerEvent, open: boolean) => void;

type DrawerRootStateProps = ReadableBoxedValues<{
closeThreshold: number;
shouldScaleBackground: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/vaul-svelte/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"module": "NodeNext",
"verbatimModuleSyntax": true
}
}

0 comments on commit 98da6e3

Please sign in to comment.