@zayne-labs/ui-react 0.11.2 → 0.11.3

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.
@@ -1,8 +1,8 @@
1
- import { o as ErrorBoundaryProps } from "../../index-Dbt-nJhQ.js";
2
- import { n as SuspenseWithBoundaryProps } from "../../index-Ce3J0_vR.js";
1
+ import { o as ErrorBoundaryProps } from "../../index-DC9fblW0.js";
2
+ import { n as SuspenseWithBoundaryProps } from "../../index-D_Ntazyt.js";
3
3
  import { GetSlotComponentProps } from "@zayne-labs/toolkit-react/utils";
4
- import * as react from "react";
5
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as _$react from "react";
5
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/common/await/await.d.ts
8
8
  type RenderPropFn<TValue> = (result: TValue) => React.ReactNode;
@@ -14,9 +14,9 @@ type AwaitRootProps<TValue> = Pick<SuspenseWithBoundaryProps, "errorFallback" |
14
14
  withErrorBoundary?: boolean;
15
15
  withSuspense?: boolean;
16
16
  };
17
- declare function AwaitRoot<TValue>(props: AwaitRootProps<TValue>): react_jsx_runtime0.JSX.Element;
17
+ declare function AwaitRoot<TValue>(props: AwaitRootProps<TValue>): _$react_jsx_runtime0.JSX.Element;
18
18
  type AwaitSuccessProps<TValue = unknown> = GetSlotComponentProps<"default", ChildrenType<TValue>>;
19
- declare function AwaitSuccess<TPromiseOrValue, TValue = Awaited<TPromiseOrValue>>(props: Pick<AwaitSuccessProps<TValue>, "children">): react.ReactNode;
19
+ declare function AwaitSuccess<TPromiseOrValue, TValue = Awaited<TPromiseOrValue>>(props: Pick<AwaitSuccessProps<TValue>, "children">): _$react.ReactNode;
20
20
  type AwaitErrorProps = GetSlotComponentProps<"error", ErrorBoundaryProps["fallback"]>;
21
21
  declare const AwaitError: {
22
22
  (props: Pick<AwaitErrorProps, "children"> & {
@@ -1,4 +1,4 @@
1
- import * as react from "react";
1
+ import * as _$react from "react";
2
2
 
3
3
  //#region src/components/common/client-gate/client-gate.d.ts
4
4
  type ClientGateProps = {
@@ -27,7 +27,7 @@ type ClientGateProps = {
27
27
  * );
28
28
  * ```
29
29
  */
30
- declare function ClientGate(props: ClientGateProps): react.ReactNode;
30
+ declare function ClientGate(props: ClientGateProps): _$react.ReactNode;
31
31
  //#endregion
32
32
  export { ClientGate, ClientGateProps };
33
33
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- import { a as ErrorBoundary, i as useErrorBoundaryContext, n as useErrorBoundary, o as ErrorBoundaryProps, r as ErrorBoundaryContextType, s as ErrorFallbackProps, t as UseErrorBoundaryReturn } from "../../index-Dbt-nJhQ.js";
1
+ import { a as ErrorBoundary, i as useErrorBoundaryContext, n as useErrorBoundary, o as ErrorBoundaryProps, r as ErrorBoundaryContextType, s as ErrorFallbackProps, t as UseErrorBoundaryReturn } from "../../index-DC9fblW0.js";
2
2
  export { ErrorBoundary, ErrorBoundaryContextType, ErrorBoundaryProps, ErrorFallbackProps, UseErrorBoundaryReturn, useErrorBoundary, useErrorBoundaryContext };
@@ -1,7 +1,7 @@
1
1
  import { DiscriminatedRenderItemProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
2
  import { Prettify } from "@zayne-labs/toolkit-type-helpers";
3
- import * as react from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as _$react from "react";
4
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/common/for/for.d.ts
7
7
  type ArrayOrNumber = number | readonly unknown[];
@@ -12,11 +12,11 @@ type ForProps<TArray extends ArrayOrNumber> = Prettify<{
12
12
  each: TArray;
13
13
  fallback?: React.ReactNode;
14
14
  } & ForRenderProps<TArray>>;
15
- declare function For<const TArray extends ArrayOrNumber>(props: ForProps<TArray>): string | number | bigint | boolean | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null;
15
+ declare function For<const TArray extends ArrayOrNumber>(props: ForProps<TArray>): string | number | bigint | boolean | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | null | undefined> | null;
16
16
  type ForWithWrapperProps<TArray extends ArrayOrNumber, TElement extends React.ElementType = "ul"> = PolymorphicPropsStrict<TElement, ForProps<TArray>> & {
17
17
  displayFallBackWhenEmpty?: boolean;
18
18
  };
19
- declare function ForWithWrapper<const TArray extends ArrayOrNumber, TElement extends React.ElementType = "ul">(props: ForWithWrapperProps<TArray, TElement>): string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
19
+ declare function ForWithWrapper<const TArray extends ArrayOrNumber, TElement extends React.ElementType = "ul">(props: ForWithWrapperProps<TArray, TElement>): string | number | bigint | boolean | Iterable<_$react.ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | null | undefined> | _$react_jsx_runtime0.JSX.Element | null;
20
20
  //#endregion
21
21
  //#region src/components/common/for/getElementList.d.ts
22
22
  type GetElementListResult<TVariant extends "base" | "withWrapper"> = TVariant extends "base" ? [typeof For] : [typeof ForWithWrapper];
@@ -1,5 +1,5 @@
1
1
  import { InferProps } from "@zayne-labs/toolkit-react/utils";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/common/presence/use-presence.d.ts
5
5
  type UsePresenceOptions = {
@@ -30,7 +30,7 @@ type PresenceProps = UsePresenceOptions & {
30
30
  className?: string;
31
31
  forceMount?: boolean;
32
32
  };
33
- declare function Presence(props: PresenceProps): react_jsx_runtime0.JSX.Element | null;
33
+ declare function Presence(props: PresenceProps): _$react_jsx_runtime0.JSX.Element | null;
34
34
  //#endregion
35
35
  export { Presence, PresenceProps };
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react from "react";
1
+ import * as _$react from "react";
2
2
 
3
3
  //#region src/components/common/show/show.d.ts
4
4
  type ShowRootProps<TWhen> = {
@@ -12,15 +12,15 @@ type ShowRootProps<TWhen> = {
12
12
  fallback?: React.ReactNode;
13
13
  when: false | TWhen | null | undefined;
14
14
  };
15
- declare function ShowRoot<TWhen>(props: ShowRootProps<TWhen>): string | number | bigint | boolean | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null;
15
+ declare function ShowRoot<TWhen>(props: ShowRootProps<TWhen>): string | number | bigint | boolean | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | null | undefined> | null;
16
16
  type ShowContentProps<TWhen> = Pick<ShowRootProps<TWhen>, "children" | "when">;
17
- declare function ShowContent<TWhen>(props: ShowContentProps<TWhen>): react.ReactNode;
17
+ declare function ShowContent<TWhen>(props: ShowContentProps<TWhen>): _$react.ReactNode;
18
18
  declare namespace ShowContent {
19
19
  var slotSymbol: symbol;
20
20
  }
21
21
  declare function ShowFallback(props: {
22
22
  children: React.ReactNode;
23
- }): react.ReactNode;
23
+ }): _$react.ReactNode;
24
24
  declare namespace ShowFallback {
25
25
  var slotSymbol: symbol;
26
26
  }
@@ -1,15 +1,15 @@
1
1
  import { InferProps } from "@zayne-labs/toolkit-react/utils";
2
- import * as react from "react";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as _$react from "react";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/common/slot/slot.d.ts
6
6
  type SlotProps = InferProps<HTMLElement> & {
7
7
  ref?: React.Ref<HTMLElement>;
8
8
  };
9
- declare function SlotRoot(props: SlotProps): react_jsx_runtime0.JSX.Element | null;
9
+ declare function SlotRoot(props: SlotProps): _$react_jsx_runtime0.JSX.Element | null;
10
10
  declare function SlotSlottable({
11
11
  children
12
- }: Pick<SlotProps, "children">): react.ReactNode;
12
+ }: Pick<SlotProps, "children">): _$react.ReactNode;
13
13
  declare namespace slot_parts_d_exports {
14
14
  export { SlotRoot as Root, SlotSlottable as Slottable };
15
15
  }
@@ -1,2 +1,2 @@
1
- import { n as SuspenseWithBoundaryProps, t as SuspenseWithBoundary } from "../../index-Ce3J0_vR.js";
1
+ import { n as SuspenseWithBoundaryProps, t as SuspenseWithBoundary } from "../../index-D_Ntazyt.js";
2
2
  export { SuspenseWithBoundary, SuspenseWithBoundaryProps };
@@ -1,4 +1,4 @@
1
- import * as react from "react";
1
+ import * as _$react from "react";
2
2
 
3
3
  //#region src/components/common/switch/switch.d.ts
4
4
  type ValidSwitchComponentType = React.ReactElement<SwitchMatchProps<unknown>>;
@@ -6,17 +6,17 @@ type SwitchRootProps<TValue> = {
6
6
  children: ValidSwitchComponentType | ValidSwitchComponentType[];
7
7
  value?: TValue;
8
8
  };
9
- declare function SwitchRoot<TValue>(props: SwitchRootProps<TValue>): react.ReactNode;
9
+ declare function SwitchRoot<TValue>(props: SwitchRootProps<TValue>): _$react.ReactNode;
10
10
  type SwitchMatchProps<TWhen> = {
11
11
  children: React.ReactNode | ((value: TWhen) => React.ReactNode);
12
12
  when: false | TWhen | null | undefined;
13
13
  };
14
- declare function SwitchMatch<TWhen>(props: SwitchMatchProps<TWhen>): react.ReactNode;
14
+ declare function SwitchMatch<TWhen>(props: SwitchMatchProps<TWhen>): _$react.ReactNode;
15
15
  declare function SwitchDefault({
16
16
  children
17
17
  }: {
18
18
  children: React.ReactNode;
19
- }): react.ReactNode;
19
+ }): _$react.ReactNode;
20
20
  declare namespace SwitchDefault {
21
21
  var slotSymbol: symbol;
22
22
  }
@@ -1,5 +1,5 @@
1
1
  import { AnyString } from "@zayne-labs/toolkit-type-helpers";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/common/teleport/teleport.d.ts
5
5
  type ValidHtmlTags = keyof HTMLElementTagNameMap;
@@ -8,7 +8,7 @@ type TeleportProps = {
8
8
  insertPosition?: InsertPosition;
9
9
  to: AnyString | HTMLElement | React.RefObject<HTMLElement> | ValidHtmlTags | null;
10
10
  };
11
- declare function Teleport(props: TeleportProps): react_jsx_runtime0.JSX.Element;
11
+ declare function Teleport(props: TeleportProps): _$react_jsx_runtime0.JSX.Element;
12
12
  //#endregion
13
13
  export { Teleport, type TeleportProps };
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
- import * as react from "react";
1
+ import * as _$react from "react";
2
2
  import { Component } from "react";
3
- import * as _zayne_labs_toolkit_react0 from "@zayne-labs/toolkit-react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as _$_zayne_labs_toolkit_react0 from "@zayne-labs/toolkit-react";
4
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/common/error-boundary/types.d.ts
7
7
  type ErrorFallbackProps = {
@@ -49,7 +49,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
49
49
  };
50
50
  componentDidCatch(error: Error, info: React.ErrorInfo): void;
51
51
  componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
52
- render(): react_jsx_runtime0.JSX.Element;
52
+ render(): _$react_jsx_runtime0.JSX.Element;
53
53
  }
54
54
  //#endregion
55
55
  //#region src/components/common/error-boundary/error-boundary-context.d.ts
@@ -58,7 +58,7 @@ type ErrorBoundaryContextType = {
58
58
  hasError: boolean;
59
59
  resetErrorBoundary: (...args: unknown[]) => void;
60
60
  };
61
- declare const ErrorBoundaryContext: react.Context<ErrorBoundaryContextType>, useErrorBoundaryContext: _zayne_labs_toolkit_react0.UseCustomContext<ErrorBoundaryContextType, true>;
61
+ declare const ErrorBoundaryContext: _$react.Context<ErrorBoundaryContextType>, useErrorBoundaryContext: _$_zayne_labs_toolkit_react0.UseCustomContext<ErrorBoundaryContextType, true>;
62
62
  //#endregion
63
63
  //#region src/components/common/error-boundary/useErrorBoundary.d.ts
64
64
  declare const useErrorBoundary: <TError extends Error>() => {
@@ -71,4 +71,4 @@ type UseErrorBoundaryReturn = {
71
71
  };
72
72
  //#endregion
73
73
  export { ErrorBoundary as a, useErrorBoundaryContext as i, useErrorBoundary as n, ErrorBoundaryProps as o, ErrorBoundaryContextType as r, ErrorFallbackProps as s, UseErrorBoundaryReturn as t };
74
- //# sourceMappingURL=index-Dbt-nJhQ.d.ts.map
74
+ //# sourceMappingURL=index-DC9fblW0.d.ts.map
@@ -1,5 +1,5 @@
1
- import { o as ErrorBoundaryProps } from "./index-Dbt-nJhQ.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { o as ErrorBoundaryProps } from "./index-DC9fblW0.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/common/suspense-with-boundary/suspense-with-boundary.d.ts
5
5
  type SuspenseWithBoundaryProps = {
@@ -7,7 +7,7 @@ type SuspenseWithBoundaryProps = {
7
7
  errorFallback?: ErrorBoundaryProps["fallback"];
8
8
  fallback?: React.ReactNode;
9
9
  };
10
- declare function SuspenseWithBoundary(props: SuspenseWithBoundaryProps): react_jsx_runtime0.JSX.Element;
10
+ declare function SuspenseWithBoundary(props: SuspenseWithBoundaryProps): _$react_jsx_runtime0.JSX.Element;
11
11
  //#endregion
12
12
  export { SuspenseWithBoundaryProps as n, SuspenseWithBoundary as t };
13
- //# sourceMappingURL=index-Ce3J0_vR.d.ts.map
13
+ //# sourceMappingURL=index-D_Ntazyt.d.ts.map
@@ -1,31 +1,31 @@
1
1
  import { PolymorphicProps } from "@zayne-labs/toolkit-react/utils";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ui/card/card.d.ts
5
5
  declare function CardRoot<TElement extends React.ElementType = "article">(props: PolymorphicProps<TElement, {
6
6
  asChild?: boolean;
7
7
  className?: string;
8
- }>): react_jsx_runtime0.JSX.Element;
8
+ }>): _$react_jsx_runtime0.JSX.Element;
9
9
  declare function CardHeader<TElement extends React.ElementType = "header">(props: PolymorphicProps<TElement, {
10
10
  asChild?: boolean;
11
11
  className?: string;
12
- }>): react_jsx_runtime0.JSX.Element;
12
+ }>): _$react_jsx_runtime0.JSX.Element;
13
13
  declare function CardTitle<TElement extends React.ElementType = "h3">(props: PolymorphicProps<TElement, {
14
14
  className?: string;
15
- }>): react_jsx_runtime0.JSX.Element;
15
+ }>): _$react_jsx_runtime0.JSX.Element;
16
16
  declare function CardDescription<TElement extends React.ElementType = "p">(props: PolymorphicProps<TElement, {
17
17
  className?: string;
18
- }>): react_jsx_runtime0.JSX.Element;
18
+ }>): _$react_jsx_runtime0.JSX.Element;
19
19
  declare function CardContent<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement, {
20
20
  className?: string;
21
- }>): react_jsx_runtime0.JSX.Element;
21
+ }>): _$react_jsx_runtime0.JSX.Element;
22
22
  declare function CardAction<TElement extends React.ElementType = "button">(props: PolymorphicProps<TElement, {
23
23
  className?: string;
24
- }>): react_jsx_runtime0.JSX.Element;
24
+ }>): _$react_jsx_runtime0.JSX.Element;
25
25
  declare function CardFooter<TElement extends React.ElementType = "footer">(props: PolymorphicProps<TElement, {
26
26
  asChild?: boolean;
27
27
  className?: string;
28
- }>): react_jsx_runtime0.JSX.Element;
28
+ }>): _$react_jsx_runtime0.JSX.Element;
29
29
  declare namespace card_parts_d_exports {
30
30
  export { CardAction as Action, CardContent as Content, CardDescription as Description, CardFooter as Footer, CardHeader as Header, CardRoot as Root, CardTitle as Title };
31
31
  }
@@ -1,6 +1,6 @@
1
1
  import { PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
2
  import { UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { StoreApi } from "@zayne-labs/toolkit-core";
5
5
 
6
6
  //#region src/components/ui/carousel/types.d.ts
@@ -78,14 +78,14 @@ type OtherCarouselProps = {
78
78
  };
79
79
  //#endregion
80
80
  //#region src/components/ui/carousel/carousel.d.ts
81
- declare function CarouselRoot<TImages extends ImagesType, TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, CarouselRootProps<TImages>>): react_jsx_runtime0.JSX.Element;
82
- declare function CarouselButton(props: CarouselButtonsProps): react_jsx_runtime0.JSX.Element;
83
- declare function CarouselControls(props: CarouselControlProps): react_jsx_runtime0.JSX.Element;
84
- declare function CarouselItemList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>): react_jsx_runtime0.JSX.Element;
85
- declare function CarouselItem(props: OtherCarouselProps): react_jsx_runtime0.JSX.Element;
86
- declare function CarouselCaption<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, OtherCarouselProps>): react_jsx_runtime0.JSX.Element;
87
- declare function CarouselIndicatorList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>): react_jsx_runtime0.JSX.Element;
88
- declare function CarouselIndicator(props: CarouselIndicatorProps): react_jsx_runtime0.JSX.Element;
81
+ declare function CarouselRoot<TImages extends ImagesType, TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, CarouselRootProps<TImages>>): _$react_jsx_runtime0.JSX.Element;
82
+ declare function CarouselButton(props: CarouselButtonsProps): _$react_jsx_runtime0.JSX.Element;
83
+ declare function CarouselControls(props: CarouselControlProps): _$react_jsx_runtime0.JSX.Element;
84
+ declare function CarouselItemList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>): _$react_jsx_runtime0.JSX.Element;
85
+ declare function CarouselItem(props: OtherCarouselProps): _$react_jsx_runtime0.JSX.Element;
86
+ declare function CarouselCaption<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, OtherCarouselProps>): _$react_jsx_runtime0.JSX.Element;
87
+ declare function CarouselIndicatorList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>): _$react_jsx_runtime0.JSX.Element;
88
+ declare function CarouselIndicator(props: CarouselIndicatorProps): _$react_jsx_runtime0.JSX.Element;
89
89
  declare namespace carousel_parts_d_exports {
90
90
  export { CarouselButton as Button, CarouselCaption as Caption, CarouselControls as Controls, CarouselIndicator as Indicator, CarouselIndicatorList as IndicatorList, CarouselItem as Item, CarouselItemList as ItemList, CarouselRoot as Root };
91
91
  }
@@ -1,9 +1,9 @@
1
1
  import { InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
- import * as _zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
2
+ import * as _$_zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
3
3
  import { SelectorFn } from "@zayne-labs/toolkit-type-helpers";
4
- import * as react from "react";
5
- import * as react_jsx_runtime0 from "react/jsx-runtime";
6
- import * as _zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
4
+ import * as _$react from "react";
5
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
+ import * as _$_zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
7
7
 
8
8
  //#region src/components/ui/drag-scroll/drag-scroll-context.d.ts
9
9
  declare const DragScrollStoreContextProvider: (props: {
@@ -29,9 +29,9 @@ declare const DragScrollStoreContextProvider: (props: {
29
29
  shouldReplace: true;
30
30
  }) | undefined): void;
31
31
  };
32
- subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore>;
32
+ subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore>;
33
33
  };
34
- }) => react.FunctionComponentElement<react.ProviderProps<{
34
+ }) => _$react.FunctionComponentElement<_$react.ProviderProps<{
35
35
  getInitialState: () => DragScrollStore;
36
36
  getListeners: () => Set<(state: DragScrollStore, prevState: DragScrollStore) => void>;
37
37
  getState: () => DragScrollStore;
@@ -52,8 +52,8 @@ declare const DragScrollStoreContextProvider: (props: {
52
52
  shouldReplace: true;
53
53
  }) | undefined): void;
54
54
  };
55
- subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore>;
56
- }>>, useDragScrollStoreContext: <TResult = DragScrollStore>(selector?: _zayne_labs_toolkit_type_helpers0.SelectorFn<DragScrollStore, TResult> | undefined) => TResult;
55
+ subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore>;
56
+ }>>, useDragScrollStoreContext: <TResult = DragScrollStore>(selector?: _$_zayne_labs_toolkit_type_helpers0.SelectorFn<DragScrollStore, TResult> | undefined) => TResult;
57
57
  //#endregion
58
58
  //#region src/components/ui/drag-scroll/drag-scroll-store.d.ts
59
59
  type RequiredUseDragScrollProps = { [Key in keyof Required<UseDragScrollProps>]: UseDragScrollProps[Key] | undefined };
@@ -79,7 +79,7 @@ declare const createDragScrollStore: (initStoreValues: InitStoreValues) => {
79
79
  shouldReplace: true;
80
80
  }) | undefined): void;
81
81
  };
82
- subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore>;
82
+ subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<DragScrollStore>;
83
83
  };
84
84
  //#endregion
85
85
  //#region src/components/ui/drag-scroll/types.d.ts
@@ -91,14 +91,14 @@ type SharedInputProps = {
91
91
  unstyled?: boolean;
92
92
  };
93
93
  type PartProps<TContainerElement extends HTMLElement = HTMLElement> = {
94
- container: {
95
- input: PartProps<TContainerElement>["container"]["output"] & SharedInputProps;
96
- output: RecordForDataAttr & InferProps<TContainerElement>;
97
- };
98
94
  item: {
99
95
  input: PartProps<TContainerElement>["item"]["output"] & SharedInputProps;
100
96
  output: InferProps<HTMLElement> & RecordForDataAttr;
101
97
  };
98
+ list: {
99
+ input: PartProps<TContainerElement>["list"]["output"] & SharedInputProps;
100
+ output: RecordForDataAttr & InferProps<TContainerElement>;
101
+ };
102
102
  nextButton: {
103
103
  input: PartProps<TContainerElement>["nextButton"]["output"] & SharedInputProps;
104
104
  output: RecordForDataAttr & InferProps<"button">;
@@ -129,7 +129,7 @@ type DragScrollActions = {
129
129
  handleMouseUpOrLeave: () => void;
130
130
  handleScroll: () => void;
131
131
  initializeResizeObserver: () => (() => void) | undefined;
132
- setContainerRef: (element: HTMLElement | null) => void;
132
+ setListRef: (element: HTMLElement | null) => void;
133
133
  updateScrollState: () => void;
134
134
  };
135
135
  };
@@ -166,13 +166,21 @@ type UseDragScrollProps = {
166
166
  usage?: "allScreens" | "desktopOnly" | "mobileAndTabletOnly";
167
167
  };
168
168
  type UseDragScrollResult<TContainerElement extends HTMLElement> = Pick<UseDragScrollProps, "disableInternalStateSubscription"> & {
169
- containerRef: React.RefObject<TContainerElement | null>;
169
+ listRef: React.RefObject<TContainerElement | null>;
170
170
  propGetters: DragScrollPropGetters<TContainerElement>;
171
171
  storeApi: ReturnType<typeof createDragScrollStore>;
172
172
  useDragScrollStore: typeof useDragScrollStoreContext;
173
173
  };
174
174
  //#endregion
175
+ //#region src/lib/utils/type-helpers.d.ts
176
+ type FromCamelToKebabCase<TString extends string> = TString extends `${infer First}${infer Rest}` ? First extends Uppercase<First> ? `-${Lowercase<First>}${FromCamelToKebabCase<Rest>}` : `${First}${FromCamelToKebabCase<Rest>}` : "";
177
+ //#endregion
175
178
  //#region src/components/ui/drag-scroll/use-drag-scroll.d.ts
179
+ declare const getDragScrollScopeAttrs: (part: FromCamelToKebabCase<keyof PartProps>) => {
180
+ readonly "data-slot": "drag-scroll-item" | "drag-scroll-list" | "drag-scroll-root" | "drag-scroll-next-button" | "drag-scroll-prev-button";
181
+ readonly "data-scope": "drag-scroll";
182
+ readonly "data-part": FromCamelToKebabCase<keyof PartProps>;
183
+ };
176
184
  declare const useDragScroll: <TContainerElement extends HTMLElement = HTMLElement>(props?: UseDragScrollProps) => UseDragScrollResult<TContainerElement>;
177
185
  //#endregion
178
186
  //#region src/components/ui/drag-scroll/drag-scroll.d.ts
@@ -180,31 +188,31 @@ type DragScrollRootProps = UseDragScrollProps & {
180
188
  asChild?: boolean;
181
189
  children: React.ReactNode;
182
190
  } & PartInputProps["root"];
183
- declare function DragScrollRoot<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DragScrollRootProps>): react_jsx_runtime0.JSX.Element;
191
+ declare function DragScrollRoot(props: DragScrollRootProps): _$react_jsx_runtime0.JSX.Element;
184
192
  type DragScrollContextProps<TSlice> = {
185
193
  children: React.ReactNode | ((context: TSlice) => React.ReactNode);
186
194
  selector?: SelectorFn<DragScrollStore, TSlice>;
187
195
  };
188
- declare function DragScrollContext<TSlice = DragScrollStore>(props: DragScrollContextProps<TSlice>): react.ReactNode;
189
- type DragScrollContainerProps = {
196
+ declare function DragScrollContext<TSlice = DragScrollStore>(props: DragScrollContextProps<TSlice>): _$react.ReactNode;
197
+ type DragScrollListProps = {
190
198
  asChild?: boolean;
191
- } & PartInputProps["container"];
192
- declare function DragScrollContainer<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DragScrollContainerProps>): react_jsx_runtime0.JSX.Element;
199
+ } & PartInputProps["list"];
200
+ declare function DragScrollList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DragScrollListProps>): _$react_jsx_runtime0.JSX.Element;
193
201
  type DragScrollItemProps = {
194
202
  asChild?: boolean;
195
203
  } & PartInputProps["item"];
196
- declare function DragScrollItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DragScrollItemProps>): react_jsx_runtime0.JSX.Element;
204
+ declare function DragScrollItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DragScrollItemProps>): _$react_jsx_runtime0.JSX.Element;
197
205
  type DragScrollPrevProps = {
198
206
  asChild?: boolean;
199
207
  } & PartInputProps["prevButton"];
200
- declare function DragScrollPrev(props: DragScrollPrevProps): react_jsx_runtime0.JSX.Element;
208
+ declare function DragScrollPrev(props: DragScrollPrevProps): _$react_jsx_runtime0.JSX.Element;
201
209
  type DragScrollNextProps = {
202
210
  asChild?: boolean;
203
211
  } & PartInputProps["nextButton"];
204
- declare function DragScrollNext(props: DragScrollNextProps): react_jsx_runtime0.JSX.Element;
212
+ declare function DragScrollNext(props: DragScrollNextProps): _$react_jsx_runtime0.JSX.Element;
205
213
  declare namespace drag_scroll_parts_d_exports {
206
- export { DragScrollContainer as Container, DragScrollContext as Context, DragScrollItem as Item, DragScrollNext as Next, DragScrollPrev as Prev, DragScrollRoot as Root };
214
+ export { DragScrollContext as Context, DragScrollItem as Item, DragScrollList as List, DragScrollNext as Next, DragScrollPrev as Prev, DragScrollRoot as Root };
207
215
  }
208
216
  //#endregion
209
- export { drag_scroll_parts_d_exports as DragScroll, DragScrollContainer, DragScrollContainerProps, DragScrollContext, DragScrollContextProps, DragScrollItem, DragScrollItemProps, DragScrollNext, DragScrollNextProps, DragScrollPrev, DragScrollPrevProps, DragScrollRoot, DragScrollRootProps, type DragScrollStore, type UseDragScrollProps, type UseDragScrollResult, useDragScroll, useDragScrollStoreContext };
217
+ export { drag_scroll_parts_d_exports as DragScroll, DragScrollContext, DragScrollContextProps, DragScrollItem, DragScrollItemProps, DragScrollList, DragScrollListProps, DragScrollNext, DragScrollNextProps, DragScrollPrev, DragScrollPrevProps, DragScrollRoot, DragScrollRootProps, type DragScrollStore, type UseDragScrollProps, type UseDragScrollResult, getDragScrollScopeAttrs, useDragScroll, useDragScrollStoreContext };
210
218
  //# sourceMappingURL=index.d.ts.map
@@ -33,7 +33,7 @@ const handleScrollSnap = (dragContainer) => {
33
33
  //#region src/components/ui/drag-scroll/drag-scroll-store.ts
34
34
  const createDragScrollStore = (initStoreValues) => {
35
35
  const { orientation = "horizontal", scrollAmount = "item", usage = "allScreens" } = initStoreValues;
36
- const containerRef = { current: null };
36
+ const listRef = { current: null };
37
37
  const positionRef = { current: {
38
38
  left: 0,
39
39
  top: 0,
@@ -62,22 +62,22 @@ const createDragScrollStore = (initStoreValues) => {
62
62
  abortControllerRef.current.mouseLeave.abort();
63
63
  },
64
64
  goToNext: () => {
65
- if (!containerRef.current) return;
65
+ if (!listRef.current) return;
66
66
  const { canGoToNext } = get();
67
67
  if (!canGoToNext) return;
68
- const amount = getScrollAmount(containerRef.current);
69
- containerRef.current.scrollBy({
68
+ const amount = getScrollAmount(listRef.current);
69
+ listRef.current.scrollBy({
70
70
  behavior: "smooth",
71
71
  left: orientation === "vertical" ? 0 : amount,
72
72
  top: orientation === "vertical" || orientation === "both" ? amount : 0
73
73
  });
74
74
  },
75
75
  goToPrev: () => {
76
- if (!containerRef.current) return;
76
+ if (!listRef.current) return;
77
77
  const { canGoToPrev } = get();
78
78
  if (!canGoToPrev) return;
79
- const amount = getScrollAmount(containerRef.current);
80
- containerRef.current.scrollBy({
79
+ const amount = getScrollAmount(listRef.current);
80
+ listRef.current.scrollBy({
81
81
  behavior: "smooth",
82
82
  left: orientation === "vertical" ? 0 : -amount,
83
83
  top: orientation === "vertical" || orientation === "both" ? -amount : 0
@@ -86,7 +86,7 @@ const createDragScrollStore = (initStoreValues) => {
86
86
  handleMouseDown: (event) => {
87
87
  if (usage === "mobileAndTabletOnly" && window.innerWidth >= 768) return;
88
88
  if (usage === "desktopOnly" && window.innerWidth < 768) return;
89
- if (!containerRef.current) return;
89
+ if (!listRef.current) return;
90
90
  abortControllerRef.current = {
91
91
  mouseLeave: new AbortController(),
92
92
  mouseMove: new AbortController(),
@@ -94,37 +94,37 @@ const createDragScrollStore = (initStoreValues) => {
94
94
  };
95
95
  if (orientation === "horizontal" || orientation === "both") {
96
96
  positionRef.current.x = event.clientX;
97
- positionRef.current.left = containerRef.current.scrollLeft;
97
+ positionRef.current.left = listRef.current.scrollLeft;
98
98
  }
99
99
  if (orientation === "vertical" || orientation === "both") {
100
100
  positionRef.current.y = event.clientY;
101
- positionRef.current.top = containerRef.current.scrollTop;
101
+ positionRef.current.top = listRef.current.scrollTop;
102
102
  }
103
- updateCursor(containerRef.current);
103
+ updateCursor(listRef.current);
104
104
  set({ isDragging: true });
105
105
  const { actions } = get();
106
- on(containerRef.current, "mousemove", actions.handleMouseMove, { signal: abortControllerRef.current.mouseMove.signal });
107
- on(containerRef.current, "mouseup", actions.handleMouseUpOrLeave, { signal: abortControllerRef.current.mouseUp.signal });
108
- on(containerRef.current, "mouseleave", actions.handleMouseUpOrLeave, { signal: abortControllerRef.current.mouseLeave.signal });
106
+ on(listRef.current, "mousemove", actions.handleMouseMove, { signal: abortControllerRef.current.mouseMove.signal });
107
+ on(listRef.current, "mouseup", actions.handleMouseUpOrLeave, { signal: abortControllerRef.current.mouseUp.signal });
108
+ on(listRef.current, "mouseleave", actions.handleMouseUpOrLeave, { signal: abortControllerRef.current.mouseLeave.signal });
109
109
  on(document, "mouseup", actions.handleMouseUpOrLeave, {
110
110
  once: true,
111
111
  signal: abortControllerRef.current.mouseUp.signal
112
112
  });
113
113
  },
114
114
  handleMouseMove: (event) => {
115
- if (!containerRef.current) return;
115
+ if (!listRef.current) return;
116
116
  if (orientation === "horizontal" || orientation === "both") {
117
117
  const dx = event.clientX - positionRef.current.x;
118
- containerRef.current.scrollLeft = positionRef.current.left - dx;
118
+ listRef.current.scrollLeft = positionRef.current.left - dx;
119
119
  }
120
120
  if (orientation === "vertical" || orientation === "both") {
121
121
  const dy = event.clientY - positionRef.current.y;
122
- containerRef.current.scrollTop = positionRef.current.top - dy;
122
+ listRef.current.scrollTop = positionRef.current.top - dy;
123
123
  }
124
124
  },
125
125
  handleMouseUpOrLeave: () => {
126
- if (!containerRef.current) return;
127
- resetCursor(containerRef.current);
126
+ if (!listRef.current) return;
127
+ resetCursor(listRef.current);
128
128
  set({ isDragging: false });
129
129
  const { actions } = get();
130
130
  actions.cleanupDragListeners();
@@ -134,34 +134,34 @@ const createDragScrollStore = (initStoreValues) => {
134
134
  actions.updateScrollState();
135
135
  }),
136
136
  initializeResizeObserver: () => {
137
- if (!containerRef.current) return;
137
+ if (!listRef.current) return;
138
138
  const { actions } = get();
139
139
  const resizeObserver = new ResizeObserver(() => actions.updateScrollState());
140
- resizeObserver.observe(containerRef.current);
141
- for (const child of containerRef.current.children) resizeObserver.observe(child);
140
+ resizeObserver.observe(listRef.current);
141
+ for (const child of listRef.current.children) resizeObserver.observe(child);
142
142
  const cleanup = () => {
143
143
  resizeObserver.disconnect();
144
144
  };
145
145
  return cleanup;
146
146
  },
147
- setContainerRef: (element) => {
148
- containerRef.current = element;
147
+ setListRef: (element) => {
148
+ listRef.current = element;
149
149
  if (!element) return;
150
150
  handleScrollSnap(element);
151
151
  const { actions } = get();
152
152
  actions.updateScrollState();
153
153
  },
154
154
  updateScrollState: () => {
155
- if (!containerRef.current) return;
155
+ if (!listRef.current) return;
156
156
  if (orientation === "horizontal" || orientation === "both") {
157
- const { clientWidth, scrollLeft, scrollWidth } = containerRef.current;
157
+ const { clientWidth, scrollLeft, scrollWidth } = listRef.current;
158
158
  set({
159
159
  canGoToNext: Math.ceil(scrollLeft + clientWidth) < scrollWidth,
160
160
  canGoToPrev: Math.floor(scrollLeft) > 0
161
161
  });
162
162
  }
163
163
  if (orientation === "vertical") {
164
- const { clientHeight, scrollHeight, scrollTop } = containerRef.current;
164
+ const { clientHeight, scrollHeight, scrollTop } = listRef.current;
165
165
  set({
166
166
  canGoToNext: Math.ceil(scrollTop + clientHeight) < scrollHeight,
167
167
  canGoToPrev: Math.floor(scrollTop) > 0
@@ -173,14 +173,16 @@ const createDragScrollStore = (initStoreValues) => {
173
173
  };
174
174
  //#endregion
175
175
  //#region src/components/ui/drag-scroll/use-drag-scroll.ts
176
- const getScopeAttrs = (part) => ({
177
- "data-part": part,
178
- "data-scope": "drag-scroll",
179
- "data-slot": `drag-scroll-${part}`
180
- });
176
+ const getDragScrollScopeAttrs = (part) => {
177
+ return {
178
+ "data-slot": `drag-scroll-${part}`,
179
+ "data-scope": "drag-scroll",
180
+ "data-part": part
181
+ };
182
+ };
181
183
  const useDragScroll = (props) => {
182
184
  const { disableInternalStateSubscription = false, orientation = "horizontal", scrollAmount = "item", usage = "allScreens" } = props ?? {};
183
- const containerRef = useRef(null);
185
+ const listRef = useRef(null);
184
186
  const storeApi = useMemo(() => {
185
187
  return createDragScrollStore({
186
188
  orientation,
@@ -200,8 +202,8 @@ const useDragScroll = (props) => {
200
202
  const canGoToNext = useDragScrollStore((state) => !disableInternalStateSubscription ? state.canGoToNext : null);
201
203
  const isDragging = useDragScrollStore((state) => !disableInternalStateSubscription ? state.isDragging : null);
202
204
  const refCallback = useCallbackRef((node) => {
203
- containerRef.current = node;
204
- actions.setContainerRef(node);
205
+ listRef.current = node;
206
+ actions.setListRef(node);
205
207
  if (!node) return;
206
208
  const cleanupMouseDown = on(node, "mousedown", actions.handleMouseDown);
207
209
  const cleanupScroll = on(node, "scroll", actions.handleScroll, { passive: true });
@@ -215,14 +217,14 @@ const useDragScroll = (props) => {
215
217
  }, [actions]);
216
218
  const getRootProps = useCallbackRef((innerProps) => {
217
219
  return {
218
- ...getScopeAttrs("root"),
220
+ ...getDragScrollScopeAttrs("root"),
219
221
  ...innerProps,
220
222
  className: cnMerge("relative", innerProps?.className)
221
223
  };
222
224
  });
223
- const getContainerProps = useCallback((innerProps) => {
225
+ const getListProps = useCallback((innerProps) => {
224
226
  return {
225
- ...getScopeAttrs("container"),
227
+ ...getDragScrollScopeAttrs("list"),
226
228
  ...!disableInternalStateSubscription && { "data-dragging": dataAttr(isDragging) },
227
229
  ...innerProps,
228
230
  className: cnMerge(`scrollbar-hidden flex w-full cursor-grab snap-x snap-mandatory overflow-x-scroll overflow-y-hidden`, orientation === "horizontal" && "flex-row", orientation === "vertical" && "flex-col", usage === "mobileAndTabletOnly" && "md:cursor-default md:flex-col", usage === "desktopOnly" && "max-md:cursor-default max-md:flex-col", innerProps?.className),
@@ -237,7 +239,7 @@ const useDragScroll = (props) => {
237
239
  ]);
238
240
  const getItemProps = useCallbackRef((innerProps) => {
239
241
  return {
240
- ...getScopeAttrs("item"),
242
+ ...getDragScrollScopeAttrs("item"),
241
243
  ...innerProps,
242
244
  className: cnMerge("snap-center snap-always", innerProps?.className)
243
245
  };
@@ -245,7 +247,7 @@ const useDragScroll = (props) => {
245
247
  const getPrevButtonProps = useCallback((innerProps) => {
246
248
  const isDisabled = innerProps?.disabled ?? !canGoToPrev;
247
249
  return {
248
- ...getScopeAttrs("prev-button"),
250
+ ...getDragScrollScopeAttrs("prev-button"),
249
251
  type: "button",
250
252
  ...innerProps,
251
253
  "aria-disabled": dataAttr(isDisabled),
@@ -258,7 +260,7 @@ const useDragScroll = (props) => {
258
260
  const getNextButtonProps = useCallback((innerProps) => {
259
261
  const isDisabled = innerProps?.disabled ?? !canGoToNext;
260
262
  return {
261
- ...getScopeAttrs("next-button"),
263
+ ...getDragScrollScopeAttrs("next-button"),
262
264
  type: "button",
263
265
  ...innerProps,
264
266
  "aria-disabled": dataAttr(isDisabled),
@@ -269,22 +271,22 @@ const useDragScroll = (props) => {
269
271
  };
270
272
  }, [actions.goToNext, canGoToNext]);
271
273
  const propGetters = useMemo(() => ({
272
- getContainerProps,
273
274
  getItemProps,
275
+ getListProps,
274
276
  getNextButtonProps,
275
277
  getPrevButtonProps,
276
278
  getRootProps
277
279
  }), [
278
280
  getPrevButtonProps,
279
- getContainerProps,
281
+ getListProps,
280
282
  getItemProps,
281
283
  getNextButtonProps,
282
284
  getRootProps
283
285
  ]);
284
286
  const stableUseDragScrollStore = useCallbackRef(useDragScrollStore);
285
287
  return useMemo(() => ({
286
- containerRef,
287
288
  disableInternalStateSubscription,
289
+ listRef,
288
290
  propGetters,
289
291
  storeApi,
290
292
  useDragScrollStore: stableUseDragScrollStore
@@ -310,21 +312,21 @@ const [DragScrollRootContextProvider, useDragScrollRootContext] = createCustomCo
310
312
  //#endregion
311
313
  //#region src/components/ui/drag-scroll/drag-scroll.tsx
312
314
  function DragScrollRoot(props) {
313
- const { as: Element = "div", asChild, children, ...restOfProps } = props;
314
- const { containerRef, disableInternalStateSubscription, propGetters, storeApi } = useDragScroll(restOfProps);
315
+ const { asChild, children, ...restOfProps } = props;
316
+ const { disableInternalStateSubscription, listRef, propGetters, storeApi } = useDragScroll(restOfProps);
315
317
  return /* @__PURE__ */ jsx(DragScrollStoreContextProvider, {
316
318
  store: storeApi,
317
319
  children: /* @__PURE__ */ jsx(DragScrollRootContextProvider, {
318
320
  value: useMemo(() => ({
319
- containerRef,
320
321
  disableInternalStateSubscription,
322
+ listRef,
321
323
  propGetters
322
324
  }), [
323
- containerRef,
325
+ listRef,
324
326
  disableInternalStateSubscription,
325
327
  propGetters
326
328
  ]),
327
- children: /* @__PURE__ */ jsx(asChild ? SlotRoot : Element, {
329
+ children: /* @__PURE__ */ jsx(asChild ? SlotRoot : "div", {
328
330
  ...propGetters.getRootProps(restOfProps),
329
331
  children
330
332
  })
@@ -336,10 +338,10 @@ function DragScrollContext(props) {
336
338
  const dragScrollCtx = useDragScrollStoreContext(useCompareSelector(selector));
337
339
  return isFunction(children) ? children(dragScrollCtx) : children;
338
340
  }
339
- function DragScrollContainer(props) {
341
+ function DragScrollList(props) {
340
342
  const { as: Element = "ul", asChild, ...restOfProps } = props;
341
343
  const { propGetters } = useDragScrollRootContext();
342
- return /* @__PURE__ */ jsx(asChild ? SlotRoot : Element, { ...propGetters.getContainerProps(restOfProps) });
344
+ return /* @__PURE__ */ jsx(asChild ? SlotRoot : Element, { ...propGetters.getListProps(restOfProps) });
343
345
  }
344
346
  function DragScrollItem(props) {
345
347
  const { as: Element = "li", asChild, ...restOfProps } = props;
@@ -359,14 +361,14 @@ function DragScrollNext(props) {
359
361
  //#endregion
360
362
  //#region src/components/ui/drag-scroll/drag-scroll-parts.ts
361
363
  var drag_scroll_parts_exports = /* @__PURE__ */ __exportAll({
362
- Container: () => DragScrollContainer,
363
364
  Context: () => DragScrollContext,
364
365
  Item: () => DragScrollItem,
366
+ List: () => DragScrollList,
365
367
  Next: () => DragScrollNext,
366
368
  Prev: () => DragScrollPrev,
367
369
  Root: () => DragScrollRoot
368
370
  });
369
371
  //#endregion
370
- export { drag_scroll_parts_exports as DragScroll, DragScrollContainer, DragScrollContext, DragScrollItem, DragScrollNext, DragScrollPrev, DragScrollRoot, useDragScroll, useDragScrollStoreContext };
372
+ export { drag_scroll_parts_exports as DragScroll, DragScrollContext, DragScrollItem, DragScrollList, DragScrollNext, DragScrollPrev, DragScrollRoot, getDragScrollScopeAttrs, useDragScroll, useDragScrollStoreContext };
371
373
 
372
374
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Slot.Root"],"sources":["../../../../src/components/ui/drag-scroll/utils.ts","../../../../src/components/ui/drag-scroll/drag-scroll-store.ts","../../../../src/components/ui/drag-scroll/use-drag-scroll.ts","../../../../src/components/ui/drag-scroll/drag-scroll-context.ts","../../../../src/components/ui/drag-scroll/drag-scroll.tsx","../../../../src/components/ui/drag-scroll/drag-scroll-parts.ts"],"sourcesContent":["import { checkIsDeviceMobile } from \"@zayne-labs/toolkit-core\";\n\n/* eslint-disable no-param-reassign -- Mutation is needed here since it's an element */\nexport const updateCursor = <TElement extends HTMLElement>(element: TElement) => {\n\telement.style.cursor = \"grabbing\";\n\telement.style.userSelect = \"none\";\n};\n\nexport const onScrollSnap = <TElement extends HTMLElement>(\n\taction: \"remove\" | \"reset\",\n\telement: TElement\n) => {\n\tif (action === \"remove\") {\n\t\telement.style.scrollSnapType = \"none\";\n\t\treturn;\n\t}\n\n\telement.style.scrollSnapType = \"\";\n};\n\nexport const resetCursor = <TElement extends HTMLElement>(element: TElement) => {\n\telement.style.cursor = \"\";\n\telement.style.userSelect = \"\";\n};\n/* eslint-enable no-param-reassign -- Mutation is needed here since it's an element */\n\nexport const handleScrollSnap = (dragContainer: HTMLElement) => {\n\tconst isMobile = checkIsDeviceMobile();\n\n\tif (!isMobile) {\n\t\tonScrollSnap(\"remove\", dragContainer);\n\t} else {\n\t\tonScrollSnap(\"reset\", dragContainer);\n\t}\n};\n","import { createStore, on, throttleByFrame } from \"@zayne-labs/toolkit-core\";\nimport { isNumber } from \"@zayne-labs/toolkit-type-helpers\";\nimport type { DragScrollStore, UseDragScrollProps } from \"./types\";\nimport { handleScrollSnap, resetCursor, updateCursor } from \"./utils\";\n\ntype RequiredUseDragScrollProps = {\n\t[Key in keyof Required<UseDragScrollProps>]: UseDragScrollProps[Key] | undefined;\n};\n\ntype InitStoreValues = Pick<RequiredUseDragScrollProps, \"orientation\" | \"scrollAmount\" | \"usage\">;\n\nexport const createDragScrollStore = (initStoreValues: InitStoreValues) => {\n\tconst { orientation = \"horizontal\", scrollAmount = \"item\", usage = \"allScreens\" } = initStoreValues;\n\n\tconst containerRef: React.RefObject<HTMLElement | null> = {\n\t\tcurrent: null,\n\t};\n\n\tconst positionRef = {\n\t\tcurrent: {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t},\n\t};\n\n\tconst abortControllerRef = {\n\t\tcurrent: {\n\t\t\tmouseLeave: new AbortController(),\n\t\t\tmouseMove: new AbortController(),\n\t\t\tmouseUp: new AbortController(),\n\t\t},\n\t};\n\n\t// == Calculate scroll amount based on orientation and settings\n\tconst getScrollAmount = (container: HTMLElement): number => {\n\t\tif (isNumber(scrollAmount)) {\n\t\t\treturn scrollAmount;\n\t\t}\n\n\t\tconst firstChild = container.children[0] as HTMLElement | undefined;\n\n\t\tif (!firstChild) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn orientation === \"vertical\" || orientation === \"both\" ?\n\t\t\t\tfirstChild.offsetHeight\n\t\t\t:\tfirstChild.offsetWidth;\n\t};\n\n\tconst store = createStore<DragScrollStore>((set, get) => ({\n\t\tcanGoToNext: true,\n\t\tcanGoToPrev: false,\n\t\tisDragging: false,\n\n\t\t// eslint-disable-next-line perfectionist/sort-objects -- actions should be last\n\t\tactions: {\n\t\t\tcleanupDragListeners: () => {\n\t\t\t\tabortControllerRef.current.mouseMove.abort();\n\t\t\t\tabortControllerRef.current.mouseUp.abort();\n\t\t\t\tabortControllerRef.current.mouseLeave.abort();\n\t\t\t},\n\n\t\t\tgoToNext: () => {\n\t\t\t\tif (!containerRef.current) return;\n\n\t\t\t\tconst { canGoToNext } = get();\n\t\t\t\tif (!canGoToNext) return;\n\n\t\t\t\tconst amount = getScrollAmount(containerRef.current);\n\n\t\t\t\tcontainerRef.current.scrollBy({\n\t\t\t\t\tbehavior: \"smooth\",\n\t\t\t\t\tleft: orientation === \"vertical\" ? 0 : amount,\n\t\t\t\t\ttop: orientation === \"vertical\" || orientation === \"both\" ? amount : 0,\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tgoToPrev: () => {\n\t\t\t\tif (!containerRef.current) return;\n\n\t\t\t\tconst { canGoToPrev } = get();\n\t\t\t\tif (!canGoToPrev) return;\n\n\t\t\t\tconst amount = getScrollAmount(containerRef.current);\n\n\t\t\t\tcontainerRef.current.scrollBy({\n\t\t\t\t\tbehavior: \"smooth\",\n\t\t\t\t\tleft: orientation === \"vertical\" ? 0 : -amount,\n\t\t\t\t\ttop: orientation === \"vertical\" || orientation === \"both\" ? -amount : 0,\n\t\t\t\t});\n\t\t\t},\n\n\t\t\thandleMouseDown: (event) => {\n\t\t\t\tif (usage === \"mobileAndTabletOnly\" && window.innerWidth >= 768) return;\n\t\t\t\tif (usage === \"desktopOnly\" && window.innerWidth < 768) return;\n\n\t\t\t\tif (!containerRef.current) return;\n\n\t\t\t\t// == Create fresh AbortControllers for each drag session (they cannot be reused after abort)\n\t\t\t\tabortControllerRef.current = {\n\t\t\t\t\tmouseLeave: new AbortController(),\n\t\t\t\t\tmouseMove: new AbortController(),\n\t\t\t\t\tmouseUp: new AbortController(),\n\t\t\t\t};\n\n\t\t\t\t// == Update all initial position properties\n\t\t\t\tif (orientation === \"horizontal\" || orientation === \"both\") {\n\t\t\t\t\tpositionRef.current.x = event.clientX;\n\t\t\t\t\tpositionRef.current.left = containerRef.current.scrollLeft;\n\t\t\t\t}\n\n\t\t\t\tif (orientation === \"vertical\" || orientation === \"both\") {\n\t\t\t\t\tpositionRef.current.y = event.clientY;\n\t\t\t\t\tpositionRef.current.top = containerRef.current.scrollTop;\n\t\t\t\t}\n\n\t\t\t\tupdateCursor(containerRef.current);\n\t\t\t\tset({ isDragging: true });\n\n\t\t\t\tconst { actions } = get();\n\n\t\t\t\ton(containerRef.current, \"mousemove\", actions.handleMouseMove, {\n\t\t\t\t\tsignal: abortControllerRef.current.mouseMove.signal,\n\t\t\t\t});\n\t\t\t\ton(containerRef.current, \"mouseup\", actions.handleMouseUpOrLeave, {\n\t\t\t\t\tsignal: abortControllerRef.current.mouseUp.signal,\n\t\t\t\t});\n\t\t\t\ton(containerRef.current, \"mouseleave\", actions.handleMouseUpOrLeave, {\n\t\t\t\t\tsignal: abortControllerRef.current.mouseLeave.signal,\n\t\t\t\t});\n\t\t\t\t// == Document-level mouseup fallback for when user releases outside the container\n\t\t\t\ton(document, \"mouseup\", actions.handleMouseUpOrLeave, {\n\t\t\t\t\tonce: true,\n\t\t\t\t\tsignal: abortControllerRef.current.mouseUp.signal,\n\t\t\t\t});\n\t\t\t},\n\n\t\t\thandleMouseMove: (event) => {\n\t\t\t\tif (!containerRef.current) return;\n\n\t\t\t\tif (orientation === \"horizontal\" || orientation === \"both\") {\n\t\t\t\t\tconst dx = event.clientX - positionRef.current.x;\n\t\t\t\t\tcontainerRef.current.scrollLeft = positionRef.current.left - dx;\n\t\t\t\t}\n\n\t\t\t\tif (orientation === \"vertical\" || orientation === \"both\") {\n\t\t\t\t\tconst dy = event.clientY - positionRef.current.y;\n\t\t\t\t\tcontainerRef.current.scrollTop = positionRef.current.top - dy;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\thandleMouseUpOrLeave: () => {\n\t\t\t\tif (!containerRef.current) return;\n\n\t\t\t\tresetCursor(containerRef.current);\n\t\t\t\tset({ isDragging: false });\n\n\t\t\t\tconst { actions } = get();\n\t\t\t\tactions.cleanupDragListeners();\n\t\t\t},\n\n\t\t\thandleScroll: throttleByFrame(() => {\n\t\t\t\tconst { actions } = get();\n\t\t\t\tactions.updateScrollState();\n\t\t\t}),\n\n\t\t\tinitializeResizeObserver: () => {\n\t\t\t\tif (!containerRef.current) return;\n\n\t\t\t\tconst { actions } = get();\n\n\t\t\t\t// == Use ResizeObserver to detect when container or children resize\n\t\t\t\tconst resizeObserver = new ResizeObserver(() => actions.updateScrollState());\n\n\t\t\t\tresizeObserver.observe(containerRef.current);\n\n\t\t\t\t// == Also observe children for size changes\n\t\t\t\tfor (const child of containerRef.current.children) {\n\t\t\t\t\tresizeObserver.observe(child);\n\t\t\t\t}\n\n\t\t\t\tconst cleanup = () => {\n\t\t\t\t\tresizeObserver.disconnect();\n\t\t\t\t};\n\n\t\t\t\treturn cleanup;\n\t\t\t},\n\n\t\t\tsetContainerRef: (element) => {\n\t\t\t\tcontainerRef.current = element as HTMLElement;\n\n\t\t\t\tif (!element) return;\n\n\t\t\t\thandleScrollSnap(element);\n\n\t\t\t\tconst { actions } = get();\n\t\t\t\tactions.updateScrollState();\n\t\t\t},\n\n\t\t\tupdateScrollState: () => {\n\t\t\t\tif (!containerRef.current) return;\n\n\t\t\t\tif (orientation === \"horizontal\" || orientation === \"both\") {\n\t\t\t\t\tconst { clientWidth, scrollLeft, scrollWidth } = containerRef.current;\n\n\t\t\t\t\tset({\n\t\t\t\t\t\tcanGoToNext: Math.ceil(scrollLeft + clientWidth) < scrollWidth,\n\t\t\t\t\t\tcanGoToPrev: Math.floor(scrollLeft) > 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (orientation === \"vertical\") {\n\t\t\t\t\tconst { clientHeight, scrollHeight, scrollTop } = containerRef.current;\n\n\t\t\t\t\tset({\n\t\t\t\t\t\tcanGoToNext: Math.ceil(scrollTop + clientHeight) < scrollHeight,\n\t\t\t\t\t\tcanGoToPrev: Math.floor(scrollTop) > 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t}));\n\n\treturn store;\n};\n","import { dataAttr, on } from \"@zayne-labs/toolkit-core\";\nimport { useCallbackRef, useStore } from \"@zayne-labs/toolkit-react\";\nimport { composeRefs, composeTwoEventHandlers } from \"@zayne-labs/toolkit-react/utils\";\nimport { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { cnMerge } from \"@/lib/utils/cn\";\nimport { createDragScrollStore } from \"./drag-scroll-store\";\nimport type { DragScrollPropGetters, UseDragScrollProps, UseDragScrollResult } from \"./types\";\n\nconst getScopeAttrs = (part: string) =>\n\t({\n\t\t\"data-part\": part,\n\t\t\"data-scope\": \"drag-scroll\",\n\t\t\"data-slot\": `drag-scroll-${part}`,\n\t}) as const;\n\nexport const useDragScroll = <TContainerElement extends HTMLElement = HTMLElement>(\n\tprops?: UseDragScrollProps\n): UseDragScrollResult<TContainerElement> => {\n\tconst {\n\t\tdisableInternalStateSubscription = false,\n\t\torientation = \"horizontal\",\n\t\tscrollAmount = \"item\",\n\t\tusage = \"allScreens\",\n\t} = props ?? {};\n\n\tconst containerRef = useRef<TContainerElement>(null);\n\n\tconst storeApi = useMemo(() => {\n\t\treturn createDragScrollStore({ orientation, scrollAmount, usage });\n\t}, [orientation, scrollAmount, usage]);\n\n\tconst actions = storeApi.getState().actions;\n\n\t/* eslint-disable react-hooks/hooks -- ignore */\n\t// eslint-disable-next-line react-x/component-hook-factories -- Ignore\n\tconst useDragScrollStore: UseDragScrollResult<TContainerElement>[\"useDragScrollStore\"] = (selector) => {\n\t\treturn useStore(storeApi as never, selector);\n\t};\n\n\tconst canGoToPrev = useDragScrollStore((state) =>\n\t\t!disableInternalStateSubscription ? state.canGoToPrev : null\n\t);\n\n\tconst canGoToNext = useDragScrollStore((state) =>\n\t\t!disableInternalStateSubscription ? state.canGoToNext : null\n\t);\n\n\tconst isDragging = useDragScrollStore((state) =>\n\t\t!disableInternalStateSubscription ? state.isDragging : null\n\t);\n\t/* eslint-enable react-hooks/hooks -- ignore */\n\n\tconst refCallback: React.RefCallback<TContainerElement> = useCallbackRef((node) => {\n\t\tcontainerRef.current = node;\n\t\tactions.setContainerRef(node);\n\n\t\tif (!node) return;\n\n\t\tconst cleanupMouseDown = on(node, \"mousedown\", actions.handleMouseDown);\n\t\tconst cleanupScroll = on(node, \"scroll\", actions.handleScroll, {\n\t\t\tpassive: true,\n\t\t});\n\n\t\treturn () => {\n\t\t\tcleanupMouseDown();\n\t\t\tcleanupScroll();\n\t\t};\n\t});\n\n\t// == Update scroll state when children might change (e.g., async loaded content)\n\tuseEffect(() => {\n\t\tconst cleanup = actions.initializeResizeObserver();\n\n\t\treturn cleanup;\n\t}, [actions]);\n\n\tconst getRootProps: DragScrollPropGetters<TContainerElement>[\"getRootProps\"] = useCallbackRef(\n\t\t(innerProps) => {\n\t\t\treturn {\n\t\t\t\t...getScopeAttrs(\"root\"),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: cnMerge(\"relative\", innerProps?.className),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst getContainerProps: DragScrollPropGetters<TContainerElement>[\"getContainerProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\treturn {\n\t\t\t\t...getScopeAttrs(\"container\"),\n\t\t\t\t...(!disableInternalStateSubscription && {\n\t\t\t\t\t\"data-dragging\": dataAttr(isDragging),\n\t\t\t\t}),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: cnMerge(\n\t\t\t\t\t`scrollbar-hidden flex w-full cursor-grab snap-x snap-mandatory overflow-x-scroll overflow-y-hidden`,\n\t\t\t\t\torientation === \"horizontal\" && \"flex-row\",\n\t\t\t\t\torientation === \"vertical\" && \"flex-col\",\n\t\t\t\t\tusage === \"mobileAndTabletOnly\" && \"md:cursor-default md:flex-col\",\n\t\t\t\t\tusage === \"desktopOnly\" && \"max-md:cursor-default max-md:flex-col\",\n\t\t\t\t\tinnerProps?.className\n\t\t\t\t),\n\t\t\t\tref: composeRefs(\n\t\t\t\t\trefCallback,\n\t\t\t\t\t(innerProps as { ref?: React.Ref<TContainerElement> } | undefined)?.ref\n\t\t\t\t),\n\t\t\t} as never;\n\t\t},\n\t\t[disableInternalStateSubscription, isDragging, orientation, refCallback, usage]\n\t);\n\n\tconst getItemProps: DragScrollPropGetters<TContainerElement>[\"getItemProps\"] = useCallbackRef(\n\t\t(innerProps) => {\n\t\t\treturn {\n\t\t\t\t...getScopeAttrs(\"item\"),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: cnMerge(\"snap-center snap-always\", innerProps?.className),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst getPrevButtonProps: DragScrollPropGetters<TContainerElement>[\"getPrevButtonProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\tconst isDisabled = innerProps?.disabled ?? !canGoToPrev;\n\n\t\t\treturn {\n\t\t\t\t...getScopeAttrs(\"prev-button\"),\n\t\t\t\ttype: \"button\",\n\t\t\t\t...innerProps,\n\t\t\t\t\"aria-disabled\": dataAttr(isDisabled),\n\t\t\t\t\"aria-label\": innerProps?.[\"aria-label\"] ?? \"Scroll back\",\n\t\t\t\t\"data-disabled\": dataAttr(isDisabled),\n\t\t\t\tdisabled: isDisabled,\n\t\t\t\tonClick: composeTwoEventHandlers(actions.goToPrev, innerProps?.onClick),\n\t\t\t};\n\t\t},\n\t\t[actions.goToPrev, canGoToPrev]\n\t);\n\n\tconst getNextButtonProps: DragScrollPropGetters<TContainerElement>[\"getNextButtonProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\tconst isDisabled = innerProps?.disabled ?? !canGoToNext;\n\n\t\t\treturn {\n\t\t\t\t...getScopeAttrs(\"next-button\"),\n\t\t\t\ttype: \"button\",\n\t\t\t\t...innerProps,\n\t\t\t\t\"aria-disabled\": dataAttr(isDisabled),\n\t\t\t\t\"aria-label\": innerProps?.[\"aria-label\"] ?? \"Scroll forward\",\n\t\t\t\t\"data-disabled\": dataAttr(isDisabled),\n\t\t\t\tdisabled: isDisabled,\n\t\t\t\tonClick: composeTwoEventHandlers(actions.goToNext, innerProps?.onClick),\n\t\t\t};\n\t\t},\n\t\t[actions.goToNext, canGoToNext]\n\t);\n\n\tconst propGetters = useMemo<DragScrollPropGetters<TContainerElement>>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tgetContainerProps,\n\t\t\t\tgetItemProps,\n\t\t\t\tgetNextButtonProps,\n\t\t\t\tgetPrevButtonProps,\n\t\t\t\tgetRootProps,\n\t\t\t}) satisfies DragScrollPropGetters<TContainerElement>,\n\t\t[getPrevButtonProps, getContainerProps, getItemProps, getNextButtonProps, getRootProps]\n\t);\n\n\tconst stableUseDragScrollStore = useCallbackRef(useDragScrollStore);\n\n\tconst result = useMemo<UseDragScrollResult<TContainerElement>>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tcontainerRef,\n\t\t\t\tdisableInternalStateSubscription,\n\t\t\t\tpropGetters,\n\t\t\t\tstoreApi,\n\t\t\t\tuseDragScrollStore: stableUseDragScrollStore,\n\t\t\t}) satisfies UseDragScrollResult<TContainerElement>,\n\t\t[propGetters, disableInternalStateSubscription, storeApi, stableUseDragScrollStore]\n\t);\n\n\treturn result;\n};\n","import { createCustomContext } from \"@zayne-labs/toolkit-react\";\nimport { createReactStoreContext } from \"@zayne-labs/toolkit-react/zustand\";\nimport type { DragScrollStore, UseDragScrollResult } from \"./types\";\n\nconst [DragScrollStoreContextProvider, useDragScrollStoreContext] =\n\tcreateReactStoreContext<DragScrollStore>({\n\t\thookName: \"useDragScrollStoreContext\",\n\t\tname: \"DragScrollStoreContext\",\n\t\tproviderName: \"DragScrollRoot\",\n\t});\n\nexport type DragScrollRootContextType<TElement extends HTMLElement = HTMLElement> = Pick<\n\tUseDragScrollResult<TElement>,\n\t\"containerRef\" | \"disableInternalStateSubscription\" | \"propGetters\"\n>;\n\nconst [DragScrollRootContextProvider, useDragScrollRootContext] =\n\tcreateCustomContext<DragScrollRootContextType>({\n\t\thookName: \"useDragScrollRootContext\",\n\t\tname: \"DragScrollRootContext\",\n\t\tproviderName: \"DragScrollRoot\",\n\t});\n\nexport {\n\tDragScrollRootContextProvider,\n\tDragScrollStoreContextProvider,\n\tuseDragScrollRootContext,\n\tuseDragScrollStoreContext,\n};\n","\"use client\";\n\nimport { useCompareSelector } from \"@zayne-labs/toolkit-react\";\nimport type { PolymorphicPropsStrict } from \"@zayne-labs/toolkit-react/utils\";\nimport { isFunction, type SelectorFn } from \"@zayne-labs/toolkit-type-helpers\";\nimport { useMemo } from \"react\";\nimport { Slot } from \"@/components/common/slot\";\nimport {\n\tDragScrollRootContextProvider,\n\tDragScrollStoreContextProvider,\n\tuseDragScrollRootContext,\n\tuseDragScrollStoreContext,\n\ttype DragScrollRootContextType,\n} from \"./drag-scroll-context\";\nimport type { DragScrollStore, PartInputProps, UseDragScrollProps } from \"./types\";\nimport { useDragScroll } from \"./use-drag-scroll\";\n\n/* eslint-disable perfectionist/sort-intersection-types -- I need non-standard props to come first */\n\nexport type DragScrollRootProps = UseDragScrollProps & {\n\tasChild?: boolean;\n\tchildren: React.ReactNode;\n} & PartInputProps[\"root\"];\n\nexport function DragScrollRoot<TElement extends React.ElementType = \"div\">(\n\tprops: PolymorphicPropsStrict<TElement, DragScrollRootProps>\n) {\n\tconst { as: Element = \"div\", asChild, children, ...restOfProps } = props;\n\n\tconst { containerRef, disableInternalStateSubscription, propGetters, storeApi } =\n\t\tuseDragScroll(restOfProps);\n\n\tconst rootContextValue = useMemo<DragScrollRootContextType>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tcontainerRef,\n\t\t\t\tdisableInternalStateSubscription,\n\t\t\t\tpropGetters,\n\t\t\t}) satisfies DragScrollRootContextType,\n\t\t[containerRef, disableInternalStateSubscription, propGetters]\n\t);\n\n\tconst Component = asChild ? Slot.Root : Element;\n\n\treturn (\n\t\t<DragScrollStoreContextProvider store={storeApi}>\n\t\t\t<DragScrollRootContextProvider value={rootContextValue}>\n\t\t\t\t<Component {...propGetters.getRootProps(restOfProps)}>{children}</Component>\n\t\t\t</DragScrollRootContextProvider>\n\t\t</DragScrollStoreContextProvider>\n\t);\n}\n\nexport type DragScrollContextProps<TSlice> = {\n\tchildren: React.ReactNode | ((context: TSlice) => React.ReactNode);\n\tselector?: SelectorFn<DragScrollStore, TSlice>;\n};\n\nexport function DragScrollContext<TSlice = DragScrollStore>(props: DragScrollContextProps<TSlice>) {\n\tconst { children, selector } = props;\n\n\tconst dragScrollCtx = useDragScrollStoreContext(useCompareSelector(selector));\n\n\tconst resolvedChildren = isFunction(children) ? children(dragScrollCtx) : children;\n\n\treturn resolvedChildren;\n}\n\nexport type DragScrollContainerProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"container\"];\n\nexport function DragScrollContainer<TElement extends React.ElementType = \"ul\">(\n\tprops: PolymorphicPropsStrict<TElement, DragScrollContainerProps>\n) {\n\tconst { as: Element = \"ul\", asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : Element;\n\n\treturn <Component {...propGetters.getContainerProps(restOfProps)} />;\n}\n\nexport type DragScrollItemProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"item\"];\n\nexport function DragScrollItem<TElement extends React.ElementType = \"li\">(\n\tprops: PolymorphicPropsStrict<TElement, DragScrollItemProps>\n) {\n\tconst { as: Element = \"li\", asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : Element;\n\n\treturn <Component {...propGetters.getItemProps(restOfProps)} />;\n}\n\nexport type DragScrollPrevProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"prevButton\"];\n\nexport function DragScrollPrev(props: DragScrollPrevProps) {\n\tconst { asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : \"button\";\n\n\treturn <Component {...propGetters.getPrevButtonProps(restOfProps)} />;\n}\n\nexport type DragScrollNextProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"nextButton\"];\n\nexport function DragScrollNext(props: DragScrollNextProps) {\n\tconst { asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : \"button\";\n\n\treturn <Component {...propGetters.getNextButtonProps(restOfProps)} />;\n}\n\n/* eslint-enable perfectionist/sort-intersection-types -- I need non-standard props to come first */\n","export {\n\tDragScrollContext as Context,\n\tDragScrollItem as Item,\n\tDragScrollNext as Next,\n\tDragScrollPrev as Prev,\n\tDragScrollRoot as Root,\n\tDragScrollContainer as Container,\n} from \"./drag-scroll\";\n"],"mappings":";;;;;;;;;;;;AAGA,MAAa,gBAA8C,YAAsB;AAChF,SAAQ,MAAM,SAAS;AACvB,SAAQ,MAAM,aAAa;;AAG5B,MAAa,gBACZ,QACA,YACI;AACJ,KAAI,WAAW,UAAU;AACxB,UAAQ,MAAM,iBAAiB;AAC/B;;AAGD,SAAQ,MAAM,iBAAiB;;AAGhC,MAAa,eAA6C,YAAsB;AAC/E,SAAQ,MAAM,SAAS;AACvB,SAAQ,MAAM,aAAa;;AAI5B,MAAa,oBAAoB,kBAA+B;AAG/D,KAAI,CAFa,qBAAqB,CAGrC,cAAa,UAAU,cAAc;KAErC,cAAa,SAAS,cAAc;;;;ACrBtC,MAAa,yBAAyB,oBAAqC;CAC1E,MAAM,EAAE,cAAc,cAAc,eAAe,QAAQ,QAAQ,iBAAiB;CAEpF,MAAM,eAAoD,EACzD,SAAS,MACT;CAED,MAAM,cA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0BAA0B;AAIlD,QAAO,oBAFW,UAAUA,WAAY,UAEjC,EAAW,GAAI,YAAY,mBAAmB,YAAY,EAAI,CAAA"}
1
+ {"version":3,"file":"index.js","names":["Slot.Root"],"sources":["../../../../src/components/ui/drag-scroll/utils.ts","../../../../src/components/ui/drag-scroll/drag-scroll-store.ts","../../../../src/components/ui/drag-scroll/use-drag-scroll.ts","../../../../src/components/ui/drag-scroll/drag-scroll-context.ts","../../../../src/components/ui/drag-scroll/drag-scroll.tsx","../../../../src/components/ui/drag-scroll/drag-scroll-parts.ts"],"sourcesContent":["import { checkIsDeviceMobile } from \"@zayne-labs/toolkit-core\";\n\n/* eslint-disable no-param-reassign -- Mutation is needed here since it's an element */\nexport const updateCursor = <TElement extends HTMLElement>(element: TElement) => {\n\telement.style.cursor = \"grabbing\";\n\telement.style.userSelect = \"none\";\n};\n\nexport const onScrollSnap = <TElement extends HTMLElement>(\n\taction: \"remove\" | \"reset\",\n\telement: TElement\n) => {\n\tif (action === \"remove\") {\n\t\telement.style.scrollSnapType = \"none\";\n\t\treturn;\n\t}\n\n\telement.style.scrollSnapType = \"\";\n};\n\nexport const resetCursor = <TElement extends HTMLElement>(element: TElement) => {\n\telement.style.cursor = \"\";\n\telement.style.userSelect = \"\";\n};\n/* eslint-enable no-param-reassign -- Mutation is needed here since it's an element */\n\nexport const handleScrollSnap = (dragContainer: HTMLElement) => {\n\tconst isMobile = checkIsDeviceMobile();\n\n\tif (!isMobile) {\n\t\tonScrollSnap(\"remove\", dragContainer);\n\t} else {\n\t\tonScrollSnap(\"reset\", dragContainer);\n\t}\n};\n","import { createStore, on, throttleByFrame } from \"@zayne-labs/toolkit-core\";\nimport { isNumber } from \"@zayne-labs/toolkit-type-helpers\";\nimport type { DragScrollStore, UseDragScrollProps } from \"./types\";\nimport { handleScrollSnap, resetCursor, updateCursor } from \"./utils\";\n\ntype RequiredUseDragScrollProps = {\n\t[Key in keyof Required<UseDragScrollProps>]: UseDragScrollProps[Key] | undefined;\n};\n\ntype InitStoreValues = Pick<RequiredUseDragScrollProps, \"orientation\" | \"scrollAmount\" | \"usage\">;\n\nexport const createDragScrollStore = (initStoreValues: InitStoreValues) => {\n\tconst { orientation = \"horizontal\", scrollAmount = \"item\", usage = \"allScreens\" } = initStoreValues;\n\n\tconst listRef: React.RefObject<HTMLElement | null> = {\n\t\tcurrent: null,\n\t};\n\n\tconst positionRef = {\n\t\tcurrent: {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t},\n\t};\n\n\tconst abortControllerRef = {\n\t\tcurrent: {\n\t\t\tmouseLeave: new AbortController(),\n\t\t\tmouseMove: new AbortController(),\n\t\t\tmouseUp: new AbortController(),\n\t\t},\n\t};\n\n\t// == Calculate scroll amount based on orientation and settings\n\tconst getScrollAmount = (container: HTMLElement): number => {\n\t\tif (isNumber(scrollAmount)) {\n\t\t\treturn scrollAmount;\n\t\t}\n\n\t\tconst firstChild = container.children[0] as HTMLElement | undefined;\n\n\t\tif (!firstChild) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn orientation === \"vertical\" || orientation === \"both\" ?\n\t\t\t\tfirstChild.offsetHeight\n\t\t\t:\tfirstChild.offsetWidth;\n\t};\n\n\tconst store = createStore<DragScrollStore>((set, get) => ({\n\t\tcanGoToNext: true,\n\t\tcanGoToPrev: false,\n\t\tisDragging: false,\n\n\t\t// eslint-disable-next-line perfectionist/sort-objects -- actions should be last\n\t\tactions: {\n\t\t\tcleanupDragListeners: () => {\n\t\t\t\tabortControllerRef.current.mouseMove.abort();\n\t\t\t\tabortControllerRef.current.mouseUp.abort();\n\t\t\t\tabortControllerRef.current.mouseLeave.abort();\n\t\t\t},\n\n\t\t\tgoToNext: () => {\n\t\t\t\tif (!listRef.current) return;\n\n\t\t\t\tconst { canGoToNext } = get();\n\t\t\t\tif (!canGoToNext) return;\n\n\t\t\t\tconst amount = getScrollAmount(listRef.current);\n\n\t\t\t\tlistRef.current.scrollBy({\n\t\t\t\t\tbehavior: \"smooth\",\n\t\t\t\t\tleft: orientation === \"vertical\" ? 0 : amount,\n\t\t\t\t\ttop: orientation === \"vertical\" || orientation === \"both\" ? amount : 0,\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tgoToPrev: () => {\n\t\t\t\tif (!listRef.current) return;\n\n\t\t\t\tconst { canGoToPrev } = get();\n\t\t\t\tif (!canGoToPrev) return;\n\n\t\t\t\tconst amount = getScrollAmount(listRef.current);\n\n\t\t\t\tlistRef.current.scrollBy({\n\t\t\t\t\tbehavior: \"smooth\",\n\t\t\t\t\tleft: orientation === \"vertical\" ? 0 : -amount,\n\t\t\t\t\ttop: orientation === \"vertical\" || orientation === \"both\" ? -amount : 0,\n\t\t\t\t});\n\t\t\t},\n\n\t\t\thandleMouseDown: (event) => {\n\t\t\t\tif (usage === \"mobileAndTabletOnly\" && window.innerWidth >= 768) return;\n\t\t\t\tif (usage === \"desktopOnly\" && window.innerWidth < 768) return;\n\n\t\t\t\tif (!listRef.current) return;\n\n\t\t\t\t// == Create fresh AbortControllers for each drag session (they cannot be reused after abort)\n\t\t\t\tabortControllerRef.current = {\n\t\t\t\t\tmouseLeave: new AbortController(),\n\t\t\t\t\tmouseMove: new AbortController(),\n\t\t\t\t\tmouseUp: new AbortController(),\n\t\t\t\t};\n\n\t\t\t\t// == Update all initial position properties\n\t\t\t\tif (orientation === \"horizontal\" || orientation === \"both\") {\n\t\t\t\t\tpositionRef.current.x = event.clientX;\n\t\t\t\t\tpositionRef.current.left = listRef.current.scrollLeft;\n\t\t\t\t}\n\n\t\t\t\tif (orientation === \"vertical\" || orientation === \"both\") {\n\t\t\t\t\tpositionRef.current.y = event.clientY;\n\t\t\t\t\tpositionRef.current.top = listRef.current.scrollTop;\n\t\t\t\t}\n\n\t\t\t\tupdateCursor(listRef.current);\n\t\t\t\tset({ isDragging: true });\n\n\t\t\t\tconst { actions } = get();\n\n\t\t\t\ton(listRef.current, \"mousemove\", actions.handleMouseMove, {\n\t\t\t\t\tsignal: abortControllerRef.current.mouseMove.signal,\n\t\t\t\t});\n\t\t\t\ton(listRef.current, \"mouseup\", actions.handleMouseUpOrLeave, {\n\t\t\t\t\tsignal: abortControllerRef.current.mouseUp.signal,\n\t\t\t\t});\n\t\t\t\ton(listRef.current, \"mouseleave\", actions.handleMouseUpOrLeave, {\n\t\t\t\t\tsignal: abortControllerRef.current.mouseLeave.signal,\n\t\t\t\t});\n\t\t\t\t// == Document-level mouseup fallback for when user releases outside the container\n\t\t\t\ton(document, \"mouseup\", actions.handleMouseUpOrLeave, {\n\t\t\t\t\tonce: true,\n\t\t\t\t\tsignal: abortControllerRef.current.mouseUp.signal,\n\t\t\t\t});\n\t\t\t},\n\n\t\t\thandleMouseMove: (event) => {\n\t\t\t\tif (!listRef.current) return;\n\n\t\t\t\tif (orientation === \"horizontal\" || orientation === \"both\") {\n\t\t\t\t\tconst dx = event.clientX - positionRef.current.x;\n\t\t\t\t\tlistRef.current.scrollLeft = positionRef.current.left - dx;\n\t\t\t\t}\n\n\t\t\t\tif (orientation === \"vertical\" || orientation === \"both\") {\n\t\t\t\t\tconst dy = event.clientY - positionRef.current.y;\n\t\t\t\t\tlistRef.current.scrollTop = positionRef.current.top - dy;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\thandleMouseUpOrLeave: () => {\n\t\t\t\tif (!listRef.current) return;\n\n\t\t\t\tresetCursor(listRef.current);\n\t\t\t\tset({ isDragging: false });\n\n\t\t\t\tconst { actions } = get();\n\t\t\t\tactions.cleanupDragListeners();\n\t\t\t},\n\n\t\t\thandleScroll: throttleByFrame(() => {\n\t\t\t\tconst { actions } = get();\n\t\t\t\tactions.updateScrollState();\n\t\t\t}),\n\n\t\t\tinitializeResizeObserver: () => {\n\t\t\t\tif (!listRef.current) return;\n\n\t\t\t\tconst { actions } = get();\n\n\t\t\t\t// == Use ResizeObserver to detect when container or children resize\n\t\t\t\tconst resizeObserver = new ResizeObserver(() => actions.updateScrollState());\n\n\t\t\t\tresizeObserver.observe(listRef.current);\n\n\t\t\t\t// == Also observe children for size changes\n\t\t\t\tfor (const child of listRef.current.children) {\n\t\t\t\t\tresizeObserver.observe(child);\n\t\t\t\t}\n\n\t\t\t\tconst cleanup = () => {\n\t\t\t\t\tresizeObserver.disconnect();\n\t\t\t\t};\n\n\t\t\t\treturn cleanup;\n\t\t\t},\n\n\t\t\tsetListRef: (element) => {\n\t\t\t\tlistRef.current = element as HTMLElement;\n\n\t\t\t\tif (!element) return;\n\n\t\t\t\thandleScrollSnap(element);\n\n\t\t\t\tconst { actions } = get();\n\t\t\t\tactions.updateScrollState();\n\t\t\t},\n\n\t\t\tupdateScrollState: () => {\n\t\t\t\tif (!listRef.current) return;\n\n\t\t\t\tif (orientation === \"horizontal\" || orientation === \"both\") {\n\t\t\t\t\tconst { clientWidth, scrollLeft, scrollWidth } = listRef.current;\n\n\t\t\t\t\tset({\n\t\t\t\t\t\tcanGoToNext: Math.ceil(scrollLeft + clientWidth) < scrollWidth,\n\t\t\t\t\t\tcanGoToPrev: Math.floor(scrollLeft) > 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (orientation === \"vertical\") {\n\t\t\t\t\tconst { clientHeight, scrollHeight, scrollTop } = listRef.current;\n\n\t\t\t\t\tset({\n\t\t\t\t\t\tcanGoToNext: Math.ceil(scrollTop + clientHeight) < scrollHeight,\n\t\t\t\t\t\tcanGoToPrev: Math.floor(scrollTop) > 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t}));\n\n\treturn store;\n};\n","import { dataAttr, on } from \"@zayne-labs/toolkit-core\";\nimport { useCallbackRef, useStore } from \"@zayne-labs/toolkit-react\";\nimport { composeRefs, composeTwoEventHandlers } from \"@zayne-labs/toolkit-react/utils\";\nimport { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { cnMerge } from \"@/lib/utils/cn\";\nimport type { FromCamelToKebabCase } from \"@/lib/utils/type-helpers\";\nimport { createDragScrollStore } from \"./drag-scroll-store\";\nimport type { DragScrollPropGetters, PartProps, UseDragScrollProps, UseDragScrollResult } from \"./types\";\n\nexport const getDragScrollScopeAttrs = (part: FromCamelToKebabCase<keyof PartProps>) => {\n\treturn {\n\t\t/* eslint-disable perfectionist/sort-objects -- I need this order to be maintained */\n\t\t\"data-slot\": `drag-scroll-${part}`,\n\t\t\"data-scope\": \"drag-scroll\",\n\t\t\"data-part\": part,\n\t\t/* eslint-enable perfectionist/sort-objects -- I need this order to be maintained */\n\t} as const;\n};\n\nexport const useDragScroll = <TContainerElement extends HTMLElement = HTMLElement>(\n\tprops?: UseDragScrollProps\n): UseDragScrollResult<TContainerElement> => {\n\tconst {\n\t\tdisableInternalStateSubscription = false,\n\t\torientation = \"horizontal\",\n\t\tscrollAmount = \"item\",\n\t\tusage = \"allScreens\",\n\t} = props ?? {};\n\n\tconst listRef = useRef<TContainerElement>(null);\n\n\tconst storeApi = useMemo(() => {\n\t\treturn createDragScrollStore({ orientation, scrollAmount, usage });\n\t}, [orientation, scrollAmount, usage]);\n\n\tconst actions = storeApi.getState().actions;\n\n\t/* eslint-disable react-hooks/hooks -- ignore */\n\t// eslint-disable-next-line react-x/component-hook-factories -- Ignore\n\tconst useDragScrollStore: UseDragScrollResult<TContainerElement>[\"useDragScrollStore\"] = (selector) => {\n\t\treturn useStore(storeApi as never, selector);\n\t};\n\n\tconst canGoToPrev = useDragScrollStore((state) =>\n\t\t!disableInternalStateSubscription ? state.canGoToPrev : null\n\t);\n\n\tconst canGoToNext = useDragScrollStore((state) =>\n\t\t!disableInternalStateSubscription ? state.canGoToNext : null\n\t);\n\n\tconst isDragging = useDragScrollStore((state) =>\n\t\t!disableInternalStateSubscription ? state.isDragging : null\n\t);\n\t/* eslint-enable react-hooks/hooks -- ignore */\n\n\tconst refCallback: React.RefCallback<TContainerElement> = useCallbackRef((node) => {\n\t\tlistRef.current = node;\n\t\tactions.setListRef(node);\n\n\t\tif (!node) return;\n\n\t\tconst cleanupMouseDown = on(node, \"mousedown\", actions.handleMouseDown);\n\t\tconst cleanupScroll = on(node, \"scroll\", actions.handleScroll, {\n\t\t\tpassive: true,\n\t\t});\n\n\t\treturn () => {\n\t\t\tcleanupMouseDown();\n\t\t\tcleanupScroll();\n\t\t};\n\t});\n\n\t// == Update scroll state when children might change (e.g., async loaded content)\n\tuseEffect(() => {\n\t\tconst cleanup = actions.initializeResizeObserver();\n\n\t\treturn cleanup;\n\t}, [actions]);\n\n\tconst getRootProps: DragScrollPropGetters<TContainerElement>[\"getRootProps\"] = useCallbackRef(\n\t\t(innerProps) => {\n\t\t\treturn {\n\t\t\t\t...getDragScrollScopeAttrs(\"root\"),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: cnMerge(\"relative\", innerProps?.className),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst getListProps: DragScrollPropGetters<TContainerElement>[\"getListProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\treturn {\n\t\t\t\t...getDragScrollScopeAttrs(\"list\"),\n\t\t\t\t...(!disableInternalStateSubscription && {\n\t\t\t\t\t\"data-dragging\": dataAttr(isDragging),\n\t\t\t\t}),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: cnMerge(\n\t\t\t\t\t`scrollbar-hidden flex w-full cursor-grab snap-x snap-mandatory overflow-x-scroll overflow-y-hidden`,\n\t\t\t\t\torientation === \"horizontal\" && \"flex-row\",\n\t\t\t\t\torientation === \"vertical\" && \"flex-col\",\n\t\t\t\t\tusage === \"mobileAndTabletOnly\" && \"md:cursor-default md:flex-col\",\n\t\t\t\t\tusage === \"desktopOnly\" && \"max-md:cursor-default max-md:flex-col\",\n\t\t\t\t\tinnerProps?.className\n\t\t\t\t),\n\t\t\t\tref: composeRefs(\n\t\t\t\t\trefCallback,\n\t\t\t\t\t(innerProps as { ref?: React.Ref<TContainerElement> } | undefined)?.ref\n\t\t\t\t),\n\t\t\t} as never;\n\t\t},\n\t\t[disableInternalStateSubscription, isDragging, orientation, refCallback, usage]\n\t);\n\n\tconst getItemProps: DragScrollPropGetters<TContainerElement>[\"getItemProps\"] = useCallbackRef(\n\t\t(innerProps) => {\n\t\t\treturn {\n\t\t\t\t...getDragScrollScopeAttrs(\"item\"),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: cnMerge(\"snap-center snap-always\", innerProps?.className),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst getPrevButtonProps: DragScrollPropGetters<TContainerElement>[\"getPrevButtonProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\tconst isDisabled = innerProps?.disabled ?? !canGoToPrev;\n\n\t\t\treturn {\n\t\t\t\t...getDragScrollScopeAttrs(\"prev-button\"),\n\t\t\t\ttype: \"button\",\n\t\t\t\t...innerProps,\n\t\t\t\t\"aria-disabled\": dataAttr(isDisabled),\n\t\t\t\t\"aria-label\": innerProps?.[\"aria-label\"] ?? \"Scroll back\",\n\t\t\t\t\"data-disabled\": dataAttr(isDisabled),\n\t\t\t\tdisabled: isDisabled,\n\t\t\t\tonClick: composeTwoEventHandlers(actions.goToPrev, innerProps?.onClick),\n\t\t\t};\n\t\t},\n\t\t[actions.goToPrev, canGoToPrev]\n\t);\n\n\tconst getNextButtonProps: DragScrollPropGetters<TContainerElement>[\"getNextButtonProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\tconst isDisabled = innerProps?.disabled ?? !canGoToNext;\n\n\t\t\treturn {\n\t\t\t\t...getDragScrollScopeAttrs(\"next-button\"),\n\t\t\t\ttype: \"button\",\n\t\t\t\t...innerProps,\n\t\t\t\t\"aria-disabled\": dataAttr(isDisabled),\n\t\t\t\t\"aria-label\": innerProps?.[\"aria-label\"] ?? \"Scroll forward\",\n\t\t\t\t\"data-disabled\": dataAttr(isDisabled),\n\t\t\t\tdisabled: isDisabled,\n\t\t\t\tonClick: composeTwoEventHandlers(actions.goToNext, innerProps?.onClick),\n\t\t\t};\n\t\t},\n\t\t[actions.goToNext, canGoToNext]\n\t);\n\n\tconst propGetters = useMemo<DragScrollPropGetters<TContainerElement>>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tgetItemProps,\n\t\t\t\tgetListProps,\n\t\t\t\tgetNextButtonProps,\n\t\t\t\tgetPrevButtonProps,\n\t\t\t\tgetRootProps,\n\t\t\t}) satisfies DragScrollPropGetters<TContainerElement>,\n\t\t[getPrevButtonProps, getListProps, getItemProps, getNextButtonProps, getRootProps]\n\t);\n\n\tconst stableUseDragScrollStore = useCallbackRef(useDragScrollStore);\n\n\tconst result = useMemo<UseDragScrollResult<TContainerElement>>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tdisableInternalStateSubscription,\n\t\t\t\tlistRef,\n\t\t\t\tpropGetters,\n\t\t\t\tstoreApi,\n\t\t\t\tuseDragScrollStore: stableUseDragScrollStore,\n\t\t\t}) satisfies UseDragScrollResult<TContainerElement>,\n\t\t[propGetters, disableInternalStateSubscription, storeApi, stableUseDragScrollStore]\n\t);\n\n\treturn result;\n};\n","import { createCustomContext } from \"@zayne-labs/toolkit-react\";\nimport { createReactStoreContext } from \"@zayne-labs/toolkit-react/zustand\";\nimport type { DragScrollStore, UseDragScrollResult } from \"./types\";\n\nconst [DragScrollStoreContextProvider, useDragScrollStoreContext] =\n\tcreateReactStoreContext<DragScrollStore>({\n\t\thookName: \"useDragScrollStoreContext\",\n\t\tname: \"DragScrollStoreContext\",\n\t\tproviderName: \"DragScrollRoot\",\n\t});\n\nexport type DragScrollRootContextType<TElement extends HTMLElement = HTMLElement> = Pick<\n\tUseDragScrollResult<TElement>,\n\t\"disableInternalStateSubscription\" | \"listRef\" | \"propGetters\"\n>;\n\nconst [DragScrollRootContextProvider, useDragScrollRootContext] =\n\tcreateCustomContext<DragScrollRootContextType>({\n\t\thookName: \"useDragScrollRootContext\",\n\t\tname: \"DragScrollRootContext\",\n\t\tproviderName: \"DragScrollRoot\",\n\t});\n\nexport {\n\tDragScrollRootContextProvider,\n\tDragScrollStoreContextProvider,\n\tuseDragScrollRootContext,\n\tuseDragScrollStoreContext,\n};\n","\"use client\";\n\nimport { useCompareSelector } from \"@zayne-labs/toolkit-react\";\nimport type { PolymorphicPropsStrict } from \"@zayne-labs/toolkit-react/utils\";\nimport { isFunction, type SelectorFn } from \"@zayne-labs/toolkit-type-helpers\";\nimport { useMemo } from \"react\";\nimport { Slot } from \"@/components/common/slot\";\nimport {\n\tDragScrollRootContextProvider,\n\tDragScrollStoreContextProvider,\n\tuseDragScrollRootContext,\n\tuseDragScrollStoreContext,\n\ttype DragScrollRootContextType,\n} from \"./drag-scroll-context\";\nimport type { DragScrollStore, PartInputProps, UseDragScrollProps } from \"./types\";\nimport { useDragScroll } from \"./use-drag-scroll\";\n\n/* eslint-disable perfectionist/sort-intersection-types -- I need non-standard props to come first */\n\nexport type DragScrollRootProps = UseDragScrollProps & {\n\tasChild?: boolean;\n\tchildren: React.ReactNode;\n} & PartInputProps[\"root\"];\n\nexport function DragScrollRoot(props: DragScrollRootProps) {\n\tconst { asChild, children, ...restOfProps } = props;\n\n\tconst { disableInternalStateSubscription, listRef, propGetters, storeApi } = useDragScroll(restOfProps);\n\n\tconst rootContextValue = useMemo<DragScrollRootContextType>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tdisableInternalStateSubscription,\n\t\t\t\tlistRef,\n\t\t\t\tpropGetters,\n\t\t\t}) satisfies DragScrollRootContextType,\n\t\t[listRef, disableInternalStateSubscription, propGetters]\n\t);\n\n\tconst Component = asChild ? Slot.Root : \"div\";\n\n\treturn (\n\t\t<DragScrollStoreContextProvider store={storeApi}>\n\t\t\t<DragScrollRootContextProvider value={rootContextValue}>\n\t\t\t\t<Component {...propGetters.getRootProps(restOfProps)}>{children}</Component>\n\t\t\t</DragScrollRootContextProvider>\n\t\t</DragScrollStoreContextProvider>\n\t);\n}\n\nexport type DragScrollContextProps<TSlice> = {\n\tchildren: React.ReactNode | ((context: TSlice) => React.ReactNode);\n\tselector?: SelectorFn<DragScrollStore, TSlice>;\n};\n\nexport function DragScrollContext<TSlice = DragScrollStore>(props: DragScrollContextProps<TSlice>) {\n\tconst { children, selector } = props;\n\n\tconst dragScrollCtx = useDragScrollStoreContext(useCompareSelector(selector));\n\n\tconst resolvedChildren = isFunction(children) ? children(dragScrollCtx) : children;\n\n\treturn resolvedChildren;\n}\n\nexport type DragScrollListProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"list\"];\n\nexport function DragScrollList<TElement extends React.ElementType = \"ul\">(\n\tprops: PolymorphicPropsStrict<TElement, DragScrollListProps>\n) {\n\tconst { as: Element = \"ul\", asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : Element;\n\n\treturn <Component {...propGetters.getListProps(restOfProps)} />;\n}\n\nexport type DragScrollItemProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"item\"];\n\nexport function DragScrollItem<TElement extends React.ElementType = \"li\">(\n\tprops: PolymorphicPropsStrict<TElement, DragScrollItemProps>\n) {\n\tconst { as: Element = \"li\", asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : Element;\n\n\treturn <Component {...propGetters.getItemProps(restOfProps)} />;\n}\n\nexport type DragScrollPrevProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"prevButton\"];\n\nexport function DragScrollPrev(props: DragScrollPrevProps) {\n\tconst { asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : \"button\";\n\n\treturn <Component {...propGetters.getPrevButtonProps(restOfProps)} />;\n}\n\nexport type DragScrollNextProps = {\n\tasChild?: boolean;\n} & PartInputProps[\"nextButton\"];\n\nexport function DragScrollNext(props: DragScrollNextProps) {\n\tconst { asChild, ...restOfProps } = props;\n\n\tconst { propGetters } = useDragScrollRootContext();\n\n\tconst Component = asChild ? Slot.Root : \"button\";\n\n\treturn <Component {...propGetters.getNextButtonProps(restOfProps)} />;\n}\n\n/* eslint-enable perfectionist/sort-intersection-types -- I need non-standard props to come first */\n","export {\n\tDragScrollContext as Context,\n\tDragScrollItem as Item,\n\tDragScrollNext as Next,\n\tDragScrollPrev as Prev,\n\tDragScrollRoot as Root,\n\tDragScrollList as List,\n} from \"./drag-scroll\";\n"],"mappings":";;;;;;;;;;;;AAGA,MAAa,gBAA8C,YAAsB;AAChF,SAAQ,MAAM,SAAS;AACvB,SAAQ,MAAM,aAAa;;AAG5B,MAAa,gBACZ,QACA,YACI;AACJ,KAAI,WAAW,UAAU;AACxB,UAAQ,MAAM,iBAAiB;AAC/B;;AAGD,SAAQ,MAAM,iBAAiB;;AAGhC,MAAa,eAA6C,YAAsB;AAC/E,SAAQ,MAAM,SAAS;AACvB,SAAQ,MAAM,aAAa;;AAI5B,MAAa,oBAAoB,kBAA+B;AAG/D,KAAI,CAFa,qBAAqB,CAGrC,cAAa,UAAU,cAAc;KAErC,cAAa,SAAS,cAAc;;;;ACrBtC,MAAa,yBAAyB,oBAAqC;CAC1E,MAAM,EAAE,cAAc,cAAc,eAAe,QAAQ,QAAQ,iBAAiB;CAEpF,MAAM,UAA+C,EACpD,SAAS,MACT;CAED,MAAM,cAAc,EACnB,SAAS;EACR,MAAM;EACN,KAAK;EACL,GAAG;EACH,GAAG;EACH,EACD;CAED,MAAM,qBAAqB,EAC1B,SAAS;EACR,YAAY,IAAI,iBAAiB;EACjC,WAAW,IAAI,iBAAiB;EAChC,SAAS,IAAI,iBAAiB;EAC9B,EACD;CAGD,MAAM,mBAAmB,cAAmC;AAC3D,MAAI,SAAS,aAAa,CACzB,QAAO;EAGR,MAAM,aAAa,UAAU,SAAS;AAEtC,MAAI,CAAC,WACJ,QAAO;AAGR,SAAO,gBAAgB,cAAc,gBAAgB,SACnD,WAAW,eACV,WAAW;;AAiLf,QA9Kc,aAA8B,KAAK,SAAS;EACzD,aAAa;EACb,aAAa;EACb,YAAY;EAGZ,SAAS;GACR,4BAA4B;AAC3B,uBAAmB,QAAQ,UAAU,OAAO;AAC5C,uBAAmB,QAAQ,QAAQ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B,WAAW,SAAS,GAAG,SAAS,cAAc,GAAG;;AAS3E,SAAgB,eACf,OACC;CACD,MAAM,EAAE,IAAI,UAAU,MAAM,SAAS,GAAG,gBAAgB;CAExD,MAAM,EAAE,gBAAgB,0BAA0B;AAIlD,QAAO,oBAFW,UAAUA,WAAY,SAEjC,EAAW,GAAI,YAAY,aAAa,YAAY,EAAI,CAAA;;AAOhE,SAAgB,eACf,OACC;CACD,MAAM,EAAE,IAAI,UAAU,MAAM,SAAS,GAAG,gBAAgB;CAExD,MAAM,EAAE,gBAAgB,0BAA0B;AAIlD,QAAO,oBAFW,UAAUA,WAAY,SAEjC,EAAW,GAAI,YAAY,aAAa,YAAY,EAAI,CAAA;;AAOhE,SAAgB,eAAe,OAA4B;CAC1D,MAAM,EAAE,SAAS,GAAG,gBAAgB;CAEpC,MAAM,EAAE,gBAAgB,0BAA0B;AAIlD,QAAO,oBAFW,UAAUA,WAAY,UAEjC,EAAW,GAAI,YAAY,mBAAmB,YAAY,EAAI,CAAA;;AAOtE,SAAgB,eAAe,OAA4B;CAC1D,MAAM,EAAE,SAAS,GAAG,gBAAgB;CAEpC,MAAM,EAAE,gBAAgB,0BAA0B;AAIlD,QAAO,oBAFW,UAAUA,WAAY,UAEjC,EAAW,GAAI,YAAY,mBAAmB,YAAY,EAAI,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import { InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
- import * as _zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
2
+ import * as _$_zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
3
3
  import { Awaitable, SelectorFn, UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
4
- import * as react from "react";
5
- import * as react_jsx_runtime0 from "react/jsx-runtime";
6
- import * as _zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
4
+ import * as _$react from "react";
5
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
+ import * as _$_zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
7
7
  import { FileMeta, FileOrFileMeta, FileValidationErrorContextEach, FileValidationHooksAsync, FileValidationSettingsAsync } from "@zayne-labs/toolkit-core";
8
8
 
9
9
  //#region src/components/ui/drop-zone/drop-zone-store.d.ts
@@ -30,7 +30,7 @@ declare const createDropZoneStore: (storeContext: StoreContext) => {
30
30
  shouldReplace: true;
31
31
  }) | undefined): void;
32
32
  };
33
- subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
33
+ subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
34
34
  };
35
35
  //#endregion
36
36
  //#region src/components/ui/drop-zone/utils.d.ts
@@ -269,9 +269,9 @@ declare const DropZoneStoreContextProvider: (props: {
269
269
  shouldReplace: true;
270
270
  }) | undefined): void;
271
271
  };
272
- subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
272
+ subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
273
273
  };
274
- }) => react.FunctionComponentElement<react.ProviderProps<{
274
+ }) => _$react.FunctionComponentElement<_$react.ProviderProps<{
275
275
  getInitialState: () => DropZoneStore;
276
276
  getListeners: () => Set<(state: DropZoneStore, prevState: DropZoneStore) => void>;
277
277
  getState: () => DropZoneStore;
@@ -292,8 +292,8 @@ declare const DropZoneStoreContextProvider: (props: {
292
292
  shouldReplace: true;
293
293
  }) | undefined): void;
294
294
  };
295
- subscribe: _zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
296
- }>>, useDropZoneStoreContext: <TResult = DropZoneStore>(selector?: _zayne_labs_toolkit_type_helpers0.SelectorFn<DropZoneStore, TResult> | undefined) => TResult;
295
+ subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<DropZoneStore>;
296
+ }>>, useDropZoneStoreContext: <TResult = DropZoneStore>(selector?: _$_zayne_labs_toolkit_type_helpers0.SelectorFn<DropZoneStore, TResult> | undefined) => TResult;
297
297
  type FileItemContextType = {
298
298
  fileState: FileState;
299
299
  };
@@ -302,29 +302,29 @@ type FileItemContextType = {
302
302
  type DropZoneRootProps = UseDropZoneProps & {
303
303
  children: React.ReactNode;
304
304
  };
305
- declare function DropZoneRoot(props: DropZoneRootProps): react_jsx_runtime0.JSX.Element;
305
+ declare function DropZoneRoot(props: DropZoneRootProps): _$react_jsx_runtime0.JSX.Element;
306
306
  type DropZoneContextProps<TSlice> = {
307
307
  children: React.ReactNode | ((context: TSlice) => React.ReactNode);
308
308
  selector?: SelectorFn<DropZoneStore, TSlice>;
309
309
  };
310
- declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>): react.ReactNode;
310
+ declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>): _$react.ReactNode;
311
311
  type DropZoneContainerProps = {
312
312
  asChild?: boolean;
313
313
  } & PartInputProps["container"];
314
- declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>): react_jsx_runtime0.JSX.Element;
314
+ declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>): _$react_jsx_runtime0.JSX.Element;
315
315
  type DropZoneInputProps = {
316
316
  asChild?: boolean;
317
317
  } & PartInputProps["input"];
318
- declare function DropZoneInput(props: DropZoneInputProps): react_jsx_runtime0.JSX.Element;
318
+ declare function DropZoneInput(props: DropZoneInputProps): _$react_jsx_runtime0.JSX.Element;
319
319
  type DropZoneAreaProps<TSlice = DropZoneStore> = DropZoneContextProps<TSlice> & {
320
320
  classNames?: Partial<Record<Extract<keyof PartInputProps, "container" | "input">, string>>;
321
321
  extraProps?: Partial<Pick<PartInputProps, "container" | "input">>;
322
322
  } & PartInputProps["container"];
323
- declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>): react_jsx_runtime0.JSX.Element;
323
+ declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>): _$react_jsx_runtime0.JSX.Element;
324
324
  type DropZoneTriggerProps = {
325
325
  asChild?: boolean;
326
326
  } & PartInputProps["trigger"];
327
- declare function DropZoneTrigger(props: DropZoneTriggerProps): react_jsx_runtime0.JSX.Element;
327
+ declare function DropZoneTrigger(props: DropZoneTriggerProps): _$react_jsx_runtime0.JSX.Element;
328
328
  type ListPerItemContext = Pick<DropZoneStore, "actions"> & {
329
329
  array: DropZoneStore["fileStateArray"];
330
330
  fileState: DropZoneStore["fileStateArray"][number];
@@ -343,15 +343,15 @@ type DropZoneFileListProps = {
343
343
  asChild?: boolean;
344
344
  forceMount?: boolean;
345
345
  } & (FileListManualListVariant | FileListPerItemVariant) & Omit<PartInputProps["fileList"], "children">;
346
- declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>): react_jsx_runtime0.JSX.Element;
346
+ declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>): _$react_jsx_runtime0.JSX.Element;
347
347
  type DropZoneFileItemProps = FileItemContextType & {
348
348
  asChild?: boolean;
349
349
  } & PartInputProps["fileItem"];
350
- declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>): react_jsx_runtime0.JSX.Element;
350
+ declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>): _$react_jsx_runtime0.JSX.Element;
351
351
  type DropZoneFileItemDeleteProps = {
352
352
  asChild?: boolean;
353
353
  } & PartInputProps["fileItemDelete"];
354
- declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps): react_jsx_runtime0.JSX.Element;
354
+ declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps): _$react_jsx_runtime0.JSX.Element;
355
355
  type StrictExtract<TUnion, TPick extends TUnion> = Extract<TUnion, TPick>;
356
356
  type DropZoneFileItemProgressProps = {
357
357
  asChild?: boolean;
@@ -375,7 +375,7 @@ type DropZoneFileItemProgressProps = {
375
375
  };
376
376
  variant?: StrictExtract<PartInputProps["fileItemProgress"]["variant"], "linear">;
377
377
  });
378
- declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>): react_jsx_runtime0.JSX.Element | null;
378
+ declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>): _$react_jsx_runtime0.JSX.Element | null;
379
379
  type NodeCtx<TElement extends React.ElementType> = {
380
380
  getProps: (innerProps: Partial<InferProps<TElement>>) => InferProps<TElement>;
381
381
  };
@@ -407,7 +407,7 @@ type DropZoneFileItemPreviewProps = Partial<Pick<FileItemContextType, "fileState
407
407
  }) => React.ReactNode);
408
408
  renderPreview?: boolean | RenderPreview;
409
409
  } & Omit<PartInputProps["fileItemPreview"], "children">;
410
- declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>): react_jsx_runtime0.JSX.Element | null;
410
+ declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>): _$react_jsx_runtime0.JSX.Element | null;
411
411
  type DropZoneFileItemMetadataProps = Partial<Pick<FileItemContextType, "fileState">> & {
412
412
  asChild?: boolean;
413
413
  children?: React.ReactNode | ((context: Pick<FileItemContextType, "fileState">) => React.ReactNode);
@@ -417,12 +417,12 @@ type DropZoneFileItemMetadataProps = Partial<Pick<FileItemContextType, "fileStat
417
417
  };
418
418
  size?: "default" | "sm";
419
419
  } & Omit<PartInputProps["fileItemMetadata"], "children">;
420
- declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps): react_jsx_runtime0.JSX.Element | null;
420
+ declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps): _$react_jsx_runtime0.JSX.Element | null;
421
421
  type DropZoneFileClearProps = {
422
422
  asChild?: boolean;
423
423
  forceMount?: boolean;
424
424
  } & PartInputProps["fileItemClear"];
425
- declare function DropZoneFileClear(props: DropZoneFileClearProps): react_jsx_runtime0.JSX.Element | null;
425
+ declare function DropZoneFileClear(props: DropZoneFileClearProps): _$react_jsx_runtime0.JSX.Element | null;
426
426
  declare namespace drop_zone_parts_d_exports {
427
427
  export { DropZoneArea as Area, DropZoneContainer as Container, DropZoneContext as Context, DropZoneFileClear as FileClear, DropZoneFileItem as FileItem, DropZoneFileItemDelete as FileItemDelete, DropZoneFileItemMetadata as FileItemMetadata, DropZoneFileItemPreview as FileItemPreview, DropZoneFileItemProgress as FileItemProgress, DropZoneFileList as FileList, DropZoneInput as Input, DropZoneRoot as Root, DropZoneTrigger as Trigger };
428
428
  }
@@ -1,7 +1,7 @@
1
1
  import { DiscriminatedRenderItemProps, DiscriminatedRenderProps, InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
2
  import { UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
3
- import * as react from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as _$react from "react";
4
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
  import { Control, ControllerProps, FieldPath, FieldValues, FormStateSubscribeProps as FormStateSubscribeProps$1, RegisterOptions, UseFormReturn, UseFormStateReturn, WatchProps, useFormContext as useFormRootContext } from "react-hook-form";
6
6
 
7
7
  //#region src/components/ui/form/form-context.d.ts
@@ -34,7 +34,7 @@ type FormRootProps<TFieldValues extends FieldValues, TTransformedValues> = Infer
34
34
  children: React.ReactNode;
35
35
  form: UseFormReturn<TFieldValues, unknown, TTransformedValues>;
36
36
  };
37
- declare function FormRoot<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormRootProps<TFieldValues, TTransformedValues>): react_jsx_runtime0.JSX.Element;
37
+ declare function FormRoot<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormRootProps<TFieldValues, TTransformedValues>): _$react_jsx_runtime0.JSX.Element;
38
38
  type FormFieldProps<TControl, TFieldValues extends FieldValues, TTransformedValues> = (TControl extends Control<infer TValues> ? {
39
39
  control?: never;
40
40
  name: FieldPath<TValues>;
@@ -48,26 +48,26 @@ type FormFieldProps<TControl, TFieldValues extends FieldValues, TTransformedValu
48
48
  className?: never;
49
49
  withWrapper: false;
50
50
  });
51
- declare function FormField<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormFieldProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime0.JSX.Element;
51
+ declare function FormField<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormFieldProps<TControl, TFieldValues, TTransformedValues>): _$react_jsx_runtime0.JSX.Element;
52
52
  type FormFieldControlledFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues> = ControllerProps<TFieldValues, TName, TTransformedValues>;
53
- declare function FormFieldWithController<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues>(props: FormFieldControlledFieldProps<TFieldValues, TName, TTransformedValues>): react_jsx_runtime0.JSX.Element;
53
+ declare function FormFieldWithController<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues>(props: FormFieldControlledFieldProps<TFieldValues, TName, TTransformedValues>): _$react_jsx_runtime0.JSX.Element;
54
54
  type FormFieldBoundControllerProps<TFieldValues extends FieldValues, TTransformedValues> = Omit<ControllerProps<TFieldValues, never, TTransformedValues>, "control" | "name">;
55
- declare function FormFieldBoundController<TFieldValues extends FieldValues = Record<string, never>, TTransformedValues = TFieldValues>(props: FormFieldBoundControllerProps<TFieldValues, TTransformedValues>): react_jsx_runtime0.JSX.Element;
55
+ declare function FormFieldBoundController<TFieldValues extends FieldValues = Record<string, never>, TTransformedValues = TFieldValues>(props: FormFieldBoundControllerProps<TFieldValues, TTransformedValues>): _$react_jsx_runtime0.JSX.Element;
56
56
  type FormFieldContextProps = DiscriminatedRenderProps<(contextValue: FieldContextType) => React.ReactNode>;
57
- declare function FormFieldContext(props: FormFieldContextProps): react.ReactNode;
57
+ declare function FormFieldContext(props: FormFieldContextProps): _$react.ReactNode;
58
58
  type FormLabelProps = InferProps<"label">;
59
- declare function FormLabel(props: FormLabelProps): react_jsx_runtime0.JSX.Element;
59
+ declare function FormLabel(props: FormLabelProps): _$react_jsx_runtime0.JSX.Element;
60
60
  type FormInputGroupProps = InferProps<"div">;
61
- declare function FormInputGroup(props: FormInputGroupProps): react_jsx_runtime0.JSX.Element;
61
+ declare function FormInputGroup(props: FormInputGroupProps): _$react_jsx_runtime0.JSX.Element;
62
62
  type FormSideItemProps = {
63
63
  children?: React.ReactNode;
64
64
  className?: string;
65
65
  };
66
- declare function FormInputLeftItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime0.JSX.Element;
66
+ declare function FormInputLeftItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): _$react_jsx_runtime0.JSX.Element;
67
67
  declare namespace FormInputLeftItem {
68
68
  var slotSymbol: symbol;
69
69
  }
70
- declare function FormInputRightItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime0.JSX.Element;
70
+ declare function FormInputRightItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): _$react_jsx_runtime0.JSX.Element;
71
71
  declare namespace FormInputRightItem {
72
72
  var slotSymbol: symbol;
73
73
  }
@@ -104,9 +104,9 @@ type FormSelectPrimitiveProps<TFieldValues extends FieldValues> = InferProps<"se
104
104
  fieldState?: FieldState;
105
105
  name?: FieldPath<TFieldValues>;
106
106
  };
107
- declare function FormInputPrimitive<TFieldValues extends FieldValues>(props: FormInputPrimitiveProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
108
- declare function FormTextAreaPrimitive<TFieldValues extends FieldValues>(props: FormTextAreaPrimitiveProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
109
- declare function FormSelectPrimitive<TFieldValues extends FieldValues>(props: FormSelectPrimitiveProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
107
+ declare function FormInputPrimitive<TFieldValues extends FieldValues>(props: FormInputPrimitiveProps<TFieldValues>): _$react_jsx_runtime0.JSX.Element;
108
+ declare function FormTextAreaPrimitive<TFieldValues extends FieldValues>(props: FormTextAreaPrimitiveProps<TFieldValues>): _$react_jsx_runtime0.JSX.Element;
109
+ declare function FormSelectPrimitive<TFieldValues extends FieldValues>(props: FormSelectPrimitiveProps<TFieldValues>): _$react_jsx_runtime0.JSX.Element;
110
110
  type PrimitivePropsToOmit = "control" | "formState" | "name";
111
111
  type FormInputProps = Omit<FormInputPrimitiveProps<FieldValues>, PrimitivePropsToOmit>;
112
112
  type FormTextAreaProps = Omit<FormTextAreaPrimitiveProps<FieldValues>, PrimitivePropsToOmit>;
@@ -118,11 +118,11 @@ type FormInputCombinedProps = (FormInputProps & {
118
118
  }) | (FormTextAreaProps & {
119
119
  type: "textarea";
120
120
  });
121
- declare function FormInput(props: FormInputCombinedProps): react_jsx_runtime0.JSX.Element;
122
- declare function FormTextArea(props: FormTextAreaProps): react_jsx_runtime0.JSX.Element;
123
- declare function FormSelect(props: FormSelectProps): react_jsx_runtime0.JSX.Element;
121
+ declare function FormInput(props: FormInputCombinedProps): _$react_jsx_runtime0.JSX.Element;
122
+ declare function FormTextArea(props: FormTextAreaProps): _$react_jsx_runtime0.JSX.Element;
123
+ declare function FormSelect(props: FormSelectProps): _$react_jsx_runtime0.JSX.Element;
124
124
  type FormDescriptionProps = InferProps<"p">;
125
- declare function FormDescription(props: FormDescriptionProps): react_jsx_runtime0.JSX.Element;
125
+ declare function FormDescription(props: FormDescriptionProps): _$react_jsx_runtime0.JSX.Element;
126
126
  type ErrorMessageRenderProps = {
127
127
  className: string;
128
128
  "data-index": number;
@@ -181,15 +181,15 @@ type FormErrorMessageProps<TControl, TFieldValues extends FieldValues, TTransfor
181
181
  errorField: string;
182
182
  type: "root";
183
183
  };
184
- declare function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormErrorMessageProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime0.JSX.Element;
184
+ declare function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormErrorMessageProps<TControl, TFieldValues, TTransformedValues>): _$react_jsx_runtime0.JSX.Element;
185
185
  type FormSubmitProps = InferProps<"button"> & {
186
186
  asChild?: boolean;
187
187
  };
188
- declare function FormSubmit<TElement extends React.ElementType = "button">(props: PolymorphicPropsStrict<TElement, FormSubmitProps>): react_jsx_runtime0.JSX.Element;
188
+ declare function FormSubmit<TElement extends React.ElementType = "button">(props: PolymorphicPropsStrict<TElement, FormSubmitProps>): _$react_jsx_runtime0.JSX.Element;
189
189
  type FormWatchProps<TFieldValues extends FieldValues, TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined, TTransformedValues, TComputeValue, TComputedProps extends Omit<WatchProps<TFieldName, TFieldValues, unknown, TTransformedValues, TComputeValue>, "names"> = Omit<WatchProps<TFieldName, TFieldValues, unknown, TTransformedValues, TComputeValue>, "names">> = DiscriminatedRenderProps<TComputedProps["render"]> & Omit<TComputedProps, "render">;
190
- declare function FormWatch<TFieldValues extends FieldValues = FieldValues, const TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined = undefined, TTransformedValues = TFieldValues, TComputeValue = undefined>(props: FormWatchProps<TFieldValues, TFieldName, TTransformedValues, TComputeValue>): react.ReactNode | react.ReactNode[];
190
+ declare function FormWatch<TFieldValues extends FieldValues = FieldValues, const TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined = undefined, TTransformedValues = TFieldValues, TComputeValue = undefined>(props: FormWatchProps<TFieldValues, TFieldName, TTransformedValues, TComputeValue>): _$react.ReactNode | _$react.ReactNode[];
191
191
  type FormStateSubscribeProps<TFieldValues extends FieldValues, TTransformedValues, TComputedProps extends FormStateSubscribeProps$1<TFieldValues, TTransformedValues> = FormStateSubscribeProps$1<TFieldValues, TTransformedValues>> = DiscriminatedRenderProps<TComputedProps["render"]> & Omit<TComputedProps, "render">;
192
- declare function FormStateSubscribe<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormStateSubscribeProps<TFieldValues, TTransformedValues>): react.ReactNode;
192
+ declare function FormStateSubscribe<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormStateSubscribeProps<TFieldValues, TTransformedValues>): _$react.ReactNode;
193
193
  declare namespace form_parts_d_exports {
194
194
  export { FormDescription as Description, FormErrorMessage as ErrorMessage, FormErrorMessagePrimitive as ErrorMessagePrimitive, FormField as Field, FormFieldBoundController as FieldBoundController, FormFieldContext as FieldContext, FormFieldWithController as FieldWithController, FormInput as Input, FormInputGroup as InputGroup, FormInputLeftItem as InputLeftItem, FormInputPrimitive as InputPrimitive, FormInputRightItem as InputRightItem, FormLabel as Label, FormRoot as Root, FormSelect as Select, FormStateSubscribe as StateSubscribe, FormSubmit as Submit, FormTextArea as TextArea, FormTextAreaPrimitive as TextAreaPrimitive, FormWatch as Watch };
195
195
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zayne-labs/ui-react",
3
3
  "type": "module",
4
- "version": "0.11.2",
4
+ "version": "0.11.3",
5
5
  "description": "A composable UI/UI-utilities components library. ",
6
6
  "author": "Ryan Zayne",
7
7
  "license": "MIT",
@@ -62,8 +62,8 @@
62
62
  "concurrently": "9.2.1",
63
63
  "cross-env": "10.1.0",
64
64
  "prettier": "3.8.1",
65
- "prettier-plugin-classnames": "0.10.0",
66
- "prettier-plugin-merge": "0.10.0",
65
+ "prettier-plugin-classnames": "0.10.1",
66
+ "prettier-plugin-merge": "0.10.1",
67
67
  "prettier-plugin-tailwindcss": "0.7.2",
68
68
  "publint": "0.3.18",
69
69
  "react": "19.2.4",
@@ -72,7 +72,7 @@
72
72
  "size-limit": "12.0.1",
73
73
  "tailwind-merge": "3.5.0",
74
74
  "tailwindcss": "4.2.2",
75
- "tsdown": "0.21.5",
75
+ "tsdown": "0.21.7",
76
76
  "typescript": "6.0.2"
77
77
  },
78
78
  "publishConfig": {