Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { mergeProps } from "svelte-toolbelt";
import { useScrollAreaScrollbarAuto } from "../scroll-area.svelte.js";
import type { _ScrollbarStubProps } from "../types.js";
import type { ScrollbarStubProps } from "../types.js";
import ScrollAreaScrollbarVisible from "./scroll-area-scrollbar-visible.svelte";
import PresenceLayer from "$lib/bits/utilities/presence-layer/presence-layer.svelte";

let { forceMount = false, ...restProps }: _ScrollbarStubProps = $props();
let { forceMount = false, ...restProps }: ScrollbarStubProps = $props();

const scrollbarAutoState = useScrollAreaScrollbarAuto();
const mergedProps = $derived(mergeProps(restProps, scrollbarAutoState.props));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
useScrollAreaScrollbarAuto,
useScrollAreaScrollbarHover,
} from "../scroll-area.svelte.js";
import type { _ScrollbarStubProps } from "../types.js";
import type { ScrollbarStubProps } from "../types.js";
import ScrollAreaScrollbarVisible from "./scroll-area-scrollbar-visible.svelte";
import PresenceLayer from "$lib/bits/utilities/presence-layer/presence-layer.svelte";

let { forceMount = false, ...restProps }: _ScrollbarStubProps = $props();
let { forceMount = false, ...restProps }: ScrollbarStubProps = $props();

const scrollbarHoverState = useScrollAreaScrollbarHover();
const scrollbarAutoState = useScrollAreaScrollbarAuto();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { mergeProps } from "svelte-toolbelt";
import { useScrollAreaScrollbarScroll } from "../scroll-area.svelte.js";
import type { _ScrollbarStubProps } from "../types.js";
import type { ScrollbarStubProps } from "../types.js";
import ScrollAreaScrollbarVisible from "./scroll-area-scrollbar-visible.svelte";
import PresenceLayer from "$lib/bits/utilities/presence-layer/presence-layer.svelte";

let { forceMount = false, ...restProps }: _ScrollbarStubProps = $props();
let { forceMount = false, ...restProps }: ScrollbarStubProps = $props();

const scrollbarScrollState = useScrollAreaScrollbarScroll();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import { mergeProps } from "svelte-toolbelt";
import { useScrollAreaScrollbarShared } from "../scroll-area.svelte.js";
import type { _ScrollbarStubProps } from "../types.js";
import type { ScrollbarStubProps } from "../types.js";

let { child, children, ...restProps }: _ScrollbarStubProps = $props();
let { child, children, ...restProps }: ScrollbarStubProps = $props();

const scrollbarSharedState = useScrollAreaScrollbarShared();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import { useScrollAreaScrollbarVisible } from "../scroll-area.svelte.js";
import type { _ScrollbarStubProps } from "../types.js";
import type { ScrollbarStubProps } from "../types.js";
import ScrollAreaScrollbarX from "./scroll-area-scrollbar-x.svelte";
import ScrollAreaScrollbarY from "./scroll-area-scrollbar-y.svelte";

let { ...restProps }: Omit<_ScrollbarStubProps, "forceMount"> = $props();
let { ...restProps }: Omit<ScrollbarStubProps, "forceMount"> = $props();

const scrollbarVisibleState = useScrollAreaScrollbarVisible();
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { IsMounted } from "runed";
import { box, mergeProps } from "svelte-toolbelt";
import { useScrollAreaScrollbarX } from "../scroll-area.svelte.js";
import type { _ScrollbarStubProps } from "../types.js";
import type { ScrollbarStubProps } from "../types.js";
import ScrollAreaScrollbarShared from "./scroll-area-scrollbar-shared.svelte";

let { ...restProps }: _ScrollbarStubProps = $props();
let { ...restProps }: ScrollbarStubProps = $props();

const isMounted = new IsMounted();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { IsMounted } from "runed";
import { box, mergeProps } from "svelte-toolbelt";
import { useScrollAreaScrollbarY } from "../scroll-area.svelte.js";
import type { _ScrollbarStubProps } from "../types.js";
import type { ScrollbarStubProps } from "../types.js";
import ScrollAreaScrollbarShared from "./scroll-area-scrollbar-shared.svelte";

let { ...restProps }: _ScrollbarStubProps = $props();
let { ...restProps }: ScrollbarStubProps = $props();

const isMounted = new IsMounted();

Expand Down
2 changes: 1 addition & 1 deletion packages/bits-ui/src/lib/bits/scroll-area/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ export type ScrollAreaCornerPropsWithoutHTML = WithChild;
export type ScrollAreaCornerProps = ScrollAreaCornerPropsWithoutHTML &
Without<BitsPrimitiveDivAttributes, ScrollAreaCornerPropsWithoutHTML>;

export type _ScrollbarStubProps = Omit<ScrollAreaScrollbarProps, "orientation" | "ref" | "id"> & {
export type ScrollbarStubProps = Omit<ScrollAreaScrollbarProps, "orientation" | "ref" | "id"> & {
Copy link
Collaborator Author

@AdrianGonz97 AdrianGonz97 May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noting this here since it seems like it was mistakenly named with a _ prefix

id: string;
};