@zayne-labs/ui-react 0.10.35 → 0.10.37

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.
Files changed (46) hide show
  1. package/dist/esm/{chunk-CTAAG5j7.js → chunk-Bp6m_JJh.js} +1 -1
  2. package/dist/esm/{cn-DdD3uYxA.js → cn-BFKOHS_9.js} +2 -2
  3. package/dist/esm/{cn-DdD3uYxA.js.map → cn-BFKOHS_9.js.map} +1 -1
  4. package/dist/esm/common/await/index.d.ts +15 -15
  5. package/dist/esm/common/await/index.js +5 -5
  6. package/dist/esm/common/client-gate/index.js +1 -1
  7. package/dist/esm/common/error-boundary/index.d.ts +1 -1
  8. package/dist/esm/common/error-boundary/index.js +1 -1
  9. package/dist/esm/common/for/index.d.ts +4 -4
  10. package/dist/esm/common/for/index.js +1 -1
  11. package/dist/esm/common/presence/index.d.ts +3 -3
  12. package/dist/esm/common/presence/index.js +2 -2
  13. package/dist/esm/common/show/index.js +1 -1
  14. package/dist/esm/common/slot/index.d.ts +3 -3
  15. package/dist/esm/common/slot/index.js +1 -1
  16. package/dist/esm/common/suspense-with-boundary/index.d.ts +2 -2
  17. package/dist/esm/common/suspense-with-boundary/index.js +1 -1
  18. package/dist/esm/common/switch/index.js +2 -2
  19. package/dist/esm/common/teleport/index.js +3 -3
  20. package/dist/esm/common/teleport/index.js.map +1 -1
  21. package/dist/esm/{error-boundary-6VGflFQ9.js → error-boundary-BwGXKuLC.js} +3 -3
  22. package/dist/esm/{error-boundary-6VGflFQ9.js.map → error-boundary-BwGXKuLC.js.map} +1 -1
  23. package/dist/esm/{for-x0-1kO5w.js → for-CzHe2tKt.js} +2 -2
  24. package/dist/esm/{for-x0-1kO5w.js.map → for-CzHe2tKt.js.map} +1 -1
  25. package/dist/esm/{index-wZII15Ra.d.ts → index-C_MEUq8L.d.ts} +5 -5
  26. package/dist/esm/{index-CfndCNl3.d.ts → index-MF2B98KG.d.ts} +6 -6
  27. package/dist/esm/{presence-Bj-YnaHv.js → presence-D1o4HPFU.js} +4 -4
  28. package/dist/esm/{presence-Bj-YnaHv.js.map → presence-D1o4HPFU.js.map} +1 -1
  29. package/dist/esm/{show-kIsXcWiR.js → show-CoTEBp0b.js} +4 -4
  30. package/dist/esm/{show-kIsXcWiR.js.map → show-CoTEBp0b.js.map} +1 -1
  31. package/dist/esm/{slot-HtgJHjB9.js → slot-BqX64R24.js} +4 -4
  32. package/dist/esm/{slot-HtgJHjB9.js.map → slot-BqX64R24.js.map} +1 -1
  33. package/dist/esm/ui/card/index.d.ts +9 -9
  34. package/dist/esm/ui/card/index.js +3 -3
  35. package/dist/esm/ui/carousel/index.d.ts +10 -10
  36. package/dist/esm/ui/carousel/index.js +7 -7
  37. package/dist/esm/ui/carousel/index.js.map +1 -1
  38. package/dist/esm/ui/drag-scroll/index.d.ts +8 -8
  39. package/dist/esm/ui/drag-scroll/index.js +3 -3
  40. package/dist/esm/ui/drop-zone/index.d.ts +28 -28
  41. package/dist/esm/ui/drop-zone/index.js +14 -16
  42. package/dist/esm/ui/drop-zone/index.js.map +1 -1
  43. package/dist/esm/ui/form/index.d.ts +39 -39
  44. package/dist/esm/ui/form/index.js +6 -6
  45. package/dist/style.css +1 -1
  46. package/package.json +10 -10
@@ -10,4 +10,4 @@ var __export = (all) => {
10
10
  };
11
11
 
12
12
  //#endregion
13
- export { __export };
13
+ export { __export as t };
@@ -4,5 +4,5 @@ import { twMerge } from "tailwind-merge";
4
4
  const cnMerge = (...classNames) => twMerge(classNames);
5
5
 
6
6
  //#endregion
7
- export { cnMerge };
8
- //# sourceMappingURL=cn-DdD3uYxA.js.map
7
+ export { cnMerge as t };
8
+ //# sourceMappingURL=cn-BFKOHS_9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cn-DdD3uYxA.js","names":[],"sources":["../../src/lib/utils/cn.ts"],"sourcesContent":["import { type ClassNameValue, twMerge } from \"tailwind-merge\";\n\nexport const cnMerge = (...classNames: ClassNameValue[]) => twMerge(classNames);\n"],"mappings":";;;AAEA,MAAa,WAAW,GAAG,eAAiC,QAAQ,WAAW"}
1
+ {"version":3,"file":"cn-BFKOHS_9.js","names":[],"sources":["../../src/lib/utils/cn.ts"],"sourcesContent":["import { type ClassNameValue, twMerge } from \"tailwind-merge\";\n\nexport const cnMerge = (...classNames: ClassNameValue[]) => twMerge(classNames);\n"],"mappings":";;;AAEA,MAAa,WAAW,GAAG,eAAiC,QAAQ,WAAW"}
@@ -1,22 +1,22 @@
1
- import { ErrorBoundaryProps } from "../../index-CfndCNl3.js";
2
- import { SuspenseWithBoundaryProps } from "../../index-wZII15Ra.js";
3
- import * as React from "react";
1
+ import { a as ErrorBoundaryProps } from "../../index-MF2B98KG.js";
2
+ import { n as SuspenseWithBoundaryProps } from "../../index-C_MEUq8L.js";
4
3
  import { GetSlotComponentProps } from "@zayne-labs/toolkit-react/utils";
5
- import * as react_jsx_runtime31 from "react/jsx-runtime";
4
+ import * as React from "react";
5
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/common/await/await.d.ts
8
- type RenderPropFn<TValue$1> = (result: TValue$1) => React.ReactNode;
9
- type ChildrenType<TValue$1> = React.ReactNode | RenderPropFn<TValue$1>;
10
- type AwaitRootProps<TValue$1> = Pick<SuspenseWithBoundaryProps, "errorFallback" | "fallback"> & {
8
+ type RenderPropFn<TValue> = (result: TValue) => React.ReactNode;
9
+ type ChildrenType<TValue> = React.ReactNode | RenderPropFn<TValue>;
10
+ type AwaitRootProps<TValue> = Pick<SuspenseWithBoundaryProps, "errorFallback" | "fallback"> & {
11
11
  asChild?: boolean;
12
- children: ChildrenType<TValue$1>;
13
- promise: Promise<TValue$1>;
12
+ children: ChildrenType<TValue>;
13
+ promise: Promise<TValue>;
14
14
  withErrorBoundary?: boolean;
15
15
  withSuspense?: boolean;
16
16
  };
17
- declare function AwaitRoot<TValue$1>(props: AwaitRootProps<TValue$1>): react_jsx_runtime31.JSX.Element;
18
- type AwaitSuccessProps<TValue$1 = unknown> = GetSlotComponentProps<"default", ChildrenType<TValue$1>>;
19
- declare function AwaitSuccess<TPromiseOrValue, TValue$1 = Awaited<TPromiseOrValue>>(props: Pick<AwaitSuccessProps<TValue$1>, "children">): React.ReactNode;
17
+ declare function AwaitRoot<TValue>(props: AwaitRootProps<TValue>): react_jsx_runtime11.JSX.Element;
18
+ type AwaitSuccessProps<TValue = unknown> = GetSlotComponentProps<"default", ChildrenType<TValue>>;
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"> & {
@@ -33,9 +33,9 @@ declare const AwaitPending: {
33
33
  };
34
34
  //#endregion
35
35
  //#region src/components/common/await/await-context.d.ts
36
- type AwaitContextType<TValue$1 = unknown> = {
37
- promise: Promise<TValue$1>;
38
- result: TValue$1;
36
+ type AwaitContextType<TValue = unknown> = {
37
+ promise: Promise<TValue>;
38
+ result: TValue;
39
39
  };
40
40
  declare const useAwaitContext: <TValue>() => AwaitContextType<TValue>;
41
41
  declare namespace await_parts_d_exports {
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { __export } from "../../chunk-CTAAG5j7.js";
5
- import { ErrorBoundary, useErrorBoundaryContext } from "../../error-boundary-6VGflFQ9.js";
6
- import { SlotRoot } from "../../slot-HtgJHjB9.js";
7
- import { createCustomContext } from "@zayne-labs/toolkit-react";
4
+ import { t as __export } from "../../chunk-Bp6m_JJh.js";
5
+ import { n as ErrorBoundary, r as useErrorBoundaryContext } from "../../error-boundary-BwGXKuLC.js";
6
+ import { n as SlotRoot } from "../../slot-BqX64R24.js";
7
+ import { getSlotMap, withSlotNameAndSymbol } from "@zayne-labs/toolkit-react/utils";
8
8
  import { isFunction } from "@zayne-labs/toolkit-type-helpers";
9
9
  import { Fragment, Suspense, use, useMemo } from "react";
10
- import { getSlotMap, withSlotNameAndSymbol } from "@zayne-labs/toolkit-react/utils";
10
+ import { createCustomContext } from "@zayne-labs/toolkit-react";
11
11
  import { jsx } from "react/jsx-runtime";
12
12
 
13
13
  //#region src/components/common/await/await-context.ts
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { useIsHydrated } from "@zayne-labs/toolkit-react";
5
4
  import { isFunction } from "@zayne-labs/toolkit-type-helpers";
6
5
  import "react";
6
+ import { useIsHydrated } from "@zayne-labs/toolkit-react";
7
7
 
8
8
  //#region src/components/common/client-gate/client-gate.tsx
9
9
  /**
@@ -1,2 +1,2 @@
1
- import { ErrorBoundary, ErrorBoundaryContextType, ErrorBoundaryProps, FallbackProps, useErrorBoundary, useErrorBoundaryContext } from "../../index-CfndCNl3.js";
1
+ import { a as ErrorBoundaryProps, i as ErrorBoundary, n as ErrorBoundaryContextType, o as FallbackProps, r as useErrorBoundaryContext, t as useErrorBoundary } from "../../index-MF2B98KG.js";
2
2
  export { ErrorBoundary, ErrorBoundaryContextType, ErrorBoundaryProps, FallbackProps, useErrorBoundary, useErrorBoundaryContext };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { ErrorBoundary, useErrorBoundary, useErrorBoundaryContext } from "../../error-boundary-6VGflFQ9.js";
4
+ import { n as ErrorBoundary, r as useErrorBoundaryContext, t as useErrorBoundary } from "../../error-boundary-BwGXKuLC.js";
5
5
 
6
6
  export { ErrorBoundary, useErrorBoundary, useErrorBoundaryContext };
@@ -1,7 +1,7 @@
1
+ import { DiscriminatedRenderItemProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
1
2
  import { Prettify } from "@zayne-labs/toolkit-type-helpers";
2
3
  import * as React from "react";
3
- import { DiscriminatedRenderItemProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/common/for/for.d.ts
7
7
  type ArrayOrNumber = number | readonly unknown[];
@@ -15,10 +15,10 @@ type ForProps<TArray extends ArrayOrNumber> = Prettify<{
15
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
  declare function ForWithWrapper<const TArray extends ArrayOrNumber, TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, ForProps<TArray>> & {
17
17
  displayFallBackWhenEmpty?: boolean;
18
- }): string | number | bigint | boolean | react_jsx_runtime0.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
18
+ }): string | number | bigint | boolean | react_jsx_runtime9.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
19
19
  //#endregion
20
20
  //#region src/components/common/for/getElementList.d.ts
21
- type GetElementListResult<TVariant$1 extends "base" | "withWrapper"> = TVariant$1 extends "base" ? [typeof For] : [typeof ForWithWrapper];
21
+ type GetElementListResult<TVariant extends "base" | "withWrapper"> = TVariant extends "base" ? [typeof For] : [typeof ForWithWrapper];
22
22
  declare const getElementList: <TVariant extends "base" | "withWrapper" = "withWrapper">(variant?: TVariant) => GetElementListResult<TVariant>;
23
23
  //#endregion
24
24
  export { For, ForRenderProps, ForWithWrapper, getElementList };
@@ -1,3 +1,3 @@
1
- import { For, ForWithWrapper, getElementList } from "../../for-x0-1kO5w.js";
1
+ import { n as For, r as ForWithWrapper, t as getElementList } from "../../for-CzHe2tKt.js";
2
2
 
3
3
  export { For, ForWithWrapper, getElementList };
@@ -1,6 +1,6 @@
1
- import * as React$1 from "react";
2
1
  import { InferProps } from "@zayne-labs/toolkit-react/utils";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as React$1 from "react";
3
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/common/presence/use-presence.d.ts
6
6
  type UsePresenceOptions = {
@@ -31,7 +31,7 @@ type PresenceProps = UsePresenceOptions & {
31
31
  className?: string;
32
32
  forceMount?: boolean;
33
33
  };
34
- declare function Presence(props: PresenceProps): react_jsx_runtime0.JSX.Element | null;
34
+ declare function Presence(props: PresenceProps): react_jsx_runtime8.JSX.Element | null;
35
35
  //#endregion
36
36
  export { Presence };
37
37
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import "../../slot-HtgJHjB9.js";
5
- import { Presence } from "../../presence-Bj-YnaHv.js";
4
+ import "../../slot-BqX64R24.js";
5
+ import { t as Presence } from "../../presence-D1o4HPFU.js";
6
6
 
7
7
  export { Presence };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { ShowContent, ShowFallback, ShowRoot, show_parts_exports } from "../../show-kIsXcWiR.js";
4
+ import { i as ShowRoot, n as ShowContent, r as ShowFallback, t as show_parts_exports } from "../../show-CoTEBp0b.js";
5
5
 
6
6
  export { show_parts_exports as Show, ShowContent, ShowFallback, ShowRoot };
@@ -1,12 +1,12 @@
1
- import * as React from "react";
2
1
  import { InferProps } from "@zayne-labs/toolkit-react/utils";
3
- import * as react_jsx_runtime23 from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as react_jsx_runtime7 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_runtime23.JSX.Element | null;
9
+ declare function SlotRoot(props: SlotProps): react_jsx_runtime7.JSX.Element | null;
10
10
  declare function SlotSlottable({
11
11
  children
12
12
  }: Pick<SlotProps, "children">): React.ReactNode;
@@ -1,3 +1,3 @@
1
- import { SlotRoot, SlotSlottable, slot_parts_exports } from "../../slot-HtgJHjB9.js";
1
+ import { n as SlotRoot, r as SlotSlottable, t as slot_parts_exports } from "../../slot-BqX64R24.js";
2
2
 
3
3
  export { slot_parts_exports as Slot, SlotRoot, SlotSlottable };
@@ -1,3 +1,3 @@
1
- import "../../index-CfndCNl3.js";
2
- import { SuspenseWithBoundary, SuspenseWithBoundaryProps } from "../../index-wZII15Ra.js";
1
+ import "../../index-MF2B98KG.js";
2
+ import { n as SuspenseWithBoundaryProps, t as SuspenseWithBoundary } from "../../index-C_MEUq8L.js";
3
3
  export { SuspenseWithBoundary, SuspenseWithBoundaryProps };
@@ -1,4 +1,4 @@
1
- import { ErrorBoundary } from "../../error-boundary-6VGflFQ9.js";
1
+ import { n as ErrorBoundary } from "../../error-boundary-BwGXKuLC.js";
2
2
  import { Suspense } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
 
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { __export } from "../../chunk-CTAAG5j7.js";
4
+ import { t as __export } from "../../chunk-Bp6m_JJh.js";
5
+ import { getRegularChildren, getSingleSlot } from "@zayne-labs/toolkit-react/utils";
5
6
  import { isFunction } from "@zayne-labs/toolkit-type-helpers";
6
7
  import "react";
7
- import { getRegularChildren, getSingleSlot } from "@zayne-labs/toolkit-react/utils";
8
8
 
9
9
  //#region src/components/common/switch/switch.tsx
10
10
  const defaultValueSymbol = Symbol("default-value");
@@ -1,5 +1,5 @@
1
1
  import { isString } from "@zayne-labs/toolkit-type-helpers";
2
- import { useEffectEvent, useInsertionEffect, useState } from "react";
2
+ import { useEffectEvent, useLayoutEffect, useState } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
 
5
5
  //#region src/components/common/teleport/teleport.tsx
@@ -9,13 +9,13 @@ function Teleport(props) {
9
9
  const updatePortalContainer = useEffectEvent((destination) => {
10
10
  setPortalContainer(destination);
11
11
  });
12
- useInsertionEffect(() => {
12
+ useLayoutEffect(() => {
13
13
  if (!to) return;
14
14
  if (insertPosition) return;
15
15
  const destination = isString(to) ? document.querySelector(to) : to;
16
16
  destination && updatePortalContainer(destination);
17
17
  }, [to, insertPosition]);
18
- useInsertionEffect(() => {
18
+ useLayoutEffect(() => {
19
19
  if (!to) return;
20
20
  if (!insertPosition) return;
21
21
  const destination = isString(to) ? document.querySelector(to) : to;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/common/teleport/teleport.tsx"],"sourcesContent":["\"use client\";\n\nimport { type AnyString, isString } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\nimport { useEffectEvent, useInsertionEffect, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\n\ntype ValidHtmlTags = keyof HTMLElementTagNameMap;\n\ntype PortalProps = {\n\tchildren: React.ReactNode;\n\tinsertPosition?: InsertPosition;\n\tto: AnyString | HTMLElement | ValidHtmlTags | null;\n};\n\nfunction Teleport(props: PortalProps) {\n\tconst { children, insertPosition, to } = props;\n\n\tconst [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n\n\tconst updatePortalContainer = useEffectEvent((destination: HTMLElement | null) => {\n\t\tsetPortalContainer(destination);\n\t});\n\n\tuseInsertionEffect(() => {\n\t\tif (!to) return;\n\n\t\tif (insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tdestination && updatePortalContainer(destination);\n\t}, [to, insertPosition]);\n\n\tuseInsertionEffect(() => {\n\t\tif (!to) return;\n\n\t\tif (!insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tconst tempWrapper = document.createElement(\"div\");\n\t\ttempWrapper.style.display = \"contents\";\n\n\t\tdestination?.insertAdjacentElement(insertPosition, tempWrapper);\n\n\t\tupdatePortalContainer(tempWrapper);\n\n\t\treturn () => {\n\t\t\ttempWrapper.remove();\n\t\t};\n\t}, [to, insertPosition]);\n\n\treturn portalContainer && createPortal(children, portalContainer);\n}\n\nexport { Teleport };\n"],"mappings":";;;;;AAeA,SAAS,SAAS,OAAoB;CACrC,MAAM,EAAE,UAAU,gBAAgB,OAAO;CAEzC,MAAM,CAAC,iBAAiB,sBAAsB,SAA6B,KAAK;CAEhF,MAAM,wBAAwB,gBAAgB,gBAAoC;AACjF,qBAAmB,YAAY;GAC9B;AAEF,0BAAyB;AACxB,MAAI,CAAC,GAAI;AAET,MAAI,eAAgB;EAEpB,MAAM,cAAc,SAAS,GAAG,GAAG,SAAS,cAA2B,GAAG,GAAG;AAE7E,iBAAe,sBAAsB,YAAY;IAC/C,CAAC,IAAI,eAAe,CAAC;AAExB,0BAAyB;AACxB,MAAI,CAAC,GAAI;AAET,MAAI,CAAC,eAAgB;EAErB,MAAM,cAAc,SAAS,GAAG,GAAG,SAAS,cAA2B,GAAG,GAAG;EAE7E,MAAM,cAAc,SAAS,cAAc,MAAM;AACjD,cAAY,MAAM,UAAU;AAE5B,eAAa,sBAAsB,gBAAgB,YAAY;AAE/D,wBAAsB,YAAY;AAElC,eAAa;AACZ,eAAY,QAAQ;;IAEnB,CAAC,IAAI,eAAe,CAAC;AAExB,QAAO,mBAAmB,aAAa,UAAU,gBAAgB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/common/teleport/teleport.tsx"],"sourcesContent":["\"use client\";\n\nimport { type AnyString, isString } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\nimport { useEffectEvent, useLayoutEffect, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\n\ntype ValidHtmlTags = keyof HTMLElementTagNameMap;\n\ntype PortalProps = {\n\tchildren: React.ReactNode;\n\tinsertPosition?: InsertPosition;\n\tto: AnyString | HTMLElement | ValidHtmlTags | null;\n};\n\nfunction Teleport(props: PortalProps) {\n\tconst { children, insertPosition, to } = props;\n\n\tconst [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n\n\tconst updatePortalContainer = useEffectEvent((destination: HTMLElement | null) => {\n\t\tsetPortalContainer(destination);\n\t});\n\n\tuseLayoutEffect(() => {\n\t\tif (!to) return;\n\n\t\tif (insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tdestination && updatePortalContainer(destination);\n\t}, [to, insertPosition]);\n\n\tuseLayoutEffect(() => {\n\t\tif (!to) return;\n\n\t\tif (!insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tconst tempWrapper = document.createElement(\"div\");\n\t\ttempWrapper.style.display = \"contents\";\n\n\t\tdestination?.insertAdjacentElement(insertPosition, tempWrapper);\n\n\t\tupdatePortalContainer(tempWrapper);\n\n\t\treturn () => {\n\t\t\ttempWrapper.remove();\n\t\t};\n\t}, [to, insertPosition]);\n\n\treturn portalContainer && createPortal(children, portalContainer);\n}\n\nexport { Teleport };\n"],"mappings":";;;;;AAeA,SAAS,SAAS,OAAoB;CACrC,MAAM,EAAE,UAAU,gBAAgB,OAAO;CAEzC,MAAM,CAAC,iBAAiB,sBAAsB,SAA6B,KAAK;CAEhF,MAAM,wBAAwB,gBAAgB,gBAAoC;AACjF,qBAAmB,YAAY;GAC9B;AAEF,uBAAsB;AACrB,MAAI,CAAC,GAAI;AAET,MAAI,eAAgB;EAEpB,MAAM,cAAc,SAAS,GAAG,GAAG,SAAS,cAA2B,GAAG,GAAG;AAE7E,iBAAe,sBAAsB,YAAY;IAC/C,CAAC,IAAI,eAAe,CAAC;AAExB,uBAAsB;AACrB,MAAI,CAAC,GAAI;AAET,MAAI,CAAC,eAAgB;EAErB,MAAM,cAAc,SAAS,GAAG,GAAG,SAAS,cAA2B,GAAG,GAAG;EAE7E,MAAM,cAAc,SAAS,cAAc,MAAM;AACjD,cAAY,MAAM,UAAU;AAE5B,eAAa,sBAAsB,gBAAgB,YAAY;AAE/D,wBAAsB,YAAY;AAElC,eAAa;AACZ,eAAY,QAAQ;;IAEnB,CAAC,IAAI,eAAe,CAAC;AAExB,QAAO,mBAAmB,aAAa,UAAU,gBAAgB"}
@@ -1,6 +1,6 @@
1
- import { createCustomContext, useCallbackRef } from "@zayne-labs/toolkit-react";
2
1
  import { isFunction } from "@zayne-labs/toolkit-type-helpers";
3
2
  import { Component, useState } from "react";
3
+ import { createCustomContext, useCallbackRef } from "@zayne-labs/toolkit-react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/common/error-boundary/error-boundary-context.ts
@@ -116,5 +116,5 @@ const useErrorBoundary = () => {
116
116
  };
117
117
 
118
118
  //#endregion
119
- export { ErrorBoundary, useErrorBoundary, useErrorBoundaryContext };
120
- //# sourceMappingURL=error-boundary-6VGflFQ9.js.map
119
+ export { ErrorBoundary as n, useErrorBoundaryContext as r, useErrorBoundary as t };
120
+ //# sourceMappingURL=error-boundary-BwGXKuLC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-boundary-6VGflFQ9.js","names":["initialState: ErrorBoundaryState","#resetErrorBoundary"],"sources":["../../src/components/common/error-boundary/error-boundary-context.ts","../../src/components/common/error-boundary/error-boundary.tsx","../../src/components/common/error-boundary/useErrorBoundary.ts"],"sourcesContent":["import { createCustomContext } from \"@zayne-labs/toolkit-react\";\n\nexport type ErrorBoundaryContextType = {\n\terror: unknown;\n\thasError: boolean;\n\tresetErrorBoundary: (...args: unknown[]) => void;\n};\n\nconst [ErrorBoundaryContext, useErrorBoundaryContext] = createCustomContext<ErrorBoundaryContextType>({\n\thookName: \"useErrorBoundaryContext\",\n\tname: \"ErrorBoundaryContext\",\n\tproviderName: \"ErrorBoundaryContextProvider\",\n});\n\nexport { ErrorBoundaryContext, useErrorBoundaryContext };\n","import { isFunction } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\nimport { Component } from \"react\";\nimport { ErrorBoundaryContext, type ErrorBoundaryContextType } from \"./error-boundary-context\";\nimport type { ErrorBoundaryProps, FallbackProps } from \"./types\";\n\ntype ErrorBoundaryState =\n\t| {\n\t\t\terror: Error;\n\t\t\thasError: true;\n\t }\n\t| {\n\t\t\terror: null;\n\t\t\thasError: false;\n\t };\n\nconst initialState: ErrorBoundaryState = {\n\terror: null,\n\thasError: false,\n};\n\nconst hasArrayChanged = (arrayOne: unknown[] = [], arrayTwo: unknown[] = []) => {\n\treturn (\n\t\tarrayOne.length !== arrayTwo.length\n\t\t|| arrayOne.some((item, index) => !Object.is(item, arrayTwo[index]))\n\t);\n};\n\n/**\n * Copied from react-error-boundary package\n * @see https://github.com/bvaughn/react-error-boundary\n */\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n\tconstructor(props: ErrorBoundaryProps) {\n\t\tsuper(props);\n\n\t\tthis.state = initialState;\n\t}\n\n\tstatic getDerivedStateFromError(error: Error) {\n\t\treturn { error, hasError: true };\n\t}\n\n\toverride componentDidCatch(error: Error, info: React.ErrorInfo) {\n\t\tthis.props.onError?.({ error, info });\n\t}\n\n\toverride componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState) {\n\t\tconst { hasError } = this.state;\n\t\tconst { resetKeys } = this.props;\n\n\t\t// == There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array, we'd end up resetting the error boundary immediately.\n\t\t// == This would likely trigger a second error to be thrown.\n\t\t// == So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n\t\tif (hasError && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n\t\t\tthis.props.onReset?.({\n\t\t\t\tnext: resetKeys,\n\t\t\t\tprev: prevProps.resetKeys,\n\t\t\t\treason: \"keys\",\n\t\t\t});\n\n\t\t\tthis.setState(initialState);\n\t\t}\n\t}\n\n\toverride render() {\n\t\tconst { children, fallback } = this.props;\n\t\tconst { error, hasError } = this.state;\n\n\t\tlet childToRender = children;\n\n\t\tif (hasError) {\n\t\t\tswitch (true) {\n\t\t\t\tcase isFunction(fallback): {\n\t\t\t\t\tconst fallbackRenderProps = {\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tresetErrorBoundary: this.#resetErrorBoundary,\n\t\t\t\t\t} satisfies FallbackProps;\n\n\t\t\t\t\tchildToRender = fallback(fallbackRenderProps);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase Boolean(fallback): {\n\t\t\t\t\tchildToRender = fallback;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault: {\n\t\t\t\t\tconsole.warn(\"No fallback provided to error boundary\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst contextValue = {\n\t\t\terror,\n\t\t\thasError,\n\t\t\tresetErrorBoundary: this.#resetErrorBoundary,\n\t\t} satisfies ErrorBoundaryContextType;\n\n\t\treturn <ErrorBoundaryContext value={contextValue}>{childToRender}</ErrorBoundaryContext>;\n\t}\n\n\t#resetErrorBoundary = (...parameters: unknown[]) => {\n\t\tconst { error } = this.state;\n\n\t\tif (error !== null) {\n\t\t\tthis.props.onReset?.({\n\t\t\t\targs: parameters,\n\t\t\t\treason: \"imperative-api\",\n\t\t\t});\n\n\t\t\tthis.setState(initialState);\n\t\t}\n\t};\n}\n","import { useCallbackRef } from \"@zayne-labs/toolkit-react\";\nimport { useState } from \"react\";\nimport { useErrorBoundaryContext } from \"./error-boundary-context\";\n\ntype UseErrorBoundaryState<TError extends Error> =\n\t| {\n\t\t\terror: null;\n\t\t\thasError: false;\n\t }\n\t| {\n\t\t\terror: TError;\n\t\t\thasError: true;\n\t };\n\nexport const useErrorBoundary = <TError extends Error>() => {\n\tconst { resetErrorBoundary } = useErrorBoundaryContext();\n\n\tconst [state, setState] = useState<UseErrorBoundaryState<TError>>({\n\t\terror: null,\n\t\thasError: false,\n\t});\n\n\tif (state.hasError) {\n\t\tthrow state.error;\n\t}\n\n\tconst resetBoundary = useCallbackRef(() => {\n\t\tresetErrorBoundary();\n\n\t\tsetState({\n\t\t\terror: null,\n\t\t\thasError: false,\n\t\t});\n\t});\n\n\tconst showBoundary = useCallbackRef((error: TError) => {\n\t\tsetState({\n\t\t\terror,\n\t\t\thasError: true,\n\t\t});\n\t});\n\n\treturn { resetBoundary, showBoundary };\n};\n"],"mappings":";;;;;;AAQA,MAAM,CAAC,sBAAsB,2BAA2B,oBAA8C;CACrG,UAAU;CACV,MAAM;CACN,cAAc;CACd,CAAC;;;;ACIF,MAAMA,eAAmC;CACxC,OAAO;CACP,UAAU;CACV;AAED,MAAM,mBAAmB,WAAsB,EAAE,EAAE,WAAsB,EAAE,KAAK;AAC/E,QACC,SAAS,WAAW,SAAS,UAC1B,SAAS,MAAM,MAAM,UAAU,CAAC,OAAO,GAAG,MAAM,SAAS,OAAO,CAAC;;;;;;AAStE,IAAa,gBAAb,cAAmC,UAAkD;CACpF,YAAY,OAA2B;AACtC,QAAM,MAAM;AAEZ,OAAK,QAAQ;;CAGd,OAAO,yBAAyB,OAAc;AAC7C,SAAO;GAAE;GAAO,UAAU;GAAM;;CAGjC,AAAS,kBAAkB,OAAc,MAAuB;AAC/D,OAAK,MAAM,UAAU;GAAE;GAAO;GAAM,CAAC;;CAGtC,AAAS,mBAAmB,WAA+B,WAA+B;EACzF,MAAM,EAAE,aAAa,KAAK;EAC1B,MAAM,EAAE,cAAc,KAAK;AAM3B,MAAI,YAAY,UAAU,UAAU,QAAQ,gBAAgB,UAAU,WAAW,UAAU,EAAE;AAC5F,QAAK,MAAM,UAAU;IACpB,MAAM;IACN,MAAM,UAAU;IAChB,QAAQ;IACR,CAAC;AAEF,QAAK,SAAS,aAAa;;;CAI7B,AAAS,SAAS;EACjB,MAAM,EAAE,UAAU,aAAa,KAAK;EACpC,MAAM,EAAE,OAAO,aAAa,KAAK;EAEjC,IAAI,gBAAgB;AAEpB,MAAI,SACH,SAAQ,MAAR;GACC,KAAK,WAAW,SAAS;AAMxB,oBAAgB,SALY;KAC3B;KACA,oBAAoB,MAAKC;KACzB,CAE4C;AAC7C;GAGD,KAAK,QAAQ,SAAS;AACrB,oBAAgB;AAChB;GAGD,QACC,SAAQ,KAAK,yCAAyC;;AAWzD,SAAO,oBAAC;GAAqB,OANR;IACpB;IACA;IACA,oBAAoB,MAAKA;IACzB;aAEkD;IAAqC;;CAGzF,uBAAuB,GAAG,eAA0B;EACnD,MAAM,EAAE,UAAU,KAAK;AAEvB,MAAI,UAAU,MAAM;AACnB,QAAK,MAAM,UAAU;IACpB,MAAM;IACN,QAAQ;IACR,CAAC;AAEF,QAAK,SAAS,aAAa;;;;;;;ACpG9B,MAAa,yBAA+C;CAC3D,MAAM,EAAE,uBAAuB,yBAAyB;CAExD,MAAM,CAAC,OAAO,YAAY,SAAwC;EACjE,OAAO;EACP,UAAU;EACV,CAAC;AAEF,KAAI,MAAM,SACT,OAAM,MAAM;AAmBb,QAAO;EAAE,eAhBa,qBAAqB;AAC1C,uBAAoB;AAEpB,YAAS;IACR,OAAO;IACP,UAAU;IACV,CAAC;IACD;EASsB,cAPH,gBAAgB,UAAkB;AACtD,YAAS;IACR;IACA,UAAU;IACV,CAAC;IACD;EAEoC"}
1
+ {"version":3,"file":"error-boundary-BwGXKuLC.js","names":["initialState: ErrorBoundaryState","#resetErrorBoundary"],"sources":["../../src/components/common/error-boundary/error-boundary-context.ts","../../src/components/common/error-boundary/error-boundary.tsx","../../src/components/common/error-boundary/useErrorBoundary.ts"],"sourcesContent":["import { createCustomContext } from \"@zayne-labs/toolkit-react\";\n\nexport type ErrorBoundaryContextType = {\n\terror: unknown;\n\thasError: boolean;\n\tresetErrorBoundary: (...args: unknown[]) => void;\n};\n\nconst [ErrorBoundaryContext, useErrorBoundaryContext] = createCustomContext<ErrorBoundaryContextType>({\n\thookName: \"useErrorBoundaryContext\",\n\tname: \"ErrorBoundaryContext\",\n\tproviderName: \"ErrorBoundaryContextProvider\",\n});\n\nexport { ErrorBoundaryContext, useErrorBoundaryContext };\n","import { isFunction } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\nimport { Component } from \"react\";\nimport { ErrorBoundaryContext, type ErrorBoundaryContextType } from \"./error-boundary-context\";\nimport type { ErrorBoundaryProps, FallbackProps } from \"./types\";\n\ntype ErrorBoundaryState =\n\t| {\n\t\t\terror: Error;\n\t\t\thasError: true;\n\t }\n\t| {\n\t\t\terror: null;\n\t\t\thasError: false;\n\t };\n\nconst initialState: ErrorBoundaryState = {\n\terror: null,\n\thasError: false,\n};\n\nconst hasArrayChanged = (arrayOne: unknown[] = [], arrayTwo: unknown[] = []) => {\n\treturn (\n\t\tarrayOne.length !== arrayTwo.length\n\t\t|| arrayOne.some((item, index) => !Object.is(item, arrayTwo[index]))\n\t);\n};\n\n/**\n * Copied from react-error-boundary package\n * @see https://github.com/bvaughn/react-error-boundary\n */\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n\tconstructor(props: ErrorBoundaryProps) {\n\t\tsuper(props);\n\n\t\tthis.state = initialState;\n\t}\n\n\tstatic getDerivedStateFromError(error: Error) {\n\t\treturn { error, hasError: true };\n\t}\n\n\toverride componentDidCatch(error: Error, info: React.ErrorInfo) {\n\t\tthis.props.onError?.({ error, info });\n\t}\n\n\toverride componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState) {\n\t\tconst { hasError } = this.state;\n\t\tconst { resetKeys } = this.props;\n\n\t\t// == There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array, we'd end up resetting the error boundary immediately.\n\t\t// == This would likely trigger a second error to be thrown.\n\t\t// == So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n\t\tif (hasError && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n\t\t\tthis.props.onReset?.({\n\t\t\t\tnext: resetKeys,\n\t\t\t\tprev: prevProps.resetKeys,\n\t\t\t\treason: \"keys\",\n\t\t\t});\n\n\t\t\tthis.setState(initialState);\n\t\t}\n\t}\n\n\toverride render() {\n\t\tconst { children, fallback } = this.props;\n\t\tconst { error, hasError } = this.state;\n\n\t\tlet childToRender = children;\n\n\t\tif (hasError) {\n\t\t\tswitch (true) {\n\t\t\t\tcase isFunction(fallback): {\n\t\t\t\t\tconst fallbackRenderProps = {\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tresetErrorBoundary: this.#resetErrorBoundary,\n\t\t\t\t\t} satisfies FallbackProps;\n\n\t\t\t\t\tchildToRender = fallback(fallbackRenderProps);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase Boolean(fallback): {\n\t\t\t\t\tchildToRender = fallback;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault: {\n\t\t\t\t\tconsole.warn(\"No fallback provided to error boundary\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst contextValue = {\n\t\t\terror,\n\t\t\thasError,\n\t\t\tresetErrorBoundary: this.#resetErrorBoundary,\n\t\t} satisfies ErrorBoundaryContextType;\n\n\t\treturn <ErrorBoundaryContext value={contextValue}>{childToRender}</ErrorBoundaryContext>;\n\t}\n\n\t#resetErrorBoundary = (...parameters: unknown[]) => {\n\t\tconst { error } = this.state;\n\n\t\tif (error !== null) {\n\t\t\tthis.props.onReset?.({\n\t\t\t\targs: parameters,\n\t\t\t\treason: \"imperative-api\",\n\t\t\t});\n\n\t\t\tthis.setState(initialState);\n\t\t}\n\t};\n}\n","import { useCallbackRef } from \"@zayne-labs/toolkit-react\";\nimport { useState } from \"react\";\nimport { useErrorBoundaryContext } from \"./error-boundary-context\";\n\ntype UseErrorBoundaryState<TError extends Error> =\n\t| {\n\t\t\terror: null;\n\t\t\thasError: false;\n\t }\n\t| {\n\t\t\terror: TError;\n\t\t\thasError: true;\n\t };\n\nexport const useErrorBoundary = <TError extends Error>() => {\n\tconst { resetErrorBoundary } = useErrorBoundaryContext();\n\n\tconst [state, setState] = useState<UseErrorBoundaryState<TError>>({\n\t\terror: null,\n\t\thasError: false,\n\t});\n\n\tif (state.hasError) {\n\t\tthrow state.error;\n\t}\n\n\tconst resetBoundary = useCallbackRef(() => {\n\t\tresetErrorBoundary();\n\n\t\tsetState({\n\t\t\terror: null,\n\t\t\thasError: false,\n\t\t});\n\t});\n\n\tconst showBoundary = useCallbackRef((error: TError) => {\n\t\tsetState({\n\t\t\terror,\n\t\t\thasError: true,\n\t\t});\n\t});\n\n\treturn { resetBoundary, showBoundary };\n};\n"],"mappings":";;;;;;AAQA,MAAM,CAAC,sBAAsB,2BAA2B,oBAA8C;CACrG,UAAU;CACV,MAAM;CACN,cAAc;CACd,CAAC;;;;ACIF,MAAMA,eAAmC;CACxC,OAAO;CACP,UAAU;CACV;AAED,MAAM,mBAAmB,WAAsB,EAAE,EAAE,WAAsB,EAAE,KAAK;AAC/E,QACC,SAAS,WAAW,SAAS,UAC1B,SAAS,MAAM,MAAM,UAAU,CAAC,OAAO,GAAG,MAAM,SAAS,OAAO,CAAC;;;;;;AAStE,IAAa,gBAAb,cAAmC,UAAkD;CACpF,YAAY,OAA2B;AACtC,QAAM,MAAM;AAEZ,OAAK,QAAQ;;CAGd,OAAO,yBAAyB,OAAc;AAC7C,SAAO;GAAE;GAAO,UAAU;GAAM;;CAGjC,AAAS,kBAAkB,OAAc,MAAuB;AAC/D,OAAK,MAAM,UAAU;GAAE;GAAO;GAAM,CAAC;;CAGtC,AAAS,mBAAmB,WAA+B,WAA+B;EACzF,MAAM,EAAE,aAAa,KAAK;EAC1B,MAAM,EAAE,cAAc,KAAK;AAM3B,MAAI,YAAY,UAAU,UAAU,QAAQ,gBAAgB,UAAU,WAAW,UAAU,EAAE;AAC5F,QAAK,MAAM,UAAU;IACpB,MAAM;IACN,MAAM,UAAU;IAChB,QAAQ;IACR,CAAC;AAEF,QAAK,SAAS,aAAa;;;CAI7B,AAAS,SAAS;EACjB,MAAM,EAAE,UAAU,aAAa,KAAK;EACpC,MAAM,EAAE,OAAO,aAAa,KAAK;EAEjC,IAAI,gBAAgB;AAEpB,MAAI,SACH,SAAQ,MAAR;GACC,KAAK,WAAW,SAAS;AAMxB,oBAAgB,SALY;KAC3B;KACA,oBAAoB,MAAKC;KACzB,CAE4C;AAC7C;GAGD,KAAK,QAAQ,SAAS;AACrB,oBAAgB;AAChB;GAGD,QACC,SAAQ,KAAK,yCAAyC;;AAWzD,SAAO,oBAAC;GAAqB,OANR;IACpB;IACA;IACA,oBAAoB,MAAKA;IACzB;aAEkD;IAAqC;;CAGzF,uBAAuB,GAAG,eAA0B;EACnD,MAAM,EAAE,UAAU,KAAK;AAEvB,MAAI,UAAU,MAAM;AACnB,QAAK,MAAM,UAAU;IACpB,MAAM;IACN,QAAQ;IACR,CAAC;AAEF,QAAK,SAAS,aAAa;;;;;;;ACpG9B,MAAa,yBAA+C;CAC3D,MAAM,EAAE,uBAAuB,yBAAyB;CAExD,MAAM,CAAC,OAAO,YAAY,SAAwC;EACjE,OAAO;EACP,UAAU;EACV,CAAC;AAEF,KAAI,MAAM,SACT,OAAM,MAAM;AAmBb,QAAO;EAAE,eAhBa,qBAAqB;AAC1C,uBAAoB;AAEpB,YAAS;IACR,OAAO;IACP,UAAU;IACV,CAAC;IACD;EASsB,cAPH,gBAAgB,UAAkB;AACtD,YAAS;IACR;IACA,UAAU;IACV,CAAC;IACD;EAEoC"}
@@ -40,5 +40,5 @@ const getElementList = (variant) => {
40
40
  };
41
41
 
42
42
  //#endregion
43
- export { For, ForWithWrapper, getElementList };
44
- //# sourceMappingURL=for-x0-1kO5w.js.map
43
+ export { For as n, ForWithWrapper as r, getElementList as t };
44
+ //# sourceMappingURL=for-CzHe2tKt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"for-x0-1kO5w.js","names":[],"sources":["../../src/components/common/for/for.tsx","../../src/components/common/for/getElementList.ts"],"sourcesContent":["import type {\n\tDiscriminatedRenderItemProps,\n\tPolymorphicPropsStrict,\n} from \"@zayne-labs/toolkit-react/utils\";\nimport { isArray, isNumber, type Prettify } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\n\ntype ArrayOrNumber = number | readonly unknown[];\n\ntype GetArrayItemType<TArray extends ArrayOrNumber> =\n\tTArray extends readonly unknown[] ? TArray[number]\n\t: TArray extends number ? number\n\t: unknown;\n\ntype RenderPropFn<TArray extends ArrayOrNumber> = (\n\titem: GetArrayItemType<TArray>,\n\tindex: number,\n\tarray: Array<GetArrayItemType<TArray>>\n) => React.ReactNode;\n\nexport type ForRenderProps<TArray extends ArrayOrNumber> = DiscriminatedRenderItemProps<\n\tRenderPropFn<TArray>\n>;\n\n/* eslint-disable perfectionist/sort-intersection-types -- Prefer the object to come first before the render props */\ntype ForProps<TArray extends ArrayOrNumber> = Prettify<\n\t{\n\t\teach: TArray;\n\t\tfallback?: React.ReactNode;\n\t} & ForRenderProps<TArray>\n>;\n/* eslint-enable perfectionist/sort-intersection-types -- Prefer the object to come first before the render props */\n\nconst isArrayEmpty = <TArray extends ArrayOrNumber>(each: TArray) => {\n\t// eslint-disable-next-line ts-eslint/no-unnecessary-condition -- Allow\n\treturn each == null || (isNumber(each) && each === 0) || (isArray(each) && each.length === 0);\n};\n\nexport function For<const TArray extends ArrayOrNumber>(props: ForProps<TArray>) {\n\tconst { children, each, fallback = null, renderItem } = props;\n\n\tif (isArrayEmpty(each)) {\n\t\treturn fallback;\n\t}\n\n\tconst resolvedArray = isNumber(each) ? [...Array(each).keys()] : (each as unknown[]);\n\n\tconst selectedChildren = typeof children === \"function\" ? children : renderItem;\n\n\tconst elementList = resolvedArray.map((...params) => {\n\t\ttype Params = Parameters<RenderPropFn<TArray>>;\n\n\t\treturn selectedChildren(...(params as Params));\n\t});\n\n\treturn elementList;\n}\n\nexport function ForWithWrapper<\n\tconst TArray extends ArrayOrNumber,\n\tTElement extends React.ElementType = \"ul\",\n>(props: PolymorphicPropsStrict<TElement, ForProps<TArray>> & { displayFallBackWhenEmpty?: boolean }) {\n\tconst {\n\t\tas: ListContainer = \"ul\",\n\t\tchildren,\n\t\tdisplayFallBackWhenEmpty = false,\n\t\teach,\n\t\tfallback = null,\n\t\trenderItem,\n\t\t...restOfProps\n\t} = props;\n\n\tif (displayFallBackWhenEmpty && isArrayEmpty(each)) {\n\t\treturn fallback;\n\t}\n\n\treturn (\n\t\t<ListContainer {...restOfProps}>\n\t\t\t<For {...({ children, each, fallback, renderItem } as ForProps<TArray>)} />\n\t\t</ListContainer>\n\t);\n}\n","import { For, ForWithWrapper } from \"./for\";\n\ntype GetElementListResult<TVariant extends \"base\" | \"withWrapper\"> =\n\tTVariant extends \"base\" ? [typeof For] : [typeof ForWithWrapper];\n\nconst getElementList = <TVariant extends \"base\" | \"withWrapper\" = \"withWrapper\">(\n\tvariant?: TVariant\n): GetElementListResult<TVariant> => {\n\tswitch (variant) {\n\t\tcase \"base\": {\n\t\t\treturn [For] as never;\n\t\t}\n\t\tcase \"withWrapper\": {\n\t\t\treturn [ForWithWrapper] as never;\n\t\t}\n\t\tdefault: {\n\t\t\treturn [ForWithWrapper] as never;\n\t\t}\n\t}\n};\n\nexport { getElementList };\n"],"mappings":";;;;;AAiCA,MAAM,gBAA8C,SAAiB;AAEpE,QAAO,QAAQ,QAAS,SAAS,KAAK,IAAI,SAAS,KAAO,QAAQ,KAAK,IAAI,KAAK,WAAW;;AAG5F,SAAgB,IAAwC,OAAyB;CAChF,MAAM,EAAE,UAAU,MAAM,WAAW,MAAM,eAAe;AAExD,KAAI,aAAa,KAAK,CACrB,QAAO;CAGR,MAAM,gBAAgB,SAAS,KAAK,GAAG,CAAC,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,GAAI;CAElE,MAAM,mBAAmB,OAAO,aAAa,aAAa,WAAW;AAQrE,QANoB,cAAc,KAAK,GAAG,WAAW;AAGpD,SAAO,iBAAiB,GAAI,OAAkB;GAC7C;;AAKH,SAAgB,eAGd,OAAoG;CACrG,MAAM,EACL,IAAI,gBAAgB,MACpB,UACA,2BAA2B,OAC3B,MACA,WAAW,MACX,WACA,GAAG,gBACA;AAEJ,KAAI,4BAA4B,aAAa,KAAK,CACjD,QAAO;AAGR,QACC,oBAAC;EAAc,GAAI;YAClB,oBAAC;GAAW;GAAU;GAAM;GAAU;IAAqC;GAC5D;;;;;AC1ElB,MAAM,kBACL,YACoC;AACpC,SAAQ,SAAR;EACC,KAAK,OACJ,QAAO,CAAC,IAAI;EAEb,KAAK,cACJ,QAAO,CAAC,eAAe;EAExB,QACC,QAAO,CAAC,eAAe"}
1
+ {"version":3,"file":"for-CzHe2tKt.js","names":[],"sources":["../../src/components/common/for/for.tsx","../../src/components/common/for/getElementList.ts"],"sourcesContent":["import type {\n\tDiscriminatedRenderItemProps,\n\tPolymorphicPropsStrict,\n} from \"@zayne-labs/toolkit-react/utils\";\nimport { isArray, isNumber, type Prettify } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\n\ntype ArrayOrNumber = number | readonly unknown[];\n\ntype GetArrayItemType<TArray extends ArrayOrNumber> =\n\tTArray extends readonly unknown[] ? TArray[number]\n\t: TArray extends number ? number\n\t: unknown;\n\ntype RenderPropFn<TArray extends ArrayOrNumber> = (\n\titem: GetArrayItemType<TArray>,\n\tindex: number,\n\tarray: Array<GetArrayItemType<TArray>>\n) => React.ReactNode;\n\nexport type ForRenderProps<TArray extends ArrayOrNumber> = DiscriminatedRenderItemProps<\n\tRenderPropFn<TArray>\n>;\n\n/* eslint-disable perfectionist/sort-intersection-types -- Prefer the object to come first before the render props */\ntype ForProps<TArray extends ArrayOrNumber> = Prettify<\n\t{\n\t\teach: TArray;\n\t\tfallback?: React.ReactNode;\n\t} & ForRenderProps<TArray>\n>;\n/* eslint-enable perfectionist/sort-intersection-types -- Prefer the object to come first before the render props */\n\nconst isArrayEmpty = <TArray extends ArrayOrNumber>(each: TArray) => {\n\t// eslint-disable-next-line ts-eslint/no-unnecessary-condition -- Allow\n\treturn each == null || (isNumber(each) && each === 0) || (isArray(each) && each.length === 0);\n};\n\nexport function For<const TArray extends ArrayOrNumber>(props: ForProps<TArray>) {\n\tconst { children, each, fallback = null, renderItem } = props;\n\n\tif (isArrayEmpty(each)) {\n\t\treturn fallback;\n\t}\n\n\tconst resolvedArray = isNumber(each) ? [...Array(each).keys()] : (each as unknown[]);\n\n\tconst selectedChildren = typeof children === \"function\" ? children : renderItem;\n\n\tconst elementList = resolvedArray.map((...params) => {\n\t\ttype Params = Parameters<RenderPropFn<TArray>>;\n\n\t\treturn selectedChildren(...(params as Params));\n\t});\n\n\treturn elementList;\n}\n\nexport function ForWithWrapper<\n\tconst TArray extends ArrayOrNumber,\n\tTElement extends React.ElementType = \"ul\",\n>(props: PolymorphicPropsStrict<TElement, ForProps<TArray>> & { displayFallBackWhenEmpty?: boolean }) {\n\tconst {\n\t\tas: ListContainer = \"ul\",\n\t\tchildren,\n\t\tdisplayFallBackWhenEmpty = false,\n\t\teach,\n\t\tfallback = null,\n\t\trenderItem,\n\t\t...restOfProps\n\t} = props;\n\n\tif (displayFallBackWhenEmpty && isArrayEmpty(each)) {\n\t\treturn fallback;\n\t}\n\n\treturn (\n\t\t<ListContainer {...restOfProps}>\n\t\t\t<For {...({ children, each, fallback, renderItem } as ForProps<TArray>)} />\n\t\t</ListContainer>\n\t);\n}\n","import { For, ForWithWrapper } from \"./for\";\n\ntype GetElementListResult<TVariant extends \"base\" | \"withWrapper\"> =\n\tTVariant extends \"base\" ? [typeof For] : [typeof ForWithWrapper];\n\nconst getElementList = <TVariant extends \"base\" | \"withWrapper\" = \"withWrapper\">(\n\tvariant?: TVariant\n): GetElementListResult<TVariant> => {\n\tswitch (variant) {\n\t\tcase \"base\": {\n\t\t\treturn [For] as never;\n\t\t}\n\t\tcase \"withWrapper\": {\n\t\t\treturn [ForWithWrapper] as never;\n\t\t}\n\t\tdefault: {\n\t\t\treturn [ForWithWrapper] as never;\n\t\t}\n\t}\n};\n\nexport { getElementList };\n"],"mappings":";;;;;AAiCA,MAAM,gBAA8C,SAAiB;AAEpE,QAAO,QAAQ,QAAS,SAAS,KAAK,IAAI,SAAS,KAAO,QAAQ,KAAK,IAAI,KAAK,WAAW;;AAG5F,SAAgB,IAAwC,OAAyB;CAChF,MAAM,EAAE,UAAU,MAAM,WAAW,MAAM,eAAe;AAExD,KAAI,aAAa,KAAK,CACrB,QAAO;CAGR,MAAM,gBAAgB,SAAS,KAAK,GAAG,CAAC,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,GAAI;CAElE,MAAM,mBAAmB,OAAO,aAAa,aAAa,WAAW;AAQrE,QANoB,cAAc,KAAK,GAAG,WAAW;AAGpD,SAAO,iBAAiB,GAAI,OAAkB;GAC7C;;AAKH,SAAgB,eAGd,OAAoG;CACrG,MAAM,EACL,IAAI,gBAAgB,MACpB,UACA,2BAA2B,OAC3B,MACA,WAAW,MACX,WACA,GAAG,gBACA;AAEJ,KAAI,4BAA4B,aAAa,KAAK,CACjD,QAAO;AAGR,QACC,oBAAC;EAAc,GAAI;YAClB,oBAAC;GAAW;GAAU;GAAM;GAAU;IAAqC;GAC5D;;;;;AC1ElB,MAAM,kBACL,YACoC;AACpC,SAAQ,SAAR;EACC,KAAK,OACJ,QAAO,CAAC,IAAI;EAEb,KAAK,cACJ,QAAO,CAAC,eAAe;EAExB,QACC,QAAO,CAAC,eAAe"}
@@ -1,6 +1,6 @@
1
- import { ErrorBoundaryProps } from "./index-CfndCNl3.js";
1
+ import { a as ErrorBoundaryProps } from "./index-MF2B98KG.js";
2
2
  import * as React from "react";
3
- import * as react_jsx_runtime22 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/common/suspense-with-boundary/suspense-with-boundary.d.ts
6
6
  type SuspenseWithBoundaryProps = {
@@ -8,7 +8,7 @@ type SuspenseWithBoundaryProps = {
8
8
  errorFallback?: ErrorBoundaryProps["fallback"];
9
9
  fallback?: React.ReactNode;
10
10
  };
11
- declare function SuspenseWithBoundary(props: SuspenseWithBoundaryProps): react_jsx_runtime22.JSX.Element;
11
+ declare function SuspenseWithBoundary(props: SuspenseWithBoundaryProps): react_jsx_runtime6.JSX.Element;
12
12
  //#endregion
13
- export { SuspenseWithBoundary, SuspenseWithBoundaryProps };
14
- //# sourceMappingURL=index-wZII15Ra.d.ts.map
13
+ export { SuspenseWithBoundaryProps as n, SuspenseWithBoundary as t };
14
+ //# sourceMappingURL=index-C_MEUq8L.d.ts.map
@@ -1,7 +1,7 @@
1
- import * as _zayne_labs_toolkit_react1 from "@zayne-labs/toolkit-react";
2
1
  import * as React$1 from "react";
3
2
  import { Component } from "react";
4
- import * as react_jsx_runtime21 from "react/jsx-runtime";
3
+ import * as _zayne_labs_toolkit_react0 from "@zayne-labs/toolkit-react";
4
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/common/error-boundary/types.d.ts
7
7
  type FallbackProps = {
@@ -49,7 +49,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
49
49
  };
50
50
  componentDidCatch(error: Error, info: React$1.ErrorInfo): void;
51
51
  componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
52
- render(): react_jsx_runtime21.JSX.Element;
52
+ render(): react_jsx_runtime10.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$1.Context<ErrorBoundaryContextType>, useErrorBoundaryContext: _zayne_labs_toolkit_react1.UseCustomContext<ErrorBoundaryContextType, true>;
61
+ declare const ErrorBoundaryContext: React$1.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>() => {
@@ -66,5 +66,5 @@ declare const useErrorBoundary: <TError extends Error>() => {
66
66
  showBoundary: (error: TError) => void;
67
67
  };
68
68
  //#endregion
69
- export { ErrorBoundary, type ErrorBoundaryContextType, ErrorBoundaryProps, FallbackProps, useErrorBoundary, useErrorBoundaryContext };
70
- //# sourceMappingURL=index-CfndCNl3.d.ts.map
69
+ export { ErrorBoundaryProps as a, ErrorBoundary as i, ErrorBoundaryContextType as n, FallbackProps as o, useErrorBoundaryContext as r, useErrorBoundary as t };
70
+ //# sourceMappingURL=index-MF2B98KG.d.ts.map
@@ -1,7 +1,7 @@
1
- import { SlotRoot } from "./slot-HtgJHjB9.js";
2
- import { useCallbackRef, useComposeRefs, useToggle } from "@zayne-labs/toolkit-react";
1
+ import { n as SlotRoot } from "./slot-BqX64R24.js";
3
2
  import { isFunction } from "@zayne-labs/toolkit-type-helpers";
4
3
  import { useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
4
+ import { useCallbackRef, useComposeRefs, useToggle } from "@zayne-labs/toolkit-react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { dataAttr, on } from "@zayne-labs/toolkit-core";
7
7
 
@@ -207,5 +207,5 @@ function Presence(props) {
207
207
  }
208
208
 
209
209
  //#endregion
210
- export { Presence };
211
- //# sourceMappingURL=presence-Bj-YnaHv.js.map
210
+ export { Presence as t };
211
+ //# sourceMappingURL=presence-D1o4HPFU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence-Bj-YnaHv.js","names":["timeoutId: number","getPresenceProps: UsePresenceResult[\"propGetters\"][\"getPresenceProps\"]","Slot.Root"],"sources":["../../src/components/common/presence/use-presence.ts","../../src/components/common/presence/presence.tsx"],"sourcesContent":["import { dataAttr, on } from \"@zayne-labs/toolkit-core\";\nimport { useCallbackRef, useToggle } from \"@zayne-labs/toolkit-react\";\nimport type { InferProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from \"react\";\n\ntype StateMachineConfig<TState extends string, TEvent extends string> = {\n\tinitial: TState;\n\tstates: Record<TState, Partial<Record<TEvent, TState>>>;\n};\n\nconst useStateMachine = <TState extends string, TEvent extends string>(\n\tconfig: StateMachineConfig<TState, TEvent>\n) => {\n\tconst reducer = (prevState: TState, event: TEvent): TState => {\n\t\tconst newState = config.states[prevState][event] ?? prevState;\n\n\t\treturn newState;\n\t};\n\n\treturn useReducer(reducer, config.initial);\n};\n\nconst getAnimationName = (styles: CSSStyleDeclaration | null) => styles?.animationName ?? \"none\";\n\nexport type UsePresenceOptions = {\n\tonExitComplete?: () => void;\n\tpresent: boolean;\n\t/**\n\t * @default \"animation\"\n\t */\n\tvariant?: \"animation\" | \"transition\";\n};\n\nexport type UsePresenceResult = {\n\tisPresent: boolean;\n\tisPresentOrIsTransitionComplete: boolean;\n\tpropGetters: {\n\t\tgetPresenceProps: (innerProps: InferProps<HTMLElement>) => InferProps<HTMLElement>;\n\t};\n\tref: React.Ref<HTMLElement>;\n\tshouldStartTransition: boolean;\n};\n\n/**\n * React hook that provides the ability to animate the mount/unmount of a component.\n * @see https://github.com/radix-ui/primitives/blob/main/packages/react/presence/src/presence.tsx\n */\n\nconst usePresence = (options: UsePresenceOptions): UsePresenceResult => {\n\tconst { onExitComplete, present: presentProp, variant = \"animation\" } = options;\n\n\tconst stableOnExitComplete = useCallbackRef(onExitComplete);\n\n\tconst [node, setNode] = useState<HTMLElement | null>(null);\n\n\tconst [hasTransitioned, toggleHasTransitioned] = useToggle(false);\n\n\tconst stylesRef = useRef<CSSStyleDeclaration | null>(null);\n\n\tconst prevNodeStateRef = useRef<{\n\t\tprevAnimationName: string;\n\t\tprevPresent: boolean;\n\t}>({\n\t\tprevAnimationName: \"none\",\n\t\tprevPresent: presentProp,\n\t});\n\n\tconst initialState = presentProp ? \"mounted\" : \"unmounted\";\n\n\tconst [state, send] = useStateMachine({\n\t\tinitial: initialState,\n\t\tstates: {\n\t\t\tmounted: {\n\t\t\t\tANIMATION_OUT: \"unmountSuspended\",\n\t\t\t\tUNMOUNT: \"unmounted\",\n\t\t\t},\n\t\t\tunmounted: {\n\t\t\t\tMOUNT: \"mounted\",\n\t\t\t},\n\t\t\tunmountSuspended: {\n\t\t\t\tANIMATION_END: \"unmounted\",\n\t\t\t\tMOUNT: \"mounted\",\n\t\t\t},\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tconst currentAnimationName = getAnimationName(stylesRef.current);\n\n\t\tprevNodeStateRef.current.prevAnimationName = state === \"mounted\" ? currentAnimationName : \"none\";\n\t}, [state]);\n\n\tuseLayoutEffect(() => {\n\t\tconst styles = stylesRef.current;\n\t\tconst wasPresent = prevNodeStateRef.current.prevPresent;\n\t\tconst hasPresentChanged = wasPresent !== presentProp;\n\n\t\tif (!hasPresentChanged) return;\n\n\t\tconst prevAnimationName = prevNodeStateRef.current.prevAnimationName;\n\t\tconst currentAnimationName = getAnimationName(styles);\n\n\t\tswitch (true) {\n\t\t\tcase presentProp: {\n\t\t\t\tsend(\"MOUNT\");\n\n\t\t\t\tif (variant === \"transition\") {\n\t\t\t\t\trequestAnimationFrame(() => toggleHasTransitioned(true));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase Boolean(node) && variant === \"animation\": {\n\t\t\t\tconst hasAnimation = currentAnimationName !== \"none\" && styles?.display !== \"none\";\n\n\t\t\t\t/**\n\t\t\t\t * When `present` changes to `false`, we check changes to animation-name to\n\t\t\t\t * determine whether an animation has started. We chose this approach (reading\n\t\t\t\t * computed styles) because there is no `animationrun` event (like the `transitionrun` event) and `animationstart`\n\t\t\t\t * fires after `animation-delay` has expired which would be too late.\n\t\t\t\t */\n\n\t\t\t\tconst isAnimationStarted = hasAnimation && prevAnimationName !== currentAnimationName;\n\n\t\t\t\tconst isAnimatingOut = wasPresent && isAnimationStarted;\n\n\t\t\t\tsend(isAnimatingOut ? \"ANIMATION_OUT\" : \"UNMOUNT\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tsend(\"UNMOUNT\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tprevNodeStateRef.current.prevPresent = presentProp;\n\t}, [presentProp, node, send, variant, toggleHasTransitioned]);\n\n\tuseLayoutEffect(() => {\n\t\tif (!node) {\n\t\t\t// Transition to the unmounted state if the node is removed prematurely.\n\t\t\t// We avoid doing so during cleanup as the node may change but still exist.\n\t\t\tsend(\"ANIMATION_END\");\n\t\t\treturn;\n\t\t}\n\n\t\tlet timeoutId: number;\n\n\t\tconst ownerWindow = node.ownerDocument.defaultView ?? globalThis;\n\n\t\tconst handleAnimationStart = (event: AnimationEvent) => {\n\t\t\tconst isTargetAnimatingNode = event.target === node;\n\n\t\t\tif (!isTargetAnimatingNode) return;\n\n\t\t\tprevNodeStateRef.current.prevAnimationName = getAnimationName(stylesRef.current);\n\t\t};\n\n\t\t/**\n\t\t * @description Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n\t\t * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n\t\t * make sure we only trigger ANIMATION_END for the currently active animation.\n\t\t */\n\t\tconst handleAnimationEnd = (event: AnimationEvent) => {\n\t\t\tconst currentAnimationName = getAnimationName(stylesRef.current);\n\n\t\t\t// The event.animationName is unescaped for CSS syntax, so we need to escape it to compare with the animationName computed from the style.\n\t\t\tconst isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n\n\t\t\tconst isTargetAnimatingNode = event.target === node && isCurrentAnimation;\n\n\t\t\tif (!isTargetAnimatingNode) return;\n\n\t\t\t// With React 18 concurrency this update is applied a frame after the\n\t\t\t// animation ends, creating a flash of visible content. By setting the\n\t\t\t// animation fill mode to \"forwards\", we force the node to keep the\n\t\t\t// styles of the last keyframe, removing the flash.\n\n\t\t\t// Previously we flushed the update via ReactDom.flushSync, but with\n\t\t\t// exit animations this resulted in the node being removed from the\n\t\t\t// DOM before the synthetic animationEnd event was dispatched, meaning\n\t\t\t// user-provided event handlers would not be called.\n\t\t\t// https://github.com/radix-ui/primitives/pull/1849\n\t\t\tsend(\"ANIMATION_END\");\n\n\t\t\tif (!prevNodeStateRef.current.prevPresent) {\n\t\t\t\tconst currentFillMode = node.style.animationFillMode;\n\t\t\t\tnode.style.animationFillMode = \"forwards\";\n\n\t\t\t\t// Reset the style after the node had time to unmount (for cases\n\t\t\t\t// where the component chooses not to unmount). Doing this any\n\t\t\t\t// sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n\t\t\t\t// still causes a flash.\n\t\t\t\ttimeoutId = ownerWindow.setTimeout(() => {\n\t\t\t\t\tif (node.style.animationFillMode === \"forwards\") {\n\t\t\t\t\t\tnode.style.animationFillMode = currentFillMode;\n\t\t\t\t\t}\n\t\t\t\t}) as never;\n\t\t\t}\n\t\t};\n\n\t\tconst handleTransitionRun = (event: TransitionEvent) => {\n\t\t\tconst isTargetTransitioningNode = event.target === node;\n\n\t\t\tif (!isTargetTransitioningNode) return;\n\n\t\t\tsend(\"ANIMATION_OUT\");\n\t\t};\n\n\t\tconst handleTransitionEnd = (event: TransitionEvent) => {\n\t\t\tconst isTargetTransitioningNode = event.target === node && !prevNodeStateRef.current.prevPresent;\n\n\t\t\tif (!isTargetTransitioningNode) return;\n\n\t\t\tsend(\"ANIMATION_END\");\n\t\t};\n\n\t\tconst onAnimationStartCleanup = on(\"animationstart\", node, handleAnimationStart);\n\t\tconst onAnimationEndCleanup = on(\"animationend\", node, handleAnimationEnd);\n\t\tconst onAnimationCancelCleanup = on(\"animationcancel\", node, handleAnimationEnd);\n\n\t\tconst onTransitionRunCleanup = on(\"transitionrun\", node, handleTransitionRun);\n\t\tconst onTransitionEndCleanup = on(\"transitionend\", node, handleTransitionEnd);\n\t\tconst onTransitionCancelCleanup = on(\"transitioncancel\", node, handleTransitionEnd);\n\n\t\treturn () => {\n\t\t\townerWindow.clearTimeout(timeoutId);\n\t\t\tonAnimationStartCleanup();\n\t\t\tonAnimationEndCleanup();\n\t\t\tonAnimationCancelCleanup();\n\n\t\t\tonTransitionRunCleanup();\n\t\t\tonTransitionEndCleanup();\n\t\t\tonTransitionCancelCleanup();\n\t\t};\n\t}, [node, send]);\n\n\tuseEffect(() => {\n\t\tconst isExitCompleted = state === \"unmounted\" && !presentProp;\n\n\t\tif (isExitCompleted) {\n\t\t\ttoggleHasTransitioned(false);\n\t\t\tstableOnExitComplete();\n\t\t}\n\t}, [state, presentProp, stableOnExitComplete, toggleHasTransitioned]);\n\n\tconst ref = useCallbackRef((refNode: HTMLElement | null) => {\n\t\tsetNode(refNode);\n\n\t\tif (refNode) {\n\t\t\tstylesRef.current = getComputedStyle(refNode);\n\t\t}\n\t});\n\n\tconst MOUNTED_STATES = [\"mounted\", \"unmountSuspended\"] satisfies Array<typeof state>;\n\tconst isPresent = MOUNTED_STATES.includes(state);\n\tconst isPresentOrIsTransitionComplete = isPresent || hasTransitioned;\n\tconst shouldStartTransition = presentProp && hasTransitioned;\n\n\tconst getPresenceProps: UsePresenceResult[\"propGetters\"][\"getPresenceProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\tconst transitionState = shouldStartTransition ? \"active\" : \"inactive\";\n\n\t\t\treturn {\n\t\t\t\t\"data-present\": dataAttr(isPresent),\n\t\t\t\t\"data-present-or-transition-complete\": dataAttr(isPresentOrIsTransitionComplete),\n\t\t\t\t\"data-state\": state,\n\t\t\t\t...(variant === \"transition\" && { \"data-transition\": transitionState }),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: innerProps.className,\n\t\t\t};\n\t\t},\n\t\t[isPresent, isPresentOrIsTransitionComplete, shouldStartTransition, state, variant]\n\t);\n\n\tconst propGetters = useMemo(() => ({ getPresenceProps }), [getPresenceProps]);\n\n\tconst result = useMemo<UsePresenceResult>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tisPresent,\n\t\t\t\tisPresentOrIsTransitionComplete,\n\t\t\t\tpropGetters,\n\t\t\t\tref,\n\t\t\t\tshouldStartTransition,\n\t\t\t}) satisfies UsePresenceResult,\n\t\t[isPresent, isPresentOrIsTransitionComplete, propGetters, ref, shouldStartTransition]\n\t);\n\n\treturn result;\n};\n\nexport { usePresence };\n","\"use client\";\n\nimport { useComposeRefs } from \"@zayne-labs/toolkit-react\";\nimport { isFunction, type UnknownObject } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\nimport { Slot } from \"../slot\";\nimport { type UsePresenceOptions, type UsePresenceResult, usePresence } from \"./use-presence\";\n\ntype RefProp = { ref?: React.Ref<HTMLElement> };\n\ntype RenderPropContext = Omit<UsePresenceResult, \"propGetters\" | \"ref\">;\n\ntype PresenceProps = UsePresenceOptions & {\n\tchildren?: React.ReactElement<RefProp> | ((props: RenderPropContext) => React.ReactElement<RefProp>);\n\tclassName?: string;\n\tforceMount?: boolean;\n};\n\nfunction Presence(props: PresenceProps) {\n\tconst { children, className, forceMount = false, onExitComplete, present, variant } = props;\n\n\tconst {\n\t\tisPresent,\n\t\tisPresentOrIsTransitionComplete,\n\t\tpropGetters,\n\t\tref: presenceRef,\n\t\tshouldStartTransition,\n\t} = usePresence({ onExitComplete, present, variant });\n\n\tconst context = {\n\t\tisPresent,\n\t\tisPresentOrIsTransitionComplete,\n\t\tshouldStartTransition,\n\t} satisfies RenderPropContext;\n\n\tconst resolvedChild = isFunction(children) ? children(context) : children;\n\n\tconst childRef = (resolvedChild?.props.ref\n\t\t?? (resolvedChild as unknown as UnknownObject).ref) as React.Ref<HTMLElement>;\n\n\tconst ref = useComposeRefs(presenceRef, childRef);\n\n\tconst shouldRender =\n\t\tforceMount || (variant === \"transition\" ? isPresentOrIsTransitionComplete : isPresent);\n\n\tif (!shouldRender) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Slot.Root ref={ref} {...propGetters.getPresenceProps({ className })}>\n\t\t\t{resolvedChild}\n\t\t</Slot.Root>\n\t);\n}\n\nexport { Presence };\n"],"mappings":"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"}
1
+ {"version":3,"file":"presence-D1o4HPFU.js","names":["timeoutId: number","getPresenceProps: UsePresenceResult[\"propGetters\"][\"getPresenceProps\"]","Slot.Root"],"sources":["../../src/components/common/presence/use-presence.ts","../../src/components/common/presence/presence.tsx"],"sourcesContent":["import { dataAttr, on } from \"@zayne-labs/toolkit-core\";\nimport { useCallbackRef, useToggle } from \"@zayne-labs/toolkit-react\";\nimport type { InferProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from \"react\";\n\ntype StateMachineConfig<TState extends string, TEvent extends string> = {\n\tinitial: TState;\n\tstates: Record<TState, Partial<Record<TEvent, TState>>>;\n};\n\nconst useStateMachine = <TState extends string, TEvent extends string>(\n\tconfig: StateMachineConfig<TState, TEvent>\n) => {\n\tconst reducer = (prevState: TState, event: TEvent): TState => {\n\t\tconst newState = config.states[prevState][event] ?? prevState;\n\n\t\treturn newState;\n\t};\n\n\treturn useReducer(reducer, config.initial);\n};\n\nconst getAnimationName = (styles: CSSStyleDeclaration | null) => styles?.animationName ?? \"none\";\n\nexport type UsePresenceOptions = {\n\tonExitComplete?: () => void;\n\tpresent: boolean;\n\t/**\n\t * @default \"animation\"\n\t */\n\tvariant?: \"animation\" | \"transition\";\n};\n\nexport type UsePresenceResult = {\n\tisPresent: boolean;\n\tisPresentOrIsTransitionComplete: boolean;\n\tpropGetters: {\n\t\tgetPresenceProps: (innerProps: InferProps<HTMLElement>) => InferProps<HTMLElement>;\n\t};\n\tref: React.Ref<HTMLElement>;\n\tshouldStartTransition: boolean;\n};\n\n/**\n * React hook that provides the ability to animate the mount/unmount of a component.\n * @see https://github.com/radix-ui/primitives/blob/main/packages/react/presence/src/presence.tsx\n */\n\nconst usePresence = (options: UsePresenceOptions): UsePresenceResult => {\n\tconst { onExitComplete, present: presentProp, variant = \"animation\" } = options;\n\n\tconst stableOnExitComplete = useCallbackRef(onExitComplete);\n\n\tconst [node, setNode] = useState<HTMLElement | null>(null);\n\n\tconst [hasTransitioned, toggleHasTransitioned] = useToggle(false);\n\n\tconst stylesRef = useRef<CSSStyleDeclaration | null>(null);\n\n\tconst prevNodeStateRef = useRef<{\n\t\tprevAnimationName: string;\n\t\tprevPresent: boolean;\n\t}>({\n\t\tprevAnimationName: \"none\",\n\t\tprevPresent: presentProp,\n\t});\n\n\tconst initialState = presentProp ? \"mounted\" : \"unmounted\";\n\n\tconst [state, send] = useStateMachine({\n\t\tinitial: initialState,\n\t\tstates: {\n\t\t\tmounted: {\n\t\t\t\tANIMATION_OUT: \"unmountSuspended\",\n\t\t\t\tUNMOUNT: \"unmounted\",\n\t\t\t},\n\t\t\tunmounted: {\n\t\t\t\tMOUNT: \"mounted\",\n\t\t\t},\n\t\t\tunmountSuspended: {\n\t\t\t\tANIMATION_END: \"unmounted\",\n\t\t\t\tMOUNT: \"mounted\",\n\t\t\t},\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tconst currentAnimationName = getAnimationName(stylesRef.current);\n\n\t\tprevNodeStateRef.current.prevAnimationName = state === \"mounted\" ? currentAnimationName : \"none\";\n\t}, [state]);\n\n\tuseLayoutEffect(() => {\n\t\tconst styles = stylesRef.current;\n\t\tconst wasPresent = prevNodeStateRef.current.prevPresent;\n\t\tconst hasPresentChanged = wasPresent !== presentProp;\n\n\t\tif (!hasPresentChanged) return;\n\n\t\tconst prevAnimationName = prevNodeStateRef.current.prevAnimationName;\n\t\tconst currentAnimationName = getAnimationName(styles);\n\n\t\tswitch (true) {\n\t\t\tcase presentProp: {\n\t\t\t\tsend(\"MOUNT\");\n\n\t\t\t\tif (variant === \"transition\") {\n\t\t\t\t\trequestAnimationFrame(() => toggleHasTransitioned(true));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase Boolean(node) && variant === \"animation\": {\n\t\t\t\tconst hasAnimation = currentAnimationName !== \"none\" && styles?.display !== \"none\";\n\n\t\t\t\t/**\n\t\t\t\t * When `present` changes to `false`, we check changes to animation-name to\n\t\t\t\t * determine whether an animation has started. We chose this approach (reading\n\t\t\t\t * computed styles) because there is no `animationrun` event (like the `transitionrun` event) and `animationstart`\n\t\t\t\t * fires after `animation-delay` has expired which would be too late.\n\t\t\t\t */\n\n\t\t\t\tconst isAnimationStarted = hasAnimation && prevAnimationName !== currentAnimationName;\n\n\t\t\t\tconst isAnimatingOut = wasPresent && isAnimationStarted;\n\n\t\t\t\tsend(isAnimatingOut ? \"ANIMATION_OUT\" : \"UNMOUNT\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tsend(\"UNMOUNT\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tprevNodeStateRef.current.prevPresent = presentProp;\n\t}, [presentProp, node, send, variant, toggleHasTransitioned]);\n\n\tuseLayoutEffect(() => {\n\t\tif (!node) {\n\t\t\t// Transition to the unmounted state if the node is removed prematurely.\n\t\t\t// We avoid doing so during cleanup as the node may change but still exist.\n\t\t\tsend(\"ANIMATION_END\");\n\t\t\treturn;\n\t\t}\n\n\t\tlet timeoutId: number;\n\n\t\tconst ownerWindow = node.ownerDocument.defaultView ?? globalThis;\n\n\t\tconst handleAnimationStart = (event: AnimationEvent) => {\n\t\t\tconst isTargetAnimatingNode = event.target === node;\n\n\t\t\tif (!isTargetAnimatingNode) return;\n\n\t\t\tprevNodeStateRef.current.prevAnimationName = getAnimationName(stylesRef.current);\n\t\t};\n\n\t\t/**\n\t\t * @description Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n\t\t * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n\t\t * make sure we only trigger ANIMATION_END for the currently active animation.\n\t\t */\n\t\tconst handleAnimationEnd = (event: AnimationEvent) => {\n\t\t\tconst currentAnimationName = getAnimationName(stylesRef.current);\n\n\t\t\t// The event.animationName is unescaped for CSS syntax, so we need to escape it to compare with the animationName computed from the style.\n\t\t\tconst isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n\n\t\t\tconst isTargetAnimatingNode = event.target === node && isCurrentAnimation;\n\n\t\t\tif (!isTargetAnimatingNode) return;\n\n\t\t\t// With React 18 concurrency this update is applied a frame after the\n\t\t\t// animation ends, creating a flash of visible content. By setting the\n\t\t\t// animation fill mode to \"forwards\", we force the node to keep the\n\t\t\t// styles of the last keyframe, removing the flash.\n\n\t\t\t// Previously we flushed the update via ReactDom.flushSync, but with\n\t\t\t// exit animations this resulted in the node being removed from the\n\t\t\t// DOM before the synthetic animationEnd event was dispatched, meaning\n\t\t\t// user-provided event handlers would not be called.\n\t\t\t// https://github.com/radix-ui/primitives/pull/1849\n\t\t\tsend(\"ANIMATION_END\");\n\n\t\t\tif (!prevNodeStateRef.current.prevPresent) {\n\t\t\t\tconst currentFillMode = node.style.animationFillMode;\n\t\t\t\tnode.style.animationFillMode = \"forwards\";\n\n\t\t\t\t// Reset the style after the node had time to unmount (for cases\n\t\t\t\t// where the component chooses not to unmount). Doing this any\n\t\t\t\t// sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n\t\t\t\t// still causes a flash.\n\t\t\t\ttimeoutId = ownerWindow.setTimeout(() => {\n\t\t\t\t\tif (node.style.animationFillMode === \"forwards\") {\n\t\t\t\t\t\tnode.style.animationFillMode = currentFillMode;\n\t\t\t\t\t}\n\t\t\t\t}) as never;\n\t\t\t}\n\t\t};\n\n\t\tconst handleTransitionRun = (event: TransitionEvent) => {\n\t\t\tconst isTargetTransitioningNode = event.target === node;\n\n\t\t\tif (!isTargetTransitioningNode) return;\n\n\t\t\tsend(\"ANIMATION_OUT\");\n\t\t};\n\n\t\tconst handleTransitionEnd = (event: TransitionEvent) => {\n\t\t\tconst isTargetTransitioningNode = event.target === node && !prevNodeStateRef.current.prevPresent;\n\n\t\t\tif (!isTargetTransitioningNode) return;\n\n\t\t\tsend(\"ANIMATION_END\");\n\t\t};\n\n\t\tconst onAnimationStartCleanup = on(\"animationstart\", node, handleAnimationStart);\n\t\tconst onAnimationEndCleanup = on(\"animationend\", node, handleAnimationEnd);\n\t\tconst onAnimationCancelCleanup = on(\"animationcancel\", node, handleAnimationEnd);\n\n\t\tconst onTransitionRunCleanup = on(\"transitionrun\", node, handleTransitionRun);\n\t\tconst onTransitionEndCleanup = on(\"transitionend\", node, handleTransitionEnd);\n\t\tconst onTransitionCancelCleanup = on(\"transitioncancel\", node, handleTransitionEnd);\n\n\t\treturn () => {\n\t\t\townerWindow.clearTimeout(timeoutId);\n\t\t\tonAnimationStartCleanup();\n\t\t\tonAnimationEndCleanup();\n\t\t\tonAnimationCancelCleanup();\n\n\t\t\tonTransitionRunCleanup();\n\t\t\tonTransitionEndCleanup();\n\t\t\tonTransitionCancelCleanup();\n\t\t};\n\t}, [node, send]);\n\n\tuseEffect(() => {\n\t\tconst isExitCompleted = state === \"unmounted\" && !presentProp;\n\n\t\tif (isExitCompleted) {\n\t\t\ttoggleHasTransitioned(false);\n\t\t\tstableOnExitComplete();\n\t\t}\n\t}, [state, presentProp, stableOnExitComplete, toggleHasTransitioned]);\n\n\tconst ref = useCallbackRef((refNode: HTMLElement | null) => {\n\t\tsetNode(refNode);\n\n\t\tif (refNode) {\n\t\t\tstylesRef.current = getComputedStyle(refNode);\n\t\t}\n\t});\n\n\tconst MOUNTED_STATES = [\"mounted\", \"unmountSuspended\"] satisfies Array<typeof state>;\n\tconst isPresent = MOUNTED_STATES.includes(state);\n\tconst isPresentOrIsTransitionComplete = isPresent || hasTransitioned;\n\tconst shouldStartTransition = presentProp && hasTransitioned;\n\n\tconst getPresenceProps: UsePresenceResult[\"propGetters\"][\"getPresenceProps\"] = useCallback(\n\t\t(innerProps) => {\n\t\t\tconst transitionState = shouldStartTransition ? \"active\" : \"inactive\";\n\n\t\t\treturn {\n\t\t\t\t\"data-present\": dataAttr(isPresent),\n\t\t\t\t\"data-present-or-transition-complete\": dataAttr(isPresentOrIsTransitionComplete),\n\t\t\t\t\"data-state\": state,\n\t\t\t\t...(variant === \"transition\" && { \"data-transition\": transitionState }),\n\t\t\t\t...innerProps,\n\t\t\t\tclassName: innerProps.className,\n\t\t\t};\n\t\t},\n\t\t[isPresent, isPresentOrIsTransitionComplete, shouldStartTransition, state, variant]\n\t);\n\n\tconst propGetters = useMemo(() => ({ getPresenceProps }), [getPresenceProps]);\n\n\tconst result = useMemo<UsePresenceResult>(\n\t\t() =>\n\t\t\t({\n\t\t\t\tisPresent,\n\t\t\t\tisPresentOrIsTransitionComplete,\n\t\t\t\tpropGetters,\n\t\t\t\tref,\n\t\t\t\tshouldStartTransition,\n\t\t\t}) satisfies UsePresenceResult,\n\t\t[isPresent, isPresentOrIsTransitionComplete, propGetters, ref, shouldStartTransition]\n\t);\n\n\treturn result;\n};\n\nexport { usePresence };\n","\"use client\";\n\nimport { useComposeRefs } from \"@zayne-labs/toolkit-react\";\nimport { isFunction, type UnknownObject } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\nimport { Slot } from \"../slot\";\nimport { type UsePresenceOptions, type UsePresenceResult, usePresence } from \"./use-presence\";\n\ntype RefProp = { ref?: React.Ref<HTMLElement> };\n\ntype RenderPropContext = Omit<UsePresenceResult, \"propGetters\" | \"ref\">;\n\ntype PresenceProps = UsePresenceOptions & {\n\tchildren?: React.ReactElement<RefProp> | ((props: RenderPropContext) => React.ReactElement<RefProp>);\n\tclassName?: string;\n\tforceMount?: boolean;\n};\n\nfunction Presence(props: PresenceProps) {\n\tconst { children, className, forceMount = false, onExitComplete, present, variant } = props;\n\n\tconst {\n\t\tisPresent,\n\t\tisPresentOrIsTransitionComplete,\n\t\tpropGetters,\n\t\tref: presenceRef,\n\t\tshouldStartTransition,\n\t} = usePresence({ onExitComplete, present, variant });\n\n\tconst context = {\n\t\tisPresent,\n\t\tisPresentOrIsTransitionComplete,\n\t\tshouldStartTransition,\n\t} satisfies RenderPropContext;\n\n\tconst resolvedChild = isFunction(children) ? children(context) : children;\n\n\tconst childRef = (resolvedChild?.props.ref\n\t\t?? (resolvedChild as unknown as UnknownObject).ref) as React.Ref<HTMLElement>;\n\n\tconst ref = useComposeRefs(presenceRef, childRef);\n\n\tconst shouldRender =\n\t\tforceMount || (variant === \"transition\" ? isPresentOrIsTransitionComplete : isPresent);\n\n\tif (!shouldRender) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Slot.Root ref={ref} {...propGetters.getPresenceProps({ className })}>\n\t\t\t{resolvedChild}\n\t\t</Slot.Root>\n\t);\n}\n\nexport { Presence };\n"],"mappings":"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"}
@@ -1,7 +1,7 @@
1
- import { __export } from "./chunk-CTAAG5j7.js";
1
+ import { t as __export } from "./chunk-Bp6m_JJh.js";
2
+ import { getMultipleSlots, getSingleSlot } from "@zayne-labs/toolkit-react/utils";
2
3
  import { assert, isFunction } from "@zayne-labs/toolkit-type-helpers";
3
4
  import "react";
4
- import { getMultipleSlots, getSingleSlot } from "@zayne-labs/toolkit-react/utils";
5
5
  import { toArray } from "@zayne-labs/toolkit-core";
6
6
 
7
7
  //#region src/components/common/show/show.tsx
@@ -45,5 +45,5 @@ var show_parts_exports = /* @__PURE__ */ __export({
45
45
  });
46
46
 
47
47
  //#endregion
48
- export { ShowContent, ShowFallback, ShowRoot, show_parts_exports };
49
- //# sourceMappingURL=show-kIsXcWiR.js.map
48
+ export { ShowRoot as i, ShowContent as n, ShowFallback as r, show_parts_exports as t };
49
+ //# sourceMappingURL=show-CoTEBp0b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"show-kIsXcWiR.js","names":["fallBackSlot"],"sources":["../../src/components/common/show/show.tsx","../../src/components/common/show/show-parts.ts"],"sourcesContent":["\"use client\";\n\nimport { toArray } from \"@zayne-labs/toolkit-core\";\nimport { getMultipleSlots, getSingleSlot } from \"@zayne-labs/toolkit-react/utils\";\nimport { assert, isFunction } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\n\ntype ShowProps<TWhen> =\n\t| {\n\t\t\tchildren: React.ReactNode;\n\t\t\tcontrol: \"content\";\n\t\t\tfallback?: React.ReactNode;\n\t\t\twhen?: never;\n\t }\n\t| {\n\t\t\tchildren: React.ReactNode | ((value: TWhen) => React.ReactNode);\n\t\t\tcontrol?: \"root\";\n\t\t\tfallback?: React.ReactNode;\n\t\t\twhen: false | TWhen | null | undefined;\n\t };\n\nexport function ShowRoot<TWhen>(props: ShowProps<TWhen>) {\n\tconst { children, control = \"root\", fallback = null, when } = props;\n\n\tif (control === \"content\" && !isFunction(children)) {\n\t\tconst childrenArray = toArray(children) as Array<React.ReactElement<ShowContentProps<TWhen>>>;\n\n\t\tconst foundContentSlot = childrenArray.find((child) => Boolean(child.props.when));\n\n\t\tconst fallBackSlot = getSingleSlot(childrenArray, ShowFallback);\n\n\t\tassert(\n\t\t\t!(fallBackSlot && fallback),\n\t\t\t\"The fallback prop and <Show.Fallback> cannot be used at the same time.\"\n\t\t);\n\n\t\treturn foundContentSlot ?? fallBackSlot ?? fallback;\n\t}\n\n\tconst resolvedChildren = isFunction(children) ? children(when as TWhen) : children;\n\n\tconst {\n\t\tregularChildren,\n\t\tslots: [contentSlot, fallBackSlot],\n\t} = getMultipleSlots(resolvedChildren, [ShowContent, ShowFallback], {\n\t\terrorMessage: [\n\t\t\t\"Only one <Show.Content> component is allowed\",\n\t\t\t\"Only one <Show.Fallback> or <Show.OtherWise> component is allowed\",\n\t\t],\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tif (!when) {\n\t\tassert(\n\t\t\t!(fallBackSlot && fallback),\n\t\t\t\"The fallback prop and <Show.Fallback> cannot be used at the same time.\"\n\t\t);\n\n\t\treturn fallBackSlot ?? fallback;\n\t}\n\n\treturn contentSlot ?? regularChildren;\n}\n\ntype ShowContentProps<TWhen> = Pick<ShowProps<TWhen>, \"children\" | \"when\">;\n\nexport function ShowContent<TWhen>(props: ShowContentProps<TWhen>) {\n\tconst { children, when } = props;\n\n\tconst resolvedChildren = isFunction(children) ? children(when as TWhen) : children;\n\n\treturn resolvedChildren;\n}\n\nShowContent.slotSymbol = Symbol(\"show-content\");\n\nexport function ShowFallback(props: { children: React.ReactNode }) {\n\tconst { children } = props;\n\n\treturn children;\n}\nShowFallback.slotSymbol = Symbol(\"show-fallback\");\n","export {\n\tShowContent as Content,\n\tShowFallback as Fallback,\n\tShowFallback as Otherwise,\n\tShowRoot as Root,\n} from \"./show\";\n"],"mappings":";;;;;;;AAqBA,SAAgB,SAAgB,OAAyB;CACxD,MAAM,EAAE,UAAU,UAAU,QAAQ,WAAW,MAAM,SAAS;AAE9D,KAAI,YAAY,aAAa,CAAC,WAAW,SAAS,EAAE;EACnD,MAAM,gBAAgB,QAAQ,SAAS;EAEvC,MAAM,mBAAmB,cAAc,MAAM,UAAU,QAAQ,MAAM,MAAM,KAAK,CAAC;EAEjF,MAAMA,iBAAe,cAAc,eAAe,aAAa;AAE/D,SACC,EAAEA,kBAAgB,WAClB,yEACA;AAED,SAAO,oBAAoBA,kBAAgB;;CAK5C,MAAM,EACL,iBACA,OAAO,CAAC,aAAa,kBAClB,iBALqB,WAAW,SAAS,GAAG,SAAS,KAAc,GAAG,UAKnC,CAAC,aAAa,aAAa,EAAE;EACnE,cAAc,CACb,gDACA,oEACA;EACD,0BAA0B;EAC1B,CAAC;AAEF,KAAI,CAAC,MAAM;AACV,SACC,EAAE,gBAAgB,WAClB,yEACA;AAED,SAAO,gBAAgB;;AAGxB,QAAO,eAAe;;AAKvB,SAAgB,YAAmB,OAAgC;CAClE,MAAM,EAAE,UAAU,SAAS;AAI3B,QAFyB,WAAW,SAAS,GAAG,SAAS,KAAc,GAAG;;AAK3E,YAAY,aAAa,OAAO,eAAe;AAE/C,SAAgB,aAAa,OAAsC;CAClE,MAAM,EAAE,aAAa;AAErB,QAAO;;AAER,aAAa,aAAa,OAAO,gBAAgB"}
1
+ {"version":3,"file":"show-CoTEBp0b.js","names":["fallBackSlot"],"sources":["../../src/components/common/show/show.tsx","../../src/components/common/show/show-parts.ts"],"sourcesContent":["\"use client\";\n\nimport { toArray } from \"@zayne-labs/toolkit-core\";\nimport { getMultipleSlots, getSingleSlot } from \"@zayne-labs/toolkit-react/utils\";\nimport { assert, isFunction } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\n\ntype ShowProps<TWhen> =\n\t| {\n\t\t\tchildren: React.ReactNode;\n\t\t\tcontrol: \"content\";\n\t\t\tfallback?: React.ReactNode;\n\t\t\twhen?: never;\n\t }\n\t| {\n\t\t\tchildren: React.ReactNode | ((value: TWhen) => React.ReactNode);\n\t\t\tcontrol?: \"root\";\n\t\t\tfallback?: React.ReactNode;\n\t\t\twhen: false | TWhen | null | undefined;\n\t };\n\nexport function ShowRoot<TWhen>(props: ShowProps<TWhen>) {\n\tconst { children, control = \"root\", fallback = null, when } = props;\n\n\tif (control === \"content\" && !isFunction(children)) {\n\t\tconst childrenArray = toArray(children) as Array<React.ReactElement<ShowContentProps<TWhen>>>;\n\n\t\tconst foundContentSlot = childrenArray.find((child) => Boolean(child.props.when));\n\n\t\tconst fallBackSlot = getSingleSlot(childrenArray, ShowFallback);\n\n\t\tassert(\n\t\t\t!(fallBackSlot && fallback),\n\t\t\t\"The fallback prop and <Show.Fallback> cannot be used at the same time.\"\n\t\t);\n\n\t\treturn foundContentSlot ?? fallBackSlot ?? fallback;\n\t}\n\n\tconst resolvedChildren = isFunction(children) ? children(when as TWhen) : children;\n\n\tconst {\n\t\tregularChildren,\n\t\tslots: [contentSlot, fallBackSlot],\n\t} = getMultipleSlots(resolvedChildren, [ShowContent, ShowFallback], {\n\t\terrorMessage: [\n\t\t\t\"Only one <Show.Content> component is allowed\",\n\t\t\t\"Only one <Show.Fallback> or <Show.OtherWise> component is allowed\",\n\t\t],\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tif (!when) {\n\t\tassert(\n\t\t\t!(fallBackSlot && fallback),\n\t\t\t\"The fallback prop and <Show.Fallback> cannot be used at the same time.\"\n\t\t);\n\n\t\treturn fallBackSlot ?? fallback;\n\t}\n\n\treturn contentSlot ?? regularChildren;\n}\n\ntype ShowContentProps<TWhen> = Pick<ShowProps<TWhen>, \"children\" | \"when\">;\n\nexport function ShowContent<TWhen>(props: ShowContentProps<TWhen>) {\n\tconst { children, when } = props;\n\n\tconst resolvedChildren = isFunction(children) ? children(when as TWhen) : children;\n\n\treturn resolvedChildren;\n}\n\nShowContent.slotSymbol = Symbol(\"show-content\");\n\nexport function ShowFallback(props: { children: React.ReactNode }) {\n\tconst { children } = props;\n\n\treturn children;\n}\nShowFallback.slotSymbol = Symbol(\"show-fallback\");\n","export {\n\tShowContent as Content,\n\tShowFallback as Fallback,\n\tShowFallback as Otherwise,\n\tShowRoot as Root,\n} from \"./show\";\n"],"mappings":";;;;;;;AAqBA,SAAgB,SAAgB,OAAyB;CACxD,MAAM,EAAE,UAAU,UAAU,QAAQ,WAAW,MAAM,SAAS;AAE9D,KAAI,YAAY,aAAa,CAAC,WAAW,SAAS,EAAE;EACnD,MAAM,gBAAgB,QAAQ,SAAS;EAEvC,MAAM,mBAAmB,cAAc,MAAM,UAAU,QAAQ,MAAM,MAAM,KAAK,CAAC;EAEjF,MAAMA,iBAAe,cAAc,eAAe,aAAa;AAE/D,SACC,EAAEA,kBAAgB,WAClB,yEACA;AAED,SAAO,oBAAoBA,kBAAgB;;CAK5C,MAAM,EACL,iBACA,OAAO,CAAC,aAAa,kBAClB,iBALqB,WAAW,SAAS,GAAG,SAAS,KAAc,GAAG,UAKnC,CAAC,aAAa,aAAa,EAAE;EACnE,cAAc,CACb,gDACA,oEACA;EACD,0BAA0B;EAC1B,CAAC;AAEF,KAAI,CAAC,MAAM;AACV,SACC,EAAE,gBAAgB,WAClB,yEACA;AAED,SAAO,gBAAgB;;AAGxB,QAAO,eAAe;;AAKvB,SAAgB,YAAmB,OAAgC;CAClE,MAAM,EAAE,UAAU,SAAS;AAI3B,QAFyB,WAAW,SAAS,GAAG,SAAS,KAAc,GAAG;;AAK3E,YAAY,aAAa,OAAO,eAAe;AAE/C,SAAgB,aAAa,OAAsC;CAClE,MAAM,EAAE,aAAa;AAErB,QAAO;;AAER,aAAa,aAAa,OAAO,gBAAgB"}
@@ -1,7 +1,7 @@
1
- import { __export } from "./chunk-CTAAG5j7.js";
1
+ import { t as __export } from "./chunk-Bp6m_JJh.js";
2
+ import { composeRefs, mergeProps } from "@zayne-labs/toolkit-react/utils";
2
3
  import { isArray } from "@zayne-labs/toolkit-type-helpers";
3
4
  import { Children, Fragment, cloneElement, isValidElement } from "react";
4
- import { composeRefs, mergeProps } from "@zayne-labs/toolkit-react/utils";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/common/slot/slot.tsx
@@ -53,5 +53,5 @@ var slot_parts_exports = /* @__PURE__ */ __export({
53
53
  });
54
54
 
55
55
  //#endregion
56
- export { SlotRoot, SlotSlottable, slot_parts_exports };
57
- //# sourceMappingURL=slot-HtgJHjB9.js.map
56
+ export { SlotRoot as n, SlotSlottable as r, slot_parts_exports as t };
57
+ //# sourceMappingURL=slot-BqX64R24.js.map